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

Project1

 找回密码
 注册会员
搜索
楼主: 沉影不器
打印 上一主题 下一主题

[RMVX发布] 支持鼠标 vx新菜单样式 v1.24 (2008-11-07 更新)

 关闭 [复制链接]
头像被屏蔽

Lv1.梦旅人 (禁止发言)

梦石
0
星屑
50
在线时间
1 小时
注册时间
2008-8-10
帖子
273
61
发表于 2008-9-6 04:25:20 | 只看该作者
不客气的收了···嘿嘿···不过这适合ARPG的··不适合回合战··{/cy}
回复 支持 反对

使用道具 举报

Lv2.观梦者 (管理员)

八云紫的式神

梦石
0
星屑
574
在线时间
1243 小时
注册时间
2008-1-1
帖子
4282

烫烫烫

62
发表于 2008-9-6 17:38:34 | 只看该作者
个人原因不喜欢新建鼠标图标,已去除这部分功能,对象灵敏度也减了一些
那如果要自建鼠标图标应该怎么改呢?
rm for linux(wine)制作中,期待夏娜SAMA能实现到webrm上
回复 支持 反对

使用道具 举报

Lv3.寻梦者 (暗夜天使)

名侦探小柯

梦石
0
星屑
3294
在线时间
3618 小时
注册时间
2006-9-6
帖子
37400

开拓者贵宾第3届短篇游戏大赛主流游戏组亚军第5届短篇游戏比赛亚军

63
发表于 2008-9-6 18:44:32 | 只看该作者
话说装备扩充之类的怎么整合进去呢…… = =
回复 支持 反对

使用道具 举报

Lv2.观梦者 (管理员)

八云紫的式神

梦石
0
星屑
574
在线时间
1243 小时
注册时间
2008-1-1
帖子
4282

烫烫烫

64
发表于 2008-9-6 22:01:31 | 只看该作者
以下引用越前リョーマ于2008-9-6 10:44:32的发言:

话说装备扩充之类的怎么整合进去呢…… = =

LZ说跟默认脚本类似
rm for linux(wine)制作中,期待夏娜SAMA能实现到webrm上
回复 支持 反对

使用道具 举报

头像被屏蔽

Lv1.梦旅人 (禁止发言)

梦石
0
星屑
46
在线时间
10 小时
注册时间
2007-5-27
帖子
2558

第1届Title华丽大赛新人奖

65
 楼主| 发表于 2008-9-7 04:26:33 | 只看该作者
以下引用越前リョーマ于2008-9-6 10:44:32的发言:

话说装备扩充之类的怎么整合进去呢…… = =

装备扩充是啥脚本{/fd}

准备继续更新,将有更强的兼容性

以下引用zh99998于2008-9-6 9:38:34的发言:
那如果要自建鼠标图标应该怎么改呢?

更新兼容性的同时,会顺便改回去.
签名被屏蔽
回复 支持 反对

使用道具 举报

Lv3.寻梦者 (暗夜天使)

名侦探小柯

梦石
0
星屑
3294
在线时间
3618 小时
注册时间
2006-9-6
帖子
37400

开拓者贵宾第3届短篇游戏大赛主流游戏组亚军第5届短篇游戏比赛亚军

66
发表于 2008-9-7 05:07:27 | 只看该作者
以下引用沉影不器于2008-9-6 20:26:33的发言:


以下引用越前リョーマ于2008-9-6 10:44:32的发言:

话说装备扩充之类的怎么整合进去呢…… = =


装备扩充是啥脚本

准备继续更新,将有更强的兼容性


以下引用zh99998于2008-9-6 9:38:34的发言:
那如果要自建鼠标图标应该怎么改呢?


更新兼容性的同时,会顺便改回去.

就是可以装备更多装备个数的……简单的说就是装备栏增加……{/gg}
回复 支持 反对

使用道具 举报

头像被屏蔽

Lv1.梦旅人 (禁止发言)

梦石
0
星屑
50
在线时间
0 小时
注册时间
2008-2-6
帖子
58
67
发表于 2008-9-7 05:19:56 | 只看该作者
可否提供脚本,正好供我测试兼容性
签名被屏蔽
回复 支持 反对

使用道具 举报

Lv3.寻梦者 (暗夜天使)

名侦探小柯

梦石
0
星屑
3294
在线时间
3618 小时
注册时间
2006-9-6
帖子
37400

开拓者贵宾第3届短篇游戏大赛主流游戏组亚军第5届短篇游戏比赛亚军

68
发表于 2008-9-7 05:34:11 | 只看该作者
以下引用沉影于2008-9-6 21:19:56的发言:

可否提供脚本,正好供我测试兼容性

不过应该没关系……
本区不是还有个人写了个兼容的版本嘛……{/hx}
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
1 小时
注册时间
2008-8-3
帖子
976
69
发表于 2008-9-7 06:43:04 | 只看该作者
以下引用越前リョーマ于2008-9-6 10:44:32的发言:

话说装备扩充之类的怎么整合进去呢…… = =


装备扩充脚本……

话说我都没搞懂那个日文版的脚本怎么用……莫名其妙的就是和我的等级能力限制脚本冲突{/dk}{/dk}{/dk}
扩充的装备无法读取LVlimit等函数= =

