Ifnotenergyandifspellnotcastdo

From Magic Universe's WIki
Revision as of 10:50, 10 April 2014 by Admin (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

this is python code used to illustrate a specific example from Code:Halloween1.

For this code to work, the types wizard, member, and energy must already be defined and there must already be a function resign that has an optional mandatory attribute and a required member attribute and a function isspellcast which takes a spell and the wizard who cast it, returning true or false).


halspell="Vile Moon Tune"
if wizard == member:
    if member not energy:
        if isspellcast(halspell, member):
            resign(member, mandatory=true)