diff options
author | Shmuale Mark <shm.mark@gmail.com> | 2014-06-26 14:16:49 -0400 |
---|---|---|
committer | Shmuale Mark <shm.mark@gmail.com> | 2014-06-26 14:16:49 -0400 |
commit | 0e1b8faa9d1878b449fac1ff185b63526249e8d8 (patch) | |
tree | 136613c7bbec95f103d4db910cd4865d050f8194 /crawl-ref/source/mon-abil.cc | |
parent | 8d4f0ef980dcbef12f53137d11df3fe11ce316f2 (diff) | |
download | crawl-ref-0e1b8faa9d1878b449fac1ff185b63526249e8d8.tar.gz crawl-ref-0e1b8faa9d1878b449fac1ff185b63526249e8d8.zip |
Make living lost soul revival more like the undead one.
Turning the monster into a spectre is a really cool effect and causes
some useful things automatically, like making it evil, but has interface
problems (with showing the base monster type, not just the species) and
also monster-monster consistency ones (in general, spectral things can't
cast spells).
There are minor gameplay differences, mostly in that the new monster
will not have any of the resistances/vulnerabities of being undead,
but in general it should play similarly to how it already does.
Diffstat (limited to 'crawl-ref/source/mon-abil.cc')
-rw-r--r-- | crawl-ref/source/mon-abil.cc | 98 |
1 files changed, 24 insertions, 74 deletions
diff --git a/crawl-ref/source/mon-abil.cc b/crawl-ref/source/mon-abil.cc index c0ddd2ba15..be52639726 100644 --- a/crawl-ref/source/mon-abil.cc +++ b/crawl-ref/source/mon-abil.cc @@ -1832,8 +1832,7 @@ static bool _lost_soul_affectable(const monster* mons) && mons->type != MONS_LOST_SOUL && !mons_is_zombified(mons)) ||(mons->holiness() == MH_NATURAL - && !is_good_god(mons->god) - && mons_can_be_zombified(mons))) + && !is_good_god(mons->god))) && !mons->is_summoned() && !mons_class_flag(mons->type, M_NO_EXP_GAIN); } @@ -1934,87 +1933,38 @@ bool lost_soul_revive(monster* mons) targetter_los hitfunc(*mi, LOS_SOLID); flash_view_delay(GREEN, 200, &hitfunc); - if (you.can_see(*mi)) + if (mons->holiness() == MH_UNDEAD) { - mprf("%s sacrifices itself to reknit %s!", - mi->name(DESC_THE).c_str(), - mons->name(DESC_THE).c_str()); + if (you.can_see(*mi)) + { + mprf("%s sacrifices itself to reknit %s!", + mi->name(DESC_THE).c_str(), + mons->name(DESC_THE).c_str()); + } + else if (you.can_see(mons)) + { + mprf("Necromantic energies suffuse and reknit %s!", + mons->name(DESC_THE).c_str()); + } } - else if (you.can_see(mons)) + else if (you.can_see(*mi)) { - mprf("Necromantic energies suffuse and reknit %s!", - mons->name(DESC_THE).c_str()); + mprf("The lost soul assumes the form of %s%s!", + mons->name(DESC_THE).c_str(), + (mi->is_summoned() ? " and becomes anchored to this world" + : "")); + + mons->flags |= MF_SPECTRALISED; } mons->heal(mons->max_hit_points); mons->del_ench(ENCH_CONFUSION, true); mons->timeout_enchantments(10); - monster_die(*mi, KILL_MISC, -1, true); - return true; - } - } - - return false; -} - -bool lost_soul_spectralize(monster* mons) -{ - if (!_lost_soul_affectable(mons)) - return false; - - for (monster_near_iterator mi(mons, LOS_NO_TRANS); mi; ++mi) - { - if (mi->type == MONS_LOST_SOUL && mons_aligned(mons, *mi)) - { - if (!_worthy_sacrifice(*mi, mons)) - continue; - - targetter_los hitfunc(*mi, LOS_SOLID); - flash_view_delay(GREEN, 200, &hitfunc); - - if (you.can_see(*mi)) - { - mprf("The lost soul assumes the form of %s%s!", - mons->name(DESC_THE).c_str(), - (mi->is_summoned() ? " and becomes anchored to this world" - : "")); - } - - define_zombie(*mi, mons->type, MONS_SPECTRAL_THING); - mi->flags |= MF_NO_REWARD | MF_SEEN; - mi->flags |= mons->flags & (MF_MELEE_MASK | MF_SPELL_MASK); - mi->spells = mons->spells; - mi->god = mons->god; - - name_zombie(*mi, mons); - invalidate_agrid(); - - // Duplicate objects, or unequip them if they can't be duplicated. - for (int i = 0; i < NUM_MONSTER_SLOTS; i++) - { - const int old_index = mons->inv[i]; - - if (old_index == NON_ITEM) - continue; - - const int new_index = get_mitm_slot(0); - if (new_index == NON_ITEM) - { - mi->unequip(mitm[old_index], i, 0, true); - mi->inv[i] = NON_ITEM; - continue; - } - - mi->inv[i] = new_index; - mitm[new_index] = mitm[old_index]; - mitm[new_index].set_holding_monster(mi->mindex()); - mitm[new_index].flags |= ISFLAG_SUMMONED; - - // Make holy items plain - if (get_weapon_brand(mitm[new_index]) == SPWPN_HOLY_WRATH) - set_item_ego_type(mitm[new_index], OBJ_WEAPONS, SPWPN_NORMAL); - } + coord_def newpos = mi->pos(); + monster_die(*mi, KILL_MISC, -1, true); + if (mons->holiness() == MH_NATURAL) + mons->move_to_pos(newpos); return true; } } |