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

Project1

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

[已经过期] 关于菜鸟横版战斗脚本的问题

[复制链接]

Lv1.梦旅人

梦石
0
星屑
50
在线时间
42 小时
注册时间
2013-9-30
帖子
16
跳转到指定楼层
1
发表于 2013-10-10 11:32:14 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

x
本帖最后由 2604241560 于 2013-10-10 12:13 编辑
  1. =begin
  2. ###############################################################################

  3. 全局行走图战斗 v1.1
  4. 本版本只经低测试,可能存在某些bug。
  5. 请注意更新
  6. http://rpg.blue/viewthread.php?tid=129875&extra=page%3D1

  7. ###############################################################################
  8. ------------------------------------------------------------------------------
  9. 经过了两次的修改,终于完全实现了远距离攻击的效果(弓箭、铳类)
  10. 另外,也实现了简单的回旋攻击(类似回力镖的攻击)和攻击道具(类似石头或炸弹)

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

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

  22. 2)战斗动画(显示‘对象方的动画’之前先显示‘飞行武器射去敌人身上’的动画)
  23. 脚本453行:  回旋武器的id  (攻击时会显示一段类似回力镖的动画)
  24. 脚本455行:  弓箭武器的id  (攻击时会显示箭射去敌人身上的动画)
  25. 脚本457行:  铳类武器的id  (攻击时会显示子弹射去敌人身上的动画)
  26. 脚本470行:  回旋技能的id  (技能使用时会显示一段类似回力镖的动画)
  27. 脚本472行:  弓箭技能的id  (技能使用时会显示箭射去敌人身上的动画)
  28. 脚本474行:  铳类技能的id  (技能使用时会显示子弹射去敌人身上的动画)
  29. 脚本486行:  抛击道具的id  (使用该道具时,道具被丢到敌人身上)

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

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

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

  46. =end                                                        #modify by darkten

  47. ###############################################################################

  48. =begin

  49. 此版本更新了以下几点:
  50. 1.支持敌人行走图战斗
  51. 2.修正与RTAB并用的bug。
  52. 3.支持敌人也玩小石头

  53. 使用方法:
  54. 1.敌人的战斗图名称要与敌人的行走图名称相一致,具体查看本范例编号为2的敌人。
  55. 2.请自行设置 160 ~ 173 行的内容。

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

  206. #--------------------------------------------------------------------------
  207. # ● 行动設定
  208. #--------------------------------------------------------------------------
  209. module BattleActions
  210.   
  211.   #下本身只是一个例子,所以请自己做。

  212.   Actions = {

  213.   "通常攻撃" => [
  214.   "动画闪烁",
  215.   "角色动画変更#WALK_L",
  216.   "移动#target,50,0,35,20",
  217.   "动画行动",
  218.   "角色动画変更#ATTACK",
  219.   "远距离动画",
  220.   "动画对象",
  221.   "移动#target_far,30,0,60,0",
  222.   "角色动画変更#WALK_L",
  223.   "移动#self,-30,0,25,15",
  224.   "終了"
  225.   ],

  226.   "エネミー攻撃" => [
  227.   
  228.   "动画闪烁",
  229.   "角色动画変更#WALK_L",
  230.   "移动#self,-36,0,12,0",
  231.   "动画行动",
  232.   "角色动画変更#ATTACK",
  233.   "远距离动画",
  234.   "动画对象",
  235.   "角色动画変更#WALK_L",
  236.   "移动#self,0,0,12,0",
  237.   "終了"
  238.   ],
  239.   
  240.   "術発動" => [
  241.   
  242.   "动画闪烁",
  243.   "角色动画変更#WALK_L",
  244.   "移动#self,-32,0,4,0",
  245.   "角色动画変更#MAGIC",
  246.   "动画行动",
  247.   "等待帧数#15",
  248.   "远距离动画",
  249.   "动画对象",
  250.   "角色动画変更#WALK_L",
  251.   "移动#self,0,0,4,2",
  252.   "終了"
  253.   ],

  254.   "アイテム使用" => [
  255.   
  256.   "动画闪烁",
  257.   "角色动画変更#WALK_L",
  258.   "移动#self,-32,0,4,0",
  259.   "动画行动",
  260.   "角色动画変更#ITEM",
  261.   "等待帧数#15",
  262.   "远距离动画",
  263.   "动画对象",
  264.   "角色动画変更#WALK_L",
  265.   "移动#self,0,0,4,2",
  266.   "終了"
  267.   ],

  268.   "弓箭攻撃" => [
  269.   
  270.   "动画闪烁",
  271.   "角色动画変更#WALK_L",
  272.   "移动#self,-32,0,4,0",
  273.   "动画行动",
  274.   "角色动画変更#ATTACK",
  275.   "远距离动画",
  276.   "动画对象",
  277.   "角色动画変更#WALK_L",
  278.   "移动#self,0,0,4,2",
  279.   "終了"
  280.   ],

  281.   "回旋攻撃" => [
  282.   
  283.   "动画闪烁",
  284.   "角色动画変更#WALK_L",
  285.   "移动#self,-28,0,4,0",
  286.   "动画行动",
  287.   "角色动画変更#STAND_L",
  288.   "等待帧数#10",
  289.   "远距离动画",
  290.   "动画对象",
  291.   "角色动画変更#WALK_L",
  292.   "移动#self,0,0,4,2",
  293.   "終了"
  294.   ],
  295.   
  296.   "远距离発動" => [
  297.   
  298.   "动画闪烁",
  299.   "角色动画変更#WALK_L",
  300.   "移动#self,-32,0,4,0",
  301.   "角色动画変更#MAGIC",
  302.   "动画行动",
  303.   "角色动画変更#ATTACK",
  304.   "远距离动画",
  305.   "动画对象",
  306.   "角色动画変更#WALK_L",
  307.   "移动#self,0,0,4,2",
  308.   "終了"
  309.   ],
  310.   
  311.   "回旋発動" => [
  312.   
  313.   "动画闪烁",
  314.   "角色动画変更#WALK_L",
  315.   "移动#self,-32,0,4,0",
  316.   "角色动画変更#MAGIC",
  317.   "动画行动",
  318.   "角色动画変更#STAND_L",  
  319.   "远距离动画",
  320.   "动画对象",
  321.   "角色动画変更#WALK_L",
  322.   "移动#self,0,0,4,2",
  323.   "終了"
  324.   ],
  325.   
  326.   #######################################################################
  327.   #      剑系技能        
  328.   #######################################################################
  329.   
  330.   "剑系低级技能" => [
  331.   
  332.   "动画闪烁",
  333.   "残像表示",
  334.   "移动#target_near,160,0,20,20",
  335.   "角色动画変更#WALK_L",
  336.   "左右反転",
  337.   "角色动画固定#ATTACK#3",
  338.   "动画行动",
  339.   "SE演奏#135-Light01,100,100",
  340.   "数据库动画表示#self,10",
  341.   "等待帧数#30",
  342.   "左右反転",
  343.   "数据库动画表示#self,11",
  344.   "移动#target_far,60,0,48,0",
  345.   "动画对象",
  346.   "等待帧数#20",
  347.   "动画固定解除",
  348.   "角色动画変更#WALK_L",
  349.   "移动#self,0,0,60,50,0",
  350.   "残像消去",
  351.   "終了"
  352.   ],

  353.   #          虹剑流武技
  354.   #——————————————————————————————————
  355.   "一线虹剑斩" => [
  356.   
  357.   "动画闪烁",
  358.   "移动#target_near,340,-100,60,30",
  359.   "角色动画変更#WALK_L",
  360.   "角色动画固定#ATTACK#3",
  361.   "左右反転",
  362.   "动画行动",
  363.   "数据库动画表示#self,34",
  364.   "数据库动画表示#self,132",
  365.   "等待帧数#20",
  366.   "左右反転",
  367.   "残像表示",
  368.   "数据库动画表示#self,118",
  369.   "移动#target_far,-50,0,80,0",
  370.   "动画对象",
  371.   "动画固定解除",
  372.   "角色动画変更#WALK_L",
  373.   "移动#self,0,0,60,50,0",
  374.   "残像消去",
  375.   "終了"
  376.   ],
  377.   
  378.   "虹剑雨" => [
  379.   
  380.   "动画闪烁",
  381.   "移动#target_near,170,-170,30,0",
  382.   "角色动画変更#WALK_L",
  383.   "左右反転",
  384.   "角色动画固定#ATTACK#3",
  385.   "动画行动",
  386.   "数据库动画表示#self,34",
  387.   "数据库动画表示#self,132",
  388.   "等待帧数#15",
  389.   "左右反転",
  390.   "数据库动画表示#self,127",
  391.   "残像表示",
  392.   "移動#target_far,-20,120,48,0",
  393.   "动画对象",
  394.   "动画固定解除",
  395.   "角色动画変更#WALK_L",
  396.   "移动#self,0,0,60,50,0",
  397.   "残像消去",
  398.   "終了"
  399.   ],
  400.   
  401.   #########################################################################
  402.   #           长枪系技能
  403.   #########################################################################
  404.   
  405.   "枪系低级技能" => [
  406.   
  407.   "动画闪烁",
  408.   "残像表示",
  409.   "移动#target_near,400,0,20,20",
  410.   "角色动画変更#WALK_L",
  411.   "左右反転",
  412.   "角色动画固定#ATTACK#3",
  413.   "动画行动",
  414.   "SEの演奏#135-Light01,100,100",
  415.   "数据库动画表示#self,13",
  416.   "等待帧数#30",
  417.   "左右反転",
  418.   "数据库动画表示#self,14",
  419.   "移动#target_far,0,0,48,0",
  420.   "动画对象",
  421.   "等待帧数#20",
  422.   "动画固定解除",
  423.   "角色动画変更#WALK_L",
  424.   "移动#self,0,0,60,50,0",
  425.   "残像消去",
  426.   "終了"
  427.   ],
  428.   #         圣光冲击流
  429.   #-------------------------------------------------------------------------
  430.   
  431.   "圣光·十字冲击" => [
  432.   
  433.   "动画闪烁",
  434.   "移动#target_near,400,-10,60,30",
  435.   "角色动画変更#WALK_L",
  436.   "左右反転",
  437.   "角色动画固定#ATTACK#3",
  438.   "动画行动",
  439.   "数据库动画表示#self,13",
  440.   "等待帧数#20",
  441.   "数据库动画表示#self,122",
  442.   "等待帧数#20",
  443.   "左右反転",
  444.   "数据库动画表示#self,123",
  445.   "残像表示",
  446.   "移动#target_far,-30,0,48,0",
  447.   "动画对象",
  448.   "等待帧数#20",
  449.   "动画固定解除",
  450.   "角色动画変更#WALK_L",
  451.   "移动#self,0,0,60,50,0",
  452.   "残像消去",
  453.   "終了"
  454.   ],
  455.   
  456.   #########################################################################
  457.   #            斧系技能
  458.   #########################################################################
  459.   
  460.   "斧系低级技能" => [
  461.   
  462.   "动画闪烁",
  463.   "残像表示",
  464.   "移动#target_near,120,0,20,20",
  465.   "角色动画変更#WALK_L",
  466.   "左右反転",
  467.   "角色动画固定#ATTACK#3",
  468.   "动画行动",
  469.   "SE演奏#135-Light01,100,100",
  470.   "数据库动画表示#self,16",
  471.   "等待帧数#30",
  472.   "左右反転",
  473.   "数据库动画表示#self,17",
  474.   "移动#target_far,50,0,48,0",
  475.   "动画对象",
  476.   "等待帧数#30",
  477.   "动画固定解除",
  478.   "角色动画変更#WALK_L",
  479.   "移动#self,0,0,60,50,0",
  480.   "残像消去",
  481.   "終了"
  482.   ],
  483.   
  484.   ##########################################################################
  485.   #       弓箭技能
  486.   ##########################################################################
  487.   
  488.   "精准射击" => [
  489.   
  490.   "动画闪烁",
  491.   "角色动画変更#WALK_L",
  492.   "移动#self,-32,0,4,0",
  493.   "动画行动",
  494.   "数据库动画表示#self,130",
  495.   "等待帧数#35",
  496.   "数据库动画表示#self,139",
  497.   "等待帧数#20",
  498.   "角色动画変更#ATTACK",
  499.   "等待帧数#20",
  500.   "远距离动画",
  501.   "动画对象",
  502.   "角色动画変更#WALK_L",
  503.   "移动#self,0,0,4,2",
  504.   "終了"
  505.   ],
  506.   
  507.   "双雕箭" => [
  508.   
  509.   "动画闪烁",
  510.   "角色动画変更#WALK_L",
  511.   "移动#self,-32,0,4,0",
  512.   "动画行动",
  513.   "数据库动画表示#self,130",
  514.   "角色动画変更#ATTACK",
  515.   "等待帧数#20",
  516.   "远距离动画",
  517.   "动画对象",
  518.   "角色动画変更#WALK_L",
  519.   "移动#self,0,0,4,2",
  520.   "終了"
  521.   ],
  522.   
  523.   #} #这里结束请不要关
  524.   } # ここで終わり 消さないでください
  525.   

  526. end
  527.   
  528. module RPG
  529.   class Weapon
  530.     #--------------------------------------------------------------------------
  531.     # ● アクション設定
  532.     #--------------------------------------------------------------------------
  533.     def battle_actions
  534.       case @id
  535.       when 17,18,19,20,21,22,23,24  # 远程武器的id回旋攻撃
  536.         return BattleActions::Actions["弓箭攻撃"]
  537.       when 33,34                       # 回旋武器的id
  538.         return BattleActions::Actions["回旋攻撃"]
  539.       end
  540.       else 1
  541.       return BattleActions::Actions["通常攻撃"]
  542.     end
  543.   end
  544.   class Skill
  545.     #--------------------------------------------------------------------------
  546.     # ● アクション設定
  547.     #--------------------------------------------------------------------------
  548.     def battle_actions
  549.       case @id
  550.       when 1,2  #剑系技能ID
  551.         return BattleActions::Actions["剑系低级技能"]
  552.       when 116   #特殊剑技
  553.         return BattleActions::Actions["一线虹剑斩"]
  554.       when 118   #特殊剑技
  555.         return BattleActions::Actions["虹剑雨"]
  556.       when 11,12  #枪系技能ID
  557.         return BattleActions::Actions["枪系低级技能"]
  558.       when 117   
  559.         return BattleActions::Actions["圣光·十字冲击"]
  560.       when 21,22  #斧系技能ID
  561.         return BattleActions::Actions["斧系低级技能"]
  562.       when 73,74,75,76,77,78,79,80  # 远程技能的id
  563.         return BattleActions::Actions["远距离発動"]
  564.       when 82                       # 回旋技能的id
  565.         return BattleActions::Actions["回旋発動"]
  566.       when 119   
  567.         return BattleActions::Actions["精准射击"]
  568.       when 120   
  569.         return BattleActions::Actions["双雕箭"]
  570.       end
  571.       else
  572.       if self.magic?
  573.         return BattleActions::Actions["術発動"]
  574.       else
  575.         return BattleActions::Actions["通用近战技能"]
  576.       end
  577.     end
  578.   end
  579.   class Item
  580.     #--------------------------------------------------------------------------
  581.     # ● アクション設定
  582.     #--------------------------------------------------------------------------
  583.     def battle_actions
  584.       return BattleActions::Actions["アイテム使用"]
  585.     end
  586.   end
  587. end
  588. #class Game_Enemy < Game_Battler
  589.   #--------------------------------------------------------------------------
  590.   # ● アクション設定
  591.   #--------------------------------------------------------------------------
  592. #~  def battle_actions
  593. #~    return BattleActions::Actions["エネミー攻撃"]
  594. #~  end
  595. #end
  596. =begin
  597. #--------------------------------------------------------------------------
  598. # ● 遠距離アニメーション
  599. #--------------------------------------------------------------------------
  600.  ☆ 説明
  601.   
  602.    行動者から対象者にアニメを飛ばします。
  603.    飛ばすアニメを データベース‐アニメーション で作ります。
  604.     [アニメーションID, スピード, 往復するか?,直線(false)or曲線(true)] で指定します。


  605.   ● カスタマイズ方法
  606.    
  607.     case @id
  608.     when 17,18,19,20
  609.       return [101,32,false,false]
  610.     when 21,22,23,24
  611.       return [102,32,false,false]
  612.     end
  613.     return 0
  614.    
  615.     のように描くとID別に指定可能です。
  616.    
  617.    
  618.   ● アニメーションID
  619.   
  620.   飛ばすアニメーションIDです。短い場合は繰り返しで表示されます。
  621.   
  622.    
  623.   ● スピード
  624.   
  625.   大きいほうが早い(0だとアニメは移動しません)
  626.   
  627.   1 = 1フレームで1ドット進むと考えてください。
  628.   
  629.   ● 往復するか?
  630.   
  631.   true とした場合、ブーメランのようにアニメが戻ります。
  632.   
  633.   ● 直線(false)or曲線(true)
  634.   
  635.   true  = 対象に向かって曲線で、アニメが飛びます。(修正の余地ありですが・・・)
  636.   false = 対象に向かって直線で、アニメが飛びます。
  637.    
  638. =end
  639. module RPG
  640.   class Weapon
  641.     #--------------------------------------------------------------------------
  642.     # ● 遠距離アニメーション
  643.     #--------------------------------------------------------------------------
  644.     def flying_anime
  645.       # ID 指定 の例(武器的id,分类是根据飞行武器的动画id)
  646.       case @id
  647.       when 33,34          #回旋武器(类似回力镖)的id
  648.         return [6,33,true,true]
  649.       when 17,18,19,20    #远程武器1(弓箭类)的id
  650.         return [4,28,false,false]
  651.       when 21,22,23,24    #远程武器2(铳类)的id
  652.         return [5,32,false,false]
  653.       end
  654.       return [0,0,false,false]
  655.     end
  656.   end
  657.   class Skill
  658.     #--------------------------------------------------------------------------
  659.     # ● 遠距離アニメーション
  660.     #--------------------------------------------------------------------------
  661.     def flying_anime
  662.       # ID 指定 の例(技能的id,分类是根据飞行武器的动画id)
  663.       case @id
  664.       when 82             #回旋技能(类似回力镖)的id
  665.         return [6,20,true,true]
  666.       when 73,74,75,76    #远程技能1(弓箭类)的id
  667.         return [101,32,false,false]
  668.       when 77,78,79,80    #远程技能2(铳类)的id
  669.         return [136,30,false,false]
  670.       when 119    #精准射击(铳类)ID
  671.         return [136,28,false,false]
  672.       when 120    #双雕箭(弓箭)ID
  673.         return [109,28,false,false]
  674.       end
  675.       return [0,0,false,false]
  676.     end
  677.   end
  678.   class Item
  679.     #--------------------------------------------------------------------------
  680.     # ● 遠距離アニメーション
  681.     #--------------------------------------------------------------------------
  682.     def flying_anime
  683.       case @id
  684.       when 34    #抛击类道具(如炸弹一类)的id
  685.         return [104,32,false,true]
  686.       end
  687.       return [0,0,false,false]
  688.     end
  689.   end
  690. end

  691. #class Game_Enemy < Game_Battler
  692.   #--------------------------------------------------------------------------
  693.   # ● 遠距離アニメーション
  694.   #--------------------------------------------------------------------------
  695. #~  def flying_anime
  696. #~    return [0,0,false,false]
  697. #~  end
  698. #end



  699. #==============================================================================
  700. # ■ Game_Battler
  701. #==============================================================================
  702. class Game_Battler
  703.   include Side_view
  704.   #--------------------------------------------------------------------------
  705.   # ● 追加・公開インスタンス変数  (追加·公开实例变量)
  706.   #--------------------------------------------------------------------------
  707.   attr_accessor :height            # 画像の高さ   (画像的高度)
  708.   attr_accessor :real_x            # X座標補正
  709.   attr_accessor :real_y            # Y座標補正
  710.   attr_accessor :real_zoom         # 拡大率
  711.   attr_accessor :wait_count        # アニメーション 待ち時間  (动画等待时间)
  712.   attr_accessor :wait_count2       # アニメーション 待ち時間2
  713.   attr_accessor :pattern           # アニメーション カウント(キャラ)  (动画技术(角色))
  714.   attr_accessor :shake                   # シェイク開始フラッグ
  715.   attr_accessor :reverse                 # 左右反転フラッグ
  716.   attr_accessor :shadow                  # 残像フラッグ
  717.   attr_accessor :flash_flag              # 閃きフラッグ
  718.   attr_reader   :ox                      # X座標補正
  719.   attr_reader   :oy                      # Y座標補正
  720.   attr_reader   :flying_x                # 遠距離アニメX座標
  721.   attr_reader   :flying_y                # 遠距離アニメY座標
  722.   attr_reader   :flying_anime            # 遠距離アニメ
  723.   attr_reader   :animation1_on           # 行動アニメ開始フラッグ
  724.   attr_reader   :animation2_on           # 対象アニメ開始フラッグ
  725.   #--------------------------------------------------------------------------
  726.   # ● デフォルトのアニメーション待ち時間を取得 (默认的动画等待时间取得)
  727.   #--------------------------------------------------------------------------
  728.   def animation_duration=(animation_duration)
  729.     @_animation_duration = animation_duration
  730.   end
  731.   #--------------------------------------------------------------------------
  732.   # ● バトル開始時のセットアップ(战斗开始时的安装? 百度搜的……)  
  733.   #--------------------------------------------------------------------------
  734.   def start_battle
  735.     [url=home.php?mod=space&uid=291977]@height[/url] = 0
  736.     @real_x = 0
  737.     @real_y = 0
  738.     @real_zoom = 1.0
  739.     @battler_condition = ""
  740.     @action = nil
  741.     @battle_actions = []
  742.     @battler_action = false
  743.     @step = 0
  744.     @anime_on = false
  745.     @wait_count = 0
  746.     @wait_count2 = 0
  747.     @ox = 0
  748.     @oy = 0
  749.     @pattern = 0
  750.     @pattern_log = true
  751.     @pattern_freeze = false
  752.     @condition_freeze = false
  753.     @active = false
  754.     @move_distance = nil
  755.     @move_wait = 0
  756.     @move_coordinates = [0,0,0,0]
  757.     @flying_distance = nil
  758.     @flying_wait = 0
  759.     @flying_x = 0
  760.     @flying_y = 0
  761.     @flash_flag = {}
  762.     self.flying_clear
  763.   end
  764.   #--------------------------------------------------------------------------
  765.   # ● 移動中判定
  766.   #--------------------------------------------------------------------------
  767.   def moving?
  768.     # X座標補正または、Y座標補正が0でなければ、(移動中  X坐标补正或,Y坐标补正0的话,移动中)
  769.     return (@ox != 0 or @oy != 0)
  770.   end
  771.   #--------------------------------------------------------------------------
  772.   # ● 移動終了判定
  773.   #--------------------------------------------------------------------------
  774.   def move_end?
  775.     return (@ox == @move_coordinates[0] and @oy == @move_coordinates[1])
  776.   end
  777.   #--------------------------------------------------------------------------
  778.   # ● アクション開始設定   (动作开始设定)
  779.   #--------------------------------------------------------------------------
  780.   def action(flag = true)
  781.     @battler_action = flag
  782.     @animation1_on = false
  783.     @animation2_on = false
  784.     @step = "setup"
  785.   end   
  786.   #--------------------------------------------------------------------------
  787.   # ● アクション中判定      (动作中判定)
  788.   #--------------------------------------------------------------------------
  789.   def action?
  790.     return @battler_action
  791.   end
  792.   #--------------------------------------------------------------------------
  793.   # ● 閃き判定          (闪烁的判定)
  794.   #--------------------------------------------------------------------------
  795.   def flash?
  796.     return @flash_flg
  797.   end
  798.   #--------------------------------------------------------------------------
  799.   # ● 戦闘不能判定
  800.   #--------------------------------------------------------------------------
  801.   def anime_dead?
  802.     if $game_temp.in_battle and !RTAB
  803.       if [2,3,4,5].include?($scene.phase4_step)
  804.         return @last_dead
  805.       end
  806.     end
  807.     return @last_dead = self.dead?
  808.   end
  809.   #--------------------------------------------------------------------------
  810.   # ● ピンチ状態判定        (危机状态判定)
  811.   #--------------------------------------------------------------------------
  812.   def crisis?
  813.     if $game_temp.in_battle and !RTAB
  814.       if [2,3,4,5].include?($scene.phase4_step)
  815.         return @last_crisis
  816.       end
  817.     end
  818.     return @last_crisis = (self.hp <= self.maxhp / 4 or badstate?)
  819.   end
  820.   #--------------------------------------------------------------------------
  821.   # ● バッドステート判定        (坏状态判定?    百度啊……)
  822.   #--------------------------------------------------------------------------
  823.   def badstate?
  824.     for i in @states
  825.       unless $data_states[i].nonresistance
  826.         return true
  827.       end
  828.     end
  829.     return false
  830.   end
  831.   #--------------------------------------------------------------------------
  832.   # ● 飛行
  833.   #--------------------------------------------------------------------------
  834.   def fly
  835.     if [url=home.php?mod=space&uid=14121]@fly[/url] != nil
  836.       return @fly
  837.     end
  838.     for id in @states
  839.       if FLY_STATES.include?($data_states[id].name)
  840.         return 60
  841.       end
  842.     end
  843.     return 0
  844.   end
  845.   #--------------------------------------------------------------------------
  846.   # ● 遠距離アニメ目標座標の計算       (远距离动画目标坐标)
  847.   #--------------------------------------------------------------------------
  848.   def flying_setup
  849.     # 二度目は実行しない     (第二次不实行  啥意思?)
  850.     return if @flying_distance != nil && !camera_correctness
  851.     if RTAB
  852.       targets = @target
  853.     else
  854.       targets = $scene.target_battlers
  855.     end
  856.     # 目的座標を計算
  857.     @f_target_x = 0
  858.     @f_target_y = 0
  859.     for t in targets
  860.       @f_target_x += t.screen_x
  861.       @f_target_y += t.screen_y
  862.     end
  863.     if targets != []
  864.       @f_target_x /= targets.size
  865.       @f_target_y /= targets.size
  866.     else
  867.       @flying_distance = 0
  868.       return
  869.     end
  870.     # 距離の計算
  871.     @flying_distance = (self.screen_x - @f_target_x).abs + (self.screen_y - @f_target_y).abs
  872.   end
  873.   #--------------------------------------------------------------------------
  874.   # ● 遠距離アニメ       远距离动画
  875.   #--------------------------------------------------------------------------
  876.   def flying_animation
  877.     # 戻る
  878.     if @step != "flying" or @flying_distance.nil?
  879.       return [false,true]
  880.     end
  881.     # あらかじめ計算
  882.     self_x = self.screen_x
  883.     self_y = self.screen_y
  884.     @flying_distance = @flying_distance == 0 ? 1 : @flying_distance
  885.     n1 = @flying_wait / @flying_distance.to_f
  886.     if @flying_distance - @flying_wait > @flying_distance / 2
  887.       n2 = 1.0 + 10.0 * @flying_wait / @flying_distance.to_f
  888.     else
  889.       n2 = 1.0 + 10.0 * (@flying_distance - @flying_wait) / @flying_distance.to_f
  890.     end
  891.     if !@flying_anime[4]
  892.       # 直線移動
  893.       x = (self_x + 1.0 * (@f_target_x - self_x) * n1).to_i
  894.       y = (self_y + 1.0 * (@f_target_y - self_y) * n1).to_i
  895.     else
  896.       # 曲線移動
  897.       if !@flying_proceed_end
  898.         x = (self_x + 1.0 * (@f_target_x - self_x) * n1).to_i
  899.         y = (self_y + 1.0 * (@f_target_y - self_y) * n1 - n2**2).to_i
  900.       else
  901.         x = (self_x + 1.0 * (@f_target_x - self_x) * n1).to_i
  902.         y = (self_y + 1.0 * (@f_target_y - self_y) * n1 + n2**2).to_i
  903.       end
  904.     end
  905.     # 座標代入
  906.     @flying_x = x
  907.     @flying_y = y
  908.     # ウエイト
  909.     if !@flying_proceed_end
  910.       # 開始
  911.       @flying_proceed_start = @flying_wait == 0
  912.       @flying_wait += @flying_anime[1]
  913.       @flying_wait = [@flying_wait,@flying_distance].min
  914.       @flying_proceed_end = @flying_wait == @flying_distance
  915.     else
  916.       # 開始
  917.       @flying_return_start = @flying_wait == @flying_distance
  918.       @flying_wait -= @flying_anime[1]
  919.       @flying_wait = [@flying_wait,0].max
  920.       @flying_return_end = @flying_wait == 0
  921.     end
  922.     if @flying_anime[1] == 0
  923.       @flying_end = true
  924.     elsif !@flying_anime[2]
  925.       @flying_end = @flying_proceed_end
  926.     else
  927.       @flying_end = @flying_return_end
  928.     end
  929.     # 値を返す(アニメ開始,アニメ終了)
  930.     return [@flying_proceed_start,@flying_end]
  931.   end
  932.   #--------------------------------------------------------------------------
  933.   # ● 遠距離アニメ初期化
  934.   #--------------------------------------------------------------------------
  935.   def flying_clear
  936.     @flying_proceed_start = false
  937.     @flying_proceed_end = false
  938.     @flying_return_start = false
  939.     @flying_return_end = false
  940.     @flying_end = false
  941.     @flying_anime = [0,0,false]
  942.   end
  943.   #--------------------------------------------------------------------------
  944.   # ● 移動
  945.   #--------------------------------------------------------------------------
  946.   def move
  947.     # 距離の計算
  948.     @move_distance = (@move_coordinates[2] - @move_coordinates[0]).abs +
  949.                      (@move_coordinates[3] - @move_coordinates[1]).abs
  950.     if @move_distance > 0
  951.       return if @ox == @move_coordinates[0] and @oy == @move_coordinates[1]
  952.       array = @move_coordinates
  953.       # ジャンプ補正値の計算
  954.       if @move_distance - @move_wait > @move_distance / 2
  955.         jump = (@move_action[4] * @move_wait / @move_distance.to_f)**2        
  956.       else
  957.         jump = (@move_action[4] * (@move_distance - @move_wait) / @move_distance.to_f)**2
  958.       end
  959.       jump = @move_action[4] > 0 ? -jump : jump
  960.       @ox = (array[2] + 1.0 * (array[0] - array[2]) * (@move_distance - @move_wait) / @move_distance.to_f).to_i
  961.       
  962.       @oy = (array[3] + 1.0 * (array[1] - array[3]) * (@move_distance - @move_wait) / @move_distance.to_f + jump).to_i
  963.       # ウエイト
  964.       @move_wait -= @move_action[3]
  965.       @move_wait = [@move_wait,0].max
  966.     end
  967.   end
  968.   #--------------------------------------------------------------------------
  969.   # ● 移動アクションの取得      (移动动作取得)
  970.   #--------------------------------------------------------------------------
  971.   def get_move_action
  972.     string = @action.split(/#/)[1]
  973.     string = string.split(/,/)
  974.     @move_action = [string[0],string[1].to_i,string[2].to_i,string[3].to_i,string[4].to_i,string[5].to_i]
  975.   end
  976.   #--------------------------------------------------------------------------
  977.   # ● アクションの取得          动作取得
  978.   #--------------------------------------------------------------------------
  979.   def get_step
  980.     if @action.nil?
  981.       @step = "finish"
  982.       return
  983.     end
  984.     string = @action.split(/#/)[0]
  985.     if string =~ "移动"
  986.       @step = "moving_setup"
  987.     elsif string =~ "动画实行"
  988.       @step = "action"
  989.     elsif string =~ "远距离动画"
  990.       @step = "flying"
  991.     elsif string =~ "角色动画変更"
  992.       @step = "change"
  993.     elsif string =~ "动画行动"
  994.       @step = "animation1"
  995.     elsif string =~ "动画对象"
  996.       @step = "animation2"
  997.     elsif string =~ "等待帧数"
  998.       @step = "wait"
  999.     elsif string =~ "左右反転"
  1000.       @step = "reverse"
  1001.     elsif string =~ "动画闪烁"
  1002.       @step = "flash"
  1003.     elsif string =~ "残像表示"
  1004.       @step = "shadow_on"
  1005.     elsif string =~ "残像消去"
  1006.       @step = "shadow_off"
  1007.     elsif string =~ "角色动画固定"
  1008.       @step = "freeze"
  1009.     elsif string =~ "动画固定解除"
  1010.       @step = "freeze_lifting"
  1011.     elsif string =~ "数据库动画表示"
  1012.       @step = "animation_start"
  1013.     elsif string =~ "SE演奏"
  1014.       @step = "play_se"
  1015.     else
  1016.       @step = "finish"
  1017.     end
  1018.   end
  1019.   #--------------------------------------------------------------------------
  1020.   # ● フレーム更新 (次のアクションへ)  (框架下的更新(动作)去   去?去哪?)
  1021.   #--------------------------------------------------------------------------
  1022.   def update_next
  1023.     @action = @battle_actions.shift
  1024.     @step = get_step
  1025.   end
  1026.   #--------------------------------------------------------------------------
  1027.   # ● フレーム更新 (動作取得)
  1028.   #--------------------------------------------------------------------------
  1029.   def update_setup
  1030.     # アクションの取得
  1031.     self.get_actions
  1032.     @action = @battle_actions.shift
  1033.     @step = get_step
  1034.   end
  1035.   #--------------------------------------------------------------------------
  1036.   # ● フレーム更新 (移動取得)
  1037.   #--------------------------------------------------------------------------
  1038.   def update_moving_setup
  1039.     # 移動アクションの取得
  1040.     self.get_move_action
  1041.     # 移動目標の設定
  1042.     self.move_setup
  1043.     @step = "moving"
  1044.   end
  1045.   #--------------------------------------------------------------------------
  1046.   # ● フレーム更新 (移動)
  1047.   #--------------------------------------------------------------------------
  1048.   def update_moving
  1049.     # 移動
  1050.     self.move
  1051.     self.condition = @battler_condition
  1052.     # 移動完了したら次のステップへ
  1053.     if move_end?
  1054.       @wait_count = 2
  1055.       @action = @battle_actions.shift
  1056.       @step = get_step
  1057.     end
  1058.   end
  1059.   #--------------------------------------------------------------------------
  1060.   # ● フレーム更新 (アニメ実行)
  1061.   #--------------------------------------------------------------------------
  1062.   def update_action
  1063.     con = @action.split(/#/)[1]
  1064.     # 右手・左手を分ける
  1065.     if DUAL_WEAPONS_ANIME.include?(con)
  1066.       if !@first_weapon and @second_weapon
  1067.         con = con + "_L"
  1068.       else
  1069.         con = con + "_R"
  1070.       end
  1071.     end
  1072.     # アニメ変更
  1073.     self.condition = con
  1074.     # ループか否か
  1075.     if !ANIME[@battler_condition][1]
  1076.       self.anime_on
  1077.     end
  1078.     @action = @battle_actions.shift
  1079.     @step = get_step
  1080.   end
  1081.   #--------------------------------------------------------------------------
  1082.   # ● フレーム更新 (遠距離アニメ)
  1083.   #--------------------------------------------------------------------------
  1084.   def update_flying
  1085.     # 目標の設定
  1086.     self.flying_setup
  1087.     # 遠距離アニメ終了
  1088.     if @flying_end
  1089.       self.flying_clear
  1090.       @action = @battle_actions.shift
  1091.       @step = get_step
  1092.     end
  1093.   end
  1094.   #--------------------------------------------------------------------------
  1095.   # ● フレーム更新 (アニメ変更)
  1096.   #--------------------------------------------------------------------------
  1097.   def update_change
  1098.     con = @action.split(/#/)[1]
  1099.     # 右手・左手を分ける
  1100.     if DUAL_WEAPONS_ANIME.include?(con)
  1101.       if !@first_weapon and @second_weapon
  1102.         con = con + "_L"
  1103.       else
  1104.         con = con + "_R"
  1105.       end
  1106.     end
  1107.     # アニメ変更
  1108.     self.condition = con
  1109.     # ループか否か
  1110.     if !ANIME[@battler_condition][1]
  1111.       self.anime_on
  1112.     end
  1113.     @action = @battle_actions.shift
  1114.     @step = get_step
  1115.   end
  1116.   #--------------------------------------------------------------------------
  1117.   # ● フレーム更新 (行動アニメ)
  1118.   #--------------------------------------------------------------------------
  1119.   def update_animation1
  1120.     @animation1_on = true
  1121.     # 行動アニメの後に行動を開始する
  1122.     if $scene.phase4_step == 3
  1123.       id = RTAB ? @anime1 : $scene.animation1_id
  1124.       animation = $data_animations[id]
  1125.       frame_max = animation != nil ? animation.frame_max : 0
  1126.       @wait_count2 = frame_max * 2
  1127.       return
  1128.     end
  1129.     @action = @battle_actions.shift
  1130.     @step = get_step
  1131.   end
  1132.   #--------------------------------------------------------------------------
  1133.   # ● フレーム更新 (対象アニメ)
  1134.   #--------------------------------------------------------------------------
  1135.   def update_animation2
  1136.     @animation2_on = true
  1137.     # 行動アニメの後に行動を開始する
  1138.     if $scene.phase4_step == 4
  1139.       id = RTAB ? @anime2 : $scene.animation2_id
  1140.       animation = $data_animations[id]
  1141.       frame_max = animation != nil ? animation.frame_max : 0
  1142.       @wait_count2 = frame_max * 2
  1143.       return
  1144.     end
  1145.     @action = @battle_actions.shift
  1146.     @step = get_step
  1147.   end
  1148.   #--------------------------------------------------------------------------
  1149.   # ● フレーム更新 (ウエイト)
  1150.   #--------------------------------------------------------------------------
  1151.   def update_wait
  1152.     @wait_count2 = @action.split(/#/)[1].to_i
  1153.     @action = @battle_actions.shift
  1154.     @step = get_step
  1155.   end
  1156.   #--------------------------------------------------------------------------
  1157.   # ● フレーム更新 (残像表示)
  1158.   #--------------------------------------------------------------------------
  1159.   def update_shadow_on
  1160.     [url=home.php?mod=space&uid=31758]@Shadow[/url] = true
  1161.     @action = @battle_actions.shift
  1162.     @step = get_step
  1163.   end
  1164.   #--------------------------------------------------------------------------
  1165.   # ● フレーム更新 (残像消去)
  1166.   #--------------------------------------------------------------------------
  1167.   def update_shadow_off
  1168.     @shadow = false
  1169.     @action = @battle_actions.shift
  1170.     @step = get_step
  1171.   end
  1172.   #--------------------------------------------------------------------------
  1173.   # ● フレーム更新 (左右反転)
  1174.   #--------------------------------------------------------------------------
  1175.   def update_reverse
  1176.     [url=home.php?mod=space&uid=30269]@reverse[/url] = @reverse ? false : true
  1177.     @action = @battle_actions.shift
  1178.     @step = get_step
  1179.   end
  1180.   #--------------------------------------------------------------------------
  1181.   # ● フレーム更新 (閃きアニメ)
  1182.   #--------------------------------------------------------------------------
  1183.   def update_flash
  1184.     # 閃きアニメの後に行動を開始する
  1185.     if @flash_flag["normal"]
  1186.       @wait_count = $scene.flash_duration
  1187.       @flash_flag["normal"] = false
  1188.       return
  1189.     end
  1190.     @action = @battle_actions.shift
  1191.     @step = get_step
  1192.   end
  1193.   #--------------------------------------------------------------------------
  1194.   # ● フレーム更新 (SEの演奏)
  1195.   #--------------------------------------------------------------------------
  1196.   def update_play_se
  1197.     data = @action.split(/#/)[1]
  1198.     data = data.split(/,/)
  1199.     # SE を演奏
  1200.     Audio.se_play("Audio/SE/" + data[0], data[1].to_i, data[2].to_i)
  1201.     @action = @battle_actions.shift
  1202.     @step = get_step
  1203.   end
  1204.   #--------------------------------------------------------------------------
  1205.   # ● フレーム更新 (アクターアニメ固定)
  1206.   #--------------------------------------------------------------------------
  1207.   def update_freeze
  1208.     con = @action.split(/#/)[1]
  1209.     # 右手・左手を分ける
  1210.     if DUAL_WEAPONS_ANIME.include?(con)
  1211.       if !@first_weapon and @second_weapon
  1212.         con = con + "_L"
  1213.       else
  1214.         con = con + "_R"
  1215.       end
  1216.     end
  1217.     # アニメ変更
  1218.     self.condition = con
  1219.     @pattern = @action.split(/#/)[2].to_i
  1220.     @pattern_freeze = true
  1221.     @condition_freeze = true
  1222.     @action = @battle_actions.shift
  1223.     @step = get_step
  1224.   end
  1225.   #--------------------------------------------------------------------------
  1226.   # ● フレーム更新 (アクターアニメ固定解除)
  1227.   #--------------------------------------------------------------------------
  1228.   def update_freeze_lifting
  1229.     @pattern_freeze = false
  1230.     @condition_freeze = false
  1231.     @action = @battle_actions.shift
  1232.     @step = get_step
  1233.   end
  1234.   #--------------------------------------------------------------------------
  1235.   # ● フレーム更新 (アニメーションの表示)
  1236.   #--------------------------------------------------------------------------
  1237.   def update_animation_start
  1238.     data = @action.split(/#/)[1]
  1239.     data = data.split(/,/)
  1240.     target = data[0]
  1241.     animation_id = data[1].to_i
  1242.     if RTAB
  1243.       case target
  1244.       when "self"
  1245.         @animation.push([animation_id,true])
  1246.       when "target"
  1247.         for tar in @target
  1248.           tar.animation.push([animation_id, true])
  1249.         end
  1250.       end
  1251.     else
  1252.       case target
  1253.       when "self"
  1254.         @animation_id = animation_id
  1255.         @animation_hit = true
  1256.       when "target"
  1257.         for tar in $scene.target_battlers
  1258.           tar.animation_id = animation_id
  1259.           tar.animation_hit = true
  1260.         end
  1261.       end
  1262.     end
  1263.     @action = @battle_actions.shift
  1264.     @step = get_step
  1265.   end
  1266.   #--------------------------------------------------------------------------
  1267.   # ● フレーム更新 (動作終了)
  1268.   #--------------------------------------------------------------------------
  1269.   def update_finish
  1270.     # 動作終了
  1271.     @battler_action = false
  1272.     @step = "setup"
  1273.   end
  1274.   #--------------------------------------------------------------------------
  1275.   # ● バトラーの状態 変更(バトラーグラフィックのタイプ)
  1276.   #--------------------------------------------------------------------------
  1277.   def condition=(condition)
  1278.     return if @condition_freeze
  1279.     @battler_condition = condition
  1280.     @wait_count = ANIME[condition][2]
  1281.   end
  1282.   #--------------------------------------------------------------------------
  1283.   # ● バトラーの状態(バトラーグラフィックのタイプ)
  1284.   #--------------------------------------------------------------------------
  1285.   def condition
  1286.     return @battler_condition
  1287.   end
  1288.   #--------------------------------------------------------------------------
  1289.   # ● フレーム更新
  1290.   #--------------------------------------------------------------------------
  1291.   def update
  1292.     # ウェイト中の場合
  1293.     if @wait_count > 0
  1294.       return
  1295.     end
  1296.     # パターン更新
  1297.     self.char_animation
  1298.     # ウェイト中の場合
  1299.     if @wait_count2 > 0
  1300.       return
  1301.     end
  1302.    
  1303.     # 行動アニメーション
  1304.     if @battler_action
  1305.       method("update_" + @step).call
  1306.       return
  1307.     end
  1308.    
  1309.     # データ初期化
  1310.     @animation1_on = false
  1311.     @animation2_on = false
  1312.     @action = nil
  1313.     @battle_actions = []
  1314.     @move_wait = 0
  1315.     @move_distance = nil
  1316.     @flying_wait = 0
  1317.     @flying_distance = nil
  1318.     [url=home.php?mod=space&uid=14082]@Flash[/url] = false

  1319.     # RTAB対応
  1320.     # 通常・待機
  1321.     return self.condition = NORMAL
  1322.   end
  1323.   #--------------------------------------------------------------------------
  1324.   # ● アクションの取得
  1325.   #--------------------------------------------------------------------------
  1326.   def get_actions
  1327.     skill = $data_skills[self.current_action.skill_id]
  1328.     item = $data_items[self.current_action.item_id]
  1329.     kind = self.current_action.kind
  1330.     # 動作取得
  1331.     @battle_actions = []
  1332.     # スキル
  1333.     if skill != nil && kind == 1
  1334.       @battle_actions = skill.battle_actions.dup
  1335.       @flying_anime = skill.flying_anime
  1336.     # アイテム
  1337.     elsif item != nil && kind == 2
  1338.       @battle_actions = item.battle_actions.dup
  1339.       @flying_anime = item.flying_anime
  1340.     # 左手攻撃
  1341.     elsif !@first_weapon and @second_weapon and (self.is_a?(Game_Actor) or (!self.is_a?(Game_Actor) and !self.nce))

  1342.       @battle_actions = self.battle_actions2.dup
  1343.       @flying_anime = self.flying_anime2
  1344.     # 右手攻撃
  1345.     elsif self.current_action.basic == 0 and
  1346.       (self.is_a?(Game_Actor) or (!self.is_a?(Game_Actor) and !self.nce)) and self.current_action.kind == 0
  1347.       @battle_actions = self.battle_actions1.dup
  1348.       @flying_anime = self.flying_anime1
  1349.     # 通常攻撃
  1350.     elsif self.current_action.basic == 0 and self.current_action.kind == 0
  1351.       # 这里啊~~ =。=b
  1352.       if !self.is_a?(Game_Actor) and !self.nce
  1353.         @battle_actions = self.battle_actions1.dup
  1354.       else
  1355.         @battle_actions = BattleActions::Actions["エネミー攻撃"].dup
  1356.       end
  1357.       @flying_anime = self.flying_anime
  1358.     else
  1359.       @battle_actions = ["終了"]
  1360.       @flying_anime = [0,0,false,false]
  1361.     end
  1362.   end
  1363.   #--------------------------------------------------------------------------
  1364.   # ● ループしないアニメのセット
  1365.   #--------------------------------------------------------------------------
  1366.   def anime_on
  1367.     @pattern = 0
  1368.     @pattern_log = true
  1369.     return
  1370.   end
  1371.   #--------------------------------------------------------------------------
  1372.   # ● パターン更新
  1373.   #--------------------------------------------------------------------------
  1374.   def char_animation
  1375.     # パタン固定の場合もどる
  1376.     return if @pattern_freeze
  1377.     # ループしないアニメの場合 1234 で止まる
  1378.     if !ANIME[@battler_condition][1] && @pattern == 3
  1379.       return
  1380.     end
  1381.     # アニメさせない場合 1 で止まる
  1382.     if ANIME[@battler_condition][4]
  1383.       @pattern = 0
  1384.       return
  1385.     end
  1386.     @pattern = (@pattern + 1) % 4
  1387.   end
  1388.   #--------------------------------------------------------------------------
  1389.   # ● アニメタイプ
  1390.   #--------------------------------------------------------------------------
  1391.   def anime_type
  1392.     return ANIME[self.condition] != nil ? ANIME[self.condition][0] : 0
  1393.   end
  1394. end
  1395. #==============================================================================
  1396. # ■ Game_Actor
  1397. #==============================================================================
  1398. class Game_Actor < Game_Battler
  1399.   include Side_view
  1400.   #--------------------------------------------------------------------------
  1401.   # ● セットアップ
  1402.   #--------------------------------------------------------------------------
  1403.   alias side_view_setup setup
  1404.   def setup(actor_id)
  1405.     side_view_setup(actor_id)
  1406.     start_battle
  1407.   end
  1408.   #--------------------------------------------------------------------------
  1409.   # ● 二刀武器のID取得 ※エラー回避用
  1410.   #--------------------------------------------------------------------------
  1411.   def weapon2_id
  1412.     return @weapon2_id != nil ? @weapon2_id : 0
  1413.   end
  1414.   #--------------------------------------------------------------------------
  1415.   # ● X方向 ポジション 取得 (陣形スクリプト拡張用)
  1416.   #--------------------------------------------------------------------------
  1417.   def position
  1418.     return $data_classes[@class_id].position
  1419.   end
  1420.   #--------------------------------------------------------------------------
  1421.   # ● Y方向 ポジション 取得 (陣形スクリプト拡張用)
  1422.   #--------------------------------------------------------------------------
  1423.   def position2
  1424.     return self.index
  1425.   end
  1426.   #--------------------------------------------------------------------------
  1427.   # ● 武器アニメタイプ
  1428.   #--------------------------------------------------------------------------
  1429.   def weapon_anime_type(type)
  1430.     file_name  = weapon_anime_type0(type)
  1431.     visible   = weapon_anime_type1(type)
  1432.     z         = weapon_anime_type2(type)
  1433.     return [file_name,visible,z]
  1434.   end
  1435.   # 武器アイコン取得
  1436.   def weapon_anime_type0(type)
  1437.     type = ANIME[type][5]
  1438.     return weapon_anime1 if type == "右手"
  1439.     return weapon_anime2 if type == "左手"
  1440.     return nil
  1441.   end
  1442.   # 表示・非表示の取得
  1443.   def weapon_anime_type1(type)
  1444.     return ANIME[type][3]
  1445.   end
  1446.   # バトラーより上に表示するかどうか
  1447.   def weapon_anime_type2(type)
  1448.     type = ANIME[type][5]
  1449.     return true if type == "左手"
  1450.     return false
  1451.   end
  1452.   #--------------------------------------------------------------------------
  1453.   # ● バトル画面 X 座標の取得(カメラ補正無し)
  1454.   #--------------------------------------------------------------------------
  1455.   def true_x
  1456.   # bearrpg 如果有设定过角色的XP坐标就采用数组中的坐标否则用默认的计算方式。
  1457.   if ACTOR_X[self.index] !=nil
  1458.     return ACTOR_X[self.index]+ @ox
  1459.    else
  1460.     return ACTOR_X[4] + position * ACTOR_X[0] + @ox
  1461.    end
  1462.   end
  1463.   #--------------------------------------------------------------------------
  1464.   # ● バトル画面 Y 座標の取得(カメラ補正無し)
  1465.   #--------------------------------------------------------------------------
  1466.   def true_y
  1467.     # パーティ内の並び順から Y 座標を計算して返す
  1468.     if self.index != nil
  1469.      #bearrpg 如果有设定过角色的XP坐标就采用数组中的坐标否则用默认的计算方式。
  1470.     if ACTOR_Y[self.index] !=nil and $game_party.actors.size >3
  1471.       return ACTOR_Y[self.index]+ @oy - @height / 2
  1472.         else
  1473.       y = position2 * ACTOR_Y[4] + ACTOR_Y[0] + @oy - @height / 2
  1474.       return y
  1475.       end
  1476.     else
  1477.       return 0
  1478.     end
  1479.   end
  1480.   #--------------------------------------------------------------------------
  1481.   # ● バトル画面 X 座標の取得
  1482.   #--------------------------------------------------------------------------
  1483.   def screen_x(true_x = self.true_x)
  1484.    return 320 + (true_x - 320) * @real_zoom + @real_x
  1485.   end
  1486.   #--------------------------------------------------------------------------
  1487.   # ● バトル画面 Y 座標の取得
  1488.   #--------------------------------------------------------------------------
  1489.   def screen_y(true_y = self.true_y)
  1490.     return true_y * @real_zoom + @real_y
  1491.   end
  1492.   #--------------------------------------------------------------------------
  1493.   # ● バトル画面 Z 座標の取得
  1494.   #--------------------------------------------------------------------------
  1495.   def screen_z
  1496.     return screen_y + 1000
  1497.   end
  1498.   #--------------------------------------------------------------------------
  1499.   # ● バトル画面 X 座標の取得(移動などしていない場合)
  1500.   #--------------------------------------------------------------------------
  1501.   def base_x
  1502.     return 320 + (true_x - @ox - 320) * @real_zoom + @real_x
  1503.   end
  1504.   #--------------------------------------------------------------------------
  1505.   # ● バトル画面 Y 座標の取得
  1506.   #--------------------------------------------------------------------------
  1507.   def base_y
  1508.     return (true_y - @oy) * @real_zoom + @real_y
  1509.   end
  1510.   #--------------------------------------------------------------------------
  1511.   # ● バトル画面 拡大率の取得
  1512.   #--------------------------------------------------------------------------
  1513.   def zoom
  1514.     return ($scene.zoom_rate[1] - $scene.zoom_rate[0]) *
  1515.                           (true_x + @fly) / 480 + $scene.zoom_rate[0]
  1516.   end
  1517.   #--------------------------------------------------------------------------
  1518.   # ● 攻撃用、バトル画面 X 座標の取得
  1519.   #--------------------------------------------------------------------------
  1520.   def attack_x(z)
  1521.     return (320 - true_x) * z * 0.75
  1522.   end
  1523.   #--------------------------------------------------------------------------
  1524.   # ● 攻撃用、バトル画面 Y 座標の取得
  1525.   #--------------------------------------------------------------------------
  1526.   def attack_y(z)
  1527.     return (160 - (true_y + fly / 4) * z + @height * zoom * z / 2) * 0.75
  1528.   end
  1529.   #--------------------------------------------------------------------------
  1530.   # ● 閃き待ち時間
  1531.   #--------------------------------------------------------------------------
  1532.   def flash_duration
  1533.     return $scene.flash_duration
  1534.   end
  1535.   #--------------------------------------------------------------------------
  1536.   # ● アニメーション取得
  1537.   #--------------------------------------------------------------------------
  1538.   def battle_actions1
  1539.     weapon = $data_weapons[@weapon_id]
  1540.     return weapon != nil ? weapon.battle_actions : BattleActions::Actions["通常攻撃"]
  1541.   end
  1542.   #--------------------------------------------------------------------------
  1543.   # ● アニメーション取得
  1544.   #--------------------------------------------------------------------------
  1545.   def battle_actions2
  1546.     weapon = $data_weapons[@weapon2_id]
  1547.     return weapon != nil ? weapon.battle_actions : BattleActions::Actions["通常攻撃"]
  1548.   end
  1549.   #--------------------------------------------------------------------------
  1550.   # ● 武器アニメーション取得
  1551.   #--------------------------------------------------------------------------
  1552.   def weapon_anime1
  1553.     weapon = $data_weapons[@weapon_id]
  1554.     return weapon != nil ? weapon.icon_name : ""
  1555.   end
  1556.   #--------------------------------------------------------------------------
  1557.   # ● 武器アニメーション取得
  1558.   #--------------------------------------------------------------------------
  1559.   def weapon_anime2
  1560.     weapon = $data_weapons[@weapon2_id]
  1561.     return weapon != nil ? weapon.icon_name : ""
  1562.   end
  1563.   #--------------------------------------------------------------------------
  1564.   # ● 遠距離アニメーション取得
  1565.   #--------------------------------------------------------------------------
  1566.   def flying_anime1
  1567.     weapon = $data_weapons[@weapon_id]
  1568.     return weapon != nil ? weapon.flying_anime : [0,0,false,false]
  1569.   end
  1570.   #--------------------------------------------------------------------------
  1571.   # ● 遠距離アニメーション取得
  1572.   #--------------------------------------------------------------------------
  1573.   def flying_anime2
  1574.     weapon = $data_weapons[@weapon2_id]
  1575.     return weapon != nil ? weapon.flying_anime : [0,0,false,false]
  1576.   end
  1577.   #--------------------------------------------------------------------------
  1578.   # ● 移動目標座標の計算
  1579.   #--------------------------------------------------------------------------
  1580.   def move_setup
  1581.     if RTAB
  1582.       targets = @target
  1583.     else
  1584.       targets = $scene.target_battlers
  1585.     end
  1586.     case @move_action[0]
  1587.     when "self" # 自分
  1588.       @target_x = self.base_x
  1589.       @target_y = self.base_y
  1590.     when "target_near" # 一番近くのターゲット
  1591.       targets.sort!{|a,b| a.screen_x<=>b.screen_x }
  1592.       targets.reverse!
  1593.       if targets != []
  1594.         @target_x = targets[0].screen_x
  1595.         @target_y = targets[0].screen_y
  1596.       else
  1597.         @target_x = self.base_x
  1598.         @target_y = self.base_y
  1599.       end
  1600.     when "target_far" # 一番遠くのターゲット
  1601.       targets.sort!{|a,b| a.screen_x<=>b.screen_x }
  1602.       if targets != []
  1603.         @target_x = targets[0].screen_x
  1604.         @target_y = targets[0].screen_y
  1605.       else
  1606.         @target_x = self.base_x
  1607.         @target_y = self.base_y
  1608.       end
  1609.     when "target" # ターゲット中央
  1610.       @target_x = 0
  1611.       @target_y = 0
  1612.       for t in targets
  1613.         @target_x += t.screen_x
  1614.         @target_y += t.screen_y
  1615.       end
  1616.       if targets != []
  1617.         @target_x /= targets.size
  1618.         @target_y /= targets.size
  1619.       end
  1620.     when "troop" # "トループ中央"
  1621.       @target_x = 0
  1622.       @target_y = 0
  1623.       for t in $game_troop.enemies
  1624.         @target_x += t.screen_x
  1625.         @target_y += t.screen_y
  1626.       end
  1627.       if $game_troop.enemies != []
  1628.         @target_x /= $game_troop.enemies.size
  1629.         @target_y /= $game_troop.enemies.size
  1630.       end
  1631.     when "party" # "パーティ中央"
  1632.       @target_x = 0
  1633.       @target_y = 0
  1634.       for t in $game_party.actors
  1635.         @target_x += t.screen_x
  1636.         @target_y += t.screen_y
  1637.       end
  1638.       if $game_party.actors != []
  1639.         @target_x /= $game_party.actors.size
  1640.         @target_y /= $game_party.actors.size
  1641.       end
  1642.     when "screen" # "画面"
  1643.       @target_x = self.base_x
  1644.       @target_y = self.base_y
  1645.     end
  1646.     # 補正
  1647.     @target_x += @move_action[1] - self.base_x
  1648.     @target_y += @move_action[2] - self.base_y
  1649.     # 移動目標の座標をセット
  1650.     @move_coordinates = [@target_x.to_i,@target_y.to_i,@move_coordinates[0],@move_coordinates[1]]
  1651.     # 距離の計算(ウエイトの設定)
  1652.     @move_wait     = (@move_coordinates[2] - @move_coordinates[0]).abs +
  1653.                      (@move_coordinates[3] - @move_coordinates[1]).abs
  1654.   end
  1655. end
  1656. #==============================================================================
  1657. # ■ Game_Enemy
  1658. #==============================================================================
  1659. class Game_Enemy < Game_Battler
  1660.   attr_reader   :nce
  1661.   #--------------------------------------------------------------------------
  1662.   # ● セットアップ
  1663.   #--------------------------------------------------------------------------
  1664.   alias side_view_initialize initialize
  1665.   def initialize(troop_id, member_index)
  1666.     side_view_initialize(troop_id, member_index)
  1667.     start_battle
  1668.     @nce = NOT_CHARACTER_EMEMY.include? @enemy_id
  1669.     @weapon_id  = EMEMY_WEAPO[@enemy_id] != nil ? EMEMY_WEAPO[@enemy_id] : 0
  1670.     @weapon_id2  = EMEMY_WEAPO2[@enemy_id] != nil ? EMEMY_WEAPO2[@enemy_id] : 0
  1671.   end
  1672.   def character_name
  1673.     return self.battler_name
  1674.   end
  1675.   def character_hue
  1676.     return self.battler_hue
  1677.   end
  1678.   #--------------------------------------------------------------------------
  1679.   # ● 移動
  1680.   #--------------------------------------------------------------------------
  1681.   def move
  1682.     # 距離の計算
  1683.     @move_distance = (@move_coordinates[2] - @move_coordinates[0]).abs +
  1684.                      (@move_coordinates[3] - @move_coordinates[1]).abs
  1685.     if @move_distance > 0
  1686.       return if @ox == @move_coordinates[0] and @oy == @move_coordinates[1]
  1687.       array = @move_coordinates
  1688.       # ジャンプ補正値の計算
  1689.       if @move_distance - @move_wait > @move_distance / 2
  1690.         jump = (@move_action[4] * @move_wait / @move_distance.to_f)**2        
  1691.       else
  1692.         jump = (@move_action[4] * (@move_distance - @move_wait) / @move_distance.to_f)**2
  1693.       end
  1694.       jump = @move_action[4] > 0 ? -jump : jump
  1695.       jump = 0 if @weapon_id + @weapon_id2 == 0
  1696.       @ox = (array[2] + 1.0 * (array[0] - array[2]) * (@move_distance - @move_wait) / @move_distance.to_f).to_i
  1697.       @oy = (array[3] + 1.0 * (array[1] - array[3]) * (@move_distance - @move_wait) / @move_distance.to_f + jump).to_i
  1698.       # ウエイト
  1699.       @move_wait -= @move_action[3]
  1700.       @move_wait = [@move_wait,0].max
  1701.     end
  1702.   end
  1703.   #--------------------------------------------------------------------------
  1704.   # ● 武器アニメタイプ
  1705.   #--------------------------------------------------------------------------
  1706.   def weapon_anime_type(type)
  1707.     file_name  = weapon_anime_type0(type)
  1708.     visible   = weapon_anime_type1(type)
  1709.     z         = weapon_anime_type2(type)
  1710.     return [file_name,visible,z]
  1711.   end
  1712.   # 武器アイコン取得
  1713.   def weapon_anime_type0(type)
  1714.     type = ANIME[type][5]
  1715.     return weapon_anime1 if type == "右手"
  1716.     return weapon_anime2 if type == "左手"
  1717.     return nil
  1718.   end
  1719.   # 表示・非表示の取得
  1720.   def weapon_anime_type1(type)
  1721.     return ANIME[type][3]
  1722.   end
  1723.   # バトラーより上に表示するかどうか
  1724.   def weapon_anime_type2(type)
  1725.     type = ANIME[type][5]
  1726.     return true if type == "左手"
  1727.     return false
  1728.   end

  1729.   #--------------------------------------------------------------------------
  1730.   # ● 移動目標座標の計算
  1731.   #--------------------------------------------------------------------------
  1732.   def move_setup
  1733.     if RTAB
  1734.       targets = @target
  1735.     else
  1736.       targets = $scene.target_battlers
  1737.     end
  1738.     case @move_action[0]
  1739.     when "self" # 自分
  1740.       @target_x = self.base_x
  1741.       @target_y = self.base_y
  1742.     when "target_near" # 一番近くのターゲット
  1743.       targets.sort!{|a,b| a.screen_x<=>b.screen_x }
  1744.       if targets != []
  1745.         @target_x = targets[0].screen_x
  1746.         @target_y = targets[0].screen_y
  1747.       else
  1748.         @target_x = self.base_x
  1749.         @target_y = self.base_y
  1750.       end
  1751.     when "target_far" # 一番遠くのターゲット
  1752.       targets.sort!{|a,b| a.screen_x<=>b.screen_x }
  1753.       targets.reverse!
  1754.       if targets != []
  1755.         @target_x = targets[0].screen_x
  1756.         @target_y = targets[0].screen_y
  1757.       else
  1758.         @target_x = self.base_x
  1759.         @target_y = self.base_y
  1760.       end
  1761.     when "target" # ターゲット中央
  1762.       @target_x = 0
  1763.       @target_y = 0
  1764.       for t in targets
  1765.         @target_x += t.screen_x
  1766.         @target_y += t.screen_y
  1767.       end
  1768.       if targets != []
  1769.         @target_x /= targets.size
  1770.         @target_y /= targets.size
  1771.       end
  1772.     when  "party" # "トループ中央"
  1773.       @target_x = 0
  1774.       @target_y = 0
  1775.       for t in $game_troop.enemies
  1776.         @target_x += t.screen_x
  1777.         @target_y += t.screen_y
  1778.       end
  1779.       if $game_troop.enemies != []
  1780.         @target_x /= $game_troop.enemies.size
  1781.         @target_y /= $game_troop.enemies.size
  1782.       end
  1783.     when "troop" # "パーティ中央"
  1784.       @target_x = 0
  1785.       @target_y = 0
  1786.       for t in $game_party.actors
  1787.         @target_x += t.screen_x
  1788.         @target_y += t.screen_y
  1789.       end
  1790.       if $game_party.actors != []
  1791.         @target_x /= $game_party.actors.size
  1792.         @target_y /= $game_party.actors.size
  1793.       end
  1794.     when "screen" # "画面"
  1795.       @target_x = self.base_x
  1796.       @target_y = self.base_y
  1797.     end
  1798.     # 補正
  1799.     @target_x -= @move_action[1] + self.base_x
  1800.     @target_y -= @move_action[2] + self.base_y
  1801.     # 移動目標の座標をセット
  1802.     @move_coordinates = [@target_x.to_i,@target_y.to_i,@move_coordinates[0],@move_coordinates[1]]
  1803.     # 距離の計算(ウエイトの設定)
  1804.     @move_wait     = (@move_coordinates[2] - @move_coordinates[0]).abs +
  1805.                      (@move_coordinates[3] - @move_coordinates[1]).abs
  1806.   end
  1807.   if RTAB
  1808.   alias original_x true_x
  1809.   alias original_y true_y
  1810.   else
  1811.   alias original_x screen_x
  1812.   alias original_y screen_y
  1813.   end
  1814.   #--------------------------------------------------------------------------
  1815.   # ● バトル画面 X 座標の取得(カメラ補正無し)
  1816.   #--------------------------------------------------------------------------
  1817.   def true_x
  1818.     return original_x + @ox
  1819.   end
  1820.   #--------------------------------------------------------------------------
  1821.   # ● バトル画面 Y 座標の取得(カメラ補正無し)
  1822.   #--------------------------------------------------------------------------
  1823.   def true_y
  1824.     return original_y - @height / 2 + @oy
  1825.   end
  1826.   #--------------------------------------------------------------------------
  1827.   # ● バトル画面 X 座標の取得
  1828.   #--------------------------------------------------------------------------
  1829.   def screen_x(true_x = self.true_x)
  1830.     return true_x * @real_zoom + @real_x
  1831.   end
  1832.   #--------------------------------------------------------------------------
  1833.   # ● バトル画面 Y 座標の取得
  1834.   #--------------------------------------------------------------------------
  1835.   def screen_y(true_y = self.true_y)
  1836.     return true_y * @real_zoom + @real_y
  1837.   end
  1838.   #--------------------------------------------------------------------------
  1839.   # ● バトル画面 X 座標の取得(移動などしていない場合)
  1840.   #--------------------------------------------------------------------------
  1841.   def base_x(true_x = self.true_x)
  1842.     return (true_x - @ox) * @real_zoom + @real_x
  1843.   end
  1844.   #--------------------------------------------------------------------------
  1845.   # ● バトル画面 Y 座標の取得(移動などしていない場合)
  1846.   #--------------------------------------------------------------------------
  1847.   # ● アニメーション取得
  1848.   #--------------------------------------------------------------------------
  1849.   def battle_actions1
  1850.     weapon = $data_weapons[@weapon_id]
  1851.     return weapon != nil ? weapon.battle_actions : BattleActions::Actions["通常攻撃"]
  1852.   end
  1853.   #--------------------------------------------------------------------------
  1854.   # ● アニメーション取得
  1855.   #--------------------------------------------------------------------------
  1856.   def battle_actions2
  1857.     weapon = $data_weapons[@weapon2_id]
  1858.     return weapon != nil ? weapon.battle_actions : BattleActions::Actions["通常攻撃"]
  1859.   end
  1860.   #--------------------------------------------------------------------------
  1861.   # ● 武器アニメーション取得
  1862.   #--------------------------------------------------------------------------
  1863.   def weapon_anime1
  1864.     weapon = $data_weapons[@weapon_id]
  1865.     return weapon != nil ? weapon.icon_name : ""
  1866.   end
  1867.   #--------------------------------------------------------------------------
  1868.   # ● 武器アニメーション取得
  1869.   #--------------------------------------------------------------------------
  1870.   def weapon_anime2
  1871.     weapon = $data_weapons[@weapon2_id]
  1872.     return weapon != nil ? weapon.icon_name : ""
  1873.   end
  1874.   #--------------------------------------------------------------------------
  1875.   # ● 遠距離アニメーション取得
  1876.   #--------------------------------------------------------------------------
  1877.   def flying_anime1
  1878.     weapon = $data_weapons[@weapon_id]
  1879.     return weapon != nil ? weapon.flying_anime : [0,0,false,false]
  1880.   end
  1881.   #--------------------------------------------------------------------------
  1882.   # ● 遠距離アニメーション取得
  1883.   #--------------------------------------------------------------------------
  1884.   def flying_anime2
  1885.     weapon = $data_weapons[@weapon2_id]
  1886.     return weapon != nil ? weapon.flying_anime : [0,0,false,false]
  1887.   end
  1888.   def base_y(true_y = self.true_y)
  1889.     return (true_y - @oy) * @real_zoom + @real_y
  1890.   end
  1891.   #--------------------------------------------------------------------------

  1892.   
  1893.   
  1894.   #--------------------------------------------------------------------------
  1895.   # ● アニメーション取得
  1896.   #--------------------------------------------------------------------------
  1897.   def battle_actions1
  1898.     weapon = $data_weapons[@weapon_id]
  1899.     return weapon != nil ? weapon.battle_actions : BattleActions::Actions["通常攻撃"]
  1900.   end
  1901.   #--------------------------------------------------------------------------
  1902.   # ● アニメーション取得
  1903.   #--------------------------------------------------------------------------
  1904.   def battle_actions2
  1905.     weapon = $data_weapons[@weapon2_id]
  1906.     return weapon != nil ? weapon.battle_actions : BattleActions::Actions["通常攻撃"]
  1907.   end
  1908.   #--------------------------------------------------------------------------
  1909.   # ● 武器アニメーション取得
  1910.   #--------------------------------------------------------------------------
  1911.   def weapon_anime1
  1912.     weapon = $data_weapons[@weapon_id]
  1913.     return weapon != nil ? weapon.icon_name : ""
  1914.   end
  1915.   #--------------------------------------------------------------------------
  1916.   # ● 武器アニメーション取得
  1917.   #--------------------------------------------------------------------------
  1918.   def weapon_anime2
  1919.     weapon = $data_weapons[@weapon2_id]
  1920.     return weapon != nil ? weapon.icon_name : ""
  1921.   end
  1922.   #--------------------------------------------------------------------------
  1923.   # ● 遠距離アニメーション取得
  1924.   #--------------------------------------------------------------------------
  1925.   def flying_anime1
  1926.     weapon = $data_weapons[@weapon_id]
  1927.     return weapon != nil ? weapon.flying_anime : [0,0,false,false]
  1928.   end
  1929.   #--------------------------------------------------------------------------
  1930.   # ● 遠距離アニメーション取得
  1931.   #--------------------------------------------------------------------------
  1932.   def flying_anime2
  1933.     weapon = $data_weapons[@weapon2_id]
  1934.     return weapon != nil ? weapon.flying_anime : [0,0,false,false]
  1935.   end  
  1936. end
  1937. #==============================================================================
  1938. # ■ Game_Party
  1939. #==============================================================================
  1940. class Game_Party
  1941.   #--------------------------------------------------------------------------
  1942.   # ● アクターを加える     角色加入
  1943.   #     actor_id : アクター ID        角色ID
  1944.   #--------------------------------------------------------------------------
  1945.   alias side_view_add_actor add_actor
  1946.   def add_actor(actor_id)
  1947.     # アクターを取得    角色取得
  1948.     actor = $game_actors[actor_id.to]
  1949.     # サイドビューデータの初期化     侧视位图初始化
  1950.     actor.start_battle
  1951.     # 戻す    返还
  1952.     side_view_add_actor(actor_id)
  1953.   end
  1954. end

  1955. class Spriteset_Battle
  1956.   include Side_view
  1957.   #--------------------------------------------------------------------------
  1958.   # ● オブジェクト初期化
  1959.   #--------------------------------------------------------------------------
  1960.   alias side_veiw_initialize initialize
  1961.   def initialize
  1962.     side_veiw_initialize
  1963.     # アクタースプライトを解放
  1964.     for sprite in @actor_sprites
  1965.       sprite.dispose
  1966.     end
  1967.     # アクタースプライトを作成
  1968.     @actor_sprites = []
  1969.     for i in 1..Party_max
  1970.       @actor_sprites.push(Sprite_Battler.new(@viewport1))
  1971.     end
  1972.     update
  1973.   end
  1974.   #--------------------------------------------------------------------------
  1975.   # ● 画面のスクロール
  1976.   #--------------------------------------------------------------------------
  1977.   if method_defined?("screen_scroll")
  1978.   alias side_view_screen_scroll screen_scroll
  1979.   def screen_scroll
  1980.     side_view_screen_scroll
  1981.     # アクターの位置補正
  1982.     for actor in $game_party.actors
  1983.       actor.real_x = @real_x
  1984.       actor.real_y = @real_y
  1985.       actor.real_zoom = @real_zoom
  1986.     end
  1987.   end
  1988.   end
  1989. end

  1990. class Sprite_Battler < RPG::Sprite
  1991.   include Side_view
  1992.   #--------------------------------------------------------------------------
  1993.   # ● オブジェクト初期化
  1994.   #     viewport : ビューポート
  1995.   #     battler  : バトラー (Game_Battler)
  1996.   #--------------------------------------------------------------------------
  1997.   def initialize(viewport, battler = nil)
  1998.     super(viewport)
  1999.     @battler = battler
  2000.     @battler_visible = false
  2001.     @weapon = Sprite_Weapon.new(viewport, battler)
  2002.     @flying = Sprite_Flying.new(viewport, battler)
  2003.     @shadow = []
  2004.     @fly = 0
  2005.     @fly_direction = 1
  2006.     @rand = rand(10)
  2007.     self.effect_clear
  2008.   end
  2009.   #--------------------------------------------------------------------------
  2010.   # ● 解放
  2011.   #--------------------------------------------------------------------------
  2012.   alias side_view_dispose dispose
  2013.   def dispose
  2014.     side_view_dispose
  2015.     @weapon.dispose
  2016.     @flying.dispose
  2017.     if @_target_sprite != nil
  2018.       @_target_sprite.bitmap.dispose
  2019.       @_target_sprite.dispose
  2020.       @_target_sprite = nil
  2021.     end
  2022.   end
  2023.   #--------------------------------------------------------------------------
  2024.   # ● フレーム更新
  2025.   #--------------------------------------------------------------------------
  2026.   def update
  2027.     super
  2028.     # バトラーが nil の場合
  2029.     if @battler == nil
  2030.       self.bitmap = nil
  2031.       @weapon.bitmap = nil
  2032.       loop_animation(nil)
  2033.       return
  2034.     end
  2035.     # バトラー更新
  2036.     @battler.update
  2037.     # バトラーアニメのデータ取得
  2038.     @anime_type = @battler.anime_type
  2039.     # ファイル名か色相が現在のものと異なる場合   (文件名色相现在的东西不同的情况)
  2040.     if @battler.is_a?(Game_Actor) or ([email protected]_a?(Game_Actor) and [email protected])
  2041.       change = (@battler.character_name != @battler_name or @battler.character_hue != @battler_hue)
  2042.     elsif @battler.is_a?(Game_Enemy)
  2043.       change = (@battler.battler_name != @battler_name or @battler.battler_hue != @battler_hue)
  2044.     else
  2045.       return
  2046.     end
  2047.     if change
  2048.       # ビットマップを取得、設定    位图取得 设定
  2049.       if @battler.is_a?(Game_Actor) or ([email protected]_a?(Game_Actor) and [email protected])
  2050.         @battler_name = @battler.character_name
  2051.         @battler_hue = @battler.character_hue
  2052.         self.bitmap = RPG::Cache.character(@battler_name, @battler_hue)
  2053.         @width = bitmap.width / 4
  2054.         @height = bitmap.height / 4
  2055.       else
  2056.         @battler_name = @battler.battler_name
  2057.         @battler_hue = @battler.battler_hue
  2058.         self.bitmap = RPG::Cache.battler(@battler_name, @battler_hue)
  2059.         @width = bitmap.width
  2060.         @height = bitmap.height
  2061.       end
  2062.       self.ox = @width / 2
  2063.       self.oy = @height / 2
  2064.       @battler.height = @height
  2065.       @flag = true
  2066.       # 戦闘不能または隠れ状態なら不透明度を 0 にする
  2067.       if @battler.dead? or @battler.hidden
  2068.         self.opacity = 0
  2069.       end
  2070.     end
  2071.     if (@battler.is_a?(Game_Actor) and
  2072.       (@battler.anime_type != @anime_type or @battler.pattern != @pattern or @flag)) or
  2073.       ([email protected]_a?(Game_Actor) and [email protected])
  2074.       # ビットマップを取得、設定
  2075.       @pattern = @battler.pattern
  2076.       self.ox = @width / 2
  2077.       self.oy = @height / 2
  2078.       @sx = @pattern * @width
  2079.       sy = @anime_type % 4 * @height
  2080.       x   = sy / (@height * 2) + 4
  2081.       if [email protected]_a?(Game_Actor) and [email protected] and x == 4
  2082.         x = 6
  2083.       end    # here!!
  2084.       @sy = (x - 2) / 2 * @height
  2085.       self.src_rect.set(@sx, @sy, @width, @height)
  2086.       self.zoom_x = CHAR_ZOOM
  2087.       self.zoom_y = CHAR_ZOOM
  2088.       @battler.height = @height
  2089.       @flag = false
  2090.     end
  2091.     # 飛行
  2092.     update_fly
  2093.     # シェイク
  2094.     update_shake
  2095.     # 回転
  2096.     update_turning
  2097.     # 反転
  2098.     update_reverse   
  2099.     # 移動
  2100.     update_moving
  2101.     # 追加アニメ
  2102.     update_add_anime
  2103.     # エフェクト効果の適用
  2104.     update_effect
  2105.     # アニメーション ID が現在のものと異なる場合
  2106.     flag = RTAB ? true : @battler.damage == nil
  2107.     if flag and @battler.state_animation_id != @state_animation_id
  2108.       @state_animation_id = @battler.state_animation_id
  2109.       loop_animation($data_animations[@state_animation_id])
  2110.     end
  2111.     # シェイク
  2112.     if @battler.shake
  2113.       self.start_shake(5, 5, 5)
  2114.       @battler.shake = false
  2115.     end
  2116.     # 明滅
  2117.     if @battler.blink
  2118.       blink_on
  2119.     else
  2120.       blink_off
  2121.     end
  2122.     # 不可視の場合
  2123.     unless @battler_visible
  2124.       flag = RTAB ? (@battler.damage.size < 2 or @battler.damage_pop.size < 2) :
  2125.                     (@battler.damage == nil or @battler.damage_pop)
  2126.       # 出現
  2127.       if not @battler.hidden and not @battler.dead? and flag
  2128.         appear
  2129.         @battler_visible = true
  2130.       end
  2131.     end
  2132.     if RTAB
  2133.     # ダメージ
  2134.     for battler in @battler.damage_pop
  2135.       if battler[0].class == Array
  2136.         if battler[0][1] >= 0
  2137.           $scene.skill_se
  2138.         else
  2139.           $scene.levelup_se
  2140.         end
  2141.         damage(@battler.damage[battler[0]], false, 2)
  2142.       else
  2143.         damage(@battler.damage[battler[0]], @battler.critical[battler[0]])
  2144.       end
  2145.       if @battler.damage_sp.include?(battler[0])
  2146.         damage(@battler.damage_sp[battler[0]],
  2147.                 @battler.critical[battler[0]], 1)
  2148.         @battler.damage_sp.delete(battler[0])
  2149.       end
  2150.       @battler.damage_pop.delete(battler[0])
  2151.       @battler.damage.delete(battler[0])
  2152.       @battler.critical.delete(battler[0])
  2153.     end
  2154.     end
  2155.     # 可視の場合
  2156.     if @battler_visible
  2157.       # 武器アニメ
  2158.       @weapon.battler = @battler
  2159.       @weapon.update
  2160.       # 遠距離アニメ
  2161.       @flying.battler = @battler
  2162.       @flying.update
  2163.       # 逃走
  2164.       if @battler.hidden
  2165.         $game_system.se_play($data_system.escape_se)
  2166.         escape
  2167.         @battler_visible = false
  2168.       end
  2169.       # 白フラッシュ
  2170.       if @battler.white_flash
  2171.         whiten
  2172.         @battler.white_flash = false
  2173.       end
  2174.       if RTAB
  2175.       # アニメーション
  2176.       if [email protected]?
  2177.         for animation in @battler.animation.reverse
  2178.           if animation[2]
  2179.             animation($data_animations[animation[0]], animation[1], true)
  2180.           else
  2181.             animation($data_animations[animation[0]], animation[1])
  2182.           end
  2183.           @battler.animation.delete(animation)
  2184.         end
  2185.       end
  2186.       else
  2187.       # アニメーション
  2188.       if @battler.animation_id != 0
  2189.         animation = $data_animations[@battler.animation_id]
  2190.         animation(animation, @battler.animation_hit)
  2191.         @battler.animation_id = 0
  2192.       end
  2193.       end
  2194.       # ダメージ
  2195.       if !RTAB and @battler.damage_pop
  2196.         damage(@battler.damage, @battler.critical)
  2197.         @battler.damage = nil
  2198.         @battler.critical = false
  2199.         @battler.damage_pop = false
  2200.       end
  2201.       flag = RTAB ? (@battler.damage.empty? and $scene.dead_ok?(@battler)) :
  2202.                      @battler.damage == nil
  2203.       # コラプス
  2204.       if flag and @battler.dead?
  2205.         if @battler.is_a?(Game_Actor)
  2206.           $game_system.se_play($data_system.actor_collapse_se)
  2207.         elsif @battler.is_a?(Game_Enemy)
  2208.           $game_system.se_play($data_system.enemy_collapse_se)
  2209.         end
  2210.         collapse
  2211.         @battler_visible = false
  2212.       end
  2213.     end
  2214.     # スプライトの座標を設定
  2215.     #bearrpg
  2216.     self.x = @battler.screen_x + @effect_ox
  2217.     self.y = @battler.screen_y + @effect_oy
  2218.     self.z = @battler.screen_z
  2219.     self.zoom_x = @battler.real_zoom
  2220.     self.zoom_y = @battler.real_zoom
  2221.     #
  2222.     # ウェイトカウントを減らす
  2223.     @battler.wait_count -= 1
  2224.     @battler.wait_count2 -= 1
  2225.     # アニメーション待ち時間取得
  2226.     @battler.animation_duration = @_animation_duration
  2227.     if @battler.is_a?(Game_Actor) or ([email protected]_a?(Game_Actor) and [email protected])
  2228.       self.zoom_x *= CHAR_ZOOM
  2229.       self.zoom_y *= CHAR_ZOOM
  2230.       @weapon.x = self.x + 2
  2231.       @weapon.y = self.y + 6
  2232.       @weapon.angle = 75 - (4 - @battler.pattern) * 45
  2233.       if self.mirror
  2234.         @weapon.angle += @weapon.angle - 180
  2235.       end
  2236.       if ([email protected]_a?(Game_Actor) and [email protected])
  2237.         @weapon.angle = [email protected]
  2238.       end
  2239.     end
  2240.     # 残像
  2241.     if @battler.shadow
  2242.       if Graphics.frame_count % 2 == 0
  2243.         shadow = ::Sprite.new(self.viewport)
  2244.         shadow.bitmap = self.bitmap.dup
  2245.         shadow.x = self.x
  2246.         shadow.y = self.y
  2247.         shadow.ox = self.ox
  2248.         shadow.oy = self.oy
  2249.         shadow.mirror = self.mirror
  2250.         shadow.angle = self.angle
  2251.         shadow.opacity = 160
  2252.         shadow.zoom_x = self.zoom_x
  2253.         shadow.zoom_y = self.zoom_y
  2254.         if @battler.is_a?(Game_Actor) or ([email protected]_a?(Game_Actor) and [email protected])
  2255.           shadow.src_rect.set(@sx, @sy, @width, @height)
  2256.         else
  2257.           shadow.src_rect.set(0, 0, @width, @height)
  2258.         end
  2259.         @shadow.push([shadow,duration = 10,@battler.true_x + @effect_ox,@battler.true_y + @effect_oy])
  2260.       end
  2261.     end
  2262.     for s in @shadow
  2263.       if !s[0].disposed?
  2264.         s[0].update
  2265.         s[1] -= 1
  2266.         if s[1] < 1
  2267.           if s[0].bitmap != nil
  2268.             s[0].bitmap.dispose
  2269.           end
  2270.           s[0].dispose
  2271.         else
  2272.           s[0].x = @battler.screen_x(s[2])
  2273.           s[0].y = @battler.screen_y(s[3])
  2274.         end
  2275.       else
  2276.         s = nil
  2277.       end
  2278.     end
  2279.     @shadow.compact!
  2280.   end
  2281.   #--------------------------------------------------------------------------
  2282.   # ● エフェクトによる座標系の更新
  2283.   #--------------------------------------------------------------------------
  2284.   def update_effect
  2285.     # 角度の修正
  2286.     if @_upside_down
  2287.       self.angle = (@_turning + 180) % 360
  2288.     else
  2289.       self.angle = @_turning
  2290.     end
  2291.     # X 座標の修正値
  2292.     @effect_ox = @_shake + @_moving[0]
  2293.     # Y 座標の修正値
  2294.     @effect_oy = -@fly + @_moving[1]
  2295.     if  @_animation == nil or (RTAB and @_animation.empty?)
  2296.       self.effect_clear
  2297.     end
  2298.   end
  2299.   #--------------------------------------------------------------------------
  2300.   # ● シェイク更新
  2301.   #--------------------------------------------------------------------------
  2302.   def update_shake
  2303.     if @_shake_duration >= 1 or @_shake != 0
  2304.       delta = (@_shake_power * @_shake_speed * @_shake_direction) / 10.0
  2305.       if @_shake_duration <= 1 and @_shake * (@_shake + delta) < 0
  2306.         @_shake = 0
  2307.       else
  2308.         @_shake += delta
  2309.       end
  2310.       if @_shake > @_shake_power * 2
  2311.         @_shake_direction = -1
  2312.       end
  2313.       if @_shake < - @_shake_power * 2
  2314.         @_shake_direction = 1
  2315.       end
  2316.       if @_shake_duration >= 1
  2317.         @_shake_duration -= 1
  2318.       end
  2319.     end
  2320.   end
  2321.   #--------------------------------------------------------------------------
  2322.   # ● 飛行更新
  2323.   #--------------------------------------------------------------------------
  2324.   def update_fly
  2325.     if @rand > 0
  2326.       @rand -= 1
  2327.       return
  2328.     end
  2329.     if @battler.fly != 0
  2330.       if @fly < @battler.fly / 4
  2331.         @fly_direction = 1
  2332.       elsif @fly > @battler.fly / 2
  2333.         @fly_direction = -1
  2334.       end
  2335.       @fly += 0.5 * @fly_direction
  2336.     end
  2337.   end
  2338.   #--------------------------------------------------------------------------
  2339.   # ● 回転更新
  2340.   #--------------------------------------------------------------------------
  2341.   def update_turning
  2342.     if @_turning_duration > 0 or @_turning != 0
  2343.       @_turning += @_turning_direction * @_turning_speed / 2.0
  2344.       # 残り回転数を減らす
  2345.       if @_turning_direction == -1
  2346.         if @_turning_duration > 0 and @_turning < 0
  2347.           @_turning_duration -= 1
  2348.         end
  2349.       elsif @_turning_direction == 1
  2350.         if @_turning_duration > 0 and @_turning >= 360
  2351.           @_turning_duration -= 1
  2352.         end
  2353.       end
  2354.       # 以下補正
  2355.       while @_turning < 0
  2356.         @_turning += 360
  2357.       end
  2358.       if @_turning_duration <= 0
  2359.         @_turning = 0
  2360.       end
  2361.       @_turning %= 360
  2362.     end
  2363.   end
  2364.   #--------------------------------------------------------------------------
  2365.   # ● 左右反転更新
  2366.   #--------------------------------------------------------------------------
  2367.   def update_reverse
  2368.     if @last_reverse != (@_reverse or @battler.reverse)
  2369.       self.mirror = (@_reverse or @battler.reverse)
  2370.       @last_reverse = (@_reverse or @battler.reverse)
  2371.     end
  2372.   end
  2373.   #--------------------------------------------------------------------------
  2374.   # ● 移動更新
  2375.   #--------------------------------------------------------------------------
  2376.   def update_moving
  2377.     @move_distance = (@_move_coordinates[2] - @_move_coordinates[0]).abs +
  2378.                      (@_move_coordinates[3] - @_move_coordinates[1]).abs
  2379.     if @move_distance > 0
  2380.       return if @_moving[0] == @_move_coordinates[0] and @_moving[1] == @_move_coordinates[1]
  2381.       array = @_move_coordinates
  2382.       x = (array[2] + 1.0 * (array[0] - array[2]) * (@move_distance - @_move_duration) / @move_distance.to_f).to_i
  2383.       y = (array[3] + 1.0 * (array[1] - array[3]) * (@move_distance - @_move_duration) / @move_distance.to_f).to_i
  2384.       @_moving = [x, y]
  2385.       if @_move_quick_return and @_move_duration == 0
  2386.         @_move_coordinates = [0,0,array[0],array[1]]
  2387.         @_move_duration = @move_distance
  2388.       end
  2389.       @_move_duration -= @_move_speed
  2390.       @_move_duration = [@_move_duration, 0].max
  2391.     end
  2392.   end
  2393.   #--------------------------------------------------------------------------
  2394.   # ● 追加アニメ更新 (RTAB限定機能)
  2395.   #--------------------------------------------------------------------------
  2396.   def update_add_anime
  2397.     if RTAB
  2398.     # アニメーション
  2399.     if @_add_anime_id != 0
  2400.       animation = $data_animations[@_add_anime_id]
  2401.       animation(animation, true)
  2402.       @_add_anime_id = 0
  2403.     end
  2404.     end
  2405.   end
  2406.   #--------------------------------------------------------------------------
  2407.   # ● エフェクト初期化
  2408.   #--------------------------------------------------------------------------
  2409.   def effect_clear
  2410.     @_effect_ox = 0
  2411.     @_effect_oy = 0
  2412.     @_shake_power = 0
  2413.     @_shake_speed = 0
  2414.     @_shake_duration = 0
  2415.     @_shake_direction = 1
  2416.     @_shake = 0
  2417.     @_upside_down = false
  2418.     @_reverse = false
  2419.     @_turning_direction = 1
  2420.     @_turning_speed = 0
  2421.     @_turning_duration = 0
  2422.     @_turning = 0
  2423.     @_move_quick_return = true
  2424.     @_move_speed = 0
  2425.     @_move_coordinates = [0,0,0,0]
  2426.     @_move_jump = false
  2427.     @_move_duration = 0
  2428.     @_moving = [0,0]
  2429.     @_add_anime_id = 0
  2430.   end
  2431.   #--------------------------------------------------------------------------
  2432.   # ● シェイクの開始
  2433.   #     power    : 強さ
  2434.   #     speed    : 速さ
  2435.   #     duration : 時間
  2436.   #--------------------------------------------------------------------------
  2437.   def start_shake(power, speed, duration)
  2438.     @_shake_power = power
  2439.     @_shake_speed = speed
  2440.     @_shake_duration = duration
  2441.   end
  2442.   #--------------------------------------------------------------------------
  2443.   # ● 上下反転を開始
  2444.   #--------------------------------------------------------------------------
  2445.   def start_upside_down
  2446.     @_upside_down = @_upside_down ? false : true
  2447.   end
  2448.   #--------------------------------------------------------------------------
  2449.   # ● 左右反転を開始
  2450.   #--------------------------------------------------------------------------
  2451.   def start_reverse
  2452.     @_reverse = @_reverse ? false : true
  2453.   end
  2454.   #--------------------------------------------------------------------------
  2455.   # ● 回転を開始
  2456.   #     direction: 方向
  2457.   #     speed    : 速さ
  2458.   #     duration : 時間
  2459.   #--------------------------------------------------------------------------
  2460.   def start_turning(direction, speed, duration)
  2461.     @_turning_direction = direction
  2462.     @_turning_speed = speed
  2463.     @_turning_duration = duration
  2464.     @_turning = @_turning_direction == 1 ? 0 : 360
  2465.   end
  2466.   #--------------------------------------------------------------------------
  2467.   # ● 移動を開始
  2468.   #     quick_return : 戻るかどうか
  2469.   #     speed        : 速さ
  2470.   #     x            : X 座標
  2471.   #     y            : Y 座標
  2472.   #--------------------------------------------------------------------------
  2473.   def start_moving(quick_return, speed, x, y)
  2474.     @_move_quick_return = quick_return == 0 ? false : true
  2475.     @_move_speed = speed
  2476.     @_move_coordinates = [x,y,@_move_coordinates[0],@_move_coordinates[1]]
  2477.     distance = (@_move_coordinates[2] - @_move_coordinates[0]).abs +
  2478.                (@_move_coordinates[3] - @_move_coordinates[1]).abs
  2479.     @_move_duration = distance
  2480.   end
  2481.   #--------------------------------------------------------------------------
  2482.   # ● アニメ追加を開始
  2483.   #     id           : ID
  2484.   #     hit          : 命中フラッグ
  2485.   #--------------------------------------------------------------------------
  2486.   def start_add_anime(id)
  2487.     @_add_anime_id = id
  2488.   end
  2489.   #--------------------------------------------------------------------------
  2490.   # ● 各種エフェクトの開始判定
  2491.   #--------------------------------------------------------------------------
  2492.   if !method_defined?("side_view_animation_process_timing")
  2493.     alias side_view_animation_process_timing animation_process_timing
  2494.   end
  2495.   def animation_process_timing(timing, hit)
  2496.     side_view_animation_process_timing(timing, hit)
  2497.     if (timing.condition == 0) or
  2498.        (timing.condition == 1 and hit == true) or
  2499.        (timing.condition == 2 and hit == false)
  2500.       if timing.se.name =~ SHAKE_FILE
  2501.         names = timing.se.name.split(/#/)
  2502.         power    = names[1].nil? ? SHAKE_POWER    : names[1].to_i
  2503.         speed    = names[2].nil? ? SHAKE_SPEED    : names[2].to_i
  2504.         duration = names[3].nil? ? SHAKE_DURATION : names[3].to_i
  2505.         # シェイクを開始
  2506.         self.start_shake(power, speed, duration)
  2507.       end
  2508.       if timing.se.name == UPSIDE_DOWN_FILE
  2509.         # 上下反転を開始
  2510.         self.start_upside_down
  2511.       end
  2512.       if timing.se.name == REVERSE_FILE
  2513.         # 左右反転を開始
  2514.         self.start_reverse
  2515.       end
  2516.       if timing.se.name =~ TURNING_FILE
  2517.         names = timing.se.name.split(/#/)
  2518.         direction = names[1].nil? ? TURNING_DIRECTION : names[1].to_i
  2519.         speed     = names[2].nil? ? TURNING_SPEED     : names[2].to_i
  2520.         duration  = names[3].nil? ? TURNING_DURATION  : names[3].to_i
  2521.         # 回転を開始
  2522.         self.start_turning(direction, speed, duration)
  2523.       end
  2524.       if timing.se.name =~ MOVE_FILE
  2525.         names = timing.se.name.split(/#/)
  2526.         quick_return= names[1].nil? ? MOVE_RETURN      : names[1].to_i
  2527.         speed       = names[2].nil? ? MOVE_SPEED       : names[2].to_i
  2528.         x           = names[3].nil? ? MOVE_COORDINATES[0] : names[3].to_i
  2529.         y           = names[3].nil? ? MOVE_COORDINATES[1] : names[4].to_i
  2530.         # 移動を開始
  2531.         self.start_moving(quick_return, speed, x, y)
  2532.       end
  2533.       if timing.se.name =~ ADD_ANIME_FILE
  2534.         names = timing.se.name.split(/#/)
  2535.         id = names[1].nil? ? ADD_ANIME_ID      : names[1].to_i
  2536.         # アニメ追加を開始
  2537.         self.start_add_anime(id)
  2538.       end
  2539.     end
  2540.   end
  2541. end

  2542. #==============================================================================
  2543. # ■ Sprite_Weapon
  2544. #------------------------------------------------------------------------------
  2545. #  バトラー表示用のスプライトです。Game_Battler クラスのインスタンスを監視し、
  2546. # スプライトの状態を自動的に変化させます。
  2547. #==============================================================================

  2548. class Sprite_Weapon < RPG::Sprite
  2549.   include Side_view
  2550.   #--------------------------------------------------------------------------
  2551.   # ● 公開インスタンス変数
  2552.   #--------------------------------------------------------------------------
  2553.   attr_accessor :battler                  # バトラー
  2554.   attr_reader   :cw                       # グラフィックの幅
  2555.   attr_reader   :ch                       # グラフィックの高さ
  2556.   #--------------------------------------------------------------------------
  2557.   # ● オブジェクト初期化       对象初始化
  2558.   #     viewport : ビューポート
  2559.   #     battler  : バトラー (Game_Battler)
  2560.   #--------------------------------------------------------------------------
  2561.   def initialize(viewport, battler = nil)
  2562.     super(viewport)
  2563.     @battler = battler
  2564.     @battler_visible = false
  2565.   end
  2566.   #--------------------------------------------------------------------------
  2567.   # ● 解放
  2568.   #--------------------------------------------------------------------------
  2569.   def dispose
  2570.     if self.bitmap != nil
  2571.       self.bitmap.dispose
  2572.     end
  2573.     super
  2574.   end
  2575.   #--------------------------------------------------------------------------
  2576.   # ● フレーム更新
  2577.   #--------------------------------------------------------------------------
  2578.   def update
  2579.     super
  2580.     # バトラーが nil の場合
  2581.     if @battler == nil or ([email protected]_a?(Game_Actor) and @battler.nce)
  2582.       self.bitmap = nil
  2583.       return
  2584.     end
  2585.     # ウエポンアニメのデータ取得
  2586.     @weapon_anime_type = @battler.weapon_anime_type(@battler.condition)
  2587.     # 設定が「非表示」の場合
  2588.     if !@weapon_anime_type[1] or @weapon_anime_type[0].nil?
  2589.       self.visible = false
  2590.       return
  2591.     else
  2592.       self.visible = true
  2593.     end
  2594.     # ファイル名が現在のものと異なる場合
  2595.     if @weapon_anime_type[0] != @weapon_name
  2596.       @weapon_name = @weapon_anime_type[0]
  2597.       # ビットマップを取得、設定
  2598.       self.bitmap = RPG::Cache.icon(@weapon_name)
  2599.       @width = bitmap.width
  2600.       @height = bitmap.height
  2601.       @flag = true
  2602.     end
  2603.     # 現在アニメパターンが現在のものと異なる場合
  2604.     if @pattern != @battler.pattern or @flag or @condition != @battler.condition
  2605.       @pattern = @battler.pattern
  2606.       @condition = @battler.condition
  2607.       self.ox = @width
  2608.       self.oy = @height
  2609.       self.z = battler.screen_z
  2610.       self.zoom_x = @battler.real_zoom * CHAR_ZOOM
  2611.       self.zoom_y = @battler.real_zoom * CHAR_ZOOM
  2612.       self.src_rect.set(0, 0, @width, @height)
  2613.       self.opacity = 255
  2614.       # バトラーより手前に表示
  2615.       if @weapon_anime_type[2]
  2616.         self.z += 10
  2617.       # バトラーより奥に表示
  2618.       else
  2619.         self.z -= 10
  2620.       end
  2621.       @flag = false
  2622.     end
  2623.   end
  2624. end

  2625. #==============================================================================
  2626. # ■ Sprite_Flying
  2627. #------------------------------------------------------------------------------
  2628. #  バトラー表示用のスプライトです。Game_Battler クラスのインスタンスを監視し、
  2629. # スプライトの状態を自動的に変化させます。

  2630. #==============================================================================

  2631. class Sprite_Flying < RPG::Sprite
  2632.   include Side_view
  2633.   #--------------------------------------------------------------------------
  2634.   # ● 公開インスタンス変数
  2635.   #--------------------------------------------------------------------------
  2636.   attr_accessor :battler                  # バトラー
  2637.   #--------------------------------------------------------------------------
  2638.   # ● オブジェクト初期化
  2639.   #     viewport : ビューポート
  2640.   #     battler  : バトラー (Game_Battler)
  2641.   #--------------------------------------------------------------------------
  2642.   def initialize(viewport, battler = nil)
  2643.     super(viewport)
  2644.     @battler = battler
  2645.     @battler_visible = false
  2646.   end
  2647.   #--------------------------------------------------------------------------
  2648.   # ● 解放
  2649.   #--------------------------------------------------------------------------
  2650.   def dispose
  2651.     if self.bitmap != nil
  2652.       self.bitmap.dispose
  2653.     end
  2654.     super
  2655.   end
  2656.   #--------------------------------------------------------------------------
  2657.   # ● フレーム更新
  2658.   #--------------------------------------------------------------------------
  2659.   def update
  2660.     super
  2661.     # バトラーが nil の場合
  2662.     if @battler == nil
  2663.       self.bitmap = nil
  2664.       loop_animation(nil)
  2665.       return
  2666.     end
  2667.     # 遠距離アニメ
  2668.     flying_animation = @battler.flying_animation
  2669.     flying_start = flying_animation[0]
  2670.     flying_end   = flying_animation[1]
  2671.     # アニメーション ID が現在のものと異なる場合
  2672.     if @anime_id != @battler.flying_anime[0]
  2673.       @anime_id = @battler.flying_anime[0]
  2674.       @animation = $data_animations[@anime_id]
  2675.     end
  2676.     # アニメーション 開始
  2677.     if flying_start
  2678.       loop_animation(@animation)
  2679.     elsif flying_end
  2680.       loop_animation(nil)
  2681.     end
  2682.     self.x = @battler.flying_x
  2683.     self.y = @battler.flying_y
  2684.     self.z = @battler.screen_z + 1000
  2685.   end
  2686. end

  2687. module RPG
  2688.   class Skill
  2689.     #--------------------------------------------------------------------------
  2690.     # ● 魔法かどうかの判断
  2691.     #--------------------------------------------------------------------------
  2692.     def magic?
  2693.       if @atk_f == 0
  2694.         return true
  2695.       else
  2696.         return false
  2697.       end
  2698.     end
  2699.   end
  2700. end

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

  2702. class Arrow_Actor < Arrow_Base
  2703.   include Side_view
  2704.   #--------------------------------------------------------------------------
  2705.   # ● フレーム更新
  2706.   #--------------------------------------------------------------------------
  2707.   alias side_view_update update
  2708.   def update
  2709.     side_view_update
  2710.     # スプライトの座標を設定
  2711.     if self.actor != nil && (self.x != self.actor.screen_x + ARROW_OX or self.y != self.actor.screen_y + ARROW_OY)
  2712.       self.x = self.actor.screen_x + ARROW_OX
  2713.       self.y = self.actor.screen_y + ARROW_OY
  2714.     end
  2715.   end
  2716. end
  2717. class Arrow_Enemy < Arrow_Base
  2718.   include Side_view
  2719.   #--------------------------------------------------------------------------
  2720.   # ● フレーム更新
  2721.   #--------------------------------------------------------------------------
  2722.   alias side_view_update update
  2723.   def update
  2724.     side_view_update
  2725.     # スプライトの座標を設定
  2726.     if self.enemy != nil && self.y != self.enemy.screen_y + self.enemy.height/2
  2727.       self.x = self.enemy.screen_x
  2728.       self.y = self.enemy.screen_y + self.enemy.height/2
  2729.     end
  2730.   end
  2731. end
  2732. module Rtab_use
  2733.   def update_phase4_step3(battler)
  2734.     # ヘルプウィンドウの更新。アクションの種別で分岐
  2735.     case battler.current_action.kind
  2736.     when 0  # 基本
  2737.       if battler.current_action.basic == 1
  2738.         @help_window.set_text($data_system.words.guard, 1)
  2739.         @help_wait = @help_time
  2740.       end
  2741.       if battler.is_a?(Game_Enemy) and battler.current_action.basic == 2
  2742.         @help_window.set_text("逃げる", 1)
  2743.         @help_wait = @help_time
  2744.       end
  2745.     when 1  # スキル
  2746.       skill =  $data_skills[battler.current_action.skill_id]
  2747.       @help_window.set_text(skill.name, 1)
  2748.       @help_wait = @help_time
  2749.     when 2  # アイテム
  2750.       item = $data_items[battler.current_action.item_id]
  2751.       @help_window.set_text(item.name, 1)
  2752.       @help_wait = @help_time
  2753.     end
  2754.     # 行動側アニメーション (ID が 0 の場合は白フラッシュ)
  2755.     if battler.anime1 == 0
  2756.       battler.white_flash = true
  2757.       battler.wait = 5
  2758.       # カメラ設定
  2759.       if battler.target[0].is_a?(Game_Enemy)
  2760.         camera_set(battler)
  2761.       end
  2762.     else
  2763.       battler.animation.push([battler.anime1, true])
  2764.       speller = synthe?(battler)
  2765.       if speller != nil
  2766.         for spell in speller
  2767.           if spell != battler
  2768.             if spell.current_action.spell_id == 0
  2769.               spell.animation.push([battler.anime1, true])
  2770.             else
  2771.               skill = spell.current_action.spell_id
  2772.               spell.animation.push([$data_skills[skill].animation1_id, true])
  2773.               spell.current_action.spell_id = 0
  2774.             end
  2775.           end
  2776.         end
  2777.       end
  2778.       battler.wait = 2 * $data_animations[battler.anime1].frame_max - 10
  2779.       battler.anime1 = 0
  2780.     end
  2781.     # ステップ 4 に移行
  2782.     battler.phase = 4 if !(!battler.animation1_on and battler.action? and !battler.flash?)
  2783.   end
  2784. end

  2785. #==============================================================================
  2786. # ■ Scene_Battle
  2787. #==============================================================================
  2788. class Scene_Battle
  2789.   include Side_view
  2790.   include Rtab_use if RTAB
  2791.   #--------------------------------------------------------------------------
  2792.   # ● 公開インスタンス変数     变量
  2793.   #--------------------------------------------------------------------------
  2794.   attr_reader   :phase            # フェーズ
  2795.   attr_reader   :phase4_step      # フェーズ4ステップ
  2796.   attr_reader   :active_battler   # 対象の配列
  2797.   attr_reader   :target_battlers  # 対象の配列
  2798.   attr_reader   :animation1_id    # 行動アニメID
  2799.   attr_reader   :animation2_id    # 対象アニメID
  2800.   #--------------------------------------------------------------------------
  2801.   # ● メイン処理
  2802.   #--------------------------------------------------------------------------
  2803.   alias side_view_main main
  2804.   def main
  2805.     # バトラー初期化
  2806.     for battler in $game_party.actors + $game_troop.enemies
  2807.       battler.start_battle
  2808.     end
  2809.     # 戻す
  2810.     side_view_main
  2811.   end
  2812.   #--------------------------------------------------------------------------
  2813.   # ● 閃き判定
  2814.   #--------------------------------------------------------------------------
  2815.   def flash?
  2816.     return @flash_flag ? true : false
  2817.   end  
  2818.   #--------------------------------------------------------------------------
  2819.   # ● 閃きアニメ待ち時間取得
  2820.   #--------------------------------------------------------------------------
  2821.   def flash_duration
  2822.     animation = nil
  2823.     if FLASH_ANIME
  2824.       animation = $data_animations[FLASH_ANIMATION_ID]
  2825.     end
  2826.     return animation != nil ? animation.frame_max * 2 + 2 : 0
  2827.   end
  2828.   #--------------------------------------------------------------------------
  2829.   # ● フレーム更新 (メインフェーズ ステップ 2 : アクション開始)
  2830.   #--------------------------------------------------------------------------
  2831.   alias side_view_update_phase4_step2 update_phase4_step2
  2832.   def update_phase4_step2(*arg)
  2833.     battler = convert_battler2(*arg)
  2834.     battler.action
  2835.     side_view_update_phase4_step2(*arg)
  2836.   end
  2837.   #--------------------------------------------------------------------------
  2838.   # ● フレーム更新 (メインフェーズ ステップ 3 : 行動側アニメーション)
  2839.   #--------------------------------------------------------------------------
  2840.   alias side_view_update_phase4_step3 update_phase4_step3
  2841.   def update_phase4_step3(*arg)
  2842.     battler = convert_battler2(*arg)
  2843.     if battler.flash? and FLASH_ANIME
  2844.       battler.flash_flag["normal"] = true
  2845.     end
  2846.     side_view_update_phase4_step3(*arg)
  2847.   end
  2848.   #--------------------------------------------------------------------------
  2849.   # ● フレーム更新 (メインフェーズ ステップ 4 : 対象側アニメーション)
  2850.   #--------------------------------------------------------------------------
  2851.   alias side_view_update_phase4_step4 update_phase4_step4
  2852.   def update_phase4_step4(*arg)
  2853.     battler = convert_battler2(*arg)
  2854.     targets = RTAB ? battler.target : @target_battlers
  2855.     return if !battler.animation2_on and battler.action? if !RTAB
  2856.     side_view_update_phase4_step4(*arg)
  2857.     for target in targets
  2858.       if RTAB
  2859.         value = nil
  2860.         if target.damage_sp.include?(battler)
  2861.           value = target.damage_sp[battler]
  2862.         end
  2863.         if target.damage.include?(battler)
  2864.           if value == nil or value == "Miss"
  2865.             value = target.damage[battler]
  2866.           elsif value.is_a?(Numeric) && value > 0
  2867.             value = target.damage[battler] == "Miss" ? value : target.damage[battler]
  2868.           end
  2869.         end
  2870.       else
  2871.         value = target.damage
  2872.       end
  2873.       if target.is_a?(Game_Actor)
  2874.         # ダメージの場合
  2875.         if value.is_a?(Numeric) && value > 0
  2876.           # シェイクを開始
  2877.           target.shake = true
  2878.         end
  2879.       elsif target.is_a?(Game_Enemy)
  2880.         # ダメージの場合
  2881.         if value.is_a?(Numeric) && value > 0
  2882.           # シェイクを開始
  2883.           target.shake = true
  2884.         end
  2885.       end
  2886.     end
  2887.   end
  2888.   #--------------------------------------------------------------------------
  2889.   # ● プレバトルフェーズ開始
  2890.   #--------------------------------------------------------------------------
  2891.   alias start_phase1_correct start_phase1
  2892.   def start_phase1
  2893.     # カメラの設定
  2894.     # 元々フロントビュー向けの数値になっているため
  2895.     @zoom_rate = [1.0, 1.0]
  2896.     start_phase1_correct
  2897.   end
  2898.   #--------------------------------------------------------------------------
  2899.   # ● アクターコマンドフェーズ開始
  2900.   #--------------------------------------------------------------------------
  2901.   alias start_phase3_correct start_phase3
  2902.   def start_phase3
  2903.     battler = convert_battler
  2904.     start_phase3_correct
  2905.     if RTAB
  2906.       # カメラの設定
  2907.       # 元々フロントビュー向けの数値になっているため
  2908.       @camera = "command"
  2909. #      @spriteset.screen_target(0, 0, 1.0)
  2910.     end
  2911.   end


  2912.   def action_phase(battler)
  2913.     # action が 1 の場合、バトラーが行動中かどうか確認
  2914.     if @action == 1 and battler.phase < 3
  2915.       for target in battler.target
  2916.         speller = synthe?(target)
  2917.         if speller == nil
  2918.           # ターゲットが通常行動中の場合
  2919.           if @action_battlers.include?(target)
  2920.             if target.phase > 2
  2921.               return
  2922.             end
  2923.           end
  2924.         else
  2925.           # ターゲットが連携スキル発動中の場合
  2926.           for spell in speller
  2927.             if @action_battlers.include?(spell)
  2928.               if spell.phase > 2
  2929.                 return
  2930.               end
  2931.             end
  2932.           end
  2933.         end
  2934.       end
  2935.     end
  2936. case battler.phase
  2937.   when 1
  2938.     update_phase4_step1(battler)
  2939.   when 2
  2940.     update_phase4_step2(battler)
  2941.   when 3  
  2942.     update_phase4_step3(battler) if !(!battler.animation1_on and battler.action? and !battler.flash?)
  2943.   when 4
  2944.     update_phase4_step4(battler) if !(!battler.animation2_on and battler.action?)
  2945.   when 5
  2946.     update_phase4_step5(battler)
  2947.   when 6
  2948.     update_phase4_step6(battler)
  2949.   end
  2950. end
  2951. end
复制代码
近日下载了XP  正在研究当中……
这是小生第一次接触制作游戏相关的东西
很多新手视频图文教学什么的都已看过
有关脚本语言词汇什么的正在学习当中
对于视英文与火星文没有任何区别的小生来说 那些生涩的词汇实在是让人苦恼
不过小生会坚持学习下去
这两天刚刚学会在脚本中一些简单的改编窗口 插入图片等操作方式
当然 这些东西对于大触们来说都是些不值一提的小儿科
不过这对于小生来说简直是一个跨越式的进步

然而远水解不了近火
像小生这样边学习边制作过程当中难免会遇到一些所掌握的知识所涉及不到的东西
而对于这些东西又想迅速的认知了解
其实小生也知道好高骛远的做法是不正确的
但有些事情实在是让人情难自禁啊
昨夜趴在电脑前研究了一夜也没有结果  而在睡觉的时候做梦都梦到漫天的脚本代码
今天犹豫了许久  最终还是下定决心上来提问了

问题类型:脚本
问题级别:白痴级
问题内容:如下

菜鸟很版战斗相关

问题1:在游戏进入战斗场景的时候直接让角色更改于地图场景时不同的人物行走图
在横版战斗脚本中在什么位置用什么方式可以更改?

问题2:在游戏进入战斗场景的时候 角色使用的武器都是用图标合成的
请问在脚本中什么位置用什么方式可以将图标转换成用其他文件夹的图片来取代

以上两个问题由于脚本注释中有许多都是日文标示  
而找度娘翻译后 大多是被翻译成什么巴鲁特啊  雪碧啊什么的  实在是太坑了
因此希望有前辈能够指点一二  
小生在此感激不尽了


  
  

Lv1.梦旅人

梦石
0
星屑
50
在线时间
7 小时
注册时间
2013-10-9
帖子
33
2
发表于 2013-10-10 13:06:53 | 只看该作者
本帖最后由 娜茲玲 于 2013-10-10 13:35 编辑

1.
  #--------------------------------------------------------------------------
  # ● 战斗画面的位置
  #--------------------------------------------------------------------------
  PARTY_X = 480     # 队伍 X 位置
  PARTY_Y = 120     # 队伍 Y 位置
  FORMATION_X = 32  # 各个角色之间的间隔 X
  FORMATION_Y = 48  # 各个角色之间的间隔 Y

注释写有了

2.不必要那么麻烦,直接将武器的图标改为你所有的图片代替

评分

参与人数 1星屑 +45 收起 理由
myownroc + 45 塞糖

查看全部评分

回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
42 小时
注册时间
2013-9-30
帖子
16
3
 楼主| 发表于 2013-10-10 13:33:19 | 只看该作者
娜茲玲 发表于 2013-10-10 13:06
1.
FLY_STATES = ["飛行"]
  #----------------------------------------------------------------------- ...

非常感谢您的回答

不过我的意思是想在战斗中替换成另外一种战斗动作形式的行走图  而不是坐标位置

而该武器图标是为了插入战斗行走图的动作

哦……我的语言表达能力不是很好  有点没说清楚  十分抱歉
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-9-30 03:30

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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