mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 02:38:02 +00:00
- Fixed Bestow so Far // Away works correctly
This commit is contained in:
@@ -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);
|
List<Card> lands = game.getCardsIn(ZoneType.Battlefield);
|
||||||
GameActionUtil.grantBasicLandsManaAbilities(CardLists.filter(lands, CardPredicates.Presets.LANDS));
|
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())) {
|
if (!perm.isInZone(tgtZone) || !perm.canBeEnchantedBy(c) || (perm.isPhasedOut() && !c.isPhasedOut())) {
|
||||||
c.unEnchantEntity(perm);
|
c.unEnchantEntity(perm);
|
||||||
if (c.isBestowed()) {
|
this.moveToGraveyard(c);
|
||||||
c.unanimateBestow();
|
|
||||||
game.fireEvent(new GameEventCardStatsChanged(c));
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
this.moveToGraveyard(c);
|
|
||||||
}
|
|
||||||
checkAgain = true;
|
checkAgain = true;
|
||||||
}
|
}
|
||||||
} else if (entity instanceof Player) {
|
} else if (entity instanceof Player) {
|
||||||
@@ -955,11 +942,6 @@ public class GameAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (c.isInPlay() && !c.isEnchanting()) {
|
if (c.isInPlay() && !c.isEnchanting()) {
|
||||||
if (c.isBestowed()) {
|
|
||||||
c.unanimateBestow();
|
|
||||||
game.fireEvent(new GameEventCardStatsChanged(c));
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
this.moveToGraveyard(c);
|
this.moveToGraveyard(c);
|
||||||
checkAgain = true;
|
checkAgain = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ import com.esotericsoftware.minlog.Log;
|
|||||||
import com.google.common.base.Function;
|
import com.google.common.base.Function;
|
||||||
import com.google.common.collect.ImmutableList;
|
import com.google.common.collect.ImmutableList;
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
|
|
||||||
import forge.GameCommand;
|
import forge.GameCommand;
|
||||||
import forge.StaticData;
|
import forge.StaticData;
|
||||||
import forge.card.*;
|
import forge.card.*;
|
||||||
@@ -56,6 +57,7 @@ import forge.util.Expressions;
|
|||||||
import forge.util.Lang;
|
import forge.util.Lang;
|
||||||
import forge.util.MyRandom;
|
import forge.util.MyRandom;
|
||||||
import forge.util.TextUtil;
|
import forge.util.TextUtil;
|
||||||
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.commons.lang3.tuple.Pair;
|
import org.apache.commons.lang3.tuple.Pair;
|
||||||
|
|
||||||
@@ -3560,6 +3562,9 @@ public class Card extends GameEntity implements Comparable<Card> {
|
|||||||
|
|
||||||
this.enchanting = null;
|
this.enchanting = null;
|
||||||
entity.removeEnchantedBy(this);
|
entity.removeEnchantedBy(this);
|
||||||
|
if (this.isBestowed()) {
|
||||||
|
this.unanimateBestow();
|
||||||
|
}
|
||||||
getGame().fireEvent(new GameEventCardAttachment(this, entity, null, AttachMethod.Enchant));
|
getGame().fireEvent(new GameEventCardAttachment(this, entity, null, AttachMethod.Enchant));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user