diff --git a/forge-game/src/main/java/forge/game/player/Player.java b/forge-game/src/main/java/forge/game/player/Player.java index 2b385150452..71c66f2e0d2 100644 --- a/forge-game/src/main/java/forge/game/player/Player.java +++ b/forge-game/src/main/java/forge/game/player/Player.java @@ -1884,6 +1884,9 @@ public class Player extends GameEntity implements Comparable { public final List getAttackedPlayersMyLastTurn() { return attackedPlayersLastTurn; } + public final Iterable getAttackedPlayersTheirCurrentTurn() { + return Iterables.filter(attackedThisTurn.keySet(), Player.class); + } public final void clearAttackedMyTurn() { attackedThisTurn.clear(); } diff --git a/forge-game/src/main/java/forge/game/player/PlayerProperty.java b/forge-game/src/main/java/forge/game/player/PlayerProperty.java index 63911512d4b..4ad9a56bd51 100644 --- a/forge-game/src/main/java/forge/game/player/PlayerProperty.java +++ b/forge-game/src/main/java/forge/game/player/PlayerProperty.java @@ -411,6 +411,10 @@ public class PlayerProperty { if (!player.getAttackedPlayersMyLastTurn().contains(sourceController)) { return false; } + } else if (property.equals("attackedYouTheirCurrentTurn")) { + if (!player.getAttackedPlayersTheirCurrentTurn().contains(sourceController)) { + return false; + } } else if (property.equals("BeenAttackedThisCombat")) { for (Player p : game.getRegisteredPlayers()) { if (p.getAttackedPlayersMyCombat().contains(sourceController)) { diff --git a/forge-gui/res/cardsfolder/upcoming/barrow_blade.txt b/forge-gui/res/cardsfolder/upcoming/barrow_blade.txt index 65ba58311f0..a52f4a1b6c4 100644 --- a/forge-gui/res/cardsfolder/upcoming/barrow_blade.txt +++ b/forge-gui/res/cardsfolder/upcoming/barrow_blade.txt @@ -3,7 +3,7 @@ ManaCost:1 Types:Legendary Artifact Equipment K:Equip:1 S:Mode$ Continuous | Affected$ Creature.EquippedBy | AddPower$ 1 | AddToughness$ 1 | Description$ Equipped creature gets +1/+1. -T:Mode$ Blocks | ValidCard$ Card.EquippedBy | ValidBlocked$ Creature | Execute$ TrigAnimate | TriggerDescription$ Whenever equipped creature blocks or becomes blocked by a creature, that creature loses all abilities until end of turn. +T:Mode$ AttackerBlockedByCreature | ValidCard$ Card.EquippedBy | ValidBlocked$ Creature | Execute$ TrigAnimate | TriggerDescription$ Whenever equipped creature blocks or becomes blocked by a creature, that creature loses all abilities until end of turn. T:Mode$ AttackerBlockedByCreature | ValidCard$ Card.EquippedBy | ValidBlocker$ Creature | Execute$ TrigAnimate | Secondary$ True | TriggerDescription$ Whenever equipped creature blocks or becomes blocked by a creature, that creature loses all abilities until end of turn. SVar:TrigAnimate:DB$ Animate | Defined$ TriggeredBlockerLKICopy | RemoveAllAbilities$ True Oracle:Equipped creature gets +1/+1.\nWhenever equipped creature blocks or becomes blocked by a creature, that creature loses all abilities until end of turn.\nEquip {1} ({1}: Attach to target creature you control. Equip only as a sorcery.) \ No newline at end of file diff --git a/forge-gui/res/cardsfolder/upcoming/bill_ferny_bree_swindler.txt b/forge-gui/res/cardsfolder/upcoming/bill_ferny_bree_swindler.txt index 74f1b020504..d61be7d727b 100644 --- a/forge-gui/res/cardsfolder/upcoming/bill_ferny_bree_swindler.txt +++ b/forge-gui/res/cardsfolder/upcoming/bill_ferny_bree_swindler.txt @@ -2,13 +2,13 @@ Name:Bill Ferny, Bree Swindler ManaCost:1 U Types:Legendary Creature Human Rogue PT:2/1 -T:Mode$ AttackerBlockedByCreature | ValidCard$ Card.Self | Execute$ TrigCharm | TriggerDescription$ Whenever CARDNAME becomes blocked, ABILITY +T:Mode$ AttackerBlocked | ValidCard$ Card.Self | Execute$ TrigCharm | TriggerDescription$ Whenever CARDNAME becomes blocked, ABILITY SVar:TrigCharm:DB$ Charm | Choices$ DBTreasure,DBChoose SVar:DBTreasure:DB$ Token | TokenScript$ c_a_treasure_sac | SpellDescription$ Create a Treasure token. (It's an artifact with "{T}, Sacrifice this artifact: Add one mana of any color.") SVar:DBChoose:DB$ ChoosePlayer | Defined$ You | ValidTgts$ Opponent | ChoiceTitle$ Choose an opponent to give control to: | AILogic$ Curse | SubAbility$ DBHorseDonate | SpellDescription$ Target opponent gains control of target Horse you control. If they do, remove NICKNAME from combat and create three Treasure tokens. -SVar:DBHorseDonate:DB$ GainControl | ValidTgts$ Horse.YouCtrl | NewController$ TargetedPlayer | TgtPrompt$ Select target horse you control | SubAbility$ RemCombat -SVar:RemCombat:DB$ RemoveFromCombat | Defined$ Self | SubAbility$ DBTreasureTree -SVar:DBTreasureTree:DB$ Token | TokenScript$ c_a_treasure_sac | TokenAmount$ 3 | ConditionDefined$ Targeted | ConditionPresent$ Card | SubAbility$ DBCleanup +SVar:DBHorseDonate:DB$ GainControl | ValidTgts$ Horse.YouCtrl | NewController$ TargetedPlayer | TgtPrompt$ Select target horse you control | RememberControlled$ True | SubAbility$ RemCombat +SVar:RemCombat:DB$ RemoveFromCombat | Defined$ Self | ConditionDefined$ Remembered | ConditionPresent$ Card | SubAbility$ DBTreasureTree +SVar:DBTreasureTree:DB$ Token | TokenScript$ c_a_treasure_sac | TokenAmount$ 3 | ConditionDefined$ Remembered | ConditionPresent$ Card | SubAbility$ DBCleanup SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True DeckHas:Ability$Token|Sacrifice & Type$Treasure DeckHints:Type$Horse diff --git a/forge-gui/res/cardsfolder/upcoming/doors_of_durin.txt b/forge-gui/res/cardsfolder/upcoming/doors_of_durin.txt index fc7e9a85116..c5d44233311 100644 --- a/forge-gui/res/cardsfolder/upcoming/doors_of_durin.txt +++ b/forge-gui/res/cardsfolder/upcoming/doors_of_durin.txt @@ -1,10 +1,11 @@ -Name:Horn of Gondor -ManaCost:3 +Name:Doors of Durin +ManaCost:3 R G Types:Legendary Artifact -T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Any | Destination$ Battlefield | Execute$ TrigToken | TriggerDescription$ When CARDNAME enters the battlefield, create a 1/1 white Human Soldier creature token. -SVar:TrigToken:DB$ Token | TokenAmount$ 1 | TokenScript$ w_1_1_human_soldier | TokenOwner$ You -A:AB$ Token | Cost$ 3 T | TokenAmount$ X | TokenScript$ w_1_1_human_soldier | TokenOwner$ You | SpellDescription$ Create X 1/1 white Human Soldier creature tokens, where X is the number of Humans you control. -SVar:X:Count$Valid Creature.Human+YouCtrl -DeckHas:Ability$Token & Type$Soldier|Human -DeckHints:Type$Human -Oracle:When Horn of Gondor enters the battlefield, create a 1/1 white Human Soldier creature token.\n{3}, {T}: Create X 1/1 white Human Soldier creature tokens, where X is the number of Humans you control. \ No newline at end of file +T:Mode$ AttackersDeclared | AttackingPlayer$ You | Execute$ TrigScry | TriggerZones$ Battlefield | TriggerDescription$ Whenever you attack, scry 2, then you may reveal the top card of your library. If it's a creature card, put it onto the battlefield tapped and attacking. Until your next turn, it gains trample if you control a Dwarf and hexproof if you control an Elf. +SVar:TrigScry:DB$ Scry | ScryNum$ 2 | SubAbility$ DBDig +SVar:DBDig:DB$ Dig | DigNum$ 1 | ChangeNum$ All | Optional$ True | Reveal$ True | ChangeValid$ Creature | DestinationZone$ Battlefield | Tapped$ True | Attacking$ True | RememberChanged$ True | SubAbility$ DBPumpTrample +SVar:DBPumpTrample:DB$ Pump | Defined$ Remembered | KW$ Trample | Duration$ UntilYourNextTurn | ConditionPresent$ Dwarf.YouCtrl | SubAbility$ DBPumpHexproof +SVar:DBPumpHexproof:DB$ Pump | Defined$ Remembered | KW$ Hexproof | Duration$ UntilYourNextTurn | ConditionPresent$ Elf.YouCtrl | SubAbility$ DBCleanup +SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True +DeckHints:Type$Dwarf|Elf +Oracle:Whenever you attack, scry 2, then you may reveal the top card of your library. If it's a creature card, put it onto the battlefield tapped and attacking. Until your next turn, it gains trample if you control a Dwarf and hexproof if you control an Elf. diff --git a/forge-gui/res/cardsfolder/upcoming/faramir_prince_of_ithilien.txt b/forge-gui/res/cardsfolder/upcoming/faramir_prince_of_ithilien.txt index f673d814324..1b302a1ed91 100644 --- a/forge-gui/res/cardsfolder/upcoming/faramir_prince_of_ithilien.txt +++ b/forge-gui/res/cardsfolder/upcoming/faramir_prince_of_ithilien.txt @@ -2,13 +2,14 @@ Name:Faramir, Prince of Ithilien ManaCost:2 W U Types:Legendary Creature Human Noble PT:3/3 -T:Mode$ Phase | Phase$ End of Turn | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigPump | TriggerDescription$ At the beginning of your end step, choose an opponent. At the beginning of that player's next end step, you draw a card if they didn't attack you that turn. Otherwise, create three 1/1 white Human Soldier creature tokens. -SVar:TrigPump:DB$ Pump | ValidTgts$ Opponent | TgtPrompt$ Select target opponent | RememberTargets$ True | SubAbility$ DBDelayTrig +T:Mode$ Phase | Phase$ End of Turn | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigChooseOpp | TriggerDescription$ At the beginning of your end step, choose an opponent. At the beginning of that player's next end step, you draw a card if they didn't attack you that turn. Otherwise, create three 1/1 white Human Soldier creature tokens. +SVar:TrigChooseOpp:DB$ ChoosePlayer | Defined$ You | Choices$ Player.Opponent | RememberChosen$ True | SubAbility$ DBDelayTrig SVar:DBDelayTrig:DB$ DelayedTrigger | Mode$ Phase | Phase$ End of Turn | ValidPlayer$ Player.IsTriggerRemembered | RememberObjects$ Remembered | Execute$ TrigBranch | TriggerDescription$ At the beginning of that player's next end step, you draw a card if they didn't attack you that turn. Otherwise, create three 1/1 white Human Soldier creature tokens. -SVar:TrigBranch:DB$ Branch | BranchConditionSVar$ X | BranchConditionSVarCompare$ GE1 | TrueSubAbility$ DBDraw | FalseSubAbility$ DBToken +SVar:TrigBranch:DB$ Branch | BranchConditionSVar$ X | BranchConditionSVarCompare$ GE1 | TrueSubAbility$ DBToken | FalseSubAbility$ DBDraw | SubAbility$ DBCleanup SVar:DBDraw:DB$ Draw SVar:DBToken:DB$ Token | TokenScript$ w_1_1_human_soldier | TokenAmount$ 3 -SVar:X:RememberedPlayer$HasPropertyattackedYouTheirLastTurn +SVar:DBCleanup:DB$ Cleanup | ClearChosenPlayer$ True +SVar:X:TriggeredPlayer$HasPropertyattackedYouTheirCurrentTurn AI:RemoveDeck:All DeckHas:Ability$Token & Type$Soldier Oracle:At the beginning of your end step, choose an opponent.\n At the beginning of that player's next end step, you draw a card if they didn't attack you that turn. Otherwise, create three 1/1 white Human Soldier creature tokens. \ No newline at end of file diff --git a/forge-gui/res/cardsfolder/upcoming/forge_anew.txt b/forge-gui/res/cardsfolder/upcoming/forge_anew.txt index 2a5a2ae7d61..916b73bcc21 100644 --- a/forge-gui/res/cardsfolder/upcoming/forge_anew.txt +++ b/forge-gui/res/cardsfolder/upcoming/forge_anew.txt @@ -4,7 +4,7 @@ Types:Enchantment T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigChangeZone | TriggerDescription$ When CARDNAME enters the battlefield, return target Equipment card from your graveyard to the battlefield. SVar:TrigChangeZone:DB$ ChangeZone | Origin$ Graveyard | Destination$ Battlefield | ValidTgts$ Card.Equipment+YouCtrl S:Mode$ CastWithFlash | ValidSA$ Activated.Equip | Caster$ You | Condition$ PlayerTurn | Description$ As long as it's your turn, you may activate equip abilities any time you could cast an instant. -S:Mode$ Continuous | Affected$ You | AddKeyword$ You may pay 0 rather than pay equip costs. | CheckSVar$ X | SVarCompare$ LT1 | Description$ You may pay {0} rather than pay the equip cost of the first equip ability you activate during each of your turns. +S:Mode$ Continuous | Affected$ You | AddKeyword$ You may pay 0 rather than pay equip costs. | CheckSVar$ X | SVarCompare$ LT1 | Condition$ PlayerTurn | Description$ You may pay {0} rather than pay the equip cost of the first equip ability you activate during each of your turns. SVar:X:Count$YouEquippedThisTurn DeckHas:Ability$Graveyard DeckNeeds:Type$Equipment diff --git a/forge-gui/res/cardsfolder/upcoming/goblin_fireleaper.txt b/forge-gui/res/cardsfolder/upcoming/goblin_fireleaper.txt index 60c43c0b8ec..0a4fa885ef7 100644 --- a/forge-gui/res/cardsfolder/upcoming/goblin_fireleaper.txt +++ b/forge-gui/res/cardsfolder/upcoming/goblin_fireleaper.txt @@ -5,4 +5,5 @@ PT:1/1 A:AB$ Pump | Cost$ 1 R | NumAtt$ +1 | SpellDescription$ CARDNAME gets +1/+0 until end of turn. T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Card.Self | Execute$ TrigDamage | TriggerDescription$ When CARDNAME dies, it deals damage equal to its power to target creature an opponent controls. SVar:TrigDamage:DB$ DealDamage | ValidTgts$ Creature.OppCtrl | TgtPrompt$ Select target creature an opponent controls | NumDmg$ X +SVar:X:Count$CardPower Oracle:{1}{R}: Goblin Fireleaper gets +1/+0 until end of turn.\nWhen Goblin Fireleaper dies, it deals damage equal to its power to target creature an opponent controls. \ No newline at end of file diff --git a/forge-gui/res/cardsfolder/upcoming/horn_of_gondor.txt b/forge-gui/res/cardsfolder/upcoming/horn_of_gondor.txt index c5d44233311..fc7e9a85116 100644 --- a/forge-gui/res/cardsfolder/upcoming/horn_of_gondor.txt +++ b/forge-gui/res/cardsfolder/upcoming/horn_of_gondor.txt @@ -1,11 +1,10 @@ -Name:Doors of Durin -ManaCost:3 R G +Name:Horn of Gondor +ManaCost:3 Types:Legendary Artifact -T:Mode$ AttackersDeclared | AttackingPlayer$ You | Execute$ TrigScry | TriggerZones$ Battlefield | TriggerDescription$ Whenever you attack, scry 2, then you may reveal the top card of your library. If it's a creature card, put it onto the battlefield tapped and attacking. Until your next turn, it gains trample if you control a Dwarf and hexproof if you control an Elf. -SVar:TrigScry:DB$ Scry | ScryNum$ 2 | SubAbility$ DBDig -SVar:DBDig:DB$ Dig | DigNum$ 1 | ChangeNum$ All | Optional$ True | Reveal$ True | ChangeValid$ Creature | DestinationZone$ Battlefield | Tapped$ True | Attacking$ True | RememberChanged$ True | SubAbility$ DBPumpTrample -SVar:DBPumpTrample:DB$ Pump | Defined$ Remembered | KW$ Trample | Duration$ UntilYourNextTurn | ConditionPresent$ Dwarf.YouCtrl | SubAbility$ DBPumpHexproof -SVar:DBPumpHexproof:DB$ Pump | Defined$ Remembered | KW$ Hexproof | Duration$ UntilYourNextTurn | ConditionPresent$ Elf.YouCtrl | SubAbility$ DBCleanup -SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True -DeckHints:Type$Dwarf|Elf -Oracle:Whenever you attack, scry 2, then you may reveal the top card of your library. If it's a creature card, put it onto the battlefield tapped and attacking. Until your next turn, it gains trample if you control a Dwarf and hexproof if you control an Elf. +T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Any | Destination$ Battlefield | Execute$ TrigToken | TriggerDescription$ When CARDNAME enters the battlefield, create a 1/1 white Human Soldier creature token. +SVar:TrigToken:DB$ Token | TokenAmount$ 1 | TokenScript$ w_1_1_human_soldier | TokenOwner$ You +A:AB$ Token | Cost$ 3 T | TokenAmount$ X | TokenScript$ w_1_1_human_soldier | TokenOwner$ You | SpellDescription$ Create X 1/1 white Human Soldier creature tokens, where X is the number of Humans you control. +SVar:X:Count$Valid Creature.Human+YouCtrl +DeckHas:Ability$Token & Type$Soldier|Human +DeckHints:Type$Human +Oracle:When Horn of Gondor enters the battlefield, create a 1/1 white Human Soldier creature token.\n{3}, {T}: Create X 1/1 white Human Soldier creature tokens, where X is the number of Humans you control. \ No newline at end of file