查看: 4287|回复: 18

[已经解决] 更新:修改“超级横版战斗”脚本成功了,不会结贴

[复制链接]
梦石
0
星屑
431
在线时间
43 小时
注册时间
2009-5-6
回帖
58
发表于 2019-8-22 18:07:29 | 显示全部楼层 |阅读模式

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

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

×
本帖最后由 yumeyuuya 于 2019-8-31 14:15 编辑

造福大家,现在放上修改过的完全脚本。(我不会把帖子编辑成【已经解决】,是否需要版主帮忙??)
这个脚本要用到的战斗图是4列8行的,这是示意图。
如果懒得画动态的,你可以一行都是同一张图片,就静止了比较呆。
战斗图示范.png
修改过的超级横版战斗脚本
  1. #==============================================================================
  2. # * Animated_Sprite           Scripted by: SiR_VaIlHoR
  3. #                             Edited by: 柳柳   修改by:yumeyuuya
  4. #------------------------------------------------------------------------------
  5. #  A class for animated sprites.
  6. #==============================================================================

  7. #66RPG,超级横版战斗脚本简要说明:
  8. #默认情况下,把一张战斗图截成4列,>8行,如果感觉4列4帧的动画还不能满足要求,看
  9. #def pose(number,frame = 4),更改=4,以及相关部分。
  10. #战斗图从上到下:前进图,等待图,防御图,挨打图,普通攻击图(默认的武器),
  11. #施展技能,战斗不能,胜利姿势,自定义武器1,自定义武器2……
  12. #
  13. #这个脚本的模型是老外编写的,其中参考了XMXS的一个方法,我添加了一些功能,去掉素材限制
  14. #不同职业拥有的图片数可以不一样,参考工程和录像教学
  15. #
  16. #修改后在使用技能的时候,敌方双方角色不再是原地不动的施展技能啦~~~
  17. #可以有近身(位移)与远程(原地不动)的效果。
  18. #包含 【敌方】远程回复/辅助技能、远程攻击技能、近身攻击技能
  19. #     【我方】远程回复/辅助技能、远程攻击技能、近身攻击技能
  20. #具体修改请看脚本的1010~1052行的注释。

  21. #==============================================================================
  22. # □ RPG::Class
  23. #==============================================================================
  24. module RPG

  25.   class Class

  26.     def name
  27.       name = @name.split(/,/)[0]
  28.       return name != nil ? name : ''
  29.     end

  30.     def name2
  31.       name = @name.split(/,/)[1]
  32.       return name != nil ? name : ''
  33.     end
  34.   end

  35.   class Weapon

  36.     def name
  37.       name = @name.split(/,/)[0]
  38.       return name != nil ? name : ''
  39.     end

  40.     def name2
  41.       name = @name.split(/,/)[1]
  42.       return name != nil ? name : ''
  43.     end   
  44.   end  

  45. end


  46. class Game_Actor

  47.   #--------------------------------------------------------------------------
  48.   # ● 更改名称
  49.   #     name : 新的名称
  50.   #--------------------------------------------------------------------------

  51.   def picturephase
  52.     name = $data_classes[class_id].name2
  53.     return name != nil ? name : "66RPG"
  54.   end
  55. end


  56. class Game_Enemy

  57.   #--------------------------------------------------------------------------
  58.   # ● 获取名称
  59.   #--------------------------------------------------------------------------

  60.   def name
  61.     name = $data_enemies[@enemy_id].name.split(/,/)[0]
  62.     return name != nil ? name : ''
  63.   end

  64.   def picturephase
  65.     name = $data_enemies[@enemy_id].name.split(/,/)[1]
  66.     return name != nil ? name : "66RPG"
  67.   end  

  68. end


  69. class Animated_Sprite < RPG::Sprite
  70. #--------------------------------------------------------------------------
  71. # - Accessible instance variables.
  72. #--------------------------------------------------------------------------
  73. attr_accessor :frames        # Number of animation frames
  74. attr_accessor :delay         # Delay time between frames (speed)
  75. attr_accessor :frame_width   # Width of each frame
  76. attr_accessor :frame_height  # Height of each frame
  77. attr_accessor :offset_x      # X coordinate of the 1st frame
  78. attr_accessor :offset_y      # Y coordinate of all frames
  79. attr_accessor :current_frame # Current animation frame
  80. attr_accessor :moving        # Is the sprite moving?

  81. #--------------------------------------------------------------------------
  82. # - Initialize an animated sprite
  83. #   viewport : Sprite viewport
  84. #--------------------------------------------------------------------------
  85. def initialize(viewport = nil)
  86.    super(viewport)
  87.    @frame_width, @frame_height = 0, 0
  88.    change    # A basic change to set initial variables
  89.    @old = Graphics.frame_count  # For the delay method
  90.    @goingup = true    # Increasing animation? (if @rm2k_mode is true)
  91.    @once = false      # Is the animation only played once?
  92.    @animated = true   # Used to stop animation when @once is true
  93. end

  94. #--------------------------------------------------------------------------
  95. # Comment by RPG
  96. #   - Change the source rect (change the animation)
  97. #   frames : Number of animation frames
  98. #   delay : Frame delay, controls animation speed
  99. #   offx : X coordinate of the 1st frame
  100. #   offy : Y coordinate of all frames
  101. #   startf : Starting frame for animation
  102. #   once : Is the animation only played once?
  103. #   rm2k_mode : Animation pattern: 1-2-3-2 if true, 1-2-3-1 if false
  104. #
  105. # Comment by cybersam
  106. #
  107. # the rm2k_mode isnt pressent anymore...
  108. # if you want that feature then use rm2k or use RPG's scrîpt...
  109. #--------------------------------------------------------------------------
  110. def change(frames = 0, delay = 0, offx = 0, offy = 0,
  111.             startf = 0, once = false)
  112.    @frames = frames
  113.    @delay = delay
  114.    @offset_x, @offset_y = offx, offy
  115.    @current_frame = startf
  116.    @once = once
  117.    x = @current_frame * @frame_width + @offset_x
  118.    self.src_rect = Rect.new(x, @offset_y, @frame_width, @frame_height)
  119.    @goingup = true
  120.    @animated = true
  121. end
  122.   

  123. #--------------------------------------------------------------------------
  124. # - Update animation and movement 更新动画和运动
  125. #--------------------------------------------------------------------------
  126. def update
  127.    super
  128.    if self.bitmap != nil and delay(@delay) and @animated
  129.      x = @current_frame * @frame_width + @offset_x
  130.      self.src_rect = Rect.new(x, @offset_y, @frame_width, @frame_height)
  131.        @current_frame = (@current_frame + 1) unless @frames == 0
  132.        @animated = false if @current_frame == @frames and @once
  133.        @current_frame %= @frames
  134.    end
  135. end
  136.   

  137. #--------------------------------------------------------------------------
  138. # - Move the sprite 移动精灵
  139. #   x : X coordinate of the destination point #终点X:X坐标
  140. #   y : Y coordinate of the destination point #终点Y:Y坐标
  141. #   speed : Speed of movement (0 = delayed, 1+ = faster) #速度:移动速度(0=延迟,1+=更快)
  142. #   delay : Movement delay if speed is at 0 #延迟:速度为0时的移动延迟
  143. #--------------------------------------------------------------------------
  144. def move(x, y, speed = 1, delay = 0)
  145.    @destx = x
  146.    @desty = y
  147.    @move_speed = speed
  148.    @move_delay = delay
  149.    @move_old = Graphics.frame_count
  150.    @moving = true
  151. end
  152.   

  153. #--------------------------------------------------------------------------
  154. # - Move sprite to destx and desty  将sprite移动到destx和desty
  155. #--------------------------------------------------------------------------
  156. def update_move
  157.    return unless @moving
  158.    movinc = @move_speed == 0 ? 1 : @move_speed
  159.    if Graphics.frame_count - @move_old > @move_delay or @move_speed != 0
  160.      self.x += movinc if self.x < @destx
  161.      self.x -= movinc if self.x > @destx
  162.      self.y += movinc if self.y < @desty
  163.      self.y -= movinc if self.y > @desty
  164.      @move_old = Graphics.frame_count
  165.    end
  166.    if @move_speed > 1  # Check if sprite can't reach that point检查精灵是否达不到那个点
  167.      self.x = @destx if (@destx - self.x).abs % @move_speed != 0 and
  168.                         (@destx - self.x).abs <= @move_speed
  169.      self.y = @desty if (@desty - self.y).abs % @move_speed != 0 and
  170.                         (@desty - self.y).abs <= @move_speed
  171.    end
  172.    if self.x == @destx and self.y == @desty
  173.      @moving = false
  174.    end
  175. end
  176.   

  177. #--------------------------------------------------------------------------
  178. # - Pause animation, but still updates movement 暂停动画,但仍更新运动
  179. #   frames : Number of frames 帧:帧数
  180. #--------------------------------------------------------------------------
  181. def delay(frames)
  182.    update_move
  183.    if (Graphics.frame_count - @old >= frames)
  184.      @old = Graphics.frame_count
  185.      return true
  186.    end
  187.    return false
  188. end
  189. end

  190. #=============================================================================
  191. #
  192. # here we go...
  193. # this makes the scrîpt very easy to implement
  194. # just add a new scrîpt above the "Main" scrîpt
  195. # and insert this whole thing in there
  196. #
  197. # as you can see the sprite changing code is from the japanese scrîpt
  198. # so the credits for the sprite changin goes to them....
  199. # i edit it a little so it can show more sprites and sprite animations
  200. # and added some other stuff... the next things are player movement...
  201. #
  202. #
  203. #
  204. # i got the battler changing scrîpt in this scrîpt...
  205. # the credits for this goes to the guy who made this...
  206. #
  207. # ▼▲▼ XRXS11. 戦闘・バトラーモーション ver.0 ▼▲▼
  208. #
  209. # since this isnt used anymore... it isnt need for credit anymore...
  210. # but i'll let it here since it helped me a lot...
  211. #
  212. #
  213. # as for the ideas... missy provided me with really good ideas
  214. # that helped me alot when i didnt find a way to some of these features...
  215. #
  216. # here one more Credit to place...
  217. # its RPG's scrîpt...
  218. # not the whole thing here...
  219. # but some snipplet you'll know witch one when read the comments
  220. #
  221. #
  222. # if you want some more explaines about this scrîpt...
  223. # the most stuff are commented... but if you still have questions or
  224. # sugestions then you can contact me
  225. #
  226. # how or where you can contact me...
  227. # at the http://www.rmxp.net forum via pm, email: cybersam@club-anime.de
  228. # or via AIM: cych4n or ICQ: 73130840
  229. #
  230. # remember this is still in testing phase...
  231. # and i'm trying to work on some other additions... like character movements...
  232. # but that wont be added now... couse i need to figure it out first...
  233. #
  234. #
  235. #
  236. # oh hehe.... before i forget...
  237. # sorry for the bad english... ^-^''''
  238. #
  239. #
  240. #==============================================================================
  241. #
  242. # here i'm going to tell you what names you need to give for your chara
  243. # battle sprites....
  244. #
  245. # ok... here... since i'm using RPG's movement scrîpt...
  246. # there are a lot of changes...
  247. #
  248. # when you look at the scrîpt you'll find line with "pose(n)" or "enemy_pose(n)"
  249. # since i want my sprites have different sprites... i added one more option
  250. # to these...
  251. # so now if you add a number after the n (the n stands for witch sprite is used)
  252. # fo example 8... ("pose(4, 8)") this will tell the scrîpt that the 4th animation
  253. # have 8 frames...
  254. # pose is used for the player... and enemy_pose for the enemy...
  255. # there is nothing more to this...
  256. # i used my old sprite numbers... (this time in only one sprite...)
  257. #
  258. # explains about the animation sprites... (the digits)
  259. #
  260. #
  261. # 0 = move (during battle) 移动
  262. # 1 = standby 待机
  263. # 2 = defend 防御
  264. # 3 = hit (being attacked)被击中
  265. # 4 = attack 攻击
  266. # 5 = skill use 使用技能
  267. # 6 = dead 死亡
  268. # 7 = winning pose... this idea is from RPG....胜利
  269. #
  270. #
  271. # of course this is just the begining of the code...
  272. # so more animations can be implemented...
  273. # but for now this should be enough...
  274. #
  275. # alot has changed here... and now it looks like it is done...
  276. # of course the fine edit needs to be done so it looks and works great with your
  277. # game too...
  278. #
  279. #
  280. #
  281. # 1st character movement...                             done
  282. # 2nd character movement during attack...               done
  283. # 3rd character apears at the enemy while attacking...  done
  284. #
  285. # 4th enemies movement...                               done
  286. # 5th enemy movement during attack...                   done
  287. # 6th enemy apears at the enemy while attacking...      done
  288. #
  289. # 7th each weapon has its own animation...              done
  290. # 8th each skill has its own animation...               done
  291. #
  292. #
  293. #
  294. # for the ones interisted... my nex project is an Movie player
  295. # (that actualy plays avi, mpgs and such...
  296. # but dont think this will be done soon... ^-^''
  297. #
  298. # but i'll may be try something else before i begin to code that one...
  299. #==============================================================================



  300. class Game_Actor < Game_Battler
  301.   

  302. # you dont have to change your game actor to let the characters schows
  303. # from the side...
  304. # this will do it for you... ^-^
  305.   
  306. def screen_x
  307.    if self.index != nil
  308.       return self.index * 30 + 450
  309.      #return self.index * 30 + 430
  310.    else
  311.      return 0
  312.    end
  313. end

  314. def screen_y
  315.     return self.index * 60 + 150
  316.    #return self.index * 40 + 150
  317. end
  318.   

  319. def screen_z
  320.    if self.index != nil
  321.      return self.index
  322.    else
  323.      return 0
  324.    end
  325. end
  326. end


  327. # RPG's snipplet...
  328. class Spriteset_Battle
  329. attr_accessor :actor_sprites
  330. attr_accessor :enemy_sprites
  331.   

  332.   

  333. alias original_initialize initialize
  334. def initialize
  335.    #@start_party_number = $game_party.actors.size
  336.    # ビューポートを作成
  337.    @viewport0 = Viewport.new(0, 0, 640, 480)
  338.    @viewport1 = Viewport.new(0, 0, 640, 480)
  339.    @viewport2 = Viewport.new(0, 0, 640, 480)
  340.    @viewport3 = Viewport.new(0, 0, 640, 480)
  341.    @viewport4 = Viewport.new(0, 0, 640, 480)
  342.    @viewport1.z = 50
  343.    @viewport2.z = 50
  344.    @viewport3.z = 200
  345.    @viewport4.z = 5000

  346.    @battleback_sprite = Sprite.new(@viewport0)
  347.    
  348.    @enemy_sprites = []
  349.    for enemy in $game_troop.enemies #.reverse
  350.      @enemy_sprites.push(Sprite_Battler.new(@viewport1, enemy))
  351.    end
  352.    
  353.    @actor_sprites = []
  354.    @actor_sprites.push(Sprite_Battler.new(@viewport2,$game_party.actors[0]))
  355.    @actor_sprites.push(Sprite_Battler.new(@viewport2,$game_party.actors[1]))
  356.    @actor_sprites.push(Sprite_Battler.new(@viewport2,$game_party.actors[2]))
  357.    @actor_sprites.push(Sprite_Battler.new(@viewport2,$game_party.actors[3]))
  358.    
  359.    @weather = RPG::Weather.new(@viewport1)
  360.    @picture_sprites = []
  361.    for i in 51..100
  362.      @picture_sprites.push(Sprite_Picture.new(@viewport3,
  363.        $game_screen.pictures[i]))
  364.    end
  365.    @timer_sprite = Sprite_Timer.new
  366.    update
  367. end
  368.   

  369.   

  370.   

  371. alias original_update update
  372. def update
  373.    @viewport1.z = 50 and @viewport2.z = 51 if $actor_on_top == true
  374.    @viewport1.z = 51 and @viewport2.z = 50 if $actor_on_top == false
  375.     # 刷新角色的活动块 (对应角色的替换)
  376.     @actor_sprites[0].battler = $game_party.actors[0]
  377.     @actor_sprites[1].battler = $game_party.actors[1]
  378.     @actor_sprites[2].battler = $game_party.actors[2]
  379.     @actor_sprites[3].battler = $game_party.actors[3]

  380.     # 战斗背景的文件名与现在情况有差异的情况下
  381.     if @battleback_name != $game_temp.battleback_name
  382.       @battleback_name = $game_temp.battleback_name
  383.       if @battleback_sprite.bitmap != nil
  384.         @battleback_sprite.bitmap.dispose
  385.       end

  386.       @battleback_sprite.bitmap = RPG::Cache.battleback(@battleback_name)
  387.       @battleback_sprite.src_rect.set(0, 0, 640, 480)
  388.     end

  389.     # 刷新战斗者的活动块
  390.     for sprite in @enemy_sprites + @actor_sprites
  391.       sprite.update
  392.     end

  393.     # 刷新天气图形
  394.     @weather.type = $game_screen.weather_type
  395.     @weather.max = $game_screen.weather_max
  396.     @weather.update

  397.     # 刷新图片活动块
  398.     for sprite in @picture_sprites
  399.       sprite.update
  400.     end

  401.     # 刷新计时器活动块
  402.     @timer_sprite.update
  403.        
  404.     # 设置画面的色调与震动位置
  405.     @viewport1.tone = $game_screen.tone
  406.     @viewport1.ox = $game_screen.shake

  407.     # 设置画面的闪烁色
  408.     @viewport4.color = $game_screen.flash_color

  409.     # 刷新显示端口
  410.     @viewport1.update
  411.     @viewport2.update
  412.     @viewport4.update

  413. end
  414. end
  415. # end

  416. #==============================================================================
  417. # Sprite Battler for the Costum Battle System
  418. #==============================================================================
  419. # here we are making some animations and stuff...
  420. # i know its not the best way...
  421. # but this is the first working way that i found....
  422. # this needs propper understanding how the animation works...
  423. # if you want to change some stuff...
  424. # in this i'll not explain much couse its realy easy if you know what you do
  425. # otherwise it will take you time to understand it, but i think the one who
  426. # is trying to edit this will know what he/she do... ^-^
  427. #
  428. #
  429. #
  430. # here i'll completely replace the "Sprite_Battler" class...
  431. # so if you've changed something in there you need to change it here as well
  432. # (i think... i didnt tested it... so its up to you)
  433. # i'll mark the stuff i added just with --> #
  434. # something that need to be explained have a comment...
  435. # but its not all commented...
  436. # so if you dont know what it means or you just want to know why it is there and
  437. # what it does then you need to contact me or anyone who understand this... ^-^
  438. # how you can contact me see above... at the top of this scrîpt...


  439. class Sprite_Battler < Animated_Sprite

  440. attr_accessor :battler
  441. attr_reader   :index
  442. attr_accessor :target_index
  443. attr_accessor :frame_width

  444.   

  445. def initialize(viewport, battler = nil)
  446.    super(viewport)
  447.    @battler = battler
  448.    @pattern_b = 0 #
  449.    @counter_b = 0 #
  450.    @index = 0     #
  451.    if @battler != nil

  452.      tempbitmap = RPG::Cache.battler(@battler.battler_name, @battler.battler_hue)

  453.      @frame_width = tempbitmap.width/4

  454.      picturephase = @battler.picturephase

  455.      if picturephase == "66RPG"

  456.        @frame_height = tempbitmap.height/8

  457.      else

  458.        @frame_height = tempbitmap.height/8.to_i

  459.      end     

  460.    else

  461.      @frame_width, @frame_height = 1,1

  462.    end   

  463.    # start sprite
  464.    @battler.is_a?(Game_Enemy) ? enemy_pose(1) : pose(1)
  465.    @battler_visible = false
  466.    if $target_index == nil
  467.      $target_index = 0
  468.    end
  469. end
  470.   

  471. def index=(index) #
  472.    @index = index  #
  473.    update          #
  474. end               #
  475.   

  476. def dispose
  477.    if self.bitmap != nil
  478.      self.bitmap.dispose
  479.    end
  480.    super
  481. end
  482.   

  483. def enemy                                             #
  484.    $target_index += $game_troop.enemies.size
  485.    $target_index %= $game_troop.enemies.size
  486.    return $game_troop.enemies[$target_index]           #
  487. end                                                   #
  488.   

  489. def actor                                             #
  490.    $target_index += $game_party.actors.size
  491.    $target_index %= $game_party.actors.size
  492.    return $game_party.actors[$target_index]            #
  493. end            


  494. #==============================================================================
  495. # here is a snipplet from RPG's scrîpt...
  496. # i changed only to lines from this...
  497. #
  498. # here you can add more sprite poses... if you have more... ^-^
  499. #==============================================================================
  500. def pose(number, frames = 4)
  501.     case number
  502.     when 0  # run
  503.     change(frames, 5, 0, 0, 0)
  504.     when 1  # standby
  505.     change(frames, 5, 0, @frame_height)
  506.     when 2 # defend
  507.     change(frames, 5, 0, @frame_height * 2)
  508.     when 3 # Hurt, loops
  509.     change(frames, 5, 0, @frame_height * 3)
  510.     when 4 # attack no loop
  511.     change(frames, 5, 0, @frame_height * 4, 0, true)
  512.     when 5 # skill
  513.     change(frames, 5, 0, @frame_height * 5)
  514.     when 6 # death
  515.     change(frames, 5, 0, @frame_height * 6)
  516.     when 7 # winning pose
  517.     change(frames, 5, 0, @frame_height * 7)
  518.     when 8 # no sprite
  519.     change(frames, 5, 0, @frame_height * 8)
  520.     when 9 # no sprite
  521.     change(frames, 5, 0, @frame_height * 9)

  522.     when 10 # no sprite
  523.     change(frames, 5, 0, @frame_height * 10)
  524.     when 11 # no sprite
  525.     change(frames, 5, 0, @frame_height * 11)

  526.     when 12 # no sprite
  527.     change(frames, 5, 0, @frame_height * 12)
  528.     when 13 # no sprite
  529.     change(frames, 5, 0, @frame_height * 13)

  530.     when 14 # no sprite
  531.     change(frames, 5, 0, @frame_height * 14)
  532.     when 15 # no sprite
  533.     change(frames, 5, 0, @frame_height * 15)

  534.     when 16 # no sprite
  535.     change(frames, 5, 0, @frame_height * 16)

  536.     when 17 # no sprite
  537.     change(frames, 5, 0, @frame_height * 17)

  538.     when 18 # no sprite
  539.     change(frames, 5, 0, @frame_height * 18)

  540.     when 19 # no sprite
  541.     change(frames, 5, 0, @frame_height * 19)

  542.     when 20 # no sprite
  543.     change(frames, 5, 0, @frame_height * 20)

  544.     # ...etc.
  545.    else
  546.      change(frames, 5, 0, @frame_height * number, 0)
  547.    end
  548. end
  549.   

  550. #--------------------------------------------------------------------------
  551. # - Change the battle pose for an enemy
  552. #   number : pose' number
  553. #--------------------------------------------------------------------------
  554. def enemy_pose(number ,enemy_frames = 4)
  555.    case number
  556.    when 0  # run
  557.      change(enemy_frames, 5, 0, 0, 0)
  558.    when 1  # standby
  559.      change(enemy_frames, 5, 0, @frame_height)
  560.    when 2 # defend
  561.      change(enemy_frames, 5, 0, @frame_height * 2)
  562.    when 3 # Hurt, loops
  563.      change(enemy_frames, 5, 0, @frame_height * 3)
  564.    when 4 # attack
  565.      change(enemy_frames, 5, 0, @frame_height * 4, 0, true)
  566.    when 5 # skill
  567.      change(enemy_frames, 5, 0, @frame_height * 5)
  568.    when 6 # death
  569.      change(enemy_frames, 5, 0, @frame_height * 6)
  570.    when 7 # no sprite
  571.      change(enemy_frames, 5, 0, @frame_height * 7)
  572.      # ...etc.
  573.    else
  574.      change(enemy_frames, 5, 0, @frame_height * number, 0)
  575.    end
  576. end
  577. #==============================================================================
  578. # sniplet end...
  579. #==============================================================================  

  580.   

  581.   

  582. def update
  583.    super
  584.    
  585.    if @battler == nil                                                      

  586.      self.bitmap = nil                                                      

  587.      loop_animation(nil)                                                   
  588.      return                                                               
  589.    end                                                                     
  590.    if @battler.battler_name != @battler_name or
  591.       @battler.battler_hue != @battler_hue

  592.      @battler_name = @battler.battler_name
  593.      @battler_hue = @battler.battler_hue
  594.      self.bitmap = RPG::Cache.battler(@battler_name, @battler_hue)
  595.      @width = bitmap.width
  596.      @height = bitmap.height
  597.      self.ox = @frame_width / 2
  598.      self.oy = @frame_height

  599.      if @battler.dead? or @battler.hidden
  600.        self.opacity = 0
  601.      end
  602.      self.x =  @battler.screen_x
  603.      self.y =  @battler.screen_y
  604.      self.z = @battler.screen_z
  605.    end

  606.    if @battler.damage == nil and
  607.       @battler.state_animation_id != @state_animation_id
  608.      @state_animation_id = @battler.state_animation_id
  609.      loop_animation($data_animations[@state_animation_id])
  610.    end

  611.    if @battler.is_a?(Game_Actor) and @battler_visible
  612.      if $game_temp.battle_main_phase
  613.        self.opacity += 3 if self.opacity < 255
  614.      else
  615.        self.opacity -= 3 if self.opacity > 207
  616.      end
  617.    end

  618.    if @battler.blink
  619.      blink_on
  620.    else
  621.      blink_off
  622.    end

  623.    unless @battler_visible
  624.      if not @battler.hidden and not @battler.dead? and
  625.         (@battler.damage == nil or @battler.damage_pop)
  626.        appear
  627.        @battler_visible = true
  628.      end
  629.      if not @battler.hidden and
  630.         (@battler.damage == nil or @battler.damage_pop) and
  631.         @battler.is_a?(Game_Actor)
  632.        appear
  633.        @battler_visible = true
  634.      end
  635.    end
  636.    if @battler_visible
  637.      if @battler.hidden
  638.        $game_system.se_play($data_system.escape_se)
  639.        escape
  640.        @battler_visible = false
  641.      end
  642.      if @battler.white_flash
  643.        whiten
  644.        @battler.white_flash = false
  645.      end
  646.      if @battler.animation_id != 0
  647.        animation = $data_animations[@battler.animation_id]
  648.        animation(animation, @battler.animation_hit)
  649.        @battler.animation_id = 0
  650.      end
  651.      if @battler.damage_pop
  652.        damage(@battler.damage, @battler.critical)
  653.        @battler.damage = nil
  654.        @battler.critical = false
  655.        @battler.damage_pop = false
  656.      end
  657.      if @battler.damage == nil and @battler.dead?
  658.        if @battler.is_a?(Game_Enemy)
  659.          $game_system.se_play($data_system.enemy_collapse_se)
  660.          collapse
  661.          @battler_visible = false
  662.        else
  663.          $game_system.se_play($data_system.actor_collapse_se) unless @dead
  664.          @dead = true
  665.          pose(6)
  666.        end
  667.      else
  668.        @dead = false
  669.      end
  670.    end                                                                #
  671. end
  672. end


  673. #==============================================================================
  674. # Scene_Battle Costum  Battle System
  675. #==============================================================================

  676. class Scene_Battle
  677.   

  678. def update_phase4
  679.    case @phase4_step
  680.    when 1
  681.      update_phase4_step1
  682.    when 2
  683.      update_phase4_step2
  684.    when 3
  685.      update_phase4_step3
  686.    when 4
  687.      update_phase4_step4
  688.    when 5
  689.      update_phase4_step5
  690.    when 6
  691.      update_phase4_step6
  692.    when 7
  693.      update_phase4_step7
  694.    when 8
  695.     update_phase4_step8   
  696.    end
  697. end
  698.   

  699.   

  700. def make_basic_action_result
  701.    if @active_battler.is_a?(Game_Actor)
  702.      $actor_on_top = true
  703.    elsif @active_battler.is_a?(Game_Enemy)
  704.      $actor_on_top = false
  705.    end
  706.    
  707.    if @active_battler.current_action.basic == 0
  708. #=WEAPONS START... ==========================================================
  709. #=Different Weapons with different animations
  710. # 不同的武器,不同的动画
  711. # this is quite simple as you can see... 这很简单,你可以看到…
  712. # if you want to add a weapon to the animation list then look at the scrîpt below...
  713. # 如果你想在动画列表中添加武器,那么看看下面的scr_pt…
  714. # and i hope you'll find out how this works... #我希望你能知道这是怎么回事…
  715. #
  716. #
  717. # if not...
  718. # here is the way...
  719. # first thing...
  720. # just copy and paste "elseif @active_battler_enemy.weapon_id == ID..."
  721. # 只需复制并粘贴"elseif @active_battler_enemy.weapon_id == ID..."
  722. # just after the last @weapon_sprite....
  723. # 就在最后一个“武器精灵”之后……
  724. #
  725. # here the ID is you need to look in you game databse the number that stands before
  726. # 这里的ID是你需要在你的游戏数据中查找之前的号码
  727. # your weapon name is the ID you need to input here...
  728. # 你的武器名称是你需要在这里输入的ID…
  729. #
  730. # same thing goes for the monster party... ^-^ 怪物队伍也一样…^ ^
  731. # monster normaly dont need more sprites for weapons....
  732. # 怪物一般不需要更多的精灵来制造武器……
  733. # if you want to use more... then replace the "@weapon_sprite_enemy = 4"
  734. # 如果你想使用更多…然后替换"@weapon_sprite_enemy = 4"
  735. # with these lines... (but you need to edit them)
  736. # 用这些线条…(但你需要编辑它们)
  737. #
  738. #        if @active_battler.weapon_id == 1 # <--  weapon ID number
  739. #          @weapon_sprite_enemy = 4 # <-- battle animation
  740. #        elsif @active_battler.weapon_id == 5 # <-- weapon ID number
  741. #          @weapon_sprite_enemy = 2 # <-- battle animation
  742. #        elsif @active_battler.weapon_id == 9 # <-- weapon ID number
  743. #          @weapon_sprite_enemy = 0 # <-- battle animation
  744. #        elsif @active_battler.weapon_id == 13 # <-- weapon ID number
  745. #          @weapon_sprite_enemy = 6 # <-- battle animation
  746. #        else
  747. #          @weapon_sprite_enemy = 4
  748. #        end
  749. #
  750. #================================= END

  751.      if @active_battler.is_a?(Game_Actor)
  752.        if $data_weapons[@active_battler.weapon_id] == nil

  753.          @weapon_sprite = 4
  754.        else

  755.          if $data_weapons[@active_battler.weapon_id].name2 == nil or

  756.            $data_weapons[@active_battler.weapon_id].name2 == ""
  757.            @weapon_sprite = 4
  758.          else
  759.            @weapon_sprite = $data_weapons[@active_battler.weapon_id].name2.to_i

  760.          end
  761.        end

  762.         

  763. # monster section is here... ^-^

  764.      else # @active_battler.is_a?(Game_Enemy)
  765.          @weapon_sprite_enemy = 4
  766.      end
  767.         

  768. #
  769. #=============================================================================
  770. # WEAPONS END....
  771. #=============================================================================

  772.      @animation1_id = @active_battler.animation1_id #行动方ID
  773.      @animation2_id = @active_battler.animation2_id #对象方ID
  774.      if @active_battler.is_a?(Game_Enemy)
  775.        if @active_battler.restriction == 3 #限制为[敌人为普通攻击]的情况下
  776.          target = $game_troop.random_target_enemy
  777.        elsif @active_battler.restriction == 2 #限制为[我方为普通攻击]的情况下
  778.          target = $game_party.random_target_actor
  779.        else
  780.          index = @active_battler.current_action.target_index
  781.          target = $game_party.smooth_target_actor(index)
  782.        end
  783. #======== here is the setting for the movement & animation...
  784. #======== 这是武器攻击时关于移动和动画的设置…
  785.          x = target.screen_x - RPG::Cache.battler(@active_battler.battler_name, @active_battler.battler_hue).width/6

  786.          @spriteset.enemy_sprites[@active_battler.index].enemy_pose(0)
  787.          @spriteset.enemy_sprites[@active_battler.index].move(x, target.screen_y, 10)
  788. #========= here if you look at the RPG's movement settings you'll see
  789. #========= that he takes the number 40 for the speed of the animation...
  790. #========= i thing thats too fast so i settet it down to 10 so looks smoother...
  791.    end
  792.      if @active_battler.is_a?(Game_Actor)
  793.        if @active_battler.restriction == 3 #限制为[我方为普通攻击]的情况下
  794.          target = $game_party.random_target_actor  
  795.        elsif @active_battler.restriction == 2 #限制为[敌人为普通攻击]的情况下
  796.          target = $game_troop.random_target_enemy
  797.        else
  798.          index = @active_battler.current_action.target_index
  799.          target = $game_troop.smooth_target_enemy(index)
  800.        end
  801. #======= the same thing for the player... ^-^
  802.        x = target.screen_x + RPG::Cache.battler(@active_battler.battler_name, @active_battler.battler_hue).width/8
  803.        @spriteset.actor_sprites[@active_battler.index].pose(0)
  804.        @spriteset.actor_sprites[@active_battler.index].move(x, target.screen_y, 10)
  805.      end
  806.      @target_battlers = [target]
  807.      for target in @target_battlers
  808.        target.attack_effect(@active_battler)
  809.      end
  810.      return
  811.    end
  812.    if @active_battler.current_action.basic == 1 # 防御的情况下
  813.      if @active_battler.is_a?(Game_Actor)
  814.        @spriteset.actor_sprites[@active_battler.index].pose(2) #defence 防御
  815.      else
  816.        @spriteset.enemy_sprites[@active_battler.index].enemy_pose(2) #defence
  817.      end
  818.      @help_window.set_text($data_system.words.guard, 1)
  819.      return
  820.    end
  821.    if @active_battler.is_a?(Game_Enemy) and # 逃跑的情况下
  822.       @active_battler.current_action.basic == 2
  823.      @help_window.set_text("逃走", 1)
  824.      @active_battler.escape
  825.      return
  826.    end
  827.    if @active_battler.current_action.basic == 3 # 什么也不做的情况下
  828.      $game_temp.forcing_battler = nil
  829.      @phase4_step = 1
  830.      return
  831.    end
  832.    
  833.    if @active_battler.current_action.basic == 4
  834.      if $game_temp.battle_can_escape == false #逃跑失败
  835.        $game_system.se_play($data_system.buzzer_se)
  836.        return
  837.      end
  838.      $game_system.se_play($data_system.decision_se)
  839.      update_phase2_escape
  840.      return
  841.    end
  842. end


  843. #--------------------------------------------------------------------------
  844. # skill aktion... ● 生成特技行动结果
  845. #--------------------------------------------------------------------------
  846. def make_skill_action_result
  847.    # 获取特技
  848.    @skill = $data_skills[@active_battler.current_action.skill_id]
  849.    # 如果不是强制行动
  850.    unless @active_battler.current_action.forcing
  851.      # 因为 SP 耗尽而无法使用的情况下
  852.      unless @active_battler.skill_can_use?(@skill.id)
  853.        # 清除强制行动对像的战斗者
  854.        $game_temp.forcing_battler = nil
  855.        # 移至步骤 1(准备行动)
  856.        @phase4_step = 1
  857.        return
  858.      end
  859.    end
  860.    @active_battler.sp -= @skill.sp_cost    # 消耗 SP
  861.    @status_window.refresh # 刷新状态窗口
  862.    @help_window.set_text(@skill.name, 1) # 在帮助窗口显示特技名
  863.    
  864. #=============================================================================
  865. # SKILL SPRITES START
  866. #=============================================================================
  867. # this one is the same as the one for the weapons...这个和武器的那个一样
  868. # for the one who have this for the first time 对于第一次看到这个的人来说,
  869. # look at the scrîpt i hope it is easy to understand... 我希望它很容易理解。
  870. #
  871. # the other one that have the earlier versions of this scrîpt they dont need explenation
  872. # ... i think.... 另一个有这个脚本的早期版本,他们不需要解释。
  873. # the think that changed is the line where the animation ID is given to the sprite...
  874. # 认为改变的是动画ID被赋予精灵的线条…
  875. # the number after the "pose" is the animation ID... it goes for every other animation as well..
  876. # 在“姿势”之后的数字是动画ID…它也适用于其他动画。
  877. # if you have an animation for a skill that have more frames...
  878. # 如果你有一个动画的技能有更多的帧…
  879. # then just insert the number of frames after the first number...
  880. # 然后在第一个数字后面插入帧的数目…
  881. # so it looks like this.... "pose(5, 8)" <-- 5 is the animation...
  882. # 所以看起来像这样……”姿势(5,8)“<--5是动画…
  883. # 8 is the max frame (that means your animation have 8 frames...) ^-^
  884. # 8是最大帧(这意味着动画有8帧…)^-^
  885.      @animation1_id = @active_battler.animation1_id #行动方ID
  886.      @animation2_id = @active_battler.animation2_id #对象方ID
  887.     #--------------敌方施展技能的位移----------------------------     
  888.    if @active_battler.is_a?(Game_Enemy)
  889.       if @active_battler.restriction == 3 #限制为[敌人为普通攻击]的情况下
  890.          target = $game_troop.random_target_enemy
  891.        elsif @active_battler.restriction == 2 #限制为[我方为普通攻击]的情况下
  892.          target = $game_party.random_target_actor
  893.        else
  894.         case @skill.id
  895.         #敌方的远距离治疗/辅助技能id,不位移,id请对照数据库
  896.         when 1,2,3,4,5,6,53,54
  897.           index = @active_battler.current_action.target_index
  898.           target = $game_troop.smooth_target_enemy(index)
  899.           @moving = false
  900.           @spriteset.enemy_sprites[@active_battler.index].pose(5)
  901.         #敌方的远距离攻击技能id,不位移,id请对照数据库
  902.         when 7,8,9,10,11,12,13,14,15,16,17,18,19,20
  903.           index = @active_battler.current_action.target_index
  904.           target = $game_party.smooth_target_actor(index)
  905.           @moving = false
  906.           @spriteset.enemy_sprites[@active_battler.index].pose(5)
  907.         #敌方的近身攻击技能id,id请对照数据库
  908.         when 57,58,9,60,61,62,63,64,70
  909.           index = @active_battler.current_action.target_index
  910.           target = $game_party.smooth_target_actor(index)
  911.          x = target.screen_x - RPG::Cache.battler(@active_battler.battler_name, @active_battler.battler_hue).width/6
  912.          @spriteset.enemy_sprites[@active_battler.index].enemy_pose(5)
  913.          @spriteset.enemy_sprites[@active_battler.index].move(x, target.screen_y, 10)
  914.        end
  915.      end
  916.     end
  917.      #--------------我方施展技能的位移----------------------------     
  918.    if @active_battler.is_a?(Game_Actor)
  919.       if @active_battler.restriction == 3 #限制为[我方为普通攻击]的情况下
  920.         target = $game_party.random_target_actor
  921.       elsif @active_battler.restriction == 2 #限制为[敌人为普通攻击]的情况下
  922.         target = $game_troop.random_target_enemy
  923.       else
  924.         case @skill.id
  925.         #我方的远距离治疗/辅助技能id,不位移,id请对照数据库
  926.         when 1,2,3,4,5,6,53,54
  927.           index = @active_battler.current_action.target_index
  928.           target = $game_party.smooth_target_actor(index)
  929.           @moving = false
  930.           @spriteset.actor_sprites[@active_battler.index].pose(5)
  931.         #我方的远距离攻击技能id,不位移,id请对照数据库
  932.         when 7,8,9,10,11,12,13,14,15,16,17,18,19,20
  933.           index = @active_battler.current_action.target_index
  934.           target = $game_troop.smooth_target_enemy(index)
  935.           @moving = false
  936.           @spriteset.actor_sprites[@active_battler.index].pose(5)
  937.         #我方的近身攻击技能id,id请对照数据库
  938.         when 57,58,9,60,61,62,63,64
  939.           index = @active_battler.current_action.target_index
  940.           target = $game_troop.smooth_target_enemy(index)
  941.           x = target.screen_x + RPG::Cache.battler(@active_battler.battler_name, @active_battler.battler_hue).width/8
  942.           @spriteset.actor_sprites[@active_battler.index].pose(5)
  943.           @spriteset.actor_sprites[@active_battler.index].move(x, target.screen_y, 10)
  944.         end
  945.       end
  946.     end
  947. #=============================================================================
  948. # SKILL SPRITES END
  949. #=============================================================================
  950.    # 设置动画 ID
  951.    @animation1_id = @skill.animation1_id
  952.    @animation2_id = @skill.animation2_id
  953.    # 设置公共事件 ID
  954.    @common_event_id = @skill.common_event_id
  955.    # 设置对像侧战斗者
  956.    set_target_battlers(@skill.scope)
  957.    # 应用特技效果
  958.    for target in @target_battlers
  959.      target.skill_effect(@active_battler, @skill)
  960.    end
  961. end

  962. #--------------------------------------------------------------------------
  963. # how here we make the item use aktions 当使用物品时的行动
  964. #--------------------------------------------------------------------------
  965. def make_item_action_result
  966.    # sorry i didnt work on this...
  967.    # couse i dont have a sprite that uses items....
  968.    # so i just added the standby sprite here...
  969.    # when i get more time for this i'll try what i can do for this one... ^-^
  970.    # its the same as the ones above...
  971.    if @active_battler.is_a?(Game_Actor)
  972.      @spriteset.actor_sprites[@active_battler.index].pose(1)
  973.    else
  974.      @spriteset.enemy_sprites[@active_battler.index].enemy_pose(1)
  975.    end
  976.    # 获取物品
  977.    @item = $data_items[@active_battler.current_action.item_id]
  978.    # 因为物品耗尽而无法使用的情况下
  979.    unless $game_party.item_can_use?(@item.id)
  980.      # 移至步骤 1
  981.      @phase4_step = 1
  982.      return
  983.    end
  984.    # 消耗品的情况下
  985.    if @item.consumable
  986.      # 使用的物品减 1
  987.      $game_party.lose_item(@item.id, 1)
  988.    end
  989.    # 在帮助窗口显示物品名
  990.    @help_window.set_text(@item.name, 1)
  991.    # 设置动画 ID
  992.    @animation1_id = @item.animation1_id
  993.    @animation2_id = @item.animation2_id
  994.    # 设置公共事件 ID
  995.    @common_event_id = @item.common_event_id
  996.    # 确定对像
  997.    index = @active_battler.current_action.target_index
  998.    target = $game_party.smooth_target_actor(index)
  999.    # 设置对像侧战斗者
  1000.    set_target_battlers(@item.scope)
  1001.    # 应用物品效果
  1002.    for target in @target_battlers
  1003.      target.item_effect(@item)
  1004.    end
  1005. end
  1006.   

  1007. #==============================================================================
  1008. # here again.... snipplet from RPG's scrîpt
  1009. #==============================================================================


  1010. # this one here is for the winning pose... #这一个是为了胜利的姿态…
  1011. # if you happen to use my old costum level scrîpt then you need to add the
  1012. # 如果你碰巧用了我的老版本的脚本
  1013. # marked line to you "def start_phase5" in  "Scene_Battle 2" and delete this one...
  1014. # 那么你需要添加在 "Scene_Battle 2"中标记"def start_phase5"并删除注释有“=*****=”的这一行…
  1015. # the ->  =*****=
  1016. # marks the end where you need to delete... #标记需要删除的结尾和“{=====} ”
  1017. # and -> {=====}
  1018. # marks the line you need to copy and paste in the other one...
  1019. # 标记需要复制并粘贴到另一行的行…#你需要在同一个位置添加它…
  1020. # you need to add it at the same position...

  1021. def start_phase5
  1022.    @phase = 5
  1023.    $game_system.me_play($game_system.battle_end_me)
  1024.    $game_system.bgm_play($game_temp.map_bgm)
  1025.    exp = 0
  1026.    gold = 0
  1027.    treasures = []
  1028.    for enemy in $game_troop.enemies
  1029.      unless enemy.hidden
  1030.        exp += enemy.exp
  1031.        gold += enemy.gold
  1032.        if rand(100) < enemy.treasure_prob
  1033.          if enemy.item_id > 0
  1034.            treasures.push($data_items[enemy.item_id])
  1035.          end
  1036.          if enemy.weapon_id > 0
  1037.            treasures.push($data_weapons[enemy.weapon_id])
  1038.          end
  1039.          if enemy.armor_id > 0
  1040.            treasures.push($data_armors[enemy.armor_id])
  1041.          end
  1042.        end
  1043.      end
  1044.    end
  1045.    treasures = treasures[0..5]
  1046.    for i in 0...$game_party.actors.size
  1047.      actor = $game_party.actors[i]
  1048.      @spriteset.actor_sprites[i].pose(7) unless actor.dead? # {=====}
  1049.      if actor.cant_get_exp? == false
  1050.        last_level = actor.level
  1051.        actor.exp += exp
  1052.        if actor.level > last_level
  1053.          @status_window.level_up(i)
  1054.        end
  1055.      end
  1056.    end
  1057.    $game_party.gain_gold(gold)
  1058.    for item in treasures
  1059.      case item
  1060.      when RPG::Item
  1061.        $game_party.gain_item(item.id, 1)
  1062.      when RPG::Weapon
  1063.        $game_party.gain_weapon(item.id, 1)
  1064.      when RPG::Armor
  1065.        $game_party.gain_armor(item.id, 1)
  1066.      end
  1067.    end
  1068.    @result_window = Window_BattleResult.new(exp, gold, treasures)
  1069.    @phase5_wait_count = 100
  1070. end
  1071. #   =*****=


  1072. #--------------------------------------------------------------------------
  1073. # updating the movement 更新运动
  1074. # since RPG isnt used to comments... i'll comment it again...
  1075. # 因为RPG不用于注释…我再评论一下…
  1076. #--------------------------------------------------------------------------
  1077. def update_phase4_step3  #行动方动画
  1078.    if @active_battler.current_action.kind == 0 and
  1079.       @active_battler.current_action.basic == 0
  1080.       # in this one... we have our weapon animations... for player and monster
  1081.       # 在这里…我们有我们的武器动画…对于玩家和怪物
  1082.       if @active_battler.is_a?(Game_Actor)
  1083.        @spriteset.actor_sprites[@active_battler.index].pose(@weapon_sprite)
  1084.      elsif @active_battler.is_a?(Game_Enemy)
  1085.        @spriteset.enemy_sprites[@active_battler.index].enemy_pose(@weapon_sprite_enemy)
  1086.      end
  1087.    end
  1088.    if @animation1_id == 0
  1089.      @active_battler.white_flash = true
  1090.    else
  1091.      @active_battler.animation_id = @animation1_id
  1092.      @active_battler.animation_hit = true
  1093.    end
  1094.    @phase4_step = 4
  1095. end

  1096. def update_phase4_step4 #对象方动画
  1097.    # this here is for the hit animation... 这是击打动画
  1098.    for target in @target_battlers
  1099.      if target.is_a?(Game_Actor) and !@active_battler.is_a?(Game_Actor)
  1100.        if target.guarding?
  1101.          @spriteset.actor_sprites[target.index].pose(2) #防御
  1102.        else
  1103.          @spriteset.actor_sprites[target.index].pose(3)
  1104.        end
  1105.        elsif target.is_a?(Game_Enemy) and !@active_battler.is_a?(Game_Enemy)
  1106.        if target.guarding?
  1107.          @spriteset.enemy_sprites[target.index].enemy_pose(2) #防御
  1108.        else
  1109.          @spriteset.enemy_sprites[target.index].enemy_pose(3)
  1110.        end
  1111.      end
  1112.      target.animation_id = @animation2_id
  1113.      target.animation_hit = (target.damage != "Miss")
  1114.    end
  1115.    @wait_count = 8
  1116.    @phase4_step = 5
  1117. end

  1118. def update_phase4_step5 #显示伤害
  1119.    if @active_battler.hp > 0 and @active_battler.slip_damage?
  1120.      @active_battler.slip_damage_effect
  1121.      @active_battler.damage_pop = true
  1122.    end

  1123.    @help_window.visible = false
  1124.    @status_window.refresh
  1125.    # here comes the guard animations.... 这是防御动画
  1126.    if @active_battler.is_a?(Game_Actor)
  1127.      @spriteset.actor_sprites[@active_battler.index].pose(1)
  1128.    else
  1129.      @spriteset.enemy_sprites[@active_battler.index].enemy_pose(1)
  1130.    end
  1131.    for target in @target_battlers
  1132.      if target.damage != nil
  1133.        target.damage_pop = true
  1134.        if @active_battler.is_a?(Game_Actor)
  1135.          @spriteset.actor_sprites[@active_battler.index].pose(1)
  1136.        else
  1137.          @spriteset.enemy_sprites[@active_battler.index].enemy_pose(1)
  1138.        end
  1139.      end
  1140.    end
  1141.    @phase4_step = 6
  1142. end
  1143. #--------------------------------------------------------------------------
  1144. # ● フレーム更新 (メインフェーズ ステップ 6 : リフレッシュ)
  1145. # 帧更新(主阶段6 :刷新)
  1146. #--------------------------------------------------------------------------
  1147. def update_phase4_step6
  1148.    
  1149.    # here we are asking if the player is dead and is a player or an enemy...
  1150.    # these lines are for the running back and standby animation....
  1151.    #这里我们问的是玩家是死了还是敌人…
  1152.    #这些行用于运行返回和待机动画….
  1153.    if @active_battler.is_a?(Game_Actor) and !@active_battler.dead?
  1154.      @spriteset.actor_sprites[@active_battler.index].move(@active_battler.screen_x, @active_battler.screen_y, 20)
  1155.      @spriteset.actor_sprites[@active_battler.index].pose(0)
  1156.    elsif !@active_battler.dead?
  1157.      @spriteset.enemy_sprites[@active_battler.index].move(@active_battler.screen_x, @active_battler.screen_y, 20)
  1158.      @spriteset.enemy_sprites[@active_battler.index].enemy_pose(0)
  1159.    end
  1160.    for target in @target_battlers
  1161.      if target.is_a?(Game_Actor) and !target.dead?
  1162.          @spriteset.actor_sprites[target.index].pose(1)
  1163.        elsif !target.dead?
  1164.          @spriteset.enemy_sprites[target.index].enemy_pose(1)
  1165.      end
  1166.    end
  1167.    $game_temp.forcing_battler = nil
  1168.    if @common_event_id > 0
  1169.      common_event = $data_common_events[@common_event_id]
  1170.      $game_system.battle_interpreter.setup(common_event.list, 0)
  1171.    end
  1172.    @phase4_step = 7
  1173. end

  1174. def update_phase4_step7
  1175.    
  1176.    # here we are asking if the player is dead and is a player or an enemy...
  1177.    # these lines are for the running back and standby animation....
  1178.    #这里我们问的是玩家是死了还是敌人…
  1179.    #这些行用于运行返回和待机动画….
  1180.    if @active_battler.is_a?(Game_Actor) and !@active_battler.dead?
  1181.      @spriteset.actor_sprites[@active_battler.index].pose(1)
  1182.    elsif !@active_battler.dead?
  1183.      @spriteset.enemy_sprites[@active_battler.index].enemy_pose(1)
  1184.    end

  1185.    $game_temp.forcing_battler = nil
  1186.    if @common_event_id > 0
  1187.      common_event = $data_common_events[@common_event_id]
  1188.      $game_system.battle_interpreter.setup(common_event.list, 0)
  1189.    end
  1190.    @phase4_step = 1
  1191. end
  1192.   

  1193. # this one is an extra... without this the animation whill not work correctly...
  1194. # 这个是额外的(转场动画,或称淡入淡出)…没有这个动画就不能正常工作…
  1195. def update
  1196.    if $game_system.battle_interpreter.running?
  1197.      $game_system.battle_interpreter.update
  1198.      if $game_temp.forcing_battler == nil
  1199.        unless $game_system.battle_interpreter.running?
  1200.          unless judge
  1201.            setup_battle_event
  1202.          end
  1203.        end
  1204.        if @phase != 5
  1205.          @status_window.refresh
  1206.        end
  1207.      end
  1208.    end
  1209.    $game_system.update
  1210.    $game_screen.update
  1211.    if $game_system.timer_working and $game_system.timer == 0
  1212.      $game_temp.battle_abort = true
  1213.    end
  1214.    @help_window.update
  1215.    @party_command_window.update
  1216.    @actor_command_window.update
  1217.    @status_window.update
  1218.    @message_window.update
  1219.    @spriteset.update
  1220.    if $game_temp.transition_processing
  1221.      $game_temp.transition_processing = false
  1222.      if $game_temp.transition_name == ""
  1223.        Graphics.transition(20)
  1224.      else
  1225.        Graphics.transition(40, "Graphics/Transitions/" +
  1226.          $game_temp.transition_name)
  1227.      end
  1228.    end
  1229.    if $game_temp.message_window_showing
  1230.      return
  1231.    end
  1232.    if @spriteset.effect?
  1233.      return
  1234.    end
  1235.    if $game_temp.gameover
  1236.      $scene = Scene_Gameover.new
  1237.      return
  1238.    end
  1239.    if $game_temp.to_title
  1240.      $scene = Scene_Title.new
  1241.      return
  1242.    end
  1243.    if $game_temp.battle_abort
  1244.      $game_system.bgm_play($game_temp.map_bgm)
  1245.      battle_end(1)
  1246.      return
  1247.    end
  1248.    if @wait_count > 0
  1249.      @wait_count -= 1
  1250.      return
  1251.    end

  1252.    # this one holds the battle while the player moves
  1253.    #这一个在玩家移动时保持战斗
  1254.    for actor in @spriteset.actor_sprites
  1255.      if actor.moving
  1256.        return
  1257.      end
  1258.    end
  1259.    # and this one is for the enemy...
  1260.    #这是给敌人的……
  1261.    for enemy in @spriteset.enemy_sprites
  1262.      if enemy.moving# and $game_system.animated_enemy
  1263.        return
  1264.      end
  1265.    end
  1266.    
  1267.    if $game_temp.forcing_battler == nil and
  1268.       $game_system.battle_interpreter.running?
  1269.      return
  1270.    end
  1271.    case @phase
  1272.    when 1
  1273.      update_phase1
  1274.    when 2
  1275.      update_phase2
  1276.    when 3
  1277.      update_phase3
  1278.    when 4
  1279.      update_phase4
  1280.    when 5
  1281.      update_phase5
  1282.    end
  1283. end
  1284.   

  1285. #==============================================================================
  1286. # end of the snipplet
  1287. # if you want the comments that where here just look at the scene_battle 4...
  1288. # 如果你想得到评论,在这里你只需看看scene_battle 4…
  1289. # i added some comments since RPG hasnt add any....
  1290. #==============================================================================

  1291. end

