Merge remote-tracking branch 'core/master'

This commit is contained in:
Anthony Calosa
2020-11-25 12:30:25 +08:00
3 changed files with 30 additions and 11 deletions

View File

@@ -97,6 +97,7 @@ public class DigUntilEffect extends SpellAbilityEffect {
}
final boolean remember = sa.hasParam("RememberFound");
final boolean imprint = sa.hasParam("ImprintFound");
final ZoneType foundDest = ZoneType.smartValueOf(sa.getParam("FoundDestination"));
final int foundLibPos = AbilityUtils.calculateAmount(host, sa.getParam("FoundLibraryPosition"), sa);
@@ -135,6 +136,9 @@ public class DigUntilEffect extends SpellAbilityEffect {
if (remember) {
host.addRemembered(c);
}
if (imprint) {
host.addImprintedCard(c);
}
if (found.size() == untilAmount) {
break;
}

View File

@@ -1175,6 +1175,11 @@ public class CardFactoryUtil {
if (sq[0].contains("Threshold")) {
return doXMath(Integer.parseInt(sq[cc.hasThreshold() ? 1 : 2]), m, c);
}
if (sq[0].contains("Averna")) {
if (cc.hasKeyword("As you cascade, you may put a land card from among the exiled cards onto the" +
" battlefield tapped.")) { return 1; }
else return 0;
}
if (sq[0].startsWith("Kicked")) {
return doXMath(Integer.parseInt(sq[c.getKickerMagnitude() > 0 ? 1 : 2]), m, c);
}
@@ -2354,25 +2359,29 @@ public class CardFactoryUtil {
inst.addTrigger(bushidoTrigger1);
inst.addTrigger(bushidoTrigger2);
} else if (keyword.equals("Cascade")) {
final StringBuilder trigScript = new StringBuilder(
"Mode$ SpellCast | ValidCard$ Card.Self | Secondary$ True | " +
"TriggerDescription$ Cascade - CARDNAME");
final String abString = "DB$ DigUntil | Defined$ You | Amount$ 1 | Valid$ "
+ "Card.nonLand+cmcLTCascadeX | FoundDestination$ Exile | RevealedDestination$"
+ " Exile | ImprintRevealed$ True | RememberFound$ True";
final StringBuilder trigScript = new StringBuilder("Mode$ SpellCast | ValidCard$ Card.Self" +
" | Secondary$ True | TriggerDescription$ Cascade - CARDNAME");
final String abString = "DB$ DigUntil | Defined$ You | Amount$ 1 | Valid$ Card.nonLand+cmcLTCascadeX" +
" | FoundDestination$ Exile | RevealedDestination$ Exile | ImprintFound$ True" +
" | RememberRevealed$ True";
SpellAbility dig = AbilityFactory.getAbility(abString, card);
dig.setSVar("CascadeX", "Count$CardManaCost");
final String dbCascadeCast = "DB$ Play | Defined$ Remembered | WithoutManaCost$ True | Optional$ True";
AbilitySub cascadeCast = (AbilitySub)AbilityFactory.getAbility(dbCascadeCast, card);
final String dbLandPut = "DB$ ChangeZone | ConditionCheckSVar$ X | ConditionSVarCompare$ EQ1" +
" | Hidden$ True | Origin$ Exile | Destination$ Battlefield | ChangeType$ Land.IsRemembered" +
" | ChangeNum$ 1 | Tapped$ True | ForgetChanged$ True" +
" | SelectPrompt$ You may select a land to put on the battlefield tapped";
AbilitySub landPut = (AbilitySub)AbilityFactory.getAbility(dbLandPut, card);
landPut.setSVar("X", "Count$Averna");
dig.setSubAbility(landPut);
dig.setSubAbility(cascadeCast);
final String dbCascadeCast = "DB$ Play | Defined$ Imprinted | WithoutManaCost$ True | Optional$ True";
AbilitySub cascadeCast = (AbilitySub)AbilityFactory.getAbility(dbCascadeCast, card);
landPut.setSubAbility(cascadeCast);
final String dbMoveToLib = "DB$ ChangeZoneAll | ChangeType$ Card.IsRemembered,Card.IsImprinted"
+ " | Origin$ Exile | Destination$ Library | RandomOrder$ True | LibraryPosition$ -1";
AbilitySub moveToLib = (AbilitySub)AbilityFactory.getAbility(dbMoveToLib, card);
cascadeCast.setSubAbility(moveToLib);

View File

@@ -0,0 +1,6 @@
Name:Averna, the Chaos Bloom
ManaCost:G U R
Types:Legendary Creature Elemental Shaman
PT:4/2
S:Mode$ Continuous | Affected$ You | AddKeyword$ As you cascade, you may put a land card from among the exiled cards onto the battlefield tapped. | Description$ As you cascade, you may put a land card from among the exiled cards onto the battlefield tapped. (Do this after the last card is exiled but before deciding whether to cast a nonland card.)
Oracle:As you cascade, you may put a land card from among the exiled cards onto the battlefield tapped. (Do this after the last card is exiled but before deciding whether to cast a nonland card.)