赞 | 7 |
VIP | 866 |
好人卡 | 185 |
积分 | 32 |
经验 | 130059 |
最后登录 | 2024-10-29 |
在线时间 | 3618 小时 |
Lv3.寻梦者 双子人
- 梦石
- 0
- 星屑
- 3185
- 在线时间
- 3618 小时
- 注册时间
- 2009-4-4
- 帖子
- 4154
|
都改好了,在Main前面加上去就可以了。- #==============================================================================
- # ■ Window_Base
- #------------------------------------------------------------------------------
- # 游戏中全部窗口的超级类。
- #==============================================================================
- class Window_Base < Window
- #--------------------------------------------------------------------------
- # ● 描绘 HP
- # actor : 角色
- # x : 描画目标 X 坐标
- # y : 描画目标 Y 坐标
- # width : 描画目标的宽
- #--------------------------------------------------------------------------
- def draw_actor_hp(actor, x, y, width = 144)
- # 描绘字符串 "HP"
- self.contents.font.color = system_color
- self.contents.draw_text(x, y, 32, 32, $data_system.words.hp)
- # 计算描绘 MaxHP 所需的空间
- if width - 32 >= 108
- hp_x = x + width - 108
- flag = true
- elsif width - 32 >= 48
- hp_x = x + width - 48
- flag = false
- end
- # 描绘 HP(修改部分)
- states_rate = 1.0
- for i in actor.states
- states_rate *= $data_states[i].maxhp_rate / 100.0
- end
- self.contents.font.color = actor.hp == 0 ? knockout_color :
- actor.hp <= actor.maxhp / 4 ? crisis_color :
- states_rate > 1.0 ? text_color(1) : states_rate < 1.0 ? text_color(2) : normal_color
-
- self.contents.draw_text(hp_x, y, 48, 32, actor.hp.to_s, 2)
- # 描绘 MaxHP
- if flag
- self.contents.font.color = normal_color
- self.contents.draw_text(hp_x + 48, y, 12, 32, "/", 1)
- self.contents.draw_text(hp_x + 60, y, 48, 32, actor.maxhp.to_s)
- end
- end
- #--------------------------------------------------------------------------
- # ● 描绘 SP
- # actor : 角色
- # x : 描画目标 X 坐标
- # y : 描画目标 Y 坐标
- # width : 描画目标的宽
- #--------------------------------------------------------------------------
- def draw_actor_sp(actor, x, y, width = 144)
- # 描绘字符串 "SP"
- self.contents.font.color = system_color
- self.contents.draw_text(x, y, 32, 32, $data_system.words.sp)
- # 计算描绘 MaxSP 所需的空间
- if width - 32 >= 108
- sp_x = x + width - 108
- flag = true
- elsif width - 32 >= 48
- sp_x = x + width - 48
- flag = false
- end
- # 描绘 SP(修改部分)
- states_rate = 1.0
- for i in actor.states
- states_rate *= $data_states[i].maxsp_rate / 100.0
- end
- self.contents.font.color = actor.sp == 0 ? knockout_color :
- actor.hp <= actor.maxhp / 4 ? crisis_color :
- states_rate > 1.0 ? text_color(1) : states_rate < 1.0 ? text_color(2) : normal_color
-
- self.contents.draw_text(sp_x, y, 48, 32, actor.sp.to_s, 2)
- # 描绘 MaxSP
- if flag
- self.contents.font.color = normal_color
- self.contents.draw_text(sp_x + 48, y, 12, 32, "/", 1)
- self.contents.draw_text(sp_x + 60, y, 48, 32, actor.maxsp.to_s)
- end
- end
- #--------------------------------------------------------------------------
- # ● 描绘能力值
- # actor : 角色
- # x : 描画目标 X 坐标
- # y : 描画目标 Y 坐标
- # type : 能力值种类 (0~6)
- #--------------------------------------------------------------------------
- def draw_actor_parameter(actor, x, y, type)
- states_rate = 1.0
- case type
- when 0
- parameter_name = $data_system.words.atk
- parameter_value = actor.atk
- for i in actor.states
- states_rate *= $data_states[i].atk_rate / 100.0
- end
- when 1
- parameter_name = $data_system.words.pdef
- parameter_value = actor.pdef
- for i in actor.states
- states_rate *= $data_states[i].pdef_rate / 100.0
- end
- when 2
- parameter_name = $data_system.words.mdef
- parameter_value = actor.mdef
- for i in actor.states
- states_rate *= $data_states[i].mdef_rate / 100.0
- end
- when 3
- parameter_name = $data_system.words.str
- parameter_value = actor.str
- for i in actor.states
- states_rate *= $data_states[i].str_rate / 100.0
- end
- when 4
- parameter_name = $data_system.words.dex
- parameter_value = actor.dex
- for i in actor.states
- states_rate *= $data_states[i].dex_rate / 100.0
- end
- when 5
- parameter_name = $data_system.words.agi
- parameter_value = actor.agi
- for i in actor.states
- states_rate *= $data_states[i].agi_rate / 100.0
- end
- when 6
- parameter_name = $data_system.words.int
- parameter_value = actor.int
- for i in actor.states
- states_rate *= $data_states[i].int_rate / 100.0
- end
- end
- self.contents.font.color = system_color
- self.contents.draw_text(x, y, 120, 32, parameter_name)
- self.contents.font.color = normal_color
- self.contents.font.color = text_color(1) if states_rate > 1.0
- self.contents.font.color = text_color(2) if states_rate < 1.0
- self.contents.draw_text(x + 120, y, 36, 32, parameter_value.to_s, 2)
- end
- end
复制代码 |
评分
-
查看全部评分
|