mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 13:02:06 -08:00
Some rework to Framework.
This commit is contained in:
parent
bdd7cc48d1
commit
32fb2507c3
101 changed files with 426 additions and 497 deletions
|
|
@ -89,6 +89,9 @@ public class AuraReplacementEffect extends ReplacementEffectImpl {
|
|||
|
||||
if (game.getState().getValue(TransformAbility.VALUE_KEY_ENTER_TRANSFORMED + card.getId()) != null) {
|
||||
card = card.getSecondCardFace();
|
||||
if (!card.isEnchantment() || !card.hasSubtype(SubType.AURA, game)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Aura cards that go to battlefield face down (Manifest) don't have to select targets
|
||||
|
|
@ -210,9 +213,9 @@ public class AuraReplacementEffect extends ReplacementEffectImpl {
|
|||
if (card != null && (card.isEnchantment() && card.hasSubtype(SubType.AURA, game)
|
||||
|| // in case of transformable enchantments
|
||||
(game.getState().getValue(TransformAbility.VALUE_KEY_ENTER_TRANSFORMED + card.getId()) != null
|
||||
&& card.getSecondCardFace() != null
|
||||
&& card.getSecondCardFace().isEnchantment()
|
||||
&& card.getSecondCardFace().hasSubtype(SubType.AURA, game)))) {
|
||||
&& card.getSecondCardFace() != null
|
||||
&& card.getSecondCardFace().isEnchantment()
|
||||
&& card.getSecondCardFace().hasSubtype(SubType.AURA, game)))) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,8 +43,17 @@ import mage.players.Player;
|
|||
public class ReturnToBattlefieldUnderYourControlAttachedEffect extends OneShotEffect {
|
||||
|
||||
public ReturnToBattlefieldUnderYourControlAttachedEffect() {
|
||||
this("that card");
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param objectText text for the object to return (default: "that card") if
|
||||
* you use constructor without this param
|
||||
*/
|
||||
public ReturnToBattlefieldUnderYourControlAttachedEffect(String objectText) {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "return that card to the battlefield under your control";
|
||||
staticText = "return " + objectText + " to the battlefield under your control";
|
||||
}
|
||||
|
||||
public ReturnToBattlefieldUnderYourControlAttachedEffect(final ReturnToBattlefieldUnderYourControlAttachedEffect effect) {
|
||||
|
|
|
|||
|
|
@ -43,9 +43,9 @@ public enum Zone {
|
|||
OUTSIDE(false),
|
||||
COMMAND(true);
|
||||
|
||||
private boolean isPublic;
|
||||
private final boolean isPublic;
|
||||
|
||||
Zone(boolean isPublic){
|
||||
Zone(boolean isPublic) {
|
||||
this.isPublic = isPublic;
|
||||
}
|
||||
|
||||
|
|
@ -61,7 +61,7 @@ public enum Zone {
|
|||
return super.toString();
|
||||
}
|
||||
|
||||
public boolean isPublicZone(){
|
||||
public boolean isPublicZone() {
|
||||
return isPublic;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,9 +30,10 @@ public final class StaticFilters {
|
|||
public static final FilterEnchantmentPermanent FILTER_ENCHANTMENT_PERMANENT = new FilterEnchantmentPermanent();
|
||||
|
||||
public static final FilterArtifactCard FILTER_CARD_ARTIFACT = new FilterArtifactCard();
|
||||
public static final FilterCard FILTER_CARD_ARTIFACT_OR_CREATURE = new FilterCard("artifact or creature card");
|
||||
public static final FilterCreatureCard FILTER_CARD_CREATURE_YOUR_GRAVEYARD = new FilterCreatureCard("creature card from your graveyard");
|
||||
public static final FilterNonlandCard FILTER_CARD_NON_LAND = new FilterNonlandCard();
|
||||
public static final FilterNonlandCard FILTER_CARD_A_NON_LAND = new FilterNonlandCard("a nonland card");
|
||||
public static final FilterCard FILTER_CARD_ARTIFACT_OR_CREATURE = new FilterCard("artifact or creature card");
|
||||
|
||||
public static final FilterPermanent FILTER_PERMANENT = new FilterPermanent();
|
||||
public static final FilterCreaturePermanent FILTER_ARTIFACT_CREATURE_PERMANENT = new FilterArtifactCreaturePermanent();
|
||||
|
|
@ -60,6 +61,7 @@ public final class StaticFilters {
|
|||
|
||||
public static final FilterCreaturePermanent FILTER_PERMANENT_CREATURE = new FilterCreaturePermanent();
|
||||
public static final FilterCreaturePermanent FILTER_PERMANENT_A_CREATURE = new FilterCreaturePermanent("a creature");
|
||||
public static final FilterCreaturePermanent FILTER_PERMANENT_CREATURE_CONTROLLED = new FilterCreaturePermanent("creature you control");
|
||||
public static final FilterCreaturePermanent FILTER_PERMANENT_CREATURES = new FilterCreaturePermanent("creatures");
|
||||
public static final FilterCreaturePermanent FILTER_PERMANENT_CREATURES_CONTROLLED = new FilterCreaturePermanent("creatures you control");
|
||||
public static final FilterCreaturePermanent FILTER_PERMANENT_CREATURE_GOBLINS = new FilterCreaturePermanent(SubType.GOBLIN, "Goblin creatures");
|
||||
|
|
@ -109,6 +111,7 @@ public final class StaticFilters {
|
|||
|
||||
FILTER_ATTACKING_CREATURES.add(new AttackingPredicate());
|
||||
|
||||
FILTER_PERMANENT_CREATURE_CONTROLLED.add(new ControllerPredicate(TargetController.YOU));
|
||||
FILTER_PERMANENT_CREATURES_CONTROLLED.add(new ControllerPredicate(TargetController.YOU));
|
||||
|
||||
FILTER_PERMANENT_ARTIFACT_OR_CREATURE.add(Predicates.or(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue