加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
本帖最后由 英顺的马甲 于 2016-6-18 23:18 编辑
原本就只写了个状态的附加特技来答题,但是因为太无聊就写完整了==#=============================================================================== # ● 【简易坑爹系列】武器、装备与状态的附加特技 #=============================================================================== $WEAPONSKILLS_ORIG_ACTOR = Game_Actor.clone unless $WEAPONSKILLS_ORIG_ACTOR class Game_Actor < $WEAPONSKILLS_ORIG_ACTOR WEAPON_SKILLS = {} ARMOR_SKILLS = {} STATE_SKILLS = {} #----------------------------------------------------# # 设置区域 # # 设置方法:STATE_SKILLS[状态id] = [特技id] # WEAPON_SKILLS 与 ARMOR_SKILLS 同理 # 当特技id为负值时则删减该技能 # 不论顺序,删减技能一并落后处理 #----------------------------------------------------# # 状态1附加1,2,3号技能,删减3号技能 WEAPON_SKILLS[1] = [1, 57, -57] #----------------------------------------------------# def skills output = super |(WEAPON_SKILLS[@weapon_id] || []) [@armor1_id, @armor2_id, @armor3_id, @armor4_id].each{|a|output |= ARMOR_SKILLS[a] || []} @states.each{|s|output |= STATE_SKILLS[s] || []} output.each do |s| if s < 0 output.delete(s.abs) output.delete(s) end end return output.sort end def skill_learn?(skill_id) return skills.include?(skill_id) end end
#===============================================================================
# ● 【简易坑爹系列】武器、装备与状态的附加特技
#===============================================================================
$WEAPONSKILLS_ORIG_ACTOR = Game_Actor.clone unless $WEAPONSKILLS_ORIG_ACTOR
class Game_Actor < $WEAPONSKILLS_ORIG_ACTOR
WEAPON_SKILLS = {}
ARMOR_SKILLS = {}
STATE_SKILLS = {}
#----------------------------------------------------#
# 设置区域
#
# 设置方法:STATE_SKILLS[状态id] = [特技id]
# WEAPON_SKILLS 与 ARMOR_SKILLS 同理
# 当特技id为负值时则删减该技能
# 不论顺序,删减技能一并落后处理
#----------------------------------------------------#
# 状态1附加1,2,3号技能,删减3号技能
WEAPON_SKILLS[1] = [1, 57, -57]
#----------------------------------------------------#
def skills
output = super |(WEAPON_SKILLS[@weapon_id] || [])
[@armor1_id, @armor2_id, @armor3_id, @armor4_id].each{|a|output |= ARMOR_SKILLS[a] || []}
@states.each{|s|output |= STATE_SKILLS[s] || []}
output.each do |s|
if s < 0
output.delete(s.abs)
output.delete(s)
end
end
return output.sort
end
def skill_learn?(skill_id)
return skills.include?(skill_id)
end
end
由于有人要求,所以加了个删减技能的功能== |