Attacks don't create embargos against bots because they can't trade anyways

This commit is contained in:
Evan
2025-03-28 14:02:29 -07:00
parent 1e69a66ed1
commit 8dd5f654ff
+8 -1
View File
@@ -82,7 +82,14 @@ export class AttackExecution implements Execution {
: mg.player(this._targetID);
if (this.target && this.target.isPlayer()) {
(this.target as Player).addEmbargo(this._owner.id());
const targetPlayer = this.target as Player;
if (
targetPlayer.type() != PlayerType.Bot &&
this._owner.type() != PlayerType.Bot
) {
// Don't let bots embargo since they can't trade anyways.
targetPlayer.addEmbargo(this._owner.id());
}
}
if (this._owner == this.target) {