diff --git a/Mage.Common/src/main/java/mage/utils/MageVersion.java b/Mage.Common/src/main/java/mage/utils/MageVersion.java index 1c572fe2b6e..00d203ef6c1 100644 --- a/Mage.Common/src/main/java/mage/utils/MageVersion.java +++ b/Mage.Common/src/main/java/mage/utils/MageVersion.java @@ -41,7 +41,7 @@ public class MageVersion implements Serializable, Comparable { public final static int MAGE_VERSION_MAJOR = 1; public final static int MAGE_VERSION_MINOR = 4; public final static int MAGE_VERSION_PATCH = 26; - public final static String MAGE_VERSION_MINOR_PATCH = "V6"; + public final static String MAGE_VERSION_MINOR_PATCH = "V7"; public final static String MAGE_VERSION_INFO = ""; private final int major; diff --git a/Mage.Sets/src/mage/cards/f/FracturedLoyalty.java b/Mage.Sets/src/mage/cards/f/FracturedLoyalty.java index db4928c64ae..2ce91ccbe86 100644 --- a/Mage.Sets/src/mage/cards/f/FracturedLoyalty.java +++ b/Mage.Sets/src/mage/cards/f/FracturedLoyalty.java @@ -28,7 +28,6 @@ package mage.cards.f; import java.util.UUID; -import mage.MageInt; import mage.abilities.Ability; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.effects.ContinuousEffect; @@ -48,8 +47,6 @@ import mage.players.Player; import mage.target.TargetPermanent; import mage.target.common.TargetCreaturePermanent; import mage.target.targetpointer.FixedTarget; -import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; -import mage.abilities.common.SimpleStaticAbility; /** * @@ -58,7 +55,7 @@ import mage.abilities.common.SimpleStaticAbility; public class FracturedLoyalty extends CardImpl { public FracturedLoyalty(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{R}"); this.subtype.add(SubType.AURA); // Enchant creature @@ -85,7 +82,7 @@ public class FracturedLoyalty extends CardImpl { public FracturedLoyaltyEffect() { super(Outcome.GainControl); - this.staticText = "that player gains control of that creature"; + this.staticText = "that spell or ability's controller gains control of that creature"; } private FracturedLoyaltyEffect(FracturedLoyaltyEffect effect) { @@ -95,21 +92,23 @@ public class FracturedLoyalty extends CardImpl { @Override public boolean apply(Game game, Ability source) { Permanent enchantment = game.getPermanentOrLKIBattlefield(source.getSourceId()); - Permanent enchantedCreature = game.getPermanent(enchantment.getAttachedTo()); - Player controller = game.getPlayer(enchantedCreature.getControllerId()); - Player newController = game.getPlayer(this.getTargetPointer().getFirst(game, source)); - if (enchantment != null && enchantment.getAttachedTo() != null) { - if (newController != null && controller != null && !controller.equals(newController)) { - ContinuousEffect effect = new GainControlTargetEffect(Duration.Custom, newController.getId()); - effect.setTargetPointer(new FixedTarget(enchantment.getAttachedTo())); - game.addEffect(effect, source); - return true; + if (enchantment != null) { + Permanent enchantedCreature = game.getPermanent(enchantment.getAttachedTo()); + if (enchantedCreature != null) { + Player controller = game.getPlayer(enchantedCreature.getControllerId()); + if (enchantment.getAttachedTo() != null) { + if (controller != null && !enchantedCreature.getControllerId().equals(this.getTargetPointer().getFirst(game, source))) { + ContinuousEffect effect = new GainControlTargetEffect(Duration.Custom, this.getTargetPointer().getFirst(game, source)); + effect.setTargetPointer(new FixedTarget(enchantment.getAttachedTo())); + game.addEffect(effect, source); + return true; + } + } } } return false; } - @Override public Effect copy() { return new FracturedLoyaltyEffect(this); @@ -150,7 +149,6 @@ public class FracturedLoyalty extends CardImpl { return false; } - @Override public String getRule() { return "Whenever enchanted creature becomes the target of a spell or ability, that spell or ability's controller gains control of that creature."; diff --git a/Mage/src/main/java/mage/cards/repository/CardRepository.java b/Mage/src/main/java/mage/cards/repository/CardRepository.java index c8c3245cfe9..91530a64df7 100644 --- a/Mage/src/main/java/mage/cards/repository/CardRepository.java +++ b/Mage/src/main/java/mage/cards/repository/CardRepository.java @@ -58,7 +58,7 @@ public enum CardRepository { // raise this if db structure was changed private static final long CARD_DB_VERSION = 51; // raise this if new cards were added to the server - private static final long CARD_CONTENT_VERSION = 93; + private static final long CARD_CONTENT_VERSION = 94; private Dao cardDao; private Set classNames; diff --git a/Utils/find_new_cards.pl b/Utils/find_new_cards.pl index 6970d3d92e1..db6a7db5f3f 100644 --- a/Utils/find_new_cards.pl +++ b/Utils/find_new_cards.pl @@ -81,6 +81,7 @@ sub get_name_of_card_from_class $card_name =~ s/ Of / of /g; $card_name =~ s/ To / to /g; $card_name =~ s/ And / and /g; + $card_name =~ s/ For / for /g; return $card_name; } return ""; @@ -143,7 +144,31 @@ if (exists ($new_order{$cmd})) { if ($new_cards {$line} > 0) { - print ($line, " in ", $all_cards {$line}, "\n"); + my $setname = $all_cards {$line}; + + # Check if name is correct if not try to fix with ' before the endings of first word + no warnings 'uninitialized'; + if (!(length $setname)) { # setname is not set correct + my $firstblank = index($line, " "); + my $char = substr $line, $firstblank - 1, 1; + if ($char eq "s") { + my $fixedname = (substr $line, 0, $firstblank - 1) . "'" . (substr $line , $firstblank -1); + $setname = $all_cards {$fixedname}; + if (length $setname) { + $line = $fixedname; + } + } + } + + + if (!(length $setname)){ + print ("*** Set not found - probably card name is not exactly correct\n"); + print ($line, "\n"); + } else { + print ($line, " in ", $setname, "\n"); + } + + } } }