static void _set_current_r_idx(int r_idx) { if (r_idx == p_ptr->current_r_idx) return; disturb(1, 0); if (r_idx == MON_MIMIC && p_ptr->current_r_idx) msg_format("You stop mimicking %s.", r_name + r_info[p_ptr->current_r_idx].name); possessor_set_current_r_idx(r_idx); if (r_idx != MON_MIMIC) msg_format("You start mimicking %s.", r_name + r_info[p_ptr->current_r_idx].name); /* Mimics shift forms often enough to be annoying if shapes have dramatically different body types (e.g. dragons vs humanoids). Inscribe gear with @mimic to autoequip on shifing. */ equip_shuffle("@mimic1"); equip_shuffle("@mimic2"); equip_shuffle("@mimic3"); equip_shuffle("@mimic4"); equip_shuffle("@mimic"); }
static void _polymorph_wolf_spell(int cmd, variant *res) { switch (cmd) { case SPELL_NAME: var_set_string(res, "Polymorph Wolf"); break; case SPELL_DESC: var_set_string(res, "You assume the form of a wolf, hungry for prey."); break; case SPELL_CAST: _set_mimic_form(MIMIC_WOLF); equip_shuffle("@wolf"); msg_print("You transform into a dire wolf!"); var_set_bool(res, TRUE); break; default: default_spell(cmd, res); break; } }
static void _polymorph_mist_spell(int cmd, variant *res) { switch (cmd) { case SPELL_NAME: var_set_string(res, "Polymorph Mist"); break; case SPELL_DESC: var_set_string(res, "You lose your corporeal form to assume a cloud of evil sentient mist!"); break; case SPELL_CAST: _set_mimic_form(MIMIC_MIST); equip_shuffle("@mist"); msg_print("You transform into vampiric mist!"); var_set_bool(res, TRUE); break; default: default_spell(cmd, res); break; } }
static void _polymorph_bat_spell(int cmd, variant *res) { switch (cmd) { case SPELL_NAME: var_set_string(res, "Polymorph Bat"); break; case SPELL_DESC: var_set_string(res, "You assume the form of a giant bat. This grants incredible speed, stealth and sensory awareness, but makes you extremely fragile. Also, bats have very restricted equipment options!"); break; case SPELL_CAST: _set_mimic_form(MIMIC_BAT); equip_shuffle("@bat"); msg_print("You transform into a vampire bat!"); var_set_bool(res, TRUE); break; default: default_spell(cmd, res); break; } }
static void _polymorph_undo_spell(int cmd, variant *res) { switch (cmd) { case SPELL_NAME: var_set_string(res, "Return to Vampire"); break; case SPELL_DESC: var_set_string(res, "You stop assuming your current form and revert to your natural, vampiric self."); break; case SPELL_CAST: _set_mimic_form(MIMIC_NONE); equip_shuffle("@vampire"); msg_print("You revert to your natural form."); var_set_bool(res, TRUE); break; default: default_spell(cmd, res); break; } }