comparison urogue/scrolls.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
506 for (nitem = pack; nitem != NULL; nitem = next(nitem)) 506 for (nitem = pack; nitem != NULL; nitem = next(nitem))
507 { 507 {
508 obj = OBJPTR(nitem); 508 obj = OBJPTR(nitem);
509 509
510 if (rnd(5) == 0) 510 if (rnd(5) == 0)
511 {
511 if (obj->o_flags & ISBLESSED) 512 if (obj->o_flags & ISBLESSED)
512 obj->o_flags &= ~ISBLESSED; 513 obj->o_flags &= ~ISBLESSED;
513 else 514 else
514 obj->o_flags |= ISCURSED; 515 obj->o_flags |= ISCURSED;
516 }
515 } 517 }
516 msg("The smell of fire and brimstone comes from your pack."); 518 msg("The smell of fire and brimstone comes from your pack.");
517 } 519 }
518 else if (blessed) 520 else if (blessed)
519 { 521 {
795 lb = NULL; 797 lb = NULL;
796 } 798 }
797 break; 799 break;
798 800
799 case STICK: 801 case STICK:
800 if (wizard || howmuch != 1 && rnd(5) == 0) 802 if (wizard || (howmuch != 1 && rnd(5) == 0))
801 lb->o_flags |= flg; 803 lb->o_flags |= flg;
802 804
803 lb->o_charges += howmuch + 10; 805 lb->o_charges += howmuch + 10;
804 806
805 if (lb->o_charges < 0) 807 if (lb->o_charges < 0)