赞 | 1 |
VIP | 0 |
好人卡 | 85 |
积分 | 1 |
经验 | 41098 |
最后登录 | 2015-3-17 |
在线时间 | 1071 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 50
- 在线时间
- 1071 小时
- 注册时间
- 2011-5-12
- 帖子
- 2317
|
本帖最后由 月夜神音 于 2011-11-24 00:09 编辑
修改了一下,弄好了- #==============================================================================
- # ■ module n01
- #------------------------------------------------------------------------------
- # HP Gauge and State Indicator Add-on Ver1.1
- #
- # Do not use this add-on with the ATB. It is already built into the ATB.
- #==============================================================================
- module N01
-
- # Display the state of the selected battler.
- WORD_STATE_DISPLAY = true
-
- # Name to display when there is no abnormal state.
- WORD_NORMAL_STATE = "正常"
-
- # Displays the HP gauge of the selected battler.
- HP_DISPLAY = true
-
- # Displays the HP gauge of selected actors.
- ACTOR_DISPLAY = true
-
- # Do not display the HP gauge and states for the following enemies:
- ENEMY_NON_DISPLAY = [] # ex.[1,2,3]
-
- # Do not display the following states ID as abnormal:
- STATE_NON_DISPLAY = [] # ex.[1,2,3]
-
-
- end
- #-------------------------------設定ここまで-----------------------------------
- #==============================================================================
- # ■ Window_Help
- #------------------------------------------------------------------------------
- # スキルやアイテムの説明、アクターのステータスなどを表示するウィンドウです。
- #==============================================================================
- class Window_Help < Window_Base
- #--------------------------------------------------------------------------
- # ● テキスト設定
- #--------------------------------------------------------------------------
- def set_text_n01add(member)
- self.contents.clear
- self.contents.font.color = normal_color
- if !member.actor? && N01::ENEMY_NON_DISPLAY.include?(member.enemy_id)
- return self.contents.draw_text(4, 0, self.width - 40, WLH, member.name, 1)
- elsif member.actor? && !N01::ACTOR_DISPLAY
- return self.contents.draw_text(4, 0, self.width - 40, WLH, member.name, 1)
- end
- if N01::WORD_STATE_DISPLAY && N01::HP_DISPLAY
- self.contents.draw_text(0, 0, 180, WLH, member.name, 1)
- i = 0
- for state in member.states
- i += 1
- draw_icon(state.icon_index,i * 24 + 160,0)
- end
- elsif N01::WORD_STATE_DISPLAY
- text = member.name + " ["
- for state in member.states
- next if N01::STATE_NON_DISPLAY.include?(state.id)
- text += " " if text != member.name + " ["
- text += state.name
- end
- text += N01::WORD_NORMAL_STATE if text == member.name + " ["
- text += "]"
- text = "" if text == "[]"
- self.contents.draw_text(4, 0, self.width - 40, WLH, text, 1)
- elsif N01::HP_DISPLAY
- self.contents.draw_text(4, 0, 240, WLH, member.name, 1)
- draw_actor_hp(member, 262, 0, 120)
- draw_actor_mp(member, 478, 0, 100)
- end
- end
- end
- #==============================================================================
- # ■ Scene_Battle
- #------------------------------------------------------------------------------
- # バトル画面の処理を行うクラスです。
- #==============================================================================
- class Scene_Battle < Scene_Base
- #--------------------------------------------------------------------------
- # ● ターゲット選択の開始
- #--------------------------------------------------------------------------
- def start_target_selection(actor = false)
- members = $game_party.members if actor
- members = $game_troop.members unless actor
- # カーソルスプライトの作成
- @cursor = Sprite.new
- @cursor.bitmap = Cache.character("cursor")
- @cursor.src_rect.set(0, 0, 32, 32)
- @cursor_flame = 0
- @cursor.x = -200
- @cursor.y = -200
- @cursor.ox = @cursor.width
- @cursor.oy = @cursor.height
- # ターゲット名を表示するヘルプウインドウを作成
- @help_window.visible = false if @help_window != nil
- @help_window2 = Window_Help.new if @help_window2 == nil
- # 不要なウインドウを消す
- @actor_command_window.active = false
- @skill_window.visible = false if @skill_window != nil
- @item_window.visible = false if @item_window != nil
- # 存在しているターゲットで最も番号の低い対象を最初に指すように
- @index = 0
- @max_index = members.size - 1
- # アクターは戦闘不能者でもターゲットできるようにエネミーと区別
- unless actor
- members.size.times do
- break if members[@index].exist?
- @index += 1
- end
- end
- @help_window2.set_text_n01add(members[@index])
- select_member(actor)
- end
- #--------------------------------------------------------------------------
- # ● カーソルを前に移動
- #--------------------------------------------------------------------------
- def cursor_up(members, actor)
- Sound.play_cursor
- members.size.times do
- @index += members.size - 1
- @index %= members.size
- break if actor
- break if members[@index].exist?
- end
- @help_window2.set_text_n01add(members[@index])
- end
- #--------------------------------------------------------------------------
- # ● カーソルを次に移動
- #--------------------------------------------------------------------------
- def cursor_down(members, actor)
- Sound.play_cursor
- members.size.times do
- @index += 1
- @index %= members.size
- break if actor
- break if members[@index].exist? && !actor
- end
- @help_window2.set_text_n01add(members[@index])
- end
- end
复制代码 |
|