diff --git a/src/core/configuration/DefaultConfig.ts b/src/core/configuration/DefaultConfig.ts index dd61637d2..47522f49f 100644 --- a/src/core/configuration/DefaultConfig.ts +++ b/src/core/configuration/DefaultConfig.ts @@ -221,7 +221,7 @@ export class DefaultConfig implements Config { if (defender.isPlayer()) { return { - attackerTroopLoss: within(defender.troops() / (5 * attackTroops), .5, 2) * mag, + attackerTroopLoss: within(defender.troops() / (5 * attackTroops), .1, 10) * mag, defenderTroopLoss: defender.troops() / defender.numTilesOwned(), tilesPerTickUsed: within(defender.troops() / (5 * attackTroops), .2, 1.5) * speed } diff --git a/src/core/execution/FakeHumanExecution.ts b/src/core/execution/FakeHumanExecution.ts index 812b0e683..d0861aedf 100644 --- a/src/core/execution/FakeHumanExecution.ts +++ b/src/core/execution/FakeHumanExecution.ts @@ -160,13 +160,13 @@ export class FakeHumanExecution implements Execution { } const target = this.player.allies() - .filter(ally => this.player.relation(ally) >= Relation.Neutral) + .filter(ally => this.player.relation(ally) == Relation.Friendly) .filter(ally => ally.targets().length > 0) - .map(ally => ({ ally: ally, t: ally.targets() }))[0] ?? null + .map(ally => ({ ally: ally, t: ally.targets()[0] }))[0] ?? null - if (target != null) { + if (target != null && !this.player.isAlliedWith(target.t)) { this.player.updateRelation(target.ally, -20) - this.enemy = target.t[0] + this.enemy = target.t this.lastEnemyUpdateTick = this.mg.ticks() this.mg.addExecution(new EmojiExecution(this.player.id(), target.ally.id(), "👍")) }