Mercurial > hg > early-roguelike
comparison urogue/fight.c @ 297:317166b49d8a
Ultra-Rogue: add a NULL check.
author | John "Elwin" Edwards |
---|---|
date | Thu, 08 Feb 2018 18:56:15 -0500 |
parents | c495a4f288c6 |
children | e52a8a7ad4c5 |
comparison
equal
deleted
inserted
replaced
296:000b1c5b8d63 | 297:317166b49d8a |
---|---|
1141 | 1141 |
1142 /* Similar monsters don't hit each other */ | 1142 /* Similar monsters don't hit each other */ |
1143 | 1143 |
1144 if (attacker->t_index == attackee->t_index) | 1144 if (attacker->t_index == attackee->t_index) |
1145 { | 1145 { |
1146 if (attacker == THINGPTR(fam_ptr) && er_visible) | 1146 if (fam_ptr && attacker == THINGPTR(fam_ptr) && er_visible) |
1147 msg("Master, I cannot hit one of my brethren."); | 1147 msg("Master, I cannot hit one of my brethren."); |
1148 if (!thrown && rnd(100) - attacker->t_stats.s_charisma + luck < 0) | 1148 if (!thrown && rnd(100) - attacker->t_stats.s_charisma + luck < 0) |
1149 { | 1149 { |
1150 if (er_visible) | 1150 if (er_visible) |
1151 msg("Your %s has made a new ally.", mname1); | 1151 msg("Your %s has made a new ally.", mname1); |