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

Project1

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

[已经过期] 怎样让每一个角色都有一个物品栏?

[复制链接]

Lv2.观梦者

梦石
0
星屑
380
在线时间
602 小时
注册时间
2014-5-8
帖子
699
跳转到指定楼层
1
发表于 2014-8-17 15:40:29 | 只看该作者 |只看大图 回帖奖励 |正序浏览 |阅读模式

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

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

x
本帖最后由 布罗利 于 2014-8-17 15:49 编辑

系统本来是公共物品,我想弄成个人物品,让每个角色都有独立背包。
我知道特技是独立的,我就看了看特技窗口,然后就在物品窗口改了这么一句:def initialize(actor)
没想到不行.........
然后我想应该先选择角色,于是在特技画面哪里复制了一个角色索引...
没想到也不行.....
最后觉定到6r发帖求助....在线等待.....
@芯☆淡茹水

Lv2.观梦者

梦石
0
星屑
380
在线时间
602 小时
注册时间
2014-5-8
帖子
699
9
 楼主| 发表于 2014-8-31 19:52:58 | 只看该作者
本帖最后由 布罗利 于 2014-8-31 20:15 编辑
芯☆淡茹水 发表于 2014-8-17 17:21
要改很多很多,,很多。
每个角色增加一个 包包 的属性。
改得到物品时判断每个角色包包是否都满?或者哪个 ...


