forked from External/mage
Implemented Tin Street Dodger
This commit is contained in:
parent
db11f1d84b
commit
581db3d6e0
3 changed files with 60 additions and 3 deletions
57
Mage.Sets/src/mage/cards/t/TinStreetDodger.java
Normal file
57
Mage.Sets/src/mage/cards/t/TinStreetDodger.java
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
package mage.cards.t;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.combat.CantBeBlockedByCreaturesSourceEffect;
|
||||
import mage.abilities.keyword.DefenderAbility;
|
||||
import mage.abilities.keyword.HasteAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.AbilityPredicate;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class TinStreetDodger extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter
|
||||
= new FilterCreaturePermanent("except by creatures with defender");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.not(new AbilityPredicate(DefenderAbility.class)));
|
||||
}
|
||||
|
||||
public TinStreetDodger(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{R}");
|
||||
|
||||
this.subtype.add(SubType.GOBLIN);
|
||||
this.subtype.add(SubType.ROGUE);
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
// Haste
|
||||
this.addAbility(HasteAbility.getInstance());
|
||||
|
||||
// {R}: Tin Street Dodger can't be blocked this turn except by creatures with defender.
|
||||
this.addAbility(new SimpleActivatedAbility(
|
||||
new CantBeBlockedByCreaturesSourceEffect(filter, Duration.EndOfTurn), new ManaCostsImpl("{R}")
|
||||
));
|
||||
}
|
||||
|
||||
private TinStreetDodger(final TinStreetDodger card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TinStreetDodger copy() {
|
||||
return new TinStreetDodger(this);
|
||||
}
|
||||
}
|
||||
|
|
@ -280,6 +280,7 @@ public final class RavnicaAllegiance extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Thirsting Shade", 87, Rarity.COMMON, mage.cards.t.ThirstingShade.class));
|
||||
cards.add(new SetCardInfo("Thought Collapse", 57, Rarity.COMMON, mage.cards.t.ThoughtCollapse.class));
|
||||
cards.add(new SetCardInfo("Thrash // Threat", 229, Rarity.RARE, mage.cards.t.ThrashThreat.class));
|
||||
cards.add(new SetCardInfo("Tin Street Dodger", 120, Rarity.UNCOMMON, mage.cards.t.TinStreetDodger.class));
|
||||
cards.add(new SetCardInfo("Titanic Brawl", 146, Rarity.COMMON, mage.cards.t.TitanicBrawl.class));
|
||||
cards.add(new SetCardInfo("Tithe Taker", 27, Rarity.RARE, mage.cards.t.TitheTaker.class));
|
||||
cards.add(new SetCardInfo("Tome of the Guildpact", 242, Rarity.RARE, mage.cards.t.TomeOfTheGuildpact.class));
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@ import mage.game.Game;
|
|||
import mage.game.permanent.Permanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class CantBeBlockedByCreaturesSourceEffect extends RestrictionEffect {
|
||||
|
|
@ -19,8 +18,8 @@ public class CantBeBlockedByCreaturesSourceEffect extends RestrictionEffect {
|
|||
public CantBeBlockedByCreaturesSourceEffect(FilterCreaturePermanent filter, Duration duration) {
|
||||
super(duration);
|
||||
this.filter = filter;
|
||||
staticText = new StringBuilder("{this} can't be blocked ")
|
||||
.append(filter.getMessage().startsWith("except by") ? "" : "by ").append(filter.getMessage()).toString();
|
||||
staticText = "{this} can't be blocked " + (duration == Duration.EndOfTurn ? "this turn " : "")
|
||||
+ (filter.getMessage().startsWith("except by") ? "" : "by ") + filter.getMessage();
|
||||
}
|
||||
|
||||
public CantBeBlockedByCreaturesSourceEffect(final CantBeBlockedByCreaturesSourceEffect effect) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue