rebf-gaiden/Scripts/RO_ver1.rb
2025-04-27 16:08:44 -05:00

460 lines
19 KiB
Ruby
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

=begin
トリス RO風メニュー ver1
他の全メニュー系スクリプトより下に導入
=end
module RO_Menu
# ステータスウインドウの[横幅, 縦幅, フォントサイズ]
# フォントサイズは文字の縦幅 標準サイズは24
STATUS_SIZE = [250 + 24,150, 22]
# ステータス各項目の[x座標, y座標] HPとSPは[x座標, y座標, ゲージ長さ]
STATUS_POS = {
:name => [ 0, 8 * 0], # アクター名
:class => [ 0, 20 * 1+ 4], # 職業名
:hp => [125, 8 * 0, 110], # [x座標, y座標, ゲージ長さ]
:mp => [125, 20 * 1, 110], # [x座標, y座標, ゲージ長さ]
:tp => [125, 20 * 1+20, 110], # TP追加
:level => [ 0, 16 * 2 + 30], # レベル
:next_name => [0, 16 * 4 + 16], # Next経験の項目名
:next_value => [100, 16 * 4 + 16], # Next経験の数値表示 x座標は右端
:jobe_name => [ 80, 16 * 2 + 30], # JOBEXP の項目名
:jobe_value => [165, 16 * 2 + 30], # JOBEXP の数値表示 x座標は左端
:gold_name => [ 0, 16 * 5 + 22], # 所持金 の項目名
:gold_value => [200, 16 * 5 + 22], # 所持金 の数値表示 x座標は右端
}
# コマンドウインドウの[横幅, 縦幅, フォントサイズ]
# ステートウインドウの横幅は48
COMMAND_SIZE = [320, 145, 20]
end
#==============================================================================
# ■ Scene_ItemBase
#==============================================================================
class Scene_ItemBase < Scene_MenuBase
#--------------------------------------------------------------------------
# ● アクターウィンドウの作成
#--------------------------------------------------------------------------
def create_actor_window
@actor_window = Window_MenuActor.new
@actor_window.set_handler(:ok, method(:on_actor_ok))
@actor_window.set_handler(:cancel, method(:on_actor_cancel))
@actor_window.z = 10000
end
#--------------------------------------------------------------------------
# ● サブウィンドウの表示
#--------------------------------------------------------------------------
def show_sub_window(window)
width_remain = Graphics.width - window.width
window.x = cursor_left? ? width_remain : 0
window.show.activate
end
end
#==============================================================================
# ■ Scene_Menu
#==============================================================================
class Scene_Menu < Scene_MenuBase
#--------------------------------------------------------------------------
# ● 開始処理
#--------------------------------------------------------------------------
alias :ro_menu_start :start
def start
if $game_switches[339] == true#紅茶走
$game_switches[340] = true #紅茶走
DataManager.save_game_with_preview(33)#紅茶走オートセーブ 一旦規制
$game_switches[340] = false #紅茶走
end#紅茶走
ro_menu_start
@status_window.x = 0
@state_window = Window_MenuIcon.new
@state2_window = Window_MenuIcon2.new
@command_window.x = @status_window.width
@command_help_window.x = 0
@command_help_window.y = Graphics.height - @command_help_window.height
@mapname_window.y = @command_help_window.y - @mapname_window.height
@gold_window.hide
end
end
#==============================================================================
# ■ Window_MenuIcon
#==============================================================================
class Window_MenuIcon < Window_Selectable
#--------------------------------------------------------------------------
# ● オブジェクト初期化
#--------------------------------------------------------------------------
def initialize
super(Graphics.width - window_width, 0, window_width, window_height)
#self.opacity = 0
refresh
end
#--------------------------------------------------------------------------
# ● ウィンドウ幅の取得
#--------------------------------------------------------------------------
def window_width
fitting_height(1)
end
#--------------------------------------------------------------------------
# ● ウィンドウ高さの取得
#--------------------------------------------------------------------------
def window_height
Graphics.height
end
#--------------------------------------------------------------------------
# ● 項目の描画
#--------------------------------------------------------------------------
def refresh
actor = $game_party.members[0]
draw_actor_icons(actor, 0, 0, Graphics.height)
end
#--------------------------------------------------------------------------
# ● ステートおよび強化/弱体のアイコンを描画
#--------------------------------------------------------------------------
def draw_actor_icons(actor, x, y, width = 96)
icons = (actor.state_icons + actor.buff_icons)[0, width / 24]
icons.each_with_index {|n, i| draw_icon(n, x, y + 24 * i) }
end
end
#==============================================================================
# ■ Window_MenuStatus
#==============================================================================
class Window_MenuStatus < Window_Selectable
#--------------------------------------------------------------------------
# ● ウィンドウ幅の取得
#--------------------------------------------------------------------------
def window_width
RO_Menu::STATUS_SIZE[0]
end
#--------------------------------------------------------------------------
# ● ウィンドウ高さの取得
#--------------------------------------------------------------------------
def window_height
RO_Menu::STATUS_SIZE[1]
end
#--------------------------------------------------------------------------
# ● 項目の高さを取得
#--------------------------------------------------------------------------
def item_height
(height - standard_padding * 2)
end
#--------------------------------------------------------------------------
# ● 項目の描画
#--------------------------------------------------------------------------
def draw_item(index)
contents.font.size = RO_Menu::STATUS_SIZE[2]
actor = $game_party.members[index]
enabled = $game_party.battle_members.include?(actor)
rect = item_rect(index)
draw_item_background(index)
draw_actor_simple_status(actor, 0, 0)
draw_exp_info(actor, 0, 0)
draw_actor_skill_point_no_gauge(actor, 0, 0)
draw_currency_value(0, 0)
self.opacity = 255#紅茶走透過
end
#--------------------------------------------------------------------------
# ● シンプルなステータスの描画
#--------------------------------------------------------------------------
def draw_actor_simple_status(actor, x, y)
sp = RO_Menu::STATUS_POS
draw_actor_name( actor, sp[:name ][0], sp[:name ][1])
draw_actor_class(actor, sp[:class][0], sp[:class][1], width)
draw_actor_hp( actor, sp[:hp ][0], sp[:hp ][1], sp[:hp ][2])
draw_actor_mp( actor, sp[:mp ][0], sp[:mp ][1], sp[:mp ][2])
draw_actor_tp( actor, sp[:tp ][0], sp[:tp ][1], sp[:tp ][2])#追加
draw_actor_level(actor, sp[:level][0], sp[:level][1])
end
#--------------------------------------------------------------------------
# ● スキルポイントの描画
#--------------------------------------------------------------------------
def draw_actor_skill_point_no_gauge(actor, x, y, width = 120)
sp = RO_Menu::STATUS_POS
view_class_id = actor.class_id
@skill_point_n = actor.used_skill_points(view_class_id)
@max_skill_point_m = actor.max_skillpoint(view_class_id)
change_color(system_color)
text = KURE::SkillPoint::Skill_Point_NAME
rect = text_size(text)
draw_text(sp[:jobe_name ][0], sp[:jobe_name ][1], rect.width + 12, 24, text)
change_color(normal_color)
text = " " + @skill_point_n.to_s + "/ " + @max_skill_point_m.to_s
draw_text(sp[:jobe_value][0], sp[:jobe_value][1], width, line_height, text)
end
#--------------------------------------------------------------------------
# ◎ 経験値情報の描画
#--------------------------------------------------------------------------
def draw_exp_info(actor, x, y)
sp = RO_Menu::STATUS_POS
s1 = actor.exp - actor.current_level_exp
s2 = actor.max_level? ? "Max" : actor.next_level_exp - actor.exp
s_next = "Exp"
change_color(system_color)
draw_text(sp[:next_name ][0], sp[:next_name ][1], 45, line_height, s_next)
draw_text(sp[:next_name ][0]+140, sp[:next_name ][1], 45, line_height, "Next")
change_color(normal_color)
draw_text(0, sp[:next_value][1] , sp[:next_value][0], line_height, s1, 2)
draw_text(0+140, sp[:next_value][1] , sp[:next_value][0], line_height, s2, 2)
end
#--------------------------------------------------------------------------
# ● 通貨単位つき数値(所持金など)の描画
#--------------------------------------------------------------------------
def draw_currency_value(x, y)
sp = RO_Menu::STATUS_POS
value = $game_party.gold
unit = Vocab::currency_unit
change_color(system_color)
draw_text(sp[:gold_name ][0], sp[:gold_name ][1], width, line_height, unit)
change_color(normal_color)
draw_text(0, sp[:gold_value][1] , sp[:gold_value][0], line_height, value, 2)
end
#--------------------------------------------------------------------------
# ● フォント設定のリセット
#--------------------------------------------------------------------------
def reset_font_settings
change_color(normal_color)
contents.font.size = Font.default_size
contents.font.bold = false
contents.font.italic = false
end
end
#==============================================================================
# ■ Window_k_Custom_MenuCommand
#==============================================================================
class Window__k_Custom_MenuCommand < Window_MenuCommand
#--------------------------------------------------------------------------
# ● ウィンドウ幅の取得
#--------------------------------------------------------------------------
def window_width
RO_Menu::COMMAND_SIZE[0]
end
#--------------------------------------------------------------------------
# ● ウィンドウ高さの取得
#--------------------------------------------------------------------------
def window_height
RO_Menu::COMMAND_SIZE[1]
end
#--------------------------------------------------------------------------
# ● 桁数の取得
#--------------------------------------------------------------------------
def col_max
return 3
end
#--------------------------------------------------------------------------
# ● 横に項目が並ぶときの空白の幅を取得
#--------------------------------------------------------------------------
def spacing
return 0
end
#--------------------------------------------------------------------------
# ● 項目を描画する矩形の取得
#--------------------------------------------------------------------------
def item_rect(index)
rect = Rect.new
rect.width = item_width
rect.height = item_height
rect.x = index % col_max * (item_width + spacing)
rect.y = index / col_max * ((window_height - 50) / 4)
self.opacity = 0
rect
end
#--------------------------------------------------------------------------
# ● 項目の描画
#--------------------------------------------------------------------------
def draw_item(index)
contents.font.size = RO_Menu::COMMAND_SIZE[2]
change_color(normal_color, command_enabled?(index))
if KURE::Custom_Menu::USE_ICON == 1
rect = item_rect(index)
draw_icon(KURE::Custom_Menu::USE_LIST[index], rect.x + 0, rect.y)
end
rect = item_rect_for_text(index)
rect.y += (24 - contents.font.size) / 2
rect.width -= 24
draw_text(item_rect_for_text(index), command_name(index), alignment)
end
#--------------------------------------------------------------------------
# ● カーソルを下に移動
#--------------------------------------------------------------------------
def cursor_down(wrap = false)
wrap = true
if wrap || (index / col_max != (item_max - 1) / col_max)
i = index + col_max
if i >= item_max
if index / col_max == (item_max - 1) / col_max
i = index % col_max
else
i = item_max - 1
end
end
select(i)
end
end
#--------------------------------------------------------------------------
# ● カーソルを上に移動
#--------------------------------------------------------------------------
def cursor_up(wrap = false)
wrap = true
if wrap || (index / col_max != 0)
i = index - col_max
if i < 0
if index % col_max <= (item_max - 1) % col_max
i = index + (item_max - 1) / col_max * col_max
else
i = item_max - 1
end
end
select(i)
end
end
#--------------------------------------------------------------------------
# ● カーソルを右に移動
#--------------------------------------------------------------------------
def cursor_right(wrap = false)
wrap = true
if wrap || (index % col_max != (col_max - 1))
i = index + 1
if (i >= item_max) or (index / col_max != i / col_max)
i -= col_max
i = [i, 0].max
end
select(i)
end
end
#--------------------------------------------------------------------------
# ● カーソルを左に移動
#--------------------------------------------------------------------------
def cursor_left(wrap = false)
wrap = true
if wrap || (index % col_max != 0)
i = index - 1
if index / col_max != i / col_max
if i + col_max < item_max
i += col_max
end
end
select(i)
end
end
end
#==============================================================================
# ■ Window_Menu_MapName
#==============================================================================
class Window_Menu_MapName < Window_Base
#--------------------------------------------------------------------------
# ● ウィンドウ幅の取得
#--------------------------------------------------------------------------
def window_width
return Graphics.width - fitting_height(1)
end
end
#==============================================================================
# ■ Window_Menu_CommandHelp
#==============================================================================
class Window_Menu_CommandHelp < Window_Help
#--------------------------------------------------------------------------
# ● ウィンドウ幅の取得
#--------------------------------------------------------------------------
def window_width
#self.opacity = 0
return Graphics.width - fitting_height(1)
end
end
#==============================================================================
# ■ Window_MenuIcon 顔グラ表示改変
#==============================================================================
class Window_MenuIcon2 < Window_Selectable
#--------------------------------------------------------------------------
# ● オブジェクト初期化
#--------------------------------------------------------------------------
def initialize
super(-12,-12, window_width, window_height)
self.opacity = 0
refresh
end
#--------------------------------------------------------------------------
# ● ウィンドウ幅の取得
#--------------------------------------------------------------------------
def window_width
return 700
end
#--------------------------------------------------------------------------
# ● ウィンドウ高さの取得
#--------------------------------------------------------------------------
def window_height
return 700
end
#--------------------------------------------------------------------------
# ● 項目の描画
#--------------------------------------------------------------------------
def refresh
bitmap = Cache.picture("menuback")#紅茶走 ここ改変
self.contents.blt(0,0, bitmap, bitmap.rect)#紅茶走 ここ改変
if $game_switches[100] == true#紅茶走
bitmap = Cache.picture("manuchara2")#紅茶走 ここ改変
else #紅茶走
bitmap = Cache.picture("manuchara1")#紅茶走 ここ改変
end#紅茶走
self.contents.blt(0,0, bitmap, bitmap.rect)#紅茶走 ここ改変
self.z = 1
draw_text(45,140, 200, 50, "Enemy Climax")##
draw_text(45,170, 200, 50, "Violated")##
draw_text(45,200, 200, 50, "Ejaculated")##
draw_text(45,230, 200, 50, "Surrendered")##
draw_text(45,260, 200, 50, "Non-Battle sex")##
draw_text(45,290, 200, 50, "Stripped off underwear")##
draw_text(45,320, 200, 50, "Spent money")##
contents.font.size = 16
draw_text(5,345, 200, 50, "First Violation")##
change_color(text_color(27))#
self.contents.font.size = 24##紅茶走↓のフォントサイズ
draw_text(225,140, 100, 50,$game_variables[16])##
draw_text(225,170, 100, 50,$game_variables[17])##
draw_text(225,200, 100, 50,$game_variables[47])##
draw_text(225,230, 100, 50,$game_variables[52])##
draw_text(225,260, 100, 50,$game_variables[53])##
draw_text(225,290, 100, 50,$game_variables[46])##
draw_text(225,320, 100, 50,$game_variables[182])##
contents.font.size = 16
change_color(text_color(0))#
draw_text(150,345, 100, 50,$game_variables[19])##
bitmap = Cache.picture("nakama"+"#{$game_variables[464]}")#紅茶走 ここ改変
self.contents.blt(472, 165, bitmap, bitmap.rect)#紅茶走 ここ改変
if $game_variables[464] >= 11#
self.contents.font.size = 20##紅茶走↓のフォントサイズ
bitmap = Cache.picture("manu4")#紅茶走 ここ改変
self.contents.blt(494, 142, bitmap, bitmap.rect)#紅茶走 ここ改変
draw_text(458,268, 100, 50,$game_actors[$game_variables[464]].name)##
change_color(text_color(1))#
contents.font.size = 14
draw_text(452,289, 200, 50, "EXP")##
contents.font.size = 20
draw_gauge(460, 304, 100, $game_actors[$game_variables[464]].hp_rate, h_color1, h_color2)
change_color(system_color)
draw_current_and_max_values(480, 304, 100, $game_actors[$game_variables[464]].hp, $game_actors[$game_variables[464]].mhp,
hp_color($game_actors[$game_variables[464]]), normal_color)
change_color(text_color(1))#
contents.font.size = 14
draw_text(452,309, 200, 50, "SKILL")##
contents.font.size = 20
draw_gauge(460, 324, 100, $game_actors[$game_variables[464]].mp_rate, h_color1, h_color2)
change_color(system_color)
draw_current_and_max_values(480, 324, 100, $game_actors[$game_variables[464]].mp, $game_actors[$game_variables[464]].mmp,
mp_color($game_actors[$game_variables[464]]), normal_color)
end
end
end