复制代码


—————————原帖子的问题—————————————
很久以前保存的了,以前觉得不用设置太多动画,它一张图4*8每行都有动作,普攻也能位移,横版效果挺省事的,文件夹里也不用1个角色/怪物就放很多图片。

但是现在发现这个脚本有这个问题:技能使用时,人物图像是位于原地不动的。

这种情况如果人物的职业是远程类的那还好,但如果是近战类职业使用技能却还站在原地,就很违和啊!!!!
本人是脚本小白,想法是有了,在脚本里搜索了move、attack、skill这种关键词了,但是读不懂……

是否有大佬能修改,让这个脚本可以根据设置,让人物在使用技能时可以有位移施展与原地施展的两种效果???


未改的超级横版战斗
  1. #==============================================================================
  2. # * Animated_Sprite                                Scripted by: SiR_VaIlHoR
  3. #                                                  Edited by: 柳柳

  4. #------------------------------------------------------------------------------
  5. #  A class for animated sprites.
  6. #==============================================================================

  7. #66RPG,超级横版战斗脚本简要说明:


  8. #默认情况下,把一张战斗图截成4列,>8行,如果感觉4列4帧的动画还不能满足要求,看

  9. #def pose(number,frame = 4),更改=4,以及相关部分。



  10. #战斗图从上到下:前进图,等待图,防御图,挨打图,普通攻击图(默认的武器),施展魔法,

  11. #倒地不行了,胜利姿势,自定义武器1,自定义武器2……


  12. #这个脚本的模型是老外编写的,其中参考了XMXS的一个方法,我添加了一些功能,去掉素材限制。


  13. #不同职业拥有的图片数可以不一样,参考工程和录像教学


  14. #==============================================================================

  15. # □ RPG::Class

  16. #==============================================================================

  17. module RPG

  18.   class Class

  19.     def name

  20.       name = @name.split(/,/)[0]

  21.       return name != nil ? name : ''

  22.     end

  23.     def name2

  24.       name = @name.split(/,/)[1]

  25.       return name != nil ? name : ''

  26.     end
  27.   end

  28.   class Weapon

  29.     def name

  30.       name = @name.split(/,/)[0]

  31.       return name != nil ? name : ''

  32.     end

  33.     def name2

  34.       name = @name.split(/,/)[1]

  35.       return name != nil ? name : ''

  36.     end   
  37.   end  

  38. end


  39. class Game_Actor

  40.   #--------------------------------------------------------------------------

  41.   # ● 更改名称

  42.   #     name : 新的名称

  43.   #--------------------------------------------------------------------------

  44.   def picturephase

  45.     name = $data_classes[class_id].name2

  46.     return name != nil ? name : "66RPG"

  47.   end

  48. end


  49. class Game_Enemy

  50.   #--------------------------------------------------------------------------

  51.   # ● 获取名称

  52.   #--------------------------------------------------------------------------

  53.   def name

  54.     name = $data_enemies[@enemy_id].name.split(/,/)[0]

  55.     return name != nil ? name : ''

  56.   end

  57.   def picturephase

  58.     name = $data_enemies[@enemy_id].name.split(/,/)[1]

  59.     return name != nil ? name : "66RPG"

  60.   end  

  61. end


  62. class Animated_Sprite < RPG::Sprite
  63. #--------------------------------------------------------------------------
  64. # - Accessible instance variables.
  65. #--------------------------------------------------------------------------
  66. attr_accessor :frames        # Number of animation frames
  67. attr_accessor :delay         # Delay time between frames (speed)
  68. attr_accessor :frame_width   # Width of each frame
  69. attr_accessor :frame_height  # Height of each frame
  70. attr_accessor :offset_x      # X coordinate of the 1st frame
  71. attr_accessor :offset_y      # Y coordinate of all frames
  72. attr_accessor :current_frame # Current animation frame
  73. attr_accessor :moving        # Is the sprite moving?

  74. #--------------------------------------------------------------------------
  75. # - Initialize an animated sprite
  76. #   viewport : Sprite viewport
  77. #--------------------------------------------------------------------------
  78. def initialize(viewport = nil)
  79.    super(viewport)
  80.    @frame_width, @frame_height = 0, 0
  81.    change    # A basic change to set initial variables
  82.    @old = Graphics.frame_count  # For the delay method
  83.    @goingup = true    # Increasing animation? (if @rm2k_mode is true)
  84.    @once = false      # Is the animation only played once?
  85.    @animated = true   # Used to stop animation when @once is true
  86. end

  87. #--------------------------------------------------------------------------
  88. # Comment by RPG
  89. #   - Change the source rect (change the animation)
  90. #   frames : Number of animation frames
  91. #   delay : Frame delay, controls animation speed
  92. #   offx : X coordinate of the 1st frame
  93. #   offy : Y coordinate of all frames
  94. #   startf : Starting frame for animation
  95. #   once : Is the animation only played once?
  96. #   rm2k_mode : Animation pattern: 1-2-3-2 if true, 1-2-3-1 if false
  97. #
  98. # Comment by cybersam
  99. #
  100. # the rm2k_mode isnt pressent anymore...
  101. # if you want that feature then use rm2k or use RPG's scrîpt...
  102. #--------------------------------------------------------------------------
  103. def change(frames = 0, delay = 0, offx = 0, offy = 0,
  104.             startf = 0, once = false)
  105.    @frames = frames
  106.    @delay = delay
  107.    @offset_x, @offset_y = offx, offy
  108.    @current_frame = startf
  109.    @once = once
  110.    x = @current_frame * @frame_width + @offset_x
  111.    self.src_rect = Rect.new(x, @offset_y, @frame_width, @frame_height)
  112.    @goingup = true
  113.    @animated = true
  114. end


  115. #--------------------------------------------------------------------------
  116. # - Update animation and movement
  117. #--------------------------------------------------------------------------
  118. def update
  119.    super
  120.    if self.bitmap != nil and delay(@delay) and @animated
  121.      x = @current_frame * @frame_width + @offset_x
  122.      self.src_rect = Rect.new(x, @offset_y, @frame_width, @frame_height)
  123.        @current_frame = (@current_frame + 1) unless @frames == 0
  124.        @animated = false if @current_frame == @frames and @once
  125.        @current_frame %= @frames
  126.    end
  127. end


  128. #--------------------------------------------------------------------------
  129. # - Move the sprite
  130. #   x : X coordinate of the destination point
  131. #   y : Y coordinate of the destination point
  132. #   speed : Speed of movement (0 = delayed, 1+ = faster)
  133. #   delay : Movement delay if speed is at 0
  134. #--------------------------------------------------------------------------
  135. def move(x, y, speed = 1, delay = 0)
  136.    @destx = x
  137.    @desty = y
  138.    @move_speed = speed
  139.    @move_delay = delay
  140.    @move_old = Graphics.frame_count
  141.    @moving = true
  142. end


  143. #--------------------------------------------------------------------------
  144. # - Move sprite to destx and desty
  145. #--------------------------------------------------------------------------
  146. def update_move
  147.    return unless @moving
  148.    movinc = @move_speed == 0 ? 1 : @move_speed
  149.    if Graphics.frame_count - @move_old > @move_delay or @move_speed != 0
  150.      self.x += movinc if self.x < @destx
  151.      self.x -= movinc if self.x > @destx
  152.      self.y += movinc if self.y < @desty
  153.      self.y -= movinc if self.y > @desty
  154.      @move_old = Graphics.frame_count
  155.    end
  156.    if @move_speed > 1  # Check if sprite can't reach that point
  157.      self.x = @destx if (@destx - self.x).abs % @move_speed != 0 and
  158.                         (@destx - self.x).abs <= @move_speed
  159.      self.y = @desty if (@desty - self.y).abs % @move_speed != 0 and
  160.                         (@desty - self.y).abs <= @move_speed
  161.    end
  162.    if self.x == @destx and self.y == @desty
  163.      @moving = false
  164.    end
  165. end


  166. #--------------------------------------------------------------------------
  167. # - Pause animation, but still updates movement
  168. #   frames : Number of frames
  169. #--------------------------------------------------------------------------
  170. def delay(frames)
  171.    update_move
  172.    if (Graphics.frame_count - @old >= frames)
  173.      @old = Graphics.frame_count
  174.      return true
  175.    end
  176.    return false
  177. end
  178. end

  179. #=============================================================================
  180. #
  181. # here we go...
  182. # this makes the scrîpt very easy to implement
  183. # just add a new scrîpt above the "Main" scrîpt
  184. # and insert this whole thing in there
  185. #
  186. # as you can see the sprite changing code is from the japanese scrîpt
  187. # so the credits for the sprite changin goes to them....
  188. # i edit it a little so it can show more sprites and sprite animations
  189. # and added some other stuff... the next things are player movement...
  190. #
  191. #
  192. #
  193. # i got the battler changing scrîpt in this scrîpt...
  194. # the credits for this goes to the guy who made this...
  195. #
  196. # ▼▲▼ XRXS11. 戦闘・バトラーモーション ver.0 ▼▲▼
  197. #
  198. # since this isnt used anymore... it isnt need for credit anymore...
  199. # but i'll let it here since it helped me a lot...
  200. #
  201. #
  202. # as for the ideas... missy provided me with really good ideas
  203. # that helped me alot when i didnt find a way to some of these features...
  204. #
  205. # here one more Credit to place...
  206. # its RPG's scrîpt...
  207. # not the whole thing here...
  208. # but some snipplet you'll know witch one when read the comments
  209. #
  210. #
  211. # if you want some more explaines about this scrîpt...
  212. # the most stuff are commented... but if you still have questions or
  213. # sugestions then you can contact me
  214. #
  215. # how or where you can contact me...
  216. # at the http://www.rmxp.net forum via pm, email: cybersam@club-anime.de
  217. # or via AIM: cych4n or ICQ: 73130840
  218. #
  219. # remember this is still in testing phase...
  220. # and i'm trying to work on some other additions... like character movements...
  221. # but that wont be added now... couse i need to figure it out first...
  222. #
  223. #
  224. #
  225. # oh hehe.... before i forget...
  226. # sorry for the bad english... ^-^''''
  227. #
  228. #
  229. #==============================================================================
  230. #
  231. # here i'm going to tell you what names you need to give for your chara
  232. # battle sprites....
  233. #
  234. # ok... here... since i'm using RPG's movement scrîpt...
  235. # there are a lot of changes...
  236. #
  237. # when you look at the scrîpt you'll find line with "pose(n)" or "enemy_pose(n)"
  238. # since i want my sprites have different sprites... i added one more option
  239. # to these...
  240. # so now if you add a number after the n (the n stands for witch sprite is used)
  241. # fo example 8... ("pose(4, 8)") this will tell the scrîpt that the 4th animation
  242. # have 8 frames...
  243. # pose is used for the player... and enemy_pose for the enemy...
  244. # there is nothing more to this...
  245. # i used my old sprite numbers... (this time in only one sprite...)
  246. #
  247. # explains about the animation sprites... (the digits)
  248. #
  249. #
  250. # 0 = move (during battle) 移动
  251. # 1 = standby 待机
  252. # 2 = defend 防御
  253. # 3 = hit (being attacked)被击中
  254. # 4 = attack 攻击
  255. # 5 = skill use 使用技能
  256. # 6 = dead 死亡
  257. # 7 = winning pose... this idea is from RPG....胜利
  258. #
  259. #
  260. # of course this is just the begining of the code...
  261. # so more animations can be implemented...
  262. # but for now this should be enough...
  263. #
  264. # alot has changed here... and now it looks like it is done...
  265. # of course the fine edit needs to be done so it looks and works great with your
  266. # game too...
  267. #
  268. #
  269. #
  270. # 1st character movement...                             done
  271. # 2nd character movement during attack...               done
  272. # 3rd character apears at the enemy while attacking...  done
  273. #
  274. # 4th enemies movement...                               done
  275. # 5th enemy movement during attack...                   done
  276. # 6th enemy apears at the enemy while attacking...      done
  277. #
  278. # 7th each weapon has its own animation...              done
  279. # 8th each skill has its own animation...               done
  280. #
  281. #
  282. #
  283. # for the ones interisted... my nex project is an Movie player
  284. # (that actualy plays avi, mpgs and such...
  285. # but dont think this will be done soon... ^-^''
  286. #
  287. # but i'll may be try something else before i begin to code that one...
  288. #==============================================================================



  289. class Game_Actor < Game_Battler


  290. # you dont have to change your game actor to let the characters schows
  291. # from the side...
  292. # this will do it for you... ^-^

  293. def screen_x
  294.    if self.index != nil
  295.       return self.index * 30 + 450
  296.      #return self.index * 30 + 430
  297.    else
  298.      return 0
  299.    end
  300. end

  301. def screen_y
  302.     return self.index * 60 + 150
  303.    #return self.index * 40 + 150
  304. end


  305. def screen_z
  306.    if self.index != nil
  307.      return self.index
  308.    else
  309.      return 0
  310.    end
  311. end
  312. end


  313. # RPG's snipplet...
  314. class Spriteset_Battle
  315. attr_accessor :actor_sprites
  316. attr_accessor :enemy_sprites




  317. alias original_initialize initialize
  318. def initialize
  319.    #@start_party_number = $game_party.actors.size
  320.    # ビューポートを作成
  321.    @viewport0 = Viewport.new(0, 0, 640, 480)
  322.    @viewport1 = Viewport.new(0, 0, 640, 480)
  323.    @viewport2 = Viewport.new(0, 0, 640, 480)
  324.    @viewport3 = Viewport.new(0, 0, 640, 480)
  325.    @viewport4 = Viewport.new(0, 0, 640, 480)
  326.    @viewport1.z = 50
  327.    @viewport2.z = 50
  328.    @viewport3.z = 200
  329.    @viewport4.z = 5000

  330.    @battleback_sprite = Sprite.new(@viewport0)

  331.    @enemy_sprites = []
  332.    for enemy in $game_troop.enemies #.reverse
  333.      @enemy_sprites.push(Sprite_Battler.new(@viewport1, enemy))
  334.    end

  335.    @actor_sprites = []
  336.    @actor_sprites.push(Sprite_Battler.new(@viewport2,$game_party.actors[0]))
  337.    @actor_sprites.push(Sprite_Battler.new(@viewport2,$game_party.actors[1]))
  338.    @actor_sprites.push(Sprite_Battler.new(@viewport2,$game_party.actors[2]))
  339.    @actor_sprites.push(Sprite_Battler.new(@viewport2,$game_party.actors[3]))

  340.    @weather = RPG::Weather.new(@viewport1)
  341.    @picture_sprites = []
  342.    for i in 51..100
  343.      @picture_sprites.push(Sprite_Picture.new(@viewport3,
  344.        $game_screen.pictures[i]))
  345.    end
  346.    @timer_sprite = Sprite_Timer.new
  347.    update
  348. end






  349. alias original_update update
  350. def update
  351.    @viewport1.z = 50 and @viewport2.z = 51 if $actor_on_top == true
  352.    @viewport1.z = 51 and @viewport2.z = 50 if $actor_on_top == false
  353.     # 刷新角色的活动块 (对应角色的替换)

  354.     @actor_sprites[0].battler = $game_party.actors[0]

  355.     @actor_sprites[1].battler = $game_party.actors[1]

  356.     @actor_sprites[2].battler = $game_party.actors[2]

  357.     @actor_sprites[3].battler = $game_party.actors[3]

  358.     # 战斗背景的文件名与现在情况有差异的情况下

  359.     if @battleback_name != $game_temp.battleback_name

  360.       @battleback_name = $game_temp.battleback_name

  361.       if @battleback_sprite.bitmap != nil

  362.         @battleback_sprite.bitmap.dispose

  363.       end

  364.       @battleback_sprite.bitmap = RPG::Cache.battleback(@battleback_name)

  365.       @battleback_sprite.src_rect.set(0, 0, 640, 480)

  366.     end

  367.     # 刷新战斗者的活动块

  368.     for sprite in @enemy_sprites + @actor_sprites

  369.       sprite.update

  370.     end

  371.     # 刷新天气图形

  372.     @weather.type = $game_screen.weather_type

  373.     @weather.max = $game_screen.weather_max

  374.     @weather.update

  375.     # 刷新图片活动块

  376.     for sprite in @picture_sprites

  377.       sprite.update

  378.     end

  379.     # 刷新计时器活动块

  380.     @timer_sprite.update

  381.     # 设置画面的色调与震动位置

  382.     @viewport1.tone = $game_screen.tone

  383.     @viewport1.ox = $game_screen.shake

  384.     # 设置画面的闪烁色

  385.     @viewport4.color = $game_screen.flash_color

  386.     # 刷新显示端口

  387.     @viewport1.update

  388.     @viewport2.update

  389.     @viewport4.update

  390. end
  391. end
  392. # end

  393. #==============================================================================
  394. # Sprite Battler for the Costum Battle System
  395. #==============================================================================
  396. # here we are making some animations and stuff...
  397. # i know its not the best way...
  398. # but this is the first working way that i found....
  399. # this needs propper understanding how the animation works...
  400. # if you want to change some stuff...
  401. # in this i'll not explain much couse its realy easy if you know what you do
  402. # otherwise it will take you time to understand it, but i think the one who
  403. # is trying to edit this will know what he/she do... ^-^
  404. #
  405. #
  406. #
  407. # here i'll completely replace the "Sprite_Battler" class...
  408. # so if you've changed something in there you need to change it here as well
  409. # (i think... i didnt tested it... so its up to you)
  410. # i'll mark the stuff i added just with --> #
  411. # something that need to be explained have a comment...
  412. # but its not all commented...
  413. # so if you dont know what it means or you just want to know why it is there and
  414. # what it does then you need to contact me or anyone who understand this... ^-^
  415. # how you can contact me see above... at the top of this scrîpt...


  416. class Sprite_Battler < Animated_Sprite

  417. attr_accessor :battler
  418. attr_reader   :index
  419. attr_accessor :target_index
  420. attr_accessor :frame_width



  421. def initialize(viewport, battler = nil)
  422.    super(viewport)
  423.    @battler = battler
  424.    @pattern_b = 0 #
  425.    @counter_b = 0 #
  426.    @index = 0     #
  427.    if @battler != nil

  428.      tempbitmap = RPG::Cache.battler(@battler.battler_name, @battler.battler_hue)

  429.      @frame_width = tempbitmap.width/4

  430.      picturephase = @battler.picturephase

  431.      if picturephase == "66RPG"

  432.        @frame_height = tempbitmap.height/8

  433.      else

  434.        @frame_height = tempbitmap.height/8.to_i

  435.      end     

  436.    else

  437.      @frame_width, @frame_height = 1,1

  438.    end   

  439.    # start sprite
  440.    @battler.is_a?(Game_Enemy) ? enemy_pose(1) : pose(1)
  441.    @battler_visible = false
  442.    if $target_index == nil
  443.      $target_index = 0
  444.    end
  445. end


  446. def index=(index) #
  447.    @index = index  #
  448.    update          #
  449. end               #


  450. def dispose
  451.    if self.bitmap != nil
  452.      self.bitmap.dispose
  453.    end
  454.    super
  455. end


  456. def enemy                                             #
  457.    $target_index += $game_troop.enemies.size
  458.    $target_index %= $game_troop.enemies.size
  459.    return $game_troop.enemies[$target_index]           #
  460. end                                                   #


  461. def actor                                             #
  462.    $target_index += $game_party.actors.size
  463.    $target_index %= $game_party.actors.size
  464.    return $game_party.actors[$target_index]            #
  465. end            


  466. #==============================================================================
  467. # here is a snipplet from RPG's scrîpt...
  468. # i changed only to lines from this...
  469. #
  470. # here you can add more sprite poses... if you have more... ^-^
  471. #==============================================================================
  472. def pose(number, frames = 4)
  473.     case number
  474.     when 0  # run
  475.     change(frames, 5, 0, 0, 0)
  476.     when 1  # standby
  477.     change(frames, 5, 0, @frame_height)
  478.     when 2 # defend
  479.     change(frames, 5, 0, @frame_height * 2)
  480.     when 3 # Hurt, loops
  481.     change(frames, 5, 0, @frame_height * 3)
  482.     when 4 # attack no loop
  483.     change(frames, 5, 0, @frame_height * 4, 0, true)
  484.     when 5 # skill
  485.     change(frames, 5, 0, @frame_height * 5)
  486.     when 6 # death
  487.     change(frames, 5, 0, @frame_height * 6)
  488.     when 7 # winning pose
  489.     change(frames, 5, 0, @frame_height * 7)
  490.     when 8 # no sprite
  491.     change(frames, 5, 0, @frame_height * 8)
  492.     when 9 # no sprite
  493.     change(frames, 5, 0, @frame_height * 9)

  494.     when 10 # no sprite
  495.     change(frames, 5, 0, @frame_height * 10)
  496.     when 11 # no sprite
  497.     change(frames, 5, 0, @frame_height * 11)

  498.     when 12 # no sprite
  499.     change(frames, 5, 0, @frame_height * 12)
  500.     when 13 # no sprite
  501.     change(frames, 5, 0, @frame_height * 13)

  502.     when 14 # no sprite
  503.     change(frames, 5, 0, @frame_height * 14)
  504.     when 15 # no sprite
  505.     change(frames, 5, 0, @frame_height * 15)

  506.     when 16 # no sprite
  507.     change(frames, 5, 0, @frame_height * 16)

  508.     when 17 # no sprite
  509.     change(frames, 5, 0, @frame_height * 17)

  510.     when 18 # no sprite
  511.     change(frames, 5, 0, @frame_height * 18)

  512.     when 19 # no sprite
  513.     change(frames, 5, 0, @frame_height * 19)

  514.     when 20 # no sprite
  515.     change(frames, 5, 0, @frame_height * 20)

  516.     # ...etc.
  517.    else
  518.      change(frames, 5, 0, @frame_height * number, 0)
  519.    end
  520. end


  521. #--------------------------------------------------------------------------
  522. # - Change the battle pose for an enemy
  523. #   number : pose' number
  524. #--------------------------------------------------------------------------
  525. def enemy_pose(number ,enemy_frames = 4)
  526.    case number
  527.    when 0  # run
  528.      change(enemy_frames, 5, 0, 0, 0)
  529.    when 1  # standby
  530.      change(enemy_frames, 5, 0, @frame_height)
  531.    when 2 # defend
  532.      change(enemy_frames, 5, 0, @frame_height * 2)
  533.    when 3 # Hurt, loops
  534.      change(enemy_frames, 5, 0, @frame_height * 3)
  535.    when 4 # attack
  536.      change(enemy_frames, 5, 0, @frame_height * 4, 0, true)
  537.    when 5 # skill
  538.      change(enemy_frames, 5, 0, @frame_height * 5)
  539.    when 6 # death
  540.      change(enemy_frames, 5, 0, @frame_height * 6)
  541.    when 7 # no sprite
  542.      change(enemy_frames, 5, 0, @frame_height * 7)
  543.      # ...etc.
  544.    else
  545.      change(enemy_frames, 5, 0, @frame_height * number, 0)
  546.    end
  547. end
  548. #==============================================================================
  549. # sniplet end...
  550. #==============================================================================  





  551. def update
  552.    super

  553.    if @battler == nil                                                      

  554.      self.bitmap = nil                                                      

  555.      loop_animation(nil)                                                   
  556.      return                                                               
  557.    end                                                                     
  558.    if @battler.battler_name != @battler_name or
  559.       @battler.battler_hue != @battler_hue

  560.      @battler_name = @battler.battler_name
  561.      @battler_hue = @battler.battler_hue
  562.      self.bitmap = RPG::Cache.battler(@battler_name, @battler_hue)
  563.      @width = bitmap.width
  564.      @height = bitmap.height
  565.      self.ox = @frame_width / 2
  566.      self.oy = @frame_height

  567.      if @battler.dead? or @battler.hidden
  568.        self.opacity = 0
  569.      end
  570.      self.x =  @battler.screen_x
  571.      self.y =  @battler.screen_y
  572.      self.z = @battler.screen_z
  573.    end

  574.    if @battler.damage == nil and
  575.       @battler.state_animation_id != @state_animation_id
  576.      @state_animation_id = @battler.state_animation_id
  577.      loop_animation($data_animations[@state_animation_id])
  578.    end

  579.    if @battler.is_a?(Game_Actor) and @battler_visible
  580.      if $game_temp.battle_main_phase
  581.        self.opacity += 3 if self.opacity < 255
  582.      else
  583.        self.opacity -= 3 if self.opacity > 207
  584.      end
  585.    end

  586.    if @battler.blink
  587.      blink_on
  588.    else
  589.      blink_off
  590.    end

  591.    unless @battler_visible
  592.      if not @battler.hidden and not @battler.dead? and
  593.         (@battler.damage == nil or @battler.damage_pop)
  594.        appear
  595.        @battler_visible = true
  596.      end
  597.      if not @battler.hidden and
  598.         (@battler.damage == nil or @battler.damage_pop) and
  599.         @battler.is_a?(Game_Actor)
  600.        appear
  601.        @battler_visible = true
  602.      end
  603.    end
  604.    if @battler_visible
  605.      if @battler.hidden
  606.        $game_system.se_play($data_system.escape_se)
  607.        escape
  608.        @battler_visible = false
  609.      end
  610.      if @battler.white_flash
  611.        whiten
  612.        @battler.white_flash = false
  613.      end
  614.      if @battler.animation_id != 0
  615.        animation = $data_animations[@battler.animation_id]
  616.        animation(animation, @battler.animation_hit)
  617.        @battler.animation_id = 0
  618.      end
  619.      if @battler.damage_pop
  620.        damage(@battler.damage, @battler.critical)
  621.        @battler.damage = nil
  622.        @battler.critical = false
  623.        @battler.damage_pop = false
  624.      end
  625.      if @battler.damage == nil and @battler.dead?
  626.        if @battler.is_a?(Game_Enemy)
  627.          $game_system.se_play($data_system.enemy_collapse_se)
  628.          collapse
  629.          @battler_visible = false
  630.        else
  631.          $game_system.se_play($data_system.actor_collapse_se) unless @dead
  632.          @dead = true
  633.          pose(6)
  634.        end
  635.      else
  636.        @dead = false
  637.      end
  638.    end                                                                #
  639. end
  640. end


  641. #==============================================================================
  642. # Scene_Battle Costum  Battle System
  643. #==============================================================================

  644. class Scene_Battle




  645. def update_phase4
  646.    case @phase4_step
  647.    when 1
  648.      update_phase4_step1
  649.    when 2
  650.      update_phase4_step2
  651.    when 3
  652.      update_phase4_step3
  653.    when 4
  654.      update_phase4_step4
  655.    when 5
  656.      update_phase4_step5
  657.    when 6
  658.      update_phase4_step6
  659.    when 7
  660.      update_phase4_step7
  661.    when 8
  662.     update_phase4_step8   
  663.    end
  664. end




  665. def make_basic_action_result

  666.    if @active_battler.is_a?(Game_Actor)
  667.      $actor_on_top = true
  668.    elsif @active_battler.is_a?(Game_Enemy)
  669.      $actor_on_top = false
  670.    end

  671.    if @active_battler.current_action.basic == 0
  672. #============================================================================
  673. # WEAPONS START...
  674. #============================================================================
  675. #
  676. #================================= Different Weapons with different animations
  677. #
  678. # this is quite simple as you can see...
  679. # if you want to add a weapon to the animation list then look at the scrîpt below...
  680. # and i hope you'll find out how this works...
  681. #
  682. #
  683. # if not...
  684. # here is the way...
  685. # first thing...
  686. # just copy and paste "elseif @active_battler_enemy.weapon_id == ID..."
  687. # just after the last @weapon_sprite....
  688. #
  689. # here the ID is you need to look in you game databse the number that stands before
  690. # your weapon name is the ID you need to input here...
  691. #
  692. # same thing goes for the monster party... ^-^
  693. # monster normaly dont need more sprites for weapons....
  694. #
  695. # if you want to use more... then replace the "@weapon_sprite_enemy = 4"
  696. # with these lines... (but you need to edit them)
  697. #
  698. #        if @active_battler.weapon_id == 1 # <--  weapon ID number
  699. #          @weapon_sprite_enemy = 4 # <-- battle animation
  700. #        elsif @active_battler.weapon_id == 5 # <-- weapon ID number
  701. #          @weapon_sprite_enemy = 2 # <-- battle animation
  702. #        elsif @active_battler.weapon_id == 9 # <-- weapon ID number
  703. #          @weapon_sprite_enemy = 0 # <-- battle animation
  704. #        elsif @active_battler.weapon_id == 13 # <-- weapon ID number
  705. #          @weapon_sprite_enemy = 6 # <-- battle animation
  706. #        else
  707. #          @weapon_sprite_enemy = 4
  708. #        end
  709. #
  710. #================================= END

  711.      if @active_battler.is_a?(Game_Actor)
  712.        if $data_weapons[@active_battler.weapon_id] == nil

  713.          @weapon_sprite = 4
  714.        else

  715.          if $data_weapons[@active_battler.weapon_id].name2 == nil or

  716.            $data_weapons[@active_battler.weapon_id].name2 == ""
  717.            @weapon_sprite = 4
  718.          else
  719.            @weapon_sprite = $data_weapons[@active_battler.weapon_id].name2.to_i

  720.          end
  721.        end



  722. # monster section is here... ^-^

  723.      else # @active_battler.is_a?(Game_Enemy)
  724.          @weapon_sprite_enemy = 4
  725.      end


  726. #
  727. #=============================================================================
  728. # WEAPONS END....
  729. #=============================================================================




  730.      @animation1_id = @active_battler.animation1_id
  731.      @animation2_id = @active_battler.animation2_id
  732.      if @active_battler.is_a?(Game_Enemy)
  733.        if @active_battler.restriction == 3
  734.          target = $game_troop.random_target_enemy
  735.        elsif @active_battler.restriction == 2
  736.          target = $game_party.random_target_actor
  737.        else
  738.          index = @active_battler.current_action.target_index
  739.          target = $game_party.smooth_target_actor(index)
  740.        end
  741. #======== here is the setting for the movement & animation...
  742.          x = target.screen_x - RPG::Cache.battler(@active_battler.battler_name, @active_battler.battler_hue).width/6

  743.          @spriteset.enemy_sprites[@active_battler.index].enemy_pose(0)
  744.          @spriteset.enemy_sprites[@active_battler.index].move(x, target.screen_y, 10)
  745. #========= here if you look at the RPG's movement settings you'll see
  746. #========= that he takes the number 40 for the speed of the animation...
  747. #========= i thing thats too fast so i settet it down to 10 so looks smoother...
  748.      end
  749.      if @active_battler.is_a?(Game_Actor)
  750.        if @active_battler.restriction == 3
  751.          target = $game_party.random_target_actor
  752.        elsif @active_battler.restriction == 2
  753.          target = $game_troop.random_target_enemy
  754.        else
  755.          index = @active_battler.current_action.target_index
  756.          target = $game_troop.smooth_target_enemy(index)
  757.        end
  758. #======= the same thing for the player... ^-^
  759.        x = target.screen_x + RPG::Cache.battler(@active_battler.battler_name, @active_battler.battler_hue).width/8
  760.        @spriteset.actor_sprites[@active_battler.index].pose(0)
  761.        @spriteset.actor_sprites[@active_battler.index].move(x, target.screen_y, 10)
  762.      end
  763.      @target_battlers = [target]
  764.      for target in @target_battlers
  765.        target.attack_effect(@active_battler)
  766.      end
  767.      return
  768.    end
  769.    if @active_battler.current_action.basic == 1
  770.      if @active_battler.is_a?(Game_Actor)
  771.        @spriteset.actor_sprites[@active_battler.index].pose(2) #defence
  772.      else
  773.        @spriteset.enemy_sprites[@active_battler.index].enemy_pose(2) #defence
  774.      end
  775.      @help_window.set_text($data_system.words.guard, 1)
  776.      return
  777.    end
  778.    if @active_battler.is_a?(Game_Enemy) and
  779.       @active_battler.current_action.basic == 2
  780.      @help_window.set_text("逃走", 1)
  781.      @active_battler.escape
  782.      return
  783.    end
  784.    if @active_battler.current_action.basic == 3
  785.      $game_temp.forcing_battler = nil
  786.      @phase4_step = 1
  787.      return
  788.    end

  789.    if @active_battler.current_action.basic == 4
  790.      if $game_temp.battle_can_escape == false
  791.        $game_system.se_play($data_system.buzzer_se)
  792.        return
  793.      end
  794.      $game_system.se_play($data_system.decision_se)
  795.      update_phase2_escape
  796.      return
  797.    end
  798. end
  799. #--------------------------------------------------------------------------
  800. # skill aktion...
  801. #--------------------------------------------------------------------------
  802. def make_skill_action_result
  803.    @skill = $data_skills[@active_battler.current_action.skill_id]
  804.    unless @active_battler.current_action.forcing
  805.      unless @active_battler.skill_can_use?(@skill.id)
  806.        $game_temp.forcing_battler = nil
  807.        @phase4_step = 1
  808.        return
  809.      end
  810.    end
  811.    @active_battler.sp -= @skill.sp_cost
  812.    @status_window.refresh
  813.    @help_window.set_text(@skill.name, 1)

  814. #=============================================================================
  815. # SKILL SPRITES START
  816. #=============================================================================
  817. # this one is the same as the one for the weapons...
  818. # for the one who have this for the first time
  819. # look at the scrîpt i hope it is easy to understand...
  820. #
  821. # the other one that have the earlier versions of this scrîpt they dont need explenation
  822. # ... i think....
  823. # the think that changed is the line where the animation ID is given to the sprite...
  824. # the number after the "pose" is the animation ID... it goes for every other animation as well..
  825. # if you have an animation for a skill that have more frames...
  826. # then just insert the number of frames after the first number...
  827. # so it looks like this.... "pose(5, 8)" <-- 5 is the animation...
  828. # 8 is the max frame (that means your animation have 8 frames...) ^-^

  829.    if @active_battler.is_a?(Game_Actor)
  830.      if @skill.name != "one of the skills" # <--skill doesn't exist => all the skills have the skill animation!
  831.        @spriteset.actor_sprites[@active_battler.index].pose(5) # <-- sprite number
  832.      end
  833.    else
  834.      if @skill.name != "one of the skills" # <-- first skill name
  835.        @spriteset.enemy_sprites[@active_battler.index].enemy_pose(5) # <-- sprite number
  836.      end
  837.    end
  838. #=============================================================================
  839. # SKILL SPRITES END
  840. #=============================================================================

  841.    @animation1_id = @skill.animation1_id
  842.    @animation2_id = @skill.animation2_id
  843.    @common_event_id = @skill.common_event_id
  844.    set_target_battlers(@skill.scope)
  845.    for target in @target_battlers
  846.      target.skill_effect(@active_battler, @skill)
  847.    end
  848. end
  849. #--------------------------------------------------------------------------
  850. # how here we make the item use aktions
  851. #--------------------------------------------------------------------------
  852. def make_item_action_result
  853.    # sorry i didnt work on this...
  854.    # couse i dont have a sprite that uses items....
  855.    # so i just added the standby sprite here...
  856.    # when i get more time for this i'll try what i can do for this one... ^-^
  857.    # its the same as the ones above...
  858.    if @active_battler.is_a?(Game_Actor)
  859.      @spriteset.actor_sprites[@active_battler.index].pose(1)
  860.    else
  861.      @spriteset.enemy_sprites[@active_battler.index].enemy_pose(1)
  862.    end

  863.    @item = $data_items[@active_battler.current_action.item_id]
  864.    unless $game_party.item_can_use?(@item.id)
  865.      @phase4_step = 1
  866.      return
  867.    end
  868.    if @item.consumable
  869.      $game_party.lose_item(@item.id, 1)
  870.    end
  871.    @help_window.set_text(@item.name, 1)
  872.    @animation1_id = @item.animation1_id
  873.    @animation2_id = @item.animation2_id
  874.    @common_event_id = @item.common_event_id
  875.    index = @active_battler.current_action.target_index
  876.    target = $game_party.smooth_target_actor(index)
  877.    set_target_battlers(@item.scope)
  878.    for target in @target_battlers
  879.      target.item_effect(@item)
  880.    end
  881. end


  882. #==============================================================================
  883. # here again.... snipplet from RPG's scrîpt
  884. #==============================================================================


  885. # this one here is for the winning pose...
  886. # if you happen to use my old costum level scrîpt then you need to add the
  887. # marked line to you "def start_phase5" in  "Scene_Battle 2" and delete this one...
  888. # the ->  =*****=
  889. # marks the end where you need to delete...
  890. # and -> {=====}
  891. # marks the line you need to copy and paste in the other one...
  892. # you need to add it at the same position...

  893. def start_phase5
  894.    @phase = 5
  895.    $game_system.me_play($game_system.battle_end_me)
  896.    $game_system.bgm_play($game_temp.map_bgm)
  897.    exp = 0
  898.    gold = 0
  899.    treasures = []
  900.    for enemy in $game_troop.enemies
  901.      unless enemy.hidden
  902.        exp += enemy.exp
  903.        gold += enemy.gold
  904.        if rand(100) < enemy.treasure_prob
  905.          if enemy.item_id > 0
  906.            treasures.push($data_items[enemy.item_id])
  907.          end
  908.          if enemy.weapon_id > 0
  909.            treasures.push($data_weapons[enemy.weapon_id])
  910.          end
  911.          if enemy.armor_id > 0
  912.            treasures.push($data_armors[enemy.armor_id])
  913.          end
  914.        end
  915.      end
  916.    end
  917.    treasures = treasures[0..5]
  918.    for i in 0...$game_party.actors.size
  919.      actor = $game_party.actors[i]
  920.      @spriteset.actor_sprites[i].pose(7) unless actor.dead? # {=====}
  921.      if actor.cant_get_exp? == false
  922.        last_level = actor.level
  923.        actor.exp += exp
  924.        if actor.level > last_level
  925.          @status_window.level_up(i)
  926.        end
  927.      end
  928.    end
  929.    $game_party.gain_gold(gold)
  930.    for item in treasures
  931.      case item
  932.      when RPG::Item
  933.        $game_party.gain_item(item.id, 1)
  934.      when RPG::Weapon
  935.        $game_party.gain_weapon(item.id, 1)
  936.      when RPG::Armor
  937.        $game_party.gain_armor(item.id, 1)
  938.      end
  939.    end
  940.    @result_window = Window_BattleResult.new(exp, gold, treasures)
  941.    @phase5_wait_count = 100
  942. end
  943. #   =*****=
  944. #--------------------------------------------------------------------------
  945. # updating the movement
  946. # since RPG isnt used to comments... i'll comment it again...
  947. #--------------------------------------------------------------------------
  948. def update_phase4_step3
  949.    if @active_battler.current_action.kind == 0 and
  950.       @active_battler.current_action.basic == 0
  951.       # in this one... we have our weapon animations... for player and monster
  952.      if @active_battler.is_a?(Game_Actor)
  953.        @spriteset.actor_sprites[@active_battler.index].pose(@weapon_sprite)
  954.      elsif @active_battler.is_a?(Game_Enemy)
  955.        @spriteset.enemy_sprites[@active_battler.index].enemy_pose(@weapon_sprite_enemy)
  956.      end
  957.    end
  958.    if @animation1_id == 0
  959.      @active_battler.white_flash = true
  960.    else
  961.      @active_battler.animation_id = @animation1_id
  962.      @active_battler.animation_hit = true
  963.    end
  964.    @phase4_step = 4
  965. end

  966. def update_phase4_step4
  967.    # this here is for the hit animation...
  968.    for target in @target_battlers
  969.      if target.is_a?(Game_Actor) and !@active_battler.is_a?(Game_Actor)
  970.        if target.guarding?
  971.          @spriteset.actor_sprites[target.index].pose(2)
  972.        else
  973.          @spriteset.actor_sprites[target.index].pose(3)
  974.        end
  975.        elsif target.is_a?(Game_Enemy) and !@active_battler.is_a?(Game_Enemy)
  976.        if target.guarding?
  977.          @spriteset.enemy_sprites[target.index].enemy_pose(2)
  978.        else
  979.          @spriteset.enemy_sprites[target.index].enemy_pose(3)
  980.        end
  981.      end
  982.      target.animation_id = @animation2_id
  983.      target.animation_hit = (target.damage != "Miss")
  984.    end
  985.    @wait_count = 8
  986.    @phase4_step = 5
  987. end

  988. def update_phase4_step5
  989.    if @active_battler.hp > 0 and @active_battler.slip_damage?
  990.      @active_battler.slip_damage_effect
  991.      @active_battler.damage_pop = true
  992.    end

  993.    @help_window.visible = false
  994.    @status_window.refresh
  995.    # here comes the guard animations....
  996.    if @active_battler.is_a?(Game_Actor)
  997.      @spriteset.actor_sprites[@active_battler.index].pose(1)
  998.    else
  999.      @spriteset.enemy_sprites[@active_battler.index].enemy_pose(1)
  1000.    end
  1001.    for target in @target_battlers
  1002.      if target.damage != nil
  1003.        target.damage_pop = true
  1004.        if @active_battler.is_a?(Game_Actor)
  1005.          @spriteset.actor_sprites[@active_battler.index].pose(1)
  1006.        else
  1007.          @spriteset.enemy_sprites[@active_battler.index].enemy_pose(1)
  1008.        end
  1009.      end
  1010.    end
  1011.    @phase4_step = 6
  1012. end
  1013. #--------------------------------------------------------------------------
  1014. # ● フレーム更新 (メインフェーズ ステップ 6 : リフレッシュ)
  1015. #--------------------------------------------------------------------------
  1016. def update_phase4_step6

  1017.    # here we are asking if the player is dead and is a player or an enemy...
  1018.    # these lines are for the running back and standby animation....
  1019.    if @active_battler.is_a?(Game_Actor) and !@active_battler.dead?
  1020.      @spriteset.actor_sprites[@active_battler.index].move(@active_battler.screen_x, @active_battler.screen_y, 20)
  1021.      @spriteset.actor_sprites[@active_battler.index].pose(0)
  1022.    elsif !@active_battler.dead?
  1023.      @spriteset.enemy_sprites[@active_battler.index].move(@active_battler.screen_x, @active_battler.screen_y, 20)
  1024.      @spriteset.enemy_sprites[@active_battler.index].enemy_pose(0)
  1025.    end
  1026.    for target in @target_battlers
  1027.      if target.is_a?(Game_Actor) and !target.dead?
  1028.          @spriteset.actor_sprites[target.index].pose(1)
  1029.        elsif !target.dead?
  1030.          @spriteset.enemy_sprites[target.index].enemy_pose(1)
  1031.      end
  1032.    end
  1033.    $game_temp.forcing_battler = nil
  1034.    if @common_event_id > 0
  1035.      common_event = $data_common_events[@common_event_id]
  1036.      $game_system.battle_interpreter.setup(common_event.list, 0)
  1037.    end
  1038.    @phase4_step = 7
  1039. end

  1040. def update_phase4_step7

  1041.    # here we are asking if the player is dead and is a player or an enemy...
  1042.    # these lines are for the running back and standby animation....
  1043.    if @active_battler.is_a?(Game_Actor) and !@active_battler.dead?
  1044.      @spriteset.actor_sprites[@active_battler.index].pose(1)
  1045.    elsif !@active_battler.dead?
  1046.      @spriteset.enemy_sprites[@active_battler.index].enemy_pose(1)
  1047.    end

  1048.    $game_temp.forcing_battler = nil
  1049.    if @common_event_id > 0
  1050.      common_event = $data_common_events[@common_event_id]
  1051.      $game_system.battle_interpreter.setup(common_event.list, 0)
  1052.    end
  1053.    @phase4_step = 1
  1054. end


  1055. # this one is an extra... without this the animation whill not work correctly...

  1056. def update
  1057.    if $game_system.battle_interpreter.running?
  1058.      $game_system.battle_interpreter.update
  1059.      if $game_temp.forcing_battler == nil
  1060.        unless $game_system.battle_interpreter.running?
  1061.          unless judge
  1062.            setup_battle_event
  1063.          end
  1064.        end
  1065.        if @phase != 5
  1066.          @status_window.refresh
  1067.        end
  1068.      end
  1069.    end
  1070.    $game_system.update
  1071.    $game_screen.update
  1072.    if $game_system.timer_working and $game_system.timer == 0
  1073.      $game_temp.battle_abort = true
  1074.    end
  1075.    @help_window.update
  1076.    @party_command_window.update
  1077.    @actor_command_window.update
  1078.    @status_window.update
  1079.    @message_window.update
  1080.    @spriteset.update
  1081.    if $game_temp.transition_processing
  1082.      $game_temp.transition_processing = false
  1083.      if $game_temp.transition_name == ""
  1084.        Graphics.transition(20)
  1085.      else
  1086.        Graphics.transition(40, "Graphics/Transitions/" +
  1087.          $game_temp.transition_name)
  1088.      end
  1089.    end
  1090.    if $game_temp.message_window_showing
  1091.      return
  1092.    end
  1093.    if @spriteset.effect?
  1094.      return
  1095.    end
  1096.    if $game_temp.gameover
  1097.      $scene = Scene_Gameover.new
  1098.      return
  1099.    end
  1100.    if $game_temp.to_title
  1101.      $scene = Scene_Title.new
  1102.      return
  1103.    end
  1104.    if $game_temp.battle_abort
  1105.      $game_system.bgm_play($game_temp.map_bgm)
  1106.      battle_end(1)
  1107.      return
  1108.    end
  1109.    if @wait_count > 0
  1110.      @wait_count -= 1
  1111.      return
  1112.    end

  1113.    # this one holds the battle while the player moves
  1114.    for actor in @spriteset.actor_sprites
  1115.      if actor.moving
  1116.        return
  1117.      end
  1118.    end
  1119.    # and this one is for the enemy...
  1120.    for enemy in @spriteset.enemy_sprites
  1121.      if enemy.moving# and $game_system.animated_enemy
  1122.        return
  1123.      end
  1124.    end

  1125.    if $game_temp.forcing_battler == nil and
  1126.       $game_system.battle_interpreter.running?
  1127.      return
  1128.    end
  1129.    case @phase
  1130.    when 1
  1131.      update_phase1
  1132.    when 2
  1133.      update_phase2
  1134.    when 3
  1135.      update_phase3
  1136.    when 4
  1137.      update_phase4
  1138.    when 5
  1139.      update_phase5
  1140.    end
  1141. end


  1142. #==============================================================================
  1143. # end of the snipplet
  1144. # if you want the comments that where here just look at the scene_battle 4...
  1145. # i added some comments since RPG hasnt add any....
  1146. #==============================================================================
  1147. end
