mirror of
https://github.com/correl/mage.git
synced 2024-11-15 03:00:16 +00:00
XMage 1.4.26V7
This commit is contained in:
parent
d69e0f37d3
commit
71336a916d
4 changed files with 42 additions and 19 deletions
|
@ -41,7 +41,7 @@ public class MageVersion implements Serializable, Comparable<MageVersion> {
|
||||||
public final static int MAGE_VERSION_MAJOR = 1;
|
public final static int MAGE_VERSION_MAJOR = 1;
|
||||||
public final static int MAGE_VERSION_MINOR = 4;
|
public final static int MAGE_VERSION_MINOR = 4;
|
||||||
public final static int MAGE_VERSION_PATCH = 26;
|
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 = "";
|
public final static String MAGE_VERSION_INFO = "";
|
||||||
|
|
||||||
private final int major;
|
private final int major;
|
||||||
|
|
|
@ -28,7 +28,6 @@
|
||||||
package mage.cards.f;
|
package mage.cards.f;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import mage.MageInt;
|
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.TriggeredAbilityImpl;
|
import mage.abilities.TriggeredAbilityImpl;
|
||||||
import mage.abilities.effects.ContinuousEffect;
|
import mage.abilities.effects.ContinuousEffect;
|
||||||
|
@ -48,8 +47,6 @@ import mage.players.Player;
|
||||||
import mage.target.TargetPermanent;
|
import mage.target.TargetPermanent;
|
||||||
import mage.target.common.TargetCreaturePermanent;
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
import mage.target.targetpointer.FixedTarget;
|
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 class FracturedLoyalty extends CardImpl {
|
||||||
|
|
||||||
public FracturedLoyalty(UUID ownerId, CardSetInfo setInfo) {
|
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);
|
this.subtype.add(SubType.AURA);
|
||||||
|
|
||||||
// Enchant creature
|
// Enchant creature
|
||||||
|
@ -85,7 +82,7 @@ public class FracturedLoyalty extends CardImpl {
|
||||||
|
|
||||||
public FracturedLoyaltyEffect() {
|
public FracturedLoyaltyEffect() {
|
||||||
super(Outcome.GainControl);
|
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) {
|
private FracturedLoyaltyEffect(FracturedLoyaltyEffect effect) {
|
||||||
|
@ -95,21 +92,23 @@ public class FracturedLoyalty extends CardImpl {
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Permanent enchantment = game.getPermanentOrLKIBattlefield(source.getSourceId());
|
Permanent enchantment = game.getPermanentOrLKIBattlefield(source.getSourceId());
|
||||||
Permanent enchantedCreature = game.getPermanent(enchantment.getAttachedTo());
|
if (enchantment != null) {
|
||||||
Player controller = game.getPlayer(enchantedCreature.getControllerId());
|
Permanent enchantedCreature = game.getPermanent(enchantment.getAttachedTo());
|
||||||
Player newController = game.getPlayer(this.getTargetPointer().getFirst(game, source));
|
if (enchantedCreature != null) {
|
||||||
if (enchantment != null && enchantment.getAttachedTo() != null) {
|
Player controller = game.getPlayer(enchantedCreature.getControllerId());
|
||||||
if (newController != null && controller != null && !controller.equals(newController)) {
|
if (enchantment.getAttachedTo() != null) {
|
||||||
ContinuousEffect effect = new GainControlTargetEffect(Duration.Custom, newController.getId());
|
if (controller != null && !enchantedCreature.getControllerId().equals(this.getTargetPointer().getFirst(game, source))) {
|
||||||
effect.setTargetPointer(new FixedTarget(enchantment.getAttachedTo()));
|
ContinuousEffect effect = new GainControlTargetEffect(Duration.Custom, this.getTargetPointer().getFirst(game, source));
|
||||||
game.addEffect(effect, source);
|
effect.setTargetPointer(new FixedTarget(enchantment.getAttachedTo()));
|
||||||
return true;
|
game.addEffect(effect, source);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Effect copy() {
|
public Effect copy() {
|
||||||
return new FracturedLoyaltyEffect(this);
|
return new FracturedLoyaltyEffect(this);
|
||||||
|
@ -150,7 +149,6 @@ public class FracturedLoyalty extends CardImpl {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getRule() {
|
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.";
|
return "Whenever enchanted creature becomes the target of a spell or ability, that spell or ability's controller gains control of that creature.";
|
||||||
|
|
|
@ -58,7 +58,7 @@ public enum CardRepository {
|
||||||
// raise this if db structure was changed
|
// raise this if db structure was changed
|
||||||
private static final long CARD_DB_VERSION = 51;
|
private static final long CARD_DB_VERSION = 51;
|
||||||
// raise this if new cards were added to the server
|
// 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<CardInfo, Object> cardDao;
|
private Dao<CardInfo, Object> cardDao;
|
||||||
private Set<String> classNames;
|
private Set<String> classNames;
|
||||||
|
|
||||||
|
|
|
@ -81,6 +81,7 @@ sub get_name_of_card_from_class
|
||||||
$card_name =~ s/ Of / of /g;
|
$card_name =~ s/ Of / of /g;
|
||||||
$card_name =~ s/ To / to /g;
|
$card_name =~ s/ To / to /g;
|
||||||
$card_name =~ s/ And / and /g;
|
$card_name =~ s/ And / and /g;
|
||||||
|
$card_name =~ s/ For / for /g;
|
||||||
return $card_name;
|
return $card_name;
|
||||||
}
|
}
|
||||||
return "";
|
return "";
|
||||||
|
@ -143,7 +144,31 @@ if (exists ($new_order{$cmd}))
|
||||||
{
|
{
|
||||||
if ($new_cards {$line} > 0)
|
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");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue