comparison xrogue/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
539 def_arm = ac_compute(FALSE) - dext_prot(dex_compute()); 539 def_arm = ac_compute(FALSE) - dext_prot(dex_compute());
540 hplus += str_plus(att->s_str)+dext_plus(att->s_dext); 540 hplus += str_plus(att->s_str)+dext_plus(att->s_dext);
541 } 541 }
542 else if (att == &pstats) { /* Player attacks monster */ 542 else if (att == &pstats) { /* Player attacks monster */
543 def_arm = def->s_arm - dext_prot(def->s_dext); 543 def_arm = def->s_arm - dext_prot(def->s_dext);
544 if (player.t_ctype == C_MONK) /* no strength bonus for monk */ 544 if (player.t_ctype == C_MONK) {
545 /* no strength bonus for monk */
545 if (weap == NULL) 546 if (weap == NULL)
546 hplus += att->s_lvl/5; /* monks hplus varies with level */ 547 hplus += att->s_lvl/5; /* monks hplus varies with level */
548 }
547 else 549 else
548 hplus += str_plus(str_compute())+dext_plus(dex_compute()); 550 hplus += str_plus(str_compute())+dext_plus(dex_compute());
549 } 551 }
550 else { /* Monster attacks monster */ 552 else { /* Monster attacks monster */
551 def_arm = def->s_arm - dext_prot(def->s_dext); 553 def_arm = def->s_arm - dext_prot(def->s_dext);