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

82 lines
No EOL
3.8 KiB
Ruby

#==============================================================================
# ■ Window_k_ExStatus_Draw
#------------------------------------------------------------------------------
#  描画領域
#==============================================================================
class Window_k_ExStatus_Draw < Window_Base
#--------------------------------------------------------------------------
# ● 能力値の描画(1-1、1-2ページの描画)
#--------------------------------------------------------------------------
def draw_actor_param(actor, x, y, param_id)
case param_id
when 0,2,4,6
change_color(system_color)
draw_text(x, y + line_height * (param_id / 2), 120, line_height, Vocab::param(param_id))
change_color(normal_color)
draw_text(x + 120, y + line_height * (param_id / 2), 50, line_height, actor.param(param_id), 2)
when 1,3,5,7
change_color(system_color)
draw_text(x + (contents.width - x)/2, y + line_height * ((param_id - 1)/ 2), 120, line_height, Vocab::param(param_id))
change_color(normal_color)
draw_text(x + (contents.width - x)/2 + 120, y + line_height * ((param_id - 1)/ 2), 50, line_height, actor.param(param_id), 2)
when 9,10,11,12,13,14,15,16,17,18
if KURE::ExStatus::VIEW_Ex1[param_id - 9] != 0
@draw_postion_xparam += 1
else
#~ value = (@actor.xparam(param_id - 9) * 100).to_i
value = status_draw_param(param_id)
draw_str = draw_value_s(value,0)
draw_pos_xparam = (param_id - 9) - @draw_postion_xparam
case draw_pos_xparam
when 0,2,4,6,8
change_color(system_color)
draw_text(x, y + line_height * (draw_pos_xparam / 2), 120, line_height, KURE::ExStatus::Vocab_Ex1[param_id - 9])
change_color(normal_color)
draw_text(x + 120, y + line_height * (draw_pos_xparam / 2), 50, line_height, draw_str, 2)
when 1,3,5,7,9
change_color(system_color)
draw_text(x + (contents.width - x)/2, y + line_height * ((draw_pos_xparam - 1)/ 2), 120, line_height, KURE::ExStatus::Vocab_Ex1[param_id - 9])
change_color(normal_color)
draw_text(x + (contents.width - x)/2 + 120, y + line_height * ((draw_pos_xparam - 1)/ 2), 50, line_height, draw_str, 2)
end
end
when 20,21,22,23,24,25,26,27,28,29,30
if KURE::ExStatus::VIEW_Ex2[param_id - 20] != 0
@draw_postion_sparam += 1
else
value = (@actor.sparam(param_id - 20) * 100).to_i
draw_str = draw_value_s(value,100)
draw_pos_sparam = (param_id - 20) - @draw_postion_sparam
case draw_pos_sparam
when 0,2,4,6,8
change_color(system_color)
draw_text(x, y + line_height * (draw_pos_sparam / 2), 120, line_height, KURE::ExStatus::Vocab_Ex2[param_id - 20])
change_color(normal_color)
draw_text(x + 120, y + line_height * (draw_pos_sparam / 2), 50, line_height, draw_str, 2)
when 1,3,5,7,9
change_color(system_color)
draw_text(x + (contents.width - x)/2, y + line_height * ((draw_pos_sparam - 1)/ 2), 120, line_height, KURE::ExStatus::Vocab_Ex2[param_id - 20])
change_color(normal_color)
draw_text(x + (contents.width - x)/2 + 120, y + line_height * ((draw_pos_sparam - 1)/ 2), 50, line_height, draw_str, 2)
end
end
end
end
def status_draw_param(param_id)
case param_id
when 9 # 命中
result = (@actor.hit_with_bonus * 100).to_i
when 10 # 回避
result = (@actor.eva_with_bonus * 100).to_i
when 11 # 会心
result = (@actor.cri_with_bonus * 100).to_i
else # それ以外
result = (@actor.xparam(param_id - 9) * 100).to_i
end
return result
end
end