加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
本帖最后由 金芒芒 于 2022-9-23 16:22 编辑
在一个地图ID使用,第一次用该技能是sp 消耗20 第2次用该技能40 第三次用消耗60 第四次80 类推......7次是在脚本里还是 技能说明里啊 技能说明:威力:1000 消耗SP:20
#-------------------------------------------------------------------------- # ● 定义旋舞斩 #-------------------------------------------------------------------------- def skill_旋舞斩 for enemy in $game_map.events.values next if enemy.return_erased2 next if enemy.list == nil next if enemy.list[0].code != 108 next if enemy.list[1].parameters[0] != "敌人" px = $game_player.x py = $game_player.y if (px - enemy.x).abs <= 2 and (py - enemy.y).abs <= 1 case rand(10) when 0..8 enemy.damage = $data_skills[@skill.id].power enemy.damage_pop = true case $game_player.direction when 2 enemy.jump(0, 1) when 4 enemy.jump(-1, 0) when 6 enemy.jump(1, 0) when 8 enemy.jump(0, -1) end when 9 enemy.damage = $data_skills[@skill.id].power*2 enemy.damage_pop = true enemy.critical = true case $game_player.direction when 2 enemy.jump(0, 1) when 4 enemy.jump(-1, 0) when 6 enemy.jump(1, 0) when 8 enemy.jump(0, -1) end end Mess_Text.write ("#{enemy.list[2].parameters[0]}受到#{enemy.damage.to_i}伤害。") end #伤害范围 end #定义event end #旋舞斩技能
#--------------------------------------------------------------------------
# ● 定义旋舞斩
#--------------------------------------------------------------------------
def skill_旋舞斩
for enemy in $game_map.events.values
next if enemy.return_erased2
next if enemy.list == nil
next if enemy.list[0].code != 108
next if enemy.list[1].parameters[0] != "敌人"
px = $game_player.x
py = $game_player.y
if (px - enemy.x).abs <= 2 and (py - enemy.y).abs <= 1
case rand(10)
when 0..8
enemy.damage = $data_skills[@skill.id].power
enemy.damage_pop = true
case $game_player.direction
when 2
enemy.jump(0, 1)
when 4
enemy.jump(-1, 0)
when 6
enemy.jump(1, 0)
when 8
enemy.jump(0, -1)
end
when 9
enemy.damage = $data_skills[@skill.id].power*2
enemy.damage_pop = true
enemy.critical = true
case $game_player.direction
when 2
enemy.jump(0, 1)
when 4
enemy.jump(-1, 0)
when 6
enemy.jump(1, 0)
when 8
enemy.jump(0, -1)
end
end
Mess_Text.write ("#{enemy.list[2].parameters[0]}受到#{enemy.damage.to_i}伤害。")
end #伤害范围
end #定义event
end #旋舞斩技能
在一个地图ID使用,第一次用该技能是sp 消耗20 第2次用该技能40 第三次用消耗60 第四次80 类推......7次是在脚本里改还是 技能说明里改 技能说明:威力:1000 消耗SP:20 |