forked from External/mage
Implemented Cinder Crawler
This commit is contained in:
parent
78134b551a
commit
e2d14a6096
3 changed files with 80 additions and 0 deletions
46
Mage.Sets/src/mage/cards/c/CinderCrawler.java
Normal file
46
Mage.Sets/src/mage/cards/c/CinderCrawler.java
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
package mage.cards.c;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.condition.common.SourceBlockedCondition;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.decorator.ConditionalActivatedAbility;
|
||||
import mage.abilities.effects.common.continuous.BoostSourceEffect;
|
||||
import mage.constants.SubType;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Zone;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class CinderCrawler extends CardImpl {
|
||||
|
||||
public CinderCrawler(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}");
|
||||
|
||||
this.subtype.add(SubType.SALAMANDER);
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// {R}: Cinder Crawler gets +1/+0 until end of turn. Activate this ability only if Cinder Crawler is blocked.
|
||||
this.addAbility(new ConditionalActivatedAbility(
|
||||
Zone.BATTLEFIELD,
|
||||
new BoostSourceEffect(1, 0, Duration.EndOfTurn),
|
||||
new ManaCostsImpl("{R}"),
|
||||
SourceBlockedCondition.instance
|
||||
));
|
||||
}
|
||||
|
||||
public CinderCrawler(final CinderCrawler card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CinderCrawler copy() {
|
||||
return new CinderCrawler(this);
|
||||
}
|
||||
}
|
||||
|
|
@ -38,6 +38,7 @@ public final class Exodus extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Cataclysm", 3, Rarity.RARE, mage.cards.c.Cataclysm.class));
|
||||
cards.add(new SetCardInfo("Cat Burglar", 54, Rarity.COMMON, mage.cards.c.CatBurglar.class));
|
||||
cards.add(new SetCardInfo("Charging Paladin", 4, Rarity.COMMON, mage.cards.c.ChargingPaladin.class));
|
||||
cards.add(new SetCardInfo("Cinder Crawler", 80, Rarity.COMMON, mage.cards.c.CinderCrawler.class));
|
||||
cards.add(new SetCardInfo("City of Traitors", 143, Rarity.RARE, mage.cards.c.CityOfTraitors.class));
|
||||
cards.add(new SetCardInfo("Coat of Arms", 131, Rarity.RARE, mage.cards.c.CoatOfArms.class));
|
||||
cards.add(new SetCardInfo("Convalescence", 5, Rarity.RARE, mage.cards.c.Convalescence.class));
|
||||
|
|
|
|||
|
|
@ -0,0 +1,33 @@
|
|||
|
||||
package mage.abilities.condition.common;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
|
||||
public enum SourceBlockedCondition implements Condition {
|
||||
|
||||
instance;
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent permanent = game.getBattlefield().getPermanent(source.getSourceId());
|
||||
if (permanent != null) {
|
||||
return permanent.isBlocked(game);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "{this} is blocked";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue