mirror of
https://github.com/correl/mage.git
synced 2024-11-15 03:00:16 +00:00
[STX] Implemented Academic Debate (#7716)
This commit is contained in:
parent
4240138888
commit
ce8e22d17d
2 changed files with 81 additions and 0 deletions
80
Mage.Sets/src/mage/cards/a/AcademicDebate.java
Normal file
80
Mage.Sets/src/mage/cards/a/AcademicDebate.java
Normal file
|
@ -0,0 +1,80 @@
|
|||
package mage.cards.a;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.LearnEffect;
|
||||
import mage.abilities.effects.common.combat.BlocksIfAbleTargetEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
|
||||
import mage.abilities.keyword.ReachAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author weirddan455
|
||||
*/
|
||||
public final class AcademicDebate extends CardImpl {
|
||||
|
||||
public AcademicDebate(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{R}");
|
||||
|
||||
// Target creature blocks this turn if able. You may have that creature gain reach until end of turn.
|
||||
this.getSpellAbility().addEffect(new BlocksIfAbleTargetEffect(Duration.EndOfTurn));
|
||||
this.getSpellAbility().addEffect(new AcademicDebateEffect());
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||
|
||||
// Learn.
|
||||
this.getSpellAbility().addEffect(new LearnEffect().concatBy("<br>"));
|
||||
}
|
||||
|
||||
private AcademicDebate(final AcademicDebate card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AcademicDebate copy() {
|
||||
return new AcademicDebate(this);
|
||||
}
|
||||
}
|
||||
|
||||
class AcademicDebateEffect extends OneShotEffect {
|
||||
|
||||
AcademicDebateEffect() {
|
||||
super(Outcome.AddAbility);
|
||||
this.staticText = "You may have that creature gain reach until end of turn";
|
||||
}
|
||||
|
||||
private AcademicDebateEffect(final AcademicDebateEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AcademicDebateEffect copy() {
|
||||
return new AcademicDebateEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player != null) {
|
||||
Permanent permanent = game.getPermanent(this.targetPointer.getFirst(game, source));
|
||||
if (permanent != null) {
|
||||
if (player.chooseUse(outcome, "Have " + permanent.getLogName() + " gain reach until end of turn?", source, game)) {
|
||||
GainAbilityTargetEffect effect = new GainAbilityTargetEffect(ReachAbility.getInstance(), Duration.EndOfTurn);
|
||||
game.addEffect(effect, source);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
|
@ -32,6 +32,7 @@ public final class StrixhavenSchoolOfMages extends ExpansionSet {
|
|||
this.ratioBoosterMythic = 7.4;
|
||||
this.maxCardNumberInBooster = 275;
|
||||
|
||||
cards.add(new SetCardInfo("Academic Debate", 91, Rarity.UNCOMMON, mage.cards.a.AcademicDebate.class));
|
||||
cards.add(new SetCardInfo("Access Tunnel", 262, Rarity.UNCOMMON, mage.cards.a.AccessTunnel.class));
|
||||
cards.add(new SetCardInfo("Accomplished Alchemist", 119, Rarity.RARE, mage.cards.a.AccomplishedAlchemist.class));
|
||||
cards.add(new SetCardInfo("Aether Helix", 162, Rarity.UNCOMMON, mage.cards.a.AetherHelix.class));
|
||||
|
|
Loading…
Reference in a new issue