复制代码


现在我改了,我模仿的是武器攻击那一段,仿照之后角色施展技能是可以跑到对面敌人那边去了,但是使用类似“治疗”这种,也一样跑过去了……
技能施放有误.gif
我改的部分
  1.      @animation1_id = @active_battler.animation1_id #行动方ID
  2.      @animation2_id = @active_battler.animation2_id #对象方ID
  3. #--------------敌方施展技能的位移----------------------------     
  4.      if @active_battler.is_a?(Game_Enemy)
  5.        if @active_battler.restriction == 3 #限制为[敌人为普通攻击]的情况下
  6.          target = $game_troop.random_target_enemy
  7.        elsif @active_battler.restriction == 2 #限制为[我方为普通攻击]的情况下
  8.          target = $game_party.random_target_actor
  9.        else
  10.          index = @active_battler.current_action.target_index
  11.          target = $game_party.smooth_target_actor(index)
  12.        end
  13.       
  14.        x = target.screen_x - RPG::Cache.battler(@active_battler.battler_name, @active_battler.battler_hue).width/6
  15.        @spriteset.enemy_sprites[@active_battler.index].enemy_pose(5)
  16.        @spriteset.enemy_sprites[@active_battler.index].move(x, target.screen_y, 10)
  17.       end
  18. #--------------我方施展技能的位移----------------------------     
  19.       if @active_battler.is_a?(Game_Actor)
  20.        if @active_battler.restriction == 3 #限制为[我方为普通攻击]的情况下
  21.          target = $game_party.random_target_actor  
  22.        elsif @active_battler.restriction == 2 #限制为[敌人为普通攻击]的情况下
  23.          target = $game_troop.random_target_enemy
  24.        else
  25.           index = @active_battler.current_action.target_index
  26.           target = $game_troop.smooth_target_enemy(index)
  27.        end
  28.        x = target.screen_x + RPG::Cache.battler(@active_battler.battler_name, @active_battler.battler_hue).width/8
  29.        @spriteset.actor_sprites[@active_battler.index].pose(5)
  30.        @spriteset.actor_sprites[@active_battler.index].move(x, target.screen_y, 10)
  31.       end
  32. end
