Merge branch 'fixsuspend' into 'master'

Suspend Fixes

See merge request core-developers/forge!4828
This commit is contained in:
Michael Kamensky
2021-06-06 03:29:09 +00:00
4 changed files with 5 additions and 5 deletions

View File

@@ -1354,7 +1354,7 @@ public class AiController {
public AiPlayDecision canPlayFromEffectAI(Spell spell, boolean mandatory, boolean withoutPayingManaCost) {
int damage = ComputerUtil.getDamageForPlaying(player, spell);
if (damage >= player.getLife() && !player.cantLoseForZeroOrLessLife() && player.canLoseLife()) {
if (!mandatory && damage >= player.getLife() && !player.cantLoseForZeroOrLessLife() && player.canLoseLife()) {
return AiPlayDecision.CurseEffects;
}

View File

@@ -297,7 +297,7 @@ public class PermanentAi extends SpellAbilityAi {
if (!checkPhaseRestrictions(ai, sa, ai.getGame().getPhaseHandler())) {
return false;
}
return mandatory || checkApiLogic(ai, sa);
return checkApiLogic(ai, sa) || mandatory;
}
}

View File

@@ -704,8 +704,8 @@ public abstract class SpellAbilityEffect {
Card host = sa.getHostCard();
final Game game = host.getGame();
final String duration = sa.getParam("Duration");
// in case host was LKI
if (host.isLKI()) {
// in case host was LKI or still resolving
if (host.isLKI() || host.getZone().is(ZoneType.Stack)) {
host = game.getCardState(host);
}