forked from External/mage
Make Morph a SpellAbility (part 1)
This commit is contained in:
parent
9b634d44c6
commit
3e4d439d18
4 changed files with 38 additions and 48 deletions
|
|
@ -5,7 +5,6 @@ import mage.MageObject;
|
|||
import mage.Mana;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.*;
|
||||
import mage.abilities.costs.AlternativeSourceCosts;
|
||||
import mage.abilities.costs.mana.ActivationManaAbilityStep;
|
||||
import mage.abilities.costs.mana.ManaCost;
|
||||
import mage.abilities.costs.mana.ManaCosts;
|
||||
|
|
@ -80,6 +79,9 @@ public class Spell extends StackObjectImpl implements Card {
|
|||
// simulate another side as new card (another code part in continues effect from disturb ability)
|
||||
affectedCard = TransformAbility.transformCardSpellStatic(card, card.getSecondCardFace(), game);
|
||||
}
|
||||
if (ability.getSpellAbilityCastMode() == SpellAbilityCastMode.MORPH){
|
||||
this.faceDown = true;
|
||||
}
|
||||
|
||||
this.card = affectedCard;
|
||||
this.color = affectedCard.getColor(null).copy();
|
||||
|
|
@ -182,11 +184,8 @@ public class Spell extends StackObjectImpl implements Card {
|
|||
}
|
||||
|
||||
public String getSpellCastText(Game game) {
|
||||
for (Ability spellAbility : getAbilities()) {
|
||||
if (spellAbility instanceof MorphAbility
|
||||
&& ((AlternativeSourceCosts) spellAbility).isActivated(getSpellAbility(), game)) {
|
||||
return "a card face down";
|
||||
}
|
||||
if (this.getSpellAbility() instanceof MorphAbility) {
|
||||
return "a card face down";
|
||||
}
|
||||
|
||||
if (card instanceof AdventureCardSpell) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue