The clown is gone! 🤡 Nations send much better emojis now (#2696)

## Description:

Previously, nations just spammed these two rather toxic emojis: 🤡😡

They now send fewer emojis while attacking, and the clown emoji is
reserved for special cases.

They got the ability to send emojis in much more cases:
- Human didn't donate enough for relation update
- Human did donate an ok amount
- Human did donate a lot
- Responding to emojis that they get sent from a human
- Nuke sent
- MIRV sent
- Retaliation warship sent
- Traitor tries to ally
- Threat asks for / accepts an alliance request
- Disliked human tries to ally
- Friendly human tries to ally
- They are getting attacked by very much troops
- They are getting attacked by very little troops
- Congratulating the winner
- Bragging with their crown
- Charming their allies
- Clown-Emoting traitors
- Easteregg: Sending a rat emoji to very small humans

## Please complete the following:

- [X] I have added screenshots for all UI updates
- [X] I process any text displayed to the user through translateText()
and I've added it to the en.json file
- [X] I have added relevant tests to the test directory
- [X] I confirm I have thoroughly tested these changes and take full
responsibility for any bugs introduced

## Please put your Discord username so you can be contacted if a bug or
regression is found:

FloPinguin

---------

Co-authored-by: iamlewis <lewismmmm@gmail.com>
This commit is contained in:
FloPinguin
2025-12-26 22:07:31 +01:00
committed by GitHub
parent e45839fbc2
commit 5d52f73278
12 changed files with 441 additions and 54 deletions
+10 -10
View File
@@ -478,6 +478,11 @@ export class AiAttackBehavior {
return;
}
if (target.isPlayer() && this.player.type() === PlayerType.Nation) {
if (this.emojiBehavior === undefined) throw new Error("not initialized");
this.emojiBehavior.maybeSendAttackEmoji(target);
}
this.game.addExecution(
new AttackExecution(
troops,
@@ -485,11 +490,6 @@ export class AiAttackBehavior {
target.isPlayer() ? target.id() : this.game.terraNullius().id(),
),
);
if (target.isPlayer() && this.player.type() === PlayerType.Nation) {
if (this.emojiBehavior === undefined) throw new Error("not initialized");
this.emojiBehavior.maybeSendHeckleEmoji(target);
}
}
private sendBoatAttack(target: Player) {
@@ -515,6 +515,11 @@ export class AiAttackBehavior {
return;
}
if (target.isPlayer() && this.player.type() === PlayerType.Nation) {
if (this.emojiBehavior === undefined) throw new Error("not initialized");
this.emojiBehavior.maybeSendAttackEmoji(target);
}
this.game.addExecution(
new TransportShipExecution(
this.player,
@@ -524,11 +529,6 @@ export class AiAttackBehavior {
null,
),
);
if (target.isPlayer() && this.player.type() === PlayerType.Nation) {
if (this.emojiBehavior === undefined) throw new Error("not initialized");
this.emojiBehavior.maybeSendHeckleEmoji(target);
}
}
private calculateBotAttackTroops(target: Player, maxTroops: number): number {