diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-03-14 23:21:21 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-03-14 23:21:21 +0000 |
commit | 07dae10ec572e5757acffd430760b2f05214172f (patch) | |
tree | 349da9e6a83357958bd97527593413e41d7a47f5 /crawl-ref/source/spells3.cc | |
parent | cc6e8a31098fa2a0b1a1634c98a7422686d7816d (diff) | |
download | crawl-ref-07dae10ec572e5757acffd430760b2f05214172f.tar.gz crawl-ref-07dae10ec572e5757acffd430760b2f05214172f.zip |
Add more miscellaneous minor fixes.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9484 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/spells3.cc')
-rw-r--r-- | crawl-ref/source/spells3.cc | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/crawl-ref/source/spells3.cc b/crawl-ref/source/spells3.cc index 8ee9e5e357..ace14c81ce 100644 --- a/crawl-ref/source/spells3.cc +++ b/crawl-ref/source/spells3.cc @@ -987,7 +987,8 @@ int animate_dead(actor *caster, int pow, beh_type beha, unsigned short hitting, // reforming the original monster out of ice anyways. bool cast_simulacrum(int pow, god_type god) { - bool rc = false; + bool success = false; + const item_def* weapon = you.weapon(); if (weapon @@ -1001,10 +1002,6 @@ bool cast_simulacrum(int pow, god_type god) int how_many = std::min(8, 4 + random2(pow) / 20); how_many = std::min<int>(how_many, weapon->quantity); - dec_inv_item_quantity(you.equip[EQ_WEAPON], how_many); - - int count = 0; - for (int i = 0; i < how_many; ++i) { const int monster = @@ -1016,13 +1013,15 @@ bool cast_simulacrum(int pow, god_type god) if (monster != -1) { - count++; + success = true; + + dec_inv_item_quantity(you.equip[EQ_WEAPON], 1); player_angers_monster(&menv[monster]); } } - if (count == 0) + if (!success) canned_msg(MSG_NOTHING_HAPPENS); } else @@ -1031,7 +1030,7 @@ bool cast_simulacrum(int pow, god_type god) "effective!"); } - return (rc); + return (success); } bool cast_twisted_resurrection(int pow, god_type god) |