diff options
author | Stefan O'Rear <stefanor@cox.net> | 2009-11-04 23:52:52 -0800 |
---|---|---|
committer | Stefan O'Rear <stefanor@cox.net> | 2009-11-04 23:52:52 -0800 |
commit | 808d95388e8d845c5e5b7f416231c1fc9a8aca97 (patch) | |
tree | 295155f66906600ee06e21fef1d8ea5cd7b9acee /crawl-ref/source | |
parent | 1b5fee7b01fd027a5873f692139a19abea8e6946 (diff) | |
download | crawl-ref-808d95388e8d845c5e5b7f416231c1fc9a8aca97.tar.gz crawl-ref-808d95388e8d845c5e5b7f416231c1fc9a8aca97.zip |
And propagate power from Tukima / the Dance.
Diffstat (limited to 'crawl-ref/source')
-rw-r--r-- | crawl-ref/source/decks.cc | 9 | ||||
-rw-r--r-- | crawl-ref/source/spells2.cc | 9 |
2 files changed, 17 insertions, 1 deletions
diff --git a/crawl-ref/source/decks.cc b/crawl-ref/source/decks.cc index 16594c3e69..1322a890f0 100644 --- a/crawl-ref/source/decks.cc +++ b/crawl-ref/source/decks.cc @@ -20,12 +20,14 @@ #include "effects.h" #include "files.h" #include "food.h" +#include "ghost.h" #include "invent.h" #include "it_use2.h" #include "item_use.h" #include "itemprop.h" #include "items.h" #include "los.h" +#include "makeitem.h" #include "maps.h" #include "message.h" #include "misc.h" @@ -2700,7 +2702,14 @@ static void _summon_dancing_weapon(int power, deck_rarity_type rarity) set_item_ego_type(wpn, OBJ_WEAPONS, coinflip() ? SPWPN_SPEED : SPWPN_ELECTROCUTION); } + item_colour(wpn); menv[mon].flags |= MF_HARD_RESET; + + ghost_demon newstats; + newstats.init_dancing_weapon(wpn, power / 4); + + menv[mon].set_ghost(newstats); + menv[mon].dancing_weapon_init(); } else { diff --git a/crawl-ref/source/spells2.cc b/crawl-ref/source/spells2.cc index 02a3cd72c3..8008e51e1a 100644 --- a/crawl-ref/source/spells2.cc +++ b/crawl-ref/source/spells2.cc @@ -25,6 +25,7 @@ #include "dungeon.h" #include "effects.h" #include "envmap.h" +#include "ghost.h" #include "goditem.h" #include "invent.h" #include "itemname.h" @@ -1582,6 +1583,7 @@ bool summon_holy_warrior(int pow, god_type god, int spell, !force_hostile, quiet); } +// This function seems to have very little regard for encapsulation. bool cast_tukimas_dance(int pow, god_type god, bool force_hostile) { bool success = true; @@ -1670,9 +1672,14 @@ bool cast_tukimas_dance(int pow, god_type god, bool force_hostile) destroy_item(menv[monster].inv[MSLOT_WEAPON]); menv[monster].inv[MSLOT_WEAPON] = i; - menv[monster].colour = mitm[i].colour; burden_change(); + ghost_demon stats; + stats.init_dancing_weapon(mitm[i], pow); + + menv[monster].set_ghost(stats); + menv[monster].dancing_weapon_init(); + if ((why = good_god_hates_item_handling(you.inv[wpn])) || (why = god_hates_item_handling(you.inv[wpn]))) { |