這邊有一個武器判定把物攻改為特定技能的腳本 可以參考他的思路而進行延伸?
先弄出腳本
原帖:http://rpg.blue/thread-251124-1-1.html 3L
class RPG::Weapon < RPG::EquipItem def attack_skill @note.each_line do |line| if line =~ /\<(?:AttackSkill)[ ]*(\d+)\>/i return $1.to_i == 0 ? 1 : $1.to_i end end return 1 end end class Game_Actor < Game_Battler alias attack_skill_attack_skill_id attack_skill_id def attack_skill_id return weapons[0].attack_skill if weapons[0] if dual_wield? return weapons[1].attack_skill if weapons[1] end return attack_skill_attack_skill_id end end
class RPG::Weapon < RPG::EquipItem
def attack_skill
@note.each_line do |line|
if line =~ /\<(?:AttackSkill)[ ]*(\d+)\>/i
return $1.to_i == 0 ? 1 : $1.to_i
end
end
return 1
end
end
class Game_Actor < Game_Battler
alias attack_skill_attack_skill_id attack_skill_id
def attack_skill_id
return weapons[0].attack_skill if weapons[0]
if dual_wield?
return weapons[1].attack_skill if weapons[1]
end
return attack_skill_attack_skill_id
end
end
不是用什么办法把状态跟武器同布神马的
就是他会判定装备内的备注来决定招式对嘛
那如果是判定狀態內的备注來決定招式呢?
(我凭我的废渣渣脚本语言来乱了)
應該是要改這些
class RPG::Status < RPG::EquipItem #這個改一下應該就行了 就是改成判定狀態神馬的 (我不知) def attack_skill #重新定義使用的技能ID @note.each_line do |line| #取得备注 if line =~ /\<(?:AttackSkill)[ ]*(\d+)\>/i #如果是這樣的格式的話 return $1.to_i == 0 ? 1 : $1.to_i #技能ID end end return 1 end end
class RPG::Status < RPG::EquipItem #這個改一下應該就行了 就是改成判定狀態神馬的 (我不知)
def attack_skill #重新定義使用的技能ID
@note.each_line do |line| #取得备注
if line =~ /\<(?:AttackSkill)[ ]*(\d+)\>/i #如果是這樣的格式的話
return $1.to_i == 0 ? 1 : $1.to_i #技能ID
end
end
return 1
end
end
就是分類就行了..
我查了下有点難.... 找不到狀態類是什麼 (應該是我跟本找錯地方)
也不知道下面那段要不要留 你可以去找別人....
我又來了.... @j433463
|