[RenPy] 纯文本查看 复制代码
label hit:[/size]
$ critroll = renpy.random.randint(1, 5)
$ missroll = renpy.random.randint(1, 5)
if missroll == 1:
"你失手了。"
elif critroll == 5:
$ dmg = atk - defe
$ dmg = (2 * dmg) + renpy.random.randint(0, lvl)
if dmg <= 0:
$ dmg = 0
$ hpe = hpe - dmg
if hpe <= 0:
$ hpe = 0
"命中造成{color=#00ff00}[dmg]{/color} 伤害 ."
else:
$ dmg = atk + renpy.random.randint(0, lvl)
$ dmg = dmg - defe
if dmg <= 0:
$ dmg = 0
$ hpe = hpe - dmg
if hpe <= 0:
$ hpe = 0
"命中造成{color=#00ff00}[dmg]{/color} 伤害。"
call poisondmg from _call_poisondmg
return