darkcieran
Member
Hi folks. i'm looking for a way to change these parameters through a call script. any ideas?
class Game_Actor
attr_accessor :atk_mod
attr_accessor :pdef_mod
attr_accessor :mdef_mod
alias attr_mods_setup setup
def setup(actor_id)
attr_mods_setup(actor_id)
@atk_mod = 0
@pdef_mod = 0
@mdef_mod = 0
end
#--------------------------------------------------------------------------
# * Get Attack Power
#--------------------------------------------------------------------------
def atk
n = base_atk
for i in @states
n *= $data_states[i].atk_rate / 100.0
end
n += @atk_mod
return Integer(n)
end
#--------------------------------------------------------------------------
# * Get Physical Defense Power
#--------------------------------------------------------------------------
def pdef
n = base_pdef
for i in @states
n *= $data_states[i].pdef_rate / 100.0
end
n += @pdef_mod
return Integer(n)
end
#--------------------------------------------------------------------------
# * Get Magic Defense Power
#--------------------------------------------------------------------------
def mdef
n = base_mdef
for i in @states
n *= $data_states[i].mdef_rate / 100.0
end
n += @mdef_mod
return Integer(n)
end
end
class Game_Actor
attr_accessor :atk_mod
attr_accessor :pdef_mod
attr_accessor :mdef_mod
alias attr_mods_setup setup
def setup(actor_id)
attr_mods_setup(actor_id)
@atk_mod = 0
@pdef_mod = 0
@mdef_mod = 0
end
#--------------------------------------------------------------------------
# # * Get Attack Power
# #--------------------------------------------------------------------------
def atk
n = base_atk
for i in @states
n *= $data_states[i].atk_rate / 100.0
end
n += @atk_mod
return Integer(n)
end
#--------------------------------------------------------------------------
# * Get Physical Defense Power
#--------------------------------------------------------------------------
def pdef
n = base_pdef
for i in @states
n *= $data_states[i].pdef_rate / 100.0
end
n += @pdef_mod
return Integer(n)
end
#--------------------------------------------------------------------------
# * Get Magic Defense Power
#--------------------------------------------------------------------------
def mdef
n = base_mdef
for i in @states
n *= $data_states[i].mdef_rate / 100.0
end
n += @mdef_mod
return Integer(n)
end
end