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

Project1

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

[已经过期] 很多很多问题······

[复制链接]

Lv1.梦旅人

梦石
0
星屑
110
在线时间
49 小时
注册时间
2013-8-9
帖子
75
跳转到指定楼层
1
发表于 2013-8-9 10:00:58 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

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

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

x
新人入站 问题一堆······首先是这个要怎么解决······

就是详细技能描述的脚本,然而后期的技能名字却不显示了,但那个技能还可以使用······
我的数据库一点都没有改动······

评分

参与人数 1星屑 -20 收起 理由
弗雷德 -20 标题、另外请不要尝试一帖多问.

查看全部评分

Lv1.梦旅人

梦石
0
星屑
52
在线时间
586 小时
注册时间
2012-5-31
帖子
768
2
发表于 2013-8-9 10:12:16 | 只看该作者
请附上脚本,话说楼主标题是要扣分的
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
110
在线时间
49 小时
注册时间
2013-8-9
帖子
75
3
 楼主| 发表于 2013-8-9 10:19:29 | 只看该作者
因为我的问题太多,又不想一个一个开贴去问,所以就这个标题了······
脚本:
①这个是在Window_Skill前插入的l
  1. #==============================================================================
  2. # ■ Window_Help
  3. #------------------------------------------------------------------------------
  4. #  特技及物品的说明、角色的状态显示的窗口。
  5. #==============================================================================

  6. class Window_SkillHelp < Window_Base
  7.   #--------------------------------------------------------------------------
  8.   # ● 初始化对像
  9.   #--------------------------------------------------------------------------
  10.   def initialize
  11.     super(320-50, 0, 320+50,416)
  12.     self.contents = Bitmap.new(width - 32, height - 32)
  13.     if $game_temp.in_battle
  14.       self.height = 256+64
  15.       self.back_opacity = 160
  16.     end
  17.   end
  18.   #--------------------------------------------------------------------------
  19.   # ● 设置文本
  20.   #     text  : 窗口显示的字符串
  21.   #     align : 对齐方式 (0..左对齐、1..中间对齐、2..右对齐)
  22.   #--------------------------------------------------------------------------
  23.   def set_text(skill)
  24.     if skill !=nil
  25.       fontsize=18        #定义文字大小
  26.       infx=140           #定义说明文字左边内容的宽度
  27.       y=20               #定义行距
  28.       self.contents.clear
  29.       self.contents.font.color = normal_color
  30.       self.contents.font.size = fontsize
  31.       xx=0
  32.       yy=0
  33.       s=[]
  34.       s=skill.description.scan(/./)
  35.       space = self.contents.text_size(" ").width
  36.       #一行显示21个字
  37.       for i in s
  38.         sss = self.contents.text_size(i)
  39.         if (xx+sss.width)>(width - 32)#超过屏幕就换行
  40.           yy+=y
  41.           xx=4
  42.         end
  43.         self.contents.draw_text(xx, yy, sss.width, sss.height, i)
  44.         xx+=sss.width
  45.       end
  46.       self.contents.font.size = fontsize
  47.       xx=0
  48.       yy+=y
  49.       self.contents.font.color=system_color
  50.       self.contents.draw_text(xx, yy, infx, sss.height, "效果范围")
  51.       xx=infx
  52.       self.contents.font.color=normal_color
  53.       case skill.scope
  54.       when 0
  55.         i="无"
  56.         when 1
  57.           i="敌方单体"
  58.           when 2
  59.             i="敌方全体"
  60.             when 3
  61.               i="我方单体"
  62.               when 4
  63.                 i="我方全体"
  64.                 when 5
  65.                   i="我方濒死单体"
  66.                   when 6
  67.                     i="我方濒死全体"
  68.                     when 7
  69.                       i="自身"
  70.       end
  71.       self.contents.draw_text(xx, yy, infx, sss.height, i)
  72.       xx=0
  73.       yy+=y
  74.       self.contents.font.color=system_color
  75.       self.contents.draw_text(xx, yy, infx, sss.height, "基础威力")
  76.       xx=infx
  77.       self.contents.font.color=normal_color
  78.       self.contents.draw_text(xx, yy, infx*2, sss.height, skill.power.to_s)
  79.       xx=0
  80.       yy+=y
  81.       self.contents.font.color=system_color
  82.       self.contents.draw_text(xx, yy, infx, sss.height, "攻击比率")
  83.       xx=infx
  84.       self.contents.font.color=normal_color
  85.       self.contents.draw_text(xx, yy, infx*2, sss.height, "攻击 "+skill.atk_f.to_s+"  魔力 "+skill.int_f.to_s)      
  86.       xx=0
  87.       yy+=y
  88.       self.contents.font.color=system_color
  89.       self.contents.draw_text(xx, yy, infx, sss.height, "受能力影响度")
  90.       xx=infx
  91.       self.contents.font.color=normal_color
  92.       self.contents.draw_text(xx, yy, infx*2, sss.height, "力量 "+skill.str_f.to_s+"  灵巧 "+skill.dex_f.to_s+"  速度 "+skill.agi_f.to_s)      
  93.       xx=0
  94.       yy+=y
  95.       self.contents.font.color=system_color
  96.       self.contents.draw_text(xx, yy, infx, sss.height, "对象防御影响比率")
  97.       xx=infx
  98.       self.contents.font.color=normal_color
  99.       self.contents.draw_text(xx, yy, infx*2, sss.height, "物理 "+skill.pdef_f.to_s+"  魔法 "+skill.mdef_f.to_s)      
  100.       xx=0
  101.       yy+=y
  102.       self.contents.font.color=system_color
  103.       self.contents.draw_text(xx, yy, infx, sss.height, "威力波动度")
  104.       xx=infx
  105.       self.contents.font.color=normal_color
  106.       self.contents.draw_text(xx, yy, infx*2, sss.height, skill.variance.to_s)
  107.       xx=0
  108.       yy+=y
  109.       self.contents.font.color=system_color
  110.       self.contents.draw_text(xx, yy, infx, sss.height, "基础命中/回避修正")
  111.       xx=infx
  112.       self.contents.font.color=normal_color
  113.       self.contents.draw_text(xx, yy, infx*2, sss.height, skill.hit.to_s+"/"+skill.eva_f.to_s)
  114.       xx=0
  115.       yy+=y
  116.       element=""
  117.       race=""      
  118.       for i in skill.element_set
  119.         if i <=8
  120.           element =element+" "+$data_system.elements[i]
  121.         elsif i>8 and i<=18
  122.           race=race+" "+$data_system.elements[i]
  123.         end
  124.         if i>18
  125.           break
  126.         end
  127.       end
  128.       self.contents.font.color=system_color
  129.       self.contents.draw_text(xx, yy, infx, sss.height, "特效对象种族")
  130.       xx=infx-space
  131.       self.contents.font.color=normal_color
  132.       s=[]
  133.       s=race.scan(/./)
  134.       #一行显示21个字
  135.       for i in s
  136.         sss = self.contents.text_size(i)
  137.         if (xx+sss.width)>(width - 32)#超过屏幕就换行
  138.           yy+=y
  139.           xx=infx
  140.         end
  141.         self.contents.draw_text(xx, yy, sss.width, sss.height, i)
  142.         xx+=sss.width
  143.       end
  144.       yy+=y
  145.       xx=0
  146.       self.contents.font.color=system_color
  147.       self.contents.draw_text(xx, yy, infx, sss.height, "攻击属性")
  148.       xx=infx-space
  149.       self.contents.font.color=normal_color
  150.       s=[]
  151.       s=element.scan(/./)
  152.       #一行显示21个字
  153.       for i in s
  154.         sss = self.contents.text_size(i)
  155.         if (xx+sss.width)>(width - 32)#超过屏幕就换行
  156.           yy+=y
  157.           xx=infx
  158.         end
  159.         self.contents.draw_text(xx, yy, sss.width, sss.height, i)
  160.         xx+=sss.width
  161.       end
  162.       xx=0
  163.       yy+=y
  164.       race=""
  165.       for i in skill.plus_state_set
  166.           race=race+"["+$data_states[i].name+"]"
  167.       end
  168.       self.contents.font.color=system_color
  169.       self.contents.draw_text(xx, yy, infx, sss.height, "附加状态")
  170.       xx=infx
  171.       self.contents.font.color=normal_color
  172.       s=[]
  173.       s=race.scan(/./)
  174.       #一行显示21个字
  175.       for i in s
  176.         sss = self.contents.text_size(i)
  177.         if (xx+sss.width)>(width - 32)#超过屏幕就换行
  178.           yy+=y
  179.           xx=infx
  180.         end
  181.         self.contents.draw_text(xx, yy, sss.width, sss.height, i)
  182.         xx+=sss.width
  183.       end
  184.       xx=0
  185.       yy+=y
  186.       race=""
  187.       for i in skill.minus_state_set
  188.           race=race+"["+$data_states[i].name+"]"
  189.       end
  190.       self.contents.font.color=system_color
  191.       self.contents.draw_text(xx, yy, infx, sss.height, "解除状态")
  192.       xx=infx
  193.       self.contents.font.color=normal_color
  194.       s=[]
  195.       s=race.scan(/./)
  196.       #一行显示21个字
  197.       for i in s
  198.         sss = self.contents.text_size(i)
  199.         if (xx+sss.width)>(width - 32)#超过屏幕就换行
  200.           yy+=y
  201.           xx=infx
  202.         end
  203.         self.contents.draw_text(xx, yy, sss.width, sss.height, i)
  204.         xx+=sss.width
  205.       end
  206.       
  207.       
  208.       
  209.       
  210.       
  211.       [url=home.php?mod=space&uid=95897]@actor[/url] = nil
  212.     end
  213.     self.visible = true
  214.   end
  215.   
  216. end
