Project1
标题:
如何在战斗/逃跑那一栏加东西
[打印本页]
作者:
倭卜僾伱
时间:
2009-6-28 08:13
标题:
如何在战斗/逃跑那一栏加东西
本帖最后由 ONEWateR 于 2009-7-2 10:45 编辑
如何在那一栏加东西啊
加个休息,点休息全部回血5%
加完没回合变成【战斗 逃跑 休息】
作者:
ONEWateR
时间:
2009-7-2 11:00
#==============================================================================
# ■ Window_PartyCommand
#------------------------------------------------------------------------------
# 战斗画面、选择战斗与逃跑的窗口。
#==============================================================================
class Window_PartyCommand < Window_Selectable
#--------------------------------------------------------------------------
# ● 初始化对像
#--------------------------------------------------------------------------
def initialize
super(0, 0, 640, 64)
self.contents = Bitmap.new(width - 32, height - 32)
self.back_opacity = 160
@commands = ["战斗", "逃跑","休息"]
@item_max = 3
@column_max = 3
draw_item(0, normal_color)
draw_item(1, $game_temp.battle_can_escape ? normal_color : disabled_color)
draw_item(2, normal_color)
self.active = false
self.visible = false
self.index = 0
end
#--------------------------------------------------------------------------
# ● 描绘项目
# index : 项目标号
# color : 文字颜色
#--------------------------------------------------------------------------
def draw_item(index, color)
self.contents.font.color = color
rect = Rect.new(80 + index * 160 + 4, 0, 128 - 10, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
self.contents.draw_text(rect, @commands[index], 1)
end
#--------------------------------------------------------------------------
# ● 更新光标矩形
#--------------------------------------------------------------------------
def update_cursor_rect
self.cursor_rect.set(80 + index * 160, 0, 128, 32)
end
end
class Scene_Battle
def update_phase2
# 按下 C 键的情况下
if Input.trigger?(Input::C)
# 同伴指令窗口光标位置分支
case @party_command_window.index
when 0 # 战斗
# 演奏确定 SE
$game_system.se_play($data_system.decision_se)
# 开始角色的命令回合
start_phase3
when 1 # 逃跑
# 不能逃跑的情况下
if $game_temp.battle_can_escape == false
# 演奏冻结 SE
$game_system.se_play($data_system.buzzer_se)
return
end
# 演奏确定 SE
$game_system.se_play($data_system.decision_se)
# 逃走处理
update_phase2_escape
when 2
$game_system.se_play($data_system.decision_se)
for actor in $game_party.actors
actor.hp += (actor.maxhp*0.05).round
end
start_phase4
end
return
end
end
end
复制代码
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1