[TLA] Implement Jasmine Dragon Tea Shop

This commit is contained in:
theelk801 2025-11-19 16:00:17 -05:00
parent 4772658527
commit 6b4acfe5ce
2 changed files with 85 additions and 0 deletions

View file

@ -0,0 +1,83 @@
package mage.cards.j;
import mage.ConditionalMana;
import mage.MageObject;
import mage.Mana;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.condition.Condition;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.mana.ColorlessManaAbility;
import mage.abilities.mana.ConditionalAnyColorManaAbility;
import mage.abilities.mana.builder.ConditionalManaBuilder;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.game.Game;
import mage.game.permanent.token.AllyToken;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class JasmineDragonTeaShop extends CardImpl {
public JasmineDragonTeaShop(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
// {T}: Add {C}.
this.addAbility(new ColorlessManaAbility());
// {T}: Add one mana of any color. Spend this mana only to cast an Ally spell or activate an ability of an Ally source.
this.addAbility(new ConditionalAnyColorManaAbility(1, new JasmineDragonTeaShopManaBuilder()));
// {5}, {T}: Create a 1/1 white Ally creature token.
Ability ability = new SimpleActivatedAbility(new CreateTokenEffect(new AllyToken()), new GenericManaCost(5));
ability.addCost(new TapSourceCost());
this.addAbility(ability);
}
private JasmineDragonTeaShop(final JasmineDragonTeaShop card) {
super(card);
}
@Override
public JasmineDragonTeaShop copy() {
return new JasmineDragonTeaShop(this);
}
}
class JasmineDragonTeaShopManaBuilder extends ConditionalManaBuilder {
@Override
public ConditionalMana build(Object... options) {
return new JasmineDragonTeaShopConditionalMana(this.mana);
}
@Override
public String getRule() {
return "Spend this mana only to cast an Ally spell or activate an ability of an Ally source";
}
}
class JasmineDragonTeaShopConditionalMana extends ConditionalMana {
JasmineDragonTeaShopConditionalMana(Mana mana) {
super(mana);
addCondition(JasmineDragonTeaShopCondition.instance);
}
}
enum JasmineDragonTeaShopCondition implements Condition {
instance;
@Override
public boolean apply(Game game, Ability source) {
MageObject object = game.getObject(source);
return object != null && object.hasSubtype(SubType.ALLY, game) && !source.isActivated();
}
}

View file

@ -220,6 +220,8 @@ public final class AvatarTheLastAirbender extends ExpansionSet {
cards.add(new SetCardInfo("Island", 288, Rarity.LAND, mage.cards.basiclands.Island.class, FULL_ART_BFZ_VARIOUS)); cards.add(new SetCardInfo("Island", 288, Rarity.LAND, mage.cards.basiclands.Island.class, FULL_ART_BFZ_VARIOUS));
cards.add(new SetCardInfo("Island", 293, Rarity.LAND, mage.cards.basiclands.Island.class, FULL_ART_BFZ_VARIOUS)); cards.add(new SetCardInfo("Island", 293, Rarity.LAND, mage.cards.basiclands.Island.class, FULL_ART_BFZ_VARIOUS));
cards.add(new SetCardInfo("It'll Quench Ya!", 58, Rarity.COMMON, mage.cards.i.ItllQuenchYa.class)); cards.add(new SetCardInfo("It'll Quench Ya!", 58, Rarity.COMMON, mage.cards.i.ItllQuenchYa.class));
cards.add(new SetCardInfo("Jasmine Dragon Tea Shop", 270, Rarity.RARE, mage.cards.j.JasmineDragonTeaShop.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Jasmine Dragon Tea Shop", 390, Rarity.RARE, mage.cards.j.JasmineDragonTeaShop.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Jeong Jeong's Deserters", 25, Rarity.COMMON, mage.cards.j.JeongJeongsDeserters.class)); cards.add(new SetCardInfo("Jeong Jeong's Deserters", 25, Rarity.COMMON, mage.cards.j.JeongJeongsDeserters.class));
cards.add(new SetCardInfo("Jeong Jeong, the Deserter", 142, Rarity.UNCOMMON, mage.cards.j.JeongJeongTheDeserter.class)); cards.add(new SetCardInfo("Jeong Jeong, the Deserter", 142, Rarity.UNCOMMON, mage.cards.j.JeongJeongTheDeserter.class));
cards.add(new SetCardInfo("Jet's Brainwashing", 143, Rarity.UNCOMMON, mage.cards.j.JetsBrainwashing.class)); cards.add(new SetCardInfo("Jet's Brainwashing", 143, Rarity.UNCOMMON, mage.cards.j.JetsBrainwashing.class));