class Game_Battler #-------------------------------------------------------------------------- # ● 判断状态还要持续几回合 # state_id : 状态ID #-------------------------------------------------------------------------- def state_hold(state_id) if $data_states[state_id].hold_turn <= 0 return nil end nnn = @state_turns[state_id] return nnn >= 0 ? nnn : 0 end end
小空弟 发表于 2013-8-10 19:46
damage = battler.state_turns[$data_states[162]] *100
报错
undefied local variables or method "ba ...
羞射了 发表于 2013-8-10 20:16
battler是指$game_party.actors[序号] 或 $game_troop.enemies[序号]
对class Battler 来说就是self ...
class State def slip_damage damage = self.state_turns[$data_states[162]]*100 end end class Game_Battler #....... end
羞射了 发表于 2013-8-10 20:53
class State
def initialize(battler)
@battler = battler
571.1 KB, 下载次数: 28
欢迎光临 Project1 (https://rpg.blue/) | Powered by Discuz! X3.1 |