Merge branch 'alwaysTriggerFix' into 'master'

GameAction: always trigger should not run if used preList

Closes #617

See merge request core-developers/forge!789
This commit is contained in:
Michael Kamensky
2018-07-21 17:59:22 +00:00

View File

@@ -876,7 +876,9 @@ public class GameAction {
}
}
if (runEvents) {
// preList means that this is run by a pre Check with LKI objects
// in that case Always trigger should not Run
if (preList.isEmpty()) {
final Map<String, Object> runParams = Maps.newHashMap();
game.getTriggerHandler().runTrigger(TriggerType.Always, runParams, false);
}
@@ -1598,7 +1600,7 @@ public class GameAction {
if (landCount == 0 ){
return 0;
}
return new Float(landCount)/new Float(deck.size());
return Float.valueOf(landCount)/Float.valueOf(deck.size());
}
private float getHandScore(List<Card> hand, float landRatio){