darkcieran
Member
i'm trying to changes the enemy atk, pdef, mdef, and eva through the call script. i know you can do this by using "$data_enemies[1].atk" but i'd rather not have to go thru that with every monster in the troop. brewmeister gave me a fix for the hero party
any way this can be done?
Code:
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
any way this can be done?