mirror of
https://github.com/magefree/mage.git
synced 2026-01-26 21:29:17 -08:00
[PIP] Implement James, Wandering Dad
This commit is contained in:
parent
94c33eeb5d
commit
0d1df0ec47
2 changed files with 107 additions and 0 deletions
106
Mage.Sets/src/mage/cards/j/JamesWanderingDad.java
Normal file
106
Mage.Sets/src/mage/cards/j/JamesWanderingDad.java
Normal file
|
|
@ -0,0 +1,106 @@
|
|||
package mage.cards.j;
|
||||
|
||||
import mage.ConditionalMana;
|
||||
import mage.MageInt;
|
||||
import mage.Mana;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.costs.Cost;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.dynamicvalue.common.ManacostVariableValue;
|
||||
import mage.abilities.effects.keyword.InvestigateEffect;
|
||||
import mage.abilities.mana.ConditionalColorlessManaAbility;
|
||||
import mage.abilities.mana.builder.ConditionalManaBuilder;
|
||||
import mage.abilities.mana.conditional.ManaCondition;
|
||||
import mage.cards.AdventureCard;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.AbilityType;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.game.Game;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author Susucr
|
||||
*/
|
||||
public final class JamesWanderingDad extends AdventureCard {
|
||||
|
||||
public JamesWanderingDad(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, new CardType[]{CardType.INSTANT}, "{2}{U}", "Follow Him", "{X}{U}{U}");
|
||||
|
||||
this.supertype.add(SuperType.LEGENDARY);
|
||||
this.subtype.add(SubType.HUMAN);
|
||||
this.subtype.add(SubType.SCIENTIST);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(4);
|
||||
|
||||
// {T}: Add {C}{C}. Spend this mana only to activate abilities.
|
||||
this.addAbility(new ConditionalColorlessManaAbility(
|
||||
new TapSourceCost(), 2, new JamesWanderingDadManaBuilder()
|
||||
));
|
||||
|
||||
// Follow Him
|
||||
// {X}{U}{U}
|
||||
// Instant — Adventure
|
||||
// Investigate X times.
|
||||
this.getSpellCard().getSpellAbility().addEffect(
|
||||
new InvestigateEffect(ManacostVariableValue.REGULAR)
|
||||
.setText("Investigate X times")
|
||||
);
|
||||
|
||||
this.finalizeAdventure();
|
||||
}
|
||||
|
||||
private JamesWanderingDad(final JamesWanderingDad card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public JamesWanderingDad copy() {
|
||||
return new JamesWanderingDad(this);
|
||||
}
|
||||
}
|
||||
|
||||
// Mana building same as Cryptic Trilobite
|
||||
class JamesWanderingDadManaBuilder extends ConditionalManaBuilder {
|
||||
|
||||
@Override
|
||||
public ConditionalMana build(Object... options) {
|
||||
return new JamesWanderingDadConditionalMana(this.mana);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Spend this mana only to activate abilities";
|
||||
}
|
||||
}
|
||||
|
||||
class JamesWanderingDadConditionalMana extends ConditionalMana {
|
||||
|
||||
JamesWanderingDadConditionalMana(Mana mana) {
|
||||
super(mana);
|
||||
staticText = "Spend this mana only to activate abilities";
|
||||
addCondition(new JamesWanderingDadManaCondition());
|
||||
}
|
||||
}
|
||||
|
||||
class JamesWanderingDadManaCondition extends ManaCondition implements Condition {
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
if (source != null && !source.isActivated()) {
|
||||
// ex: SimpleManaAbility is an ACTIVATED ability, but it is categorized as a MANA ability
|
||||
return source.getAbilityType() == AbilityType.MANA
|
||||
|| source.getAbilityType() == AbilityType.ACTIVATED;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source, UUID originalId, Cost costsToPay) {
|
||||
return apply(game, source);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -157,6 +157,7 @@ public final class Fallout extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Irrigated Farmland", 268, Rarity.RARE, mage.cards.i.IrrigatedFarmland.class));
|
||||
cards.add(new SetCardInfo("Island", 319, Rarity.LAND, mage.cards.basiclands.Island.class, FULL_ART_BFZ_VARIOUS));
|
||||
cards.add(new SetCardInfo("Isolated Chapel", 269, Rarity.RARE, mage.cards.i.IsolatedChapel.class));
|
||||
cards.add(new SetCardInfo("James, Wandering Dad", 31, Rarity.RARE, mage.cards.j.JamesWanderingDad.class));
|
||||
cards.add(new SetCardInfo("Jungle Shrine", 270, Rarity.UNCOMMON, mage.cards.j.JungleShrine.class));
|
||||
cards.add(new SetCardInfo("Junk Jet", 60, Rarity.RARE, mage.cards.j.JunkJet.class));
|
||||
cards.add(new SetCardInfo("Junktown", 150, Rarity.RARE, mage.cards.j.Junktown.class));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue