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

Project1

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

[已经解决] 帮忙修改一下脚本吗?

[复制链接]

Lv3.寻梦者

梦石
0
星屑
4661
在线时间
1117 小时
注册时间
2014-5-9
帖子
163
跳转到指定楼层
1
发表于 2015-6-14 13:55:41 | 只看该作者 回帖奖励 |正序浏览 |阅读模式

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

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

x
本帖最后由 a965645462 于 2015-6-20 10:31 编辑

下面那个是ABS脚本的一部分    由于本人测试中BUG没有描述清楚!
现在的BUG是 : 怪物设置2个以上的掉落物,装备到快捷栏中没有显示此物品的数量!!!(设置1个掉落物则是正常的)
有大触帮个忙吗?{:2_275:}
这是整个ABS脚本链接:http://pan.baidu.com/s/1o6sh29k
RUBY 代码复制
  1. #===============================================================================
  2. # * Falcao Pearl ABS script shelf # 5
  3. #
  4. # This script handles all sprites of Pearl ABS engine
  5. #===============================================================================
  6.  
  7. # Anime action enguine
  8. class Anime_Obj < Game_Character
  9.   attr_accessor :draw_it, :destroy_it, :item, :user, :original_speed
  10.   attr_reader   :custom_graphic
  11.   def initialize(user, item)
  12.     super()
  13.     PearlKernel.load_item(item)
  14.     @draw_it = false
  15.     @destroy_it = false
  16.     @item = item
  17.     @user = user
  18.     @custom_graphic = false
  19.     graphic = PearlKernel.user_graphic
  20.     if graphic.split(" ").include?('custom')
  21.       graphic = graphic.sub("custom ","")
  22.       @custom_graphic = true
  23.       user.transparent = true
  24.       user.using_custom_g = true
  25.     end
  26.     @character_name = graphic
  27.     moveto(@user.x, @user.y)
  28.     set_direction(@user.direction)
  29.     @original_speed = PearlKernel.user_animespeed
  30.  
  31.     #patch
  32.     PearlKernel.check_iconset(@item, "User Iconset = ", self)
  33.     @character_name = "" if @user_iconset != nil
  34.   end
  35. end
  36.  
  37. # Sprite character added battlers as enemies and the anime sprites fit
  38. class Sprite_Character < Sprite_Base
  39.   alias falcaopearl_update_position update_position
  40.   def update_position
  41.     if !@character.battler.nil? and @character.battler.is_a?(
  42.       Game_Enemy) and @character.battler.breath_enable
  43.       apply_breath_effect(@character)
  44.     end
  45.     self.zoom_x = @character.zoomfx_x
  46.     self.zoom_y = @character.zoomfx_y
  47.     self.angle = @character.angle_fx
  48.     falcaopearl_update_position
  49.     update_anime_object_pos
  50.   end
  51.  
  52.   # anime object position and action
  53.   def update_anime_object_pos
  54.     if @character.is_a?(Anime_Obj)
  55.       if @character.custom_graphic
  56.         add = 0
  57.       else
  58.         @ch == 128 ? add = 48 : add = (@ch / 2) / 2
  59.       end
  60.       self.x = @character.user.screen_x
  61.       self.y = @character.user.screen_y + add
  62.       self.z = @character.user.screen_z + 1
  63.       @character.direction = @character.user.direction
  64.       if @character.user.anime_speed == 0
  65.         if @character.custom_graphic
  66.           @character.user.transparent = false
  67.           @character.user.using_custom_g = false
  68.         end
  69.         @character.destroy_it = true
  70.       end
  71.       if @character.user.making_spiral
  72.         @character.direction == 8 ? @character.pattern=1 : @character.pattern=2
  73.         return
  74.       end
  75.       a= @character.user.anime_speed.to_f/@character.original_speed.to_f * 100.0
  76.       case a
  77.       when 80..100 ; @character.pattern = 0
  78.       when 60..80  ; @character.pattern = 1
  79.       when 25..60  ; @character.pattern = 2
  80.       end
  81.     end
  82.   end
  83.  
  84.   # Enemy battler graphics engine
  85.   alias falcaopearl_battler_bitmap set_character_bitmap
  86.   def set_character_bitmap
  87.     if battler_graphic?
  88.       self.bitmap= Cache.battler(@character_name,@character.battler.battler_hue)
  89.       self.ox = self.bitmap.width / 2
  90.       self.oy = self.bitmap.height
  91.       return
  92.     end
  93.     falcaopearl_battler_bitmap
  94.   end
  95.  
  96.   def battler_graphic?
  97.     if !@character.battler.nil? and @character.battler.is_a?(
  98.       Game_Enemy) and @character.battler.battler_graphic
  99.       return false if @character.page.nil?
  100.       @character_name = @character.battler.battler_name
  101.       return true
  102.     end
  103.     return false
  104.   end
  105.  
  106.   alias falcaopearl_battler_graphic update_src_rect
  107.   def update_src_rect
  108.     return if battler_graphic?
  109.     falcaopearl_battler_graphic
  110.   end
  111.  
  112.   # breath effect
  113.   def apply_breath_effect(char)
  114.     return if @character.is_a?(Game_Event) and @character.erased
  115.     char.zoomfx_x -= 0.0023 if !char.zfx_bol
  116.     char.zoomfx_y -= 0.0023 if !char.zfx_bol
  117.     char.zoomfx_x += 0.0023 if  char.zfx_bol
  118.     char.zoomfx_y += 0.0023 if  char.zfx_bol
  119.     char.zfx_bol = true if char.zoomfx_x <= 0.93
  120.     char.zfx_bol = false if char.zoomfx_x >= 1.0
  121.   end
  122. end
  123.  
  124. #sprite characters part 2 (icon graphics feature
  125. class Sprite_Character < Sprite_Base
  126.  
  127.   def iconset_graphic?
  128.     !@character.user_iconset.nil? || !@character.pro_iconset.nil?
  129.   end
  130.  
  131.   alias falcao_fantastic_bit update_bitmap
  132.   def update_bitmap
  133.     if iconset_graphic?
  134.       if @apply_iconset.nil?
  135.         icon = @character.user_iconset[0] if !@character.user_iconset.nil? and
  136.         @character.is_a?(Anime_Obj)
  137.         icon = @character.pro_iconset[0] if !@character.pro_iconset.nil? and
  138.         @character.is_a?(Projectile)
  139.         set_iconsetbitmap(icon)
  140.         @apply_iconset = true
  141.       end
  142.       apply_breath_effect2(@character) if !@character.pro_iconset.nil? and
  143.       @character.is_a?(Projectile) and @character.pro_iconset[1] == :animated
  144.       @enable_angle = @character.user_iconset[1] if
  145.       !@character.user_iconset.nil? and @character.is_a?(Anime_Obj)
  146.       return
  147.     end
  148.     falcao_fantastic_bit
  149.   end
  150.  
  151.   alias falcao_fantastic_update_position update_position
  152.   def update_position
  153.     falcao_fantastic_update_position
  154.     set_angle_changes(@enable_angle) if @enable_angle != nil
  155.   end
  156.  
  157.   def apply_angle_pattern(x_plus, y_plus, angle)
  158.     self.x = @character.user.screen_x + x_plus
  159.     self.y = @character.user.screen_y + y_plus
  160.     self.angle = angle
  161.   end
  162.  
  163.   def set_angle_changes(type)
  164.     ani= @character.user.anime_speed.to_f/@character.original_speed.to_f * 100.0
  165.     case ani
  166.     when 80..100
  167.       perform_animated(0) if type == :animated
  168.     when 60..80
  169.       perform_animated(1) if type == :animated
  170.     when 0..60
  171.       perform_animated(2) if type == :animated
  172.     end
  173.     if type != :animated
  174.       perform_static       if type == :static
  175.       perform_shielding    if type == :shielding
  176.     end
  177.   end
  178.  
  179.   # animated
  180.   def perform_animated(pattern)
  181.     case pattern
  182.     when 0
  183.       apply_angle_pattern(10, -12, -166) if @character.user.direction == 2
  184.       if @character.user.direction == 4 || @character.user.direction == 6
  185.         apply_angle_pattern(-8, -26, -46)
  186.         self.z = @character.user.screen_z - 1
  187.       end
  188.       apply_angle_pattern(-22, -10, 0)   if @character.user.direction == 8
  189.     when 1
  190.       apply_angle_pattern(0, 0, -266)   if @character.user.direction == 2
  191.       apply_angle_pattern(-20, -10, 12) if @character.user.direction == 4
  192.       apply_angle_pattern(7, -20, -78)  if @character.user.direction == 6
  193.       if @character.user.direction == 8
  194.         apply_angle_pattern(-8, -26, -46)
  195.         self.z = @character.user.screen_z - 1
  196.       end
  197.     when 2
  198.       apply_angle_pattern(8, -5, -210)    if @character.user.direction == 2
  199.       apply_angle_pattern(-10, 2, 52)     if @character.user.direction == 4
  200.       apply_angle_pattern(8, -15, -126)  if @character.user.direction == 6
  201.       apply_angle_pattern(10, -16, - 100) if @character.user.direction == 8
  202.     end
  203.   end
  204.  
  205.   # static
  206.   def perform_static
  207.     apply_angle_pattern(8, -5, -210)    if @character.user.direction == 2
  208.     apply_angle_pattern(-10, 2, 52)     if @character.user.direction == 4
  209.     apply_angle_pattern(8, -15, -126)  if @character.user.direction == 6
  210.     if @character.user.direction == 8
  211.       apply_angle_pattern(-8, -26, -46)
  212.       self.z = @character.user.screen_z - 1
  213.     end
  214.   end
  215.  
  216.   # shielding
  217.   def perform_shielding
  218.     apply_angle_pattern(2, 4, 0)    if @character.user.direction == 2
  219.     apply_angle_pattern(-10, 0, 0)     if @character.user.direction == 4
  220.     if @character.user.direction == 6
  221.       apply_angle_pattern(10, 0, 0)  
  222.       self.z = @character.user.screen_z - 1
  223.     elsif @character.user.direction == 8
  224.       apply_angle_pattern(11, -9, 0)  
  225.       self.z = @character.user.screen_z - 1
  226.     end
  227.   end
  228.  
  229.   def apply_breath_effect2(char)
  230.     char.zoomfx_x -= 0.03 if !char.zfx_bol
  231.     char.zoomfx_y -= 0.03 if !char.zfx_bol
  232.     char.zoomfx_x += 0.03 if char.zfx_bol
  233.     char.zoomfx_y += 0.03 if char.zfx_bol
  234.     char.zfx_bol = true if char.zoomfx_x <= 0.84
  235.     char.zfx_bol = false if char.zoomfx_x >= 1.0
  236.   end
  237.  
  238.   alias falcao_fantastic_src update_src_rect
  239.   def update_src_rect
  240.     return if iconset_graphic?
  241.     falcao_fantastic_src
  242.   end
  243.  
  244.   def set_iconsetbitmap(icon_index, enabled = true)
  245.     self.bitmap = Bitmap.new(24, 24)
  246.     bit = Cache.system("Iconset")
  247.     rect = Rect.new(icon_index % 16 * 24, icon_index / 16 * 24, 24, 24)
  248.     self.bitmap.blt(0, 0, bit, rect, enabled ? 255 : 150)
  249.     @cw = self.ox = 12
  250.     @ch = self.oy = 24
  251.   end
  252. end
  253.  
  254. #===============================================================================
  255. # Drop sprites
  256. class Sprite_EnemyDrop < Sprite
  257.   attr_reader   :event
  258.   def initialize(viewport, event, item)
  259.     super(viewport)
  260.     @event = event
  261.     @item = item
  262.     @drop_quantity = @item.tool_data("Drop Quantity = ")
  263.     @drop_quantity = 1 if @drop_quantity.nil?
  264.     self.z = $game_player.screen_z - 1
  265.     @object_zooming = 0
  266.     set_bitmap
  267.     update
  268.   end
  269.  
  270.   def update
  271.     super
  272.     self.bush_depth = @event.bush_depth
  273.     @object_zooming += 1
  274.     case @object_zooming
  275.     when 1..8  ; self.zoom_x -= 0.01 ;  self.zoom_y -= 0.01
  276.     when 9..16 ; self.zoom_x += 0.01 ;  self.zoom_y += 0.01
  277.     when 17..24 ; self.zoom_x = 1.0   ;  self.zoom_y = 1.0; @object_zooming = 0
  278.     end
  279.     self.x = @event.screen_x - 12
  280.     self.y = @event.screen_y - 24
  281.     if @event.x == $game_player.x and @event.y == $game_player.y and
  282.       !$game_player.moving?
  283.       complete_action
  284.       return
  285.     end
  286.  
  287.     complete_action(false) if @event.respawn_count == 1
  288.   end
  289.  
  290.   def complete_action(gaining=true)
  291.     $game_party.gain_item(@item, @drop_quantity) if gaining
  292.     dispose
  293.     @event.dropped_items.delete(@item)
  294.     $game_map.events_withtags.delete(@event)
  295.   end
  296.  
  297.   def dispose
  298.     self.bitmap.dispose
  299.     super
  300.   end
  301.  
  302.   def set_bitmap
  303.     self.bitmap = Bitmap.new(26, 38)
  304.     bitmap = Cache.system("Iconset")
  305.     icon = @item.icon_index
  306.     rect = Rect.new(icon % 16 * 24, icon / 16 * 24, 24, 24)
  307.     self.bitmap.blt(0, 0, bitmap, rect)
  308.  
  309.     ##num adds
  310.     return if @drop_quantity == 0
  311.     self.bitmap.font.size = 14
  312.     self.bitmap.font.bold = true
  313.     self.bitmap.draw_text(0, 8, 26, 32, @drop_quantity.to_s, 1)
  314.   end
  315. end
  316.  
  317. #===============================================================================
  318. # Dead icon sprites for player and followers
  319.  
  320. class Sprite_DeadIcon < Sprite
  321.   attr_reader   :character
  322.   def initialize(viewport, character)
  323.     super(viewport)
  324.     @character = character
  325.     self.bitmap = Bitmap.new(24, 24)
  326.     bitmap = Cache.system("Iconset")
  327.     icon = 1
  328.     rect = Rect.new(icon % 16 * 24, icon / 16 * 24, 24, 24)
  329.     self.bitmap.blt(0, 0, bitmap, rect)
  330.     @knok = @character.actor.actor.tool_data("Knockdown Graphic = ",false)!= nil
  331.     update
  332.   end
  333.  
  334.   def update
  335.     super
  336.     self.x = @character.screen_x - 10
  337.     self.y = @character.screen_y - 54
  338.     self.z = @character.screen_z + 1
  339.     self.opacity = @character.opacity
  340.     self.visible = !@character.transparent
  341.     if @knok
  342.       @character.knockdown_data[0] = 10 if !@character.battler.deadposing.nil?
  343.     else
  344.       @character.playdead
  345.       @character.direction = 8
  346.       self.x = @character.screen_x - 26
  347.     end
  348.   end
  349.  
  350.   def dispose
  351.     self.bitmap.dispose
  352.     @character.angle_fx = 0.0 unless @knok
  353.     super
  354.   end
  355. end
  356.  
  357. #===============================================================================
  358. # State and buff icons sprites
  359. class StateBuffIcons < Sprite
  360.   def initialize(viewport, mode)
  361.     super(viewport)
  362.     @mode = mode
  363.     self.bitmap = Bitmap.new(36, 134)
  364.     @picture = Cache.system("Iconset")
  365.     if @mode == "States"
  366.       self.x = 544 - 36
  367.       self.y = 90
  368.     else
  369.       self.x = 544 - 36
  370.       self.y = 230
  371.     end
  372.     @actor = $game_player.actor
  373.     @old_status = []
  374.     refresh_icons
  375.     update
  376.   end
  377.  
  378.   def icons
  379.     return @actor.state_icons if @mode == 'States'
  380.     return @actor.buff_icons  if @mode == '状态'
  381.   end
  382.  
  383.   def update
  384.     5.times.each {|i|
  385.     if @old_status[i] != icons[i]
  386.       refresh_icons
  387.       $game_player.actor.apply_usability
  388.     end}
  389.     if @actor != $game_player.actor
  390.       @actor = $game_player.actor
  391.       refresh_icons
  392.     end
  393.   end
  394.  
  395.   def dispose
  396.     self.bitmap.dispose
  397.     super
  398.   end
  399.  
  400.   def refresh_icons
  401.     self.bitmap.clear
  402.     self.bitmap.font.size = 15
  403.     self.bitmap.draw_text(-2, -8, self.bitmap.width + 6, 32, @mode, 1)
  404.     y = 12; count = 0
  405.     for i in icons
  406.       draw_icon(6, y, i)
  407.       y += 24; count += 1
  408.       break if count == 5
  409.     end
  410.     5.times.each {|i| @old_status[i] = icons[i]}
  411.   end
  412.  
  413.   def draw_icon(x, y, index)
  414.     icon = index
  415.     rect = Rect.new(icon % 16 * 24, icon / 16 * 24, 24, 24)
  416.     self.bitmap.blt(x, y, @picture, rect)
  417.   end
  418. end
  419.  
  420. #===============================================================================
  421. #  * Damage pop engine
  422.  
  423. class DamagePop_Obj < Game_Character
  424.   attr_accessor :draw_it, :destroy_it, :target, :dmgcustom, :timingg, :plus_time
  425.   attr_accessor :plus_time
  426.   def initialize(target, custom=nil)
  427.     super()
  428.     @draw_it = false
  429.     @destroy_it = false
  430.     @target = target
  431.     @timingg = 70
  432.     @plus_time = 0.0
  433.     @dmgcustom = custom
  434.     moveto(@target.x, @target.y)
  435.   end
  436. end
  437.  
  438. class Sprite_DamagePop < Sprite
  439.   attr_reader   :target
  440.   def initialize(viewport, target)
  441.     super(viewport)
  442.     @target = target
  443.     self.bitmap = Bitmap.new(200, 50)
  444.     self.bitmap.font.size = 20
  445.     case rand(4)
  446.     when 0 then @resto_plus = 0.5
  447.     when 1 then @resto_plus = 0.6
  448.     when 2 then @resto_plus = 0.7
  449.     when 3 then @resto_plus = 0.8
  450.     end
  451.     create_text_for_display
  452.     set_text
  453.     update
  454.   end
  455.  
  456.   def create_text_for_display
  457.     battler = @target.target.battler
  458.     value   = battler.result.hp_damage
  459.     value2  = battler.result.mp_damage
  460.     value3  = battler.result.tp_damage
  461.  
  462.     # hp damage texts
  463.     if value > 0
  464.       battler.result.critical ? @text = '暴击 ' + value.to_s :
  465.       @text = value.to_s
  466.     elsif value < 0
  467.       self.bitmap.font.color = Color.new(10,220,45)
  468.       @text = value.to_s.sub("-","")
  469.     elsif    battler.result.missed
  470.       @text = '未命中'
  471.     elsif battler.result.evaded
  472.       @text = '闪避'
  473.  
  474.     elsif battler.result.success # tanget take no damage but result succes
  475.       @text = value.to_s
  476.     end
  477.  
  478.     # mp damage text
  479.     if value2 < 0
  480.       self.bitmap.font.color = Color.new(20,160,225)
  481.       @text = value2.to_s.sub("-","")
  482.     elsif value2 > 0
  483.       @text = 'Mp 丢失' + value2.to_s
  484.     end
  485.  
  486.     # TP damage text
  487.     if value3 < 0
  488.       self.bitmap.font.color = Color.new(20,160,225)
  489.       @text = value3.to_s.sub("-","")
  490.     elsif value3 > 0
  491.       @text = 'Tp 丢失' + value3.to_s
  492.     end
  493.  
  494.     # states and buff display
  495.     if battler.result.status_affected?
  496.       display_changed_states(battler)
  497.       display_changed_buffs(battler)
  498.     end
  499.  
  500.     # Custom text (it has hightest priority
  501.     if !@target.dmgcustom.nil?
  502.       if @target.dmgcustom == 1
  503.         @text = value.to_s + '破防!' #+ value.to_s
  504.       elsif @target.dmgcustom == 2
  505.         @text = '防护!'
  506.       elsif @target.dmgcustom.is_a?(String)   
  507.         @text = @target.dmgcustom
  508.       elsif @target.dmgcustom.is_a?(Array)
  509.         self.bitmap.font.color = @target.dmgcustom[1]
  510.         @text = @target.dmgcustom[0]
  511.       end
  512.     end
  513.     battler.result.clear
  514.   end
  515.  
  516.   # text set and position
  517.   def set_text
  518.     self.x = @target.screen_x - 98
  519.     self.y = @target.screen_y - 54
  520.     self.z = 3 * 100
  521.     self.opacity = @target.opacity
  522.     #self.bitmap.font.bold = true
  523.     self.bitmap.font.shadow = true
  524.     item = @target.target.battler.used_item
  525.     if item != nil and !item.scope.between?(1, 6) and
  526.       item.tool_data("User Graphic = ", false).nil?
  527.       @text = item.name if @text.nil?
  528.     end
  529.     @target.target.battler.used_item = nil
  530.     self.bitmap.draw_text(0, 0, 200, 32, @text, 1)
  531.   end
  532.  
  533.   # Buffs display
  534.   def display_changed_buffs(target)
  535.     display_buffs(target, target.result.added_buffs, Vocab::BuffAdd)
  536.     display_buffs(target, target.result.added_debuffs, Vocab::DebuffAdd)
  537.     display_buffs(target, target.result.removed_buffs, Vocab::BuffRemove)
  538.   end
  539.  
  540.   def display_buffs(target, buffs, fmt)
  541.     buffs.each do |param_id|
  542.       @text = sprintf(fmt,'', Vocab::param(param_id)).sub("'s","")
  543.     end
  544.   end
  545.  
  546.   # States display
  547.   def display_changed_states(target)
  548.     display_added_states(target)
  549.     display_removed_states(target)
  550.   end
  551.  
  552.   # Display added states
  553.   def display_added_states(target)
  554.     target.result.added_state_objects.each do |state|
  555.       state_msg = target.actor? ? state.message1 : state.message2
  556.       #target.perform_collapse_effect if state.id == target.death_state_id
  557.       next if state_msg.empty?
  558.       @text = state_msg
  559.     end
  560.   end
  561.  
  562.   # Display removed states
  563.   def display_removed_states(target)
  564.     target.result.removed_state_objects.each do |state|
  565.       next if state.message4.empty?
  566.       @text = state.message4
  567.     end
  568.   end
  569.  
  570.   def update
  571.     @target.timingg -= 1 if @target.timingg > 0
  572.     @target.plus_time += @resto_plus
  573.     self.opacity -= 5 if @target.timingg <= 25
  574.     @target.destroy_it = true if @target.timingg == 0
  575.     self.x = @target.target.screen_x - 98
  576.     self.y = @target.target.screen_y - 54 - @target.plus_time
  577.   end
  578.  
  579.   def dispose
  580.     self.bitmap.dispose
  581.     super
  582.   end
  583. end
  584.  
  585. #===============================================================================
  586. # Sprite set map
  587.  
  588. class Spriteset_Map
  589.  
  590.   alias falcaopearl_create_characters create_characters
  591.   def create_characters
  592.     create_pearl_abs_sprites
  593.     falcaopearl_create_characters
  594.   end
  595.  
  596.   def create_pearl_abs_sprites
  597.     if $game_player.send_dispose_signal
  598.       dispose_pearlabs_sprites
  599.       $game_player.send_dispose_signal = false
  600.     end
  601.     @projectile_sprites = []
  602.     $game_player.projectiles.each do |projectile|
  603.       @projectile_sprites.push(Sprite_Character.new(@viewport1, projectile))
  604.     end
  605.     @damagepop_sprites = []
  606.     $game_player.damage_pop.each do |target|
  607.       @damagepop_sprites.push(Sprite_DamagePop.new(@viewport1, target))
  608.     end
  609.     @animeabs_sprites = []
  610.     $game_player.anime_action.each do |anime|
  611.       @animeabs_sprites.push(Sprite_Character.new(@viewport1, anime))
  612.     end
  613.     @enemy_drop_sprites = []
  614.     $game_player.enemy_drops.each do |enemy|
  615.       for i in enemy.dropped_items
  616.         @enemy_drop_sprites.push(Sprite_EnemyDrop.new(@viewport1, enemy, i))
  617.       end
  618.     end
  619.     @dead_iconsprites = []
  620.     @dead_characters = []
  621.   end
  622.  
  623.   # Drop sprites update
  624.   def update_drop_sprites
  625.     @enemy_drop_sprites.each {|sprite| sprite.update if !sprite.disposed?
  626.     if sprite.disposed?
  627.       @enemy_drop_sprites.delete(sprite)
  628.       $game_player.enemy_drops.delete(sprite.event)
  629.     end
  630.     }
  631.     $game_player.enemy_drops.each do |enemy|
  632.       unless enemy.draw_drop
  633.         for i in enemy.dropped_items
  634.           @enemy_drop_sprites.push(Sprite_EnemyDrop.new(@viewport1, enemy, i))
  635.         end
  636.         enemy.draw_drop = true
  637.       end
  638.     end
  639.   end
  640.  
  641.   alias falcaopearl_upsp_update update
  642.   def update
  643.     update_pearl_abs_main_sprites
  644.     falcaopearl_upsp_update
  645.   end
  646.  
  647.   # pearl abs main sprites update
  648.   def update_pearl_abs_main_sprites
  649.     if $game_player.pearl_menu_call[1] == 1
  650.       dispose_tool_sprite
  651.       dispose_state_icons
  652.       dispose_buff_icons
  653.       dispose_actorlifebars if $imported["Falcao Pearl ABS Life"]
  654.       $game_player.pearl_menu_call[1] = 0
  655.       case $game_player.pearl_menu_call[0]
  656.       when :tools     then SceneManager.call(Scene_QuickTool)
  657.       when :character then SceneManager.call(Scene_CharacterSet)
  658.       when :battler   then SceneManager.call(Scene_BattlerSelection)
  659.       end
  660.       return
  661.     end
  662.     update_projectile_sprites
  663.     update_damagepop_sprites
  664.     update_absanime_sprites
  665.     update_dead_characters
  666.     update_drop_sprites
  667.     $game_system.skillbar_enable.nil? ? create_tool_sprite : dispose_tool_sprite
  668.     @pearl_tool_sprite.update unless @pearl_tool_sprite.nil?
  669.     $game_player.actor.state_icons.empty? ? dispose_state_icons :
  670.     create_state_icons
  671.     $game_player.actor.buff_icons.empty? ? dispose_buff_icons :
  672.     create_buff_icons
  673.     @states_sprites.update unless @states_sprites.nil?
  674.     @buff_sprites.update unless @buff_sprites.nil?
  675.   end
  676.  
  677.   # create tool sprite
  678.   def create_tool_sprite
  679.     return if !@pearl_tool_sprite.nil?
  680.     @pearl_tool_sprite = Sprite_PearlTool.new(@viewport2)
  681.   end
  682.  
  683.   # dispose tool sprite
  684.   def dispose_tool_sprite
  685.     return if @pearl_tool_sprite.nil?
  686.     @pearl_tool_sprite.dispose
  687.     @pearl_tool_sprite = nil
  688.   end
  689.  
  690.   # Create State icons
  691.   def create_state_icons
  692.     return if !@states_sprites.nil?
  693.     @states_sprites = StateBuffIcons.new(@viewport2, 'States')
  694.   end
  695.  
  696.   # dispose state icons
  697.   def dispose_state_icons
  698.     return if @states_sprites.nil?
  699.     @states_sprites.dispose
  700.     @states_sprites = nil
  701.   end
  702.  
  703.   # Create Buff icons
  704.   def create_buff_icons
  705.     return if !@buff_sprites.nil?
  706.     @buff_sprites = StateBuffIcons.new(@viewport2, '状态')
  707.   end
  708.  
  709.   # dispose buff icons
  710.   def dispose_buff_icons
  711.     return if @buff_sprites.nil?
  712.     @buff_sprites.dispose
  713.     @buff_sprites = nil
  714.   end
  715.  
  716.   # Projectiles
  717.   def update_projectile_sprites
  718.     @projectile_sprites.each {|sprite| sprite.update if !sprite.disposed?}
  719.     $game_player.projectiles.each do |projectile|
  720.       unless projectile.draw_it
  721.         @projectile_sprites.push(Sprite_Character.new(@viewport1, projectile))
  722.         projectile.draw_it = true
  723.       end
  724.       if projectile.destroy_it
  725.         @projectile_sprites.each {|i|
  726.         if i.character.is_a?(Projectile) and i.character.destroy_it
  727.           i.dispose
  728.           @projectile_sprites.delete(i)
  729.         end
  730.         }
  731.         if projectile.user.making_spiral
  732.           projectile.user.making_spiral = false
  733.         end
  734.         if projectile.user.battler_guarding[0]
  735.           projectile.user.battler_guarding = [false, nil]
  736.           projectile.user.battler.remove_state(9)
  737.         end
  738.         $game_player.projectiles.delete(projectile)
  739.       end
  740.     end
  741.   end
  742.  
  743.   # Damage pop
  744.   def update_damagepop_sprites
  745.     @damagepop_sprites.each {|sprite| sprite.update if !sprite.disposed?}
  746.     $game_player.damage_pop.each do |target|
  747.       unless target.draw_it
  748.         @damagepop_sprites.push(Sprite_DamagePop.new(@viewport1, target))
  749.         target.draw_it = true
  750.       end
  751.       if target.destroy_it
  752.         @damagepop_sprites.each {|i|
  753.         if i.target.destroy_it
  754.           i.dispose
  755.           @damagepop_sprites.delete(i)
  756.         end
  757.         }
  758.         $game_player.damage_pop.delete(target)
  759.       end
  760.     end
  761.   end
  762.  
  763.   #=================================
  764.   # ANIME SPRITES
  765.   def update_absanime_sprites
  766.     @animeabs_sprites.each {|s| s.update if !s.disposed?
  767.     unless $game_player.anime_action.include?(s.character)
  768.       s.dispose
  769.       @animeabs_sprites.delete(s)
  770.       $game_player.anime_action.delete(s.character)
  771.     end
  772.     }
  773.     $game_player.anime_action.each do |anime|
  774.       unless anime.draw_it
  775.         @animeabs_sprites.push(Sprite_Character.new(@viewport1, anime))
  776.         anime.draw_it = true
  777.       end
  778.       if anime.destroy_it
  779.         @animeabs_sprites.each {|i|
  780.         if i.character.is_a?(Anime_Obj) and i.character.destroy_it
  781.           i.dispose
  782.           @animeabs_sprites.delete(i)
  783.         end
  784.         }
  785.         $game_player.anime_action.delete(anime)
  786.       end
  787.     end
  788.   end
  789.  
  790.   def update_dead_characters
  791.     for follower in $game_player.followers
  792.       next if follower.visible? == nil
  793.       next unless follower.battler.dead?
  794.       unless @dead_characters.include?(follower)
  795.         sprite = Sprite_DeadIcon.new(@viewport1, follower)
  796.         @dead_iconsprites.push(sprite)
  797.         @dead_characters.push(follower)
  798.       end
  799.     end
  800.  
  801.     for sprite in @dead_iconsprites
  802.       sprite.update if !sprite.disposed?
  803.       if !sprite.character.battler.dead?
  804.         @dead_iconsprites.delete(sprite)
  805.         @dead_characters.delete(sprite.character)
  806.         sprite.dispose
  807.       end
  808.     end
  809.   end
  810.  
  811.   alias falcaopearl_spdispose dispose
  812.   def dispose
  813.     dispose_pearl_main_sprites
  814.     falcaopearl_spdispose
  815.   end
  816.  
  817.   # pearl abs disposing
  818.   def dispose_pearl_main_sprites
  819.     @dead_iconsprites.each {|icon| icon.dispose}
  820.     dispose_tool_sprite
  821.     dispose_state_icons
  822.     dispose_buff_icons
  823.     dispose_pearlabs_sprites
  824.   end
  825.  
  826.   def dispose_pearlabs_sprites
  827.     @projectile_sprites.each {|pro| pro.dispose}
  828.     @projectile_sprites.clear
  829.     @damagepop_sprites.each {|target| target.dispose}
  830.     @damagepop_sprites.clear
  831.     @animeabs_sprites.each {|anime| anime.dispose}
  832.     @animeabs_sprites.clear
  833.     @enemy_drop_sprites.each {|sprite| sprite.dispose}
  834.     @enemy_drop_sprites.clear
  835.   end
  836. end
   
     

