Saint wrote:Yep your right but there isen't an @untapped function, if there was it would make it alot easier, the @each is incorrect your right about that but -tapped is pretty much all you can do right now and would do the trick it just has to trigger at any moment and in any phase. You should make it check for tapped for first then throw in a aslongas(...-tapped) in it and it should work. If there was a untapped command it would easially work the way you just put it though.... what we could do is make it a whole bookwork of code and @each phase check it so it checks for the going from tapped to untapped in each phase of the game.
That's pretty much all I can come up with (@untapped will open up more then one door for coding cards in general though).
If we're doing a check on -tap every phase depletion/+1/+1 will occur at every beginning of phase as long as a card is tapped. As long as is also a check for a state. It doesn't check for a transition. It is not a trigger.
The below portion in the svn seems to be the portion that controls the checking for being from being untapped to becoming tapped. But I can't quite figure out how to link this to @tapped yet. It shouldn't be very difficult to code in an @untapped trigger as we only need to reverse the sequence of something that already has a code.
int triggerOnEvent(WEvent * event){
WEventCardTap * e = dynamic_cast<WEventCardTap *>(event);
if (!e) return 0;
if (e->before == e->after) return 0;
if (e->after != tap) return 0;
if (!tc->canTarget(e->card)) return 0;
return 1;
}