embargo if attacked (#353)

## Responsibility Acknowledgment

- [x] I confirm I have thoroughly tested these changes and take full
responsibility for any bugs introduced
- [x] I understand that submitting code with bugs that could have been
caught through basic manual testing:
  - Significantly slows down the entire development process
  - Blocks releases and new features for all contributors
  - Harms the project's reliability and reputation
- Places additional debugging burden on maintainers who already have
limited time
- Diverts valuable resources away from new development and improvements
  - Makes me seen as a loser
  - Makes me more likely to go to hell
This commit is contained in:
Ilan Schemoul
2025-03-28 00:39:37 +01:00
committed by GitHub
parent f2193edc7c
commit 6834f0683f
+4
View File
@@ -81,6 +81,10 @@ export class AttackExecution implements Execution {
? mg.terraNullius()
: mg.player(this._targetID);
if (this.target && this.target.isPlayer()) {
(this.target as Player).addEmbargo(this._owner.id());
}
if (this._owner == this.target) {
console.error(`Player ${this._owner} cannot attack itself`);
this.active = false;