复制代码
②然后是Window_Skill(带★的为修改项)
  1. #==============================================================================
  2. # ■ Window_Skill
  3. #------------------------------------------------------------------------------
  4. #  特技画面、战斗画面、显示可以使用的特技浏览的窗口。
  5. #==============================================================================

  6. class Window_Skill < Window_Selectable
  7.   #--------------------------------------------------------------------------
  8.   # ● 初始化对像
  9.   #     actor : 角色
  10.   #--------------------------------------------------------------------------
  11.   def initialize(actor)#改变大小和位置★★★★★
  12.     super(0, 0, 320-50, 416)
  13.     @actor = actor
  14.     @column_max = 1#改变列数,原版是1..........★★★★★
  15.     refresh
  16.     self.index = 0
  17.     # 战斗中的情况下将窗口移至中央并将其半透明化
  18.     if $game_temp.in_battle
  19.       self.y = 0
  20.       self.height = 256+64
  21.       self.back_opacity = 160
  22.     end
  23.   end
  24.   #--------------------------------------------------------------------------
  25.   # ● 获取特技
  26.   #--------------------------------------------------------------------------
  27.   def skill
  28.     return @data[self.index]
  29.   end
  30.   #--------------------------------------------------------------------------
  31.   # ● 刷新
  32.   #--------------------------------------------------------------------------
  33.   def refresh
  34.     if self.contents != nil
  35.       self.contents.dispose
  36.       self.contents = nil
  37.     end
  38.     @data = []
  39.     for i in [email protected]
  40.       skill = $data_skills[@actor.skills[i]]
  41.       if skill != nil
  42.         @data.push(skill)
  43.       end
  44.     end
  45.     # 如果项目数不是 0 就生成位图、重新描绘全部项目
  46.     @item_max = @data.size
  47.     if @item_max > 0
  48.       self.contents = Bitmap.new(width - 32, row_max * 32)
  49.       for i in 0...@item_max
  50.         draw_item(i)
  51.       end
  52.     end
  53.   end
  54.   #--------------------------------------------------------------------------
  55.   # ● 描绘项目
  56.   #     index : 项目编号
  57.   #--------------------------------------------------------------------------
  58.   def draw_item(index)
  59.     skill = @data[index]
  60.     if @actor.skill_can_use?(skill.id)
  61.       self.contents.font.color = normal_color
  62.     else
  63.       self.contents.font.color = disabled_color
  64.     end
  65. #    x = 4 + index % 2 * (288 + 32)
  66. #    y = index / 2 * 32
  67.     x=0########33
  68.     y=index*32###########改变xy的计算方法★★★★★
  69.     rect = Rect.new(x, y, self.width / @column_max - 32, 32)
  70.     self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
  71.     bitmap = RPG::Cache.icon(skill.icon_name)
  72.     opacity = self.contents.font.color == normal_color ? 255 : 128
  73.     self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
  74.     self.contents.draw_text(x + 28, y, 204, 32, skill.name, 0)
  75.     if skill.sp_cost !=0
  76.     self.contents.draw_text(x + 232-50, y, 48, 32, skill.sp_cost.to_s, 2)   
  77.     end
  78.   end
  79.   #--------------------------------------------------------------------------
  80.   # ● 刷新帮助文本
  81.   #--------------------------------------------------------------------------
  82.   def update_help
  83.     @help_window.set_text(skill)#★★★★★
  84.   end
  85. end
