mirror of
https://github.com/correl/mage.git
synced 2024-11-15 11:09:30 +00:00
Implemented Bond fo Revival
This commit is contained in:
parent
5e06262591
commit
b3fb6f047a
2 changed files with 82 additions and 0 deletions
81
Mage.Sets/src/mage/cards/b/BondOfRevival.java
Normal file
81
Mage.Sets/src/mage/cards/b/BondOfRevival.java
Normal file
|
@ -0,0 +1,81 @@
|
||||||
|
package mage.cards.b;
|
||||||
|
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.effects.ContinuousEffect;
|
||||||
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
|
||||||
|
import mage.abilities.keyword.HasteAbility;
|
||||||
|
import mage.cards.Card;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Duration;
|
||||||
|
import mage.constants.Outcome;
|
||||||
|
import mage.constants.Zone;
|
||||||
|
import mage.filter.StaticFilters;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.players.Player;
|
||||||
|
import mage.target.common.TargetCardInYourGraveyard;
|
||||||
|
import mage.target.targetpointer.FixedTarget;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public final class BondOfRevival extends CardImpl {
|
||||||
|
|
||||||
|
public BondOfRevival(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{B}");
|
||||||
|
|
||||||
|
// Return target creature card from your graveyard to the battlefield. It gains haste until your next turn.
|
||||||
|
this.getSpellAbility().addEffect(new BondOfRevivalEffect());
|
||||||
|
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(
|
||||||
|
StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
private BondOfRevival(final BondOfRevival card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BondOfRevival copy() {
|
||||||
|
return new BondOfRevival(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class BondOfRevivalEffect extends OneShotEffect {
|
||||||
|
|
||||||
|
BondOfRevivalEffect() {
|
||||||
|
super(Outcome.Benefit);
|
||||||
|
staticText = "Return target creature card from your graveyard to the battlefield. " +
|
||||||
|
"It gains haste until your next turn.";
|
||||||
|
}
|
||||||
|
|
||||||
|
private BondOfRevivalEffect(final BondOfRevivalEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BondOfRevivalEffect copy() {
|
||||||
|
return new BondOfRevivalEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
Player player = game.getPlayer(source.getControllerId());
|
||||||
|
Card card = game.getCard(source.getFirstTarget());
|
||||||
|
if (player == null || card == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
ContinuousEffect effect = new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.UntilYourNextTurn);
|
||||||
|
effect.setTargetPointer(new FixedTarget(card.getId(), card.getZoneChangeCounter(game) + 1));
|
||||||
|
if (player.moveCards(card, Zone.BATTLEFIELD, source, game)) {
|
||||||
|
game.addEffect(effect, source);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -41,6 +41,7 @@ public final class WarOfTheSpark extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Bolt Bend", 115, Rarity.UNCOMMON, mage.cards.b.BoltBend.class));
|
cards.add(new SetCardInfo("Bolt Bend", 115, Rarity.UNCOMMON, mage.cards.b.BoltBend.class));
|
||||||
cards.add(new SetCardInfo("Bond of Flourishing", 155, Rarity.UNCOMMON, mage.cards.b.BondOfFlourishing.class));
|
cards.add(new SetCardInfo("Bond of Flourishing", 155, Rarity.UNCOMMON, mage.cards.b.BondOfFlourishing.class));
|
||||||
cards.add(new SetCardInfo("Bond of Insight", 43, Rarity.UNCOMMON, mage.cards.b.BondOfInsight.class));
|
cards.add(new SetCardInfo("Bond of Insight", 43, Rarity.UNCOMMON, mage.cards.b.BondOfInsight.class));
|
||||||
|
cards.add(new SetCardInfo("Bond of Revival", 80, Rarity.UNCOMMON, mage.cards.b.BondOfRevival.class));
|
||||||
cards.add(new SetCardInfo("Bulwark Giant", 7, Rarity.COMMON, mage.cards.b.BulwarkGiant.class));
|
cards.add(new SetCardInfo("Bulwark Giant", 7, Rarity.COMMON, mage.cards.b.BulwarkGiant.class));
|
||||||
cards.add(new SetCardInfo("Burning Prophet", 117, Rarity.COMMON, mage.cards.b.BurningProphet.class));
|
cards.add(new SetCardInfo("Burning Prophet", 117, Rarity.COMMON, mage.cards.b.BurningProphet.class));
|
||||||
cards.add(new SetCardInfo("Chainwhip Cyclops", 118, Rarity.COMMON, mage.cards.c.ChainwhipCyclops.class));
|
cards.add(new SetCardInfo("Chainwhip Cyclops", 118, Rarity.COMMON, mage.cards.c.ChainwhipCyclops.class));
|
||||||
|
|
Loading…
Reference in a new issue