I am making some modifications to adapt the source code for Wagic to play pokemon tcg.
Have already created three abilities:
Pokeharm: (source takes damage in the form of counters 0/-10) ability equal to wither
Weakness (subtype, value): (source takes double damage or a damage value)
Resist (subtype, value): (source prevents a damage value)
But I have some doubts:
How do I implement the ability Must Block? In this game only one creature can attack and defend each turn
How do I implement a rule to check for an active creature in the game? I would like to create the rules for the game checks each turn
and it was stored in a variable. With this I create an activation cost that depends on what the creature is active.
Something like {A} {U}: 10 / 0
or
target (creature [-Active] | opponentBattlefield):
I create a dirty way to do this, but I want to improve it and code on source to create a hability
Rules.txt
Code: Select all
[INIT]
mode=mtg
[PLAYERS]
life:6
auto=shuffle
auto=draw:7
auto=@each my draw:draw:1
auto=lord(creature) pokeharm
auto=lord(creature) vigilance
#Can be just one active pokemon on Battlefield
auto=@each my combatbegins:aslongas(creature|myBattlefield) token(-1r)
auto=lord(creature[-counter{0/0.1.Active}]) cantattack
auto=lord(creature[-counter{0/0.1.Active}]) cantblock
#Only 6 creatures in play
auto=aslongas(creature|myBattlefield)) >5 maxCast(creature)0
#Attach only one energy card per turn
auto=maxCast(Energy)1
The Rule card
Code: Select all
[card]
name=Active Pokewon
auto=aslongas(creature[counter{0/0.1.Active}]|myBattlefield):moveto(stack)
auto=@movedto(this|exile):counter(0/0,1,Active) target(creature|myBattlefield)
auto=moveto(exile)
type=Nothing
id=-1r
[/card]
I know you guys are extremely busy finalizing the version 15.
But give me a direction on how to accomplish these changes.
Thanks