int activation_index(object_type *o_ptr)
{
+ /* Give priority to weaponsmith's essential activations */
+ if (object_is_smith(o_ptr))
+ {
+ switch (o_ptr->xtra3-1)
+ {
+ case ESSENCE_TMP_RES_ACID: return ACT_RESIST_ACID;
+ case ESSENCE_TMP_RES_ELEC: return ACT_RESIST_ELEC;
+ case ESSENCE_TMP_RES_FIRE: return ACT_RESIST_FIRE;
+ case ESSENCE_TMP_RES_COLD: return ACT_RESIST_COLD;
+ case TR_IMPACT: return ACT_QUAKE;
+ }
+ }
+
if (object_is_fixed_artifact(o_ptr))
{
return a_info[o_ptr->name1].act_idx;
/* Sound */
sound(SOUND_ZAP);
- /* Give priority to weaponsmith's essential activations */
- if (object_is_smith(o_ptr))
- {
- switch (o_ptr->xtra3-1)
- {
- case ESSENCE_TMP_RES_ACID:
- (void)set_oppose_acid(randint1(20) + 20, FALSE);
- o_ptr->timeout = randint0(50) + 50;
- return;
-
- case ESSENCE_TMP_RES_ELEC:
- (void)set_oppose_elec(randint1(20) + 20, FALSE);
- o_ptr->timeout = randint0(50) + 50;
- return;
-
- case ESSENCE_TMP_RES_FIRE:
- (void)set_oppose_fire(randint1(20) + 20, FALSE);
- o_ptr->timeout = randint0(50) + 50;
- return;
-
- case ESSENCE_TMP_RES_COLD:
- (void)set_oppose_cold(randint1(20) + 20, FALSE);
- o_ptr->timeout = randint0(50) + 50;
- return;
-
- case TR_IMPACT:
- earthquake(py, px, 5);
- o_ptr->timeout = 100 + randint1(100);
-
- /* Window stuff */
- p_ptr->window |= (PW_INVEN | PW_EQUIP);
-
- /* Done */
- return;
- }
- }
-
/* Activate object */
if (activation_index(o_ptr))
{
if (!(have_flag(flgs, TR_ACTIVATE))) return ("nothing");
#endif
- /*
- * We need to deduce somehow that it is a random artifact -- one
- * problem: It could be a random artifact which has NOT YET received
- * a name. Thus we eliminate other possibilities instead of checking
- * for art_name
- */
-
- /* Give priority to weaponsmith's essential activations */
- if (object_is_smith(o_ptr))
- {
- switch (o_ptr->xtra3 - 1)
- {
- case ESSENCE_TMP_RES_ACID:
-#ifdef JP
- return "»À¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
-#else
- return "resist acid every 50+d50 turns";
-#endif
- case ESSENCE_TMP_RES_ELEC:
-#ifdef JP
- return "ÅÅ·â¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
-#else
- return "resist elec every 50+d50 turns";
-#endif
- case ESSENCE_TMP_RES_FIRE:
-#ifdef JP
- return "²Ð¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
-#else
- return "resist fire every 50+d50 turns";
-#endif
- case ESSENCE_TMP_RES_COLD:
-#ifdef JP
- return "Î䵤¤Ø¤ÎÂÑÀ : 50+d50¥¿¡¼¥óËè";
-#else
- return "resist cold every 50+d50 turns";
-#endif
- case TR_IMPACT:
-#ifdef JP
- return "ÃÏ¿Ì : 100+d100 ¥¿¡¼¥óËè";
-#else
- return "earthquake every 100+d100 turns";
-#endif
- }
- }
-
/* Get an explain of an activation */
if (activation_index(o_ptr))
{