From 099ee879cc23c47ee35b3ea927e2161453ed6559 Mon Sep 17 00:00:00 2001 From: 9kgsofrice <65415105+9kgsofrice@users.noreply.github.com> Date: Fri, 25 Dec 2020 10:55:20 +0000 Subject: [PATCH] small bug meant that there was a 67% chance NOT to capture defeated barbarian unit (#3450) --- core/src/com/unciv/logic/battle/Battle.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/com/unciv/logic/battle/Battle.kt b/core/src/com/unciv/logic/battle/Battle.kt index bb6389ad8d..d23ddbb003 100644 --- a/core/src/com/unciv/logic/battle/Battle.kt +++ b/core/src/com/unciv/logic/battle/Battle.kt @@ -190,7 +190,7 @@ object Battle { if (defender.isDefeated() && defender.getCivInfo().isBarbarian() && attackedTile.improvement == Constants.barbarianEncampment && attacker.getCivInfo().hasUnique("67% chance to earn 25 Gold and recruit a Barbarian unit from a conquered encampment") - && Random().nextDouble() > 0.67) { + && Random().nextDouble() < 0.67) { attacker.getCivInfo().placeUnitNearTile(attackedTile.position, defender.getName()) attacker.getCivInfo().gold += 25 attacker.getCivInfo().addNotification("A barbarian [${defender.getName()}] has joined us!", attackedTile.position, Color.RED)