闲得无聊
我就去翻百变宝典
没想到找到了这样的类似系统
稍微改一下就可以用.....
帮忙改改呗
我改了好几遍都不对
需要注意的是这个脚本那菜单写进去了
我所以我发两个脚本,第一个是原脚本,第二个是我改的差不多但是进不去物品的脚本
RUBY 代码复制
  1. #单人负重系统 V 1.10 BY SLICK
  2.  
  3. module RPG
  4.   class Item
  5.     attr_accessor :weight
  6.     def name
  7.       return @name.split(/,/)[0]
  8.     end
  9.     def weight
  10.       rpgwt = @name.split(/,/)[1].to_i
  11.       return rpgwt = nil ? 0 : rpgwt
  12.     end
  13.     def description
  14.       return @description.split(/@/)[0]
  15.     end
  16.     def inc_weight
  17.       rpgwt = @description.split(/@/)[1].to_i
  18.       return rpgwt = nil ? 0 : rpgwt
  19.     end
  20.   end
  21.  
  22.   class Weapon
  23.     attr_accessor :weight
  24.     def name
  25.       return @name.split(/,/)[0]
  26.     end
  27.     def weight
  28.       rpgwt = @name.split(/,/)[1].to_i
  29.       return rpgwt = nil ? 0 : rpgwt
  30.     end  
  31.    end
  32.  
  33.   class Armor
  34.     attr_accessor :weight
  35.     def name
  36.       return @name.split(/,/)[0]
  37.     end
  38.     def weight
  39.       rpgwt = @name.split(/,/)[1].to_i
  40.       return rpgwt = nil ? 0 : rpgwt
  41.     end  
  42.   end
  43. end
  44.  
  45. class Game_Actor < Game_Battler
  46.   attr_accessor :weight # 单个人物目前所带负载
  47.   attr_accessor :indi_capacity
  48.   attr_accessor :items
  49.   attr_accessor :weapons
  50.   attr_accessor :armors
  51.   alias original_setup setup
  52.   def setup(actor_id)
  53.     original_setup(actor_id)
  54.     @weight=0
  55.     @items = {}
  56.     @weapons = {}
  57.     @armors = {}
  58.     case actor_id
  59.       when 1 # SLICK
  60.         @indi_capacity = 50000
  61.       when 2 # 玛塔赫
  62.         @indi_capacity = 18000
  63.       when 3 # 塞拉斯
  64.         @indi_capacity = 40000
  65.       when 4 # 特萝西
  66.         @indi_capacity = 14000
  67.       when 5 # 艾斯迪儿
  68.         @indi_capacity = 36000
  69.       when 6 # 菲力克斯
  70.         @indi_capacity = 25000      
  71.       when 7 # 克萝莉亚
  72.         @indi_capacity = 14000
  73.       when 8 # 西露达
  74.         @indi_capacity = 10000
  75.     end
  76.   end
  77.  
  78.   def total_weight
  79.     totalwt = self.weight
  80.     if self.weapon_id != 0
  81.       totalwt += $data_weapons[self.weapon_id].weight
  82.     end
  83.     if self.armor1_id != 0
  84.       totalwt += $data_armors[self.armor1_id].weight
  85.     end
  86.     if self.armor2_id != 0
  87.       totalwt += $data_armors[self.armor2_id].weight
  88.     end
  89.     if self.armor3_id != 0
  90.       totalwt += $data_armors[self.armor3_id].weight
  91.     end
  92.     if self.armor4_id != 0
  93.       totalwt += $data_armors[self.armor4_id].weight
  94.     end
  95.     return totalwt
  96.   end  
  97.  
  98.   def item_number(item_id)
  99.     # 如果 hash 个数数值不存在就返回 0
  100.     return @items.include?(item_id) ? @items[item_id] : 0
  101.   end
  102.   #--------------------------------------------------------------------------
  103.   # ● 获取武器所持数
  104.   #     weapon_id : 武器 ID
  105.   #--------------------------------------------------------------------------
  106.   def weapon_number(weapon_id)
  107.     # 如果 hash 个数数值不存在就返回 0
  108.     return @weapons.include?(weapon_id) ? @weapons[weapon_id] : 0
  109.   end
  110.   #--------------------------------------------------------------------------
  111.   # ● 获取防具所持数
  112.   #     armor_id : 防具 ID
  113.   #--------------------------------------------------------------------------
  114.   def armor_number(armor_id)
  115.     # 如果 hash 个数数值不存在就返回 0
  116.     return @armors.include?(armor_id) ? @armors[armor_id] : 0
  117.   end
  118.   #--------------------------------------------------------------------------
  119.   # ● 增加物品 (减少)
  120.   #     item_id : 物品 ID
  121.   #     n       : 个数
  122.   #--------------------------------------------------------------------------
  123.   def gain_item(item_id, n)
  124.     # 更新 hash 的个数数据
  125.     if item_id > 0
  126.  
  127.       temp = @weight + $data_items[item_id].weight * n
  128.  
  129.       return if (n < 0 and @items[item_id] == nil)
  130.  
  131.       if temp > max_weight
  132.         return
  133.       end
  134.       if temp < 0
  135.         a = @weight
  136.         for i in 1..n.abs
  137.           a -= $data_items[item_id].weight
  138.           if a < 0
  139.             return
  140.           else
  141.             # 数量-1
  142.             @items[item_id] = [item_number(item_id) - i, 0].max
  143.             # 负重-1
  144.             @weight -= $data_items[item_id].weight
  145.             # p @weight
  146.           end  
  147.         end
  148.         # p @weight
  149.         return
  150.       end  
  151.  
  152.       if @items[item_id] != nil
  153.         b = @items[item_id] - n.abs
  154.         if b < 0 and n < 0
  155.           c = @items[item_id]
  156.           @items[item_id] = [item_number(item_id) + n, 0].max
  157.           @weight -= $data_items[item_id].weight * c
  158.           # p @weight
  159.           return
  160.         end
  161.       end  
  162.  
  163.       @items[item_id] = [item_number(item_id) + n, 0].max
  164.       @weight = temp
  165.       # p @weight
  166.     end
  167.   end
  168.   #--------------------------------------------------------------------------
  169.   # ● 增加武器 (减少)
  170.   #     weapon_id : 武器 ID
  171.   #     n         : 个数
  172.   #--------------------------------------------------------------------------
  173.   def gain_weapon(weapon_id, n)
  174.     # 更新 hash 的个数数据
  175.     if weapon_id > 0
  176.       temp = @weight + $data_weapons[weapon_id].weight * n
  177.  
  178.       return if (n < 0 and @weapons[weapon_id] == nil)
  179.  
  180.       if temp > max_weight
  181.         return
  182.       end
  183.       if temp < 0
  184.         a = @weight
  185.         for i in 1..n.abs
  186.           a -= $data_weapons[weapon_id].weight
  187.           if a < 0
  188.             return
  189.           else
  190.             # 数量-1
  191.             @weapons[weapon_id] = [weapon_number(weapon_id) - i, 0].max
  192.             # 负重-1
  193.             @weight -= $data_weapons[weapon_id].weight
  194.            # p @weight
  195.           end  
  196.         end
  197.        # p @weight
  198.         return
  199.       end  
  200.  
  201.       if @weapons[weapon_id] != nil
  202.         b = @weapons[weapon_id] - n.abs
  203.         if b < 0 and n < 0
  204.           c = @weapons[weapon_id]
  205.           @weapons[weapon_id] = [weapon_number(weapon_id) + n, 0].max
  206.           @weight -= $data_weapons[weapon_id].weight * c
  207.         #  p @weight
  208.           return
  209.         end
  210.       end
  211.  
  212.       @weapons[weapon_id] = [weapon_number(weapon_id) + n, 0].max
  213.       @weight = temp
  214.      # p @weight
  215.     end
  216.   end
  217.   #--------------------------------------------------------------------------
  218.   # ● 增加防具 (减少)
  219.   #     armor_id : 防具 ID
  220.   #     n        : 个数
  221.   #--------------------------------------------------------------------------
  222.   def gain_armor(armor_id, n)
  223.     # 更新 hash 的个数数据
  224.     if armor_id > 0
  225.       temp = @weight + $data_armors[armor_id].weight * n
  226.  
  227.       return if (n < 0 and @armors[armor_id] == nil)
  228.  
  229.       if temp > max_weight
  230.         return
  231.       end
  232.       if temp < 0
  233.         a = @weight
  234.         for i in 1..n.abs
  235.           a -= $data_armors[armor_id].weight
  236.           if a < 0
  237.             return
  238.           else
  239.             # 数量-1
  240.             @armors[armor_id] = [armor_number(armor_id) - i, 0].max
  241.             # 负重-1
  242.             @weight -= $data_armors[armor_id].weight
  243.             # p @weight
  244.           end  
  245.         end
  246.         # p @weight
  247.         return
  248.       end  
  249.  
  250.       if @armors[armor_id] != nil
  251.         b = @armors[armor_id] - n.abs
  252.         if b < 0 and n < 0
  253.           c = @armors[armor_id]
  254.           @armors[armor_id] = [armor_number(armor_id) + n, 0].max
  255.           @weight -= $data_armors[armor_id].weight * c
  256.           # p @weight
  257.           return
  258.         end
  259.       end
  260.  
  261.       @armors[armor_id] = [armor_number(armor_id) + n, 0].max
  262.       @weight = temp
  263.       # p @weight
  264.     end
  265.   end
  266.  
  267.   def max_weight
  268.     return @indi_capacity
  269.   end
  270.  
  271.   def check_weight
  272.  
  273.   end
  274.  
  275.   #--------------------------------------------------------------------------
  276.   # ● 减少物品
  277.   #     item_id : 物品 ID
  278.   #     n       : 个数
  279.   #--------------------------------------------------------------------------
  280.   def lose_item(item_id, n)
  281.     # 调用 gain_item 的数值逆转
  282.     gain_item(item_id, -n)
  283.   end
  284.   #--------------------------------------------------------------------------
  285.   # ● 减少武器
  286.   #     weapon_id : 武器 ID
  287.   #     n         : 个数
  288.   #--------------------------------------------------------------------------
  289.   def lose_weapon(weapon_id, n)
  290.     # 调用 gain_weapon 的数值逆转
  291.     gain_weapon(weapon_id, -n)
  292.   end
  293.   #--------------------------------------------------------------------------
  294.   # ● 减少防具
  295.   #     armor_id : 防具 ID
  296.   #     n        : 个数
  297.   #--------------------------------------------------------------------------
  298.   def lose_armor(armor_id, n)
  299.     # 调用 gain_armor 的数值逆转
  300.     gain_armor(armor_id, -n)
  301.   end
  302.   #--------------------------------------------------------------------------
  303.   # ● 判断物品可以使用
  304.   #     item_id : 物品 ID
  305.   #--------------------------------------------------------------------------
  306.   def item_can_use?(item_id)
  307.     # 物品个数为 0 的情况
  308.     if item_number(item_id) == 0
  309.       # 不能使用
  310.       return false
  311.     end
  312.     # 获取可以使用的时候
  313.     occasion = $data_items[item_id].occasion
  314.     # 战斗的情况
  315.     if $game_temp.in_battle
  316.       # 可以使用时为 0 (平时) 或者是 1 (战斗时) 可以使用
  317.       return (occasion == 0 or occasion == 1)
  318.     end
  319.     # 可以使用时为 0 (平时) 或者是 2 (菜单时) 可以使用
  320.     return (occasion == 0 or occasion == 2)
  321.   end
  322.   #--------------------------------------------------------------------------
  323.   # ● 变更装备
  324.   #     equip_type : 装备类型
  325.   #     id    : 武器 or 防具 ID  (0 为解除装备)
  326.   #--------------------------------------------------------------------------
  327.   def equip(equip_type, id)
  328.     case equip_type
  329.     when 0  # 武器
  330.       if id == 0 or self.weapon_number(id) > 0
  331.         self.gain_weapon(@weapon_id, 1)
  332.         @weapon_id = id
  333.         self.lose_weapon(id, 1)
  334.       end
  335.     when 1  # 盾
  336.       if id == 0 or self.armor_number(id) > 0
  337.         update_auto_state($data_armors[@armor1_id], $data_armors[id])
  338.         self.gain_armor(@armor1_id, 1)
  339.         @armor1_id = id
  340.         self.lose_armor(id, 1)
  341.       end
  342.     when 2  # 头
  343.       if id == 0 or self.armor_number(id) > 0
  344.         update_auto_state($data_armors[@armor2_id], $data_armors[id])
  345.         self.gain_armor(@armor2_id, 1)
  346.         @armor2_id = id
  347.         self.lose_armor(id, 1)
  348.       end
  349.     when 3  # 身体
  350.       if id == 0 or self.armor_number(id) > 0
  351.         update_auto_state($data_armors[@armor3_id], $data_armors[id])
  352.         self.gain_armor(@armor3_id, 1)
  353.         @armor3_id = id
  354.         self.lose_armor(id, 1)
  355.       end
  356.     when 4  # 装饰品
  357.       if id == 0 or self.armor_number(id) > 0
  358.         update_auto_state($data_armors[@armor4_id], $data_armors[id])
  359.         self.gain_armor(@armor4_id, 1)
  360.         @armor4_id = id
  361.         self.lose_armor(id, 1)
  362.       end
  363.     end
  364.   end
  365. end  
  366.  
  367. #==============================================================================
  368. # ■ Scene_Menu
  369. #------------------------------------------------------------------------------
  370. #  处理菜单画面的类。
  371. #==============================================================================
  372.  
  373. class Scene_Menu
  374.   #--------------------------------------------------------------------------
  375.   # ● 初始化对像
  376.   #     menu_index : 命令光标的初期位置
  377.   #--------------------------------------------------------------------------
  378.   def initialize(menu_index = 0)
  379.     @menu_index = menu_index
  380.   end
  381.   #--------------------------------------------------------------------------
  382.   # ● 主处理
  383.   #--------------------------------------------------------------------------
  384.   def main
  385.     # 生成命令窗口
  386.     s1 = $data_system.words.item
  387.     s2 = $data_system.words.skill
  388.     s3 = $data_system.words.equip
  389.     s4 = "状态"
  390.     s5 = "存档"
  391.     s6 = "结束游戏"
  392.     @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6])
  393.     @command_window.index = @menu_index
  394.     # 同伴人数为 0 的情况下
  395.     if $game_party.actors.size == 0
  396.       # 物品、特技、装备、状态无效化
  397.       @command_window.disable_item(0)
  398.       @command_window.disable_item(1)
  399.       @command_window.disable_item(2)
  400.       @command_window.disable_item(3)
  401.     end
  402.     # 禁止存档的情况下
  403.     if $game_system.save_disabled
  404.       # 存档无效
  405.       @command_window.disable_item(4)
  406.     end
  407.     # 生成游戏时间窗口
  408.     @playtime_window = Window_PlayTime.new
  409.     @playtime_window.x = 0
  410.     @playtime_window.y = 224
  411.     # 生成步数窗口
  412.     @steps_window = Window_Steps.new
  413.     @steps_window.x = 0
  414.     @steps_window.y = 320
  415.     # 生成金钱窗口
  416.     @gold_window = Window_Gold.new
  417.     @gold_window.x = 0
  418.     @gold_window.y = 416
  419.     # 生成状态窗口
  420.     @status_window = Window_MenuStatus.new
  421.     @status_window.x = 160
  422.     @status_window.y = 0
  423.     # 执行过渡
  424.     Graphics.transition
  425.     # 主循环
  426.     loop do
  427.       # 刷新游戏画面
  428.       Graphics.update
  429.       # 刷新输入信息
  430.       Input.update
  431.       # 刷新画面
  432.       update
  433.       # 如果切换画面就中断循环
  434.       if $scene != self
  435.         break
  436.       end
  437.     end
  438.     # 准备过渡
  439.     Graphics.freeze
  440.     # 释放窗口
  441.     @command_window.dispose
  442.     @playtime_window.dispose
  443.     @steps_window.dispose
  444.     @gold_window.dispose
  445.     @status_window.dispose
  446.   end
  447.   #--------------------------------------------------------------------------
  448.   # ● 刷新画面
  449.   #--------------------------------------------------------------------------
  450.   def update
  451.     # 刷新窗口
  452.     @command_window.update
  453.     @playtime_window.update
  454.     @steps_window.update
  455.     @gold_window.update
  456.     @status_window.update
  457.     # 命令窗口被激活的情况下: 调用 update_command
  458.     if @command_window.active
  459.       update_command
  460.       return
  461.     end
  462.     # 状态窗口被激活的情况下: 调用 update_status
  463.     if @status_window.active
  464.       update_status
  465.       return
  466.     end
  467.   end
  468.   #--------------------------------------------------------------------------
  469.   # ● 刷新画面 (命令窗口被激活的情况下)
  470.   #--------------------------------------------------------------------------
  471.   def update_command
  472.     # 按下 B 键的情况下
  473.     if Input.trigger?(Input::B)
  474.       # 演奏取消 SE
  475.       $game_system.se_play($data_system.cancel_se)
  476.       # 切换的地图画面
  477.       $scene = Scene_Map.new
  478.       return
  479.     end
  480.     # 按下 C 键的情况下
  481.     if Input.trigger?(Input::C)
  482.       # 同伴人数为 0、存档、游戏结束以外的场合
  483.       if $game_party.actors.size == 0 and @command_window.index < 4
  484.         # 演奏冻结 SE
  485.         $game_system.se_play($data_system.buzzer_se)
  486.         return
  487.       end
  488.       # 命令窗口的光标位置分支
  489.       case @command_window.index
  490.       when 0  # 物品
  491.         # 演奏确定 SE
  492.         $game_system.se_play($data_system.decision_se)
  493.         # 切换到物品画面
  494.         @command_window.active = false
  495.         @status_window.active = true
  496.         @status_window.index = 0
  497.       when 1  # 特技
  498.         # 演奏确定 SE
  499.         $game_system.se_play($data_system.decision_se)
  500.         # 激活状态窗口
  501.         @command_window.active = false
  502.         @status_window.active = true
  503.         @status_window.index = 0
  504.       when 2  # 装备
  505.         # 演奏确定 SE
  506.         $game_system.se_play($data_system.decision_se)
  507.         # 激活状态窗口
  508.         @command_window.active = false
  509.         @status_window.active = true
  510.         @status_window.index = 0
  511.       when 3  # 状态
  512.         # 演奏确定 SE
  513.         $game_system.se_play($data_system.decision_se)
  514.         # 激活状态窗口
  515.         @command_window.active = false
  516.         @status_window.active = true
  517.         @status_window.index = 0
  518.       when 4  # 存档
  519.         # 禁止存档的情况下
  520.         if $game_system.save_disabled
  521.           # 演奏冻结 SE
  522.           $game_system.se_play($data_system.buzzer_se)
  523.           return
  524.         end
  525.         # 演奏确定 SE
  526.         $game_system.se_play($data_system.decision_se)
  527.         # 切换到存档画面
  528.         $scene = Scene_Save.new
  529.       when 5  # 游戏结束
  530.         # 演奏确定 SE
  531.         $game_system.se_play($data_system.decision_se)
  532.         # 切换到游戏结束画面
  533.         $scene = Scene_End.new
  534.       end
  535.       return
  536.     end
  537.   end
  538.   #--------------------------------------------------------------------------
  539.   # ● 刷新画面 (状态窗口被激活的情况下)
  540.   #--------------------------------------------------------------------------
  541.   def update_status
  542.     # 按下 B 键的情况下
  543.     if Input.trigger?(Input::B)
  544.       # 演奏取消 SE
  545.       $game_system.se_play($data_system.cancel_se)
  546.       # 激活命令窗口
  547.       @command_window.active = true
  548.       @status_window.active = false
  549.       @status_window.index = -1
  550.       return
  551.     end
  552.     # 按下 C 键的情况下
  553.     if Input.trigger?(Input::C)
  554.       # 命令窗口的光标位置分支
  555.       case @command_window.index
  556.       when 0  # 单人物品选择
  557.         # 演奏确定 SE
  558.         $game_system.se_play($data_system.decision_se)
  559.         # 切换的装备画面
  560.         $scene = Scene_IndiItem.new(@status_window.index)
  561.       when 1  # 特技
  562.         # 本角色的行动限制在 2 以上的情况下
  563.         if $game_party.actors[@status_window.index].restriction >= 2
  564.           # 演奏冻结 SE
  565.           $game_system.se_play($data_system.buzzer_se)
  566.           return
  567.         end
  568.         # 演奏确定 SE
  569.         $game_system.se_play($data_system.decision_se)
  570.         # 切换到特技画面
  571.         $scene = Scene_Skill.new(@status_window.index)
  572.       when 2  # 装备
  573.         # 演奏确定 SE
  574.         $game_system.se_play($data_system.decision_se)
  575.         # 切换的装备画面
  576.         $scene = Scene_Equip.new(@status_window.index)
  577.       when 3  # 状态
  578.         # 演奏确定 SE
  579.         $game_system.se_play($data_system.decision_se)
  580.         # 切换到状态画面
  581.         $scene = Scene_Status.new(@status_window.index)
  582.       end
  583.       return
  584.     end
  585.   end
  586. end
  587.  
  588. #==============================================================================
  589. # ■ Scene_IndiItem
  590. #------------------------------------------------------------------------------
  591. #  处理单人物品画面的类。
  592. #==============================================================================
  593.  
  594. class Scene_IndiItem
  595.   #--------------------------------------------------------------------------
  596.   # ● 初始化对像
  597.   #     actor_index : 角色索引
  598.   #     equip_index : 装备索引
  599.   #--------------------------------------------------------------------------
  600.   def initialize(actor_index)
  601.     @actor_index = actor_index
  602.     @actor = $game_party.actors[@actor_index]
  603.     $正在丢弃物品 = 0
  604.     $正在交付物品 = 0
  605.     $指定人物=0
  606.     $交付数量=0
  607.   end
  608.   #--------------------------------------------------------------------------
  609.   # ● 主处理
  610.   #--------------------------------------------------------------------------
  611.   def main
  612.     # 生成帮助窗口、物品窗口
  613.     @help_window = Window_Help.new
  614.     @item_window = Window_IndiItem.new(@actor)
  615.     # 关联帮助窗口
  616.     @item_window.help_window = @help_window
  617.     # 生成目标窗口 (设置为不可见・不活动)
  618.     @target_window = Window_Target.new
  619.     @target_window.visible = false
  620.     @target_window.active = false
  621.     @num_window = Window_GiveNum.new(@actor, nil)
  622.     @num_window.visible=false
  623.     @num_window.active=false
  624.     @give_window = Window_Give.new(@actor)
  625.     @give_window.visible=false
  626.     @give_window.active=false
  627.     @dowi_window = Window_Dowi.new
  628.     @dowi_window.visible=false
  629.     @dowi_window.active=false
  630.     # 执行过度
  631.     Graphics.transition
  632.     # 主循环
  633.     loop do
  634.       # 刷新游戏画面
  635.       Graphics.update
  636.       # 刷新输入信息
  637.       Input.update
  638.       # 刷新画面
  639.       update
  640.       # 如果画面切换就中断循环
  641.       if $scene != self
  642.         break
  643.       end
  644.     end
  645.     # 装备过渡
  646.     Graphics.freeze
  647.     # 释放窗口
  648.     @help_window.dispose
  649.     @item_window.dispose
  650.     @target_window.dispose
  651.     @num_window.dispose
  652.     @give_window.dispose
  653.     @dowi_window.dispose
  654.   end
  655.   #--------------------------------------------------------------------------
  656.   # ● 刷新画面
  657.   #--------------------------------------------------------------------------
  658.   def update
  659.     # 刷新窗口
  660.     @help_window.update
  661.     @item_window.update
  662.     @target_window.update
  663.     # 物品窗口被激活的情况下: 调用 update_item
  664.     if @item_window.active
  665.       update_item
  666.       return
  667.     end
  668.     # 目标窗口被激活的情况下: 调用 update_target
  669.     if @target_window.active
  670.       update_target
  671.       return
  672.     end
  673.     if @num_window.active
  674.       update_num
  675.       return
  676.     end  
  677.     if @give_window.active
  678.       update_give
  679.       return
  680.     end
  681.     if @dowi_window.active
  682.       update_dowi
  683.       return
  684.     end
  685.   end
  686.   def update_num
  687.     if Input.trigger?(Input::B)
  688.       @num_window.active=false
  689.       @num_window.visible=false
  690.       @give_window.active=false
  691.       @give_window.visible=false
  692.       @item_window.active=true
  693.       $game_system.se_play($data_system.cancel_se)
  694.       return
  695.     end
  696.     if Input.trigger?(Input::C)
  697.       @item = @item_window.item
  698.       wwwt = @item.weight * $交付数量
  699.       if @dowi_window.index == 1
  700.         if wwwt > ($game_party.actors[$指定人物].indi_capacity-$game_party.actors[$指定人物].total_weight)
  701.           $game_system.se_play($data_system.buzzer_se)
  702.           return
  703.         end
  704.         case @item
  705.         when RPG::Item
  706.           $game_party.actors[$指定人物].gain_item(@item.id,$交付数量)
  707.         when RPG::Weapon
  708.           $game_party.actors[$指定人物].gain_weapon(@item.id,$交付数量)
  709.         when RPG::Armor
  710.           $game_party.actors[$指定人物].gain_armor(@item.id,$交付数量)
  711.         end  
  712.       end  
  713.       case @item
  714.       when RPG::Item
  715.         @actor.lose_item(@item.id,$交付数量)
  716.       when RPG::Weapon
  717.         @actor.lose_weapon(@item.id,$交付数量)
  718.       when RPG::Armor
  719.         @actor.lose_armor(@item.id,$交付数量)
  720.       end  
  721.       @num_window.active=false
  722.       @num_window.visible=false
  723.       @give_window.active=false
  724.       @give_window.visible=false
  725.       @item_window.active=true
  726.       $game_system.se_play($data_system.decision_se)
  727.       @item_window.refresh
  728.       @weight_window.refresh(@item.weight)
  729.       return
  730.     end
  731.     @num_window.update
  732.   end
  733.   def update_give
  734.     if Input.trigger?(Input::B)
  735.       @give_window.active=false
  736.       @give_window.visible=false
  737.       @item_window.active=true
  738.       $game_system.se_play($data_system.cancel_se)
  739.       return
  740.     end
  741.     if Input.trigger?(Input::C)
  742.       @item = @item_window.item
  743.       @give_window.active=false
  744.       @num_window.dispose
  745.       @num_window = Window_GiveNum.new(@actor, @item)
  746.       @num_window.active=true
  747.       @num_window.visible=true
  748.       $game_system.se_play($data_system.decision_se)
  749.       return
  750.     end
  751.     if Input.trigger?(Input::DOWN)
  752.       @give_window.index+=1
  753.       if @give_window.index>=$give_max
  754.         @give_window.index=0
  755.       end  
  756.       $game_system.se_play($data_system.cursor_se)
  757.       return
  758.     end  
  759.     if Input.trigger?(Input::UP)
  760.       @give_window.index-=1
  761.       if @give_window.index<0
  762.         @give_window.index+=$give_max
  763.       end
  764.       $game_system.se_play($data_system.cursor_se)
  765.       return
  766.     end
  767.     @give_window.update
  768.   end
  769.   def update_dowi
  770.     if Input.trigger?(Input::B)
  771.       @dowi_window.active=false
  772.       @dowi_window.visible=false
  773.       @item_window.active=true
  774.       $game_system.se_play($data_system.cancel_se)
  775.       return
  776.     end
  777.     if Input.trigger?(Input::C)
  778.       @item = @item_window.item
  779.       if @dowi_window.index == 0
  780. #==============================================================================        
  781.       # 不使用物品的情况下
  782.       unless @item.is_a?(RPG::Item)
  783.         # 演奏冻结 SE
  784.         $game_system.se_play($data_system.buzzer_se)
  785.         return
  786.       end
  787.       # 不能使用的情况下
  788.       unless @actor.item_can_use?(@item.id)
  789.         # 演奏冻结 SE
  790.         $game_system.se_play($data_system.buzzer_se)
  791.         return
  792.       end
  793.       # 演奏确定 SE
  794.       $game_system.se_play($data_system.decision_se)
  795.       # 效果范围是我方的情况下
  796.       if @item.scope >= 3
  797.         # 激活目标窗口
  798.         @dowi_window.active=false
  799.         @dowi_window.visible=false
  800.         @target_window.x = (@item_window.index + 1) % 2 * 304
  801.         @target_window.visible = true
  802.         @target_window.active = true
  803.         # 设置效果范围 (单体/全体) 的对应光标位置
  804.         if @item.scope == 4 || @item.scope == 6
  805.           @target_window.index = -1
  806.         else
  807.           @target_window.index = 0
  808.         end
  809.       # 效果在我方以外的情况下
  810.       else
  811.         # 公共事件 ID 有效的情况下
  812.         if @item.common_event_id > 0
  813.           # 预约调用公共事件
  814.           $game_temp.common_event_id = @item.common_event_id
  815.           # 演奏物品使用时的 SE
  816.           $game_system.se_play(@item.menu_se)
  817.           # 消耗品的情况下
  818.           if @item.consumable
  819.             # 使用的物品数减 1
  820.             @actor.lose_item(@item.id, 1)
  821.             # 再描绘物品窗口的项目
  822.             @item_window.draw_item(@item_window.index)
  823.           end
  824.           # 切换到地图画面
  825.           $scene = Scene_Map.new
  826.           return
  827.         end
  828.  
  829.       return
  830.       end
  831. #==============================================================================   
  832.       else
  833.         if @dowi_window.index==1
  834.           if $game_party.actors.size<2
  835.             $game_system.se_play($data_system.buzzer_se)
  836.             return
  837.           end  
  838.           $正在交付物品=1
  839.           $正在丢弃物品=0
  840.           @dowi_window.active=false
  841.           @dowi_window.visible=false
  842.           @give_window.dispose
  843.           @give_window=Window_Give.new(@actor)
  844.           @give_window.active=true
  845.           @give_window.visible=true
  846.         else
  847.           $正在交付物品=0
  848.           $正在丢弃物品=1
  849.           @dowi_window.active=false
  850.           @dowi_window.visible=false
  851.           @item = @item_window.item
  852.           @num_window.dispose
  853.           @num_window = Window_GiveNum.new(@actor, @item)
  854.           @num_window.active=true
  855.           @num_window.visible=true
  856.         end  
  857.         $game_system.se_play($data_system.decision_se)
  858.         return
  859.       end  
  860.     end
  861.     if Input.trigger?(Input::DOWN)
  862.       @dowi_window.index+=1
  863.       if @dowi_window.index>2
  864.         @dowi_window.index=0
  865.       end  
  866.       $game_system.se_play($data_system.cursor_se)
  867.       return
  868.     end  
  869.     if Input.trigger?(Input::UP)
  870.       @dowi_window.index-=1
  871.       if @dowi_window.index<0
  872.         @dowi_window.index=2
  873.       end
  874.       $game_system.se_play($data_system.cursor_se)
  875.       return
  876.     end
  877.     @dowi_window.update
  878.   end  
  879.   #--------------------------------------------------------------------------
  880.   # ● 刷新画面 (物品窗口被激活的情况下)
  881.   #--------------------------------------------------------------------------
  882.   def update_item
  883.     # 按下 R 键的情况下
  884.     if Input.trigger?(Input::R)
  885.       # 演奏光标 SE
  886.       $game_system.se_play($data_system.cursor_se)
  887.       # 移至下一位角色
  888.       @actor_index += 1
  889.       @actor_index %= $game_party.actors.size
  890.       # 切换到别的装备画面
  891.       $scene = Scene_IndiItem.new(@actor_index)
  892.       return
  893.     end
  894.     # 按下 L 键的情况下
  895.     if Input.trigger?(Input::L)
  896.       # 演奏光标 SE
  897.       $game_system.se_play($data_system.cursor_se)
  898.       # 移至上一位角色
  899.       @actor_index += $game_party.actors.size - 1
  900.       @actor_index %= $game_party.actors.size
  901.       # 切换到别的装备画面
  902.       $scene = Scene_IndiItem.new(@actor_index)
  903.       return
  904.     end
  905.     # 按下 B 键的情况下
  906.     if Input.trigger?(Input::B)
  907.       # 演奏取消 SE
  908.       $game_system.se_play($data_system.cancel_se)
  909.       # 切换到菜单画面
  910.       $scene = Scene_Menu.new(0)
  911.       return
  912.     end
  913.     # 按下 C 键的情况下
  914.     if Input.trigger?(Input::C)
  915.       # 获取物品窗口当前选中的物品数据
  916.       @item = @item_window.item
  917.       @item_window.active=false
  918.       @dowi_window.dispose
  919.       @dowi_window=Window_Dowi.new(@item)
  920.       @dowi_window.visible=true
  921.       @dowi_window.active=true
  922.       $game_system.se_play($data_system.decision_se)
  923.       return
  924.  
  925.     end
  926.   end
  927.   #--------------------------------------------------------------------------
  928.   # ● 刷新画面 (目标窗口被激活的情况下)
  929.   #--------------------------------------------------------------------------
  930.   def update_target
  931.     # 按下 B 键的情况下
  932.     if Input.trigger?(Input::B)
  933.       # 演奏取消 SE
  934.       $game_system.se_play($data_system.cancel_se)
  935.       # 由于物品用完而不能使用的场合
  936.       unless @actor.item_can_use?(@item.id)
  937.         # 再次生成物品窗口的内容
  938.         @item_window.refresh
  939.       end
  940.       # 删除目标窗口
  941.       @item_window.active = true
  942.       @target_window.visible = false
  943.       @target_window.active = false
  944.       return
  945.     end
  946.     # 按下 C 键的情况下
  947.     if Input.trigger?(Input::C)
  948.       # 如果物品用完的情况下
  949.       if @actor.item_number(@item.id) == 0
  950.         # 演奏冻结 SE
  951.         $game_system.se_play($data_system.buzzer_se)
  952.         return
  953.       end
  954.       # 目标是全体的情况下
  955.       if @target_window.index == -1
  956.         # 对同伴全体应用物品使用效果
  957.         used = false
  958.         for i in $game_party.actors
  959.           used |= i.item_effect(@item)
  960.         end
  961.       end
  962.       # 目标是单体的情况下
  963.       if @target_window.index >= 0
  964.         # 对目标角色应用物品的使用效果
  965.         target = $game_party.actors[@target_window.index]
  966.         used = target.item_effect(@item)
  967.       end
  968.       # 使用物品的情况下
  969.       if used
  970.         # 演奏物品使用时的 SE
  971.         $game_system.se_play(@item.menu_se)
  972.         # 消耗品的情况下
  973.         if @item.consumable
  974.           # 使用的物品数减 1
  975.           @actor.lose_item(@item.id, 1)
  976.           # 再描绘物品窗口的项目
  977.           @item_window.draw_item(@item_window.index)
  978.         end
  979.         # 再生成目标窗口的内容
  980.         @target_window.refresh
  981.         # 全灭的情况下
  982.         if $game_party.all_dead?
  983.           # 切换到游戏结束画面
  984.           $scene = Scene_Gameover.new
  985.           return
  986.         end
  987.         # 公共事件 ID 有效的情况下
  988.         if @item.common_event_id > 0
  989.           # 预约调用公共事件
  990.           $game_temp.common_event_id = @item.common_event_id
  991.           # 切换到地图画面
  992.           $scene = Scene_Map.new
  993.           return
  994.         end
  995.       end
  996.       # 无法使用物品的情况下
  997.       unless used
  998.         # 演奏冻结 SE
  999.         $game_system.se_play($data_system.buzzer_se)
  1000.       end
  1001.       return
  1002.     end
  1003.   end
  1004. end
  1005.  
  1006. class Scene_Battle
  1007.   def start_item_select
  1008.     # 生成物品窗口
  1009.     @item_window = Window_IndiItem.new(@active_actor)
  1010.     # 关联帮助窗口
  1011.     @item_window.help_window = @help_window
  1012.     # 无效化角色指令窗口
  1013.     @actor_command_window.active = false
  1014.     @actor_command_window.visible = false
  1015.   end
  1016.   #--------------------------------------------------------------------------
  1017.   # ● 刷新画面 (角色命令回合 : 选择物品)
  1018.   #--------------------------------------------------------------------------
  1019.   def update_phase3_item_select
  1020.     # 设置物品窗口为可视状态
  1021.     @item_window.visible = true
  1022.     # 刷新物品窗口
  1023.     @item_window.update
  1024.     # 按下 B 键的情况下
  1025.     if Input.trigger?(Input::B)
  1026.       # 演奏取消 SE
  1027.       $game_system.se_play($data_system.cancel_se)
  1028.       # 选择物品结束
  1029.       end_item_select
  1030.       return
  1031.     end
  1032.     # 按下 C 键的情况下
  1033.     if Input.trigger?(Input::C)
  1034.       # 获取物品窗口现在选择的物品资料
  1035.       @item = @item_window.item
  1036.       # 无法使用的情况下
  1037.       unless @active_actor.item_can_use?(@item.id)
  1038.         # 演奏冻结 SE
  1039.         $game_system.se_play($data_system.buzzer_se)
  1040.         return
  1041.       end
  1042.       # 演奏确定 SE
  1043.       $game_system.se_play($data_system.decision_se)
  1044.       # 设置行动
  1045.       @active_actor.current_action.item_id = @item.id
  1046.       # 设置物品窗口为不可见状态
  1047.       @item_window.visible = false
  1048.       # 效果范围是敌单体的情况下
  1049.       if @item.scope == 1
  1050.         # 开始选择敌人
  1051.         start_enemy_select
  1052.       # 效果范围是我方单体的情况下
  1053.       elsif @item.scope == 3 or @item.scope == 5
  1054.         # 开始选择角色
  1055.         start_actor_select
  1056.       # 效果范围不是单体的情况下
  1057.       else
  1058.         # 物品选择结束
  1059.         end_item_select
  1060.         # 转到下一位角色的指令输入
  1061.         phase3_next_actor
  1062.       end
  1063.       return
  1064.     end
  1065.   end
  1066.  
  1067.   def make_item_action_result(battler)
  1068.     # アイテムを取得
  1069.     @item = $data_items[battler.current_action.item_id]
  1070.     # アイテム切れなどで使用できなくなった場合
  1071.     unless battler.item_can_use?(@item.id)
  1072.       # ステップ 6 に移行
  1073.       battler.phase = 6
  1074.       return
  1075.     end
  1076.     # 消耗品の場合
  1077.     if @item.consumable
  1078.       # 使用したアイテムを 1 減らす
  1079.       battler.lose_item(@item.id, 1)
  1080.     end
  1081.     # アニメーション ID を設定
  1082.     battler.anime1 = @item.animation1_id
  1083.     battler.anime2 = @item.animation2_id
  1084.     # コモンイベント ID を設定
  1085.     battler.event = @item.common_event_id
  1086.     # 対象を決定
  1087.     index = battler.current_action.target_index
  1088.     target = $game_party.smooth_target_actor(index)
  1089.     # 対象側バトラーを設定
  1090.     set_target_battlers(@item.scope, battler)
  1091.     # アイテムの効果を適用
  1092.     for target in battler.target
  1093.       target.item_effect(@item, battler)
  1094.     end
  1095.   end
  1096. end
  1097.  
  1098. #==============================================================================
  1099. # ■ Window_IndiItem
  1100. #------------------------------------------------------------------------------
  1101. #  物品画面、战斗画面、显示浏览物品的窗口。
  1102. #==============================================================================
  1103.  
  1104. class Window_IndiItem < Window_Selectable
  1105.   #--------------------------------------------------------------------------
  1106.   # ● 初始化对像
  1107.   #--------------------------------------------------------------------------
  1108.   def initialize(actor)
  1109.     @actor = actor
  1110.     super(0, 64, 640, 288)
  1111.     @column_max = 2
  1112.     refresh
  1113.     self.index = 0
  1114.     # 战斗中的情况下将窗口移至中央并将其半透明化
  1115.     if $game_temp.in_battle
  1116.       self.y = 64
  1117.       self.height = 256
  1118.       self.back_opacity = 160
  1119.     end
  1120.   end
  1121.   #--------------------------------------------------------------------------
  1122.   # ● 获取物品
  1123.   #--------------------------------------------------------------------------
  1124.   def item
  1125.     return @data[self.index]
  1126.   end
  1127.   #--------------------------------------------------------------------------
  1128.   # ● 刷新
  1129.   #--------------------------------------------------------------------------
  1130.   def refresh
  1131.     if self.contents != nil
  1132.       self.contents.dispose
  1133.       self.contents = nil
  1134.     end
  1135.     @data = []
  1136.     # 添加报务
  1137.     for i in 1...$data_items.size
  1138.       if @actor.item_number(i) > 0
  1139.         @data.push($data_items[i])
  1140.       end
  1141.     end
  1142.     # 在战斗中以外添加武器、防具
  1143.     unless $game_temp.in_battle
  1144.       for i in 1...$data_weapons.size
  1145.         if @actor.weapon_number(i) > 0
  1146.           @data.push($data_weapons[i])
  1147.         end
  1148.       end
  1149.       for i in 1...$data_armors.size
  1150.         if @actor.armor_number(i) > 0
  1151.           @data.push($data_armors[i])
  1152.         end
  1153.       end
  1154.     end
  1155.     # 如果项目数不是 0 就生成位图、重新描绘全部项目
  1156.     @item_max = @data.size
  1157.     if @item_max > 0
  1158.       self.contents = Bitmap.new(width - 32, row_max * 32)
  1159.       for i in 0...@item_max
  1160.         draw_item(i)
  1161.       end
  1162.     end
  1163.   end
  1164.   #--------------------------------------------------------------------------
  1165.   # ● 描绘项目
  1166.   #     index : 项目编号
  1167.   #--------------------------------------------------------------------------
  1168.   def draw_item(index)
  1169.     item = @data[index]
  1170.     case item
  1171.     when RPG::Item
  1172.       number = @actor.item_number(item.id)
  1173.     when RPG::Weapon
  1174.       number = @actor.weapon_number(item.id)
  1175.     when RPG::Armor
  1176.       number = @actor.armor_number(item.id)
  1177.     end
  1178.     if item.is_a?(RPG::Item) and
  1179.        @actor.item_can_use?(item.id)
  1180.       self.contents.font.color = normal_color
  1181.     else
  1182.       self.contents.font.color = disabled_color
  1183.     end
  1184.     x = 4 + index % 2 * (288 + 32)
  1185.     y = index / 2 * 32
  1186.     rect = Rect.new(x, y, self.width / @column_max - 32, 32)
  1187.     self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
  1188.     bitmap = RPG::Cache.icon(item.icon_name)
  1189.     opacity = self.contents.font.color == normal_color ? 255 : 128
  1190.     self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
  1191.     self.contents.draw_text(x + 28, y, 192, 32, item.name, 0)
  1192.     self.contents.draw_text(x + 224, y, 16, 32, ":", 1)
  1193.     self.contents.draw_text(x + 240, y, 40, 32, number.to_s, 2)
  1194.   end
  1195.   #--------------------------------------------------------------------------
  1196.   # ● 刷新帮助文本
  1197.   #--------------------------------------------------------------------------
  1198.   def update_help
  1199.     @help_window.set_text(self.item == nil ? "" : self.item.description)
  1200.   end
  1201. end
  1202.  
  1203. class Scene_IndiItem
  1204.   alias ori_main main
  1205.   def main
  1206.     @weight_window = Window_Weight.new(@actor)
  1207.     @weight_window.x = 0
  1208.     @weight_window.y = 352
  1209.     @weight_window.z = 0
  1210.     ori_main
  1211.     @weight_window.dispose
  1212.   end  
  1213.   alias ori_update update
  1214.   def update
  1215.        case @item_window.item
  1216.        when RPG::Item
  1217.          @weight_window.refresh($data_items[@item_window.item.id].weight)
  1218.        when RPG::Weapon
  1219.          @weight_window.refresh($data_weapons[@item_window.item.id].weight)
  1220.        when RPG::Armor  
  1221.          @weight_window.refresh($data_armors[@item_window.item.id].weight)
  1222.        end
  1223.     ori_update
  1224.   end
  1225. end
  1226.  
  1227. class Window_Weight < Window_Base
  1228.   def initialize(actor)
  1229.     @actor=actor
  1230.     super(0,0,640,128)
  1231.     self.opacity = 255
  1232.     self.contents = Bitmap.new(width-32,height-32)
  1233.     refresh(nil)
  1234.   end  
  1235.   def refresh(weight)
  1236.     self.contents.clear
  1237.     self.contents.draw_text(0,0,160,32,@actor.name)
  1238.     if weight != nil
  1239.       self.contents.draw_text(128,0,160,32,"单件重量:#{weight}")
  1240.     end
  1241.     self.contents.draw_text(320,0,320,32,"背包重量:"+@actor.total_weight.to_s + "/" + @actor.indi_capacity.to_s , 0)
  1242.     ssstx=0
  1243.     sssty=32
  1244.     self.contents.draw_text(ssstx,sssty,160,32,"装备物品:")
  1245.     ssstx=128
  1246.     if @actor.weapon_id != 0
  1247.       self.contents.draw_text(ssstx,sssty,160,32,$data_weapons[@actor.weapon_id].name + "(" + $data_weapons[@actor.weapon_id].weight.to_s + ")")
  1248.     end
  1249.     ssstx=288
  1250.     if @actor.armor1_id != 0
  1251.       self.contents.draw_text(ssstx,sssty,160,32,$data_armors[@actor.armor1_id].name + "(" + $data_armors[@actor.armor1_id].weight.to_s + ")")
  1252.     end
  1253.     ssstx=448
  1254.     if @actor.armor2_id != 0
  1255.       self.contents.draw_text(ssstx,sssty,160,32,$data_armors[@actor.armor2_id].name + "(" + $data_armors[@actor.armor2_id].weight.to_s + ")")
  1256.     end
  1257.     ssstx=128
  1258.     sssty=64
  1259.     if @actor.armor3_id != 0
  1260.       self.contents.draw_text(ssstx,sssty,160,32,$data_armors[@actor.armor3_id].name + "(" + $data_armors[@actor.armor3_id].weight.to_s + ")")
  1261.     end
  1262.     ssstx=288
  1263.     if @actor.armor4_id != 0
  1264.       self.contents.draw_text(ssstx,sssty,160,32,$data_armors[@actor.armor4_id].name + "(" + $data_armors[@actor.armor4_id].weight.to_s + ")")
  1265.     end
  1266.   end
  1267. end  
  1268.  
  1269. class Window_Dowi < Window_Selectable
  1270.   def initialize(item = nil)
  1271.     super(256, 240, 128, 160)
  1272.     @item = item
  1273.     self.opacity = 255
  1274.     self.contents = Bitmap.new(width-32,height-32)
  1275.     self.z=120
  1276.     self.index=0
  1277.     refresh
  1278.   end  
  1279.   def refresh
  1280.     self.contents.draw_text(4, 0, 192, 32, "使用", 0)
  1281.     self.contents.draw_text(4, 32, 192, 32, "交给", 0)
  1282.     self.contents.draw_text(4, 64, 192, 32, "丢弃", 0)
  1283.   end  
  1284. end
  1285.  
  1286. class Window_Give < Window_Selectable
  1287.   def initialize(actor)
  1288.     super(256, 240, 128, 160)
  1289.     @actor = actor
  1290.     @column_max = 1
  1291.     self.active = false
  1292.     self.index = -1
  1293.     self.contents = Bitmap.new(width - 32, height - 32)
  1294.     self.z=120
  1295.     self.index=0
  1296.     $指定人物=0
  1297.     # 添加本人以外的角色
  1298.     @data=[]
  1299.     @data_target=[]
  1300.     for iii in 0...$game_party.actors.size
  1301.       if @actor != $game_party.actors[iii]
  1302.         @data.push($game_party.actors[iii].name)
  1303.         @data_target.push(iii)
  1304.       end  
  1305.     end
  1306.     @item_max=@data.size
  1307.     $give_max=@item_max
  1308.     refresh
  1309.   end
  1310.  
  1311.   def refresh
  1312.     self.contents.clear
  1313.     for i in 0...@item_max
  1314.       draw_item(i)
  1315.     end
  1316.     $指定人物=@data_target[self.index]
  1317.   end  
  1318.  
  1319.   #--------------------------------------------------------------------------
  1320.   # ● 项目的描绘
  1321.   #     index : 项目符号
  1322.   #--------------------------------------------------------------------------
  1323.   def draw_item(index)
  1324.     #print index
  1325.     item = @data[index]
  1326.     #print item
  1327.     x = 4
  1328.     y = index * 32
  1329.     self.contents.font.color = normal_color
  1330.     self.contents.draw_text(x, y, 192, 32, item, 0)
  1331.   end
  1332.  
  1333.   def update
  1334.     refresh
  1335.   end  
  1336. end
  1337.  
  1338. class Window_GiveNum < Window_Base
  1339.   #--------------------------------------------------------------------------
  1340.   # ● 初始化对像
  1341.   #--------------------------------------------------------------------------
  1342.   def initialize(actor, item)
  1343.     super(160, 80, 320, 160)
  1344.     self.contents = Bitmap.new(width - 32, height - 32)
  1345.     @item = item
  1346.     @number = 1
  1347.     if item != nil  
  1348.       @max = actor.item_number(item.id)
  1349.     else
  1350.       @max = 0
  1351.     end  
  1352.     self.z=120
  1353.     refresh
  1354.   end
  1355.   def refresh
  1356.     self.contents.clear
  1357.     self.contents.font.color = normal_color
  1358.     if @item != nil  
  1359.     if $正在丢弃物品 != 0
  1360.       self.contents.draw_text(4, 0, 192, 32, "丢掉几件", 0)
  1361.       self.contents.draw_text(200, 0, 192, 32, @number.to_s, 0)
  1362.       self.contents.draw_text(4, 32, 192, 32, "减轻重量", 0)
  1363.       self.contents.draw_text(200, 32, 192, 32, [@number * @item.weight].to_s, 0)
  1364.       self.contents.draw_text(4, 96, 240, 32, "请按方向键增减数量", 0)
  1365.       return
  1366.     end  
  1367.     if $正在交付物品 != 1
  1368.       self.contents.draw_text(4, 0, 192, 32, "要交给谁", 0)
  1369.     else
  1370.       self.contents.draw_text(4, 0, 192, 32, "交给几件", 0)
  1371.       self.contents.draw_text(200, 0, 192, 32, @number.to_s, 0)
  1372.       self.contents.draw_text(4, 32, 192, 32, "交换重量", 0)
  1373.       self.contents.draw_text(200, 32, 192, 32, [@number * @item.weight].to_s, 0)
  1374.       self.contents.draw_text(4, 64, 240, 32, "接收方剩余负荷", 0)
  1375.       lastweight=$game_party.actors[$指定人物].indi_capacity-$game_party.actors[$指定人物].total_weight
  1376.       self.contents.draw_text(200, 64, 192, 32, lastweight.to_s, 0)
  1377.     end
  1378.     self.contents.draw_text(4, 96, 240, 32, "请按方向键增减数量", 0)
  1379.     end
  1380.   end  
  1381.   #--------------------------------------------------------------------------
  1382.   # ● 刷新画面
  1383.   #--------------------------------------------------------------------------
  1384.   def update
  1385.     super
  1386.     if @item != nil
  1387.     if self.active
  1388.       # 光标右 (+10)
  1389.       if Input.repeat?(Input::RIGHT) and @number < @max
  1390.         $game_system.se_play($data_system.cursor_se)
  1391.         @number = [@number + 10, @max].min
  1392.       end
  1393.       # 光标左 (-10)
  1394.       if Input.repeat?(Input::LEFT) and @number > 1
  1395.         $game_system.se_play($data_system.cursor_se)
  1396.         @number = [@number - 10, 1].max
  1397.       end
  1398.       # 光标上 (-1)
  1399.       if Input.repeat?(Input::UP) and @number > 1
  1400.         $game_system.se_play($data_system.cursor_se)
  1401.         @number -= 1
  1402.       end
  1403.       # 光标下 (+1)
  1404.       if Input.repeat?(Input::DOWN) and @number < @max
  1405.         $game_system.se_play($data_system.cursor_se)
  1406.         @number += 1
  1407.       end
  1408.     end
  1409.     end
  1410.     $交付数量=@number
  1411.     refresh
  1412.   end
  1413. end
  1414.  
  1415. #==============================================================================
  1416. # ■ Window_EquipItem
  1417. #------------------------------------------------------------------------------
  1418. #  装备画面、显示浏览变更装备的候补物品的窗口。
  1419. #==============================================================================
  1420.  
  1421. class Window_EquipItem < Window_Selectable
  1422.   #--------------------------------------------------------------------------
  1423.   # ● 初始化对像
  1424.   #     actor      : 角色
  1425.   #     equip_type : 装备部位 (0~3)
  1426.   #--------------------------------------------------------------------------
  1427.   def initialize(actor, equip_type)
  1428.     super(0, 256, 640, 224)
  1429.     @actor = actor
  1430.     @equip_type = equip_type
  1431.     @column_max = 2
  1432.     refresh
  1433.     self.active = false
  1434.     self.index = -1
  1435.   end
  1436.   #--------------------------------------------------------------------------
  1437.   # ● 获取物品
  1438.   #--------------------------------------------------------------------------
  1439.   def item
  1440.     return @data[self.index]
  1441.   end
  1442.   #--------------------------------------------------------------------------
  1443.   # ● 刷新
  1444.   #--------------------------------------------------------------------------
  1445.   def refresh
  1446.     if self.contents != nil
  1447.       self.contents.dispose
  1448.       self.contents = nil
  1449.     end
  1450.     @data = []
  1451.     # 添加可以装备的武器
  1452.     if @equip_type == 0
  1453.       weapon_set = $data_classes[@actor.class_id].weapon_set
  1454.       for i in 1...$data_weapons.size
  1455.         if @actor.weapon_number(i) > 0 and weapon_set.include?(i)
  1456.           @data.push($data_weapons[i])
  1457.         end
  1458.       end
  1459.     end
  1460.     # 添加可以装备的防具
  1461.     if @equip_type != 0
  1462.       armor_set = $data_classes[@actor.class_id].armor_set
  1463.       for i in 1...$data_armors.size
  1464.         if @actor.armor_number(i) > 0 and armor_set.include?(i)
  1465.           if $data_armors[i].kind == @equip_type-1
  1466.             @data.push($data_armors[i])
  1467.           end
  1468.         end
  1469.       end
  1470.     end
  1471.     # 添加空白
  1472.     @data.push(nil)
  1473.     # 生成位图、描绘全部项目
  1474.     @item_max = @data.size
  1475.     self.contents = Bitmap.new(width - 32, row_max * 32)
  1476.     for i in 0...@item_max-1
  1477.       draw_item(i)
  1478.     end
  1479.   end
  1480.   #--------------------------------------------------------------------------
  1481.   # ● 项目的描绘
  1482.   #     index : 项目符号
  1483.   #--------------------------------------------------------------------------
  1484.   def draw_item(index)
  1485.     item = @data[index]
  1486.     x = 4 + index % 2 * (288 + 32)
  1487.     y = index / 2 * 32
  1488.     case item
  1489.     when RPG::Weapon
  1490.       number = @actor.weapon_number(item.id)
  1491.     when RPG::Armor
  1492.       number = @actor.armor_number(item.id)
  1493.     end
  1494.     bitmap = RPG::Cache.icon(item.icon_name)
  1495.     self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24))
  1496.     self.contents.font.color = normal_color
  1497.     self.contents.draw_text(x + 28, y, 192, 32, item.name, 0)
  1498.     self.contents.draw_text(x + 224, y, 16, 32, ":", 1)
  1499.     self.contents.draw_text(x + 240, y, 40, 32, number.to_s, 2)
  1500.   end
  1501.   #--------------------------------------------------------------------------
  1502.   # ● 刷新帮助文本
  1503.   #--------------------------------------------------------------------------
  1504.   def update_help
  1505.     @help_window.set_text(self.item == nil ? "" : self.item.description)
  1506.   end
  1507. end
  1508.  
  1509. class Game_Party
  1510.   #--------------------------------------------------------------------------
  1511.   # ● 增加物品 (减少)
  1512.   #     item_id : 物品 ID
  1513.   #     n       : 个数
  1514.   #--------------------------------------------------------------------------
  1515.   def gain_item(item_id, n)
  1516.     # 更新 hash 的个数数据
  1517.     if item_id > 0
  1518.       wwwt = $data_items[item_id].weight
  1519.       straight = 0 #从领队开始依次拿取物品,当领队载重量不够时转至下一个队员获取
  1520.       for iii in 0...n #检查物品n次
  1521.         leftwt = $game_party.actors[straight].indi_capacity - $game_party.actors[straight].total_weight
  1522.         while leftwt < wwwt
  1523.           straight += 1
  1524.           if straight>=$game_party.actors.size
  1525.             return
  1526.           end  
  1527.           leftwt = $game_party.actors[straight].indi_capacity - $game_party.actors[straight].total_weight
  1528.         end
  1529.         $game_party.actors[straight].gain_item(item_id, 1)
  1530.       end
  1531.     end
  1532.   end
  1533.   #--------------------------------------------------------------------------
  1534.   # ● 增加武器 (减少)
  1535.   #     weapon_id : 武器 ID
  1536.   #     n         : 个数
  1537.   #--------------------------------------------------------------------------
  1538.   def gain_weapon(weapon_id, n)
  1539.     # 更新 hash 的个数数据
  1540.     if item_id > 0
  1541.       wwwt = $data_weapons[weapon_id].weight
  1542.       straight = 0 #从领队开始依次拿取物品,当领队载重量不够时转至下一个队员获取
  1543.       for iii in 0...n #检查物品n次
  1544.         leftwt = $game_party.actors[straight].indi_capacity - $game_party.actors[straight].total_weight
  1545.         while leftwt < wwwt
  1546.           straight += 1
  1547.           if straight>=$game_party.actors.size
  1548.             return
  1549.           end  
  1550.           leftwt = $game_party.actors[straight].indi_capacity - $game_party.actors[straight].total_weight
  1551.         end
  1552.         $game_party.actors[straight].gain_weapon(weapon_id, 1)
  1553.       end  
  1554.     end
  1555.   end
  1556.   #--------------------------------------------------------------------------
  1557.   # ● 增加防具 (减少)
  1558.   #     armor_id : 防具 ID
  1559.   #     n        : 个数
  1560.   #--------------------------------------------------------------------------
  1561.   def gain_armor(armor_id, n)
  1562.     # 更新 hash 的个数数据
  1563.     if item_id > 0
  1564.       wwwt = $data_armors[armor_id].weight
  1565.       straight = 0 #从领队开始依次拿取物品,当领队载重量不够时转至下一个队员获取
  1566.       for iii in 0...n #检查物品n次
  1567.         leftwt = $game_party.actors[straight].indi_capacity - $game_party.actors[straight].total_weight
  1568.         while leftwt < wwwt
  1569.           straight += 1
  1570.           if straight>=$game_party.actors.size
  1571.             return
  1572.           end  
  1573.           leftwt = $game_party.actors[straight].indi_capacity - $game_party.actors[straight].total_weight
  1574.         end
  1575.         $game_party.actors[straight].gain_armor(armor_id, 1)
  1576.       end  
  1577.     end
  1578.   end
  1579. end

