QQ截图20150917092634.png (545.09 KB, 下载次数: 20)
QQ截图20150917092718.png (87.6 KB, 下载次数: 22)
QQ截图20150917092740.png (103.98 KB, 下载次数: 18)
QQ截图20150917092812.png (96.82 KB, 下载次数: 21)
QQ截图20150917092825.png (114.49 KB, 下载次数: 19)
module BattleManager def self.battle_start $game_system.battle_count += 1 $game_party.on_battle_start $game_troop.on_battle_start $game_troop.enemy_names.each do |name| $game_message.add(sprintf(Vocab::Emerge, name)) end if @preemptive $game_message.add(sprintf(Vocab::Preemptive, $game_party.name)) elsif @surprise $game_message.add(sprintf(Vocab::Surprise, $game_party.name)) end for i in 1..4 #这里可以 $game_variables[i] = 1 #用迭代 end #不太熟所以用for写了 wait_for_message end end class Scene_Battle < Scene_Base alias on_item_ok_20150917 on_item_ok def on_item_ok on_item_ok_20150917 $game_variables[BattleManager.actor.index+1] -= 1 #index是0,所以从1号变量开始,可以改 end alias on_item_cancel_20150917 on_item_cancel def on_item_cancel on_item_cancel_20150917 $game_variables[BattleManager.actor.index+1] += 1 end end class Window_ActorCommand < Window_Command def add_item_command @itsw = $game_variables[BattleManager.actor.index+1] == 0 ? false : true add_command(Vocab::item, :item,@itsw) end end
dongdongdjh 发表于 2015-9-17 19:21
module BattleManager
def self.battle_start
$game_system.battle_count += 1
欢迎光临 Project1 (https://rpg.blue/) | Powered by Discuz! X3.1 |