复制代码
③Window_SkillStatus
  1. #==============================================================================
  2. # ■ Window_SkillStatus
  3. #------------------------------------------------------------------------------
  4. #  显示特技画面、特技使用者的窗口。
  5. #==============================================================================

  6. class Window_SkillStatus < Window_Base
  7.   #--------------------------------------------------------------------------
  8.   # ● 初始化对像
  9.   #     actor : 角色
  10.   #--------------------------------------------------------------------------
  11.   def initialize(actor)#改变大小和位置★★★★★
  12.     super(0, 416, 640, 64)
  13.     self.contents = Bitmap.new(width - 32, height - 32)
  14.     @actor = actor
  15.     refresh
  16.   end
  17.   #--------------------------------------------------------------------------
  18.   # ● 刷新
  19.   #--------------------------------------------------------------------------
  20.   def refresh
  21.     self.contents.clear
  22.     draw_actor_name(@actor, 4, 0)
  23.     draw_actor_state(@actor, 140, 0)
  24.     draw_actor_hp(@actor, 284, 0)
  25.     draw_actor_sp(@actor, 460, 0)
  26.   end
  27. end
复制代码
④Scene_Skill
  1. #==============================================================================
  2. # ■ Scene_Skill
  3. #------------------------------------------------------------------------------
  4. #  处理特技画面的类。
  5. #==============================================================================

  6. class Scene_Skill
  7.   #--------------------------------------------------------------------------
  8.   # ● 初始化对像
  9.   #     actor_index : 角色索引
  10.   #--------------------------------------------------------------------------
  11.   def initialize(actor_index = 0, equip_index = 0)
  12.     @actor_index = actor_index
  13.   end
  14.   #--------------------------------------------------------------------------
  15.   # ● 主处理
  16.   #--------------------------------------------------------------------------
  17.   def main
  18.     # 获取角色
  19.     @actor = $game_party.actors[@actor_index]
  20.     # 生成帮助窗口、状态窗口、特技窗口
  21.     @help_window = Window_SkillHelp.new#★★★★★★★★★★★★★★★★★★
  22.     @status_window = Window_SkillStatus.new(@actor)
  23.     @skill_window = Window_Skill.new(@actor)
  24.     # 关联帮助窗口
  25.     @skill_window.help_window = @help_window
  26.     # 生成目标窗口 (设置为不可见・不活动)
  27.     @target_window = Window_Target.new
  28.     @target_window.visible = false
  29.     @target_window.active = false
  30.     # 执行过渡
  31.     Graphics.transition
  32.     # 主循环
  33.     loop do
  34.       # 刷新游戏画面
  35.       Graphics.update
  36.       # 刷新输入信息
  37.       Input.update
  38.       # 刷新画面
  39.       update
  40.       # 如果画面切换的话就中断循环
  41.       if $scene != self
  42.         break
  43.       end
  44.     end
  45.     # 准备过渡
  46.     Graphics.freeze
  47.     # 释放窗口
  48.     @help_window.dispose
  49.     @status_window.dispose
  50.     @skill_window.dispose
  51.     @target_window.dispose
  52.   end
  53.   #--------------------------------------------------------------------------
  54.   # ● 刷新画面
  55.   #--------------------------------------------------------------------------
  56.   def update
  57.     # 刷新窗口
  58. #===========================到此一游==========================================   
  59. #    @help_window.update
  60.     @status_window.update
  61. #    @skill_window.update
  62.     @target_window.update
  63.    
  64.   if Input.trigger?(Input::UP) or  Input.trigger?(Input::DOWN)
  65. @help_window.update
  66. @skill_window.update
  67. end
  68. #=============================================================================
  69.     # 特技窗口被激活的情况下: 调用 update_skill
  70.     if @skill_window.active
  71.       update_skill
  72.       return
  73.     end
  74.     # 目标窗口被激活的情况下: 调用 update_target
  75.     if @target_window.active
  76.       update_target
  77.       return
  78.     end
  79.   end
  80.   #--------------------------------------------------------------------------
  81.   # ● 刷新画面 (特技窗口被激活的情况下)
  82.   #--------------------------------------------------------------------------
  83.   def update_skill
  84.     # 按下 B 键的情况下
  85.     if Input.trigger?(Input::B)
  86.       # 演奏取消 SE
  87.       $game_system.se_play($data_system.cancel_se)
  88.       # 切换到菜单画面
  89.       $scene = Scene_Menu.new(1)
  90.       return
  91.     end
  92.     # 按下 C 键的情况下
  93.     if Input.trigger?(Input::C)
  94.       # 获取特技窗口现在选择的特技的数据
  95.       @skill = @skill_window.skill
  96.       # 不能使用的情况下
  97.       if @skill == nil or not @actor.skill_can_use?(@skill.id)
  98.         # 演奏冻结 SE
  99.         $game_system.se_play($data_system.buzzer_se)
  100.         return
  101.       end
  102.       # 演奏确定 SE
  103.       $game_system.se_play($data_system.decision_se)
  104.       # 效果范围是我方的情况下
  105.       if @skill.scope >= 3
  106.         # 激活目标窗口
  107.         @skill_window.active = false
  108.         @target_window.x = (@skill_window.index + 1) % 2 * 304
  109.         @target_window.visible = true
  110.         @target_window.active = true
  111.         # 设置效果范围 (单体/全体) 的对应光标位置
  112.         if @skill.scope == 4 || @skill.scope == 6
  113.           @target_window.index = -1
  114.         elsif @skill.scope == 7
  115.           @target_window.index = @actor_index - 10
  116.         else
  117.           @target_window.index = 0
  118.         end
  119.       # 效果在我方以外的情况下
  120.       else
  121.         # 公共事件 ID 有效的情况下
  122.         if @skill.common_event_id > 0
  123.           # 预约调用公共事件
  124.           $game_temp.common_event_id = @skill.common_event_id
  125.           # 演奏特技使用时的 SE
  126.           $game_system.se_play(@skill.menu_se)
  127.           # 消耗 SP
  128.           @actor.sp -= @skill.sp_cost
  129.           # 再生成各窗口的内容
  130.           @status_window.refresh
  131.           @skill_window.refresh
  132.           @target_window.refresh
  133.           # 切换到地图画面
  134.           $scene = Scene_Map.new
  135.           return
  136.         end
  137.       end
  138.       return
  139.     end
  140.     # 按下 R 键的情况下
  141.     if Input.trigger?(Input::R)
  142.       # 演奏光标 SE
  143.       $game_system.se_play($data_system.cursor_se)
  144.       # 移至下一位角色
  145.       @actor_index += 1
  146.       @actor_index %= $game_party.actors.size
  147.       # 切换到别的特技画面
  148.       $scene = Scene_Skill.new(@actor_index)
  149.       return
  150.     end
  151.     # 按下 L 键的情况下
  152.     if Input.trigger?(Input::L)
  153.       # 演奏光标 SE
  154.       $game_system.se_play($data_system.cursor_se)
  155.       # 移至上一位角色
  156.       @actor_index += $game_party.actors.size - 1
  157.       @actor_index %= $game_party.actors.size
  158.       # 切换到别的特技画面
  159.       $scene = Scene_Skill.new(@actor_index)
  160.       return
  161.     end
  162.   end
  163.   #--------------------------------------------------------------------------
  164.   # ● 刷新画面 (目标窗口被激活的情况下)
  165.   #--------------------------------------------------------------------------
  166.   def update_target
  167.     # 按下 B 键的情况下
  168.     if Input.trigger?(Input::B)
  169.       # 演奏取消 SE
  170.       $game_system.se_play($data_system.cancel_se)
  171.       # 删除目标窗口
  172.       @skill_window.active = true
  173.       @target_window.visible = false
  174.       @target_window.active = false
  175.       return
  176.     end
  177.     # 按下 C 键的情况下
  178.     if Input.trigger?(Input::C)
  179.       # 因为 SP 不足而无法使用的情况下
  180.       unless @actor.skill_can_use?(@skill.id)
  181.         # 演奏冻结 SE
  182.         $game_system.se_play($data_system.buzzer_se)
  183.         return
  184.       end
  185.       # 目标是全体的情况下
  186.       if @target_window.index == -1
  187.         # 对同伴全体应用特技使用效果
  188.         used = false
  189.         for i in $game_party.actors
  190.           used |= i.skill_effect(@actor, @skill)
  191.         end
  192.       end
  193.       # 目标是使用者的情况下
  194.       if @target_window.index <= -2
  195.         # 对目标角色应用特技的使用效果
  196.         target = $game_party.actors[@target_window.index + 10]
  197.         used = target.skill_effect(@actor, @skill)
  198.       end
  199.       # 目标是单体的情况下
  200.       if @target_window.index >= 0
  201.         # 对目标角色应用特技的使用效果
  202.         target = $game_party.actors[@target_window.index]
  203.         used = target.skill_effect(@actor, @skill)
  204.       end
  205.       # 使用特技的情况下
  206.       if used
  207.         # 演奏特技使用时的 SE
  208.         $game_system.se_play(@skill.menu_se)
  209.         # 消耗 SP
  210.         @actor.sp -= @skill.sp_cost
  211.         # 再生成各窗口内容
  212.         @status_window.refresh
  213.         @skill_window.refresh
  214.         @target_window.refresh
  215.         # 全灭的情况下
  216.         if $game_party.all_dead?
  217.           # 切换到游戏结束画面
  218.           $scene = Scene_Gameover.new
  219.           return
  220.         end
  221.         # 公共事件 ID 有效的情况下
  222.         if @skill.common_event_id > 0
  223.           # 预约调用公共事件
  224.           $game_temp.common_event_id = @skill.common_event_id
  225.           # 切换到地图画面
  226.           $scene = Scene_Map.new
  227.           return
  228.         end
  229.       end
  230.       # 无法使用特技的情况下
  231.       unless used
  232.         # 演奏冻结 SE
  233.         $game_system.se_play($data_system.buzzer_se)
  234.       end
  235.       return
  236.     end
  237.   end
  238. end
