forked from External/mage
[BLB] Implement Valley Flamecaller
This commit is contained in:
parent
82c2540b18
commit
ff252a3bdb
2 changed files with 92 additions and 0 deletions
91
Mage.Sets/src/mage/cards/v/ValleyFlamecaller.java
Normal file
91
Mage.Sets/src/mage/cards/v/ValleyFlamecaller.java
Normal file
|
|
@ -0,0 +1,91 @@
|
|||
package mage.cards.v;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.ReplacementEffectImpl;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class ValleyFlamecaller extends CardImpl {
|
||||
|
||||
public ValleyFlamecaller(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}");
|
||||
|
||||
this.subtype.add(SubType.LIZARD);
|
||||
this.subtype.add(SubType.WARLOCK);
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// If a Lizard, Mouse, Otter, or Raccoon you control would deal damage to a permanent or player, it deals that much damage plus 1 instead.
|
||||
this.addAbility(new SimpleStaticAbility(new ValleyFlamecallerEffect()));
|
||||
}
|
||||
|
||||
private ValleyFlamecaller(final ValleyFlamecaller card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ValleyFlamecaller copy() {
|
||||
return new ValleyFlamecaller(this);
|
||||
}
|
||||
}
|
||||
|
||||
class ValleyFlamecallerEffect extends ReplacementEffectImpl {
|
||||
|
||||
ValleyFlamecallerEffect() {
|
||||
super(Duration.WhileOnBattlefield, Outcome.Benefit);
|
||||
staticText = "if a Lizard, Mouse, Otter, or Raccoon you control would deal damage " +
|
||||
"to a permanent or player, it deals that much damage plus 1 instead";
|
||||
}
|
||||
|
||||
private ValleyFlamecallerEffect(final ValleyFlamecallerEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ValleyFlamecallerEffect copy() {
|
||||
return new ValleyFlamecallerEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checksEventType(GameEvent event, Game game) {
|
||||
switch (event.getType()) {
|
||||
case DAMAGE_PERMANENT:
|
||||
case DAMAGE_PLAYER:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
Permanent permanent = game.getPermanentOrLKIBattlefield(event.getSourceId());
|
||||
return permanent != null
|
||||
&& permanent.isControlledBy(permanent.getControllerId())
|
||||
&& (permanent.hasSubtype(SubType.LIZARD, game)
|
||||
|| permanent.hasSubtype(SubType.MOUSE, game)
|
||||
|| permanent.hasSubtype(SubType.OTTER, game)
|
||||
|| permanent.hasSubtype(SubType.RACCOON, game));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
|
||||
event.setAmount(CardUtil.overflowInc(event.getAmount(), 1));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
@ -193,6 +193,7 @@ public final class Bloomburrow extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Treeguard Duo", 200, Rarity.COMMON, mage.cards.t.TreeguardDuo.class));
|
||||
cards.add(new SetCardInfo("Treetop Sentries", 201, Rarity.COMMON, mage.cards.t.TreetopSentries.class));
|
||||
cards.add(new SetCardInfo("Uncharted Haven", 261, Rarity.COMMON, mage.cards.u.UnchartedHaven.class));
|
||||
cards.add(new SetCardInfo("Valley Flamecaller", 158, Rarity.RARE, mage.cards.v.ValleyFlamecaller.class));
|
||||
cards.add(new SetCardInfo("Valley Mightcaller", 202, Rarity.RARE, mage.cards.v.ValleyMightcaller.class));
|
||||
cards.add(new SetCardInfo("Valley Rally", 159, Rarity.UNCOMMON, mage.cards.v.ValleyRally.class));
|
||||
cards.add(new SetCardInfo("Valley Rotcaller", 119, Rarity.RARE, mage.cards.v.ValleyRotcaller.class));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue