本帖最后由 soulsaga 于 2021-3-3 19:41 编辑
替换技能组={ "大火球术"=>"火球术", "超级火球术"=>"大火球术", "凤凰冲击"=>"超级火球术", "地爆天星"=>"凤凰冲击" } Game_Actor = Class.new(Game_Actor) do superclass.constants.each{|c|const_set(c, superclass.const_get(c))} def learn_skill(id) s = @skills.clone super(id) if @skills != s s1 = $data_skills[id].name if 替换技能组[s1] for skill in @skills forget_skill(skill.id) if 替换技能组[s1] == skill.name end end end end end
替换技能组={
"大火球术"=>"火球术",
"超级火球术"=>"大火球术",
"凤凰冲击"=>"超级火球术",
"地爆天星"=>"凤凰冲击"
}
Game_Actor = Class.new(Game_Actor) do
superclass.constants.each{|c|const_set(c, superclass.const_get(c))}
def learn_skill(id)
s = @skills.clone
super(id)
if @skills != s
s1 = $data_skills[id].name
if 替换技能组[s1]
for skill in @skills
forget_skill(skill.id) if 替换技能组[s1] == skill.name
end
end
end
end
end
萌新随便写写..未测试..可能不太行? |