赞 | 0 |
VIP | 0 |
好人卡 | 0 |
积分 | 25 |
经验 | 1565 |
最后登录 | 2024-11-20 |
在线时间 | 437 小时 |
Lv3.寻梦者
- 梦石
- 0
- 星屑
- 2510
- 在线时间
- 437 小时
- 注册时间
- 2016-10-1
- 帖子
- 42
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
大家好,我将状态视窗的显示装备删除了,并在同样的地方换成如以下可选择的状态框,我的设定是如果再按ENTER可以更进一步查看状态的详细说明(如"燃烧":此状态下将每回合掉血10%)
$game_temp.message_text = $状态介绍[@details_state_window.active_state_id]
但是不管怎么按都没有反应(有音效)
劳烦各位帮忙,以下我的腳本 修改的部分在于Scene_Status以及状态详细说明自改里面
该怎么样让它跳出状态的详细说明呢?
- #==============================================================================
- # ■ Window_State_Details
- #------------------------------------------------------------------------------
- # 状态画面、显示状态名称的窗口。
- #==============================================================================
- class Window_State_Details < Window_Selectable
- def initialize(actor,show_hidden = false)
- super(320, 280, 280, 190)
- @actor = actor
- @column_max = 1
- @row_spacing = 28
- @show_hidden = show_hidden
- @active=true
- refresh
- self.index = -1
- self.back_opacity = 192
- end
- #--------------------------------------------------------------------------
- # ● 刷新
- #--------------------------------------------------------------------------
- def refresh
- if self.contents != nil
- self.contents.dispose
- self.contents = nil
- end
- @data = []
-
- for state in @actor.states
- if !ICON_STATE_IDS.include?(state)
- next
- end
- @data.push(state)
- end
- #生成空白
- @data.push(nil)
- # 生成位图、描绘全部项目
- @item_max = @data.size
- self.contents = Bitmap.new(width - @row_spacing, row_max * @row_spacing)
- if @data.size > 1
- for i in 0...@item_max-1
- draw_item(i)
- end
- else
- self.contents.draw_text(4 + 28, 0, width - @row_spacing, @row_spacing, "<当前没有附加状态>", 0)
- end
- end
- def active_state_id
- return @data[self.index]
- end
-
-
-
-
- #--------------------------------------------------------------------------
- # ● 项目的描绘
- # index : 项目符号
- #--------------------------------------------------------------------------
- def draw_item(index)
- state = @data[index]
- x = 4
- y = index * @row_spacing
- bitmap = RPG::Cache.icon($data_states[state].name.to_s + ".png")
- # if actor.states_turn[state] >= $data_states[state].hold_turn/2.0 or actor.states_turn[state]<0
- # opacity = 255
- # else
- # opacity = 100
- # end
- # 这里的图标大小默认是24x24,要改就改下面那个Rect.new(0, 0, 24, 24)
- self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
- self.contents.font.size = 16
- self.contents.draw_text(x + 28, y, 212, @row_spacing, $data_states[state].name, 0)
- self.contents.draw_text(x + 120, y, 16, @row_spacing, ":", 1)
- unless @actor.states_turn[state].nil?
- if @actor.states_turn[state] >= 0
- if @actor.states_turn[state] == 0 and $data_states[state].auto_release_prob == 0
- if state == 242 or state == 243
- state_turn = "视心情而定"
- else
- state_turn = "永久"
- end
- else
- remain_turn = @actor.states_turn[state]
- unless remain_turn.integer?
- remain_turn = ((remain_turn*100).round)/100.0
- end
- state_turn = remain_turn.to_s+$data_states[state].unit#"回合"
- end #永久
- else
- case @actor.states_turn[state]
- when -1
- state_turn = "永久"
- when -2
- state_turn = "固有"
- when -3
- state_turn = "潜能"
- #######
- when -4
- state_turn = "援护"
- else
- state_turn = "永久"
- end
- end
- else
- state_turn = "永久"
- end
- self.contents.draw_text(x + 136, y, 80, @row_spacing,state_turn, 1)
- end
- end
复制代码 |
|