mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-22 23:45:21 +00:00
Attacks don't create embargos against bots because they can't trade anyways
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user