From f862ad36df81de633e35d87ff387328ec7908793 Mon Sep 17 00:00:00 2001 From: 1brucben <1benjbruce@gmail.com> Date: Mon, 5 May 2025 22:28:24 +0200 Subject: [PATCH] dogpile fix again --- src/core/execution/FakeHumanExecution.ts | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/core/execution/FakeHumanExecution.ts b/src/core/execution/FakeHumanExecution.ts index 171646cb4..c331caa01 100644 --- a/src/core/execution/FakeHumanExecution.ts +++ b/src/core/execution/FakeHumanExecution.ts @@ -892,6 +892,7 @@ export class FakeHumanExecution implements Execution { .players() .some((p) => p !== this.player && this.player.isOnSameTeam(p)); if (isTeamGame) { + consolex.log("Dogpile disabled in team game"); this.dogpileTarget = null; return; } @@ -923,17 +924,15 @@ export class FakeHumanExecution implements Execution { // Dominant player condition if (top.numTilesOwned() > second.numTilesOwned() * 2) { - // Enter dogpile with probability (e.g. 30%) - if (this.dogpileTarget !== top && this.random.chance(30)) { - this.dogpileTarget = top; + if (this.dogpileTarget !== top) { + if (this.random.chance(25)) { + this.dogpileTarget = top; + } } } else { - this.dogpileTarget = null; - } - - // Reset if the dominant player changed - if (this.dogpileTarget && this.dogpileTarget !== top) { - this.dogpileTarget = null; + if (this.dogpileTarget === top) { + this.dogpileTarget = null; + } } } }