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

Project1

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

[已经解决] 求救!这个问题怎么解决?

[复制链接]

Lv1.梦旅人

梦石
0
星屑
46
在线时间
33 小时
注册时间
2012-8-25
帖子
93
跳转到指定楼层
1
发表于 2012-10-26 21:13:18 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

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

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

x
我用了一个VX横版战斗脚本,有三个。是互相联系的,

然后战斗时出现的问题:


求解。
这是我用的脚本(1):
  1. #==============================================================================
  2. # ■ module N01  for Sideview Ver3.3
  3. #------------------------------------------------------------------------------
  4. #  
  5. #原版的網址 http://rpgex.sakura.ne.jp/home/sozai/sozai_top.html#VXブー
  6. #
  7. #               横版战斗系统设定项目。
  8. #==============================================================================
  9. module N01
  10. #--------------------------------------------------------------------------
  11. # ● 设定
  12. #--------------------------------------------------------------------------
  13.   # 主人公初期位置 第一人    第二人    第三人    第四人
  14.   #                  X轴 Y轴   X轴 Y轴   X轴 Y轴   X轴 Y轴
  15.   ACTOR_POSITION = [[415,120],[435,150],[455,180],[475,210]]
  16.   # 战斗成员最大数(可改动人数)  当人数变动时,上方的坐标也要相应变动
  17.   MAX_MEMBER = 4
  18.   
  19.   # 战斗中行动结束后、到下个角色行动开始之间的等待时间。
  20.   ACTION_WAIT = 10
  21.   # 敌方溃败(被击破时的退场)前的等待时间
  22.   COLLAPSE_WAIT = 12
  23.   # 胜利前的等待时间
  24.   WIN_WAIT = 70
  25.   
  26.   # 战斗背景在画面中位置的设定 FLOOR = [ X轴, Y轴, 透明度]
  27.   FLOOR = [  0, 96,128]
  28.   # 未装备武器地情况下攻击时显示的动画ID
  29.   NO_WEAPON = 82
  30.   # 二刀流设定  当双手装备武器时一次攻击的伤害数值。数值为%
  31.   #                 通常攻击  技能、物品
  32.   TWO_SWORDS_STYLE = [   50,    100]
  33.   # 状态扩张・自动复活的动画ID
  34.   RESURRECTION = 41
  35.   
  36.   # 伤害数字图片的文件名(横向等距的从零到九依次排列的图片)
  37.   DAMAGE_GRAPHICS = "Number+"
  38.   # 回复数字图片的文件名
  39.   RECOVER_GRAPHICS = "Number-"
  40.   # 显示数值时的文字间隔
  41.   NUM_INTERBAL = -3
  42.   # 显示数值时的显示时间
  43.   NUM_DURATION = 68
  44.   # 伤害窗口关闭、只显示文字时的情况是true
  45.   NON_DAMAGE_WINDOW = false
  46.   # 伤害窗口中所显示的词语。如果不想显示的情况请""这样消除掉引号中内容即可。
  47.   POP_DAMAGE0 = "毫发未损!"  # 伤害数值为0时(数字0将不被显示)
  48.   POP_MISS    = "未击中!"  # 攻击因攻击者原因没有击中时  
  49.   POP_EVA     = "闪避!"  # 攻击因被被攻击者躲开时 
  50.   POP_CRI     = "会心一击!"  # 会心一击
  51.   POP_MP_DAM  = "伤害MP"  # 受到MP的伤害时
  52.   POP_MP_REC  = "回复MP"  # 回复MP时
  53.   
  54.   # 阴影效果 使用的话是true不使用时是false
  55.   SHADOW = true  
  56.   # 识别步行效果 在战斗中人物使用步行效果的话是true不使用时是false
  57.   # false的情况下、一定要使用自己的行走图,不要使用脚本范例中的。
  58.   # 还有,No1之后的图片大小要统一(不是全人物统一,单一人物的统一即可)
  59.   WALK_ANIME = true
  60.   # 角色战斗图中用图的动画动作格数(横分割数)
  61.   ANIME_PATTERN = 3
  62.   # 角色战斗图中用图的动画种类数(纵分割数)
  63.   ANIME_KIND = 4
  64.   
  65.   # 背后攻击(偷袭时的画面反转) 使用的话是true不使用的是false
  66.   BACK_ATTACK = true
  67.   # 背后攻击时战斗背景不反转的情况是false
  68.   BACK_ATTACK_NON_BACK_MIRROR = true
  69.   # 将背后攻击设置为无效时  偷袭效果依然发挥。
  70.   # 全部都是装备上所需装备时、发挥技能时,才会有效果。
  71.   # 防止背后攻击的武器ID 举例) = [1] 多数时的举例) = [1,2]
  72.   NON_BACK_ATTACK_WEAPONS = []
  73.   # 防止背后攻击的盾ID
  74.   NON_BACK_ATTACK_ARMOR1 = []
  75.   # 防止背后攻击的头部防具ID
  76.   NON_BACK_ATTACK_ARMOR2 = []
  77.   # 防止背后攻击的身体防具ID
  78.   NON_BACK_ATTACK_ARMOR3 = []
  79.   # 防止背后攻击的装饰品ID
  80.   NON_BACK_ATTACK_ARMOR4 = []
  81.   # 防止背后攻击的技能ID
  82.   NON_BACK_ATTACK_SKILLS = []
  83.   # 一定会发生背后攻击的开关No(会优先于防止)
  84.   BACK_ATTACK_SWITCH = []

  85. #==============================================================================
  86. # ■ 单独战斗动作
  87. #------------------------------------------------------------------------------
  88. #  使用的是连贯动作,这里的单独是没有意义的。
  89. #==============================================================================
  90. # 这里的单独动作名,请不要重复。
  91. # 与连贯动作名重复没有问题。
  92.   ANIME = {
  93. #--------------------------------------------------------------------------
  94. # ● 角色动画的设定
  95. #--------------------------------------------------------------------------
  96.   # 文件No…使用战斗动作图的号码。
  97.   #             0的情况是使用行走图对应。
  98.   #             1以后的是像"人物行走图文件名+_1"这样,参照文件名后的附加数字
  99.   #             来判别的。例)$拉尔夫_1 的文件名No是1
  100.   #             战斗动作图全部都是从人物行走图文件夹内读取。
  101.   #
  102.   # 种类…战斗动作图的分隔纵列。从上开始0到3依次。
  103.   # 速度…动画的更新速度。数值越低更新速度越快。
  104.   # 循环… [0=往复循环] [1=循环一次] [2=不循环]
  105.   # 等待…不循环(2)的情况下、到动画显示结束的等待时间。
  106.   # 固定…如果动画不作固定的情况、指定分割号码(横向位置)。不固定的情况是-1。反向再生是-2。
  107.   # Z轴…在面前显示的话是正数。相较通常情况靠前的显示。
  108.   # 影…表示阴影效果的话是true、不表示为false
  109.   # 武器…武器表示的情况填入武器动作名。不表示的情况为""。
  110.   
  111.   # 目标动画名      文件No 种类 速度 循环 等待 固定  Z轴  影  武器
  112.   "待机"            => [ 1,  0,  30,   0,   0,  -1,   0, true,"普通待机武器" ],
  113.   "待机(固定)"      => [ 1,  0,  10,   2,   0,   1,   0, true,"普通待机武器" ],
  114.   "向右(固定)"      => [ 0,  2,  10,   1,   2,   1,   0, true,"" ],
  115.   "伤害"            => [ 1,  1,   7,   1,  24,  -1,   0, true,"普通待机武器" ],
  116.   "闪避"            => [ 2,  1,   7,   1,  24,  -1,   0, true,"" ],
  117.   "无法战斗"        => [ 2,  3,  10,   1,   8,   0,   0, true,"死亡武器位置" ],
  118.   "前进"            => [ 1,  3,  12,   1,   0,  -1,   0, true,"普通待机武器" ],
  119.   "后退"            => [ 1,  3,  12,   1,   0,  -1,   0, true,"普通待机武器" ],
  120.   "逃跑"            => [ 1,  3,  12,   0,   0,  -1,   0, true,"普通待机武器" ],
  121.   "头上显示"        => [ 0,  1,   2,   1,   0,  -1, 600, true,"" ],
  122.   "武器挥动攻击"    => [ 3,  0,   1,   2,   0,  -1,   2, true,"纵挥动"],
  123.   "武器挥动攻击L"   => [ 3,  0,   1,   2,   0,  -1,   2, true,"纵挥动L"],
  124.   "武器挥动攻击缓"  => [ 3,  0,   6,   2,   0,  -1,   2, true,"纵挥动"],
  125.   "武器下旋转"      => [ 3,  0,   2,   2,   0,  -1,   2, true,"下旋转"],
  126.   "武器上旋转"      => [ 3,  0,   2,   2,   0,  -1,   2, true,"上旋转"],
  127.   "举起武器"        => [ 3,  0,   2,   2,  28,  -1,   2, true,"举起"],
  128.   "胜利动作"        => [ 3,  0,  15,   0,   0,  -1,   0, true,"" ],
  129.   
  130.   "剑系统攻击"      => [ 3,  0,   2,   2,   0,  -1,   0, true,"剑系统武器攻击" ],
  131.   "剑系统后跳"      => [ 2,  1,  30,   1,   0,  -1,   0, true,"剑系统武器待机" ],
  132.   "剑系统后退"      => [ 1,  3,   8,   0,   0,  -1,   0, true,"剑系统武器待机" ],
  133.   
  134.   "枪系统攻击"      => [ 3,  0,   1,   2,   0,  -1,   2, true,"枪系统武器攻击"],
  135.   
  136.   "缓慢前进"        => [ 1,  3,  12,   0,   0,  -1,   0, true,"缓慢待机武器" ],
  137.   "插剑动作"        => [ 3,  2,   1,   2,   0,  -1,   2, true,"插剑"],
  138.   "使用魔法"        => [ 3,  3,  15,   0,   0,  -1,   0, true,"" ],
  139.   
  140. #--------------------------------------------------------------------------
  141. # ● 武器动作 让武器图像动起来的方法
  142. #--------------------------------------------------------------------------
  143.   # 这里使用的武器动作名、必须是上面角色动画中设置的武器动作名。
  144.   
  145.   # X轴…横向移动距离。
  146.   # Y轴…纵向移动距离。
  147.   # Z轴…如果让此动作显示时武器在人物前方写作true。
  148.   # 初始角度…武器在动作前的最初角度。半圆的0~360度。复数情况为反半圆。
  149.   # 完毕角度…动作完毕时的角度。
  150.   # 原点…武器旋转时的原点。[0…中心] [1…左上] [2…右上] [3…左下] [4…右下]
  151.   # 反转…当为true时,动作前武器的图像将会显示为反转的。
  152.   # X扩…X轴放大率、武器横向放大率。1是同等、2是2倍、0.5是1/2。
  153.   # Y扩…Y轴放大率、武器纵向放大率。1是同等、2是2倍、0.5是1/2。
  154.   # 调X…略微调整X轴。这里的数字是调整武器初期的X坐标。
  155.   # 调Y…略微调整Y轴。这里的数字是调整武器初期的Y坐标。
  156.   # 二刀…限定于二刀流为true、将以二刀流来显示左边武器动作的武器画像。
  157.   #       如果不是二刀流的情况会自动跳过角色动画。
  158.   
  159.   # 武器动作名   X轴  Y轴  Z轴  初始角度 完毕角度 原点 反转  X扩  Y扩  调X  调Y 二刀
  160.   "纵挥动"     => [  6,   8,false,-135,  45,  4,false,   1,  1,  -4,  -6,false],
  161.   "纵挥动L"    => [  6,   8,false,-135,  45,  4,false,   1,  1,  -4,  -6, true],
  162.   "下旋转"     => [  6,   8,false, 270,  45,  4,false,   1,  1,  -4,  -6,false],
  163.   "上旋转"     => [  6,   8,false,  45,-100,  4,false,   1,  1,  -4,  -6,false],
  164.   "举起"       => [  6,  -4,false,  90, -45,  4,false,   1,  1,  -4,  -6,false],

  165.   # 剑系统武器动画
  166.   "剑系统武器待机"    => [   3,   3,false,  55,  55,  0, false,  1,  1, -20,   2,false],
  167.   "剑系统武器前进"    => [   0,   0,false, -90, -90,  0, false,  1,  1,  10, -14,false],
  168.   "剑系统武器被伤害"  => [   0,   0,false,  15,  15,  0, false,  1,  1, -12,  -5,false],
  169.   "剑系统武器防御"    => [ -15, -15, true,   0,   0,  0, false,  1,  1,  -8,  -3,false],
  170.   "剑系统武器攻击"    => [   6,   8,false,  10,  60,  4,false,   1,  1,  -4,  -6,false],
  171.   "剑系统武器胜利"    => [   0,   3,false, -10, -30,  4,false,   1,  1,  -7,   3,false],
  172.   "剑系统武器斩"      => [   0,   0,false, 360, 120,  4, true,   1,  1,  -4,  -6,false],
  173.   "剑系统武器强打"    => [   0,   8,false,-320,  55,  4,false,   1,  1,  -4,  -6,false],
  174.   "剑系统武器举起"    => [   6,  -4, true,  90, -45,  4,false,   1,  1,  -4,  -6,false],
  175.   "剑系统武器下斩"    => [   0,   0,false,-320, 180,  4, true,   1,  1,   0,   0,false],
  176.   
  177.   "枪系统武器攻击"    => [  -10,   0,false,  45,  45,  4,false,  1,  1,  4,   2,false],
  178.   
  179.   
  180.   "缓慢待机武器"      => [  3,   3,false, 65,   65,  0,false,   1,  1, -10,  -4,false],
  181.   "插剑"              => [  0,   0,false, 270,   0,  3,false,   1,  1, -35,  -4,false],
  182.   "死亡武器位置"      => [  0,   0,false, 0,     0,  0,false,   1,  1, -20,   0,false],
  183.   "普通待机武器"      => [  3,   3,false, 65,   65,  0,false,   1,  1, -18,   2,false],
  184.   
  185. #--------------------------------------------------------------------------
  186. # ● 角色移动  敌方的X轴移动是以相反的复数计算。
  187. #--------------------------------------------------------------------------
  188.   # 目标…坐标移动的参照 [0=自身现在的位置] [1=目标] [2=窗口] [3=初期位置]
  189.   # X轴…从对象所看X坐标。绝对值就算是最低时也会比时间高
  190.   # Y轴…从对象所看Y坐标。绝对值就算是最低时也会比时间高
  191.   # 时间…移动时间。数值越大越缓慢。这里是用距离除以时间所得每格行动距离。
  192.   # 加速…正数是加速、负数是减速。这里是每格行动的加速或减速。
  193.   # 跳跃…跳跃轨道。正数是向下跳、负数是向上跳。0是不跳。
  194.   # 动画…这里的移动所使用的角色动画名。

  195.   #                        目标  X轴  Y轴 时间 加速 跳跃 动画
  196.   "不能移动"        => [  0,   0,   0,  1,   0,   0,  "待机(固定)"],
  197.   "到战斗开始的位置"=> [  0,  54,   0,  1,   0,   0,  "前进"],
  198.   "一步向前移动"          => [  3, -32,   0, 18,  -1,   0,  "前进"],
  199.   "一步向后移动"          => [  0,  32,   0,  8,  -1,   0,  "前进"],
  200.   "四人攻击移动1"   => [  2, 444,  96, 18,  -1,   0,  "前进"],
  201.   "四人攻击移动2"   => [  2, 444, 212, 18,  -1,   0,  "前进"],
  202.   "四人攻击移动3"   => [  2, 384,  64, 18,  -1,   0,  "前进"],
  203.   "四人攻击移动4"   => [  2, 384, 244, 18,  -1,   0,  "前进"],
  204.   "被伤害"          => [  0,  32,   0,  4,  -1,   0,  "伤害"],
  205.   "推动"            => [  0,  12,   0,  1,   1,   0,  "伤害"],
  206.   "我方逃走"        => [  0, 300,   0,300,   1,   0,  "逃跑"],
  207.   "逃走失败"        => [  0,  48,   0, 16,   1,   0,  "逃跑"],
  208.   "胜利的跳跃"      => [  0,   0,   0, 20,   0,  -5,  "前进"],
  209.   "目标移动"        => [  1,   0,   0, 18,  -1,   0,  "前进"],
  210.   "目标高速移动"    => [  1,   0, -12,  8,   0,  -2,  "前进"],
  211.   "目标向前移动"    => [  1,  24,   0, 12,  -1,   0,  "前进"],
  212.   "目标向前高速移动"=> [  1,  24,   0,  1,   0,   0,  "前进"],
  213.   "目标右前移动"    => [  1,  96,  32, 16,  -1,   0,  "前进"],
  214.   "目标左前移动"    => [  1,  96, -32, 16,  -1,   0,  "前进"],
  215.   "一步向前跳跃"    => [  0, -32,   0,  8,  -1,  -4,  "前进"],
  216.   "一步向后跳跃"    => [  0,  32,   0,  8,  -1,  -4,  "闪避"],
  217.   "跳跃到目标"      => [  1,  12, -12, 12,  -1,  -6,  "前进"],
  218.   "投掷我方"        => [  0, -24,   0, 16,   0,  -2,  "前进"],
  219.   "强力踩踏"        => [  1,  12, -32, 12,  -1,  -6,  "头上显示"],
  220.   "一步向前跳跃敲击"=> [  0, -32,   0, 12,  -1,  -2,  "武器挥动攻击"],
  221.   "向前跳跃敲击"    => [  1,  12,   0, 12,  -1,  -5,  "武器挥动攻击缓"],
  222.   "对后方给予提高"  => [  1,  12,   0, 16,   0,  -3,  "武器挥动攻击"],
  223.   "原地跳跃敲击"    => [  1,   0,   0, 16,   0,  -5,  "武器挥动攻击"],
  224.   "拔出"            => [  1, -96,   0, 16,   2,   0,  "武器挥动攻击"],
  225.   "右拔出"          => [  1, -96,  32, 16,   2,   0,  "武器挥动攻击"],
  226.   "左拔出"          => [  1, -96, -32, 16,   2,   0,  "武器挥动攻击"],
  227.   "右拔出2"         => [  1,-128,  48, 16,   2,   0,  "武器挥动攻击"],
  228.   "左拔出2"         => [  1,-128, -48, 16,   2,   0,  "武器挥动攻击"],
  229.   
  230.   "剑系统目标前移动"    => [  1,  24,   0, 50,  -1,   0,  "剑系统攻击移动"],
  231.   "剑系统攻击后后跳"    => [  0,  32,   0, 25,  -1,  -3,  "剑系统后跳"],
  232.   "战场中心移动"        => [  2, 272, 208, 18,  -3,  -2,  "缓慢前进"],
  233.   
  234. #--------------------------------------------------------------------------
  235. # ● 角色漂浮  角色与影子脱离
  236. #--------------------------------------------------------------------------
  237.   # 判別…用来判别的、请全部统一填入"float"。
  238.   # 始高…开始漂浮的高度。负数情况是在影子之上、正数是在影子下方。
  239.   # 终高…漂浮完毕的高度。因为动作系需要使用这个数值,请不要变动。
  240.   # 时间…漂浮过程所用时间。
  241.   # 动画…漂浮时候所用的角色动画名。
  242.   
  243.   #                      判別  始高 终高 时间 动画
  244.   "低空漂浮中"      => ["float", -22, -20,  2, "待机(固定)"],
  245.   "低空漂浮中2"     => ["float", -20, -18,  2, "待机(固定)"],
  246.   "低空漂浮中3"     => ["float", -18, -20,  2, "待机(固定)"],
  247.   "低空漂浮中4"     => ["float", -20, -22,  2, "待机(固定)"],
  248.   "跳跃停止"        => ["float",   0, -80,  4, "待机(固定)"],
  249.   "跳跃着地"        => ["float", -80,   0,  4, "待机(固定)"],
  250.   "抬起"            => ["float",   0, -30,  4, "待机(固定)"],
  251.   
  252. #--------------------------------------------------------------------------
  253. # ● 坐标初始化 返回到原始位置的移动设置
  254. #--------------------------------------------------------------------------
  255.   # 判別…用来判别的、请全部统一填入"reset"。
  256.   # 时间…返回过程所用时间。即使是同样的时间如果距离远的情况下移动速度也会发生变化。
  257.   # 加速…正数为加速、负数为减速。这里是每格行动的加速或减速。
  258.   # 跳跃…跳跃轨道。正数为向下跳、负数为向上跳。0是不跳。
  259.   # 动画…这里移动时使用的角色动画名。

  260.   #                      判別  时间 加速 跳跃 动画
  261.   "坐标初始化"    => ["reset", 16,  0,   0,  "前进"],
  262.   "后退初始化"    => ["reset", 16,  0,   0,  "后退"],
  263.   "目标面前坐标初始化"  => ["reset", 50,  0,   0,  "剑系统后退"],
  264.   
  265. #--------------------------------------------------------------------------
  266. # ● 强制动作 被动形成的目标动作
  267. #--------------------------------------------------------------------------
  268.   # 识别…被动形成的动作是单独还是连贯。"单独"时直接填入单独即可。
  269.   #       "连贯"时请填入连贯。
  270.   #
  271.   # 对象…获取是指动作的对象。0是目标、除他以外的处于那个状态No
  272.   #       的全部角色视为对象。
  273.   #       数值前有负号的就会习得此数字绝对值的数字对应的技能ID上的技能
  274.   #       除自身以外的主人公作为对象(主人公限定)
  275.   #       指定引取的情况(成员位置)、引取值填入1000。
  276.   #       指定的引取是自身不在的情况(无法战斗或是逃走时)
  277.   #       从零号开始顺次参照、所有角色界不在为时,行动中段。
  278.   #
  279.   # 恢复…动作后返回原始坐标的目标动作名。
  280.   #       不返回的情况以这样""不填任何东西即可。
  281.   # 动作名…强制动作的动作名。识别是单独的话、使用单独动作名。
  282.   #               连贯的话就用连贯动作名(组合动作)。
  283.   
  284.   #                       识别    对象   恢复              动作名
  285.   "轻微吹动"     => ["单独",    0, "坐标初始化",  "推动"],
  286.   "右旋转"           => ["单独",    0, "坐标初始化",  "右旋转一周"],
  287.   "纵向压扁"   => ["单独",    0, "坐标初始化",  "纵向缩小"],
  288.   "中弹1"            => ["单独",    0, "坐标初始化",  "从对象到自身1"],
  289.   "举起我方"     => ["单独",    0,             "",  "抬起"],
  290.   "吴莉嘉连同攻击"   => ["连贯",   18, "坐标初始化",  "吴莉嘉合体攻击1"],
  291.   "四人攻击1"      => ["连贯", -101, "坐标初始化",  "四人合体攻击1"],
  292.   "四人攻击2"      => ["连贯", -102, "坐标初始化",  "四人合体攻击2"],
  293.   "四人攻击3"      => ["连贯", -103, "坐标初始化",  "四人合体攻击3"],
  294.   "将我方投掷飞出"   => ["连贯", 1000, "坐标初始化",  "可以投掷"],

  295. #--------------------------------------------------------------------------
  296. # ● 目标变更  改变现在角色作为目标对象的
  297. #--------------------------------------------------------------------------
  298.   # ※只是改变战斗动作上的目标、战斗的目标不改变。
  299.   #   只能是实行战斗中的角色执行。
  300.   # 判別…因为使用于判别、请全部统一填入"target"。
  301.   #
  302.   # 对象…被变更目标的对象。0是目标、改变这个目标以外处于那个状态No中
  303.   #       角色的全部对象。
  304.   #       数值前有负号的就会习得此数字绝对值的数字对应的技能ID上的技能(我方队员为对象)。
  305.   #       指定引取的情况(成员位置)、引取值填入1000。
  306.   #       指定的引取是自身不在的情况(无法战斗或是逃走时)
  307.   #       从零号开始顺次参照。
  308.   #
  309.   # 变更处…变更处内容   0=自身  1=自身的目标 
  310.   #                      2=成为自身的目标后、再将自己的目标变为变更对象
  311.   #                      3=将已变更为自身的目标返还(必须是在实行过2的情况下下)
  312.   
  313.   # 目标変更名             判別   对象  変更先
  314.   "以自身为目标"          => ["target",    0,  0],
  315.   "二人攻击目标统一"      => ["target",   18,  1],
  316.   "四人攻击目标统一"      => ["target",   19,  1],
  317.   "选择投掷角色"        => ["target", 1000,  2],
  318.   "投掷目标组合"    => ["target", 1000,  3],
  319.   
  320. #--------------------------------------------------------------------------
  321. # ● 技能连发 中断动作后、其他技能被连发出来
  322. #--------------------------------------------------------------------------
  323.   # 判別…用于判别、请全部统一填入"der"。
  324.   # 确率…连发的成功率、0~100之间。如果没有被连发、剩下的动作继续执行。
  325.   # 习得…如果连发的技能没有被习得也可以实行的话是true
  326.   # 技能ID…连发的技能的ID
  327.   
  328.   # 连发名               判別  确率  习得 技能ID
  329.   "回复连发"     => ["der", 100, true,  91],
  330.   "适当连发"       => ["der", 100, true,  92],

  331. #--------------------------------------------------------------------------
  332. # ● 动作条件  设定条件、满足条件以后将停止所有行动
  333. #--------------------------------------------------------------------------
  334.   # 判別…用于判别、请全部统一填入"nece"。
  335.   # 对象…用于条件参照的对象。[0=自分] [1=目标] [2=敌全体] [3=我方全体]
  336.   # 内容… [0=状态] [1=参数] [2=开关] [3=变量] [4=习得技能]
  337.   #
  338.   # 条件…填入符合上边内容确定的项目的数值。
  339.   # [0]状态…状态ID
  340.   # [1]参数…[0=现HP] [1=现MP] [2=攻击力] [3=防御力] [4=精神力] [5=敏捷性]
  341.   # [2]开关…游戏中的开关No
  342.   # [3]变量…游戏中的变量No
  343.   # [4]习得技能…习得特定技能的条件、将那个技能的ID编号填入。
  344.   #
  345.   # 补足…补足上边的条件。
  346.   # [0]状态…成为条件的被施加状态的人数。
  347.   #              符号为正号时是需要此号码对应条件,负号时为不需要。
  348.   # [1]参数…参数的数值。对象为复数时,将取平均值。
  349.   #                符号为正的数值以上、以及负的数值以下作为条件。
  350.   # [2]开关…开关ON为条件是 true、OFF为条件是 false
  351.   # [3]变量…符号为正的数值以上、以及负的数值以下作为条件。
  352.   # [4]习得技能…作为条件的技能所习得的人数。
  353.   
  354.   # 连发名                 判別  对象  内容 条件 补足
  355.   "二人攻击条件确认"  => ["nece",   3,   0,  18,    1],
  356.   "四人攻击条件确认"  => ["nece",   3,   0,  19,    3],
  357.   "漂浮状态确认"  => ["nece",   0,   0,  17,    1],
  358.   "是否已变身成猫"=> ["nece",   0,   0,  20,    1],
  359.   "死亡确认"          => ["nece",   1,   0,   1,    1],
  360.   
  361. #--------------------------------------------------------------------------
  362. # ● 角色旋转 画像旋转。与反转不同、武器动作不能被反映
  363. #--------------------------------------------------------------------------
  364.   # 判別…用于判别、请全部统一填入"angle"。
  365.   # 时间…旋转过程所需时间。
  366.   # 初始角度…旋转开始时的角度。指定于0~360度之间。正数为正半圆、负数为反半圆。
  367.   # 完毕角度…旋转完毕时的角度。指定于0~360度之间。跟上边所记相同,但敌人的设定是与其相反的。
  368.   # 回复…true是在完毕的同时恢复到通常角度。false是保持最后着动作。

  369.   #                     判別  时间 初始角度 完毕角度 回复
  370.   "右旋转一周"    => ["angle", 48,   0,-360,false],
  371.   "左高速旋转"     => ["angle",  6,   0, 360,false],

  372. #--------------------------------------------------------------------------
  373. # ● 角色放大缩小 武器动作不能被反映
  374. #--------------------------------------------------------------------------
  375.   # 判別…用于判别、请全部统一填入"zoom"。
  376.   # 时间…放大缩小过程所需时间。
  377.   # X扩…横向的放大率。1.0是等倍、0.5是原有的一半。
  378.   # Y扩…纵向的放大率。1.0是等倍、0.5是原有的一半。
  379.   # 回复…true是在完毕的同时还原成等倍。false是保持完毕时的样子。
  380.   #       放大缩小时会一时变更当前对象的原点、在恢复的时候复原。

  381.   #                   判別  时间  X拡  Y拡  回复
  382.   "横向缩小"         => ["zoom", 16, 0.5, 1.0, true],
  383.   "纵向缩小"         => ["zoom", 16, 1.0, 0.5, true],
  384.   
  385. #--------------------------------------------------------------------------
  386. # ● 战斗动画 显示数据库的战斗动画
  387. #--------------------------------------------------------------------------
  388.   # 判別…用于判别、请全部统一填入"anime"。
  389.   # ID…动画ID。-1时将显示武器或者技能上设定的动画的伤害。
  390.   #     -2时技能也变成武器上所带的动画。
  391.   # 对象… [0=自身] [1=目标]
  392.   # 反转…true时动画地画像将被反转。
  393.   # 等待…一直在动画显示完毕都存在的话是true。
  394.   # 二刀用…true时将实行二刀流的动画。动画ID为-1时通常攻击的情况
  395.   # 设定成显示为左手武器的动画。技能是技能动画的在实行。
  396.   
  397.   #                       判別     ID  对象  反转  等待  二刀用
  398.   "对象动画"         => ["anime",  -1,  1, false,false, false],
  399.   "对象动画等待"     => ["anime",  -1,  1, false, true, false],
  400.   "对象动画武器"     => ["anime",  -2,  1, false,false, false],
  401.   "对象动画L"        => ["anime",  -1,  1, false,false,  true],
  402.   "打击动画"         => ["anime",   1,  1, false,false, false],
  403.   "斩击/必杀技1"     => ["anime",  11,  1, false,false, false],
  404.   
  405.   "敌对象动画无"     => ["anime",   0,  1,  true,false, false],
  406.   
  407.   "幻鬼之阵"         => ["anime",  201, 0, false,false, false],
  408.   "终末之冬 杀"      => ["anime",  207, 1, false,false, false],
  409.    
  410. #--------------------------------------------------------------------------
  411. # ● 动画飞出 让战斗动画飞出去。飞行道具、远距离攻击用
  412. #--------------------------------------------------------------------------
  413.   # ID…数据库里设定的动画ID。0是不显示动画。
  414.   # 对象…飞出的对象 [0=目标] [1=敌全体的中心] [2=我方全体的中心] [4=自身]
  415.   # 类型…[0=碰撞时消失] [1=直线贯穿]
  416.   # 时间…动画飞出去时候的移动时间。数值越大速度越缓慢。
  417.   # 轨道…动画飞出去时候的轨道。填入数值的话是走抛物线。正数为向下的抛物线、负数为向上。
  418.   # 调X…略微调整X轴。改变飞出时的初期X坐标。敌方的情况是自动的反向运算。
  419.   # 调Y…略微调整Y轴。改变飞出时的初期Y坐标。
  420.   # 始…动画飞出时的开始位置。[0=自身] [1=对象] [2=不能移动]
  421.   # Z坐标…动画或者武器在角色面前显示的话是true
  422.   # 武器…填入下面贴附的武器、技能动作名。如果不是用为""
  423.   
  424.   #                     判別   ID 对象 类型 时间  轨道 调X 调Y 始 Z坐标 武器
  425.   "魔法发动动画"     => ["m_a",  0,   4,  0,  52,   0,  0,  0, 2,false,""],
  426.   "从对象到自身1"    => ["m_a",  4,   0,  0,  24,   0,  0,  0, 1,false,""],
  427.   "开始武器投掷"     => ["m_a",  0,   0,  0,  18, -24,  0,  0, 0,false,"旋转投掷"],
  428.   "放弃武器投掷"     => ["m_a",  0,   0,  0,  18,  24,  0,  0, 1,false,"旋转投掷"],
  429.   "全体动画单体化"   => ["m_a", 80,   1,  0,  64,   0,  0,  0, 2, true,""],
  430.   
  431.   
  432.   "幻鬼之阵1"        => ["m_a", 202,   1,  0, 100,  0,  0,  0, 2, true,""],
  433.   "幻鬼之阵2"        => ["m_a", 203,   1,  0, 100,  0,  0,  0, 2, true,""],
  434.   "幻鬼之阵3"        => ["m_a", 204,   1,  0, 100,  0,  0,  0, 2, true,""],
  435.   "幻鬼之阵4"        => ["m_a", 205,   1,  0, 100,  0,  0,  0, 2, true,""],
  436.   "终末之冬"         => ["m_a", 206,   0,  0, 100,  0,  0,  0, 2, true,""],
  437. #--------------------------------------------------------------------------
  438. # ● 动画飞出时贴附的武器图像动画 专用于上面的武器飞出
  439. #--------------------------------------------------------------------------
  440.   # 让贴附的武器图片动。这个画像可以和和武器动作的画像区分使用。
  441.   # 那样的情况贴附的图像请去武器设定。
  442.   # 初始角度…动作前的最初角度。前半圆0~360度。
  443.   # 完毕角度…动作后的角度。前半圆0~360度。
  444.   # 时间…旋转过程需要的时间。越小越快。动作到消失前持续保持旋转。
  445.   
  446.   # 武器动作名    初始角度 完毕角度 时间
  447.   "旋转投掷"     => [   0, 360,  8],
  448.   
  449. #--------------------------------------------------------------------------
  450. # ● 动画飞出时贴附的技能画像动画 专用于上边的动画飞出
  451. #--------------------------------------------------------------------------
  452.   # 让贴附的技能图片动。能够贴附的图像在技能设定上。
  453.   # 初始角度…动作前的最初角度。前半圆0~360度。
  454.   # 完毕角度…动作后的角度。前半圆0~360度。
  455.   # 时间…旋转过程所需要的时间。越小越快。动作到消失前持续保持旋转。
  456.   # 判別…用于判别、请全部统一填入"skill"。
  457.   
  458.   # 武器动作名    初始角度 完毕角度 时间 判別
  459.   "石投掷"       => [   0, 360,  8, "skill"],
  460.   
  461. #--------------------------------------------------------------------------
  462. # ● 状态动画 显示事件使用的状态ICON
  463. #--------------------------------------------------------------------------
  464.   # 判別…用于判别、请全部统一填入"balloon"。
  465.   # 种类…状态的种类(纵位置)在0~9之间。
  466.   # 形式…动画更新方法、在完毕时消失。[0=单线] [1=往返]
  467.   
  468.   # 状态名         判別     种类 形式
  469.   "异常状态/通用"   => ["balloon",   6,  1],
  470.   "异常状态/危急" => ["balloon",   5,  1],
  471.   "异常状态/睡眠"   => ["balloon",   9,  1],
  472.   
  473. #--------------------------------------------------------------------------
  474. # ● 声效
  475. #--------------------------------------------------------------------------
  476.   # 判別…用于判别、请全部统一填入"sound"。
  477.   # 种别…効果音为"se"  BGM为"bgm"  BGS为"bgs"
  478.   # 速度…速度、50~150之间。音量…音量 不管哪个都要默认为100。
  479.   # 文件名…播放的文件名。""时不改变任何BGM和BGS的设定。
  480.   
  481.   #   SE名              判別   种别 速度 音量  SE文件名
  482.   "absorb1"       => ["sound", "se",  80, 100, "absorb1"],
  483.   
  484. #--------------------------------------------------------------------------
  485. # ● 变更游戏整体速度  动作的慢放化
  486. #--------------------------------------------------------------------------
  487.   # 判別…用于判别、请全部统一填入"fps"。
  488.   # 游戏速度…60是默认的数值、比这个值低的时候就会放慢。 
  489.   # ※这个指令也可以直接变更FPS。请注意处理。
  490.   
  491.   # 変更名           判別  游戏速度
  492.   "缓慢再生"   => ["fps",  20],
  493.   "通常再生"   => ["fps",  60],
  494.   
  495. #--------------------------------------------------------------------------
  496. # ● 赋予状态
  497. #--------------------------------------------------------------------------
  498.   # 判別…用于判别、请全部统一填入"sta+"。
  499.   # 对象…[0=自分] [1=目标] [2=敌全体] [3=我方全体] [4=除自身以外的我方全体]
  500.   # 状态ID…赋予的状态ID编号。「不能抵抗」状态以外为抵抗。
  501.   
  502.   # 赋予的状态名           判別  对象  状态ID
  503.   "赋予二人攻击状态" => ["sta+",  0,  18],
  504.   "赋予四人攻击状态" => ["sta+",  0,  19],
  505.   "猫"                 => ["sta+",  0,  20],
  506.   
  507. #--------------------------------------------------------------------------
  508. # ● 状态解除
  509. #--------------------------------------------------------------------------
  510.   # 判別…用于判别、请全部统一填入"sta-"。
  511.   # 对象…[0=自分] [1=目标] [2=敌全体] [3=我方全体] [4=除自身以外的我方全体]
  512.   # 状态ID…解除的状态ID编号
  513.   
  514.   # 赋予的状态名           判別  对象  状态ID
  515.   "解除二人攻击状态" => ["sta-",  3,  18],
  516.   "解除四人攻击状态" => ["sta-",  3,  19],

  517. #--------------------------------------------------------------------------
  518. # ● 角色画像文件変更  只能使用于主人公们
  519. #--------------------------------------------------------------------------
  520.   # 判別…用于判别、请全部统一填入"change"。
  521.   # 复原…战斗后也显示为变化的是false。行走图也将变化。
  522.   # 文件名…变更为的文件名。因为要改变识别处,请不要用文件名加"_1"后缀的方式。
  523.   
  524.   # 変更名               判別   复原  文件名
  525.   "变身成猫"    => ["change", true,"$cat"],
  526.   "解除变身"      => ["change", true,"$ylva"],
  527.   "攻击变身"    => ["change", true,"_1"],
  528.   "技能变身"    => ["change", true,"_2"],
  529.   "受击变身"    => ["change", true,"_3"],
  530.   "还原变身"    => ["change", true,""],
  531.   
  532. #--------------------------------------------------------------------------
  533. # ● 图片显示 一名角色对应显示一枚图片
  534. #--------------------------------------------------------------------------
  535.   # 始X…移动开始位置。从画面所看的X坐标。图片是以左上为原点。
  536.   # 始Y…移动开始位置。从画面所看的Y坐标。
  537.   # 終X…移动完毕X坐标。
  538.   # 終Y…移动完毕Y坐标。
  539.   # 时间…移动时间。数值越大越缓慢。这里是用距离除以时间所得每格行动距离。
  540.   # Z轴…相较HP窗口靠前显示的话为true
  541.   # 图片文件名…图片文件夹内的文件名。

  542.   #                       判別   始X  始Y  终X  终Y 时间  Z轴 图片文件名
  543.    "特写1开始"     => ["pic",-280,  48,   0,  64, 14,false,"Actor2-3"],
  544.    "特写1完毕"     => ["pic",   0,  48, 550,  64, 12,false,"Actor2-3"],
  545.   
  546. #--------------------------------------------------------------------------
  547. # ● 游戏开关的设置
  548. #--------------------------------------------------------------------------
  549.   # 判別…用于判别、请全部统一填入"switch"。
  550.   # 开关No…设置哪个开关
  551.   # ON/OFF…将开关ON时是true、OFF时是false
  552.   #
  553.   # 开关设置名          判別   开关No ON/OFF   
  554.   "开关No1/ON"    => ["switch",   1,  true],
  555.   
  556. #--------------------------------------------------------------------------
  557. # ● 游戏变量的设置
  558. #--------------------------------------------------------------------------
  559.   # 判別…用于判别、请全部统一填入"variable"。
  560.   # 变量No…设置哪个开关
  561.   # 设置…[0=代入] [1=加法] [2=减法] [3=乘法] [4=除法] [5=剩余]
  562.   # 设置数值…指定成为演算对象的数值。
  563.   #
  564.   # 变量设置名           判別     变量No 设置 设置数值
  565.   "变量No1/+1"       => ["variable",   1,   1,    1],
  566.   
  567. #--------------------------------------------------------------------------
  568. # ● 脚本运行的设置  
  569. #--------------------------------------------------------------------------
  570.   # 判別…用于判别、请全部统一填入"script"。
  571.   #
  572.   # 使动作被添加到建议的脚本中。样品p = 1可以添加任何自己想要设置的脚本。
  573.   # 功能中、不能处理文字列。
  574.   #
  575.   #   设置名               判別   
  576.   "检测程序"   => ["script", "
  577.   
  578.   p = 1
  579.   
  580.   "],
  581.   
  582. #--------------------------------------------------------------------------
  583. # ● 其他  没有设定项目。这里所使用的名称请不要改动。
  584. #--------------------------------------------------------------------------
  585.   # 消去图片…消除显示的图片。
  586.   # 残像ON…留下角色轨迹中的残像。持续连贯动作中的残像。
  587.   # 残像OFF…消除残像。
  588.   # 反转…反转画像。是再次被反转回去,还是坐标不复原保持着反转后的样子。
  589.   # 待机不能移动…行动后、不做待机动作。
  590.   # 击倒许可…目标的HP变成0时、在这个时机可以被击倒。
  591.   #               如果这段没有的话,怪会在所有动作完成时被击倒。
  592.   # 限定于二刀…只是这个下面的单独动作、限定于二刀来处理。
  593.   #           如果不是二刀的话将会跳过、直接执行下一个单独动作。
  594.   # 非限定于二刀…与上边相反,只有在不是二刀的情况下个动作才会有效。
  595.   # 单独处理开始…在全体攻击处理成单独时、是播放行动的开始记号。
  596.   # 单独处理完毕…在全体攻击处理成单独时、是播放行动的完毕记号。
  597.   # 变更初期位置…原坐标(初期位置)变成现在的位置。
  598.   # 解除变更初期位置…将变更初期位置还原。
  599.   # 解除主动…当作战斗行动完毕、下一个角色开始行动。
  600.   #                 击倒许可设置也被含在其中、在这之后的所有动作都不会再对对象做出伤害。
  601.   # 完毕…行动完毕。就算没有这里,在所有动作完毕后也会自动识别成完毕。
  602.   
  603.   "消去图片"    => ["消去图片"],
  604.   "残像ON"          => ["残像ON"],
  605.   "残像OFF"         => ["残像OFF"],
  606.   "反转"            => ["反转"],
  607.   "待机不能移动"=> ["待机不能移动"],
  608.   "击倒许可"    => ["击倒许可"],
  609.   "限定于二刀"        => ["限定于二刀"],
  610.   "非限定于二刀"      => ["非限定于二刀"],
  611.   "单独处理开始"    => ["单独处理开始"],
  612.   "单独处理完毕"    => ["单独处理完毕"],
  613.   "变更初期位置"    => ["变更初期位置"],
  614.   "解除变更初期位置"=> ["解除变更初期位置"],
  615.   "解除主动"  => ["解除主动"],
  616.   "完毕"            => ["完毕"]
  617.   
  618. #--------------------------------------------------------------------------
  619. # ● 等待相关
  620. #--------------------------------------------------------------------------
  621.   # 单独动作上只有数值时、将会直接判定为等待时间。
  622.   # 总之,请不要用只有数字的单独动作名。
  623.   # 等待是到下一个动作执行前的等待时间、角色动画的更新不会被停止
  624.   
  625.   }
  626. #==============================================================================
  627. # ■ 连贯动作
  628. #------------------------------------------------------------------------------
  629. #  将上边的单独动作组合起来、这里是实际做出的动作。
  630. #==============================================================================
  631.   # 这里的连贯动作名将是下面主人公或者敌方所指定用的。
  632.   # 行动会从左到右依次进行。
  633.   ACTION = {
  634. #------------------------------- 待机系 -----------------------------------------  
  635.   # 连贯动作名     行动
  636.   
  637.   "战斗开始"          => ["到战斗开始的位置","坐标初始化"],
  638.                           
  639.   "待机"              => ["待机"],
  640.                           
  641.   "危急待机"        => ["不能移动","待机(固定)","异常状态/危急","22"],
  642.                           
  643.   "异常状态待机"      => ["不能移动","待机(固定)","异常状态/通用","22"],
  644.                           
  645.   "睡眠待机"          => ["不能移动","待机(固定)","异常状态/睡眠","22"],
  646.                           
  647.   "漂浮待机"          => ["待机(固定)","6","低空漂浮中","4",
  648.                           "低空漂浮中2","4","低空漂浮中3","4",
  649.                           "低空漂浮中4","4"],
  650.                           
  651.   "气绝"              => ["无法战斗"],
  652.                           
  653.   "伤害"          => ["被伤害","坐标初始化"],
  654.   
  655.   "敌伤害"          => ["被伤害","受击变身","24","还原变身","坐标初始化"],
  656.                           
  657.   "逃走"              => ["我方逃走"],
  658.                           
  659.   "敌方逃走"      => ["我方逃走","坐标初始化"],
  660.                           
  661.   "逃走失败"          => ["逃走失败","待机(固定)","8","坐标初始化"],
  662.                           
  663.   "选择指令"      => ["一步向前移动"],
  664.                           
  665.   "选择指令后"    => ["坐标初始化"],
  666.                           
  667.   "防御"              => ["待机(固定)","4","漂浮状态确认","低空漂浮中",
  668.                           "2","低空漂浮中2","2","低空漂浮中3","2",
  669.                           "低空漂浮中4","2"],
  670.                           
  671.   "友方回避"          => ["一步向后跳跃","待机(固定)","16","坐标初始化"],                       
  672.                           
  673.   "敌方回避"          => ["一步向后跳跃","待机(固定)","16","坐标初始化"],
  674.                           
  675.   "胜利"              => ["待机(固定)","16","向右(固定)","胜利动作",
  676.                           "待机(固定)","待机不能移动","是否已变身成猫",
  677.                           "魔法发动动画","解除变身","待机(固定)","待机不能移动",],
  678.                           
  679.   "坐标复原"          => ["坐标初始化"],
  680.                           
  681. #------------------------------- 強制系 ----------------------------------------                          
  682.                           
  683.   "吴莉嘉合体攻击1" => ["2","目标左前移动","待机(固定)",
  684.                           "魔法发动动画","武器下旋转","举起武器",
  685.                           "48","右拔出","64","后退初始化"],
  686.                           
  687.   "四人合体攻击1"     => ["2","四人攻击移动2","待机(固定)","魔法发动动画",
  688.                           "武器下旋转","举起武器","90",
  689.                           "左拔出","96","后退初始化"],
  690.                           
  691.   "四人合体攻击2"     => ["2","四人攻击移动3","待机(固定)","魔法发动动画",
  692.                           "武器下旋转","举起武器","60","右拔出2","右旋转",
  693.                           "对象动画","128","后退初始化"],
  694.                           
  695.   "四人合体攻击3"     => ["2","四人攻击移动4","待机(固定)","魔法发动动画",
  696.                           "武器下旋转","举起武器","34","左拔出2","右旋转",
  697.                           "对象动画","144","后退初始化"],
  698.                           
  699.   "可以投掷"        => ["右旋转一周","4","目标高速移动","一步向后跳跃","4",
  700.                           "待机(固定)","一步向后跳跃","待机(固定)","32"],
  701.                           
  702. #--------------------------- 基本アクション系 ----------------------------------
  703.   
  704.   "通常攻击"        => ["目标向前移动","武器挥动攻击","对象动画等待",
  705.                           "12","武器挥动攻击L","对象动画L","限定于二刀","16",
  706.                           "击倒许可","后退初始化"],
  707.                           
  708.   "近身技能"        => ["目标向前移动","武器挥动攻击","对象动画等待",
  709.                           "12","武器挥动攻击L","对象动画L","限定于二刀","16",
  710.                           "击倒许可","后退初始化"],                        
  711.                           
  712.   "使用通用技能"    => ["一步向前移动","待机(固定)","使用魔法","魔法发动动画",
  713.                           "武器下旋转","举起武器","武器挥动攻击",
  714.                           "对象动画等待","击倒许可","24","坐标初始化"],
  715.                           
  716.   "敌方使用技能"    => ["一步向前移动","技能变身","待机(固定)","魔法发动动画",
  717.                           "武器下旋转","举起武器","武器挥动攻击",
  718.                           "对象动画等待","击倒许可","24","还原变身","坐标初始化"],                        
  719.                           
  720.   "通用技能单独处理"=> ["一步向前移动","魔法发动动画","武器下旋转","举起武器",
  721.                           "单独处理开始","武器挥动攻击","对象动画","24",
  722.                           "单独处理完毕","击倒许可","坐标初始化"],
  723.                           
  724.   "使用物品"        => ["目标向前移动","待机(固定)","24","对象动画等待",
  725.                           "击倒许可","坐标初始化"],
  726.                           
  727. #------------------------------ スキル系 ---------------------------------------                          
  728.   
  729.   "乱剑狂舞"        => ["残像ON","向前跳跃敲击","武器挥动攻击L","对象动画武器",
  730.                           "待机(固定)","16","对象动画武器","武器下旋转",
  731.                           "武器上旋转","4","原地跳跃敲击","武器挥动攻击L",
  732.                           "对象动画武器","待机(固定)","16","对象动画武器",
  733.                           "反转","武器挥动攻击","武器挥动攻击L","12","反转",
  734.                           "原地跳跃敲击","武器挥动攻击L","对象动画武器",
  735.                           "一步向后跳跃","一步向后跳跃","待机(固定)",
  736.                           "对象动画武器","拔出","武器挥动攻击L","击倒许可",
  737.                           "残像OFF","16","反转","后退初始化","反转"],
  738.                           
  739.   "多段随机攻击"    => ["向前跳跃敲击","武器挥动攻击L","对象动画武器","待机(固定)","16",
  740.                           "向前跳跃敲击","武器挥动攻击L","对象动画武器","待机(固定)","16",
  741.                           "向前跳跃敲击","武器挥动攻击L","对象动画武器","待机(固定)","16",
  742.                           "向前跳跃敲击","武器挥动攻击L","对象动画武器","击倒许可","坐标初始化"],
  743.                           
  744.   "高速多段攻击"    => ["目标向前移动","武器挥动攻击","轻微吹动","对象动画武器",
  745.                           "目标向前高速移动","武器挥动攻击","轻微吹动","武器挥动攻击L","对象动画武器",
  746.                           "目标向前高速移动","武器挥动攻击","轻微吹动","武器挥动攻击L","对象动画武器",
  747.                           "目标向前高速移动","武器挥动攻击","轻微吹动","武器挥动攻击L","对象动画武器",
  748.                           "目标向前高速移动","武器挥动攻击","轻微吹动","武器挥动攻击L","对象动画武器",
  749.                           "目标向前高速移动","武器挥动攻击","轻微吹动","武器挥动攻击L","对象动画武器",
  750.                           "击倒许可","12","坐标初始化"],
  751.                           
  752.   "二人同時攻击"    => ["二人攻击条件确认","二人攻击目标统一","吴莉嘉连同攻击",
  753.                           "目标右前移动","待机(固定)","魔法发动动画","武器下旋转",
  754.                           "举起武器","48","斩击/必杀技1","左拔出","64","对象动画",
  755.                           "击倒许可","后退初始化","解除二人攻击状态"],
  756.                           
  757.   "二人同時攻击准备"=> ["赋予二人攻击状态"],  
  758.                           
  759.   "四人同時攻击"    => ["四人攻击条件确认","四人攻击目标统一","四人攻击1",
  760.                           "四人攻击2","四人攻击3","四人攻击移动1","待机(固定)",
  761.                           "魔法发动动画","武器下旋转","举起武器","90",
  762.                           "斩击/必杀技1","右拔出","64","对象动画等待",
  763.                           "击倒许可","后退初始化","合体攻击解除"],
  764.                           
  765.   "四人同時攻击准备"=> ["赋予四人攻击状态"],
  766.                           
  767.   "武器投掷"        => ["一步向前移动","武器挥动攻击","absorb1","待机(固定)",
  768.                           "开始武器投掷","12","对象动画武器","击倒许可",
  769.                           "放弃武器投掷","坐标初始化"],
  770.                           
  771.   "单独全体远距离攻击"=> ["一步向前跳跃","跳跃停止","单独处理开始",
  772.                           "以自身为目标","武器挥动攻击","中弹1","8",
  773.                           "对象动画武器","单独处理完毕","击倒许可",
  774.                           "跳跃着地","坐标初始化"],
  775.                           
  776.   "全体远距离攻击"  => ["以自身为目标","武器挥动攻击","中弹1","20",
  777.                           "对象动画等待","击倒许可"],
  778.                         
  779.   "回复连发"        => ["目标向前移动","对象动画","武器挥动攻击",
  780.                           "16","死亡确认","回复连发","坐标初始化"],
  781.                           
  782.   "适当连发"        => ["逃走失败","魔法发动动画","武器下旋转","举起武器",
  783.                           "8","对象动画","适当连发","坐标初始化"],
  784.                           
  785.   "特写"            => ["待机(固定)","魔法发动动画","特写1开始",
  786.                           "75","特写1完毕","8","目标向前移动",
  787.                           "武器挥动攻击","对象动画等待","击倒许可",
  788.                           "消去图片","后退初始化"],
  789.                           
  790.   "踩踏攻击"        => ["跳跃到目标","打击动画","纵向压扁","一步向后跳跃",
  791.                           "强力踩踏","打击动画","纵向压扁","一步向后跳跃",
  792.                           "强力踩踏","对象动画","纵向压扁","一步向后跳跃",
  793.                           "一步向后跳跃","击倒许可","待机(固定)","8","后退初始化"],
  794.                           
  795.   "全体攻击1"       => ["一步向前移动","待机(固定)","魔法发动动画","武器下旋转",
  796.                           "举起武器","全体动画单体化","武器挥动攻击","48",
  797.                           "对象动画等待","击倒许可","坐标初始化"],
  798.                           
  799.   "变身成猫"        => ["一步向前跳跃","待机(固定)","魔法发动动画","32",
  800.                           "变身成猫","待机(固定)","猫","32","一步向后跳跃"],                     
  801.                           
  802.   "人体投掷"        => ["选择投掷角色","目标移动","举起我方","4",
  803.                           "absorb1","投掷目标组合","将我方投掷飞出",
  804.                           "投掷我方","待机(固定)","对象动画","坐标初始化",
  805.                           "待机(固定)","32"],
  806.                           
  807. # =============共通动作==============   
  808.   "剑系统攻击动作"  => ["剑系统目标前移动","剑系统攻击","对象动画","10",
  809.                           "剑系统攻击后后跳","20","击倒许可","反转",
  810.                           "目标面前坐标初始化","反转"],     
  811.   
  812.   "枪系统攻击动作"  => ["剑系统目标前移动","枪系统攻击","对象动画等待","20",
  813.                         "限定于二刀","20","击倒许可","反转","目标面前坐标初始化","反转"],
  814.   
  815.   "敌方无武器的攻击"=> ["目标向前移动","12","攻击变身","敌对象动画无","对象动画等待",
  816.                         "12","还原变身","击倒许可","后退初始化"],
  817.                         
  818. # =============己方技能==============                           
  819.   "幻鬼之阵(友)"  => ["残像ON","战场中心移动","使用魔法","插剑动作","70","幻鬼之阵",
  820.                         "幻鬼之阵1","对象动画","55","幻鬼之阵2","对象动画","55","幻鬼之阵3","对象动画","55",
  821.                         "幻鬼之阵4","对象动画","55","幻鬼之阵2","对象动画","55","幻鬼之阵3","对象动画","55",
  822.                         "击倒许可","残像OFF","向后跳跃","反转","坐标初始化","反转"],                        

  823. # =============敌方技能==============   
  824.   "幻鬼之阵(敌)"  => ["残像ON","战场中心移动","技能变身","30","幻鬼之阵",
  825.                         "幻鬼之阵1","对象动画","55","幻鬼之阵2","对象动画","55","幻鬼之阵3","对象动画","55",
  826.                         "幻鬼之阵4","对象动画","55","幻鬼之阵2","对象动画","55","幻鬼之阵3","对象动画","55",
  827.                         "击倒许可","残像OFF","向后跳跃","还原变身","反转","坐标初始化","反转"],

  828.   "终末之冬(敌)"  => ["一步向前移动","技能变身","30","终末之冬","90","终末之冬 杀",
  829.                         "60","对象动画","60","击倒许可","还原变身","坐标初始化"],                                                
  830. #-------------------------------------------------------------------------------
  831.   "完毕"            => ["完毕"]}
  832. end
  833. #==============================================================================
  834. # ■ Game_Actor
  835. #------------------------------------------------------------------------------
  836. #  设定主人公的基本动作类
  837. #==============================================================================
  838. class Game_Actor < Game_Battler
  839.   #--------------------------------------------------------------------------
  840.   # ● 从主人公ID中确定空手时的动作(无武器时)
  841.   #--------------------------------------------------------------------------
  842.   # when 1 ←这个数字是主人公ID
  843.   # return "通常攻击" ←填入对应的连贯动作名
  844.   def non_weapon
  845.     case @actor_id
  846.     when 1
  847.       return "通常攻击"
  848.     end
  849.     # 上述主人公ID以外的其他主人公全部使用的连贯动作名
  850.     return "通常攻击"
  851.   end
  852.   #--------------------------------------------------------------------------
  853.   # ● 通常待机
  854.   #--------------------------------------------------------------------------
  855.   def normal
  856.     case @actor_id
  857.     when 1
  858.       return "待机"
  859.     end
  860.     # 上述主人公ID以外的其他主人公全部使用的连贯动作名
  861.     return "待机"
  862.   end
  863.   #--------------------------------------------------------------------------
  864.   # ● 危急(HP1/4以下)
  865.   #--------------------------------------------------------------------------
  866.   def pinch
  867.     case @actor_id
  868.     when 1
  869.       return "危急待机"
  870.     end
  871.     # 上述主人公ID以外的其他主人公全部使用的连贯动作名
  872.     return "危急待机"
  873.   end
  874.   #--------------------------------------------------------------------------
  875.   # ● 防御
  876.   #--------------------------------------------------------------------------
  877.   def defence
  878.     case @actor_id
  879.     when 1
  880.       return "防御"
  881.     end
  882.     # 上述主人公ID以外的其他主人公全部使用的连贯动作名
  883.     return "防御"
  884.   end
  885.   #--------------------------------------------------------------------------
  886.   # ● 伤害 对象动画時、取得命中时的动作
  887.   #--------------------------------------------------------------------------
  888.   def damage_hit
  889.     case @actor_id
  890.     when 1
  891.       return "伤害"
  892.     end
  893.     # 上述主人公ID以外的其他主人公全部使用的连贯动作名
  894.     return "伤害"
  895.   end  
  896.   #--------------------------------------------------------------------------
  897.   # ● 回避 对象动画時、取得沒命中时的动作
  898.   #--------------------------------------------------------------------------
  899.   def evasion
  900.     case @actor_id
  901.     when 1
  902.       return "友方回避"
  903.     end
  904.     # 上述主人公ID以外的其他主人公全部使用的连贯动作名
  905.     return "友方回避"
  906.   end  
  907.   #--------------------------------------------------------------------------
  908.   # ● 选择指令前動作
  909.   #--------------------------------------------------------------------------
  910.   def command_b
  911.     case @actor_id
  912.     when 1
  913.       return "选择指令"
  914.     end
  915.     # 上述主人公ID以外的其他主人公全部使用的连贯动作名
  916.     return "选择指令"
  917.   end
  918.   #--------------------------------------------------------------------------
  919.   # ● 选择指令后動作
  920.   #--------------------------------------------------------------------------
  921.   def command_a
  922.     case @actor_id
  923.     when 1
  924.       return "选择指令后"
  925.     end
  926.     # 上述主人公ID以外的其他主人公全部使用的连贯动作名
  927.     return "选择指令后"
  928.   end
  929.   #--------------------------------------------------------------------------
  930.   # ● 逃走成功
  931.   #--------------------------------------------------------------------------
  932.   def run_success
  933.     case @actor_id
  934.     when 1
  935.       return "逃走"
  936.     end
  937.     # 上述主人公ID以外的其他主人公全部使用的连贯动作名
  938.     return "逃走"
  939.   end
  940.   #--------------------------------------------------------------------------
  941.   # ● 逃走失败
  942.   #--------------------------------------------------------------------------
  943.   def run_ng
  944.     case @actor_id
  945.     when 1
  946.       return "逃走失败"
  947.     end
  948.     # 上述主人公ID以外的其他主人公全部使用的连贯动作名
  949.     return "逃走失败"
  950.   end
  951.   #--------------------------------------------------------------------------
  952.   # ● 胜利
  953.   #--------------------------------------------------------------------------
  954.   def win
  955.     case @actor_id
  956.     when 1
  957.       return "胜利"
  958.     end
  959.     # 上述主人公ID以外的其他主人公全部使用的连贯动作名
  960.     return "胜利"
  961.   end
  962.   #--------------------------------------------------------------------------
  963.   # ● 进入战斗时的动作
  964.   #--------------------------------------------------------------------------  
  965.   def first_action
  966.     case @actor_id
  967.     when 1
  968.       return "战斗开始"
  969.     end
  970.     # 上述主人公ID以外的其他主人公全部使用的连贯动作名
  971.     return "战斗开始"
  972.   end
  973.   #--------------------------------------------------------------------------
  974.   # ● 动作被中断时的恢复动作
  975.   #--------------------------------------------------------------------------  
  976.   def recover_action
  977.     case @actor_id
  978.     when 1
  979.       return "坐标复原"
  980.     end
  981.     # 上述主人公ID以外的其他主人公全部使用的连贯动作名
  982.     return "坐标复原"
  983.   end
  984.   #--------------------------------------------------------------------------
  985.   # ● 影图像  在人物行走图文件夹中读取
  986.   #--------------------------------------------------------------------------
  987.   # return "shadow00" ←在这里填入想要设定的话像文件名
  988.   def shadow
  989.     case @actor_id
  990.     when 1
  991.       return "shadow00"
  992.     end
  993.     # 上述主人公ID以外的其他主人公全部使用的影图像
  994.     return "shadow00"
  995.   end
  996.   #--------------------------------------------------------------------------
  997.   # ● 略微调整影图像的位置
  998.   #--------------------------------------------------------------------------
  999.   # return [横坐标, 縦坐标]
  1000.   def shadow_plus
  1001.     case @actor_id
  1002.     when 1
  1003.       return [ 0, 4]
  1004.     end
  1005.     # 上述主人公ID以外的其他主人公全部使用的位置
  1006.     return [ 0, 4]
  1007.   end
  1008. end
  1009. #==============================================================================
  1010. # ■ Game_Enemy
  1011. #------------------------------------------------------------------------------
  1012. #  敌方的基本动作设定
  1013. #==============================================================================
  1014. class Game_Enemy < Game_Battler
  1015.   #--------------------------------------------------------------------------
  1016.   # ● 从敌方ID来确定未装备武器时的通常攻击动作
  1017.   #--------------------------------------------------------------------------
  1018.   # when 1 ←这里的数字是敌方ID编号
  1019.   # return "敌方无武器的攻击" ←请填入对应的连贯动作名
  1020.   def base_action
  1021.     case @enemy_id
  1022.     when 1
  1023.       return "敌方无武器的攻击"
  1024.     end
  1025.     # 上述敌方ID以外的其他敌方队员全部使用的武器ID动作
  1026.     return "敌方无武器的攻击"
  1027.   end
  1028.   #--------------------------------------------------------------------------
  1029.   # ● 通常待机
  1030.   #--------------------------------------------------------------------------
  1031.   def normal
  1032.     case @enemy_id
  1033.     when 1
  1034.       return "待机"
  1035.     end
  1036.     # 上述敌方ID以外的其他敌方队员全部使用的武器ID动作
  1037.     return "待机"
  1038.   end
  1039.   #--------------------------------------------------------------------------
  1040.   # ● 危急(HP1/4以下)
  1041.   #--------------------------------------------------------------------------
  1042.   def pinch
  1043.     case @enemy_id
  1044.     when 1
  1045.       return "待机"
  1046.     end
  1047.     # 上述敌方ID以外的其他敌方队员全部使用的武器ID动作
  1048.     return "待机"
  1049.   end
  1050.   #--------------------------------------------------------------------------
  1051.   # ● 防御
  1052.   #--------------------------------------------------------------------------  
  1053.   def defence
  1054.     case @enemy_id
  1055.     when 1
  1056.       return "防御"
  1057.     end
  1058.     # 上述敌方ID以外的其他敌方队员全部使用的武器ID动作
  1059.     return "防御"
  1060.   end
  1061.   #--------------------------------------------------------------------------
  1062.   # ● 伤害 对象动画時、取得命中时的动作
  1063.   #--------------------------------------------------------------------------
  1064.   def damage_hit
  1065.     case @enemy_id
  1066.     when 1
  1067.       return "伤害"
  1068.     end
  1069.     # 上述敌方ID以外的其他敌方队员全部使用的武器ID动作
  1070.     return "敌伤害"
  1071.   end
  1072.   #--------------------------------------------------------------------------
  1073.   # ● 回避 对象动画時、取得未命中时的动作
  1074.   #--------------------------------------------------------------------------
  1075.   def evasion
  1076.     case @enemy_id
  1077.     when 1
  1078.       return "敌方回避"
  1079.     end
  1080.     # 上述敌方ID以外的其他敌方队员全部使用的武器ID动作
  1081.     return "敌方回避"
  1082.   end
  1083.   #--------------------------------------------------------------------------
  1084.   # ● 逃走
  1085.   #--------------------------------------------------------------------------
  1086.   def run_success
  1087.     case @enemy_id
  1088.     when 1
  1089.       return "敌方逃走"
  1090.     end
  1091.     # 上述敌方ID以外的其他敌方队员全部使用的武器ID动作
  1092.     return "敌方逃走"
  1093.   end
  1094.   #--------------------------------------------------------------------------
  1095.   # ● 进入战斗时的动作
  1096.   #--------------------------------------------------------------------------  
  1097.   def first_action
  1098.     case @enemy_id
  1099.     when 1
  1100.       return "战斗开始"
  1101.     end
  1102.     # 上述敌方ID以外的其他敌方队员全部使用的武器ID动作
  1103.     return "战斗开始"
  1104.   end
  1105.   #--------------------------------------------------------------------------
  1106.   # ● 动作被中断时的恢复动作
  1107.   #--------------------------------------------------------------------------  
  1108.    def recover_action
  1109.     case @enemy_id
  1110.     when 1
  1111.       return "坐标复原"
  1112.     end
  1113.     # 上述敌方ID以外的其他敌方队员全部使用的武器ID动作
  1114.     return "坐标复原"
  1115.   end
  1116.   #--------------------------------------------------------------------------
  1117.   # ● 影图像  在人物行走图文件夹中读取
  1118.   #--------------------------------------------------------------------------
  1119.   # return "shadow01" ←在这里填入想要设定的话像文件名。
  1120.   def shadow
  1121.     case @enemy_id
  1122.     when 1
  1123.       return "shadow01"
  1124.     when 30
  1125.       return ""
  1126.     end
  1127.     # 上述敌方ID以外的其他敌方队员全部使用的武器ID影图像
  1128.     return "shadow01"
  1129.   end
  1130.   #--------------------------------------------------------------------------
  1131.   # ● 略微调整影图像的位置
  1132.   #--------------------------------------------------------------------------
  1133.   # return [横坐标, 縦坐标]
  1134.   def shadow_plus
  1135.     case @enemy_id
  1136.     when 3
  1137.       return [ 0, -8]
  1138.     when 301 # 索妮娅
  1139.       return [ 0, 8]  
  1140.     end
  1141.     # 上述敌方ID以外的其他敌方队员全部使用的武器ID位置
  1142.     return [ 0, 0]
  1143.   end
  1144.   #--------------------------------------------------------------------------
  1145.   # ● 敌方武器设定  在动作和动画时,武器也被显示。
  1146.   #--------------------------------------------------------------------------
  1147.   # return 1 ←这个数字是武器ID。0的话将被判别为空手。
  1148.   #            只有在敌方动画NO的时候画像才被显示。
  1149.   def weapon
  1150.     case @enemy_id
  1151.     when 1
  1152.       return 0
  1153.     end
  1154.     # 上述敌方ID以外的其他敌方队员全部使用的武器ID
  1155.     return 0
  1156.   end
  1157.   #--------------------------------------------------------------------------
  1158.   # ● 战斗配置的略微调整  在这里可以设置数据库中所不能设置的广范围坐标
  1159.   #--------------------------------------------------------------------------
  1160.   # return [ 0, 0] => [X坐标、Y坐标] 这个数值从数据库上的配置上变化
  1161.   def position_plus
  1162.     case @enemy_id
  1163.     when 1
  1164.       return [0, 0]
  1165.     end
  1166.     # 上述敌方ID以外的其他敌方队员全部使用的武器ID坐标调整
  1167.     return [ 0, 0]
  1168.   end
  1169.   #--------------------------------------------------------------------------
  1170.   # ● 敌方击倒(击破时的退场)方式
  1171.   #--------------------------------------------------------------------------
  1172.   # 被击倒画像残留的为1、普通为2、BOSS型为3
  1173.   def collapse_type
  1174.     case @enemy_id
  1175.     when 1
  1176.       return 2
  1177.     when 30   #敌方ID为30,BOSS型击倒!
  1178.       return 3
  1179.     end
  1180.     # 上述敌方ID以外的其他敌方队员全部使用的武器ID击倒方式
  1181.     return 2
  1182.   end
  1183.   #--------------------------------------------------------------------------
  1184.   # ● 敌方行动回数 1回合做几次行动
  1185.   #--------------------------------------------------------------------------
  1186.   #        回数  确率  补正               
  1187.   # return [  2, 100,  50]                       
  1188.   #                        
  1189.   # 回数…最大的行动回数
  1190.   # 确率…下次行动能否成功的成功率。数值为%
  1191.   # 补正…速度修正。行动的每次数值%后得出的值
  1192.   def action_time
  1193.     case @enemy_id
  1194.     when 1
  1195.       return [ 1, 100, 100]
  1196.     end
  1197.     # 上述敌方ID以外的其他敌方队员全部使用的武器ID行动回数
  1198.     return [ 1, 100, 100]
  1199.   end
  1200.   #--------------------------------------------------------------------------
  1201.   # ● 敌方动画
  1202.   #--------------------------------------------------------------------------
  1203.   # 敌方被作成动画? true是是跟主人公同等对待。
  1204.   # [设定方法]
  1205.   # 1.敌方的动画画像变成行走图
  1206.   # 2.数据库的敌方角色名、参照着行走图文件名填写
  1207.   def anime_on
  1208.     case @enemy_id
  1209.     when 1,2
  1210.       return true
  1211.     end
  1212.     # 上述敌方ID以外的其他敌方队员全部使用的武器ID动画设定
  1213.     return false
  1214.   end
  1215.   #--------------------------------------------------------------------------
  1216.   # ● 敌方动画時的自动反转
  1217.   #--------------------------------------------------------------------------
  1218.   # 如果想自动反转上面设定为NO的敌方画像和武器动画时为true
  1219.   def action_mirror
  1220.     case @enemy_id
  1221.     when 1,2
  1222.       return true
  1223.     end
  1224.     # 上述敌方ID以外的其他敌方队员全部使用的武器ID动画设定
  1225.     return false
  1226.   end
  1227. end
  1228. module RPG
  1229. #==============================================================================
  1230. # ■ module RPG
  1231. #------------------------------------------------------------------------------
  1232. #  设定状态动作。
  1233. #==============================================================================
  1234. class State
  1235. #--------------------------------------------------------------------------
  1236. # ● 指定ID 根据状态改变通常待机、危急时的动作。
  1237. #--------------------------------------------------------------------------
  1238. # when 1 ←这个数字是状态ID
  1239. # return "气绝" ←填入对应的连贯动作名
  1240.   def base_action
  1241.     case @id
  1242.     when 1  # 无法战斗(HP0)时。最优先。
  1243.       return "气绝"
  1244.     when 2,3,4,5,7
  1245.       return "异常状态待机"
  1246.     when 6  
  1247.       return "睡眠待机"
  1248.     when 17  
  1249.       return "漂浮待机"
  1250.     end
  1251.     # 上述状态ID以外的其他状态全部使用的连贯动作
  1252.     return "待机"
  1253.   end
  1254. #--------------------------------------------------------------------------
  1255. # ● 扩张设定 从状态ID确定扩张设定。可以重复。
  1256. #--------------------------------------------------------------------------
  1257. # "自动复活/50"…无法战斗时自动复活。不要解除无法战斗。
  1258. #                /后的数字是回复时的HP(最大值的比例%)回复后状态会自动解除
  1259. # "魔法反弹/39"…反弹魔法(物理攻击以外)技能。/后填入反射时显示的动画ID编号
  1260. # "物理反弹/39"…反弹物理攻击(包含物理技能)。/后填入反射时显示的动画ID编号
  1261. # "魔法无效/39"…魔法(物理攻击以外)技能无效化。/后填入无效时显示的动画ID编号
  1262. # "物理无效/39"…物理攻击(包含物理技能)无效化。/后填入无效时显示的动画ID编号
  1263. # "成本吸収"…受到技能时将他的成本还原到自身。数值不显示。
  1264. # "0回合解除"…按照行动顺序的回合数解除状态。
  1265. # "敌方除外"…让敌方不显示这个状态
  1266. # "无POP"…附加这个状态時、伤害窗口上不显示状态名
  1267. # "不显示ICON"…在状态窗口上不显示状态ICON
  1268. # "禁止状态动作"…附加这个状态时不会改变人物待机状态
  1269. # "连续伤害"…调用下面的连续伤害
  1270. # "无"…无扩张
  1271.   def extension
  1272.     case @id
  1273.     when 1  # 无法战斗
  1274.       return ["无POP","敌方除外"]
  1275.     when 2  # 毒
  1276.       return ["敌方除外"]
  1277.     when 218  
  1278.       return ["0回合解除","不显示ICON"]
  1279.     when 219  
  1280.       return ["0回合解除","不显示ICON"]
  1281.     when 220  
  1282.       return ["不显示ICON","禁止状态动作"]
  1283.     end
  1284.     # 上記のID以外すべてに適用される拡張設定
  1285.     return ["无"]
  1286.   end
  1287. #--------------------------------------------------------------------------
  1288. # ● 连续伤害扩张设置 包含连续回复
  1289. #--------------------------------------------------------------------------
  1290. # when 1 ←这个数字是状态ID。上面的只有填写了"连续伤害"的扩张才会有这个效果
  1291. #      可以多数设置。例)[["hp",0,5,true],["mp",0,5,true]]
  1292. #                           
  1293. #         对象  定数  比例  POP  无法战斗许可
  1294. # return [["hp",    0,  10, true,  true]]
  1295. #
  1296. # 对象…比例伤害对象是 HP的话为"hp" MP为"mp"
  1297. # 定数…这个数值直接是伤害值。如果是负数时便成为回復。数值上多少会有些误差
  1298. # 比例…对象的最大值的比例伤害。数值以%计算。数值上多少会有些误差
  1299. # POP…在战斗画面上显示数值是true
  1300. # 无法战斗许可…许可HP0的情况是true
  1301.   def slip_extension
  1302.     case @id
  1303.     when 2  # 毒
  1304.       return [["hp", 0, 10, true, true]]
  1305.     end
  1306.     return []
  1307.   end
  1308. end
  1309. #==============================================================================
  1310. # ■ module RPG
  1311. #------------------------------------------------------------------------------
  1312. #  设置武器动作
  1313. #==============================================================================
  1314. class Weapon
  1315. #--------------------------------------------------------------------------
  1316. # ● 动作指定 从装备着的武器ID来决定通常攻击的动作。
  1317. #--------------------------------------------------------------------------
  1318. # when 1 ←这个数字是武器ID
  1319. # return "通常攻击" ←请填入对应的连贯动作名
  1320.   def base_action
  1321.     case @base_id
  1322.     when 2
  1323.       return "剑系统攻击动作"
  1324.     when 3
  1325.       return "枪系统攻击动作"
  1326.     end
  1327.     # 上述ID以外的其他全部使用的动作
  1328.     return "通常攻击"
  1329.   end
  1330. #--------------------------------------------------------------------------
  1331. # ● 图像指定 从装备着的武器ID来决定通常攻击的动作。
  1332. #--------------------------------------------------------------------------
  1333. # return "001-Weapon01" ←请填入对应的武器图像的文件名
  1334. #                         武器图像请放入人物行走图文件夹中
  1335. # 使用ICON时、在ID上没有的全部使用ICON来表示
  1336. # 特定的武器想要让他们不显示的话请用空白的图像。
  1337.   def graphic
  1338.     case @base_id
  1339.     when 1
  1340.       return ""
  1341.     end
  1342.     # 使用上述ID以外的全ICON画像
  1343.     return ""
  1344.   end
  1345. #--------------------------------------------------------------------------
  1346. # ● 飞出动画中贴附武器图像 自人物行走图文件夹中读取
  1347. #--------------------------------------------------------------------------
  1348. # 飞出动画用武器画像另行设定。显示弓和箭之类的。
  1349. # 在这里没有被设置的武器会和上面的图像作相同处理。
  1350.   def flying_graphic
  1351.     case @base_id
  1352.     when 1
  1353.       return ""
  1354.     end
  1355.     # 上述ID以外一律使用的图像
  1356.     return ""
  1357.   end
  1358. end  
  1359. #==============================================================================
  1360. # ■ module RPG
  1361. #------------------------------------------------------------------------------
  1362. #  技能动作设定。
  1363. #==============================================================================
  1364. class Skill
  1365. #--------------------------------------------------------------------------
  1366. # ● 从技能ID决定动作。
  1367. #--------------------------------------------------------------------------  
  1368.   def base_action
  1369.     case @id
  1370.     when 84
  1371.       return "武器投掷"  
  1372.     when 86
  1373.       return "高速多段攻击"  
  1374.     when 87
  1375.       return "单独全体远距离攻击"  
  1376.     when 88
  1377.       return "全体远距离攻击"
  1378.     when 89
  1379.       return "多段随机攻击"  
  1380.     when 90
  1381.       return "回复连发"  
  1382.     when 91
  1383.       return "适当连发"  
  1384.     when 92
  1385.       return "通常攻击"  
  1386.     when 93
  1387.       return "特写"  
  1388.     when 94
  1389.       return "踩踏攻击"
  1390.     when 95
  1391.       return "全体攻击1"
  1392.     when 96
  1393.       return "通用技能单独处理"
  1394.     when 97
  1395.       return "变身成猫"
  1396.     when 98
  1397.       return "二人同時攻击"
  1398.     when 99
  1399.       return "二人同時攻击准备"
  1400.     when 100
  1401.       return "四人同時攻击"
  1402.     when 101
  1403.       return "四人同時攻击准备"
  1404.     when 102
  1405.       return "四人同時攻击准备"
  1406.     when 103
  1407.       return "四人同時攻击准备"
  1408.     when 104
  1409.       return "人体投掷"

  1410.     when 201,253
  1411.       return "敌方无武器的攻击"
  1412.     when 251
  1413.      return "幻鬼之阵(敌)"  
  1414.     when 252
  1415.      return "终末之冬(敌)"     
  1416.     when 251..500
  1417.      return "敌方使用技能"  
  1418.     end
  1419.     # 上述ID以外的其他全部使用的动作  
  1420.     return "使用通用技能"
  1421.   end
  1422. #--------------------------------------------------------------------------
  1423. # ● 扩张设定 从技能ID决定扩张设定。可以重复。
  1424. #--------------------------------------------------------------------------
  1425. # "必中"…攻击绝对不会被回避
  1426. # "HP消費"…将MP消费改为HP消费
  1427. # "%成本MAX"…技能成本变为以最大MP(HP)的比例取值。例)MAXMP500的成本10是消费MP50
  1428. # "%成本NOW"…技能成本变为以现在MP(HP)的比例取值。例)现MP100的成本10是消费MP10
  1429. # "无视反射"…无视魔法、物理技能反射和无效化状态
  1430. # "%伤害MAX/30"…伤害计算变为以对象的最大HP(MP)的比例取值。/后的数值为%值伤害
  1431. # "%伤害NOW/30"…伤害计算变为以对象的现在HP(MP)的比例取值。/后的数值为%值伤害
  1432. # "成本威力"…根据使用者的最大MP(HP)判别消費MP(HP)的比例威力。MAX消費是原本威力、MAX10%是原有威力的1/10
  1433. # "现HP威力"…根据使用者的最大HP改变现在HP的比例威力。MAX是原本威力、MAX10%是原有威力的1/10
  1434. # "现MP威力"…根据使用者的最大MP改变现在MP的比例威力。MAX是原本威力、MAX10%是原有威力的1/10
  1435. # "MP消耗减半无效"…防具上的定义「MP消耗减半」被无效化
  1436. # "不显示HELP"…动作时、帮助窗口上不显示技能名
  1437. # "全区域"…目标范围为敌我方全体
  1438. # "随机目标"…目标内随机选择一个对象
  1439. # "自身以外"…在目标内将自己排除
  1440. # "伤害动作禁止"…不显示伤害命中时的动作
  1441. # "行动前无闪光"…行动时角色不发光
  1442. # "无"…无扩张
  1443.   def extension
  1444.     case @id
  1445.     when 86
  1446.       return ["伤害动作禁止"]
  1447.     when 89
  1448.       return ["随机目标"]
  1449.     when 94
  1450.       return ["伤害动作禁止"]
  1451.     when 96
  1452.       return ["全域"]
  1453.     when 98
  1454.       return ["伤害动作禁止"]
  1455.     when 99
  1456.       return ["不显示HELP","行动前无闪光"]
  1457.     when 100
  1458.       return ["伤害动作禁止"]
  1459.     when 101
  1460.       return ["不显示HELP","行动前无闪光"]
  1461.     when 102
  1462.       return ["不显示HELP","行动前无闪光"]
  1463.     when 103
  1464.       return ["不显示HELP","行动前无闪光"]
  1465.     end
  1466.     # 上述ID以外的其他全部使用的拡張設定
  1467.     return ["无"]
  1468.   end
  1469. #--------------------------------------------------------------------------
  1470. # ● 飞出动画上贴附的画像 自人物行走图文件夹中读取
  1471. #--------------------------------------------------------------------------
  1472. # 指定技能ID的画像
  1473.   def flying_graphic
  1474.     case @id
  1475.     when 1
  1476.       return ""
  1477.     end
  1478.     # 上述ID以外为画像未使用
  1479.     return ""
  1480.   end
  1481. end  
  1482. #==============================================================================
  1483. # ■ module RPG
  1484. #------------------------------------------------------------------------------
  1485. #  物品动作设定。
  1486. #==============================================================================
  1487. class Item
  1488. #--------------------------------------------------------------------------
  1489. # ● 根据物品ID决定动作。
  1490. #--------------------------------------------------------------------------  
  1491.   def base_action
  1492.     case @id
  1493.     when 1
  1494.       return "使用物品"
  1495.     end
  1496.     # 上述ID以外的其他全部使用的动作
  1497.     return "使用物品"
  1498.   end
  1499. #--------------------------------------------------------------------------
  1500. # ● 扩张设定 根据物品ID决定扩张设定。可以重复。
  1501. #--------------------------------------------------------------------------
  1502. # "必中"…攻击绝对不会被回避
  1503. # "反射无视"…无视魔法、物理反射和无效化状态
  1504. # "不显示HELP"…帮助窗口上不显示物品名
  1505. # "全区域"…目标范围为敌我全体
  1506. # "随机目标"…目标内中随机选择一个对象
  1507. # "自身以外"…目标内中将自身排除
  1508. # "伤害动作禁止"…不显示伤害命中时的动作
  1509. # "行动前无闪光"…行动时角色不发光
  1510. # "无"…无扩张
  1511.   def extension
  1512.     case @id
  1513.     when 1
  1514.       return ["无"]
  1515.     end
  1516.     # 上述ID以外的其他全部使用的拡張設定
  1517.     return ["无"]
  1518.   end
  1519. end
  1520. end
复制代码
脚本2:
  1. #==============================================================================
  2. # ■ Sprite_Battler Ver3.3
  3. #------------------------------------------------------------------------------
  4. #  角色用于现实的战斗动作。
  5. #==============================================================================
  6. class Sprite_Battler < Sprite_Base
  7.   #--------------------------------------------------------------------------
  8.   # ● 初期化
  9.   #--------------------------------------------------------------------------
  10.   def initialize(viewport, battler = nil)
  11.     super(viewport)
  12.     @battler = battler
  13.     @battler_visible = false
  14.     @effect_type = 0                   # 效果的种类
  15.     @effect_duration = 0               # 效果的残留时间
  16.     @move_x = 0                        # 已变化的X坐标的累计
  17.     @move_y = 0                        # 已变化的Y坐标的累计
  18.     @move_z = 0                        # 已变化的Z坐标的累计
  19.     @distanse_x = 0                    # X坐标的移动距离
  20.     @distanse_y = 0                    # Y坐标的移动距离
  21.     @moving_x = 0                      #1单位所相当的X坐标移动距离
  22.     @moving_y = 0                      #1单位所相当的Y坐标移动距离
  23.     @move_speed_x = 0                  # X坐标的移动速度
  24.     @move_speed_y = 0                  # Y坐标的移动速度
  25.     @move_speed_plus_x = 0             # X坐标在加减速时的补充移动速度
  26.     @move_speed_plus_y = 0             # Y坐标在加减速时的补充移动速度
  27.     @move_boost_x = 0                  # X坐标加速度
  28.     @move_boost_y = 0                  # Y坐标加速度
  29.     @jump_time = 0                     # 跳跃时间
  30.     @jump_time_plus = 0                # 跳跃时间补充
  31.     @jump_up = 0                       # 跳跃上升
  32.     @jump_down = 0                     # 跳跃下降
  33.     @jump_size = 0                     # 跳跃高度
  34.     @float_time = 0                    # 漂浮时间
  35.     @float_up = 0                      # 1单位所相当于的浮遊高度
  36.     @jump_plus = 0                     # 根据跳跃补充影位置
  37.     @angle = 0                         # 旋转角度
  38.     @angling = 0                       # 1单位所相当于的旋转角度
  39.     @angle_time = 0                    # 旋转时间
  40.     @angle_reset = 0                   # 是否初始化角度
  41.     @zoom_x = 0                        # 横向放大率
  42.     @zoom_y = 0                        # 纵向放大率
  43.     @zooming_x = 0                     # 1单位所相当于的横向放大率
  44.     @zooming_y = 0                     # 1单位所相当于的纵向放大率
  45.     @zoom_time = 0                     # 放大时间
  46.     @zoom_reset = 0                    # 是否初始化放大
  47.     @target_battler = []               # 目标角色情报
  48.     @now_targets = []                  # 目标角色记忆
  49.     @pattern = 0                       # 横图片位置(更新位置)
  50.     @pattern_back = false              # 循环标志
  51.     @wait = 0                          # 到下个动作的等待时间
  52.     @unloop_wait = 0                   # 非循环系动画完毕时的等待时间
  53.     @action = []                       # 行动
  54.     @anime_kind = 0                    # 纵图片位置(动画种类位置)
  55.     @anime_speed = 0                   # 图片更新速度
  56.     @frame = 0                         # 被消费图片更新时间
  57.     @anime_loop = 0                    # 循环方式
  58.     @anime_end = false                 # 角色的动画是否完毕
  59.     @anime_freeze = false              # 是否是固定动画
  60.     @anime_freeze_kind = false         # 固定图案位置
  61.     @anime_moving = false              # 是否在飞出动画中
  62.     @base_width = N01::ANIME_PATTERN   # 图片的横分割数
  63.     @base_height = N01::ANIME_KIND     # 图片的纵分割数
  64.     @width = 0                         # 横矩形
  65.     @height = 0                        # 纵矩形
  66.     @picture_time = 0                  # 图片显示时间
  67.     @individual_targets = []           # 单独处理的保持目标
  68.     @balloon_duration = 65             # 飞出动画时间
  69.     @reverse = false                   # 动画的反向再生标志
  70.     # 角色不存在的时候将中断处理
  71.     return @battler_visible = false if @battler == nil
  72.     # 角色是主人公时、或者敌方动画为NO时
  73.     @anime_flug = true if @battler.actor?
  74.     @anime_flug = true if [email protected]? && @battler.anime_on
  75.   end
  76.   #--------------------------------------------------------------------------
  77.   # ● 角色作成
  78.   #--------------------------------------------------------------------------
  79.   def make_battler
  80.     # 初期配置的取得
  81.     @battler.base_position
  82.     # 色相通过角色认别
  83.     @battler_hue = @battler.battler_hue
  84.     # 角色是主人公时、或者敌方动画为NO时
  85.     if @anime_flug
  86.       # 准备武器
  87.       @weapon_R = Sprite_Weapon.new(viewport,@battler)
  88.       # 取得我方人物名、敌人角色名
  89.       @battler_name = @battler.character_name if @battler.actor?
  90.       @battler_name = @battler.battler_name unless @battler.actor?
  91.       # 敌方角色是主人公时、或者敌方动画为NO时为NO的时候 画像被角色是主人公时、或者敌方动画为NO时
  92.       self.mirror = true if [email protected]? && @battler.action_mirror
  93.       # 是不是利用行图片图来改变转送前的矩形尺寸的认识处
  94.       self.bitmap = Cache.character(@battler_name) if N01::WALK_ANIME
  95.       self.bitmap = Cache.character(@battler_name + "_1") unless N01::WALK_ANIME
  96.       # 获取转送前的矩形
  97.       @width = self.bitmap.width / @base_width
  98.       @height = self.bitmap.height / @base_height
  99.       # 矩形设定
  100.       @sx = @pattern * @width
  101.       @sy = @anime_kind * @height
  102.       # 角色本体的描绘
  103.       self.src_rect.set(@sx, @sy, @width, @height)
  104.     # 不作动画的角色时
  105.     else
  106.       # bitmap的获取、设定
  107.       @battler_name = @battler.battler_name
  108.       self.bitmap = Cache.battler(@battler_name, @battler_hue)
  109.       @width = bitmap.width
  110.       @height = bitmap.height
  111.     end
  112.     # 偷袭时画像角色是主人公时、或者敌方动画为NO时
  113.     if $back_attack && @battler.actor?
  114.       self.mirror = true
  115.     elsif $back_attack && [email protected]?
  116.       self.mirror = true
  117.       self.mirror = false if @battler.action_mirror
  118.     else
  119.       self.mirror = false
  120.       self.mirror = true if [email protected]? && @battler.action_mirror
  121.     end
  122.     # ....
  123.     @weapon_R.mirroring if self.mirror && @weapon_R != nil
  124.     # 位置初期化
  125.     @battler.reset_coordinate
  126.     # 决定原点
  127.     self.ox = @width / 2
  128.     self.oy = @height * 2 / 3
  129.     # 设定偷袭时的坐标
  130.     update_move
  131.     # 准备飞出动画的精灵
  132.     @move_anime = Sprite_MoveAnime.new(viewport,battler)
  133.     # 准备图片用精灵
  134.     @picture = Sprite.new
  135.     # 作成伤害精灵
  136.     @damage = Sprite_Damage.new(viewport,battler)
  137.   end
  138.   #--------------------------------------------------------------------------
  139.   # ● 影作成
  140.   #--------------------------------------------------------------------------
  141.   def make_shadow
  142.     @shadow.dispose if @shadow != nil
  143.     @battler_hue = @battler.battler_hue
  144.     @shadow = Sprite.new(viewport)
  145.     @shadow.z = self.z - 4
  146.     @shadow.visible = false
  147.     # 准备角色的影子精灵
  148.     @shadow.bitmap = Cache.character(@battler.shadow)
  149.     @shadow_height = @shadow.bitmap.height
  150.     # 影位置的稍微调整
  151.     @shadow_plus_x = @battler.shadow_plus[0] - @width / 2
  152.     @shadow_plus_y = @battler.shadow_plus[1]
  153.     # 配合角色画像的大小使用影画像
  154.     @shadow.zoom_x = @width * 1.0 / @shadow.bitmap.width
  155.     # 更新
  156.     update_shadow
  157.   end
  158.   #--------------------------------------------------------------------------
  159.   # ● 解放
  160.   #--------------------------------------------------------------------------
  161.   def dispose
  162.     self.bitmap.dispose if self.bitmap != nil
  163.     @weapon_R.dispose if @weapon_R != nil
  164.     @move_anime.dispose if @move_anime != nil
  165.     @picture.dispose if @picture != nil
  166.     @shadow.dispose if @shadow != nil
  167.     @damage.dispose if @damage != nil
  168.     @balloon.dispose if @balloon != nil
  169.     mirage_off
  170.     # 画像変更リセット
  171.     @battler.graphic_change(@before_graphic) if @before_graphic != nil
  172.     super
  173.   end  
  174.   #--------------------------------------------------------------------------
  175.   # ● 伤害动作  action = [动画ID,角色是主人公时、或者敌方动画为NO时标志,反方向许可]
  176.   #--------------------------------------------------------------------------
  177.   def damage_action(action)
  178.     damage = @battler.hp_damage
  179.     damage = @battler.mp_damage if @battler.mp_damage != 0
  180.     # 如果HP和MP两个同时做出伤害
  181.     if @battler.hp_damage != 0 && @battler.mp_damage != 0
  182.       @battler.double_damage = true
  183.       damage = @battler.hp_damage
  184.     end  
  185.     # 吸收攻击使HP为0的处理
  186.     if action[0] == "absorb"
  187.       absorb = true
  188.       action[0] = nil
  189.     end
  190.     # 只有在命中时动画才被执行
  191.     unless @battler.evaded or @battler.missed or action[0] == nil
  192.       @battler.animation_id = action[0]
  193.       @battler.animation_mirror = action[1]
  194.     end
  195.     # 执行伤害动画
  196.     start_action(@battler.damage_hit) if damage > 0 && action[2]
  197.     # 攻击没有命中时执行回避动画
  198.     if @battler.evaded or @battler.missed
  199.       start_action(@battler.evasion) if action[2]
  200.       Sound.play_evasion
  201.     end
  202.     @damage.damage_pop unless absorb or action[3] != nil
  203.   end
  204.   #--------------------------------------------------------------------------
  205.   # ● 伤害数值POP
  206.   #--------------------------------------------------------------------------
  207.   def damage_pop(damage)
  208.     @damage.damage_pop(damage)
  209.   end  
  210.   #--------------------------------------------------------------------------
  211.   # ● 战斗开始行动
  212.   #--------------------------------------------------------------------------
  213.   def first_action
  214.     # 检查能否行动、只有在不能的情况下那个状态的动作开始
  215.     action = @battler.first_action unless @battler.restriction >= 4
  216.     action = $data_states[@battler.state_id].base_action if @battler.states[0] != nil && @battler.restriction >= 4
  217.     start_action(action)
  218.     # 影スプライトを用意
  219.     make_shadow if N01::SHADOW
  220.   end
  221.   #--------------------------------------------------------------------------
  222.   # ● 动作开始
  223.   #--------------------------------------------------------------------------
  224.   def start_action(kind)
  225.     # 初期化各种动作
  226.     reset
  227.     #记录现在取得的待机动作
  228.     stand_by
  229.     # 决定新的动作内容
  230.     @action = N01::ACTION[kind].dup
  231.     # 从行动配列的前头开始移动
  232.     active = @action.shift
  233.     # 自动完毕
  234.     @action.push("完毕")
  235.     # 确定现在的动作
  236.     @active_action = N01::ANIME[active]
  237.     # 等待设定
  238.     @wait = active.to_i if @active_action == nil
  239.     # 单独动作开始
  240.     action
  241.   end
  242.   #--------------------------------------------------------------------------
  243.   # ● 强制单独动作开始
  244.   #--------------------------------------------------------------------------
  245.   def start_one_action(kind,back)
  246.     # 初期化各种动作
  247.     reset
  248.     # 记录现在取得的待机动作
  249.     stand_by
  250.     # 设置坐标初始化动作
  251.     @action = [back]
  252.     # 自动完毕
  253.     @action.push("完毕")
  254.     # 确定现在的动作
  255.     @active_action = N01::ANIME[kind]
  256.     # 单独动作开始
  257.     action
  258.   end
  259.   #--------------------------------------------------------------------------
  260.   # ● 到下一个动作
  261.   #--------------------------------------------------------------------------
  262.   def next_action
  263.     # 等待中时取消
  264.     return @wait -= 1 if @wait > 0
  265.     # 或者全部图片动画没有被完成时取消
  266.     return if @anime_end == false
  267.     # 最后的图片显示等待
  268.     return @unloop_wait -= 1 if @unloop_wait > 0
  269.     # 从行动配列的前头开始移动
  270.     active = @action.shift
  271.     # 确定现在的动作
  272.     @active_action = N01::ANIME[active]
  273.     # 等待设定
  274.     @wait = active.to_i if @active_action == nil
  275.     # 单独动作开始
  276.     action
  277.   end
  278.   #--------------------------------------------------------------------------
  279.   # ● 待机动作
  280.   #--------------------------------------------------------------------------
  281.   def stand_by
  282.     # 到通常待机
  283.     @repeat_action = @battler.normal
  284.     # HP为1/4时显示危急表情
  285.     @repeat_action = @battler.pinch if @battler.hp <= @battler.maxhp / 4
  286.     # 防御中
  287.     @repeat_action = @battler.defence if @battler.guarding?
  288.     # 如果什么状态都没有时完毕
  289.     return if @battler.state_id == nil
  290.     for state in @battler.states.reverse
  291.       # 动作禁止的状态时跳过处理
  292.       next if state.extension.include?("禁止状态动作")
  293.       # 敌方被动作禁止状态时跳过处理
  294.       next if @battler.is_a?(Game_Enemy) && state.extension.include?("敌方除外")
  295.       #  状态的表情
  296.       @repeat_action = state.base_action
  297.     end
  298.   end
  299.   #--------------------------------------------------------------------------
  300.   # ● 待机动作的插入
  301.   #--------------------------------------------------------------------------
  302.   def push_stand_by
  303.     action = @battler.normal
  304.     action = @battler.pinch if @battler.hp <= @battler.maxhp / 4
  305.     action = @battler.defence if @battler.guarding?
  306.     for state in @battler.states.reverse
  307.       # 动作禁止的状态时跳过处理
  308.       next if state.extension.include?("禁止状态动作")
  309.       # 敌方被动作禁止状态时跳过处理
  310.       next if @battler.is_a?(Game_Enemy) && state.extension.include?("敌方除外")
  311.       #  状态的表情
  312.       action = state.base_action
  313.     end
  314.     @repeat_action = action
  315.     #  插入
  316.     @action.delete("完毕")
  317.     act = N01::ACTION[action].dup
  318.     for i in 0...act.size
  319.       @action.push(act[i])
  320.     end  
  321.     @action.push("完毕")
  322.     @anime_end = true
  323.   end
  324.   #--------------------------------------------------------------------------
  325.   # ● 各种变化的初期化
  326.   #--------------------------------------------------------------------------
  327.   def reset
  328.     self.zoom_x = self.zoom_y = 1
  329.     self.oy = @height * 2 / 3
  330.     @angle = self.angle = 0
  331.     @anime_end = true
  332.     @non_repeat = false
  333.     @anime_freeze = false
  334.     @unloop_wait = 0
  335.   end  
  336.   #--------------------------------------------------------------------------
  337.   # ● 跳跃的初期化
  338.   #--------------------------------------------------------------------------
  339.   def jump_reset
  340.     @battler.jump = @jump_time = @jump_time_plus = @jump_up = @jump_down = 0
  341.     @jump_size = @jump_plus = @float_time = @float_up = 0
  342.   end
  343.   #--------------------------------------------------------------------------
  344.   # ● 受取目标情报
  345.   #--------------------------------------------------------------------------
  346.   def get_target(target)
  347.     # 单独处理中是中止(全区域中自身被卷
  348.     return if @battler.individual
  349.     @target_battler = target
  350.   end
  351.   #--------------------------------------------------------------------------
  352.   # ● 动作情报在角色中收藏
  353.   #--------------------------------------------------------------------------
  354.   def send_action(action)
  355.     @battler.play = 0
  356.     @battler.play = action if @battler.active
  357.   end
  358.   #--------------------------------------------------------------------------
  359.   # ● 角色追加
  360.   #--------------------------------------------------------------------------
  361.   def battler_join
  362.     if @battler.exist? && !@battler_visible
  363.       # 从战斗不能的復活时的处理被跳过
  364.       if @battler.revival && @anime_flug
  365.         return @battler.revival = false
  366.       elsif @battler.revival && !@anime_flug
  367.         @battler.revival = false
  368.         self.visible = true
  369.         return
  370.       end
  371.       @anime_flug = true if @battler.actor?
  372.       @anime_flug = true if [email protected]? && @battler.anime_on
  373.       make_battler
  374.       first_action
  375.     end
  376.   end
  377.   #--------------------------------------------------------------------------
  378.   # ● 图片更新 ※再定义
  379.   #--------------------------------------------------------------------------
  380.   def update
  381.     super
  382.     # 角色不存在时跳过
  383.     return self.bitmap = nil if @battler == nil
  384.     # 追加角色
  385.     battler_join
  386.     # 到下一个动作
  387.     next_action
  388.     # 动画图像更新
  389.     update_anime_pattern
  390.     # 目标更新
  391.     update_target
  392.     # 強制アクション更新
  393.     update_force_action
  394.     # 坐标更新
  395.     update_move
  396.     # 影更新
  397.     update_shadow if @shadow != nil
  398.     # 武器更新
  399.     @weapon_R.update if @weapon_action
  400.     # 漂浮更新
  401.     update_float if @float_time > 0
  402.     # 旋转更新
  403.     update_angle if @angle_time > 0
  404.     # 放大缩小更新
  405.     update_zoom if @zoom_time > 0
  406.     # 残像更新
  407.     update_mirage if @mirage_flug
  408.     # 图片更新
  409.     update_picture if @picture_time > 0
  410.     # 飞出动画更新
  411.     update_move_anime if @anime_moving
  412.     # 飞出动画更新(图片动画)
  413.     update_balloon if @balloon_duration <= 64
  414.     # 伤害精灵更新
  415.     @damage.update if @damage != nil
  416.     setup_new_effect
  417.     update_effect
  418.     update_battler_bitmap
  419.   end
  420.   #--------------------------------------------------------------------------
  421.   # ● 动画图像更新
  422.   #--------------------------------------------------------------------------
  423.   def update_anime_pattern
  424.     # 更新时间在到之前跳过
  425.     return @frame -= 1 if @frame != 0
  426.     # 只有在必要的时候更新武器动画
  427.     @weapon_R.action if @weapon_action && @weapon_R != nil
  428.     # 动画到最后是检查是否是循环
  429.     if @pattern_back
  430.       # 往返循环
  431.       if @anime_loop == 0
  432.         # 反向再生
  433.         if @reverse
  434.           @pattern += 1
  435.           if @pattern == @base_width - 1
  436.             @pattern_back = false
  437.             @anime_end = true
  438.           end
  439.         # 通常再生
  440.         else  
  441.           @pattern -= 1
  442.           if @pattern == 0
  443.             @pattern_back = false
  444.             @anime_end = true
  445.           end  
  446.         end  
  447.       # 单程或者是不循环时
  448.       else
  449.         @anime_end = true
  450.         if @anime_loop == 1
  451.           @pattern = 0 if !@reverse
  452.           @pattern = @base_width - 1 if @reverse
  453.           @pattern_back = false
  454.         end  
  455.       end  
  456.     # 推进动画      
  457.     else
  458.       if @reverse
  459.         @pattern -= 1
  460.         @pattern_back = true if @pattern == 0
  461.       else  
  462.         @pattern += 1
  463.         @pattern_back = true if @pattern == @base_width - 1
  464.       end  
  465.     end
  466.     # 初期化更新时间
  467.     @frame = @anime_speed
  468.     # 动画固定时,固定横矩形
  469.     return if @anime_freeze
  470.     # 设定转送处的矩形
  471.     return unless @anime_flug
  472.     @sx = @pattern * @width
  473.     @sy = @anime_kind * @height
  474.     self.src_rect.set(@sx, @sy, @width, @height)
  475.   end
  476.   #--------------------------------------------------------------------------
  477.   # ● 动画图像更新
  478.   #--------------------------------------------------------------------------
  479.   def update_target
  480.     # 目标确认
  481.     return if @battler.force_target == 0
  482.     # 单独处理中中止(全区域中自身被卷入时目标情报是不是)
  483.     return if @battler.individual
  484.     @target_battler = @battler.force_target[1]
  485.     @battler.force_target = 0
  486.   end  
  487.   #--------------------------------------------------------------------------
  488.   # ● 強制动作更新 action = [识别,复原,实行动作]
  489.   #--------------------------------------------------------------------------
  490.   def update_force_action
  491.     # 确认強制动作
  492.     action = @battler.force_action
  493.     return if action == 0
  494.     @battler.force_action = 0
  495.     # 主动中不能插入
  496.     return if @battler.active
  497.     # 击倒时就那样直接连接行动
  498.     return collapse_action if action[0] == "N01collapse"
  499.     # 单独时就那样直接连接
  500.     return start_one_action(action[2],action[1]) if action[0] == "单独"
  501.     # 通用作为动作对待
  502.     start_action(action[2])
  503.     # 有无坐标复原
  504.     return if action[1] == ""
  505.     # 完毕位置替换成重复动作
  506.     @action.delete("完毕")
  507.     @action.push(action[1])
  508.     @action.push("完毕")
  509.   end   
  510.   #--------------------------------------------------------------------------
  511.   # ● 坐标更新
  512.   #--------------------------------------------------------------------------
  513.   def update_move
  514.     # 补完加减速中距离的增减
  515.     if @move_speed_plus_x > 0
  516.       # 计算移动
  517.       @move_x += @moving_x
  518.       # 实行移动
  519.       @battler.move_x = @move_x
  520.       @move_speed_plus_x -= 1
  521.     elsif @move_speed_x > 0
  522.       # 加速时
  523.       if @move_boost_x != 0
  524.         @moving_x += @move_boost_x
  525.       end  
  526.       # 计算移动
  527.       @move_x += @moving_x
  528.       # 实行移动
  529.       @battler.move_x = @move_x
  530.       @move_speed_x -= 1
  531.     end
  532.     # 补完加减速中距离的增减
  533.     if @move_speed_plus_y > 0
  534.       # 计算移动
  535.       @move_y += @moving_y
  536.       # 实行移动
  537.       @battler.move_y = @move_y
  538.       @move_speed_plus_y -= 1
  539.     elsif @move_speed_y > 0
  540.       # 加速时
  541.       if @move_boost_y != 0
  542.         @moving_y += @move_boost_y
  543.       end  
  544.       # 计算移动
  545.       @move_y += @moving_y
  546.       # 实行移动
  547.       @battler.move_y = @move_y
  548.       @move_speed_y -= 1
  549.     end
  550.     # 跳跃上升
  551.     if @jump_up != 0
  552.       # 计算移动
  553.       @jump_plus += @jump_up
  554.       # 实行移动
  555.       @battler.jump = @jump_plus
  556.       @jump_up = @jump_up / 2
  557.       @jump_time -= 1
  558.       # 如果跳跃到了顶点时
  559.       if @jump_time == 0 or @jump_up == @jump_sign
  560.         @jump_down = @jump_up * 2 * @jump_sign * @jump_sign2
  561.         @jump_time_plus += @jump_time * 2
  562.         @jump_up = 0
  563.         return
  564.       end  
  565.     end  
  566.     # 跳跃下降
  567.     if @jump_down != 0
  568.       if @jump_time_plus != 0
  569.         @jump_time_plus -= 1
  570.       elsif @jump_down != @jump_size
  571.         # 计算移动
  572.         @jump_plus += @jump_down
  573.         # 实行移动
  574.         @battler.jump = @jump_plus
  575.         @jump_down = @jump_down * 2
  576.         if @jump_down == @jump_size
  577.           if @jump_flug
  578.             @jump_flug = false
  579.           else
  580.             # 计算移动
  581.             @jump_plus += @jump_down
  582.             # 实行移动
  583.             @battler.jump = @jump_plus
  584.             @jump_down = @jump_size = 0
  585.           end
  586.         end  
  587.       end
  588.     end
  589.     # 设定精灵的坐标
  590.     self.x = @battler.position_x
  591.     self.y = @battler.position_y
  592.     self.z = @battler.position_z
  593.   end
  594.   #--------------------------------------------------------------------------
  595.   # ● 影更新
  596.   #--------------------------------------------------------------------------
  597.   def update_shadow
  598.     @shadow.opacity = self.opacity
  599.     @shadow.x = @battler.position_x + @shadow_plus_x
  600.     @shadow.y = @battler.position_y + @shadow_plus_y - @jump_plus
  601.     @shadow.z = @battler.position_z - 4
  602.   end
  603.   #--------------------------------------------------------------------------
  604.   # ● 漂浮更新
  605.   #--------------------------------------------------------------------------
  606.   def update_float
  607.     @float_time -= 1
  608.     @jump_plus += @float_up
  609.     @battler.jump = @jump_plus
  610.   end   
  611.   #--------------------------------------------------------------------------
  612.   # ● 旋转更新
  613.   #--------------------------------------------------------------------------
  614.   def update_angle
  615.     # 实行旋转
  616.     @angle += @angling
  617.     self.angle = @angle
  618.     @angle_time -= 1
  619.     # 旋转时间结束时项目初始化
  620.     return @angle = 0 if @angle_time == 0
  621.     # 如果有复原标志时角度返回0
  622.     self.angle = 0 if @angle_reset
  623.   end  
  624.   #--------------------------------------------------------------------------
  625.   # ● 扩大缩小更新
  626.   #--------------------------------------------------------------------------
  627.   def update_zoom
  628.     # 实行扩大缩小
  629.     @zoom_x += @zooming_x
  630.     @zoom_y += @zooming_y
  631.     self.zoom_x = @zoom_x
  632.     self.zoom_y = @zoom_y
  633.     @zoom_time -= 1
  634.     # 扩大缩小时间结束时项目初始化
  635.     return if @zoom_time != 0
  636.     @zoom_x = @zoom_y = 0
  637.     self.oy = @height * 2 / 3
  638.     # 如果有复原标志时还原
  639.     self.zoom_x = self.zoom_y = 1 if @zoom_reset
  640.   end  
  641.   #--------------------------------------------------------------------------
  642.   # ● 残像更新
  643.   #--------------------------------------------------------------------------
  644.   def update_mirage
  645.     # 残像最大能显示3个、2格图片中更新
  646.     mirage(@mirage0) if @mirage_count == 1
  647.     mirage(@mirage1) if @mirage_count == 3
  648.     mirage(@mirage2) if @mirage_count == 5
  649.     @mirage_count += 1
  650.     @mirage_count = 0 if @mirage_count == 6
  651.   end
  652.   #--------------------------------------------------------------------------
  653.   # ● 图片更新
  654.   #--------------------------------------------------------------------------
  655.   def update_picture
  656.     @picture_time -= 1
  657.     @picture.x += @moving_pic_x
  658.     @picture.y += @moving_pic_y
  659.   end  
  660.   #--------------------------------------------------------------------------
  661.   # ● 飞出动画 更新
  662.   #--------------------------------------------------------------------------
  663.   def update_move_anime
  664.     @move_anime.update
  665.     @anime_moving = false if @move_anime.finish?
  666.     @move_anime.action_reset if @move_anime.finish?
  667.   end  
  668.   #--------------------------------------------------------------------------
  669.   # ● 崩坏效果的更新 ※再定义
  670.   #--------------------------------------------------------------------------
  671.   def update_collapse
  672.     normal_collapse if @collapse_type == 2
  673.     boss_collapse1 if @collapse_type == 3
  674.   end
  675.   #--------------------------------------------------------------------------
  676.   # ● 飞出动画更新 (图片动画)
  677.   #--------------------------------------------------------------------------
  678.   def update_balloon
  679.     @balloon_duration -= 1 if @balloon_duration > 0 && !@balloon_back
  680.     @balloon_duration += 1 if @balloon_back
  681.     if @balloon_duration == 64
  682.       @balloon_back = false
  683.       @balloon.visible = false
  684.     elsif @balloon_duration == 0
  685.       @balloon.visible = false if @balloon_loop == 0
  686.       @balloon_back = true if @balloon_loop == 1
  687.     end   
  688.     @balloon.x = self.x
  689.     @balloon.y = self.y
  690.     @balloon.z = 10
  691.     @balloon.opacity = self.opacity
  692.     sx = 7 * 32 if @balloon_duration < 12
  693.     sx = (7 - (@balloon_duration - 12) / 8) * 32 unless @balloon_duration < 12
  694.     @balloon.src_rect.set(sx, @balloon_id * 32, 32, 32)
  695.   end
  696.   #--------------------------------------------------------------------------
  697.   # ● 转送处bitmap的更新 ※再定义
  698.   #--------------------------------------------------------------------------
  699.   def update_battler_bitmap
  700.     if @battler.actor?
  701.       if @battler.character_name != @battler_name or @battler.battler_hue != @battler_hue
  702.         @battler_name = @battler.character_name
  703.         @battler_hue = @battler.battler_hue
  704.       end
  705.     else
  706.       if @battler.battler_name != @battler_name or @battler.battler_hue != @battler_hue
  707.         @battler_name = @battler.battler_name
  708.         @battler_hue = @battler.battler_hue
  709.       end
  710.       if [email protected]?
  711.         self.opacity = 0 if @effect_duration == 0 && @battler.collapse_type != 1
  712.       end  
  713.     end  
  714.   end
  715.   #--------------------------------------------------------------------------
  716.   # ● 实行动作
  717.   #--------------------------------------------------------------------------
  718.   def action
  719.     return if @active_action == nil
  720.     action = @active_action[0]
  721.     # 反转时
  722.     return mirroring if action == "反转"
  723.     # 旋转时   
  724.     return angling if action == "angle"
  725.     # 扩大缩小时  
  726.     return zooming if action == "zoom"
  727.     # 残像ON时
  728.     return mirage_on if action == "残像ON"
  729.     # 残像OFF时
  730.     return mirage_off if action == "残像OFF"
  731.     # 图片表示时
  732.     return picture if action == "pic"
  733.     # 图片消去时
  734.     return @picture.visible = false && @picture_time = 0 if action == "消去图片"
  735.     # 图片文件变更时  
  736.     return graphics_change if action == "change"
  737.     # 战斗动画表示时  
  738.     return battle_anime if action == "anime"
  739.     # 飞出动画表示时 (图片动画)
  740.     return balloon_anime if action == "balloon"
  741.     #  BGM/BGS/SE演奏时   
  742.     return sound if action == "sound"
  743.     # 游戏开关操作时  
  744.     return $game_switches[@active_action[1]] = @active_action[2] if action == "switch"
  745.     # 游戏变量操作时   
  746.     return variable if action == "variable"
  747.     # 二刀限定时
  748.     return two_swords if action == "二刀限定"
  749.     # 非二刀限定时
  750.     return non_two_swords if action == "非二刀限定"
  751.     # 动作条件时
  752.     return necessary if action == "nece"
  753.     # 技能连发时   
  754.     return derivating if action == "der"
  755.     # 单独处理开始时
  756.     return individual_action if action == "个别处理开始"
  757.     # 单独处理完毕时
  758.     return individual_action_end if action == "个别处理完毕"
  759.     # 待机不能移动場合
  760.     return non_repeat if action == "待机不能移动"
  761.     # 变更初期位置时
  762.     return @battler.change_base_position(self.x, self.y) if action == "变更初期位置"
  763.     # 解除变更初期位置
  764.     return @battler.base_position if action == "变更初期位置解除"
  765.     # 变更目标时   
  766.     return change_target if action == "target"
  767.     # 目标的击倒许可
  768.     return send_action(action) if action == "击倒许可"
  769.     # 解除主动
  770.     return send_action(action) if action == "解除主动"
  771.     # 赋予状态时  
  772.     return state_on if action == "sta+"
  773.     # 解除状态时  
  774.     return state_off if action == "sta-"
  775.     # 变更游戏整体的行进速度时
  776.     return Graphics.frame_rate = @active_action[1] if action == "fps"
  777.     # 漂浮时  
  778.     return floating if action == "float"
  779.     # 脚本操作时   
  780.     return eval(@active_action[1]) if action == "script"
  781.     # 强制动作时  
  782.     return force_action if @active_action.size == 4
  783.     # 坐标初始化时  
  784.     return reseting if @active_action.size == 5
  785.     # 移动时
  786.     return moving if @active_action.size == 7
  787.     # 角色动画时
  788.     return battler_anime if @active_action.size == 9
  789.     # 动画飛ばし时
  790.     return moving_anime if @active_action.size == 11
  791.     # 完毕时
  792.     return anime_finish if action == "完毕"
  793.   end
  794.   #--------------------------------------------------------------------------
  795.   # ● 实行反转
  796.   #--------------------------------------------------------------------------
  797.   def mirroring  
  798.     # 如果已经反转就还原
  799.     if self.mirror
  800.       self.mirror = false
  801.       # 武器动画也反映
  802.       @weapon_R.mirroring if @anime_flug
  803.     else
  804.       self.mirror = true
  805.       # 武器动画也反映
  806.       @weapon_R.mirroring if @anime_flug
  807.     end
  808.   end  
  809.   #--------------------------------------------------------------------------
  810.   # ● 实行旋转
  811.   #--------------------------------------------------------------------------
  812.   def angling  
  813.     # 初期化跳跃
  814.     jump_reset
  815.     # 情报确认
  816.     @angle_time = @active_action[1]
  817.     start_angle = @active_action[2]
  818.     end_angle = @active_action[3]
  819.     @angle_reset = @active_action[4]
  820.     # 袭击時时逆转
  821.     start_angle *= -1 if $back_attack
  822.     end_angle *= -1 if $back_attack
  823.     # 敌方被逆转
  824.     start_angle *= -1 if @battler.is_a?(Game_Enemy)
  825.     end_angle *= -1 if @battler.is_a?(Game_Enemy)
  826.     # 时间要是0以下时立即到最后角度
  827.     if @angle_time <= 0
  828.       self.angle = end_angle
  829.       return  @angle_time = 0
  830.     end  
  831.     # 从旋转时间计算一格相当于的角度
  832.     @angling = (end_angle - start_angle) / @angle_time
  833.     # 不能整除的剩余到初期角度
  834.     @angle = (end_angle - start_angle) % @angle_time + start_angle
  835.   end
  836.   #--------------------------------------------------------------------------
  837.   # ● 实行放大缩小
  838.   #--------------------------------------------------------------------------
  839.   def zooming  
  840.     # 初期化跳跃
  841.     jump_reset
  842.     # 情报确认
  843.     @zoom_time = @active_action[1]
  844.     zoom_x = @active_action[2] - 1
  845.     zoom_y = @active_action[3] - 1
  846.     @zoom_reset = @active_action[4]
  847.     @zoom_x = @zoom_y = 1
  848.     # 时间是0以下时跳过
  849.     return @zoom_time = 0 if @zoom_time <= 0
  850.     # 从放大时间中计算一格相当于的放大率
  851.     @zooming_x = zoom_x / @zoom_time
  852.     @zooming_y = zoom_y / @zoom_time
  853.   end  
  854.   #--------------------------------------------------------------------------
  855.   # ● 残像開始
  856.   #--------------------------------------------------------------------------
  857.   def mirage_on
  858.     # 战斗不能時不表现残像
  859.     return if @battler.dead?
  860.     @mirage0 = Sprite.new(self.viewport)
  861.     @mirage1 = Sprite.new(self.viewport)
  862.     @mirage2 = Sprite.new(self.viewport)
  863.     @mirage_flug = true
  864.     @mirage_count = 0
  865.   end  
  866.   #--------------------------------------------------------------------------
  867.   # ● 残像表示
  868.   #--------------------------------------------------------------------------
  869.   def mirage(body)
  870.     body.bitmap = self.bitmap.dup
  871.     body.x = self.x
  872.     body.y = self.y
  873.     body.ox = self.ox
  874.     body.oy = self.oy
  875.     body.z = self.z
  876.     body.mirror = self.mirror
  877.     body.angle = @angle
  878.     body.opacity = 160
  879.     body.zoom_x = self.zoom_x
  880.     body.zoom_y = self.zoom_y   
  881.     body.src_rect.set(@sx, @sy, @width, @height) if @anime_flug
  882.     body.src_rect.set(0, 0, @width, @height) unless @anime_flug
  883.   end   
  884.   #--------------------------------------------------------------------------
  885.   # ● 残像完毕
  886.   #--------------------------------------------------------------------------
  887.   def mirage_off
  888.     @mirage_flug = false
  889.     @mirage0.dispose if @mirage0 != nil
  890.     @mirage1.dispose if @mirage1 != nil
  891.     @mirage2.dispose if @mirage2 != nil
  892.   end   
  893.   #--------------------------------------------------------------------------
  894.   # ● 图片表示
  895.   #--------------------------------------------------------------------------
  896.   def picture
  897.     # 确认移动开始位置
  898.     pic_x = @active_action[1]
  899.     pic_y = @active_action[2]
  900.     # 确认移动完毕位置
  901.     pic_end_x = @active_action[3]
  902.     pic_end_y = @active_action[4]
  903.     @picture_time = @active_action[5]
  904.     # 用时间除、计算一个相当于的移动速度
  905.     @moving_pic_x = (pic_end_x - pic_x)/ @picture_time
  906.     @moving_pic_y = (pic_end_y - pic_y)/ @picture_time
  907.     # 不能整除时到最初上加算
  908.     plus_x = (pic_end_x - pic_x)% @picture_time
  909.     plus_y = (pic_end_y - pic_y)% @picture_time
  910.     # 图片表示
  911.     @picture.bitmap = Cache.picture(@active_action[7])
  912.     @picture.x = pic_x + plus_x
  913.     @picture.y = pic_y + plus_y
  914.     # Z坐标调整
  915.     @picture.z = 1
  916.     @picture.z = 1000 if @active_action[6]
  917.     @picture.visible = true
  918.   end
  919.   #--------------------------------------------------------------------------
  920.   # ● (修改)图像文件变更
  921.   #--------------------------------------------------------------------------
  922.   def graphics_change  
  923.     if @battler.is_a?(Game_Enemy)
  924.       @battler_name = @active_action[2]
  925.       self.bitmap = Cache.battler(@battler.original_name + @battler_name ,@battler_hue)
  926.     else  
  927.       # 主人公限定
  928.       # 图像变更
  929.       @battler_name = @active_action[2]
  930.       # 是否使用歩行图像中改变转送处的矩形
  931.       self.bitmap = Cache.character(@battler_name) if N01::WALK_ANIME
  932.       self.bitmap = Cache.character(@battler_name + "_1") unless N01::WALK_ANIME
  933.       # 获取转送处的矩形
  934.       @width = self.bitmap.width / @base_width
  935.       @height = self.bitmap.height / @base_height
  936.       # 如果想让战斗后的人物图也显示为变更
  937.       @before_graphic = @battler.character_name if @active_action[1]
  938.       @battler.graphic_change(@active_action[2])
  939.     end
  940.   end  
  941.   #--------------------------------------------------------------------------
  942.   # ● 显示战斗动画 [判別,ID,对象,反转,等待,二刀标志]
  943.   #--------------------------------------------------------------------------
  944.   def battle_anime
  945.     # 取消敌人的二刀标志动画处理
  946.     return if @active_action[5] && [email protected]?
  947.     # 不是二刀的角色,取消二刀标志动画处
  948.     return if @active_action[5] && @battler.weapons[1] == nil
  949.     # 如果二刀为右手(上面设置过)无武器
  950.     if @battler.actor?
  951.       return if !@active_action[5] && @battler.weapons[0] == nil && @battler.weapons[1] != nil
  952.     end
  953.     anime_id = @active_action[1]
  954.     mirror = @active_action[3]
  955.     # 偷袭时动画画像被反转
  956.     if $back_attack
  957.       mirror = true if @active_action[3] == false
  958.       mirror = false if @active_action[3]
  959.     end
  960.     # 武器和技能动画时
  961.     if anime_id < 0
  962.       # 用行动的种类分歧动画处
  963.       if @battler.action.skill? && anime_id != -2
  964.         anime_id = @battler.action.skill.animation_id
  965.       elsif @battler.action.item? && anime_id != -2
  966.         anime_id = @battler.action.item.animation_id
  967.       else
  968.         # 没有武器时使用空手动画
  969.         anime_id = N01::NO_WEAPON
  970.         if @battler.actor?
  971.           weapon_id = @battler.weapon_id
  972.           anime_id = $data_weapons[weapon_id].animation_id if weapon_id != 0
  973.           # 二刀动画时
  974.           anime_id = @battler.atk_animation_id2 if @active_action[5]
  975.         else
  976.           weapon_id = @battler.weapon
  977.           anime_id = $data_weapons[weapon_id].animation_id if weapon_id != 0
  978.         end
  979.       end
  980.       # 等待设定
  981.       @wait = $data_animations[anime_id].frame_max * 4 if $data_animations[anime_id] != nil && @active_action[4]
  982.       waitflug = true
  983.       # 显示伤害动画时、为了先计算出伤害計
  984.       damage_action = [anime_id, mirror, true]
  985.       return @battler.play = ["对象动画",damage_action] if @battler.active
  986.     end
  987.     # 实行动画
  988.     if @active_action[2] == 0 && $data_animations[anime_id] != nil
  989.       @battler.animation_id = anime_id
  990.       @battler.animation_mirror = mirror
  991.     elsif $data_animations[anime_id] != nil
  992.       for target in @target_battler
  993.         target.animation_id = anime_id
  994.         target.animation_mirror = mirror
  995.       end   
  996.     end
  997.     # 等待设定
  998.     @wait = $data_animations[anime_id].frame_max * 4 if $data_animations[anime_id] != nil && @active_action[4] && !waitflug
  999.   end
  1000.   #--------------------------------------------------------------------------
  1001.   # ● 显示飞出动画 (图片动画)
  1002.   #--------------------------------------------------------------------------
  1003.   def balloon_anime
  1004.     return if self.opacity == 0
  1005.     if @balloon == nil
  1006.       @balloon = Sprite.new
  1007.       @balloon.bitmap = Cache.system("Balloon")
  1008.       @balloon.ox = @width / 16
  1009.       @balloon.oy = @balloon.height / 10 + @height / 3
  1010.     end
  1011.     @balloon_id = @active_action[1]
  1012.     @balloon_loop = @active_action[2]
  1013.     @balloon_duration = 64
  1014.     @balloon_back = false
  1015.     update_balloon
  1016.     @balloon.visible = true
  1017.   end  
  1018.   #--------------------------------------------------------------------------
  1019.   # ● BGM/BGS/SE演奏
  1020.   #--------------------------------------------------------------------------
  1021.   def sound   
  1022.     # 获取情报
  1023.     pitch = @active_action[2]
  1024.     vol =  @active_action[3]
  1025.     name = @active_action[4]
  1026.     # 实行
  1027.     case @active_action[1]
  1028.     when "se"
  1029.       Audio.se_play("Audio/SE/" + name, vol, pitch)
  1030.     when "bgm"
  1031.       # 没有指定名字时、不改变现在的BGM
  1032.       if @active_action[4] == ""
  1033.         now_bgm = RPG::BGM.last
  1034.         name = now_bgm.name
  1035.       end
  1036.       Audio.bgm_play("Audio/BGM/" + name, vol, pitch)
  1037.     when "bgs"
  1038.       # 没有指定名字时、不改变现在的BGS
  1039.       if @active_action[4] == ""
  1040.         now_bgs = RPG::BGS.last
  1041.         name = now_bgs.name
  1042.       end
  1043.       Audio.bgs_play("Audio/BGS/" + name, vol, pitch)
  1044.     end
  1045.   end
  1046.   #--------------------------------------------------------------------------
  1047.   # ● 游戏变量操作
  1048.   #--------------------------------------------------------------------------
  1049.   def variable
  1050.     # 检查操作
  1051.     operand = @active_action[3]
  1052.     # 变数操作的分歧
  1053.     case @active_action[2]
  1054.     when 0 # 代入
  1055.       $game_variables[@active_action[1]] = operand
  1056.     when 1 # 加算
  1057.       $game_variables[@active_action[1]] += operand
  1058.     when 2 # 減算
  1059.       $game_variables[@active_action[1]] -= operand
  1060.     when 3 # 乗算
  1061.       $game_variables[@active_action[1]] *= operand
  1062.     when 4 # 除算
  1063.       $game_variables[@active_action[1]] /= operand
  1064.     when 5 # 剰余
  1065.       $game_variables[@active_action[1]] %= operand
  1066.     end
  1067.   end  
  1068.   #--------------------------------------------------------------------------
  1069.   # ● 二刀限定
  1070.   #--------------------------------------------------------------------------
  1071.   def two_swords
  1072.     # 敌方不被处理
  1073.     return @action.shift unless @battler.actor?
  1074.     # 左手(下部显示)没有武器就会消除下面
  1075.     return @action.shift if @battler.weapons[1] == nil
  1076.     # 从行动配类的前面移动
  1077.     active = @action.shift
  1078.     # 确定现在的动作
  1079.     @active_action = N01::ANIME[active]
  1080.     # 等待设定
  1081.     @wait = active.to_i if @active_action == nil
  1082.     # 单独动作开始
  1083.     action
  1084.   end
  1085.   #--------------------------------------------------------------------------
  1086.   # ● 非二刀限定
  1087.   #--------------------------------------------------------------------------
  1088.   def non_two_swords
  1089.     # 敌方不被处理
  1090.     return unless @battler.actor?
  1091.     # 左手(下部显示)没有武器就会消除下面
  1092.     return @action.shift if @battler.weapons[1] != nil
  1093.     # 从行动配类的前面移动
  1094.     active = @action.shift
  1095.     # 确定现在的动作
  1096.     @active_action = N01::ANIME[active]
  1097.     # 等待设定
  1098.     @wait = active.to_i if @active_action == nil
  1099.     # 单独动作开始
  1100.     action
  1101.   end
  1102.   #--------------------------------------------------------------------------
  1103.   # ● 动作条件
  1104.   #--------------------------------------------------------------------------
  1105.   def necessary
  1106.     nece1 = @active_action[3]
  1107.     nece2 = @active_action[4]
  1108.     # 目标确认
  1109.     case @active_action[1]
  1110.     #0自身 1目标 2敌全体 3我方全体
  1111.     when 0
  1112.       target = [$game_party.members[@battler.index]] if @battler.is_a?(Game_Actor)
  1113.       target = [$game_troop.members[@battler.index]] if @battler.is_a?(Game_Enemy)
  1114.     when 1
  1115.       target = @target_battler
  1116.     when 2
  1117.       target = $game_troop.members
  1118.     when 3
  1119.       target = $game_party.members
  1120.     end
  1121.     # 目标为空出时看作失败
  1122.     return start_action(@battler.recover_action) if target.size == 0
  1123.     # 内容确认
  1124.     case @active_action[2]
  1125.     # 指定了状态ID时
  1126.     when 0
  1127.       # 补充正号为「正在此状态」、负号为「不在此状态」的条件
  1128.       state_on = true if nece2 > 0
  1129.       # 获取条件人数
  1130.       state_member = nece2.abs
  1131.       # 0从队友数中获取
  1132.       if nece2 == 0
  1133.         state_member = $game_party.members.size if @battler.is_a?(Game_Actor)
  1134.         state_member = $game_troop.members.size if @battler.is_a?(Game_Enemy)
  1135.       end  
  1136.       # 目标的状态确认后清点人数
  1137.       for member in target
  1138.         state_member -= 1 if member.state?(nece1)
  1139.       end
  1140.       # 条件全部满足后执行动作
  1141.       if state_member == 0 && state_on
  1142.         return
  1143.       elsif state_member == nece2.abs
  1144.         return if state_on == nil
  1145.       end  
  1146.     # 指定了参数时
  1147.     when 1  
  1148.       # 补充了正号为「数值以上」、负号为「数值以下」的条件
  1149.       num_over = true if nece2 > 0
  1150.       # 参照数値
  1151.       num = 0
  1152.       # 确认目标的参数
  1153.       for member in target
  1154.         # 参照参数来分歧
  1155.         case  nece1
  1156.         when 0 # 现HP
  1157.           num += member.hp
  1158.         when 1 # 现MP
  1159.           num += member.mp
  1160.         when 2 # 攻击力
  1161.           num += member.atk
  1162.         when 3 # 防御力
  1163.           num += member.def
  1164.         when 4 # 精神力
  1165.           num += member.spi
  1166.         when 5 # 敏捷性
  1167.           num += member.agi
  1168.         end
  1169.       end
  1170.       # 平均
  1171.       num = num / target.size
  1172.       # 条件全部满足后执行动作
  1173.       if num > nece2.abs && num_over
  1174.         return
  1175.       elsif num < nece2.abs
  1176.         return if num_over == nil
  1177.       end
  1178.     # 指定了开关时
  1179.     when 2
  1180.       # 条件全部满足后执行动作
  1181.       if $game_switches[nece1]
  1182.         # 补充为true时「开关ON」、false时「开关OFF」的条件
  1183.         return if nece2
  1184.       # 开关为OFF时与ON时是相反的  
  1185.       else
  1186.         return unless nece2
  1187.       end  
  1188.     # 指定了变量时
  1189.     when 3
  1190.       #补充为正号时「数值以上」、负号时「数値以下」的条件
  1191.       if nece2 > 0
  1192.         return if $game_variables[nece1] > nece2
  1193.       else
  1194.         return unless $game_variables[nece1] > nece2.abs
  1195.       end
  1196.     # 指定了习得技能时
  1197.     when 4
  1198.       # 获取技能条件人数
  1199.       skill_member = nece2.abs
  1200.       for member in target
  1201.         skill_member -= 1 if member.skill_learn?(nece1)
  1202.         # 条件确认
  1203.         return if skill_member == 0
  1204.       end  
  1205.     end
  1206.     # 条件没有被满足时动作中断
  1207.     return @action = ["完毕"] if @non_repeat
  1208.     # 不让防御中看起来不自然,坐标不被还原
  1209.     action = @battler.recover_action
  1210.     action = @battler.defence if @battler.guarding?
  1211.     return start_action(action)
  1212.   end  
  1213.   #--------------------------------------------------------------------------
  1214.   # ● 技能连发
  1215.   #--------------------------------------------------------------------------
  1216.   def derivating
  1217.     # 如果让没学的的技能不能连发时
  1218.     return if !@active_action[2] && [email protected]_id_learn?(@active_action[3])
  1219.     # 确率分岐
  1220.     return if rand(100) > @active_action[1]
  1221.     # 连发成功
  1222.     @battler.derivation = @active_action[3]
  1223.     # 之后的动作被中断
  1224.     @action = ["完毕"]
  1225.   end
  1226.   #--------------------------------------------------------------------------
  1227.   # ● 个别处理开始
  1228.   #--------------------------------------------------------------------------
  1229.   def individual_action
  1230.     # 反复标志ON
  1231.     @battler.individual = true
  1232.     # 保持反复动作
  1233.     @individual_act = @action.dup
  1234.     # 保持目标、一个一个的发出行动目标
  1235.     send_action(["个别处理"])
  1236.     @individual_targets = @target_battler.dup
  1237.     @target_battler = [@individual_targets.shift]
  1238.   end
  1239.   #--------------------------------------------------------------------------
  1240.   # ● 个别处理完毕
  1241.   #--------------------------------------------------------------------------
  1242.   def individual_action_end
  1243.     # 目标没有残留时行动完毕
  1244.     return @battler.individual = false if @individual_targets.size == 0
  1245.     @action = @individual_act.dup
  1246.     @target_battler = [@individual_targets.shift]
  1247.   end  
  1248.   #--------------------------------------------------------------------------
  1249.   # ● 待机不能移动
  1250.   #--------------------------------------------------------------------------
  1251.   def non_repeat
  1252.     @repeat_action = []
  1253.     @non_repeat = true
  1254.     anime_finish
  1255.   end  
  1256.   #--------------------------------------------------------------------------
  1257.   # ● 目标变更 action = [判別, 变更对象, 变更处]
  1258.   #--------------------------------------------------------------------------
  1259.   def change_target
  1260.     # 还原自身变更了的目标
  1261.     return @target_battler = @now_targets.dup if @active_action[2] == 3
  1262.     # 发送目标情报
  1263.     target = [@battler] if @active_action[2] == 0
  1264.     target = @target_battler.dup if @active_action[2] != 0
  1265.     # 自身的目标发送到对方时、记录现在的
  1266.     if @active_action[2] == 2
  1267.       @now_targets = @target_battler.dup
  1268.       @target_battler = []
  1269.     end  
  1270.     # 发送目标指定目录时
  1271.     if @active_action[1] >= 1000
  1272.       members = $game_party.members if @battler.actor?
  1273.       members = $game_troop.members unless @battler.actor?
  1274.       index = @active_action[1] - 1000
  1275.       if index < members.size
  1276.         if members[index].exist? && @battler.index != index
  1277.           # 目标变更
  1278.           members[index].force_target = ["N01target_change", target]
  1279.           # 自身的目标发送到相手时
  1280.           @target_battler = [members[index]] if @active_action[2] == 2
  1281.           change = true
  1282.         else
  1283.           for member in members
  1284.             next if @battler.index == member.index
  1285.             next unless member.exist?
  1286.             member.force_target = ["N01target_change", target]
  1287.             @target_battler = [member] if @active_action[2] == 2
  1288.             break change = true
  1289.           end
  1290.         end
  1291.       end
  1292.     # 指定了发送目标的状态ID时
  1293.     elsif @active_action[1] > 0
  1294.       for member in $game_party.members + $game_troop.members
  1295.         if member.state?(@active_action[1])
  1296.           member.force_target = ["N01target_change", target]
  1297.           @target_battler.push(member) if @active_action[2] == 2
  1298.           change = true
  1299.         end  
  1300.       end  
  1301.     # 指定了发送目标学的的技能时
  1302.     elsif @active_action[1] < 0
  1303.       skill_id = @active_action[1].abs
  1304.       for actor in $game_party.members
  1305.         if actor.skill_id_learn?(skill_id)
  1306.           actor.force_target = ["N01target_change", target]
  1307.           @target_battler.push(target) if @active_action[2] == 2
  1308.           change = true
  1309.         end  
  1310.       end
  1311.     # 发送目标是目标时
  1312.     else
  1313.       for member in @target_battler
  1314.         member.force_target = ["N01target_change", target]
  1315.         @target_battler.push(member) if @active_action[2] == 2
  1316.         change = true
  1317.       end
  1318.     end
  1319.     # 条件没有被满足时动作中断
  1320.     return if change
  1321.     return @action = ["完毕"] if @non_repeat
  1322.     return start_action(@battler.recover_action)
  1323.   end   
  1324.   #--------------------------------------------------------------------------
  1325.   # ● 状态付与
  1326.   #--------------------------------------------------------------------------
  1327.   def state_on  
  1328.     state_id = @active_action[2]
  1329.     # 分歧对象
  1330.     case @active_action[1]
  1331.     when 0
  1332.       @battler.add_state(state_id) if rand(100) < @battler.state_probability(state_id)
  1333.     when 1
  1334.       if @target_battler != nil
  1335.         for target in @target_battler
  1336.           target.add_state(state_id) if rand(100) < target.state_probability(state_id)
  1337.         end
  1338.       end
  1339.     when 2
  1340.       for target in $game_troop.members
  1341.         target.add_state(state_id) if rand(100) < target.state_probability(state_id)
  1342.       end
  1343.     when 3
  1344.       for target in $game_party.members
  1345.         target.add_state(state_id) if rand(100) < target.state_probability(state_id)
  1346.       end
  1347.     when 4
  1348.       for target in $game_party.members
  1349.         if target.index != @battler.index
  1350.           target.add_state(state_id) if rand(100) < target.state_probability(state_id)
  1351.         end  
  1352.       end
  1353.     end
  1354.   end
  1355.   #--------------------------------------------------------------------------
  1356.   # ● 状态解除
  1357.   #--------------------------------------------------------------------------
  1358.   def state_off  
  1359.     state_id = @active_action[2]
  1360.     # 分歧对象
  1361.     case @active_action[1]
  1362.     when 0
  1363.       @battler.remove_state(state_id)
  1364.     when 1
  1365.       if @target_battler != nil
  1366.         for target in @target_battler
  1367.           target.remove_state(state_id)
  1368.         end
  1369.       end
  1370.     when 2
  1371.       for target in $game_troop.members
  1372.         target.remove_state(state_id)
  1373.       end
  1374.     when 3
  1375.       for target in $game_party.members
  1376.         target.remove_state(state_id)
  1377.       end
  1378.     when 4
  1379.       for target in $game_party.members
  1380.         if target.index != @battler.index
  1381.           target.remove_state(state_id)
  1382.         end  
  1383.       end
  1384.     end
  1385.   end  
  1386.   #--------------------------------------------------------------------------
  1387.   # ● 浮遊实行
  1388.   #--------------------------------------------------------------------------
  1389.   def floating  
  1390.     # 初期化跳跃
  1391.     jump_reset
  1392.     # 情报确认
  1393.     @jump_plus = @active_action[1]
  1394.     float_end = @active_action[2]
  1395.     @float_time = @active_action[3]
  1396.     # 计算一格相当的移动高度
  1397.     @float_up = (float_end - @jump_plus)/ @float_time
  1398.     # 漂浮结束前不执行下个动作
  1399.     @wait = @float_time
  1400.     # 反映漂浮动画的设定
  1401.     if @anime_flug
  1402.       move_anime = N01::ANIME[@active_action[4]]
  1403.       # 没有指定图片时跳过处理
  1404.       if move_anime != nil
  1405.         # 写下现在的动作
  1406.         @active_action = move_anime
  1407.         # 角色动画开始
  1408.         battler_anime
  1409.         # 漂浮完毕时即动画完毕
  1410.         @anime_end = true
  1411.       end
  1412.     end
  1413.     # 漂浮到初期高度
  1414.     @battler.jump = @jump_plus
  1415.   end      
  1416.   #--------------------------------------------------------------------------
  1417.   # ● 强制动作
  1418.   #--------------------------------------------------------------------------
  1419.   def force_action
  1420.     # 动作是单独还是通用的判别
  1421.     kind = @active_action[0]
  1422.     # 确认有无复原
  1423.     rebirth = @active_action[2]
  1424.     # 获取强制动作的内容
  1425.     play = @active_action[3]
  1426.     # 归纳上面3个情报
  1427.     action = [kind,rebirth,play]
  1428.     # 目标指定目录时
  1429.     if @active_action[1] >= 1000
  1430.       members = $game_party.members if @battler.actor?
  1431.       members = $game_troop.members unless @battler.actor?
  1432.       index = @active_action[1] - 1000
  1433.       if index < members.size
  1434.         if members[index].exist? && @battler.index != index
  1435.           # 交付角色情报
  1436.           return members[index].force_action = action
  1437.         else
  1438.           for target in members
  1439.             next if @battler.index == target.index
  1440.             next unless target.exist?
  1441.             force = true
  1442.             break target.force_action = action
  1443.           end
  1444.         end
  1445.       end
  1446.       # 条件没有被满足时动作中断
  1447.       return if force
  1448.       return @action = ["完毕"] if @non_repeat
  1449.       return start_action(@battler.recover_action)
  1450.     # 指定目标时  
  1451.     elsif @active_action[1] == 0
  1452.       for target in @target_battler
  1453.         target.force_action = action if target != nil
  1454.       end
  1455.     # 指定了状态ID时  
  1456.     elsif @active_action[1] > 0
  1457.       for target in $game_party.members + $game_troop.members
  1458.         target.force_action = action if target.state?(@active_action[1])
  1459.       end
  1460.     # 指定了习得技能时  
  1461.     elsif @active_action[1] < 0  
  1462.       # 敌方不被处理
  1463.       return if @battler.is_a?(Game_Enemy)
  1464.       for actor in $game_party.members
  1465.         # 自身除外
  1466.         unless actor.id == @battler.id
  1467.           # 交付角色情报
  1468.           actor.force_action = action if actor.skill_id_learn?(@active_action[1].abs)
  1469.         end
  1470.       end
  1471.     end
  1472.   end
  1473.   #--------------------------------------------------------------------------
  1474.   # ● 实行坐标初始化
  1475.   #--------------------------------------------------------------------------
  1476.   def reseting
  1477.     # 初期化跳跃
  1478.     jump_reset
  1479.     # 回転を元に戻す
  1480.     self.angle = 0
  1481.     # 情报确认
  1482.     @distanse_x   = @move_x * -1
  1483.     @distanse_y   = @move_y * -1
  1484.     @move_speed_x = @active_action[1]
  1485.     @move_speed_y = @move_speed_x
  1486.     @move_boost_x = @active_action[2]
  1487.     @move_boost_y = @move_boost_x
  1488.     @jump         = @active_action[3]
  1489.     # 计算移动
  1490.     move_distance
  1491.     # 反映移动画面的设定
  1492.     if @anime_flug
  1493.       move_anime = N01::ANIME[@active_action[4]]
  1494.       # 没有指定图片时跳过处理
  1495.       if move_anime != nil
  1496.         # 写下现在的动作
  1497.         @active_action = move_anime
  1498.         # 角色动画开始
  1499.         battler_anime
  1500.       end
  1501.       # 移动完毕时即动画也完毕
  1502.       @anime_end = true
  1503.     end
  1504.   end
  1505.   #--------------------------------------------------------------------------
  1506.   # ● 计算移动
  1507.   #--------------------------------------------------------------------------
  1508.   def moving  
  1509.     # 初期化跳跃
  1510.     jump_reset
  1511.     # 方便调出X轴的移动
  1512.     xx = @active_action[1]
  1513.     # 袭击时X轴逆转
  1514.     xx *= -1 if $back_attack
  1515.     # 确认移动目标的目标
  1516.     case @active_action[0]
  1517.     when 0 # 自身
  1518.       @distanse_x = xx
  1519.       @distanse_y = @active_action[2]
  1520.     when 1 # 目标
  1521.       # 目标没有决定时、变换成自身
  1522.       if @target_battler == nil
  1523.         @distanse_x = xx
  1524.         @distanse_y = @active_action[2]
  1525.       else
  1526.         # 一个一个的确认目标对象
  1527.         target_x = 0
  1528.         target_y = 0
  1529.         time = 0
  1530.         for i in 0...@target_battler.size
  1531.           if @target_battler[i] != nil
  1532.             time += 1
  1533.             target_x += @target_battler[i].position_x
  1534.             target_y += @target_battler[i].position_y
  1535.           end  
  1536.         end
  1537.         # 目标空出时、变换成自身
  1538.         if time == 0
  1539.           @distanse_x = xx
  1540.           @distanse_y = @active_action[2]
  1541.         else  
  1542.           # 计算出复数目标的中心位置
  1543.           target_x = target_x / time
  1544.           target_y = target_y / time
  1545.           # 算出最终的移动距离
  1546.           @distanse_y = target_y - self.y + @active_action[2]
  1547.           # X坐标是角色和敌人的逆向计算
  1548.           if @battler.is_a?(Game_Actor)
  1549.             @distanse_x = target_x - self.x + xx
  1550.           else
  1551.             @distanse_x = self.x - target_x + xx
  1552.           end  
  1553.         end  
  1554.       end  
  1555.     when 2 # 画面
  1556.       # X坐标是角色和敌人的逆向计算
  1557.       if @battler.is_a?(Game_Actor)
  1558.         @distanse_x = xx - self.x
  1559.         @distanse_x = Graphics.width + xx - self.x if $back_attack
  1560.       else
  1561.         @distanse_x = self.x - xx
  1562.         @distanse_x = self.x - (Graphics.width + xx) if $back_attack
  1563.       end
  1564.       @distanse_y = @active_action[2] - self.y
  1565.     when 3 # 初期位置
  1566.       # X坐标是角色和敌人的逆向计算
  1567.       if @battler.is_a?(Game_Actor)
  1568.         @distanse_x = xx + @battler.base_position_x - self.x
  1569.       else
  1570.         @distanse_x = xx + self.x - @battler.base_position_x
  1571.       end
  1572.       @distanse_y = @active_action[2] + @battler.base_position_y - @battler.position_y
  1573.     end
  1574.     @move_speed_x = @active_action[3]
  1575.     @move_speed_y = @active_action[3]
  1576.     @move_boost_x = @active_action[4]
  1577.     @move_boost_y = @active_action[4]
  1578.     @jump         = @active_action[5]
  1579.     @jump_plus = 0
  1580.     # 计算移动
  1581.     move_distance
  1582.     # 反映移动画面的设定
  1583.     if @anime_flug
  1584.       move_anime = N01::ANIME[@active_action[6]]
  1585.       # 没有指定图片时跳过处理
  1586.       if move_anime != nil
  1587.         # 写下现在的动作
  1588.         @active_action = move_anime
  1589.         # 角色动画开始
  1590.         battler_anime
  1591.       end  
  1592.       # 移动完毕时即动画也完毕
  1593.       @anime_end = true
  1594.     end
  1595.   end
  1596.   #--------------------------------------------------------------------------
  1597.   # ● 计算移动
  1598.   #--------------------------------------------------------------------------
  1599.   def move_distance
  1600.     # 速度为0时、停留在那个地方
  1601.     if @move_speed_x == 0
  1602.       @moving_x = 0
  1603.       @moving_y = 0
  1604.     else  
  1605.       # 计算一格相当的移动距离
  1606.       @moving_x = @distanse_x / @move_speed_x
  1607.       @moving_y = @distanse_y / @move_speed_y
  1608.       # 剩余的距离在这时移动消化
  1609.       over_x = @distanse_x % @move_speed_x
  1610.       over_y = @distanse_y % @move_speed_y
  1611.       @move_x += over_x
  1612.       @move_y += over_y
  1613.       @battler.move_x = @move_x
  1614.       @battler.move_y = @move_y
  1615.       @distanse_x -= over_x
  1616.       @distanse_y -= over_y
  1617.     end  
  1618.     # 判定是否移动
  1619.     if @distanse_x == 0
  1620.       @move_speed_x = 0
  1621.     end
  1622.     if @distanse_y == 0
  1623.       @move_speed_y = 0
  1624.     end
  1625.     # X座標计算移动
  1626.     # 根据加减速修正移动格数
  1627.     boost_x = @moving_x
  1628.     move_x = 0
  1629.     # 加速时
  1630.     if @move_boost_x > 0 && @distanse_x != 0
  1631.       # 加减速的正负调整成左右移动
  1632.       if @distanse_x == 0
  1633.         @move_boost_x = 0
  1634.       elsif @distanse_x < 0
  1635.         @move_boost_x *= -1
  1636.       end
  1637.       # 事先计算距离的变化
  1638.       for i in 0...@move_speed_x
  1639.         boost_x += @move_boost_x
  1640.         move_x += boost_x
  1641.         # 记录超过距离
  1642.         over_distance = @distanse_x - move_x
  1643.         # 记录右移动时距离超越的时第几格
  1644.         if @distanse_x > 0 && over_distance < 0
  1645.           @move_speed_x = i
  1646.           break
  1647.         # 记录左移动时距离超越的时第几格
  1648.         elsif @distanse_x < 0 && over_distance > 0
  1649.           @move_speed_x = i
  1650.           break
  1651.         end
  1652.       end
  1653.       # 将超越距离还原到前一次
  1654.       before = over_distance + boost_x
  1655.       # 剩余的距离加算到等速移动的格数中
  1656.       @move_speed_plus_x = (before / @moving_x).abs
  1657.       # 即使这样剩余的距离也在这时移动消化
  1658.       @move_x += before % @moving_x
  1659.       @battler.move_x = @move_x
  1660.     # 减速时  
  1661.     elsif @move_boost_x < 0 && @distanse_x != 0
  1662.       # 加减速的正负调整成左右移动
  1663.       if @distanse_x == 0
  1664.         @move_boost_x = 0
  1665.       elsif @distanse_x < 0
  1666.         @move_boost_x *= -1
  1667.       end
  1668.       # 事先计算距离的变化
  1669.       for i in 0...@move_speed_x
  1670.         boost_x += @move_boost_x
  1671.         move_x += boost_x
  1672.         # 记录不足的距离
  1673.         lost_distance = @distanse_x - move_x
  1674.         before = lost_distance
  1675.         # 记录右移动速度到0时是第几格
  1676.         if @distanse_x > 0 && boost_x < 0
  1677.           @move_speed_x = i - 1
  1678.           # 不足的距离还原到前一次
  1679.           before = lost_distance + boost_x
  1680.           break
  1681.         # 记录左移动速度到0时是第几格
  1682.         elsif @distanse_x < 0 && boost_x > 0
  1683.           @move_speed_x= i - 1
  1684.           # 不足的距离还原到前一次
  1685.           before = lost_distance + boost_x
  1686.           break
  1687.         end
  1688.       end
  1689.       # 不足的距离加算到等速移动的格数中
  1690.       plus = before / @moving_x
  1691.       @move_speed_plus_x = plus.abs
  1692.       # 即使这样剩余的距离也在这时移动消化
  1693.       @move_x += before % @moving_x
  1694.       @battler.move_x = @move_x
  1695.     end
  1696.     # Y座標计算移动
  1697.     # 根据加减速修正移动格数
  1698.     boost_y = @moving_y
  1699.     move_y = 0
  1700.     # 加速时
  1701.     if @move_boost_y > 0 && @distanse_y != 0
  1702.       # 加减速的正负调整成左右移动
  1703.       if @distanse_y == 0
  1704.         @move_boost_y = 0
  1705.       elsif @distanse_y < 0
  1706.         @move_boost_y *= -1
  1707.       end
  1708.       # 事先计算距离的变化
  1709.       for i in 0...@move_speed_y
  1710.         boost_y += @move_boost_y
  1711.         move_y += boost_y
  1712.         # 记录超过距离
  1713.         over_distance = @distanse_y - move_y
  1714.         # 记录右移动时距离超越的时第几格
  1715.         if @distanse_y > 0 && over_distance < 0
  1716.           @move_speed_y = i
  1717.           break
  1718.         # 记录左移动时距离超越的时第几格
  1719.         elsif @distanse_y < 0 && over_distance > 0
  1720.           @move_speed_y = i
  1721.           break
  1722.         end
  1723.       end
  1724.       # 将超越距离还原到前一次
  1725.       before = over_distance + boost_y
  1726.       # 剩余的距离加算到等速移动的格数中
  1727.       @move_speed_plus_y = (before / @moving_y).abs
  1728.       # 即使这样剩余的距离也在这时移动消化
  1729.       @move_y += before % @moving_y
  1730.       @battler.move_y = @move_y
  1731.     # 减速时  
  1732.     elsif @move_boost_y < 0 && @distanse_y != 0
  1733.       # 加减速的正负调整成左右移动
  1734.       if @distanse_y == 0
  1735.         @move_boost_y = 0
  1736.       elsif @distanse_y < 0
  1737.         @move_boost_y *= -1
  1738.       end
  1739.       # 事先计算距离的变化
  1740.       for i in 0...@move_speed_y
  1741.         boost_y += @move_boost_y
  1742.         move_y += boost_y
  1743.         # 记录不足的距离
  1744.         lost_distance = @distanse_y - move_y
  1745.         before = lost_distance
  1746.         # 记录右移动速度到0时是第几格
  1747.         if @distanse_y > 0 && boost_y < 0
  1748.           @move_speed_y = i
  1749.           # 不足的距离还原到前一次
  1750.           before = lost_distance + boost_y
  1751.           break
  1752.         # 记录左移动速度到0时是第几格
  1753.         elsif @distanse_y < 0 && boost_y > 0
  1754.           @move_speed_y = i
  1755.           # 不足的距离还原到前一次
  1756.           before = lost_distance + boost_y
  1757.           break
  1758.         end
  1759.       end
  1760.       # 不足的距离加算到等速移动的格数中
  1761.       plus = before / @moving_y
  1762.       @move_speed_plus_y = plus.abs
  1763.       # 即使这样剩余的距离也在这时移动消化
  1764.       @move_y += before % @moving_y
  1765.       @battler.move_y = @move_y
  1766.     end
  1767.     # 算出移动完毕的时间
  1768.     x = @move_speed_plus_x + @move_speed_x
  1769.     y = @move_speed_plus_y + @move_speed_y
  1770.     if x > y
  1771.       end_time = x
  1772.     else
  1773.       end_time = y
  1774.     end
  1775.     # 移动完毕前不进行下个动作
  1776.     @wait = end_time
  1777.     # 计算跳跃
  1778.     if @jump != 0
  1779.       # 没有移动只跳跃时
  1780.       if @wait == 0
  1781.         # 时间记入
  1782.         @wait = @active_action[3]
  1783.       end  
  1784.       # 从移动完毕时间算出跳跃时间
  1785.       @jump_time = @wait / 2
  1786.       # 不能插入时的剩余时间
  1787.       @jump_time_plus = @wait % 2
  1788.       # 判别跳跃是正还是负
  1789.       @jump_sign = 0
  1790.       @jump_sign2 = 0
  1791.       if @jump < 0
  1792.         @jump_sign = -1
  1793.         @jump_sign2 = 1
  1794.         @jump = @jump * -1
  1795.       else
  1796.         @jump_sign = 1
  1797.         @jump_sign2 = -1
  1798.       end
  1799.       # 决定跳跃初始速度
  1800.       @jump_up = 2 ** @jump * @jump_sign
  1801.       # 略微调整条约时间的尾数
  1802.       if @jump_time == 0
  1803.         @jump_up = 0
  1804.       elsif @jump_time != 1
  1805.         @jump_size = @jump_up * @jump_sign * @jump_sign2
  1806.       else
  1807.         @jump_size = @jump_up * 2 * @jump_sign * @jump_sign2
  1808.         @jump_flug = true
  1809.       end  
  1810.     end
  1811.   end
  1812.   #--------------------------------------------------------------------------
  1813.   # ● 角色动画开始
  1814.   #--------------------------------------------------------------------------
  1815.   def battler_anime
  1816.     # 反映动画设定
  1817.     @anime_kind  = @active_action[1]
  1818.     @anime_speed = @active_action[2]
  1819.     @anime_loop  = @active_action[3]
  1820.     # 如果有等待时间时加算
  1821.     @unloop_wait = @active_action[4]
  1822.     @anime_end = true
  1823.     @reverse = false
  1824.     # 只有有武器动作时进行更新
  1825.     if @weapon_R != nil && @active_action[8] != ""
  1826.       # 确认武器的设定
  1827.       weapon_kind = N01::ANIME[@active_action[8]]
  1828.       # 敌方和不使用二刀角色的取消二刀标志
  1829.       two_swords_flug = weapon_kind[11]
  1830.       return if two_swords_flug && [email protected]?
  1831.       return if two_swords_flug && @battler.weapons[1] == nil && @battler.actor?
  1832.       if @battler.actor? && @battler.weapons[0] == nil && !two_swords_flug
  1833.         @weapon_R.action_reset
  1834.       elsif @battler.actor? && @battler.weapons[1] == nil && two_swords_flug
  1835.         @weapon_R.action_reset
  1836.       elsif [email protected]? && @battler.weapon == 0
  1837.         @weapon_R.action_reset
  1838.       else
  1839.         # 初期化
  1840.         @weapon_R.action_reset
  1841.         # 动画图像是固定时的获取武器位置
  1842.         if @active_action[5] != -1
  1843.           @weapon_R.freeze(@active_action[5])
  1844.         end
  1845.         # 设定武器画像
  1846.         @weapon_R.weapon_graphics unless two_swords_flug
  1847.         @weapon_R.weapon_graphics(true) if two_swords_flug
  1848.         # 交付武器动作
  1849.         @weapon_R.weapon_action(@active_action[8],@anime_loop)
  1850.         @weapon_action = true
  1851.         # 更新最初的武器动作
  1852.         @weapon_R.action
  1853.       end
  1854.     elsif @weapon_R != nil
  1855.       @weapon_R.action_reset
  1856.     end  
  1857.     @anime_end = false
  1858.     # 动画图片是固定时
  1859.     if @active_action[5] != -1 && @active_action[5] != -2
  1860.       # 标志ON
  1861.       @anime_freeze = true
  1862.       # 看作动画是通常的完毕了
  1863.       @anime_end = true
  1864.     # 单程逆转再生时
  1865.     elsif @active_action[5] == -2
  1866.       @anime_freeze = false
  1867.       # 标志ON
  1868.       @reverse = true
  1869.       # 更新最初的动画图像
  1870.       @pattern = @base_width - 1
  1871.       # 只有在有武器动画时更新
  1872.       if @weapon_action && @weapon_R != nil
  1873.         @weapon_R.action
  1874.         @weapon_R.update
  1875.       end
  1876.     # 更新通常动画时  
  1877.     else  
  1878.       @anime_freeze = false
  1879.       # 更新最初的动画图像
  1880.       @pattern = 0
  1881.       # 只有在有武器动画时更新
  1882.       if @weapon_action && @weapon_R != nil
  1883.         @weapon_R.action
  1884.         @weapon_R.update
  1885.       end
  1886.     end  
  1887.     @pattern_back = false
  1888.     @frame = @anime_speed
  1889.     # Z座標設定
  1890.     @battler.move_z = @active_action[6]
  1891.     # 是否有影
  1892.     if @shadow != nil
  1893.       @shadow.visible = true if @active_action[7]
  1894.       @shadow.visible = false unless @active_action[7]
  1895.     end
  1896.     # 分期从编号读取文件名
  1897.     if @active_action[0] == 0
  1898.       file_name = @battler_name
  1899.     else
  1900.       file_name = @battler_name + "_" + @active_action[0].to_s
  1901.     end  
  1902.     # 无动画角色时处理完毕
  1903.     return unless @anime_flug
  1904.     self.bitmap = Cache.character(file_name)
  1905.     # 设定转送处的矩形
  1906.     @sx = @pattern * @width
  1907.     @sy = @anime_kind * @height
  1908.     @sx = @active_action[5] * @width if @anime_freeze
  1909.     self.src_rect.set(@sx, @sy, @width, @height)
  1910.   end
  1911.   #--------------------------------------------------------------------------
  1912.   # ● 动画飞出
  1913.   #--------------------------------------------------------------------------
  1914.   def moving_anime
  1915.     # 如果前个飞出动画还有残留时初期化
  1916.     @move_anime.action_reset if @anime_moving
  1917.     @anime_moving = true
  1918.     # 袭击中动画、武器画像反转
  1919.     mirror = false
  1920.     mirror = true if $back_attack
  1921.     # 动画ID
  1922.     id = @active_action[1]
  1923.     # 対象
  1924.     target = @active_action[2]
  1925.     x = y = mem = 0
  1926.     # 对象为单体时
  1927.     if target == 0
  1928.       # 目标没有决定时、变换成自身
  1929.       if @target_battler == nil
  1930.         x = self.x
  1931.         y = self.y
  1932.       else
  1933.         # 没有决定目标时、变换为自身
  1934.         if @target_battler[0] == nil
  1935.           x = self.x
  1936.           y = self.y
  1937.         else  
  1938.           # 目标空出时、变换为自身
  1939.           x = @target_battler[0].position_x
  1940.           y = @target_battler[0].position_y
  1941.         end  
  1942.       end  
  1943.     # 对象在敌方中心时  
  1944.     elsif target == 1
  1945.       # 自身是主人公时计算敌方的中心
  1946.       if @battler.is_a?(Game_Actor)
  1947.         for target in $game_troop.members
  1948.           x += target.position_x
  1949.           y += target.position_y
  1950.           mem += 1
  1951.         end
  1952.         x = x / mem
  1953.         y = y / mem
  1954.       # 自身是敌方时计算主人公的中心
  1955.       else
  1956.         for target in $game_party.members
  1957.           x += target.position_x
  1958.           y += target.position_y
  1959.           mem += 1
  1960.         end
  1961.         x = x / mem
  1962.         y = y / mem
  1963.       end
  1964.     # 对象在我方中心时  
  1965.     elsif target == 2
  1966.       # 自身是主人公时计算主人公的中心
  1967.       if @battler.is_a?(Game_Actor)
  1968.         for target in $game_party.members
  1969.           x += target.position_x
  1970.           y += target.position_y
  1971.           mem += 1
  1972.         end
  1973.         x = x / mem
  1974.         y = y / mem
  1975.       # 自身是敌方时计算敌方的中心
  1976.       else
  1977.         for target in $game_troop.members
  1978.           x += target.position_x
  1979.           y += target.position_y
  1980.           mem += 1
  1981.         end
  1982.         x = x / mem
  1983.         y = y / mem
  1984.       end
  1985.     # 对象是自身时  
  1986.     else
  1987.       x = self.x
  1988.       y = self.y
  1989.     end  
  1990.     # 开始位置的略微调整
  1991.     plus_x = @active_action[6]
  1992.     plus_y = @active_action[7]
  1993.     # 敌方是X轴逆转
  1994.     plus_x *= -1 if @battler.is_a?(Game_Enemy)
  1995.     # 算出最终的移动距离
  1996.     distanse_x = x - self.x - plus_x
  1997.     distanse_y = y - self.y - plus_y
  1998.     # 飞出类型
  1999.     type = @active_action[3]
  2000.     # 速度
  2001.     speed = @active_action[4]
  2002.     # 轨道
  2003.     orbit = @active_action[5]
  2004.     # 如果自身在开始位置时
  2005.     if @active_action[8] == 0
  2006.       @move_anime.base_x = self.x + plus_x
  2007.       @move_anime.base_y = self.y + plus_y
  2008.     # 对象在开始位置时
  2009.     elsif @active_action[8] == 1
  2010.       @move_anime.base_x = x + plus_x
  2011.       @move_anime.base_y = y + plus_y
  2012.       # 把距离作为反面
  2013.       distanse_y = distanse_y * -1
  2014.       distanse_x = distanse_x * -1
  2015.     # 如果不能动
  2016.     else
  2017.       @move_anime.base_x = x
  2018.       @move_anime.base_y = y
  2019.       distanse_x = distanse_y = 0
  2020.     end
  2021.     # 无武器动作时不显示武器
  2022.     if @active_action[10] == ""
  2023.       weapon = ""  
  2024.     # 无动画的敌方不显示武器
  2025.     elsif @anime_flug != true
  2026.       weapon = ""  
  2027.     # 武器动作时
  2028.     else
  2029.       # 确认是否指定了飞出武器图片
  2030.       if @battler.is_a?(Game_Actor)
  2031.         battler = $game_party.members[@battler.index]
  2032.         weapon_id = battler.weapon_id
  2033.       else  
  2034.         battler = $game_troop.members[@battler.index]
  2035.         weapon_id = battler.weapon
  2036.       end  
  2037.       # 判别是武器动作情报取得还是使用武器画像
  2038.       weapon_act = N01::ANIME[@active_action[10]].dup if @active_action[10] != ""
  2039.       # 如果利用武器画像时并不是空手
  2040.       if weapon_id != 0 && weapon_act.size == 3
  2041.         weapon_file = $data_weapons[weapon_id].flying_graphic
  2042.         # 如果没有指定别的画像时获取既存的武
  2043.         if weapon_file == ""
  2044.           weapon_name = $data_weapons[weapon_id].graphic
  2045.           icon_weapon = false
  2046.           # 然后没有指定时使用ICON图片
  2047.           if weapon_name == ""
  2048.             weapon_name = $data_weapons[weapon_id].icon_index
  2049.             icon_weapon = true
  2050.           end  
  2051.         # 指定时获取那个图片名  
  2052.         else
  2053.           icon_weapon = false
  2054.           weapon_name = weapon_file
  2055.         end
  2056.         # 武器动作情报取得
  2057.         weapon = @active_action[10]
  2058.       # 指定了武器画像时不显示空手
  2059.       elsif weapon_act.size == 3
  2060.         weapon = ""
  2061.       # 使用技能画像
  2062.       elsif weapon_act != nil && @battler.action.skill != nil
  2063.         icon_weapon = false
  2064.         weapon_name = $data_skills[@battler.action.skill.id].flying_graphic
  2065.         weapon = @active_action[10]
  2066.       end
  2067.     end
  2068.     # 决定Z坐标
  2069.     @move_anime.z = 1
  2070.     @move_anime.z = 1000 if @active_action[9]
  2071.     # 已上的全部情报都已飞出动画送到精灵
  2072.     @move_anime.anime_action(id,mirror,distanse_x,distanse_y,type,speed,orbit,weapon,weapon_name,icon_weapon)
  2073.   end  
  2074.   #--------------------------------------------------------------------------
  2075.   # ● 动作完毕
  2076.   #--------------------------------------------------------------------------
  2077.   def anime_finish
  2078.     # 单独处理完毕省略时做反复
  2079.     return individual_action_end if @individual_targets.size != 0
  2080.     # 主动向角色归纳动作情报
  2081.     send_action(@active_action[0]) if @battler.active
  2082.     # 如果有残像时开放
  2083.     mirage_off if @mirage_flug
  2084.     # 重复待机动作
  2085.     start_action(@repeat_action) unless @non_repeat
  2086.   end   
  2087.   #--------------------------------------------------------------------------
  2088.   # ● 击倒动作
  2089.   #--------------------------------------------------------------------------
  2090.   def collapse_action
  2091.     @non_repeat = true
  2092.     @effect_type = COLLAPSE
  2093.     @collapse_type = @battler.collapse_type unless @battler.actor?
  2094.     @battler_visible = false unless @battler.actor?
  2095.     @effect_duration = N01::COLLAPSE_WAIT + 48 if @collapse_type == 2
  2096.     @effect_duration = 401 if @collapse_type == 3
  2097.   end  
  2098.   #--------------------------------------------------------------------------
  2099.   # ● 普通击倒
  2100.   #--------------------------------------------------------------------------
  2101.   def normal_collapse
  2102.     if @effect_duration == 47
  2103.       Sound.play_enemy_collapse
  2104.       self.blend_type = 1
  2105.       self.color.set(255, 128, 128, 128)
  2106.     end
  2107.     self.opacity = 256 - (48 - @effect_duration) * 6 if @effect_duration <= 47
  2108.   end  
  2109.   #--------------------------------------------------------------------------
  2110.   # ● BOSS击倒
  2111.   #--------------------------------------------------------------------------
  2112.   def boss_collapse1
  2113.     if @effect_duration == 320
  2114.       Audio.se_play("Audio/SE/Absorb1", 100, 80)
  2115.       self.flash(Color.new(255, 255, 255), 60)
  2116.       viewport.flash(Color.new(255, 255, 255), 20)
  2117.     end
  2118.     if @effect_duration == 280
  2119.       Audio.se_play("Audio/SE/Absorb1", 100, 80)
  2120.       self.flash(Color.new(255, 255, 255), 60)
  2121.       viewport.flash(Color.new(255, 255, 255), 20)
  2122.     end
  2123.     if @effect_duration == 220
  2124.       Audio.se_play("Audio/SE/Earth4", 100, 80)
  2125.       reset
  2126.       self.blend_type = 1
  2127.       self.color.set(255, 128, 128, 128)
  2128.       self.wave_amp = 6
  2129.     end
  2130.     if @effect_duration < 220
  2131.       self.src_rect.set(0, @effect_duration / 2 - 110, @width, @height)
  2132.       self.x += 8 if @effect_duration % 4 == 0
  2133.       self.x -= 8 if @effect_duration % 4 == 2
  2134.       self.wave_amp += 1 if @effect_duration % 10 == 0
  2135.       self.opacity = @effect_duration
  2136.       return if @effect_duration < 50
  2137.       Audio.se_play("Audio/SE/Earth4", 100, 50) if @effect_duration % 50 == 0
  2138.     end
  2139.   end
  2140. end
复制代码

脚本3:
  1. #==============================================================================
  2. # ■ Scene_Battle Ver3.3
  3. #------------------------------------------------------------------------------
  4. #  战斗画面的处理的类。
  5. #==============================================================================
  6. class Scene_Battle < Scene_Base
  7.   #--------------------------------------------------------------------------
  8.   # ● 完毕处理
  9.   #--------------------------------------------------------------------------
  10.   alias terminate_n01 terminate
  11.   def terminate
  12.     terminate_n01
  13.     # 返还二刀流的替换处理
  14.     for member in $game_party.members
  15.       if member.two_swords_change
  16.         member.change_equip_by_id(1, member.weapon_id)
  17.         member.change_equip_by_id(0, 0)
  18.         member.two_swords_change = false
  19.       end  
  20.     end
  21.   end
  22.   #--------------------------------------------------------------------------
  23.   # ● 战斗开始的处理
  24.   #--------------------------------------------------------------------------
  25.   alias process_battle_start_n01 process_battle_start
  26.   def process_battle_start
  27.     process_battle_start_n01
  28.     # 如果二刀流让左(下部显示)手武器像右(上部表示)手武器那样没有持有时
  29.     # 在这里强制替换他
  30.     for member in $game_party.members
  31.       if member.weapons[0] == nil and member.weapons[1] != nil
  32.         member.change_equip_by_id(0, member.armor1_id)
  33.         member.change_equip_by_id(1, 0)
  34.         member.two_swords_change = true
  35.       end
  36.     end  
  37.   end
  38.   #--------------------------------------------------------------------------
  39.   # ● 更新
  40.   #--------------------------------------------------------------------------
  41.   alias update_n01 update
  42.   def update
  43.     reset_stand_by_action
  44.     super
  45.     update_n01
  46.   end
  47.   #--------------------------------------------------------------------------
  48.   # ● 根据事件操作的HP变动再设置角色动画
  49.   #--------------------------------------------------------------------------
  50.   def reset_stand_by_action
  51.     if $game_temp.status_window_refresh
  52.       $game_temp.status_window_refresh = false
  53.       for member in $game_party.members + $game_troop.members
  54.         @spriteset.set_stand_by_action(member.actor?, member.index)
  55.         # 确认自动复活
  56.         resurrection(member) if member.hp == 0
  57.       end  
  58.       @status_window.refresh
  59.     end
  60.   end  
  61.   #--------------------------------------------------------------------------
  62.   # ● 战败的处理
  63.   #--------------------------------------------------------------------------
  64.   alias process_defeat_n01 process_defeat
  65.   def process_defeat
  66.     for member in $game_party.members
  67.       @spriteset.set_stand_by_action(member.actor?, member.index)
  68.     end
  69.     process_defeat_n01
  70.   end
  71.   #--------------------------------------------------------------------------
  72.   # ● 帮助窗口的显示
  73.   #--------------------------------------------------------------------------
  74.   def pop_help(obj)
  75.     return if obj.extension.include?("不显示HELP")
  76.     @help_window2 = Window_Battle_Help.new
  77.     @help_window2.set_text(obj.name, 1)
  78.     @help_window2.visible = true
  79.   end
  80.   #--------------------------------------------------------------------------
  81.   # ● 显示情报窗口的移动
  82.   #--------------------------------------------------------------------------
  83.   def move1_info_viewport
  84.     @info_viewport.ox = 128
  85.     loop do
  86.       update_basic
  87.       @info_viewport.ox -= 8
  88.       @party_command_window.x -= 8
  89.       @actor_command_window.x += 8
  90.       break if @info_viewport.ox == 64
  91.     end  
  92.   end
  93.   #--------------------------------------------------------------------------
  94.   # ● 显示情报窗口的移动
  95.   #--------------------------------------------------------------------------
  96.   def move2_info_viewport
  97.     @info_viewport.ox = 64
  98.     loop do
  99.       update_basic
  100.       @info_viewport.ox -= 8
  101.       @party_command_window.x += 8
  102.       @actor_command_window.x -= 8
  103.       break if @info_viewport.ox == 0
  104.     end  
  105.   end
  106.   #--------------------------------------------------------------------------
  107.   # ● 到下个主人公的指令选择
  108.   #--------------------------------------------------------------------------
  109.   alias next_actor_n01 next_actor
  110.   def next_actor
  111.     # 只有能动的角色显示指令动作
  112.     if @active_battler != nil && @active_battler.inputable? && @active_battler.actor?
  113.       @spriteset.set_action(true, @actor_index,@active_battler.command_a)
  114.     end
  115.     # 最后的角色时、动作结束前等待
  116.     @wait_count = 32 if @actor_index == $game_party.members.size-1
  117.     next_actor_n01
  118.     # 只有能动的角色现实指令动作
  119.     if @active_battler != nil && @active_battler.inputable? && @active_battler.actor?
  120.       @spriteset.set_action(true, @actor_index,@active_battler.command_b)
  121.     end
  122.   end
  123.   #--------------------------------------------------------------------------
  124.   # ● 到前一个角色的指令选择
  125.   #--------------------------------------------------------------------------
  126.   alias prior_actor_n01 prior_actor
  127.   def prior_actor
  128.     # 只有能动的角色显示指令动作
  129.     if @active_battler != nil && @active_battler.inputable? && @active_battler.actor?
  130.       @active_battler.action.clear
  131.       @spriteset.set_action(true, @actor_index,@active_battler.command_a)
  132.     end
  133.     prior_actor_n01
  134.     # 只有能动的角色显示指令动作
  135.     if @active_battler != nil && @active_battler.inputable? && @active_battler.actor?
  136.       @active_battler.action.clear
  137.       @spriteset.set_action(true, @actor_index,@active_battler.command_b)
  138.     end
  139.   end  
  140.   #--------------------------------------------------------------------------
  141.   # ● 目标选择的开始  ※再定义
  142.   #--------------------------------------------------------------------------
  143.   def start_target_enemy_selection
  144.     start_target_selection
  145.   end
  146.   #--------------------------------------------------------------------------
  147.   # ● 目标选择的开始  ※再定义
  148.   #--------------------------------------------------------------------------
  149.   def start_target_actor_selection
  150.     start_target_selection(true)
  151.   end
  152.   #--------------------------------------------------------------------------
  153.   # ● 目标选择的开始
  154.   #--------------------------------------------------------------------------
  155.   def start_target_selection(actor = false)
  156.     members = $game_party.members if actor
  157.     members = $game_troop.members unless actor
  158.     # 光标精灵的作成
  159.     @cursor = Sprite.new
  160.     @cursor.bitmap = Cache.character("Cursor")
  161.     @cursor.src_rect.set(0, 0, 32, 32)
  162.     @cursor_flame = 0
  163.     @cursor.x = -200
  164.     @cursor.y = -200
  165.     @cursor.ox = @cursor.width
  166.     @cursor.oy = @cursor.height
  167.     # 作成显示目标名的帮助窗口
  168.     @help_window.visible = false if @help_window != nil
  169.     @help_window2 = Window_Battle_Help.new #改改改改改#
  170.     @help_window2.set_text("", 1) #改改改改改#
  171.     # 消除不要的窗口
  172.     @actor_command_window.active = false
  173.     @skill_window.visible = false if @skill_window != nil
  174.     @item_window.visible = false if @item_window != nil
  175.     # 存在的目标为最底号码的对象也想最初那样
  176.     @index = 0
  177.     @max_index = members.size - 1
  178.     # 主人公为站都不能者也可以作为目标来与敌方区分
  179.     unless actor
  180.       members.size.times do
  181.         break if members[@index].exist?
  182.         @index += 1
  183.       end
  184.     end  
  185.     @help_window2.set_text(members[@index].name, 1)
  186.     select_member(actor)
  187.   end
  188.   #--------------------------------------------------------------------------
  189.   # ● 目标选择
  190.   #--------------------------------------------------------------------------
  191.   def select_member(actor = false)
  192.     members = $game_party.members if actor
  193.     members = $game_troop.members unless actor
  194.     loop do
  195.       update_basic
  196.       @cursor_flame = 0 if @cursor_flame == 30
  197.       @cursor.src_rect.set(0,  0, 32, 32) if @cursor_flame == 29
  198.       @cursor.src_rect.set(0, 32, 32, 32) if @cursor_flame == 15
  199.       point = @spriteset.set_cursor(actor, @index)
  200.       @cursor.x = point[0]
  201.       @cursor.y = point[1]
  202.       @cursor_flame += 1
  203.       if Input.trigger?(Input::B)
  204.         @item_window.active = true if @item_window != nil
  205.         Sound.play_cancel
  206.         end_target_selection
  207.         break
  208.       elsif Input.trigger?(Input::C)
  209.         Sound.play_decision
  210.         @active_battler.action.target_index = @index
  211.         end_target_selection
  212.         end_skill_selection
  213.         end_item_selection
  214.         next_actor
  215.         break
  216.       end
  217.       if Input.repeat?(Input::LEFT)
  218.         if actor
  219.           cursor_down(members, actor) if $back_attack
  220.           cursor_up(members, actor) unless $back_attack
  221.         else
  222.           cursor_up(members, actor) if $back_attack
  223.           cursor_down(members, actor) unless $back_attack
  224.         end  
  225.       end
  226.       if Input.repeat?(Input::RIGHT)
  227.         if actor
  228.           cursor_up(members, actor) if $back_attack
  229.           cursor_down(members, actor) unless $back_attack
  230.         else
  231.           cursor_down(members, actor) if $back_attack
  232.           cursor_up(members, actor) unless $back_attack
  233.         end
  234.       end
  235.       cursor_up(members, actor) if Input.repeat?(Input::UP)
  236.       cursor_down(members, actor) if Input.repeat?(Input::DOWN)
  237.     end
  238.   end
  239.   #--------------------------------------------------------------------------
  240.   # ● 向前移动光标
  241.   #--------------------------------------------------------------------------
  242.   def cursor_up(members, actor)
  243.     Sound.play_cursor
  244.     members.size.times do
  245.       @index += members.size - 1
  246.       @index %= members.size
  247.       break if actor
  248.       break if members[@index].exist?
  249.     end
  250.     @help_window2.set_text(members[@index].name, 1)
  251.   end
  252.   #--------------------------------------------------------------------------
  253.   # ● 向后移动光标
  254.   #--------------------------------------------------------------------------
  255.   def cursor_down(members, actor)
  256.     Sound.play_cursor
  257.     members.size.times do
  258.       @index += 1
  259.       @index %= members.size
  260.       break if actor
  261.       break if members[@index].exist? && !actor
  262.     end
  263.     @help_window2.set_text(members[@index].name, 1)
  264.   end
  265.   #--------------------------------------------------------------------------
  266.   # ● 目标选择的完毕
  267.   #--------------------------------------------------------------------------
  268.   def end_target_selection
  269.     @actor_command_window.active = true if @actor_command_window.index == 0
  270.     @skill_window.visible = true if @skill_window != nil
  271.     @item_window.visible = true if @item_window != nil
  272.     @cursor.dispose
  273.     @cursor = nil
  274.     if @help_window2 != nil
  275.       @help_window2.dispose
  276.       @help_window2 = nil
  277.     end
  278.     @help_window.visible = true if @help_window != nil
  279.   end
  280.   #--------------------------------------------------------------------------
  281.   # ● 逃走的处理  ※再定义
  282.   #--------------------------------------------------------------------------
  283.   def process_escape
  284.     @info_viewport.visible = false
  285.     @message_window.visible = true
  286.     text = sprintf(Vocab::EscapeStart, $game_party.name)
  287.     $game_message.texts.push(text)
  288.     if $game_troop.preemptive
  289.       success = true
  290.     else
  291.       success = (rand(100) < @escape_ratio)
  292.     end
  293.     Sound.play_escape
  294.     # 不能动的主人公除外逃走成功动作
  295.     if success
  296.       for actor in $game_party.members
  297.         unless actor.restriction >= 4
  298.           @spriteset.set_action(true, actor.index,actor.run_success)
  299.         end
  300.       end  
  301.       wait_for_message
  302.       battle_end(1)
  303.     # 不能动主人公除外逃走失败动作
  304.     else
  305.       for actor in $game_party.members
  306.         unless actor.restriction >= 4
  307.           @spriteset.set_action(true, actor.index,actor.run_ng)
  308.         end
  309.       end
  310.       @escape_ratio += 10
  311.       $game_message.texts.push('\.' + Vocab::EscapeFailure)
  312.       wait_for_message
  313.       $game_party.clear_actions
  314.       start_main
  315.     end
  316.   end  
  317.   #--------------------------------------------------------------------------
  318.   # ● 胜利的处理
  319.   #--------------------------------------------------------------------------
  320.   alias process_victory_n01 process_victory
  321.   def process_victory
  322.     @status_window.visible = true
  323.     @message_window.visible = false
  324.     # BOSS击倒为等待加长
  325.     for enemy in $game_troop.members
  326.       break boss_wait = true if enemy.collapse_type == 3
  327.     end
  328.     wait(440) if boss_wait
  329.     wait(N01::WIN_WAIT) unless boss_wait
  330.     # 不能动的主人公除外胜利动作
  331.     for actor in $game_party.members
  332.       unless actor.restriction >= 4
  333.         @spriteset.set_action(true, actor.index,actor.win)
  334.       end
  335.     end
  336.     process_victory_n01
  337.   end
  338.   #--------------------------------------------------------------------------
  339.   # ● 战斗处理的实行开始  ※再定义
  340.   #--------------------------------------------------------------------------
  341.   def start_main
  342.     $game_troop.increase_turn
  343.     @info_viewport.visible = true
  344.     @info_viewport.ox = 0
  345.     @party_command_window.active = false
  346.     @actor_command_window.active = false
  347.     @status_window.index = @actor_index = -1
  348.     @active_battler = nil
  349.     @message_window.clear
  350.     $game_troop.make_actions
  351.     make_action_orders
  352.     # 情报表示窗口的移动
  353.     move1_info_viewport
  354.     # 作成显示技能名的帮助窗口
  355.     @help_window2 = Window_Battle_Help.new
  356.     @help_window2.visible = false
  357.     process_battle_event
  358.   end
  359.   #--------------------------------------------------------------------------
  360.   # ● 战斗事件的处理  ※再定义
  361.   #--------------------------------------------------------------------------
  362.   def process_battle_event
  363.     loop do
  364.       return if judge_win_loss
  365.       return if $game_temp.next_scene != nil
  366.       $game_troop.interpreter.update
  367.       $game_troop.setup_battle_event
  368.       @message_window.update
  369.       if $game_message.visible
  370.         @message_window.visible = true
  371.         @status_window.visible = false
  372.       end
  373.       wait_for_message
  374.       @message_window.visible = false
  375.       @status_window.visible = true
  376.       if $game_troop.forcing_battler != nil
  377.         process_action
  378.       end
  379.       return unless $game_troop.interpreter.running?
  380.       update_basic
  381.     end
  382.   end
  383.   #--------------------------------------------------------------------------
  384.   # ● 作成行动顺序
  385.   #--------------------------------------------------------------------------
  386.   alias make_action_orders_n01 make_action_orders
  387.   def make_action_orders
  388.     make_action_orders_n01
  389.     # 确认敌方的行动回数
  390.     for enemy in $game_troop.members
  391.       enemy.act_time = 0
  392.       if enemy.action_time[0] != 1
  393.         action_time = 0
  394.         # 获得确认的回数
  395.         for i in 1...enemy.action_time[0]
  396.           action_time += 1 if rand(100) < enemy.action_time[1]
  397.         end
  398.         enemy.act_time = action_time
  399.         action_time.times do
  400.           enemy_order_time(enemy)
  401.           action_time -= 1
  402.           break if action_time == 0
  403.         end  
  404.         enemy.adj_speed = nil
  405.       end
  406.     end
  407.   end
  408.   #--------------------------------------------------------------------------
  409.   # ● 作成敌方的行动回数
  410.   #--------------------------------------------------------------------------
  411.   def enemy_order_time(enemy)
  412.     enemy.make_action_speed2(enemy.action_time[2])
  413.     select_time = 0
  414.     for member in @action_battlers
  415.       select_time += 1
  416.       break @action_battlers.push(enemy) if member.action.speed < enemy.adj_speed
  417.       break @action_battlers.push(enemy) if select_time == @action_battlers.size
  418.     end
  419.   end
  420.   #--------------------------------------------------------------------------
  421.   # ● 战斗行动的实行
  422.   #--------------------------------------------------------------------------
  423.   alias execute_action_n01 execute_action
  424.   def execute_action
  425.     # 技能、物品扩张时如果设定了行动前不清空
  426.     if @active_battler.action.kind != 0
  427.       obj = @active_battler.action.skill if @active_battler.action.kind == 1
  428.       obj = @active_battler.action.item if @active_battler.action.kind == 2
  429.       if obj.extension.include?("行動前フラッシュなし")
  430.         @active_battler.white_flash = false
  431.       end  
  432.     end
  433.     # 角色主动化
  434.     @active_battler.active = true
  435.     # 強制行動中のスキル派生
  436.     @active_battler.derivation = 0 if @active_battler.action.forcing
  437.     execute_action_n01
  438.     # 有技能连发时、行动继续
  439.     if @active_battler.derivation != 0
  440.       @active_battler.action.kind = 1
  441.       @active_battler.action.skill_id = @active_battler.derivation
  442.       @action_battlers.unshift(@active_battler)
  443.       return process_action
  444.     end
  445.     # 有复数行动的敌方时、决定下个行动
  446.     if !@active_battler.actor? && @active_battler.act_time != 0
  447.       @active_battler.make_action
  448.       @active_battler.act_time -= 1
  449.     end
  450.   end
  451.   #--------------------------------------------------------------------------
  452.   # ● 回合完毕  ※再定义
  453.   #--------------------------------------------------------------------------
  454.   def turn_end
  455.     for member in $game_party.members + $game_troop.members
  456.       member.clear_action_results
  457.       next unless member.exist?
  458.       member.slip_damage = false
  459.       actor = member.actor?
  460.       damage = 0
  461.       # 确认是否有0回合解除的状态
  462.       for state in member.states
  463.         member.remove_state(state.id) if state.extension.include?("0回合解除")
  464.         # 实行连续伤害 state = [ 对象, 定数, 比例, POP, 战斗不能许可]
  465.         next unless state.extension.include?("连续伤害")
  466.         for ext in state.slip_extension
  467.           if ext[0] == "hp"
  468.             base_damage = ext[1] + member.maxhp * ext[2] / 100
  469.             damage += base_damage + base_damage * (rand(5) - rand(5)) / 100
  470.             slip_pop = ext[3]
  471.             slip_dead = ext[4]
  472.             slip_damage_flug = true
  473.             member.slip_damage = true
  474.           end
  475.         end  
  476.       end
  477.       # 默认的连续伤害
  478.       if member.slip_damage? && member.exist? && !slip_damage_flug
  479.         damage += member.apply_variance(member.maxhp / 10, 10)
  480.         slip_dead = false
  481.         slip_pop = true
  482.         slip_damage_flug = true
  483.         member.slip_damage = true
  484.       end
  485.       damage = member.hp - 1 if damage >= member.hp && slip_dead = false
  486.       member.hp -= damage
  487.       @spriteset.set_damage_pop(actor, member.index, damage) if slip_pop
  488.       member.perform_collapse if member.dead? && member.slip_damage
  489.       member.clear_action_results
  490.     end
  491.     @status_window.refresh
  492.     # HP和MP的定时改变
  493.     wait(55) if slip_damage_flug
  494.     slip_damage_flug = false
  495.     for member in $game_party.members + $game_troop.members
  496.       member.clear_action_results
  497.       next unless member.exist?
  498.       actor = member.actor?
  499.       mp_damage = 0
  500.       for state in member.states
  501.         next unless state.extension.include?("连续伤害")
  502.         for ext in state.slip_extension
  503.           if ext[0] == "mp"
  504.             base_damage = ext[1] + member.maxmp * ext[2] / 100
  505.             mp_damage += base_damage + base_damage * (rand(5) - rand(5)) / 100
  506.             slip_pop = ext[2]
  507.             slip_damage_flug = true
  508.           end
  509.         end
  510.         member.mp_damage = mp_damage
  511.         member.mp -= mp_damage
  512.         @spriteset.set_damage_pop(actor, member.index, mp_damage) if slip_pop
  513.       end   
  514.       member.clear_action_results
  515.     end
  516.     @status_window.refresh
  517.     # 伤害和回復的定时改变
  518.     wait(55) if slip_damage_flug
  519.     # 是否有自动回复
  520.     for member in $game_party.members
  521.       if member.auto_hp_recover and member.exist?
  522.         plus_hp = member.maxhp / 20
  523.         member.hp += plus_hp
  524.         @spriteset.set_damage_pop(true, member.index, plus_hp * -1)
  525.         plus_hp_flug = true
  526.       end
  527.       member.clear_action_results
  528.     end
  529.     @status_window.refresh
  530.     wait(55) if plus_hp_flug
  531.     @help_window.dispose if @help_window != nil
  532.     @help_window = nil
  533.     move2_info_viewport
  534.     $game_troop.turn_ending = true
  535.     $game_troop.preemptive = false
  536.     $game_troop.surprise = false
  537.     process_battle_event
  538.     $game_troop.turn_ending = false
  539.     start_party_command_selection
  540.   end
  541.   #--------------------------------------------------------------------------
  542.   # ● 战斗行动的实行 : 攻击  ※再定义
  543.   #--------------------------------------------------------------------------
  544.   def execute_action_attack
  545.     if @active_battler.actor?
  546.       if @active_battler.weapon_id == 0
  547.         action = @active_battler.non_weapon
  548.         # 行动中不会死的队员全员为不死身化
  549.         immortaling
  550.       else  
  551.         action = $data_weapons[@active_battler.weapon_id].base_action
  552.         # 用赋予战斗不能的武器来分歧不死身设定
  553.         if $data_weapons[@active_battler.weapon_id].state_set.include?(1)
  554.           for member in $game_party.members + $game_troop.members
  555.             next if member.immortal
  556.             next if member.dead?
  557.             member.dying = true
  558.           end
  559.         else
  560.           immortaling
  561.         end
  562.       end  
  563.     else
  564.       if @active_battler.weapon == 0
  565.         action = @active_battler.base_action
  566.         immortaling
  567.       else
  568.         action = $data_weapons[@active_battler.weapon].base_action
  569.         if $data_weapons[@active_battler.weapon].state_set.include?(1)
  570.           for member in $game_party.members + $game_troop.members
  571.             next if member.immortal
  572.             next if member.dead?
  573.             member.dying = true
  574.           end
  575.         else
  576.           immortaling
  577.         end
  578.       end  
  579.     end
  580.     target_decision
  581.     @spriteset.set_action(@active_battler.actor?, @active_battler.index, action)
  582.     playing_action
  583.   end
  584.   #--------------------------------------------------------------------------
  585.   # ● 战斗行动的实行 : 防御  ※再定义
  586.   #--------------------------------------------------------------------------
  587.   def execute_action_guard
  588.     @help_window2.set_text("防御", 1)
  589.     @help_window2.visible = true
  590.     # 解除角色的主动化
  591.     @active_battler.active = false
  592.     wait(45)
  593.     @help_window2.visible = false
  594.   end
  595.   #--------------------------------------------------------------------------
  596.   # ● 战斗行动的实行 : 逃走
  597.   #--------------------------------------------------------------------------
  598.   def execute_action_escape
  599.     @spriteset.set_action(false, @active_battler.index, @active_battler.run_success)
  600.     @help_window2.set_text("逃走", 1)
  601.     @help_window2.visible = true
  602.     # 解除角色的主动化
  603.     @active_battler.active = false
  604.     @active_battler.escape
  605.     Sound.play_escape
  606.     wait(45)
  607.     @help_window2.visible = false
  608.   end
  609.   #--------------------------------------------------------------------------
  610.   # ● 战斗行动的实行 : 待机  ※再定义
  611.   #--------------------------------------------------------------------------
  612.   def execute_action_wait
  613.     # 解除角色的主动化
  614.     @active_battler.active = false
  615.     @help_window2.set_text("不知所措", 1)
  616.     @help_window2.visible = true
  617.     wait(45)
  618.     @help_window2.visible = false
  619.   end   
  620.   #--------------------------------------------------------------------------
  621.   # ● 战斗行动的实行 : 技能  ※再定义
  622.   #--------------------------------------------------------------------------
  623.   def execute_action_skill
  624.     skill = @active_battler.action.skill
  625.     # 用赋予战斗不能的技能来分歧不死身设定
  626.     if skill.plus_state_set.include?(1)
  627.       for member in $game_party.members + $game_troop.members
  628.         next if member.immortal
  629.         next if member.dead?
  630.         member.dying = true
  631.       end
  632.     else
  633.       # 行动中不会死的队员全员为不死身化
  634.       immortaling
  635.     end
  636.     # 判别技能使用可能
  637.     return unless @active_battler.skill_can_use?(skill)
  638.     # 决定目标
  639.     target_decision(skill)
  640.     # 动作开始
  641.     @spriteset.set_action(@active_battler.actor?, @active_battler.index, skill.base_action)
  642.     # 帮助窗口中显示技能名
  643.     pop_help(skill)
  644.     # 动作中
  645.     playing_action
  646.     # 技能成本消费
  647.     @active_battler.consum_skill_cost(skill)
  648.     # 还原状态窗口
  649.     @status_window.refresh
  650.     # 取得公共事件
  651.     $game_temp.common_event_id = skill.common_event_id
  652.   end
  653.   #--------------------------------------------------------------------------
  654.   # ● 战斗行动的实行 : 物品  ※再定义
  655.   #--------------------------------------------------------------------------
  656.   def execute_action_item
  657.     item = @active_battler.action.item
  658.     # 用赋予战斗不能的物品来分歧不死身设定
  659.     if item.plus_state_set.include?(1)
  660.       for member in $game_party.members + $game_troop.members
  661.         next if member.immortal
  662.         next if member.dead?
  663.         member.dying = true
  664.       end
  665.     else
  666.       # 行动中不会死的队员全员为不死身化
  667.       immortaling
  668.     end
  669.     $game_party.consume_item(item)
  670.     target_decision(item)
  671.     @spriteset.set_action(@active_battler.actor?, @active_battler.index, item.base_action)
  672.     pop_help(item)
  673.     playing_action
  674.     $game_temp.common_event_id = item.common_event_id
  675.   end
  676.   #--------------------------------------------------------------------------
  677.   # ● 决定目标
  678.   #--------------------------------------------------------------------------
  679.   def target_decision(obj = nil)
  680.     @targets = @active_battler.action.make_targets
  681.     # 目标不存在时、动作中断
  682.     if @targets.size == 0
  683.       action = @active_battler.recover_action
  684.       @spriteset.set_action(@active_battler.actor?, @active_battler.index, action)
  685.     end
  686.     if obj != nil
  687.       # 如果默认了设定复数回合攻击时变换成单体目标
  688.       if obj.for_two? or obj.for_three? or obj.dual?
  689.         @targets = [@targets[0]]
  690.       end
  691.       # 随机目标时、选择的一体保持在随机范围
  692.       if obj.extension.include?("随机目标")
  693.         randum_targets = @targets.dup
  694.         @targets = [randum_targets[rand(randum_targets.size)]]
  695.       end
  696.     end
  697.     # 目标情报发送到角色精灵
  698.     @spriteset.set_target(@active_battler.actor?, @active_battler.index, @targets)
  699.   end   
  700.   #--------------------------------------------------------------------------
  701.   # ● 实行动作中
  702.   #--------------------------------------------------------------------------
  703.   def playing_action
  704.     loop do
  705.       update_basic
  706.       # 查看被归纳在主动角色的动作情报
  707.       action = @active_battler.play
  708.       next if action == 0
  709.       @active_battler.play = 0
  710.       if action[0] == "个别处理"
  711.         individual
  712.       elsif action == "击倒许可"
  713.         unimmortaling
  714.       elsif action == "解除主动"
  715.         break action_end
  716.       elsif action == "完毕"
  717.         break action_end
  718.       elsif action[0] == "对象动画"
  719.         damage_action(action[1])
  720.       end
  721.     end  
  722.   end
  723.   #--------------------------------------------------------------------------
  724.   # ● 个别处理
  725.   #--------------------------------------------------------------------------
  726.   def individual
  727.     # 保持目标情报
  728.     @individual_target = @targets
  729.     @stand_by_target = @targets.dup
  730.   end
  731.   #--------------------------------------------------------------------------
  732.   # ● 击倒禁止
  733.   #--------------------------------------------------------------------------
  734.   def immortaling
  735.     # 赋予全员不死身
  736.     for member in $game_party.members + $game_troop.members
  737.       # 如果不能战斗时跳过处理
  738.       next if member.dead?
  739.       # 有事件等设定不死身创立解除无效的标志
  740.       member.non_dead = true if member.immortal
  741.       member.immortal = true
  742.     end  
  743.   end  
  744.   #--------------------------------------------------------------------------
  745.   # ● 击倒许可
  746.   #--------------------------------------------------------------------------
  747.   def unimmortaling
  748.     # 个别处理中无击败许可
  749.     return if @active_battler.individual
  750.     # 解除全员的不死身化(用事件设定的不死身除外)
  751.     for member in $game_party.members + $game_troop.members
  752.       if member.dying
  753.         member.dying = false
  754.         if member.dead? or member.hp == 0
  755.           member.add_state(1)
  756.           member.perform_collapse
  757.         end
  758.       end
  759.       next if member.non_dead
  760.       next if member.dead?
  761.       member.immortal = false
  762.       member.add_state(1) if member.hp == 0
  763.       member.perform_collapse
  764.     end
  765.     # 在这个时候反映待机动作
  766.     @targets = @stand_by_target if @stand_by_target != nil
  767.     return if @targets == nil or @targets.size == 0
  768.     for target in @targets
  769.       @spriteset.set_stand_by_action(target.actor?, target.index)
  770.       # 确认自动复活
  771.       next unless target.hp == 0
  772.       resurrection(target)
  773.     end  
  774.   end
  775.   #--------------------------------------------------------------------------
  776.   # ● 自动复活
  777.   #--------------------------------------------------------------------------
  778.   def resurrection(target)
  779.     for state in target.states
  780.       for ext in state.extension
  781.         name = ext.split('')
  782.         next unless name[0] == "自"
  783.         wait(50)
  784.         name = name.join
  785.         name.slice!("自动复活/")
  786.         target.hp = target.maxhp * name.to_i / 100
  787.         target.remove_state(1)
  788.         target.remove_state(state.id)
  789.         target.animation_id = N01::RESURRECTION
  790.         target.animation_mirror = true if $back_attack
  791.         @status_window.refresh
  792.         wait($data_animations[N01::RESURRECTION].frame_max * 4)
  793.       end  
  794.     end
  795.   end
  796.   #--------------------------------------------------------------------------
  797.   # ● 魔法反射・无效
  798.   #--------------------------------------------------------------------------
  799.   def magic_reflection(target, obj)
  800.     return if obj.physical_attack
  801.     for state in target.states
  802.       for ext in state.extension
  803.         name = ext.split('')
  804.         next unless name[0] == "魔"
  805.         if name[2] == "反"
  806.           name = name.join
  807.           name.slice!("魔法反射/")
  808.           target.animation_id = name.to_i
  809.           target.animation_mirror = true if $back_attack
  810.           @reflection = true
  811.         else
  812.           name = name.join
  813.           name.slice!("魔法无效/")
  814.           target.animation_id = name.to_i
  815.           target.animation_mirror = true if $back_attack
  816.           @invalid = true
  817.         end  
  818.       end  
  819.     end
  820.   end
  821.   #--------------------------------------------------------------------------
  822.   # ● 物理反射・无效
  823.   #--------------------------------------------------------------------------
  824.   def physics_reflection(target, obj)
  825.     return if obj != nil && !obj.physical_attack
  826.     for state in target.states
  827.       for ext in state.extension
  828.         name = ext.split('')
  829.         next unless name[0] == "物"
  830.         if name[2] == "反"
  831.           name = name.join
  832.           name.slice!("物理反射/")
  833.           target.animation_id = name.to_i
  834.           target.animation_mirror = true if $back_attack
  835.           @reflection = true
  836.         else
  837.           name = name.join
  838.           name.slice!("物理无效/")
  839.           target.animation_id = name.to_i
  840.           target.animation_mirror = true if $back_attack
  841.           @invalid = true
  842.         end
  843.       end  
  844.     end
  845.   end
  846.   #--------------------------------------------------------------------------
  847.   # ● 技能成本吸收
  848.   #--------------------------------------------------------------------------
  849.   def absorb_cost(target, obj)
  850.     for state in target.states
  851.       if state.extension.include?("成本吸收")
  852.         cost = @active_battler.calc_mp_cost(obj)
  853.         # 区分为SP消费和HP消费
  854.         return target.hp += cost if obj.extension.include?("HP消耗")
  855.         return target.mp += cost
  856.       end  
  857.     end
  858.   end
  859.   #--------------------------------------------------------------------------
  860.   # ● 吸收处理
  861.   #--------------------------------------------------------------------------
  862.   def absorb_attack(obj, target, index, actor)
  863.     absorb = target.hp_damage
  864.     absorb = target.mp_damage if target.mp_damage != 0
  865.     # 目标是复数同时吸收处理
  866.     @wide_attack = true if obj.scope == 2 or obj.scope == 4 or obj.scope == 6 or obj.extension.include?("全区域")
  867.     if @wide_attack && @absorb == nil && @targets.size != 1
  868.       # 返还吸收的部分
  869.       @active_battler.hp -= @active_battler.hp_damage
  870.       @active_battler.mp -= @active_battler.mp_damage
  871.       # 之后加算吸收返还的数值
  872.       @absorb = absorb
  873.       @absorb_target_size = @targets.size - 2
  874.     elsif @absorb != nil && @absorb_target_size > 0
  875.       @active_battler.hp -= @active_battler.hp_damage
  876.       @active_battler.mp -= @active_battler.mp_damage
  877.       @absorb += absorb
  878.       @absorb_target_size -= 1
  879.     # 处理复数目标的最重吸收
  880.     elsif @absorb != nil
  881.       # 返还吸收的部分
  882.       @active_battler.hp -= @active_battler.hp_damage
  883.       @active_battler.mp -= @active_battler.mp_damage
  884.       @absorb += absorb
  885.       # 在这里反映全部吸收部分
  886.       @active_battler.hp_damage = -@absorb
  887.       @active_battler.mp_damage = -@absorb if target.mp_damage != 0
  888.       @active_battler.hp -= @active_battler.hp_damage
  889.       @active_battler.mp -= @active_battler.mp_damage
  890.       # 吸收量是0时吸收者方面的处理
  891.       absorb_action = ["absorb", nil, false] if @absorb == 0
  892.       absorb_action = [nil, nil, false] if @absorb != 0
  893.       @spriteset.set_damage_action(actor, index, absorb_action)
  894.       @active_battler.perform_collapse
  895.       @absorb = nil
  896.       @absorb_target_size = nil
  897.     # 单体吸收的处理
  898.     else
  899.       # 吸收量是0时吸收者方面的处理
  900.       absorb_action = ["absorb", nil, false] if absorb == 0
  901.       absorb_action = [nil, nil, false] if absorb != 0
  902.       @spriteset.set_damage_action(actor, index, absorb_action)
  903.       # 逆向吸收时HP为0时
  904.       @absorb_dead = true if @active_battler.hp == 0 && !@active_battler.non_dead
  905.     end
  906.     # 吸收量是0时对象者方面的处理
  907.     return 0 if absorb == 0
  908.   end
  909.   #--------------------------------------------------------------------------
  910.   # ● 动作完毕
  911.   #--------------------------------------------------------------------------
  912.   def action_end
  913.     # 初期化
  914.     @individual_target = nil
  915.         @help_window2.visible = false if @help_window2 != nil && @help_window2.visible
  916.     @active_battler.active = false
  917.     @active_battler.clear_action_results
  918.     # 慎重起见解除不死身化
  919.     unimmortaling
  920.     # 被反射时
  921.     if @active_battler.reflex != nil
  922.       if @active_battler.action.skill?
  923.         obj = @active_battler.action.skill
  924.         @active_battler.perfect_skill_effect(@active_battler, obj)
  925.       elsif @active_battler.action.item?
  926.         obj = @active_battler.action.item
  927.         @active_battler.item_effect(@active_battler, obj)
  928.       else
  929.         @active_battler.perfect_attack_effect(@active_battler)
  930.       end
  931.       pop_damage(@active_battler, obj, @active_battler.reflex)
  932.       @active_battler.perform_collapse
  933.       @active_battler.reflex = nil
  934.       wait(N01::COLLAPSE_WAIT)
  935.     end
  936.     #因逆向吸收战斗不能时
  937.     if @absorb_dead
  938.       @active_battler.perform_collapse
  939.       @absorb_dead = false
  940.       wait(N01::COLLAPSE_WAIT)
  941.     end
  942.     # 缩短到下次行动前的等待
  943.     wait(N01::ACTION_WAIT)
  944.   end  
  945.   #--------------------------------------------------------------------------
  946.   # ● 伤害处理
  947.   #--------------------------------------------------------------------------
  948.   def damage_action(action)
  949.     # 单独处理时目标一个一个发出
  950.     @targets = [@individual_target.shift] if @active_battler.individual
  951.     # 技能时
  952.     if @active_battler.action.skill?
  953.       obj = @active_battler.action.skill
  954.       for target in @targets
  955.         return if target == nil
  956.         return if target.dead? && !obj.for_dead_friend?
  957.         # HP为0时战斗不能復活以外不MISS
  958.         target.revival = true if obj.for_dead_friend?
  959.         if target.hp == 0 && !obj.for_dead_friend?
  960.           target.perfect_skill_effect(@active_battler, obj)
  961.         # 确认必中
  962.         elsif obj.extension.include?("必中")
  963.           target.perfect_skill_effect(@active_battler, obj)
  964.         else
  965.           # 确认反射
  966.           magic_reflection(target, obj) unless obj.extension.include?("无视反射")
  967.           physics_reflection(target, obj) unless obj.extension.include?("无视反射")
  968.           # 计算伤害
  969.           target.skill_effect(@active_battler, obj) unless @reflection or @invalid
  970.         end  
  971.         pop_damage(target, obj, action) unless @reflection or @invalid
  972.         # 确认成本吸收
  973.         absorb_cost(target, obj)
  974.         # 获取反射动作
  975.         @active_battler.reflex = action if @reflection
  976.         @reflection = false
  977.         @invalid = false
  978.       end
  979.     # 物品时
  980.     elsif @active_battler.action.item?
  981.       obj = @active_battler.action.item
  982.       for target in @targets
  983.         return if target == nil
  984.         return if target.dead? && !obj.for_dead_friend?
  985.         target.revival = true if obj.for_dead_friend?
  986.         if target.hp == 0 && !obj.for_dead_friend?
  987.           target.perfect_item_effect(@active_battler, obj)
  988.         elsif obj.extension.include?("必中")
  989.           target.perfect_item_effect(@active_battler, obj)
  990.         else
  991.           magic_reflection(target, obj) unless obj.extension.include?("无视反射")
  992.           physics_reflection(target, obj) unless obj.extension.include?("无视反射")
  993.           target.item_effect(@active_battler, obj) unless @reflection or @invalid
  994.         end
  995.         pop_damage(target, obj, action) unless @reflection or @invalid
  996.         @active_battler.reflex = action if @reflection
  997.         @reflection = false
  998.         @invalid = false
  999.       end
  1000.     # 通常攻击时
  1001.     else
  1002.       for target in @targets
  1003.         return if target == nil or target.dead?
  1004.         physics_reflection(target, nil)
  1005.         target.perfect_attack_effect(@active_battler) if target.hp <= 0
  1006.         target.attack_effect(@active_battler) unless target.hp <= 0 or @reflection or @invalid
  1007.         pop_damage(target, nil, action) unless @reflection or @invalid
  1008.         # 获取反射动作
  1009.         @active_battler.reflex = action if @reflection
  1010.         @reflection = false
  1011.         @invalid = false
  1012.       end
  1013.     end
  1014.     # 还原状态窗口
  1015.     @status_window.refresh
  1016.     # 考虑连续性懂得随机目标、立刻选择下个目标
  1017.     return if obj == nil
  1018.     target_decision(obj) if obj.extension.include?("随机目标")
  1019.   end
  1020.   #--------------------------------------------------------------------------
  1021.   # ● 伤害表示  action = [动画ID,反转标志,动作许可]
  1022.   #--------------------------------------------------------------------------
  1023.   def pop_damage(target, obj, action)
  1024.     index = @active_battler.index
  1025.     actor = @active_battler.actor?
  1026.     if obj != nil
  1027.       # 技能或者物品是吸收属性时
  1028.       absorb = absorb_attack(obj, target, index, actor) if obj.absorb_damage
  1029.       action.push(true) if absorb == 0
  1030.       # 扩张设定为伤害动作禁止时
  1031.       action[2] = false if obj.extension.include?("禁止伤害动作")
  1032.     end
  1033.     # 还原对象
  1034.     @spriteset.set_damage_action(target.actor?, target.index, action)
  1035.   end
  1036. end  
  1037. #==============================================================================
  1038. # ■ Game_BattleAction
  1039. #------------------------------------------------------------------------------
  1040. #  战斗行动处理的类。
  1041. #==============================================================================
  1042. class Game_BattleAction
  1043.   #--------------------------------------------------------------------------
  1044.   # ● 判定行动是否有效  ※再定义
  1045.   #--------------------------------------------------------------------------
  1046.   def valid?
  1047.     return false if nothing?                      # 什么都不作
  1048.     return true if @forcing                       # 强制行动中
  1049.     return false unless battler.movable?          # 行动不能
  1050.     if skill?                                     # 技能
  1051.       if battler.derivation != 0
  1052.         battler.derivation = 0
  1053.         return true
  1054.       end  
  1055.       return false unless battler.skill_can_use?(skill)
  1056.     elsif item?                                   # 物品
  1057.       return false unless friends_unit.item_can_use?(item)
  1058.     end
  1059.     return true
  1060.   end
  1061.   #--------------------------------------------------------------------------
  1062.   # ● 作成目标的排列  ※再定义
  1063.   #--------------------------------------------------------------------------
  1064.   def make_targets
  1065.     if attack?
  1066.       return make_attack_targets
  1067.     elsif skill?
  1068.       targets = make_obj_targets(skill)
  1069.       targets = make_obj_targets2(skill, targets) if skill.extension != ["なし"]
  1070.       return targets
  1071.     elsif item?
  1072.       targets = make_obj_targets(item)
  1073.       targets = make_obj_targets2(item, targets) if item.extension != ["なし"]
  1074.       return targets
  1075.     end
  1076.   end
  1077.   #--------------------------------------------------------------------------
  1078.   # ● 作成技能或是物品的目标的扩张
  1079.   #--------------------------------------------------------------------------
  1080.   def make_obj_targets2(obj, targets)
  1081.     if obj.extension.include?("全区域")
  1082.       targets = []
  1083.       targets += opponents_unit.existing_members
  1084.       targets += friends_unit.existing_members
  1085.     end
  1086.     if obj.extension.include?("自分以外")
  1087.       targets.delete($game_party.members[battler.index]) if battler.actor?
  1088.       targets.delete($game_troop.members[battler.index]) unless battler.actor?
  1089.     end
  1090.     return targets.compact
  1091.   end
  1092. end
  1093. #==============================================================================
  1094. # ■ Sprite_Base
  1095. #------------------------------------------------------------------------------
  1096. #  追加了动画的表示处理的精灵的类。
  1097. #==============================================================================
  1098. class Sprite_Base < Sprite
  1099.   #--------------------------------------------------------------------------
  1100.   # ● 动画的更新 动画追随精灵
  1101.   #--------------------------------------------------------------------------
  1102.   alias update_animation_n01 update_animation
  1103.   def update_animation
  1104.     @animation_ox = x - ox + width / 2
  1105.     @animation_oy = y - oy + height / 2
  1106.     update_animation_n01
  1107.   end
  1108. end  
  1109. #==============================================================================
  1110. # ■ Spriteset_Battle
  1111. #------------------------------------------------------------------------------
  1112. #  整理战斗画面的精灵的类。
  1113. #==============================================================================
  1114. class Spriteset_Battle
  1115.   #--------------------------------------------------------------------------
  1116.   # ● 敌方精灵的作成
  1117.   #--------------------------------------------------------------------------
  1118.   def create_enemies
  1119.     @enemy_sprites = []
  1120.     for i in 0...$game_troop.members.size
  1121.       @enemy_sprites.push(Sprite_Battler.new(@viewport1, $game_troop.members[i]))
  1122.       @enemy_sprites[i].opacity = 0 if $game_troop.members[i].hidden
  1123.     end
  1124.   end
  1125.   #--------------------------------------------------------------------------
  1126.   # ● 主人公精灵的作成
  1127.   #--------------------------------------------------------------------------
  1128.   def create_actors
  1129.     @actor_sprites = []
  1130.     # 准备成员最大数精灵
  1131.     for i in 0...N01::MAX_MEMBER
  1132.       @actor_sprites.push(Sprite_Battler.new(@viewport1, $game_party.members[i]))
  1133.       if $game_party.members[i] != nil
  1134.         @actor_sprites[i].make_battler
  1135.         @actor_sprites[i].first_action
  1136.       end
  1137.     end
  1138.   end
  1139.   #--------------------------------------------------------------------------
  1140.   # ● 战斗层精灵的作成
  1141.   #--------------------------------------------------------------------------
  1142.   def create_battlefloor
  1143.     @battlefloor_sprite = Sprite.new(@viewport1)
  1144.     @battlefloor_sprite.bitmap = Cache.system("BattleFloor")
  1145.     @battlefloor_sprite.x = N01::FLOOR[0]
  1146.     @battlefloor_sprite.y = N01::FLOOR[1]
  1147.     @battlefloor_sprite.opacity = N01::FLOOR[2]
  1148.     @battlefloor_sprite.z = 1
  1149.     # 偷袭时時、反转层面和背景
  1150.     back_attack
  1151.     if $back_attack
  1152.       @battlefloor_sprite.mirror = true
  1153.       @battleback_sprite.mirror = true
  1154.       $game_troop.surprise = true
  1155.     else  
  1156.       $game_troop.surprise = false
  1157.     end  
  1158.   end  
  1159.   #--------------------------------------------------------------------------
  1160.   # ● 背部攻击
  1161.   #--------------------------------------------------------------------------
  1162.   def back_attack  
  1163.     # 強制背部攻击时标志ON
  1164.     for i in 0...N01::BACK_ATTACK_SWITCH.size
  1165.       return $back_attack = true if $game_switches[N01::BACK_ATTACK_SWITCH[i]]
  1166.     end
  1167.     # 如果没发生偷袭时将中断处理
  1168.     return $back_attack = false unless $game_troop.surprise && N01::BACK_ATTACK
  1169.     # 确认根据装备等背部攻击的无效化
  1170.     for actor in $game_party.members
  1171.       return $back_attack = false if N01::NON_BACK_ATTACK_WEAPONS.include?(actor.weapon_id)
  1172.       return $back_attack = false if N01::NON_BACK_ATTACK_ARMOR1.include?(actor.armor1_id)
  1173.       return $back_attack = false if N01::NON_BACK_ATTACK_ARMOR2.include?(actor.armor2_id)
  1174.       return $back_attack = false if N01::NON_BACK_ATTACK_ARMOR3.include?(actor.armor3_id)
  1175.       return $back_attack = false if N01::NON_BACK_ATTACK_ARMOR4.include?(actor.armor4_id)
  1176.       for i in 0...N01::NON_BACK_ATTACK_SKILLS.size
  1177.         return $back_attack = false if actor.skill_id_learn?(N01::NON_BACK_ATTACK_SKILLS[i])
  1178.       end  
  1179.     end
  1180.     # 发生背部攻击
  1181.     $back_attack = true
  1182.   end
  1183.   #--------------------------------------------------------------------------
  1184.   # ● 主人公精灵的更新  ※再定义
  1185.   #--------------------------------------------------------------------------
  1186.   def update_actors
  1187.     for i in 0...@actor_sprites.size
  1188.       if $party_change
  1189.         $party_change = false
  1190.         dispose_actors
  1191.         return create_actors
  1192.       end
  1193.       if @actor_sprites[i].battler.id != $game_party.members[i].id
  1194.         dispose_actors
  1195.         return create_actors
  1196.       end
  1197.       @actor_sprites[i].update
  1198.     end
  1199.   end
  1200.   #--------------------------------------------------------------------------
  1201.   # ● 伤害动作组合 
  1202.   #--------------------------------------------------------------------------  
  1203.   def set_damage_action(actor, index, action)
  1204.     @actor_sprites[index].damage_action(action) if actor
  1205.     @enemy_sprites[index].damage_action(action) unless actor
  1206.   end
  1207.   #--------------------------------------------------------------------------
  1208.   # ● 伤害POP组合 
  1209.   #--------------------------------------------------------------------------  
  1210.   def set_damage_pop(actor, index, damage)
  1211.     @actor_sprites[index].damage_pop(damage) if actor
  1212.     @enemy_sprites[index].damage_pop(damage) unless actor
  1213.   end
  1214.   #--------------------------------------------------------------------------
  1215.   # ● 目标组合
  1216.   #--------------------------------------------------------------------------  
  1217.   def set_target(actor, index, target)
  1218.     @actor_sprites[index].get_target(target) if actor
  1219.     @enemy_sprites[index].get_target(target) unless actor
  1220.   end
  1221.   #--------------------------------------------------------------------------
  1222.   # ● 动作组合
  1223.   #--------------------------------------------------------------------------  
  1224.   def set_action(actor, index, kind)
  1225.     @actor_sprites[index].start_action(kind) if actor
  1226.     @enemy_sprites[index].start_action(kind) unless actor
  1227.   end  
  1228.   #--------------------------------------------------------------------------
  1229.   # ● 待机动作组合
  1230.   #--------------------------------------------------------------------------  
  1231.   def set_stand_by_action(actor, index)
  1232.     @actor_sprites[index].push_stand_by if actor
  1233.     @enemy_sprites[index].push_stand_by unless actor
  1234.   end  
  1235.   #--------------------------------------------------------------------------
  1236.   # ● 光标移动的组合
  1237.   #--------------------------------------------------------------------------  
  1238.   def set_cursor(actor, index)
  1239.     return [@actor_sprites[index].x, @actor_sprites[index].y] if actor
  1240.     return [@enemy_sprites[index].x, @enemy_sprites[index].y] unless actor
  1241.   end
  1242. end
  1243. #==============================================================================
  1244. # ■ Sprite_MoveAnime
  1245. #------------------------------------------------------------------------------
  1246. #  动画飞出用的精灵。
  1247. #==============================================================================
  1248. class Sprite_MoveAnime < Sprite_Base
  1249.   #--------------------------------------------------------------------------
  1250.   # ● 公开变数
  1251.   #--------------------------------------------------------------------------
  1252.   attr_accessor :battler
  1253.   attr_accessor :base_x   # 自身の基本X座標
  1254.   attr_accessor :base_y   # 自身の基本Y座標
  1255.   #--------------------------------------------------------------------------
  1256.   # ● 客观初期化
  1257.   #--------------------------------------------------------------------------
  1258.   def initialize(viewport,battler = nil)
  1259.     super(viewport)
  1260.     @battler = battler
  1261.     self.visible = false
  1262.     @base_x = 0
  1263.     @base_y = 0
  1264.     @move_x = 0                # 移动后的X坐标
  1265.     @move_y = 0                # 移动后Y坐标
  1266.     @moving_x = 0              # 1单位相当移动的X坐标
  1267.     @moving_y = 0              # 1单位相当移动的Y坐标
  1268.     @orbit = 0                 # 圆轨道
  1269.     @orbit_plus = 0            # 加算的圆轨道
  1270.     @orbit_time = 0            # 圆轨道计算时间
  1271.     @through = false           # 是否贯通
  1272.     @finish = false            # 移动完毕的标志
  1273.     @time = 0                  # 移動時間
  1274.     @angle = 0                 # 一动时间
  1275.     @angling = 0               # 1单位相当移动的武器的角度
  1276.   end
  1277.   #--------------------------------------------------------------------------
  1278.   # ● 获取动作
  1279.   #--------------------------------------------------------------------------  
  1280.   def anime_action(id,mirror,distanse_x,distanse_y,type,speed,orbit,weapon,icon_index,icon_weapon)
  1281.     # 算出1单位相当的移动距离
  1282.     @time = speed
  1283.     @moving_x = distanse_x / speed
  1284.     @moving_y = distanse_y / speed
  1285.     # 是否贯通
  1286.     @through = true if type == 1
  1287.     # 获取圆轨道
  1288.     @orbit_plus = orbit
  1289.     @orbit_time = @time
  1290.     # 有无武器图片
  1291.     if weapon != ""
  1292.       action = N01::ANIME[weapon].dup
  1293.       @angle = action[0]
  1294.       end_angle = action[1]
  1295.       time = action[2]
  1296.       # 调出1单位相当的旋转角度
  1297.       @angling = (end_angle - @angle)/ time
  1298.       # 取得开始角度
  1299.       self.angle = @angle
  1300.       # 显示武器图片
  1301.       self.mirror = mirror
  1302.       if icon_weapon
  1303.         self.bitmap = Cache.system("Iconset")
  1304.         self.src_rect.set(icon_index % 16 * 24, icon_index / 16 * 24, 24, 24)
  1305.         self.ox = 12
  1306.         self.oy = 12
  1307.       else
  1308.         self.bitmap = Cache.character(icon_index)
  1309.         self.ox = self.bitmap.width / 2
  1310.         self.oy = self.bitmap.height / 2
  1311.       end  
  1312.       self.visible = true
  1313.       # 显示在角色面前
  1314.       self.z = 1000
  1315.     end  
  1316.     # 最初不动只显示一次
  1317.     self.x = @base_x + @move_x
  1318.     self.y = @base_y + @move_y + @orbit
  1319.     if id != 0
  1320.       animation = $data_animations[id]
  1321.       start_animation(animation, mirror)
  1322.     end
  1323.   end  
  1324.   #--------------------------------------------------------------------------
  1325.   # ● 变化了的移动组合
  1326.   #--------------------------------------------------------------------------  
  1327.   def action_reset
  1328.     @moving_x = @moving_y = @move_x = @move_y = @base_x = @base_y = @orbit = 0
  1329.     @orbit_time = @angling = @angle = 0   
  1330.     @through = self.visible = @finish = false
  1331.     dispose_animation
  1332.   end   
  1333.   #--------------------------------------------------------------------------
  1334.   # ● 贯通完毕
  1335.   #--------------------------------------------------------------------------  
  1336.   def finish?
  1337.     return @finish
  1338.   end
  1339.   #--------------------------------------------------------------------------
  1340.   # ● 单位更新
  1341.   #--------------------------------------------------------------------------
  1342.   def update
  1343.     super
  1344.     # 时间消耗
  1345.     @time -= 1
  1346.     # 时间内指定的移动
  1347.     if @time >= 0
  1348.       @move_x += @moving_x
  1349.       @move_y += @moving_y
  1350.       # 计算圆轨道
  1351.       if @time < @orbit_time / 2
  1352.         @orbit_plus = @orbit_plus * 5 / 4
  1353.       elsif @time == @orbit_time / 2
  1354.         @orbit_plus *= -1
  1355.       else
  1356.         @orbit_plus = @orbit_plus * 2 / 3
  1357.       end  
  1358.       @orbit += @orbit_plus
  1359.     end   
  1360.     # 就算时间完毕如果是贯穿的话也会继续直进
  1361.     @time = 100 if @time < 0 && @through
  1362.     @finish = true if @time < 0 && !@through
  1363.     # 更新精灵的坐标
  1364.     self.x = @base_x + @move_x
  1365.     self.y = @base_y + @move_y + @orbit
  1366.     # 贯穿时、从画面消失的完毕标志ON
  1367.     if self.x < -200 or self.x > 840 or self.y < -200 or self.y > 680
  1368.       @finish = true
  1369.     end
  1370.     # 更新武器图片
  1371.     if self.visible
  1372.       @angle += @angling
  1373.       self.angle = @angle
  1374.     end  
  1375.   end
  1376. end
  1377. #==============================================================================
  1378. # ■ Sprite_Weapon
  1379. #------------------------------------------------------------------------------
  1380. #  显示武器用的精灵。
  1381. #==============================================================================
  1382. class Sprite_Weapon < Sprite_Base
  1383.   #--------------------------------------------------------------------------
  1384.   # ● 公开变数
  1385.   #--------------------------------------------------------------------------
  1386.   attr_accessor :battler
  1387.   #--------------------------------------------------------------------------
  1388.   # ● 客观初始化
  1389.   #--------------------------------------------------------------------------
  1390.   def initialize(viewport,battler = nil)
  1391.     super(viewport)
  1392.     @battler = battler
  1393.     @action = []                     # 武器的动作情报
  1394.     @move_x = 0                      # 移动后的X坐标
  1395.     @move_y = 0                      # 移动后的Y坐标
  1396.     @move_z = 0                      # 移动后的Z坐标
  1397.     @plus_x = 0                      # 略微调整X坐标
  1398.     @plus_y = 0                      # 略微调整Y坐标
  1399.     @angle = 0                       # 武器的旋转角度
  1400.     @zoom_x = 1                      # 武器的横向放大率
  1401.     @zoom_y = 1                      # 武器的纵向放大率
  1402.     @moving_x = 0                    # 1单位相当移动的X坐标
  1403.     @moving_y = 0                    # 1单位相当移动的Y坐标
  1404.     @angling = 0                     # 1单位相当的旋转角度
  1405.     @zooming_x = 1                   # 1单位相当的横向放大率
  1406.     @zooming_y = 1                   # 1单位相当的纵向放大率   
  1407.     @freeze = -1                     # 固定动画用的武器位置
  1408.     @mirroring = false               # 角色是否为反转
  1409.     @time = N01::ANIME_PATTERN + 1   # 更新回数
  1410.     # 获取武器
  1411.     weapon_graphics
  1412.   end
  1413.   #--------------------------------------------------------------------------
  1414.   # ● 解放
  1415.   #--------------------------------------------------------------------------
  1416.   def dispose
  1417.     self.bitmap.dispose if self.bitmap != nil
  1418.     super
  1419.   end
  1420.   #--------------------------------------------------------------------------
  1421.   # ● 获取武器
  1422.   #--------------------------------------------------------------------------  
  1423.   def weapon_graphics(left = false)
  1424.     if @battler.actor?
  1425.       weapon = @battler.weapons[0] unless left
  1426.       weapon = @battler.weapons[1] if left
  1427.     else
  1428.       weapon = $data_weapons[@battler.weapon]
  1429.     end
  1430.     # 确认敌方的反转标志
  1431.     return if weapon == nil
  1432.     # 如果没有武器时处理被取消
  1433.     if weapon.graphic == ""
  1434.       icon_index = weapon.icon_index
  1435.       self.bitmap = Cache.system("Iconset")
  1436.       self.src_rect.set(icon_index % 16 * 24, icon_index / 16 * 24, 24, 24)
  1437.       @weapon_width = @weapon_height = 24
  1438.     # 如果有指定ID时、获取不是ICON的图片  
  1439.     else
  1440.       self.bitmap = Cache.character(weapon.graphic)
  1441.       @weapon_width = self.bitmap.width
  1442.       @weapon_height = self.bitmap.height
  1443.     end
  1444.   end
  1445.   #--------------------------------------------------------------------------
  1446.   # ● 获取动画固定时的武器位置
  1447.   #--------------------------------------------------------------------------  
  1448.   def freeze(action)
  1449.     @freeze = action
  1450.   end
  1451.   #--------------------------------------------------------------------------
  1452.   # ● 获取武器动作 freeze
  1453.   #--------------------------------------------------------------------------  
  1454.   def weapon_action(action,loop)
  1455.     # 没有名称时不显示
  1456.     if action == ""
  1457.       self.visible = false
  1458.     # 空手时不显示
  1459.     elsif @weapon_id == 0
  1460.       self.visible = false
  1461.     # 受取武器的动作情报
  1462.     else
  1463.       @action = N01::ANIME[action]
  1464.       act0 = @action[0]
  1465.       act1 = @action[1]
  1466.       act2 = @action[2]
  1467.       act3 = @action[3]
  1468.       act4 = @action[4]
  1469.       act5 = @action[5]
  1470.       act6 = @action[6]
  1471.       act7 = @action[7]
  1472.       act8 = @action[8]
  1473.       act9 = @action[9]
  1474.       act10 = @action[10]
  1475.       # 角色为反转时、X轴的动作也逆转
  1476.       if @mirroring
  1477.         act0 *= -1
  1478.         act3 *= -1
  1479.         act4 *= -1
  1480.         act9 *= -1
  1481.       end
  1482.       # 背部攻击时逆转
  1483.       time = N01::ANIME_PATTERN
  1484.       # 确认Z坐标
  1485.       if act2
  1486.         self.z = @battler.position_z + 1
  1487.       else
  1488.         self.z = @battler.position_z - 1
  1489.       end
  1490.       # 在这里实行反转、如果已经反转就还原
  1491.       if act6
  1492.         if self.mirror
  1493.           self.mirror = false
  1494.         else
  1495.           self.mirror = true
  1496.         end
  1497.       end
  1498.       # 反映角色的反转
  1499.       if @mirroring
  1500.         if self.mirror
  1501.           self.mirror = false
  1502.         else
  1503.           self.mirror = true
  1504.         end
  1505.       end
  1506.       # 计算以动画图片数相除的变化
  1507.       @moving_x = act0 / time
  1508.       @moving_y = act1 / time
  1509.       # 代入最初的角度
  1510.       @angle = act3
  1511.       self.angle = @angle
  1512.       # 计算更新角度
  1513.       @angling = (act4 - act3)/ time
  1514.       # 角度没有被插入时、在这里加算剩余旋转的部分
  1515.       @angle += (act4 - act3) % time
  1516.       # 拡大縮小
  1517.       @zooming_x = (1 - act7) / time
  1518.       @zooming_y = (1 - act8) / time
  1519.       # 如果是反转时、逆转反转前的原点
  1520.       if self.mirror
  1521.         case act5
  1522.         when 1 # 左上→到右上
  1523.           act5 = 2
  1524.         when 2 # 右上→到左上
  1525.           act5 = 1
  1526.         when 3 # 左下→到右下
  1527.           act5 = 4
  1528.         when 4 # 右下→到左下
  1529.           act5 = 3
  1530.         end  
  1531.       end   
  1532.       # 设定旋转前的原点
  1533.       case act5
  1534.       when 0 # 中心
  1535.         self.ox = @weapon_width / 2
  1536.         self.oy = @weapon_height / 2
  1537.       when 1 # 左上
  1538.         self.ox = 0
  1539.         self.oy = 0
  1540.       when 2 # 右上
  1541.         self.ox = @weapon_width
  1542.         self.oy = 0
  1543.       when 3 # 左下
  1544.         self.ox = 0
  1545.         self.oy = @weapon_height
  1546.       when 4 # 右下
  1547.         self.ox = @weapon_width
  1548.         self.oy = @weapon_height
  1549.       end  
  1550.       # 略微调整坐标
  1551.       @plus_x = act9
  1552.       @plus_y = act10
  1553.       # 往返循环时标志ON
  1554.       @loop = true if loop == 0
  1555.       # 第一次时0开始、在这时作-1回的动作
  1556.       @angle -= @angling
  1557.       @zoom_x -= @zooming_x
  1558.       @zoom_y -= @zooming_y
  1559.       # 更新精灵的坐标
  1560.       @move_x -= @moving_x
  1561.       @move_y -= @moving_y
  1562.       @move_z = 1000 if act2
  1563.       # 固定动画时、在这时消化动作
  1564.       if @freeze != -1
  1565.         for i in 0..@freeze + 1
  1566.           @angle += @angling
  1567.           @zoom_x += @zooming_x
  1568.           @zoom_y += @zooming_y
  1569.           # 更新精灵的坐标
  1570.           @move_x += @moving_x
  1571.           @move_y += @moving_y
  1572.         end
  1573.         @angling = 0
  1574.         @zooming_x = 0
  1575.         @zooming_y = 0
  1576.         @moving_x = 0
  1577.         @moving_y = 0
  1578.       end
  1579.       # 可视
  1580.       self.visible = true
  1581.     end
  1582.   end  
  1583.   #--------------------------------------------------------------------------
  1584.   # ● 变化后的动作全部组合
  1585.   #--------------------------------------------------------------------------  
  1586.   def action_reset
  1587.     @moving_x = @moving_y = @move_x = @move_y = @plus_x = @plus_y = 0
  1588.     @angling = @zooming_x = @zooming_y = @angle = self.angle = @move_z = 0
  1589.     @zoom_x = @zoom_y = self.zoom_x = self.zoom_y = 1
  1590.     self.mirror = self.visible = @loop = false
  1591.     @freeze = -1
  1592.     @action = []
  1593.     @time = N01::ANIME_PATTERN + 1
  1594.   end
  1595.   #--------------------------------------------------------------------------
  1596.   # ● 作出往返循环
  1597.   #--------------------------------------------------------------------------  
  1598.   def action_loop
  1599.     # 让动作相反
  1600.     @angling *= -1
  1601.     @zooming_x *= -1
  1602.     @zooming_y *= -1
  1603.     @moving_x *= -1
  1604.     @moving_y *= -1
  1605.   end  
  1606.   #--------------------------------------------------------------------------
  1607.   # ● 主人公是反转时、自身也反转
  1608.   #--------------------------------------------------------------------------
  1609.   def mirroring
  1610.     return @mirroring = false if @mirroring
  1611.     @mirroring = true
  1612.   end  
  1613.   #--------------------------------------------------------------------------
  1614.   # ● 只有在主人公动画被更新时武器动作的変化也更新
  1615.   #--------------------------------------------------------------------------
  1616.   def action
  1617.     return if @time <= 0
  1618.     @time -= 1
  1619.     # 旋转、更新放大缩小
  1620.     @angle += @angling
  1621.     @zoom_x += @zooming_x
  1622.     @zoom_y += @zooming_y
  1623.     # 更新精灵的坐标
  1624.     @move_x += @moving_x
  1625.     @move_y += @moving_y
  1626.     # 往返循环时动作反转
  1627.     if @loop && @time == 0
  1628.       @time = N01::ANIME_PATTERN + 1
  1629.       action_loop
  1630.     end
  1631.   end  
  1632.   #--------------------------------------------------------------------------
  1633.   # ● 单位更新
  1634.   #--------------------------------------------------------------------------
  1635.   def update
  1636.     super
  1637.     # 旋转、更新放大缩小
  1638.     self.angle = @angle
  1639.     self.zoom_x = @zoom_x
  1640.     self.zoom_y = @zoom_y
  1641.     # 更新精灵的坐标
  1642.     self.x = @battler.position_x + @move_x + @plus_x
  1643.     self.y = @battler.position_y + @move_y + @plus_y
  1644.     self.z = @battler.position_z + @move_z - 1
  1645.   end
  1646. end

  1647. #==============================================================================
  1648. # ■ Game_Battler (分割定义 1)
  1649. #------------------------------------------------------------------------------
  1650. #  处理角色的类。
  1651. #==============================================================================
  1652. class Game_Battler
  1653.   #--------------------------------------------------------------------------
  1654.   # ● 公开变数
  1655.   #--------------------------------------------------------------------------
  1656.   attr_accessor :hp_damage        # 行动結果: HP 伤害
  1657.   attr_accessor :mp_damage        # 行动結果: MP 伤害
  1658.   attr_accessor :move_x           # X方向的移动修正
  1659.   attr_accessor :move_y           # Y方向的移动修正
  1660.   attr_accessor :move_z           # Z方向的移动修正
  1661.   attr_accessor :jump             # 修正跳跃
  1662.   attr_accessor :active           # 是否主动
  1663.   attr_accessor :non_dead         # 不死身标志
  1664.   attr_accessor :dying            # 即死标志
  1665.   attr_accessor :slip_damage      # 连续伤害标志
  1666.   attr_accessor :derivation       # 技能连发ID
  1667.   attr_accessor :individual       # 技能连发ID
  1668.   attr_accessor :play             # 动作情报
  1669.   attr_accessor :force_action     # 强制动作情报
  1670.   attr_accessor :force_target     # 目标变更情报
  1671.   attr_accessor :revival          # 復活
  1672.   attr_accessor :double_damage    # HPMP两方同时伤害
  1673.   attr_accessor :reflex           # 技能反射情报
  1674.   attr_accessor :absorb           # 技能成本吸收
  1675.   attr_reader   :base_position_x  # 初期配置X坐标
  1676.   attr_reader   :base_position_y  # 初期配置Y座標   
  1677.   attr_accessor :force_damage     # 事件的伤害
  1678.   #--------------------------------------------------------------------------
  1679.   # ● 客观初期化
  1680.   #--------------------------------------------------------------------------
  1681.   alias initialize_n01 initialize
  1682.   def initialize
  1683.     initialize_n01
  1684.     @move_x = @move_y = @move_z = @plus_y = @jump = @derivation = @play = 0
  1685.     @force_action = @force_target = @base_position_x = @base_position_y = 0
  1686.     @absorb = @act_time = @force_damage = 0
  1687.     @active = @non_dead = @individual = @slip_damage = @revival = false
  1688.     @double_damage = @dying = false
  1689.   end
  1690.   #--------------------------------------------------------------------------
  1691.   # ● 返还最新的状态ID
  1692.   #--------------------------------------------------------------------------
  1693.   def state_id
  1694.     return @states[@states.size - 1]
  1695.   end
  1696.   #--------------------------------------------------------------------------
  1697.   # ● 判定技能的使用可能  ※再定义
  1698.   #--------------------------------------------------------------------------
  1699.   def skill_can_use?(skill)
  1700.     return false unless skill.is_a?(RPG::Skill)
  1701.     return false unless movable?
  1702.     return false if silent? and skill.spi_f > 0
  1703.     if skill.extension.include?("HP消耗")
  1704.       return false if calc_mp_cost(skill) > hp
  1705.     else
  1706.       return false if calc_mp_cost(skill) > mp
  1707.     end
  1708.     if $game_temp.in_battle
  1709.       return skill.battle_ok?
  1710.     else
  1711.       return skill.menu_ok?
  1712.     end
  1713.   end
  1714.   #--------------------------------------------------------------------------
  1715.   # ● 技能的消费 MP 计算  ※再定义
  1716.   #--------------------------------------------------------------------------
  1717.   def calc_mp_cost(skill)
  1718.     if half_mp_cost && !skill.extension.include?("MP消耗减半无效")
  1719.       cost = skill.mp_cost / 2
  1720.     else
  1721.       cost = skill.mp_cost
  1722.     end
  1723.     if skill.extension.include?("%成本MAX")
  1724.       return self.maxhp * cost / 100 if skill.extension.include?("HP消耗")
  1725.       return self.maxmp * cost / 100
  1726.     elsif skill.extension.include?("%成本NOW")
  1727.       return self.hp * cost / 100 if skill.extension.include?("HP消耗")
  1728.       return self.mp * cost / 100
  1729.     end
  1730.     return cost
  1731.   end
  1732.   #--------------------------------------------------------------------------
  1733.   # ● 技能成本消费
  1734.   #--------------------------------------------------------------------------
  1735.   def consum_skill_cost(skill)
  1736.     return false unless skill_can_use?(skill)
  1737.     cost = calc_mp_cost(skill)
  1738.     return self.hp -= cost if skill.extension.include?("HP消耗")
  1739.     return self.mp -= cost
  1740.   end
  1741.   #--------------------------------------------------------------------------
  1742.   # ● 根据通常攻击计算伤害  修正二刀流
  1743.   #--------------------------------------------------------------------------
  1744.   alias make_attack_damage_value_n01 make_attack_damage_value
  1745.   def make_attack_damage_value(attacker)
  1746.     make_attack_damage_value_n01(attacker)
  1747.     # 只有在装备了两把武器时修正有效
  1748.     return unless attacker.actor?
  1749.     return if attacker.weapons[0] == nil
  1750.     return if attacker.weapons[1] == nil
  1751.     @hp_damage = @hp_damage * N01::TWO_SWORDS_STYLE[0] / 100
  1752.   end
  1753.   #--------------------------------------------------------------------------
  1754.   # ● 根据技能或者物品来计算伤害 修正二刀流
  1755.   #--------------------------------------------------------------------------
  1756.   alias make_obj_damage_value_n01 make_obj_damage_value
  1757.   def make_obj_damage_value(user, obj)
  1758.     make_obj_damage_value_n01(user, obj)
  1759.     # 只有在装备了两把武器时修正有效
  1760.     return unless user.actor?
  1761.     return if user.weapons[0] == nil
  1762.     return if user.weapons[1] == nil
  1763.     if obj.damage_to_mp  
  1764.       @mp_damage = @mp_damage * N01::TWO_SWORDS_STYLE[1] / 100 # 伤害MP
  1765.     else
  1766.       @hp_damage = @hp_damage * N01::TWO_SWORDS_STYLE[1] / 100 # 伤害HP
  1767.     end
  1768.   end
  1769.   #--------------------------------------------------------------------------
  1770.   # ● 使用通常攻击的効果  全部战斗不能,不能绝对回避的处理
  1771.   #--------------------------------------------------------------------------
  1772.   def perfect_attack_effect(attacker)
  1773.     clear_action_results
  1774.     make_attack_damage_value(attacker)            # 计算伤害
  1775.     execute_damage(attacker)                      # 反映伤害
  1776.     apply_state_changes(attacker)                 # 状态变化
  1777.   end
  1778.   #--------------------------------------------------------------------------
  1779.   # ● 使用技能的效果  全部战斗不能,不能绝对回避的处理
  1780.   #--------------------------------------------------------------------------
  1781.   def perfect_skill_effect(user, skill)
  1782.     clear_action_results
  1783.     make_obj_damage_value(user, skill)            # 伤害計算
  1784.     make_obj_absorb_effect(user, skill)           # 吸収効果計算
  1785.     execute_damage(user)                          # 伤害反映
  1786.     apply_state_changes(skill)                    # 状态变化
  1787.   end
  1788.   #--------------------------------------------------------------------------
  1789.   # ● 使用物品的効果  全部战斗不能,不能绝对回避的处理
  1790.   #--------------------------------------------------------------------------
  1791.   def perfect_item_effect(user, item)
  1792.     clear_action_results
  1793.     hp_recovery = calc_hp_recovery(user, item)    # 计算HP的回复量
  1794.     mp_recovery = calc_mp_recovery(user, item)    # 计算MP的回复量
  1795.     make_obj_damage_value(user, item)             # 计算伤害
  1796.     @hp_damage -= hp_recovery                     # 扣除HP的回复量
  1797.     @mp_damage -= mp_recovery                     # 扣除MP的回复量
  1798.     make_obj_absorb_effect(user, item)            # 计算吸收效果
  1799.     execute_damage(user)                          # 反映伤害
  1800.     item_growth_effect(user, item)                # 使用成长效果
  1801.     if item.physical_attack and @hp_damage == 0   # 物理ノーダメージ判定
  1802.       return                                    
  1803.     end
  1804.     apply_state_changes(item)                     # 状态变化
  1805.   end
  1806.   #--------------------------------------------------------------------------
  1807.   # ● 伤害的反映
  1808.   #--------------------------------------------------------------------------
  1809.   alias execute_damage_n01 execute_damage
  1810.   def execute_damage(user)
  1811.     execute_damage_n01(user)
  1812.     # 吸収时这里的处理相冲
  1813.     if @absorbed               
  1814.       user.hp_damage = -@hp_damage
  1815.       user.mp_damage = -@mp_damage
  1816.     end
  1817.   end
  1818.   #--------------------------------------------------------------------------
  1819.   # ● 使用技能的効果
  1820.   #--------------------------------------------------------------------------
  1821.   alias skill_effect_n01 skill_effect
  1822.   def skill_effect(user, obj)
  1823.     # 保持变化前的HPMP
  1824.     nowhp = self.hp
  1825.     nowmp = self.mp
  1826.     # 为了计算现在HPMP的威力获取变化前的使用者的HPMP
  1827.     if obj.extension.include?("HP消耗")
  1828.       user_hp = user.hp + user.calc_mp_cost(obj)
  1829.       user_mp = user.mp
  1830.     else  
  1831.       user_hp = user.hp
  1832.       user_mp = user.mp + user.calc_mp_cost(obj)
  1833.     end  
  1834.     # 确认扩张设定
  1835.     check_extension(obj)
  1836.     # 计算伤害
  1837.     skill_effect_n01(user, obj)
  1838.     # 有伤害系的扩张时这里的处理会相冲
  1839.     if @extension
  1840.       self.hp = nowhp
  1841.       self.mp = nowmp
  1842.     end
  1843.     # 攻击未名中时中断处理
  1844.     return if self.evaded or self.missed
  1845.     # 变换伤害属性
  1846.     damage = @hp_damage unless obj.damage_to_mp
  1847.     damage = @mp_damage if obj.damage_to_mp
  1848.     # 比例伤害
  1849.     if @ratio_maxdamage != nil
  1850.       damage = self.maxhp * @ratio_maxdamage / 100 unless obj.damage_to_mp
  1851.       damage = self.maxmp * @ratio_maxdamage / 100 if obj.damage_to_mp
  1852.     end
  1853.     if @ratio_nowdamage != nil
  1854.       damage = self.hp * @ratio_nowdamage / 100 unless obj.damage_to_mp
  1855.       damage = self.mp * @ratio_nowdamage / 100 if obj.damage_to_mp
  1856.     end
  1857.     # 成本威力
  1858.     if @cost_damage
  1859.       cost = user.calc_mp_cost(obj)
  1860.       if obj.extension.include?("HP消耗")
  1861.         damage = damage * cost / user.maxhp
  1862.       else
  1863.         damage = damage * cost / user.maxmp
  1864.       end
  1865.     end
  1866.     # 現在HP威力
  1867.     damage = damage * user_hp / user.maxhp if @nowhp_damage
  1868.     # 現在MP威力
  1869.     damage = damage * user_mp / user.maxmp if @nowmp_damage
  1870.     # 放弃伤害属性的变换
  1871.     @hp_damage = damage unless obj.damage_to_mp
  1872.     @mp_damage = damage if obj.damage_to_mp
  1873.     # 反应扩张
  1874.     if @extension
  1875.       self.hp -= @hp_damage
  1876.       self.mp -= @mp_damage
  1877.     end
  1878.     # 初期化
  1879.     @extension = false
  1880.     @cost_damage = false
  1881.     @nowhp_damage = false
  1882.     @nowmp_damage = false
  1883.     @ratio_maxdamage = nil
  1884.     @ratio_nowdamage = nil
  1885.   end
  1886.   #--------------------------------------------------------------------------
  1887.   # ● 确认扩张设定
  1888.   #--------------------------------------------------------------------------
  1889.   def check_extension(skill)
  1890.     for ext in skill.extension
  1891.       # 成本威力
  1892.       if ext == "成本威力"  
  1893.         @extension = true
  1894.         next @cost_damage = true
  1895.       # 現在HP威力
  1896.       elsif ext == "现HP威力"
  1897.         @extension = true
  1898.         next @nowhp_damage = true
  1899.       # 現在MP威力
  1900.       elsif ext == "现MP威力"
  1901.         @extension = true
  1902.         next @nowmp_damage = true
  1903.       else
  1904.         # 比例伤害
  1905.         name = ext.split('')
  1906.         if name[5] == "M"
  1907.           name = name.join
  1908.           name.slice!("%伤害MAX/")
  1909.           @extension = true
  1910.           next @ratio_maxdamage = name.to_i
  1911.         elsif name[5] == "N"
  1912.           name = name.join
  1913.           name.slice!("%伤害NOW/")
  1914.           @extension = true
  1915.           next @ratio_nowdamage = name.to_i
  1916.         end  
  1917.       end
  1918.     end  
  1919.   end
  1920.   #--------------------------------------------------------------------------
  1921.   # ● 初期配置的変更
  1922.   #--------------------------------------------------------------------------
  1923.   def change_base_position(x, y)
  1924.     @base_position_x = x
  1925.     @base_position_y = y
  1926.   end
  1927.   #--------------------------------------------------------------------------
  1928.   # ● 初期化
  1929.   #--------------------------------------------------------------------------
  1930.   def reset_coordinate
  1931.     @move_x = @move_y = @move_z = @jump = @derivation = 0
  1932.     @active = @non_dead = @individual = false   
  1933.   end
  1934.   #--------------------------------------------------------------------------
  1935.   # ● 使用连续伤害的効果
  1936.   #--------------------------------------------------------------------------
  1937.   def slip_damage_effect
  1938.     if slip_damage? and @hp > 0
  1939.       @hp_damage = apply_variance(maxhp / 10, 10)
  1940.       @hp_damage = @hp - 1 if @hp_damage >= @hp
  1941.       self.hp -= @hp_damage
  1942.     end
  1943.   end
  1944.   #--------------------------------------------------------------------------
  1945.   # ● 事件的伤害POP
  1946.   #--------------------------------------------------------------------------
  1947.   def damage_num(num = nil)
  1948.     return if dead? or !$game_temp.in_battle or num == 0
  1949.     @force_damage = num
  1950.   end
  1951. end  
  1952. #==============================================================================
  1953. # ■ Game_Actor
  1954. #------------------------------------------------------------------------------
  1955. #  处理主人公的类。
  1956. #==============================================================================
  1957. class Game_Actor < Game_Battler
  1958.   #--------------------------------------------------------------------------
  1959.   # ● 公开变数
  1960.   #--------------------------------------------------------------------------
  1961.   attr_accessor :two_swords_change          # 强制替换二刀流的标志
  1962.   #--------------------------------------------------------------------------
  1963.   # ● 根据ID判定技能是否习得
  1964.   #--------------------------------------------------------------------------
  1965.   def skill_id_learn?(skill_id)
  1966.     return @skills.include?(skill_id)
  1967.   end
  1968.   #--------------------------------------------------------------------------
  1969.   # ● 判定技能的使用可能  ※再定义
  1970.   #--------------------------------------------------------------------------
  1971.   def skill_can_use?(skill)
  1972.     return super
  1973.   end
  1974.   #--------------------------------------------------------------------------
  1975.   # ● 图片的变更
  1976.   #--------------------------------------------------------------------------
  1977.   def graphic_change(character_name)
  1978.     @character_name = character_name
  1979.   end
  1980.   #--------------------------------------------------------------------------
  1981.   # ● 击倒的实行 ※再定义
  1982.   #--------------------------------------------------------------------------
  1983.   def perform_collapse
  1984.     Sound.play_actor_collapse if $game_temp.in_battle and dead?
  1985.   end
  1986.   #--------------------------------------------------------------------------
  1987.   # ● 初期配置的取得
  1988.   #--------------------------------------------------------------------------
  1989.   def base_position
  1990.     base = N01::ACTOR_POSITION[self.index]
  1991.     @base_position_x = base[0]
  1992.     @base_position_y = base[1]
  1993.     # バックアタック時はX軸を逆に
  1994.     @base_position_x = Graphics.width - base[0] if $back_attack && N01::BACK_ATTACK
  1995.   end
  1996.   #--------------------------------------------------------------------------
  1997.   # ● 战斗画面 X 坐标的取得
  1998.   #--------------------------------------------------------------------------
  1999.   def position_x
  2000.     return 0 if self.index == nil
  2001.     return @base_position_x + @move_x
  2002.   end
  2003.   #--------------------------------------------------------------------------
  2004.   # ● 战斗画面 Y 坐标的取得
  2005.   #--------------------------------------------------------------------------
  2006.   def position_y
  2007.     return 0 if self.index == nil
  2008.     return @base_position_y + @move_y + @jump
  2009.   end
  2010.   #--------------------------------------------------------------------------
  2011.   # ● 战斗画面 Z 坐标的取得
  2012.   #--------------------------------------------------------------------------
  2013.   def position_z
  2014.     return 0 if self.index == nil
  2015.     return self.index + @base_position_y + @move_y + @move_z - @jump + 200
  2016.   end  
  2017. end
  2018. #==============================================================================
  2019. # ■ Game_Enemy
  2020. #------------------------------------------------------------------------------
  2021. #  处理敌方的类。
  2022. #==============================================================================
  2023. class Game_Enemy < Game_Battler
  2024.   #--------------------------------------------------------------------------
  2025.   # ● 公开变数
  2026.   #--------------------------------------------------------------------------
  2027.   attr_accessor :adj_speed        # 复数会合行动的速度修正
  2028.   attr_accessor :act_time         # 行动数回
  2029.   #--------------------------------------------------------------------------
  2030.   # ● 动作速度的決定 复数回合行动用
  2031.   #--------------------------------------------------------------------------
  2032.   def make_action_speed2(adj)
  2033.     @adj_speed = self.action.speed if @adj_speed == nil
  2034.     @adj_speed = @adj_speed * adj / 100
  2035.   end
  2036.   #--------------------------------------------------------------------------
  2037.   # ● 击倒的实行 ※再定义
  2038.   #--------------------------------------------------------------------------
  2039.   def perform_collapse
  2040.     @force_action = ["N01collapse"] if $game_temp.in_battle and dead?
  2041.   end
  2042.   #--------------------------------------------------------------------------
  2043.   # ● 获取初期配置
  2044.   #--------------------------------------------------------------------------
  2045.   def base_position
  2046.     return if self.index == nil
  2047.     # 确认角色画像的大小修正Y坐标
  2048.     bitmap = Bitmap.new("Graphics/Battlers/" + @battler_name) if !self.anime_on
  2049.     bitmap = Bitmap.new("Graphics/Characters/" + @battler_name) if self.anime_on && N01::WALK_ANIME
  2050.     bitmap = Bitmap.new("Graphics/Characters/" + @battler_name + "_1") if self.anime_on && !N01::WALK_ANIME
  2051.     height = bitmap.height
  2052.     @base_position_x = self.screen_x + self.position_plus[0]
  2053.     @base_position_y = self.screen_y + self.position_plus[1] - height / 3
  2054.     bitmap.dispose
  2055.     # 背后攻击时X轴逆转
  2056.     if $back_attack && N01::BACK_ATTACK
  2057.       @base_position_x = Graphics.width - self.screen_x - self.position_plus[0]
  2058.     end
  2059.   end
  2060.   #--------------------------------------------------------------------------
  2061.   # ● 战斗画面 X 坐标的取得
  2062.   #--------------------------------------------------------------------------
  2063.   def position_x
  2064.     return @base_position_x - @move_x
  2065.   end
  2066.   #--------------------------------------------------------------------------
  2067.   # ● 战斗画面 Y 坐标的取得
  2068.   #--------------------------------------------------------------------------
  2069.   def position_y
  2070.     return @base_position_y + @move_y + @jump
  2071.   end
  2072.   #--------------------------------------------------------------------------
  2073.   # ● 战斗画面 Z 坐标的取得
  2074.   #--------------------------------------------------------------------------
  2075.   def position_z
  2076.     return position_y + @move_z - @jump + 200
  2077.   end
  2078. end
  2079. #==============================================================================
  2080. # ■ Sprite_Damage
  2081. #------------------------------------------------------------------------------
  2082. #  伤害表示的精灵。
  2083. #==============================================================================
  2084. class Sprite_Damage < Sprite_Base
  2085.   #--------------------------------------------------------------------------
  2086.   # ● 公开变数
  2087.   #--------------------------------------------------------------------------
  2088.   attr_accessor :battler
  2089.   #--------------------------------------------------------------------------
  2090.   # ● 客观初期化
  2091.   #--------------------------------------------------------------------------
  2092.   def initialize(viewport,battler = nil)
  2093.     super(viewport)
  2094.     @battler = battler
  2095.     @damage = 0
  2096.     @duration = 0
  2097.     @x = 0
  2098.     @y = 0
  2099.     @z_plus = 0
  2100.     @minus = false
  2101.     @num1 = Sprite.new(viewport)
  2102.     @num2 = Sprite.new(viewport)
  2103.     @num3 = Sprite.new(viewport)
  2104.     @num4 = Sprite.new(viewport)
  2105.     @num5 = Sprite.new(viewport)
  2106.     @num1.visible = false
  2107.     @num2.visible = false
  2108.     @num3.visible = false
  2109.     @num4.visible = false
  2110.     @num5.visible = false
  2111.   end
  2112.   #--------------------------------------------------------------------------
  2113.   # ● 更新
  2114.   #--------------------------------------------------------------------------
  2115.   def update
  2116.     force_damage
  2117.     move_damage(@num5, @pop_time) if @num5.visible
  2118.     move_damage(@num4, @pop_time - 2) if @num4.visible
  2119.     move_damage(@num3, @pop_time - 4) if @num3.visible
  2120.     move_damage(@num2, @pop_time - 6) if @num2.visible
  2121.     move_damage(@num1, @pop_time - 8) if @num1.visible
  2122.     move_window if @window != nil
  2123.     @duration -= 1 if @duration > 0
  2124.   end
  2125.   #--------------------------------------------------------------------------
  2126.   # ● 事件的伤害POP
  2127.   #--------------------------------------------------------------------------
  2128.   def force_damage
  2129.     if @battler.force_damage != 0
  2130.       damage_pop(@battler.force_damage)
  2131.       if @battler.state?(20)             # 薄葬
  2132.         if @battler.force_damage >= @battler.hp
  2133.           @battler.hp = 1
  2134.         else
  2135.           @battler.hp -= @battler.force_damage
  2136.         end  
  2137.       else  
  2138.         @battler.hp -= @battler.force_damage
  2139.       end
  2140.       @force_damage = true
  2141.       @battler.force_damage = 0
  2142.       $game_temp.status_window_refresh = true
  2143.     end
  2144.   end
  2145.   #--------------------------------------------------------------------------
  2146.   # ● 数値的移动
  2147.   #--------------------------------------------------------------------------
  2148.   def move_damage(num, min)
  2149.     case @duration
  2150.     when min-1..min
  2151.       num.x -= 1
  2152.       num.y -= 4
  2153.     when min-3..min-2
  2154.       num.x -= 1
  2155.       num.y -= 3
  2156.     when min-6..min-4
  2157.       num.y -= 2
  2158.     when min-14..min-7
  2159.       num.y += 2
  2160.     when min-17..min-15
  2161.       num.y -= 2
  2162.     when min-23..min-18
  2163.       num.y += 1
  2164.     when min-27..min-24
  2165.       num.y -= 1
  2166.     when min-30..min-28
  2167.       num.y += 1
  2168.     when min-33..min-31
  2169.       num.y -= 1
  2170.     when min-36..min-34
  2171.       num.y += 1
  2172.     end
  2173.     next_damage if @battler.double_damage && @duration == min-34
  2174.     num.opacity = 256 - (12 - @duration) * 32
  2175.     num.visible = false if @duration == 0
  2176.     if @force_damage && @duration == 0
  2177.       @force_damage = false
  2178.       @battler.perform_collapse
  2179.     end
  2180.   end
  2181.   #--------------------------------------------------------------------------
  2182.   # ● 文字窗口的移动
  2183.   #--------------------------------------------------------------------------
  2184.   def move_window
  2185.     @window.x -= 6 if @window_time > 0 && @window.x > 0
  2186.     @window_time -= 1
  2187.     if @duration == 0
  2188.       @window.dispose
  2189.       @window = nil
  2190.     end
  2191.   end  
  2192.   #--------------------------------------------------------------------------
  2193.   # ● HPMP两方同时伤害
  2194.   #--------------------------------------------------------------------------
  2195.   def next_damage
  2196.     @battler.hp_damage = 0
  2197.     @battler.double_damage = false
  2198.     damage_pop
  2199.   end
  2200.   #--------------------------------------------------------------------------
  2201.   # ● 准备伤害POP
  2202.   #--------------------------------------------------------------------------
  2203.   def damage_pop(num = nil)
  2204.     reset
  2205.     damage = battler.hp_damage
  2206.     # 抽出状态的变化
  2207.     states = battler.added_states
  2208.     text = ""
  2209.     # MP伤害用文本(HPMP两方同时伤害除外)
  2210.     if [email protected]_damage && @battler.mp_damage != 0
  2211.       text = N01::POP_MP_DAM if battler.mp_damage > 0
  2212.       text = N01::POP_MP_REC if battler.mp_damage < 0
  2213.       damage = battler.mp_damage
  2214.     end
  2215.     # 连续伤害不显示MP伤害以外的文字
  2216.     if num == nil
  2217.       text = N01::POP_DAMAGE0 if damage == 0 && states == [] && !battler.revival
  2218.       text = N01::POP_MISS if battler.missed && states == []
  2219.       text = N01::POP_EVA if battler.evaded
  2220.       text = N01::POP_CRI if battler.critical
  2221.       for state in states
  2222.         # 无POP设定的状态不显示
  2223.         unless state.extension.include?("无POP")
  2224.           text += " " if text != ""
  2225.           text += state.name
  2226.         end
  2227.       end
  2228.     else
  2229.       damage = num
  2230.     end
  2231.     text = $data_states[$show_state].name unless $show_state == nil
  2232.     $show_state = nil
  2233.     # 区分伤害和回复
  2234.     @minus = false
  2235.     @minus = true if damage < 0
  2236.     damage = damage.abs
  2237.     # 略微调整POP位置
  2238.     adjust = -16
  2239.     adjust = 16 if $back_attack
  2240.     adjust = 0 if damage == 0
  2241.     @x = battler.position_x + adjust
  2242.     @y = battler.position_y
  2243.     window(text) if text != ""
  2244.     @pop_time = N01::NUM_DURATION
  2245.     # 没有伤害时没有数字的POP
  2246.     return @duration = @pop_time if damage == 0
  2247.     @num_time = -1
  2248.     damage_file(@num1, damage % 10, @pop_time - 7) if damage >= 0
  2249.     damage_file(@num2, (damage % 100)/10, @pop_time - 5) if damage >= 10
  2250.     damage_file(@num3, (damage % 1000)/100, @pop_time - 3) if damage >= 100
  2251.     damage_file(@num4, (damage % 10000)/1000, @pop_time - 1) if damage >= 1000
  2252.     damage_file(@num5, (damage % 100000)/10000, @pop_time + 1) if damage >= 10000
  2253.   end  
  2254.   #--------------------------------------------------------------------------
  2255.   # ● 准备情报窗口
  2256.   #--------------------------------------------------------------------------
  2257.   def window(text)
  2258.     @window = Window_Damage.new(@x - 64, @y - 22)
  2259.     @window.opacity = 0
  2260.     @window.pop_text(text)
  2261.     @window_time = 5
  2262.   end  
  2263.   #--------------------------------------------------------------------------
  2264.   # ● 准备数字画像
  2265.   #--------------------------------------------------------------------------
  2266.   def damage_file(num, cw, dur)
  2267.     num.visible = true
  2268.     # 判別文件
  2269.     file = N01::DAMAGE_GRAPHICS
  2270.     file = N01::RECOVER_GRAPHICS if @minus
  2271.     # 数字
  2272.     num.bitmap = Cache.system(file)
  2273.     @num_time += 1
  2274.     sx = num.bitmap.width / 10
  2275.     num.src_rect.set(cw * sx, 0, sx, num.height)
  2276.     num.x = @x - (num.width + N01::NUM_INTERBAL) * @num_time
  2277.     num.y = @y
  2278.     num.z = 2000 - @num_time
  2279.     @duration = dur
  2280.     @window.x = num.x - @window.width + 64 if @window != nil && N01::NON_DAMAGE_WINDOW
  2281.     @window.x = num.x - @window.width + 26 if @window != nil && !N01::NON_DAMAGE_WINDOW
  2282.     @window.x = 0 if @window != nil && @window.x < 0
  2283.   end
  2284.   #--------------------------------------------------------------------------
  2285.   # ● 伤害组合
  2286.   #--------------------------------------------------------------------------
  2287.   def reset
  2288.     @num5.visible = @num4.visible = @num3.visible = @num2.visible = @num1.visible = false
  2289.     @window.dispose if @window != nil
  2290.     @window = nil
  2291.   end  
  2292.   #--------------------------------------------------------------------------
  2293.   # ● 開放
  2294.   #--------------------------------------------------------------------------
  2295.   def dispose
  2296.     super
  2297.     @num1.dispose
  2298.     @num2.dispose
  2299.     @num3.dispose
  2300.     @num4.dispose
  2301.     @num5.dispose
  2302.     @window.dispose if @window != nil
  2303.   end  
  2304. end
  2305. #==============================================================================
  2306. # ■ Window_Damage
  2307. #------------------------------------------------------------------------------
  2308. #  危机等表示的窗口。
  2309. #==============================================================================
  2310. class Window_Damage < Window_Base
  2311.   #--------------------------------------------------------------------------
  2312.   # ● 客观初期化
  2313.   #--------------------------------------------------------------------------
  2314.   def initialize(x, y)
  2315.     super(x, y, 160, 48)
  2316.     self.opacity = 0 if N01::NON_DAMAGE_WINDOW
  2317.   end
  2318.   #--------------------------------------------------------------------------
  2319.   # ● 窗口内容的作成
  2320.   #--------------------------------------------------------------------------
  2321.   def create_contents
  2322.     self.contents.dispose
  2323.     self.contents = Bitmap.new(width - 32, height - 32)
  2324.   end
  2325.   #--------------------------------------------------------------------------
  2326.   # ● 状态设定
  2327.   #--------------------------------------------------------------------------
  2328.   def pop_text(text, align = 1)
  2329.     self.contents.clear
  2330.     self.width = self.contents.text_size(text).width + 36
  2331.     self.contents = Bitmap.new(width - 32, height - 32)
  2332.     self.contents.font.color = normal_color
  2333.     self.contents.font.size = 16
  2334.     self.contents.draw_text(0,-8, width - 32, 32, text, align)
  2335.   end  
  2336. end  
  2337. #==============================================================================
  2338. # ■ Window_Base
  2339. #------------------------------------------------------------------------------
  2340. #  游戏中处理所有窗口的超级类。
  2341. #==============================================================================
  2342. class Window_Base < Window  
  2343.   #--------------------------------------------------------------------------
  2344.   # ● 状态的描画  ※再定义(反映设定不显示状态ICON)
  2345.   #--------------------------------------------------------------------------
  2346.   def draw_actor_state(actor, x, y, width = 96)
  2347.     count = 0
  2348.     for state in actor.states
  2349.       break if state.extension.include?("不显示ICON")
  2350.       draw_icon(state.icon_index, x + 24 * count, y)
  2351.       count += 1
  2352.       break if (24 * count > width - 24)
  2353.     end
  2354.   end
  2355. end
  2356. #==============================================================================
  2357. # ■ Game_Temp
  2358. #------------------------------------------------------------------------------
  2359. #  不包含存储数据、处理一时数据的类。
  2360. #==============================================================================
  2361. class Game_Temp
  2362.   #--------------------------------------------------------------------------
  2363.   # ● 公开变数
  2364.   #--------------------------------------------------------------------------
  2365.   attr_accessor :status_window_refresh    # 状态窗口的还原标志
  2366.   #--------------------------------------------------------------------------
  2367.   # ● 客观初期化
  2368.   #--------------------------------------------------------------------------
  2369.   alias initialize_n01 initialize
  2370.   def initialize
  2371.     initialize_n01
  2372.     @status_window_refresh = false
  2373.   end
  2374. end  
  2375. #==============================================================================
  2376. # ■ Game_Interpreter
  2377. #------------------------------------------------------------------------------
  2378. #  实行时间指令的解释。
  2379. #==============================================================================
  2380. class Game_Interpreter
  2381.   #--------------------------------------------------------------------------
  2382.   # ● HP 的增减
  2383.   #--------------------------------------------------------------------------
  2384.   def command_311
  2385.     if $game_temp.in_battle
  2386.       value = operate_value(@params[1], @params[2], @params[3])
  2387.       iterate_actor_id(@params[0]) do |actor|
  2388.         next if actor.dead?
  2389.         if @params[4] == false and actor.hp + value <= 0
  2390.           actor.damage_num(actor.hp - 1) # 如果不允许战斗不能时变为1
  2391.         else
  2392.           actor.damage_num(-value)
  2393.         end
  2394.       end
  2395.       return true
  2396.     else
  2397.       value = operate_value(@params[1], @params[2], @params[3])
  2398.       iterate_actor_id(@params[0]) do |actor|
  2399.         next if actor.dead?
  2400.         if @params[4] == false and actor.hp + value <= 0
  2401.           actor.hp = 1    # 如果不允许战斗不能时变为1
  2402.         else
  2403.           actor.hp += value
  2404.         end
  2405.         actor.perform_collapse
  2406.       end
  2407.       if $game_party.all_dead?
  2408.         $game_temp.next_scene = "gameover"
  2409.       end
  2410.       return true
  2411.     end  
  2412.   end
  2413.   #--------------------------------------------------------------------------
  2414.   # ● 敌角色的 HP 增减
  2415.   #--------------------------------------------------------------------------
  2416.   def command_331
  2417.     value = operate_value(@params[1], @params[2], @params[3])
  2418.     iterate_enemy_index(@params[0]) do |enemy|
  2419.       if enemy.hp > 0
  2420.         if @params[4] == false and enemy.hp + value <= 0
  2421.           enemy.damage_num(enemy.hp - 1) # 如果不允许战斗不能时变为1
  2422.         else
  2423.           enemy.damage_num(-value)
  2424.         end
  2425.       end
  2426.     end
  2427.     return true
  2428.   end
  2429. end  
  2430. #==============================================================================
  2431. # ■ Game_Party
  2432. #------------------------------------------------------------------------------
  2433. #  パーティを扱うクラスです。
  2434. #==============================================================================
  2435. class Game_Party < Game_Unit
  2436.   #--------------------------------------------------------------------------
  2437.   # ● アクターを加える
  2438.   #     actor_id : アクター ID
  2439.   #--------------------------------------------------------------------------
  2440.   alias add_actor_n01 add_actor
  2441.   def add_actor(actor_id)
  2442.     add_actor_n01(actor_id)
  2443.     $party_change = true if actor_id == 4
  2444.   end
  2445.   #--------------------------------------------------------------------------
  2446.   # ● アクターを外す
  2447.   #     actor_id : アクター ID
  2448.   #--------------------------------------------------------------------------
  2449.   alias remove_actor_n01 remove_actor
  2450.   def remove_actor(actor_id)
  2451.     remove_actor_n01(actor_id)
  2452.     $party_change = true if actor_id == 4
  2453.   end
  2454. end  
  2455.   
  2456.   
  2457.   
  2458.   
复制代码
有大神吗?
[

Lv1.梦旅人

梦石
0
星屑
38
在线时间
1165 小时
注册时间
2012-3-16
帖子
5336
2
发表于 2012-10-28 19:15:17 | 只看该作者
  1. #--------------------------------------------------------------------------
  2. # ● 角色动画的设定
  3. #--------------------------------------------------------------------------
  4.   # 文件No…使用战斗动作图的号码。
  5.   #             0的情况是使用行走图对应。
  6.   #             1以后的是像"人物行走图文件名+_1"这样,参照文件名后的附加数字
  7.   #             来判别的。例)$拉尔夫_1 的文件名No是1
  8.   #             战斗动作图全部都是从人物行走图文件夹内读取。
  9.   #
  10.   # 种类…战斗动作图的分隔纵列。从上开始0到3依次。
  11.   # 速度…动画的更新速度。数值越低更新速度越快。
  12.   # 循环… [0=往复循环] [1=循环一次] [2=不循环]
  13.   # 等待…不循环(2)的情况下、到动画显示结束的等待时间。
  14.   # 固定…如果动画不作固定的情况、指定分割号码(横向位置)。不固定的情况是-1。反向再生是-2。
  15.   # Z轴…在面前显示的话是正数。相较通常情况靠前的显示。
  16.   # 影…表示阴影效果的话是true、不表示为false
  17.   # 武器…武器表示的情况填入武器动作名。不表示的情况为""。
  18.   
复制代码
注意95行开始的介绍

然后把112开始的动画设置第一个全改成0
例如
                             ↓
"待机"            => [ 0,  0,  30,   0,   0,  -1,   0, true,"普通待机武器" ],

点评

到底怎么解决给个办法...  发表于 2012-10-30 20:03

评分

参与人数 1星屑 +80 收起 理由
咕噜 + 80 认可答案

查看全部评分

我想要到的是保护同伴的力量,能与同伴一起欢笑的未来的力量,如果无法做到的话,那就无需继承,如果是这样的彭格列的话,那我亲手毁掉它!
  
                       欢迎加入我们的家族~
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
46
在线时间
33 小时
注册时间
2012-8-25
帖子
93
3
 楼主| 发表于 2012-10-28 21:51:48 | 只看该作者
彭格列第XI代 发表于 2012-10-28 19:15
注意95行开始的介绍

然后把112开始的动画设置第一个全改成0

具体怎么弄讲讲好吗,我理解能力差的毛病又范了......

那个代码怎么用?

点评

问他=w=我偷懒~  发表于 2012-10-31 17:39
搞错了是种类- -  发表于 2012-10-30 20:23
那那个类型呢?  发表于 2012-10-30 20:22
文件NO1的话,对应的行走图是角色行走图名后面加“_1”NO2的话就是"_2"一次类推。  发表于 2012-10-30 20:15
你那个怎么用  发表于 2012-10-30 20:10
[
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
48
在线时间
2459 小时
注册时间
2011-12-18
帖子
1484
4
发表于 2012-10-28 22:10:12 | 只看该作者
LZ可以着重理解这几行解释,XI代的方法不推荐使用。
  1. # 文件No…使用战斗动作图的号码。
  2.   #             0的情况是使用行走图对应。
  3.   #             1以后的是像"人物行走图文件名+_1"这样,参照文件名后的附加数字
  4.   #             来判别的。例)$拉尔夫_1 的文件名No是1
  5.   #             战斗动作图全部都是从人物行走图文件夹内读取。
复制代码
当然了,如果LZ不使用臼井的那一些成套的角色行走图,XI代的方法可行。

点评

是不是就是在行走图后面+1行了  发表于 2012-10-30 19:46
555...QAQ  发表于 2012-10-29 16:35

评分

参与人数 1星屑 +80 收起 理由
咕噜 + 80 认可答案

查看全部评分

这是一个深不见底的坑,这是一个广袤无边的坑,我才刚刚放上了一抔泥土……

《六道·陈国篇》开坑了……↓点我
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-5-22 09:07

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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