89 so...my dad warned me about the fact that eval() is very slow and thus unless there is a nice function in php like lua's loadString() (together with some nice multi-thread shenanigans ) I really fear the calculations of turns will take too long. I mean look at this:
that are an awful lot of steps, especially considering a player can have up to 8 local effects and there can be 4 global effects active. Thus worst case scenario there are 20 effects triggering that aren't even from the card itself and each of those need to use eval()
so....yea.....I will do it like this for now but I fear I need to switch tactics sooner rather then later
turn order
The game decides which card goes first
the played card triggers onFirst
battlefield effects trigger onFirst
the played card triggers onCast
battlefield effects trigger onCast
Card does damage/creates effect/heals
The other card gets played
played card triggers onLast
battlefield effects trigger onLast
played card triggers onCast
battlefield effects trigger onCast
Card does damage/creates effect/heals
Cards in each players hand triggers onHold
Battlefield effects trigger onEndTurn
Players discard the chosen cards
Players gain the new cards
battle field effects trigger order
effects owned by the caster
global effects
effects owned by the opponent
The game decides which card goes first
the played card triggers onFirst
battlefield effects trigger onFirst
the played card triggers onCast
battlefield effects trigger onCast
Card does damage/creates effect/heals
The other card gets played
played card triggers onLast
battlefield effects trigger onLast
played card triggers onCast
battlefield effects trigger onCast
Card does damage/creates effect/heals
Cards in each players hand triggers onHold
Battlefield effects trigger onEndTurn
Players discard the chosen cards
Players gain the new cards
battle field effects trigger order
effects owned by the caster
global effects
effects owned by the opponent
that are an awful lot of steps, especially considering a player can have up to 8 local effects and there can be 4 global effects active. Thus worst case scenario there are 20 effects triggering that aren't even from the card itself and each of those need to use eval()
so....yea.....I will do it like this for now but I fear I need to switch tactics sooner rather then later