diff options
author | Adam Borowski <kilobyte@angband.pl> | 2012-03-22 01:29:15 +0100 |
---|---|---|
committer | Adam Borowski <kilobyte@angband.pl> | 2012-03-22 01:59:37 +0100 |
commit | f88c6a77a058a02aff74443da3fd9c371877fbf3 (patch) | |
tree | ce7816ba5fada182e723c537820f4542a08049c4 /crawl-ref/source/spl-tornado.cc | |
parent | f22ecef8817a579eaba48747c8327f06424393bc (diff) | |
download | crawl-ref-f88c6a77a058a02aff74443da3fd9c371877fbf3.tar.gz crawl-ref-f88c6a77a058a02aff74443da3fd9c371877fbf3.zip |
Use actor->is_player() consistently instead of (actor->atype() == ACT_PLAYER).
Shorter and more readable.
I did not change the similar comparison with ACT_MONSTER yet -- are we ever
going to have other actor types? God acts may work as well with a fake
monster, but multiplayer/arena can possibly want a third such type. On the
other hand, code assumes that non-player implies monster and vice versa,
though, so I'm probably worrying without a point.
Diffstat (limited to 'crawl-ref/source/spl-tornado.cc')
-rw-r--r-- | crawl-ref/source/spl-tornado.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crawl-ref/source/spl-tornado.cc b/crawl-ref/source/spl-tornado.cc index 70c5c87eb7..e70c5a23fc 100644 --- a/crawl-ref/source/spl-tornado.cc +++ b/crawl-ref/source/spl-tornado.cc @@ -220,7 +220,7 @@ void tornado_damage(actor *caster, int dur) int pow; // Not stored so unwielding that staff will reduce damage. - if (caster->atype() == ACT_PLAYER) + if (caster->is_player()) pow = calc_spell_power(SPELL_TORNADO, true); else pow = caster->as_monster()->hit_dice * 4; @@ -345,7 +345,7 @@ void tornado_damage(actor *caster, int dur) if (dur < 0) dmg = 0; dprf("damage done: %d", dmg); - if (victim->atype() == ACT_PLAYER) + if (victim->is_player()) ouch(dmg, caster->mindex(), KILLED_BY_BEAM, "tornado"); else |