mirror of
https://github.com/correl/mage.git
synced 2024-12-26 03:00:11 +00:00
Implemented Wolfrider's Saddle
This commit is contained in:
parent
c37118e5f2
commit
f0879115b1
2 changed files with 87 additions and 0 deletions
86
Mage.Sets/src/mage/cards/w/WolfridersSaddle.java
Normal file
86
Mage.Sets/src/mage/cards/w/WolfridersSaddle.java
Normal file
|
@ -0,0 +1,86 @@
|
||||||
|
package mage.cards.w;
|
||||||
|
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
|
import mage.abilities.effects.common.CreateTokenEffect;
|
||||||
|
import mage.abilities.effects.common.combat.CantBeBlockedByMoreThanOneSourceEffect;
|
||||||
|
import mage.abilities.effects.common.continuous.BoostEquippedEffect;
|
||||||
|
import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
|
||||||
|
import mage.abilities.keyword.EquipAbility;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.AttachmentType;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.SubType;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.game.permanent.Permanent;
|
||||||
|
import mage.game.permanent.token.WolfToken;
|
||||||
|
import mage.players.Player;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public final class WolfridersSaddle extends CardImpl {
|
||||||
|
|
||||||
|
public WolfridersSaddle(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}{G}");
|
||||||
|
|
||||||
|
this.subtype.add(SubType.EQUIPMENT);
|
||||||
|
|
||||||
|
// When Wolfrider's Saddle enters the battlefield, create a 2/2 green Wolf creature token, then attach Wolfrider's Saddle to it.
|
||||||
|
this.addAbility(new EntersBattlefieldTriggeredAbility(new WolfridersSaddleEffect()));
|
||||||
|
|
||||||
|
// Equipped creature gets +1/+1 and can't be blocked by more than one creature.
|
||||||
|
Ability ability = new SimpleStaticAbility(new BoostEquippedEffect(1, 1));
|
||||||
|
ability.addEffect(new GainAbilityAttachedEffect(
|
||||||
|
new SimpleStaticAbility(new CantBeBlockedByMoreThanOneSourceEffect()), AttachmentType.EQUIPMENT
|
||||||
|
).setText("and can't be blocked by more than one creature"));
|
||||||
|
this.addAbility(ability);
|
||||||
|
|
||||||
|
// Equip {3}
|
||||||
|
this.addAbility(new EquipAbility(3));
|
||||||
|
}
|
||||||
|
|
||||||
|
private WolfridersSaddle(final WolfridersSaddle card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public WolfridersSaddle copy() {
|
||||||
|
return new WolfridersSaddle(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class WolfridersSaddleEffect extends CreateTokenEffect {
|
||||||
|
|
||||||
|
WolfridersSaddleEffect() {
|
||||||
|
super(new WolfToken());
|
||||||
|
staticText = "create a 2/2 green Wolf creature token, then attach {this} to it.";
|
||||||
|
}
|
||||||
|
|
||||||
|
private WolfridersSaddleEffect(final WolfridersSaddleEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
|
if (controller == null == !super.apply(game, source)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
Permanent p = game.getPermanent(this.getLastAddedTokenId());
|
||||||
|
if (p == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
p.addAttachment(source.getSourceId(), game);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public WolfridersSaddleEffect copy() {
|
||||||
|
return new WolfridersSaddleEffect(this);
|
||||||
|
}
|
||||||
|
}
|
|
@ -116,6 +116,7 @@ public final class CoreSet2020 extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Voracious Hydra", 200, Rarity.RARE, mage.cards.v.VoraciousHydra.class));
|
cards.add(new SetCardInfo("Voracious Hydra", 200, Rarity.RARE, mage.cards.v.VoraciousHydra.class));
|
||||||
cards.add(new SetCardInfo("Wakeroot Elemental", 202, Rarity.RARE, mage.cards.w.WakerootElemental.class));
|
cards.add(new SetCardInfo("Wakeroot Elemental", 202, Rarity.RARE, mage.cards.w.WakerootElemental.class));
|
||||||
cards.add(new SetCardInfo("Wolfkin Bond", 203, Rarity.COMMON, mage.cards.w.WolfkinBond.class));
|
cards.add(new SetCardInfo("Wolfkin Bond", 203, Rarity.COMMON, mage.cards.w.WolfkinBond.class));
|
||||||
|
cards.add(new SetCardInfo("Wolfrider's Saddle", 204, Rarity.UNCOMMON, mage.cards.w.WolfridersSaddle.class));
|
||||||
cards.add(new SetCardInfo("Yarok's Fenlurker", 123, Rarity.UNCOMMON, mage.cards.y.YaroksFenlurker.class));
|
cards.add(new SetCardInfo("Yarok's Fenlurker", 123, Rarity.UNCOMMON, mage.cards.y.YaroksFenlurker.class));
|
||||||
cards.add(new SetCardInfo("Yarok, the Desecrated", 220, Rarity.MYTHIC, mage.cards.y.YarokTheDesecrated.class));
|
cards.add(new SetCardInfo("Yarok, the Desecrated", 220, Rarity.MYTHIC, mage.cards.y.YarokTheDesecrated.class));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue