mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +00:00
@@ -1040,9 +1040,9 @@ public class PlayerControllerAi extends PlayerController {
|
|||||||
if (sa.isCopied()) {
|
if (sa.isCopied()) {
|
||||||
if (sa.isSpell()) {
|
if (sa.isSpell()) {
|
||||||
if (!sa.getHostCard().isInZone(ZoneType.Stack)) {
|
if (!sa.getHostCard().isInZone(ZoneType.Stack)) {
|
||||||
sa.setHostCard(player.getGame().getAction().moveToStack(sa.getHostCard(), sa));
|
sa.setHostCard(getGame().getAction().moveToStack(sa.getHostCard(), sa));
|
||||||
} else {
|
} else {
|
||||||
player.getGame().getStackZone().add(sa.getHostCard());
|
getGame().getStackZone().add(sa.getHostCard());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1053,13 +1053,13 @@ public class PlayerControllerAi extends PlayerController {
|
|||||||
*/
|
*/
|
||||||
if (sa.isMayChooseNewTargets() && !sa.setupTargets()) {
|
if (sa.isMayChooseNewTargets() && !sa.setupTargets()) {
|
||||||
if (sa.isSpell()) {
|
if (sa.isSpell()) {
|
||||||
player.getGame().getAction().ceaseToExist(sa.getHostCard(), false);
|
getGame().getAction().ceaseToExist(sa.getHostCard(), false);
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// need finally add the new spell to the stack
|
// need finally add the new spell to the stack
|
||||||
player.getGame().getStack().add(sa);
|
getGame().getStack().add(sa);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -957,7 +957,10 @@ public class GameAction {
|
|||||||
if (c.isInZone(ZoneType.Stack)) {
|
if (c.isInZone(ZoneType.Stack)) {
|
||||||
c.getGame().getStack().remove(c);
|
c.getGame().getStack().remove(c);
|
||||||
}
|
}
|
||||||
c.getZone().remove(c);
|
// in some corner cases there's no zone yet (copied spell that failed targeting)
|
||||||
|
if (c.getZone() != null) {
|
||||||
|
c.getZone().remove(c);
|
||||||
|
}
|
||||||
|
|
||||||
// CR 603.6c other players LTB triggers should work
|
// CR 603.6c other players LTB triggers should work
|
||||||
if (!skipTrig) {
|
if (!skipTrig) {
|
||||||
@@ -971,13 +974,15 @@ public class GameAction {
|
|||||||
if (lki == null) {
|
if (lki == null) {
|
||||||
lki = CardUtil.getLKICopy(c);
|
lki = CardUtil.getLKICopy(c);
|
||||||
}
|
}
|
||||||
if (game.getCombat() != null) {
|
if (lki.isInPlay()) {
|
||||||
game.getCombat().removeFromCombat(c);
|
if (game.getCombat() != null) {
|
||||||
game.getCombat().saveLKI(lki);
|
game.getCombat().saveLKI(lki);
|
||||||
}
|
game.getCombat().removeFromCombat(c);
|
||||||
// again, make sure no triggers run from cards leaving controlled by loser
|
}
|
||||||
if (!lki.getController().equals(lki.getOwner())) {
|
// again, make sure no triggers run from cards leaving controlled by loser
|
||||||
game.getTriggerHandler().registerActiveLTBTrigger(lki);
|
if (!lki.getController().equals(lki.getOwner())) {
|
||||||
|
game.getTriggerHandler().registerActiveLTBTrigger(lki);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
final Map<AbilityKey, Object> runParams = AbilityKey.mapFromCard(c);
|
final Map<AbilityKey, Object> runParams = AbilityKey.mapFromCard(c);
|
||||||
runParams.put(AbilityKey.CardLKI, lki);
|
runParams.put(AbilityKey.CardLKI, lki);
|
||||||
|
|||||||
@@ -295,6 +295,9 @@ public class Combat {
|
|||||||
|
|
||||||
// takes LKI into consideration, should use it at all times (though a single iteration over multimap seems faster)
|
// takes LKI into consideration, should use it at all times (though a single iteration over multimap seems faster)
|
||||||
public final AttackingBand getBandOfAttacker(final Card c) {
|
public final AttackingBand getBandOfAttacker(final Card c) {
|
||||||
|
if (c == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
for (AttackingBand ab : attackedByBands.values()) {
|
for (AttackingBand ab : attackedByBands.values()) {
|
||||||
if (ab.contains(c)) {
|
if (ab.contains(c)) {
|
||||||
return ab;
|
return ab;
|
||||||
|
|||||||
Reference in New Issue
Block a user