Hideaway without Remembering

This commit is contained in:
tool4EvEr
2023-01-30 17:24:08 +01:00
parent c871db942a
commit fba50006b5
19 changed files with 58 additions and 29 deletions

View File

@@ -89,11 +89,11 @@ public class PlayAi extends SpellAbilityAi {
}
}
if (source != null && source.hasKeyword(Keyword.HIDEAWAY) && source.hasRemembered()) {
if (source != null && source.hasKeyword(Keyword.HIDEAWAY) && source.hasExiledCard()) {
// AI is not very good at playing non-permanent spells this way, at least yet
// (might be possible to enable it for Sorceries in Main1/Main2 if target is available,
// but definitely not for most Instants)
Card rem = (Card) source.getFirstRemembered();
Card rem = source.getExiledCards().getFirst();
CardTypeView t = rem.getState(CardStateName.Original).getType();
return t.isPermanent() && !t.isLand();

View File

@@ -332,6 +332,8 @@ public class GameCopier {
final Card newCard = createCardCopy(newGame, owner, c);
cardMap.put(c, newCard);
// TODO ExiledWith
Player zoneOwner = owner;
// everything the CreatureEvaluator checks must be set here
if (zone == ZoneType.Battlefield) {