mirror of
https://github.com/correl/mage.git
synced 2025-04-10 17:00:08 -09:00
Xmage 1.4.26V11d
This commit is contained in:
parent
2685d9f8b4
commit
4c9ed95662
4 changed files with 10 additions and 10 deletions
Mage.Common/src/main/java/mage/utils
Mage.Sets/src/mage/cards/a
Mage/src/main/java/mage
|
@ -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 = "V11c";
|
public final static String MAGE_VERSION_MINOR_PATCH = "V11d";
|
||||||
public final static String MAGE_VERSION_INFO = "";
|
public final static String MAGE_VERSION_INFO = "";
|
||||||
|
|
||||||
private final int major;
|
private final int major;
|
||||||
|
|
|
@ -57,7 +57,7 @@ import mage.util.TargetAddress;
|
||||||
public class AuraGraft extends CardImpl {
|
public class AuraGraft extends CardImpl {
|
||||||
|
|
||||||
public AuraGraft(UUID ownerId, CardSetInfo setInfo) {
|
public AuraGraft(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{U}");
|
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}");
|
||||||
|
|
||||||
// Gain control of target Aura that's attached to a permanent. Attach it to another permanent it can enchant.
|
// Gain control of target Aura that's attached to a permanent. Attach it to another permanent it can enchant.
|
||||||
FilterPermanent filter = new FilterPermanent("Aura that's attached to a permanent");
|
FilterPermanent filter = new FilterPermanent("Aura that's attached to a permanent");
|
||||||
|
@ -81,7 +81,6 @@ public class AuraGraft extends CardImpl {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
class AttachedToPermanentPredicate implements ObjectPlayerPredicate<ObjectPlayer<Permanent>> {
|
class AttachedToPermanentPredicate implements ObjectPlayerPredicate<ObjectPlayer<Permanent>> {
|
||||||
|
|
||||||
public AttachedToPermanentPredicate() {
|
public AttachedToPermanentPredicate() {
|
||||||
|
@ -95,6 +94,7 @@ class AttachedToPermanentPredicate implements ObjectPlayerPredicate<ObjectPlayer
|
||||||
}
|
}
|
||||||
|
|
||||||
class PermanentCanBeAttachedToPredicate implements ObjectPlayerPredicate<ObjectPlayer<Permanent>> {
|
class PermanentCanBeAttachedToPredicate implements ObjectPlayerPredicate<ObjectPlayer<Permanent>> {
|
||||||
|
|
||||||
protected Permanent aura;
|
protected Permanent aura;
|
||||||
|
|
||||||
public PermanentCanBeAttachedToPredicate(Permanent aura) {
|
public PermanentCanBeAttachedToPredicate(Permanent aura) {
|
||||||
|
@ -102,6 +102,7 @@ class PermanentCanBeAttachedToPredicate implements ObjectPlayerPredicate<ObjectP
|
||||||
this.aura = aura;
|
this.aura = aura;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean apply(ObjectPlayer<Permanent> input, Game game) {
|
public boolean apply(ObjectPlayer<Permanent> input, Game game) {
|
||||||
Permanent potentialAttachment = input.getObject();
|
Permanent potentialAttachment = input.getObject();
|
||||||
for (TargetAddress addr : TargetAddress.walk(aura)) {
|
for (TargetAddress addr : TargetAddress.walk(aura)) {
|
||||||
|
@ -130,7 +131,7 @@ class MoveTargetAuraEffect extends OneShotEffect {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source){
|
public boolean apply(Game game, Ability source) {
|
||||||
Permanent enchantment = game.getPermanent(targetPointer.getFirst(game, source));
|
Permanent enchantment = game.getPermanent(targetPointer.getFirst(game, source));
|
||||||
if (enchantment == null) {
|
if (enchantment == null) {
|
||||||
return false;
|
return false;
|
||||||
|
@ -150,10 +151,10 @@ class MoveTargetAuraEffect extends OneShotEffect {
|
||||||
Target target = new TargetPermanent(filter);
|
Target target = new TargetPermanent(filter);
|
||||||
target.setNotTarget(true);
|
target.setNotTarget(true);
|
||||||
if (target.canChoose(oldAttachment.getId(), controller.getId(), game)
|
if (target.canChoose(oldAttachment.getId(), controller.getId(), game)
|
||||||
&& controller.choose(outcome, target, oldAttachment.getId(), game)) {
|
&& controller.choose(outcome, target, oldAttachment.getId(), game)) {
|
||||||
Permanent newAttachment = game.getPermanent(target.getFirstTarget());
|
Permanent newAttachment = game.getPermanent(target.getFirstTarget());
|
||||||
if (newAttachment != null &&
|
if (newAttachment != null
|
||||||
oldAttachment.removeAttachment(enchantment.getId(), game)) {
|
&& oldAttachment.removeAttachment(enchantment.getId(), game)) {
|
||||||
newAttachment.addAttachment(enchantment.getId(), game);
|
newAttachment.addAttachment(enchantment.getId(), game);
|
||||||
game.informPlayers(enchantment.getLogName() + " was unattached from " + oldAttachment.getLogName() + " and attached to " + newAttachment.getLogName());
|
game.informPlayers(enchantment.getLogName() + " was unattached from " + oldAttachment.getLogName() + " and attached to " + newAttachment.getLogName());
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -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 = 99;
|
private static final long CARD_CONTENT_VERSION = 100;
|
||||||
private Dao<CardInfo, Object> cardDao;
|
private Dao<CardInfo, Object> cardDao;
|
||||||
private Set<String> classNames;
|
private Set<String> classNames;
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,6 @@ import mage.abilities.keyword.special.JohanVigilanceAbility;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.StaticFilters;
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
|
||||||
import mage.filter.common.FilterCreatureForCombatBlock;
|
import mage.filter.common.FilterCreatureForCombatBlock;
|
||||||
import mage.filter.common.FilterCreaturePermanent;
|
import mage.filter.common.FilterCreaturePermanent;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
|
@ -655,7 +654,7 @@ public class Combat implements Serializable, Copyable<Combat> {
|
||||||
Map<UUID, Set<UUID>> mustBeBlockedByAtLeastOne = new HashMap<>();
|
Map<UUID, Set<UUID>> mustBeBlockedByAtLeastOne = new HashMap<>();
|
||||||
|
|
||||||
// check mustBlock requirements of creatures from opponents of attacking player
|
// check mustBlock requirements of creatures from opponents of attacking player
|
||||||
for (Permanent creature : game.getBattlefield().getActivePermanents(new FilterControlledCreaturePermanent(), player.getId(), game)) {
|
for (Permanent creature : game.getBattlefield().getActivePermanents(StaticFilters.FILTER_PERMANENT_CREATURES_CONTROLLED, player.getId(), game)) {
|
||||||
// creature is controlled by an opponent of the attacker
|
// creature is controlled by an opponent of the attacker
|
||||||
if (opponents.contains(creature.getControllerId())) {
|
if (opponents.contains(creature.getControllerId())) {
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue