forked from External/mage
[CLU] Implement Unruly Krasis
This commit is contained in:
parent
4b60e82b83
commit
1132e24d01
2 changed files with 91 additions and 0 deletions
90
Mage.Sets/src/mage/cards/u/UnrulyKrasis.java
Normal file
90
Mage.Sets/src/mage/cards/u/UnrulyKrasis.java
Normal file
|
|
@ -0,0 +1,90 @@
|
|||
package mage.cards.u;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.AttacksTriggeredAbility;
|
||||
import mage.abilities.effects.ContinuousEffect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.continuous.SetBasePowerToughnessTargetEffect;
|
||||
import mage.abilities.keyword.AdaptAbility;
|
||||
import mage.abilities.keyword.TrampleAbility;
|
||||
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.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author Susucr
|
||||
*/
|
||||
public final class UnrulyKrasis extends CardImpl {
|
||||
|
||||
public UnrulyKrasis(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}{U}");
|
||||
|
||||
this.subtype.add(SubType.SHARK);
|
||||
this.subtype.add(SubType.OCTOPUS);
|
||||
this.subtype.add(SubType.LIZARD);
|
||||
this.power = new MageInt(4);
|
||||
this.toughness = new MageInt(4);
|
||||
|
||||
// Trample
|
||||
this.addAbility(TrampleAbility.getInstance());
|
||||
|
||||
// Whenever Unruly Krasis attacks, you may have the base power and toughness of another target creature you control become X/X until end of turn, where X is Unruly Krasis's power.
|
||||
Ability ability = new AttacksTriggeredAbility(new UnrulyKrasisEffect(), true);
|
||||
ability.addTarget(new TargetControlledCreaturePermanent(StaticFilters.FILTER_ANOTHER_TARGET_CREATURE_YOU_CONTROL));
|
||||
this.addAbility(ability);
|
||||
|
||||
// {3}{G}{U}: Adapt 3.
|
||||
this.addAbility(new AdaptAbility(3, "{3}{G}{U}"));
|
||||
}
|
||||
|
||||
private UnrulyKrasis(final UnrulyKrasis card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public UnrulyKrasis copy() {
|
||||
return new UnrulyKrasis(this);
|
||||
}
|
||||
}
|
||||
|
||||
class UnrulyKrasisEffect extends OneShotEffect {
|
||||
|
||||
UnrulyKrasisEffect() {
|
||||
super(Outcome.BoostCreature);
|
||||
staticText = "have the base power and toughness of another target creature you control "
|
||||
+ "become X/X until end of turn, where X is {this}'s power";
|
||||
}
|
||||
|
||||
private UnrulyKrasisEffect(final UnrulyKrasisEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public UnrulyKrasisEffect copy() {
|
||||
return new UnrulyKrasisEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent permanent = source.getSourcePermanentOrLKI(game);
|
||||
if (permanent == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
int xValue = permanent.getPower().getValue();
|
||||
ContinuousEffect effect = new SetBasePowerToughnessTargetEffect(xValue, xValue, Duration.EndOfTurn);
|
||||
effect.setTargetPointer(getTargetPointer().copy());
|
||||
game.addEffect(effect, source);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -254,6 +254,7 @@ public final class RavnicaClueEdition extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Twilight Panther", 78, Rarity.COMMON, mage.cards.t.TwilightPanther.class));
|
||||
cards.add(new SetCardInfo("Undercover Butler", 49, Rarity.UNCOMMON, mage.cards.u.UndercoverButler.class));
|
||||
cards.add(new SetCardInfo("Underrealm Lich", 215, Rarity.MYTHIC, mage.cards.u.UnderrealmLich.class));
|
||||
cards.add(new SetCardInfo("Unruly Krasis", 50, Rarity.RARE, mage.cards.u.UnrulyKrasis.class));
|
||||
cards.add(new SetCardInfo("Urbis Protector", 79, Rarity.UNCOMMON, mage.cards.u.UrbisProtector.class));
|
||||
cards.add(new SetCardInfo("Utvara Scalper", 153, Rarity.COMMON, mage.cards.u.UtvaraScalper.class));
|
||||
cards.add(new SetCardInfo("Venomous Hierophant", 125, Rarity.COMMON, mage.cards.v.VenomousHierophant.class));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue