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

Project1

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

[已经过期] 推介下哪个战斗脚本好用.

[复制链接]

Lv3.寻梦者

梦石
0
星屑
1556
在线时间
626 小时
注册时间
2010-8-5
帖子
451
跳转到指定楼层
1
发表于 2012-8-8 16:41:56 | 只看该作者 回帖奖励 |正序浏览 |阅读模式

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

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

x
本帖最后由 jiahui5592986 于 2012-8-8 16:42 编辑

1.有待机,死亡,防御,挨打,等【可以设置的.能可以设置音效最好】
2.有真战斗移位.那种效果.
3.使用某个动画,自动关联此角色的施法动画,

           这个好像全动画,但是全动画不可以附带有真战斗移位.那种效果.所以请大大们给个意见,dsu_plus_rewardpost_czw

Lv3.寻梦者

梦石
0
星屑
3583
在线时间
3065 小时
注册时间
2011-11-17
帖子
980
13
发表于 2012-8-11 01:47:30 | 只看该作者
更换战斗图 和真位移是可以结合的
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
215
在线时间
3 小时
注册时间
2012-8-10
帖子
3
12
发表于 2012-8-10 10:54:34 | 只看该作者
求围观,没钱下载啊
回复 支持 反对

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
1556
在线时间
626 小时
注册时间
2010-8-5
帖子
451
11
 楼主| 发表于 2012-8-10 10:52:11 | 只看该作者
jiahui5592986 发表于 2012-8-10 10:00
如果同一种武器可以2个角色用,那攻击动画岂不是很怪

我的意思是,武器不需要设置攻击动画,攻击动画是在战斗图里面关联的,
回复 支持 反对

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
1556
在线时间
626 小时
注册时间
2010-8-5
帖子
451
10
 楼主| 发表于 2012-8-10 10:00:11 | 只看该作者
黑色的笔 发表于 2012-8-9 20:48
不设置也有动画,别想了~~~~
那样不是正好吗,虽然麻烦了一点,但是但是这样就可以不同的武器有不同的动 ...

如果同一种武器可以2个角色用,那攻击动画岂不是很怪

点评

是一种武器绑定一个战斗图?那只好限定武器咯  发表于 2012-8-10 10:42
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
44
在线时间
317 小时
注册时间
2011-2-9
帖子
1129
9
发表于 2012-8-9 20:48:30 | 只看该作者
jiahui5592986 发表于 2012-8-9 19:52
横版战斗我有,但是,能不能不在武器设置里面不设置动画,然后也有攻击动画【因为我有武器更换战斗图系统】 ...

不设置也有动画,别想了~~~~
那样不是正好吗,虽然麻烦了一点,但是但是这样就可以不同的武器有不同的动画了
反正是坏人一个
回复 支持 反对

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
1556
在线时间
626 小时
注册时间
2010-8-5
帖子
451
8
 楼主| 发表于 2012-8-9 19:52:59 | 只看该作者
灸舞 发表于 2012-8-9 18:54
#==============================================================================
# * Animated_Sprite ...

