本文整理汇总了Python中magic.spell.Spell类的典型用法代码示例。如果您正苦于以下问题:Python Spell类的具体用法?Python Spell怎么用?Python Spell使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Spell类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
def __init__(self):
Spell.__init__(self, 0)
self.skill = NECROMANCY
self.damageskill = SPIRITSPEAK
self.mana = 0
self.reagents = {REAGENT_PIGIRON: 1, REAGENT_GRAVEDUST: 1}
self.mantra = 'In Sar'
示例2: __init__
def __init__(self):
Spell.__init__(self, 6)
self.reagents = {REAGENT_BLACKPEARL: 1, REAGENT_SPIDERSILK: 1, REAGENT_GINSENG: 1}
self.mantra = 'In Ex Grav'
self.validtarget = TARGET_GROUND
self.harmful = 1
self.resistable = 1
示例3: __init__
def __init__(self):
Spell.__init__(self, 0)
self.skill = CHIVALRY
self.damageskill = FOCUS
self.mana = 0
#self.reagents = {REAGENT_BLOODMOSS: 1, REAGENT_MANDRAKE: 1, REAGENT_GINSENG: 1, REAGENT_SULFURASH: 1}
self.mantra = ''
示例4: __init__
def __init__(self):
Spell.__init__(self, 4)
self.reagents = {REAGENT_BLACKPEARL: 1, REAGENT_SPIDERSILK: 1, REAGENT_SULFURASH: 1}
self.mantra = "In Flam Grav"
self.validtarget = TARGET_GROUND
self.harmful = 1
self.resistable = 1
示例5: __init__
def __init__(self):
Spell.__init__(self, 3)
self.skill = CHIVALRY
self.requiredskill = 150
self.damageskill = FOCUS
self.mana = 10
self.tithingpoints = 10
self.mantra = 'Consecrus Arma'
示例6: __init__
def __init__(self):
Spell.__init__(self, 6)
self.skill = NECROMANCY
self.requiredskill = 30
self.damageskill = SPIRITSPEAK
self.mana = 17
self.reagents = {REAGENT_BATWING: 1, REAGENT_GRAVEDUST: 1, REAGENT_DAEMONBLOOD: 1}
self.mantra = 'Kal Xen Bal'
示例7: cast
def cast(self, char, mode, args=[], target=None, item=None):
# No Mark Region
if not char.region or char.region.nomark:
if char.socket:
char.socket.clilocmessage(501802)
return
return Spell.cast(self, char, mode, args, target, item)
示例8: affectchar
def affectchar(self, char, mode, target, args=[]):
if not Spell.affectchar(self, char, mode, target):
return 0
# Dispelling ourself is forbidden
# And we can only dispel summoned creatures
if char == target or not target.npc or target.summontimer == 0:
if char.socket:
char.socket.clilocmessage(1005049)
return 0
return 1
示例9: cast
def cast(self, char, mode, args=[], target=None, item=None):
if not self.consumerequirements(char, mode, args, target, item):
return False
if not char.gm:
if char.criminal:
char.socket.clilocmessage( 1005561, "", 0x22 ) # Thou'rt a criminal and cannot escape so easily.
elif len(char.getopponents()):
char.socket.clilocmessage( 1061282 ) # You cannot use the Sacred Journey ability to flee from combat.
elif char.overloaded:
char.socket.clilocmessage( 502359, "", 0x22 ) # Thou art too encumbered to move.
return False
return Spell.cast(self, char, mode, args, target, item)
示例10: cast
def cast(self, char, mode, args=[], target=None, item=None):
if not char.gm:
if char.iscriminal():
if char.socket:
char.socket.clilocmessage(1005561)
return
if char.attacktarget:
if char.socket:
char.socket.clilocmessage(1005564)
return
return Spell.cast(self, char, mode, args, target, item)
示例11: checkrequirements
def checkrequirements(self, char, mode, args=[], target=None, item=None):
if char.polymorph:
if char.socket:
char.socket.clilocmessage(1005559)
return 0
if char.incognito:
if char.socket:
char.socket.clilocmessage(502167)
return 0
if len(args) == 0:
polymorph.showmenu(char)
return 0
return Spell.checkrequirements(self, char, mode, args, target, item)
示例12: checkrequirements
def checkrequirements(self, char, mode, args=[], target=None, item=None):
if char.polymorph:
if char.socket:
char.socket.clilocmessage(1005559)
return 0
if char.incognito:
if char.socket:
char.socket.clilocmessage(502167)
return 0
if necromancy.transformed(char):
if char.socket:
char.socket.clilocmessage(1061633 ) # You cannot polymorph while in that form.
return 0
if len(args) == 0:
polymorph.showmenu(char)
return 0
return Spell.checkrequirements(self, char, mode, args, target, item)