mirror of
https://github.com/magefree/mage.git
synced 2026-01-23 19:59:54 -08:00
Implemented Mu Yanling
This commit is contained in:
parent
65ce4dc6cd
commit
23f396f83d
6 changed files with 156 additions and 4 deletions
120
Mage.Sets/src/mage/cards/m/MuYanling.java
Normal file
120
Mage.Sets/src/mage/cards/m/MuYanling.java
Normal file
|
|
@ -0,0 +1,120 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.cards.m;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.LoyaltyAbility;
|
||||
import mage.abilities.common.PlanswalkerEntersWithLoyalityCountersAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.abilities.effects.common.combat.CantBeBlockedTargetEffect;
|
||||
import mage.abilities.effects.common.turn.AddExtraTurnControllerEffect;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.TargetController;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public class MuYanling extends CardImpl {
|
||||
|
||||
public MuYanling(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{4}{U}{U}");
|
||||
|
||||
this.addSuperType(SuperType.LEGENDARY);
|
||||
this.subtype.add(SubType.YANLING);
|
||||
this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(5));
|
||||
|
||||
// +2: Target creature can't be blocked this turn.
|
||||
LoyaltyAbility ability = new LoyaltyAbility(new CantBeBlockedTargetEffect(), 2);
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
this.addAbility(ability);
|
||||
|
||||
// -3: Draw two cards.
|
||||
this.addAbility(new LoyaltyAbility(new DrawCardSourceControllerEffect(2), -3));
|
||||
|
||||
// -10: Tap all creatures your opponents control. You take an extra turn after this one.
|
||||
this.addAbility(new LoyaltyAbility(new MuYanlingEffect(), -10));
|
||||
}
|
||||
|
||||
public MuYanling(final MuYanling card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MuYanling copy() {
|
||||
return new MuYanling(this);
|
||||
}
|
||||
}
|
||||
|
||||
class MuYanlingEffect extends OneShotEffect {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls");
|
||||
|
||||
static {
|
||||
filter.add(new ControllerPredicate(TargetController.OPPONENT));
|
||||
}
|
||||
|
||||
public MuYanlingEffect() {
|
||||
super(Outcome.Tap);
|
||||
staticText = "tap all creatures your opponents control. You take an extra turn after this one.";
|
||||
}
|
||||
|
||||
public MuYanlingEffect(final MuYanlingEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player == null) {
|
||||
return false;
|
||||
}
|
||||
for (Permanent creature : game.getBattlefield().getActivePermanents(filter, player.getId(), source.getSourceId(), game)) {
|
||||
creature.tap(game);
|
||||
}
|
||||
return new AddExtraTurnControllerEffect().apply(game, source);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MuYanlingEffect copy() {
|
||||
return new MuYanlingEffect(this);
|
||||
}
|
||||
}
|
||||
30
Mage.Sets/src/mage/sets/JiangYangguMuYanling.java
Normal file
30
Mage.Sets/src/mage/sets/JiangYangguMuYanling.java
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package mage.sets;
|
||||
|
||||
import mage.cards.ExpansionSet;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.SetType;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public class JiangYangguMuYanling extends ExpansionSet {
|
||||
|
||||
private static final JiangYangguMuYanling instance = new JiangYangguMuYanling();
|
||||
|
||||
public static JiangYangguMuYanling getInstance() {
|
||||
return instance;
|
||||
}
|
||||
|
||||
private JiangYangguMuYanling() {
|
||||
super("Global Series: Jiang Yanggu & Mu Yanling", "GS1", ExpansionSet.buildDate(2018, 6, 22), SetType.SUPPLEMENTAL);
|
||||
this.blockName = "Global Series";
|
||||
this.hasBasicLands = false;
|
||||
cards.add(new SetCardInfo("Mu Yanling", 1, Rarity.MYTHIC, mage.cards.m.MuYanling.class));
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue