Mercurial > hg > early-roguelike
comparison urogue/move.c @ 304:e52a8a7ad4c5
Fix many compiler warnings.
There should only be two changes in behavior:
arogue7/fight.c, arogue7/fight.c: a to-hit bonus is now correctly
applied to characters who are not monks instead of monks who are not
empty-handed.
urogue/fight.c: fixed an interaction with the "debug" macro that could
cause the wrong message to be displayed.
author | John "Elwin" Edwards |
---|---|
date | Wed, 14 Apr 2021 18:55:33 -0400 |
parents | c495a4f288c6 |
children |
comparison
equal
deleted
inserted
replaced
303:e06ebc407615 | 304:e52a8a7ad4c5 |
---|---|
220 | 220 |
221 /* Do a confused move (maybe) */ | 221 /* Do a confused move (maybe) */ |
222 | 222 |
223 if ((rnd(100) < 80 && on(player, ISHUH)) || | 223 if ((rnd(100) < 80 && on(player, ISHUH)) || |
224 (is_wearing(R_DELUSION) && rnd(100) < 25) || | 224 (is_wearing(R_DELUSION) && rnd(100) < 25) || |
225 on(player, STUMBLER) && rnd(40) == 0) | 225 (on(player, STUMBLER) && rnd(40) == 0)) |
226 player.t_nxtpos = rndmove(&player); | 226 player.t_nxtpos = rndmove(&player); |
227 else | 227 else |
228 { | 228 { |
229 player.t_nxtpos.y = hero.y + dy; | 229 player.t_nxtpos.y = hero.y + dy; |
230 player.t_nxtpos.x = hero.x + dx; | 230 player.t_nxtpos.x = hero.x + dx; |
766 thief_bonus = 10; | 766 thief_bonus = 10; |
767 | 767 |
768 if (((is_wearing(R_LEVITATION) || on(player, CANFLY)) && | 768 if (((is_wearing(R_LEVITATION) || on(player, CANFLY)) && |
769 (ch != FIRETRAP || | 769 (ch != FIRETRAP || |
770 (ch == FIRETRAP && !(tp->tr_flags & ISFOUND)))) | 770 (ch == FIRETRAP && !(tp->tr_flags & ISFOUND)))) |
771 || (moving && (tp->tr_flags & ISFOUND) && rnd(100) < | 771 || ((moving && (tp->tr_flags & ISFOUND) && rnd(100) < |
772 thief_bonus + 2 * pstats.s_dext + 5 * pstats.s_lvl) && | 772 thief_bonus + 2 * pstats.s_dext + 5 * pstats.s_lvl) && |
773 (ch == BEARTRAP || ch == MAZETRAP || ch == TRAPDOOR | 773 (ch == BEARTRAP || ch == MAZETRAP || ch == TRAPDOOR |
774 || ch == ARROWTRAP || ch == DARTTRAP)) | 774 || ch == ARROWTRAP || ch == DARTTRAP))) |
775 { | 775 { |
776 static char trname[1024]; | 776 static char trname[1024]; |
777 msg(tr_name(ch,trname)); | 777 msg(tr_name(ch,trname)); |
778 tp->tr_flags |= ISFOUND; | 778 tp->tr_flags |= ISFOUND; |
779 return(ch); | 779 return(ch); |
1068 | 1068 |
1069 if (off(*th, NOSHARP)) | 1069 if (off(*th, NOSHARP)) |
1070 th->t_stats.s_hpt -= roll(1, 4); | 1070 th->t_stats.s_hpt -= roll(1, 4); |
1071 | 1071 |
1072 if (orig_hp == th->t_stats.s_hpt) | 1072 if (orig_hp == th->t_stats.s_hpt) |
1073 { | |
1073 if (can_see) | 1074 if (can_see) |
1074 msg("The dart has not effect!"); | 1075 msg("The dart has not effect!"); |
1075 else if (th->t_stats.s_hpt < 0) | 1076 else if (th->t_stats.s_hpt < 0) |
1076 { | 1077 { |
1077 if (can_see) | 1078 if (can_see) |
1080 if (on(*th, ISFAMILIAR)) | 1081 if (on(*th, ISFAMILIAR)) |
1081 turn_off(player, HASFAMILIAR); | 1082 turn_off(player, HASFAMILIAR); |
1082 | 1083 |
1083 killed(NULL, mitem, NOMESSAGE, NOPOINTS); | 1084 killed(NULL, mitem, NOMESSAGE, NOPOINTS); |
1084 } | 1085 } |
1086 } | |
1085 } | 1087 } |
1086 } | 1088 } |
1087 else | 1089 else |
1088 { | 1090 { |
1089 if (is_player) | 1091 if (is_player) |