mirror of
https://github.com/correl/mage.git
synced 2025-01-11 19:13:02 +00:00
Implemented Krenko, Tin Street Kingpin
This commit is contained in:
parent
ace8dc64f3
commit
b22443f422
2 changed files with 78 additions and 0 deletions
77
Mage.Sets/src/mage/cards/k/KrenkoTinStreetKingpin.java
Normal file
77
Mage.Sets/src/mage/cards/k/KrenkoTinStreetKingpin.java
Normal file
|
@ -0,0 +1,77 @@
|
|||
package mage.cards.k;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.AttacksTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.counters.CounterType;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.permanent.token.GoblinToken;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class KrenkoTinStreetKingpin extends CardImpl {
|
||||
|
||||
public KrenkoTinStreetKingpin(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}");
|
||||
|
||||
this.addSuperType(SuperType.LEGENDARY);
|
||||
this.subtype.add(SubType.GOBLIN);
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// Whenever Krenko, Tin Street Kingpin attacks, put a +1/+1 counter on it, then create a number of 1/1 red Goblin creature tokens equal to Krenko's power.
|
||||
this.addAbility(new AttacksTriggeredAbility(new KrenkoTinStreetKingpinEffect(), false));
|
||||
}
|
||||
|
||||
private KrenkoTinStreetKingpin(final KrenkoTinStreetKingpin card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public KrenkoTinStreetKingpin copy() {
|
||||
return new KrenkoTinStreetKingpin(this);
|
||||
}
|
||||
}
|
||||
|
||||
class KrenkoTinStreetKingpinEffect extends OneShotEffect {
|
||||
|
||||
KrenkoTinStreetKingpinEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "put a +1/+1 counter on it, " +
|
||||
"then create a number of 1/1 red Goblin creature tokens equal to {this}'s power.";
|
||||
}
|
||||
|
||||
private KrenkoTinStreetKingpinEffect(final KrenkoTinStreetKingpinEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public KrenkoTinStreetKingpinEffect copy() {
|
||||
return new KrenkoTinStreetKingpinEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent permanent = game.getPermanentOrLKIBattlefield(source.getSourceId());
|
||||
if (permanent == null) {
|
||||
return false;
|
||||
}
|
||||
new AddCountersSourceEffect(CounterType.P1P1.createInstance()).apply(game, source);
|
||||
game.applyEffects();
|
||||
int xValue = permanent.getPower().getValue();
|
||||
return new CreateTokenEffect(new GoblinToken(), xValue).apply(game, source);
|
||||
}
|
||||
}
|
|
@ -68,6 +68,7 @@ public final class WarOfTheSpark extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Kaya, Bane of the Dead", 231, Rarity.UNCOMMON, mage.cards.k.KayaBaneOfTheDead.class));
|
||||
cards.add(new SetCardInfo("Kiora's Dambreaker", 58, Rarity.COMMON, mage.cards.k.KiorasDambreaker.class));
|
||||
cards.add(new SetCardInfo("Kiora, Behemoth Beckoner", 232, Rarity.UNCOMMON, mage.cards.k.KioraBehemothBeckoner.class));
|
||||
cards.add(new SetCardInfo("Krenko, Tin Street Kingpin", 137, Rarity.RARE, mage.cards.k.KrenkoTinStreetKingpin.class));
|
||||
cards.add(new SetCardInfo("Lazotep Behemoth", 95, Rarity.COMMON, mage.cards.l.LazotepBehemoth.class));
|
||||
cards.add(new SetCardInfo("Lazotep Plating", 59, Rarity.UNCOMMON, mage.cards.l.LazotepPlating.class));
|
||||
cards.add(new SetCardInfo("Lazotep Reaver", 96, Rarity.COMMON, mage.cards.l.LazotepReaver.class));
|
||||
|
|
Loading…
Reference in a new issue