RUBY 代码复制
  1. #单人负重系统 V 1.10 BY SLICK
  2.  
  3. module RPG
  4.   class Item
  5.     attr_accessor :weight
  6.     def name
  7.       return @name.split(/,/)[0]
  8.     end
  9.     def weight
  10.       rpgwt = @name.split(/,/)[1].to_i
  11.       return rpgwt = nil ? 0 : rpgwt
  12.     end
  13.     def description
  14.       return @description.split(/@/)[0]
  15.     end
  16.     def inc_weight
  17.       rpgwt = @description.split(/@/)[1].to_i
  18.       return rpgwt = nil ? 0 : rpgwt
  19.     end
  20.   end
  21.  
  22.   class Weapon
  23.     attr_accessor :weight
  24.     def name
  25.       return @name.split(/,/)[0]
  26.     end
  27.     def weight
  28.       rpgwt = @name.split(/,/)[1].to_i
  29.       return rpgwt = nil ? 0 : rpgwt
  30.     end  
  31.    end
  32.  
  33.   class Armor
  34.     attr_accessor :weight
  35.     def name
  36.       return @name.split(/,/)[0]
  37.     end
  38.     def weight
  39.       rpgwt = @name.split(/,/)[1].to_i
  40.       return rpgwt = nil ? 0 : rpgwt
  41.     end  
  42.   end
  43. end
  44.  
  45. class Game_Actor < Game_Battler
  46.   attr_accessor :weight # 单个人物目前所带负载
  47.   attr_accessor :indi_capacity
  48.   attr_accessor :items
  49.   attr_accessor :weapons
  50.   attr_accessor :armors
  51.   alias original_setup setup
  52.   def setup(actor_id)
  53.     original_setup(actor_id)
  54.     @weight=0
  55.     @items = {}
  56.     @weapons = {}
  57.     @armors = {}
  58.     case actor_id
  59.       when 1 # SLICK
  60.         @indi_capacity = 50000
  61.       when 2 # 玛塔赫
  62.         @indi_capacity = 18000
  63.       when 3 # 塞拉斯
  64.         @indi_capacity = 40000
  65.       when 4 # 特萝西
  66.         @indi_capacity = 14000
  67.       when 5 # 艾斯迪儿
  68.         @indi_capacity = 36000
  69.       when 6 # 菲力克斯
  70.         @indi_capacity = 25000      
  71.       when 7 # 克萝莉亚
  72.         @indi_capacity = 14000
  73.       when 8 # 西露达
  74.         @indi_capacity = 10000
  75.     end
  76.   end
  77.  
  78.   def total_weight
  79.     totalwt = self.weight
  80.     if self.weapon_id != 0
  81.       totalwt += $data_weapons[self.weapon_id].weight
  82.     end
  83.     if self.armor1_id != 0
  84.       totalwt += $data_armors[self.armor1_id].weight
  85.     end
  86.     if self.armor2_id != 0
  87.       totalwt += $data_armors[self.armor2_id].weight
  88.     end
  89.     if self.armor3_id != 0
  90.       totalwt += $data_armors[self.armor3_id].weight
  91.     end
  92.     if self.armor4_id != 0
  93.       totalwt += $data_armors[self.armor4_id].weight
  94.     end
  95.     return totalwt
  96.   end  
  97.  
  98.   def item_number(item_id)
  99.     # 如果 hash 个数数值不存在就返回 0
  100.     return @items.include?(item_id) ? @items[item_id] : 0
  101.   end
  102.   #--------------------------------------------------------------------------
  103.   # ● 获取武器所持数
  104.   #     weapon_id : 武器 ID
  105.   #--------------------------------------------------------------------------
  106.   def weapon_number(weapon_id)
  107.     # 如果 hash 个数数值不存在就返回 0
  108.     return @weapons.include?(weapon_id) ? @weapons[weapon_id] : 0
  109.   end
  110.   #--------------------------------------------------------------------------
  111.   # ● 获取防具所持数
  112.   #     armor_id : 防具 ID
  113.   #--------------------------------------------------------------------------
  114.   def armor_number(armor_id)
  115.     # 如果 hash 个数数值不存在就返回 0
  116.     return @armors.include?(armor_id) ? @armors[armor_id] : 0
  117.   end
  118.   #--------------------------------------------------------------------------
  119.   # ● 增加物品 (减少)
  120.   #     item_id : 物品 ID
  121.   #     n       : 个数
  122.   #--------------------------------------------------------------------------
  123.   def gain_item(item_id, n)
  124.     # 更新 hash 的个数数据
  125.     if item_id > 0
  126.  
  127.       temp = @weight + $data_items[item_id].weight * n
  128.  
  129.       return if (n < 0 and @items[item_id] == nil)
  130.  
  131.       if temp > max_weight
  132.         return
  133.       end
  134.       if temp < 0
  135.         a = @weight
  136.         for i in 1..n.abs
  137.           a -= $data_items[item_id].weight
  138.           if a < 0
  139.             return
  140.           else
  141.             # 数量-1
  142.             @items[item_id] = [item_number(item_id) - i, 0].max
  143.             # 负重-1
  144.             @weight -= $data_items[item_id].weight
  145.             # p @weight
  146.           end  
  147.         end
  148.         # p @weight
  149.         return
  150.       end  
  151.  
  152.       if @items[item_id] != nil
  153.         b = @items[item_id] - n.abs
  154.         if b < 0 and n < 0
  155.           c = @items[item_id]
  156.           @items[item_id] = [item_number(item_id) + n, 0].max
  157.           @weight -= $data_items[item_id].weight * c
  158.           # p @weight
  159.           return
  160.         end
  161.       end  
  162.  
  163.       @items[item_id] = [item_number(item_id) + n, 0].max
  164.       @weight = temp
  165.       # p @weight
  166.     end
  167.   end
  168.   #--------------------------------------------------------------------------
  169.   # ● 增加武器 (减少)
  170.   #     weapon_id : 武器 ID
  171.   #     n         : 个数
  172.   #--------------------------------------------------------------------------
  173.   def gain_weapon(weapon_id, n)
  174.     # 更新 hash 的个数数据
  175.     if weapon_id > 0
  176.       temp = @weight + $data_weapons[weapon_id].weight * n
  177.  
  178.       return if (n < 0 and @weapons[weapon_id] == nil)
  179.  
  180.       if temp > max_weight
  181.         return
  182.       end
  183.       if temp < 0
  184.         a = @weight
  185.         for i in 1..n.abs
  186.           a -= $data_weapons[weapon_id].weight
  187.           if a < 0
  188.             return
  189.           else
  190.             # 数量-1
  191.             @weapons[weapon_id] = [weapon_number(weapon_id) - i, 0].max
  192.             # 负重-1
  193.             @weight -= $data_weapons[weapon_id].weight
  194.            # p @weight
  195.           end  
  196.         end
  197.        # p @weight
  198.         return
  199.       end  
  200.  
  201.       if @weapons[weapon_id] != nil
  202.         b = @weapons[weapon_id] - n.abs
  203.         if b < 0 and n < 0
  204.           c = @weapons[weapon_id]
  205.           @weapons[weapon_id] = [weapon_number(weapon_id) + n, 0].max
  206.           @weight -= $data_weapons[weapon_id].weight * c
  207.         #  p @weight
  208.           return
  209.         end
  210.       end
  211.  
  212.       @weapons[weapon_id] = [weapon_number(weapon_id) + n, 0].max
  213.       @weight = temp
  214.      # p @weight
  215.     end
  216.   end
  217.   #--------------------------------------------------------------------------
  218.   # ● 增加防具 (减少)
  219.   #     armor_id : 防具 ID
  220.   #     n        : 个数
  221.   #--------------------------------------------------------------------------
  222.   def gain_armor(armor_id, n)
  223.     # 更新 hash 的个数数据
  224.     if armor_id > 0
  225.       temp = @weight + $data_armors[armor_id].weight * n
  226.  
  227.       return if (n < 0 and @armors[armor_id] == nil)
  228.  
  229.       if temp > max_weight
  230.         return
  231.       end
  232.       if temp < 0
  233.         a = @weight
  234.         for i in 1..n.abs
  235.           a -= $data_armors[armor_id].weight
  236.           if a < 0
  237.             return
  238.           else
  239.             # 数量-1
  240.             @armors[armor_id] = [armor_number(armor_id) - i, 0].max
  241.             # 负重-1
  242.             @weight -= $data_armors[armor_id].weight
  243.             # p @weight
  244.           end  
  245.         end
  246.         # p @weight
  247.         return
  248.       end  
  249.  
  250.       if @armors[armor_id] != nil
  251.         b = @armors[armor_id] - n.abs
  252.         if b < 0 and n < 0
  253.           c = @armors[armor_id]
  254.           @armors[armor_id] = [armor_number(armor_id) + n, 0].max
  255.           @weight -= $data_armors[armor_id].weight * c
  256.           # p @weight
  257.           return
  258.         end
  259.       end
  260.  
  261.       @armors[armor_id] = [armor_number(armor_id) + n, 0].max
  262.       @weight = temp
  263.       # p @weight
  264.     end
  265.   end
  266.  
  267.   def max_weight
  268.     return @indi_capacity
  269.   end
  270.  
  271.   def check_weight
  272.  
  273.   end
  274.  
  275.   #--------------------------------------------------------------------------
  276.   # ● 减少物品
  277.   #     item_id : 物品 ID
  278.   #     n       : 个数
  279.   #--------------------------------------------------------------------------
  280.   def lose_item(item_id, n)
  281.     # 调用 gain_item 的数值逆转
  282.     gain_item(item_id, -n)
  283.   end
  284.   #--------------------------------------------------------------------------
  285.   # ● 减少武器
  286.   #     weapon_id : 武器 ID
  287.   #     n         : 个数
  288.   #--------------------------------------------------------------------------
  289.   def lose_weapon(weapon_id, n)
  290.     # 调用 gain_weapon 的数值逆转
  291.     gain_weapon(weapon_id, -n)
  292.   end
  293.   #--------------------------------------------------------------------------
  294.   # ● 减少防具
  295.   #     armor_id : 防具 ID
  296.   #     n        : 个数
  297.   #--------------------------------------------------------------------------
  298.   def lose_armor(armor_id, n)
  299.     # 调用 gain_armor 的数值逆转
  300.     gain_armor(armor_id, -n)
  301.   end
  302.   #--------------------------------------------------------------------------
  303.   # ● 判断物品可以使用
  304.   #     item_id : 物品 ID
  305.   #--------------------------------------------------------------------------
  306.   def item_can_use?(item_id)
  307.     # 物品个数为 0 的情况
  308.     if item_number(item_id) == 0
  309.       # 不能使用
  310.       return false
  311.     end
  312.     # 获取可以使用的时候
  313.     occasion = $data_items[item_id].occasion
  314.     # 战斗的情况
  315.     if $game_temp.in_battle
  316.       # 可以使用时为 0 (平时) 或者是 1 (战斗时) 可以使用
  317.       return (occasion == 0 or occasion == 1)
  318.     end
  319.     # 可以使用时为 0 (平时) 或者是 2 (菜单时) 可以使用
  320.     return (occasion == 0 or occasion == 2)
  321.   end
  322.   #--------------------------------------------------------------------------
  323.   # ● 变更装备
  324.   #     equip_type : 装备类型
  325.   #     id    : 武器 or 防具 ID  (0 为解除装备)
  326.   #--------------------------------------------------------------------------
  327.   def equip(equip_type, id)
  328.     case equip_type
  329.     when 0  # 武器
  330.       if id == 0 or self.weapon_number(id) > 0
  331.         self.gain_weapon(@weapon_id, 1)
  332.         @weapon_id = id
  333.         self.lose_weapon(id, 1)
  334.       end
  335.     when 1  # 盾
  336.       if id == 0 or self.armor_number(id) > 0
  337.         update_auto_state($data_armors[@armor1_id], $data_armors[id])
  338.         self.gain_armor(@armor1_id, 1)
  339.         @armor1_id = id
  340.         self.lose_armor(id, 1)
  341.       end
  342.     when 2  # 头
  343.       if id == 0 or self.armor_number(id) > 0
  344.         update_auto_state($data_armors[@armor2_id], $data_armors[id])
  345.         self.gain_armor(@armor2_id, 1)
  346.         @armor2_id = id
  347.         self.lose_armor(id, 1)
  348.       end
  349.     when 3  # 身体
  350.       if id == 0 or self.armor_number(id) > 0
  351.         update_auto_state($data_armors[@armor3_id], $data_armors[id])
  352.         self.gain_armor(@armor3_id, 1)
  353.         @armor3_id = id
  354.         self.lose_armor(id, 1)
  355.       end
  356.     when 4  # 装饰品
  357.       if id == 0 or self.armor_number(id) > 0
  358.         update_auto_state($data_armors[@armor4_id], $data_armors[id])
  359.         self.gain_armor(@armor4_id, 1)
  360.         @armor4_id = id
  361.         self.lose_armor(id, 1)
  362.       end
  363.     end
  364.   end
  365. end  
  366.  
  367. #==============================================================================
  368. # ■ Scene_Menu
  369. #------------------------------------------------------------------------------
  370. #  处理菜单画面的类。
  371. #==============================================================================
  372.  
  373. class Scene_Menu
  374.   #--------------------------------------------------------------------------
  375.   # ● 初始化对像
  376.   #     menu_index : 命令光标的初期位置
  377.   #--------------------------------------------------------------------------
  378.   def initialize(menu_index = 0)
  379.     @menu_index = menu_index
  380.   end
  381.   #--------------------------------------------------------------------------
  382.   # ● 主处理
  383.   #--------------------------------------------------------------------------
  384.   def main
  385.     # 生成命令窗口
  386.     s1 = "对话"
  387.     s2 = "乘降"
  388.     s3 = "强度"
  389.     s4 = "工具"
  390.     s5 = "装备"
  391.     s6 = "炮弹"
  392.     s7 = "调查"
  393.     s8 = "系统"
  394.     @command_window = Window_Menu.new(200, [s1, s2, s3, s4, s5, s6, s7, s8],2)
  395.     @command_window.index = @menu_index
  396.     # 同伴人数为 0 的情况下
  397.     if $game_party.actors.size == 0
  398.       # 物品、特技、装备、状态无效化
  399.       @command_window.disable_item(0)
  400.       @command_window.disable_item(1)
  401.       @command_window.disable_item(2)
  402.       @command_window.disable_item(3)
  403.     end
  404.     # 生成金钱窗口
  405.     @gold_window = Window_Gold.new
  406.     @gold_window.x = 485
  407.     # 生成状态窗口
  408.     @status_window = Window_MenuStatus.new
  409.     @status_window.x = 193
  410.     @status_window.y = 315
  411.     # 生成地图名窗口
  412.     @mapname_window = Window_Mapname.new
  413.     @mapname_window.x = 0
  414.     # 执行过渡
  415.     Graphics.transition
  416.     # 主循环
  417.     loop do
  418.       # 刷新游戏画面
  419.       Graphics.update
  420.       # 刷新输入信息
  421.       Input.update
  422.       # 刷新画面
  423.       update
  424.       # 如果切换画面就中断循环
  425.        if $scene != self
  426.         break
  427.       end
  428.     end
  429.     # 准备过渡
  430.     Graphics.freeze
  431.     # 准备过渡
  432.     Graphics.freeze
  433.     # 释放窗口
  434.     @command_window.dispose
  435.     @gold_window.dispose
  436.     @status_window.dispose
  437.     @mapname_window.dispose
  438.   end
  439.   #--------------------------------------------------------------------------
  440.   # ● 刷新画面
  441.   #--------------------------------------------------------------------------
  442.   def update
  443.     # 刷新窗口
  444.     @command_window.update
  445.     @status_window.update
  446.     # 命令窗口被激活的情况下: 调用 update_command
  447.     if @command_window.active
  448.       update_command
  449.       return
  450.     end
  451.     # 状态窗口被激活的情况下: 调用 update_status
  452.     if @status_window.active
  453.       update_status
  454.       return
  455.     end
  456.   end
  457.   #--------------------------------------------------------------------------
  458.   # ● 刷新画面 (命令窗口被激活的情况下)
  459.   #--------------------------------------------------------------------------
  460.   def update_command
  461.     # 按下 B 键的情况下
  462.     if Input.trigger?(Input::B)
  463.       # 演奏取消 SE
  464.       $game_system.se_play($data_system.cancel_se)
  465.       # 切换的地图画面
  466.       $scene = Scene_Map.new
  467.       return
  468.     end
  469.     # 按下 C 键的情况下
  470.     if Input.trigger?(Input::C)
  471.       # 同伴人数为 0、存档、游戏结束以外的场合
  472.       if $game_party.actors.size == 0 and @command_window.index < 4
  473.         # 演奏冻结 SE
  474.         $game_system.se_play($data_system.buzzer_se)
  475.         return
  476.       end
  477.       # 命令窗口的光标位置分支
  478.       case @command_window.index
  479.       when 5  # 特技
  480.         # 演奏确定 SE
  481.         $game_system.se_play($data_system.decision_se)
  482.         $game_temp.message_text = "只有对话和调查"
  483.         $scene = Scene_Map.new
  484.       when 3  # 物品
  485.         # 演奏确定 SE
  486.         $game_system.se_play($data_system.decision_se)
  487.         # 切换到物品画面
  488.         @command_window.active = false
  489.         @status_window.active = true
  490.         @status_window.index = 0
  491.       when 4  # 装备
  492.         # 演奏确定 SE
  493.         $game_system.se_play($data_system.decision_se)
  494.         # 激活状态窗口
  495.          @command_window.active = false
  496.         @status_window.active = true
  497.         @status_window.index = 0
  498.       when 2  # 状态
  499.         # 演奏确定 SE
  500.         $game_system.se_play($data_system.decision_se)
  501.         # 激活状态窗口
  502.          $game_temp.message_text = "只有对话和调查"
  503.          $scene = Scene_Map.new
  504.       when 6  # 调查
  505.         $game_system.se_play($data_system.decision_se)
  506.         $game_temp.check_judge = true
  507.         $scene = Scene_Map.new
  508.       when 7  # 系统
  509.         # 演奏确定 SE
  510.         $game_system.se_play($data_system.decision_se)
  511.          $game_temp.common_event_id = 4
  512.          $scene = Scene_Map.new
  513.       when 0  # 对话
  514.         $game_system.se_play($data_system.decision_se)
  515.         $game_temp.conversation_judge = true
  516.         $scene = Scene_Map.new
  517.       when 1  # 乘降
  518.         $game_system.se_play($data_system.decision_se)
  519.         $game_temp.common_event_id = 6
  520.         $scene = Scene_Map.new
  521.       end
  522.       return
  523.     end
  524.   end
  525.   #--------------------------------------------------------------------------
  526.   # ● 刷新画面 (状态窗口被激活的情况下)
  527.   #--------------------------------------------------------------------------
  528.   def update_status
  529.     # 按下 B 键的情况下
  530.     if Input.trigger?(Input::B)
  531.       # 演奏取消 SE
  532.       $game_system.se_play($data_system.cancel_se)
  533.       # 激活命令窗口
  534.       @command_window.active = true
  535.       @status_window.active = false
  536.       @status_window.index = -1
  537.       return
  538.     end
  539.     # 按下 C 键的情况下
  540.     if Input.trigger?(Input::C)
  541.       # 命令窗口的光标位置分支
  542.       case @command_window.index
  543.       when 5  # 特技
  544.         # 本角色的行动限制在 2 以上的情况下
  545.         if $game_party.actors[@status_window.index].restriction >= 2
  546.           # 演奏冻结 SE
  547.           $game_system.se_play($data_system.buzzer_se)
  548.           return
  549.         end
  550.         # 演奏确定 SE
  551.         $game_system.se_play($data_system.decision_se)
  552.         # 切换到特技画面
  553.         $scene = Scene_Skill.new(@status_window.index)
  554.       when 4  # 装备
  555.         # 演奏确定 SE
  556.         $game_system.se_play($data_system.decision_se)
  557.         # 切换的装备画面
  558.         $scene = Scene_Equip.new(@status_window.index)
  559.       when 2  # 状态
  560.         # 演奏确定 SE
  561.         $game_system.se_play($data_system.decision_se)
  562.         # 切换到状态画面
  563.         $scene = Scene_Status.new(@status_window.index)
  564.       end
  565.       return
  566.     end
  567.   end
  568. end
  569. #==============================================================================
  570. # ■ Scene_IndiItem
  571. #------------------------------------------------------------------------------
  572. #  处理单人物品画面的类。
  573. #==============================================================================
  574.  
  575. class Scene_IndiItem
  576.   #--------------------------------------------------------------------------
  577.   # ● 初始化对像
  578.   #     actor_index : 角色索引
  579.   #     equip_index : 装备索引
  580.   #--------------------------------------------------------------------------
  581.   def initialize(actor_index)
  582.     @actor_index = actor_index
  583.     @actor = $game_party.actors[@actor_index]
  584.     $正在丢弃物品 = 0
  585.     $正在交付物品 = 0
  586.     $指定人物=0
  587.     $交付数量=0
  588.   end
  589.   #--------------------------------------------------------------------------
  590.   # ● 主处理
  591.   #--------------------------------------------------------------------------
  592.   def main
  593.     # 生成帮助窗口、物品窗口
  594.     @help_window = Window_Help.new
  595.     @item_window = Window_IndiItem.new(@actor)
  596.     # 关联帮助窗口
  597.     @item_window.help_window = @help_window
  598.     # 生成目标窗口 (设置为不可见・不活动)
  599.     @target_window = Window_Target.new
  600.     @target_window.visible = false
  601.     @target_window.active = false
  602.     @num_window = Window_GiveNum.new(@actor, nil)
  603.     @num_window.visible=false
  604.     @num_window.active=false
  605.     @give_window = Window_Give.new(@actor)
  606.     @give_window.visible=false
  607.     @give_window.active=false
  608.     @dowi_window = Window_Dowi.new
  609.     @dowi_window.visible=false
  610.     @dowi_window.active=false
  611.     # 执行过度
  612.     Graphics.transition
  613.     # 主循环
  614.     loop do
  615.       # 刷新游戏画面
  616.       Graphics.update
  617.       # 刷新输入信息
  618.       Input.update
  619.       # 刷新画面
  620.       update
  621.       # 如果画面切换就中断循环
  622.       if $scene != self
  623.         break
  624.       end
  625.     end
  626.     # 装备过渡
  627.     Graphics.freeze
  628.     # 释放窗口
  629.     @help_window.dispose
  630.     @item_window.dispose
  631.     @target_window.dispose
  632.     @num_window.dispose
  633.     @give_window.dispose
  634.     @dowi_window.dispose
  635.   end
  636.   #--------------------------------------------------------------------------
  637.   # ● 刷新画面
  638.   #--------------------------------------------------------------------------
  639.   def update
  640.     # 刷新窗口
  641.     @help_window.update
  642.     @item_window.update
  643.     @target_window.update
  644.     # 物品窗口被激活的情况下: 调用 update_item
  645.     if @item_window.active
  646.       update_item
  647.       return
  648.     end
  649.     # 目标窗口被激活的情况下: 调用 update_target
  650.     if @target_window.active
  651.       update_target
  652.       return
  653.     end
  654.     if @num_window.active
  655.       update_num
  656.       return
  657.     end  
  658.     if @give_window.active
  659.       update_give
  660.       return
  661.     end
  662.     if @dowi_window.active
  663.       update_dowi
  664.       return
  665.     end
  666.   end
  667.   def update_num
  668.     if Input.trigger?(Input::B)
  669.       @num_window.active=false
  670.       @num_window.visible=false
  671.       @give_window.active=false
  672.       @give_window.visible=false
  673.       @item_window.active=true
  674.       $game_system.se_play($data_system.cancel_se)
  675.       return
  676.     end
  677.     if Input.trigger?(Input::C)
  678.       @item = @item_window.item
  679.       wwwt = @item.weight * $交付数量
  680.       if @dowi_window.index == 1
  681.         if wwwt > ($game_party.actors[$指定人物].indi_capacity-$game_party.actors[$指定人物].total_weight)
  682.           $game_system.se_play($data_system.buzzer_se)
  683.           return
  684.         end
  685.         case @item
  686.         when RPG::Item
  687.           $game_party.actors[$指定人物].gain_item(@item.id,$交付数量)
  688.         when RPG::Weapon
  689.           $game_party.actors[$指定人物].gain_weapon(@item.id,$交付数量)
  690.         when RPG::Armor
  691.           $game_party.actors[$指定人物].gain_armor(@item.id,$交付数量)
  692.         end  
  693.       end  
  694.       case @item
  695.       when RPG::Item
  696.         @actor.lose_item(@item.id,$交付数量)
  697.       when RPG::Weapon
  698.         @actor.lose_weapon(@item.id,$交付数量)
  699.       when RPG::Armor
  700.         @actor.lose_armor(@item.id,$交付数量)
  701.       end  
  702.       @num_window.active=false
  703.       @num_window.visible=false
  704.       @give_window.active=false
  705.       @give_window.visible=false
  706.       @item_window.active=true
  707.       $game_system.se_play($data_system.decision_se)
  708.       @item_window.refresh
  709.       @weight_window.refresh(@item.weight)
  710.       return
  711.     end
  712.     @num_window.update
  713.   end
  714.   def update_give
  715.     if Input.trigger?(Input::B)
  716.       @give_window.active=false
  717.       @give_window.visible=false
  718.       @item_window.active=true
  719.       $game_system.se_play($data_system.cancel_se)
  720.       return
  721.     end
  722.     if Input.trigger?(Input::C)
  723.       @item = @item_window.item
  724.       @give_window.active=false
  725.       @num_window.dispose
  726.       @num_window = Window_GiveNum.new(@actor, @item)
  727.       @num_window.active=true
  728.       @num_window.visible=true
  729.       $game_system.se_play($data_system.decision_se)
  730.       return
  731.     end
  732.     if Input.trigger?(Input::DOWN)
  733.       @give_window.index+=1
  734.       if @give_window.index>=$give_max
  735.         @give_window.index=0
  736.       end  
  737.       $game_system.se_play($data_system.cursor_se)
  738.       return
  739.     end  
  740.     if Input.trigger?(Input::UP)
  741.       @give_window.index-=1
  742.       if @give_window.index<0
  743.         @give_window.index+=$give_max
  744.       end
  745.       $game_system.se_play($data_system.cursor_se)
  746.       return
  747.     end
  748.     @give_window.update
  749.   end
  750.   def update_dowi
  751.     if Input.trigger?(Input::B)
  752.       @dowi_window.active=false
  753.       @dowi_window.visible=false
  754.       @item_window.active=true
  755.       $game_system.se_play($data_system.cancel_se)
  756.       return
  757.     end
  758.     if Input.trigger?(Input::C)
  759.       @item = @item_window.item
  760.       if @dowi_window.index == 0
  761. #==============================================================================        
  762.       # 不使用物品的情况下
  763.       unless @item.is_a?(RPG::Item)
  764.         # 演奏冻结 SE
  765.         $game_system.se_play($data_system.buzzer_se)
  766.         return
  767.       end
  768.       # 不能使用的情况下
  769.       unless @actor.item_can_use?(@item.id)
  770.         # 演奏冻结 SE
  771.         $game_system.se_play($data_system.buzzer_se)
  772.         return
  773.       end
  774.       # 演奏确定 SE
  775.       $game_system.se_play($data_system.decision_se)
  776.       # 效果范围是我方的情况下
  777.       if @item.scope >= 3
  778.         # 激活目标窗口
  779.         @dowi_window.active=false
  780.         @dowi_window.visible=false
  781.         @target_window.x = (@item_window.index + 1) % 2 * 304
  782.         @target_window.visible = true
  783.         @target_window.active = true
  784.         # 设置效果范围 (单体/全体) 的对应光标位置
  785.         if @item.scope == 4 || @item.scope == 6
  786.           @target_window.index = -1
  787.         else
  788.           @target_window.index = 0
  789.         end
  790.       # 效果在我方以外的情况下
  791.       else
  792.         # 公共事件 ID 有效的情况下
  793.         if @item.common_event_id > 0
  794.           # 预约调用公共事件
  795.           $game_temp.common_event_id = @item.common_event_id
  796.           # 演奏物品使用时的 SE
  797.           $game_system.se_play(@item.menu_se)
  798.           # 消耗品的情况下
  799.           if @item.consumable
  800.             # 使用的物品数减 1
  801.             @actor.lose_item(@item.id, 1)
  802.             # 再描绘物品窗口的项目
  803.             @item_window.draw_item(@item_window.index)
  804.           end
  805.           # 切换到地图画面
  806.           $scene = Scene_Map.new
  807.           return
  808.         end
  809.  
  810.       return
  811.       end
  812. #==============================================================================   
  813.       else
  814.         if @dowi_window.index==1
  815.           if $game_party.actors.size<2
  816.             $game_system.se_play($data_system.buzzer_se)
  817.             return
  818.           end  
  819.           $正在交付物品=1
  820.           $正在丢弃物品=0
  821.           @dowi_window.active=false
  822.           @dowi_window.visible=false
  823.           @give_window.dispose
  824.           @give_window=Window_Give.new(@actor)
  825.           @give_window.active=true
  826.           @give_window.visible=true
  827.         else
  828.           $正在交付物品=0
  829.           $正在丢弃物品=1
  830.           @dowi_window.active=false
  831.           @dowi_window.visible=false
  832.           @item = @item_window.item
  833.           @num_window.dispose
  834.           @num_window = Window_GiveNum.new(@actor, @item)
  835.           @num_window.active=true
  836.           @num_window.visible=true
  837.         end  
  838.         $game_system.se_play($data_system.decision_se)
  839.         return
  840.       end  
  841.     end
  842.     if Input.trigger?(Input::DOWN)
  843.       @dowi_window.index+=1
  844.       if @dowi_window.index>2
  845.         @dowi_window.index=0
  846.       end  
  847.       $game_system.se_play($data_system.cursor_se)
  848.       return
  849.     end  
  850.     if Input.trigger?(Input::UP)
  851.       @dowi_window.index-=1
  852.       if @dowi_window.index<0
  853.         @dowi_window.index=2
  854.       end
  855.       $game_system.se_play($data_system.cursor_se)
  856.       return
  857.     end
  858.     @dowi_window.update
  859.   end  
  860.   #--------------------------------------------------------------------------
  861.   # ● 刷新画面 (物品窗口被激活的情况下)
  862.   #--------------------------------------------------------------------------
  863.   def update_item
  864.     # 按下 R 键的情况下
  865.     if Input.trigger?(Input::R)
  866.       # 演奏光标 SE
  867.       $game_system.se_play($data_system.cursor_se)
  868.       # 移至下一位角色
  869.       @actor_index += 1
  870.       @actor_index %= $game_party.actors.size
  871.       # 切换到别的装备画面
  872.       $scene = Scene_IndiItem.new(@actor_index)
  873.       return
  874.     end
  875.     # 按下 L 键的情况下
  876.     if Input.trigger?(Input::L)
  877.       # 演奏光标 SE
  878.       $game_system.se_play($data_system.cursor_se)
  879.       # 移至上一位角色
  880.       @actor_index += $game_party.actors.size - 1
  881.       @actor_index %= $game_party.actors.size
  882.       # 切换到别的装备画面
  883.       $scene = Scene_IndiItem.new(@actor_index)
  884.       return
  885.     end
  886.     # 按下 B 键的情况下
  887.     if Input.trigger?(Input::B)
  888.       # 演奏取消 SE
  889.       $game_system.se_play($data_system.cancel_se)
  890.       # 切换到菜单画面
  891.       $scene = Scene_Menu.new(0)
  892.       return
  893.     end
  894.     # 按下 C 键的情况下
  895.     if Input.trigger?(Input::C)
  896.       # 获取物品窗口当前选中的物品数据
  897.       @item = @item_window.item
  898.       @item_window.active=false
  899.       @dowi_window.dispose
  900.       @dowi_window=Window_Dowi.new(@item)
  901.       @dowi_window.visible=true
  902.       @dowi_window.active=true
  903.       $game_system.se_play($data_system.decision_se)
  904.       return
  905.  
  906.     end
  907.   end
  908.   #--------------------------------------------------------------------------
  909.   # ● 刷新画面 (目标窗口被激活的情况下)
  910.   #--------------------------------------------------------------------------
  911.   def update_target
  912.     # 按下 B 键的情况下
  913.     if Input.trigger?(Input::B)
  914.       # 演奏取消 SE
  915.       $game_system.se_play($data_system.cancel_se)
  916.       # 由于物品用完而不能使用的场合
  917.       unless @actor.item_can_use?(@item.id)
  918.         # 再次生成物品窗口的内容
  919.         @item_window.refresh
  920.       end
  921.       # 删除目标窗口
  922.       @item_window.active = true
  923.       @target_window.visible = false
  924.       @target_window.active = false
  925.       return
  926.     end
  927.     # 按下 C 键的情况下
  928.     if Input.trigger?(Input::C)
  929.       # 如果物品用完的情况下
  930.       if @actor.item_number(@item.id) == 0
  931.         # 演奏冻结 SE
  932.         $game_system.se_play($data_system.buzzer_se)
  933.         return
  934.       end
  935.       # 目标是全体的情况下
  936.       if @target_window.index == -1
  937.         # 对同伴全体应用物品使用效果
  938.         used = false
  939.         for i in $game_party.actors
  940.           used |= i.item_effect(@item)
  941.         end
  942.       end
  943.       # 目标是单体的情况下
  944.       if @target_window.index >= 0
  945.         # 对目标角色应用物品的使用效果
  946.         target = $game_party.actors[@target_window.index]
  947.         used = target.item_effect(@item)
  948.       end
  949.       # 使用物品的情况下
  950.       if used
  951.         # 演奏物品使用时的 SE
  952.         $game_system.se_play(@item.menu_se)
  953.         # 消耗品的情况下
  954.         if @item.consumable
  955.           # 使用的物品数减 1
  956.           @actor.lose_item(@item.id, 1)
  957.           # 再描绘物品窗口的项目
  958.           @item_window.draw_item(@item_window.index)
  959.         end
  960.         # 再生成目标窗口的内容
  961.         @target_window.refresh
  962.         # 全灭的情况下
  963.         if $game_party.all_dead?
  964.           # 切换到游戏结束画面
  965.           $scene = Scene_Gameover.new
  966.           return
  967.         end
  968.         # 公共事件 ID 有效的情况下
  969.         if @item.common_event_id > 0
  970.           # 预约调用公共事件
  971.           $game_temp.common_event_id = @item.common_event_id
  972.           # 切换到地图画面
  973.           $scene = Scene_Map.new
  974.           return
  975.         end
  976.       end
  977.       # 无法使用物品的情况下
  978.       unless used
  979.         # 演奏冻结 SE
  980.         $game_system.se_play($data_system.buzzer_se)
  981.       end
  982.       return
  983.     end
  984.   end
  985. end
  986.  
  987. class Scene_Battle
  988.   def start_item_select
  989.     # 生成物品窗口
  990.     @item_window = Window_IndiItem.new(@active_actor)
  991.     # 关联帮助窗口
  992.     @item_window.help_window = @help_window
  993.     # 无效化角色指令窗口
  994.     @actor_command_window.active = false
  995.     @actor_command_window.visible = false
  996.   end
  997.   #--------------------------------------------------------------------------
  998.   # ● 刷新画面 (角色命令回合 : 选择物品)
  999.   #--------------------------------------------------------------------------
  1000.   def update_phase3_item_select
  1001.     # 设置物品窗口为可视状态
  1002.     @item_window.visible = true
  1003.     # 刷新物品窗口
  1004.     @item_window.update
  1005.     # 按下 B 键的情况下
  1006.     if Input.trigger?(Input::B)
  1007.       # 演奏取消 SE
  1008.       $game_system.se_play($data_system.cancel_se)
  1009.       # 选择物品结束
  1010.       end_item_select
  1011.       return
  1012.     end
  1013.     # 按下 C 键的情况下
  1014.     if Input.trigger?(Input::C)
  1015.       # 获取物品窗口现在选择的物品资料
  1016.       @item = @item_window.item
  1017.       # 无法使用的情况下
  1018.       unless @active_actor.item_can_use?(@item.id)
  1019.         # 演奏冻结 SE
  1020.         $game_system.se_play($data_system.buzzer_se)
  1021.         return
  1022.       end
  1023.       # 演奏确定 SE
  1024.       $game_system.se_play($data_system.decision_se)
  1025.       # 设置行动
  1026.       @active_actor.current_action.item_id = @item.id
  1027.       # 设置物品窗口为不可见状态
  1028.       @item_window.visible = false
  1029.       # 效果范围是敌单体的情况下
  1030.       if @item.scope == 1
  1031.         # 开始选择敌人
  1032.         start_enemy_select
  1033.       # 效果范围是我方单体的情况下
  1034.       elsif @item.scope == 3 or @item.scope == 5
  1035.         # 开始选择角色
  1036.         start_actor_select
  1037.       # 效果范围不是单体的情况下
  1038.       else
  1039.         # 物品选择结束
  1040.         end_item_select
  1041.         # 转到下一位角色的指令输入
  1042.         phase3_next_actor
  1043.       end
  1044.       return
  1045.     end
  1046.   end
  1047.  
  1048.   def make_item_action_result(battler)
  1049.     # アイテムを取得
  1050.     @item = $data_items[battler.current_action.item_id]
  1051.     # アイテム切れなどで使用できなくなった場合
  1052.     unless battler.item_can_use?(@item.id)
  1053.       # ステップ 6 に移行
  1054.       battler.phase = 6
  1055.       return
  1056.     end
  1057.     # 消耗品の場合
  1058.     if @item.consumable
  1059.       # 使用したアイテムを 1 減らす
  1060.       battler.lose_item(@item.id, 1)
  1061.     end
  1062.     # アニメーション ID を設定
  1063.     battler.anime1 = @item.animation1_id
  1064.     battler.anime2 = @item.animation2_id
  1065.     # コモンイベント ID を設定
  1066.     battler.event = @item.common_event_id
  1067.     # 対象を決定
  1068.     index = battler.current_action.target_index
  1069.     target = $game_party.smooth_target_actor(index)
  1070.     # 対象側バトラーを設定
  1071.     set_target_battlers(@item.scope, battler)
  1072.     # アイテムの効果を適用
  1073.     for target in battler.target
  1074.       target.item_effect(@item, battler)
  1075.     end
  1076.   end
  1077. end
  1078.  
  1079. #==============================================================================
  1080. # ■ Window_IndiItem
  1081. #------------------------------------------------------------------------------
  1082. #  物品画面、战斗画面、显示浏览物品的窗口。
  1083. #==============================================================================
  1084.  
  1085. class Window_IndiItem < Window_Selectable
  1086.   #--------------------------------------------------------------------------
  1087.   # ● 初始化对像
  1088.   #--------------------------------------------------------------------------
  1089.   def initialize(actor)
  1090.     @actor = actor
  1091.     super(0, 64, 640, 288)
  1092.     @column_max = 2
  1093.     refresh
  1094.     self.index = 0
  1095.     # 战斗中的情况下将窗口移至中央并将其半透明化
  1096.     if $game_temp.in_battle
  1097.       self.y = 64
  1098.       self.height = 256
  1099.       self.back_opacity = 160
  1100.     end
  1101.   end
  1102.   #--------------------------------------------------------------------------
  1103.   # ● 获取物品
  1104.   #--------------------------------------------------------------------------
  1105.   def item
  1106.     return @data[self.index]
  1107.   end
  1108.   #--------------------------------------------------------------------------
  1109.   # ● 刷新
  1110.   #--------------------------------------------------------------------------
  1111.   def refresh
  1112.     if self.contents != nil
  1113.       self.contents.dispose
  1114.       self.contents = nil
  1115.     end
  1116.     @data = []
  1117.     # 添加报务
  1118.     for i in 1...$data_items.size
  1119.       if @actor.item_number(i) > 0
  1120.         @data.push($data_items[i])
  1121.       end
  1122.     end
  1123.     # 在战斗中以外添加武器、防具
  1124.     unless $game_temp.in_battle
  1125.       for i in 1...$data_weapons.size
  1126.         if @actor.weapon_number(i) > 0
  1127.           @data.push($data_weapons[i])
  1128.         end
  1129.       end
  1130.       for i in 1...$data_armors.size
  1131.         if @actor.armor_number(i) > 0
  1132.           @data.push($data_armors[i])
  1133.         end
  1134.       end
  1135.     end
  1136.     # 如果项目数不是 0 就生成位图、重新描绘全部项目
  1137.     @item_max = @data.size
  1138.     if @item_max > 0
  1139.       self.contents = Bitmap.new(width - 32, row_max * 32)
  1140.       for i in 0...@item_max
  1141.         draw_item(i)
  1142.       end
  1143.     end
  1144.   end
  1145.   #--------------------------------------------------------------------------
  1146.   # ● 描绘项目
  1147.   #     index : 项目编号
  1148.   #--------------------------------------------------------------------------
  1149.   def draw_item(index)
  1150.     item = @data[index]
  1151.     case item
  1152.     when RPG::Item
  1153.       number = @actor.item_number(item.id)
  1154.     when RPG::Weapon
  1155.       number = @actor.weapon_number(item.id)
  1156.     when RPG::Armor
  1157.       number = @actor.armor_number(item.id)
  1158.     end
  1159.     if item.is_a?(RPG::Item) and
  1160.        @actor.item_can_use?(item.id)
  1161.       self.contents.font.color = normal_color
  1162.     else
  1163.       self.contents.font.color = disabled_color
  1164.     end
  1165.     x = 4 + index % 2 * (288 + 32)
  1166.     y = index / 2 * 32
  1167.     rect = Rect.new(x, y, self.width / @column_max - 32, 32)
  1168.     self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
  1169.     bitmap = RPG::Cache.icon(item.icon_name)
  1170.     opacity = self.contents.font.color == normal_color ? 255 : 128
  1171.     self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
  1172.     self.contents.draw_text(x + 28, y, 192, 32, item.name, 0)
  1173.     self.contents.draw_text(x + 224, y, 16, 32, ":", 1)
  1174.     self.contents.draw_text(x + 240, y, 40, 32, number.to_s, 2)
  1175.   end
  1176.   #--------------------------------------------------------------------------
  1177.   # ● 刷新帮助文本
  1178.   #--------------------------------------------------------------------------
  1179.   def update_help
  1180.     @help_window.set_text(self.item == nil ? "" : self.item.description)
  1181.   end
  1182. end
  1183.  
  1184. class Scene_IndiItem
  1185.   alias ori_main main
  1186.   def main
  1187.     @weight_window = Window_Weight.new(@actor)
  1188.     @weight_window.x = 0
  1189.     @weight_window.y = 352
  1190.     @weight_window.z = 0
  1191.     ori_main
  1192.     @weight_window.dispose
  1193.   end  
  1194.   alias ori_update update
  1195.   def update
  1196.        case @item_window.item
  1197.        when RPG::Item
  1198.          @weight_window.refresh($data_items[@item_window.item.id].weight)
  1199.        when RPG::Weapon
  1200.          @weight_window.refresh($data_weapons[@item_window.item.id].weight)
  1201.        when RPG::Armor  
  1202.          @weight_window.refresh($data_armors[@item_window.item.id].weight)
  1203.        end
  1204.     ori_update
  1205.   end
  1206. end
  1207.  
  1208. class Window_Weight < Window_Base
  1209.   def initialize(actor)
  1210.     @actor=actor
  1211.     super(0,0,640,128)
  1212.     self.opacity = 255
  1213.     self.contents = Bitmap.new(width-32,height-32)
  1214.     refresh(nil)
  1215.   end  
  1216.   def refresh(weight)
  1217.     self.contents.clear
  1218.     self.contents.draw_text(0,0,160,32,@actor.name)
  1219.     if weight != nil
  1220.       self.contents.draw_text(128,0,160,32,"单件重量:#{weight}")
  1221.     end
  1222.     self.contents.draw_text(320,0,320,32,"背包重量:"+@actor.total_weight.to_s + "/" + @actor.indi_capacity.to_s , 0)
  1223.     ssstx=0
  1224.     sssty=32
  1225.     self.contents.draw_text(ssstx,sssty,160,32,"装备物品:")
  1226.     ssstx=128
  1227.     if @actor.weapon_id != 0
  1228.       self.contents.draw_text(ssstx,sssty,160,32,$data_weapons[@actor.weapon_id].name + "(" + $data_weapons[@actor.weapon_id].weight.to_s + ")")
  1229.     end
  1230.     ssstx=288
  1231.     if @actor.armor1_id != 0
  1232.       self.contents.draw_text(ssstx,sssty,160,32,$data_armors[@actor.armor1_id].name + "(" + $data_armors[@actor.armor1_id].weight.to_s + ")")
  1233.     end
  1234.     ssstx=448
  1235.     if @actor.armor2_id != 0
  1236.       self.contents.draw_text(ssstx,sssty,160,32,$data_armors[@actor.armor2_id].name + "(" + $data_armors[@actor.armor2_id].weight.to_s + ")")
  1237.     end
  1238.     ssstx=128
  1239.     sssty=64
  1240.     if @actor.armor3_id != 0
  1241.       self.contents.draw_text(ssstx,sssty,160,32,$data_armors[@actor.armor3_id].name + "(" + $data_armors[@actor.armor3_id].weight.to_s + ")")
  1242.     end
  1243.     ssstx=288
  1244.     if @actor.armor4_id != 0
  1245.       self.contents.draw_text(ssstx,sssty,160,32,$data_armors[@actor.armor4_id].name + "(" + $data_armors[@actor.armor4_id].weight.to_s + ")")
  1246.     end
  1247.   end
  1248. end  
  1249.  
  1250. class Window_Dowi < Window_Selectable
  1251.   def initialize(item = nil)
  1252.     super(256, 240, 128, 160)
  1253.     @item = item
  1254.     self.opacity = 255
  1255.     self.contents = Bitmap.new(width-32,height-32)
  1256.     self.z=120
  1257.     self.index=0
  1258.     refresh
  1259.   end  
  1260.   def refresh
  1261.     self.contents.draw_text(4, 0, 192, 32, "使用", 0)
  1262.     self.contents.draw_text(4, 32, 192, 32, "交给", 0)
  1263.     self.contents.draw_text(4, 64, 192, 32, "丢弃", 0)
  1264.   end  
  1265. end
  1266.  
  1267. class Window_Give < Window_Selectable
  1268.   def initialize(actor)
  1269.     super(256, 240, 128, 160)
  1270.     @actor = actor
  1271.     @column_max = 1
  1272.     self.active = false
  1273.     self.index = -1
  1274.     self.contents = Bitmap.new(width - 32, height - 32)
  1275.     self.z=120
  1276.     self.index=0
  1277.     $指定人物=0
  1278.     # 添加本人以外的角色
  1279.     @data=[]
  1280.     @data_target=[]
  1281.     for iii in 0...$game_party.actors.size
  1282.       if @actor != $game_party.actors[iii]
  1283.         @data.push($game_party.actors[iii].name)
  1284.         @data_target.push(iii)
  1285.       end  
  1286.     end
  1287.     @item_max=@data.size
  1288.     $give_max=@item_max
  1289.     refresh
  1290.   end
  1291.  
  1292.   def refresh
  1293.     self.contents.clear
  1294.     for i in 0...@item_max
  1295.       draw_item(i)
  1296.     end
  1297.     $指定人物=@data_target[self.index]
  1298.   end  
  1299.  
  1300.   #--------------------------------------------------------------------------
  1301.   # ● 项目的描绘
  1302.   #     index : 项目符号
  1303.   #--------------------------------------------------------------------------
  1304.   def draw_item(index)
  1305.     #print index
  1306.     item = @data[index]
  1307.     #print item
  1308.     x = 4
  1309.     y = index * 32
  1310.     self.contents.font.color = normal_color
  1311.     self.contents.draw_text(x, y, 192, 32, item, 0)
  1312.   end
  1313.  
  1314.   def update
  1315.     refresh
  1316.   end  
  1317. end
  1318.  
  1319. class Window_GiveNum < Window_Base
  1320.   #--------------------------------------------------------------------------
  1321.   # ● 初始化对像
  1322.   #--------------------------------------------------------------------------
  1323.   def initialize(actor, item)
  1324.     super(160, 80, 320, 160)
  1325.     self.contents = Bitmap.new(width - 32, height - 32)
  1326.     @item = item
  1327.     @number = 1
  1328.     if item != nil  
  1329.       @max = actor.item_number(item.id)
  1330.     else
  1331.       @max = 0
  1332.     end  
  1333.     self.z=120
  1334.     refresh
  1335.   end
  1336.   def refresh
  1337.     self.contents.clear
  1338.     self.contents.font.color = normal_color
  1339.     if @item != nil  
  1340.     if $正在丢弃物品 != 0
  1341.       self.contents.draw_text(4, 0, 192, 32, "丢掉几件", 0)
  1342.       self.contents.draw_text(200, 0, 192, 32, @number.to_s, 0)
  1343.       self.contents.draw_text(4, 32, 192, 32, "减轻重量", 0)
  1344.       self.contents.draw_text(200, 32, 192, 32, [@number * @item.weight].to_s, 0)
  1345.       self.contents.draw_text(4, 96, 240, 32, "请按方向键增减数量", 0)
  1346.       return
  1347.     end  
  1348.     if $正在交付物品 != 1
  1349.       self.contents.draw_text(4, 0, 192, 32, "要交给谁", 0)
  1350.     else
  1351.       self.contents.draw_text(4, 0, 192, 32, "交给几件", 0)
  1352.       self.contents.draw_text(200, 0, 192, 32, @number.to_s, 0)
  1353.       self.contents.draw_text(4, 32, 192, 32, "交换重量", 0)
  1354.       self.contents.draw_text(200, 32, 192, 32, [@number * @item.weight].to_s, 0)
  1355.       self.contents.draw_text(4, 64, 240, 32, "接收方剩余负荷", 0)
  1356.       lastweight=$game_party.actors[$指定人物].indi_capacity-$game_party.actors[$指定人物].total_weight
  1357.       self.contents.draw_text(200, 64, 192, 32, lastweight.to_s, 0)
  1358.     end
  1359.     self.contents.draw_text(4, 96, 240, 32, "请按方向键增减数量", 0)
  1360.     end
  1361.   end  
  1362.   #--------------------------------------------------------------------------
  1363.   # ● 刷新画面
  1364.   #--------------------------------------------------------------------------
  1365.   def update
  1366.     super
  1367.     if @item != nil
  1368.     if self.active
  1369.       # 光标右 (+10)
  1370.       if Input.repeat?(Input::RIGHT) and @number < @max
  1371.         $game_system.se_play($data_system.cursor_se)
  1372.         @number = [@number + 10, @max].min
  1373.       end
  1374.       # 光标左 (-10)
  1375.       if Input.repeat?(Input::LEFT) and @number > 1
  1376.         $game_system.se_play($data_system.cursor_se)
  1377.         @number = [@number - 10, 1].max
  1378.       end
  1379.       # 光标上 (-1)
  1380.       if Input.repeat?(Input::UP) and @number > 1
  1381.         $game_system.se_play($data_system.cursor_se)
  1382.         @number -= 1
  1383.       end
  1384.       # 光标下 (+1)
  1385.       if Input.repeat?(Input::DOWN) and @number < @max
  1386.         $game_system.se_play($data_system.cursor_se)
  1387.         @number += 1
  1388.       end
  1389.     end
  1390.     end
  1391.     $交付数量=@number
  1392.     refresh
  1393.   end
  1394. end
  1395.  
  1396. #==============================================================================
  1397. # ■ Window_EquipItem
  1398. #------------------------------------------------------------------------------
  1399. #  装备画面、显示浏览变更装备的候补物品的窗口。
  1400. #==============================================================================
  1401.  
  1402. class Window_EquipItem < Window_Selectable
  1403.   #--------------------------------------------------------------------------
  1404.   # ● 初始化对像
  1405.   #     actor      : 角色
  1406.   #     equip_type : 装备部位 (0~3)
  1407.   #--------------------------------------------------------------------------
  1408.   def initialize(actor, equip_type)
  1409.     super(0, 256, 640, 224)
  1410.     @actor = actor
  1411.     @equip_type = equip_type
  1412.     @column_max = 2
  1413.     refresh
  1414.     self.active = false
  1415.     self.index = -1
  1416.   end
  1417.   #--------------------------------------------------------------------------
  1418.   # ● 获取物品
  1419.   #--------------------------------------------------------------------------
  1420.   def item
  1421.     return @data[self.index]
  1422.   end
  1423.   #--------------------------------------------------------------------------
  1424.   # ● 刷新
  1425.   #--------------------------------------------------------------------------
  1426.   def refresh
  1427.     if self.contents != nil
  1428.       self.contents.dispose
  1429.       self.contents = nil
  1430.     end
  1431.     @data = []
  1432.     # 添加可以装备的武器
  1433.     if @equip_type == 0
  1434.       weapon_set = $data_classes[@actor.class_id].weapon_set
  1435.       for i in 1...$data_weapons.size
  1436.         if @actor.weapon_number(i) > 0 and weapon_set.include?(i)
  1437.           @data.push($data_weapons[i])
  1438.         end
  1439.       end
  1440.     end
  1441.     # 添加可以装备的防具
  1442.     if @equip_type != 0
  1443.       armor_set = $data_classes[@actor.class_id].armor_set
  1444.       for i in 1...$data_armors.size
  1445.         if @actor.armor_number(i) > 0 and armor_set.include?(i)
  1446.           if $data_armors[i].kind == @equip_type-1
  1447.             @data.push($data_armors[i])
  1448.           end
  1449.         end
  1450.       end
  1451.     end
  1452.     # 添加空白
  1453.     @data.push(nil)
  1454.     # 生成位图、描绘全部项目
  1455.     @item_max = @data.size
  1456.     self.contents = Bitmap.new(width - 32, row_max * 32)
  1457.     for i in 0...@item_max-1
  1458.       draw_item(i)
  1459.     end
  1460.   end
  1461.   #--------------------------------------------------------------------------
  1462.   # ● 项目的描绘
  1463.   #     index : 项目符号
  1464.   #--------------------------------------------------------------------------
  1465.   def draw_item(index)
  1466.     item = @data[index]
  1467.     x = 4 + index % 2 * (288 + 32)
  1468.     y = index / 2 * 32
  1469.     case item
  1470.     when RPG::Weapon
  1471.       number = @actor.weapon_number(item.id)
  1472.     when RPG::Armor
  1473.       number = @actor.armor_number(item.id)
  1474.     end
  1475.     bitmap = RPG::Cache.icon(item.icon_name)
  1476.     self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24))
  1477.     self.contents.font.color = normal_color
  1478.     self.contents.draw_text(x + 28, y, 192, 32, item.name, 0)
  1479.     self.contents.draw_text(x + 224, y, 16, 32, ":", 1)
  1480.     self.contents.draw_text(x + 240, y, 40, 32, number.to_s, 2)
  1481.   end
  1482.   #--------------------------------------------------------------------------
  1483.   # ● 刷新帮助文本
  1484.   #--------------------------------------------------------------------------
  1485.   def update_help
  1486.     @help_window.set_text(self.item == nil ? "" : self.item.description)
  1487.   end
  1488. end
  1489.  
  1490. class Game_Party
  1491.   #--------------------------------------------------------------------------
  1492.   # ● 增加物品 (减少)
  1493.   #     item_id : 物品 ID
  1494.   #     n       : 个数
  1495.   #--------------------------------------------------------------------------
  1496.   def gain_item(item_id, n)
  1497.     # 更新 hash 的个数数据
  1498.     if item_id > 0
  1499.       wwwt = $data_items[item_id].weight
  1500.       straight = 0 #从领队开始依次拿取物品,当领队载重量不够时转至下一个队员获取
  1501.       for iii in 0...n #检查物品n次
  1502.         leftwt = $game_party.actors[straight].indi_capacity - $game_party.actors[straight].total_weight
  1503.         while leftwt < wwwt
  1504.           straight += 1
  1505.           if straight>=$game_party.actors.size
  1506.             return
  1507.           end  
  1508.           leftwt = $game_party.actors[straight].indi_capacity - $game_party.actors[straight].total_weight
  1509.         end
  1510.         $game_party.actors[straight].gain_item(item_id, 1)
  1511.       end
  1512.     end
  1513.   end
  1514.   #--------------------------------------------------------------------------
  1515.   # ● 增加武器 (减少)
  1516.   #     weapon_id : 武器 ID
  1517.   #     n         : 个数
  1518.   #--------------------------------------------------------------------------
  1519.   def gain_weapon(weapon_id, n)
  1520.     # 更新 hash 的个数数据
  1521.     if item_id > 0
  1522.       wwwt = $data_weapons[weapon_id].weight
  1523.       straight = 0 #从领队开始依次拿取物品,当领队载重量不够时转至下一个队员获取
  1524.       for iii in 0...n #检查物品n次
  1525.         leftwt = $game_party.actors[straight].indi_capacity - $game_party.actors[straight].total_weight
  1526.         while leftwt < wwwt
  1527.           straight += 1
  1528.           if straight>=$game_party.actors.size
  1529.             return
  1530.           end  
  1531.           leftwt = $game_party.actors[straight].indi_capacity - $game_party.actors[straight].total_weight
  1532.         end
  1533.         $game_party.actors[straight].gain_weapon(weapon_id, 1)
  1534.       end  
  1535.     end
  1536.   end
  1537.   #--------------------------------------------------------------------------
  1538.   # ● 增加防具 (减少)
  1539.   #     armor_id : 防具 ID
  1540.   #     n        : 个数
  1541.   #--------------------------------------------------------------------------
  1542.   def gain_armor(armor_id, n)
  1543.     # 更新 hash 的个数数据
  1544.     if item_id > 0
  1545.       wwwt = $data_armors[armor_id].weight
  1546.       straight = 0 #从领队开始依次拿取物品,当领队载重量不够时转至下一个队员获取
  1547.       for iii in 0...n #检查物品n次
  1548.         leftwt = $game_party.actors[straight].indi_capacity - $game_party.actors[straight].total_weight
  1549.         while leftwt < wwwt
  1550.           straight += 1
  1551.           if straight>=$game_party.actors.size
  1552.             return
  1553.           end  
  1554.           leftwt = $game_party.actors[straight].indi_capacity - $game_party.actors[straight].total_weight
  1555.         end
  1556.         $game_party.actors[straight].gain_armor(armor_id, 1)
  1557.       end  
  1558.     end
  1559.   end
  1560. end

