本文整理汇总了Python中magic.spell.Spell.cast方法的典型用法代码示例。如果您正苦于以下问题:Python Spell.cast方法的具体用法?Python Spell.cast怎么用?Python Spell.cast使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类magic.spell.Spell
的用法示例。
在下文中一共展示了Spell.cast方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: cast
# 需要导入模块: from magic.spell import Spell [as 别名]
# 或者: from magic.spell.Spell import cast [as 别名]
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)
示例2: cast
# 需要导入模块: from magic.spell import Spell [as 别名]
# 或者: from magic.spell.Spell import cast [as 别名]
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)
示例3: cast
# 需要导入模块: from magic.spell import Spell [as 别名]
# 或者: from magic.spell.Spell import cast [as 别名]
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)
示例4: cast
# 需要导入模块: from magic.spell import Spell [as 别名]
# 或者: from magic.spell.Spell import cast [as 别名]
def cast(self, char, mode, args=[], target=None, item=None):
if char.player and char.controlslots + 1 > char.maxcontrolslots:
if char.socket:
char.socket.clilocmessage(1049645)
return
return Spell.cast(self, char, mode, args, target, item)
示例5: cast
# 需要导入模块: from magic.spell import Spell [as 别名]
# 或者: from magic.spell.Spell import cast [as 别名]
def cast(self, char, mode, args=[], target=None, item=None):
if char.player and char.controlslots >= 5:
char.socket.clilocmessage(1049645)
return
else:
return Spell.cast(self, char, mode)