复制代码
⑤Scene_Battle3
  1. #==============================================================================
  2. # ■ Scene_Battle (分割定义 3)
  3. #------------------------------------------------------------------------------
  4. #  处理战斗画面的类。
  5. #==============================================================================

  6. class Scene_Battle
  7.   #--------------------------------------------------------------------------
  8.   # ● 开始角色命令回合
  9.   #--------------------------------------------------------------------------
  10.   def start_phase3
  11.     # 转移到回合 3
  12.     @phase = 3
  13.     # 设置觉得为非选择状态
  14.     @actor_index = -1
  15.     @active_battler = nil
  16.     # 输入下一个角色的命令
  17.     phase3_next_actor
  18.   end
  19.   #--------------------------------------------------------------------------
  20.   # ● 转到输入下一个角色的命令
  21.   #--------------------------------------------------------------------------
  22.   def phase3_next_actor
  23.     # 循环
  24.     begin
  25.       # 角色的明灭效果 OFF
  26.       if @active_battler != nil
  27.         @active_battler.blink = false
  28.       end
  29.       # 最后的角色的情况
  30.       if @actor_index == $game_party.actors.size-1
  31.         # 开始主回合
  32.         start_phase4
  33.         return
  34.       end
  35.       # 推进角色索引
  36.       @actor_index += 1
  37.       @active_battler = $game_party.actors[@actor_index]
  38.       @active_battler.blink = true
  39.     # 如果角色是在无法接受指令的状态就再试
  40.     end until @active_battler.inputable?
  41.     # 设置角色的命令窗口
  42.     phase3_setup_command_window
  43.   end
  44.   #--------------------------------------------------------------------------
  45.   # ● 转向前一个角色的命令输入
  46.   #--------------------------------------------------------------------------
  47.   def phase3_prior_actor
  48.     # 循环
  49.     begin
  50.       # 角色的明灭效果 OFF
  51.       if @active_battler != nil
  52.         @active_battler.blink = false
  53.       end
  54.       # 最初的角色的情况下
  55.       if @actor_index == 0
  56.         # 开始同伴指令回合
  57.         start_phase2
  58.         return
  59.       end
  60.       # 返回角色索引
  61.       @actor_index -= 1
  62.       @active_battler = $game_party.actors[@actor_index]
  63.       @active_battler.blink = true
  64.     # 如果角色是在无法接受指令的状态就再试
  65.     end until @active_battler.inputable?
  66.     # 设置角色的命令窗口
  67.     phase3_setup_command_window
  68.   end
  69.   #--------------------------------------------------------------------------
  70.   # ● 设置角色指令窗口
  71.   #--------------------------------------------------------------------------
  72.   def phase3_setup_command_window
  73.     # 同伴指令窗口无效化
  74.     @party_command_window.active = false
  75.     @party_command_window.visible = false
  76.     # 角色指令窗口无效化
  77.     @actor_command_window.active = true
  78.     @actor_command_window.visible = true
  79.     # 设置角色指令窗口的位置
  80.     @actor_command_window.x = @actor_index * 160
  81.     # 设置索引为 0
  82.     @actor_command_window.index = 0
  83.   end
  84.   #--------------------------------------------------------------------------
  85.   # ● 刷新画面 (角色命令回合)
  86.   #--------------------------------------------------------------------------
  87.   def update_phase3
  88.     # 敌人光标有效的情况下
  89.     if @enemy_arrow != nil
  90.       update_phase3_enemy_select
  91.     # 角色光标有效的情况下
  92.     elsif @actor_arrow != nil
  93.       update_phase3_actor_select
  94.     # 特技窗口有效的情况下
  95.     elsif @skill_window != nil
  96.       update_phase3_skill_select
  97.     # 物品窗口有效的情况下
  98.     elsif @item_window != nil
  99.       update_phase3_item_select
  100.     # 角色指令窗口有效的情况下
  101.     elsif @actor_command_window.active
  102.       update_phase3_basic_command
  103.     end
  104.   end
  105.   #--------------------------------------------------------------------------
  106.   # ● 刷新画面 (角色命令回合 : 基本命令)
  107.   #--------------------------------------------------------------------------
  108.   def update_phase3_basic_command
  109.     # 按下 B 键的情况下
  110.     if Input.trigger?(Input::B)
  111.       # 演奏取消 SE
  112.       $game_system.se_play($data_system.cancel_se)
  113.       # 转向前一个角色的指令输入
  114.       phase3_prior_actor
  115.       return
  116.     end
  117.     # 按下 C 键的情况下
  118.     if Input.trigger?(Input::C)
  119.       # 角色指令窗口光标位置分之
  120.       case @actor_command_window.index
  121.       when 0  # 攻击
  122.         # 演奏确定 SE
  123.         $game_system.se_play($data_system.decision_se)
  124.         # 设置行动
  125.         @active_battler.current_action.kind = 0
  126.         @active_battler.current_action.basic = 0
  127.         # 开始选择敌人
  128.         start_enemy_select
  129.       when 1  # 特技
  130.         # 演奏确定 SE
  131.         $game_system.se_play($data_system.decision_se)
  132.         # 设置行动
  133.         @active_battler.current_action.kind = 1
  134.         # 开始选择特技
  135.         start_skill_select
  136.       when 2  # 防御
  137.         # 演奏确定 SE
  138.         $game_system.se_play($data_system.decision_se)
  139.         # 设置行动
  140.         @active_battler.current_action.kind = 0
  141.         @active_battler.current_action.basic = 1
  142.         # 转向下一位角色的指令输入
  143.         phase3_next_actor
  144.       when 3  # 物品
  145.         # 演奏确定 SE
  146.         $game_system.se_play($data_system.decision_se)
  147.         # 设置行动
  148.         @active_battler.current_action.kind = 2
  149.         # 开始选择物品
  150.         start_item_select
  151.       end
  152.       return
  153.     end
  154.   end
  155.   #--------------------------------------------------------------------------
  156.   # ● 刷新画面 (角色命令回合 : 选择特技)
  157.   #--------------------------------------------------------------------------
  158.   def update_phase3_skill_select
  159.     @help_window.visible = false####隐藏显示敌人名称的帮助窗口★★★★★★★★★★★★★★★★★★★★★★★★★★★★
  160.     # 设置特技窗口为可视状态
  161.     @skill_window.visible = true
  162. #==============================到此一游=======================================   
  163.     # 刷新特技窗口
  164.   #  @skill_window.update
  165.     if Input.trigger?(Input::UP) or  Input.trigger?(Input::DOWN)
  166.     @skill_window.update
  167.   end
  168. #=============================================================================
  169.      # 按下 B 键的情况下
  170.     if Input.trigger?(Input::B)
  171.       # 演奏取消 SE
  172.       $game_system.se_play($data_system.cancel_se)
  173.       # 结束特技选择
  174.       end_skill_select
  175.       return
  176.     end
  177.     # 按下 C 键的情况下
  178.     if Input.trigger?(Input::C)
  179.       # 获取特技选择窗口现在选择的特技的数据
  180.       @skill = @skill_window.skill
  181.       # 无法使用的情况下
  182.       if @skill == nil or not @active_battler.skill_can_use?(@skill.id)
  183.         # 演奏冻结 SE
  184.         $game_system.se_play($data_system.buzzer_se)
  185.         return
  186.       end
  187.       # 演奏确定 SE
  188.       $game_system.se_play($data_system.decision_se)
  189.       # 设置行动
  190.       @active_battler.current_action.skill_id = @skill.id
  191.       # 设置特技窗口为不可见状态
  192.       @skill_window.visible = false
  193.       @skill_window.help_window.visible=false#隐藏技能信息窗口★★★★★★★#########
  194.       # 效果范围是敌单体的情况下
  195.       if @skill.scope == 1
  196.         # 开始选择敌人
  197.         start_enemy_select
  198.       # 效果范围是我方单体的情况下
  199.       elsif @skill.scope == 3 or @skill.scope == 5
  200.         # 开始选择角色
  201.         start_actor_select
  202.       # 效果范围不是单体的情况下
  203.       else
  204.         # 选择特技结束
  205.         end_skill_select
  206.         # 转到下一位角色的指令输入
  207.         phase3_next_actor
  208.       end
  209.       return
  210.     end
  211.   end
  212.   #--------------------------------------------------------------------------
  213.   # ● 刷新画面 (角色命令回合 : 选择物品)
  214.   #--------------------------------------------------------------------------
  215.   def update_phase3_item_select
  216.     # 设置物品窗口为可视状态
  217.     @item_window.visible = true
  218.     # 刷新物品窗口
  219.     @item_window.update
  220.     # 按下 B 键的情况下
  221.     if Input.trigger?(Input::B)
  222.       # 演奏取消 SE
  223.       $game_system.se_play($data_system.cancel_se)
  224.       # 选择物品结束
  225.       end_item_select
  226.       return
  227.     end
  228.     # 按下 C 键的情况下
  229.     if Input.trigger?(Input::C)
  230.       # 获取物品窗口现在选择的物品资料
  231.       @item = @item_window.item
  232.       # 无法使用的情况下
  233.       unless $game_party.item_can_use?(@item.id)
  234.         # 演奏冻结 SE
  235.         $game_system.se_play($data_system.buzzer_se)
  236.         return
  237.       end
  238.       # 演奏确定 SE
  239.       $game_system.se_play($data_system.decision_se)
  240.       # 设置行动
  241.       @active_battler.current_action.item_id = @item.id
  242.       # 设置物品窗口为不可见状态
  243.       @item_window.visible = false
  244.       # 效果范围是敌单体的情况下
  245.       if @item.scope == 1
  246.         # 开始选择敌人
  247.         start_enemy_select
  248.       # 效果范围是我方单体的情况下
  249.       elsif @item.scope == 3 or @item.scope == 5
  250.         # 开始选择角色
  251.         start_actor_select
  252.       # 效果范围不是单体的情况下
  253.       else
  254.         # 物品选择结束
  255.         end_item_select
  256.         # 转到下一位角色的指令输入
  257.         phase3_next_actor
  258.       end
  259.       return
  260.     end
  261.   end
  262.   #--------------------------------------------------------------------------
  263.   # ● 刷新画面画面 (角色命令回合 : 选择敌人)
  264.   #--------------------------------------------------------------------------
  265.   def update_phase3_enemy_select
  266.     # 刷新敌人箭头
  267.     @enemy_arrow.update
  268.     # 按下 B 键的情况下
  269.     if Input.trigger?(Input::B)
  270.       # 演奏取消 SE
  271.       $game_system.se_play($data_system.cancel_se)
  272.       # 选择敌人结束
  273.       end_enemy_select
  274.       return
  275.     end
  276.     # 按下 C 键的情况下
  277.     if Input.trigger?(Input::C)
  278.       # 演奏确定 SE
  279.       $game_system.se_play($data_system.decision_se)
  280.       # 设置行动
  281.       @active_battler.current_action.target_index = @enemy_arrow.index
  282.       # 选择敌人结束
  283.       end_enemy_select
  284.       # 显示特技窗口中的情况下
  285.       if @skill_window != nil
  286.         # 结束特技选择
  287.         end_skill_select
  288.       end
  289.       # 显示物品窗口的情况下
  290.       if @item_window != nil
  291.         # 结束物品选择
  292.         end_item_select
  293.       end
  294.       # 转到下一位角色的指令输入
  295.       phase3_next_actor
  296.     end
  297.   end
  298.   #--------------------------------------------------------------------------
  299.   # ● 画面更新 (角色指令回合 : 选择角色)
  300.   #--------------------------------------------------------------------------
  301.   def update_phase3_actor_select
  302.     # 刷新角色箭头
  303.     @actor_arrow.update
  304.     # 按下 B 键的情况下
  305.     if Input.trigger?(Input::B)
  306.       # 演奏取消 SE
  307.       $game_system.se_play($data_system.cancel_se)
  308.       # 选择角色结束
  309.       end_actor_select
  310.       return
  311.     end
  312.     # 按下 C 键的情况下
  313.     if Input.trigger?(Input::C)
  314.       # 演奏确定 SE
  315.       $game_system.se_play($data_system.decision_se)
  316.       # 设置行动
  317.       @active_battler.current_action.target_index = @actor_arrow.index
  318.       # 选择角色结束
  319.       end_actor_select
  320.       # 显示特技窗口中的情况下
  321.       if @skill_window != nil
  322.         # 结束特技选择
  323.         end_skill_select
  324.       end
  325.       # 显示物品窗口的情况下
  326.       if @item_window != nil
  327.         # 结束物品选择
  328.         end_item_select
  329.       end
  330.       # 转到下一位角色的指令输入
  331.       phase3_next_actor
  332.     end
  333.   end
  334.   #--------------------------------------------------------------------------
  335.   # ● 开始选择敌人
  336.   #--------------------------------------------------------------------------
  337.   def start_enemy_select
  338.     # 生成敌人箭头
  339.     @enemy_arrow = Arrow_Enemy.new(@spriteset.viewport1)
  340.     # 关联帮助窗口
  341.     @enemy_arrow.help_window = @help_window
  342.     # 无效化角色指令窗口
  343.     @actor_command_window.active = false
  344.     @actor_command_window.visible = false
  345.   end
  346.   #--------------------------------------------------------------------------
  347.   # ● 结束选择敌人
  348.   #--------------------------------------------------------------------------
  349.   def end_enemy_select
  350.     # 释放敌人箭头
  351.     @enemy_arrow.dispose
  352.     @enemy_arrow = nil
  353.     # 指令为 [战斗] 的情况下
  354.     if @actor_command_window.index == 0
  355.       # 有效化角色指令窗口
  356.       @actor_command_window.active = true
  357.       @actor_command_window.visible = true
  358.       # 隐藏帮助窗口
  359.       @help_window.visible = false
  360.     end
  361.   end
  362.   #--------------------------------------------------------------------------
  363.   # ● 开始选择角色
  364.   #--------------------------------------------------------------------------
  365.   def start_actor_select
  366.     # 生成角色箭头
  367.     @actor_arrow = Arrow_Actor.new(@spriteset.viewport2)
  368.     @actor_arrow.index = @actor_index
  369.     # 关联帮助窗口
  370.     @actor_arrow.help_window = @help_window
  371.     # 无效化角色指令窗口
  372.     @actor_command_window.active = false
  373.     @actor_command_window.visible = false
  374.   end
  375.   #--------------------------------------------------------------------------
  376.   # ● 结束选择角色
  377.   #--------------------------------------------------------------------------
  378.   def end_actor_select
  379.     # 释放角色箭头
  380.     @actor_arrow.dispose
  381.     @actor_arrow = nil
  382.   end
  383.   #--------------------------------------------------------------------------
  384.   # ● 开始选择特技
  385.   #--------------------------------------------------------------------------
  386.   def start_skill_select
  387.      @help_window.visible = false#隐藏显示敌人名称的帮助窗口★★★★★★★★★★★★★★★★★★★★★★★★★★★★

  388.     # 生成特技窗口
  389.     @skill_window = Window_Skill.new(@active_battler)
  390.     # 关联帮助窗口★★★★修改★★★★★★★★★★★★★★★★★★★★★★★★★★
  391.    # @skill_window.help_window = @help_window
  392.     @skill_window.help_window = Window_SkillHelp.new
  393.     # 无效化角色指令窗口
  394.     @actor_command_window.active = false
  395.     @actor_command_window.visible = false
  396.   end
  397.   #--------------------------------------------------------------------------
  398.   # ● 选择特技结束
  399.   #--------------------------------------------------------------------------
  400.   def end_skill_select
  401.      @skill_window.help_window.dispose#释放技能信息窗口★★★★★★★
  402.     # 释放特技窗口
  403.     @skill_window.dispose
  404.     @skill_window = nil
  405.     # 隐藏帮助窗口
  406.     @help_window.visible = false
  407.     # 有效化角色指令窗口
  408.     @actor_command_window.active = true
  409.     @actor_command_window.visible = true
  410.   end
  411.   #--------------------------------------------------------------------------
  412.   # ● 开始选择物品
  413.   #--------------------------------------------------------------------------
  414.   def start_item_select
  415.     # 生成物品窗口
  416.     @item_window = Window_Item.new
  417.     # 关联帮助窗口
  418.     @item_window.help_window = @help_window
  419.     # 无效化角色指令窗口
  420.     @actor_command_window.active = false
  421.     @actor_command_window.visible = false
  422.   end
  423.   #--------------------------------------------------------------------------
  424.   # ● 结束选择物品
  425.   #--------------------------------------------------------------------------
  426.   def end_item_select
  427.     # 释放物品窗口
  428.     @item_window.dispose
  429.     @item_window = nil
  430.     # 隐藏帮助窗口
  431.     @help_window.visible = false
  432.     # 有效化角色指令窗口
  433.     @actor_command_window.active = true
  434.     @actor_command_window.visible = true
  435.   end
  436. end
复制代码
好了就这么多······
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
110
在线时间
49 小时
注册时间
2013-8-9
帖子
75
4
 楼主| 发表于 2013-8-9 10:21:26 | 只看该作者
a452587136 发表于 2013-8-9 10:19
因为我的问题太多,又不想一个一个开贴去问,所以就这个标题了······
脚本:
①这个是在Window_Skill ...

好吧我才发现······其实我只要把修改的部分发上来就好了······这样太多了= =
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-9-28 17:35

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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