Cardshifter / cardshifter.github.io

Cardshifter Website
Other
7 stars 0 forks source link

"change" & "set" on spells #53

Closed Phrancis closed 9 years ago

Phrancis commented 9 years ago

At the current time, it is not possible AFAIK to use change or set as part of a spell. The problem appears to be related to targets. I tried both of the following syntaxes, both are throwing a server-side error of this type:

groovy.lang.MissingMethodException: No signature of method: mythos.common.afterPlay() is applicable for argument types: (mythos.common$_run_closure12$_closure25) values: [mythos.common$_run_closure12$_closure25@d9e9663]

Syntaxes tried:

spell {
    targets 1 {
        creature true
        ownedBy "opponent"
        zone "Battlefield"
    }
}
afterPlay {
    set HEALTH to 0 to { targets() }
}

Or:

spell {
    targets 1 {
        creature true
        ownedBy "opponent"
        zone "Battlefield"
    }
}
afterPlay {
    set HEALTH to 0 to targets
}
Phrancis commented 9 years ago

Posted on wrong repo, see this instead: https://github.com/Cardshifter/Cardshifter/blob/mods/Documentation/2-%20Card%20Library%20-%20Effects.md