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 13:07:31 -08:00
committed by GitHub
co-authored by iamlewis
parent e45839fbc2
commit 5d52f73278
12 changed files with 441 additions and 54 deletions
+6
View File
@@ -25,6 +25,7 @@ export class UnitImpl implements Unit {
private _targetedBySAM = false;
private _reachedTarget = false;
private _wasDestroyedByEnemy: boolean = false;
private _destroyer: Player | undefined = undefined;
private _lastSetSafeFromPirates: number; // Only for trade ships
private _underConstruction: boolean = false;
private _lastOwner: PlayerImpl | null = null;
@@ -258,6 +259,7 @@ export class UnitImpl implements Unit {
// Record whether this unit was destroyed by an enemy (vs. arrived / retreated)
this._wasDestroyedByEnemy = destroyer !== undefined;
this._destroyer = destroyer ?? undefined;
this._owner._units = this._owner._units.filter((b) => b !== this);
this._active = false;
@@ -302,6 +304,10 @@ export class UnitImpl implements Unit {
return this._wasDestroyedByEnemy;
}
destroyer(): Player | undefined {
return this._destroyer;
}
retreating(): boolean {
return this._retreating;
}