复制代码

评分

参与人数 1赞 +1 收起 理由
larbi + 1 我很赞同

查看全部评分

梦石
0
星屑
431
在线时间
43 小时
注册时间
2009-5-6
回帖
58
 楼主| 发表于 2019-8-26 19:03:35 | 显示全部楼层
过了几天也没有人回复我的帖子啊……那我只能硬着头皮尝试自己瞎改这个脚本了?
回复

使用道具 举报

梦石
0
星屑
476
在线时间
30 小时
注册时间
2019-8-23
回帖
42
发表于 2019-8-26 19:34:49 | 显示全部楼层
本帖最后由 guoxiaomi 于 2019-9-1 00:46 编辑
  1. =begin
  2. ###############################################################################

  3. 全局行走图战斗+连击美化 v1.0
  4. 本版本只经低测试,可能存在某些bug。



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

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

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

  20. 2)战斗动画(显示‘对象方的动画’之前先显示‘飞行武器射去敌人身上’的动画)
  21. 脚本821行:  回旋武器的id  (攻击时会显示一段类似回力镖的动画)
  22. 脚本823行:  弓箭武器的id  (攻击时会显示箭射去敌人身上的动画)
  23. 脚本825行:  铳类武器的id  (攻击时会显示子弹射去敌人身上的动画)
  24. 脚本838行:  回旋技能的id  (技能使用时会显示一段类似回力镖的动画)
  25. 脚本840行:  弓箭技能的id  (技能使用时会显示箭射去敌人身上的动画)
  26. 脚本842行:  铳类技能的id  (技能使用时会显示子弹射去敌人身上的动画)
  27. 脚本854行:  抛击道具的id  (使用该道具时,道具被丢到敌人身上)

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

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

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

  44.                                                            #modify by darkten
  45. =end
  46. ###############################################################################

  47. =begin

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

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

  55.                                                                   by ONEWateR
  56. =end

  57. ###############################################################################

  58. =begin

  59. 此版本更新了以下几点:
  60. 1.加入了连击效果
  61. 2.美化伤害(需把有关图片COPY到游戏\Graphics\Pictures文件夹下)

  62. 连击使用方法:
  63. 1.输入需要连击技能的ID及要显示连击动画的ID,数据库里设置的对像方动画为最后
  64.    显示的动画。
  65. 2.请自行设置 505 行的内容。

  66.                                                                   by Robert
  67. =end

  68. ###############################################################################

  69. module RPG

  70.   class Sprite < ::Sprite
  71.     def initialize(viewport = nil)
  72.       super(viewport)
  73.       @_whiten_duration = 0
  74.       @_appear_duration = 0
  75.       @_escape_duration = 0
  76.       @_collapse_duration = 0
  77.       @_damage_duration = 0
  78.       @_damagetemp_duration = 0
  79.       @_hits_duration = 0
  80.       @_animation_duration = 0
  81.       @_blink = false
  82.       @hits = 0
  83.       @hits_way = 0
  84.       @_damage = []
  85.       @_total_damage = 0
  86.       @_total_duration = 0
  87.     end
  88.     def dispose
  89.       dispose_damage
  90.       dispose_damagetemp
  91.       dispose_animation
  92.       dispose_loop_animation
  93.       dispose_hit
  94.       super
  95.     end   
  96.     # hit数的美化描绘
  97.     def hit(hits)
  98.       dispose_hit
  99.       # 转为字符串
  100.       hits_string = hits.to_s
  101.       # 初始化位图
  102.       bitmap = Bitmap.new(320, 64)
  103.       bitmap.font.name = "Arial Black"
  104.       bitmap.font.size = 32
  105.       # 分割伤害值字符串
  106.       hits_array = hits_string.scan(/./)
  107.       hits_x = 81 - hits_string.size * 18.1
  108.       rect_y = 0
  109.       # 循环伤害值字符串
  110.       for char in hits_array
  111.         number = char.to_i
  112.         # 显示伤害数字
  113.         bitmap.blt(hits_x, 0, RPG::Cache.picture("Number"),
  114.         Rect.new(number * 36.2, rect_y, 36.2, 50))
  115.         # 后移一位
  116.         hits_x += 36.2
  117.       end
  118.       bitmap.blt(hits_x, 0, RPG::Cache.picture("HITS"),
  119.       Rect.new(0, -21, 90, 50))
  120.       # 伤害值定位
  121.       @_hits_sprite = ::Sprite.new(self.viewport)
  122.       @_hits_sprite.bitmap = bitmap
  123.       @_hits_sprite.ox = 81
  124.       @_hits_sprite.oy = 20
  125.       @_hits_sprite.x = 500
  126.       @_hits_sprite.y = 100
  127.       @_hits_sprite.z = 3001
  128.       @_hits_duration = 50
  129.     end
  130.     #美化的伤害处理
  131.     def damagetemp(value, critical)
  132.       dispose_damagetemp
  133.       # 如果伤害值是数值
  134.       if value.is_a?(Numeric)
  135.         # 绝对值转为字符串
  136.         damagetemp_string = value.abs.to_s
  137.       else
  138.         # 转为字符串
  139.         damagetemp_string = value.to_s
  140.       end
  141.       # 初始化位图
  142.       bitmap = Bitmap.new(162, 64)
  143.       bitmap.font.name = ["黑体","华文行楷", "宋体"]
  144.       bitmap.font.size = 32
  145.       # 伤害值是数值的情况下
  146.       if value.is_a?(Numeric)
  147.         # 分割伤害值字符串
  148.         damagetemp_array = damagetemp_string.scan(/./)
  149.         damagetemp_x = 81 - damagetemp_string.size * 9
  150.         # 伤害值为负的情况下
  151.         if value < 0
  152.           # 调用回复数字表
  153.           rect_y = 32
  154.         else
  155.           # 调用伤害数字表
  156.           rect_y = 0
  157.         end
  158.         # 循环伤害值字符串
  159.         for char in damagetemp_array
  160.           number = char.to_i
  161.           # 显示伤害数字
  162.           bitmap.blt(damagetemp_x, 32, RPG::Cache.picture("Damage"),
  163.           Rect.new(number * 18, rect_y, 18, 32))
  164.           # 后移一位
  165.           damagetemp_x += 18
  166.         end
  167.       # 伤害值不是数值的情况
  168.       else
  169.         # 如果伤害值不是 Miss
  170.         unless value == "Miss"
  171.           # 系统默认描画字符串
  172.           bitmap.font.color.set(0, 0, 0)
  173.           bitmap.draw_text(-1, 27, 162, 36, damagetemp_string, 1)
  174.           bitmap.draw_text(+1, 27, 162, 36, damagetemp_string, 1)
  175.           bitmap.draw_text(-1, 29, 162, 36, damagetemp_string, 1)
  176.           bitmap.draw_text(+1, 29, 162, 36, damagetemp_string, 1)
  177.           bitmap.font.color.set(255, 255, 255)
  178.           bitmap.draw_text(0, 28, 162, 36, damagetemp_string, 1)
  179.         # Miss 的情况下
  180.         else
  181.           # 显示未击中图画
  182.           bitmap.blt(36, 28, RPG::Cache.picture("Damage"), Rect.new(90, 64, 90, 32))
  183.         end
  184.       end
  185.       # 会心一击标志打开的情况
  186.       if critical
  187.         # 显示会心一击图画
  188.         bitmap.blt(36, 0, RPG::Cache.picture("Damage"), Rect.new(0, 64, 90, 32))
  189.       end
  190.       # 伤害值定位
  191.       @_damagetemp_sprite = ::Sprite.new(self.viewport)
  192.       @_damagetemp_sprite.bitmap = bitmap
  193.       @_damagetemp_sprite.ox = 81
  194.       @_damagetemp_sprite.oy = 40
  195.       @_damagetemp_sprite.x = self.x
  196.       @_damagetemp_sprite.y = self.y - self.oy / 2
  197.       @_damagetemp_sprite.z = 2999
  198.       @_damagetemp_duration = 20
  199.     end
  200.     #美化的总伤害处理
  201.     def damage(value, critical)
  202.       dispose_damage
  203.       # 如果伤害值是数值
  204.       if value.is_a?(Numeric)
  205.         # 绝对值转为字符串
  206.         damage_string = value.abs.to_s
  207.       else
  208.         # 转为字符串
  209.         damage_string = value.to_s
  210.       end
  211.       # 初始化位图
  212.       bitmap = Bitmap.new(162, 64)
  213.       bitmap.font.name = "Arial Black"
  214.       bitmap.font.size = 32
  215.       # 伤害值是数值的情况下
  216.       if value.is_a?(Numeric)
  217.         # 分割伤害值字符串
  218.         damage_array = damage_string.scan(/./)
  219.         damage_x = 81 - damage_string.size * 9
  220.         # 伤害值为负的情况下
  221.         if value < 0
  222.           # 调用回复数字表
  223.           name="Number+"
  224.         else
  225.           # 调用伤害数字表
  226.           name="Number-"
  227.         end
  228.         # 循环伤害值字符串
  229.         for char in damage_array
  230.           number = char.to_i
  231.           # 显示伤害数字
  232.           bitmap.blt(damage_x, 28, RPG::Cache.picture(name),
  233.           Rect.new(number * 18, 0, 18, 32))
  234.           # 后移一位
  235.           damage_x += 18
  236.         end
  237.       # 伤害值不是数值的情况
  238.       else
  239.         # 如果伤害值不是 Miss
  240.         unless value == "Miss"
  241.           # 系统默认描画字符串
  242.           bitmap.font.color.set(0, 0, 0)
  243.           bitmap.draw_text(-1, 27, 162, 36, damage_string, 1)
  244.           bitmap.draw_text(+1, 27, 162, 36, damage_string, 1)
  245.           bitmap.draw_text(-1, 29, 162, 36, damage_string, 1)
  246.           bitmap.draw_text(+1, 29, 162, 36, damage_string, 1)
  247.           bitmap.font.color.set(255, 255, 255)
  248.           bitmap.draw_text(0, 28, 162, 36, damage_string, 1)
  249.         # Miss 的情况下
  250.         else
  251.           name = "Numbermiss"
  252.           # 显示未击中图画
  253.           bitmap.blt(36, 32, RPG::Cache.picture(name), Rect.new(0, 0, 90, 32))
  254.         end
  255.       end
  256.       # 会心一击标志打开的情况
  257.       if critical
  258.         # 显示会心一击图画
  259.         bitmap.blt(36, 0, RPG::Cache.picture("Damage"), Rect.new(0, 64, 90, 32))
  260.       end
  261.       # 伤害值定位
  262.       @_damage_sprite = ::Sprite.new(self.viewport)
  263.       @_damage_sprite.bitmap = bitmap
  264.       @_damage_sprite.ox = 81
  265.       #@_damage_sprite.oy = 20
  266.       @_damage_sprite.oy = 40
  267.       @_damage_sprite.x = self.x
  268.       @_damage_sprite.y = self.y - self.oy / 2
  269.       @_damage_sprite.z = 3000
  270.       @_damage_duration = 40
  271.     end
  272.     def dispose_hit
  273.       if @_hits_sprite != nil
  274.         @_hits_sprite.bitmap.dispose
  275.         @_hits_sprite.dispose
  276.         @_hits_sprite = nil
  277.         @_hits_duration = 0
  278.       end
  279.     end
  280.     def dispose_damagetemp
  281.       if @_damagetemp_sprite != nil
  282.         @_damagetemp_sprite.bitmap.dispose
  283.         @_damagetemp_sprite.dispose
  284.         @_damagetemp_sprite = nil
  285.         @_damagetemp_duration = 0
  286.       end
  287.     end
  288.     def effect?
  289.       @_whiten_duration > 0 or
  290.       @_appear_duration > 0 or
  291.       @_escape_duration > 0 or
  292.       @_collapse_duration > 0 or
  293.       @_damage_duration > 0 or
  294.       @_damagetemp_duration > 0 or
  295.       @_hits_duration > 0 or
  296.       @_animation_duration > 0
  297.     end
  298.     def update
  299.       super
  300.       if @_whiten_duration > 0
  301.         @_whiten_duration -= 1
  302.         self.color.alpha = 128 - (16 - @_whiten_duration) * 10
  303.       end
  304.       if @_appear_duration > 0
  305.         @_appear_duration -= 1
  306.         self.opacity = (16 - @_appear_duration) * 16
  307.       end
  308.       if @_escape_duration > 0
  309.         @_escape_duration -= 1
  310.         self.opacity = 256 - (32 - @_escape_duration) * 10
  311.       end
  312.       if @_collapse_duration > 0
  313.         @_collapse_duration -= 1
  314.         self.opacity = 256 - (48 - @_collapse_duration) * 6
  315.       end
  316.       if @_damage_duration > 0
  317.         @_damage_duration -= 1
  318.         case @_damage_duration
  319.         when 38..39
  320.           @_damage_sprite.y -= 4
  321.         when 36..37
  322.           @_damage_sprite.y -= 2
  323.         when 34..35
  324.           @_damage_sprite.y += 2
  325.         when 28..33
  326.           @_damage_sprite.y += 4
  327.         end
  328.         @_damage_sprite.opacity = 256 - (12 - @_damage_duration) * 32
  329.         if @_damage_duration == 0
  330.           dispose_damage
  331.         end
  332.       end
  333.       if @_hits_duration > 0
  334.         @_hits_duration -= 1
  335.         if @_hits_duration == 0
  336.           dispose_hit
  337.         end
  338.       end
  339.       if @_damagetemp_duration > 0
  340.         @_damagetemp_duration -= 1
  341.         case @_damagetemp_duration
  342.         when 10..19
  343.           @_damagetemp_sprite.y -= 4
  344.         when 1..9
  345.           @_damagetemp_sprite.y += 2
  346.         end
  347.         if @hits == 0
  348.           @_damagetemp_sprite.x -= 2
  349.         else
  350.           @_damagetemp_sprite.x += 2
  351.         end
  352.         @_damagetemp_sprite.opacity = 256 - (10 - @_damagetemp_duration) * 32
  353.         if @_damagetemp_duration == 0
  354.           dispose_damagetemp
  355.           case @hits
  356.           when 0
  357.             @hits = 1
  358.           when 1
  359.             @hits = 0
  360.           end
  361.         end
  362.       end
  363.       if @_animation != nil and (Graphics.frame_count % 2 == 0)
  364.         @_animation_duration -= 1
  365.         update_animation
  366.       end
  367.       if @_loop_animation != nil and (Graphics.frame_count % 2 == 0)
  368.         update_loop_animation
  369.         @_loop_animation_index += 1
  370.         @_loop_animation_index %= @_loop_animation.frame_max
  371.       end
  372.       if @_blink
  373.         @_blink_count = (@_blink_count + 1) % 32
  374.         if @_blink_count < 16
  375.           alpha = (16 - @_blink_count) * 6
  376.         else
  377.           alpha = (@_blink_count - 16) * 6
  378.         end
  379.         self.color.set(255, 255, 255, alpha)
  380.       end
  381.       @@_animations.clear
  382.     end
  383.   end
  384. end

  385. module Side_view
  386.   #--------------------------------------------------------------------------
  387.   # ● 是否与RATB并用 ☆自动识别(这到是不错~省了~)
  388.   #    在Scene_Battle计算方法是否是方法synthe?
  389.   #    在自动不想认识的时候,请重写。
  390.   #--------------------------------------------------------------------------
  391.   if Scene_Battle.method_defined?("synthe?")
  392.     RTAB = true
  393.   else
  394.     RTAB = false
  395.   end
  396.   #--------------------------------------------------------------------------
  397.   # ● 改正RATB中的位置误差 ☆自动识别
  398.   #    在自动不想认识的时候,请重写。
  399.   #--------------------------------------------------------------------------
  400.   def camera_correctness
  401.     return false if !RTAB
  402.     begin
  403.       return $scene.drive
  404.     rescue
  405.       return false
  406.     end
  407.   end
  408.   #--------------------------------------------------------------------------
  409.   # ● 队伍中的最大人数
  410.   #--------------------------------------------------------------------------
  411.   Party_max = 4
  412.   #--------------------------------------------------------------------------
  413.   # ● 战斗图的扩大率(1.0的时候是保持原有大小)
  414.   #--------------------------------------------------------------------------
  415.   CHAR_ZOOM = 1.0
  416.   #--------------------------------------------------------------------------
  417.   # ● 光标的位置修正(基本不需要改~)
  418.   #--------------------------------------------------------------------------
  419.   ARROW_OX = 0
  420.   ARROW_OY = 64
  421.   #--------------------------------------------------------------------------
  422.   # ● 飞行状态命名
  423.   #--------------------------------------------------------------------------
  424.   FLY_STATES = ["飞行"]
  425.   #--------------------------------------------------------------------------
  426.   # ● 战斗画面的位置
  427.   #--------------------------------------------------------------------------
  428.   PARTY_X = 455     # 队伍 X 位置
  429.   PARTY_Y = 100     # 队伍 Y 位置 原200
  430.   FORMATION_X = 15  # 各个角色之间的间隔 X
  431.   FORMATION_Y = 65  # 各个角色之间的间隔 Y 原35
  432.   #--------------------------------------------------------------------------
  433.   # ● 自定义常数
  434.   #--------------------------------------------------------------------------
  435.   NORMAL   = "NORMAL"
  436.   WALK_R   = "WALK_R"
  437.   WALK_L   = "WALK_L"
  438.   ATTACK   = "ATTACK"
  439.   ATTACK_R = "ATTACK_R"
  440.   ATTACK_L = "ATTACK_L"
  441.   MAGIC    = "MAGIC"
  442.   ITEM     = "ITEM"
  443.   # 动画的设定
  444.   ANIME = {
  445.     # [画像ID,是否循环,アニメスピード,动画速度,不能指向动画,武器放在右手or左手]
  446.     NORMAL            => [1,true , 0,false, true ,""    ], # 通常待击
  447.     WALK_R            => [2,true , 2,false, false,""    ], # 右移动
  448.     WALK_L            => [1,true , 2,false, false,""    ], # 左移动
  449.     ATTACK_R          => [1,false, 2,true , false,"右手"], # 右手攻击
  450.     ATTACK_L          => [1,false, 2,true , false,"左手"], # 左手攻击
  451.     MAGIC             => [1,false, 2,false, false,""    ], # 右手攻击
  452.     ITEM              => [1,false, 2,false, false,""    ], # 左手攻击
  453.     }
  454.    
  455.   # 债务不履行声明价值的设定(一个字一个字翻译的,不知道啥意思)  
  456.   ANIME.default = [1,false,12,false,"",""]
  457.   
  458.   # 在行动设定的时候 右手攻击 or 左手攻击 辨别を(这个不知道什么意思)的ANIME
  459.   # "角色动画变更#ATTACK"在玩了と(还是不知道啥意思..)的时候,辨别ATTACK_R或者ATTACK_L
  460.   DUAL_WEAPONS_ANIME = [ATTACK]
  461.   
  462.   
  463.   #--------------------------------------------------------------------------
  464.   # ● 战斗图不是行走图的敌人编号
  465.   #--------------------------------------------------------------------------
  466.   NOT_CHARACTER_EMEMY = [111]
  467.   #--------------------------------------------------------------------------
  468.   # ● 敌人使用的武器
  469.   #    敌人编号=>武器编号
  470.   #--------------------------------------------------------------------------
  471.   EMEMY_WEAPO = {1=>1,7=>17}
  472.   #--------------------------------------------------------------------------
  473.   # ● 敌人使用的武器 (二刀流)
  474.   #    敌人编号=>武器编号
  475.   #--------------------------------------------------------------------------
  476.   EMEMY_WEAPO2 = {}
  477.   #--------------------------------------------------------------------------
  478.   # ● 多段连击技能
  479.   #    技能编号=>动画编号
  480.   #--------------------------------------------------------------------------
  481.   RT_SKILL_ANIMATION =
  482.   $rt_animation_id = []
  483.   $rt_hits = 0
  484.   $rt_damage = {}
  485.   #--------------------------------------------------------------------------
  486.   # ● 摇晃的设定
  487.   #--------------------------------------------------------------------------
  488.   SHAKE_FILE = "摇晃"  # 文件名
  489.   SHAKE_POWER = 5          # 强度
  490.   SHAKE_SPEED = 5          # 速度
  491.   SHAKE_DURATION = 5      # 时间
  492.   #--------------------------------------------------------------------------
  493.   # ● 上下反转地的设定
  494.   #--------------------------------------------------------------------------
  495.   UPSIDE_DOWN_FILE = "上下反转" # 文件名
  496.   #--------------------------------------------------------------------------
  497.   # ● 左右反转地的设定
  498.   #--------------------------------------------------------------------------
  499.   REVERSE_FILE = "左右反转" # 文件名
  500.   #--------------------------------------------------------------------------
  501.   # ● 回转地的设定
  502.   #--------------------------------------------------------------------------
  503.   TURNING_FILE = "回转" # 文件名
  504.   TURNING_DIRECTION = 1 # 方向(1.逆时针,-1.顺时针)(|||-_-汗..怎么还有用-1做带入值的...)
  505.   TURNING_SPEED = 40    # 速度
  506.   TURNING_DURATION = 1  # 回转数
  507.   #--------------------------------------------------------------------------
  508.   # ● 移动的设定
  509.   #--------------------------------------------------------------------------
  510.   MOVE_FILE = "移动"             # 文件名
  511.   MOVE_RETURN = 1                # 回到原来的位置吗?(光写了个1,也不知道不回到该怎么写?0?)
  512.   MOVE_SPEED = 32                # 速度
  513.   MOVE_COORDINATES = [0,-640]    # 原来位置的相对坐标
  514.   #--------------------------------------------------------------------------
  515.   # ● 动画追加的设定
  516.   #--------------------------------------------------------------------------
  517.   ADD_ANIME_FILE = "动画追加"  # 文件名
  518.   ADD_ANIME_ID = 0               # 动画的ID
  519.   #--------------------------------------------------------------------------
  520.   # ● 债务不履行声明和RTAB的数据转换
  521.   #--------------------------------------------------------------------------
  522.   def convert_battler
  523.     return RTAB ? @active_actor : @active_battler
  524.   end
  525.   #--------------------------------------------------------------------------
  526.   # ● 债务不履行声明和RTAB的数据转换2
  527.   #--------------------------------------------------------------------------
  528.   def convert_battler2(*arg)
  529.     return RTAB ? arg[0] : @active_battler
  530.   end
  531. end

  532. #--------------------------------------------------------------------------
  533. # ● 行动設定
  534. #--------------------------------------------------------------------------
  535. module BattleActions
  536.   
  537.   # 下のものはあくまでも一例なので
  538.   # 独自に作ってください。

  539.   Actions = {

  540.   "通常攻撃" => [
  541.   
  542.   "閃きアニメ",
  543.   "アクターアニメ変更#WALK_L",
  544.   "移動#target,32,0,64,0",
  545.   "行動アニメ",
  546.   "アクターアニメ変更#ATTACK",
  547.   "遠距離アニメ",
  548.   "対象アニメ",
  549.   "アクターアニメ変更#WALK_L",
  550.   "SEの演奏#016-Jump02,80,100",
  551.   "移動#self,0,0,48,32",
  552.   "終了"
  553.   ],

  554.   "エネミー攻撃" => [
  555.   
  556.   "閃きアニメ",
  557.   "アクターアニメ変更#WALK_L",
  558.   "移動#target,32,0,64,0",
  559.   "行動アニメ",
  560.   "アクターアニメ変更#ATTACK",
  561.   "遠距離アニメ",
  562.   "対象アニメ",
  563.   "アクターアニメ変更#WALK_L",
  564.   "SEの演奏#016-Jump02,80,100",
  565.   "移動#self,0,0,48,32",
  566.   "終了"
  567.   ],
  568.   
  569.   "術発動" => [
  570.   
  571.   "閃きアニメ",
  572.   "アクターアニメ変更#WALK_L",
  573.   "移動#self,-32,0,4,0",
  574.   "アクターアニメ変更#MAGIC",
  575.   "行動アニメ",
  576.   "ウエイト#15",
  577.   "遠距離アニメ",
  578.   "技能#target",
  579.   "ウエイト#1",
  580.   "対象アニメ",
  581.   "アクターアニメ変更#WALK_L",
  582.   "移動#self,0,0,4,2",
  583.   "終了"
  584.   ],

  585.   "アイテム使用" => [
  586.   
  587.   "閃きアニメ",
  588.   "アクターアニメ変更#WALK_L",
  589.   "移動#self,-32,0,4,0",
  590.   "行動アニメ",
  591.   "アクターアニメ変更#ITEM",
  592.   "ウエイト#15",
  593.   "遠距離アニメ",
  594.   "対象アニメ",
  595.   "アクターアニメ変更#WALK_L",
  596.   "移動#self,0,0,4,2",
  597.   "終了"
  598.   ],
  599.   
  600.   "払い抜け" => [
  601.   
  602.   "閃きアニメ",
  603.   "アクターアニメ変更#WALK_L",
  604.   "移動#target_near,50,0,48,30",  
  605.   "左右反転",
  606.   "アクターアニメ固定#ATTACK#3",
  607.   "行動アニメ",
  608.   "左右反転",
  609.   "残像表示",
  610.   "移動#target_far,-50,0,48,0",
  611.   "技能#target",
  612.   "ウエイト#1",
  613.   "対象アニメ",
  614.   "残像消去",
  615.   "アニメ固定解除",
  616.   "アクターアニメ変更#WALK_L",
  617.   "移動#self,0,0,48,1,0",
  618.   "終了"
  619.   ],

  620.   "弓箭攻撃" => [
  621.   
  622.   "閃きアニメ",
  623.   "アクターアニメ変更#WALK_L",
  624.   "移動#self,-32,0,4,0",
  625.   "行動アニメ",
  626.   "アクターアニメ変更#ATTACK",
  627.   "遠距離アニメ",
  628.   "対象アニメ",
  629.   "アクターアニメ変更#WALK_L",
  630.   "移動#self,0,0,4,2",
  631.   "終了"
  632.   ],

  633.   "回旋攻撃" => [
  634.   
  635.   "閃きアニメ",
  636.   "アクターアニメ変更#WALK_L",
  637.   "移動#self,-32,0,4,0",
  638.   "行動アニメ",
  639.   "アクターアニメ変更#STAND_L",  
  640.   "遠距離アニメ",
  641.   "対象アニメ",
  642.   "アクターアニメ変更#WALK_L",
  643.   "移動#self,0,0,4,2",
  644.   "終了"
  645.   ],
  646.   
  647.   "远距离発動" => [
  648.   
  649.   "閃きアニメ",
  650.   "アクターアニメ変更#WALK_L",
  651.   "移動#self,-32,0,4,0",
  652.   "アクターアニメ変更#MAGIC",
  653.   "行動アニメ",
  654.   "アクターアニメ変更#ATTACK",
  655.   "遠距離アニメ",
  656.   "技能#target",
  657.   "ウエイト#1",
  658.   "対象アニメ",
  659.   "アクターアニメ変更#WALK_L",
  660.   "移動#self,0,0,4,2",
  661.   "終了"
  662.   ],
  663.   
  664.   "回旋発動" => [
  665.   
  666.   "閃きアニメ",
  667.   "アクターアニメ変更#WALK_L",
  668.   "移動#self,-32,0,4,0",
  669.   "アクターアニメ変更#MAGIC",
  670.   "行動アニメ",
  671.   "アクターアニメ変更#STAND_L",  
  672.   "遠距離アニメ",
  673.   "技能#target",
  674.   "ウエイト#1",
  675.   "対象アニメ",
  676.   "アクターアニメ変更#WALK_L",
  677.   "移動#self,0,0,4,2",
  678.   "終了"
  679.   ],

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

  681. end
  682.   
  683. module RPG
  684.   class Weapon
  685.     #--------------------------------------------------------------------------
  686.     # ● アクション設定
  687.     #--------------------------------------------------------------------------
  688.     def battle_actions
  689.       case @id
  690.       when 171,181,191,201,211,221,231,241  # 远程武器的id回旋攻撃
  691.         return BattleActions::Actions["弓箭攻撃"]
  692.       when 341                       # 回旋武器的id
  693.         return BattleActions::Actions["回旋攻撃"]
  694.       end
  695.       else
  696.       return BattleActions::Actions["通常攻撃"]
  697.     end
  698.   end
  699.   class Skill
  700.     #--------------------------------------------------------------------------
  701.     # ● アクション設定
  702.     #--------------------------------------------------------------------------
  703.     def battle_actions
  704.       case @id
  705.       when 86,85,84,82,173,174,175,176,177,178,179,180  # 远程技能的id
  706.         return BattleActions::Actions["远距离発動"]
  707.       when 182                       # 回旋技能的id
  708.         return BattleActions::Actions["回旋発動"]
  709.       end
  710.       else
  711.       if self.magic?
  712.         return BattleActions::Actions["術発動"]
  713.       else
  714.         return BattleActions::Actions["払い抜け"]
  715.       end
  716.     end
  717.   end
  718.   class Item
  719.     #--------------------------------------------------------------------------
  720.     # ● アクション設定
  721.     #--------------------------------------------------------------------------
  722.     def battle_actions
  723.       return BattleActions::Actions["アイテム使用"]
  724.     end
  725.   end
  726. end
  727. #class Game_Enemy < Game_Battler
  728.   #--------------------------------------------------------------------------
  729.   # ● アクション設定
  730.   #--------------------------------------------------------------------------
  731. #~  def battle_actions
  732. #~    return BattleActions::Actions["エネミー攻撃"]
  733. #~  end
  734. #end
  735. =begin
  736. #--------------------------------------------------------------------------
  737. # ● 遠距離アニメーション
  738. #--------------------------------------------------------------------------
  739.  ☆ 説明
  740.   
  741.    行動者から対象者にアニメを飛ばします。
  742.    飛ばすアニメを データベース‐アニメーション で作ります。
  743.     [アニメーションID, スピード, 往復するか?,直線(false)or曲線(true)] で指定します。


  744.   ● カスタマイズ方法
  745.    
  746.     case @id
  747.     when 17,18,19,20
  748.       return [101,32,false,false]
  749.     when 21,22,23,24
  750.       return [102,32,false,false]
  751.     end
  752.     return 0
  753.    
  754.     のように描くとID別に指定可能です。
  755.    
  756.    
  757.   ● アニメーションID
  758.   
  759.   飛ばすアニメーションIDです。短い場合は繰り返しで表示されます。
  760.   
  761.    
  762.   ● スピード
  763.   
  764.   大きいほうが早い(0だとアニメは移動しません)
  765.   
  766.   1 = 1フレームで1ドット進むと考えてください。
  767.   
  768.   ● 往復するか?
  769.   
  770.   true とした場合、ブーメランのようにアニメが戻ります。
  771.   
  772.   ● 直線(false)or曲線(true)
  773.   
  774.   true  = 対象に向かって曲線で、アニメが飛びます。(修正の余地ありですが・・・)
  775.   false = 対象に向かって直線で、アニメが飛びます。
  776.    
  777. =end
  778. module RPG
  779.   class Weapon
  780.     #--------------------------------------------------------------------------
  781.     # ● 遠距離アニメーション
  782.     #--------------------------------------------------------------------------
  783.     def flying_anime
  784.       # ID 指定 の例(武器的id,分类是根据飞行武器的动画id)
  785.       case @id
  786.       when 341             #回旋武器(类似回力镖)的id
  787.         return [103,32,true,true]
  788.       when 171,181,191,201    #远程武器1(弓箭类)的id
  789.         return [101,32,false,false]
  790.       when 211,221,231,241    #远程武器2(铳类)的id
  791.         return [102,32,false,false]
  792.       end
  793.       return [0,0,false,false]
  794.     end
  795.   end
  796.   class Skill
  797.     #--------------------------------------------------------------------------
  798.     # ● 遠距離アニメーション
  799.     #--------------------------------------------------------------------------
  800.     def flying_anime
  801.       # ID 指定 の例(技能的id,分类是根据飞行武器的动画id)
  802.       case @id
  803.       when 182             #回旋技能(类似回力镖)的id
  804.         return [103,32,true,true]
  805.       when 173,174,175,176    #远程技能1(弓箭类)的id
  806.         return [101,32,false,false]
  807.       when 177,178,179,180    #远程技能2(铳类)的id
  808.         return [102,32,false,false]
  809.       end
  810.       return [0,0,false,false]
  811.     end
  812.   end
  813.   class Item
  814.     #--------------------------------------------------------------------------
  815.     # ● 遠距離アニメーション
  816.     #--------------------------------------------------------------------------
  817.     def flying_anime
  818.       case @id
  819.       when 341    #抛击类道具(如炸弹一类)的id
  820.         return [104,32,false,true]
  821.       end
  822.       return [0,0,false,false]
  823.     end
  824.   end
  825. end

  826. #class Game_Enemy < Game_Battler
  827.   #--------------------------------------------------------------------------
  828.   # ● 遠距離アニメーション
  829.   #--------------------------------------------------------------------------
  830. #~  def flying_anime
  831. #~    return [0,0,false,false]
  832. #~  end
  833. #end



  834. #==============================================================================
  835. # ■ Game_Battler
  836. #==============================================================================
  837. class Game_Battler
  838.   include Side_view
  839.   #--------------------------------------------------------------------------
  840.   # ● 追加・公開インスタンス変数
  841.   #--------------------------------------------------------------------------
  842.   attr_accessor :height                  # 画像の高さ
  843.   attr_accessor :real_x                  # X座標補正
  844.   attr_accessor :real_y                  # Y座標補正
  845.   attr_accessor :real_zoom               # 拡大率
  846.   attr_accessor :wait_count              # アニメーション 待ち時間
  847.   attr_accessor :wait_count2             # アニメーション 待ち時間2
  848.   attr_accessor :pattern                 # アニメーション カウント(キャラ)
  849.   attr_accessor :shake                   # シェイク開始フラッグ
  850.   attr_accessor :reverse                 # 左右反転フラッグ
  851.   attr_accessor :shadow                  # 残像フラッグ
  852.   attr_accessor :flash_flag              # 閃きフラッグ
  853.   attr_accessor :damagetemp_pop          # 显示临时伤害标志
  854.   attr_accessor :hit_pop                 # 显示连击标志
  855.   attr_reader   :ox                      # X座標補正
  856.   attr_reader   :oy                      # Y座標補正
  857.   attr_reader   :flying_x                # 遠距離アニメX座標
  858.   attr_reader   :flying_y                # 遠距離アニメY座標
  859.   attr_reader   :flying_anime            # 遠距離アニメ
  860.   attr_reader   :animation1_on           # 行動アニメ開始フラッグ
  861.   attr_reader   :animation2_on           # 対象アニメ開始フラッグ
  862.   #--------------------------------------------------------------------------
  863.   # ● デフォルトのアニメーション待ち時間を取得
  864.   #--------------------------------------------------------------------------
  865.   def animation_duration=(animation_duration)
  866.     @_animation_duration = animation_duration
  867.   end
  868.   #--------------------------------------------------------------------------
  869.   # ● バトル開始時のセットアップ
  870.   #--------------------------------------------------------------------------
  871.   def start_battle
  872.     @height = 0
  873.     @real_x = 0
  874.     @real_y = 0
  875.     @real_zoom = 1.0
  876.     @battler_condition = ""
  877.     @action = nil
  878.     @battle_actions = []
  879.     @battler_action = false
  880.     @step = 0
  881.     @anime_on = false
  882.     @wait_count = 0
  883.     @wait_count2 = 0
  884.     @ox = 0
  885.     @oy = 0
  886.     @pattern = 0
  887.     @pattern_log = true
  888.     @pattern_freeze = false
  889.     @condition_freeze = false
  890.     @active = false
  891.     @move_distance = nil
  892.     @move_wait = 0
  893.     @move_coordinates = [0,0,0,0]
  894.     @flying_distance = nil
  895.     @flying_wait = 0
  896.     @flying_x = 0
  897.     @flying_y = 0
  898.     @flash_flag = {}
  899.     self.flying_clear
  900.   end
  901.   #--------------------------------------------------------------------------
  902.   # ● 移動中判定
  903.   #--------------------------------------------------------------------------
  904.   def moving?
  905.     # X座標補正または、Y座標補正が0でなければ、移動中
  906.     return (@ox != 0 or @oy != 0)
  907.   end
  908.   #--------------------------------------------------------------------------
  909.   # ● 移動終了判定
  910.   #--------------------------------------------------------------------------
  911.   def move_end?
  912.     return (@ox == @move_coordinates[0] and @oy == @move_coordinates[1])
  913.   end
  914.   #--------------------------------------------------------------------------
  915.   # ● アクション開始設定
  916.   #--------------------------------------------------------------------------
  917.   def action(flag = true)
  918.     @battler_action = flag
  919.     @animation1_on = false
  920.     @animation2_on = false
  921.     @step = "setup"
  922.   end   
  923.   #--------------------------------------------------------------------------
  924.   # ● アクション中判定
  925.   #--------------------------------------------------------------------------
  926.   def action?
  927.     return @battler_action
  928.   end
  929.   #--------------------------------------------------------------------------
  930.   # ● 閃き判定
  931.   #--------------------------------------------------------------------------
  932.   def flash?
  933.     return @flash_flg
  934.   end
  935.   #--------------------------------------------------------------------------
  936.   # ● 戦闘不能判定
  937.   #--------------------------------------------------------------------------
  938.   def anime_dead?
  939.     if $game_temp.in_battle and !RTAB
  940.       if [2,3,4,5].include?($scene.phase4_step)
  941.         return @last_dead
  942.       end
  943.     end
  944.     return @last_dead = self.dead?
  945.   end
  946.   #--------------------------------------------------------------------------
  947.   # ● ピンチ状態判定
  948.   #--------------------------------------------------------------------------
  949.   def crisis?
  950.     if $game_temp.in_battle and !RTAB
  951.       if [2,3,4,5].include?($scene.phase4_step)
  952.         return @last_crisis
  953.       end
  954.     end
  955.     return @last_crisis = (self.hp <= self.maxhp / 4 or badstate?)
  956.   end
  957.   #--------------------------------------------------------------------------
  958.   # ● バッドステート判定
  959.   #--------------------------------------------------------------------------
  960.   def badstate?
  961.     for i in @states
  962.       unless $data_states[i].nonresistance
  963.         return true
  964.       end
  965.     end
  966.     return false
  967.   end
  968.   #--------------------------------------------------------------------------
  969.   # ● 飛行
  970.   #--------------------------------------------------------------------------
  971.   def fly
  972.     if @fly != nil
  973.       return @fly
  974.     end
  975.     for id in @states
  976.       if FLY_STATES.include?($data_states[id].name)
  977.         return 60
  978.       end
  979.     end
  980.     return 0
  981.   end
  982.   #--------------------------------------------------------------------------
  983.   # ● 遠距離アニメ目標座標の計算
  984.   #--------------------------------------------------------------------------
  985.   def flying_setup
  986.     # 二度目は実行しない
  987.     return if @flying_distance != nil && !camera_correctness
  988.     if RTAB
  989.       targets = @target
  990.     else
  991.       targets = $scene.target_battlers
  992.     end
  993.     # 目的座標を計算
  994.     @f_target_x = 0
  995.     @f_target_y = 0
  996.     for t in targets
  997.       @f_target_x += t.screen_x
  998.       @f_target_y += t.screen_y
  999.     end
  1000.     if targets != []
  1001.       @f_target_x /= targets.size
  1002.       @f_target_y /= targets.size
  1003.     else
  1004.       @flying_distance = 0
  1005.       return
  1006.     end
  1007.     # 距離の計算
  1008.     @flying_distance = (self.screen_x - @f_target_x).abs + (self.screen_y - @f_target_y).abs
  1009.   end
  1010.   #--------------------------------------------------------------------------
  1011.   # ● 遠距離アニメ
  1012.   #--------------------------------------------------------------------------
  1013.   def flying_animation
  1014.     # 戻る
  1015.     if @step != "flying" or @flying_distance.nil?
  1016.       return [false,true]
  1017.     end
  1018.     # あらかじめ計算
  1019.     self_x = self.screen_x
  1020.     self_y = self.screen_y
  1021.     @flying_distance = @flying_distance == 0 ? 1 : @flying_distance
  1022.     n1 = @flying_wait / @flying_distance.to_f
  1023.     if @flying_distance - @flying_wait > @flying_distance / 2
  1024.       n2 = 1.0 + 10.0 * @flying_wait / @flying_distance.to_f
  1025.     else
  1026.       n2 = 1.0 + 10.0 * (@flying_distance - @flying_wait) / @flying_distance.to_f
  1027.     end
  1028.     if !@flying_anime[4]
  1029.       # 直線移動
  1030.       x = (self_x + 1.0 * (@f_target_x - self_x) * n1).to_i
  1031.       y = (self_y + 1.0 * (@f_target_y - self_y) * n1).to_i
  1032.     else
  1033.       # 曲線移動
  1034.       if !@flying_proceed_end
  1035.         x = (self_x + 1.0 * (@f_target_x - self_x) * n1).to_i
  1036.         y = (self_y + 1.0 * (@f_target_y - self_y) * n1 - n2**2).to_i
  1037.       else
  1038.         x = (self_x + 1.0 * (@f_target_x - self_x) * n1).to_i
  1039.         y = (self_y + 1.0 * (@f_target_y - self_y) * n1 + n2**2).to_i
  1040.       end
  1041.     end
  1042.     # 座標代入
  1043.     @flying_x = x
  1044.     @flying_y = y
  1045.     # ウエイト
  1046.     if !@flying_proceed_end
  1047.       # 開始
  1048.       @flying_proceed_start = @flying_wait == 0
  1049.       @flying_wait += @flying_anime[1]
  1050.       @flying_wait = [@flying_wait,@flying_distance].min
  1051.       @flying_proceed_end = @flying_wait == @flying_distance
  1052.     else
  1053.       # 開始
  1054.       @flying_return_start = @flying_wait == @flying_distance
  1055.       @flying_wait -= @flying_anime[1]
  1056.       @flying_wait = [@flying_wait,0].max
  1057.       @flying_return_end = @flying_wait == 0
  1058.     end
  1059.     if @flying_anime[1] == 0
  1060.       @flying_end = true
  1061.     elsif !@flying_anime[2]
  1062.       @flying_end = @flying_proceed_end
  1063.     else
  1064.       @flying_end = @flying_return_end
  1065.     end
  1066.     # 値を返す(アニメ開始,アニメ終了)
  1067.     return [@flying_proceed_start,@flying_end]
  1068.   end
  1069.   #--------------------------------------------------------------------------
  1070.   # ● 遠距離アニメ初期化
  1071.   #--------------------------------------------------------------------------
  1072.   def flying_clear
  1073.     @flying_proceed_start = false
  1074.     @flying_proceed_end = false
  1075.     @flying_return_start = false
  1076.     @flying_return_end = false
  1077.     @flying_end = false
  1078.     @flying_anime = [0,0,false]
  1079.   end
  1080.   #--------------------------------------------------------------------------
  1081.   # ● 移動
  1082.   #--------------------------------------------------------------------------
  1083.   def move
  1084.     # 距離の計算
  1085.     @move_distance = (@move_coordinates[2] - @move_coordinates[0]).abs +
  1086.                      (@move_coordinates[3] - @move_coordinates[1]).abs
  1087.     if @move_distance > 0
  1088.       return if @ox == @move_coordinates[0] and @oy == @move_coordinates[1]
  1089.       array = @move_coordinates
  1090.       # ジャンプ補正値の計算
  1091.       if @move_distance - @move_wait > @move_distance / 2
  1092.         jump = (@move_action[4] * @move_wait / @move_distance.to_f)**2        
  1093.       else
  1094.         jump = (@move_action[4] * (@move_distance - @move_wait) / @move_distance.to_f)**2
  1095.       end
  1096.       jump = @move_action[4] > 0 ? -jump : jump
  1097.       @ox = (array[2] + 1.0 * (array[0] - array[2]) * (@move_distance - @move_wait) / @move_distance.to_f).to_i
  1098.       
  1099.       @oy = (array[3] + 1.0 * (array[1] - array[3]) * (@move_distance - @move_wait) / @move_distance.to_f + jump).to_i
  1100.       # ウエイト
  1101.       @move_wait -= @move_action[3]
  1102.       @move_wait = [@move_wait,0].max
  1103.     end
  1104.   end
  1105.   #--------------------------------------------------------------------------
  1106.   # ● 移動アクションの取得
  1107.   #--------------------------------------------------------------------------
  1108.   def get_move_action
  1109.     string = @action.split(/#/)[1]
  1110.     string = string.split(/,/)
  1111.     @move_action = [string[0],string[1].to_i,string[2].to_i,string[3].to_i,string[4].to_i,string[5].to_i]
  1112.   end
  1113.   #--------------------------------------------------------------------------
  1114.   # ● アクションの取得
  1115.   #--------------------------------------------------------------------------
  1116.   def get_step
  1117.     if @action.nil?
  1118.       @step = "finish"
  1119.       return
  1120.     end
  1121.     string = @action.split(/#/)[0]
  1122.     if string =~ "移動"
  1123.       @step = "moving_setup"
  1124.     elsif string =~ "アクターアニメ実行"
  1125.       @step = "action"
  1126.     elsif string =~ "遠距離アニメ"
  1127.       @step = "flying"
  1128.     elsif string =~ "アクターアニメ変更"
  1129.       @step = "change"
  1130.     elsif string =~ "行動アニメ"
  1131.       @step = "animation1"
  1132.     elsif string =~ "対象アニメ"
  1133.       @step = "animation2"
  1134.     elsif string =~ "ウエイト"
  1135.       @step = "wait"
  1136.     elsif string =~ "左右反転"
  1137.       @step = "reverse"
  1138.     elsif string =~ "閃きアニメ"
  1139.       @step = "flash"
  1140.     elsif string =~ "残像表示"
  1141.       @step = "shadow_on"
  1142.     elsif string =~ "残像消去"
  1143.       @step = "shadow_off"
  1144.     elsif string =~ "アクターアニメ固定"
  1145.       @step = "freeze"
  1146.     elsif string =~ "アニメ固定解除"
  1147.       @step = "freeze_lifting"
  1148.     elsif string =~ "アニメーションの表示"
  1149.       @step = "animation_start"
  1150.     elsif string =~ "技能"
  1151.       @step = "skill_start"
  1152.     elsif string =~ "SEの演奏"
  1153.       @step = "play_se"
  1154.     else
  1155.       @step = "finish"
  1156.     end
  1157.   end
  1158.   #--------------------------------------------------------------------------
  1159.   # ● フレーム更新 (次のアクションへ)
  1160.   #--------------------------------------------------------------------------
  1161.   def update_next
  1162.     @action = @battle_actions.shift
  1163.     @step = get_step
  1164.   end
  1165.   #--------------------------------------------------------------------------
  1166.   # ● フレーム更新 (動作取得)
  1167.   #--------------------------------------------------------------------------
  1168.   def update_setup
  1169.     # アクションの取得
  1170.     self.get_actions
  1171.     @action = @battle_actions.shift
  1172.     @step = get_step
  1173.   end
  1174.   #--------------------------------------------------------------------------
  1175.   # ● フレーム更新 (移動取得)
  1176.   #--------------------------------------------------------------------------
  1177.   def update_moving_setup
  1178.     # 移動アクションの取得
  1179.     self.get_move_action
  1180.     # 移動目標の設定
  1181.     self.move_setup
  1182.     @step = "moving"
  1183.   end
  1184.   #--------------------------------------------------------------------------
  1185.   # ● フレーム更新 (移動)
  1186.   #--------------------------------------------------------------------------
  1187.   def update_moving
  1188.     # 移動
  1189.     self.move
  1190.     self.condition = @battler_condition
  1191.     # 移動完了したら次のステップへ
  1192.     if move_end?
  1193.       @wait_count = 2
  1194.       @action = @battle_actions.shift
  1195.       @step = get_step
  1196.     end
  1197.   end
  1198.   #--------------------------------------------------------------------------
  1199.   # ● フレーム更新 (アニメ実行)
  1200.   #--------------------------------------------------------------------------
  1201.   def update_action
  1202.     con = @action.split(/#/)[1]
  1203.     # 右手・左手を分ける
  1204.     if DUAL_WEAPONS_ANIME.include?(con)
  1205.       if !@first_weapon and @second_weapon
  1206.         con = con + "_L"
  1207.       else
  1208.         con = con + "_R"
  1209.       end
  1210.     end
  1211.     # アニメ変更
  1212.     self.condition = con
  1213.     # ループか否か
  1214.     if !ANIME[@battler_condition][1]
  1215.       self.anime_on
  1216.     end
  1217.     @action = @battle_actions.shift
  1218.     @step = get_step
  1219.   end
  1220.   #--------------------------------------------------------------------------
  1221.   # ● フレーム更新 (遠距離アニメ)
  1222.   #--------------------------------------------------------------------------
  1223.   def update_flying
  1224.     # 目標の設定
  1225.     self.flying_setup
  1226.     # 遠距離アニメ終了
  1227.     if @flying_end
  1228.       self.flying_clear
  1229.       @action = @battle_actions.shift
  1230.       @step = get_step
  1231.     end
  1232.   end
  1233.   #--------------------------------------------------------------------------
  1234.   # ● フレーム更新 (アニメ変更)
  1235.   #--------------------------------------------------------------------------
  1236.   def update_change
  1237.     con = @action.split(/#/)[1]
  1238.     # 右手・左手を分ける
  1239.     if DUAL_WEAPONS_ANIME.include?(con)
  1240.       if !@first_weapon and @second_weapon
  1241.         con = con + "_L"
  1242.       else
  1243.         con = con + "_R"
  1244.       end
  1245.     end
  1246.     # アニメ変更
  1247.     self.condition = con
  1248.     # ループか否か
  1249.     if !ANIME[@battler_condition][1]
  1250.       self.anime_on
  1251.     end
  1252.     @action = @battle_actions.shift
  1253.     @step = get_step
  1254.   end
  1255.   #--------------------------------------------------------------------------
  1256.   # ● フレーム更新 (行動アニメ)
  1257.   #--------------------------------------------------------------------------
  1258.   def update_animation1
  1259.     @animation1_on = true
  1260.     # 行動アニメの後に行動を開始する
  1261.     if $scene.phase4_step == 3
  1262.       id = RTAB ? @anime1 : $scene.animation1_id
  1263.       animation = $data_animations[id]
  1264.       frame_max = animation != nil ? animation.frame_max : 0
  1265.       @wait_count2 = frame_max * 2
  1266.       return
  1267.     end
  1268.     @action = @battle_actions.shift
  1269.     @step = get_step
  1270.   end
  1271.   #--------------------------------------------------------------------------
  1272.   # ● フレーム更新 (対象アニメ)
  1273.   #--------------------------------------------------------------------------
  1274.   def update_animation2
  1275.     @animation2_on = true
  1276.     # 行動アニメの後に行動を開始する
  1277.     if $scene.phase4_step == 4
  1278.       id = RTAB ? @anime2 : $scene.animation2_id
  1279.       animation = $data_animations[id]
  1280.       frame_max = animation != nil ? animation.frame_max : 0
  1281.       @wait_count2 = frame_max * 2
  1282.       return
  1283.     end
  1284.     @action = @battle_actions.shift
  1285.     @step = get_step
  1286.   end
  1287.   #--------------------------------------------------------------------------
  1288.   # ● フレーム更新 (ウエイト)
  1289.   #--------------------------------------------------------------------------
  1290.   def update_wait
  1291.     @wait_count2 = @action.split(/#/)[1].to_i
  1292.     @action = @battle_actions.shift
  1293.     @step = get_step
  1294.   end
  1295.   #--------------------------------------------------------------------------
  1296.   # ● フレーム更新 (残像表示)
  1297.   #--------------------------------------------------------------------------
  1298.   def update_shadow_on
  1299.     @shadow = true
  1300.     @action = @battle_actions.shift
  1301.     @step = get_step
  1302.   end
  1303.   #--------------------------------------------------------------------------
  1304.   # ● フレーム更新 (残像消去)
  1305.   #--------------------------------------------------------------------------
  1306.   def update_shadow_off
  1307.     @shadow = false
  1308.     @action = @battle_actions.shift
  1309.     @step = get_step
  1310.   end
  1311.   #--------------------------------------------------------------------------
  1312.   # ● フレーム更新 (左右反転)
  1313.   #--------------------------------------------------------------------------
  1314.   def update_reverse
  1315.     @reverse = @reverse ? false : true
  1316.     @action = @battle_actions.shift
  1317.     @step = get_step
  1318.   end
  1319.   #--------------------------------------------------------------------------
  1320.   # ● フレーム更新 (閃きアニメ)
  1321.   #--------------------------------------------------------------------------
  1322.   def update_flash
  1323.     # 閃きアニメの後に行動を開始する
  1324.     if @flash_flag["normal"]
  1325.       @wait_count = $scene.flash_duration
  1326.       @flash_flag["normal"] = false
  1327.       return
  1328.     end
  1329.     @action = @battle_actions.shift
  1330.     @step = get_step
  1331.   end
  1332.   #--------------------------------------------------------------------------
  1333.   # ● フレーム更新 (SEの演奏)
  1334.   #--------------------------------------------------------------------------
  1335.   def update_play_se
  1336.     data = @action.split(/#/)[1]
  1337.     data = data.split(/,/)
  1338.     # SE を演奏
  1339.     Audio.se_play("Audio/SE/" + data[0], data[1].to_i, data[2].to_i)
  1340.     @action = @battle_actions.shift
  1341.     @step = get_step
  1342.   end
  1343.   #--------------------------------------------------------------------------
  1344.   # ● フレーム更新 (アクターアニメ固定)
  1345.   #--------------------------------------------------------------------------
  1346.   def update_freeze
  1347.     con = @action.split(/#/)[1]
  1348.     # 右手・左手を分ける
  1349.     if DUAL_WEAPONS_ANIME.include?(con)
  1350.       if !@first_weapon and @second_weapon
  1351.         con = con + "_L"
  1352.       else
  1353.         con = con + "_R"
  1354.       end
  1355.     end
  1356.     # アニメ変更
  1357.     self.condition = con
  1358.     @pattern = @action.split(/#/)[2].to_i
  1359.     @pattern_freeze = true
  1360.     @condition_freeze = true
  1361.     @action = @battle_actions.shift
  1362.     @step = get_step
  1363.   end
  1364.   #--------------------------------------------------------------------------
  1365.   # ● フレーム更新 (アクターアニメ固定解除)
  1366.   #--------------------------------------------------------------------------
  1367.   def update_freeze_lifting
  1368.     @pattern_freeze = false
  1369.     @condition_freeze = false
  1370.     @action = @battle_actions.shift
  1371.     @step = get_step
  1372.   end
  1373.   #--------------------------------------------------------------------------
  1374.   # ● フレーム更新 (アニメーションの表示)
  1375.   #--------------------------------------------------------------------------
  1376.   def update_animation_start
  1377.     data = @action.split(/#/)[1]
  1378.     data = data.split(/,/)
  1379.     target = data[0]
  1380.     animation_id = data[1].to_i
  1381.     if RTAB
  1382.       case target
  1383.       when "self"
  1384.         @animation.push([animation_id,true])
  1385.       when "target"
  1386.         for tar in @target
  1387.           tar.animation.push([animation_id, true])
  1388.         end
  1389.       end
  1390.     else
  1391.       case target
  1392.       when "self"
  1393.         @animation_id = animation_id
  1394.         @animation_hit = true
  1395.       when "target"
  1396.         for tar in $scene.target_battlers
  1397.           tar.animation_id = animation_id
  1398.           tar.animation_hit = true
  1399.         end
  1400.       end
  1401.     end
  1402.     @action = @battle_actions.shift
  1403.     @step = get_step
  1404.   end
  1405.   #--------------------------------------------------------------------------
  1406.   # ● フレーム更新 (技能)
  1407.   #--------------------------------------------------------------------------
  1408.   def update_skill_start
  1409.     target = @action.split(/#/)[1]
  1410.     animation_id = $rt_animation_id.shift
  1411.     if $rt_hits > 0
  1412.       $rt_hit += 1
  1413.       $scene.target_battlers[0].hit_pop = true
  1414.       case target
  1415.       when "self"
  1416.         @animation_id = animation_id
  1417.         @animation_hit = true
  1418.       when "target"
  1419.         for tar in $scene.target_battlers
  1420.           tar.animation_id = animation_id
  1421.           tar.animation_hit = true
  1422.           @wait_count = $data_animations[animation_id].frame_max * 2 + 12
  1423.           tar.damage = $rt_damage[tar].pop
  1424.           tar.damagetemp_pop = true
  1425.         end
  1426.       end
  1427.       $rt_hits -= 1
  1428.     end
  1429.     return if $rt_hits > 0
  1430.     @action = @battle_actions.shift
  1431.     @step = get_step
  1432.   end
  1433.   #--------------------------------------------------------------------------
  1434.   # ● フレーム更新 (動作終了)
  1435.   #--------------------------------------------------------------------------
  1436.   def update_finish
  1437.     # 動作終了
  1438.     @battler_action = false
  1439.     @step = "setup"
  1440.   end
  1441.   #--------------------------------------------------------------------------
  1442.   # ● バトラーの状態 変更(バトラーグラフィックのタイプ)
  1443.   #--------------------------------------------------------------------------
  1444.   def condition=(condition)
  1445.     return if @condition_freeze
  1446.     @battler_condition = condition
  1447.     @wait_count = ANIME[condition][2]
  1448.   end
  1449.   #--------------------------------------------------------------------------
  1450.   # ● バトラーの状態(バトラーグラフィックのタイプ)
  1451.   #--------------------------------------------------------------------------
  1452.   def condition
  1453.     return @battler_condition
  1454.   end
  1455.   #--------------------------------------------------------------------------
  1456.   # ● フレーム更新
  1457.   #--------------------------------------------------------------------------
  1458.   def update
  1459.     # ウェイト中の場合
  1460.     if @wait_count > 0
  1461.       return
  1462.     end
  1463.     # パターン更新
  1464.     self.char_animation
  1465.     # ウェイト中の場合
  1466.     if @wait_count2 > 0
  1467.       return
  1468.     end
  1469.    
  1470.     # 行動アニメーション
  1471.     if @battler_action
  1472.       method("update_" + @step).call
  1473.       return
  1474.     end
  1475.    
  1476.     # データ初期化
  1477.     @animation1_on = false
  1478.     @animation2_on = false
  1479.     @action = nil
  1480.     @battle_actions = []
  1481.     @move_wait = 0
  1482.     @move_distance = nil
  1483.     @flying_wait = 0
  1484.     @flying_distance = nil
  1485.     @flash = false

  1486.     # RTAB対応
  1487.     # 通常・待機
  1488.     return self.condition = NORMAL
  1489.   end
  1490.   #--------------------------------------------------------------------------
  1491.   # ● アクションの取得
  1492.   #--------------------------------------------------------------------------
  1493.   def get_actions
  1494.     skill = $data_skills[self.current_action.skill_id]
  1495.     item = $data_items[self.current_action.item_id]
  1496.     kind = self.current_action.kind
  1497.     # 動作取得
  1498.     @battle_actions = []
  1499.     # スキル
  1500.     if skill != nil && kind == 1
  1501.       @battle_actions = skill.battle_actions.dup
  1502.       @flying_anime = skill.flying_anime
  1503.     # アイテム
  1504.     elsif item != nil && kind == 2
  1505.       @battle_actions = item.battle_actions.dup
  1506.       @flying_anime = item.flying_anime
  1507.     # 左手攻撃
  1508.     elsif !@first_weapon and @second_weapon and (self.is_a?(Game_Actor) or (!self.is_a?(Game_Actor) and !self.nce))

  1509.       @battle_actions = self.battle_actions2.dup
  1510.       @flying_anime = self.flying_anime2
  1511.     # 右手攻撃
  1512.     elsif self.current_action.basic == 0 and
  1513.       (self.is_a?(Game_Actor) or (!self.is_a?(Game_Actor) and !self.nce)) and self.current_action.kind == 0
  1514.       @battle_actions = self.battle_actions1.dup
  1515.       @flying_anime = self.flying_anime1
  1516.     # 通常攻撃
  1517.     elsif self.current_action.basic == 0 and self.current_action.kind == 0
  1518.       # 这里啊~~ =。=b
  1519.       if !self.is_a?(Game_Actor) and !self.nce
  1520.         @battle_actions = self.battle_actions1.dup
  1521.       else
  1522.         @battle_actions = BattleActions::Actions["エネミー攻撃"].dup
  1523.       end
  1524.       @flying_anime = self.flying_anime
  1525.     else
  1526.       @battle_actions = ["終了"]
  1527.       @flying_anime = [0,0,false,false]
  1528.     end
  1529.   end
  1530.   #--------------------------------------------------------------------------
  1531.   # ● ループしないアニメのセット
  1532.   #--------------------------------------------------------------------------
  1533.   def anime_on
  1534.     @pattern = 0
  1535.     @pattern_log = true
  1536.     return
  1537.   end
  1538.   #--------------------------------------------------------------------------
  1539.   # ● パターン更新
  1540.   #--------------------------------------------------------------------------
  1541.   def char_animation
  1542.     # パタン固定の場合もどる
  1543.     return if @pattern_freeze
  1544.     # ループしないアニメの場合 1234 で止まる
  1545.     if !ANIME[@battler_condition][1] && @pattern == 3
  1546.       return
  1547.     end
  1548.     # アニメさせない場合 1 で止まる
  1549.     if ANIME[@battler_condition][4]
  1550.       @pattern = 0
  1551.       return
  1552.     end
  1553.     @pattern = (@pattern + 1) % 4
  1554.   end
  1555.   #--------------------------------------------------------------------------
  1556.   # ● アニメタイプ
  1557.   #--------------------------------------------------------------------------
  1558.   def anime_type
  1559.     return ANIME[self.condition] != nil ? ANIME[self.condition][0] : 0
  1560.   end
  1561. end
  1562. #==============================================================================
  1563. # ■ Game_Actor
  1564. #==============================================================================
  1565. class Game_Actor < Game_Battler
  1566.   include Side_view
  1567.   #--------------------------------------------------------------------------
  1568.   # ● セットアップ
  1569.   #--------------------------------------------------------------------------
  1570.   alias side_view_setup setup
  1571.   def setup(actor_id)
  1572.     side_view_setup(actor_id)
  1573.     start_battle
  1574.   end
  1575.   #--------------------------------------------------------------------------
  1576.   # ● 二刀武器のID取得 ※エラー回避用
  1577.   #--------------------------------------------------------------------------
  1578.   def weapon2_id
  1579.     return @weapon2_id != nil ? @weapon2_id : 0
  1580.   end
  1581.   #--------------------------------------------------------------------------
  1582.   # ● X方向 ポジション 取得 (陣形スクリプト拡張用)
  1583.   #--------------------------------------------------------------------------
  1584.   def position
  1585.     return $data_classes[@class_id].position
  1586.   end
  1587.   #--------------------------------------------------------------------------
  1588.   # ● Y方向 ポジション 取得 (陣形スクリプト拡張用)
  1589.   #--------------------------------------------------------------------------
  1590.   def position2
  1591.     return self.index
  1592.   end
  1593.   #--------------------------------------------------------------------------
  1594.   # ● 武器アニメタイプ
  1595.   #--------------------------------------------------------------------------
  1596.   def weapon_anime_type(type)
  1597.     file_name  = weapon_anime_type0(type)
  1598.     visible   = weapon_anime_type1(type)
  1599.     z         = weapon_anime_type2(type)
  1600.     return [file_name,visible,z]
  1601.   end
  1602.   # 武器アイコン取得
  1603.   def weapon_anime_type0(type)
  1604.     type = ANIME[type][5]
  1605.     return weapon_anime1 if type == "右手"
  1606.     return weapon_anime2 if type == "左手"
  1607.     return nil
  1608.   end
  1609.   # 表示・非表示の取得
  1610.   def weapon_anime_type1(type)
  1611.     return ANIME[type][3]
  1612.   end
  1613.   # バトラーより上に表示するかどうか
  1614.   def weapon_anime_type2(type)
  1615.     type = ANIME[type][5]
  1616.     return true if type == "左手"
  1617.     return false
  1618.   end
  1619.   #--------------------------------------------------------------------------
  1620.   # ● バトル画面 X 座標の取得(カメラ補正無し)
  1621.   #--------------------------------------------------------------------------
  1622.   def true_x
  1623.     return PARTY_X + position * FORMATION_X + @ox
  1624.   end
  1625.   #--------------------------------------------------------------------------
  1626.   # ● バトル画面 Y 座標の取得(カメラ補正無し)
  1627.   #--------------------------------------------------------------------------
  1628.   def true_y
  1629.     # パーティ内の並び順から Y 座標を計算して返す
  1630.     if self.index != nil
  1631.       y = position2 * FORMATION_Y + PARTY_Y + @oy - @height / 2
  1632.       return y
  1633.     else
  1634.       return 0
  1635.     end
  1636.   end
  1637.   #--------------------------------------------------------------------------
  1638.   # ● バトル画面 X 座標の取得
  1639.   #--------------------------------------------------------------------------
  1640.   def screen_x(true_x = self.true_x)
  1641.     return 320 + (true_x - 320) * @real_zoom + @real_x
  1642.   end
  1643.   #--------------------------------------------------------------------------
  1644.   # ● バトル画面 Y 座標の取得
  1645.   #--------------------------------------------------------------------------
  1646.   def screen_y(true_y = self.true_y)
  1647.     return true_y * @real_zoom + @real_y
  1648.   end
  1649.   #--------------------------------------------------------------------------
  1650.   # ● バトル画面 Z 座標の取得
  1651.   #--------------------------------------------------------------------------
  1652.   def screen_z
  1653.     return screen_y + 1000
  1654.   end
  1655.   #--------------------------------------------------------------------------
  1656.   # ● バトル画面 X 座標の取得(移動などしていない場合)
  1657.   #--------------------------------------------------------------------------
  1658.   def base_x
  1659.     return 320 + (true_x - @ox - 320) * @real_zoom + @real_x
  1660.   end
  1661.   #--------------------------------------------------------------------------
  1662.   # ● バトル画面 Y 座標の取得
  1663.   #--------------------------------------------------------------------------
  1664.   def base_y
  1665.     return (true_y - @oy) * @real_zoom + @real_y
  1666.   end
  1667.   #--------------------------------------------------------------------------
  1668.   # ● バトル画面 拡大率の取得
  1669.   #--------------------------------------------------------------------------
  1670.   def zoom
  1671.     return ($scene.zoom_rate[1] - $scene.zoom_rate[0]) *
  1672.                           (true_x + @fly) / 480 + $scene.zoom_rate[0]
  1673.   end
  1674.   #--------------------------------------------------------------------------
  1675.   # ● 攻撃用、バトル画面 X 座標の取得
  1676.   #--------------------------------------------------------------------------
  1677.   def attack_x(z)
  1678.     return (320 - true_x) * z * 0.75
  1679.   end
  1680.   #--------------------------------------------------------------------------
  1681.   # ● 攻撃用、バトル画面 Y 座標の取得
  1682.   #--------------------------------------------------------------------------
  1683.   def attack_y(z)
  1684.     return (160 - (true_y + fly / 4) * z + @height * zoom * z / 2) * 0.75
  1685.   end
  1686.   #--------------------------------------------------------------------------
  1687.   # ● 閃き待ち時間
  1688.   #--------------------------------------------------------------------------
  1689.   def flash_duration
  1690.     return $scene.flash_duration
  1691.   end
  1692.   #--------------------------------------------------------------------------
  1693.   # ● アニメーション取得
  1694.   #--------------------------------------------------------------------------
  1695.   def battle_actions1
  1696.     weapon = $data_weapons[@weapon_id]
  1697.     return weapon != nil ? weapon.battle_actions : BattleActions::Actions["通常攻撃"]
  1698.   end
  1699.   #--------------------------------------------------------------------------
  1700.   # ● アニメーション取得
  1701.   #--------------------------------------------------------------------------
  1702.   def battle_actions2
  1703.     weapon = $data_weapons[@weapon2_id]
  1704.     return weapon != nil ? weapon.battle_actions : BattleActions::Actions["通常攻撃"]
  1705.   end
  1706.   #--------------------------------------------------------------------------
  1707.   # ● 武器アニメーション取得
  1708.   #--------------------------------------------------------------------------
  1709.   def weapon_anime1
  1710.     weapon = $data_weapons[@weapon_id]
  1711.     return weapon != nil ? weapon.icon_name : ""
  1712.   end
  1713.   #--------------------------------------------------------------------------
  1714.   # ● 武器アニメーション取得
  1715.   #--------------------------------------------------------------------------
  1716.   def weapon_anime2
  1717.     weapon = $data_weapons[@weapon2_id]
  1718.     return weapon != nil ? weapon.icon_name : ""
  1719.   end
  1720.   #--------------------------------------------------------------------------
  1721.   # ● 遠距離アニメーション取得
  1722.   #--------------------------------------------------------------------------
  1723.   def flying_anime1
  1724.     weapon = $data_weapons[@weapon_id]
  1725.     return weapon != nil ? weapon.flying_anime : [0,0,false,false]
  1726.   end
  1727.   #--------------------------------------------------------------------------
  1728.   # ● 遠距離アニメーション取得
  1729.   #--------------------------------------------------------------------------
  1730.   def flying_anime2
  1731.     weapon = $data_weapons[@weapon2_id]
  1732.     return weapon != nil ? weapon.flying_anime : [0,0,false,false]
  1733.   end
  1734.   #--------------------------------------------------------------------------
  1735.   # ● 移動目標座標の計算
  1736.   #--------------------------------------------------------------------------
  1737.   def move_setup
  1738.     if RTAB
  1739.       targets = @target
  1740.     else
  1741.       targets = $scene.target_battlers
  1742.     end
  1743.     case @move_action[0]
  1744.     when "self" # 自分
  1745.       @target_x = self.base_x
  1746.       @target_y = self.base_y
  1747.     when "target_near" # 一番近くのターゲット
  1748.       targets.sort!{|a,b| a.screen_x<=>b.screen_x }
  1749.       targets.reverse!
  1750.       if targets != []
  1751.         @target_x = targets[0].screen_x
  1752.         @target_y = targets[0].screen_y
  1753.       else
  1754.         @target_x = self.base_x
  1755.         @target_y = self.base_y
  1756.       end
  1757.     when "target_far" # 一番遠くのターゲット
  1758.       targets.sort!{|a,b| a.screen_x<=>b.screen_x }
  1759.       if targets != []
  1760.         @target_x = targets[0].screen_x
  1761.         @target_y = targets[0].screen_y
  1762.       else
  1763.         @target_x = self.base_x
  1764.         @target_y = self.base_y
  1765.       end
  1766.     when "target" # ターゲット中央
  1767.       @target_x = 0
  1768.       @target_y = 0
  1769.       for t in targets
  1770.         @target_x += t.screen_x
  1771.         @target_y += t.screen_y
  1772.       end
  1773.       if targets != []
  1774.         @target_x /= targets.size
  1775.         @target_y /= targets.size
  1776.       end
  1777.     when "troop" # "トループ中央"
  1778.       @target_x = 0
  1779.       @target_y = 0
  1780.       for t in $game_troop.enemies
  1781.         @target_x += t.screen_x
  1782.         @target_y += t.screen_y
  1783.       end
  1784.       if $game_troop.enemies != []
  1785.         @target_x /= $game_troop.enemies.size
  1786.         @target_y /= $game_troop.enemies.size
  1787.       end
  1788.     when "party" # "パーティ中央"
  1789.       @target_x = 0
  1790.       @target_y = 0
  1791.       for t in $game_party.actors
  1792.         @target_x += t.screen_x
  1793.         @target_y += t.screen_y
  1794.       end
  1795.       if $game_party.actors != []
  1796.         @target_x /= $game_party.actors.size
  1797.         @target_y /= $game_party.actors.size
  1798.       end
  1799.     when "screen" # "画面"
  1800.       @target_x = self.base_x
  1801.       @target_y = self.base_y
  1802.     end
  1803.     # 補正
  1804.     @target_x += @move_action[1] - self.base_x
  1805.     @target_y += @move_action[2] - self.base_y
  1806.     # 移動目標の座標をセット
  1807.     @move_coordinates = [@target_x.to_i,@target_y.to_i,@move_coordinates[0],@move_coordinates[1]]
  1808.     # 距離の計算(ウエイトの設定)
  1809.     @move_wait     = (@move_coordinates[2] - @move_coordinates[0]).abs +
  1810.                      (@move_coordinates[3] - @move_coordinates[1]).abs
  1811.   end
  1812. end
  1813. #==============================================================================
  1814. # ■ Game_Enemy
  1815. #==============================================================================
  1816. class Game_Enemy < Game_Battler
  1817.   attr_reader   :nce
  1818.   #--------------------------------------------------------------------------
  1819.   # ● セットアップ
  1820.   #--------------------------------------------------------------------------
  1821.   alias side_view_initialize initialize
  1822.   def initialize(troop_id, member_index)
  1823.     side_view_initialize(troop_id, member_index)
  1824.     start_battle
  1825.     @nce = NOT_CHARACTER_EMEMY.include? @enemy_id
  1826.     @weapon_id  = EMEMY_WEAPO[@enemy_id] != nil ? EMEMY_WEAPO[@enemy_id] : 0
  1827.     @weapon_id2  = EMEMY_WEAPO2[@enemy_id] != nil ? EMEMY_WEAPO2[@enemy_id] : 0
  1828.   end
  1829.   def character_name
  1830.     return self.battler_name
  1831.   end
  1832.   def character_hue
  1833.     return self.battler_hue
  1834.   end
  1835.   #--------------------------------------------------------------------------
  1836.   # ● 移動
  1837.   #--------------------------------------------------------------------------
  1838.   def move
  1839.     # 距離の計算
  1840.     @move_distance = (@move_coordinates[2] - @move_coordinates[0]).abs +
  1841.                      (@move_coordinates[3] - @move_coordinates[1]).abs
  1842.     if @move_distance > 0
  1843.       return if @ox == @move_coordinates[0] and @oy == @move_coordinates[1]
  1844.       array = @move_coordinates
  1845.       # ジャンプ補正値の計算
  1846.       if @move_distance - @move_wait > @move_distance / 2
  1847.         jump = (@move_action[4] * @move_wait / @move_distance.to_f)**2        
  1848.       else
  1849.         jump = (@move_action[4] * (@move_distance - @move_wait) / @move_distance.to_f)**2
  1850.       end
  1851.       jump = @move_action[4] > 0 ? -jump : jump
  1852.       #jump = 0 if @weapon_id + @weapon_id2 == 0 #去除敌人判断跳跃
  1853.       @ox = (array[2] + 1.0 * (array[0] - array[2]) * (@move_distance - @move_wait) / @move_distance.to_f).to_i
  1854.       @oy = (array[3] + 1.0 * (array[1] - array[3]) * (@move_distance - @move_wait) / @move_distance.to_f + jump).to_i
  1855.       # ウエイト
  1856.       @move_wait -= @move_action[3]
  1857.       @move_wait = [@move_wait,0].max
  1858.     end
  1859.   end
  1860.   #--------------------------------------------------------------------------
  1861.   # ● 武器アニメタイプ
  1862.   #--------------------------------------------------------------------------
  1863.   def weapon_anime_type(type)
  1864.     file_name  = weapon_anime_type0(type)
  1865.     visible   = weapon_anime_type1(type)
  1866.     z         = weapon_anime_type2(type)
  1867.     return [file_name,visible,z]
  1868.   end
  1869.   # 武器アイコン取得
  1870.   def weapon_anime_type0(type)
  1871.     type = ANIME[type][5]
  1872.     return weapon_anime1 if type == "右手"
  1873.     return weapon_anime2 if type == "左手"
  1874.     return nil
  1875.   end
  1876.   # 表示・非表示の取得
  1877.   def weapon_anime_type1(type)
  1878.     return ANIME[type][3]
  1879.   end
  1880.   # バトラーより上に表示するかどうか
  1881.   def weapon_anime_type2(type)
  1882.     type = ANIME[type][5]
  1883.     return true if type == "左手"
  1884.     return false
  1885.   end

  1886.   #--------------------------------------------------------------------------
  1887.   # ● 移動目標座標の計算
  1888.   #--------------------------------------------------------------------------
  1889.   def move_setup
  1890.     if RTAB
  1891.       targets = @target
  1892.     else
  1893.       targets = $scene.target_battlers
  1894.     end
  1895.     case @move_action[0]
  1896.     when "self" # 自分
  1897.       @target_x = self.base_x
  1898.       @target_y = self.base_y
  1899.     when "target_near" # 一番近くのターゲット
  1900.       targets.sort!{|a,b| a.screen_x<=>b.screen_x }
  1901.       if targets != []
  1902.         @target_x = targets[0].screen_x
  1903.         @target_y = targets[0].screen_y
  1904.       else
  1905.         @target_x = self.base_x
  1906.         @target_y = self.base_y
  1907.       end
  1908.     when "target_far" # 一番遠くのターゲット
  1909.       targets.sort!{|a,b| a.screen_x<=>b.screen_x }
  1910.       targets.reverse!
  1911.       if targets != []
  1912.         @target_x = targets[0].screen_x
  1913.         @target_y = targets[0].screen_y
  1914.       else
  1915.         @target_x = self.base_x
  1916.         @target_y = self.base_y
  1917.       end
  1918.     when "target" # ターゲット中央
  1919.       @target_x = 0
  1920.       @target_y = 0
  1921.       for t in targets
  1922.         @target_x += t.screen_x
  1923.         @target_y += t.screen_y
  1924.       end
  1925.       if targets != []
  1926.         @target_x /= targets.size
  1927.         @target_y /= targets.size
  1928.       end
  1929.     when  "party" # "トループ中央"
  1930.       @target_x = 0
  1931.       @target_y = 0
  1932.       for t in $game_troop.enemies
  1933.         @target_x += t.screen_x
  1934.         @target_y += t.screen_y
  1935.       end
  1936.       if $game_troop.enemies != []
  1937.         @target_x /= $game_troop.enemies.size
  1938.         @target_y /= $game_troop.enemies.size
  1939.       end
  1940.     when "troop" # "パーティ中央"
  1941.       @target_x = 0
  1942.       @target_y = 0
  1943.       for t in $game_party.actors
  1944.         @target_x += t.screen_x
  1945.         @target_y += t.screen_y
  1946.       end
  1947.       if $game_party.actors != []
  1948.         @target_x /= $game_party.actors.size
  1949.         @target_y /= $game_party.actors.size
  1950.       end
  1951.     when "screen" # "画面"
  1952.       @target_x = self.base_x
  1953.       @target_y = self.base_y
  1954.     end
  1955.     # 補正
  1956.     @target_x -= @move_action[1] + self.base_x
  1957.     @target_y -= @move_action[2] + self.base_y
  1958.     # 移動目標の座標をセット
  1959.     @move_coordinates = [@target_x.to_i,@target_y.to_i,@move_coordinates[0],@move_coordinates[1]]
  1960.     # 距離の計算(ウエイトの設定)
  1961.     @move_wait     = (@move_coordinates[2] - @move_coordinates[0]).abs +
  1962.                      (@move_coordinates[3] - @move_coordinates[1]).abs
  1963.   end
  1964.   if RTAB
  1965.   alias original_x true_x
  1966.   alias original_y true_y
  1967.   else
  1968.   alias original_x screen_x
  1969.   alias original_y screen_y
  1970.   end
  1971.   #--------------------------------------------------------------------------
  1972.   # ● バトル画面 X 座標の取得(カメラ補正無し)
  1973.   #--------------------------------------------------------------------------
  1974.   def true_x
  1975.     return original_x + @ox
  1976.   end
  1977.   #--------------------------------------------------------------------------
  1978.   # ● バトル画面 Y 座標の取得(カメラ補正無し)
  1979.   #--------------------------------------------------------------------------
  1980.   def true_y
  1981.     return original_y - @height / 2 + @oy
  1982.   end
  1983.   #--------------------------------------------------------------------------
  1984.   # ● バトル画面 X 座標の取得
  1985.   #--------------------------------------------------------------------------
  1986.   def screen_x(true_x = self.true_x)
  1987.     return true_x * @real_zoom + @real_x
  1988.   end
  1989.   #--------------------------------------------------------------------------
  1990.   # ● バトル画面 Y 座標の取得
  1991.   #--------------------------------------------------------------------------
  1992.   def screen_y(true_y = self.true_y)
  1993.     return true_y * @real_zoom + @real_y
  1994.   end
  1995.   #--------------------------------------------------------------------------
  1996.   # ● バトル画面 X 座標の取得(移動などしていない場合)
  1997.   #--------------------------------------------------------------------------
  1998.   def base_x(true_x = self.true_x)
  1999.     return (true_x - @ox) * @real_zoom + @real_x
  2000.   end
  2001.   #--------------------------------------------------------------------------
  2002.   # ● バトル画面 Y 座標の取得(移動などしていない場合)
  2003.   #--------------------------------------------------------------------------
  2004.   # ● アニメーション取得
  2005.   #--------------------------------------------------------------------------
  2006.   def battle_actions1
  2007.     weapon = $data_weapons[@weapon_id]
  2008.     return weapon != nil ? weapon.battle_actions : BattleActions::Actions["通常攻撃"]
  2009.   end
  2010.   #--------------------------------------------------------------------------
  2011.   # ● アニメーション取得
  2012.   #--------------------------------------------------------------------------
  2013.   def battle_actions2
  2014.     weapon = $data_weapons[@weapon2_id]
  2015.     return weapon != nil ? weapon.battle_actions : BattleActions::Actions["通常攻撃"]
  2016.   end
  2017.   #--------------------------------------------------------------------------
  2018.   # ● 武器アニメーション取得
  2019.   #--------------------------------------------------------------------------
  2020.   def weapon_anime1
  2021.     weapon = $data_weapons[@weapon_id]
  2022.     return weapon != nil ? weapon.icon_name : ""
  2023.   end
  2024.   #--------------------------------------------------------------------------
  2025.   # ● 武器アニメーション取得
  2026.   #--------------------------------------------------------------------------
  2027.   def weapon_anime2
  2028.     weapon = $data_weapons[@weapon2_id]
  2029.     return weapon != nil ? weapon.icon_name : ""
  2030.   end
  2031.   #--------------------------------------------------------------------------
  2032.   # ● 遠距離アニメーション取得
  2033.   #--------------------------------------------------------------------------
  2034.   def flying_anime1
  2035.     weapon = $data_weapons[@weapon_id]
  2036.     return weapon != nil ? weapon.flying_anime : [0,0,false,false]
  2037.   end
  2038.   #--------------------------------------------------------------------------
  2039.   # ● 遠距離アニメーション取得
  2040.   #--------------------------------------------------------------------------
  2041.   def flying_anime2
  2042.     weapon = $data_weapons[@weapon2_id]
  2043.     return weapon != nil ? weapon.flying_anime : [0,0,false,false]
  2044.   end
  2045.   def base_y(true_y = self.true_y)
  2046.     return (true_y - @oy) * @real_zoom + @real_y
  2047.   end
  2048.   #--------------------------------------------------------------------------

  2049.   
  2050.   
  2051.   #--------------------------------------------------------------------------
  2052.   # ● アニメーション取得
  2053.   #--------------------------------------------------------------------------
  2054.   def battle_actions1
  2055.     weapon = $data_weapons[@weapon_id]
  2056.     return weapon != nil ? weapon.battle_actions : BattleActions::Actions["通常攻撃"]
  2057.   end
  2058.   #--------------------------------------------------------------------------
  2059.   # ● アニメーション取得
  2060.   #--------------------------------------------------------------------------
  2061.   def battle_actions2
  2062.     weapon = $data_weapons[@weapon2_id]
  2063.     return weapon != nil ? weapon.battle_actions : BattleActions::Actions["通常攻撃"]
  2064.   end
  2065.   #--------------------------------------------------------------------------
  2066.   # ● 武器アニメーション取得
  2067.   #--------------------------------------------------------------------------
  2068.   def weapon_anime1
  2069.     weapon = $data_weapons[@weapon_id]
  2070.     return weapon != nil ? weapon.icon_name : ""
  2071.   end
  2072.   #--------------------------------------------------------------------------
  2073.   # ● 武器アニメーション取得
  2074.   #--------------------------------------------------------------------------
  2075.   def weapon_anime2
  2076.     weapon = $data_weapons[@weapon2_id]
  2077.     return weapon != nil ? weapon.icon_name : ""
  2078.   end
  2079.   #--------------------------------------------------------------------------
  2080.   # ● 遠距離アニメーション取得
  2081.   #--------------------------------------------------------------------------
  2082.   def flying_anime1
  2083.     weapon = $data_weapons[@weapon_id]
  2084.     return weapon != nil ? weapon.flying_anime : [0,0,false,false]
  2085.   end
  2086.   #--------------------------------------------------------------------------
  2087.   # ● 遠距離アニメーション取得
  2088.   #--------------------------------------------------------------------------
  2089.   def flying_anime2
  2090.     weapon = $data_weapons[@weapon2_id]
  2091.     return weapon != nil ? weapon.flying_anime : [0,0,false,false]
  2092.   end  
  2093. end
  2094. #==============================================================================
  2095. # ■ Game_Party
  2096. #==============================================================================
  2097. class Game_Party
  2098.   #--------------------------------------------------------------------------
  2099.   # ● アクターを加える
  2100.   #     actor_id : アクター ID
  2101.   #--------------------------------------------------------------------------
  2102.   alias side_view_add_actor add_actor
  2103.   def add_actor(actor_id)
  2104.     # アクターを取得
  2105.     actor = $game_actors[actor_id]
  2106.     # サイドビューデータの初期化
  2107.     actor.start_battle
  2108.     # 戻す
  2109.     side_view_add_actor(actor_id)
  2110.   end
  2111. end

  2112. class Spriteset_Battle
  2113.   include Side_view
  2114.   #--------------------------------------------------------------------------
  2115.   # ● オブジェクト初期化
  2116.   #--------------------------------------------------------------------------
  2117.   alias side_veiw_initialize initialize
  2118.   def initialize
  2119.     side_veiw_initialize
  2120.     # アクタースプライトを解放
  2121.     for sprite in @actor_sprites
  2122.       sprite.dispose
  2123.     end
  2124.     # アクタースプライトを作成
  2125.     @actor_sprites = []
  2126.     for i in 1..Party_max
  2127.       @actor_sprites.push(Sprite_Battler.new(@viewport1))
  2128.     end
  2129.     update
  2130.   end
  2131.   #--------------------------------------------------------------------------
  2132.   # ● 画面のスクロール
  2133.   #--------------------------------------------------------------------------
  2134.   if method_defined?("screen_scroll")
  2135.   alias side_view_screen_scroll screen_scroll
  2136.   def screen_scroll
  2137.     side_view_screen_scroll
  2138.     # アクターの位置補正
  2139.     for actor in $game_party.actors
  2140.       actor.real_x = @real_x
  2141.       actor.real_y = @real_y
  2142.       actor.real_zoom = @real_zoom
  2143.     end
  2144.   end
  2145.   end
  2146. end

  2147. class Sprite_Battler < RPG::Sprite
  2148.   include Side_view
  2149.   #--------------------------------------------------------------------------
  2150.   # ● オブジェクト初期化
  2151.   #     viewport : ビューポート
  2152.   #     battler  : バトラー (Game_Battler)
  2153.   #--------------------------------------------------------------------------
  2154.   def initialize(viewport, battler = nil)
  2155.     super(viewport)
  2156.     @battler = battler
  2157.     @battler_visible = false
  2158.     @weapon = Sprite_Weapon.new(viewport, battler)
  2159.     @flying = Sprite_Flying.new(viewport, battler)
  2160.     @shadow = []
  2161.     @fly = 0
  2162.     @fly_direction = 1
  2163.     @rand = rand(10)
  2164.     self.effect_clear
  2165.   end
  2166.   #--------------------------------------------------------------------------
  2167.   # ● 解放
  2168.   #--------------------------------------------------------------------------
  2169.   alias side_view_dispose dispose
  2170.   def dispose
  2171.     side_view_dispose
  2172.     @weapon.dispose
  2173.     @flying.dispose
  2174.     if @_target_sprite != nil
  2175.       @_target_sprite.bitmap.dispose
  2176.       @_target_sprite.dispose
  2177.       @_target_sprite = nil
  2178.     end
  2179.   end
  2180.   #--------------------------------------------------------------------------
  2181.   # ● フレーム更新
  2182.   #--------------------------------------------------------------------------
  2183.   def update
  2184.     super
  2185.     # バトラーが nil の場合
  2186.     if @battler == nil
  2187.       self.bitmap = nil
  2188.       @weapon.bitmap = nil
  2189.       loop_animation(nil)
  2190.       return
  2191.     end
  2192.     # バトラー更新
  2193.     @battler.update
  2194.     # バトラーアニメのデータ取得
  2195.     @anime_type = @battler.anime_type
  2196.     # ファイル名か色相が現在のものと異なる場合
  2197.     if @battler.is_a?(Game_Actor) or (!@battler.is_a?(Game_Actor) and !@battler.nce)
  2198.       change = (@battler.character_name != @battler_name or @battler.character_hue != @battler_hue)
  2199.     elsif @battler.is_a?(Game_Enemy)
  2200.       change = (@battler.battler_name != @battler_name or @battler.battler_hue != @battler_hue)
  2201.     else
  2202.       return
  2203.     end
  2204.     if change
  2205.       # ビットマップを取得、設定
  2206.       if @battler.is_a?(Game_Actor) or (!@battler.is_a?(Game_Actor) and !@battler.nce)
  2207.         @battler_name = @battler.character_name
  2208.         @battler_hue = @battler.character_hue
  2209.         self.bitmap = RPG::Cache.character(@battler_name, @battler_hue)
  2210.         @width = bitmap.width / 4
  2211.         @height = bitmap.height / 4
  2212.       else
  2213.         @battler_name = @battler.battler_name
  2214.         @battler_hue = @battler.battler_hue
  2215.         self.bitmap = RPG::Cache.battler(@battler_name, @battler_hue)
  2216.         @width = bitmap.width
  2217.         @height = bitmap.height
  2218.       end
  2219.       self.ox = @width / 2
  2220.       self.oy = @height / 2
  2221.       @battler.height = @height
  2222.       @flag = true
  2223.       # 戦闘不能または隠れ状態なら不透明度を 0 にする
  2224.       if @battler.dead? or @battler.hidden
  2225.         self.opacity = 0
  2226.       end
  2227.     end
  2228.     if (@battler.is_a?(Game_Actor) and
  2229.       (@battler.anime_type != @anime_type or @battler.pattern != @pattern or @flag)) or
  2230.       (!@battler.is_a?(Game_Actor) and !@battler.nce)
  2231.       # ビットマップを取得、設定
  2232.       @pattern = @battler.pattern
  2233.       self.ox = @width / 2
  2234.       self.oy = @height / 2
  2235.       @sx = @pattern * @width
  2236.       sy = @anime_type % 4 * @height
  2237.       x   = sy / (@height * 2) + 4
  2238.       if !@battler.is_a?(Game_Actor) and !@battler.nce and x == 4
  2239.         x = 6
  2240.       end    # here!!
  2241.       @sy = (x - 2) / 2 * @height
  2242.       self.src_rect.set(@sx, @sy, @width, @height)
  2243.       self.zoom_x = CHAR_ZOOM
  2244.       self.zoom_y = CHAR_ZOOM
  2245.       @battler.height = @height
  2246.       @flag = false
  2247.     end
  2248.     # 飛行
  2249.     update_fly
  2250.     # シェイク
  2251.     update_shake
  2252.     # 回転
  2253.     update_turning
  2254.     # 反転
  2255.     update_reverse   
  2256.     # 移動
  2257.     update_moving
  2258.     # 追加アニメ
  2259.     update_add_anime
  2260.     # エフェクト効果の適用
  2261.     update_effect
  2262.     # アニメーション ID が現在のものと異なる場合
  2263.     flag = RTAB ? true : @battler.damage == nil
  2264.     if flag and @battler.state_animation_id != @state_animation_id
  2265.       @state_animation_id = @battler.state_animation_id
  2266.       loop_animation($data_animations[@state_animation_id])
  2267.     end
  2268.     # シェイク
  2269.     if @battler.shake
  2270.       self.start_shake(5, 5, 5)
  2271.       @battler.shake = false
  2272.     end
  2273.     # 明滅
  2274.     if @battler.blink
  2275.       blink_on
  2276.     else
  2277.       blink_off
  2278.     end
  2279.     # 不可視の場合
  2280.     unless @battler_visible
  2281.       flag = RTAB ? (@battler.damage.size < 2 or @battler.damage_pop.size < 2) :
  2282.                     (@battler.damage == nil or @battler.damage_pop)
  2283.       # 出現
  2284.       if not @battler.hidden and not @battler.dead? and flag
  2285.         appear
  2286.         @battler_visible = true
  2287.       end
  2288.     end
  2289.     if RTAB
  2290.     # ダメージ
  2291.     for battler in @battler.damage_pop
  2292.       if battler[0].class == Array
  2293.         if battler[0][1] >= 0
  2294.           $scene.skill_se
  2295.         else
  2296.           $scene.levelup_se
  2297.         end
  2298.         damage(@battler.damage[battler[0]], false, 2)
  2299.       else
  2300.         damage(@battler.damage[battler[0]], @battler.critical[battler[0]])
  2301.       end
  2302.       if @battler.damage_sp.include?(battler[0])
  2303.         damage(@battler.damage_sp[battler[0]],
  2304.                 @battler.critical[battler[0]], 1)
  2305.         @battler.damage_sp.delete(battler[0])
  2306.       end
  2307.       @battler.damage_pop.delete(battler[0])
  2308.       @battler.damage.delete(battler[0])
  2309.       @battler.critical.delete(battler[0])
  2310.     end
  2311.     end
  2312.     # 可視の場合
  2313.     if @battler_visible
  2314.       # 武器アニメ
  2315.       @weapon.battler = @battler
  2316.       @weapon.update
  2317.       # 遠距離アニメ
  2318.       @flying.battler = @battler
  2319.       @flying.update
  2320.       # 逃走
  2321.       if @battler.hidden
  2322.         $game_system.se_play($data_system.escape_se)
  2323.         escape
  2324.         @battler_visible = false
  2325.       end
  2326.       # 白フラッシュ
  2327.       if @battler.white_flash
  2328.         whiten
  2329.         @battler.white_flash = false
  2330.       end
  2331.       if RTAB
  2332.         # アニメーション
  2333.         if !@battler.animation.empty?
  2334.           for animation in @battler.animation.reverse
  2335.             if animation[2]
  2336.               animation($data_animations[animation[0]], animation[1], true)
  2337.             else
  2338.               animation($data_animations[animation[0]], animation[1])
  2339.             end
  2340.             @battler.animation.delete(animation)
  2341.           end
  2342.         end
  2343.         else
  2344.         # アニメーション
  2345.         if @battler.animation_id != 0
  2346.           animation = $data_animations[@battler.animation_id]
  2347.           if !$rt_damage.empty?
  2348.             animation(animation , @battler.animation_hit)
  2349.           else
  2350.             animation(animation , @battler.animation_hit)
  2351.           end
  2352.           @battler.animation_id = 0
  2353.         end
  2354.       end
  2355.       # 技能
  2356.       if !RTAB and @battler.damagetemp_pop
  2357.         damagetemp(@battler.damage, @battler.critical)
  2358.         @battler.damagetemp_pop = false
  2359.       end
  2360.       # hit
  2361.       if !RTAB and @battler.hit_pop
  2362.         hit($rt_hit)
  2363.         @battler.hit_pop = false
  2364.       end
  2365.       # ダメージ
  2366.       if !RTAB and @battler.damage_pop
  2367.         damage(@battler.damage, @battler.critical)
  2368.         @battler.damage = nil
  2369.         @battler.critical = false
  2370.         @battler.damage_pop = false
  2371.       end
  2372.       flag = RTAB ? (@battler.damage.empty? and $scene.dead_ok?(@battler)) :
  2373.                      @battler.damage == nil
  2374.       # コラプス
  2375.       if flag and @battler.dead?
  2376.         if @battler.is_a?(Game_Actor)
  2377.           $game_system.se_play($data_system.actor_collapse_se)
  2378.         elsif @battler.is_a?(Game_Enemy)
  2379.           $game_system.se_play($data_system.enemy_collapse_se)
  2380.         end
  2381.         collapse
  2382.         @battler_visible = false
  2383.       end
  2384.     end
  2385.     # スプライトの座標を設定
  2386.     self.x = @battler.screen_x + @effect_ox
  2387.     self.y = @battler.screen_y + @effect_oy
  2388.     self.z = @battler.screen_z
  2389.     self.zoom_x = @battler.real_zoom
  2390.     self.zoom_y = @battler.real_zoom
  2391.     # ウェイトカウントを減らす
  2392.     @battler.wait_count -= 1
  2393.     @battler.wait_count2 -= 1
  2394.     # アニメーション待ち時間取得
  2395.     @battler.animation_duration = @_animation_duration
  2396.     if @battler.is_a?(Game_Actor) or (!@battler.is_a?(Game_Actor) and !@battler.nce)
  2397.       self.zoom_x *= CHAR_ZOOM
  2398.       self.zoom_y *= CHAR_ZOOM
  2399.       @weapon.x = self.x + 2
  2400.       @weapon.y = self.y + 6
  2401.       @weapon.angle = 75 - (4 - @battler.pattern) * 45
  2402.       if self.mirror
  2403.         @weapon.angle += @weapon.angle - 180
  2404.       end
  2405.       if (!@battler.is_a?(Game_Actor) and !@battler.nce)
  2406.         @weapon.angle = -@weapon.angle-90
  2407.       end
  2408.     end
  2409.     # 残像
  2410.     if @battler.shadow
  2411.       if Graphics.frame_count % 2 == 0
  2412.         shadow = ::Sprite.new(self.viewport)
  2413.         shadow.bitmap = self.bitmap.dup
  2414.         shadow.x = self.x
  2415.         shadow.y = self.y
  2416.         shadow.ox = self.ox
  2417.         shadow.oy = self.oy
  2418.         shadow.mirror = self.mirror
  2419.         shadow.angle = self.angle
  2420.         shadow.opacity = 160
  2421.         shadow.zoom_x = self.zoom_x
  2422.         shadow.zoom_y = self.zoom_y
  2423.         if @battler.is_a?(Game_Actor) or (!@battler.is_a?(Game_Actor) and !@battler.nce)
  2424.           shadow.src_rect.set(@sx, @sy, @width, @height)
  2425.         else
  2426.           shadow.src_rect.set(0, 0, @width, @height)
  2427.         end
  2428.         @shadow.push([shadow,duration = 10,@battler.true_x + @effect_ox,@battler.true_y + @effect_oy])
  2429.       end
  2430.     end
  2431.     for s in @shadow
  2432.       if !s[0].disposed?
  2433.         s[0].update
  2434.         s[1] -= 1
  2435.         if s[1] < 1
  2436.           if s[0].bitmap != nil
  2437.             s[0].bitmap.dispose
  2438.           end
  2439.           s[0].dispose
  2440.         else
  2441.           s[0].x = @battler.screen_x(s[2])
  2442.           s[0].y = @battler.screen_y(s[3])
  2443.         end
  2444.       else
  2445.         s = nil
  2446.       end
  2447.     end
  2448.     @shadow.compact!
  2449.   end
  2450.   #--------------------------------------------------------------------------
  2451.   # ● エフェクトによる座標系の更新
  2452.   #--------------------------------------------------------------------------
  2453.   def update_effect
  2454.     # 角度の修正
  2455.     if @_upside_down
  2456.       self.angle = (@_turning + 180) % 360
  2457.     else
  2458.       self.angle = @_turning
  2459.     end
  2460.     # X 座標の修正値
  2461.     @effect_ox = @_shake + @_moving[0]
  2462.     # Y 座標の修正値
  2463.     @effect_oy = -@fly + @_moving[1]
  2464.     if  @_animation == nil or (RTAB and @_animation.empty?)
  2465.       self.effect_clear
  2466.     end
  2467.   end
  2468.   #--------------------------------------------------------------------------
  2469.   # ● シェイク更新
  2470.   #--------------------------------------------------------------------------
  2471.   def update_shake
  2472.     if @_shake_duration >= 1 or @_shake != 0
  2473.       delta = (@_shake_power * @_shake_speed * @_shake_direction) / 10.0
  2474.       if @_shake_duration <= 1 and @_shake * (@_shake + delta) < 0
  2475.         @_shake = 0
  2476.       else
  2477.         @_shake += delta
  2478.       end
  2479.       if @_shake > @_shake_power * 2
  2480.         @_shake_direction = -1
  2481.       end
  2482.       if @_shake < - @_shake_power * 2
  2483.         @_shake_direction = 1
  2484.       end
  2485.       if @_shake_duration >= 1
  2486.         @_shake_duration -= 1
  2487.       end
  2488.     end
  2489.   end
  2490.   #--------------------------------------------------------------------------
  2491.   # ● 飛行更新
  2492.   #--------------------------------------------------------------------------
  2493.   def update_fly
  2494.     if @rand > 0
  2495.       @rand -= 1
  2496.       return
  2497.     end
  2498.     if @battler.fly != 0
  2499.       if @fly < @battler.fly / 4
  2500.         @fly_direction = 1
  2501.       elsif @fly > @battler.fly / 2
  2502.         @fly_direction = -1
  2503.       end
  2504.       @fly += 0.5 * @fly_direction
  2505.     end
  2506.   end
  2507.   #--------------------------------------------------------------------------
  2508.   # ● 回転更新
  2509.   #--------------------------------------------------------------------------
  2510.   def update_turning
  2511.     if @_turning_duration > 0 or @_turning != 0
  2512.       @_turning += @_turning_direction * @_turning_speed / 2.0
  2513.       # 残り回転数を減らす
  2514.       if @_turning_direction == -1
  2515.         if @_turning_duration > 0 and @_turning < 0
  2516.           @_turning_duration -= 1
  2517.         end
  2518.       elsif @_turning_direction == 1
  2519.         if @_turning_duration > 0 and @_turning >= 360
  2520.           @_turning_duration -= 1
  2521.         end
  2522.       end
  2523.       # 以下補正
  2524.       while @_turning < 0
  2525.         @_turning += 360
  2526.       end
  2527.       if @_turning_duration <= 0
  2528.         @_turning = 0
  2529.       end
  2530.       @_turning %= 360
  2531.     end
  2532.   end
  2533.   #--------------------------------------------------------------------------
  2534.   # ● 左右反転更新
  2535.   #--------------------------------------------------------------------------
  2536.   def update_reverse
  2537.     if @last_reverse != (@_reverse or @battler.reverse)
  2538.       self.mirror = (@_reverse or @battler.reverse)
  2539.       @last_reverse = (@_reverse or @battler.reverse)
  2540.     end
  2541.   end
  2542.   #--------------------------------------------------------------------------
  2543.   # ● 移動更新
  2544.   #--------------------------------------------------------------------------
  2545.   def update_moving
  2546.     @move_distance = (@_move_coordinates[2] - @_move_coordinates[0]).abs +
  2547.                      (@_move_coordinates[3] - @_move_coordinates[1]).abs
  2548.     if @move_distance > 0
  2549.       return if @_moving[0] == @_move_coordinates[0] and @_moving[1] == @_move_coordinates[1]
  2550.       array = @_move_coordinates
  2551.       x = (array[2] + 1.0 * (array[0] - array[2]) * (@move_distance - @_move_duration) / @move_distance.to_f).to_i
  2552.       y = (array[3] + 1.0 * (array[1] - array[3]) * (@move_distance - @_move_duration) / @move_distance.to_f).to_i
  2553.       @_moving = [x, y]
  2554.       if @_move_quick_return and @_move_duration == 0
  2555.         @_move_coordinates = [0,0,array[0],array[1]]
  2556.         @_move_duration = @move_distance
  2557.       end
  2558.       @_move_duration -= @_move_speed
  2559.       @_move_duration = [@_move_duration, 0].max
  2560.     end
  2561.   end
  2562.   #--------------------------------------------------------------------------
  2563.   # ● 追加アニメ更新 (RTAB限定機能)
  2564.   #--------------------------------------------------------------------------
  2565.   def update_add_anime
  2566.     if RTAB
  2567.     # アニメーション
  2568.     if @_add_anime_id != 0
  2569.       animation = $data_animations[@_add_anime_id]
  2570.       animation(animation, true)
  2571.       @_add_anime_id = 0
  2572.     end
  2573.     end
  2574.   end
  2575.   #--------------------------------------------------------------------------
  2576.   # ● エフェクト初期化
  2577.   #--------------------------------------------------------------------------
  2578.   def effect_clear
  2579.     @_effect_ox = 0
  2580.     @_effect_oy = 0
  2581.     @_shake_power = 0
  2582.     @_shake_speed = 0
  2583.     @_shake_duration = 0
  2584.     @_shake_direction = 1
  2585.     @_shake = 0
  2586.     @_upside_down = false
  2587.     @_reverse = false
  2588.     @_turning_direction = 1
  2589.     @_turning_speed = 0
  2590.     @_turning_duration = 0
  2591.     @_turning = 0
  2592.     @_move_quick_return = true
  2593.     @_move_speed = 0
  2594.     @_move_coordinates = [0,0,0,0]
  2595.     @_move_jump = false
  2596.     @_move_duration = 0
  2597.     @_moving = [0,0]
  2598.     @_add_anime_id = 0
  2599.   end
  2600.   #--------------------------------------------------------------------------
  2601.   # ● シェイクの開始
  2602.   #     power    : 強さ
  2603.   #     speed    : 速さ
  2604.   #     duration : 時間
  2605.   #--------------------------------------------------------------------------
  2606.   def start_shake(power, speed, duration)
  2607.     @_shake_power = power
  2608.     @_shake_speed = speed
  2609.     @_shake_duration = duration
  2610.   end
  2611.   #--------------------------------------------------------------------------
  2612.   # ● 上下反転を開始
  2613.   #--------------------------------------------------------------------------
  2614.   def start_upside_down
  2615.     @_upside_down = @_upside_down ? false : true
  2616.   end
  2617.   #--------------------------------------------------------------------------
  2618.   # ● 左右反転を開始
  2619.   #--------------------------------------------------------------------------
  2620.   def start_reverse
  2621.     @_reverse = @_reverse ? false : true
  2622.   end
  2623.   #--------------------------------------------------------------------------
  2624.   # ● 回転を開始
  2625.   #     direction: 方向
  2626.   #     speed    : 速さ
  2627.   #     duration : 時間
  2628.   #--------------------------------------------------------------------------
  2629.   def start_turning(direction, speed, duration)
  2630.     @_turning_direction = direction
  2631.     @_turning_speed = speed
  2632.     @_turning_duration = duration
  2633.     @_turning = @_turning_direction == 1 ? 0 : 360
  2634.   end
  2635.   #--------------------------------------------------------------------------
  2636.   # ● 移動を開始
  2637.   #     quick_return : 戻るかどうか
  2638.   #     speed        : 速さ
  2639.   #     x            : X 座標
  2640.   #     y            : Y 座標
  2641.   #--------------------------------------------------------------------------
  2642.   def start_moving(quick_return, speed, x, y)
  2643.     @_move_quick_return = quick_return == 0 ? false : true
  2644.     @_move_speed = speed
  2645.     @_move_coordinates = [x,y,@_move_coordinates[0],@_move_coordinates[1]]
  2646.     distance = (@_move_coordinates[2] - @_move_coordinates[0]).abs +
  2647.                (@_move_coordinates[3] - @_move_coordinates[1]).abs
  2648.     @_move_duration = distance
  2649.   end
  2650.   #--------------------------------------------------------------------------
  2651.   # ● アニメ追加を開始
  2652.   #     id           : ID
  2653.   #     hit          : 命中フラッグ
  2654.   #--------------------------------------------------------------------------
  2655.   def start_add_anime(id)
  2656.     @_add_anime_id = id
  2657.   end
  2658.   #--------------------------------------------------------------------------
  2659.   # ● 各種エフェクトの開始判定
  2660.   #--------------------------------------------------------------------------
  2661.   if !method_defined?("side_view_animation_process_timing")
  2662.     alias side_view_animation_process_timing animation_process_timing
  2663.   end
  2664.   def animation_process_timing(timing, hit)
  2665.     side_view_animation_process_timing(timing, hit)
  2666.     if (timing.condition == 0) or
  2667.        (timing.condition == 1 and hit == true) or
  2668.        (timing.condition == 2 and hit == false)
  2669.       if timing.se.name =~ SHAKE_FILE
  2670.         names = timing.se.name.split(/#/)
  2671.         power    = names[1].nil? ? SHAKE_POWER    : names[1].to_i
  2672.         speed    = names[2].nil? ? SHAKE_SPEED    : names[2].to_i
  2673.         duration = names[3].nil? ? SHAKE_DURATION : names[3].to_i
  2674.         # シェイクを開始
  2675.         self.start_shake(power, speed, duration)
  2676.       end
  2677.       if timing.se.name == UPSIDE_DOWN_FILE
  2678.         # 上下反転を開始
  2679.         self.start_upside_down
  2680.       end
  2681.       if timing.se.name == REVERSE_FILE
  2682.         # 左右反転を開始
  2683.         self.start_reverse
  2684.       end
  2685.       if timing.se.name =~ TURNING_FILE
  2686.         names = timing.se.name.split(/#/)
  2687.         direction = names[1].nil? ? TURNING_DIRECTION : names[1].to_i
  2688.         speed     = names[2].nil? ? TURNING_SPEED     : names[2].to_i
  2689.         duration  = names[3].nil? ? TURNING_DURATION  : names[3].to_i
  2690.         # 回転を開始
  2691.         self.start_turning(direction, speed, duration)
  2692.       end
  2693.       if timing.se.name =~ MOVE_FILE
  2694.         names = timing.se.name.split(/#/)
  2695.         quick_return= names[1].nil? ? MOVE_RETURN      : names[1].to_i
  2696.         speed       = names[2].nil? ? MOVE_SPEED       : names[2].to_i
  2697.         x           = names[3].nil? ? MOVE_COORDINATES[0] : names[3].to_i
  2698.         y           = names[3].nil? ? MOVE_COORDINATES[1] : names[4].to_i
  2699.         # 移動を開始
  2700.         self.start_moving(quick_return, speed, x, y)
  2701.       end
  2702.       if timing.se.name =~ ADD_ANIME_FILE
  2703.         names = timing.se.name.split(/#/)
  2704.         id = names[1].nil? ? ADD_ANIME_ID      : names[1].to_i
  2705.         # アニメ追加を開始
  2706.         self.start_add_anime(id)
  2707.       end
  2708.     end
  2709.   end
  2710. end

  2711. #==============================================================================
  2712. # ■ Sprite_Weapon
  2713. #------------------------------------------------------------------------------
  2714. #  バトラー表示用のスプライトです。Game_Battler クラスのインスタンスを監視し、
  2715. # スプライトの状態を自動的に変化させます。
  2716. #==============================================================================

  2717. class Sprite_Weapon < RPG::Sprite
  2718.   include Side_view
  2719.   #--------------------------------------------------------------------------
  2720.   # ● 公開インスタンス変数
  2721.   #--------------------------------------------------------------------------
  2722.   attr_accessor :battler                  # バトラー
  2723.   attr_reader   :cw                       # グラフィックの幅
  2724.   attr_reader   :ch                       # グラフィックの高さ
  2725.   #--------------------------------------------------------------------------
  2726.   # ● オブジェクト初期化
  2727.   #     viewport : ビューポート
  2728.   #     battler  : バトラー (Game_Battler)
  2729.   #--------------------------------------------------------------------------
  2730.   def initialize(viewport, battler = nil)
  2731.     super(viewport)
  2732.     @battler = battler
  2733.     @battler_visible = false
  2734.   end
  2735.   #--------------------------------------------------------------------------
  2736.   # ● 解放
  2737.   #--------------------------------------------------------------------------
  2738.   def dispose
  2739.     if self.bitmap != nil
  2740.       self.bitmap.dispose
  2741.     end
  2742.     super
  2743.   end
  2744.   #--------------------------------------------------------------------------
  2745.   # ● フレーム更新
  2746.   #--------------------------------------------------------------------------
  2747.   def update
  2748.     super
  2749.     # バトラーが nil の場合
  2750.     if @battler == nil or (!@battler.is_a?(Game_Actor) and @battler.nce)
  2751.       self.bitmap = nil
  2752.       return
  2753.     end
  2754.     # ウエポンアニメのデータ取得
  2755.     @weapon_anime_type = @battler.weapon_anime_type(@battler.condition)
  2756.     # 設定が「非表示」の場合
  2757.     if !@weapon_anime_type[1] or @weapon_anime_type[0].nil?
  2758.       self.visible = false
  2759.       return
  2760.     else
  2761.       self.visible = true
  2762.     end
  2763.     # ファイル名が現在のものと異なる場合
  2764.     if @weapon_anime_type[0] != @weapon_name
  2765.       @weapon_name = @weapon_anime_type[0]
  2766.       # ビットマップを取得、設定
  2767.       self.bitmap = RPG::Cache.icon(@weapon_name)
  2768.       @width = bitmap.width
  2769.       @height = bitmap.height
  2770.       @flag = true
  2771.     end
  2772.     # 現在アニメパターンが現在のものと異なる場合
  2773.     if @pattern != @battler.pattern or @flag or @condition != @battler.condition
  2774.       @pattern = @battler.pattern
  2775.       @condition = @battler.condition
  2776.       self.ox = @width
  2777.       self.oy = @height
  2778.       self.z = battler.screen_z
  2779.       self.zoom_x = @battler.real_zoom * CHAR_ZOOM
  2780.       self.zoom_y = @battler.real_zoom * CHAR_ZOOM
  2781.       self.src_rect.set(0, 0, @width, @height)
  2782.       self.opacity = 255
  2783.       # バトラーより手前に表示
  2784.       if @weapon_anime_type[2]
  2785.         self.z += 10
  2786.       # バトラーより奥に表示
  2787.       else
  2788.         self.z -= 10
  2789.       end
  2790.       @flag = false
  2791.     end
  2792.   end
  2793. end

  2794. #==============================================================================
  2795. # ■ Sprite_Flying
  2796. #------------------------------------------------------------------------------
  2797. #  バトラー表示用のスプライトです。Game_Battler クラスのインスタンスを監視し、
  2798. # スプライトの状態を自動的に変化させます。
  2799. #==============================================================================

  2800. class Sprite_Flying < RPG::Sprite
  2801.   include Side_view
  2802.   #--------------------------------------------------------------------------
  2803.   # ● 公開インスタンス変数
  2804.   #--------------------------------------------------------------------------
  2805.   attr_accessor :battler                  # バトラー
  2806.   #--------------------------------------------------------------------------
  2807.   # ● オブジェクト初期化
  2808.   #     viewport : ビューポート
  2809.   #     battler  : バトラー (Game_Battler)
  2810.   #--------------------------------------------------------------------------
  2811.   def initialize(viewport, battler = nil)
  2812.     super(viewport)
  2813.     @battler = battler
  2814.     @battler_visible = false
  2815.   end
  2816.   #--------------------------------------------------------------------------
  2817.   # ● 解放
  2818.   #--------------------------------------------------------------------------
  2819.   def dispose
  2820.     if self.bitmap != nil
  2821.       self.bitmap.dispose
  2822.     end
  2823.     super
  2824.   end
  2825.   #--------------------------------------------------------------------------
  2826.   # ● フレーム更新
  2827.   #--------------------------------------------------------------------------
  2828.   def update
  2829.     super
  2830.     # バトラーが nil の場合
  2831.     if @battler == nil
  2832.       self.bitmap = nil
  2833.       loop_animation(nil)
  2834.       return
  2835.     end
  2836.     # 遠距離アニメ
  2837.     flying_animation = @battler.flying_animation
  2838.     flying_start = flying_animation[0]
  2839.     flying_end   = flying_animation[1]
  2840.     # アニメーション ID が現在のものと異なる場合
  2841.     if @anime_id != @battler.flying_anime[0]
  2842.       @anime_id = @battler.flying_anime[0]
  2843.       @animation = $data_animations[@anime_id]
  2844.     end
  2845.     # アニメーション 開始
  2846.     if flying_start
  2847.       loop_animation(@animation)
  2848.     elsif flying_end
  2849.       loop_animation(nil)
  2850.     end
  2851.     self.x = @battler.flying_x
  2852.     self.y = @battler.flying_y
  2853.     self.z = @battler.screen_z + 1000
  2854.   end
  2855. end

  2856. module RPG
  2857.   class Skill
  2858.     #--------------------------------------------------------------------------
  2859.     # ● 魔法かどうかの判断
  2860.     #--------------------------------------------------------------------------
  2861.     def magic?
  2862.       if @atk_f == 0
  2863.         return true
  2864.       else
  2865.         return false
  2866.       end
  2867.     end
  2868.   end
  2869. end

  2870. # アローカーソルの位置修正
  2871. class Arrow_Actor < Arrow_Base
  2872.   include Side_view
  2873.   #--------------------------------------------------------------------------
  2874.   # ● フレーム更新
  2875.   #--------------------------------------------------------------------------
  2876.   alias side_view_update update
  2877.   def update
  2878.     side_view_update
  2879.     # スプライトの座標を設定
  2880.     if self.actor != nil && (self.x != self.actor.screen_x + ARROW_OX or self.y != self.actor.screen_y + ARROW_OY)
  2881.       self.x = self.actor.screen_x + ARROW_OX
  2882.       self.y = self.actor.screen_y + ARROW_OY
  2883.     end
  2884.   end
  2885. end
  2886. class Arrow_Enemy < Arrow_Base
  2887.   include Side_view
  2888.   #--------------------------------------------------------------------------
  2889.   # ● フレーム更新
  2890.   #--------------------------------------------------------------------------
  2891.   alias side_view_update update
  2892.   def update
  2893.     side_view_update
  2894.     # スプライトの座標を設定
  2895.     if self.enemy != nil && self.y != self.enemy.screen_y + self.enemy.height/2
  2896.       self.x = self.enemy.screen_x
  2897.       self.y = self.enemy.screen_y + self.enemy.height/2 + ARROW_OY*3/5 #原无+ ARROW_OY*3/5
  2898.     end
  2899.   end
  2900. end
  2901. module Rtab_use
  2902.   def update_phase4_step3(battler)
  2903.     # ヘルプウィンドウの更新。アクションの種別で分岐
  2904.     case battler.current_action.kind
  2905.     when 0  # 基本
  2906.       if battler.current_action.basic == 1
  2907.         @help_window.set_text($data_system.words.guard, 1)
  2908.         @help_wait = @help_time
  2909.       end
  2910.       if battler.is_a?(Game_Enemy) and battler.current_action.basic == 2
  2911.         @help_window.set_text("逃げる", 1)
  2912.         @help_wait = @help_time
  2913.       end
  2914.     when 1  # スキル
  2915.       skill =  $data_skills[battler.current_action.skill_id]
  2916.       @help_window.set_text(skill.name, 1)
  2917.       @help_wait = @help_time
  2918.     when 2  # アイテム
  2919.       item = $data_items[battler.current_action.item_id]
  2920.       @help_window.set_text(item.name, 1)
  2921.       @help_wait = @help_time
  2922.     end
  2923.     # 行動側アニメーション (ID が 0 の場合は白フラッシュ)
  2924.     if battler.anime1 == 0
  2925.       battler.white_flash = true
  2926.       battler.wait = 5
  2927.       # カメラ設定
  2928.       if battler.target[0].is_a?(Game_Enemy)
  2929.         camera_set(battler)
  2930.       end
  2931.     else
  2932.       battler.animation.push([battler.anime1, true])
  2933.       speller = synthe?(battler)
  2934.       if speller != nil
  2935.         for spell in speller
  2936.           if spell != battler
  2937.             if spell.current_action.spell_id == 0
  2938.               spell.animation.push([battler.anime1, true])
  2939.             else
  2940.               skill = spell.current_action.spell_id
  2941.               spell.animation.push([$data_skills[skill].animation1_id, true])
  2942.               spell.current_action.spell_id = 0
  2943.             end
  2944.           end
  2945.         end
  2946.       end
  2947.       battler.wait = 2 * $data_animations[battler.anime1].frame_max - 10
  2948.       battler.anime1 = 0
  2949.     end
  2950.     # ステップ 4 に移行
  2951.     battler.phase = 4 if !(!battler.animation1_on and battler.action? and !battler.flash?)
  2952.   end
  2953. end

  2954. #==============================================================================
  2955. # ■ Scene_Battle
  2956. #==============================================================================
  2957. class Scene_Battle
  2958.   
  2959.   include Side_view
  2960.   include Rtab_use if RTAB
  2961.   #--------------------------------------------------------------------------
  2962.   # ● 公開インスタンス変数
  2963.   #--------------------------------------------------------------------------
  2964.   attr_reader   :phase            # フェーズ
  2965.   attr_reader   :phase4_step      # フェーズ4ステップ
  2966.   attr_reader   :active_battler   # 対象の配列
  2967.   attr_reader   :target_battlers  # 対象の配列
  2968.   attr_reader   :animation1_id    # 行動アニメID
  2969.   attr_reader   :animation2_id    # 対象アニメID
  2970.   #--------------------------------------------------------------------------
  2971.   # ● メイン処理
  2972.   #--------------------------------------------------------------------------
  2973.   alias side_view_main main
  2974.   def main
  2975.     # バトラー初期化
  2976.     for battler in $game_party.actors + $game_troop.enemies
  2977.       battler.start_battle
  2978.     end
  2979.     # 戻す
  2980.     side_view_main
  2981.   end
  2982.   #--------------------------------------------------------------------------
  2983.   # ● 閃き判定
  2984.   #--------------------------------------------------------------------------
  2985.   def flash?
  2986.     return @flash_flag ? true : false
  2987.   end  
  2988.   #--------------------------------------------------------------------------
  2989.   # ● 閃きアニメ待ち時間取得
  2990.   #--------------------------------------------------------------------------
  2991.   def flash_duration
  2992.     animation = nil
  2993.     if FLASH_ANIME
  2994.       animation = $data_animations[FLASH_ANIMATION_ID]
  2995.     end
  2996.     return animation != nil ? animation.frame_max * 2 + 2 : 0
  2997.   end
  2998.   #--------------------------------------------------------------------------
  2999.   # ● フレーム更新 (メインフェーズ ステップ 2 : アクション開始)
  3000.   #--------------------------------------------------------------------------
  3001.   alias side_view_update_phase4_step2 update_phase4_step2
  3002.   def update_phase4_step2(*arg)
  3003.     battler = convert_battler2(*arg)
  3004.     battler.action
  3005.     side_view_update_phase4_step2(*arg)
  3006.   end
  3007.   #--------------------------------------------------------------------------
  3008.   # ● 生成特技行动结果
  3009.   #--------------------------------------------------------------------------
  3010.   alias rt_make_skill_action_result make_skill_action_result
  3011.   def make_skill_action_result
  3012.     rt_make_skill_action_result
  3013.     $rt_hit = 0
  3014.     if RT_SKILL_ANIMATION.include?(@skill.id)
  3015.       $rt_animation_id = RT_SKILL_ANIMATION[@skill.id].clone
  3016.       $rt_hits = $rt_animation_id.size
  3017.       hits = $rt_hits + 1
  3018.      # $rt_damage = {}
  3019.       for target in @target_battlers
  3020.         $rt_damage[target] = [target.damage]
  3021.         if $rt_damage[target] != ["Miss"]
  3022.           if $rt_damage[target] == [0]
  3023.             for i in 1..hits
  3024.               $rt_damage[target].push 0
  3025.             end
  3026.           else
  3027.             damage = $rt_damage[target][0]
  3028.             if damage > 0
  3029.               for i in 1..hits
  3030.                 $rt_damage[target][i] = (($rt_damage[target][0]).to_f / hits * (85 + rand(31)) / 100).round
  3031.                 if damage > $rt_damage[target][i]
  3032.                   if i != hits
  3033.                     damage -= $rt_damage[target][i]
  3034.                   else
  3035.                     $rt_damage[target][i] = damage
  3036.                   end
  3037.                 else
  3038.                   $rt_damage[target][i] = damage
  3039.                   for j in i..hits-1
  3040.                     $rt_damage.push 0
  3041.                   end
  3042.                   break
  3043.                 end
  3044.               end
  3045.             else
  3046.               for i in 1..hits
  3047.                 $rt_damage[target][i] = (($rt_damage[target][0]).to_f / hits * (85 + rand(31)) / 100).round
  3048.                 if damage < $rt_damage[target][i]
  3049.                   if i != hits
  3050.                     damage -= $rt_damage[target][i]
  3051.                   else
  3052.                     $rt_damage[target][i] = damage
  3053.                   end
  3054.                 else
  3055.                   $rt_damage[target][i] = damage
  3056.                   for j in i..hits-1
  3057.                     $rt_damage.push 0
  3058.                   end
  3059.                   break
  3060.                 end
  3061.               end
  3062.             end
  3063.           end
  3064.         else
  3065.           for i in 1..hits
  3066.             $rt_damage[target].push "Miss"
  3067.           end
  3068.         end
  3069.       end
  3070.     else
  3071.       $rt_animation_id = []
  3072.       $rt_hits = 0
  3073.       $rt_damage = {}
  3074.     end
  3075.   end
  3076.   #--------------------------------------------------------------------------
  3077.   # ● フレーム更新 (メインフェーズ ステップ 3 : 行動側アニメーション)
  3078.   #--------------------------------------------------------------------------
  3079.   alias side_view_update_phase4_step3 update_phase4_step3
  3080.   def update_phase4_step3(*arg)
  3081.     battler = convert_battler2(*arg)
  3082.     return if !battler.animation1_on and battler.action? and !battler.flash?#发动特技、咏唱魔法在行动完毕之后
  3083.     if battler.flash? and FLASH_ANIME
  3084.       battler.flash_flag["normal"] = true
  3085.     end
  3086.     side_view_update_phase4_step3(*arg)
  3087.   end
  3088.   #--------------------------------------------------------------------------
  3089.   # ● フレーム更新 (メインフェーズ ステップ 4 : 対象側アニメーション)
  3090.   #--------------------------------------------------------------------------
  3091.   alias side_view_update_phase4_step4 update_phase4_step4
  3092.   def update_phase4_step4(*arg)
  3093.     battler = convert_battler2(*arg)
  3094.     targets = RTAB ? battler.target : @target_battlers
  3095.     return if !battler.animation2_on and battler.action? if !RTAB
  3096.     side_view_update_phase4_step4(*arg)
  3097.     for target in targets
  3098.       if RTAB
  3099.         value = nil
  3100.         if target.damage_sp.include?(battler)
  3101.           value = target.damage_sp[battler]
  3102.         end
  3103.         if target.damage.include?(battler)
  3104.           if value == nil or value == "Miss"
  3105.             value = target.damage[battler]
  3106.           elsif value.is_a?(Numeric) && value > 0
  3107.             value = target.damage[battler] == "Miss" ? value : target.damage[battler]
  3108.           end
  3109.         end
  3110.       else
  3111.         value = target.damage
  3112.       end
  3113.       if target.is_a?(Game_Actor)
  3114.         # ダメージの場合
  3115.         if value.is_a?(Numeric) && value > 0
  3116.           # シェイクを開始
  3117.           target.shake = true
  3118.         end
  3119.       elsif target.is_a?(Game_Enemy)
  3120.         # ダメージの場合
  3121.         if value.is_a?(Numeric) && value > 0
  3122.           # シェイクを開始
  3123.           target.shake = true
  3124.         end
  3125.       end
  3126.     end
  3127.     if !$rt_damage.empty?
  3128.       $rt_hit += 1
  3129.       target.hit_pop = true
  3130.       for target in @target_battlers
  3131.         target.damage = $rt_damage[target].pop
  3132.         if  target.damage != nil
  3133.           target.damagetemp_pop = true
  3134.         end
  3135.       end
  3136.     end
  3137.   end
  3138.   #--------------------------------------------------------------------------
  3139.   # ● 刷新画面 (主回合步骤 5 : 显示伤害)
  3140.   #--------------------------------------------------------------------------
  3141.   def update_phase4_step5
  3142.     # 隐藏帮助窗口
  3143.     @help_window.visible = false
  3144.     # 刷新状态窗口
  3145.     @status_window.refresh
  3146.     # 显示伤害
  3147.     for target in @target_battlers
  3148.       target.damage = $rt_damage[target].pop if !$rt_damage.empty?
  3149.       if  target.damage != nil
  3150.         target.damage_pop = true
  3151.       end
  3152.     end
  3153.     $rt_damage = {}
  3154.     # 移至步骤 6
  3155.     @phase4_step = 6
  3156.   end
  3157.   #--------------------------------------------------------------------------
  3158.   # ● プレバトルフェーズ開始
  3159.   #--------------------------------------------------------------------------
  3160.   alias start_phase1_correct start_phase1
  3161.   def start_phase1
  3162.     # カメラの設定
  3163.     # 元々フロントビュー向けの数値になっているため
  3164.     @zoom_rate = [1.0, 1.0]
  3165.     start_phase1_correct
  3166.   end
  3167.   #--------------------------------------------------------------------------
  3168.   # ● アクターコマンドフェーズ開始
  3169.   #--------------------------------------------------------------------------
  3170.   alias start_phase3_correct start_phase3
  3171.   def start_phase3
  3172.     battler = convert_battler
  3173.     start_phase3_correct
  3174.     if RTAB
  3175.       # カメラの設定
  3176.       # 元々フロントビュー向けの数値になっているため
  3177.       @camera = "command"
  3178. #      @spriteset.screen_target(0, 0, 1.0)
  3179.     end
  3180.   end


  3181.   def action_phase(battler)
  3182.     # action が 1 の場合、バトラーが行動中かどうか確認
  3183.     if @action == 1 and battler.phase < 3
  3184.       for target in battler.target
  3185.         speller = synthe?(target)
  3186.         if speller == nil
  3187.           # ターゲットが通常行動中の場合
  3188.           if @action_battlers.include?(target)
  3189.             if target.phase > 2
  3190.               return
  3191.             end
  3192.           end
  3193.         else
  3194.           # ターゲットが連携スキル発動中の場合
  3195.           for spell in speller
  3196.             if @action_battlers.include?(spell)
  3197.               if spell.phase > 2
  3198.                 return
  3199.               end
  3200.             end
  3201.           end
  3202.         end
  3203.       end
  3204.     end
  3205. case battler.phase
  3206.   when 1
  3207.     update_phase4_step1(battler)
  3208.   when 2
  3209.     update_phase4_step2(battler)
  3210.   when 3  
  3211.     update_phase4_step3(battler) if !(!battler.animation1_on and battler.action? and !battler.flash?)
  3212.   when 4
  3213.     update_phase4_step4(battler) if !(!battler.animation2_on and battler.action?)
  3214.   when 5
  3215.     update_phase4_step5(battler)
  3216.   when 6
  3217.     update_phase4_step6(battler)
  3218.   end
  3219. end
  3220. end
复制代码

评分

参与人数 1星屑 +20 赞 +1 收起 理由
guoxiaomi + 20 + 1 参与讨论

查看全部评分

回复

使用道具 举报

梦石
0
星屑
476
在线时间
30 小时
注册时间
2019-8-23
回帖
42
发表于 2019-8-26 19:35:27 | 显示全部楼层
yumeyuuya 发表于 2019-8-26 19:03
过了几天也没有人回复我的帖子啊……那我只能硬着头皮尝试自己瞎改这个脚本了? ...

这个行不行啊?
回复

使用道具 举报

梦石
0
星屑
431
在线时间
43 小时
注册时间
2009-5-6
回帖
58
 楼主| 发表于 2019-8-26 19:58:51 | 显示全部楼层

你这个虽然不是我要的效果,不过我打算读一下这个脚本,也算是一种学习。
我的问题在于主楼我放的这个脚本在释放技能的时候人物都是在原地,有的技能可以在原地,但有的技能我想要角色过到对面去。
技能原地释放,不位移.gif
(图片仅为测试效果用的素材,正式制作的时候会换成原创图的)
回复

使用道具 举报

梦石
0
星屑
15106
在线时间
2234 小时
注册时间
2019-1-24
回帖
964

R考场第七期纪念奖

发表于 2019-8-28 07:37:03 | 显示全部楼层
本帖最后由 miantouchi 于 2019-8-28 07:44 编辑

你试试这个全局行走战斗图范例,应该是你要的。柳柳的超级横版需要大量图片,并且要合并的,他的视频教程里面有介绍,但是我找不到他的PS合并动作,适合做动作特别多的游戏。
修改的话,你就在脚本这个地方修改,是近战还是远程,武器和技能。
  1. module RPG
  2.   class Weapon
  3.     #--------------------------------------------------------------------------
  4.     # ● アクション設定
  5.     #--------------------------------------------------------------------------
  6.     def battle_actions
  7.       case @id
  8.       when 17,18,19,20,21,22,23,24  # 远程武器的id回旋攻撃
  9.         return BattleActions::Actions["弓箭攻撃"]
  10.       when 34                       # 回旋武器的id
  11.         return BattleActions::Actions["回旋攻撃"]
  12.       end
  13.       else
  14.       return BattleActions::Actions["通常攻撃"]
  15.     end
  16.   end
  17.   class Skill
  18.     #--------------------------------------------------------------------------
  19.     # ● アクション設定
  20.     #--------------------------------------------------------------------------
  21.     def battle_actions
  22.       case @id
  23.       when 73,74,75,76,77,78,79,80  # 远程技能的id
  24.         return BattleActions::Actions["远距离発動"]
  25.       when 82                       # 回旋技能的id
  26.         return BattleActions::Actions["回旋発動"]
  27.       end
  28.       else
  29.       if self.magic?
  30.         return BattleActions::Actions["術発動"]
  31.       else
  32.         return BattleActions::Actions["払い抜け"]
  33.       end
  34.     end
  35.   end
  36.   class Item
  37.     #--------------------------------------------------------------------------
  38.     # ● アクション設定
  39.     #--------------------------------------------------------------------------
  40.     def battle_actions
  41.       return BattleActions::Actions["アイテム使用"]
  42.     end
  43.   end
  44. end
复制代码

全局行走图战斗.rar

461.55 KB, 下载次数: 82

评分

参与人数 1星屑 +20 赞 +1 收起 理由
guoxiaomi + 20 + 1 塞糖

查看全部评分

回复

使用道具 举报

梦石
0
星屑
3118
在线时间
766 小时
注册时间
2008-7-5
回帖
715
发表于 2019-8-28 15:05:17 | 显示全部楼层
以我的水平,能在这个脚本基础上做放技能位移,但是问题出现在用回复这种对象是己方的,己方战斗图还是会跑到对面去

点评

尝试想用技能id做分歧(想区分近战技能和远程技能),发现我脚本还是不及格,做不出来  发表于 2019-8-28 21:01
可以考虑用状态法,回复作为一种独立的状态,有回复状态时,不进行角色移动,原地更改角色图像。在脚本里慢慢分歧每一种情况?  发表于 2019-8-28 17:31
这个也是我照猫画虎改了以后发现的问题,我去1楼更新下  发表于 2019-8-28 17:25
阿姨我还未填平坑.....
自己是“擅长美工的笨蛋策划在干着程序的活”
  
回复

使用道具 举报

梦石
0
星屑
42345
在线时间
6022 小时
注册时间
2006-11-10
回帖
6975
发表于 2019-8-28 22:21:15 | 显示全部楼层
本帖最后由 灯笼菜刀王 于 2019-8-28 23:04 编辑

自己动手是学会脚本最好的途径

这里加个变量判断就行了 比如 做一个  @贴脸  的变量用来控制是否要移动

像这样  @spriteset.actor_sprites[@active_battler.index].move(x, target.screen_y, 10) if @贴脸

当 @贴脸 的值为真的时候, 才会进行移动,  接下来就处理这个 @贴脸 变量

首先,  在 Scene_Battle 4    找到 @active_battler = @action_battlers.shift  这句, 上面加一个  @贴脸 = false  初始化它,  这样每个战斗者判定之前都是关闭的

然后, 攻击时候会有几种情况,  1,普攻, 2技能, 3道具  所以, 要分别到这些地方去处理 @贴脸

普攻在这里 def make_basic_action_result  , 找到 if @active_battler.current_action.basic == 0,   在它的下面加上一句 @贴脸 = true , 这样普通攻击就会跑过去砍了

技能在这里 def make_skill_action_result,  找到  @skill = $data_skills[@active_battler.current_action.skill_id], 在它的下面加一句 @贴脸 = true ,这样特技也会跑上去砍了

道具在这里 def make_item_action_result 找到 @item = $data_items[@active_battler.current_action.item_id], 在它下面也加一句 @贴脸 = true, 这样丢道具也会冲上去砍了......

显然跑到敌人面前吃药很傻,  所以, 现在要想办法让这个@贴脸 按我们的需要开和关

常用的方法有四种

1, 按ID穷举....  
case @item.id
when 1,2,3,4,5
   @贴脸 = true
else
   @贴脸 = false
end

这方法虽然很傻, 但是绿色无污染没任何副作用(除非你手贱整天折腾数据库), 缺点就是数量一多要检查要设置都麻烦

2, 勾属性法
比如,把10086号属性当做判断用, 起名"贴脸",  然后, 勾上这个属性的 道具, 技能, 武器, 攻击就是贴脸攻击了

平砍 :  @贴脸 = @active_battler.element_set.include?(10086)
技能:  @贴脸 = @skill.element_set.include?(10086)
道具:  @贴脸 = @item.element_set.include?(10086)

这方法设置简单, 勾上属性就可以简单区分近身和远程,  但是, 缺点就是敌人平砍不好设置, 而且它会影响属性修正计算, 会导致 DEF 设置无效,(原因默认的属性修正会取最高值) 除非你把所有人的 10086属性的抗性都改为F

当然, 改默认公式的计算方法也是可以的, 想用这个方法就自己研究吧

3, 备注法
用备注的方式来做,  不会写备注可以用猫姐大的通用备注接口,

这方法通用性强,影响小, 可以为所欲为,  缺点就是备注不好检查, 时间久了可能会忘记它是干嘛用的

4, 技能用伪位移法来做,

偷个图片来举栗子
TIM图片20190828222847.gif

像这样位移是用动画"使用方消失, 对象方播放攻击动作" 的方式来制造位移假象, 其实战斗图根本没移动

此方法优点是绿色无污染而且可以随心控制速度和方式, 缺点就是 状态动画,攻方伤害等,会留在原地(因为实际没移动嘛), 而且有些效果想实现起来会比较麻烦(比如图上的这个攻击一个敌人周围敌人溅射伤害效果)


自己选择吧

评分

参与人数 2星屑 +50 赞 +2 收起 理由
guoxiaomi + 50 + 1 认可答案
yumeyuuya + 1 认可答案

查看全部评分

回复

使用道具 举报

梦石
0
星屑
431
在线时间
43 小时
注册时间
2009-5-6
回帖
58
 楼主| 发表于 2019-8-29 21:33:25 | 显示全部楼层
灯笼菜刀王 发表于 2019-8-28 22:21
自己动手是学会脚本最好的途径

这里加个变量判断就行了 比如 做一个  @贴脸  的变量用来控制是否要移动

谢谢大佬点拨,我往前看他的作者有写@moving = fasle,然后用了您说的分歧方法,现在把我方施展技能这一段改成这样,笨是笨了点,但是可以喽~~~
我成功啦!!!.gif

  1. #--------------我方施展技能的位移----------------------------     
  2.     if @active_battler.is_a?(Game_Actor)
  3.       if @active_battler.restriction == 3 #限制为[我方为普通攻击]的情况下
  4.         target = $game_party.random_target_actor
  5.       elsif @active_battler.restriction == 2 #限制为[敌人为普通攻击]的情况下
  6.         target = $game_troop.random_target_enemy
  7.       else
  8.         case @skill.id
  9.         #远距离技能的id,不位移
  10.         when 1,2,3,4,5,6,53,54
  11.           index = @active_battler.current_action.target_index
  12.           target = $game_party.smooth_target_actor(index)
  13.           @moving = false
  14.           @spriteset.actor_sprites[@active_battler.index].pose(5)
  15.         # 近身技能的id
  16.         when 57,58,9,60,61,62,63,64
  17.           index = @active_battler.current_action.target_index
  18.           target = $game_troop.smooth_target_enemy(index)
  19.           x = target.screen_x + RPG::Cache.battler(@active_battler.battler_name, @active_battler.battler_hue).width/8
  20.           @spriteset.actor_sprites[@active_battler.index].pose(5)
  21.           @spriteset.actor_sprites[@active_battler.index].move(x, target.screen_y, 10)
  22.        end
  23.      end
复制代码

点评

可以的~修改好了好物共享啊!  发表于 2019-8-29 21:41
恭喜你,我可以在我的游戏里用你修改后的这个脚本吗?  发表于 2019-8-29 21:39
回复

使用道具 举报

梦石
0
星屑
431
在线时间
43 小时
注册时间
2009-5-6
回帖
58
 楼主| 发表于 2019-8-31 14:18:54 | 显示全部楼层
自顶一下,请不要说我连帖。
因为我不会把“有事请教”变成“已经解决”,版主可否帮忙???

点评

MV后来自带的横版也是一张战斗图包含很多动作很多帧啊。不过敌人战斗图的确大,在做敌人队伍的时候是挺麻烦哈~  发表于 2019-8-31 21:21
话说4*8一个人物的超大动作图片,你制作游戏不麻烦吗?人物一多,PS方面也会吃不消,并且时不时图片体积会增大。  发表于 2019-8-31 21:03
你把你的帖子标题前面加上,已经解决,过段时间版主看到就会改了  发表于 2019-8-31 21:02
回复

使用道具 举报

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

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部