Swap playWithMaxUnits after applying boosts
This commit is contained in:
parent
2820c7357a
commit
64d2c04fcb
@ -88,6 +88,13 @@ class RoundCalculatorService {
|
|||||||
if boosts[playerMoveWithSecMaxUnits.key]!.0 {
|
if boosts[playerMoveWithSecMaxUnits.key]!.0 {
|
||||||
playerMoveWithSecMaxUnits.value.unitCount = Int(Double(playerMoveWithSecMaxUnits.value.unitCount) * ATK_BOOST_MULTIPLICATOR)
|
playerMoveWithSecMaxUnits.value.unitCount = Int(Double(playerMoveWithSecMaxUnits.value.unitCount) * ATK_BOOST_MULTIPLICATOR)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if playerMoveWithMaxUnits.value.unitCount < playerMoveWithSecMaxUnits.value.unitCount {
|
||||||
|
let temp = playerMoveWithMaxUnits
|
||||||
|
playerMoveWithMaxUnits = playerMoveWithSecMaxUnits
|
||||||
|
playerMoveWithSecMaxUnits = temp
|
||||||
|
}
|
||||||
|
|
||||||
playerMoveWithMaxUnits.value.unitCount -= playerMoveWithSecMaxUnits.value.unitCount
|
playerMoveWithMaxUnits.value.unitCount -= playerMoveWithSecMaxUnits.value.unitCount
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user