import sys
def setup(core, actor, buff):
core.skillModService.addSkillMod(actor, 'expertise_damage_all', 10)
core.skillModService.addSkillMod(actor, 'expertise_action_all', 10)
core.skillModService.addSkillMod(actor, 'movement_resist_snare', 100)
core.skillModService.addSkillMod(actor, 'movement', 0.5)
return
def removeBuff(core, actor, buff):
core.skillModService.deductSkillMod(actor, 'expertise_damage_all', 10)
core.skillModService.deductSkillMod(actor, 'expertise_action_all', 10)
core.skillModService.deductSkillMod(actor, 'movement_resist_snare', 100)
core.skillModService.deductSkillMod(actor, 'movement', 1)
return
我收到一个错误:
File "scripts/buffs/of_charge_1.py", line 7, in setup
core.skillModService.addSkillMod(actor, 'movement', 0.5)
TypeError: addSkillMod(): 3rd arg can't be coerced to int
在 Java 的主代码中,我将它设置为浮点数,否则它将不起作用,所以在这里我试图将其设置为整数,但我坚持我应该对它做些什么以使其成为整数。