就是这东西
  1. 0#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
  2. #_/    ◆ 装備拡張 - KGC_EquipExtension ◆ VX ◆
  3. #_/    ◇ Last update : 2008/03/02 ◇
  4. #_/----------------------------------------------------------------------------
  5. #_/  装備関連の機能を拡張します。
  6. #_/============================================================================
  7. #_/ 【メニュー】≪拡張装備画面≫ より下に導入してください。
  8. #_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/

  9. #==============================================================================
  10. # ★ カスタマイズ項目 - Customize ★
  11. #==============================================================================

  12. module KGC
  13. module EquipExtension
  14.   # ◆ 拡張装備種別
  15.   #  先頭から順に 4, 5, 6, ... が割り当てられる。
  16.   EXTRA_EQUIP_KIND = ["足", "技能書"]

  17.   # ◆ 装備箇所リスト
  18.   #  武器の後に、ここで指定した順番で並ぶ。
  19.   #  ※ 装備箇所が最低一つないと、二刀流がバグる可能性があります。
  20.   #   ** 装備種別一覧 **
  21.   #  0..盾  1..頭  2..身体  3..装飾品  4~..↑で定義
  22.   EQUIP_TYPE = [0, 1, 2, 4, 3, 3, 5]

  23.   # ◆ EP (Equip Point) 制を使用する
  24.   USE_EP_SYSTEM = true
  25.   # ◆ EP の名前
  26.   VOCAB_EP   = "EP"
  27.   # ◆ EP の名前 (略)
  28.   VOCAB_EP_A = "E"
  29.   # ◆ ステータス画面に EP を表示する
  30.   SHOW_STATUS_EP = true

  31.   # ◆ 消費 EP 既定値
  32.   #  消費 EP が指定されていない装備品で使用。
  33.   DEFAULT_EP_COST   = 1
  34.   # ◆ 消費 EP 0 は表示しない
  35.   HIDE_ZERO_EP_COST = true

  36.   # ◆ EP 上限
  37.   EP_MAX = 20
  38.   # ◆ EP 下限
  39.   EP_MIN = 5
  40.   # ◆ 最大 EP 算出式
  41.   #   level..アクターのレベル
  42.   #  自動的に整数変換されるので、結果が小数になってもOK。
  43.   EP_CALC_EXP = "level * 0.3 + 4"

  44.   # ◆ 消費 EP 値の色 (アイテム名の末尾に付く数値)
  45.   #  数値  : \C[n] と同じ色。
  46.   #  Color : 指定した色。 ( Color.new(128, 255, 255) など )
  47.   EP_COST_COLOR        = 23
  48.   # ◆ EP ゲージの開始色
  49.   EP_GAUGE_START_COLOR = 28
  50.   # ◆ EP ゲージの終了色
  51.   EP_GAUGE_END_COLOR   = 29
  52. end
  53. end

  54. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

  55. $imported = {} if $imported == nil
  56. $imported["EquipExtension"] = true

  57. module KGC::EquipExtension
  58.   # EP 制を使用しない場合の設定
  59.   unless USE_EP_SYSTEM
  60.     SHOW_STATUS_EP = false
  61.     HIDE_ZERO_EP_COST = true
  62.   end

  63.   # 正規表現
  64.   module Regexp
  65.     # ベースアイテム
  66.     module BaseItem
  67.       # 消費 EP
  68.       EP_COST = /<EP\s*(\d+)>/i
  69.       # 装備タイプ
  70.       EQUIP_TYPE = /<(?:EQUIP_TYPE|装備タイプ)\s*(\d+(?:\s*,\s*\d+)*)>/
  71.     end

  72.     # 防具
  73.     module Armor
  74.       # 装備種別
  75.       EQUIP_KIND = /<(?:EQUIP_KIND|装備種別)\s*(.+)>/i
  76.     end
  77.   end
  78. end

  79. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

  80. #==============================================================================
  81. # □ KGC::Commands
  82. #==============================================================================

  83. module KGC
  84. module Commands
  85.   module_function
  86.   #--------------------------------------------------------------------------
  87.   # ○ アクターの装備を修復
  88.   #--------------------------------------------------------------------------
  89.   def restore_equip
  90.     (1...$data_actors.size).each { |i|
  91.       actor = $game_actors[i]
  92.       actor.restore_equip
  93.     }
  94.   end
  95.   #--------------------------------------------------------------------------
  96.   # ○ アクターの装備タイプを設定
  97.   #     actor_id   : アクター ID
  98.   #     equip_type : 装備タイプ
  99.   #--------------------------------------------------------------------------
  100.   def set_actor_equip_type(actor_id, equip_type = nil)
  101.     actor = $game_actors[actor_id]
  102.     return if actor == nil
  103.     actor.equip_type = equip_type
  104.   end
  105.   #--------------------------------------------------------------------------
  106.   # ○ アクターの装備を変更
  107.   #     actor_id   : アクター ID
  108.   #     index      : 装備部位 (0~)
  109.   #     item_id    : 武器 or 防具 ID (0 で解除)
  110.   #--------------------------------------------------------------------------
  111.   def change_actor_equipment(actor_id, index, item_id)
  112.     actor = $game_actors[actor_id]
  113.     return if actor == nil
  114.     actor.change_equip_by_id(index, item_id)
  115.   end
  116. end
  117. end

  118. class Game_Interpreter
  119.   include KGC::Commands
  120. end

  121. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

  122. #==============================================================================
  123. # ■ Vocab
  124. #==============================================================================

  125. module Vocab
  126.   # EP
  127.   def self.ep
  128.     return KGC::EquipExtension::VOCAB_EP
  129.   end

  130.   # EP (略)
  131.   def self.ep_a
  132.     return KGC::EquipExtension::VOCAB_EP_A
  133.   end

  134.   # 拡張防具欄
  135.   def self.extra_armor(index)
  136.     return KGC::EquipExtension::EXTRA_EQUIP_KIND[index]
  137.   end
  138. end

  139. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

  140. #==============================================================================
  141. # ■ RPG::BaseItem
  142. #==============================================================================

  143. class RPG::BaseItem
  144.   #--------------------------------------------------------------------------
  145.   # ○ 装備拡張のキャッシュを作成
  146.   #--------------------------------------------------------------------------
  147.   def create_equip_extension_cache
  148.     @__ep_cost = KGC::EquipExtension::DEFAULT_EP_COST
  149.     @__equip_type = []

  150.     self.note.split(/[\r\n]+/).each { |line|
  151.       case line
  152.       when KGC::EquipExtension::Regexp::BaseItem::EP_COST
  153.         # 消費 EP
  154.         @__ep_cost = $1.to_i
  155.       when KGC::EquipExtension::Regexp::BaseItem::EQUIP_TYPE
  156.         # 装備タイプ
  157.         @__equip_type = []
  158.         $1.scan(/\d+/) { |num|
  159.           @__equip_type << num.to_i
  160.         }
  161.       end
  162.     }

  163.     # EP 制を使用しない場合は消費 EP = 0
  164.     @__ep_cost = 0 unless KGC::EquipExtension::USE_EP_SYSTEM
  165.   end
  166.   #--------------------------------------------------------------------------
  167.   # ○ 消費 EP
  168.   #--------------------------------------------------------------------------
  169.   def ep_cost
  170.     create_equip_extension_cache if @__ep_cost == nil
  171.     return @__ep_cost
  172.   end
  173.   #--------------------------------------------------------------------------
  174.   # ○ 装備タイプ
  175.   #--------------------------------------------------------------------------
  176.   def equip_type
  177.     create_equip_extension_cache if @__equip_type == nil
  178.     return @__equip_type
  179.   end
  180. end

  181. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

  182. #==============================================================================
  183. # ■ RPG::Armor
  184. #==============================================================================

  185. class RPG::Armor < RPG::BaseItem
  186.   #--------------------------------------------------------------------------
  187.   # ○ 装備拡張のキャッシュを作成
  188.   #--------------------------------------------------------------------------
  189.   def create_equip_extension_cache
  190.     super
  191.     @__kind = -1

  192.     self.note.split(/[\r\n]+/).each { |line|
  193.       if line =~ KGC::EquipExtension::Regexp::Armor::EQUIP_KIND
  194.         # 装備種別
  195.         e_index = KGC::EquipExtension::EXTRA_EQUIP_KIND.index($1)
  196.         next if e_index == nil
  197.         @__kind = e_index + 4
  198.       end
  199.     }
  200.   end

  201. unless $@
  202.   #--------------------------------------------------------------------------
  203.   # ○ 種別
  204.   #--------------------------------------------------------------------------
  205.   alias kind_KGC_EquipExtension kind
  206.   def kind
  207.     create_equip_extension_cache if @__kind == nil
  208.     return (@__kind == -1 ? kind_KGC_EquipExtension : @__kind)
  209.   end
  210. end

  211. end

  212. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

  213. #==============================================================================
  214. # ■ Game_Actor
  215. #==============================================================================

  216. class Game_Actor < Game_Battler
  217.   #--------------------------------------------------------------------------
  218.   # ● 公開インスタンス変数
  219.   #--------------------------------------------------------------------------
  220.   attr_writer   :equip_type               # 装備タイプ
  221.   #--------------------------------------------------------------------------
  222.   # ● セットアップ
  223.   #     actor_id : アクター ID
  224.   #--------------------------------------------------------------------------
  225.   alias setup_KGC_EquipExtension setup
  226.   def setup(actor_id)
  227.     actor = $data_actors[actor_id]
  228.     @extra_armor_id = []

  229.     setup_KGC_EquipExtension(actor_id)

  230.     restore_equip
  231.   end
  232.   #--------------------------------------------------------------------------
  233.   # ○ MaxEP 取得
  234.   #--------------------------------------------------------------------------
  235.   def maxep
  236.     n = Integer(eval(KGC::EquipExtension::EP_CALC_EXP))
  237.     return [[n, ep_limit].min, KGC::EquipExtension::EP_MIN].max
  238.   end
  239.   #--------------------------------------------------------------------------
  240.   # ○ EP 取得
  241.   #--------------------------------------------------------------------------
  242.   def ep
  243.     n = 0
  244.     equips.compact.each { |item| n += item.ep_cost }
  245.     return [maxep - n, 0].max
  246.   end
  247.   #--------------------------------------------------------------------------
  248.   # ○ EP 上限取得
  249.   #--------------------------------------------------------------------------
  250.   def ep_limit
  251.     return KGC::EquipExtension::EP_MAX
  252.   end
  253.   #--------------------------------------------------------------------------
  254.   # ○ 防具欄の取得
  255.   #--------------------------------------------------------------------------
  256.   def equip_type
  257.     if @equip_type.is_a?(Array)
  258.       return @equip_type
  259.     else
  260.       return KGC::EquipExtension::EQUIP_TYPE
  261.     end
  262.   end
  263.   #--------------------------------------------------------------------------
  264.   # ○ 防具欄の数
  265.   #--------------------------------------------------------------------------
  266.   def armor_number
  267.     return equip_type.size
  268.   end
  269.   #--------------------------------------------------------------------------
  270.   # ○ 拡張防具欄の数
  271.   #--------------------------------------------------------------------------
  272.   def extra_armor_number
  273.     return [armor_number - 4, 0].max
  274.   end
  275.   #--------------------------------------------------------------------------
  276.   # ○ 防具 ID リストの取得
  277.   #--------------------------------------------------------------------------
  278.   def extra_armor_id
  279.     @extra_armor_id = [] if @extra_armor_id == nil
  280.     return @extra_armor_id
  281.   end
  282.   #--------------------------------------------------------------------------
  283.   # ● 防具オブジェクトの配列取得
  284.   #--------------------------------------------------------------------------
  285.   alias armors_KGC_EquipExtension armors
  286.   def armors
  287.     result = armors_KGC_EquipExtension

  288.     # 5番目以降の防具を追加
  289.     extra_armor_number.times { |i|
  290.       armor_id = extra_armor_id[i]
  291.       result << (armor_id == nil ? nil : $data_armors[armor_id])
  292.     }
  293.     return result
  294.   end
  295.   #--------------------------------------------------------------------------
  296.   # ● 装備の変更 (オブジェクトで指定)
  297.   #     equip_type : 装備部位
  298.   #     item       : 武器 or 防具 (nil なら装備解除)
  299.   #     test       : テストフラグ (戦闘テスト、または装備画面での一時装備)
  300.   #--------------------------------------------------------------------------
  301.   alias change_equip_KGC_EquipExtension change_equip
  302.   def change_equip(equip_type, item, test = false)
  303.     change_equip_KGC_EquipExtension(equip_type, item, test)

  304.     # 拡張防具欄がある場合のみ
  305.     if extra_armor_number > 0
  306.       item_id = item == nil ? 0 : item.id
  307.       case equip_type
  308.       when 5..armor_number  # 拡張防具欄
  309.         @extra_armor_id = [] if @extra_armor_id == nil
  310.         @extra_armor_id[equip_type - 5] = item_id
  311.       end
  312.     end

  313.     restore_battle_skill if $imported["SkillCPSystem"]
  314.     restore_passive_rev  if $imported["PassiveSkill"]
  315.   end
  316.   #--------------------------------------------------------------------------
  317.   # ● 装備の破棄
  318.   #     item : 破棄する武器 or 防具
  319.   #    武器/防具の増減で「装備品も含める」のとき使用する。
  320.   #--------------------------------------------------------------------------
  321.   alias discard_equip_KGC_EquipExtension discard_equip
  322.   def discard_equip(item)
  323.     last_armors = [@armor1_id, @armor2_id, @armor3_id, @armor4_id]

  324.     discard_equip_KGC_EquipExtension(item)

  325.     curr_armors = [@armor1_id, @armor2_id, @armor3_id, @armor4_id]
  326.     return unless item.is_a?(RPG::Armor)  # 防具でない
  327.     return if last_armors != curr_armors  # 既に破棄された

  328.     # 拡張防具欄を検索
  329.     extra_armor_number.times { |i|
  330.       if extra_armor_id[i] == item.id
  331.         @extra_armor_id[i] = 0
  332.         break
  333.       end
  334.     }

  335.     restore_battle_skill if $imported["SkillCPSystem"]
  336.     restore_passive_rev  if $imported["PassiveSkill"]
  337.   end
  338.   #--------------------------------------------------------------------------
  339.   # ● 職業 ID の変更
  340.   #     class_id : 新しい職業 ID
  341.   #--------------------------------------------------------------------------
  342.   alias class_id_equal_KGC_EquipExtension class_id=
  343.   def class_id=(class_id)
  344.     class_id_equal_KGC_EquipExtension(class_id)

  345.     return if extra_armor_number == 0  # 拡張防具欄がない

  346.     # 装備できない拡張防具を外す
  347.     for i in 5..armor_number
  348.       change_equip(i, nil) unless equippable?(equips[i])
  349.     end
  350.   end
  351.   #--------------------------------------------------------------------------
  352.   # ○ EP 条件クリア判定
  353.   #     equip_type : 装備部位
  354.   #     item       : 武器 or 防具
  355.   #--------------------------------------------------------------------------
  356.   def ep_condition_clear?(equip_type, item)
  357.     return true if item == nil  # nil は解除なので OK

  358.     curr_item = equips[equip_type]
  359.     offset = (curr_item != nil ? curr_item.ep_cost : 0)
  360.     return false if self.ep < (item.ep_cost - offset)   # EP 不足

  361.     return true
  362.   end
  363.   #--------------------------------------------------------------------------
  364.   # ○ 装備を修復
  365.   #--------------------------------------------------------------------------
  366.   def restore_equip
  367.     return if @__last_equip_type == equip_type

  368.     # 以前の装備品・パラメータを退避
  369.     last_equips = equips
  370.     last_hp = self.hp
  371.     last_mp = self.mp
  372.     if $imported["SkillCPSystem"]
  373.       last_battle_skill_ids = battle_skill_ids.clone
  374.     end

  375.     # 全装備解除
  376.     last_equips.each_index { |i| change_equip(i, nil) }

  377.     # 装備品・パラメータを復元
  378.     last_equips.compact.each { |item| equip_legal_slot(item) }
  379.     self.hp = last_hp
  380.     self.mp = last_mp
  381.     if $imported["SkillCPSystem"]
  382.       last_battle_skill_ids.each_with_index { |s, i| set_battle_skill(i, s) }
  383.     end
  384.     @__last_equip_type = equip_type.clone
  385.     Graphics.frame_reset
  386.   end
  387.   #--------------------------------------------------------------------------
  388.   # ○ 装備品を正しい箇所にセット
  389.   #     item : 武器 or 防具
  390.   #--------------------------------------------------------------------------
  391.   def equip_legal_slot(item)
  392.     if item.is_a?(RPG::Weapon)
  393.       if @weapon_id == 0
  394.         # 武器 1
  395.         change_equip(0, item)
  396.       elsif two_swords_style && @armor1_id == 0
  397.         # 武器 2 (二刀流の場合)
  398.         change_equip(1, item)
  399.       end
  400.     elsif item.is_a?(RPG::Armor)
  401.       if !two_swords_style && item.kind == equip_type[0] && @armor1_id == 0
  402.         # 先頭の防具 (二刀流でない場合)
  403.         change_equip(1, item)
  404.       else
  405.         # 装備箇所リストを作成
  406.         list = [-1, @armor2_id, @armor3_id, @armor4_id]
  407.         list += extra_armor_id
  408.         # 正しい、かつ空いている箇所にセット
  409.         equip_type.each_with_index { |kind, i|
  410.           if kind == item.kind && list[i] == 0
  411.             change_equip(i + 1, item)
  412.             break
  413.           end
  414.         }
  415.       end
  416.     end
  417.   end
  418. end

  419. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

  420. #==============================================================================
  421. # ■ Window_Base
  422. #==============================================================================

  423. class Window_Base < Window
  424.   #--------------------------------------------------------------------------
  425.   # ○ EP の文字色を取得
  426.   #     actor : アクター
  427.   #--------------------------------------------------------------------------
  428.   def ep_color(actor)
  429.     return knockout_color if actor.maxep > 0 && actor.ep == 0
  430.     return normal_color
  431.   end
  432.   #--------------------------------------------------------------------------
  433.   # ○ EP ゲージの色 1 の取得
  434.   #--------------------------------------------------------------------------
  435.   def ep_gauge_color1
  436.     color = KGC::EquipExtension::EP_GAUGE_START_COLOR
  437.     return (color.is_a?(Integer) ? text_color(color) : color)
  438.   end
  439.   #--------------------------------------------------------------------------
  440.   # ○ EP ゲージの色 2 の取得
  441.   #--------------------------------------------------------------------------
  442.   def ep_gauge_color2
  443.     color = KGC::EquipExtension::EP_GAUGE_END_COLOR
  444.     return (color.is_a?(Integer) ? text_color(color) : color)
  445.   end
  446.   #--------------------------------------------------------------------------
  447.   # ○ EP の描画
  448.   #     actor : アクター
  449.   #     x     : 描画先 X 座標
  450.   #     y     : 描画先 Y 座標
  451.   #     width : 幅
  452.   #--------------------------------------------------------------------------
  453.   def draw_actor_ep(actor, x, y, width = 120)
  454.     draw_actor_ep_gauge(actor, x, y, width)
  455.     self.contents.font.color = system_color
  456.     self.contents.draw_text(x, y, 30, WLH, Vocab::ep_a)
  457.     self.contents.font.color = ep_color(actor)
  458.     xr = x + width
  459.     if width < 120
  460.       self.contents.draw_text(xr - 40, y, 40, WLH, actor.ep, 2)
  461.     else
  462.       self.contents.draw_text(xr - 90, y, 40, WLH, actor.ep, 2)
  463.       self.contents.font.color = normal_color
  464.       self.contents.draw_text(xr - 50, y, 10, WLH, "/", 2)
  465.       self.contents.draw_text(xr - 40, y, 40, WLH, actor.maxep, 2)
  466.     end
  467.     self.contents.font.color = normal_color
  468.   end
  469.   #--------------------------------------------------------------------------
  470.   # ○ EP ゲージの描画
  471.   #     actor : アクター
  472.   #     x     : 描画先 X 座標
  473.   #     y     : 描画先 Y 座標
  474.   #     width : 幅
  475.   #--------------------------------------------------------------------------
  476.   def draw_actor_ep_gauge(actor, x, y, width = 120)
  477.     gw = width * actor.ep / [actor.maxep, 1].max
  478.     gc1 = ep_gauge_color1
  479.     gc2 = ep_gauge_color2
  480.     self.contents.fill_rect(x, y + WLH - 8, width, 6, gauge_back_color)
  481.     self.contents.gradient_fill_rect(x, y + WLH - 8, gw, 6, gc1, gc2)
  482.   end
  483.   #--------------------------------------------------------------------------
  484.   # ○ 消費 EP の描画
  485.   #     item    : 武器 or 防具
  486.   #     rect    : 描画する領域
  487.   #     enabled : 許可状態
  488.   #--------------------------------------------------------------------------
  489.   def draw_equipment_ep_cost(item, rect, enabled = true)
  490.     return if item == nil
  491.     # 消費 EP 0 を表示しない場合
  492.     return if KGC::EquipExtension::HIDE_ZERO_EP_COST && item.ep_cost == 0

  493.     color = KGC::EquipExtension::EP_COST_COLOR
  494.     self.contents.font.color = (color.is_a?(Integer) ?
  495.       text_color(color) : color)
  496.     self.contents.font.color.alpha = enabled ? 255 : 128
  497.     self.contents.draw_text(rect, item.ep_cost, 2)
  498.   end
  499. end

  500. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

  501. #==============================================================================
  502. # ■ Window_Equip
  503. #==============================================================================

  504. class Window_Equip < Window_Selectable
  505.   #--------------------------------------------------------------------------
  506.   # ● リフレッシュ
  507.   #--------------------------------------------------------------------------
  508.   def refresh
  509.     self.contents.clear
  510.     @data = @actor.equips.clone
  511.     @item_max = [@data.size, @actor.armor_number + 1].min
  512.     create_contents

  513.     # 装備箇所を描画
  514.     self.contents.font.color = system_color
  515.     if @actor.two_swords_style
  516.       self.contents.draw_text(4, WLH * 0, 92, WLH, Vocab::weapon1)
  517.       self.contents.draw_text(4, WLH * 1, 92, WLH, Vocab::weapon2)
  518.     else
  519.       self.contents.draw_text(4, WLH * 0, 92, WLH, Vocab::weapon)
  520.       name = armor_slot_name(@actor.equip_type[0])
  521.       self.contents.draw_text(4, WLH * 1, 92, WLH, name)
  522.     end
  523.     for i in [email protected]_number
  524.       name = armor_slot_name(@actor.equip_type[i])
  525.       self.contents.draw_text(4, WLH * (i + 1), 92, WLH, name)
  526.     end

  527.     # 装備品を描画
  528.     rect = Rect.new(92, 0, self.width - 128, WLH)
  529.     @item_max.times { |i|
  530.       rect.y = WLH * i
  531.       draw_item_name(@data[i], rect.x, rect.y)
  532.       draw_equipment_ep_cost(@data[i], rect)
  533.     }
  534.   end
  535.   #--------------------------------------------------------------------------
  536.   # ○ 防具欄の名称を取得
  537.   #     kind : 種別
  538.   #--------------------------------------------------------------------------
  539.   def armor_slot_name(kind)
  540.     case kind
  541.     when 0..3
  542.       return eval("Vocab.armor#{kind + 1}")
  543.     else
  544.       return Vocab.extra_armor(kind - 4)
  545.     end
  546.   end

  547. unless $imported["ExtendedEquipScene"]
  548.   #--------------------------------------------------------------------------
  549.   # ● カーソルを 1 ページ後ろに移動
  550.   #--------------------------------------------------------------------------
  551.   def cursor_pagedown
  552.     return if Input.repeat?(Input::R)
  553.     super
  554.   end
  555.   #--------------------------------------------------------------------------
  556.   # ● カーソルを 1 ページ前に移動
  557.   #--------------------------------------------------------------------------
  558.   def cursor_pageup
  559.     return if Input.repeat?(Input::L)
  560.     super
  561.   end
  562.   #--------------------------------------------------------------------------
  563.   # ● フレーム更新
  564.   #--------------------------------------------------------------------------
  565.   def update
  566.     super
  567.     return unless self.active

  568.     if Input.repeat?(Input::RIGHT)
  569.       cursor_pagedown
  570.     elsif Input.repeat?(Input::LEFT)
  571.       cursor_pageup
  572.     end
  573.   end
  574. end

  575. end

  576. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

  577. #==============================================================================
  578. # ■ Window_EquipItem
  579. #==============================================================================

  580. class Window_EquipItem < Window_Item
  581.   #--------------------------------------------------------------------------
  582.   # ● リフレッシュ
  583.   #--------------------------------------------------------------------------
  584.   def refresh
  585.     @item_enabled = []
  586.     super
  587.     @data.each { |item| @item_enabled << enable?(item) }
  588.   end
  589.   #--------------------------------------------------------------------------
  590.   # ● アイテムをリストに含めるかどうか
  591.   #     item : アイテム
  592.   #--------------------------------------------------------------------------
  593.   def include?(item)
  594.     return true if item == nil
  595.     if @equip_type == 0
  596.       return false unless item.is_a?(RPG::Weapon)
  597.     else
  598.       return false unless item.is_a?(RPG::Armor)
  599.       return false unless item.kind == @equip_type - 1
  600.     end
  601.     return @actor.equippable?(item)
  602.   end
  603.   #--------------------------------------------------------------------------
  604.   # ● アイテムを許可状態で表示するかどうか
  605.   #     item : アイテム
  606.   #--------------------------------------------------------------------------
  607.   def enable?(item)
  608.     return false unless @actor.equippable?(item)                      # 装備不可
  609.     return false unless @actor.ep_condition_clear?(@equip_type, item)  # EP 不足

  610.     return true
  611.   end
  612.   #--------------------------------------------------------------------------
  613.   # ● 項目の描画
  614.   #     index : 項目番号
  615.   #--------------------------------------------------------------------------
  616.   def draw_item(index)
  617.     super(index)   
  618.     rect = item_rect(index)
  619.     item = @data[index]

  620.     # 個数表示分の幅を削る
  621.     cw = self.contents.text_size(sprintf(":%2d", 0)).width
  622.     rect.width -= cw + 4
  623.     draw_equipment_ep_cost(item, rect, enable?(item))
  624.   end
  625.   #--------------------------------------------------------------------------
  626.   # ○ 簡易リフレッシュ
  627.   #     equip_type : 装備部位
  628.   #--------------------------------------------------------------------------
  629.   def simple_refresh(equip_type)
  630.     # 一時的に装備部位を変更
  631.     last_equip_type = @equip_type
  632.     @equip_type = equip_type

  633.     @data.each_with_index { |item, i|
  634.       # 許可状態が変化した項目のみ再描画
  635.       if enable?(item) != @item_enabled[i]
  636.         draw_item(i)
  637.         @item_enabled[i] = enable?(item)
  638.       end
  639.     }
  640.     # 装備部位を戻す
  641.     @equip_type = last_equip_type
  642.   end
  643. end

  644. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

  645. #==============================================================================
  646. # ■ Window_EquipStatus
  647. #==============================================================================

  648. class Window_EquipStatus < Window_Base
  649.   #--------------------------------------------------------------------------
  650.   # ● リフレッシュ
  651.   #--------------------------------------------------------------------------
  652.   alias refresh_KGC_EquipExtension refresh
  653.   def refresh
  654.     refresh_KGC_EquipExtension

  655.     draw_actor_ep(@actor, 120, 0, 56) if KGC::EquipExtension::USE_EP_SYSTEM
  656.   end
  657. end

  658. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

  659. #==============================================================================
  660. # ■ Window_Status
  661. #==============================================================================

  662. class Window_Status < Window_Base

  663. if KGC::EquipExtension::SHOW_STATUS_EP
  664.   #--------------------------------------------------------------------------
  665.   # ● 基本情報の描画
  666.   #     x : 描画先 X 座標
  667.   #     y : 描画先 Y 座標
  668.   #--------------------------------------------------------------------------
  669.   alias draw_basic_info_KGC_EquipExtension draw_basic_info
  670.   def draw_basic_info(x, y)
  671.     draw_basic_info_KGC_EquipExtension(x, y)

  672.     draw_actor_ep(@actor, x + 160, y + WLH * 4)
  673.   end
  674. end

  675.   #--------------------------------------------------------------------------
  676.   # ● 装備品の描画
  677.   #     x : 描画先 X 座標
  678.   #     y : 描画先 Y 座標
  679.   #--------------------------------------------------------------------------
  680.   def draw_equipments(x, y)
  681.     self.contents.font.color = system_color
  682.     self.contents.draw_text(x, y, 120, WLH, Vocab::equip)

  683.     item_number = [@actor.equips.size, @actor.armor_number + 1].min
  684.     item_number.times { |i|
  685.       draw_item_name(@actor.equips[i], x + 16, y + WLH * (i + 1))
  686.     }
  687.   end
  688. end

  689. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

  690. #==============================================================================
  691. # ■ Window_ShopStatus
  692. #==============================================================================

  693. class Window_ShopStatus < Window_Base
  694.   #--------------------------------------------------------------------------
  695.   # ● アクターの現装備と能力値変化の描画
  696.   #     actor : アクター
  697.   #     x     : 描画先 X 座標
  698.   #     y     : 描画先 Y 座標
  699.   #--------------------------------------------------------------------------
  700.   def draw_actor_parameter_change(actor, x, y)
  701.     return if @item.is_a?(RPG::Item)
  702.     enabled = actor.equippable?(@item)
  703.     self.contents.font.color = normal_color
  704.     self.contents.font.color.alpha = enabled ? 255 : 128
  705.     self.contents.draw_text(x, y, 200, WLH, actor.name)
  706.     if @item.is_a?(RPG::Weapon)
  707.       item1 = weaker_weapon(actor)
  708.     elsif actor.two_swords_style and @item.kind == 0
  709.       item1 = nil
  710.     else
  711.       index = actor.equip_type.index(@item.kind)
  712.       item1 = (index != nil ? actor.equips[1 + index] : nil)
  713.     end
  714.     if enabled
  715.       if @item.is_a?(RPG::Weapon)
  716.         atk1 = item1 == nil ? 0 : item1.atk
  717.         atk2 = @item == nil ? 0 : @item.atk
  718.         change = atk2 - atk1
  719.       else
  720.         def1 = item1 == nil ? 0 : item1.def
  721.         def2 = @item == nil ? 0 : @item.def
  722.         change = def2 - def1
  723.       end
  724.       self.contents.draw_text(x, y, 200, WLH, sprintf("%+d", change), 2)
  725.     end
  726.     draw_item_name(item1, x, y + WLH, enabled)
  727.   end
  728. end

  729. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

  730. #==============================================================================
  731. # ■ Scene_Equip
  732. #==============================================================================

  733. class Scene_Equip < Scene_Base
  734.   #--------------------------------------------------------------------------
  735.   # ● 定数
  736.   #--------------------------------------------------------------------------
  737.   EQUIP_TYPE_MAX = KGC::EquipExtension::EXTRA_EQUIP_KIND.size + 5
  738.   #--------------------------------------------------------------------------
  739.   # ● オブジェクト初期化
  740.   #     actor_index : アクターインデックス
  741.   #     equip_index : 装備インデックス
  742.   #--------------------------------------------------------------------------
  743.   alias initialize_KGC_EquipExtension initialize
  744.   def initialize(actor_index = 0, equip_index = 0)
  745.     initialize_KGC_EquipExtension(actor_index, equip_index)

  746.     unit = ($imported["LargeParty"] ?
  747.       $game_party.all_members : $game_party.members)
  748.     actor = unit[actor_index]
  749.     @equip_index = [@equip_index, actor.armor_number].min
  750.   end
  751.   #--------------------------------------------------------------------------
  752.   # ● アイテムウィンドウの作成
  753.   #--------------------------------------------------------------------------
  754.   alias create_item_windows_KGC_EquipExtension create_item_windows
  755.   def create_item_windows
  756.     create_item_windows_KGC_EquipExtension

  757.     kind = equip_kind(@equip_index)
  758.     EQUIP_TYPE_MAX.times { |i|
  759.       @item_windows[i].visible = (kind == i)
  760.     }
  761.   end
  762.   #--------------------------------------------------------------------------
  763.   # ● アイテムウィンドウの更新
  764.   #--------------------------------------------------------------------------
  765.   def update_item_windows
  766.     kind = equip_kind(@equip_window.index)
  767.     for i in 0...EQUIP_TYPE_MAX
  768.       @item_windows[i].visible = (kind == i)
  769.       @item_windows[i].update
  770.     end
  771.     @item_window = @item_windows[kind]
  772.     @item_window.simple_refresh(@equip_window.index)
  773.   end
  774.   #--------------------------------------------------------------------------
  775.   # ○ 装備欄の種別を取得
  776.   #     index : 装備欄インデックス
  777.   #--------------------------------------------------------------------------
  778.   def equip_kind(index)
  779.     if index == 0
  780.       return 0
  781.     else
  782.       return @actor.equip_type[index - 1] + 1
  783.     end
  784.   end

  785. unless $imported["ExtendedEquipScene"]
  786.   #--------------------------------------------------------------------------
  787.   # ● ステータスウィンドウの更新
  788.   #--------------------------------------------------------------------------
  789.   def update_status_window
  790.     if @equip_window.active
  791.       @status_window.set_new_parameters(nil, nil, nil, nil)
  792.     elsif @item_window.active
  793.       temp_actor = Marshal.load(Marshal.dump(@actor))
  794.       temp_actor.change_equip(@equip_window.index, @item_window.item, true)
  795.       new_atk = temp_actor.atk
  796.       new_def = temp_actor.def
  797.       new_spi = temp_actor.spi
  798.       new_agi = temp_actor.agi
  799.       @status_window.set_new_parameters(new_atk, new_def, new_spi, new_agi)
  800.     end
  801.     @status_window.update
  802.   end
  803. end

  804.   #--------------------------------------------------------------------------
  805.   # ● アイテム選択の更新
  806.   #--------------------------------------------------------------------------
  807.   alias update_item_selection_KGC_EquipExtension update_item_selection
  808.   def update_item_selection
  809.     if Input.trigger?(Input::C)
  810.       # 装備不可能な場合
  811.       index = @equip_window.index
  812.       item = @item_window.item
  813.       unless item == nil ||
  814.           (@actor.equippable?(item) && @actor.ep_condition_clear?(index, item))
  815.         Sound.play_buzzer
  816.         return
  817.       end
  818.     end

  819.     update_item_selection_KGC_EquipExtension
  820.   end
  821. end

  822. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

  823. #==============================================================================
  824. # ■ Scene_File
  825. #==============================================================================

  826. class Scene_File < Scene_Base
  827.   #--------------------------------------------------------------------------
  828.   # ● セーブデータの読み込み
  829.   #     file : 読み込み用ファイルオブジェクト (オープン済み)
  830.   #--------------------------------------------------------------------------
  831.   alias read_save_data_KGC_EquipExtension read_save_data
  832.   def read_save_data(file)
  833.     read_save_data_KGC_EquipExtension(file)

  834.     KGC::Commands.restore_equip
  835.     Graphics.frame_reset
  836.   end
  837. end
复制代码
回复 支持 反对

使用道具 举报

Lv3.寻梦者 (暗夜天使)

精灵族の天使

梦石
0
星屑
1697
在线时间
3038 小时
注册时间
2007-3-16
帖子
33731

开拓者贵宾

70
发表于 2008-9-7 08:04:11 | 只看该作者
太好了……决定收下了……泪……
如果能集成物品分类和技能分类就更好了。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

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

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

GMT+8, 2024-6-26 11:16

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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