hello,
l made states which deal damage each turn or so they are supposed to do.
however, it only works in the first turn the state applied.
it works similar like slip_damage.
scene_battle:
and game_battler:
l hope anyone can help me
sorry for my bad englsih
l made states which deal damage each turn or so they are supposed to do.
however, it only works in the first turn the state applied.
it works similar like slip_damage.
scene_battle:
Code:
if @active_battler.hp > 0 and @active_battler.any_dots?
# p @active_battler.dots
for i in @active_battler.dots
@active_battler.dot_effect(i)
@active_battler.damage_pop = true
end
end
Code:
class Game_Battler
#=============================
DOT_LIST = ["Boneplague"]
#============================
#--------------------------------------------------------------------------
# * DoT damage
#--------------------------------------------------------------------------
def dot_effect(i)
# Set damage
case i
when "Boneplague"
self.damage = 200
else
self.damage = 0
end
# Subtract damage from HP
self.hp -= self.damage
# End Method
return true
end
#--------------------------------------------------------------------------
# * Determine [DoT] States
#--------------------------------------------------------------------------
def any_dots?
for i in @states
#p "State: #{@states}"
#p "$State: #{$data_states[i].name}"
if DOT_LIST.include?($data_states[i].name) and not @dots.include?($data_states[i].name)
@dots << $data_states[i].name
# p "@dots #{@dots}" ; p "#{@states}"
return true
end
end
return false
end
l hope anyone can help me
sorry for my bad englsih