Add boss wave on-kill announcements

This commit adds two new announcements for use in boss waves:

- wave-boss-killed to announce who killed the boss
- wave-boss-reward-earned to notify the killer of the boss reward, if any

Fixes #428
This commit is contained in:
Hailey Loralyn 2018-05-02 09:10:56 -07:00 committed by garbagemule
parent 3f3d611731
commit 780883fce7
2 changed files with 6 additions and 4 deletions

View File

@ -607,13 +607,13 @@ public class ArenaListener
}
MABoss boss = monsters.getBoss(damagee);
if (boss != null) {
for (Player q : arena.getPlayersInArena()) {
arena.getMessenger().tell(q, Msg.WAVE_BOSS_KILLED, p.getName());
}
Thing reward = boss.getReward();
if (reward != null) {
arena.getRewardManager().addReward(p, reward);
String msg = p.getName() + " killed the boss and won: " + reward;
for (Player q : arena.getPlayersInArena()) {
arena.getMessenger().tell(q, msg);
}
arena.getMessenger().tell(damager, Msg.WAVE_BOSS_REWARD_EARNED, reward.toString());
}
}
}

View File

@ -71,6 +71,8 @@ public enum Msg {
WAVE_BOSS("Wave &b#%&r! [BOSS]"),
WAVE_BOSS_ABILITY("Boss used ability: &c%&r!"),
WAVE_BOSS_LOW_HEALTH("Boss is almost dead!"),
WAVE_BOSS_KILLED("&a%&r killed the boss!"),
WAVE_BOSS_REWARD_EARNED("You earned: &e%"),
WAVE_REWARD("You just earned a reward: &e%&r"),
MISC_LIST_PLAYERS("Live players: &a%&r"),
MISC_LIST_ARENAS("Available arenas: %"),