summaryrefslogtreecommitdiffstats
path: root/phantasia/fight.c
diff options
context:
space:
mode:
authorjdolecek <jdolecek@NetBSD.org>2000-03-30 11:01:13 +0000
committerjdolecek <jdolecek@NetBSD.org>2000-03-30 11:01:13 +0000
commited35704d7174c61e6ade02fe3dc832cf503b2798 (patch)
treed7915373b7acf46181f8d1c821b2f896bc82d50c /phantasia/fight.c
parent60197a06f7f43a679fe5be69ec6df559035e533a (diff)
downloadbsdgames-darwin-ed35704d7174c61e6ade02fe3dc832cf503b2798.tar.gz
bsdgames-darwin-ed35704d7174c61e6ade02fe3dc832cf503b2798.tar.zst
bsdgames-darwin-ed35704d7174c61e6ade02fe3dc832cf503b2798.zip
Fix two ubiquitous operator precedence error of type
bar = foo + (cond) ? x : y. Patch sent by John Darrow in bin/9698.
Diffstat (limited to 'phantasia/fight.c')
-rw-r--r--phantasia/fight.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/phantasia/fight.c b/phantasia/fight.c
index f23c37a5..e69a5374 100644
--- a/phantasia/fight.c
+++ b/phantasia/fight.c
@@ -1,4 +1,4 @@
-/* $NetBSD: fight.c,v 1.5 1999/09/08 21:57:18 jsm Exp $ */
+/* $NetBSD: fight.c,v 1.6 2000/03/30 11:01:13 jdolecek Exp $ */
/*
* fight.c Phantasia monster fighting routines
@@ -549,7 +549,7 @@ monsthits()
mvprintw(Lines++, 0,
"%s flew away, and left you to contend with one of its friends.",
Enemyname);
- Whichmonster = 55 + (drandom() > 0.5) ? 22 : 0;
+ Whichmonster = 55 + ((drandom() > 0.5) ? 22 : 0);
longjmp(Fightenv, 0);
/* NOTREACHED */
@@ -869,7 +869,7 @@ callmonster(which)
Curmonster.m_energy = Player.p_might * 30.0;
Curmonster.m_type = SM_MORGOTH;
Curmonster.m_speed = Player.p_speed * 1.1
- + (Player.p_specialtype == SC_EXVALAR) ? Player.p_speed : 0.0;
+ + ((Player.p_specialtype == SC_EXVALAR) ? Player.p_speed : 0.0);
Curmonster.m_flock = 0.0;
Curmonster.m_treasuretype = 0;
Curmonster.m_experience = 0.0;