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