Xmage 1.4.26V11d

This commit is contained in:
LevelX2 2018-01-11 07:14:49 +01:00
parent 2685d9f8b4
commit 4c9ed95662
4 changed files with 10 additions and 10 deletions

View file

@ -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_MINOR = 4;
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 = "";
private final int major;

View file

@ -81,7 +81,6 @@ public class AuraGraft extends CardImpl {
}
}
class AttachedToPermanentPredicate implements ObjectPlayerPredicate<ObjectPlayer<Permanent>> {
public AttachedToPermanentPredicate() {
@ -95,6 +94,7 @@ class AttachedToPermanentPredicate implements ObjectPlayerPredicate<ObjectPlayer
}
class PermanentCanBeAttachedToPredicate implements ObjectPlayerPredicate<ObjectPlayer<Permanent>> {
protected Permanent aura;
public PermanentCanBeAttachedToPredicate(Permanent aura) {
@ -102,6 +102,7 @@ class PermanentCanBeAttachedToPredicate implements ObjectPlayerPredicate<ObjectP
this.aura = aura;
}
@Override
public boolean apply(ObjectPlayer<Permanent> input, Game game) {
Permanent potentialAttachment = input.getObject();
for (TargetAddress addr : TargetAddress.walk(aura)) {
@ -152,8 +153,8 @@ class MoveTargetAuraEffect extends OneShotEffect {
if (target.canChoose(oldAttachment.getId(), controller.getId(), game)
&& controller.choose(outcome, target, oldAttachment.getId(), game)) {
Permanent newAttachment = game.getPermanent(target.getFirstTarget());
if (newAttachment != null &&
oldAttachment.removeAttachment(enchantment.getId(), game)) {
if (newAttachment != null
&& oldAttachment.removeAttachment(enchantment.getId(), game)) {
newAttachment.addAttachment(enchantment.getId(), game);
game.informPlayers(enchantment.getLogName() + " was unattached from " + oldAttachment.getLogName() + " and attached to " + newAttachment.getLogName());
return true;

View file

@ -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 = 99;
private static final long CARD_CONTENT_VERSION = 100;
private Dao<CardInfo, Object> cardDao;
private Set<String> classNames;

View file

@ -38,7 +38,6 @@ import mage.abilities.keyword.special.JohanVigilanceAbility;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.filter.StaticFilters;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.common.FilterCreatureForCombatBlock;
import mage.filter.common.FilterCreaturePermanent;
import mage.game.Game;
@ -655,7 +654,7 @@ public class Combat implements Serializable, Copyable<Combat> {
Map<UUID, Set<UUID>> mustBeBlockedByAtLeastOne = new HashMap<>();
// 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
if (opponents.contains(creature.getControllerId())) {