红狼游戏网 →  资讯首页  → 正文
rm.66rpg.com
 
 
新人制作的一个游戏:英雄之路
2017年09月14日 来源:rm.66rpg.com 点击率:1058
 
查看: 1207|回复: 18
打印 上一主题 下一主题

[新手游戏] [游戏发布] 新人制作的一个游戏:英雄之路

[复制链接]

剑士

VIP
0
好人卡
3
经验
9257
在线时间
146 小时
注册时间
2014-12-16
帖子
50
跳转到指定楼层
1
发表于 2015-2-21 17:45:22 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式
游戏发布
游戏类型:RPG 角色扮演
版本信息:英雄之路V0.10
制作工具:RPG Maker XP
游戏时长:3 小时
下载地址:http://pan.baidu.com/s/1gd3W97X
游戏介绍:
      一个非常普通的游戏,暂时只完成了10%左右,没有剧情,只是一路打BOSS,仅此而已。
      游戏一共有五种属性,分别为无、火、冰、光、暗。
      游戏的职业一共有三个系,每个系有3个职业,共计9个职业,分别是剑士系(侠客,战士,魔剑士),法师系(元素师,冰结师,贤者),格斗家系(拳师,街霸,气功师)。

职业介绍:
      侠客,位置是中卫,物理输出能力较中庸,但命中率、暴击率均较高,技能以无属性为主,火属性为辅,技能威力取决于攻击力、速度、灵巧。
      战士,位置是前卫,拥有极高的物理输出,但命中率较低,技能以无属性为主,技能威力取决于攻击力、力量。
      魔剑士,位置是前卫,拥有较高的魔法输出,所有技能均为群体攻击,技能以无、火、冰、光属性为主,技能威力取决于攻击力、魔力。
      元素师,位置是后卫,拥有极高的魔法输出,技能以火、冰、光、暗属性为主,技能威力取决于魔力。
      冰结师,位置是后卫,拥有较高的魔法输出以及较高的命中率,技能均为冰属性,技能威力取决于魔力、速度。
      贤者,位置是前卫,拥有极高的辅助能力,是目前唯一一个有治疗技能的职业,技能均为光属性,技能威力取决于魔力。
      拳师,位置是中卫,物理输出能力、暴击率均较高,技能均为无属性,技能威力取决于攻击力、灵巧。
      街霸,位置是中卫,为物理、魔法混合输出,拥有极高的控制能力,技能以无、火、暗属性为主,技能威力取决于攻击力、力量、魔力。
      气功师,位置是后卫,魔法输出能力、辅助能力均较高,技能均为光属性,技能威力取决于魔力。

一些提示:
      1.当前版本复活药十分稀少,请不要乱用;
      2.游戏开始时的选人,请在阅读上面的职业介绍后再做决定,一旦选择好后,以后都无法进行更改;
      3.加点时请慎重,一旦确认加点后,以后都无法进行更改;
      4.本游戏尚未完成,难免存在些不好的地方,可能还有bug,随时欢迎提出建议。

游戏截图:
      
      
      
      
      
      

素材来源:
      脚本素材:
            66RPG论坛
      音乐素材:
            地下城与勇士
            怪物猎人2G
            热血海贼王
            最终幻想14
            金书江湖
      图片素材:
            地下城与勇士
            东方苍神缘起
            热血海贼王
            金书江湖
            66RPG论坛

安全性:
      该下载经过360杀毒软件查杀,确认无毒。
      

评分

参与人数 2经验 +20 收起 理由
永恒の未知数 + 10 塞糖
邪月长啸 + 10 塞糖DNF大赞

查看全部评分

qliphoth.exe 中的 0x1i-666 确认到未处理的异常。

写入位置 0x00-000 时发生访问冲突。

您想忽略此错误并尝试继续吗? <Y/N>...[ ]

===CARNAGE===

恶gn善iod道ru知能oy似no相yr们gn我a与s经i已do人G那

着doo活lfe远永rif就g吃n子i果r的b树o命t生t摘又n手a伸w他怕d恐n在a现

见习天使

VIP
38
好人卡
7
经验
52355
在线时间
821 小时
注册时间
2014-5-5
帖子
938
2
发表于 2015-2-21 22:35:53 | 只看该作者
试玩了一会,想吐槽
为什么初期使用技能比普通攻击还弱。。。
技能威力还是要调高些,要不平砍就OK还要技能干嘛
然后呢,我发现那个伤害美化的暴击好眼熟
仔细看了下,发现那素材是我合成的。。。。

剑士

VIP
0
好人卡
3
经验
9257
在线时间
146 小时
注册时间
2014-12-16
帖子
50
3
 楼主| 发表于 2015-2-22 09:13:38 | 只看该作者
邪月长啸 发表于 2015-2-21 22:35
试玩了一会,想吐槽
为什么初期使用技能比普通攻击还弱。。。
技能威力还是要调高些,要不平砍就O ...

感谢建议!
因为一开始时技能伤害过高,所以我削弱了所有的技能,没想到反而使技能伤害过低了,现在正在努力修改中。那个伤害美化素材看着挺好看的,所以我就拿来用了
qliphoth.exe 中的 0x1i-666 确认到未处理的异常。

写入位置 0x00-000 时发生访问冲突。

您想忽略此错误并尝试继续吗? <Y/N>...[ ]

===CARNAGE===

恶gn善iod道ru知能oy似no相yr们gn我a与s经i已do人G那

着doo活lfe远永rif就g吃n子i果r的b树o命t生t摘又n手a伸w他怕d恐n在a现

见习天使

VIP
38
好人卡
7
经验
52355
在线时间
821 小时
注册时间
2014-5-5
帖子
938
4
发表于 2015-2-22 09:47:59 | 只看该作者
一一得一123 发表于 2015-2-22 09:13
感谢建议!
因为一开始时技能伤害过高,所以我削弱了所有的技能,没想到反而使技能伤害过低了, ...

恕我无礼
查看了你游戏工程的数据库
觉得还是把怪物HP提高些,相对应的技能伤害就能提高了
能有人用我的素材,那也是我的荣幸,高兴ING...

贤者

VIP
8
好人卡
6
经验
48808
在线时间
596 小时
注册时间
2014-5-8
帖子
699
5
发表于 2015-2-22 10:31:11 | 只看该作者
刚开始的难个什么试练,怎么打都不掉血,你确定能玩?

剑士

VIP
0
好人卡
3
经验
9257
在线时间
146 小时
注册时间
2014-12-16
帖子
50
6
 楼主| 发表于 2015-2-22 10:41:45 | 只看该作者
布罗利 发表于 2015-2-22 10:31
刚开始的难个什么试练,怎么打都不掉血,你确定能玩?

我打了可以掉血啊。会不会是你没有装备武器?

点评

连个提示都没有,还以为是BUG呢,然后那个马戏团有点太难了吧,不过游戏整体还是比较好玩  发表于 2015-2-22 20:35
去买- -  发表于 2015-2-22 16:02
根本就没有武器啊  发表于 2015-2-22 15:54
qliphoth.exe 中的 0x1i-666 确认到未处理的异常。

写入位置 0x00-000 时发生访问冲突。

您想忽略此错误并尝试继续吗? <Y/N>...[ ]

===CARNAGE===

恶gn善iod道ru知能oy似no相yr们gn我a与s经i已do人G那

着doo活lfe远永rif就g吃n子i果r的b树o命t生t摘又n手a伸w他怕d恐n在a现

圣骑士

VIP
0
好人卡
0
经验
23747
在线时间
463 小时
注册时间
2014-5-9
帖子
112
7
发表于 2015-2-22 15:38:49 | 只看该作者
本帖最后由 a965645462 于 2015-2-22 15:47 编辑

