Hi,
Thanks a lot for all the input. Unfortunately I'm not able to help with LEX/YACC (I've quickly given a look at it and it is not for programmer dummy like me).
I totally agree on the addition for 10E, I already added a lot that I was able to hardcode in the source (you have to try Dreamborn Muse this card is soo much fun to play with… I will prepare a “depletion” deck for the AI for the next release with glimpse the unthinkable and co…). But let’s get back to the brainstorming stuff…
TriggerHow to let the game make the difference between a "when" function that most of the time only target the card, or a whenever function that is targeting all kind of cards meeting the target description ?
Some Example from 10E
Bogardan Firefiend--->When Bogardan Firefiend is put into a graveyard from play, it deals 2 damage to target creature.
@added(graveyard):damage:2 target(creature)
Aven Cloudchaser--> Flying, When Aven Cloudchaser comes into play, destroy target enchantment.
@added(inplay):destroy target(enchantment)
Soul Warden---> Whenever another creature comes into play, you gain 1 life.
@added(creature|inplay):life:1
Maybe one solution would be to add an @each function.
So it would give
Soul Warden---> Whenever another creature comes into play, you gain 1 life.
@each added(creature|inplay):life:1
In fact at the moment, the @ is only for phase of the game. We would need to define the different "trigger" and then to code a trigger for each individual event, that could be
-when put in play
-when put in graveyard
-when damaged
-when blocked or blocking
-when attacking
-when tapped
For the when put in play, instead of “added” which will not be entirely correct (e.g. some cards will state when comes into play from your hand…) I was thinking of a movetofrom kind of keywords
Example from 10E
Megrim--> Whenever an opponent discards a card, Megrim deals 2 damage to that player.
@each movetofrom(opponentGraveyard,OpponentHand):damage:2 controller
Underworld Dreams--> Whenever an opponent draws a card, Underworld Dreams deals 1 damage to him or her.
@each movetofrom(opponentLibrary,oponnentHand):damage:1 controller
Festering Goblin - When Festering Goblin is put into a graveyard from play, target creature gets -1/-1 until end of turn.
@movetofrom(graveyard,inplay):-1/-1 target(creature)
Bogardan Firefiend--->When Bogardan Firefiend is put into a graveyard from play, it deals 2 damage to target creature.
@movetofrom(graveyard,inplay):damage:2 target(creature)
Aven Cloudchaser--> Flying, When Aven Cloudchaser comes into play, destroy target enchantment.
@movetofrom(inplay,*):destroy target(enchantment)
Chromatic Star - {1}, {T}, Sacrifice Chromatic Star: Add one mana of any color to your mana pool. When Chromatic Star is put into a graveyard from play, draw a card.
auto={1}{T}{S}:add {Z}
auto=@movetofrom(graveyard,inplay):draw:1 (this one would probably make the game crash anyway

)
Denizen of the Deep - When Denizen of the Deep comes into play, return each other creature you control to its owner's hand.
Auto=@movetofrom(inplay,*):moveto (ownerhand) all (creature|myinplay)
Also for the other one I don’t know what kind of keywords we could use, but we could do something as simple as “tapped”, “attacking”..etc..etc..
Example from 10E
Overgrowth -->Enchant land-->Whenever enchanted land is tapped for mana, its controller adds {G}{G} to his or her mana pool (in addition to the mana the land produces).
@tapped:add {G}{G}
Manabarbs-->Whenever a player taps a land for mana, Manabarbs deals 1 damage to that player.
@each tapped(land|inplay):damage 1 controller
Regarding the cards that have a function at each phase, instead of using the same keywords (I suppose it would be more complicated to code) we could use an @all “phase” e.g. @all upkeep:draw:1.
Example from 10E
Verdant Force - At the beginning of each upkeep, put a 1/1 green Saproling creature token into play under your control.
auto=@all upkeep:token(creature, saproling,1/1,green)
foreachAlso I’ve looked at this one, and spent quite some time trying to figure how it works, and also try in a first step to code a kind of damage foreach function, without success. This one is too complex for me. It would require the genius of wololo, because at the moment foreach is coded as a lord parser type, and also the foreach thing is not a target ability… nevertheless as everybody agree we could add the following:
Foreach(X):damage:Y target(Z)
Foreach(X):discard:Y target(Z)
Foreach(X):life:Y
Foreach(X):draw:Y
Example from 10E
Stronghold Discipline - Each player loses 1 life for each creature he or she controls.
auto=foreach(creature|myinplay):life:-1
auto=foreach(creature|opponentinplay):damage:1
Sudden Impact - Sudden Impact deals damage equal to the number of cards in target player's
auto=foreach(*|opponenthand):damage:1 (not 100% correct but who will target himself?)
damage to power/toughness/XI will look at this one… I also think it is doable…would be on my personal Totry for the next release…
countersI was also thinking of adding a kind of “counter” keywords, but my first thought was that it will not be able to really “understand” it is a counter and just add or remove permanently +x/+x, anyway some cards hardcoded are using counter so it this one is on my tolookat list.
DoesntuntapLeungj also mentioned to me the “doesn’t untap” one… which is brass man or basalt monolith, I’ve try also to look at this one, without success… gatherer has 116 cards with lookalike “doesn’t untap” text (although maybe only 30% could be added with this keyword).. anyway it could also be added.
Example from 10E
Dehydration - Enchant creature (Target a creature as you play this. This card comes into play attached to that creature.) Enchanted creature doesn't untap during its controller's untap step.
Target=creature
auto=doesntuntap
Colossus of Sardia - Trample Colossus of Sardia doesn't untap during your untap step. {9}: Untap Colossus of Sardia. Play this ability only during your upkeep.
auto=doesntuntap
auto={9}:untap
Well this last example could be harcoded too, but it would be nice to have it in the parser.
OthersI’ve also noticed that the moveto all function only work with “inplay” at the moment, making it work with all zone will definitely add some cards.
Also adding a “all” to tap and untap (and also target) could add some cards (untap all has 98 occurrence in gatherer, tap all has 169).
Example from 10E
Deluge - Tap all creatures without flying.
auto=tap all(creature[-flying])
Also last but not least, as we already discussed somewhere with wololo, the cantbeblockedby(X) and cantblock(X)… so I’ve also look at this one, without success at this stage but I did not abandon all hope at the moment…:D
Example from 10E
Elven Riders - Elven Riders can't be blocked except by Walls and/or creatures with flying.
auto=cantbeblockedby(creature[-walls;-flying])
Juggernaut - Juggernaut attacks each turn if able. Juggernaut can't be blocked by Walls.
auto=cantbeblockedby(walls)
auto=mustattack
Also thank for the addition of the search function (huge, great, etc…), equipment would also be great… (gatherer has 85 equipments)
well, enough for today’s thinking, thanks to everybody..
Grü
Abra.