mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38:00 +00:00
Fix counting
This commit is contained in:
@@ -1488,7 +1488,7 @@ public class AiController {
|
||||
if (landsWannaPlay != null) {
|
||||
landsWannaPlay = filterLandsToPlay(landsWannaPlay);
|
||||
Log.debug("Computer " + game.getPhaseHandler().getPhase().nameForUi);
|
||||
if (!landsWannaPlay.isEmpty()) {
|
||||
if (landsWannaPlay != null && !landsWannaPlay.isEmpty()) {
|
||||
// TODO search for other land it might want to play?
|
||||
Card land = chooseBestLandToPlay(landsWannaPlay);
|
||||
if ((!player.canLoseLife() || player.cantLoseForZeroOrLessLife() || ComputerUtil.getDamageFromETB(player, land) < player.getLife())
|
||||
|
||||
@@ -1420,10 +1420,8 @@ public class GameAction {
|
||||
checkAgain = true;
|
||||
}
|
||||
}
|
||||
if (!spaceSculptors.isEmpty()) {
|
||||
for (Player p : spaceSculptors) {
|
||||
checkAgain |= stateBasedAction704_5u(p);
|
||||
}
|
||||
for (Player p : spaceSculptors) {
|
||||
checkAgain |= stateBasedAction704_5u(p);
|
||||
}
|
||||
// 704.5m World rule
|
||||
checkAgain |= handleWorldRule(noRegCreats);
|
||||
|
||||
@@ -80,8 +80,7 @@ public class RestartGameEffect extends SpellAbilityEffect {
|
||||
}
|
||||
|
||||
// special handling for Karn to filter out non-cards
|
||||
CardCollection cmdCards = new CardCollection(p.getCardsIn(ZoneType.Command));
|
||||
for (Card c : cmdCards) {
|
||||
for (Card c : p.getCardsIn(ZoneType.Command)) {
|
||||
if (c.isCommander()) {
|
||||
newLibrary.add(c);
|
||||
}
|
||||
|
||||
@@ -124,13 +124,15 @@ public class RollDiceEffect extends SpellAbilityEffect {
|
||||
total += modifier;
|
||||
|
||||
// Run triggers
|
||||
int rollNum = 1;
|
||||
for (Integer roll : rolls) {
|
||||
final Map<AbilityKey, Object> runParams = AbilityKey.mapFromPlayer(player);
|
||||
runParams.put(AbilityKey.Sides, sides);
|
||||
runParams.put(AbilityKey.Modifier, modifier);
|
||||
runParams.put(AbilityKey.Result, roll);
|
||||
runParams.put(AbilityKey.Number, player.getNumRollsThisTurn() + 1 - amount + rolls.indexOf(roll));
|
||||
runParams.put(AbilityKey.Number, player.getNumRollsThisTurn() - amount + rollNum);
|
||||
player.getGame().getTriggerHandler().runTrigger(TriggerType.RolledDie, runParams, false);
|
||||
rollNum++;
|
||||
}
|
||||
final Map<AbilityKey, Object> runParams = AbilityKey.mapFromPlayer(player);
|
||||
runParams.put(AbilityKey.Sides, sides);
|
||||
|
||||
Reference in New Issue
Block a user