赞 | 0 |
VIP | 0 |
好人卡 | 0 |
积分 | 1 |
经验 | 7697 |
最后登录 | 2021-6-18 |
在线时间 | 183 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 55
- 在线时间
- 183 小时
- 注册时间
- 2013-5-28
- 帖子
- 71
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
- #==============================================================================
- # ■ VX-RGSS-23 スキル画面-改 [Ver.1.0.0] by Claimh
- #------------------------------------------------------------------------------
- # スキル画面(戦闘以外)を改変します。
- #【変更点】
- # ・スキル情報ウィンドウ追加
- # ・アクターウィンドウの表示変更
- # ・レイアウト変更
- #==============================================================================
- module SkillEx
- # 属性表示あり
- USE_ELE = true
- # 表示対象の属性
- ELEMENTS = [9,10,11,12,13,14,15,16]
- # 属性のアイコン[ID:0,…]
- E_ICON = [0, 50, 2, 4, 14, 16, 12, 0, 0,
- 104, 105, 106, 107, 108, 109, 110, 111]
- end
- #==============================================================================
- # ■ Window_SkillList
- #==============================================================================
- class Window_SkillList < Window_Selectable
- attr_accessor :info_window
- #--------------------------------------------------------------------------
- # ● オブジェクト初期化
- # actor : アクター
- #--------------------------------------------------------------------------
- def initialize(actor, h=416-(WLH+32))
- super(0, WLH+32, 280, h)
- [url=home.php?mod=space&uid=95897]@actor[/url] = actor
- @column_max = 1
- self.index = 0
- @info_window = nil
- data_refresh
- update_cursor
- end
- #--------------------------------------------------------------------------
- # ● スキルの取得
- #--------------------------------------------------------------------------
- def skill
- return @data[self.index]
- end
- #--------------------------------------------------------------------------
- # ● データリフレッシュ
- #--------------------------------------------------------------------------
- def data_refresh
- @data = []
- for skill in @actor.skills
- @data.push(skill)
- if skill.id == @actor.last_skill_id
- self.index = @data.size - 1
- end
- end
- @item_max = @data.size
- create_contents
- refresh
- end
- #--------------------------------------------------------------------------
- # ● リフレッシュ
- #--------------------------------------------------------------------------
- def refresh
- self.contents.clear
- for i in 0...@item_max
- draw_item(i, false)
- end
- end
- #--------------------------------------------------------------------------
- # ● 項目の描画
- # index : 項目番号
- #--------------------------------------------------------------------------
- def draw_item(index, clear=true)
- rect = item_rect(index)
- self.contents.clear_rect(rect) if clear
- skill = @data[index]
- if skill != nil
- rect.width -= 4
- enabled = @actor.skill_can_use?(skill)
- draw_item_name(skill, rect.x, rect.y, enabled)
- self.contents.draw_text(rect, @actor.calc_mp_cost(skill), 2)
- end
- end
- #--------------------------------------------------------------------------
- # ● ヘルプテキスト更新
- #--------------------------------------------------------------------------
- def update_help
- @help_window.set_text(skill == nil ? "" : skill.description)
- @info_window.refresh(skill) unless @info_window.nil?
- end
- end
- #==============================================================================
- # ■ Window_SkillUser
- #==============================================================================
- class Window_SkillUser < Window_Base
- #--------------------------------------------------------------------------
- # ● オブジェクト初期化
- # actor : アクター
- #--------------------------------------------------------------------------
- def initialize(actor)
- super(280, WLH+32, 264, WLH*4 + 32)
- @actor = actor
- refresh
- end
- #--------------------------------------------------------------------------
- # ● リフレッシュ
- #--------------------------------------------------------------------------
- def refresh
- self.contents.clear
- draw_actor_face(@actor, 0, 0)
- draw_actor_name(@actor, 100, 0)
- # draw_actor_level(@actor, 170, 0)
- draw_actor_hp(@actor, 110, WLH*1)
- draw_actor_mp(@actor, 110, WLH*2)
- draw_actor_state(@actor, 110, WLH*3)
- end
- end
- #==============================================================================
- # ■ Window_SkillInfo
- #==============================================================================
- class Window_SkillInfo < Window_Base
- #--------------------------------------------------------------------------
- # ● オブジェクト初期化
- #--------------------------------------------------------------------------
- def initialize(y=WLH*5+64, h=416-(WLH*5+64))
- super(280, y, 264, h)
- end
- #--------------------------------------------------------------------------
- # ● リフレッシュ
- #--------------------------------------------------------------------------
- SCOPE = ["なし", "敵単体", "敵全体", "敵単体",
- "敵単体", "敵二体", "敵三体", "味方単体",
- "味方全体", "味方単体", "味方全体", "使用者"]
- def refresh(skill=nil)
- self.contents.clear
- return if skill.nil?
- self.contents.font.color = system_color
- self.contents.draw_text(0, WLH*0, 100, WLH, "種別")
- self.contents.draw_text(0, WLH*1, 100, WLH, "効果範囲")
- self.contents.draw_text(0, WLH*2, 100, WLH, "命中率")
- self.contents.draw_text(0, WLH*3, 100, WLH, "属性") if SkillEx::USE_ELE
- self.contents.font.color = normal_color
- if skill.base_damage > 0
- txt = skill.physical_attack ? "物理攻撃" : "攻撃魔法"
- elsif skill.base_damage < 0
- txt = skill.physical_attack ? "回復スキル" : "回復魔法"
- else # とりあえず…
- txt = skill.physical_attack ? "特殊スキル" : "補助魔法"
- end
- self.contents.draw_text(100, WLH*0, 160, WLH, txt)
- self.contents.draw_text(100, WLH*1, 200, WLH, SCOPE[skill.scope])
- self.contents.draw_text(100, WLH*2, 60, WLH, skill.hit.to_s+" %", 2)
- if SkillEx::USE_ELE
- i = 0
- for element_id in skill.element_set
- next unless SkillEx::ELEMENTS.include?(element_id)
- draw_element_icon(element_id, 100+i*24, WLH*3)
- i += 1
- end
- end
- end
- #--------------------------------------------------------------------------
- # ● 属性アイコンの描画
- #--------------------------------------------------------------------------
- def draw_element_icon(element_id, x, y, enabled = true)
- draw_icon(SkillEx::E_ICON[element_id], x, y, enabled)
- end
- end
- #==============================================================================
- # ■ Scene_Skill
- #==============================================================================
- class Scene_Skill < Scene_Base
- #--------------------------------------------------------------------------
- # ● オブジェクト初期化
- # actor_index : アクターインデックス
- #--------------------------------------------------------------------------
- def initialize(actor_index = 0, menu_index = 1)
- @actor_index = actor_index
- @menu_index = menu_index
- end
- #--------------------------------------------------------------------------
- # ● 開始処理
- #--------------------------------------------------------------------------
- def start
- super
- create_menu_background
- @actor = $game_party.members[@actor_index]
- @viewport = Viewport.new(0, 0, 544, 416)
- @help_window = Window_Help.new
- @help_window.viewport = @viewport
- @status_window = Window_SkillUser.new(@actor)
- @status_window.viewport = @viewport
- @info_window = Window_SkillInfo.new
- @info_window.viewport = @viewport
- @skill_window = Window_SkillList.new(@actor)
- @skill_window.viewport = @viewport
- @skill_window.info_window = @info_window
- @skill_window.help_window = @help_window
- @target_window = Window_MenuStatus.new(0, 0)
- hide_target_window
- end
- #--------------------------------------------------------------------------
- # ● 終了処理
- #--------------------------------------------------------------------------
- def terminate
- super
- dispose_menu_background
- @help_window.dispose
- @status_window.dispose
- @info_window.dispose
- @skill_window.dispose
- @target_window.dispose
- end
- #--------------------------------------------------------------------------
- # ● 元の画面へ戻る
- #--------------------------------------------------------------------------
- def return_scene
- $scene = Scene_Menu.new(@menu_index)
- end
- #--------------------------------------------------------------------------
- # ● 次のアクターの画面に切り替え
- #--------------------------------------------------------------------------
- def next_actor
- @actor_index += 1
- @actor_index %= $game_party.members.size
- $scene = Scene_Skill.new(@actor_index, @menu_index)
- end
- #--------------------------------------------------------------------------
- # ● 前のアクターの画面に切り替え
- #--------------------------------------------------------------------------
- def prev_actor
- @actor_index += $game_party.members.size - 1
- @actor_index %= $game_party.members.size
- $scene = Scene_Skill.new(@actor_index, @menu_index)
- end
- #--------------------------------------------------------------------------
- # ● スキルの決定
- #--------------------------------------------------------------------------
- def determine_skill
- if @skill.for_friend?
- show_target_window(true) # 常に右
- if @skill.for_all?
- @target_window.index = 99
- elsif @skill.for_user?
- @target_window.index = @actor_index + 100
- else
- if $game_party.last_target_index < @target_window.item_max
- @target_window.index = $game_party.last_target_index
- else
- @target_window.index = 0
- end
- end
- else
- use_skill_nontarget
- end
- end
- end
复制代码- #==============================================================================
- # ■ VX-RGSS-23 スキル画面-改-battle [Ver.1.0.0] by Claimh
- #------------------------------------------------------------------------------
- # 戦闘でのスキルリスト表示を改変します。
- #【変更点】
- # ・スキル情報ウィンドウ追加
- # ・レイアウト変更
- #==============================================================================
- class Scene_Battle < Scene_Base
- #--------------------------------------------------------------------------
- # ● スキル選択の開始
- #--------------------------------------------------------------------------
- def start_skill_selection
- @help_window = Window_Help.new
- @skill_window = Window_SkillList.new(@active_battler, 232)
- @sk_info_window = Window_SkillInfo.new(24+32, 232)
- @skill_window.info_window = @sk_info_window
- @skill_window.help_window = @help_window
- @actor_command_window.active = false
- end
- #--------------------------------------------------------------------------
- # ● スキル選択の終了
- #--------------------------------------------------------------------------
- def end_skill_selection
- if @skill_window != nil
- @skill_window.dispose
- @sk_info_window.dispose
- @skill_window = @sk_info_window = nil
- @help_window.dispose
- @help_window = nil
- end
- @actor_command_window.active = true
- end
- end
复制代码 小弟在这里谢过了。。。 这是技能属性状态 |
|