横版战斗我有,但是,能不能不在武器设置里面不设置动画,然后也有攻击动画【因为我有武器更换战斗图系统】
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
78 小时
注册时间
2012-6-16
帖子
29
7
发表于 2012-8-9 18:54:22 | 只看该作者
本帖最后由 hcm 于 2012-8-11 08:16 编辑
  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. #战斗图从上到下:前进图,等待图,防御图,挨打图,普通攻击图(默认的武器),施展魔法,
  12. #倒地不行了,胜利姿势,自定义武器1,自定义武器2……

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

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

  15. #==============================================================================
  16. # □ RPG::Class
  17. #==============================================================================
  18. module RPG
  19.   class Class
  20.     def name
  21.       name = @name.split(/,/)[0]
  22.       return name != nil ? name : ''
  23.     end
  24.     def name2
  25.       name = @name.split(/,/)[1]
  26.       return name != nil ? name : ''
  27.     end
  28.   end
  29.   class Weapon
  30.     def name
  31.       name = @name.split(/,/)[0]
  32.       return name != nil ? name : ''
  33.     end
  34.     def name2
  35.       name = @name.split(/,/)[1]
  36.       return name != nil ? name : ''
  37.     end   
  38.   end  
  39. end

  40. class Game_Actor
  41.   #--------------------------------------------------------------------------
  42.   # ● 更改名称
  43.   #     name : 新的名称
  44.   #--------------------------------------------------------------------------
  45.   def picturephase
  46.     name = $data_classes[class_id].name2
  47.     return name != nil ? name : "66RPG"
  48.   end
  49. end

  50. class Game_Enemy
  51.   #--------------------------------------------------------------------------
  52.   # ● 获取名称
  53.   #--------------------------------------------------------------------------
  54.   def name
  55.     name = $data_enemies[@enemy_id].name.split(/,/)[0]
  56.     return name != nil ? name : ''
  57.   end
  58.   def picturephase
  59.     name = $data_enemies[@enemy_id].name.split(/,/)[1]
  60.     return name != nil ? name : "66RPG"
  61.   end  
  62. end

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

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

  88. #--------------------------------------------------------------------------
  89. # Comment by RPG
  90. #   - Change the source rect (change the animation)
  91. #   frames : Number of animation frames
  92. #   delay : Frame delay, controls animation speed
  93. #   offx : X coordinate of the 1st frame
  94. #   offy : Y coordinate of all frames
  95. #   startf : Starting frame for animation
  96. #   once : Is the animation only played once?
  97. #   rm2k_mode : Animation pattern: 1-2-3-2 if true, 1-2-3-1 if false
  98. #
  99. # Comment by cybersam
  100. #
  101. # the rm2k_mode isnt pressent anymore...
  102. # if you want that feature then use rm2k or use RPG's scrîpt...
  103. #--------------------------------------------------------------------------
  104. def change(frames = 0, delay = 0, offx = 0, offy = 0,
  105.             startf = 0, once = false)
  106.    @frames = frames
  107.    @delay = delay
  108.    @offset_x, @offset_y = offx, offy
  109.    @current_frame = startf
  110.    @once = once
  111.    x = @current_frame * @frame_width + @offset_x
  112.    self.src_rect = Rect.new(x, @offset_y, @frame_width, @frame_height)
  113.    @goingup = true
  114.    @animated = true
  115. end
  116.   
  117. #--------------------------------------------------------------------------
  118. # - Update animation and movement
  119. #--------------------------------------------------------------------------
  120. def update
  121.    super
  122.    if self.bitmap != nil and delay(@delay) and @animated
  123.      x = @current_frame * @frame_width + @offset_x
  124.      self.src_rect = Rect.new(x, @offset_y, @frame_width, @frame_height)
  125.        @current_frame = (@current_frame + 1) unless @frames == 0
  126.        @animated = false if @current_frame == @frames and @once
  127.        @current_frame %= @frames
  128.    end
  129. end
  130.   
  131. #--------------------------------------------------------------------------
  132. # - Move the sprite
  133. #   x : X coordinate of the destination point
  134. #   y : Y coordinate of the destination point
  135. #   speed : Speed of movement (0 = delayed, 1+ = faster)
  136. #   delay : Movement delay if speed is at 0
  137. #--------------------------------------------------------------------------
  138. def move(x, y, speed = 1, delay = 0)
  139.    @destx = x
  140.    @desty = y
  141.    @move_speed = speed
  142.    @move_delay = delay
  143.    @move_old = Graphics.frame_count
  144.    @moving = true
  145. end
  146.   
  147. #--------------------------------------------------------------------------
  148. # - Move sprite to destx and desty
  149. #--------------------------------------------------------------------------
  150. def update_move
  151.    return unless @moving
  152.    movinc = @move_speed == 0 ? 1 : @move_speed
  153.    if Graphics.frame_count - @move_old > @move_delay or @move_speed != 0
  154.      self.x += movinc if self.x < @destx
  155.      self.x -= movinc if self.x > @destx
  156.      self.y += movinc if self.y < @desty
  157.      self.y -= movinc if self.y > @desty
  158.      @move_old = Graphics.frame_count
  159.    end
  160.    if @move_speed > 1  # Check if sprite can't reach that point
  161.      self.x = @destx if (@destx - self.x).abs % @move_speed != 0 and
  162.                         (@destx - self.x).abs <= @move_speed
  163.      self.y = @desty if (@desty - self.y).abs % @move_speed != 0 and
  164.                         (@desty - self.y).abs <= @move_speed
  165.    end
  166.    if self.x == @destx and self.y == @desty
  167.      @moving = false
  168.    end
  169. end
  170.   
  171. #--------------------------------------------------------------------------
  172. # - Pause animation, but still updates movement
  173. #   frames : Number of frames
  174. #--------------------------------------------------------------------------
  175. def delay(frames)
  176.    update_move
  177.    if (Graphics.frame_count - @old >= frames)
  178.      @old = Graphics.frame_count
  179.      return true
  180.    end
  181.    return false
  182. end
  183. end

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



  294. class Game_Actor < Game_Battler
  295.   #######################################################################
  296.   def now_exp
  297.    return @exp - @exp_list[@level]
  298.   end
  299.   def next_exp
  300.    return @exp_list[@level+1] > 0 ? @exp_list[@level+1] - @exp_list[@level] : 0
  301.   end
  302. ##########################################################################
  303.   
  304. # you dont have to change your game actor to let the characters schows
  305. # from the side...
  306. # this will do it for you... ^-^
  307. ##############################################
  308. def screen_x
  309.    case self.index
  310.    when 0
  311.      return 440
  312.    when 1
  313.      return 460
  314.    when 2
  315.      return 480
  316.    when 3
  317.      return 500
  318.    end
  319. end
  320. #############################################
  321. def screen_y
  322.    case self.index
  323.    when 0
  324.      return 140
  325.    when 1
  326.      return 200
  327.    when 2
  328.      return 260
  329.    when 3
  330.      return 320
  331.    end
  332. end
  333. #############################################
  334.   
  335. def screen_z
  336.    if self.index != nil
  337.      return self.index
  338.    else
  339.      return 0
  340.    end
  341. end
  342. end


  343. # RPG's snipplet...
  344. class Spriteset_Battle
  345. attr_accessor :actor_sprites
  346. attr_accessor :enemy_sprites
  347.   
  348.   
  349. alias original_initialize initialize
  350. def initialize
  351.    #@start_party_number = $game_party.actors.size
  352.    # ビューポートを作成
  353.    @viewport0 = Viewport.new(0, 0, 640, 480)
  354.    @viewport1 = Viewport.new(0, 0, 640, 320)
  355.    @viewport2 = Viewport.new(0, 0, 640, 480)
  356.    @viewport3 = Viewport.new(0, 0, 640, 480)
  357.    @viewport4 = Viewport.new(0, 0, 640, 480)
  358.    @viewport1.z = 50
  359.    @viewport2.z = 50
  360.    @viewport3.z = 200
  361.    @viewport4.z = 5000

  362.    @battleback_sprite = Sprite.new(@viewport0)
  363.    
  364.    @enemy_sprites = []
  365.    for enemy in $game_troop.enemies #.reverse
  366.      @enemy_sprites.push(Sprite_Battler.new(@viewport1, enemy))
  367.    end
  368.    
  369.    @actor_sprites = []
  370.    @actor_sprites.push(Sprite_Battler.new(@viewport2,$game_party.actors[0]))
  371.    @actor_sprites.push(Sprite_Battler.new(@viewport2,$game_party.actors[1]))
  372.    @actor_sprites.push(Sprite_Battler.new(@viewport2,$game_party.actors[2]))
  373.    @actor_sprites.push(Sprite_Battler.new(@viewport2,$game_party.actors[3]))
  374.    
  375.    @weather = RPG::Weather.new(@viewport1)
  376.    @picture_sprites = []
  377.    for i in 51..100
  378.      @picture_sprites.push(Sprite_Picture.new(@viewport3,
  379.        $game_screen.pictures[i]))
  380.    end
  381.    @timer_sprite = Sprite_Timer.new
  382.    update
  383. end
  384.   
  385.   
  386.   
  387. alias original_update update
  388. def update
  389.    @viewport1.z = 50 and @viewport2.z = 51 if $actor_on_top == true
  390.    @viewport1.z = 51 and @viewport2.z = 50 if $actor_on_top == false
  391.     # 刷新角色的活动块 (对应角色的替换)
  392.     @actor_sprites[0].battler = $game_party.actors[0]
  393.     @actor_sprites[1].battler = $game_party.actors[1]
  394.     @actor_sprites[2].battler = $game_party.actors[2]
  395.     @actor_sprites[3].battler = $game_party.actors[3]
  396.     # 战斗背景的文件名与现在情况有差异的情况下
  397.     if @battleback_name != $game_temp.battleback_name
  398.       @battleback_name = $game_temp.battleback_name
  399.       if @battleback_sprite.bitmap != nil
  400.         @battleback_sprite.bitmap.dispose
  401.       end
  402.       @battleback_sprite.bitmap = RPG::Cache.battleback(@battleback_name)
  403.       @battleback_sprite.src_rect.set(0, 0, 640, 480)
  404.     end
  405.     # 刷新战斗者的活动块
  406.     for sprite in @enemy_sprites + @actor_sprites
  407.       sprite.update
  408.     end
  409.     # 刷新天气图形
  410.     @weather.type = $game_screen.weather_type
  411.     @weather.max = $game_screen.weather_max
  412.     @weather.update
  413.     # 刷新图片活动块
  414.     for sprite in @picture_sprites
  415.       sprite.update
  416.     end
  417.     # 刷新计时器活动块
  418.     @timer_sprite.update
  419.     # 设置画面的色调与震动位置
  420.     @viewport1.tone = $game_screen.tone
  421.     @viewport1.ox = $game_screen.shake
  422.     # 设置画面的闪烁色
  423.     @viewport4.color = $game_screen.flash_color
  424.     # 刷新显示端口
  425.     @viewport1.update
  426.     @viewport2.update
  427.     @viewport4.update
  428. end
  429. end
  430. # end

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


  454. class Sprite_Battler < Animated_Sprite

  455. attr_accessor :battler
  456. attr_reader   :index
  457. attr_accessor :target_index
  458. attr_accessor :frame_width

  459.   
  460. def initialize(viewport, battler = nil)
  461.    super(viewport)
  462.    @battler = battler
  463.    @pattern_b = 0 #
  464.    @counter_b = 0 #
  465.    @index = 0     #
  466.    if @battler != nil
  467.      tempbitmap = RPG::Cache.battler(@battler.battler_name, @battler.battler_hue)
  468.      @frame_width = tempbitmap.width/4
  469.      picturephase = @battler.picturephase
  470.      if picturephase == "66RPG"
  471.        @frame_height = tempbitmap.height/8
  472.      else
  473.        @frame_height = tempbitmap.height/picturephase.to_i
  474.      end     
  475.    else
  476.      @frame_width, @frame_height = 1,1
  477.    end   
  478.    # start sprite
  479.    @battler.is_a?(Game_Enemy) ? enemy_pose(1) : pose(1)
  480.    @battler_visible = false
  481.    if $target_index == nil
  482.      $target_index = 0
  483.    end
  484. end
  485.   
  486. def index=(index) #
  487.    @index = index  #
  488.    update          #
  489. end               #
  490.   
  491. def dispose
  492.    if self.bitmap != nil
  493.      self.bitmap.dispose
  494.    end
  495.    super
  496. end
  497.   
  498. def enemy                                             #
  499.    $target_index += $game_troop.enemies.size
  500.    $target_index %= $game_troop.enemies.size
  501.    return $game_troop.enemies[$target_index]           #
  502. end                                                   #
  503.   
  504. def actor                                             #
  505.    $target_index += $game_party.actors.size
  506.    $target_index %= $game_party.actors.size
  507.    return $game_party.actors[$target_index]            #
  508. end            

  509. #==============================================================================
  510. # here is a snipplet from RPG's scrîpt...
  511. # i changed only to lines from this...
  512. #
  513. # here you can add more sprite poses... if you have more... ^-^
  514. #==============================================================================
  515. def pose(number, frames = 4)
  516.     case number
  517.     when 0  # run
  518.     change(frames, 5, 0, 0, 0)
  519.     when 1  # standby
  520.     change(frames, 5, 0, @frame_height)
  521.     when 2 # defend
  522.     change(frames, 5, 0, @frame_height * 2)
  523.     when 3 # Hurt, loops
  524.     change(frames, 5, 0, @frame_height * 3)
  525.     when 4 # attack no loop
  526.     change(frames, 5, 0, @frame_height * 4, 0, true)
  527.     when 5 # skill
  528.     change(frames, 5, 0, @frame_height * 5)
  529.     when 6 # death
  530.     change(frames, 5, 0, @frame_height * 6)
  531.     when 7 # winning pose
  532.     change(frames, 5, 0, @frame_height * 7)
  533.     when 8 # no sprite
  534.     change(frames, 5, 0, @frame_height * 8)
  535.     when 9 # no sprite
  536.     change(frames, 5, 0, @frame_height * 9)
  537.     when 10 # no sprite
  538.     change(frames, 5, 0, @frame_height * 10)
  539.     when 11 # no sprite
  540.     change(frames, 5, 0, @frame_height * 11)
  541.     when 12 # no sprite
  542.     change(frames, 5, 0, @frame_height * 12)
  543.     when 13 # no sprite
  544.     change(frames, 5, 0, @frame_height * 13)
  545.     when 14 # no sprite
  546.     change(frames, 5, 0, @frame_height * 14)
  547.     when 15 # no sprite
  548.     change(frames, 5, 0, @frame_height * 15)
  549.     when 16 # no sprite
  550.     change(frames, 5, 0, @frame_height * 16)
  551.     when 17 # no sprite
  552.     change(frames, 5, 0, @frame_height * 17)
  553.     when 18 # no sprite
  554.     change(frames, 5, 0, @frame_height * 18)
  555.     when 19 # no sprite
  556.     change(frames, 5, 0, @frame_height * 19)
  557.     when 20 # no sprite
  558.     change(frames, 5, 0, @frame_height * 20)
  559.     # ...etc.
  560.    else
  561.      change(frames, 5, 0, @frame_height * number, 0)
  562.    end
  563. end
  564.   
  565. #--------------------------------------------------------------------------
  566. # - Change the battle pose for an enemy
  567. #   number : pose' number
  568. #--------------------------------------------------------------------------
  569. def enemy_pose(number ,enemy_frames = 4)
  570.    case number
  571.    when 0  # run
  572.      change(enemy_frames, 5, 0, 0, 0)
  573.    when 1  # standby
  574.      change(enemy_frames, 5, 0, @frame_height)
  575.    when 2 # defend
  576.      change(enemy_frames, 5, 0, @frame_height * 2)
  577.    when 3 # Hurt, loops
  578.      change(enemy_frames, 5, 0, @frame_height * 3)
  579.    when 4 # attack
  580.      change(enemy_frames, 5, 0, @frame_height * 4, 0, true)
  581.    when 5 # skill
  582.      change(enemy_frames, 5, 0, @frame_height * 5)
  583.    when 6 # death
  584.      change(enemy_frames, 5, 0, @frame_height * 6)
  585.    when 7 # no sprite
  586.      change(enemy_frames, 5, 0, @frame_height * 7)
  587.      # ...etc.
  588.    else
  589.      change(enemy_frames, 5, 0, @frame_height * number, 0)
  590.    end
  591. end
  592. #==============================================================================
  593. # sniplet end...
  594. #==============================================================================  
  595.   
  596.   
  597. def update
  598.    super
  599.    
  600.    if @battler == nil                                                      
  601.      self.bitmap = nil                                                      
  602.      loop_animation(nil)                                                   
  603.      return                                                               
  604.    end                                                                     
  605.    if @battler.battler_name != @battler_name or
  606.       @battler.battler_hue != @battler_hue

  607.      @battler_name = @battler.battler_name
  608.      @battler_hue = @battler.battler_hue
  609.      self.bitmap = RPG::Cache.battler(@battler_name, @battler_hue)
  610.      @width = bitmap.width
  611.      @height = bitmap.height
  612.      self.ox = @frame_width / 2
  613.      self.oy = @frame_height

  614.      if @battler.dead? or @battler.hidden
  615.        self.opacity = 0
  616.      end
  617.      self.x =  @battler.screen_x
  618.      self.y =  @battler.screen_y
  619.      self.z = @battler.screen_z
  620.    end

  621.    if @battler.damage == nil and
  622.       @battler.state_animation_id != @state_animation_id
  623.      @state_animation_id = @battler.state_animation_id
  624.      loop_animation($data_animations[@state_animation_id])
  625.    end

  626.    if @battler.is_a?(Game_Actor) and @battler_visible
  627.      if $game_temp.battle_main_phase
  628.        self.opacity += 3 if self.opacity < 255
  629.      else
  630.        self.opacity -= 3 if self.opacity > 207
  631.      end
  632.    end

  633.    if @battler.blink
  634.      blink_on
  635.    else
  636.      blink_off
  637.    end

  638.    unless @battler_visible
  639.      if not @battler.hidden and not @battler.dead? and
  640.         (@battler.damage == nil or @battler.damage_pop)
  641.        appear
  642.        @battler_visible = true
  643.      end
  644.      if not @battler.hidden and
  645.         (@battler.damage == nil or @battler.damage_pop) and
  646.         @battler.is_a?(Game_Actor)
  647.        appear
  648.        @battler_visible = true
  649.      end
  650.    end
  651.    if @battler_visible
  652.      if @battler.hidden
  653.        $game_system.se_play($data_system.escape_se)
  654.        escape
  655.        @battler_visible = false
  656.      end
  657.      if @battler.white_flash
  658.        whiten
  659.        @battler.white_flash = false
  660.      end
  661.      if @battler.animation_id != 0
  662.        animation = $data_animations[@battler.animation_id]
  663.        animation(animation, @battler.animation_hit)
  664.        @battler.animation_id = 0
  665.      end
  666.      if @battler.damage_pop
  667.        damage(@battler.damage, @battler.critical)
  668.        @battler.damage = nil
  669.        @battler.critical = false
  670.        @battler.damage_pop = false
  671.      end
  672.      if @battler.damage == nil and @battler.dead?
  673.        if @battler.is_a?(Game_Enemy)
  674.          $game_system.se_play($data_system.enemy_collapse_se)
  675.          collapse
  676.          @battler_visible = false
  677.        else
  678.          $game_system.se_play($data_system.actor_collapse_se) unless @dead
  679.          @dead = true
  680.          pose(6)
  681.        end
  682.      else
  683.        @dead = false
  684.      end
  685.    end                                                                #
  686. end
  687. end


  688. #==============================================================================
  689. # Scene_Battle Costum  Battle System
  690. #==============================================================================

  691. class Scene_Battle
  692.   
  693.   
  694. def update_phase4
  695.    case @phase4_step
  696.    when 1
  697.      update_phase4_step1
  698.    when 2
  699.      update_phase4_step2
  700.    when 3
  701.      update_phase4_step3
  702.    when 4
  703.      update_phase4_step4
  704.    when 5
  705.      update_phase4_step5
  706.    when 6
  707.      update_phase4_step6
  708.    when 7
  709.      update_phase4_step7
  710.    when 8
  711.     update_phase4_step8   
  712.   end
  713.   
  714.   ############################################################################
  715.    #####菜刀王到此一游################
  716.     if @result_window != nil
  717.       @result_window.update
  718.     end
  719.   ##########################################################################
  720. end
  721.   
  722.   #-------------------------------------------------------------------------
  723.   #  ● 生成基本行动结果
  724.   #-------------------------------------------------------------------------
  725. def make_basic_action_result
  726.    
  727.    if @active_battler.is_a?(Game_Actor)
  728.      $actor_on_top = true
  729.    elsif @active_battler.is_a?(Game_Enemy)
  730.      $actor_on_top = false
  731.    end
  732.    
  733.    if @active_battler.current_action.basic == 0
  734. #============================================================================
  735. # WEAPONS START...
  736. #============================================================================
  737. #
  738. #================================= Different Weapons with different animations
  739. #
  740. # this is quite simple as you can see...
  741. # if you want to add a weapon to the animation list then look at the scrîpt below...
  742. # and i hope you'll find out how this works...
  743. #
  744. #
  745. # if not...
  746. # here is the way...
  747. # first thing...
  748. # just copy and paste "elseif @active_battler_enemy.weapon_id == ID..."
  749. # just after the last @weapon_sprite....
  750. #
  751. # here the ID is you need to look in you game databse the number that stands before
  752. # your weapon name is the ID you need to input here...
  753. #
  754. # same thing goes for the monster party... ^-^
  755. # monster normaly dont need more sprites for weapons....
  756. #
  757. # if you want to use more... then replace the "@weapon_sprite_enemy = 4"
  758. # with these lines... (but you need to edit them)
  759. #
  760. #        if @active_battler.weapon_id == 1 # <--  weapon ID number
  761. #          @weapon_sprite_enemy = 4 # <-- battle animation
  762. #        elsif @active_battler.weapon_id == 5 # <-- weapon ID number
  763. #          @weapon_sprite_enemy = 2 # <-- battle animation
  764. #        elsif @active_battler.weapon_id == 9 # <-- weapon ID number
  765. #          @weapon_sprite_enemy = 0 # <-- battle animation
  766. #        elsif @active_battler.weapon_id == 13 # <-- weapon ID number
  767. #          @weapon_sprite_enemy = 6 # <-- battle animation
  768. #        else
  769. #          @weapon_sprite_enemy = 4
  770. #        end
  771. #
  772. #================================= END

  773.      if @active_battler.is_a?(Game_Actor)
  774.        if $data_weapons[@active_battler.weapon_id] == nil
  775.          @weapon_sprite = 4
  776.        else
  777.          if $data_weapons[@active_battler.weapon_id].name2 == nil or
  778.            $data_weapons[@active_battler.weapon_id].name2 == ""
  779.            @weapon_sprite = 4
  780.          else
  781.            @weapon_sprite = $data_weapons[@active_battler.weapon_id].name2.to_i
  782.          end
  783.        end
  784.         
  785. # monster section is here... ^-^

  786.      else # @active_battler.is_a?(Game_Enemy)
  787.          @weapon_sprite_enemy = 4
  788.      end
  789.         
  790. #
  791. #=============================================================================
  792. # WEAPONS END....
  793. #=============================================================================
  794.       
  795.       
  796.      @animation1_id = @active_battler.animation1_id
  797.      @animation2_id = @active_battler.animation2_id
  798.      if @active_battler.is_a?(Game_Enemy)
  799.        if @active_battler.restriction == 3
  800.          target = $game_troop.random_target_enemy
  801.        elsif @active_battler.restriction == 2
  802.          target = $game_party.random_target_actor
  803.        else
  804.          index = @active_battler.current_action.target_index
  805.          target = $game_party.smooth_target_actor(index)
  806.        end
  807. #======== here is the setting for the movement & animation...
  808.          x = target.screen_x - RPG::Cache.battler(@active_battler.battler_name, @active_battler.battler_hue).width/6
  809.          @spriteset.enemy_sprites[@active_battler.index].enemy_pose(0)
  810.          @spriteset.enemy_sprites[@active_battler.index].move(x, target.screen_y, 10)
  811. #========= here if you look at the RPG's movement settings you'll see
  812. #========= that he takes the number 40 for the speed of the animation...
  813. #========= i thing thats too fast so i settet it down to 10 so looks smoother...
  814.      end
  815.      if @active_battler.is_a?(Game_Actor)
  816.        if @active_battler.restriction == 3
  817.          target = $game_party.random_target_actor
  818.        elsif @active_battler.restriction == 2
  819.          target = $game_troop.random_target_enemy
  820.        else
  821.          index = @active_battler.current_action.target_index
  822.          target = $game_troop.smooth_target_enemy(index)
  823.        end
  824. #======= the same thing for the player... ^-^
  825.        x = target.screen_x + RPG::Cache.battler(@active_battler.battler_name, @active_battler.battler_hue).width/8
  826.        @spriteset.actor_sprites[@active_battler.index].pose(0)
  827.        @spriteset.actor_sprites[@active_battler.index].move(x, target.screen_y, 10)
  828.      end
  829.      @target_battlers = [target]
  830.   
  831.      
  832.     # 应用通常攻击的效果
  833.      for target in @target_battlers
  834.       target.attack_effect(@active_battler)
  835.      end
  836.      return
  837.    end
  838.    # 防御的情况下
  839.    if @active_battler.current_action.basic == 1
  840.      if @active_battler.is_a?(Game_Actor)
  841.        @spriteset.actor_sprites[@active_battler.index].pose(2) #defence
  842.      else
  843.        @spriteset.enemy_sprites[@active_battler.index].enemy_pose(2) #defence
  844.      end
  845.      @help_window.set_text($data_system.words.guard, 1)
  846.      return
  847.    end
  848.    if @active_battler.is_a?(Game_Enemy) and
  849.       @active_battler.current_action.basic == 2
  850.      @help_window.set_text("逃走", 1)
  851.      @active_battler.escape
  852.      return
  853.    end
  854.    if @active_battler.current_action.basic == 3
  855.      $game_temp.forcing_battler = nil
  856.      @phase4_step = 1
  857.      return
  858.    end
  859.    
  860.    if @active_battler.current_action.basic == 4
  861.      if $game_temp.battle_can_escape == false
  862.        $game_system.se_play($data_system.buzzer_se)
  863.        return
  864.      end
  865.      $game_system.se_play($data_system.decision_se)
  866.      update_phase2_escape
  867.      return
  868.    end
  869. end
  870. #--------------------------------------------------------------------------
  871. # skill aktion...
  872. #--------------------------------------------------------------------------
  873. def make_skill_action_result
  874.    @skill = $data_skills[@active_battler.current_action.skill_id]
  875.    unless @active_battler.current_action.forcing
  876.      unless @active_battler.skill_can_use?(@skill.id)
  877.        $game_temp.forcing_battler = nil
  878.        @phase4_step = 1
  879.        return
  880.      end
  881.    end
  882.    @active_battler.sp -= @skill.sp_cost
  883.    @status_window.refresh
  884.    @help_window.set_text(@skill.name, 1)
  885.    
  886. #=============================================================================
  887. # SKILL SPRITES START
  888. #=============================================================================
  889. # this one is the same as the one for the weapons...
  890. # for the one who have this for the first time
  891. # look at the scrîpt i hope it is easy to understand...
  892. #
  893. # the other one that have the earlier versions of this scrîpt they dont need explenation
  894. # ... i think....
  895. # the think that changed is the line where the animation ID is given to the sprite...
  896. # the number after the "pose" is the animation ID... it goes for every other animation as well..
  897. # if you have an animation for a skill that have more frames...
  898. # then just insert the number of frames after the first number...
  899. # so it looks like this.... "pose(5, 8)" <-- 5 is the animation...
  900. # 8 is the max frame (that means your animation have 8 frames...) ^-^
  901.    
  902.    if @active_battler.is_a?(Game_Actor)
  903.      if @skill.name != "one of the skills" # <--skill doesn't exist => all the skills have the skill animation!
  904.        @spriteset.actor_sprites[@active_battler.index].pose(5) # <-- sprite number
  905.      end
  906.    else
  907.      if @skill.name != "one of the skills" # <-- first skill name
  908.        @spriteset.enemy_sprites[@active_battler.index].enemy_pose(5) # <-- sprite number
  909.      end
  910.    end
  911. #=============================================================================
  912. # SKILL SPRITES END
  913. #=============================================================================
  914.    
  915.    @animation1_id = @skill.animation1_id
  916.    @animation2_id = @skill.animation2_id
  917.    @common_event_id = @skill.common_event_id
  918.    set_target_battlers(@skill.scope)
  919.    for target in @target_battlers
  920.      target.skill_effect(@active_battler, @skill)
  921.    end
  922. end
  923. #--------------------------------------------------------------------------
  924. # how here we make the item use aktions
  925. #--------------------------------------------------------------------------
  926. def make_item_action_result
  927.    # sorry i didnt work on this...
  928.    # couse i dont have a sprite that uses items....
  929.    # so i just added the standby sprite here...
  930.    # when i get more time for this i'll try what i can do for this one... ^-^
  931.    # its the same as the ones above...
  932.    if @active_battler.is_a?(Game_Actor)
  933.      @spriteset.actor_sprites[@active_battler.index].pose(1)
  934.    else
  935.      @spriteset.enemy_sprites[@active_battler.index].enemy_pose(1)
  936.    end
  937.    
  938.    @item = $data_items[@active_battler.current_action.item_id]
  939.    unless $game_party.item_can_use?(@item.id)
  940.      @phase4_step = 1
  941.      return
  942.    end
  943.    if @item.consumable
  944.      $game_party.lose_item(@item.id, 1)
  945.    end
  946.    @help_window.set_text(@item.name, 1)
  947.    @animation1_id = @item.animation1_id
  948.    @animation2_id = @item.animation2_id
  949.    @common_event_id = @item.common_event_id
  950.    index = @active_battler.current_action.target_index
  951.    target = $game_party.smooth_target_actor(index)
  952.    set_target_battlers(@item.scope)
  953.    for target in @target_battlers
  954.      target.item_effect(@item)
  955.    end
  956. end
  957.   
  958. #==============================================================================
  959. # here again.... snipplet from RPG's scrîpt
  960. #==============================================================================


  961. # this one here is for the winning pose...
  962. # if you happen to use my old costum level scrîpt then you need to add the
  963. # marked line to you "def start_phase5" in  "Scene_Battle 2" and delete this one...
  964. # the ->  =*****=
  965. # marks the end where you need to delete...
  966. # and -> {=====}
  967. # marks the line you need to copy and paste in the other one...
  968. # you need to add it at the same position...

  969. def start_phase5
  970.    @phase = 5
  971.    $game_system.me_play($game_system.battle_end_me)
  972.    $game_system.bgm_play($game_temp.map_bgm)
  973.    exp = 0
  974.    gold = 0
  975.    treasures = []
  976.    for enemy in $game_troop.enemies
  977.      unless enemy.hidden
  978.        exp += enemy.exp
  979.        gold += enemy.gold
  980.        ##################################################################
  981.         #将会掉多种宝物的敌人的编号写在@MIDE里面。
  982.         @MIDE = [16]
  983.         for i in [email][email protected][/email]
  984.           #当前敌人会掉多种宝物
  985.           if enemy.id == @MIDE[i]
  986.             lol = true
  987.           end
  988.         end
  989.         if lol == true
  990.           case enemy.id
  991.           when 16 # 敌人编号为16
  992.             # 出现宝物判定,机率请自定义,如果是100%出现的宝物可以省略这行。
  993.             if rand(100) < 30 # 30%掉宝率
  994.               treasures.push($data_items[42]) # 黄宝石
  995.             end
  996.             if rand(100) < 30 # 30%掉宝率
  997.               treasures.push($data_items[43]) # 蓝宝石
  998.             end
  999.             if rand(100) < 30 # 30%掉宝率
  1000.               treasures.push($data_items[44]) # 绿宝石
  1001.             end
  1002.          # when 2 # 敌人编号为2
  1003.           #  if rand(100) < 50 # 50%掉宝率
  1004.            #   treasures.push($data_items[1]) # 回复剂
  1005.            # end
  1006.             #if rand(100) < 50 # 50%掉宝率
  1007.             #  treasures.push($data_items[4]) # 香水
  1008.            # end
  1009.           #when 3 # 敌人编号为3
  1010.             # 100%掉宝率
  1011.            # treasures.push($data_items[4]) # 香水
  1012.           #  if rand(100) < 50 # 50%掉宝率
  1013.          #     treasures.push($data_items[7]) # 圣灵药
  1014.          #   end
  1015.           end
  1016.         else
  1017.           # 出现宝物判定
  1018.         
  1019.           if rand(100) < enemy.treasure_prob
  1020.             if enemy.item_id > 0
  1021.               treasures.push($data_items[enemy.item_id])
  1022.             end
  1023.             if enemy.weapon_id > 0
  1024.               treasures.push($data_weapons[enemy.weapon_id])
  1025.             end
  1026.             if enemy.armor_id > 0
  1027.               treasures.push($data_armors[enemy.armor_id])
  1028.             end
  1029.           end
  1030.         end
  1031.      ####################################################################
  1032.      end
  1033.    end
  1034.    treasures = treasures[0..5]
  1035.    for i in 0...$game_party.actors.size
  1036.      actor = $game_party.actors[i]
  1037.      @spriteset.actor_sprites[i].pose(7) unless actor.dead? # {=====}
  1038.      ####################################################################
  1039.      #获得双倍经验
  1040.      if actor.cant_get_exp? == false
  1041.        last_level = actor.level
  1042.        if $game_switches[59] == true
  1043.          nexp = exp * 2
  1044.          actor.exp += nexp
  1045.        else
  1046.          nexp = exp
  1047.          actor.exp += exp
  1048.        end
  1049.     ####################################################################
  1050.        if actor.level > last_level
  1051.          @status_window.level_up(i)
  1052.        end
  1053.      end
  1054.    end
  1055.    $game_party.gain_gold(gold)
  1056.    for item in treasures
  1057.      case item
  1058.      when RPG::Item
  1059.        $game_party.gain_item(item.id, 1)
  1060.      when RPG::Weapon
  1061.        $game_party.gain_weapon(item.id, 1)
  1062.      when RPG::Armor
  1063.        $game_party.gain_armor(item.id, 1)
  1064.      end
  1065.    end
  1066.    #################################################################
  1067.    @result_window = Window_BattleResult.new(nexp, gold, treasures)
  1068.    #################################################################
  1069.    @result_window.visible = true
  1070.   @phase5_wait_count = 100
  1071. end


  1072. #   =*****=
  1073. #--------------------------------------------------------------------------
  1074. # updating the movement
  1075. # since RPG isnt used to comments... i'll comment it again...
  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.      if @active_battler.is_a?(Game_Actor)
  1082.        @spriteset.actor_sprites[@active_battler.index].pose(@weapon_sprite)
  1083.      elsif @active_battler.is_a?(Game_Enemy)
  1084.        @spriteset.enemy_sprites[@active_battler.index].enemy_pose(@weapon_sprite_enemy)
  1085.      end
  1086.    end
  1087.    if @animation1_id == 0
  1088.      @active_battler.white_flash = true
  1089.    else
  1090.      @active_battler.animation_id = @animation1_id
  1091.      @active_battler.animation_hit = true
  1092.    end
  1093.    @phase4_step = 4
  1094. end

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

  1117. def update_phase4_step5
  1118.    #if @active_battler.hp > 0 and @active_battler.slip_damage?
  1119.    #  @active_battler.slip_damage_effect
  1120.    #  @active_battler.damage_pop = true
  1121.    #end

  1122.    @help_window.visible = false
  1123.    @status_window.refresh
  1124.    # here comes the guard animations....
  1125.    if @active_battler.is_a?(Game_Actor)
  1126.      @spriteset.actor_sprites[@active_battler.index].pose(1)
  1127.    else
  1128.      @spriteset.enemy_sprites[@active_battler.index].enemy_pose(1)
  1129.    end
  1130.    for target in @target_battlers
  1131.      ###############################################################
  1132.       if target.state?(42)                              # 攻击反弹
  1133.         if @active_battler.current_action.kind == 0 and target.damage != "Miss"
  1134.           target.animation_id = 98
  1135.           @active_battler.hp -= @active_battler.damage.to_i
  1136.           @active_battler.damage_pop = true
  1137.         end
  1138.       end
  1139.       ##############################################################
  1140.      if target.damage != nil
  1141.        target.damage_pop = true
  1142.        if @active_battler.is_a?(Game_Actor)
  1143.          @spriteset.actor_sprites[@active_battler.index].pose(1)
  1144.        else
  1145.          @spriteset.enemy_sprites[@active_battler.index].enemy_pose(1)
  1146.        end
  1147.      end
  1148.    end
  1149.    #k_特殊武器begin...........................................
  1150.     if @active_battler.is_a?(Game_Actor)
  1151.     if  wqpd(30) and @lianji == 1
  1152.       if wqpd(31)
  1153.       for target in @target_battlers
  1154.       if target.damage != nil and target.damage != "Miss"
  1155.         @active_battler.hp += target.damage / 4
  1156.         @active_battler.damage = 0 - target.damage / 4
  1157.         @active_battler.damage_pop = true
  1158.       end
  1159.      end
  1160.      end
  1161.       j = 0
  1162.       for i in $game_troop.enemies
  1163.         j += i.hp
  1164.       end
  1165.        @phase4_step = 2 if j != 0
  1166.     @lianji -= 1
  1167.     elsif wqpd(31)
  1168.       for target in @target_battlers
  1169.       if target.damage != nil and target.damage != "Miss"
  1170.         @active_battler.hp += target.damage / 4
  1171.         @active_battler.damage = 0 - target.damage / 4
  1172.         @active_battler.damage_pop = true
  1173.       end
  1174.       end
  1175.     @phase4_step = 6
  1176.     @lianji = 1
  1177.    else
  1178.     @phase4_step = 6
  1179.     @lianji = 1
  1180.    end
  1181.    else
  1182.    @phase4_step = 6
  1183.    end
  1184.    #k_特殊武器over...........................................
  1185.    #@phase4_step = 6
  1186. end
  1187. def wqpd(id) #武器判定
  1188.   return (@active_battler.weapon_id == 0 ? false :$data_weapons[@active_battler.weapon_id].element_set.include?(id) and (rand(100) < $data_system.elements[id].split(/,/)[1].to_i))
  1189.   end
  1190. #--------------------------------------------------------------------------
  1191. # ● フレーム更新 (メインフェーズ ステップ 6 : リフレッシュ)
  1192. #--------------------------------------------------------------------------
  1193. def update_phase4_step6
  1194.    
  1195.    # here we are asking if the player is dead and is a player or an enemy...
  1196.    # these lines are for the running back and standby animation....
  1197.    if @active_battler.is_a?(Game_Actor) and !@active_battler.dead?
  1198.      @spriteset.actor_sprites[@active_battler.index].move(@active_battler.screen_x, @active_battler.screen_y, 20)
  1199.      @spriteset.actor_sprites[@active_battler.index].pose(0)
  1200.    elsif !@active_battler.dead?
  1201.      @spriteset.enemy_sprites[@active_battler.index].move(@active_battler.screen_x, @active_battler.screen_y, 20)
  1202.      @spriteset.enemy_sprites[@active_battler.index].enemy_pose(0)
  1203.    end
  1204.    for target in @target_battlers
  1205.      if target.is_a?(Game_Actor) and !target.dead?
  1206.          @spriteset.actor_sprites[target.index].pose(1)
  1207.        elsif !target.dead?
  1208.          @spriteset.enemy_sprites[target.index].enemy_pose(1)
  1209.      end
  1210.    end
  1211.    $game_temp.forcing_battler = nil
  1212.    if @common_event_id > 0
  1213.      common_event = $data_common_events[@common_event_id]
  1214.      $game_system.battle_interpreter.setup(common_event.list, 0)
  1215.    end
  1216.    @phase4_step = 7
  1217. end

  1218. def update_phase4_step7
  1219.    
  1220.    # here we are asking if the player is dead and is a player or an enemy...
  1221.    # these lines are for the running back and standby animation....
  1222.    if @active_battler.is_a?(Game_Actor) and !@active_battler.dead?
  1223.      @spriteset.actor_sprites[@active_battler.index].pose(1)
  1224.    elsif !@active_battler.dead?
  1225.      @spriteset.enemy_sprites[@active_battler.index].enemy_pose(1)
  1226.    end

  1227.    $game_temp.forcing_battler = nil
  1228.    if @common_event_id > 0
  1229.      common_event = $data_common_events[@common_event_id]
  1230.      $game_system.battle_interpreter.setup(common_event.list, 0)
  1231.    end
  1232.    @phase4_step = 1
  1233. end
  1234.   
  1235. # this one is an extra... without this the animation whill not work correctly...

  1236. def update
  1237.    if $game_system.battle_interpreter.running?
  1238.      $game_system.battle_interpreter.update
  1239.      if $game_temp.forcing_battler == nil
  1240.        unless $game_system.battle_interpreter.running?
  1241.          unless judge
  1242.            setup_battle_event
  1243.          end
  1244.        end
  1245.        if @phase != 5
  1246.          @status_window.refresh
  1247.        end
  1248.      end
  1249.    end
  1250.    $game_system.update
  1251.    $game_screen.update
  1252.    if $game_system.timer_working and $game_system.timer == 0
  1253.      $game_temp.battle_abort = true
  1254.    end
  1255.    @help_window.update
  1256.    @party_command_window.update
  1257.    @actor_command_window.update
  1258.    @status_window.update
  1259.    @message_window.update
  1260.    @spriteset.update
  1261.    if $game_temp.transition_processing
  1262.      $game_temp.transition_processing = false
  1263.      if $game_temp.transition_name == ""
  1264.        Graphics.transition(20)
  1265.      else
  1266.        Graphics.transition(40, "Graphics/Transitions/" +
  1267.          $game_temp.transition_name)
  1268.      end
  1269.    end
  1270.    if $game_temp.message_window_showing
  1271.      return
  1272.    end
  1273.    if @spriteset.effect?
  1274.      return
  1275.    end
  1276.    if $game_temp.gameover
  1277.      $scene = Scene_Gameover.new
  1278.      return
  1279.    end
  1280.    if $game_temp.to_title
  1281.      $scene = Scene_Title.new
  1282.      return
  1283.    end
  1284.    if $game_temp.battle_abort
  1285.      $game_system.bgm_play($game_temp.map_bgm)
  1286.      battle_end(1)
  1287.      return
  1288.    end
  1289.    if @wait_count > 0
  1290.      @wait_count -= 1
  1291.      return
  1292.    end

  1293.    # this one holds the battle while the player moves
  1294.    for actor in @spriteset.actor_sprites
  1295.      if actor.moving
  1296.        return
  1297.      end
  1298.    end
  1299.    # and this one is for the enemy...
  1300.    for enemy in @spriteset.enemy_sprites
  1301.      if enemy.moving# and $game_system.animated_enemy
  1302.        return
  1303.      end
  1304.    end
  1305.    
  1306.    if $game_temp.forcing_battler == nil and
  1307.       $game_system.battle_interpreter.running?
  1308.      return
  1309.    end
  1310.    case @phase
  1311.    when 1
  1312.      update_phase1
  1313.    when 2
  1314.      update_phase2
  1315.    when 3
  1316.      update_phase3
  1317.    when 4
  1318.      update_phase4
  1319.    when 5
  1320.      update_phase5
  1321.    end
  1322. end
  1323.   
  1324. #==============================================================================
  1325. # end of the snipplet
  1326. # if you want the comments that where here just look at the scene_battle 4...
  1327. # i added some comments since RPG hasnt add any....
  1328. #==============================================================================
  1329. end
复制代码
这个是超级横版战斗
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
88
在线时间
331 小时
注册时间
2010-10-24
帖子
778
6
发表于 2012-8-9 17:49:19 | 只看该作者
jiahui5592986 发表于 2012-8-9 17:35
这个 我看过了,            感觉还是怪怪的

算了,找不到了,自己搜索吧.....
回复 支持 反对

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
1556
在线时间
626 小时
注册时间
2010-8-5
帖子
451
5
 楼主| 发表于 2012-8-9 17:35:14 | 只看该作者
a19981007a 发表于 2012-8-9 17:25
http://search.discuz.qq.com/f/discuz?agId=0&charset=utf-8&cuName=&egIds=&fmSign=270a&gId=7&module=fo ...

这个 我看过了,            感觉还是怪怪的

点评

记得以前有一个伪3D的脚本,找不到了....我先找找....  发表于 2012-8-9 17:44
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-12-5 09:59

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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