然后如果方便的话就好人做到底,帮忙把那个装备占重量取消,背包负重限度改为背包空间,如果背包空间满了就放不进去东西了,貌似这个我可以改,不过没有时间了......
@myownroc
@芯☆淡茹水
@千夙
回复 支持 反对

使用道具 举报

Lv2.观梦者

梦石
0
星屑
250
在线时间
233 小时
注册时间
2013-8-2
帖子
587
8
发表于 2014-8-17 17:52:32 | 只看该作者
这么多........先不用考虑战车的,每个角色可以带50个,物品满了就消失,不用显示背包,直接想重装机兵那样在菜单的状态窗口哪里选择角色就可以


重装机兵在以前也算个大游戏乐,人家一个公司做出来的游戏你一个人做确实很麻烦,况且你还没有大触那样的能力,建议不用太细节的还原乐,有些实在不行的就别管他啊
我忘了,我要怎么遗忘。
回复 支持 反对

使用道具 举报

Lv2.观梦者

梦石
0
星屑
380
在线时间
602 小时
注册时间
2014-5-8
帖子
699
7
 楼主| 发表于 2014-8-17 17:28:44 | 只看该作者
芯☆淡茹水 发表于 2014-8-17 17:21
要改很多很多,,很多。
每个角色增加一个 包包 的属性。
改得到物品时判断每个角色包包是否都满?或者哪个 ...

