Project1
标题:
请问怎么样才能制作一个技能在一个特定的机能状态下才能释放??
[打印本页]
作者:
aaalbx
时间:
2011-8-29 19:52
标题:
请问怎么样才能制作一个技能在一个特定的机能状态下才能释放??
怎么做到的
那位大大教一下 dsu_plus_rewardpost_czw
作者:
Wind2010
时间:
2011-8-29 19:57
$louse_can_use_skill = []
# 上面是初始化
#===============================================================================
# 自定义内容
# 定义方法:
# $louse_can_use_skill.push([技能ID,状态ID])
# 定义后只有在该状态下才能使用该技能
# 咳咳SP不够自然也不能用
#===============================================================================
$louse_can_use_skill.push([57,5])
#===============================================================================
# 脚本内容
#===============================================================================
$louse_states_id = []
$louse_skills_id = []
for shizi in $louse_can_use_skill
$louse_states_id.push(shizi[1])
$louse_skills_id.push(shizi[0])
end
class Game_Battler
def skill_can_use?(skill_id)
if $data_skills[skill_id].sp_cost > self.sp
return false
end
if dead?
return false
end
if $data_skills[skill_id].atk_f == 0 and self.restriction == 1
return false
end
occasion = $data_skills[skill_id].occasion
if $game_temp.in_battle
for i in 0...$louse_skills_id.size
shizi_skill = $louse_skills_id[i]
if skill_id == shizi_skill
return self.state?($louse_states_id[i])
end
end
return (occasion == 0 or occasion == 1)
else
return (occasion == 0 or occasion == 2)
end
end
end
复制代码
XD
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1