forked from External/mage
Implemented Exuberant Wolfbear
This commit is contained in:
parent
75ddf28c84
commit
ae93425faa
2 changed files with 85 additions and 0 deletions
84
Mage.Sets/src/mage/cards/e/ExuberantWolfbear.java
Normal file
84
Mage.Sets/src/mage/cards/e/ExuberantWolfbear.java
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
package mage.cards.e;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.AttacksTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.continuous.SetPowerToughnessTargetEffect;
|
||||
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.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class ExuberantWolfbear extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter
|
||||
= new FilterControlledPermanent(SubType.HUMAN, "Human you control");
|
||||
|
||||
public ExuberantWolfbear(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}");
|
||||
|
||||
this.subtype.add(SubType.WOLF);
|
||||
this.subtype.add(SubType.BEAR);
|
||||
this.power = new MageInt(4);
|
||||
this.toughness = new MageInt(4);
|
||||
|
||||
// Whenever Exuberant Wolfbear attacks, you may change the base power and toughness of target Human you control to Exuberant Wolfbear's power and toughness until end of turn.
|
||||
Ability ability = new AttacksTriggeredAbility(new ExuberantWolfbearEffect(), true);
|
||||
ability.addTarget(new TargetPermanent(filter));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
private ExuberantWolfbear(final ExuberantWolfbear card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ExuberantWolfbear copy() {
|
||||
return new ExuberantWolfbear(this);
|
||||
}
|
||||
}
|
||||
|
||||
class ExuberantWolfbearEffect extends OneShotEffect {
|
||||
|
||||
ExuberantWolfbearEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "change the base power and toughness of target Human you control " +
|
||||
"to {this}'s power and toughness until end of turn";
|
||||
}
|
||||
|
||||
private ExuberantWolfbearEffect(final ExuberantWolfbearEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ExuberantWolfbearEffect copy() {
|
||||
return new ExuberantWolfbearEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent permanent = game.getPermanentOrLKIBattlefield(source.getSourceId());
|
||||
if (permanent == null) {
|
||||
return false;
|
||||
}
|
||||
game.addEffect(new SetPowerToughnessTargetEffect(
|
||||
permanent.getPower().getValue(),
|
||||
permanent.getToughness().getValue(),
|
||||
Duration.EndOfTurn
|
||||
), source);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -81,6 +81,7 @@ public final class IkoriaLairOfBehemoths extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Dreamtail Heron", 47, Rarity.COMMON, mage.cards.d.DreamtailHeron.class));
|
||||
cards.add(new SetCardInfo("Essence Scatter", 49, Rarity.COMMON, mage.cards.e.EssenceScatter.class));
|
||||
cards.add(new SetCardInfo("Everquill Phoenix", 114, Rarity.RARE, mage.cards.e.EverquillPhoenix.class));
|
||||
cards.add(new SetCardInfo("Exuberant Wolfbear", 151, Rarity.COMMON, mage.cards.e.ExuberantWolfbear.class));
|
||||
cards.add(new SetCardInfo("Fertilid", 152, Rarity.COMMON, mage.cards.f.Fertilid.class));
|
||||
cards.add(new SetCardInfo("Flourishing Fox", 13, Rarity.UNCOMMON, mage.cards.f.FlourishingFox.class));
|
||||
cards.add(new SetCardInfo("Footfall Crater", 118, Rarity.UNCOMMON, mage.cards.f.FootfallCrater.class));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue