mirror of
https://github.com/correl/mage.git
synced 2024-12-28 03:00:10 +00:00
[SNC] Implemented Jetmir's Fixer
This commit is contained in:
parent
1991e8b40d
commit
aa0ba71c3e
2 changed files with 76 additions and 0 deletions
75
Mage.Sets/src/mage/cards/j/JetmirsFixer.java
Normal file
75
Mage.Sets/src/mage/cards/j/JetmirsFixer.java
Normal file
|
@ -0,0 +1,75 @@
|
|||
package mage.cards.j;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostSourceEffect;
|
||||
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.counters.CounterType;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.watchers.common.ManaPaidSourceWatcher;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class JetmirsFixer extends CardImpl {
|
||||
|
||||
public JetmirsFixer(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{R}{G}");
|
||||
|
||||
this.subtype.add(SubType.CAT);
|
||||
this.subtype.add(SubType.WARRIOR);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// {R}{G}: Jetmir's Fixer gets +1/+1 until end of turn. If mana from a Treasure was spent to activate this ability, put a +1/+1 counter on Jetmir's Fixer instead.
|
||||
this.addAbility(new SimpleActivatedAbility(new JetmirsFixerEffect(), new ManaCostsImpl<>("{R}{G}")));
|
||||
}
|
||||
|
||||
private JetmirsFixer(final JetmirsFixer card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public JetmirsFixer copy() {
|
||||
return new JetmirsFixer(this);
|
||||
}
|
||||
}
|
||||
|
||||
class JetmirsFixerEffect extends OneShotEffect {
|
||||
|
||||
JetmirsFixerEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "{this} gets +1/+1 until end of turn. If mana from a Treasure " +
|
||||
"was spent to activate this ability, put a +1/+1 counter on {this} instead";
|
||||
}
|
||||
|
||||
private JetmirsFixerEffect(final JetmirsFixerEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public JetmirsFixerEffect copy() {
|
||||
return new JetmirsFixerEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
if (ManaPaidSourceWatcher.getTreasurePaid(source.getId(), game) < 1) {
|
||||
game.addEffect(new BoostSourceEffect(1, 1, Duration.EndOfTurn), source);
|
||||
return true;
|
||||
}
|
||||
Permanent permanent = source.getSourcePermanentIfItStillExists(game);
|
||||
return permanent != null && permanent.addCounters(CounterType.P1P1.createInstance(), source, game);
|
||||
}
|
||||
}
|
|
@ -97,6 +97,7 @@ public final class StreetsOfNewCapenna extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Involuntary Employment", 110, Rarity.UNCOMMON, mage.cards.i.InvoluntaryEmployment.class));
|
||||
cards.add(new SetCardInfo("Island", 264, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Jaxis, the Troublemaker", 112, Rarity.RARE, mage.cards.j.JaxisTheTroublemaker.class));
|
||||
cards.add(new SetCardInfo("Jetmir's Fixer", 194, Rarity.COMMON, mage.cards.j.JetmirsFixer.class));
|
||||
cards.add(new SetCardInfo("Jetmir's Garden", 250, Rarity.RARE, mage.cards.j.JetmirsGarden.class));
|
||||
cards.add(new SetCardInfo("Jetmir, Nexus of Revels", 193, Rarity.MYTHIC, mage.cards.j.JetmirNexusOfRevels.class));
|
||||
cards.add(new SetCardInfo("Jewel Thief", 151, Rarity.COMMON, mage.cards.j.JewelThief.class));
|
||||
|
|
Loading…
Reference in a new issue