From 9b4674477db54f4d807bc0c0a2525fd987e1d7f5 Mon Sep 17 00:00:00 2001 From: Adam Borowski Date: Thu, 22 Oct 2009 22:19:45 +0200 Subject: Make Time Bend use Invocations for power. --- crawl-ref/source/godabil.cc | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'crawl-ref/source/godabil.cc') diff --git a/crawl-ref/source/godabil.cc b/crawl-ref/source/godabil.cc index a6218eedc1..32b50f7359 100644 --- a/crawl-ref/source/godabil.cc +++ b/crawl-ref/source/godabil.cc @@ -23,6 +23,7 @@ #include "shopping.h" #include "spells1.h" #include "spells3.h" +#include "spells4.h" #include "spl-book.h" #include "spl-util.h" #include "stuff.h" @@ -561,6 +562,31 @@ void lugonu_bends_space() //////////////////////////////////////////////////////////////////////// +void chronos_time_bend(int pow) +{ + mpr("The flow of time bends around you."); + + for (adjacent_iterator ai; ai; ++ai) + { + monsters* mon = monster_at(*ai); + if (mon != NULL) + { + if (roll_dice(mon->hit_dice, 3) > random2avg(pow, 2)) + { + mprf("%s %s.", + mon->name(DESC_CAP_THE).c_str(), mons_resist_string(mon)); + continue; + } + + simple_god_message( + make_stringf(" rebukes %s.", + mon->name(DESC_NOCAP_THE).c_str()).c_str(), + GOD_CHRONOS); + do_slow_monster(mon, KC_YOU); + } + } +} + void chronos_time_step(int pow) // pow is the number of turns to skip { coord_def old_pos = you.pos(); -- cgit v1.2.3-54-g00ecf