刚开始新手指导员的试炼去打 没有掉一点血   而且不能逃跑 你叫怎么人怎么玩啊?
(战斗总结的获得的经验、金币颜色  不要弄成黑色- -)
吐槽:(找了半天要干嘛、、、结果一牌子上显示着“要挑战哪里?”能不能弄点提示? 亲!

剑士

VIP
0
好人卡
3
经验
9257
在线时间
146 小时
注册时间
2014-12-16
帖子
50
8
 楼主| 发表于 2015-2-22 18:31:50 | 只看该作者
a965645462 发表于 2015-2-22 15:38
刚开始新手指导员的试炼去打 没有掉一点血   而且不能逃跑 你叫怎么人怎么玩啊?
(战斗总结的获得的经验、 ...

谢谢建议
qliphoth.exe 中的 0x1i-666 确认到未处理的异常。

写入位置 0x00-000 时发生访问冲突。

您想忽略此错误并尝试继续吗? <Y/N>...[ ]

===CARNAGE===

恶gn善iod道ru知能oy似no相yr们gn我a与s经i已do人G那

着doo活lfe远永rif就g吃n子i果r的b树o命t生t摘又n手a伸w他怕d恐n在a现

贤者

VIP
8
好人卡
6
经验
48808
在线时间
596 小时
注册时间
2014-5-8
帖子
699
9
发表于 2015-2-22 21:10:48 | 只看该作者
过了马戏团彻底玩不下去了,实在没太大耐心。游戏的整体不错,尤其是那个第一个副本的那个高级宝箱,不然我玩到第二个副本游戏就删除了,游戏的一些敌人属性貌似太难了,如果这方面调好,在把素材原创或者调整一下,绝对是一神作。总之游戏还是比较耐玩的,祝楼主越做越好...

剑士

VIP
0
好人卡
3
经验
9257
在线时间
146 小时
注册时间
2014-12-16
帖子
50
10
 楼主| 发表于 2015-2-23 08:32:54 | 只看该作者
布罗利 发表于 2015-2-22 21:10
过了马戏团彻底玩不下去了,实在没太大耐心。游戏的整体不错,尤其是那个第一个副本的那个高级宝箱,不然我 ...

谢谢建议,我会加油的!
qliphoth.exe 中的 0x1i-666 确认到未处理的异常。

写入位置 0x00-000 时发生访问冲突。

您想忽略此错误并尝试继续吗? <Y/N>...[ ]

===CARNAGE===

恶gn善iod道ru知能oy似no相yr们gn我a与s经i已do人G那

着doo活lfe远永rif就g吃n子i果r的b树o命t生t摘又n手a伸w他怕d恐n在a现
楼主: 一一得一123
打印 上一主题 下一主题

[新手游戏] [游戏发布] 新人制作的一个游戏:英雄之路

[复制链接]

万物创造者

会吐槽的画师

VIP
429
好人卡
14
经验
145577
在线时间
3369 小时
注册时间
2011-6-10
帖子
6427

怡然自得

11
发表于 2015-2-24 08:55:45 | 只看该作者
差强人意

骑士

VIP
0
好人卡
0
经验
12764
在线时间
155 小时
注册时间
2015-1-10
帖子
157
12
发表于 2015-3-6 20:28:45 | 只看该作者
赞!话说楼主,你那个不同颜色的字是怎么弄出来的?脚本?教教我呗?

剑士

VIP
0
好人卡
3
经验
9257
在线时间
146 小时
注册时间
2014-12-16
帖子
50
13
 楼主| 发表于 2015-3-7 09:01:37 | 只看该作者
我用的是这个脚本:物品分类+物品颜色,要一起用才有效@小孩纸大呵呵  

Project1.rar

191.64 KB, 下载次数: 2

qliphoth.exe 中的 0x1i-666 确认到未处理的异常。

写入位置 0x00-000 时发生访问冲突。

您想忽略此错误并尝试继续吗? <Y/N>...[ ]

===CARNAGE===

恶gn善iod道ru知能oy似no相yr们gn我a与s经i已do人G那

着doo活lfe远永rif就g吃n子i果r的b树o命t生t摘又n手a伸w他怕d恐n在a现

骑士

VIP
0
好人卡
0
经验
12764
在线时间
155 小时
注册时间
2015-1-10
帖子
157
14
发表于 2015-3-7 10:38:14 | 只看该作者
一一得一123 发表于 2015-3-7 09:01
我用的是这个脚本:物品分类+物品颜色,要一起用才有效@小孩纸大呵呵

谢谢,话说楼主你那个技能攻击还真是低啊,打得无比心累。。不过还是很赞!

骑士

VIP
0
好人卡
0
经验
12764
在线时间
155 小时
注册时间
2015-1-10
帖子
157
15
发表于 2015-3-7 11:14:49 | 只看该作者
一一得一123 发表于 2015-3-7 09:01
我用的是这个脚本:物品分类+物品颜色,要一起用才有效@小孩纸大呵呵

再物品后面加@4、@6无效啊?怎么回事?

点评

我发给你的范例里有设置方法的,自己去看吧  发表于 2015-3-7 12:22

骑士

VIP
0
好人卡
0
经验
12764
在线时间
155 小时
注册时间
2015-1-10
帖子
157
16
发表于 2015-3-7 11:56:05 | 只看该作者
一一得一123 发表于 2015-3-7 09:01
我用的是这个脚本:物品分类+物品颜色,要一起用才有效@小孩纸大呵呵

还有那个45度的脚本可以不可以给我,我也想弄。

剑士

VIP
0
好人卡
3
经验
9257
在线时间
146 小时
注册时间
2014-12-16
帖子
50
17
 楼主| 发表于 2015-3-7 12:20:34 | 只看该作者
小孩纸大呵呵 发表于 2015-3-7 11:56
还有那个45度的脚本可以不可以给我,我也想弄。

战斗的脚本就是这个:
  1. =begin
  2.   #--------------------------------------------------------------------------
  3.  # ● 人物行走图做战斗图像(附加动画) ver1.02
  4.   #--------------------------------------------------------------------------
  5.   制作者 らい
  6.   翻译:忧郁的涟漪
  7.   
  8.    
  9.   图像文件的规格
  10.   
  11.   ● 巴特勒图像(似乎指的是战斗图像)
  12.   
  13.   使用步行图片。
  14.    
  15.   ● 武器的图像
  16.   
  17.   就是武器图标的图像(ICO图)  
  18.       

  19. ###############################################################################
  20. 行走图横版战斗:
  21. ------------------------------------------------------------------------------
  22. 经过了两次的修改,终于完全实现了远距离攻击的效果(弓箭、铳类)
  23. 另外,也实现了简单的回旋攻击(类似回力镖的攻击)和攻击道具(类似石头或炸弹)

  24. 这个脚本的更动分为2部分:
  25. 1)战斗动作 - 新加了数个动作,如:“弓箭攻击”、“远距离发动”等等
  26. 2)战斗动画 - 基本上是脚本原带的。只是这个功能被隐藏起来了。现在已恢复。

  27. 用法:
  28. 在相应的脚本行加入武器/技能/道具的数据库id(id之间要用“,”来分开)
  29. 如果不要某些功能的话就随便填一个外太空id就行了(没有用到的id)
  30. 1)战斗动作(角色/行走图的动作)
  31. 脚本355行:  远程武器的id  (普通攻击时使用远程射击)
  32. 脚本357行:  回旋武器的id  (普通攻击时会飞回手上的武器,如:回力镖)
  33. 脚本370行:  远程技能的id  (使用技能时是远程射击)
  34. 脚本372行:  回旋技能的id  (使用技能时,飞出的武器会飞回手上)

  35. 2)战斗动画(显示‘对象方的动画'之前先显示‘飞行武器射去敌人身上'的动画)
  36. 脚本453行:  回旋武器的id  (攻击时会显示一段类似回力镖的动画)
  37. 脚本455行:  弓箭武器的id  (攻击时会显示箭射去敌人身上的动画)
  38. 脚本457行:  铳类武器的id  (攻击时会显示子弹射去敌人身上的动画)
  39. 脚本470行:  回旋技能的id  (技能使用时会显示一段类似回力镖的动画)
  40. 脚本472行:  弓箭技能的id  (技能使用时会显示箭射去敌人身上的动画)
  41. 脚本474行:  铳类技能的id  (技能使用时会显示子弹射去敌人身上的动画)
  42. 脚本486行:  抛击道具的id  (使用该道具时,道具被丢到敌人身上)

  43. 〉注意:
  44. 〉‘飞行武器射去敌人身上'的动画是在设定id之后的那句脚本里面设置
  45. 〉例子:(脚本第455和456行)
  46. 〉       when 17,18,19,20    #远程武器1(弓箭类)的id
  47. 〉       return [101,32,false,false]
  48. 〉这样,武器17~20(都是弓箭)在显示‘对象方的动画'之前会先显示第101号动画
  49. 〉而动画的轨道是从使用者身上直到敌人身上(实现子弹射出的效果)
  50.   
  51. 还有:
  52. 战斗队伍的画面位置已经被修改过,
  53. 让角色的位置与默认的战斗背景图不会有视觉上的冲突。
  54. 如果要更改请去脚本第113-116行改改就行了。

  55. 脚本‘Arrow_Enemy'和‘Arrow_Actor'被稍微修改过(可以无视)

  56. 这个范例附带了
  57. 一张经过修改的战斗背景图(027-castle03),其他的战斗背景图可以使用默认的。
  58. 一套横版的默认敌人的战斗图(从行走图改过来的)

  59. =end                                                        #modify by darkten
  60. ###############################################################################
  61.   
  62. module Side_view
  63.   #--------------------------------------------------------------------------
  64.   # ● 是否与RATB并用 ☆自动识别(这到是不错~省了~)
  65.   #    在Scene_Battle计算方法是否是方法synthe?
  66.   #    在自动不想认识的时候,请重写。
  67.   #--------------------------------------------------------------------------
  68.   if Scene_Battle.method_defined?("synthe?")
  69.     RTAB = true
  70.   else
  71.     RTAB = false
  72.   end
  73.   #--------------------------------------------------------------------------
  74.   # ● 改正RATB中的位置误差 ☆自动识别
  75.   #    在自动不想认识的时候,请重写。
  76.   #--------------------------------------------------------------------------
  77.   def camera_correctness
  78.     return false if !RTAB
  79.     begin
  80.       return $scene.drive
  81.     rescue
  82.       return false
  83.     end
  84.   end
  85.   #--------------------------------------------------------------------------
  86.   # ● 队伍中的最大人数
  87.   #--------------------------------------------------------------------------
  88.   Party_max = 4
  89.   #--------------------------------------------------------------------------
  90.   # ● 战斗图的扩大率(1.0的时候是保持原有大小)
  91.   #--------------------------------------------------------------------------
  92.   CHAR_ZOOM = 1.0
  93.   #--------------------------------------------------------------------------
  94.   # ● 光标的位置修正(基本不需要改~)
  95.   #--------------------------------------------------------------------------
  96.   ARROW_OX = 0
  97.   ARROW_OY = 64
  98.   #--------------------------------------------------------------------------
  99.   # ● 名状态作为飞行管理的排列(不知道什么意思....)
  100.   #--------------------------------------------------------------------------
  101.   FLY_STATES = ["飛行"]
  102.   #--------------------------------------------------------------------------
  103.   # ● 战斗画面的位置
  104.   #--------------------------------------------------------------------------
  105.   PARTY_X = 455     # 队伍 X 位置
  106.   PARTY_Y = 200     # 队伍 Y 位置
  107.   FORMATION_X = 15  # 各个角色之间的间隔 X
  108.   FORMATION_Y = 35  # 各个角色之间的间隔 Y
  109.   #--------------------------------------------------------------------------
  110.   # ● 自定义常数
  111.   #--------------------------------------------------------------------------
  112.   NORMAL   = "NORMAL"
  113.   WALK_R   = "WALK_R"
  114.   WALK_L   = "WALK_L"
  115.   ATTACK   = "ATTACK"
  116.   ATTACK_R = "ATTACK_R"
  117.   ATTACK_L = "ATTACK_L"
  118.   MAGIC    = "MAGIC"
  119.   ITEM     = "ITEM"
  120.   # 动画的设定
  121.   ANIME = {
  122.     # [画像ID,是否循环,アニメスピード,动画速度,不能指向动画,武器放在右手or左手]
  123.     NORMAL            => [1,true , 0,false, true ,""    ], # 通常待击
  124.     WALK_R            => [2,true , 2,false, false,""    ], # 右移动
  125.     WALK_L            => [1,true , 2,false, false,""    ], # 左移动
  126.     ATTACK_R          => [1,false, 2,true , false,"右手"], # 右手攻击
  127.     ATTACK_L          => [1,false, 2,true , false,"左手"], # 左手攻击
  128.     MAGIC             => [1,false, 2,false, false,""    ], # 右手攻击
  129.     ITEM              => [1,false, 2,false, false,""    ], # 左手攻击
  130.     }
  131.    
  132.   # 债务不履行声明价值的设定(一个字一个字翻译的,不知道啥意思)  
  133.   ANIME.default = [1,false,12,false,"",""]
  134.   
  135.   # 在行动设定的时候 右手攻击 or 左手攻击 辨别を(这个不知道什么意思)的ANIME
  136.   # "角色动画变更#ATTACK"在玩了と(还是不知道啥意思..)的时候,辨别ATTACK_R或者ATTACK_L
  137.   DUAL_WEAPONS_ANIME = [ATTACK]
  138.   
  139.   #--------------------------------------------------------------------------
  140.   # ● 摇晃的设定
  141.   #--------------------------------------------------------------------------
  142.   SHAKE_FILE = "摇晃"  # 文件名
  143.   SHAKE_POWER = 5          # 强度
  144.   SHAKE_SPEED = 5          # 速度
  145.   SHAKE_DURATION = 5      # 时间
  146.   #--------------------------------------------------------------------------
  147.   # ● 上下反转地的设定
  148.   #--------------------------------------------------------------------------
  149.   UPSIDE_DOWN_FILE = "上下反转" # 文件名
  150.   #--------------------------------------------------------------------------
  151.   # ● 左右反转地的设定
  152.   #--------------------------------------------------------------------------
  153.   REVERSE_FILE = "左右反转" # 文件名
  154.   #--------------------------------------------------------------------------
  155.   # ● 回转地的设定
  156.   #--------------------------------------------------------------------------
  157.   TURNING_FILE = "回转" # 文件名
  158.   TURNING_DIRECTION = 1 # 方向(1.逆时针,-1.顺时针)(|||-_-汗..怎么还有用-1做带入值的...)
  159.   TURNING_SPEED = 40    # 速度
  160.   TURNING_DURATION = 1  # 回转数
  161.   #--------------------------------------------------------------------------
  162.   # ● 移动的设定
  163.   #--------------------------------------------------------------------------
  164.   MOVE_FILE = "移动"             # 文件名
  165.   MOVE_RETURN = 1                # 回到原来的位置吗?(光写了个1,也不知道不回到该怎么写?0?)
  166.   MOVE_SPEED = 32                # 速度
  167.   MOVE_COORDINATES = [0,-640]    # 原来位置的相对坐标
  168.   #--------------------------------------------------------------------------
  169.   # ● 动画追加的设定
  170.   #--------------------------------------------------------------------------
  171.   ADD_ANIME_FILE = "动画追加"  # 文件名
  172.   ADD_ANIME_ID = 0               # 动画的ID
  173.   #--------------------------------------------------------------------------
  174.   # ● 债务不履行声明和RTAB的数据转换
  175.   #--------------------------------------------------------------------------
  176.   def convert_battler
  177.     return RTAB ? @active_actor : @active_battler
  178.   end
  179.   #--------------------------------------------------------------------------
  180.   # ● 债务不履行声明和RTAB的数据转换2
  181.   #--------------------------------------------------------------------------
  182.   def convert_battler2(*arg)
  183.     return RTAB ? arg[0] : @active_battler
  184.   end
  185. end

  186. #--------------------------------------------------------------------------
  187. # ● 行动設定
  188. #--------------------------------------------------------------------------
  189. module BattleActions
  190.   
  191.   # 下のものはあくまでも一例なので
  192.   # 独自に作ってください。

  193.   Actions = {

  194.   "通常攻撃" => [
  195.   
  196.   "閃きアニメ",
  197.   "アクターアニメ変更#WALK_L",
  198.   "移動#target,32,0,64,0",
  199.   "行動アニメ",
  200.   "アクターアニメ変更#ATTACK",
  201.   "遠距離アニメ",
  202.   "対象アニメ",
  203.   "アクターアニメ変更#WALK_L",
  204.   "SEの演奏#016-Jump02,80,100",
  205.   "移動#self,0,0,48,32",
  206.   "終了"
  207.   ],

  208.   "エネミー攻撃" => [
  209.   
  210.   "閃きアニメ",
  211.   "アクターアニメ変更#WALK_L",
  212.   "移動#self,-36,0,12,0",
  213.   "行動アニメ",
  214.   "アクターアニメ変更#ATTACK",
  215.   "遠距離アニメ",
  216.   "対象アニメ",
  217.   "アクターアニメ変更#WALK_L",
  218.   "移動#self,0,0,12,0",
  219.   "終了"
  220.   ],
  221.   
  222.   "術発動" => [
  223.   
  224.   "閃きアニメ",
  225.   "アクターアニメ変更#WALK_L",
  226.   "移動#self,-32,0,4,0",
  227.   "アクターアニメ変更#MAGIC",
  228.   "行動アニメ",
  229.   "ウエイト#15",
  230.   "遠距離アニメ",
  231.   "対象アニメ",
  232.   "アクターアニメ変更#WALK_L",
  233.   "移動#self,0,0,4,2",
  234.   "終了"
  235.   ],

  236.   "アイテム使用" => [
  237.   
  238.   "閃きアニメ",
  239.   "アクターアニメ変更#WALK_L",
  240.   "移動#self,-32,0,4,0",
  241.   "行動アニメ",
  242.   "アクターアニメ変更#ITEM",
  243.   "ウエイト#15",
  244.   "遠距離アニメ",
  245.   "対象アニメ",
  246.   "アクターアニメ変更#WALK_L",
  247.   "移動#self,0,0,4,2",
  248.   "終了"
  249.   ],
  250.   
  251.   "払い抜け" => [
  252.   
  253.   "閃きアニメ",
  254.   "アクターアニメ変更#WALK_L",
  255.   "移動#target_near,50,0,48,30",  
  256.   "左右反転",
  257.   "アクターアニメ固定#ATTACK#3",
  258.   "行動アニメ",
  259.   "SEの演奏#135-Light01,100,100",
  260.   "アニメーションの表示#self,42",
  261.   "ウエイト#15",
  262.   "左右反転",
  263.   "残像表示",
  264.   "移動#target_far,-50,0,48,0",
  265.   "対象アニメ",
  266.   "残像消去",
  267.   "アニメ固定解除",
  268.   "アクターアニメ変更#WALK_L",
  269.   "移動#self,0,0,48,1,0",
  270.   "終了"
  271.   ],

  272.   "弓箭攻撃" => [
  273.   
  274.   "閃きアニメ",
  275.   "アクターアニメ変更#WALK_L",
  276.   "移動#self,-32,0,4,0",
  277.   "行動アニメ",
  278.   "アクターアニメ変更#ATTACK",
  279.   "遠距離アニメ",
  280.   "対象アニメ",
  281.   "アクターアニメ変更#WALK_L",
  282.   "移動#self,0,0,4,2",
  283.   "終了"
  284.   ],

  285.   "回旋攻撃" => [
  286.   
  287.   "閃きアニメ",
  288.   "アクターアニメ変更#WALK_L",
  289.   "移動#self,-32,0,4,0",
  290.   "行動アニメ",
  291.   "アクターアニメ変更#STAND_L",  
  292.   "遠距離アニメ",
  293.   "対象アニメ",
  294.   "アクターアニメ変更#WALK_L",
  295.   "移動#self,0,0,4,2",
  296.   "終了"
  297.   ],
  298.   
  299.   "远距离発動" => [
  300.   
  301.   "閃きアニメ",
  302.   "アクターアニメ変更#WALK_L",
  303.   "移動#self,-32,0,4,0",
  304.   "アクターアニメ変更#MAGIC",
  305.   "行動アニメ",
  306.   "アクターアニメ変更#ATTACK",
  307.   "遠距離アニメ",
  308.   "対象アニメ",
  309.   "アクターアニメ変更#WALK_L",
  310.   "移動#self,0,0,4,2",
  311.   "終了"
  312.   ],
  313.   
  314.   "回旋発動" => [
  315.   
  316.   "閃きアニメ",
  317.   "アクターアニメ変更#WALK_L",
  318.   "移動#self,-32,0,4,0",
  319.   "アクターアニメ変更#MAGIC",
  320.   "行動アニメ",
  321.   "アクターアニメ変更#STAND_L",  
  322.   "遠距離アニメ",
  323.   "対象アニメ",
  324.   "アクターアニメ変更#WALK_L",
  325.   "移動#self,0,0,4,2",
  326.   "終了"
  327.   ],

  328.   } # ここで終わり 消さないでください

  329. end
  330.   
  331. module RPG
  332.   class Weapon
  333.     #--------------------------------------------------------------------------
  334.     # ● アクション設定
  335.     #--------------------------------------------------------------------------
  336.     def battle_actions
  337.       case @id
  338.       when 999  # 远程武器的id回旋攻撃
  339.         return BattleActions::Actions["弓箭攻撃"]
  340.       when 999                       # 回旋武器的id
  341.         return BattleActions::Actions["回旋攻撃"]
  342.       end
  343.       else
  344.       return BattleActions::Actions["通常攻撃"]
  345.     end
  346.   end
  347.   class Skill
  348.     #--------------------------------------------------------------------------
  349.     # ● アクション設定
  350.     #--------------------------------------------------------------------------
  351.     def battle_actions
  352.       case @id
  353.       when 999  # 远程技能的id
  354.         return BattleActions::Actions["远距离発動"]
  355.       when 999                       # 回旋技能的id
  356.         return BattleActions::Actions["回旋発動"]
  357.       end
  358.       else
  359.       if self.magic?
  360.         return BattleActions::Actions["術発動"]
  361.       else
  362.         return BattleActions::Actions["払い抜け"]
  363.       end
  364.     end
  365.   end
  366.   class Item
  367.     #--------------------------------------------------------------------------
  368.     # ● アクション設定
  369.     #--------------------------------------------------------------------------
  370.     def battle_actions
  371.       return BattleActions::Actions["アイテム使用"]
  372.     end
  373.   end
  374. end
  375. class Game_Enemy < Game_Battler
  376.   #--------------------------------------------------------------------------
  377.   # ● アクション設定
  378.   #--------------------------------------------------------------------------
  379.   def battle_actions
  380.     return BattleActions::Actions["エネミー攻撃"]
  381.   end
  382. end
  383. =begin
  384. #--------------------------------------------------------------------------
  385. # ● 遠距離アニメーション
  386. #--------------------------------------------------------------------------
  387.  ☆ 説明
  388.   
  389.    行動者から対象者にアニメを飛ばします。
  390.    飛ばすアニメを データベース‐アニメーション で作ります。
  391.     [アニメーションID, スピード, 往復するか?,直線(false)or曲線(true)] で指定します。


  392.   ● カスタマイズ方法
  393.    
  394.     case @id
  395.     when 17,18,19,20
  396.       return [101,32,false,false]
  397.     when 21,22,23,24
  398.       return [102,32,false,false]
  399.     end
  400.     return 0
  401.    
  402.     のように描くとID別に指定可能です。
  403.    
  404.    
  405.   ● アニメーションID
  406.   
  407.   飛ばすアニメーションIDです。短い場合は繰り返しで表示されます。
  408.   
  409.    
  410.   ● スピード
  411.   
  412.   大きいほうが早い(0だとアニメは移動しません)
  413.   
  414.   1 = 1フレームで1ドット進むと考えてください。
  415.   
  416.   ● 往復するか?
  417.   
  418.   true とした場合、ブーメランのようにアニメが戻ります。
  419.   
  420.   ● 直線(false)or曲線(true)
  421.   
  422.   true  = 対象に向かって曲線で、アニメが飛びます。(修正の余地ありですが・・・)
  423.   false = 対象に向かって直線で、アニメが飛びます。
  424.    
  425. =end
  426. module RPG
  427.   class Weapon
  428.     #--------------------------------------------------------------------------
  429.     # ● 遠距離アニメーション
  430.     #--------------------------------------------------------------------------
  431.     def flying_anime
  432.       # ID 指定 の例(武器的id,分类是根据飞行武器的动画id)
  433.       case @id
  434.       when 34             #回旋武器(类似回力镖)的id
  435.         return [103,32,true,true]
  436.       when 17,18,19,20    #远程武器1(弓箭类)的id
  437.         return [101,32,false,false]
  438.       when 21,22,23,24    #远程武器2(铳类)的id
  439.         return [102,32,false,false]
  440.       end
  441.       return [0,0,false,false]
  442.     end
  443.   end
  444.   class Skill
  445.     #--------------------------------------------------------------------------
  446.     # ● 遠距離アニメーション
  447.     #--------------------------------------------------------------------------
  448.     def flying_anime
  449.       # ID 指定 の例(技能的id,分类是根据飞行武器的动画id)
  450.       case @id
  451.       when 82             #回旋技能(类似回力镖)的id
  452.         return [103,32,true,true]
  453.       when 73,74,75,76    #远程技能1(弓箭类)的id
  454.         return [101,32,false,false]
  455.       when 77,78,79,80    #远程技能2(铳类)的id
  456.         return [102,32,false,false]
  457.       end
  458.       return [0,0,false,false]
  459.     end
  460.   end
  461.   class Item
  462.     #--------------------------------------------------------------------------
  463.     # ● 遠距離アニメーション
  464.     #--------------------------------------------------------------------------
  465.     def flying_anime
  466.       case @id
  467.       when 34    #抛击类道具(如炸弹一类)的id
  468.         return [104,32,false,true]
  469.       end
  470.       return [0,0,false,false]
  471.     end
  472.   end
  473. end

  474. class Game_Enemy < Game_Battler
  475.   #--------------------------------------------------------------------------
  476.   # ● 遠距離アニメーション
  477.   #--------------------------------------------------------------------------
  478.   def flying_anime
  479.     return [0,0,false,false]
  480.   end
  481. end
  482. #==============================================================================
  483. # ■ Game_Battler
  484. #==============================================================================
  485. class Game_Battler
  486.   include Side_view
  487.   #--------------------------------------------------------------------------
  488.   # ● 追加・公開インスタンス変数
  489.   #--------------------------------------------------------------------------
  490.   attr_accessor :height                  # 画像の高さ
  491.   attr_accessor :real_x                  # X座標補正
  492.   attr_accessor :real_y                  # Y座標補正
  493.   attr_accessor :real_zoom               # 拡大率
  494.   attr_accessor :wait_count              # アニメーション 待ち時間
  495.   attr_accessor :wait_count2             # アニメーション 待ち時間2
  496.   attr_accessor :pattern                 # アニメーション カウント(キャラ)
  497.   attr_accessor :shake                   # シェイク開始フラッグ
  498.   attr_accessor :reverse                 # 左右反転フラッグ
  499.   attr_accessor :shadow                  # 残像フラッグ
  500.   attr_accessor :flash_flag              # 閃きフラッグ
  501.   attr_reader   :ox                      # X座標補正
  502.   attr_reader   :oy                      # Y座標補正
  503.   attr_reader   :flying_x                # 遠距離アニメX座標
  504.   attr_reader   :flying_y                # 遠距離アニメY座標
  505.   attr_reader   :flying_anime            # 遠距離アニメ
  506.   attr_reader   :animation1_on           # 行動アニメ開始フラッグ
  507.   attr_reader   :animation2_on           # 対象アニメ開始フラッグ
  508.   #--------------------------------------------------------------------------
  509.   # ● デフォルトのアニメーション待ち時間を取得
  510.   #--------------------------------------------------------------------------
  511.   def animation_duration=(animation_duration)
  512.     @_animation_duration = animation_duration
  513.   end
  514.   #--------------------------------------------------------------------------
  515.   # ● バトル開始時のセットアップ
  516.   #--------------------------------------------------------------------------
  517.   def start_battle
  518.     @height = 0
  519.     @real_x = 0
  520.     @real_y = 0
  521.     @real_zoom = 1.0
  522.     @battler_condition = ""
  523.     @action = nil
  524.     @battle_actions = []
  525.     @battler_action = false
  526.     @step = 0
  527.     @anime_on = false
  528.     @wait_count = 0
  529.     @wait_count2 = 0
  530.     @ox = 0
  531.     @oy = 0
  532.     @pattern = 0
  533.     @pattern_log = true
  534.     @pattern_freeze = false
  535.     @condition_freeze = false
  536.     @active = false
  537.     @move_distance = nil
  538.     @move_wait = 0
  539.     @move_coordinates = [0,0,0,0]
  540.     @flying_distance = nil
  541.     @flying_wait = 0
  542.     @flying_x = 0
  543.     @flying_y = 0
  544.     @flash_flag = {}
  545.     self.flying_clear
  546.   end
  547.   #--------------------------------------------------------------------------
  548.   # ● 移動中判定
  549.   #--------------------------------------------------------------------------
  550.   def moving?
  551.     # X座標補正または、Y座標補正が0でなければ、移動中
  552.     return (@ox != 0 or @oy != 0)
  553.   end
  554.   #--------------------------------------------------------------------------
  555.   # ● 移動終了判定
  556.   #--------------------------------------------------------------------------
  557.   def move_end?
  558.     return (@ox == @move_coordinates[0] and @oy == @move_coordinates[1])
  559.   end
  560.   #--------------------------------------------------------------------------
  561.   # ● アクション開始設定
  562.   #--------------------------------------------------------------------------
  563.   def action(flag = true)
  564.     @battler_action = flag
  565.     @animation1_on = false
  566.     @animation2_on = false
  567.     @step = "setup"
  568.   end   
  569.   #--------------------------------------------------------------------------
  570.   # ● アクション中判定
  571.   #--------------------------------------------------------------------------
  572.   def action?
  573.     return @battler_action
  574.   end
  575.   #--------------------------------------------------------------------------
  576.   # ● 閃き判定
  577.   #--------------------------------------------------------------------------
  578.   def flash?
  579.     return @flash_flg
  580.   end
  581.   #--------------------------------------------------------------------------
  582.   # ● 戦闘不能判定
  583.   #--------------------------------------------------------------------------
  584.   def anime_dead?
  585.     if $game_temp.in_battle and !RTAB
  586.       if [2,3,4,5].include?($scene.phase4_step)
  587.         return @last_dead
  588.       end
  589.     end
  590.     return @last_dead = self.dead?
  591.   end
  592.   #--------------------------------------------------------------------------
  593.   # ● ピンチ状態判定
  594.   #--------------------------------------------------------------------------
  595.   def crisis?
  596.     if $game_temp.in_battle and !RTAB
  597.       if [2,3,4,5].include?($scene.phase4_step)
  598.         return @last_crisis
  599.       end
  600.     end
  601.     return @last_crisis = (self.hp <= self.maxhp / 4 or badstate?)
  602.   end
  603.   #--------------------------------------------------------------------------
  604.   # ● バッドステート判定
  605.   #--------------------------------------------------------------------------
  606.   def badstate?
  607.     for i in @states
  608.       unless $data_states[i].nonresistance
  609.         return true
  610.       end
  611.     end
  612.     return false
  613.   end
  614.   #--------------------------------------------------------------------------
  615.   # ● 飛行
  616.   #--------------------------------------------------------------------------
  617.   def fly
  618.     if @fly != nil
  619.       return @fly
  620.     end
  621.     for id in @states
  622.       if FLY_STATES.include?($data_states[id].name)
  623.         return 60
  624.       end
  625.     end
  626.     return 0
  627.   end
  628.   #--------------------------------------------------------------------------
  629.   # ● 遠距離アニメ目標座標の計算
  630.   #--------------------------------------------------------------------------
  631.   def flying_setup
  632.     # 二度目は実行しない
  633.     return if @flying_distance != nil && !camera_correctness
  634.     if RTAB
  635.       targets = @target
  636.     else
  637.       targets = $scene.target_battlers
  638.     end
  639.     # 目的座標を計算
  640.     @f_target_x = 0
  641.     @f_target_y = 0
  642.     for t in targets
  643.       @f_target_x += t.screen_x
  644.       @f_target_y += t.screen_y
  645.     end
  646.     if targets != []
  647.       @f_target_x /= targets.size
  648.       @f_target_y /= targets.size
  649.     else
  650.       @flying_distance = 0
  651.       return
  652.     end
  653.     # 距離の計算
  654.     @flying_distance = (self.screen_x - @f_target_x).abs + (self.screen_y - @f_target_y).abs
  655.   end
  656.   #--------------------------------------------------------------------------
  657.   # ● 遠距離アニメ
  658.   #--------------------------------------------------------------------------
  659.   def flying_animation
  660.     # 戻る
  661.     if @step != "flying" or @flying_distance.nil?
  662.       return [false,true]
  663.     end
  664.     # あらかじめ計算
  665.     self_x = self.screen_x
  666.     self_y = self.screen_y
  667.     @flying_distance = @flying_distance == 0 ? 1 : @flying_distance
  668.     n1 = @flying_wait / @flying_distance.to_f
  669.     if @flying_distance - @flying_wait > @flying_distance / 2
  670.       n2 = 1.0 + 10.0 * @flying_wait / @flying_distance.to_f
  671.     else
  672.       n2 = 1.0 + 10.0 * (@flying_distance - @flying_wait) / @flying_distance.to_f
  673.     end
  674.     if !@flying_anime[4]
  675.       # 直線移動
  676.       x = (self_x + 1.0 * (@f_target_x - self_x) * n1).to_i
  677.       y = (self_y + 1.0 * (@f_target_y - self_y) * n1).to_i
  678.     else
  679.       # 曲線移動
  680.       if !@flying_proceed_end
  681.         x = (self_x + 1.0 * (@f_target_x - self_x) * n1).to_i
  682.         y = (self_y + 1.0 * (@f_target_y - self_y) * n1 - n2**2).to_i
  683.       else
  684.         x = (self_x + 1.0 * (@f_target_x - self_x) * n1).to_i
  685.         y = (self_y + 1.0 * (@f_target_y - self_y) * n1 + n2**2).to_i
  686.       end
  687.     end
  688.     # 座標代入
  689.     @flying_x = x
  690.     @flying_y = y
  691.     # ウエイト
  692.     if !@flying_proceed_end
  693.       # 開始
  694.       @flying_proceed_start = @flying_wait == 0
  695.       @flying_wait += @flying_anime[1]
  696.       @flying_wait = [@flying_wait,@flying_distance].min
  697.       @flying_proceed_end = @flying_wait == @flying_distance
  698.     else
  699.       # 開始
  700.       @flying_return_start = @flying_wait == @flying_distance
  701.       @flying_wait -= @flying_anime[1]
  702.       @flying_wait = [@flying_wait,0].max
  703.       @flying_return_end = @flying_wait == 0
  704.     end
  705.     if @flying_anime[1] == 0
  706.       @flying_end = true
  707.     elsif !@flying_anime[2]
  708.       @flying_end = @flying_proceed_end
  709.     else
  710.       @flying_end = @flying_return_end
  711.     end
  712.     # 値を返す(アニメ開始,アニメ終了)
  713.     return [@flying_proceed_start,@flying_end]
  714.   end
  715.   #--------------------------------------------------------------------------
  716.   # ● 遠距離アニメ初期化
  717.   #--------------------------------------------------------------------------
  718.   def flying_clear
  719.     @flying_proceed_start = false
  720.     @flying_proceed_end = false
  721.     @flying_return_start = false
  722.     @flying_return_end = false
  723.     @flying_end = false
  724.     @flying_anime = [0,0,false]
  725.   end
  726.   #--------------------------------------------------------------------------
  727.   # ● 移動
  728.   #--------------------------------------------------------------------------
  729.   def move
  730.     # 距離の計算
  731.     @move_distance = (@move_coordinates[2] - @move_coordinates[0]).abs +
  732.                      (@move_coordinates[3] - @move_coordinates[1]).abs
  733.     if @move_distance > 0
  734.       return if @ox == @move_coordinates[0] and @oy == @move_coordinates[1]
  735.       array = @move_coordinates
  736.       # ジャンプ補正値の計算
  737.       if @move_distance - @move_wait > @move_distance / 2
  738.         jump = (@move_action[4] * @move_wait / @move_distance.to_f)**2
  739.       else
  740.         jump = (@move_action[4] * (@move_distance - @move_wait) / @move_distance.to_f)**2
  741.       end
  742.       jump = @move_action[4] > 0 ? -jump : jump
  743.       @ox = (array[2] + 1.0 * (array[0] - array[2]) * (@move_distance - @move_wait) / @move_distance.to_f).to_i
  744.       @oy = (array[3] + 1.0 * (array[1] - array[3]) * (@move_distance - @move_wait) / @move_distance.to_f + jump).to_i
  745.       # ウエイト
  746.       @move_wait -= @move_action[3]
  747.       @move_wait = [@move_wait,0].max
  748.     end
  749.   end
  750.   #--------------------------------------------------------------------------
  751.   # ● 移動アクションの取得
  752.   #--------------------------------------------------------------------------
  753.   def get_move_action
  754.     string = @action.split(/#/)[1]
  755.     string = string.split(/,/)
  756.     @move_action = [string[0],string[1].to_i,string[2].to_i,string[3].to_i,string[4].to_i,string[5].to_i]
  757.   end
  758.   #--------------------------------------------------------------------------
  759.   # ● アクションの取得
  760.   #--------------------------------------------------------------------------
  761.   def get_step
  762.     if @action.nil?
  763.       @step = "finish"
  764.       return
  765.     end
  766.     string = @action.split(/#/)[0]
  767.     if string =~ "移動"
  768.       @step = "moving_setup"
  769.     elsif string =~ "アクターアニメ実行"
  770.       @step = "action"
  771.     elsif string =~ "遠距離アニメ"
  772.       @step = "flying"
  773.     elsif string =~ "アクターアニメ変更"
  774.       @step = "change"
  775.     elsif string =~ "行動アニメ"
  776.       @step = "animation1"
  777.     elsif string =~ "対象アニメ"
  778.       @step = "animation2"
  779.     elsif string =~ "ウエイト"
  780.       @step = "wait"
  781.     elsif string =~ "左右反転"
  782.       @step = "reverse"
  783.     elsif string =~ "閃きアニメ"
  784.       @step = "flash"
  785.     elsif string =~ "残像表示"
  786.       @step = "shadow_on"
  787.     elsif string =~ "残像消去"
  788.       @step = "shadow_off"
  789.     elsif string =~ "アクターアニメ固定"
  790.       @step = "freeze"
  791.     elsif string =~ "アニメ固定解除"
  792.       @step = "freeze_lifting"
  793.     elsif string =~ "アニメーションの表示"
  794.       @step = "animation_start"
  795.     elsif string =~ "SEの演奏"
  796.       @step = "play_se"
  797.     else
  798.       @step = "finish"
  799.     end
  800.   end
  801.   #--------------------------------------------------------------------------
  802.   # ● フレーム更新 (次のアクションへ)
  803.   #--------------------------------------------------------------------------
  804.   def update_next
  805.     @action = @battle_actions.shift
  806.     @step = get_step
  807.   end
  808.   #--------------------------------------------------------------------------
  809.   # ● フレーム更新 (動作取得)
  810.   #--------------------------------------------------------------------------
  811.   def update_setup
  812.     # アクションの取得
  813.     self.get_actions
  814.     @action = @battle_actions.shift
  815.     @step = get_step
  816.   end
  817.   #--------------------------------------------------------------------------
  818.   # ● フレーム更新 (移動取得)
  819.   #--------------------------------------------------------------------------
  820.   def update_moving_setup
  821.     # 移動アクションの取得
  822.     self.get_move_action
  823.     # 移動目標の設定
  824.     self.move_setup
  825.     @step = "moving"
  826.   end
  827.   #--------------------------------------------------------------------------
  828.   # ● フレーム更新 (移動)
  829.   #--------------------------------------------------------------------------
  830.   def update_moving
  831.     # 移動
  832.     self.move
  833.     self.condition = @battler_condition
  834.     # 移動完了したら次のステップへ
  835.     if move_end?
  836.       @wait_count = 2
  837.       @action = @battle_actions.shift
  838.       @step = get_step
  839.     end
  840.   end
  841.   #--------------------------------------------------------------------------
  842.   # ● フレーム更新 (アニメ実行)
  843.   #--------------------------------------------------------------------------
  844.   def update_action
  845.     con = @action.split(/#/)[1]
  846.     # 右手・左手を分ける
  847.     if DUAL_WEAPONS_ANIME.include?(con)
  848.       if !@first_weapon and @second_weapon
  849.         con = con + "_L"
  850.       else
  851.         con = con + "_R"
  852.       end
  853.     end
  854.     # アニメ変更
  855.     self.condition = con
  856.     # ループか否か
  857.     if !ANIME[@battler_condition][1]
  858.       self.anime_on
  859.     end
  860.     @action = @battle_actions.shift
  861.     @step = get_step
  862.   end
  863.   #--------------------------------------------------------------------------
  864.   # ● フレーム更新 (遠距離アニメ)
  865.   #--------------------------------------------------------------------------
  866.   def update_flying
  867.     # 目標の設定
  868.     self.flying_setup
  869.     # 遠距離アニメ終了
  870.     if @flying_end
  871.       self.flying_clear
  872.       @action = @battle_actions.shift
  873.       @step = get_step
  874.     end
  875.   end
  876.   #--------------------------------------------------------------------------
  877.   # ● フレーム更新 (アニメ変更)
  878.   #--------------------------------------------------------------------------
  879.   def update_change
  880.     con = @action.split(/#/)[1]
  881.     # 右手・左手を分ける
  882.     if DUAL_WEAPONS_ANIME.include?(con)
  883.       if !@first_weapon and @second_weapon
  884.         con = con + "_L"
  885.       else
  886.         con = con + "_R"
  887.       end
  888.     end
  889.     # アニメ変更
  890.     self.condition = con
  891.     # ループか否か
  892.     if !ANIME[@battler_condition][1]
  893.       self.anime_on
  894.     end
  895.     @action = @battle_actions.shift
  896.     @step = get_step
  897.   end
  898.   #--------------------------------------------------------------------------
  899.   # ● フレーム更新 (行動アニメ)
  900.   #--------------------------------------------------------------------------
  901.   def update_animation1
  902.     @animation1_on = true
  903.     # 行動アニメの後に行動を開始する
  904.     if $scene.phase4_step == 3
  905.       id = RTAB ? @anime1 : $scene.animation1_id
  906.       animation = $data_animations[id]
  907.       frame_max = animation != nil ? animation.frame_max : 0
  908.       @wait_count2 = frame_max * 2
  909.       return
  910.     end
  911.     @action = @battle_actions.shift
  912.     @step = get_step
  913.   end
  914.   #--------------------------------------------------------------------------
  915.   # ● フレーム更新 (対象アニメ)
  916.   #--------------------------------------------------------------------------
  917.   def update_animation2
  918.     @animation2_on = true
  919.     # 行動アニメの後に行動を開始する
  920.     if $scene.phase4_step == 4
  921.       id = RTAB ? @anime2 : $scene.animation2_id
  922.       animation = $data_animations[id]
  923.       frame_max = animation != nil ? animation.frame_max : 0
  924.       @wait_count2 = frame_max * 2
  925.       return
  926.     end
  927.     @action = @battle_actions.shift
  928.     @step = get_step
  929.   end
  930.   #--------------------------------------------------------------------------
  931.   # ● フレーム更新 (ウエイト)
  932.   #--------------------------------------------------------------------------
  933.   def update_wait
  934.     @wait_count2 = @action.split(/#/)[1].to_i
  935.     @action = @battle_actions.shift
  936.     @step = get_step
  937.   end
  938.   #--------------------------------------------------------------------------
  939.   # ● フレーム更新 (残像表示)
  940.   #--------------------------------------------------------------------------
  941.   def update_shadow_on
  942.     @shadow = true
  943.     @action = @battle_actions.shift
  944.     @step = get_step
  945.   end
  946.   #--------------------------------------------------------------------------
  947.   # ● フレーム更新 (残像消去)
  948.   #--------------------------------------------------------------------------
  949.   def update_shadow_off
  950.     @shadow = false
  951.     @action = @battle_actions.shift
  952.     @step = get_step
  953.   end
  954.   #--------------------------------------------------------------------------
  955.   # ● フレーム更新 (左右反転)
  956.   #--------------------------------------------------------------------------
  957.   def update_reverse
  958.     @reverse = @reverse ? false : true
  959.     @action = @battle_actions.shift
  960.     @step = get_step
  961.   end
  962.   #--------------------------------------------------------------------------
  963.   # ● フレーム更新 (閃きアニメ)
  964.   #--------------------------------------------------------------------------
  965.   def update_flash
  966.     # 閃きアニメの後に行動を開始する
  967.     if @flash_flag["normal"]
  968.       @wait_count = $scene.flash_duration
  969.       @flash_flag["normal"] = false
  970.       return
  971.     end
  972.     @action = @battle_actions.shift
  973.     @step = get_step
  974.   end
  975.   #--------------------------------------------------------------------------
  976.   # ● フレーム更新 (SEの演奏)
  977.   #--------------------------------------------------------------------------
  978.   def update_play_se
  979.     data = @action.split(/#/)[1]
  980.     data = data.split(/,/)
  981.     # SE を演奏
  982.     Audio.se_play("Audio/SE/" + data[0], data[1].to_i, data[2].to_i)
  983.     @action = @battle_actions.shift
  984.     @step = get_step
  985.   end
  986.   #--------------------------------------------------------------------------
  987.   # ● フレーム更新 (アクターアニメ固定)
  988.   #--------------------------------------------------------------------------
  989.   def update_freeze
  990.     con = @action.split(/#/)[1]
  991.     # 右手・左手を分ける
  992.     if DUAL_WEAPONS_ANIME.include?(con)
  993.       if !@first_weapon and @second_weapon
  994.         con = con + "_L"
  995.       else
  996.         con = con + "_R"
  997.       end
  998.     end
  999.     # アニメ変更
  1000.     self.condition = con
  1001.     @pattern = @action.split(/#/)[2].to_i
  1002.     @pattern_freeze = true
  1003.     @condition_freeze = true
  1004.     @action = @battle_actions.shift
  1005.     @step = get_step
  1006.   end
  1007.   #--------------------------------------------------------------------------
  1008.   # ● フレーム更新 (アクターアニメ固定解除)
  1009.   #--------------------------------------------------------------------------
  1010.   def update_freeze_lifting
  1011.     @pattern_freeze = false
  1012.     @condition_freeze = false
  1013.     @action = @battle_actions.shift
  1014.     @step = get_step
  1015.   end
  1016.   #--------------------------------------------------------------------------
  1017.   # ● フレーム更新 (アニメーションの表示)
  1018.   #--------------------------------------------------------------------------
  1019.   def update_animation_start
  1020.     data = @action.split(/#/)[1]
  1021.     data = data.split(/,/)
  1022.     target = data[0]
  1023.     animation_id = data[1].to_i
  1024.     if RTAB
  1025.       case target
  1026.       when "self"
  1027.         @animation.push([animation_id,true])
  1028.       when "target"
  1029.         for tar in @target
  1030.           tar.animation.push([animation_id, true])
  1031.         end
  1032.       end
  1033.     else
  1034.       case target
  1035.       when "self"
  1036.         @animation_id = animation_id
  1037.         @animation_hit = true
  1038.       when "target"
  1039.         for tar in $scene.target_battlers
  1040.           tar.animation_id = animation_id
  1041.           tar.animation_hit = true
  1042.         end
  1043.       end
  1044.     end
  1045.     @action = @battle_actions.shift
  1046.     @step = get_step
  1047.   end
  1048.   #--------------------------------------------------------------------------
  1049.   # ● フレーム更新 (動作終了)
  1050.   #--------------------------------------------------------------------------
  1051.   def update_finish
  1052.     # 動作終了
  1053.     @battler_action = false
  1054.     @step = "setup"
  1055.   end
  1056.   #--------------------------------------------------------------------------
  1057.   # ● バトラーの状態 変更(バトラーグラフィックのタイプ)
  1058.   #--------------------------------------------------------------------------
  1059.   def condition=(condition)
  1060.     return if @condition_freeze
  1061.     @battler_condition = condition
  1062.     @wait_count = ANIME[condition][2]
  1063.   end
  1064.   #--------------------------------------------------------------------------
  1065.   # ● バトラーの状態(バトラーグラフィックのタイプ)
  1066.   #--------------------------------------------------------------------------
  1067.   def condition
  1068.     return @battler_condition
  1069.   end
  1070.   #--------------------------------------------------------------------------
  1071.   # ● フレーム更新
  1072.   #--------------------------------------------------------------------------
  1073.   def update
  1074.     # ウェイト中の場合
  1075.     if @wait_count > 0
  1076.       return
  1077.     end
  1078.     # パターン更新
  1079.     self.char_animation
  1080.     # ウェイト中の場合
  1081.     if @wait_count2 > 0
  1082.       return
  1083.     end
  1084.    
  1085.     # 行動アニメーション
  1086.     if @battler_action
  1087.       method("update_" + @step).call
  1088.       return
  1089.     end
  1090.    
  1091.     # データ初期化
  1092.     @animation1_on = false
  1093.     @animation2_on = false
  1094.     @action = nil
  1095.     @battle_actions = []
  1096.     @move_wait = 0
  1097.     @move_distance = nil
  1098.     @flying_wait = 0
  1099.     @flying_distance = nil
  1100.     @flash = false

  1101.     # RTAB対応
  1102.     # 通常・待機
  1103.     return self.condition = NORMAL
  1104.   end
  1105.   #--------------------------------------------------------------------------
  1106.   # ● アクションの取得
  1107.   #--------------------------------------------------------------------------
  1108.   def get_actions
  1109.     skill = $data_skills[self.current_action.skill_id]
  1110.     item = $data_items[self.current_action.item_id]
  1111.     kind = self.current_action.kind
  1112.     # 動作取得
  1113.     @battle_actions = []
  1114.     # スキル
  1115.     if skill != nil && kind == 1
  1116.       @battle_actions = skill.battle_actions.dup
  1117.       @flying_anime = skill.flying_anime
  1118.     # アイテム
  1119.     elsif item != nil && kind == 2
  1120.       @battle_actions = item.battle_actions.dup
  1121.       @flying_anime = item.flying_anime
  1122.     # 左手攻撃
  1123.     elsif !@first_weapon and @second_weapon and self.is_a?(Game_Actor)
  1124.       @battle_actions = self.battle_actions2.dup
  1125.       @flying_anime = self.flying_anime2
  1126.     # 右手攻撃
  1127.     elsif self.current_action.basic == 0 and
  1128.       self.is_a?(Game_Actor) and self.current_action.kind == 0
  1129.       @battle_actions = self.battle_actions1.dup
  1130.       @flying_anime = self.flying_anime1
  1131.     # 通常攻撃
  1132.     elsif self.current_action.basic == 0 and self.current_action.kind == 0
  1133.       @battle_actions = self.battle_actions.dup
  1134.       @flying_anime = self.flying_anime
  1135.     else
  1136.       @battle_actions = ["終了"]
  1137.       @flying_anime = [0,0,false,false]
  1138.     end
  1139.   end
  1140.   #--------------------------------------------------------------------------
  1141.   # ● ループしないアニメのセット
  1142.   #--------------------------------------------------------------------------
  1143.   def anime_on
  1144.     @pattern = 0
  1145.     @pattern_log = true
  1146.     return
  1147.   end
  1148.   #--------------------------------------------------------------------------
  1149.   # ● パターン更新
  1150.   #--------------------------------------------------------------------------
  1151.   def char_animation
  1152.     # パタン固定の場合もどる
  1153.     return if @pattern_freeze
  1154.     # ループしないアニメの場合 1234 で止まる
  1155.     if !ANIME[@battler_condition][1] && @pattern == 3
  1156.       return
  1157.     end
  1158.     # アニメさせない場合 1 で止まる
  1159.     if ANIME[@battler_condition][4]
  1160.       @pattern = 0
  1161.       return
  1162.     end
  1163.     @pattern = (@pattern + 1) % 4
  1164.   end
  1165.   #--------------------------------------------------------------------------
  1166.   # ● アニメタイプ
  1167.   #--------------------------------------------------------------------------
  1168.   def anime_type
  1169.     return ANIME[self.condition] != nil ? ANIME[self.condition][0] : 0
  1170.   end
  1171. end
  1172. #==============================================================================
  1173. # ■ Game_Actor
  1174. #==============================================================================
  1175. class Game_Actor < Game_Battler
  1176.   include Side_view
  1177.   #--------------------------------------------------------------------------
  1178.   # ● セットアップ
  1179.   #--------------------------------------------------------------------------
  1180.   alias side_view_setup setup
  1181.   def setup(actor_id)
  1182.     side_view_setup(actor_id)
  1183.     start_battle
  1184.   end
  1185.   #--------------------------------------------------------------------------
  1186.   # ● 二刀武器のID取得 ※エラー回避用
  1187.   #--------------------------------------------------------------------------
  1188.   def weapon2_id
  1189.     return @weapon2_id != nil ? @weapon2_id : 0
  1190.   end
  1191.   #--------------------------------------------------------------------------
  1192.   # ● X方向 ポジション 取得 (陣形スクリプト拡張用)
  1193.   #--------------------------------------------------------------------------
  1194.   def position
  1195.     return $data_classes[@class_id].position
  1196.   end
  1197.   #--------------------------------------------------------------------------
  1198.   # ● Y方向 ポジション 取得 (陣形スクリプト拡張用)
  1199.   #--------------------------------------------------------------------------
  1200.   def position2
  1201.     return self.index
  1202.   end
  1203.   #--------------------------------------------------------------------------
  1204.   # ● 武器アニメタイプ
  1205.   #--------------------------------------------------------------------------
  1206.   def weapon_anime_type(type)
  1207.     file_name  = weapon_anime_type0(type)
  1208.     visible   = weapon_anime_type1(type)
  1209.     z         = weapon_anime_type2(type)
  1210.     return [file_name,visible,z]
  1211.   end
  1212.   # 武器アイコン取得
  1213.   def weapon_anime_type0(type)
  1214.     type = ANIME[type][5]
  1215.     return weapon_anime1 if type == "右手"
  1216.     return weapon_anime2 if type == "左手"
  1217.     return nil
  1218.   end
  1219.   # 表示・非表示の取得
  1220.   def weapon_anime_type1(type)
  1221.     return ANIME[type][3]
  1222.   end
  1223.   # バトラーより上に表示するかどうか
  1224.   def weapon_anime_type2(type)
  1225.     type = ANIME[type][5]
  1226.     return true if type == "左手"
  1227.     return false
  1228.   end
  1229.   #--------------------------------------------------------------------------
  1230.   # ● バトル画面 X 座標の取得(カメラ補正無し)
  1231.   #--------------------------------------------------------------------------
  1232.   def true_x
  1233.     return PARTY_X + position * FORMATION_X + @ox
  1234.   end
  1235.   #--------------------------------------------------------------------------
  1236.   # ● バトル画面 Y 座標の取得(カメラ補正無し)
  1237.   #--------------------------------------------------------------------------
  1238.   def true_y
  1239.     # パーティ内の並び順から Y 座標を計算して返す
  1240.     if self.index != nil
  1241.       y = position2 * FORMATION_Y + PARTY_Y + @oy - @height / 2
  1242.       return y
  1243.     else
  1244.       return 0
  1245.     end
  1246.   end
  1247.   #--------------------------------------------------------------------------
  1248.   # ● バトル画面 X 座標の取得
  1249.   #--------------------------------------------------------------------------
  1250.   def screen_x(true_x = self.true_x)
  1251.     return 320 + (true_x - 320) * @real_zoom + @real_x
  1252.   end
  1253.   #--------------------------------------------------------------------------
  1254.   # ● バトル画面 Y 座標の取得
  1255.   #--------------------------------------------------------------------------
  1256.   def screen_y(true_y = self.true_y)
  1257.     return true_y * @real_zoom + @real_y
  1258.   end
  1259.   #--------------------------------------------------------------------------
  1260.   # ● バトル画面 Z 座標の取得
  1261.   #--------------------------------------------------------------------------
  1262.   def screen_z
  1263.     return screen_y + 1000
  1264.   end
  1265.   #--------------------------------------------------------------------------
  1266.   # ● バトル画面 X 座標の取得(移動などしていない場合)
  1267.   #--------------------------------------------------------------------------
  1268.   def base_x
  1269.     return 320 + (true_x - @ox - 320) * @real_zoom + @real_x
  1270.   end
  1271.   #--------------------------------------------------------------------------
  1272.   # ● バトル画面 Y 座標の取得
  1273.   #--------------------------------------------------------------------------
  1274.   def base_y
  1275.     return (true_y - @oy) * @real_zoom + @real_y
  1276.   end
  1277.   #--------------------------------------------------------------------------
  1278.   # ● バトル画面 拡大率の取得
  1279.   #--------------------------------------------------------------------------
  1280.   def zoom
  1281.     return ($scene.zoom_rate[1] - $scene.zoom_rate[0]) *
  1282.                           (true_x + @fly) / 480 + $scene.zoom_rate[0]
  1283.   end
  1284.   #--------------------------------------------------------------------------
  1285.   # ● 攻撃用、バトル画面 X 座標の取得
  1286.   #--------------------------------------------------------------------------
  1287.   def attack_x(z)
  1288.     return (320 - true_x) * z * 0.75
  1289.   end
  1290.   #--------------------------------------------------------------------------
  1291.   # ● 攻撃用、バトル画面 Y 座標の取得
  1292.   #--------------------------------------------------------------------------
  1293.   def attack_y(z)
  1294.     return (160 - (true_y + fly / 4) * z + @height * zoom * z / 2) * 0.75
  1295.   end
  1296.   #--------------------------------------------------------------------------
  1297.   # ● 閃き待ち時間
  1298.   #--------------------------------------------------------------------------
  1299.   def flash_duration
  1300.     return $scene.flash_duration
  1301.   end
  1302.   #--------------------------------------------------------------------------
  1303.   # ● アニメーション取得
  1304.   #--------------------------------------------------------------------------
  1305.   def battle_actions1
  1306.     weapon = $data_weapons[@weapon_id]
  1307.     return weapon != nil ? weapon.battle_actions : BattleActions::Actions["通常攻撃"]
  1308.   end
  1309.   #--------------------------------------------------------------------------
  1310.   # ● アニメーション取得
  1311.   #--------------------------------------------------------------------------
  1312.   def battle_actions2
  1313.     weapon = $data_weapons[@weapon2_id]
  1314.     return weapon != nil ? weapon.battle_actions : BattleActions::Actions["通常攻撃"]
  1315.   end
  1316.   #--------------------------------------------------------------------------
  1317.   # ● 武器アニメーション取得
  1318.   #--------------------------------------------------------------------------
  1319.   def weapon_anime1
  1320.     weapon = $data_weapons[@weapon_id]
  1321.     return weapon != nil ? weapon.icon_name : ""
  1322.   end
  1323.   #--------------------------------------------------------------------------
  1324.   # ● 武器アニメーション取得
  1325.   #--------------------------------------------------------------------------
  1326.   def weapon_anime2
  1327.     weapon = $data_weapons[@weapon2_id]
  1328.     return weapon != nil ? weapon.icon_name : ""
  1329.   end
  1330.   #--------------------------------------------------------------------------
  1331.   # ● 遠距離アニメーション取得
  1332.   #--------------------------------------------------------------------------
  1333.   def flying_anime1
  1334.     weapon = $data_weapons[@weapon_id]
  1335.     return weapon != nil ? weapon.flying_anime : [0,0,false,false]
  1336.   end
  1337.   #--------------------------------------------------------------------------
  1338.   # ● 遠距離アニメーション取得
  1339.   #--------------------------------------------------------------------------
  1340.   def flying_anime2
  1341.     weapon = $data_weapons[@weapon2_id]
  1342.     return weapon != nil ? weapon.flying_anime : [0,0,false,false]
  1343.   end
  1344.   #--------------------------------------------------------------------------
  1345.   # ● 移動目標座標の計算
  1346.   #--------------------------------------------------------------------------
  1347.   def move_setup
  1348.     if RTAB
  1349.       targets = @target
  1350.     else
  1351.       targets = $scene.target_battlers
  1352.     end
  1353.     case @move_action[0]
  1354.     when "self" # 自分
  1355.       @target_x = self.base_x
  1356.       @target_y = self.base_y
  1357.     when "target_near" # 一番近くのターゲット
  1358.       targets.sort!{|a,b| a.screen_x<=>b.screen_x }
  1359.       targets.reverse!
  1360.       if targets != []
  1361.         @target_x = targets[0].screen_x
  1362.         @target_y = targets[0].screen_y
  1363.       else
  1364.         @target_x = self.base_x
  1365.         @target_y = self.base_y
  1366.       end
  1367.     when "target_far" # 一番遠くのターゲット
  1368.       targets.sort!{|a,b| a.screen_x<=>b.screen_x }
  1369.       if targets != []
  1370.         @target_x = targets[0].screen_x
  1371.         @target_y = targets[0].screen_y
  1372.       else
  1373.         @target_x = self.base_x
  1374.         @target_y = self.base_y
  1375.       end
  1376.     when "target" # ターゲット中央
  1377.       @target_x = 0
  1378.       @target_y = 0
  1379.       for t in targets
  1380.         @target_x += t.screen_x
  1381.         @target_y += t.screen_y
  1382.       end
  1383.       if targets != []
  1384.         @target_x /= targets.size
  1385.         @target_y /= targets.size
  1386.       end
  1387.     when "troop" # "トループ中央"
  1388.       @target_x = 0
  1389.       @target_y = 0
  1390.       for t in $game_troop.enemies
  1391.         @target_x += t.screen_x
  1392.         @target_y += t.screen_y
  1393.       end
  1394.       if $game_troop.enemies != []
  1395.         @target_x /= $game_troop.enemies.size
  1396.         @target_y /= $game_troop.enemies.size
  1397.       end
  1398.     when "party" # "パーティ中央"
  1399.       @target_x = 0
  1400.       @target_y = 0
  1401.       for t in $game_party.actors
  1402.         @target_x += t.screen_x
  1403.         @target_y += t.screen_y
  1404.       end
  1405.       if $game_party.actors != []
  1406.         @target_x /= $game_party.actors.size
  1407.         @target_y /= $game_party.actors.size
  1408.       end
  1409.     when "screen" # "画面"
  1410.       @target_x = self.base_x
  1411.       @target_y = self.base_y
  1412.     end
  1413.     # 補正
  1414.     @target_x += @move_action[1] - self.base_x
  1415.     @target_y += @move_action[2] - self.base_y
  1416.     # 移動目標の座標をセット
  1417.     @move_coordinates = [@target_x.to_i,@target_y.to_i,@move_coordinates[0],@move_coordinates[1]]
  1418.     # 距離の計算(ウエイトの設定)
  1419.     @move_wait     = (@move_coordinates[2] - @move_coordinates[0]).abs +
  1420.                      (@move_coordinates[3] - @move_coordinates[1]).abs
  1421.   end
  1422. end
  1423. #==============================================================================
  1424. # ■ Game_Enemy
  1425. #==============================================================================
  1426. class Game_Enemy < Game_Battler
  1427.   #--------------------------------------------------------------------------
  1428.   # ● セットアップ
  1429.   #--------------------------------------------------------------------------
  1430.   alias side_view_initialize initialize
  1431.   def initialize(troop_id, member_index)
  1432.     side_view_initialize(troop_id, member_index)
  1433.     start_battle
  1434.   end
  1435.   #--------------------------------------------------------------------------
  1436.   # ● 移動
  1437.   #--------------------------------------------------------------------------
  1438.   def move
  1439.     # 距離の計算
  1440.     @move_distance = (@move_coordinates[2] - @move_coordinates[0]).abs +
  1441.                      (@move_coordinates[3] - @move_coordinates[1]).abs
  1442.     if @move_distance > 0
  1443.       return if @ox == @move_coordinates[0] and @oy == @move_coordinates[1]
  1444.       array = @move_coordinates
  1445.       # ジャンプ補正値の計算
  1446.       if @move_distance - @move_wait > @move_distance / 2
  1447.         jump = (@move_action[4] * @move_wait / @move_distance.to_f)**2
  1448.       else
  1449.         jump = (@move_action[4] * (@move_distance - @move_wait) / @move_distance.to_f)**2
  1450.       end
  1451.       jump = @move_action[4] > 0 ? -jump : jump
  1452.       @ox = (array[2] + 1.0 * (array[0] - array[2]) * (@move_distance - @move_wait) / @move_distance.to_f).to_i
  1453.       @oy = (array[3] + 1.0 * (array[1] - array[3]) * (@move_distance - @move_wait) / @move_distance.to_f + jump).to_i
  1454.       # ウエイト
  1455.       @move_wait -= @move_action[3]
  1456.       @move_wait = [@move_wait,0].max
  1457.     end
  1458.   end
  1459.   #--------------------------------------------------------------------------
  1460.   # ● 移動目標座標の計算
  1461.   #--------------------------------------------------------------------------
  1462.   def move_setup
  1463.     if RTAB
  1464.       targets = @target
  1465.     else
  1466.       targets = $scene.target_battlers
  1467.     end
  1468.     case @move_action[0]
  1469.     when "self" # 自分
  1470.       @target_x = self.base_x
  1471.       @target_y = self.base_y
  1472.     when "target_near" # 一番近くのターゲット
  1473.       targets.sort!{|a,b| a.screen_x<=>b.screen_x }
  1474.       if targets != []
  1475.         @target_x = targets[0].screen_x
  1476.         @target_y = targets[0].screen_y
  1477.       else
  1478.         @target_x = self.base_x
  1479.         @target_y = self.base_y
  1480.       end
  1481.     when "target_far" # 一番遠くのターゲット
  1482.       targets.sort!{|a,b| a.screen_x<=>b.screen_x }
  1483.       targets.reverse!
  1484.       if targets != []
  1485.         @target_x = targets[0].screen_x
  1486.         @target_y = targets[0].screen_y
  1487.       else
  1488.         @target_x = self.base_x
  1489.         @target_y = self.base_y
  1490.       end
  1491.     when "target" # ターゲット中央
  1492.       @target_x = 0
  1493.       @target_y = 0
  1494.       for t in targets
  1495.         @target_x += t.screen_x
  1496.         @target_y += t.screen_y
  1497.       end
  1498.       if targets != []
  1499.         @target_x /= targets.size
  1500.         @target_y /= targets.size
  1501.       end
  1502.     when  "party" # "トループ中央"
  1503.       @target_x = 0
  1504.       @target_y = 0
  1505.       for t in $game_troop.enemies
  1506.         @target_x += t.screen_x
  1507.         @target_y += t.screen_y
  1508.       end
  1509.       if $game_troop.enemies != []
  1510.         @target_x /= $game_troop.enemies.size
  1511.         @target_y /= $game_troop.enemies.size
  1512.       end
  1513.     when "troop" # "パーティ中央"
  1514.       @target_x = 0
  1515.       @target_y = 0
  1516.       for t in $game_party.actors
  1517.         @target_x += t.screen_x
  1518.         @target_y += t.screen_y
  1519.       end
  1520.       if $game_party.actors != []
  1521.         @target_x /= $game_party.actors.size
  1522.         @target_y /= $game_party.actors.size
  1523.       end
  1524.     when "screen" # "画面"
  1525.       @target_x = self.base_x
  1526.       @target_y = self.base_y
  1527.     end
  1528.     # 補正
  1529.     @target_x -= @move_action[1] + self.base_x
  1530.     @target_y -= @move_action[2] + self.base_y
  1531.     # 移動目標の座標をセット
  1532.     @move_coordinates = [@target_x.to_i,@target_y.to_i,@move_coordinates[0],@move_coordinates[1]]
  1533.     # 距離の計算(ウエイトの設定)
  1534.     @move_wait     = (@move_coordinates[2] - @move_coordinates[0]).abs +
  1535.                      (@move_coordinates[3] - @move_coordinates[1]).abs
  1536.   end
  1537.   if RTAB
  1538.   alias original_x true_x
  1539.   alias original_y true_y
  1540.   else
  1541.   alias original_x screen_x
  1542.   alias original_y screen_y
  1543.   end
  1544.   #--------------------------------------------------------------------------
  1545.   # ● バトル画面 X 座標の取得(カメラ補正無し)
  1546.   #--------------------------------------------------------------------------
  1547.   def true_x
  1548.     return original_x + @ox
  1549.   end
  1550.   #--------------------------------------------------------------------------
  1551.   # ● バトル画面 Y 座標の取得(カメラ補正無し)
  1552.   #--------------------------------------------------------------------------
  1553.   def true_y
  1554.     return original_y - @height / 2 + @oy
  1555.   end
  1556.   #--------------------------------------------------------------------------
  1557.   # ● バトル画面 X 座標の取得
  1558.   #--------------------------------------------------------------------------
  1559.   def screen_x(true_x = self.true_x)
  1560.     return true_x * @real_zoom + @real_x
  1561.   end
  1562.   #--------------------------------------------------------------------------
  1563.   # ● バトル画面 Y 座標の取得
  1564.   #--------------------------------------------------------------------------
  1565.   def screen_y(true_y = self.true_y)
  1566.     return true_y * @real_zoom + @real_y
  1567.   end
  1568.   #--------------------------------------------------------------------------
  1569.   # ● バトル画面 X 座標の取得(移動などしていない場合)
  1570.   #--------------------------------------------------------------------------
  1571.   def base_x(true_x = self.true_x)
  1572.     return (true_x - @ox) * @real_zoom + @real_x
  1573.   end
  1574.   #--------------------------------------------------------------------------
  1575.   # ● バトル画面 Y 座標の取得(移動などしていない場合)
  1576.   #--------------------------------------------------------------------------
  1577.   def base_y(true_y = self.true_y)
  1578.     return (true_y - @oy) * @real_zoom + @real_y
  1579.   end
  1580. end
  1581. #==============================================================================
  1582. # ■ Game_Party
  1583. #==============================================================================
  1584. class Game_Party
  1585.   #--------------------------------------------------------------------------
  1586.   # ● アクターを加える
  1587.   #     actor_id : アクター ID
  1588.   #--------------------------------------------------------------------------
  1589.   alias side_view_add_actor add_actor
  1590.   def add_actor(actor_id)
  1591.     # アクターを取得
  1592.     actor = $game_actors[actor_id]
  1593.     # サイドビューデータの初期化
  1594.     actor.start_battle
  1595.     # 戻す
  1596.     side_view_add_actor(actor_id)
  1597.   end
  1598. end
  1599. #==============================================================================
  1600. # ■ Scene_Battle
  1601. #==============================================================================
  1602. class Scene_Battle
  1603.   include Side_view
  1604.   #--------------------------------------------------------------------------
  1605.   # ● 公開インスタンス変数
  1606.   #--------------------------------------------------------------------------
  1607.   attr_reader   :phase            # フェーズ
  1608.   attr_reader   :phase4_step      # フェーズ4ステップ
  1609.   attr_reader   :active_battler   # 対象の配列
  1610.   attr_reader   :target_battlers  # 対象の配列
  1611.   attr_reader   :animation1_id    # 行動アニメID
  1612.   attr_reader   :animation2_id    # 対象アニメID
  1613.   #--------------------------------------------------------------------------
  1614.   # ● メイン処理
  1615.   #--------------------------------------------------------------------------
  1616.   alias side_view_main main
  1617.   def main
  1618.     # バトラー初期化
  1619.     for battler in $game_party.actors + $game_troop.enemies
  1620.       battler.start_battle
  1621.     end
  1622.     # 戻す
  1623.     side_view_main
  1624.   end
  1625.   #--------------------------------------------------------------------------
  1626.   # ● 閃き判定
  1627.   #--------------------------------------------------------------------------
  1628.   def flash?
  1629.     return @flash_flag ? true : false
  1630.   end  
  1631.   #--------------------------------------------------------------------------
  1632.   # ● 閃きアニメ待ち時間取得
  1633.   #--------------------------------------------------------------------------
  1634.   def flash_duration
  1635.     animation = nil
  1636.     if FLASH_ANIME
  1637.       animation = $data_animations[FLASH_ANIMATION_ID]
  1638.     end
  1639.     return animation != nil ? animation.frame_max * 2 + 2 : 0
  1640.   end
  1641.   #--------------------------------------------------------------------------
  1642.   # ● フレーム更新 (メインフェーズ ステップ 2 : アクション開始)
  1643.   #--------------------------------------------------------------------------
  1644.   alias side_view_update_phase4_step2 update_phase4_step2
  1645.   def update_phase4_step2(*arg)
  1646.     battler = convert_battler2(*arg)
  1647.     battler.action
  1648.     side_view_update_phase4_step2(*arg)
  1649.   end
  1650.   #--------------------------------------------------------------------------
  1651.   # ● フレーム更新 (メインフェーズ ステップ 3 : 行動側アニメーション)
  1652.   #--------------------------------------------------------------------------
  1653.   alias side_view_update_phase4_step3 update_phase4_step3
  1654.   def update_phase4_step3(*arg)
  1655.     battler = convert_battler2(*arg)
  1656.     return if !battler.animation1_on and battler.action? and !battler.flash?
  1657.     if battler.flash? and FLASH_ANIME
  1658.       battler.flash_flag["normal"] = true
  1659.     end
  1660.     side_view_update_phase4_step3(*arg)
  1661.   end
  1662.   #--------------------------------------------------------------------------
  1663.   # ● フレーム更新 (メインフェーズ ステップ 4 : 対象側アニメーション)
  1664.   #--------------------------------------------------------------------------
  1665.   alias side_view_update_phase4_step4 update_phase4_step4
  1666.   def update_phase4_step4(*arg)
  1667.     battler = convert_battler2(*arg)
  1668.     targets = RTAB ? battler.target : @target_battlers
  1669.     return if !battler.animation2_on and battler.action?
  1670.     side_view_update_phase4_step4(*arg)
  1671.     for target in targets
  1672.       if RTAB
  1673.         value = nil
  1674.         if target.damage_sp.include?(battler)
  1675.           value = target.damage_sp[battler]
  1676.         end
  1677.         if target.damage.include?(battler)
  1678.           if value == nil or value == "Miss"
  1679.             value = target.damage[battler]
  1680.           elsif value.is_a?(Numeric) && value > 0
  1681.             value = target.damage[battler] == "Miss" ? value : target.damage[battler]
  1682.           end
  1683.         end
  1684.       else
  1685.         value = target.damage
  1686.       end
  1687.       if target.is_a?(Game_Actor)
  1688.         # ダメージの場合
  1689.         if value.is_a?(Numeric) && value > 0
  1690.           # シェイクを開始
  1691.           target.shake = true
  1692.         end
  1693.       elsif target.is_a?(Game_Enemy)
  1694.         # ダメージの場合
  1695.         if value.is_a?(Numeric) && value > 0
  1696.           # シェイクを開始
  1697.           target.shake = true
  1698.         end
  1699.       end
  1700.     end
  1701.   end
  1702.   #--------------------------------------------------------------------------
  1703.   # ● プレバトルフェーズ開始
  1704.   #--------------------------------------------------------------------------
  1705.   alias start_phase1_correct start_phase1
  1706.   def start_phase1
  1707.     # カメラの設定
  1708.     # 元々フロントビュー向けの数値になっているため
  1709.     @zoom_rate = [1.0, 1.0]
  1710.     start_phase1_correct
  1711.   end
  1712.   #--------------------------------------------------------------------------
  1713.   # ● アクターコマンドフェーズ開始
  1714.   #--------------------------------------------------------------------------
  1715.   alias start_phase3_correct start_phase3
  1716.   def start_phase3
  1717.     battler = convert_battler
  1718.     start_phase3_correct
  1719.     if RTAB
  1720.       # カメラの設定
  1721.       # 元々フロントビュー向けの数値になっているため
  1722.       @camera = "command"
  1723.       @spriteset.screen_target(0, 0, 1.0)
  1724.     end
  1725.   end
  1726. end

  1727. class Spriteset_Battle
  1728.   include Side_view
  1729.   #--------------------------------------------------------------------------
  1730.   # ● オブジェクト初期化
  1731.   #--------------------------------------------------------------------------
  1732.   alias side_veiw_initialize initialize
  1733.   def initialize
  1734.     side_veiw_initialize
  1735.     # アクタースプライトを解放
  1736.     for sprite in @actor_sprites
  1737.       sprite.dispose
  1738.     end
  1739.     # アクタースプライトを作成
  1740.     @actor_sprites = []
  1741.     for i in 1..Party_max
  1742.       @actor_sprites.push(Sprite_Battler.new(@viewport1))
  1743.     end
  1744.     update
  1745.   end
  1746.   #--------------------------------------------------------------------------
  1747.   # ● 画面のスクロール
  1748.   #--------------------------------------------------------------------------
  1749.   if method_defined?("screen_scroll")
  1750.   alias side_view_screen_scroll screen_scroll
  1751.   def screen_scroll
  1752.     side_view_screen_scroll
  1753.     # アクターの位置補正
  1754.     for actor in $game_party.actors
  1755.       actor.real_x = @real_x
  1756.       actor.real_y = @real_y
  1757.       actor.real_zoom = @real_zoom
  1758.     end
  1759.   end
  1760.   end
  1761. end

  1762. class Sprite_Battler < RPG::Sprite
  1763.   include Side_view
  1764.   #--------------------------------------------------------------------------
  1765.   # ● オブジェクト初期化
  1766.   #     viewport : ビューポート
  1767.   #     battler  : バトラー (Game_Battler)
  1768.   #--------------------------------------------------------------------------
  1769.   def initialize(viewport, battler = nil)
  1770.     super(viewport)
  1771.     @battler = battler
  1772.     @battler_visible = false
  1773.     @weapon = Sprite_Weapon.new(viewport, battler)
  1774.     @flying = Sprite_Flying.new(viewport, battler)
  1775.     @shadow = []
  1776.     @fly = 0
  1777.     @fly_direction = 1
  1778.     @rand = rand(10)
  1779.     self.effect_clear
  1780.   end
  1781.   #--------------------------------------------------------------------------
  1782.   # ● 解放
  1783.   #--------------------------------------------------------------------------
  1784.   alias side_view_dispose dispose
  1785.   def dispose
  1786.     side_view_dispose
  1787.     @weapon.dispose
  1788.     @flying.dispose
  1789.     if @_target_sprite != nil
  1790.       @_target_sprite.bitmap.dispose
  1791.       @_target_sprite.dispose
  1792.       @_target_sprite = nil
  1793.     end
  1794.   end
  1795.   #--------------------------------------------------------------------------
  1796.   # ● フレーム更新
  1797.   #--------------------------------------------------------------------------
  1798.   def update
  1799.     super
  1800.     # バトラーが nil の場合
  1801.     if @battler == nil
  1802.       self.bitmap = nil
  1803.       @weapon.bitmap = nil
  1804.       loop_animation(nil)
  1805.       return
  1806.     end
  1807.     # バトラー更新
  1808.     @battler.update
  1809.     # バトラーアニメのデータ取得
  1810.     @anime_type = @battler.anime_type
  1811.     # ファイル名か色相が現在のものと異なる場合
  1812.     if @battler.is_a?(Game_Actor)
  1813.       change = (@battler.character_name != @battler_name or @battler.character_hue != @battler_hue)
  1814.     elsif @battler.is_a?(Game_Enemy)
  1815.       change = (@battler.battler_name != @battler_name or @battler.battler_hue != @battler_hue)
  1816.     else
  1817.       return
  1818.     end
  1819.     if change
  1820.       # ビットマップを取得、設定
  1821.       if @battler.is_a?(Game_Actor)
  1822.         @battler_name = @battler.character_name
  1823.         @battler_hue = @battler.character_hue
  1824.         self.bitmap = RPG::Cache.character(@battler_name, @battler_hue)
  1825.         @width = bitmap.width / 4
  1826.         @height = bitmap.height / 4
  1827.       else
  1828.         @battler_name = @battler.battler_name
  1829.         @battler_hue = @battler.battler_hue
  1830.         self.bitmap = RPG::Cache.battler(@battler_name, @battler_hue)
  1831.         @width = bitmap.width
  1832.         @height = bitmap.height
  1833.       end
  1834.       self.ox = @width / 2
  1835.       self.oy = @height / 2
  1836.       @battler.height = @height
  1837.       @flag = true
  1838.       # 戦闘不能または隠れ状態なら不透明度を 0 にする
  1839.       if @battler.dead? or @battler.hidden
  1840.         self.opacity = 0
  1841.       end
  1842.     end
  1843.     if @battler.is_a?(Game_Actor) and
  1844.       (@battler.anime_type != @anime_type or @battler.pattern != @pattern or @flag)
  1845.       # ビットマップを取得、設定
  1846.       @pattern = @battler.pattern
  1847.       self.ox = @width / 2
  1848.       self.oy = @height / 2
  1849.       @sx = @pattern * @width
  1850.       @sy = @anime_type % 4 * @height
  1851.       self.src_rect.set(@sx, @sy, @width, @height)
  1852.       self.zoom_x = CHAR_ZOOM
  1853.       self.zoom_y = CHAR_ZOOM
  1854.       @battler.height = @height
  1855.       @flag = false
  1856.     end
  1857.     # 飛行
  1858.     update_fly
  1859.     # シェイク
  1860.     update_shake
  1861.     # 回転
  1862.     update_turning
  1863.     # 反転
  1864.     update_reverse   
  1865.     # 移動
  1866.     update_moving
  1867.     # 追加アニメ
  1868.     update_add_anime
  1869.     # エフェクト効果の適用
  1870.     update_effect
  1871.     # アニメーション ID が現在のものと異なる場合
  1872.     flag = RTAB ? true : @battler.damage == nil
  1873.     if flag and @battler.state_animation_id != @state_animation_id
  1874.       @state_animation_id = @battler.state_animation_id
  1875.       loop_animation($data_animations[@state_animation_id])
  1876.     end
  1877.     # シェイク
  1878.     if @battler.shake
  1879.       self.start_shake(5, 5, 5)
  1880.       @battler.shake = false
  1881.     end
  1882.     # 明滅
  1883.     if @battler.blink
  1884.       blink_on
  1885.     else
  1886.       blink_off
  1887.     end
  1888.     # 不可視の場合
  1889.     unless @battler_visible
  1890.       flag = RTAB ? (@battler.damage.size < 2 or @battler.damage_pop.size < 2) :
  1891.                     (@battler.damage == nil or @battler.damage_pop)
  1892.       # 出現
  1893.       if not @battler.hidden and not @battler.dead? and flag
  1894.         appear
  1895.         @battler_visible = true
  1896.       end
  1897.     end
  1898.     if RTAB
  1899.     # ダメージ
  1900.     for battler in @battler.damage_pop
  1901.       if battler[0].class == Array
  1902.         if battler[0][1] >= 0
  1903.           $scene.skill_se
  1904.         else
  1905.           $scene.levelup_se
  1906.         end
  1907.         damage(@battler.damage[battler[0]], false, 2)
  1908.       else
  1909.         damage(@battler.damage[battler[0]], @battler.critical[battler[0]])
  1910.       end
  1911.       if @battler.damage_sp.include?(battler[0])
  1912.         damage(@battler.damage_sp[battler[0]],
  1913.                 @battler.critical[battler[0]], 1)
  1914.         @battler.damage_sp.delete(battler[0])
  1915.       end
  1916.       @battler.damage_pop.delete(battler[0])
  1917.       @battler.damage.delete(battler[0])
  1918.       @battler.critical.delete(battler[0])
  1919.     end
  1920.     end
  1921.     # 可視の場合
  1922.     if @battler_visible
  1923.       # 武器アニメ
  1924.       @weapon.battler = @battler
  1925.       @weapon.update
  1926.       # 遠距離アニメ
  1927.       @flying.battler = @battler
  1928.       @flying.update
  1929.       # 逃走
  1930.       if @battler.hidden
  1931.         $game_system.se_play($data_system.escape_se)
  1932.         escape
  1933.         @battler_visible = false
  1934.       end
  1935.       # 白フラッシュ
  1936.       if @battler.white_flash
  1937.         whiten
  1938.         @battler.white_flash = false
  1939.       end
  1940.       if RTAB
  1941.       # アニメーション
  1942.       if !@battler.animation.empty?
  1943.         for animation in @battler.animation.reverse
  1944.           if animation[2]
  1945.             animation($data_animations[animation[0]], animation[1], true)
  1946.           else
  1947.             animation($data_animations[animation[0]], animation[1])
  1948.           end
  1949.           @battler.animation.delete(animation)
  1950.         end
  1951.       end
  1952.       else
  1953.       # アニメーション
  1954.       if @battler.animation_id != 0
  1955.         animation = $data_animations[@battler.animation_id]
  1956.         animation(animation, @battler.animation_hit)
  1957.         @battler.animation_id = 0
  1958.       end
  1959.       end
  1960.       # ダメージ
  1961.       if !RTAB and @battler.damage_pop
  1962.         damage(@battler.damage, @battler.critical)
  1963.         @battler.damage = nil
  1964.         @battler.critical = false
  1965.         @battler.damage_pop = false
  1966.       end
  1967.       flag = RTAB ? (@battler.damage.empty? and $scene.dead_ok?(@battler)) :
  1968.                      @battler.damage == nil
  1969.       # コラプス
  1970.       if flag and @battler.dead?
  1971.         if @battler.is_a?(Game_Actor)
  1972.           $game_system.se_play($data_system.actor_collapse_se)
  1973.         elsif @battler.is_a?(Game_Enemy)
  1974.           $game_system.se_play($data_system.enemy_collapse_se)
  1975.         end
  1976.         collapse
  1977.         @battler_visible = false
  1978.       end
  1979.     end
  1980.     # スプライトの座標を設定
  1981.     self.x = @battler.screen_x + @effect_ox
  1982.     self.y = @battler.screen_y + @effect_oy
  1983.     self.z = @battler.screen_z
  1984.     self.zoom_x = @battler.real_zoom
  1985.     self.zoom_y = @battler.real_zoom
  1986.     # ウェイトカウントを減らす
  1987.     @battler.wait_count -= 1
  1988.     @battler.wait_count2 -= 1
  1989.     # アニメーション待ち時間取得
  1990.     @battler.animation_duration = @_animation_duration
  1991.     if @battler.is_a?(Game_Actor)
  1992.       self.zoom_x *= CHAR_ZOOM
  1993.       self.zoom_y *= CHAR_ZOOM
  1994.       @weapon.x = self.x + 2
  1995.       @weapon.y = self.y + 6
  1996.       @weapon.angle = 75 - (4 - @battler.pattern) * 45
  1997.       if self.mirror
  1998.         @weapon.angle += @weapon.angle - 180
  1999.       end
  2000.     end
  2001.     # 残像
  2002.     if @battler.shadow
  2003.       if Graphics.frame_count % 2 == 0
  2004.         shadow = ::Sprite.new(self.viewport)
  2005.         shadow.bitmap = self.bitmap.dup
  2006.         shadow.x = self.x
  2007.         shadow.y = self.y
  2008.         shadow.ox = self.ox
  2009.         shadow.oy = self.oy
  2010.         shadow.mirror = self.mirror
  2011.         shadow.angle = self.angle
  2012.         shadow.opacity = 160
  2013.         shadow.zoom_x = self.zoom_x
  2014.         shadow.zoom_y = self.zoom_y
  2015.         if @battler.is_a?(Game_Actor)
  2016.           shadow.src_rect.set(@sx, @sy, @width, @height)
  2017.         else
  2018.           shadow.src_rect.set(0, 0, @width, @height)
  2019.         end
  2020.         @shadow.push([shadow,duration = 10,@battler.true_x + @effect_ox,@battler.true_y + @effect_oy])
  2021.       end
  2022.     end
  2023.     for s in @shadow
  2024.       if !s[0].disposed?
  2025.         s[0].update
  2026.         s[1] -= 1
  2027.         if s[1] < 1
  2028.           if s[0].bitmap != nil
  2029.             s[0].bitmap.dispose
  2030.           end
  2031.           s[0].dispose
  2032.         else
  2033.           s[0].x = @battler.screen_x(s[2])
  2034.           s[0].y = @battler.screen_y(s[3])
  2035.         end
  2036.       else
  2037.         s = nil
  2038.       end
  2039.     end
  2040.     @shadow.compact!
  2041.   end
  2042.   #--------------------------------------------------------------------------
  2043.   # ● エフェクトによる座標系の更新
  2044.   #--------------------------------------------------------------------------
  2045.   def update_effect
  2046.     # 角度の修正
  2047.     if @_upside_down
  2048.       self.angle = (@_turning + 180) % 360
  2049.     else
  2050.       self.angle = @_turning
  2051.     end
  2052.     # X 座標の修正値
  2053.     @effect_ox = @_shake + @_moving[0]
  2054.     # Y 座標の修正値
  2055.     @effect_oy = -@fly + @_moving[1]
  2056.     if  @_animation == nil or (RTAB and @_animation.empty?)
  2057.       self.effect_clear
  2058.     end
  2059.   end
  2060.   #--------------------------------------------------------------------------
  2061.   # ● シェイク更新
  2062.   #--------------------------------------------------------------------------
  2063.   def update_shake
  2064.     if @_shake_duration >= 1 or @_shake != 0
  2065.       delta = (@_shake_power * @_shake_speed * @_shake_direction) / 10.0
  2066.       if @_shake_duration <= 1 and @_shake * (@_shake + delta) < 0
  2067.         @_shake = 0
  2068.       else
  2069.         @_shake += delta
  2070.       end
  2071.       if @_shake > @_shake_power * 2
  2072.         @_shake_direction = -1
  2073.       end
  2074.       if @_shake < - @_shake_power * 2
  2075.         @_shake_direction = 1
  2076.       end
  2077.       if @_shake_duration >= 1
  2078.         @_shake_duration -= 1
  2079.       end
  2080.     end
  2081.   end
  2082.   #--------------------------------------------------------------------------
  2083.   # ● 飛行更新
  2084.   #--------------------------------------------------------------------------
  2085.   def update_fly
  2086.     if @rand > 0
  2087.       @rand -= 1
  2088.       return
  2089.     end
  2090.     if @battler.fly != 0
  2091.       if @fly < @battler.fly / 4
  2092.         @fly_direction = 1
  2093.       elsif @fly > @battler.fly / 2
  2094.         @fly_direction = -1
  2095.       end
  2096.       @fly += 0.5 * @fly_direction
  2097.     end
  2098.   end
  2099.   #--------------------------------------------------------------------------
  2100.   # ● 回転更新
  2101.   #--------------------------------------------------------------------------
  2102.   def update_turning
  2103.     if @_turning_duration > 0 or @_turning != 0
  2104.       @_turning += @_turning_direction * @_turning_speed / 2.0
  2105.       # 残り回転数を減らす
  2106.       if @_turning_direction == -1
  2107.         if @_turning_duration > 0 and @_turning < 0
  2108.           @_turning_duration -= 1
  2109.         end
  2110.       elsif @_turning_direction == 1
  2111.         if @_turning_duration > 0 and @_turning >= 360
  2112.           @_turning_duration -= 1
  2113.         end
  2114.       end
  2115.       # 以下補正
  2116.       while @_turning < 0
  2117.         @_turning += 360
  2118.       end
  2119.       if @_turning_duration <= 0
  2120.         @_turning = 0
  2121.       end
  2122.       @_turning %= 360
  2123.     end
  2124.   end
  2125.   #--------------------------------------------------------------------------
  2126.   # ● 左右反転更新
  2127.   #--------------------------------------------------------------------------
  2128.   def update_reverse
  2129.     if @last_reverse != (@_reverse or @battler.reverse)
  2130.       self.mirror = (@_reverse or @battler.reverse)
  2131.       @last_reverse = (@_reverse or @battler.reverse)
  2132.     end
  2133.   end
  2134.   #--------------------------------------------------------------------------
  2135.   # ● 移動更新
  2136.   #--------------------------------------------------------------------------
  2137.   def update_moving
  2138.     @move_distance = (@_move_coordinates[2] - @_move_coordinates[0]).abs +
  2139.                      (@_move_coordinates[3] - @_move_coordinates[1]).abs
  2140.     if @move_distance > 0
  2141.       return if @_moving[0] == @_move_coordinates[0] and @_moving[1] == @_move_coordinates[1]
  2142.       array = @_move_coordinates
  2143.       x = (array[2] + 1.0 * (array[0] - array[2]) * (@move_distance - @_move_duration) / @move_distance.to_f).to_i
  2144.       y = (array[3] + 1.0 * (array[1] - array[3]) * (@move_distance - @_move_duration) / @move_distance.to_f).to_i
  2145.       @_moving = [x, y]
  2146.       if @_move_quick_return and @_move_duration == 0
  2147.         @_move_coordinates = [0,0,array[0],array[1]]
  2148.         @_move_duration = @move_distance
  2149.       end
  2150.       @_move_duration -= @_move_speed
  2151.       @_move_duration = [@_move_duration, 0].max
  2152.     end
  2153.   end
  2154.   #--------------------------------------------------------------------------
  2155.   # ● 追加アニメ更新 (RTAB限定機能)
  2156.   #--------------------------------------------------------------------------
  2157.   def update_add_anime
  2158.     if RTAB
  2159.     # アニメーション
  2160.     if @_add_anime_id != 0
  2161.       animation = $data_animations[@_add_anime_id]
  2162.       animation(animation, true)
  2163.       @_add_anime_id = 0
  2164.     end
  2165.     end
  2166.   end
  2167.   #--------------------------------------------------------------------------
  2168.   # ● エフェクト初期化
  2169.   #--------------------------------------------------------------------------
  2170.   def effect_clear
  2171.     @_effect_ox = 0
  2172.     @_effect_oy = 0
  2173.     @_shake_power = 0
  2174.     @_shake_speed = 0
  2175.     @_shake_duration = 0
  2176.     @_shake_direction = 1
  2177.     @_shake = 0
  2178.     @_upside_down = false
  2179.     @_reverse = false
  2180.     @_turning_direction = 1
  2181.     @_turning_speed = 0
  2182.     @_turning_duration = 0
  2183.     @_turning = 0
  2184.     @_move_quick_return = true
  2185.     @_move_speed = 0
  2186.     @_move_coordinates = [0,0,0,0]
  2187.     @_move_jump = false
  2188.     @_move_duration = 0
  2189.     @_moving = [0,0]
  2190.     @_add_anime_id = 0
  2191.   end
  2192.   #--------------------------------------------------------------------------
  2193.   # ● シェイクの開始
  2194.   #     power    : 強さ
  2195.   #     speed    : 速さ
  2196.   #     duration : 時間
  2197.   #--------------------------------------------------------------------------
  2198.   def start_shake(power, speed, duration)
  2199.     @_shake_power = power
  2200.     @_shake_speed = speed
  2201.     @_shake_duration = duration
  2202.   end
  2203.   #--------------------------------------------------------------------------
  2204.   # ● 上下反転を開始
  2205.   #--------------------------------------------------------------------------
  2206.   def start_upside_down
  2207.     @_upside_down = @_upside_down ? false : true
  2208.   end
  2209.   #--------------------------------------------------------------------------
  2210.   # ● 左右反転を開始
  2211.   #--------------------------------------------------------------------------
  2212.   def start_reverse
  2213.     @_reverse = @_reverse ? false : true
  2214.   end
  2215.   #--------------------------------------------------------------------------
  2216.   # ● 回転を開始
  2217.   #     direction: 方向
  2218.   #     speed    : 速さ
  2219.   #     duration : 時間
  2220.   #--------------------------------------------------------------------------
  2221.   def start_turning(direction, speed, duration)
  2222.     @_turning_direction = direction
  2223.     @_turning_speed = speed
  2224.     @_turning_duration = duration
  2225.     @_turning = @_turning_direction == 1 ? 0 : 360
  2226.   end
  2227.   #--------------------------------------------------------------------------
  2228.   # ● 移動を開始
  2229.   #     quick_return : 戻るかどうか
  2230.   #     speed        : 速さ
  2231.   #     x            : X 座標
  2232.   #     y            : Y 座標
  2233.   #--------------------------------------------------------------------------
  2234.   def start_moving(quick_return, speed, x, y)
  2235.     @_move_quick_return = quick_return == 0 ? false : true
  2236.     @_move_speed = speed
  2237.     @_move_coordinates = [x,y,@_move_coordinates[0],@_move_coordinates[1]]
  2238.     distance = (@_move_coordinates[2] - @_move_coordinates[0]).abs +
  2239.                (@_move_coordinates[3] - @_move_coordinates[1]).abs
  2240.     @_move_duration = distance
  2241.   end
  2242.   #--------------------------------------------------------------------------
  2243.   # ● アニメ追加を開始
  2244.   #     id           : ID
  2245.   #     hit          : 命中フラッグ
  2246.   #--------------------------------------------------------------------------
  2247.   def start_add_anime(id)
  2248.     @_add_anime_id = id
  2249.   end
  2250.   #--------------------------------------------------------------------------
  2251.   # ● 各種エフェクトの開始判定
  2252.   #--------------------------------------------------------------------------
  2253.   if !method_defined?("side_view_animation_process_timing")
  2254.     alias side_view_animation_process_timing animation_process_timing
  2255.   end
  2256.   def animation_process_timing(timing, hit)
  2257.     side_view_animation_process_timing(timing, hit)
  2258.     if (timing.condition == 0) or
  2259.        (timing.condition == 1 and hit == true) or
  2260.        (timing.condition == 2 and hit == false)
  2261.       if timing.se.name =~ SHAKE_FILE
  2262.         names = timing.se.name.split(/#/)
  2263.         power    = names[1].nil? ? SHAKE_POWER    : names[1].to_i
  2264.         speed    = names[2].nil? ? SHAKE_SPEED    : names[2].to_i
  2265.         duration = names[3].nil? ? SHAKE_DURATION : names[3].to_i
  2266.         # シェイクを開始
  2267.         self.start_shake(power, speed, duration)
  2268.       end
  2269.       if timing.se.name == UPSIDE_DOWN_FILE
  2270.         # 上下反転を開始
  2271.         self.start_upside_down
  2272.       end
  2273.       if timing.se.name == REVERSE_FILE
  2274.         # 左右反転を開始
  2275.         self.start_reverse
  2276.       end
  2277.       if timing.se.name =~ TURNING_FILE
  2278.         names = timing.se.name.split(/#/)
  2279.         direction = names[1].nil? ? TURNING_DIRECTION : names[1].to_i
  2280.         speed     = names[2].nil? ? TURNING_SPEED     : names[2].to_i
  2281.         duration  = names[3].nil? ? TURNING_DURATION  : names[3].to_i
  2282.         # 回転を開始
  2283.         self.start_turning(direction, speed, duration)
  2284.       end
  2285.       if timing.se.name =~ MOVE_FILE
  2286.         names = timing.se.name.split(/#/)
  2287.         quick_return= names[1].nil? ? MOVE_RETURN      : names[1].to_i
  2288.         speed       = names[2].nil? ? MOVE_SPEED       : names[2].to_i
  2289.         x           = names[3].nil? ? MOVE_COORDINATES[0] : names[3].to_i
  2290.         y           = names[3].nil? ? MOVE_COORDINATES[1] : names[4].to_i
  2291.         # 移動を開始
  2292.         self.start_moving(quick_return, speed, x, y)
  2293.       end
  2294.       if timing.se.name =~ ADD_ANIME_FILE
  2295.         names = timing.se.name.split(/#/)
  2296.         id = names[1].nil? ? ADD_ANIME_ID      : names[1].to_i
  2297.         # アニメ追加を開始
  2298.         self.start_add_anime(id)
  2299.       end
  2300.     end
  2301.   end
  2302. end
  2303. #==============================================================================
  2304. # ■ Sprite_Weapon
  2305. #------------------------------------------------------------------------------
  2306. #  バトラー表示用のスプライトです。Game_Battler クラスのインスタンスを監視し、
  2307. # スプライトの状態を自動的に変化させます。
  2308. #==============================================================================

  2309. class Sprite_Weapon < RPG::Sprite
  2310.   include Side_view
  2311.   #--------------------------------------------------------------------------
  2312.   # ● 公開インスタンス変数
  2313.   #--------------------------------------------------------------------------
  2314.   attr_accessor :battler                  # バトラー
  2315.   attr_reader   :cw                       # グラフィックの幅
  2316.   attr_reader   :ch                       # グラフィックの高さ
  2317.   #--------------------------------------------------------------------------
  2318.   # ● オブジェクト初期化
  2319.   #     viewport : ビューポート
  2320.   #     battler  : バトラー (Game_Battler)
  2321.   #--------------------------------------------------------------------------
  2322.   def initialize(viewport, battler = nil)
  2323.     super(viewport)
  2324.     @battler = battler
  2325.     @battler_visible = false
  2326.   end
  2327.   #--------------------------------------------------------------------------
  2328.   # ● 解放
  2329.   #--------------------------------------------------------------------------
  2330.   def dispose
  2331.     if self.bitmap != nil
  2332.       self.bitmap.dispose
  2333.     end
  2334.     super
  2335.   end
  2336.   #--------------------------------------------------------------------------
  2337.   # ● フレーム更新
  2338.   #--------------------------------------------------------------------------
  2339.   def update
  2340.     super
  2341.     # バトラーが nil の場合
  2342.     if @battler == nil or !@battler.is_a?(Game_Actor)
  2343.       self.bitmap = nil
  2344.       return
  2345.     end
  2346.     # ウエポンアニメのデータ取得
  2347.     @weapon_anime_type = @battler.weapon_anime_type(@battler.condition)
  2348.     # 設定が「非表示」の場合
  2349.     if !@weapon_anime_type[1] or @weapon_anime_type[0].nil?
  2350.       self.visible = false
  2351.       return
  2352.     else
  2353.       self.visible = true
  2354.     end
  2355.     # ファイル名が現在のものと異なる場合
  2356.     if @weapon_anime_type[0] != @weapon_name
  2357.       @weapon_name = @weapon_anime_type[0]
  2358.       # ビットマップを取得、設定
  2359.       self.bitmap = RPG::Cache.icon(@weapon_name)
  2360.       @width = bitmap.width
  2361.       @height = bitmap.height
  2362.       @flag = true
  2363.     end
  2364.     # 現在アニメパターンが現在のものと異なる場合
  2365.     if @pattern != @battler.pattern or @flag or @condition != @battler.condition
  2366.       @pattern = @battler.pattern
  2367.       @condition = @battler.condition
  2368.       self.ox = @width
  2369.       self.oy = @height
  2370.       self.z = battler.screen_z
  2371.       self.zoom_x = @battler.real_zoom * CHAR_ZOOM
  2372.       self.zoom_y = @battler.real_zoom * CHAR_ZOOM
  2373.       self.src_rect.set(0, 0, @width, @height)
  2374.       self.opacity = 255
  2375.       # バトラーより手前に表示
  2376.       if @weapon_anime_type[2]
  2377.         self.z += 10
  2378.       # バトラーより奥に表示
  2379.       else
  2380.         self.z -= 10
  2381.       end
  2382.       @flag = false
  2383.     end
  2384.   end
  2385. end

  2386. #==============================================================================
  2387. # ■ Sprite_Flying
  2388. #------------------------------------------------------------------------------
  2389. #  バトラー表示用のスプライトです。Game_Battler クラスのインスタンスを監視し、
  2390. # スプライトの状態を自動的に変化させます。
  2391. #==============================================================================

  2392. class Sprite_Flying < RPG::Sprite
  2393.   include Side_view
  2394.   #--------------------------------------------------------------------------
  2395.   # ● 公開インスタンス変数
  2396.   #--------------------------------------------------------------------------
  2397.   attr_accessor :battler                  # バトラー
  2398.   #--------------------------------------------------------------------------
  2399.   # ● オブジェクト初期化
  2400.   #     viewport : ビューポート
  2401.   #     battler  : バトラー (Game_Battler)
  2402.   #--------------------------------------------------------------------------
  2403.   def initialize(viewport, battler = nil)
  2404.     super(viewport)
  2405.     @battler = battler
  2406.     @battler_visible = false
  2407.   end
  2408.   #--------------------------------------------------------------------------
  2409.   # ● 解放
  2410.   #--------------------------------------------------------------------------
  2411.   def dispose
  2412.     if self.bitmap != nil
  2413.       self.bitmap.dispose
  2414.     end
  2415.     super
  2416.   end
  2417.   #--------------------------------------------------------------------------
  2418.   # ● フレーム更新
  2419.   #--------------------------------------------------------------------------
  2420.   def update
  2421.     super
  2422.     # バトラーが nil の場合
  2423.     if @battler == nil
  2424.       self.bitmap = nil
  2425.       loop_animation(nil)
  2426.       return
  2427.     end
  2428.     # 遠距離アニメ
  2429.     flying_animation = @battler.flying_animation
  2430.     flying_start = flying_animation[0]
  2431.     flying_end   = flying_animation[1]
  2432.     # アニメーション ID が現在のものと異なる場合
  2433.     if @anime_id != @battler.flying_anime[0]
  2434.       @anime_id = @battler.flying_anime[0]
  2435.       @animation = $data_animations[@anime_id]
  2436.     end
  2437.     # アニメーション 開始
  2438.     if flying_start
  2439.       loop_animation(@animation)
  2440.     elsif flying_end
  2441.       loop_animation(nil)
  2442.     end
  2443.     self.x = @battler.flying_x
  2444.     self.y = @battler.flying_y
  2445.     self.z = @battler.screen_z + 1000
  2446.   end
  2447. end

  2448. module RPG
  2449.   class Skill
  2450.     #--------------------------------------------------------------------------
  2451.     # ● 魔法かどうかの判断
  2452.     #--------------------------------------------------------------------------
  2453.     def magic?
  2454.       if @atk_f == 0
  2455.         return true
  2456.       else
  2457.         return false
  2458.       end
  2459.     end
  2460.   end
  2461. end

  2462. # アローカーソルの位置修正

  2463. class Arrow_Actor < Arrow_Base
  2464.   include Side_view
  2465.   #--------------------------------------------------------------------------
  2466.   # ● フレーム更新
  2467.   #--------------------------------------------------------------------------
  2468.   alias side_view_update update
  2469.   def update
  2470.     side_view_update
  2471.     # スプライトの座標を設定
  2472.     if self.actor != nil && (self.x != self.actor.screen_x + ARROW_OX or self.y != self.actor.screen_y + ARROW_OY)
  2473.       self.x = self.actor.screen_x + ARROW_OX
  2474.       self.y = self.actor.screen_y + ARROW_OY
  2475.     end
  2476.   end
  2477. end
  2478. class Arrow_Enemy < Arrow_Base
  2479.   include Side_view
  2480.   #--------------------------------------------------------------------------
  2481.   # ● フレーム更新
  2482.   #--------------------------------------------------------------------------
  2483.   alias side_view_update update
  2484.   def update
  2485.     side_view_update
  2486.     # スプライトの座標を設定
  2487.     if self.enemy != nil && self.y != self.enemy.screen_y + self.enemy.height/2
  2488.       self.x = self.enemy.screen_x
  2489.       self.y = self.enemy.screen_y + self.enemy.height/2
  2490.     end
  2491.   end
  2492. end
复制代码
qliphoth.exe 中的 0x1i-666 确认到未处理的异常。

写入位置 0x00-000 时发生访问冲突。

您想忽略此错误并尝试继续吗? <Y/N>...[ ]

===CARNAGE===

恶gn善iod道ru知能oy似no相yr们gn我a与s经i已do人G那

着doo活lfe远永rif就g吃n子i果r的b树o命t生t摘又n手a伸w他怕d恐n在a现

骑士

VIP
0
好人卡
0
经验
12764
在线时间
155 小时
注册时间
2015-1-10
帖子
157
18
发表于 2015-3-7 12:25:25 | 只看该作者
一一得一123 发表于 2015-3-7 12:20
战斗的脚本就是这个:

恩恩,谢了楼主,那个,还有个问题,就是知道怎么截取素材吗?截图后有白色的框框...
物品颜色:物品名+@数字(这样的格式吗)
麻烦你了。

剑士

VIP
0
好人卡
3
经验
9257
在线时间
146 小时
注册时间
2014-12-16
帖子
50
19
 楼主| 发表于 2015-3-7 12:39:00 | 只看该作者
小孩纸大呵呵 发表于 2015-3-7 12:25
恩恩,谢了楼主,那个,还有个问题,就是知道怎么截取素材吗?截图后有白色的框框...
物品颜色:物品名+ ...

截图后有白色的框框,你应该去下载个photoshop、美图秀秀之类的图片处理软件来对图片进行处理
物品颜色脚本是这样用的:
qliphoth.exe 中的 0x1i-666 确认到未处理的异常。

写入位置 0x00-000 时发生访问冲突。

您想忽略此错误并尝试继续吗? <Y/N>...[ ]

===CARNAGE===

恶gn善iod道ru知能oy似no相yr们gn我a与s经i已do人G那

着doo活lfe远永rif就g吃n子i果r的b树o命t生t摘又n手a伸w他怕d恐n在a现

 
 
 

站点统计|小黑屋| 红狼游戏中心  

Copyright © 2015-2099 kdsrpg All Rights Reserved.

Powered by kds 官方QQ群:182762810

沪ICP备18006881号-2