1
0
Fork 0
mirror of https://github.com/correl/mage.git synced 2025-04-08 17:00:07 -09:00

[NEO] Implemented Towashi Guide-Bot

This commit is contained in:
Evan Kranzler 2022-02-03 09:23:05 -05:00
parent e84aed2e07
commit 9fba8e4bc2
2 changed files with 90 additions and 0 deletions

View file

@ -0,0 +1,89 @@
package mage.cards.t;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.CostAdjuster;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.effects.common.InfoEffect;
import mage.abilities.effects.common.counter.AddCountersTargetEffect;
import mage.abilities.hint.Hint;
import mage.abilities.hint.ValueHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.counters.CounterType;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.permanent.ModifiedPredicate;
import mage.game.Game;
import mage.target.common.TargetControlledCreaturePermanent;
import mage.util.CardUtil;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class TowashiGuideBot extends CardImpl {
public TowashiGuideBot(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{4}");
this.subtype.add(SubType.CONSTRUCT);
this.power = new MageInt(2);
this.toughness = new MageInt(1);
// When Towashi Guide-Bot enters the battlefield, put a +1/+1 counter on target creature you control.
Ability ability = new EntersBattlefieldTriggeredAbility(
new AddCountersTargetEffect(CounterType.P1P1.createInstance())
);
ability.addTarget(new TargetControlledCreaturePermanent());
this.addAbility(ability);
// {4}, {T}: Draw a card. This ability costs {1} less to activate for each modified creature you control.
ability = new SimpleActivatedAbility(new DrawCardSourceControllerEffect(1), new GenericManaCost(4));
ability.addEffect(new InfoEffect("This ability costs {1} less to activate for each modified creature you control"));
ability.addCost(new TapSourceCost());
ability.setCostAdjuster(TowashiGuideBotAdjuster.instance);
this.addAbility(ability.addHint(TowashiGuideBotAdjuster.getHint()));
}
private TowashiGuideBot(final TowashiGuideBot card) {
super(card);
}
@Override
public TowashiGuideBot copy() {
return new TowashiGuideBot(this);
}
}
enum TowashiGuideBotAdjuster implements CostAdjuster {
instance;
private static final FilterPermanent filter = new FilterControlledCreaturePermanent();
static {
filter.add(ModifiedPredicate.instance);
}
private static final Hint hint = new ValueHint(
"Modified creatures you control", new PermanentsOnBattlefieldCount(filter)
);
public static Hint getHint() {
return hint;
}
@Override
public void adjustCosts(Ability ability, Game game) {
CardUtil.reduceCost(ability, game.getBattlefield().count(
filter, ability.getSourceId(), ability.getControllerId(), game
));
}
}

View file

@ -138,6 +138,7 @@ public final class KamigawaNeonDynasty extends ExpansionSet {
cards.add(new SetCardInfo("The Wandering Emperor", 42, Rarity.MYTHIC, mage.cards.t.TheWanderingEmperor.class));
cards.add(new SetCardInfo("Thirst for Knowledge", 85, Rarity.UNCOMMON, mage.cards.t.ThirstForKnowledge.class));
cards.add(new SetCardInfo("Thousand-Faced Shadow", 86, Rarity.RARE, mage.cards.t.ThousandFacedShadow.class));
cards.add(new SetCardInfo("Towashi Guide-Bot", 262, Rarity.UNCOMMON, mage.cards.t.TowashiGuideBot.class));
cards.add(new SetCardInfo("Twinshot Sniper", 168, Rarity.UNCOMMON, mage.cards.t.TwinshotSniper.class));
cards.add(new SetCardInfo("Unstoppable Ogre", 169, Rarity.COMMON, mage.cards.u.UnstoppableOgre.class));
cards.add(new SetCardInfo("Upriser Renegade", 170, Rarity.UNCOMMON, mage.cards.u.UpriserRenegade.class));