- Fixed Bestow so Far // Away works correctly

This commit is contained in:
swordshine
2014-03-16 05:44:05 +00:00
parent beb54c9a4d
commit efa06e6830
2 changed files with 6 additions and 19 deletions

View File

@@ -724,12 +724,6 @@ public class GameAction {
}
}
// card state effects like Glorious Anthem
// for (final String effect : game.getStaticEffects().getStateBasedMap().keySet()) {
// final Function<Game, ?> com = GameActionUtil.getCommands().get(effect);
// com.apply(game);
// }
List<Card> lands = game.getCardsIn(ZoneType.Battlefield);
GameActionUtil.grantBasicLandsManaAbilities(CardLists.filter(lands, CardPredicates.Presets.LANDS));
@@ -927,14 +921,7 @@ public class GameAction {
if (!perm.isInZone(tgtZone) || !perm.canBeEnchantedBy(c) || (perm.isPhasedOut() && !c.isPhasedOut())) {
c.unEnchantEntity(perm);
if (c.isBestowed()) {
c.unanimateBestow();
game.fireEvent(new GameEventCardStatsChanged(c));
return true;
}
else {
this.moveToGraveyard(c);
}
this.moveToGraveyard(c);
checkAgain = true;
}
} else if (entity instanceof Player) {
@@ -955,11 +942,6 @@ public class GameAction {
}
if (c.isInPlay() && !c.isEnchanting()) {
if (c.isBestowed()) {
c.unanimateBestow();
game.fireEvent(new GameEventCardStatsChanged(c));
return true;
}
this.moveToGraveyard(c);
checkAgain = true;
}

View File

@@ -21,6 +21,7 @@ import com.esotericsoftware.minlog.Log;
import com.google.common.base.Function;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Lists;
import forge.GameCommand;
import forge.StaticData;
import forge.card.*;
@@ -56,6 +57,7 @@ import forge.util.Expressions;
import forge.util.Lang;
import forge.util.MyRandom;
import forge.util.TextUtil;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.tuple.Pair;
@@ -3560,6 +3562,9 @@ public class Card extends GameEntity implements Comparable<Card> {
this.enchanting = null;
entity.removeEnchantedBy(this);
if (this.isBestowed()) {
this.unanimateBestow();
}
getGame().fireEvent(new GameEventCardAttachment(this, entity, null, AttachMethod.Enchant));
}