forked from External/mage
[FIN] Implement Sidequest: Catch a Fish / Cooking Campsite (#13440)
This commit is contained in:
parent
a5cd541490
commit
e8b6b0a158
3 changed files with 136 additions and 0 deletions
48
Mage.Sets/src/mage/cards/c/CookingCampsite.java
Normal file
48
Mage.Sets/src/mage/cards/c/CookingCampsite.java
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
package mage.cards.c;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.ActivateAsSorceryActivatedAbility;
|
||||
import mage.abilities.costs.common.SacrificeTargetCost;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.counter.AddCountersAllEffect;
|
||||
import mage.abilities.mana.WhiteManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
/**
|
||||
* @author balazskristof
|
||||
*/
|
||||
public final class CookingCampsite extends CardImpl {
|
||||
|
||||
public CookingCampsite(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
|
||||
|
||||
this.nightCard = true;
|
||||
|
||||
// {T}: Add {W}.
|
||||
this.addAbility(new WhiteManaAbility());
|
||||
|
||||
// {3}, {T}, Sacrifice an artifact: Put a +1/+1 counter on each creature you control. Activate only as a sorcery.
|
||||
Ability ability = new ActivateAsSorceryActivatedAbility(
|
||||
new AddCountersAllEffect(CounterType.P1P1.createInstance(), StaticFilters.FILTER_CONTROLLED_CREATURE), new ManaCostsImpl<>("{3}")
|
||||
);
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_PERMANENT_ARTIFACT_AN));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
private CookingCampsite(final CookingCampsite card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CookingCampsite copy() {
|
||||
return new CookingCampsite(this);
|
||||
}
|
||||
}
|
||||
86
Mage.Sets/src/mage/cards/s/SidequestCatchAFish.java
Normal file
86
Mage.Sets/src/mage/cards/s/SidequestCatchAFish.java
Normal file
|
|
@ -0,0 +1,86 @@
|
|||
package mage.cards.s;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.TransformSourceEffect;
|
||||
import mage.abilities.keyword.TransformAbility;
|
||||
import mage.abilities.triggers.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.cards.CardsImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.token.FoodToken;
|
||||
import mage.players.Player;
|
||||
|
||||
/**
|
||||
* @author balazskristof
|
||||
*/
|
||||
public final class SidequestCatchAFish extends CardImpl {
|
||||
|
||||
public SidequestCatchAFish(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}");
|
||||
|
||||
this.secondSideCardClazz = mage.cards.c.CookingCampsite.class;
|
||||
|
||||
// At the beginning of your upkeep, look at the top card of your library. If it's an artifact or creature card, you may reveal it and put it into your hand. If you put a card into your hand this way, create a Food token and transform this enchantment.
|
||||
this.addAbility(new TransformAbility());
|
||||
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new SidequestCatchAFishEffect()));
|
||||
}
|
||||
|
||||
private SidequestCatchAFish(final SidequestCatchAFish card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SidequestCatchAFish copy() {
|
||||
return new SidequestCatchAFish(this);
|
||||
}
|
||||
}
|
||||
|
||||
class SidequestCatchAFishEffect extends OneShotEffect {
|
||||
|
||||
SidequestCatchAFishEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "look at the top card of your library. " +
|
||||
"If it's an artifact or creature card, you may reveal it and put it into your hand. " +
|
||||
"If you put a card into your hand this way, create a Food token and transform this enchantment.";
|
||||
}
|
||||
|
||||
private SidequestCatchAFishEffect(final SidequestCatchAFishEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SidequestCatchAFishEffect copy() {
|
||||
return new SidequestCatchAFishEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller == null) {
|
||||
return false;
|
||||
}
|
||||
Card topCard = controller.getLibrary().getFromTop(game);
|
||||
if (topCard == null) {
|
||||
return false;
|
||||
}
|
||||
controller.lookAtCards("Top card of library", topCard, game);
|
||||
if (topCard.isArtifact(game) || topCard.isCreature(game)) {
|
||||
if (controller.chooseUse(Outcome.DrawCard, "Reveal " + topCard.getName() + " and put it into your hand?", source, game)) {
|
||||
controller.revealCards(source, new CardsImpl(topCard), game);
|
||||
controller.moveCards(topCard, Zone.HAND, source, game);
|
||||
new FoodToken().putOntoBattlefield(1, game, source);
|
||||
new TransformSourceEffect().apply(game, source);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -20,9 +20,11 @@ public final class FinalFantasy extends ExpansionSet {
|
|||
this.blockName = "Final Fantasy"; // for sorting in GUI
|
||||
this.hasBasicLands = false; // temporary
|
||||
|
||||
cards.add(new SetCardInfo("Cooking Campsite", 31, Rarity.UNCOMMON, mage.cards.c.CookingCampsite.class));
|
||||
cards.add(new SetCardInfo("Jumbo Cactuar", 191, Rarity.RARE, mage.cards.j.JumboCactuar.class));
|
||||
cards.add(new SetCardInfo("Sazh's Chocobo", 200, Rarity.UNCOMMON, mage.cards.s.SazhsChocobo.class));
|
||||
cards.add(new SetCardInfo("Sephiroth, Planet's Heir", 553, Rarity.MYTHIC, mage.cards.s.SephirothPlanetsHeir.class));
|
||||
cards.add(new SetCardInfo("Sidequest: Catch a Fish", 31, Rarity.UNCOMMON, mage.cards.s.SidequestCatchAFish.class));
|
||||
cards.add(new SetCardInfo("Sin, Spira's Punishment", 242, Rarity.RARE, mage.cards.s.SinSpirasPunishment.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Sin, Spira's Punishment", 348, Rarity.RARE, mage.cards.s.SinSpirasPunishment.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Sin, Spira's Punishment", 508, Rarity.RARE, mage.cards.s.SinSpirasPunishment.class, NON_FULL_USE_VARIOUS));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue