Factor out buddy hints about invulnerable boss

This commit is contained in:
Kp 2016-10-29 23:16:16 +00:00
parent 57196e8f9f
commit 2b9a86abe3

View file

@ -1534,14 +1534,23 @@ static int do_boss_weapon_collision(const object_base &robot, const object &weap
Buddy_gave_hint_count--; Buddy_gave_hint_count--;
Last_time_buddy_gave_hint = GameTime64; Last_time_buddy_gave_hint = GameTime64;
sval = (d_rand()*4) >> 15; sval = (d_rand()*4) >> 15;
const char *msg;
switch (sval) { switch (sval) {
case 0: buddy_message("Hit him in the back!"); break; case 0:
case 1: buddy_message("He's invulnerable there!"); break; msg = "Hit him in the back!";
case 2: buddy_message("Get behind him and fire!"); break; break;
case 1:
msg = "He's invulnerable there!";
break;
case 2:
msg = "Get behind him and fire!";
break;
case 3: case 3:
default: default:
buddy_message("Hit the glowing spot!"); break; msg = "Hit the glowing spot!";
break;
} }
buddy_message_str(msg);
} }
} }
} }