Lv3.寻梦者

梦石
0
星屑
4661
在线时间
1117 小时
注册时间
2014-5-9
帖子
163
5
 楼主| 发表于 2015-6-20 15:05:53 | 只看该作者
问题已经解决!此贴终结!
回复 支持 反对

使用道具 举报

Lv5.捕梦者 (暗夜天使)

只有笨蛋才会看到

梦石
1
星屑
21631
在线时间
9414 小时
注册时间
2012-6-19
帖子
7118

开拓者短篇九导演组冠军

4
发表于 2015-6-19 23:56:30 | 只看该作者
稍微扫了一下代码,虽然不知道这个BUG是怎么发生的,试着手动给所有道具增加下面这条备注:
  1. Tool Item Cost = 1
复制代码

点评

没私聊我哦!  发表于 2015-6-20 15:38
(●▽●)话费呢  发表于 2015-6-20 15:17
感谢你帮我解决了我的问题!!  发表于 2015-6-20 15:05
我就是问问,你添加了这条备注后bug是否还存在?  发表于 2015-6-20 11:55
抱歉!由于本人BUG的描述有误!  发表于 2015-6-20 10:31

评分

参与人数 1星屑 +233 收起 理由
taroxd + 233 认可答案

查看全部评分

回复 支持 反对

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
4661
在线时间
1117 小时
注册时间
2014-5-9
帖子
163
3
 楼主| 发表于 2015-6-19 22:02:56 | 只看该作者
本帖最后由 a965645462 于 2015-6-19 22:15 编辑

找人花代价解决此问题(只支持话费、QB)
价格不是问题.
如有意者 QQ方式私聊:965645462
回复 支持 反对

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
4661
在线时间
1117 小时
注册时间
2014-5-9
帖子
163
2
 楼主| 发表于 2015-6-14 17:32:23 | 只看该作者
未解决啊
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-11-16 07:55

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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