Mercurial > hg > early-roguelike
comparison arogue7/fight.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 | e1cd27c5464f |
children |
comparison
equal
deleted
inserted
replaced
303:e06ebc407615 | 304:e52a8a7ad4c5 |
---|---|
513 def_arm = ac_compute(FALSE) - dext_prot(dex_compute()); | 513 def_arm = ac_compute(FALSE) - dext_prot(dex_compute()); |
514 hplus += str_plus(att->s_str)+dext_plus(att->s_dext); | 514 hplus += str_plus(att->s_str)+dext_plus(att->s_dext); |
515 } | 515 } |
516 else if (att == &pstats) { /* Player attacks monster */ | 516 else if (att == &pstats) { /* Player attacks monster */ |
517 def_arm = def->s_arm - dext_prot(def->s_dext); | 517 def_arm = def->s_arm - dext_prot(def->s_dext); |
518 if (player.t_ctype == C_MONK) /* no strength bonus for monk */ | 518 if (player.t_ctype == C_MONK) { |
519 /* no strength bonus for monk */ | |
519 if (weap == NULL) | 520 if (weap == NULL) |
520 hplus += att->s_lvl/5; /* monks hplus varies with level */ | 521 hplus += att->s_lvl/5; /* monks hplus varies with level */ |
522 } | |
521 else | 523 else |
522 hplus += str_plus(str_compute())+dext_plus(dex_compute()); | 524 hplus += str_plus(str_compute())+dext_plus(dex_compute()); |
523 } | 525 } |
524 else { /* Monster attacks monster */ | 526 else { /* Monster attacks monster */ |
525 def_arm = def->s_arm - dext_prot(def->s_dext); | 527 def_arm = def->s_arm - dext_prot(def->s_dext); |