mirror of
https://github.com/magefree/mage.git
synced 2026-01-09 20:32:06 -08:00
[CLB] Implemented You Look Upon the Tarrasque
This commit is contained in:
parent
9a4fba65ef
commit
99f484672e
2 changed files with 99 additions and 0 deletions
98
Mage.Sets/src/mage/cards/y/YouLookUponTheTarrasque.java
Normal file
98
Mage.Sets/src/mage/cards/y/YouLookUponTheTarrasque.java
Normal file
|
|
@ -0,0 +1,98 @@
|
|||
package mage.cards.y;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.Mode;
|
||||
import mage.abilities.effects.RequirementEffect;
|
||||
import mage.abilities.effects.common.PreventAllNonCombatDamageToAllEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
|
||||
import mage.abilities.keyword.IndestructibleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class YouLookUponTheTarrasque extends CardImpl {
|
||||
|
||||
public YouLookUponTheTarrasque(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{4}{G}");
|
||||
|
||||
// Choose one —
|
||||
// • Run and Hide — Prevent all combat damage that would be dealt to you and creatures you control this turn.
|
||||
this.getSpellAbility().addEffect(new PreventAllNonCombatDamageToAllEffect(
|
||||
Duration.EndOfTurn, StaticFilters.FILTER_CONTROLLED_CREATURES, true
|
||||
));
|
||||
this.getSpellAbility().withFirstModeFlavorWord("Run and Hide");
|
||||
|
||||
// • Gather Your Courage — Target creature gets +5/+5 and gains indestructible until end of turn. All creatures your opponents control able to block that creature this turn do so.
|
||||
this.getSpellAbility().addMode(new Mode(new BoostTargetEffect(5, 5)
|
||||
.setText("target creature gets +5/+5"))
|
||||
.addEffect(new GainAbilityTargetEffect(IndestructibleAbility.getInstance())
|
||||
.setText("and gains indestructible until end of turn"))
|
||||
.addEffect(new YouLookUponTheTarrasqueEffect())
|
||||
.addTarget(new TargetCreaturePermanent())
|
||||
.withFlavorWord("Gather Your Courage"));
|
||||
}
|
||||
|
||||
private YouLookUponTheTarrasque(final YouLookUponTheTarrasque card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public YouLookUponTheTarrasque copy() {
|
||||
return new YouLookUponTheTarrasque(this);
|
||||
}
|
||||
}
|
||||
|
||||
class YouLookUponTheTarrasqueEffect extends RequirementEffect {
|
||||
|
||||
public YouLookUponTheTarrasqueEffect() {
|
||||
super(Duration.EndOfTurn);
|
||||
staticText = "All creatures your opponents control able to block that creature this turn do so";
|
||||
}
|
||||
|
||||
public YouLookUponTheTarrasqueEffect(final YouLookUponTheTarrasqueEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(Permanent permanent, Ability source, Game game) {
|
||||
Permanent attackingCreature = game.getPermanent(this.getTargetPointer().getFirst(game, source));
|
||||
return attackingCreature != null
|
||||
&& attackingCreature.isAttacking()
|
||||
&& game
|
||||
.getOpponents(source.getControllerId())
|
||||
.contains(permanent.getControllerId())
|
||||
&& permanent
|
||||
.canBlock(this.getTargetPointer().getFirst(game, source), game);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean mustAttack(Game game) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean mustBlock(Game game) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public UUID mustBlockAttacker(Ability source, Game game) {
|
||||
return this.getTargetPointer().getFirst(game, source);
|
||||
}
|
||||
|
||||
@Override
|
||||
public YouLookUponTheTarrasqueEffect copy() {
|
||||
return new YouLookUponTheTarrasqueEffect(this);
|
||||
}
|
||||
}
|
||||
|
|
@ -586,6 +586,7 @@ public final class CommanderLegendsBattleForBaldursGate extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Wyll, Blade of Frontiers", 208, Rarity.RARE, mage.cards.w.WyllBladeOfFrontiers.class));
|
||||
cards.add(new SetCardInfo("Wyrm's Crossing Patrol", 51, Rarity.COMMON, mage.cards.w.WyrmsCrossingPatrol.class));
|
||||
cards.add(new SetCardInfo("Xenagos, the Reveler", 853, Rarity.MYTHIC, mage.cards.x.XenagosTheReveler.class));
|
||||
cards.add(new SetCardInfo("You Look Upon the Tarrasque", 262, Rarity.UNCOMMON, mage.cards.y.YouLookUponTheTarrasque.class));
|
||||
cards.add(new SetCardInfo("You Meet in a Tavern", 263, Rarity.COMMON, mage.cards.y.YouMeetInATavern.class));
|
||||
cards.add(new SetCardInfo("You're Confronted by Robbers", 53, Rarity.COMMON, mage.cards.y.YoureConfrontedByRobbers.class));
|
||||
cards.add(new SetCardInfo("You've Been Caught Stealing", 211, Rarity.COMMON, mage.cards.y.YouveBeenCaughtStealing.class));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue