forked from External/mage
[BOT] Implement Megatron, Tyrant // Megatron, Destructive Force (#10666)
* [BOT] Implement Megatron, Tyrant // Megatron, Destructive Force * fix verify test. * cleanup AbilityCastMode for Disturb & MoreThanMeetsTheEye * cleanup unecessary checks. * fix duration of silence static effect * fix Disturb tests
This commit is contained in:
parent
32e340032b
commit
4856c65443
9 changed files with 310 additions and 19 deletions
|
|
@ -434,6 +434,8 @@ public abstract class AbilityImpl implements Ability {
|
|||
case FLASHBACK:
|
||||
case MADNESS:
|
||||
case TRANSFORMED:
|
||||
case DISTURB:
|
||||
case MORE_THAN_MEETS_THE_EYE:
|
||||
// from Snapcaster Mage:
|
||||
// If you cast a spell from a graveyard using its flashback ability, you can't pay other alternative costs
|
||||
// (such as that of Foil). (2018-12-07)
|
||||
|
|
|
|||
|
|
@ -34,10 +34,11 @@ public class DisturbAbility extends SpellAbility {
|
|||
this.newId();
|
||||
|
||||
// getSecondFaceSpellAbility() already verified that second face exists
|
||||
this.setCardName(card.getSecondCardFace().getName() + " with Disturb");
|
||||
this.setCardName(card.getSecondCardFace().getName());
|
||||
|
||||
this.zone = Zone.GRAVEYARD;
|
||||
this.spellAbilityType = SpellAbilityType.BASE_ALTERNATE;
|
||||
this.spellAbilityCastMode = SpellAbilityCastMode.TRANSFORMED;
|
||||
this.setSpellAbilityCastMode(SpellAbilityCastMode.DISTURB);
|
||||
|
||||
this.manaCost = manaCost;
|
||||
this.getManaCosts().clear();
|
||||
|
|
|
|||
|
|
@ -22,9 +22,10 @@ public class MoreThanMeetsTheEyeAbility extends SpellAbility {
|
|||
this.newId();
|
||||
|
||||
// getSecondFaceSpellAbility() already verified that second face exists
|
||||
this.setCardName(card.getSecondCardFace().getName() + " with Disturb");
|
||||
this.setCardName(card.getSecondCardFace().getName());
|
||||
|
||||
this.spellAbilityType = SpellAbilityType.BASE_ALTERNATE;
|
||||
this.spellAbilityCastMode = SpellAbilityCastMode.TRANSFORMED;
|
||||
this.setSpellAbilityCastMode(SpellAbilityCastMode.MORE_THAN_MEETS_THE_EYE);
|
||||
|
||||
this.manaCost = manaCost;
|
||||
this.getManaCosts().clear();
|
||||
|
|
@ -63,7 +64,7 @@ public class MoreThanMeetsTheEyeAbility extends SpellAbility {
|
|||
@Override
|
||||
public String getRule() {
|
||||
return "More Than Meets The Eye " + this.manaCost
|
||||
+ " <i>(You may cast this card converted for" + this.manaCost + ".)</i>";
|
||||
+ " <i>(You may cast this card converted for " + this.manaCost + ".)</i>";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ import mage.cards.Card;
|
|||
import mage.game.Game;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public enum SpellAbilityCastMode {
|
||||
|
|
@ -13,12 +12,26 @@ public enum SpellAbilityCastMode {
|
|||
MADNESS("Madness"),
|
||||
FLASHBACK("Flashback"),
|
||||
BESTOW("Bestow"),
|
||||
TRANSFORMED("Transformed");
|
||||
TRANSFORMED("Transformed", true),
|
||||
DISTURB("Disturb", true),
|
||||
MORE_THAN_MEETS_THE_EYE("More than Meets the Eye", true);
|
||||
|
||||
private final String text;
|
||||
|
||||
// Should the cast mode use the second face?
|
||||
private final boolean isTransformed;
|
||||
|
||||
public boolean isTransformed() {
|
||||
return this.isTransformed;
|
||||
}
|
||||
|
||||
SpellAbilityCastMode(String text) {
|
||||
this(text, false);
|
||||
}
|
||||
|
||||
SpellAbilityCastMode(String text, boolean isTransformed) {
|
||||
this.text = text;
|
||||
this.isTransformed = isTransformed;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ public class Spell extends StackObjectImpl implements Card {
|
|||
Card affectedCard = card;
|
||||
|
||||
// TODO: must be removed after transform cards (one side) migrated to MDF engine (multiple sides)
|
||||
if (ability.getSpellAbilityCastMode() == SpellAbilityCastMode.TRANSFORMED && affectedCard.getSecondCardFace() != null) {
|
||||
if (ability.getSpellAbilityCastMode().isTransformed() && affectedCard.getSecondCardFace() != null) {
|
||||
// simulate another side as new card (another code part in continues effect from disturb ability)
|
||||
affectedCard = TransformAbility.transformCardSpellStatic(card, card.getSecondCardFace(), game);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue