From a1b3a2e40b29b772e3e223c587e5b78c9d25fd15 Mon Sep 17 00:00:00 2001 From: Bug Hunter Date: Fri, 11 Feb 2022 03:29:13 +0000 Subject: [PATCH] 406.3 extended --- forge-ai/src/main/java/forge/ai/AiAttackController.java | 4 ---- .../src/main/java/forge/game/ability/effects/DigEffect.java | 3 +++ forge-game/src/main/java/forge/game/card/Card.java | 5 +++++ forge-gui/res/cardsfolder/c/clone_shell.txt | 2 +- .../upcoming/the_dragon_kami_reborn_dragon_kamis_egg.txt | 2 +- 5 files changed, 10 insertions(+), 6 deletions(-) diff --git a/forge-ai/src/main/java/forge/ai/AiAttackController.java b/forge-ai/src/main/java/forge/ai/AiAttackController.java index 1ecca3d3288..a0f02313fdb 100644 --- a/forge-ai/src/main/java/forge/ai/AiAttackController.java +++ b/forge-ai/src/main/java/forge/ai/AiAttackController.java @@ -728,10 +728,6 @@ public class AiAttackController { // because creatures not chosen can't attack. if (!nextTurn) { for (final Card attacker : this.attackers) { - if (!CombatUtil.canAttack(attacker, defender)) { - attackersLeft.remove(attacker); - continue; - } boolean mustAttack = false; // TODO this might result into trying to attack the wrong player if (attacker.isGoaded()) { diff --git a/forge-game/src/main/java/forge/game/ability/effects/DigEffect.java b/forge-game/src/main/java/forge/game/ability/effects/DigEffect.java index 5706e0f1732..665516a989a 100644 --- a/forge-game/src/main/java/forge/game/ability/effects/DigEffect.java +++ b/forge-game/src/main/java/forge/game/ability/effects/DigEffect.java @@ -392,6 +392,9 @@ public class DigEffect extends SpellAbilityEffect { if (sa.hasParam("ExileFaceDown")) { c.turnFaceDown(true); } + if (sa.hasParam("WithMayLook")) { + c.addMayLookFaceDownExile(c.getOwner()); + } if (sa.hasParam("Imprint")) { host.addImprintedCard(c); } diff --git a/forge-game/src/main/java/forge/game/card/Card.java b/forge-game/src/main/java/forge/game/card/Card.java index 190218694b2..7e167e738ac 100644 --- a/forge-game/src/main/java/forge/game/card/Card.java +++ b/forge-game/src/main/java/forge/game/card/Card.java @@ -3253,6 +3253,11 @@ public class Card extends GameEntity implements Comparable, IHasSVars { return view.mayPlayerLook(player.getView()); } + public final void addMayLookFaceDownExile(final Player p) { + mayLookFaceDownExile.add(p); + updateMayLook(); + } + public final void addMayLookAt(final long timestamp, final Iterable list) { PlayerCollection plist = new PlayerCollection(list); mayLook.put(timestamp, plist); diff --git a/forge-gui/res/cardsfolder/c/clone_shell.txt b/forge-gui/res/cardsfolder/c/clone_shell.txt index b146788682b..c361dc491e6 100644 --- a/forge-gui/res/cardsfolder/c/clone_shell.txt +++ b/forge-gui/res/cardsfolder/c/clone_shell.txt @@ -3,7 +3,7 @@ ManaCost:5 Types:Artifact Creature Shapeshifter PT:2/2 T:Mode$ ChangesZone | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigDig | TriggerDescription$ Imprint — When Clone Shell enters the battlefield, look at the top four cards of your library, exile one face down, then put the rest on the bottom of your library in any order. -SVar:TrigDig:DB$ Dig | Defined$ You | DigNum$ 4 | DestinationZone$ Exile | ExileFaceDown$ True | Imprint$ True +SVar:TrigDig:DB$ Dig | Defined$ You | DigNum$ 4 | DestinationZone$ Exile | ExileFaceDown$ True | WithMayLook$ True | Imprint$ True T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Card.Self | Execute$ TrigFaceUp | TriggerDescription$ When CARDNAME dies, turn the exiled card face up. If it's a creature card, put it onto the battlefield under your control. SVar:TrigFaceUp:DB$ SetState | Defined$ Imprinted | SubAbility$ DBChangeZone | Mode$ TurnFace SVar:DBChangeZone:DB$ ChangeZone | Defined$ Imprinted | Origin$ Exile | Destination$ Battlefield | ConditionDefined$ Imprinted | ConditionPresent$ Creature | GainControl$ True | SubAbility$ DBCleanup diff --git a/forge-gui/res/cardsfolder/upcoming/the_dragon_kami_reborn_dragon_kamis_egg.txt b/forge-gui/res/cardsfolder/upcoming/the_dragon_kami_reborn_dragon_kamis_egg.txt index 9a9ae82c1e3..d26052f5ae0 100644 --- a/forge-gui/res/cardsfolder/upcoming/the_dragon_kami_reborn_dragon_kamis_egg.txt +++ b/forge-gui/res/cardsfolder/upcoming/the_dragon_kami_reborn_dragon_kamis_egg.txt @@ -3,7 +3,7 @@ ManaCost:2 G Types:Enchantment Saga K:Saga:3:DBHatching,DBHatching,DBTransform SVar:DBHatching:DB$ GainLife | Defined$ You | LifeAmount$ 2 | SubAbility$ DBDig | SpellDescription$ You gain 2 life. Look at the top three cards of your library. Exile one of them face down with a hatching counter on it, then put the rest on the bottom of your library in any order. -SVar:DBDig:DB$ Dig | DigNum$ 3 | ChangeNum$ 1 | DestinationZone$ Exile | ExileWithCounter$ HATCHING | ExileFaceDown$ True +SVar:DBDig:DB$ Dig | DigNum$ 3 | ChangeNum$ 1 | DestinationZone$ Exile | ExileWithCounter$ HATCHING | ExileFaceDown$ True | WithMayLook$ True SVar:DBTransform:DB$ ChangeZone | Origin$ Battlefield | Destination$ Exile | RememberChanged$ True | SubAbility$ DBReturn | SpellDescription$ Exile this Saga, then return it to the battlefield transformed under your control. SVar:DBReturn:DB$ ChangeZone | Defined$ Remembered | Origin$ Exile | Destination$ Battlefield | Transformed$ True | GainControl$ True | SubAbility$ DBCleanup SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True