diff options
author | DracoOmega <draco_omega@live.com> | 2013-02-27 14:18:03 -0330 |
---|---|---|
committer | DracoOmega <draco_omega@live.com> | 2013-03-03 18:36:52 -0330 |
commit | 41eaca393a3dc28a220f22257e425a50e479c611 (patch) | |
tree | 757781291be0ebf51c78234ed04916348a5e9b30 /crawl-ref/source/godcompanions.cc | |
parent | 72f3d047aa9c895fba5a28db6dcd34d986baf12c (diff) | |
download | crawl-ref-41eaca393a3dc28a220f22257e425a50e479c611.tar.gz crawl-ref-41eaca393a3dc28a220f22257e425a50e479c611.zip |
Remove code for old version of recall
Diffstat (limited to 'crawl-ref/source/godcompanions.cc')
-rw-r--r-- | crawl-ref/source/godcompanions.cc | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/crawl-ref/source/godcompanions.cc b/crawl-ref/source/godcompanions.cc index acd7fa3b9d..e2d449bc68 100644 --- a/crawl-ref/source/godcompanions.cc +++ b/crawl-ref/source/godcompanions.cc @@ -80,63 +80,6 @@ void update_companions() } } -bool recall_offlevel_companions() -{ - bool recalled = false; - - for(map<mid_t, companion>::iterator i = companion_list.begin(); - i != companion_list.end(); ++i ) - { - int mid = i->first; - companion* comp = &i->second; - if (comp->level != level_id::current()) - { - // Recall can't pull monsters out of the Abyss - if (comp->level.branch == BRANCH_ABYSS) - continue; - - if (comp->mons.place(true)) - { - monster* mons = monster_by_mid(mid); - - // The monster is now on this level - remove_monster_from_transit(comp->level, mid); - comp->level = level_id::current(); - simple_monster_message(mons, " is recalled."); - recalled = true; - - // Catch up time for off-level monsters - // (We move the player away so that we don't get expiry - // messages for things that supposed wore off ages ago) - const coord_def old_pos = you.pos(); - you.moveto(coord_def(0, 0)); - - int turns = you.elapsed_time - comp->timestamp; - if (mons_can_regenerate(mons)) - { - if (monster_descriptor(mons->type, MDSC_REGENERATES)) - mons->heal(turns); - else - { - const int regen_rate = max(mons_natural_regen_rate(mons) * 2, 5); - mons->heal(div_rand_round(turns * regen_rate, 50)); - } - } - if (turns >= 10 && mons->alive()) - { - // Remove confusion manually (so that the monster - // doesn't blink after being recalled) - mons->del_ench(ENCH_CONFUSION, true); - mons->timeout_enchantments(turns / 10); - } - you.moveto(old_pos); - } - } - } - - return recalled; -} - void populate_offlevel_recall_list() { for(map<mid_t, companion>::iterator i = companion_list.begin(); |