mirror of
https://github.com/correl/mage.git
synced 2025-01-12 11:08:01 +00:00
[AFR] Implemented You Come to a River
This commit is contained in:
parent
aad519f8cb
commit
4f38338fa6
9 changed files with 70 additions and 5 deletions
45
Mage.Sets/src/mage/cards/y/YouComeToARiver.java
Normal file
45
Mage.Sets/src/mage/cards/y/YouComeToARiver.java
Normal file
|
@ -0,0 +1,45 @@
|
|||
package mage.cards.y;
|
||||
|
||||
import mage.abilities.Mode;
|
||||
import mage.abilities.effects.common.ReturnToHandTargetEffect;
|
||||
import mage.abilities.effects.common.combat.CantBeBlockedTargetEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
import mage.target.common.TargetNonlandPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class YouComeToARiver extends CardImpl {
|
||||
|
||||
public YouComeToARiver(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}");
|
||||
|
||||
// Choose one —
|
||||
// • Fight the Current — Return target nonland permanent top its owner's hand.
|
||||
this.getSpellAbility().addEffect(new ReturnToHandTargetEffect());
|
||||
this.getSpellAbility().addTarget(new TargetNonlandPermanent());
|
||||
this.getSpellAbility().withFirstModeFlavorWord("Fight the Current");
|
||||
|
||||
// • Find a Crossing — Target creature gets +1/+0 until end of turn and can't be blocked this turn.
|
||||
Mode mode = new Mode(new BoostTargetEffect(1, 0, Duration.EndOfTurn));
|
||||
mode.addEffect(new CantBeBlockedTargetEffect(Duration.EndOfTurn).setText("and can't be blocked this turn"));
|
||||
mode.addTarget(new TargetCreaturePermanent());
|
||||
this.getSpellAbility().addMode(mode.withFlavorWord("Find a Crossing"));
|
||||
}
|
||||
|
||||
private YouComeToARiver(final YouComeToARiver card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public YouComeToARiver copy() {
|
||||
return new YouComeToARiver(this);
|
||||
}
|
||||
}
|
|
@ -22,7 +22,7 @@ public final class YouFindTheVillainsLair extends CardImpl {
|
|||
// • Foil Their Scheme — Counter target spell.
|
||||
this.getSpellAbility().addEffect(new CounterTargetEffect());
|
||||
this.getSpellAbility().addTarget(new TargetSpell());
|
||||
this.getSpellAbility().getModes().getMode().withFlavorWord("Foil Their Scheme");
|
||||
this.getSpellAbility().withFirstModeFlavorWord("Foil Their Scheme");
|
||||
|
||||
// • Learn Their Secrets — Draw two cards, then discard two cards.
|
||||
this.getSpellAbility().addMode(new Mode(
|
||||
|
|
|
@ -22,7 +22,7 @@ public final class YouHearSomethingOnWatch extends CardImpl {
|
|||
// Choose one —
|
||||
// • Rouse the Party — Creatures you control get +1/+1 until end of turn.
|
||||
this.getSpellAbility().addEffect(new BoostControlledEffect(1, 1, Duration.EndOfTurn));
|
||||
this.getSpellAbility().getModes().getMode().withFlavorWord("Rouse the Party");
|
||||
this.getSpellAbility().withFirstModeFlavorWord("Rouse the Party");
|
||||
|
||||
// • Set Off Traps — This spell deals 5 damage to target attacking creature.
|
||||
Mode mode = new Mode(new DamageTargetEffect(5, "this spell"));
|
||||
|
|
|
@ -25,7 +25,7 @@ public final class YouSeeAGuardApproach extends CardImpl {
|
|||
// • Distract the Guard — Tap target creature.
|
||||
this.getSpellAbility().addEffect(new TapTargetEffect());
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||
this.getSpellAbility().getModes().getMode().withFlavorWord("Distract the Guard");
|
||||
this.getSpellAbility().withFirstModeFlavorWord("Distract the Guard");
|
||||
|
||||
// • Hide — Target creature you control gains hexproof until end of turn.
|
||||
Mode mode = new Mode(new GainAbilityTargetEffect(HexproofAbility.getInstance(), Duration.EndOfTurn));
|
||||
|
|
|
@ -22,7 +22,7 @@ public final class YouSeeAPairOfGoblins extends CardImpl {
|
|||
// Choose one —
|
||||
// • Charge Them — Creatures you control get +2/+0 until end of turn.
|
||||
this.getSpellAbility().addEffect(new BoostControlledEffect(2, 0, Duration.EndOfTurn));
|
||||
this.getSpellAbility().getModes().getMode().withFlavorWord("Charge Them");
|
||||
this.getSpellAbility().withFirstModeFlavorWord("Charge Them");
|
||||
|
||||
// • Befriend Them — Create two 1/1 red Goblin creature tokens.
|
||||
this.getSpellAbility().addMode(new Mode(
|
||||
|
|
|
@ -67,6 +67,7 @@ public final class AdventuresInTheForgottenRealms extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Tiamat", 235, Rarity.MYTHIC, mage.cards.t.Tiamat.class));
|
||||
cards.add(new SetCardInfo("Trelasarra Moon Dancer", 236, Rarity.UNCOMMON, mage.cards.t.TrelasarraMoonDancer.class));
|
||||
cards.add(new SetCardInfo("Vorpal Sword", 124, Rarity.RARE, mage.cards.v.VorpalSword.class));
|
||||
cards.add(new SetCardInfo("You Come to a River", 83, Rarity.COMMON, mage.cards.y.YouComeToARiver.class));
|
||||
cards.add(new SetCardInfo("You Find the Villains' Lair", 84, Rarity.COMMON, mage.cards.y.YouFindTheVillainsLair.class));
|
||||
cards.add(new SetCardInfo("You Hear Something on Watch", 42, Rarity.COMMON, mage.cards.y.YouHearSomethingOnWatch.class));
|
||||
cards.add(new SetCardInfo("You See a Guard Approach", 85, Rarity.COMMON, mage.cards.y.YouSeeAGuardApproach.class));
|
||||
|
|
|
@ -467,13 +467,21 @@ public interface Ability extends Controllable, Serializable {
|
|||
Ability setAbilityWord(AbilityWord abilityWord);
|
||||
|
||||
/**
|
||||
* Set flavor word for whole ability (if you need flavor word for choices then call it from mode)
|
||||
* Sets flavor word for whole ability
|
||||
*
|
||||
* @param flavorWord
|
||||
* @return
|
||||
*/
|
||||
Ability withFlavorWord(String flavorWord);
|
||||
|
||||
/**
|
||||
* Sets flavor word for first mode
|
||||
*
|
||||
* @param flavorWord
|
||||
* @return
|
||||
*/
|
||||
Ability withFirstModeFlavorWord(String flavorWord);
|
||||
|
||||
/**
|
||||
* Creates the message about the ability casting/triggering/activating to
|
||||
* post in the game log before the ability resolves.
|
||||
|
|
|
@ -1078,6 +1078,12 @@ public abstract class AbilityImpl implements Ability {
|
|||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Ability withFirstModeFlavorWord(String flavorWord) {
|
||||
this.modes.getMode().withFlavorWord(flavorWord);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getGameLogMessage(Game game) {
|
||||
if (game.isSimulation()) {
|
||||
|
|
|
@ -501,6 +501,11 @@ public class StackAbility extends StackObjectImpl implements Ability {
|
|||
throw new UnsupportedOperationException("Not supported.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Ability withFirstModeFlavorWord(String flavorWord) {
|
||||
throw new UnsupportedOperationException("Not supported.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean activateAlternateOrAdditionalCosts(MageObject sourceObject, boolean noMana, Player controller, Game game) {
|
||||
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
||||
|
|
Loading…
Reference in a new issue