summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/decks.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-05-22 15:53:37 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-05-22 15:53:37 +0000
commit2a73bdc6a3be5efa46dfdf32bb86edfcf5d0bd4c (patch)
tree8f0fc9dad7bcda05c27e23aca77ec987ed21c8c5 /crawl-ref/source/decks.cc
parent9a1e7565ec8802a38a9649744920923fc262dff7 (diff)
downloadcrawl-ref-2a73bdc6a3be5efa46dfdf32bb86edfcf5d0bd4c.tar.gz
crawl-ref-2a73bdc6a3be5efa46dfdf32bb86edfcf5d0bd4c.zip
Improve player beam tracer for firing through friendlies:
* name the monster you're firing through ("your goblin zombie") * use maximum possible range * make it work for spells and abilities, as well Still todo: * apply the same logic to firing missiles * don't prompt for monsters that wouldn't be harmed (e.g. living allies for Dispel Undead, etc.) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5177 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/decks.cc')
-rw-r--r--crawl-ref/source/decks.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/crawl-ref/source/decks.cc b/crawl-ref/source/decks.cc
index 2c59b1d8da..4231df4bc9 100644
--- a/crawl-ref/source/decks.cc
+++ b/crawl-ref/source/decks.cc
@@ -1610,7 +1610,7 @@ static bool _damaging_card(card_type card, int power, deck_rarity_type rarity)
break;
case CARD_PAIN:
- if ( power_level == 2 )
+ if (power_level == 2)
{
_mass_drain(power);
return true;
@@ -1623,7 +1623,7 @@ static bool _damaging_card(card_type card, int power, deck_rarity_type rarity)
break;
}
- if ( spell_direction( target, beam ) )
+ if (spell_direction(target, beam) && player_tracer(ztype, power/4, beam))
zapping(ztype, random2(power/4), beam);
else
rc = false;