forked from External/mage
[J25] Implement Scythecat Cub
This commit is contained in:
parent
956161f183
commit
46190b09f7
2 changed files with 82 additions and 0 deletions
81
Mage.Sets/src/mage/cards/s/ScythecatCub.java
Normal file
81
Mage.Sets/src/mage/cards/s/ScythecatCub.java
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
package mage.cards.s;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.LandfallAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.keyword.TrampleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.counters.CounterType;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.watchers.common.AbilityResolvedWatcher;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class ScythecatCub extends CardImpl {
|
||||
|
||||
public ScythecatCub(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}");
|
||||
|
||||
this.subtype.add(SubType.CAT);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// Trample
|
||||
this.addAbility(TrampleAbility.getInstance());
|
||||
|
||||
// Landfall -- Whenever a land you control enters, put a +1/+1 counter on target creature you control. If this is the second time this ability has resolved this turn, double the number of +1/+1 counters on that creature instead.
|
||||
Ability ability = new LandfallAbility(new ScythecatCubEffect());
|
||||
ability.addTarget(new TargetControlledCreaturePermanent());
|
||||
this.addAbility(ability, new AbilityResolvedWatcher());
|
||||
}
|
||||
|
||||
private ScythecatCub(final ScythecatCub card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ScythecatCub copy() {
|
||||
return new ScythecatCub(this);
|
||||
}
|
||||
}
|
||||
|
||||
class ScythecatCubEffect extends OneShotEffect {
|
||||
|
||||
ScythecatCubEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "put a +1/+1 counter on target creature you control. " +
|
||||
"If this is the second time this ability has resolved this turn, " +
|
||||
"double the number of +1/+1 counters on that creature instead";
|
||||
}
|
||||
|
||||
private ScythecatCubEffect(final ScythecatCubEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ScythecatCubEffect copy() {
|
||||
return new ScythecatCubEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent permanent = game.getPermanent(getTargetPointer().getFirst(game, source));
|
||||
if (permanent == null) {
|
||||
return false;
|
||||
}
|
||||
int count = AbilityResolvedWatcher.getResolutionCount(game, source) == 2
|
||||
? permanent.getCounters(game).getCount(CounterType.P1P1)
|
||||
: 1;
|
||||
return count > 0 && permanent.addCounters(CounterType.P1P1.createInstance(count), source, game);
|
||||
}
|
||||
}
|
||||
|
|
@ -582,6 +582,7 @@ public final class FoundationsJumpstart extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Scion of the Swarm", 487, Rarity.UNCOMMON, mage.cards.s.ScionOfTheSwarm.class));
|
||||
cards.add(new SetCardInfo("Scourge of the Undercity", 11, Rarity.COMMON, mage.cards.s.ScourgeOfTheUndercity.class));
|
||||
cards.add(new SetCardInfo("Screaming Swarm", 351, Rarity.UNCOMMON, mage.cards.s.ScreamingSwarm.class));
|
||||
cards.add(new SetCardInfo("Scythecat Cub", 24, Rarity.RARE, mage.cards.s.ScythecatCub.class));
|
||||
cards.add(new SetCardInfo("Search Party Captain", 250, Rarity.COMMON, mage.cards.s.SearchPartyCaptain.class));
|
||||
cards.add(new SetCardInfo("Seat of the Synod", 773, Rarity.COMMON, mage.cards.s.SeatOfTheSynod.class));
|
||||
cards.add(new SetCardInfo("Secluded Steppe", 774, Rarity.UNCOMMON, mage.cards.s.SecludedSteppe.class));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue