设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 1717|回复: 0
打印 上一主题 下一主题

[已经过期] 请高手将这个脚本改成VA,这是VX

[复制链接]

Lv1.梦旅人

梦石
0
星屑
55
在线时间
183 小时
注册时间
2013-5-28
帖子
71
跳转到指定楼层
1
发表于 2013-9-12 17:42:04 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有帐号?注册会员

x
  1. #==============================================================================
  2. # ■ VX-RGSS-23 スキル画面-改 [Ver.1.0.0]            by Claimh
  3. #------------------------------------------------------------------------------
  4. # スキル画面(戦闘以外)を改変します。
  5. #【変更点】
  6. # ・スキル情報ウィンドウ追加
  7. # ・アクターウィンドウの表示変更
  8. # ・レイアウト変更
  9. #==============================================================================

  10. module SkillEx
  11.   # 属性表示あり
  12.   USE_ELE = true
  13.   # 表示対象の属性
  14.   ELEMENTS = [9,10,11,12,13,14,15,16]
  15.   # 属性のアイコン[ID:0,…]
  16.   E_ICON = [0, 50, 2, 4, 14, 16, 12, 0, 0,
  17.             104, 105, 106, 107, 108, 109, 110, 111]
  18. end

  19. #==============================================================================
  20. # ■ Window_SkillList
  21. #==============================================================================
  22. class Window_SkillList < Window_Selectable
  23.   attr_accessor :info_window
  24.   #--------------------------------------------------------------------------
  25.   # ● オブジェクト初期化
  26.   #     actor  : アクター
  27.   #--------------------------------------------------------------------------
  28.   def initialize(actor, h=416-(WLH+32))
  29.     super(0, WLH+32, 280, h)
  30.     [url=home.php?mod=space&uid=95897]@actor[/url] = actor
  31.     @column_max = 1
  32.     self.index = 0
  33.     @info_window = nil
  34.     data_refresh
  35.     update_cursor
  36.   end
  37.   #--------------------------------------------------------------------------
  38.   # ● スキルの取得
  39.   #--------------------------------------------------------------------------
  40.   def skill
  41.     return @data[self.index]
  42.   end
  43.   #--------------------------------------------------------------------------
  44.   # ● データリフレッシュ
  45.   #--------------------------------------------------------------------------
  46.   def data_refresh
  47.     @data = []
  48.     for skill in @actor.skills
  49.       @data.push(skill)
  50.       if skill.id == @actor.last_skill_id
  51.         self.index = @data.size - 1
  52.       end
  53.     end
  54.     @item_max = @data.size
  55.     create_contents
  56.     refresh
  57.   end
  58.   #--------------------------------------------------------------------------
  59.   # ● リフレッシュ
  60.   #--------------------------------------------------------------------------
  61.   def refresh
  62.     self.contents.clear
  63.     for i in 0...@item_max
  64.       draw_item(i, false)
  65.     end
  66.   end
  67.   #--------------------------------------------------------------------------
  68.   # ● 項目の描画
  69.   #     index : 項目番号
  70.   #--------------------------------------------------------------------------
  71.   def draw_item(index, clear=true)
  72.     rect = item_rect(index)
  73.     self.contents.clear_rect(rect) if clear
  74.     skill = @data[index]
  75.     if skill != nil
  76.       rect.width -= 4
  77.       enabled = @actor.skill_can_use?(skill)
  78.       draw_item_name(skill, rect.x, rect.y, enabled)
  79.       self.contents.draw_text(rect, @actor.calc_mp_cost(skill), 2)
  80.     end
  81.   end
  82.   #--------------------------------------------------------------------------
  83.   # ● ヘルプテキスト更新
  84.   #--------------------------------------------------------------------------
  85.   def update_help
  86.     @help_window.set_text(skill == nil ? "" : skill.description)
  87.     @info_window.refresh(skill) unless @info_window.nil?
  88.   end
  89. end

  90. #==============================================================================
  91. # ■ Window_SkillUser
  92. #==============================================================================
  93. class Window_SkillUser < Window_Base
  94.   #--------------------------------------------------------------------------
  95.   # ● オブジェクト初期化
  96.   #     actor : アクター
  97.   #--------------------------------------------------------------------------
  98.   def initialize(actor)
  99.     super(280, WLH+32, 264, WLH*4 + 32)
  100.     @actor = actor
  101.     refresh
  102.   end
  103.   #--------------------------------------------------------------------------
  104.   # ● リフレッシュ
  105.   #--------------------------------------------------------------------------
  106.   def refresh
  107.     self.contents.clear
  108.     draw_actor_face(@actor, 0, 0)
  109.     draw_actor_name(@actor, 100, 0)
  110. #    draw_actor_level(@actor, 170, 0)
  111.     draw_actor_hp(@actor, 110, WLH*1)
  112.     draw_actor_mp(@actor, 110, WLH*2)
  113.     draw_actor_state(@actor, 110, WLH*3)
  114.   end
  115. end

  116. #==============================================================================
  117. # ■ Window_SkillInfo
  118. #==============================================================================
  119. class Window_SkillInfo < Window_Base
  120.   #--------------------------------------------------------------------------
  121.   # ● オブジェクト初期化
  122.   #--------------------------------------------------------------------------
  123.   def initialize(y=WLH*5+64, h=416-(WLH*5+64))
  124.     super(280, y, 264, h)
  125.   end
  126.   #--------------------------------------------------------------------------
  127.   # ● リフレッシュ
  128.   #--------------------------------------------------------------------------
  129.   SCOPE = ["なし", "敵単体", "敵全体", "敵単体",
  130.            "敵単体", "敵二体", "敵三体", "味方単体",
  131.            "味方全体", "味方単体", "味方全体", "使用者"]
  132.   def refresh(skill=nil)
  133.     self.contents.clear
  134.     return if skill.nil?
  135.     self.contents.font.color = system_color
  136.     self.contents.draw_text(0, WLH*0, 100, WLH, "種別")
  137.     self.contents.draw_text(0, WLH*1, 100, WLH, "効果範囲")
  138.     self.contents.draw_text(0, WLH*2, 100, WLH, "命中率")
  139.     self.contents.draw_text(0, WLH*3, 100, WLH, "属性") if SkillEx::USE_ELE
  140.     self.contents.font.color = normal_color
  141.     if skill.base_damage > 0
  142.       txt = skill.physical_attack ? "物理攻撃" : "攻撃魔法"
  143.     elsif skill.base_damage < 0
  144.       txt = skill.physical_attack ? "回復スキル" : "回復魔法"
  145.     else # とりあえず…
  146.       txt = skill.physical_attack ? "特殊スキル" : "補助魔法"
  147.     end
  148.     self.contents.draw_text(100, WLH*0, 160, WLH, txt)
  149.     self.contents.draw_text(100, WLH*1, 200, WLH, SCOPE[skill.scope])
  150.     self.contents.draw_text(100, WLH*2, 60, WLH, skill.hit.to_s+" %", 2)
  151.     if SkillEx::USE_ELE
  152.       i = 0
  153.       for element_id in skill.element_set
  154.         next unless SkillEx::ELEMENTS.include?(element_id)
  155.         draw_element_icon(element_id, 100+i*24, WLH*3)
  156.         i += 1
  157.       end
  158.     end
  159.   end
  160.   #--------------------------------------------------------------------------
  161.   # ● 属性アイコンの描画
  162.   #--------------------------------------------------------------------------
  163.   def draw_element_icon(element_id, x, y, enabled = true)
  164.     draw_icon(SkillEx::E_ICON[element_id], x, y, enabled)
  165.   end
  166. end

  167. #==============================================================================
  168. # ■ Scene_Skill
  169. #==============================================================================
  170. class Scene_Skill < Scene_Base
  171.   #--------------------------------------------------------------------------
  172.   # ● オブジェクト初期化
  173.   #     actor_index : アクターインデックス
  174.   #--------------------------------------------------------------------------
  175.   def initialize(actor_index = 0, menu_index = 1)
  176.     @actor_index = actor_index
  177.     @menu_index = menu_index
  178.   end
  179.   #--------------------------------------------------------------------------
  180.   # ● 開始処理
  181.   #--------------------------------------------------------------------------
  182.   def start
  183.     super
  184.     create_menu_background
  185.     @actor = $game_party.members[@actor_index]
  186.     @viewport = Viewport.new(0, 0, 544, 416)
  187.     @help_window = Window_Help.new
  188.     @help_window.viewport = @viewport
  189.     @status_window = Window_SkillUser.new(@actor)
  190.     @status_window.viewport = @viewport
  191.     @info_window = Window_SkillInfo.new
  192.     @info_window.viewport = @viewport
  193.     @skill_window = Window_SkillList.new(@actor)
  194.     @skill_window.viewport = @viewport
  195.     @skill_window.info_window = @info_window
  196.     @skill_window.help_window = @help_window
  197.     @target_window = Window_MenuStatus.new(0, 0)
  198.     hide_target_window
  199.   end
  200.   #--------------------------------------------------------------------------
  201.   # ● 終了処理
  202.   #--------------------------------------------------------------------------
  203.   def terminate
  204.     super
  205.     dispose_menu_background
  206.     @help_window.dispose
  207.     @status_window.dispose
  208.     @info_window.dispose
  209.     @skill_window.dispose
  210.     @target_window.dispose
  211.   end
  212.   #--------------------------------------------------------------------------
  213.   # ● 元の画面へ戻る
  214.   #--------------------------------------------------------------------------
  215.   def return_scene
  216.     $scene = Scene_Menu.new(@menu_index)
  217.   end
  218.   #--------------------------------------------------------------------------
  219.   # ● 次のアクターの画面に切り替え
  220.   #--------------------------------------------------------------------------
  221.   def next_actor
  222.     @actor_index += 1
  223.     @actor_index %= $game_party.members.size
  224.     $scene = Scene_Skill.new(@actor_index, @menu_index)
  225.   end
  226.   #--------------------------------------------------------------------------
  227.   # ● 前のアクターの画面に切り替え
  228.   #--------------------------------------------------------------------------
  229.   def prev_actor
  230.     @actor_index += $game_party.members.size - 1
  231.     @actor_index %= $game_party.members.size
  232.     $scene = Scene_Skill.new(@actor_index, @menu_index)
  233.   end
  234.   #--------------------------------------------------------------------------
  235.   # ● スキルの決定
  236.   #--------------------------------------------------------------------------
  237.   def determine_skill
  238.     if @skill.for_friend?
  239.       show_target_window(true) # 常に右
  240.       if @skill.for_all?
  241.         @target_window.index = 99
  242.       elsif @skill.for_user?
  243.         @target_window.index = @actor_index + 100
  244.       else
  245.         if $game_party.last_target_index < @target_window.item_max
  246.           @target_window.index = $game_party.last_target_index
  247.         else
  248.           @target_window.index = 0
  249.         end
  250.       end
  251.     else
  252.       use_skill_nontarget
  253.     end
  254.   end
  255. end

