#==============================================================================#02.# ※ 后知后觉横版战斗模板 增强补丁03.#------------------------------------------------------------------------------#04.# 添加了战斗时角色脚下的血槽05.# 此脚本为定制脚本06.# 影月千秋07.# 2014.01.27 #08.#==============================================================================#09. 10. 11.#==============================================================================12.# ■ Hzhj::HorizontalBattleSystem13.#------------------------------------------------------------------------------14.# 只在这里进行编辑15.#==============================================================================16.module Hzhj::HorizontalBattleSystem17. 18. MoGB_LOC_X = "index * 30 + 300"19. MoGB_LOC_Y = "index * 45 + 20"20. # 值槽位置计算公式21. 22. # ·关于图片23. # 放在Graphics\System下24. # ·图片名25. # Mo_Hzhj_HBS_GB_B.png 背景26. # Mo_Hzhj_HBS_GB_F.png 槽图27. 28. # 值槽左上角与图片左上角位置差29. # 分别为横纵坐标之差30. MoGB_ADD_X = 131. MoGB_ADD_Y = 432.end33.#==============================================================================34.# ■ SpriteSet_MoGagueBar_ForHzhjHBS35.#==============================================================================36.class SpriteSet_Mo_GB_HzhjHBS37. include Hzhj::HorizontalBattleSystem38. #--------------------------------------------------------------------------39. # ● 初始化40. #--------------------------------------------------------------------------41. def initialize(viewport, battler)42. [url=home.php?mod=space&uid=133701]@battler[/url] = battler43. return if @battler.nil? || [email protected]?44. @back = Sprite_Base.new(viewport)45. @back.bitmap = Cache.system("Mo_Hzhj_HBS_GB_B") rescue nil46. @back.x = eval("battler.#{MoGB_LOC_X}")47. @back.y = eval("battler.#{MoGB_LOC_Y}")48. @back.z = battler.screen_z + 5 - battler.index49. @fore = Sprite_Base.new(viewport)50. @fore.bitmap = Cache.system("Mo_Hzhj_HBS_GB_F") rescue nil51. @fore.x = @back.x + MoGB_ADD_X52. @fore.y = @back.y + MoGB_ADD_Y53. @fore.z = @back.z + 154. @rate = @battler.hp_rate55. refresh56. end57. #--------------------------------------------------------------------------58. # ● 刷新59. #--------------------------------------------------------------------------60. def update61. refresh if @rate != @battler.hp_rate62. end63. #--------------------------------------------------------------------------64. # ● 描绘65. #--------------------------------------------------------------------------66. def refresh67. @rate = @battler.hp_rate68. @fore.zoom_x = @rate69. end70. #--------------------------------------------------------------------------71. # ● 释放72. #--------------------------------------------------------------------------73. def dispose74. @fore.bitmap.dispose if @back.bitmap75. @fore.dispose76. @back.bitmap.dispose if @back.bitmap77. @back.dispose78. end79.end80.#==============================================================================81.# ■ Spriteset_Battle82.#==============================================================================83.class Spriteset_Battle84. #--------------------------------------------------------------------------85. # ● 生成角色活动块86. #--------------------------------------------------------------------------87. alias :mo_gb_hzhjHBS_create_actors :create_actors88. def create_actors89. mo_gb_hzhjHBS_create_actors 90. create_mo_hzhjHBS_gb91. end92. #--------------------------------------------------------------------------93. # ● 释放角色活动块94. #--------------------------------------------------------------------------95. def create_mo_hzhjHBS_gb96. @mo_actor_gague_bar = Array.new(4){|i|97. SpriteSet_Mo_GB_HzhjHBS.new(@viewport1, $game_party.battle_members[i])98. }99. end100. #--------------------------------------------------------------------------101. # ● 释放角色活动块102. #--------------------------------------------------------------------------103. alias :mo_gb_hzhjHBS_dispose_actors :dispose_actors104. def dispose_actors105. mo_gb_hzhjHBS_dispose_actors 106. dispose_mo_hzhjHBS_gb107. end108. #--------------------------------------------------------------------------109. # ● 释放值槽活动块110. #--------------------------------------------------------------------------111. def dispose_mo_hzhjHBS_gb112. @mo_actor_gague_bar.each{|gb| gb.dispose}113. end114. #--------------------------------------------------------------------------115. # ● 更新值槽活动块116. #--------------------------------------------------------------------------117. def update_mo_hzhjHBS_gb118. @mo_actor_gague_bar.each{|gb| gb.update}119. end120.end121.#==============================================================================122.# ■ Window_BattleStatus123.#==============================================================================124.class Window_BattleStatus125. #--------------------------------------------------------------------------126. # ● 刷新127. #--------------------------------------------------------------------------128. alias :mo_gb_hzhjHBS_refresh :refresh129. def refresh130. mo_gb_hzhjHBS_refresh131. SceneManager.scene.instance_variable_get("@spriteset").update_mo_hzhjHBS_gb132. end133.end#==============================================================================#
# ※ 后知后觉横版战斗模板 增强补丁
#------------------------------------------------------------------------------#
# 添加了战斗时角色脚下的血槽
# 此脚本为定制脚本
# 影月千秋
# 2014.01.27 #
#==============================================================================#
#==============================================================================
# ■ Hzhj::HorizontalBattleSystem
#------------------------------------------------------------------------------
# 只在这里进行编辑
#==============================================================================
module Hzhj::HorizontalBattleSystem
MoGB_LOC_X = "index * 30 + 300"
MoGB_LOC_Y = "index * 45 + 20"
# 值槽位置计算公式
# ·关于图片
# 放在Graphics\System下
# ·图片名
# Mo_Hzhj_HBS_GB_B.png 背景
# Mo_Hzhj_HBS_GB_F.png 槽图
# 值槽左上角与图片左上角位置差
# 分别为横纵坐标之差
MoGB_ADD_X = 1
MoGB_ADD_Y = 4
end
#==============================================================================
# ■ SpriteSet_MoGagueBar_ForHzhjHBS
#==============================================================================
class SpriteSet_Mo_GB_HzhjHBS
include Hzhj::HorizontalBattleSystem
#--------------------------------------------------------------------------
# ● 初始化
#--------------------------------------------------------------------------
def initialize(viewport, battler)
#[url=home.php?mod=space&uid=133701]@battler[/url] = battler
return if @battler.nil? || !@battler.actor?
@back = Sprite_Base.new(viewport)
@back.bitmap = Cache.system("Mo_Hzhj_HBS_GB_B") rescue nil
@back.x = eval("battler.#{MoGB_LOC_X}")
@back.y = eval("battler.#{MoGB_LOC_Y}")
@back.z = battler.screen_z + 5 - battler.index
@fore = Sprite_Base.new(viewport)
@fore.bitmap = Cache.system("Mo_Hzhj_HBS_GB_F") rescue nil
@fore.x = @back.x + MoGB_ADD_X
@fore.y = @back.y + MoGB_ADD_Y
@fore.z = @back.z + 1
@rate = @battler.hp_rate
refresh
end
#--------------------------------------------------------------------------
# ● 刷新
#--------------------------------------------------------------------------
def update
refresh if @rate != @battler.hp_rate
end
#--------------------------------------------------------------------------
# ● 描绘
#--------------------------------------------------------------------------
def refresh
@rate = @battler.hp_rate
@fore.zoom_x = @rate
end
#--------------------------------------------------------------------------
# ● 释放
#--------------------------------------------------------------------------
def dispose
@fore.bitmap.dispose if @back.bitmap
@fore.dispose
@back.bitmap.dispose if @back.bitmap
@back.dispose
end
end
#==============================================================================
# ■ Spriteset_Battle
#==============================================================================
class Spriteset_Battle
#--------------------------------------------------------------------------
# ● 生成角色活动块
#--------------------------------------------------------------------------
alias :mo_gb_hzhjHBS_create_actors :create_actors
def create_actors
mo_gb_hzhjHBS_create_actors
create_mo_hzhjHBS_gb
end
#--------------------------------------------------------------------------
# ● 释放角色活动块
#--------------------------------------------------------------------------
def create_mo_hzhjHBS_gb
@mo_actor_gague_bar = Array.new(4){|i|
SpriteSet_Mo_GB_HzhjHBS.new(@viewport1, $game_party.battle_members[i])
}
end
#--------------------------------------------------------------------------
# ● 释放角色活动块
#--------------------------------------------------------------------------
alias :mo_gb_hzhjHBS_dispose_actors :dispose_actors
def dispose_actors
mo_gb_hzhjHBS_dispose_actors
dispose_mo_hzhjHBS_gb
end
#--------------------------------------------------------------------------
# ● 释放值槽活动块
#--------------------------------------------------------------------------
def dispose_mo_hzhjHBS_gb
@mo_actor_gague_bar.each{|gb| gb.dispose}
end
#--------------------------------------------------------------------------
# ● 更新值槽活动块
#--------------------------------------------------------------------------
def update_mo_hzhjHBS_gb
@mo_actor_gague_bar.each{|gb| gb.update}
end
end
#==============================================================================
# ■ Window_BattleStatus
#==============================================================================
class Window_BattleStatus
#--------------------------------------------------------------------------
# ● 刷新
#--------------------------------------------------------------------------
alias :mo_gb_hzhjHBS_refresh :refresh
def refresh
mo_gb_hzhjHBS_refresh
SceneManager.scene.instance_variable_get("@spriteset").update_mo_hzhjHBS_gb
end
end