mirror of
https://github.com/correl/mage.git
synced 2024-12-24 11:50:45 +00:00
Xmage 1.4.26V11d
This commit is contained in:
parent
2685d9f8b4
commit
4c9ed95662
4 changed files with 10 additions and 10 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_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;
|
||||
|
|
|
@ -57,7 +57,7 @@ import mage.util.TargetAddress;
|
|||
public class AuraGraft extends CardImpl {
|
||||
|
||||
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.
|
||||
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>> {
|
||||
|
||||
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)) {
|
||||
|
@ -130,7 +131,7 @@ class MoveTargetAuraEffect extends OneShotEffect {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source){
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent enchantment = game.getPermanent(targetPointer.getFirst(game, source));
|
||||
if (enchantment == null) {
|
||||
return false;
|
||||
|
@ -150,10 +151,10 @@ class MoveTargetAuraEffect extends OneShotEffect {
|
|||
Target target = new TargetPermanent(filter);
|
||||
target.setNotTarget(true);
|
||||
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());
|
||||
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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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())) {
|
||||
|
||||
|
|
Loading…
Reference in a new issue