查看: 979|回复: 1

[已经解决] 请帮忙看个脚本……

[复制链接]
梦石
0
星屑
50
在线时间
92 小时
注册时间
2010-6-29
回帖
15
发表于 2014-2-25 22:05:29 | 显示全部楼层 |阅读模式

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

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

×
本帖最后由 Sion 于 2014-2-25 22:13 编辑

在使用防御之后读条就会变得很慢,本人只懂一点点脚本,注释的西班牙语又看不懂……
求助关于防御的AT是如何设定的啊……
  1. if true
  2. #==============================================================================
  3. # +++ MOG - ATB System  (v 1.0) +++
  4. #==============================================================================
  5. # By Moghunter
  6. # [url]http://www.atelier-rgss.com/[/url]
  7. #==============================================================================
  8. # Sistema de batalha de turnos em tempo real.
  9. #==============================================================================

  10. #==============================================================================
  11. # ● AT SYSTEM
  12. #==============================================================================
  13. # A velocidade de AT é baseaddo na agilidade do Battler.
  14. # Em caso de batalhas preventivas (Preemptive) os aliados começarão com AT em
  15. # 80% e os inimigos começarão com AT em 0 (Zero)
  16. # Em batalhas surpresas (Surprise) é o inverso das batalhas preventivas.
  17. # Em batalhas normais todos os battlers começarão com AT em 40%.
  18. #==============================================================================
  19. # ● CAST TIME
  20. #==============================================================================
  21. # Para definir uma habilidade ou item com a função de Cast Time basta definir
  22. # o valor da velocidade (Speed) diferente de 0 (Zero).
  23. #
  24. # NOTA - Não é possível ativar 2 ou mais habilidades com a função Cast Time no
  25. # mesmo turno. (Caso você esteja usando características de Multi Action em
  26. # seu projeto.)
  27. #==============================================================================
  28. module MOG_AT_SYSTEM
  29.   #Som quando o sistema AT estiver no maximo
  30.   SE_ACTIVE = "Decision2"
  31.   #Definição do valor de AT para ativar a ação.(Gauge Meter).
  32.   AT_GAUGE_METER = 5000
  33.   # Definição do tipo de duração (Contagem/formula) de um turno.
  34.   # Essa definição influência na ativação dos eventos de batalha.
  35.   # (BATTLE EVENTS)
  36.   #
  37.   # 0 - Duração de um turno é um valor fixo.
  38.   # 1 - Duração de um turno é multiplicado pela quantidade de batllers.
  39.   # 2 - Duração de um turno é baseado na média de agilidade dos battlers.
  40.   #
  41.   TURN_DURATION_TYPE = 1
  42.   # Definição de valor usado para calcular a duração de um turno.
  43.   TURN_DURATION = 60
  44.   # Definição da animação quando o battler usa habilidades de carregamento.
  45.   CAST_ANIMATION = 113
  46.   # Ativar a janela de LOG, deixe desativado se desejar uma batalha mais
  47.   # dinâmica.
  48.   WAIT_LOG_WINDOW = true
  49.   # Ativar a mensagem inicial com os nomes dos inimigos.
  50.   MESSAGE_ENEMY_APPEAR = false
  51.   # Definição da posição da janela de mensagem.
  52.   # 0 - Superior
  53.   # 1 - Centro
  54.   # 2 - Inferior  
  55.   MESSAGE_POSITION = 0
  56.   # Tipo de posicionamento da Hud.
  57.   # 0 - Posição fixa.
  58.   # 1 - Posição baseado no valor X e Y do battler.
  59.   AT_HUD_POSITION_TYPE = 0
  60.   #Posição geral (Inicial) da Hud.
  61.   AT_HUD_POSITION = [25,400]
  62.   #Posição do medidor de AT
  63.   AT_METER_POSITION = [29,1]
  64.   #Definição da posição do espaço da HUD entre os membros do grupo.
  65.   #
  66.   #MEMBERS_SPACE = [Horizontal ,Vertical]
  67.   #
  68.   MEMBERS_SPACE = [136,0]
  69.   #Velocidade de animação do medidor de at, defina 0 se não quiser a animação.
  70.   AT_METER_FLOW_SPEED = 3
  71.   #Prioridade da Hud.
  72.   BATTLE_HUD_Z = 0   
  73. end

  74. $imported = {} if $imported.nil?
  75. $imported[:mog_atb_system] = true

  76. #==============================================================================
  77. # ■ Game_System
  78. #==============================================================================
  79. class Game_System
  80.   
  81.   attr_accessor :at_max
  82.   
  83.   #--------------------------------------------------------------------------
  84.   # ● Initialize
  85.   #--------------------------------------------------------------------------         
  86.   alias mog_at_system_initialize initialize
  87.   def initialize
  88.       @at_max = [[MOG_AT_SYSTEM::AT_GAUGE_METER, 999999].min, 100].max
  89.       mog_at_system_initialize
  90.   end
  91.   
  92. end

  93. #==============================================================================
  94. # ■ BattleManager
  95. #==============================================================================
  96. module BattleManager
  97.   
  98.   #--------------------------------------------------------------------------
  99.   # ● Battle Start
  100.   #--------------------------------------------------------------------------  
  101.   def self.battle_start
  102.       $game_system.battle_count += 1
  103.       $game_party.on_battle_start
  104.       $game_troop.on_battle_start
  105.       if MOG_AT_SYSTEM::MESSAGE_ENEMY_APPEAR
  106.          $game_troop.enemy_names.each do |name|
  107.          $game_message.add(sprintf(Vocab::Emerge, name))
  108.          end
  109.       end
  110.       if @preemptive
  111.          $game_message.add(sprintf(Vocab::Preemptive, $game_party.name))
  112.       elsif @surprise
  113.          $game_message.add(sprintf(Vocab::Surprise, $game_party.name))
  114.       end
  115.       wait_for_message
  116.   end
  117.   
  118.   #--------------------------------------------------------------------------
  119.   # ● Input Start
  120.   #--------------------------------------------------------------------------
  121.   def self.input_start_at(battler)
  122.       if @phase != :input
  123.          @phase = :input
  124.          battler.make_actions
  125.          clear_actor
  126.       end
  127.       return !@surprise && battler.inputable?
  128.   end

  129.   #--------------------------------------------------------------------------
  130.   # ● Turn Start
  131.   #--------------------------------------------------------------------------
  132.   def self.turn_start
  133.       @phase = :turn
  134.       clear_actor
  135.       make_action_orders
  136.   end  
  137.   
  138.   #--------------------------------------------------------------------------
  139.   # ● Preemtive Attack
  140.   #--------------------------------------------------------------------------  
  141.   def self.preemptive_attack
  142.       @preemptive
  143.   end  
  144.   
  145.   #--------------------------------------------------------------------------
  146.   # ● Suprise Attack
  147.   #--------------------------------------------------------------------------   
  148.   def self.surprise_attack
  149.       @surprise
  150.   end   
  151.   
  152. end  

  153. #==============================================================================
  154. # ■ Game Action
  155. #==============================================================================
  156. class Game_Action  

  157.   #--------------------------------------------------------------------------
  158.   # ● Prepare
  159.   #--------------------------------------------------------------------------            
  160.   alias mog_at_system_prepare prepare
  161.   def prepare
  162.       mog_at_system_prepare
  163.       set_cast_action
  164.   end
  165.   
  166.   #--------------------------------------------------------------------------
  167.   # ● Set Cast Action
  168.   #--------------------------------------------------------------------------               
  169.   def set_cast_action
  170.       return if forcing
  171.       if @item.object != nil and @item.object.speed != 0 and @subject.at_cast.empty?
  172.          @subject.at_cast = [@item.object,@item.object.speed.abs,@target_index]
  173.          @item.object = nil
  174.          @subject.animation_id = MOG_AT_SYSTEM::CAST_ANIMATION
  175.          @subject.at = 0
  176.          BattleManager.turn_end if @subject.auto_battle?
  177.       elsif !@subject.at_cast.empty?
  178.          if @subject.at_cast[1] == 0
  179.             @item.object = @subject.at_cast[0]
  180.             @target_index = @subject.at_cast[2]            
  181.             @subject.at_cast.clear
  182.          else   
  183.             @item.object = nil
  184.          end
  185.       end  
  186.   end  
  187.   
  188. end


  189. #==============================================================================
  190. # ■ Game Battler Base
  191. #==============================================================================
  192. class Game_BattlerBase  

  193.   #--------------------------------------------------------------------------
  194.   # ● Inputable?
  195.   #--------------------------------------------------------------------------            
  196.   def inputable?
  197.       normal? && !auto_battle? && self.at == $game_system.at_max
  198.   end
  199.   
  200. end

  201. #==============================================================================
  202. # ■ Game_Battler
  203. #==============================================================================
  204. class Game_Battler < Game_BattlerBase
  205.   
  206.    attr_accessor :at
  207.    attr_accessor :at_cast
  208.    attr_accessor :at_turn_duration
  209.    attr_accessor :at_action
  210.    
  211.   #--------------------------------------------------------------------------
  212.   # ● Initialize
  213.   #--------------------------------------------------------------------------      
  214.    alias mog_at_system_initialize initialize
  215.    def initialize
  216.        mog_at_system_initialize
  217.        @at = 0
  218.        @at_cast = []
  219.        @at_cast_selectable = true
  220.        @at_turn_duration = 0
  221.        @at_action = nil
  222.    end
  223.      
  224.   #--------------------------------------------------------------------------
  225.   # ● At
  226.   #--------------------------------------------------------------------------         
  227.    def at
  228.        n = at_active? ? $game_system.at_max : 0
  229.        return [[@at, n].min, 0].max
  230.    end  
  231.    
  232.   #--------------------------------------------------------------------------
  233.   # ● At Active
  234.   #--------------------------------------------------------------------------            
  235.    def at_active?
  236.        return false if restriction >= 4
  237.        return false if self.hp == 0
  238.        return true
  239.    end  
  240.    
  241.   #--------------------------------------------------------------------------
  242.   # ● Added New State
  243.   #--------------------------------------------------------------------------  
  244.   alias mog_at_system_add_new_state add_new_state
  245.   def add_new_state(state_id)
  246.       mog_at_system_add_new_state(state_id)
  247.       if restriction >= 4
  248.          self.at_cast.clear
  249.          self.at = 0
  250.       end   
  251.   end   
  252.   
  253.   #--------------------------------------------------------------------------
  254.   # ● can AT?
  255.   #--------------------------------------------------------------------------   
  256.   def can_upd_at?
  257.       return false if restriction >= 4
  258.       return false if self.hp == 0
  259.       return false if !self.at_cast.empty?
  260.       return false if self.at_action != nil
  261.       return true
  262.   end
  263.   
  264. end

  265. #==============================================================================
  266. # ■ Game Enemy
  267. #==============================================================================
  268. class Game_Enemy < Game_Battler
  269.   
  270.   #--------------------------------------------------------------------------
  271.   # ● Tranform
  272.   #--------------------------------------------------------------------------  
  273.    alias mog_at_system_transform transform
  274.    def transform(enemy_id)
  275.        mog_at_system_transform(enemy_id)
  276.        self.at = 0
  277.        self.at_cast.clear
  278.    end
  279. end   

  280. if !MOG_AT_SYSTEM::WAIT_LOG_WINDOW
  281. #==============================================================================
  282. # ■ BattleManager
  283. #==============================================================================
  284. class Window_BattleLog < Window_Selectable

  285.   #--------------------------------------------------------------------------
  286.   # ● Refresh
  287.   #--------------------------------------------------------------------------   
  288.   def refresh
  289.   end  

  290.   #--------------------------------------------------------------------------
  291.   # ● Message Speed
  292.   #--------------------------------------------------------------------------   
  293.   def message_speed
  294.       return 5
  295.   end

  296. end
  297. end

  298. #==============================================================================
  299. # ■ Scene Battle
  300. #==============================================================================
  301. class Scene_Battle < Scene_Base
  302.   include MOG_AT_SYSTEM
  303.   
  304.   #--------------------------------------------------------------------------
  305.   # ● AT Wait
  306.   #--------------------------------------------------------------------------         
  307.   alias mog_at_system_start start
  308.   def start
  309.       reset_at_parameter  
  310.       mog_at_system_start
  311.   end  
  312.    
  313.   #--------------------------------------------------------------------------
  314.   # ● Battle Start
  315.   #--------------------------------------------------------------------------
  316.   def battle_start
  317.       BattleManager.battle_start
  318.       process_event
  319.       set_turn_duration
  320.   end
  321.    
  322.   #--------------------------------------------------------------------------
  323.   # ● Reset AT Parameter
  324.   #--------------------------------------------------------------------------  
  325.   def reset_at_parameter
  326.       return if @at_phase != nil
  327.       @at_phase = 0
  328.       n_at = $game_system.at_max * 40 / 100
  329.       p_at = $game_system.at_max * 90 / 100
  330.       s_at = 0
  331.       all_battle_members.each do |battler|
  332.           if BattleManager.preemptive_attack
  333.              battler.at = p_at if battler.is_a?(Game_Actor)
  334.              battler.at = s_at if battler.is_a?(Game_Enemy)
  335.           elsif BattleManager.surprise_attack   
  336.              battler.at = p_at if battler.is_a?(Game_Enemy)
  337.              battler.at = s_at if battler.is_a?(Game_Actor)
  338.           else   
  339.              battler.at = n_at
  340.           end
  341.           if battler.at >= $game_system.at_max
  342.              battler.at = $game_system.at_max - 1
  343.           end
  344.           battler.at = 0 if battler.at < 0  
  345.           battler.at_cast.clear
  346.         end
  347.   end

  348.   #--------------------------------------------------------------------------
  349.   # ● Set Turn Duration
  350.   #--------------------------------------------------------------------------
  351.   def set_turn_duration
  352.       max_battlers = all_battle_members.size > 0 ? all_battle_members.size : 1
  353.       case TURN_DURATION_TYPE
  354.         when 1
  355.            n  = TURN_DURATION * max_battlers
  356.         when 2
  357.            turn_sp = 0
  358.            all_battle_members.each do |battler|
  359.                turn_sp += battler.agi
  360.            end  
  361.            n = TURN_DURATION + (turn_sp / max_battlers)
  362.         else
  363.            n = TURN_DURATION
  364.       end
  365.       turn_time_max = [[n, 9999].min, 120].max
  366.       @turn_duration = [0, turn_time_max]
  367.       if @status_window != nil
  368.          @status_window.open
  369.       end   
  370.   end   
  371.   
  372.   #--------------------------------------------------------------------------
  373.   # ● Turn End
  374.   #--------------------------------------------------------------------------
  375.   def turn_end
  376.       @at_phase = 0
  377.       all_battle_members.each do |battler|
  378.          if battler.at >= $game_system.at_max
  379.             battler.at = 0
  380.             refresh_status
  381.             @log_window.display_auto_affected_status(battler)
  382.             @log_window.wait_and_clear
  383.          end
  384.       end
  385.       BattleManager.turn_end
  386.   end
  387.    
  388.   #--------------------------------------------------------------------------
  389.   # ● Update Turn Duration
  390.   #--------------------------------------------------------------------------            
  391.   def update_turn_duration
  392.       return if @turn_duration == nil or @turn_duration[0] == nil
  393.       @turn_duration[0] += 1
  394.       if @turn_duration[0] >= @turn_duration[1]
  395.          @turn_duration[0] = 0
  396.          $game_troop.increase_turn
  397.          process_event
  398.          check_states_effect_turn
  399.       end  
  400.   end
  401.   
  402.   #--------------------------------------------------------------------------
  403.   # ● Check States Effect Turn
  404.   #--------------------------------------------------------------------------               
  405.   def check_states_effect_turn
  406.       all_battle_members.each do |battler|  
  407.           battler.on_turn_end if battler.restriction >= 4
  408.       end  
  409.   end  
  410.   
  411.   #--------------------------------------------------------------------------
  412.   # ● Update AT System
  413.   #--------------------------------------------------------------------------           
  414.   def update_at_system      
  415.       reset_at_parameter if @at_phase == nil
  416.       set_turn_duration if @turn_duration == nil
  417.       return if !can_update_at?
  418.       update_turn_duration
  419.       all_battle_members.each do |battler|
  420.           update_battler_turn_duration(battler)
  421.           if !battler.at_cast.empty?
  422.              battler.at_cast[1] -= 1
  423.              if battler.at_cast[1] <= 0
  424.                 execute_at_cast(battler)
  425.                 break
  426.              end
  427.           else
  428.              battler.at += battler.agi
  429.           end   
  430.           if battler.at >= $game_system.at_max
  431.              battler.on_turn_end
  432.              update_at_actor(battler)
  433.              update_at_enemy(battler)
  434.              battler.current_action.prepare if battler.current_action
  435.              if battler.at_cast.empty?
  436.                 @at_phase = 1
  437.                 turn_start if battler.is_a?(Game_Enemy)
  438.              end            
  439.              break
  440.           end   
  441.       end  
  442.   end
  443.    
  444.   #--------------------------------------------------------------------------
  445.   # ● Update Battler Turn Duration
  446.   #--------------------------------------------------------------------------            
  447.   def update_battler_turn_duration(battler)
  448.       if battler.restriction >= 4
  449.          battler.at_turn_duration += 1
  450.          if battler.at_turn_duration >= $game_system.at_max
  451.             battler.on_turn_end
  452.             battler.at_turn_duration = 0
  453.          end   
  454.       else   
  455.          battler.at_turn_duration = 0
  456.       end  
  457.   end  
  458.   
  459.   #--------------------------------------------------------------------------
  460.   # ● Execute AT CAST
  461.   #--------------------------------------------------------------------------            
  462.   def execute_at_cast(battler)
  463.       @subject = battler
  464.       battler.make_actions  
  465.       turn_start
  466.   end  
  467.   
  468.   #--------------------------------------------------------------------------
  469.   # ● Update AT Actor
  470.   #--------------------------------------------------------------------------            
  471.   def update_at_actor(battler)   
  472.       return if !battler.is_a?(Game_Actor)
  473.       Audio.se_play("Audio/SE/" + SE_ACTIVE,100,100)  
  474.       start_party_command_selection_at(battler)
  475.   end
  476.   
  477.   #--------------------------------------------------------------------------
  478.   # ● Update AT Enemy
  479.   #--------------------------------------------------------------------------            
  480.   def update_at_enemy(battler)   
  481.       return if !battler.is_a?(Game_Enemy)
  482.       battler.make_actions
  483.   end   
  484.   
  485.   #--------------------------------------------------------------------------
  486.   # ● Can Update AT
  487.   #--------------------------------------------------------------------------            
  488.   def can_update_at?
  489.       return false if $game_troop.interpreter.running?
  490.       return false if BattleManager.action_forced?
  491.       return false if @at_phase != 0
  492.       return false if $game_message.visible
  493.       return false if BattleManager.in_turn?
  494.       return true
  495.   end   
  496.   
  497.   #--------------------------------------------------------------------------
  498.   # ● Star Party Command Selection at
  499.   #--------------------------------------------------------------------------
  500.   def start_party_command_selection_at(battler)
  501.       unless scene_changing?
  502.          refresh_status
  503.          @status_window.unselect
  504.          @status_window.open
  505.          if BattleManager.input_start_at(battler)
  506.             @actor_command_window.close
  507.             next_command
  508.          else
  509.            turn_start
  510.          end
  511.       end
  512.   end  
  513.   
  514.   #--------------------------------------------------------------------------
  515.   # ● Update Basic
  516.   #--------------------------------------------------------------------------        
  517.   alias mog_at_system_update_basic update_basic
  518.   def update_basic
  519.       mog_at_system_update_basic
  520.       update_at_system
  521.       update_party_command
  522.       $game_message.position = MESSAGE_POSITION
  523.   end
  524.   
  525.   #--------------------------------------------------------------------------
  526.   # ● Update Party Command
  527.   #--------------------------------------------------------------------------      
  528.   def update_party_command
  529.       return if !@party_command_window.active
  530.       return if !@actor_command_window.visible
  531.       return if $game_message.visible
  532.       if Input.trigger?(:B)
  533.          next_command
  534.          Sound.play_cancel
  535.          @party_command_window.active = false
  536.       end  
  537.   end
  538.      
  539. end

  540. unless $imported[:mog_battle_hud_ex]

  541. #==============================================================================
  542. # ■ Game Temp
  543. #==============================================================================
  544. class Game_Temp
  545.   
  546.   attr_accessor :cache_at_meter
  547.   
  548.   #--------------------------------------------------------------------------
  549.   # ● Initialize
  550.   #--------------------------------------------------------------------------      
  551.   alias mog_at_meter_initialize initialize
  552.   def initialize
  553.       mog_at_meter_initialize
  554.       cache_atmeter
  555.   end
  556.   
  557.   #--------------------------------------------------------------------------
  558.   # ● Cache ATmeter
  559.   #--------------------------------------------------------------------------      
  560.   def cache_atmeter
  561.       @cache_at_meter = []
  562.       @cache_at_meter.push(Cache.system("Battle_AT_Meter"))
  563.       @cache_at_meter.push(Cache.system("Battle_AT_Layout"))
  564.   end
  565.   
  566. end

  567. #==============================================================================
  568. # ■ AT Meter
  569. #==============================================================================
  570. class AT_Meter
  571.   
  572.   include MOG_AT_SYSTEM
  573.   
  574.   #--------------------------------------------------------------------------
  575.   # ● Initialize
  576.   #--------------------------------------------------------------------------   
  577.   def initialize(actor)
  578.       [url=home.php?mod=space&uid=95897]@actor[/url] = actor
  579.       @flow_speed = 0
  580.       if AT_HUD_POSITION_TYPE == 1 and @actor.use_sprite?
  581.          @x = AT_HUD_POSITION[0] +  @actor.screen_x rescue 0
  582.          @y = AT_HUD_POSITION[1] +  @actor.screnn_y rescue 0
  583.       else   
  584.          @x = AT_HUD_POSITION[0] + (MEMBERS_SPACE[0] * @actor.index)
  585.          @y = AT_HUD_POSITION[1] + (MEMBERS_SPACE[1] * @actor.index)        
  586.       end
  587.       pre_cache
  588.       create_layout
  589.       create_at_meter
  590.   end
  591.   
  592.   #--------------------------------------------------------------------------
  593.   # ● Pre Cache
  594.   #--------------------------------------------------------------------------      
  595.   def pre_cache
  596.       [url=home.php?mod=space&uid=1330256]@meter[/url] = $game_temp.cache_at_meter[0]
  597.       @meter_cw = @meter.width / 3
  598.       @meter_ch = @meter.height / 3
  599.   end
  600.   
  601.   #--------------------------------------------------------------------------
  602.   # ● Create Layout
  603.   #--------------------------------------------------------------------------      
  604.   def create_layout
  605.       @layout = Sprite.new
  606.       @layout.bitmap = $game_temp.cache_at_meter[1]
  607.       @layout.z = BATTLE_HUD_Z
  608.       @layout.x = @x
  609.       @layout.y = @y
  610.   end
  611.   
  612.   #--------------------------------------------------------------------------
  613.   # ● Create AT Meter
  614.   #--------------------------------------------------------------------------      
  615.   def create_at_meter
  616.       @at_meter = Sprite.new
  617.       @at_meter.bitmap = Bitmap.new(@meter_cw,@meter_ch)
  618.       @at_meter.z =  BATTLE_HUD_Z + 50
  619.       @at_meter.x = @x + AT_METER_POSITION[0]
  620.       @at_meter.y = @y + AT_METER_POSITION[1]
  621.       @at_flow = rand(@meter_cw * 2)
  622.       at_flow_update
  623.   end  
  624.   
  625.   #--------------------------------------------------------------------------
  626.   # ● Dispose
  627.   #--------------------------------------------------------------------------   
  628.   def dispose
  629.       return if @layout == nil
  630.       @layout.dispose
  631.       @layout = nil
  632.       @at_meter.bitmap.dispose
  633.       @at_meter.dispose
  634.   end  
  635.   
  636.   #--------------------------------------------------------------------------
  637.   # ● Update
  638.   #--------------------------------------------------------------------------  
  639.   def update
  640.       return if @layout == nil
  641.       at_position
  642.       @flow_speed += 1
  643.       if @flow_speed >= AT_METER_FLOW_SPEED
  644.          @flow_speed = 0
  645.          at_flow_update
  646.       end
  647.   end
  648.   
  649.   #--------------------------------------------------------------------------
  650.   # ● Update
  651.   #--------------------------------------------------------------------------   
  652.   def at_position
  653.       return unless AT_HUD_POSITION_TYPE == 1 and @actor.use_sprite?
  654.       @x = AT_HUD_POSITION[0] +  @actor.screen_x rescue 0
  655.       @y = AT_HUD_POSITION[1] +  @actor.screnn_y rescue 0
  656.       @layout.x = @x
  657.       @layout.y = @y
  658.       @at_meter.x = @x + AT_METER_POSITION[0]
  659.       @at_meter.y = @y + AT_METER_POSITION[1]
  660.   end
  661.    
  662.   #--------------------------------------------------------------------------
  663.   # ● AT Flow Update
  664.   #--------------------------------------------------------------------------
  665.   def at_flow_update
  666.       @at_meter.bitmap.clear
  667.       if !@actor.at_cast.empty?
  668.          max_cast = @actor.at_cast[0].speed.abs != 0 ? @actor.at_cast[0].speed.abs : 1
  669.          at_width = @meter_cw * @actor.at_cast[1] / max_cast
  670.          ch = @meter_ch * 2
  671.       else
  672.          at_width = @meter_cw * @actor.at / $game_system.at_max
  673.          ch = @actor.at < $game_system.at_max ? 0 : @meter_ch
  674.       end  
  675.       src_rect = Rect.new(@at_flow, ch,at_width, @meter_ch)
  676.       @at_meter.bitmap.blt(0,0, @meter, src_rect)
  677.       @at_flow += AT_METER_FLOW_SPEED
  678.       @at_flow = 0 if @at_flow >=  @meter_cw * 2      
  679.   end   
  680.   
  681. end  

  682. #==============================================================================
  683. # ■ Spriteset Battle
  684. #==============================================================================
  685. class Spriteset_Battle
  686.   
  687.   #--------------------------------------------------------------------------
  688.   # ● Initialize
  689.   #--------------------------------------------------------------------------           
  690.   alias mog_at_system_initialize initialize
  691.   def initialize
  692.       mog_at_system_initialize
  693.       create_at_meter
  694.   end  
  695.   
  696.   #--------------------------------------------------------------------------
  697.   # ● Create AT Meter
  698.   #--------------------------------------------------------------------------            
  699.   def create_at_meter     
  700.       @at_meter = []
  701.       for i in $game_party.battle_members
  702.           @at_meter.push(AT_Meter.new(i))
  703.       end      
  704.   end  
  705.   
  706.   #--------------------------------------------------------------------------
  707.   # ● Dispose
  708.   #--------------------------------------------------------------------------      
  709.   alias mog_at_system_dispose dispose
  710.   def dispose
  711.       mog_at_system_dispose
  712.       dispose_at_meter
  713.   end
  714.    
  715.   #--------------------------------------------------------------------------
  716.   # ● Dispose AT Meter
  717.   #--------------------------------------------------------------------------        
  718.   def dispose_at_meter
  719.       return if @at_meter == nil
  720.       @at_meter.each {|sprite| sprite.dispose }
  721.       @at_meter = nil
  722.   end  
  723.   
  724.   #--------------------------------------------------------------------------
  725.   # ● Update
  726.   #--------------------------------------------------------------------------        
  727.   alias mog_at_system_update update
  728.   def update
  729.       mog_at_system_update
  730.       update_at_meter
  731.   end  
  732.   
  733.   #--------------------------------------------------------------------------
  734.   # ● Update AT Meter
  735.   #--------------------------------------------------------------------------         
  736.   def update_at_meter
  737.       return if @at_meter == nil
  738.       @at_meter.each {|sprite| sprite.update }
  739.   end  
  740.   
  741. end

  742. end

  743. end
复制代码
搜狗截图20140225220313.png
梦石
0
星屑
50
在线时间
444 小时
注册时间
2011-1-3
回帖
150

开拓者

发表于 2014-2-26 11:10:27 | 显示全部楼层
本帖最后由 漫漫人生路 于 2014-2-26 11:16 编辑

请将技能库里2号技能 防御 的速度修正值为0,或者按需求增大。其他技能出现这种缓慢情况的也请修改速度修正。
具体脚本在该脚本的 178行到188行,应该是这里吧.........

点评

谢谢!  发表于 2014-2-26 12:14

评分

参与人数 1星屑 +132 收起 理由
熊喵酱 + 132 认可答案

查看全部评分

回复

使用道具 举报

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

本版积分规则

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

在本版发帖返回顶部