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