Fixed primitives, improved "@discarded", "@counteradded" and "@counterremoved" triggers in order to user "all(trigger)" target.

This commit is contained in:
Vittorio Alfieri
2021-09-22 18:56:43 +02:00
parent 6be219f586
commit cd677111b7
5 changed files with 21 additions and 13 deletions

View File

@@ -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

View File

@@ -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.

View File

@@ -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 {

View File

@@ -6935,17 +6935,24 @@ int TriggeredAbility::receiveEvent(WEvent * e)
{
if(dynamic_cast<WEventTarget*>(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<WEventCardSacrifice*>(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<WEventCardDiscard*>(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;
}

View File

@@ -379,7 +379,7 @@ Targetable * WEventLife::getTarget(int target)
return NULL;
}
Targetable * WEventCounters::getTarget()
Targetable * WEventCounters::getTarget(int target)
{
return targetCard;
}