rebf-gaiden/Scripts/_ver5.rb
2025-04-26 17:06:34 -05:00

126 lines
5.3 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
トリス 装備拡張画面ボーナス対応 ver6
トリス「ステータスボーナス」か「ステータスボーナス新」を
Artificial Providence様「装備拡張装備拡張画面」に対応
 (http://artificialprovidence.web.fc2.com/index.html)
「装備拡張&装備拡張画面」の下に入れてください
=end
module EQ_EX
# 素ステータスの表示x座標補正
BASE_PARAM_X = 36
# ステータスの「能力値の増減」分を代入する変数
PARAM_VAR = [33, 35, 36, 37, 34, 38]
end
#==============================================================================
# ■ Window_EquipStatus
#==============================================================================
class Window_EquipStatus < Window_Base
#--------------------------------------------------------------------------
# ● 現在の能力値を描画
#--------------------------------------------------------------------------
def draw_current_param(x, y, param_id)
change_color(normal_color)
if param_id > 3000
draw_text(x-32, y, 64, line_height, ((@actor.debuff_rate(param_id - 3001) * -1 + 1) * 100).round, 2)
elsif param_id > 2000
draw_text(x-32, y, 64, line_height, ((@actor.element_rate(param_id - 2000) * -1 + 1) * 100).round, 2)
elsif param_id > 1000
if @actor.state_resist?(param_id - 1000)
draw_text(x-32, y, 64, line_height, "無効", 2)
else
draw_text(x-32, y, 64, line_height, ((@actor.state_rate(param_id - 1000) * -1 + 1) * 100).round, 2)
end
elsif param_id > 17
draw_text(x-32, y, 64, line_height, ((@actor.sparam(param_id - 18) * 100)).round, 2)
elsif param_id > 7
case param_id - 8
when 0; param = @actor.hit_with_bonus
when 1; param = @actor.eva_with_bonus
when 2; param = @actor.cri_with_bonus
else; param = @actor.xparam(param_id - 8)
end
draw_text(x-32, y, 64, line_height, (param * 100).round, 2)
else
draw_text(x-32, y, 64, line_height, @actor.param(param_id), 2)
if param_id > 1
text = sprintf("(%3d)", @actor.param_no_equip(param_id))
x = x - EQ_EX::SNWD1 + 4 + EQ_EX::BASE_PARAM_X
draw_text(x, y, 64, line_height, text)
end
end
end
#--------------------------------------------------------------------------
# ● 装備変更後の能力値を描画
#--------------------------------------------------------------------------
def draw_new_param(x, y, param_id)
if param_id > 3000
change_color(param_change_color((@temp_actor.debuff_rate(param_id - 3001) * -1 + 1) - (@actor.debuff_rate(param_id - 3001) * -1 + 1)))
draw_text(x-32, y, 64, line_height, ((@temp_actor.debuff_rate(param_id - 3001) * -1 + 1) * 100).round, 2)
elsif param_id > 2000
change_color(param_change_color((@temp_actor.element_rate(param_id - 2000) * -1 + 1) - (@actor.element_rate(param_id - 2000) * -1 + 1)))
draw_text(x-32, y, 64, line_height, ((@temp_actor.element_rate(param_id - 2000) * -1 + 1) * 100).round, 2)
elsif param_id > 1000
if @temp_actor.state_resist?(param_id - 1000)
if @actor.state_resist?(param_id - 1000)
change_color(normal_color)
else
change_color(power_up_color)
end
draw_text(x-32, y, 64, line_height, "無効", 2)
else
if @actor.state_resist?(param_id - 1000)
change_color(power_down_color)
else
change_color(param_change_color((@temp_actor.state_rate(param_id - 1000) * -1 + 1) - (@actor.state_rate(param_id - 1000) * -1 + 1)))
end
draw_text(x-32, y, 64, line_height, ((@temp_actor.state_rate(param_id - 1000) * -1 + 1) * 100).round, 2)
end
elsif param_id > 17
change_color(param_change_color(@temp_actor.sparam(param_id - 18) - @actor.sparam(param_id - 18)))
draw_text(x-32, y, 64, line_height, ((@temp_actor.sparam(param_id - 18) * 100)).round, 2)
elsif param_id > 7
case param_id - 8
when 0; param = @actor.hit_with_bonus
when 1; param = @actor.eva_with_bonus
when 2; param = @actor.cri_with_bonus
else; param = @actor.xparam(param_id - 8)
end
case param_id - 8
when 0; temp_param = @temp_actor.hit_with_bonus
when 1; temp_param = @temp_actor.eva_with_bonus
when 2; temp_param = @temp_actor.cri_with_bonus
else; temp_param = @temp_actor.xparam(param_id - 8)
end
change_color(param_change_color(temp_param - param))
draw_text(x-32, y, 64, line_height, (temp_param * 100).round, 2)
else
change_color(param_change_color(@temp_actor.param(param_id) - @actor.param(param_id)))
draw_text(x-32, y, 64, line_height, @temp_actor.param(param_id), 2)
end
end
end
#==============================================================================
# ■ Game_Actor
#==============================================================================
class Game_Actor < Game_Battler
#--------------------------------------------------------------------------
# ● 能力値
#--------------------------------------------------------------------------
def param_no_equip(param_id)
var = EQ_EX::PARAM_VAR[param_id - 2]
return $game_variables[var]
@param_plus[param_id]
end
end