[WOE] Implement Rat Out (and new Rat Token) (#10817)

This commit is contained in:
Susucre 2023-08-16 14:29:26 +02:00 committed by GitHub
parent 532ba15a7b
commit 853400ef46
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 74 additions and 0 deletions

View file

@ -0,0 +1,37 @@
package mage.cards.r;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.continuous.BoostTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.game.permanent.token.RatCantBlockToken;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/**
* @author Susucr
*/
public final class RatOut extends CardImpl {
public RatOut(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{B}");
// Up to one target creature gets -1/-1 until end of turn. You create a 1/1 black Rat creature token with "This creature can't block."
this.getSpellAbility().addEffect(new BoostTargetEffect(-1, -1, Duration.EndOfTurn));
this.getSpellAbility().addTarget(new TargetCreaturePermanent(0, 1));
this.getSpellAbility().addEffect(new CreateTokenEffect(new RatCantBlockToken()));
}
private RatOut(final RatOut card) {
super(card);
}
@Override
public RatOut copy() {
return new RatOut(this);
}
}

View file

@ -29,6 +29,7 @@ public final class WildsOfEldraine extends ExpansionSet {
cards.add(new SetCardInfo("Moonshaker Cavalry", 21, Rarity.MYTHIC, mage.cards.m.MoonshakerCavalry.class));
cards.add(new SetCardInfo("Mountain", 265, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Plains", 262, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Rat Out", 103, Rarity.COMMON, mage.cards.r.RatOut.class));
cards.add(new SetCardInfo("Restless Fortress", 259, Rarity.RARE, mage.cards.r.RestlessFortress.class));
cards.add(new SetCardInfo("Sleight of Hand", 67, Rarity.COMMON, mage.cards.s.SleightOfHand.class));
cards.add(new SetCardInfo("Swamp", 264, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS));

View file

@ -0,0 +1,36 @@
package mage.game.permanent.token;
import mage.MageInt;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.common.combat.CantBlockSourceEffect;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
/**
* @author Susucr
*/
public final class RatCantBlockToken extends TokenImpl {
public RatCantBlockToken() {
super("Rat Token", "1/1 black Rat creature token with \"This creature can't block.\"");
cardType.add(CardType.CREATURE);
color.setBlack(true);
subtype.add(SubType.RAT);
power = new MageInt(1);
toughness = new MageInt(1);
this.addAbility(new SimpleStaticAbility(
new CantBlockSourceEffect(Duration.WhileOnBattlefield)
.setText("this creature can't block")
));
}
protected RatCantBlockToken(final RatCantBlockToken token) {
super(token);
}
public RatCantBlockToken copy() {
return new RatCantBlockToken(this);
}
}