class Game_Actor def pyjy self.skills.any? {|skill| skill.pyjy} end end class RPG::Skill def pyjy self.note.include?("<pyjy>") end end class Game_Enemy def pyjy self.enemy.note.include?("<pyjy>") end end class RPG::State def debuff? self.note.include?("<debuff>") end end class Game_Battler def item_effect_add_state_attack(user, item, effect) user.atk_states.each do |state_id| chance = effect.value1 chance *= state_rate(state_id) chance *= user.atk_states_rate(state_id) chance *= luk_effect_rate(user) if rand < chance add_state(state_id) @result.success = true if self.pyjy && $data_states[state_id].debuff? user.add_state(state_id) end end end end def item_effect_add_state_normal(user, item, effect) chance = effect.value1 chance *= state_rate(effect.data_id) if opposite?(user) chance *= luk_effect_rate(user) if opposite?(user) if rand < chance add_state(effect.data_id) @result.success = true if self.pyjy && $data_states[effect.data_id].debuff? user.add_state(effect.data_id) end end end end
class Game_Actor
def pyjy
self.skills.any? {|skill| skill.pyjy}
end
end
class RPG::Skill
def pyjy
self.note.include?("<pyjy>")
end
end
class Game_Enemy
def pyjy
self.enemy.note.include?("<pyjy>")
end
end
class RPG::State
def debuff?
self.note.include?("<debuff>")
end
end
class Game_Battler
def item_effect_add_state_attack(user, item, effect)
user.atk_states.each do |state_id|
chance = effect.value1
chance *= state_rate(state_id)
chance *= user.atk_states_rate(state_id)
chance *= luk_effect_rate(user)
if rand < chance
add_state(state_id)
@result.success = true
if self.pyjy && $data_states[state_id].debuff?
user.add_state(state_id)
end
end
end
end
def item_effect_add_state_normal(user, item, effect)
chance = effect.value1
chance *= state_rate(effect.data_id) if opposite?(user)
chance *= luk_effect_rate(user) if opposite?(user)
if rand < chance
add_state(effect.data_id)
@result.success = true
if self.pyjy && $data_states[effect.data_id].debuff?
user.add_state(effect.data_id)
end
end
end
end
使用方法是在技能或敵人的備注欄加入<pyjy>(加在敵人備注欄的話就是敵人持有該被動技能囉), 另外只對備注欄有<debuff>的狀態有效
啊還有就是~ 顯示戰鬥訊息之類的可能要你自己加囉~ |