mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
Merge branch '1290-trigger-needs-cleanup-after-cost-is-paid' into 'master'
Resolve "Trigger needs cleanup after cost is paid" Closes #1290 See merge request core-developers/forge!2543
This commit is contained in:
@@ -1318,9 +1318,16 @@ public class AbilityUtils {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Player pl = sa.getActivatingPlayer();
|
||||||
|
final Game game = pl.getGame();
|
||||||
|
|
||||||
|
if (sa.isTrigger() && sa.getParent() == null && sa.getPayCosts() != null) {
|
||||||
|
// when trigger cost are paid before the effect does resolve, need to clean the trigger
|
||||||
|
game.getTriggerHandler().resetActiveTriggers();
|
||||||
|
}
|
||||||
|
|
||||||
// do blessing there before condition checks
|
// do blessing there before condition checks
|
||||||
if (sa.isSpell() && sa.isBlessing() && !sa.getHostCard().isPermanent()) {
|
if (sa.isSpell() && sa.isBlessing() && !sa.getHostCard().isPermanent()) {
|
||||||
Player pl = sa.getActivatingPlayer();
|
|
||||||
if (pl != null && pl.getZone(ZoneType.Battlefield).size() >= 10) {
|
if (pl != null && pl.getZone(ZoneType.Battlefield).size() >= 10) {
|
||||||
pl.setBlessing(true);
|
pl.setBlessing(true);
|
||||||
}
|
}
|
||||||
@@ -1335,7 +1342,7 @@ public class AbilityUtils {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
AbilityUtils.resolveApiAbility(sa, sa.getActivatingPlayer().getGame());
|
AbilityUtils.resolveApiAbility(sa, game);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void resolveSubAbilities(final SpellAbility sa, final Game game) {
|
private static void resolveSubAbilities(final SpellAbility sa, final Game game) {
|
||||||
|
|||||||
Reference in New Issue
Block a user