这么多........先不用考虑战车的,每个角色可以带50个,物品满了就消失,不用显示背包,直接想重装机兵那样在菜单的状态窗口哪里选择角色就可以

点评

我只想说工作量有点大  发表于 2014-8-17 17:42
不考虑战车的话,以后改起战车来就麻烦。说不定要推翻重新改。  发表于 2014-8-17 17:33
回复 支持 反对

使用道具 举报

Lv5.捕梦者

梦石
0
星屑
33077
在线时间
5104 小时
注册时间
2012-11-19
帖子
4878

开拓者

6
发表于 2014-8-17 17:21:53 | 只看该作者
要改很多很多,,很多。
每个角色增加一个 包包 的属性。
改得到物品时判断每个角色包包是否都满?或者哪个没满?
改每个角色最多带多少物品?
区分人类物品和战车物品,人类不能带战车物品,相反,战车也是。
改物品拿满后,不能得到的物品是消失还是放在原地?
改背包窗口,能选择和显示不同角色的包包。
改物品的使用<使用,装备,转移,丢弃>
还有没想到的。

点评

哦,那帮我慢慢弄呗,多长时间无所谓,反正我快开学了..  发表于 2014-8-17 17:45
嗯,看着就烦,第五行麻烦,  发表于 2014-8-17 17:25
xp vx va mv  va mz 各类型脚本/插件定制
回复 支持 反对

