comparison xrogue/fight.c @ 239:837044d2c362

Merge the GCC5 and build fix branches. This fixes all warnings produced by GCC 5, except the ones related to system functions. Those could be fixed by including the proper headers, but it would be better to replace the system-dependent code with functions from mdport.c.
author John "Elwin" Edwards
date Fri, 11 Mar 2016 19:47:52 -0500
parents e1cd27c5464f
children e52a8a7ad4c5
comparison
equal deleted inserted replaced
232:bac2c81fec78 239:837044d2c362
562 if (!save(VS_MAGIC, &player, 0) && off(player, ISCLEAR)) { 562 if (!save(VS_MAGIC, &player, 0) && off(player, ISCLEAR)) {
563 msg("You feel disoriented."); 563 msg("You feel disoriented.");
564 if (find_slot(unconfuse)) 564 if (find_slot(unconfuse))
565 lengthen(unconfuse, HUHDURATION); 565 lengthen(unconfuse, HUHDURATION);
566 else 566 else
567 fuse(unconfuse, (VOID *)NULL, HUHDURATION, AFTER); 567 fuse(unconfuse, NULL, HUHDURATION, AFTER);
568 turn_on(player, ISHUH); 568 turn_on(player, ISHUH);
569 } 569 }
570 else msg("You feel dizzy, but it quickly passes."); 570 else msg("You feel dizzy, but it quickly passes.");
571 } 571 }
572 /* Player or monster hits monster */ 572 /* Player or monster hits monster */
964 { 964 {
965 register struct thing *tp, *mp; 965 register struct thing *tp, *mp;
966 register struct linked_list *pitem, *nexti, *mitem; 966 register struct linked_list *pitem, *nexti, *mitem;
967 char *monst; 967 char *monst;
968 int adj; /* used for hit point adj. below. */ 968 int adj; /* used for hit point adj. below. */
969 long temp;
970 969
971 tp = THINGPTR(item); 970 tp = THINGPTR(item);
972 971
973 if (pr) 972 if (pr)
974 { 973 {
1027 if (on(*tp, ISUNIQUE)) /* real bad news to kill a diety */ 1026 if (on(*tp, ISUNIQUE)) /* real bad news to kill a diety */
1028 killed_chance += 25; 1027 killed_chance += 25;
1029 if (roll(1,100) < killed_chance) { 1028 if (roll(1,100) < killed_chance) {
1030 msg("You had a feeling this was going to happen... "); 1029 msg("You had a feeling this was going to happen... ");
1031 msg("**POOF** "); 1030 msg("**POOF** ");
1032 temp = C_ASSASSIN; /* make him pay */ 1031 changeclass(C_ASSASSIN); /* make him pay */
1033 changeclass(&temp);
1034 } 1032 }
1035 else { 1033 else {
1036 switch (rnd(9)) { 1034 switch (rnd(9)) {
1037 case 0: 1035 case 0:
1038 msg("You become solid and stiff for a while. "); 1036 msg("You become solid and stiff for a while. ");