#define H_VER_MAJOR 2
#define H_VER_MINOR 1
#define H_VER_PATCH 2
-#define H_VER_EXTRA 3
+#define H_VER_EXTRA 4
#define ANGBAND_2_8_1
}
else o_ptr->art_name = 0;
- if(h_older_than(2,1,2,3))
+ if(h_older_than(2,1,2,4))
{
u32b flgs[TR_FLAG_SIZE];
object_flags(o_ptr, flgs);
if (o_ptr->name2 == EGO_LITE_DARKNESS) info[i++] = _("¤½¤ì¤ÏÁ´¤¯¸÷¤é¤Ê¤¤¡£", "It provides no light.");
rad = 0;
- if (have_flag(flgs, TR_LITE_1)) rad += 1;
- if (have_flag(flgs, TR_LITE_2)) rad += 2;
- if (have_flag(flgs, TR_LITE_3)) rad += 3;
+ if (have_flag(flgs, TR_LITE_1) && o_ptr->name2 != EGO_LITE_DARKNESS) rad += 1;
+ if (have_flag(flgs, TR_LITE_2) && o_ptr->name2 != EGO_LITE_DARKNESS) rad += 2;
+ if (have_flag(flgs, TR_LITE_3) && o_ptr->name2 != EGO_LITE_DARKNESS) rad += 3;
if (have_flag(flgs, TR_LITE_M1)) rad -= 1;
if (have_flag(flgs, TR_LITE_M2)) rad -= 2;
if (have_flag(flgs, TR_LITE_M3)) rad -= 3;
if(o_ptr->name2 == EGO_LITE_SHINE) rad++;
- if (have_flag(flgs, TR_LITE_FUEL))
+ if (have_flag(flgs, TR_LITE_FUEL) && o_ptr->name2 != EGO_LITE_DARKNESS)
{
if(rad > 0) sprintf(desc, _("¤½¤ì¤ÏdzÎÁÊäµë¤Ë¤è¤Ã¤ÆÌÀ¤«¤ê(Ⱦ·Â %d)¤ò¼ø¤±¤ë¡£", "It provides light (radius %d) when fueled."), rad);
}
{
case EGO_LITE_DARKNESS:
o_ptr->xtra4 = 0;
+
+ if (o_ptr->sval == SV_LITE_TORCH)
+ {
+ add_flag(o_ptr->art_flags, TR_LITE_M1);
+ }
+ else if (o_ptr->sval == SV_LITE_LANTERN)
+ {
+ add_flag(o_ptr->art_flags, TR_LITE_M2);
+ }
+ else if (o_ptr->sval == SV_LITE_FEANOR)
+ {
+ add_flag(o_ptr->art_flags, TR_LITE_M3);
+ }
break;
}
}
*/
static void calc_torch(void)
{
- int i;
+ int i, rad;
object_type *o_ptr;
u32b flgs[TR_FLAG_SIZE];
object_flags(o_ptr, flgs);
/* calc the lite_radius */
- if (have_flag(flgs, TR_LITE_1)) p_ptr->cur_lite += 1;
- if (have_flag(flgs, TR_LITE_2)) p_ptr->cur_lite += 2;
- if (have_flag(flgs, TR_LITE_3)) p_ptr->cur_lite += 3;
- if (have_flag(flgs, TR_LITE_M1)) p_ptr->cur_lite -= 1;
- if (have_flag(flgs, TR_LITE_M2)) p_ptr->cur_lite -= 2;
- if (have_flag(flgs, TR_LITE_M3)) p_ptr->cur_lite -= 3;
+
+ rad = 0;
+ if (have_flag(flgs, TR_LITE_1) && o_ptr->name2 != EGO_LITE_DARKNESS) rad += 1;
+ if (have_flag(flgs, TR_LITE_2) && o_ptr->name2 != EGO_LITE_DARKNESS) rad += 2;
+ if (have_flag(flgs, TR_LITE_3) && o_ptr->name2 != EGO_LITE_DARKNESS) rad += 3;
+ if (have_flag(flgs, TR_LITE_M1)) rad -= 1;
+ if (have_flag(flgs, TR_LITE_M2)) rad -= 2;
+ if (have_flag(flgs, TR_LITE_M3)) rad -= 3;
+ p_ptr->cur_lite += rad;
}
/* max radius is 14 (was 5) without rewriting other code -- */