mirror of
https://github.com/correl/mage.git
synced 2025-04-10 01:01:05 -09:00
Clean up visual details.
This commit is contained in:
parent
1bbfc32886
commit
d2cb10d7b7
2 changed files with 41 additions and 14 deletions
Mage/src/main/java/mage/cards
|
@ -21,10 +21,7 @@ public abstract class AdventureCard extends CardImpl {
|
||||||
|
|
||||||
public AdventureCard(UUID ownerId, CardSetInfo setInfo, CardType[] types, CardType[] typesSpell, String costs, String adventureName, String costsSpell) {
|
public AdventureCard(UUID ownerId, CardSetInfo setInfo, CardType[] types, CardType[] typesSpell, String costs, String adventureName, String costsSpell) {
|
||||||
super(ownerId, setInfo, types, costs);
|
super(ownerId, setInfo, types, costs);
|
||||||
spellCard = new AdventureCardSpellImpl(ownerId, setInfo, typesSpell, costsSpell, this);
|
spellCard = new AdventureCardSpellImpl(ownerId, setInfo, adventureName, typesSpell, costsSpell, this);
|
||||||
spellCard.getSpellAbility().addEffect(ExileAdventureSpellEffect.getInstance());
|
|
||||||
spellCard.setName(adventureName);
|
|
||||||
spellCard.getSpellAbility().setCardName(adventureName);
|
|
||||||
this.addAbility(spellCard.getSpellAbility());
|
this.addAbility(spellCard.getSpellAbility());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -83,13 +80,7 @@ public abstract class AdventureCard extends CardImpl {
|
||||||
@Override
|
@Override
|
||||||
public Abilities<Ability> getAbilities(Game game) {
|
public Abilities<Ability> getAbilities(Game game) {
|
||||||
Abilities<Ability> allAbilities = new AbilitiesImpl<>();
|
Abilities<Ability> allAbilities = new AbilitiesImpl<>();
|
||||||
for (Ability ability : super.getAbilities(game)) {
|
allAbilities.addAll(super.getAbilities(game));
|
||||||
if (ability instanceof SpellAbility
|
|
||||||
&& ((SpellAbility) ability).getSpellAbilityType() != SpellAbilityType.SPLIT
|
|
||||||
&& ((SpellAbility) ability).getSpellAbilityType() != SpellAbilityType.SPLIT_AFTERMATH) {
|
|
||||||
allAbilities.add(ability);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
allAbilities.addAll(spellCard.getAbilities(game));
|
allAbilities.addAll(spellCard.getAbilities(game));
|
||||||
return allAbilities;
|
return allAbilities;
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
*/
|
*/
|
||||||
package mage.cards;
|
package mage.cards;
|
||||||
|
|
||||||
|
import mage.abilities.Modes;
|
||||||
import mage.abilities.SpellAbility;
|
import mage.abilities.SpellAbility;
|
||||||
import mage.abilities.effects.common.ExileAdventureSpellEffect;
|
import mage.abilities.effects.common.ExileAdventureSpellEffect;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
|
@ -25,10 +26,17 @@ public class AdventureCardSpellImpl extends CardImpl implements AdventureCardSpe
|
||||||
|
|
||||||
private AdventureCard adventureCardParent;
|
private AdventureCard adventureCardParent;
|
||||||
|
|
||||||
public AdventureCardSpellImpl(UUID ownerId, CardSetInfo setInfo, CardType[] cardTypes, String costs, AdventureCard adventureCardParent) {
|
public AdventureCardSpellImpl(UUID ownerId, CardSetInfo setInfo, String adventureName, CardType[] cardTypes, String costs, AdventureCard adventureCardParent) {
|
||||||
super(ownerId, setInfo, cardTypes, costs, SpellAbilityType.ADVENTURE_SPELL);
|
super(ownerId, setInfo, cardTypes, costs, SpellAbilityType.ADVENTURE_SPELL);
|
||||||
this.subtype.add(SubType.ADVENTURE);
|
this.subtype.add(SubType.ADVENTURE);
|
||||||
this.replaceSpellAbility(new AdventureCardSpellAbility(getSpellAbility()));
|
|
||||||
|
AdventureCardSpellAbility newSpellAbility = new AdventureCardSpellAbility(getSpellAbility());
|
||||||
|
newSpellAbility.setName(adventureName, costs);
|
||||||
|
newSpellAbility.addEffect(ExileAdventureSpellEffect.getInstance());
|
||||||
|
newSpellAbility.setCardName(adventureName);
|
||||||
|
this.replaceSpellAbility(newSpellAbility);
|
||||||
|
|
||||||
|
this.setName(adventureName);
|
||||||
this.adventureCardParent = adventureCardParent;
|
this.adventureCardParent = adventureCardParent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -95,7 +103,7 @@ public class AdventureCardSpellImpl extends CardImpl implements AdventureCardSpe
|
||||||
}
|
}
|
||||||
|
|
||||||
class AdventureCardSpellAbility extends SpellAbility {
|
class AdventureCardSpellAbility extends SpellAbility {
|
||||||
public AdventureCardSpellAbility(SpellAbility ability) {
|
public AdventureCardSpellAbility(final SpellAbility ability) {
|
||||||
super(ability);
|
super(ability);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -108,4 +116,32 @@ class AdventureCardSpellAbility extends SpellAbility {
|
||||||
return super.canActivate(playerId, game);
|
return super.canActivate(playerId, game);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setName(String name, String costs) {
|
||||||
|
this.name = "Adventure — " + name + " " + costs;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getRule(boolean all) {
|
||||||
|
return this.getRule();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getRule() {
|
||||||
|
StringBuilder sbRule = new StringBuilder();
|
||||||
|
sbRule.append("Adventure — ");
|
||||||
|
sbRule.append(this.getCardName());
|
||||||
|
sbRule.append(" ");
|
||||||
|
sbRule.append(manaCosts.getText());
|
||||||
|
sbRule.append(" — ");
|
||||||
|
Modes modes = this.getModes();
|
||||||
|
if (modes.size() <= 1) {
|
||||||
|
sbRule.append(modes.getMode().getEffects().getTextStartingUpperCase(modes.getMode()));
|
||||||
|
} else {
|
||||||
|
sbRule.append(getModes().getText());
|
||||||
|
}
|
||||||
|
sbRule.append(super.getRule(false));
|
||||||
|
sbRule.append(" <i>(Then exile this card. You may cast the creature later from exile.)</i>");
|
||||||
|
return sbRule.toString();
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Add table
Reference in a new issue