don't allow donation in FFA

This commit is contained in:
Evan
2025-04-16 21:43:20 -07:00
parent 13e3b4588d
commit e841954771
+8
View File
@@ -22,6 +22,7 @@ import {
Attack,
Cell,
EmojiMessage,
GameMode,
Gold,
MessageType,
MutableAlliance,
@@ -516,6 +517,13 @@ export class PlayerImpl implements Player {
}
canDonate(recipient: Player): boolean {
if (
recipient.type() == PlayerType.Human &&
this.mg.config().gameConfig().gameMode == GameMode.FFA
) {
return false;
}
if (!this.isFriendly(recipient)) {
return false;
}