mirror of
https://github.com/magefree/mage.git
synced 2025-12-26 21:42:07 -08:00
Merge branch 'master' into tyvar-kell
This commit is contained in:
commit
b184fa7842
23 changed files with 1183 additions and 45 deletions
|
|
@ -1,32 +0,0 @@
|
|||
|
||||
|
||||
package mage.abilities.common;
|
||||
|
||||
import mage.abilities.StaticAbility;
|
||||
import mage.abilities.effects.common.CantBeCounteredSourceEffect;
|
||||
import mage.constants.Zone;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
*/
|
||||
public class CantBeCounteredAbility extends StaticAbility {
|
||||
|
||||
public CantBeCounteredAbility() {
|
||||
super(Zone.STACK, new CantBeCounteredSourceEffect());
|
||||
}
|
||||
|
||||
public CantBeCounteredAbility(CantBeCounteredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "This spell can't be countered.";
|
||||
}
|
||||
|
||||
@Override
|
||||
public CantBeCounteredAbility copy() {
|
||||
return new CantBeCounteredAbility(this);
|
||||
}
|
||||
}
|
||||
|
|
@ -4,6 +4,7 @@ import mage.abilities.TriggeredAbilityImpl;
|
|||
import mage.abilities.effects.Effect;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.stack.Spell;
|
||||
|
|
@ -14,8 +15,6 @@ import mage.target.targetpointer.FixedTarget;
|
|||
*/
|
||||
public class SpellCastControllerTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
private static final FilterSpell spellCard = new FilterSpell("a spell");
|
||||
|
||||
protected FilterSpell filter;
|
||||
protected String rule;
|
||||
|
||||
|
|
@ -25,7 +24,7 @@ public class SpellCastControllerTriggeredAbility extends TriggeredAbilityImpl {
|
|||
protected boolean rememberSourceAsCard = false;
|
||||
|
||||
public SpellCastControllerTriggeredAbility(Effect effect, boolean optional) {
|
||||
this(Zone.BATTLEFIELD, effect, spellCard, optional, false);
|
||||
this(Zone.BATTLEFIELD, effect, StaticFilters.FILTER_SPELL_A, optional, false);
|
||||
}
|
||||
|
||||
public SpellCastControllerTriggeredAbility(Effect effect, FilterSpell filter, boolean optional) {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,47 @@
|
|||
package mage.abilities.keyword;
|
||||
|
||||
import mage.MageObject;
|
||||
import mage.game.Game;
|
||||
|
||||
import java.io.ObjectStreamException;
|
||||
|
||||
/**
|
||||
* Hexproof from planesalkers
|
||||
*
|
||||
* @author weirddan455
|
||||
*/
|
||||
public class HexproofFromPlaneswalkersAbility extends HexproofBaseAbility {
|
||||
|
||||
private static final HexproofFromPlaneswalkersAbility instance;
|
||||
|
||||
static {
|
||||
instance = new HexproofFromPlaneswalkersAbility();
|
||||
}
|
||||
|
||||
private Object readResolve() throws ObjectStreamException {
|
||||
return instance;
|
||||
}
|
||||
|
||||
public static HexproofFromPlaneswalkersAbility getInstance() {
|
||||
return instance;
|
||||
}
|
||||
|
||||
private HexproofFromPlaneswalkersAbility() {
|
||||
super();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkObject(MageObject source, Game game) {
|
||||
return source.isPlaneswalker();
|
||||
}
|
||||
|
||||
@Override
|
||||
public HexproofFromPlaneswalkersAbility copy() {
|
||||
return instance;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "hexproof from planeswalkers";
|
||||
}
|
||||
}
|
||||
|
|
@ -33,6 +33,7 @@ public enum SubType {
|
|||
CARTOUCHE("Cartouche", SubTypeSet.EnchantmentType),
|
||||
CURSE("Curse", SubTypeSet.EnchantmentType),
|
||||
SAGA("Saga", SubTypeSet.EnchantmentType),
|
||||
SHARD("Shard", SubTypeSet.EnchantmentType),
|
||||
SHRINE("Shrine", SubTypeSet.EnchantmentType),
|
||||
// 205.3g: Artifacts have their own unique set of subtypes; these subtypes are called artifact types.
|
||||
CLUE("Clue", SubTypeSet.ArtifactType),
|
||||
|
|
@ -415,6 +416,7 @@ public enum SubType {
|
|||
LUKKA("Lukka", SubTypeSet.PlaneswalkerType),
|
||||
NAHIRI("Nahiri", SubTypeSet.PlaneswalkerType),
|
||||
NARSET("Narset", SubTypeSet.PlaneswalkerType),
|
||||
NIKO("Niko", SubTypeSet.PlaneswalkerType),
|
||||
NISSA("Nissa", SubTypeSet.PlaneswalkerType),
|
||||
NIXILIS("Nixilis", SubTypeSet.PlaneswalkerType),
|
||||
OBI_WAN("Obi-Wan", SubTypeSet.PlaneswalkerType, true), // Star Wars
|
||||
|
|
|
|||
|
|
@ -0,0 +1,31 @@
|
|||
package mage.game.permanent.token;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.keyword.ChangelingAbility;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class ShapeshifterBlueToken extends TokenImpl {
|
||||
|
||||
public ShapeshifterBlueToken() {
|
||||
super("Shapeshifter", "2/2 blue Shapeshifter creature token with changeling");
|
||||
cardType.add(CardType.CREATURE);
|
||||
subtype.add(SubType.SHAPESHIFTER);
|
||||
color.setBlue(true);
|
||||
power = new MageInt(2);
|
||||
toughness = new MageInt(2);
|
||||
setIsAllCreatureTypes(true);
|
||||
addAbility(ChangelingAbility.getInstance());
|
||||
}
|
||||
|
||||
private ShapeshifterBlueToken(final ShapeshifterBlueToken token) {
|
||||
super(token);
|
||||
}
|
||||
|
||||
public ShapeshifterBlueToken copy() {
|
||||
return new ShapeshifterBlueToken(this);
|
||||
}
|
||||
}
|
||||
39
Mage/src/main/java/mage/game/permanent/token/ShardToken.java
Normal file
39
Mage/src/main/java/mage/game/permanent/token/ShardToken.java
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
package mage.game.permanent.token;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.SacrificeSourceCost;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.abilities.effects.keyword.ScryEffect;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
|
||||
public final class ShardToken extends TokenImpl {
|
||||
|
||||
public ShardToken() {
|
||||
super("Shard", "Shard token");
|
||||
cardType.add(CardType.ENCHANTMENT);
|
||||
subtype.add(SubType.SHARD);
|
||||
|
||||
// {2}, Sacrifice this enchantment: Scry 1, then draw a card.
|
||||
Ability ability = new SimpleActivatedAbility(new ScryEffect(1), new GenericManaCost(2));
|
||||
ability.addEffect(new DrawCardSourceControllerEffect(1).concatBy(", then"));
|
||||
SacrificeSourceCost cost = new SacrificeSourceCost();
|
||||
cost.setText("Sacrifice this enchantment");
|
||||
ability.addCost(cost);
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public ShardToken(final ShardToken token) {
|
||||
super(token);
|
||||
}
|
||||
|
||||
public ShardToken copy() {
|
||||
return new ShardToken(this);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue