mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 02:08:00 +00:00
Merge branch 'pir' into 'master'
Fix AssignGroup skipping triggers See merge request core-developers/forge!5469
This commit is contained in:
@@ -62,13 +62,16 @@ public class AssignGroupEffect extends SpellAbilityEffect {
|
||||
// is that in Player order?
|
||||
Collection<GameObject> l = result.get(s);
|
||||
|
||||
// no player assigned for this choice
|
||||
if (l.isEmpty()) continue;
|
||||
|
||||
host.addRemembered(l);
|
||||
AbilityUtils.resolve(s);
|
||||
host.removeRemembered(l);
|
||||
|
||||
// this will refresh continuous abilities for players and permanents.
|
||||
game.getAction().checkStaticAbilities();
|
||||
game.getTriggerHandler().resetActiveTriggers(false);
|
||||
game.getTriggerHandler().resetActiveTriggers();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@ public class SacrificeEffect extends SpellAbilityEffect {
|
||||
}
|
||||
|
||||
// Expand Sacrifice keyword here depending on what we need out of it.
|
||||
final String num = sa.hasParam("Amount") ? sa.getParam("Amount") : "1";
|
||||
final String num = sa.getParamOrDefault("Amount", "1");
|
||||
final int amount = AbilityUtils.calculateAmount(card, num, sa);
|
||||
final List<Player> tgts = getTargetPlayers(sa);
|
||||
final boolean devour = sa.hasParam("Devour");
|
||||
|
||||
@@ -81,11 +81,11 @@ public class CombatUtil {
|
||||
|
||||
public static boolean validateAttackers(final Combat combat) {
|
||||
final AttackConstraints constraints = combat.getAttackConstraints();
|
||||
final Pair<Map<Card, GameEntity>, Integer> bestAttack = constraints.getLegalAttackers();
|
||||
final int myViolations = constraints.countViolations(combat.getAttackersAndDefenders());
|
||||
if (myViolations == -1) {
|
||||
return false;
|
||||
}
|
||||
final Pair<Map<Card, GameEntity>, Integer> bestAttack = constraints.getLegalAttackers();
|
||||
return myViolations <= bestAttack.getRight().intValue();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user