mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
[DMU] Implemented Academy Loremaster
This commit is contained in:
parent
2e94364b2a
commit
06d7b508dc
3 changed files with 84 additions and 0 deletions
76
Mage.Sets/src/mage/cards/a/AcademyLoremaster.java
Normal file
76
Mage.Sets/src/mage/cards/a/AcademyLoremaster.java
Normal file
|
@ -0,0 +1,76 @@
|
|||
package mage.cards.a;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.BeginningOfDrawTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.cost.SpellsCostIncreasingAllEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class AcademyLoremaster extends CardImpl {
|
||||
|
||||
public AcademyLoremaster(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{U}{U}");
|
||||
|
||||
this.subtype.add(SubType.HUMAN);
|
||||
this.subtype.add(SubType.WIZARD);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// At the beginning of each player's draw step, that player may draw an additional card. If they do, spells they cast this turn cost {2} more to cast.
|
||||
this.addAbility(new BeginningOfDrawTriggeredAbility(
|
||||
new AcademyLoremasterEffect(), TargetController.ANY, false
|
||||
));
|
||||
}
|
||||
|
||||
private AcademyLoremaster(final AcademyLoremaster card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AcademyLoremaster copy() {
|
||||
return new AcademyLoremaster(this);
|
||||
}
|
||||
}
|
||||
|
||||
class AcademyLoremasterEffect extends OneShotEffect {
|
||||
|
||||
AcademyLoremasterEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "that player may draw an additional card. " +
|
||||
"If they do, spells they cast this turn cost {2} more to cast";
|
||||
}
|
||||
|
||||
private AcademyLoremasterEffect(final AcademyLoremasterEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AcademyLoremasterEffect copy() {
|
||||
return new AcademyLoremasterEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(game.getActivePlayerId());
|
||||
if (player == null
|
||||
|| !player.chooseUse(outcome, "Draw an additional card?", source, game)
|
||||
|| player.drawCards(1, source, game) < 1) {
|
||||
return false;
|
||||
}
|
||||
game.addEffect(new SpellsCostIncreasingAllEffect(
|
||||
2, StaticFilters.FILTER_CARD, TargetController.ACTIVE
|
||||
).setDuration(Duration.EndOfTurn), source);
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -27,6 +27,7 @@ public final class DominariaUnited extends ExpansionSet {
|
|||
this.ratioBoosterMythic = 7;
|
||||
this.maxCardNumberInBooster = 281;
|
||||
|
||||
cards.add(new SetCardInfo("Academy Loremaster", 40, Rarity.RARE, mage.cards.a.AcademyLoremaster.class));
|
||||
cards.add(new SetCardInfo("Academy Wall", 41, Rarity.COMMON, mage.cards.a.AcademyWall.class));
|
||||
cards.add(new SetCardInfo("Adarkar Wastes", 243, Rarity.RARE, mage.cards.a.AdarkarWastes.class));
|
||||
cards.add(new SetCardInfo("Aether Channeler", 42, Rarity.RARE, mage.cards.a.AetherChanneler.class));
|
||||
|
|
|
@ -55,6 +55,9 @@ public class SpellsCostIncreasingAllEffect extends CostModificationEffectImpl {
|
|||
case OPPONENT:
|
||||
sb.append(" your opponents cast");
|
||||
break;
|
||||
case ACTIVE:
|
||||
sb.append(" the active player casts");
|
||||
break;
|
||||
case ANY:
|
||||
break;
|
||||
default:
|
||||
|
@ -110,6 +113,10 @@ public class SpellsCostIncreasingAllEffect extends CostModificationEffectImpl {
|
|||
return false;
|
||||
}
|
||||
break;
|
||||
case ACTIVE:
|
||||
if (!game.isActivePlayer(abilityController.getId())) {
|
||||
return false;
|
||||
}
|
||||
case ANY:
|
||||
break;
|
||||
default:
|
||||
|
|
Loading…
Reference in a new issue