复制代码
  1. #==============================================================================
  2. # ■ VX-RGSS-23 スキル画面-改-battle [Ver.1.0.0]            by Claimh
  3. #------------------------------------------------------------------------------
  4. # 戦闘でのスキルリスト表示を改変します。
  5. #【変更点】
  6. # ・スキル情報ウィンドウ追加
  7. # ・レイアウト変更
  8. #==============================================================================

  9. class Scene_Battle < Scene_Base
  10.   #--------------------------------------------------------------------------
  11.   # ● スキル選択の開始
  12.   #--------------------------------------------------------------------------
  13.   def start_skill_selection
  14.     @help_window = Window_Help.new
  15.     @skill_window = Window_SkillList.new(@active_battler, 232)
  16.     @sk_info_window = Window_SkillInfo.new(24+32, 232)
  17.     @skill_window.info_window = @sk_info_window
  18.     @skill_window.help_window = @help_window
  19.     @actor_command_window.active = false
  20.   end
  21.   #--------------------------------------------------------------------------
  22.   # ● スキル選択の終了
  23.   #--------------------------------------------------------------------------
  24.   def end_skill_selection
  25.     if @skill_window != nil
  26.       @skill_window.dispose
  27.       @sk_info_window.dispose
  28.       @skill_window = @sk_info_window = nil
  29.       @help_window.dispose
  30.       @help_window = nil
  31.     end
  32.     @actor_command_window.active = true
  33.   end
  34. end

复制代码
小弟在这里谢过了。。。  这是技能属性状态
您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-10-10 11:26

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表