使用道具 举报

Lv2.观梦者

梦石
0
星屑
380
在线时间
602 小时
注册时间
2014-5-8
帖子
699
5
 楼主| 发表于 2014-8-17 17:13:20 | 只看该作者
千夙 发表于 2014-8-17 17:12
楼主意思是想还原重装机兵的背包系统,就是主角每个人都有一个背包而且有数量限制,当第一个拿不了就给第二 ...

对对,终于有个了解的了.....

点评

看到lz的截图,我发现lz用魔法代替了装甲,,  发表于 2014-8-17 17:26
回复 支持 反对

使用道具 举报

Lv2.观梦者

梦石
0
星屑
250
在线时间
233 小时
注册时间
2013-8-2
帖子
587
4
发表于 2014-8-17 17:12:18 | 只看该作者
楼主意思是想还原重装机兵的背包系统,就是主角每个人都有一个背包而且有数量限制,当第一个拿不了就给第二个。。。。。。。以此类推,然后全部都满了的话就会提示拿不了了
我忘了,我要怎么遗忘。
回复 支持 反对

使用道具 举报

Lv2.观梦者

梦石
0
星屑
380
在线时间
602 小时
注册时间
2014-5-8
帖子
699
3
 楼主| 发表于 2014-8-17 16:58:11 | 只看该作者
myownroc 发表于 2014-8-17 16:49
要改的东西很多。
先问一下:如果按照你说的改了,获得物品的时候是哪个角色获得物品? ...

直接给第一个位置的主角。

点评

重装机兵一样的那个对不对?  发表于 2014-8-17 17:09
既然其他角色都不能获得物品~那还给他们做个人物品有用吗?  发表于 2014-8-17 17:07
回复 支持 反对

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
2744
在线时间
2630 小时
注册时间
2013-1-16
帖子
5657

贵宾

2
发表于 2014-8-17 16:49:08 | 只看该作者
要改的东西很多。
先问一下:如果按照你说的改了,获得物品的时候是哪个角色获得物品?
(Created by @喵kano)


施工现场:hotege.github.io
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-9-22 15:29

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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