summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spells2.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-06 13:19:52 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-06 13:19:52 +0000
commit660d7466ae2011b2e7ebe5b80b37c68193a49aa7 (patch)
tree7f7ac91de7a75cb5f652963d9fb18f50444ea2c1 /crawl-ref/source/spells2.cc
parentcb950d928f6e7a32b2ffbf70d4f96a7a8338f91f (diff)
downloadcrawl-ref-660d7466ae2011b2e7ebe5b80b37c68193a49aa7.tar.gz
crawl-ref-660d7466ae2011b2e7ebe5b80b37c68193a49aa7.zip
Add miscellaneous minor fixes.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6421 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/spells2.cc')
-rw-r--r--crawl-ref/source/spells2.cc30
1 files changed, 15 insertions, 15 deletions
diff --git a/crawl-ref/source/spells2.cc b/crawl-ref/source/spells2.cc
index fa7bfee000..0c9d2244f9 100644
--- a/crawl-ref/source/spells2.cc
+++ b/crawl-ref/source/spells2.cc
@@ -884,42 +884,42 @@ bool vampiric_drain(int pow, const dist &vmove)
char burn_freeze(int pow, beam_type flavour)
{
int mgr = NON_MONSTER;
- struct dist bmove;
+ dist spd;
- if (pow > 25)
- pow = 25;
+ pow = std::min(25, pow);
while (mgr == NON_MONSTER)
{
mpr("Which direction?", MSGCH_PROMPT);
- direction( bmove, DIR_DIR, TARG_ENEMY );
+ direction(spd, DIR_DIR, TARG_ENEMY);
- if (!bmove.isValid)
+ if (!spd.isValid)
{
canned_msg(MSG_OK);
- return -1;
+ return (-1);
}
- if (bmove.isMe)
+ if (spd.isMe)
{
canned_msg(MSG_UNTHINKING_ACT);
- return -1;
+ return (-1);
}
- mgr = mgrd[you.x_pos + bmove.dx][you.y_pos + bmove.dy];
+ mgr = mgrd[you.x_pos + spd.dx][you.y_pos + spd.dy];
- // Yes, this is strange, but it does maintain the original behaviour.
- // Possibly to avoid giving information about invisible monsters?
+ // Yes, this is strange, but it does maintain the original
+ // behaviour. Possibly to avoid giving information about
+ // invisible monsters?
if (mgr == NON_MONSTER)
{
mpr("There isn't anything close enough!");
- return 0;
+ return (0);
}
- if (trans_wall_blocking( bmove.tx, bmove.ty ))
+ if (trans_wall_blocking(spd.tx, spd.ty))
{
mpr("A translucent wall is in the way.");
- return 0;
+ return (0);
}
}
@@ -983,7 +983,7 @@ char burn_freeze(int pow, beam_type flavour)
}
}
- return 1;
+ return (1);
}
bool summon_animals(int pow)