diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b0e7b48c..e2d0563ca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,10 +2,12 @@ ## [master] (https://github.com/WagicProject/wagic/tree/master) -### 21/09/21 -- *Committed:* Added/fixed primitives, replaced all occurrences of "AEther" with "Aether" in each ".txt" and ".dat" file according to the new naming convention (pull request #1072 by @remigiusz-suwalski). ([Vitty85](https://github.com/Vitty85)) +### 22/09/21 +- *Committed:* Fixed primitives, improved "@discarded", "@counteradded" and "@counterremoved" triggers in order to user "all(trigger)" target. ([Vitty85](https://github.com/Vitty85)) -### 20/09/21 +- *Committed:* Added/fixed primitives, replaced all occurrences of "AEther" with "Aether" in each ".txt" and ".dat" file according to the new naming convention (pull request #1072 by @remigiusz-suwalski). https://github.com/WagicProject/wagic/commit/6be219f5864226acabf58c76a874b74474f6fb04 ([Vitty85](https://github.com/Vitty85)) + +### 21/09/21 - *Committed:* Fixed primitives, fixed STA set, fixed a bug in new background images management. https://github.com/WagicProject/wagic/commit/e2ac10be9589ce69c67c7c1c1aec21f38e570278 ([Vitty85](https://github.com/Vitty85)) ### 20/09/21 diff --git a/projects/mtg/bin/Res/sets/primitives/borderline.txt b/projects/mtg/bin/Res/sets/primitives/borderline.txt index 44c508813..febb052bb 100644 --- a/projects/mtg/bin/Res/sets/primitives/borderline.txt +++ b/projects/mtg/bin/Res/sets/primitives/borderline.txt @@ -6450,7 +6450,7 @@ toughness=2 [card] name=Blightbeetle abilities=protection from green -auto=@counteradded(1/1) from(creature|opponentbattlefield):name(Opponent creatures can't have 1/1 counter) target(creature[counter{1/1}]|opponentbattlefield) counter(1/1,-1) +auto=@counteradded(1/1) from(creature|opponentbattlefield):name(Opponent creatures can't have 1/1 counter) all(trigger[from]) name(Opponent creatures can't have 1/1 counter) counter(1/1,-1) notrg text=Protection from green (This creature can't be blocked, targeted, dealt damage, enchanted, or equipped by anything green.) -- Creatures your opponents control can't have +1/+1 counters put on them. mana={1}{B} type=Creature @@ -21463,7 +21463,6 @@ type=Sorcery [/card] [card] name=Essence Symbiote -abilities=iscommander auto=@mutated(creature|mybattlefield):all(trigger[to]) counter(1/1) auto=@mutated(creature|mybattlefield):life:2 controller text=Whenever a creature you control mutates, put a +1/+1 counter on that creature and you gain 2 life. diff --git a/projects/mtg/include/WEvent.h b/projects/mtg/include/WEvent.h index 332a980be..a530d826c 100644 --- a/projects/mtg/include/WEvent.h +++ b/projects/mtg/include/WEvent.h @@ -66,7 +66,7 @@ struct WEventCounters : public WEvent { MTGCardInstance * source; WEventCounters(Counters *counter,string name,int power, int toughness,bool added = false, bool removed = false, MTGCardInstance * source = NULL); using WEvent::getTarget; - virtual Targetable * getTarget(); + virtual Targetable * getTarget(int target); }; struct WEventLife : public WEvent { diff --git a/projects/mtg/src/MTGAbility.cpp b/projects/mtg/src/MTGAbility.cpp index 9cb7cbed3..974b4d475 100644 --- a/projects/mtg/src/MTGAbility.cpp +++ b/projects/mtg/src/MTGAbility.cpp @@ -6935,17 +6935,24 @@ int TriggeredAbility::receiveEvent(WEvent * e) { if(dynamic_cast(e)) { - //@targetted trigger as per mtg rules is a state based trigger - //that resolves instantly before the event that targetted it. + //@targetted trigger as per mtg rules is a state based trigger + //that resolves instantly before the event that targetted it. resolve(); return 1; } if(dynamic_cast(e)) { - //sacrificed event - //thraximundar vs bloodfore collosus, thraximundar - //must be able to survive a sacrificed bloodfire collosus, - //same with mortician beetle vs phyrexian denouncer test + //sacrificed event + //thraximundar vs bloodfore collosus, thraximundar + //must be able to survive a sacrificed bloodfire collosus, + //same with mortician beetle vs phyrexian denouncer test + resolve(); + return 1; + } + if(dynamic_cast(e)) + { + //discard event must resolve instantly or by the time they do the cards that triggered them + //have already been put in graveyard. resolve(); return 1; } diff --git a/projects/mtg/src/WEvent.cpp b/projects/mtg/src/WEvent.cpp index fcef56d12..c74d66f79 100644 --- a/projects/mtg/src/WEvent.cpp +++ b/projects/mtg/src/WEvent.cpp @@ -379,7 +379,7 @@ Targetable * WEventLife::getTarget(int target) return NULL; } -Targetable * WEventCounters::getTarget() +Targetable * WEventCounters::getTarget(int target) { return targetCard; }