Maker Palace
Si quiere un completo acceso al contenido del foro. Registrate

Maker Palace

¡El Reino del RpgMaker y del Ocio!
 
ÍndiceBuscarGrupos de UsuariosScriptsRecursosTutorialesJuegos creados por los PalacersPalaceWikiFAQRegistrarseConectarse
Conectarse
Nombre de Usuario:
Contraseña:
Entrar automáticamente en cada visita: 
:: Recuperar mi contraseña
Temas similares
  • » peticiones de script de elfbot
  • » 1 Y SOLO 1
  • » Cabrera jugará solo un mes con Leones
  • » Registro de Dones (Solo vampiros y híbridos)
  • » galeria de robin(solo para fans)
  • » Cambia solo una letra
  • » Que harias si te quedaras enserrado(a), solo(a), en la noche con el de arriva ¿? 0.o
  • » pedido de zoids ( solo chilenos)
  • » (libre) la flojera no se crea ni se destruye... solo se transmite
  • » Habitacion 245 - Laura (solo personal autorizado)
  • Buscar
     
     

    Resultados por:
     
    Rechercher Búsqueda avanzada
    Últimos temas
    » Cual de estos títulos les gusta mas?
    por Shooter Hoy a las 5:39 pm

    » Zailach - Alpha v1.0
    por Kingtime Hoy a las 4:13 am

    » Dross el rompe muelas completo
    por acoatlrpg Ayer a las 6:52 am

    » CardCaptor Sakura
    por Akito_squall Ayer a las 6:27 am

    » Cual de estos sistemas de batalla te gustaría mas?
    por Shooter Vie Jun 14, 2013 4:39 pm

    » juego de disparar (formato 2)
    por Dorvin Jue Jun 13, 2013 12:23 am

    » titulo nuevo menu izquierdo
    por Limo2710 Miér Jun 12, 2013 3:19 pm

    Recomendados
    RPG en RPG Maker
    La importancia de un Backup
    Que requiere un sistema de Batalla para ser exitoso
    9 Minutos de Juegos por fans
    Neoland
    Indice de Scripts Locales XP
    Falcao Pearl ABS Liquid
    ¿Quién está en línea?
    En total hay 13 usuarios en línea: 0 Registrados, 0 Ocultos y 13 Invitados :: 2 Motores de búsqueda

    Ninguno

    La mayor cantidad de usuarios en línea fue 179 el Mar Ago 30, 2011 1:06 pm.
    MiniChat
    Mejores posteadores
    Shooter (2962)
     
    DaviX (2724)
     
    Frikilangelo (2429)
     
    Falcao (1769)
     
    SagahonArturo (1446)
     
    kyonides-arkanthos (1443)
     
    555goku5551 (1434)
     
    Webmaster24 (1353)
     
    Ares (1350)
     
    xDarkLinkx (1309)
     
    Afiliados
    Crear foro Mundo Maker Foro de anime y RM2k3/XP/VX Computer mix
    Flag Counter
    free counters
    Visitas

    Compartir | .
     

     ATB en 1 solo script

    Ver el tema anterior Ver el tema siguiente Ir abajo 
    AutorMensaje
    VR0
    Escudero Experimentado
    Escudero Experimentado


    Cantidad de envíos: 59
    Miembro desde: 08/08/2009
    Edad: 27
    Localización: 23XX, destruyendo enemigos
    Sexo: Masculino

    Maker: RMVX


    MensajeTema: ATB en 1 solo script   Miér Jun 16, 2010 10:04 am

    #==============================================================================
    # ☆VX RGSS2 「Sistema de batalla ATB」☆
    #      EnDlEss DREamER
    # URL:http://eiennoyumeni.hp.infoseek.co.jp/index.htm
    # Creador: mitsu-evo
    # Last:2010/5/24
    #   汎用的なATBシステム
    # ▼ 「バトルレイアウト変更」より上で「▼ 素材」に近い位置に挿入。
    #==============================================================================
    $ed_rgss2 = {} if $ed_rgss2 == nil
    $ed_rgss2["ed_active_time_battle"] = true
    #使用時は上の2行記述の「#」を消すこと。
    $imported = {} if $imported == nil
    # Si usas XP main (STR11c), instala:
    # draw_atb_gauge(actor, rect.x, rect.y + 72, w)
    # si usas cara en batalla KGC, instala
    # draw_atb_gauge(actor, x, y , width)
    # instalación: copie este script y peguelo en 1 TXT o directamente al RPGVX
    #******************** ATB各種設定 ********************
    COUNT_MAX = 1000 # ATBカウントの最大
    # ATB増加スピード比率の設定
    # 配列の[x]の値が下記変数と連動している。
    # 配列は追加設定が可能で、イコールの後がスピード倍率。
    COUNT_SPEED = []
    COUNT_SPEED[0] = 2.0
    COUNT_SPEED[1] = 4.0
    COUNT_SPEED[2] = 6.0
    COUNT_SPEED[3] = 10.0
    # ATB増加スピード格納変数番号指定。
    # ゲーム中に変数を変更すると増加スピードが変化
    ATB_COUNT_VARIABLES = 11
    # 最弱スキルの威力をデータベース「効果値」より引用する。
    # 回復スキルなどで詠唱時間を無くしたい場合は「速度補正」を999などにする。
    BASE_SKILL_DAMAGE = 100
    # 最弱スキルに対して設定%以上の効果値ならスキル後ATBゼロになる
    SKILL_ACTION_COUNT = 2000 # %(20倍)
    ACTOR_ACTION_SE = "Audio/SE/Flash1" # SE de acción
    ACTOR_SPELL_SE = "Audio/SE/Magic" # SE de conjuros
    SPELL_WAIT_TIME = true # Espera de conjuros
    BATTLE_MASSAGE_OPACITY = true # Opacidad de mensaje de batalla
    ENEMY_ATB_WINDOW = false # Marcador al enemigo
    SPELL_DISPOSE = 200 # 詠唱破棄に必要な精神力
    SPELL_DISPOSE_DAMAGE = 0.3 # 詠唱破棄時のスキル効果値除算の値
    SPELL_SPEED_UP = "詠唱倍増" # 詠唱速度が倍増する。メモ欄使用文字
    SPELL_SPEED_DW = "詠唱半減" # 詠唱速度が半減する。メモ欄使用文字
    # ゲージ加算のフレーム更新頻度。
    # 加算処理は5フレームごとに更新。重たい場合は値を1ずつ増やして試す。
    ATB_FRAME_UPDATE = 1
    # 混乱&暴走時の行動を通常攻撃以外も有効にする
    INPUTABLE = true
    # ************************************************************
    #==============================================================================
    # ■ Game_System
    #==============================================================================
    class Game_System
    #--------------------------------------------------------------------------
    # ● ATBゲージ増加スピード設定
    #--------------------------------------------------------------------------
    def atb_count_speed(value = 1)
    $game_variables[ATB_COUNT_VARIABLES] = value
    end
    #--------------------------------------------------------------------------
    # ● ATBゲージ増加スピード取得
    #--------------------------------------------------------------------------
    def atb_count_speed?
    return COUNT_SPEED[$game_variables[ATB_COUNT_VARIABLES]]
    end
    end
    #==============================================================================
    # ■ Game_BattleAction
    #==============================================================================
    class Game_BattleAction
    #--------------------------------------------------------------------------
    # ● クリア
    #--------------------------------------------------------------------------
    def clear
    @speed = 0
    @basic = -1
    # KGC様「DQ風スキル」が導入されている
    if $imported["DQSkill"]
    # バトラーが「かばう」スキル使用中でないなら初期化
    unless hyper_guard? or damage_change? or protect_normal? or
    protect_all? or guard_attack?
    @target_index = -1 # かばう対象など
    @skill_id = 0 # かばうスキルIDなど
    @kind = 0 # スキル使用かどうか
    end
    else
    @target_index = -1
    @kind = 0
    @skill_id = 0
    end
    @item_id = 0
    @forcing = false
    @value = 0
    turn_end
    end
    #--------------------------------------------------------------------------
    # ● ターン終了時の初期化
    #--------------------------------------------------------------------------
    def turn_end
    unless guard?
    # 防御中でない場合は初期化
    # KGC様「DQ風スキル」が導入されている
    if $imported["DQSkill"]
    # バトラーが「かばう」スキル使用中でないなら初期化
    unless hyper_guard? or damage_change? or protect_normal? or
    protect_all? or guard_attack?
    @kind = 0
    end
    else
    @kind = 0
    end
    @basic = -1
    end
    if $imported["DQSkill"]
    # スキルにDQ風スキルが含まれていて実行中の場合はスキルID初期化を行なわない。
    unless hyper_guard? or damage_change? or protect_normal? or
    protect_all? or guard_attack?
    # DQ風スキルを実行していないので初期化。
    @target_index = -1 # かばう対象など
    @skill_id = 0 # かばうスキルIDなど
    @kind = 0 # スキル使用かどうか
    end
    else
    @target_index = -1
    @skill_id = 0
    @kind = 0
    end
    @item_id = 0
    @forcing = false
    @value = 0
    @spell = 0
    @ss = 0
    @magic_spell_now = false
    @spell_ok = false
    @spell_dispose = false
    end
    #--------------------------------------------------------------------------
    # ● 行動準備
    #--------------------------------------------------------------------------
    def prepare
    if battler.berserker? or battler.confusion? # 暴走か混乱なら
    if INPUTABLE
    battler.make_action
    else
    set_attack # 通常攻撃に変更
    end
    end
    end
    #--------------------------------------------------------------------------
    # ● 待機を設定
    #--------------------------------------------------------------------------
    def set_wait
    @kind = 0
    @basic = 3
    end
    #--------------------------------------------------------------------------
    # ● 詠唱ゲージマックス取得
    #--------------------------------------------------------------------------
    def spell_max
    @spell_max = magic_spell_count_max if @spell_max == nil
    return @spell_max
    end
    #--------------------------------------------------------------------------
    # ● 詠唱ゲージマックス算出(詠唱ゲージ加算は1フレーム1を加算する。)
    #--------------------------------------------------------------------------
    def magic_spell_count_max
    if @kind == 1
    skill = battler.action.skill
    if skill.atk_f > skill.spi_f and skill.physical_attack
    @magic_spell_now = false
    else
    @magic_spell_now = true
    battler.add_action_battler_list = false
    end
    end
    if skill == nil
    return BASE_SKILL_DAMAGE / BASE_SKILL_DAMAGE * 60
    end
    damage = skill.base_damage
    damage = BASE_SKILL_DAMAGE if skill.base_damage <= 0
    damage *= -1.0 if skill.base_damage < 0
    spell_time = damage * (skill.spi_f / 100)
    spell_time /= BASE_SKILL_DAMAGE
    spell_time *= 6 # 1 Seg = 1/10FPS
    spell_time += skill.mp_cost # Costo SP
    spell_time -= skill.speed # Vel. de conjuros
    spell_time = 1 if spell_time <= 0 # 詠唱時間がマイナスなら1フレームのみ詠唱時間
    @spell_max = spell_time
    return @spell_max = 1 unless SPELL_WAIT_TIME
    return @spell_max
    end
    #--------------------------------------------------------------------------
    # ● 詠唱カウント取得
    #--------------------------------------------------------------------------
    def spell
    return @spell
    end
    #--------------------------------------------------------------------------
    # ● 詠唱カウント加算
    #--------------------------------------------------------------------------
    def magic_spell
    unless battler.movable? # 行動不能
    @spell = 0
    @magic_spell_now = false
    @spell_ok = false
    return
    end
    if battler.dead? # 戦闘不能
    @spell = 0
    @magic_spell_now = false
    @spell_ok = false
    return
    end
    if battler.silent? # 沈黙
    @spell = 0
    @magic_spell_now = false
    @spell_ok = false
    return
    end
    return @spell = 0 unless @magic_spell_now # 詠唱中でないなら加算しない
    @spell = 0 if @spell == nil
    @ss = 0 if @ss == nil
    # 詠唱速度分岐
    case battler.spell_speed?
    when 0
    @spell += (1.0 * ATB_FRAME_UPDATE) * Float($game_system.atb_count_speed?)
    when 1
    @spell += (2.0 * ATB_FRAME_UPDATE) * Float($game_system.atb_count_speed?)
    when 2
    @spell += (1.0 * ATB_FRAME_UPDATE) * Float($game_system.atb_count_speed?) if @ss == 0
    @ss = @ss % 2 # 余りが0の時だけ加算。疑似的に0.5の速度
    end
    # 詠唱破棄なら最大値を代入して終了
    @spell = spell_max if magic_spell_dispose? == true
    # 詠唱ゲージが最大を超えたら発動フラグ
    if @spell >= @spell_max
    @spell_ok = true
    else
    @spell_ok = false
    end
    return @spell
    end
    #--------------------------------------------------------------------------
    # ● 詠唱中かどうか
    #--------------------------------------------------------------------------
    def magic_spell_now?
    return @magic_spell_now
    end
    #--------------------------------------------------------------------------
    # ● 詠唱フラグ
    #--------------------------------------------------------------------------
    def magic_spell_now=(value = false)
    @spell = 0 if value == false
    return @magic_spell_now = value
    end
    #--------------------------------------------------------------------------
    # ● 詠唱魔法発動出来るかどうか
    #--------------------------------------------------------------------------
    def magic_spell_ok?
    return @spell_ok
    end
    #--------------------------------------------------------------------------
    # ● 詠唱発動フラグ
    #--------------------------------------------------------------------------
    def magic_spell_ok=(value = true)
    @spell_ok = value
    return @spell_ok
    end
    #--------------------------------------------------------------------------
    # ● 詠唱破棄フラグ取得
    #--------------------------------------------------------------------------
    def magic_spell_dispose?
    return @spell_dispose
    end
    #--------------------------------------------------------------------------
    # ● 詠唱破棄フラグ
    #--------------------------------------------------------------------------
    def magic_spell_dispose=(value = true)
    @spell_dispose = value
    return unless SPELL_WAIT_TIME
    return @spell_dispose
    end
    #--------------------------------------------------------------------------
    # ● マックスカウントに対する%取得メソッド value : %
    #--------------------------------------------------------------------------
    def max_count_par(value)
    par = value
    par *= COUNT_MAX
    par /= 100
    return par
    end
    #--------------------------------------------------------------------------
    # ● 使用スキル別のスピード減算%取得
    #--------------------------------------------------------------------------
    def skill_action_subtraction_speed
    skill = battler.action.skill
    #if skill.atk_f > skill.spi_f and skill.physical_attack
    # 精神が打撃より低く、物理属性なら全消費
    return 0 if skill == nil
    if skill.atk_f > skill.spi_f
    return max_count_par(20)
    end
    damage = Float(skill.base_damage)
    damage *= -1.0 if skill.base_damage < 0
    # 使用スキルがベース威力に対して
    return 0 if damage >= SKILL_ACTION_COUNT
    damage = BASE_SKILL_DAMAGE if damage == 0 # ステート変化系ならベース威力と同等とする
    base = BASE_SKILL_DAMAGE
    damage /= Float(base)
    damage *= 100
    damage = Integer(damage)
    # 上記がベース威力に対する使用スキルの威力との比較
    # 算出%を÷10で百分率に
    damage = max_count_par(damage / 10) + max_count_par(50)
    speed = COUNT_MAX
    speed -= damage
    speed = 0 if skill.ignore_defense # 防御無視なら全減り
    speed = 0 if damage > COUNT_MAX
    return speed
    end
    #--------------------------------------------------------------------------
    # ● 行動後のアクション別スピード減算処理
    #--------------------------------------------------------------------------
    def subtraction_speed_action
    #@speed = COUNT_MAX
    case @kind
    when 0 # 基本
    case @basic
    when 0 # 攻撃
    if battler.fast_attack
    @speed = max_count_par(50)
    else
    @speed = max_count_par(0)
    end
    when 1 # 防御
    @speed = max_count_par(0)
    when 2 # 逃走
    @speed = max_count_par(0)
    when 3 # 待機
    @speed = max_count_par(50)
    end
    when 1 # スキル
    @speed = skill_action_subtraction_speed
    when 2 # アイテム
    @speed = max_count_par(0)
    end
    end
    #--------------------------------------------------------------------------
    # ● 全バトラーの平均敏捷性取得
    #--------------------------------------------------------------------------
    def ed_average_agi
    actors_agi = $game_party.average_agi
    enemies_agi = $game_troop.average_agi
    average = actors_agi + enemies_agi
    average = Float(average)
    average /= 2.0
    return average
    end
    #--------------------------------------------------------------------------
    # ● 行動スピードのベース計算
    #--------------------------------------------------------------------------
    def base_speed
    # キャラ敏捷/平均敏捷
    @base_speed = Float(battler.agi) / Float(ed_average_agi)
    @base_speed *= 10.0
    @base_speed *= Float($game_system.atb_count_speed?)
    @base_speed = Integer(@base_speed)
    return @base_speed
    end
    #--------------------------------------------------------------------------
    # ● 行動スピード加算(元は行動スピードの決定)
    #--------------------------------------------------------------------------
    def make_speed
    base_speed if @base_speed == nil
    @speed = 0 if @speed == nil
    return unless battler.movable? # 行動不能
    return if battler.dead?
    return @speed = skill_action_subtraction_speed if magic_spell_now? # 詠唱中なら加算しない
    speed = @base_speed
    # @speed X ステート上昇率
    for state in battler.states do speed *= state.agi_rate / 100.0 end
    @speed += speed
    @speed = COUNT_MAX if @speed > COUNT_MAX
    #return @speed
    end
    #--------------------------------------------------------------------------
    # ● 行動スピードの初期化
    #--------------------------------------------------------------------------
    def speed_format
    @speed = 0
    @base_speed = 0
    @spell = 0
    @ss = 0
    @magic_spell_now = false
    @spell_ok = false
    @spell_dispose = false
    end
    #--------------------------------------------------------------------------
    # ● 戦闘開始時の行動スピード
    #--------------------------------------------------------------------------
    def start_speed
    base_speed
    if $game_troop.preemptive
    # 先制攻撃
    if battler.is_a?(Game_Actor)
    @speed = COUNT_MAX
    else
    @speed = 0
    end
    elsif $game_troop.surprise
    # 不意打ち
    if battler.is_a?(Game_Actor)
    @speed = 0
    else
    @speed = COUNT_MAX
    end
    else
    # 通常時
    par = ed_rand(20,40)
    @speed = max_count_par(par)
    end
    end
    #--------------------------------------------------------------------------
    # ● 範囲指定乱数メソッド作成
    #--------------------------------------------------------------------------
    def ed_rand(min,max)
    n = rand(max)
    if n < min
    until n < min
    rand(max)
    end
    end
    return n
    end
    end
    #==============================================================================
    # ■ Game_Battler
    #==============================================================================
    class Game_Battler
    #--------------------------------------------------------------------------
    # ● 行動順リストに追加
    #--------------------------------------------------------------------------
    def add_action_battler_list=(value = false)
    @add_action_battler_list = false if @add_action_battler_list == nil
    @add_action_battler_list = value
    end
    #--------------------------------------------------------------------------
    # ● 行動順リストに追加されたか取得
    #--------------------------------------------------------------------------
    def add_action_battler_list
    return @add_action_battler_list
    end
    #--------------------------------------------------------------------------
    # ● ステート自然解除 (ターンごとに呼び出し)
    #--------------------------------------------------------------------------
    def remove_states_auto
    clear_action_results
    for i in @state_turns.keys.clone
    if @state_turns[i] > 0
    @state_turns[i] -= 1
    elsif rand(100) < $data_states[i].auto_release_prob
    remove_state(i)
    @removed_states.push(i)
    end
    end
    end
    end
    #==============================================================================
    # ■ Game_Actor
    #==============================================================================
    class Game_Actor < Game_Battler
    #--------------------------------------------------------------------------
    # ● セットアップ
    #--------------------------------------------------------------------------
    alias ed_atb_setup setup
    def setup(actor_id)
    ed_atb_setup(actor_id)
    @add_action_battler_list = false
    end
    #--------------------------------------------------------------------------
    # ● アクターの詠唱速度フラグ取得
    #--------------------------------------------------------------------------
    def spell_speed?
    @spell_speed = 0 if @spell_speed == nil
    return @spell_speed
    end
    #--------------------------------------------------------------------------
    # ● アクターの詠唱速度変更ステート及び装備メモ取得
    #--------------------------------------------------------------------------
    def spell_speed
    @spell_speed = 0 if @spell_speed == nil
    # 装備メモ欄
    for i in self.equips.compact
    actor_note = i.note.scan(/<#{SPELL_SPEED_UP}>/)
    actor_note = actor_note.flatten
    spell_speed = actor_note[0]
    if spell_speed != nil or spell_speed != ""
    @spell_speed = (@spell_speed == 2) ? 0 : 1
    end
    end
    # ステートメモ欄
    for i in self.states.compact
    actor_note2 = i.note.scan(/<#{SPELL_SPEED_UP}>/)
    actor_note2 = actor_note2.flatten
    spell_speed2 = actor_note2[0]
    if spell_speed2 != nil or spell_speed2 != ""
    @spell_speed = (@spell_speed == 2) ? 0 : 1
    end
    end
    # 装備メモ欄
    for i in self.equips.compact
    actor_note3 = i.note.scan(/<#{SPELL_SPEED_DW}>/)
    actor_note3 = actor_note3.flatten
    spell_speed3 = actor_note3[0]
    if spell_speed3 != nil or spell_speed3 != ""
    @spell_speed = (@spell_speed == 1) ? 0 : 2
    end
    end
    # ステートメモ欄
    for i in self.states.compact
    actor_note4 = i.note.scan(/<#{SPELL_SPEED_DW}>/)
    actor_note4 = actor_note4.flatten
    spell_speed4 = actor_note4[0]
    if spell_speed4 != nil or spell_speed4 != ""
    @spell_speed = (@spell_speed == 2) ? 0 : 1
    end
    end
    end
    end
    #==============================================================================
    # ■ Game_Enemy
    #==============================================================================
    class Game_Enemy < Game_Battler
    #--------------------------------------------------------------------------
    # ● オブジェクト初期化
    #--------------------------------------------------------------------------
    alias ed_atb_initialize initialize
    def initialize(index, enemy_id)
    ed_atb_initialize(index, enemy_id)
    @add_action_battler_list = false
    end
    #--------------------------------------------------------------------------
    # ● 敵の詠唱速度フラグ取得
    # @spell_speed = 0 : 通常 1 : 倍増 2 : 半減
    #--------------------------------------------------------------------------
    def spell_speed?
    @spell_speed = 0 if @spell_speed == nil
    return @spell_speed
    end
    #--------------------------------------------------------------------------
    # ● 敵の詠唱速度変更ステート及び敵キャラメモ欄取得
    #--------------------------------------------------------------------------
    def spell_speed
    @spell_speed = 0 if @spell_speed == nil
    enemy_note = enemy.note.scan(/<#{SPELL_SPEED_UP}>/)
    enemy_note = enemy_note.flatten
    spell_speed = enemy_note[0]
    if spell_speed != nil or spell_speed != ""
    @spell_speed = (@spell_speed == 2) ? 0 : 1
    end
    for i in self.states.compact
    enemy_note2 = i.note.scan(/<#{SPELL_SPEED_UP}>/)
    enemy_note2 = enemy_note2.flatten
    spell_speed2 = enemy_note2[0]
    if spell_speed2 != nil or spell_speed2 != ""
    @spell_speed = (@spell_speed == 2) ? 0 : 1
    end
    end
    enemy_note3 = enemy.note.scan(/<#{SPELL_SPEED_DW}>/)
    enemy_note3 = enemy_note3.flatten
    spell_speed3 = enemy_note3[0]
    if spell_speed3 != nil or spell_speed3 != ""
    @spell_speed = (@spell_speed == 1) ? 0 : 2
    end
    for i in self.states.compact
    enemy_note4 = i.note.scan(/<#{SPELL_SPEED_DW}>/)
    enemy_note4 = enemy_note4.flatten
    spell_speed4 = enemy_note4[0]
    if spell_speed4 != nil or spell_speed4 != ""
    @spell_speed = (@spell_speed == 1) ? 0 : 2
    end
    end
    end
    end
    #==============================================================================
    # ■ Game_Unit
    #==============================================================================
    class Game_Unit
    #--------------------------------------------------------------------------
    # ● 全員の戦闘行動クリア
    #--------------------------------------------------------------------------
    def clear_actions
    for battler in members
    battler.add_action_battler_list = false # ATB@action_battler追加フラグ
    battler.action.clear
    end
    end
    end
    #==============================================================================
    # ■ Game_Party
    #==============================================================================
    class Game_Party < Game_Unit
    #--------------------------------------------------------------------------
    # ● アクターを加える
    # actor_id : アクター ID
    #--------------------------------------------------------------------------
    def add_actor(actor_id)
    if @actors.size < MAX_MEMBERS and not @actors.include?(actor_id)
    @actors.push(actor_id)
    $game_actors[actor_id].add_action_battler_list = false
    $game_player.refresh
    end
    end
    end
    #==============================================================================
    # ■ Game_Troop
    #==============================================================================
    class Game_Troop < Game_Unit
    #--------------------------------------------------------------------------
    # ● 敵味方メンバーの取得
    #--------------------------------------------------------------------------
    def format_all_members
    @battle_all_members = nil
    end
    #--------------------------------------------------------------------------
    # ● 敵味方メンバーの取得
    #--------------------------------------------------------------------------
    def all_members?
    @battle_all_members = all_members if @battle_all_members == nil
    return @battle_all_members
    end
    #--------------------------------------------------------------------------
    # ● 敵味方メンバーの作成
    #--------------------------------------------------------------------------
    def all_members
    members = []
    if $imported["LargeParty"] == true
    for actor in $game_party.battle_members
    members.push actor
    end
    else
    for actor in $game_party.members
    members.push actor
    end
    end
    for enemy in $game_troop.members
    members.push enemy
    end
    @battle_all_members = members
    return @battle_all_members
    end
    #--------------------------------------------------------------------------
    # ● 多人数パーティ仲間入れ替え用
    #--------------------------------------------------------------------------
    def battle_party_change
    all_members?
    for battler in @battle_all_members
    battler.add_action_battler_list = false
    battler.action.magic_spell_now = false
    battler.action.magic_spell_ok = false
    end
    end
    #--------------------------------------------------------------------------
    # ● 戦闘開始時のゲージ
    #--------------------------------------------------------------------------
    def battle_start_speed
    all_members?
    for battler in @battle_all_members
    battler.add_action_battler_list = false
    battler.action.start_speed
    battler.action.magic_spell_now = false
    battler.action.magic_spell_ok = false
    end
    end
    #--------------------------------------------------------------------------
    # ● バトラーのゲージ加算
    #--------------------------------------------------------------------------
    def count_speed
    return if @battle_all_members == nil
    for battler in @battle_all_members
    battler.action.make_speed
    end
    end
    #--------------------------------------------------------------------------
    # ● バトラーの詠唱ゲージ加算
    #--------------------------------------------------------------------------
    def count_spell
    return if @battle_all_members == nil
    for battler in @battle_all_members
    battler.action.magic_spell
    end
    end
    #--------------------------------------------------------------------------
    # ● ゲージ初期化
    #--------------------------------------------------------------------------
    def format_speed
    for battler in @battle_all_members
    battler.action.speed_format
    end
    end
    end
    #==============================================================================
    # ■ Window_Base
    #==============================================================================
    class Window_Base < Window
    #--------------------------------------------------------------------------
    # ● ATB ゲージ Color 1 背景
    #--------------------------------------------------------------------------
    def atb_gauge_color1
    return text_color(7)
    end
    #--------------------------------------------------------------------------
    # ● ATB ゲージ Color 2 増加
    #--------------------------------------------------------------------------
    def atb_gauge_color2
    return text_color(0)
    end
    #--------------------------------------------------------------------------
    # ● ATB ゲージ Color 3 詠唱
    #--------------------------------------------------------------------------
    def atb_gauge_color3
    return text_color(22)
    end
    #--------------------------------------------------------------------------
    # ● ATB ゲージ Color 4 行動可能
    #--------------------------------------------------------------------------
    def atb_gauge_color4
    return text_color(2)
    end
    #--------------------------------------------------------------------------
    # ● ATB ゲージの描画
    # actor : Actor
    # x : Eje X
    # y : Eje Y
    # width : Largo
    #--------------------------------------------------------------------------
    def draw_atb_gauge(actor, x, y, width = 120)
    gc1 = atb_gauge_color1
    gc2 = atb_gauge_color2
    gc3 = atb_gauge_color3
    gc4 = atb_gauge_color4
    # ゲージ最大幅&ゲージ背景
    self.contents.fill_rect(x, y + WLH - 8, width, 6, gauge_back_color)
    if actor.action.magic_spell_now?
    unless actor == nil
    gw = Float(width * actor.action.spell / actor.action.spell_max)
    gw = width if gw >= width
    else
    gw = 0
    end
    # 魔法詠唱ゲージ増加
    self.contents.gradient_fill_rect(x, y + WLH - 8, gw, 6, gc1, gc3)
    else
    unless actor.action.speed == nil
    gw = Float(width * actor.action.speed / COUNT_MAX)
    gw = width if gw >= width
    else
    gw = 0
    end
    # ATBゲージ増加
    if gw >= width
    self.contents.gradient_fill_rect(x, y + WLH - 8, gw, 6, gc1, gc4)
    else
    self.contents.gradient_fill_rect(x, y + WLH - 8, gw, 6, gc1, gc2)
    end
    end
    end
    end
    #==============================================================================
    # ■ Window_BattleStatus
    #==============================================================================
    class Window_BattleStatus < Window_Selectable
    #--------------------------------------------------------------------------
    # ● 項目の描画
    #--------------------------------------------------------------------------
    def draw_item(index)
    rect = item_rect(index)
    rect.x += 4
    rect.width -= 8
    self.contents.clear_rect(rect)
    self.contents.font.color = normal_color
    actor = $game_party.members[index]
    draw_atb_gauge(actor, 4, rect.y)
    draw_actor_name(actor, 4, rect.y)
    draw_actor_state(actor, 114, rect.y, 48)
    draw_actor_hp(actor, 174, rect.y, 120)
    draw_actor_mp(actor, 310, rect.y, 70)
    end
    end
    #==============================================================================
    # ■ Window_ATB_Gauge
    #------------------------------------------------------------------------------
    #  バトル画面でバトラーにATBゲージを表示するクラスです。
    #==============================================================================
    class Window_ATB_Gauge < Window_Base
    #--------------------------------------------------------------------------
    # ● オブジェクト初期化
    #--------------------------------------------------------------------------
    def initialize(battler,x,y,width)
    # create_contents で self.contents の bitmap.width が -32 されているので
    # super で width 指定時は 32 を加算する
    super(x, y, width + 32, WLH)
    @battler = battler
    @rect_width = width # これはゲージ幅の値
    self.x = x - (self.width / 2)
    self.y = y
    self.width = width + 32 # ウィンドウ幅
    self.height = WLH + 32
    self.z = 100
    self.opacity = 0
    self.openness = 255
    refresh
    self.active = false
    end
    #--------------------------------------------------------------------------
    # ● 解放
    #--------------------------------------------------------------------------
    def dispose
    super
    end
    #--------------------------------------------------------------------------
    # ● フレーム更新
    #--------------------------------------------------------------------------
    def update
    refresh
    super
    end
    #--------------------------------------------------------------------------
    # ● リフレッシュ
    #--------------------------------------------------------------------------
    def refresh
    self.contents.clear
    if @battler.dead?
    self.visible = false
    return
    else
    self.visible = true
    end
    rect = Rect.new(0,0,@rect_width ,WLH)
    self.contents.clear_rect(rect)
    self.contents.font.color = normal_color
    if $ed_rgss2["ed_battle_scene"] == true
    draw_atb_gauge(@battler, 0, -16,@rect_width)
    # Si importas el KGC Overdrive:
    draw_actor_od_gauge(@battler, 0, 16, @rect_width) if $imported["OverDrive"] == true
    else
    draw_atb_gauge(@battler, 0, -16, @rect_width)
    end
    end
    end
    #==============================================================================
    # ■ Scene_Battle
    #==============================================================================
    class Scene_Battle < Scene_Base
    #--------------------------------------------------------------------------
    # ● 戦闘開始の処理
    #--------------------------------------------------------------------------
    def process_battle_start
    @message_window.clear
    wait(10)
    for name in $game_troop.enemy_names
    text = sprintf(Vocab::Emerge, name)
    $game_message.texts.push(text)
    end
    if $game_troop.preemptive
    text = sprintf(Vocab::Preemptive, $game_party.name)
    $game_message.texts.push(text)
    elsif $game_troop.surprise
    text = sprintf(Vocab::Surprise, $game_party.name)
    $game_message.texts.push(text)
    end
    wait_for_message
    @message_window.clear
    make_escape_ratio
    process_battle_event
    @message_window.clear
    #start_party_command_selection
    end
    #--------------------------------------------------------------------------
    # ● 敵(アクターも)にATBゲージ表示処理
    #--------------------------------------------------------------------------
    def enemy_atb_gauge
    return unless ENEMY_ATB_WINDOW
    return if $ed_rgss2["ed_battle_scene"]
    @enemy_atb_window = []
    for enemy in $game_troop.members
    # 敵の画像ファイル名を取得。$付きなら小さく表示。
    battle_gf = $data_enemies[enemy.enemy_id]
    enemy_bitmap = Cache.battler(enemy.battler_name, enemy.battler_hue)
    sign = battle_gf.battler_name[/^[\!\$]./]
    if sign != nil and sign.include?('$')
    # 歩行キャラ使用の場合
    width = (enemy_bitmap.width / 3) * 2
    else
    width = 120
    width = enemy_bitmap.width > 120 ? 120 : enemy_bitmap.width
    end
    x = enemy.screen_x
    y = enemy.screen_y - 8
    @enemy_atb_window.push(Window_ATB_Gauge.new(enemy, x, y, width))
    end
    if $ed_rgss2["ed_battle_scene"]
    if $game_system.ed_battle_mode?
    # サイドビューの場合はアクターキャラグラ直下に表示
    for actor in $game_party.members
    actor_bitmap = Cache.character(actor.battler_name)
    sign = actor.battler_name[/^[\!\$]./]
    if sign != nil and sign.include?('$')
    # 歩行キャラ使用のバトラーの処理
    width = actor_bitmap.width / 3
    height = actor_bitmap.height / 4
    else
    width = actor_bitmap.width / 12
    height = actor_bitmap.height / 8
    end
    x = actor.screen_x
    y = actor.screen_y + (height / 4)
    @enemy_atb_window.push(Window_ATB_Gauge.new(actor, x, y, width * 2))
    end
    end
    for window in @enemy_atb_window
    @spriteset.ed_battle_window_viewport(window)
    end
    end
    end
    #--------------------------------------------------------------------------
    # ● 敵(アクターも)のATBゲージの表示
    #--------------------------------------------------------------------------
    def visible_enemy_atb(value)
    return unless ENEMY_ATB_WINDOW
    return if $ed_rgss2["ed_battle_scene"]
    return if @enemy_atb_window == nil or @enemy_atb_window == []
    for window in @enemy_atb_window
    window.visible = value
    end
    end
    #--------------------------------------------------------------------------
    # ● 敵(アクターも)のATBゲージ更新
    #--------------------------------------------------------------------------
    def update_enemy_atb
    return unless ENEMY_ATB_WINDOW
    return if $ed_rgss2["ed_battle_scene"]
    return if @enemy_atb_window == nil or @enemy_atb_window == []
    for window in @enemy_atb_window
    window.update
    end
    end
    #--------------------------------------------------------------------------
    # ● 敵(アクターも)のATBゲージ解放
    #--------------------------------------------------------------------------
    def dipose_enemy_atb
    return unless ENEMY_ATB_WINDOW
    return if $ed_rgss2["ed_battle_scene"]
    unless @enemy_atb_window == nil or @enemy_atb_window == []
    for window in @enemy_atb_window
    window.dispose
    end
    @enemy_atb_window = nil
    end
    end
    #--------------------------------------------------------------------------
    # ● 開始後処理
    #--------------------------------------------------------------------------
    alias ed_active_time_battle_post_start post_start
    def post_start
    @forcing_battler = false
    @info_viewport.visible = true
    @message_window.y = 0
    @message_window.opacity = 0 if BATTLE_MASSAGE_OPACITY == true
    $game_troop.all_members
    $game_troop.format_speed
    $game_troop.battle_start_speed
    enemy_atb_gauge
    @frames = []
    @frames[0] = Graphics.frame_count
    @frames[1] = Graphics.frame_count - ATB_FRAME_UPDATE
    ed_active_time_battle_post_start
    $game_troop.preemptive = false
    $game_troop.surprise = false
    $game_troop.increase_turn
    end
    #--------------------------------------------------------------------------
    # ● 戦闘終了
    #--------------------------------------------------------------------------
    alias ed_atb_active_time_battle_battle_end battle_end
    def battle_end(result)
    $game_troop.format_speed
    $game_troop.format_all_members
    dipose_enemy_atb
    @action_battlers = nil
    ed_atb_active_time_battle_battle_end(result)
    end
    #--------------------------------------------------------------------------
    # ● 敗北の処理
    #--------------------------------------------------------------------------
    alias ed_atb_process_defeat process_defeat
    def process_defeat
    dipose_enemy_atb
    ed_atb_process_defeat
    end
    #--------------------------------------------------------------------------
    # ● 逃走の処理
    #--------------------------------------------------------------------------
    alias ed_atb_process_escape process_escape
    def process_escape
    dipose_enemy_atb
    ed_atb_process_escape
    end
    #--------------------------------------------------------------------------
    # ● 勝利の処理
    #--------------------------------------------------------------------------
    alias ed_atb_process_victory process_victory
    def process_victory
    dipose_enemy_atb
    ed_atb_process_victory
    end
    #--------------------------------------------------------------------------
    # ● ゲージ加算処理
    #--------------------------------------------------------------------------
    def add_atb_guage
    unless $game_message.visible or @enter_action
    if @target_enemy_window != nil

    elsif @target_actor_window != nil

    elsif @skill_window != nil

    elsif @item_window != nil

    elsif @party_command_window.active

    elsif @spell_window != nil

    else
    if $ed_rgss2["ed_weapon_command"] == true
    if @weapon_command_window != nil
    return
    end
    end
    $game_troop.count_speed # ゲージ加算
    $game_troop.count_spell # 詠唱ゲージ加算
    @status_window.refresh
    update_enemy_atb # 敵のゲージ加算表示処理
    end
    end
    end
    #--------------------------------------------------------------------------
    # ● 詠唱速度設定
    #--------------------------------------------------------------------------
    def spell_speed
    for battler in $game_troop.all_members?
    battler.spell_speed
    end
    end
    #--------------------------------------------------------------------------
    # ● フレーム更新
    #--------------------------------------------------------------------------
    def update
    @info_viewport.visible = true
    super
    @frames[0] = Graphics.frame_count
    update_enemy_hp if $ed_rgss2["ed_battle_scene"] # Marcador HP enemigo
    update_basic(true)
    update_info_viewport # 情報表示ビューポートを更新
    if $game_message.visible
    @message_window.visible = true
    end
    unless $game_message.visible # メッセージ表示中以外
    return if judge_win_loss # 勝敗判定
    update_scene_change
    if @target_enemy_window != nil
    update_target_enemy_selection # 対象敵キャラ選択
    elsif @target_actor_window != nil
    update_target_actor_selection # 対象アクター選択
    elsif @spell_window != nil
    spell_window_update # 詠唱ウィンドウ選択
    elsif @skill_window != nil
    update_skill_selection # スキル選択
    elsif @item_window != nil
    update_item_selection # アイテム選択
    elsif @party_command_window.active
    update_party_command_selection # パーティコマンド選択
    elsif @actor_command_window.active
    update_actor_command_selection # アクターコマンド選択
    elsif @enter_action
    # 行動決定
    process_battle_event # バトルイベントの処理
    process_action # 戦闘行動
    #process_battle_event # バトルイベントの処理
    elsif @command_input # コマンド入力中
    else
    if $ed_rgss2["ed_weapon_command"] == true
    if @weapon_command_window != nil
    update_weapon_command_selection # 武器コマンド選択
    return
    end
    end
    frame = @frames[0] - @frames[1]
    if frame >= ATB_FRAME_UPDATE
    add_atb_guage
    Graphics.frame_reset
    make_action_orders
    else
    return
    end
    @frames[1] = Graphics.frame_count
    Graphics.frame_reset
    end
    end
    end
    #--------------------------------------------------------------------------
    # ● 行動の決定(次のアクターのコマンド入力へ)
    #--------------------------------------------------------------------------
    def next_actor
    @enter_action = true unless @active_battler.action.magic_spell_now? == true
    start_main
    end
    #--------------------------------------------------------------------------
    # ● 前のアクターのコマンド入力へ(スキップし1ターン経過待機)
    #--------------------------------------------------------------------------
    def prior_actor
    start_main
    @enter_action = true
    next_actor#turn_end
    end
    #--------------------------------------------------------------------------
    # ● アクターコマンド選択の更新
    #--------------------------------------------------------------------------
    def update_actor_command_selection
    if Input.trigger?(Input::B)
    Sound.play_cancel
    @active_battler.action.kind = 0
    @active_battler.action.basic = 3
    @actor_command_window.visible = false
    @actor_command_window.active = false
    prior_actor
    elsif Input.trigger?(Input::A)
    Sound.play_decision
    start_party_command_selection
    @party_command_window.visible = true
    @party_command_window.active = true
    elsif Input.trigger?(Input::C)
    case @actor_command_window.index
    when 0 # Ataque
    Sound.play_decision
    @active_battler.action.set_attack
    start_target_enemy_selection
    when 1 # Tecnicas
    Sound.play_decision
    start_skill_selection
    when 2 # Defensa
    Sound.play_decision
    @active_battler.action.set_guard
    next_actor
    when 3 # Objetos
    Sound.play_decision
    start_item_selection
    end
    end
    end
    #--------------------------------------------------------------------------
    # ● パーティコマンド選択の開始
    #--------------------------------------------------------------------------
    def start_party_command_selection
    if $game_temp.in_battle
    @actor_command_window.active = false
    @actor_command_window.visible = false
    @party_command_window.visible = true
    @party_command_window.x = @actor_command_window.x if $ed_rgss2["ed_battle_scene"]
    @status_window.refresh
    @status_window.index = @actor_index = -1
    #@active_battler = nil
    @info_viewport.visible = true
    @message_window.visible = false
    @party_command_window.active = false
    @party_command_window.index = 0
    end
    end
    #--------------------------------------------------------------------------
    # ● パーティコマンド選択の更新
    #--------------------------------------------------------------------------
    def update_party_command_selection
    if Input.trigger?(Input::C)
    @party_command_window.visible = false
    case @party_command_window.index
    when 0 # Ataque
    Sound.play_decision
    #$game_troop.all_members
    @party_command_window.active = false
    @party_command_window.visible = false
    @actor_command_window.visible = true
    @actor_command_window.active = true
    when 1 # Escape
    if $game_troop.can_escape == false
    Sound.play_buzzer
    return
    end
    Sound.play_decision
    process_escape
    end
    elsif Input.trigger?(Input::B)
    @party_command_window.visible = false
    Sound.play_cancel
    @party_command_window.active = false
    @party_command_window.visible = false
    @actor_command_window.visible = true
    @actor_command_window.active = true
    #$game_troop.all_members
    end
    end
    #--------------------------------------------------------------------------
    # ● アクターコマンド選択の開始
    #--------------------------------------------------------------------------
    def start_actor_command_selection
    @actor_command_window.visible = true
    @party_command_window.visible = false
    @party_command_window.active = false
    @actor_command_window.setup(@active_battler)
    @actor_command_window.active = true
    @actor_command_window.index = 0
    end
    #--------------------------------------------------------------------------
    # ● スキル選択の更新
    #--------------------------------------------------------------------------
    def update_skill_selection
    @skill_window.active = true
    @skill_window.update
    @help_window.update
    if Input.trigger?(Input::B)
    Sound.play_cancel
    # 魔法選択がtrueなら詠唱キャンセル
    @active_battler.action.turn_end
    end_skill_selection
    elsif Input.trigger?(Input::C)
    # 詠唱処理はスキル選択後に処理される。
    @skill = @skill_window.skill
    if @skill != nil
    @active_battler.last_skill_id = @skill.id
    end
    if @active_battler.skill_can_use?(@skill)
    Sound.play_decision
    @active_battler.action.set_skill(@skill.id)
    skill = @active_battler.action.skill
    @active_battler.action.magic_spell_count_max
    spell_speed
    if skill.atk_f > skill.spi_f and skill.physical_attack
    @active_battler.action.magic_spell_now = false
    determine_skill
    else
    @active_battler.action.magic_spell_now = true
    if @active_battler.spi > SPELL_DISPOSE and SPELL_WAIT_TIME
    @skill_window.active = false
    create_spell_window
    else
    determine_skill
    end
    end
    else
    Sound.play_buzzer
    end
    end
    end
    #--------------------------------------------------------------------------
    # ● 行動順序作成
    #--------------------------------------------------------------------------
    def make_action_orders
    frame = @frames[0] - @frames[1]
    for battler in $game_troop.all_members?
    next if battler == nil
    if battler.action.magic_spell_ok?
    if battler.add_action_battler_list == false
    @action_battlers.unshift battler
    battler.add_action_battler_list = true
    end
    elsif battler.action.speed >= COUNT_MAX
    if battler.add_action_battler_list == false
    @action_battlers.push battler
    battler.add_action_battler_list = true
    end
    end
    end
    set_next_active_battler
    end
    #--------------------------------------------------------------------------
    # ● コマンド入力以外での実行処理
    #--------------------------------------------------------------------------
    def atb_action
    process_battle_event # バトルイベントの処理
    process_action
    end
    #--------------------------------------------------------------------------
    # ● 次に行動するべきバトラーの設定
    #--------------------------------------------------------------------------
    def forcing_battler
    if $game_troop.forcing_battler != nil
    # 現在のバトラーを@forcing_save_battlerに代入
    # コマンド選択後にこの場所に来るので、再度入れて
    # 続きを実行する
    @forcing_save_battler = @active_battler
    @active_battler = $game_troop.forcing_battler
    if @active_battler.action.magic_spell_now?
    # 同じバトラーで詠唱中なら強制的に詠唱OKにする。
    @active_battler.action.magic_spell_ok = true
    end
    #@action_battlers.delete(@active_battler)
    $game_troop.forcing_battler = nil
    @message_window.visible = true
    @enter_action = true
    @forcing_battler = true
    else
    # 戦闘行動の強制後なら@active_battlerに代入
    if @forcing_battler
    # バトルイベントでprocess_actionが実行。
    # updateからのprocess_action実行でここに
    @active_battler.add_action_battler_list = false
    @active_battler.action.clear
    if $ed_rgss2["ed_battle_scene"]
    # バトルレイアウト変更での強制スキル等での詠唱アニメなど初期化
    @active_battler.actor_action = 0
    wait(1)
    end
    @active_battler = @forcing_save_battler
    @active_battler.add_action_battler_list = false
    @active_battler.action.clear
    # ループを防ぐために以下を初期化
    @forcing_save_battler = nil
    @forcing_battler = false
    @enter_action = false
    end
    end
    end
    #--------------------------------------------------------------------------
    # ● ATBの実行処理
    #--------------------------------------------------------------------------
    def set_next_active_battler
    # Action battlerがnilかatbが最大でないか詠唱中で詠唱を終えてない
    # 場合にはreturnで行動を実行しない。
    return if @action_battlers == nil or @action_battlers == []
    @active_battler = @action_battlers.shift
    if $imported["CooperationSkill"] == true
    if @active_battler.is_a?(Game_CooperationBattler)
    # 連携スキル用
    @message_window.visible = true
    @enter_action = true
    return
    end
    end
    unless @active_battler.action.speed >= COUNT_MAX and
    @active_battler.action.magic_spell_ok?
    if @action_battlers.size > 1
    if @active_battler == @action_battlers[0]
    @active_battler = @action_battlers.shift
    @active_battler.action.turn_end
    return
    end
    end
    end
    # 詠唱完了ならスキル実行
    if @active_battler.action.magic_spell_ok?
    @message_window.visible = true
    atb_action
    return
    end
    # 動けないならターン経過
    unless @active_battler.movable?
    @message_window.visible = true
    atb_action
    return
    end
    # ゲージがMAXでないなら中断
    return unless @active_battler.action.speed >= COUNT_MAX
    # 実行処理
    @command_input = true
    if $imported["DQSkill"]
    # KGC様「DQ風スキル」併用時はかばうをATB満タン時に初期化。
    # それ以外の要素では初期化しないようにする。
    if @active_battler.action.hyper_guard? or @active_battler.action.damage_change? or
    @active_battler.action.protect_normal? or @active_battler.action.protect_all? or
    @active_battler.action.guard_attack?
    @active_battler.action.skill_id = 0
    @active_battler.action.kind = 0
    end
    end
    if @active_battler.is_a?(Game_Actor)
    # 自動戦闘ならmake_action実行
    @active_battler.make_action if @active_battler.auto_battle
    # アクターが入力可能
    if @active_battler.inputable?
    Audio.se_play(ACTOR_ACTION_SE,100,100)
    i = 0
    for member in $game_party.members
    @status_window.index = @actor_index = i if @active_battler.id == member.id
    i += 1
    end
    @active_battler.white_flash = true
    @message_window.visible = true
    start_actor_command_selection
    else
    @active_battler.make_action
    # 入力不可でスキルを選択
    if @active_battler.action.kind == 1
    @active_battler.action.magic_spell_count_max
    if @active_battler.action.magic_spell_now?
    spell_speed
    else
    @enter_action = true
    end
    else
    @enter_action = true
    end
    @message_window.visible = true
    end
    elsif @active_battler.is_a?(Game_Enemy)
    @message_window.visible = true
    if @active_battler.action.magic_spell_ok?
    atb_action
    else
    @active_battler.make_action #連携スキル絡み。クラス違い
    if @active_battler.action.kind == 1
    @active_battler.action.magic_spell_count_max
    if @active_battler.action.magic_spell_now?
    spell_face_action if $ed_rgss2["ed_battle_scene"]
    spell_speed
    else
    @enter_action = true
    end
    else
    @enter_action = true
    end
    end
    else# 連携用
    end
    @command_input = false
    end
    #--------------------------------------------------------------------------
    # ● 戦闘行動の処理
    #--------------------------------------------------------------------------
    def process_action
    return if judge_win_loss
    return if $game_temp.next_scene != nil
    forcing_battler
    if @active_battler == nil
    turn_end
    return
    end
    #visible_enemy_atb(true) # ATBゲージの表示処理
    @message_window.clear
    wait(5)
    @active_battler.white_flash = true
    unless @active_battler.action.forcing
    @active_battler.action.prepare
    end
    if @active_battler.action.valid?
    execute_action
    end
    unless @active_battler.action.forcing
    @message_window.clear
    remove_states_auto
    display_current_state
    end
    @active_battler.white_flash = false
    @message_window.clear
    #visible_enemy_atb(true) # ATBゲージの表示処理
    process_battle_event unless @forcing_battler
    turn_end unless @forcing_battler
    forcing_battler # イベント強制行動後の初期化
    end
    #--------------------------------------------------------------------------
    # ● 戦闘行動の実行 : スキル詠唱準備
    #--------------------------------------------------------------------------
    def spell_execute_action(value = 0)
    if value == 0
    # execute_action_skillの前に実行
    if @active_battler.action.magic_spell_ok?
    unless $ed_rgss2["ed_battle_scene"] == true
    Audio.se_play(ACTOR_SPELL_SE,100,100)
    $game_troop.screen.start_flash(Color.new(255,255,255),10)
    end
    @message_window.visible = true
    wait(10)
    # 敵の場合、詠唱破棄率1/2設定。
    if @active_battler.is_a?(Game_Enemy) or
    @active_battler.inputable? != true
    if @active_battler.spi >= SPELL_DISPOSE
    spell_dispose = rand(1)
    if spell_dispose == 1
    @active_battler.action.magic_spell_dispose = true
    end
    end
    end
    # 詠唱破棄時の処理
    if @active_battler.action.magic_spell_dispose?
    damage = @active_battler.action.skill.base_damage
    damage *= SPELL_DISPOSE_DAMAGE
    damage = Integer(damage)
    @active_battler.action.skill.base_damage = damage
    end
    else
    # 詠唱中で発動不可の場合
    @enter_action = false
    end
    elsif value == 1
    # execute_action_skillの後に実行
    if @active_battler.action.magic_spell_dispose?
    damage = @active_battler.action.skill.base_damage
    damage /= SPELL_DISPOSE_DAMAGE
    damage = Integer(damage)
    @active_battler.action.skill.base_damage = damage
    end
    @active_battler.action.magic_spell_now = false
    @active_battler.action.magic_spell_ok = false
    @active_battler.action.magic_spell_dispose = false
    end
    end
    #--------------------------------------------------------------------------
    # ● 戦闘行動の実行 : スキル
    #--------------------------------------------------------------------------
    alias ed_active_time_battle_execute_action_skill execute_action_skill
    def execute_action_skill
    if @active_battler.action.magic_spell_now?
    if @active_battler.action.magic_spell_ok?
    spell_execute_action(0)
    ed_active_time_battle_execute_action_skill
    spell_execute_action(1)
    else
    @enter_action = false
    end
    else
    ed_active_time_battle_execute_action_skill
    end
    end
    #--------------------------------------------------------------------------
    # ● 詠唱ウィンドウの作成
    #--------------------------------------------------------------------------
    def create_spell_window
    s1 = "詠唱する"
    s2 = "詠唱破棄"
    @spell_window = Window_Command.new(172, [s1, s2])
    @spell_window.x = (544 - @spell_window.width) / 2
    @spell_window.y = 288
    @spell_window.visible = true
    @skill_window.active = false
    @spell_window.active = true
    @spell_window.index = 0
    end
    #--------------------------------------------------------------------------
    # ● 詠唱ウィンドウのフレーム更新
    #--------------------------------------------------------------------------
    def spell_window_update
    @spell_window.update
    if Input.trigger?(Input::C)
    Sound.play_decision
    $game_troop.all_members
    case @spell_window.index
    when 0 # 詠唱する
    @active_battler.action.magic_spell_dispose = false
    when 1 # 詠唱破棄
    @active_battler.action.magic_spell_dispose = true
    end
    dispose_spell_window
    determine_skill
    elsif Input.trigger?(Input::B)
    Sound.play_cancel
    $game_troop.all_members
    dispose_spell_window
    @skill_window.active = true
    end
    end
    #--------------------------------------------------------------------------
    # ● 詠唱ウィンドウの解放
    #--------------------------------------------------------------------------
    def dispose_spell_window
    if @spell_window != nil
    @spell_window.dispose
    @spell_window = nil
    end
    end
    #--------------------------------------------------------------------------
    # ● 戦闘処理の実行開始
    #--------------------------------------------------------------------------
    def start_main
    spell_speed
    #$game_troop.increase_turn
    @info_viewport.visible = true
    @info_viewport.ox = 0
    @message_window.y = 0
    @message_window.visible = true
    @party_command_window.active = false
    @actor_command_window.active = false
    @status_window.index = @actor_index = -1
    @message_window.clear
    wait(20)
    end
    #--------------------------------------------------------------------------
    # ● ステート自然解除(誰かが行動すれば全員1ターン経過処理の異常解除)
    #--------------------------------------------------------------------------
    def remove_states_auto_all_turn_end
    for battler in $game_troop.all_members?
    last_st = battler.states
    # KGC様「DQ風スキル」での「かばう」初期化対応記述。
    #last_protected = false
    # last_protected = battler.protected if $imported["DQSkill"]
    battler.remove_states_auto
    # ATBでは次回行動でかばうを初期化
    #battler.protected = last_protected if $imported["DQSkill"]
    if battler.states != last_st
    wait(5)
    display_state_changes(battler)
    wait(30)
    @message_window.clear
    end
    end
    end
    #--------------------------------------------------------------------------
    # ● Fin del turno
    #--------------------------------------------------------------------------
    def turn_end
    # ターン終了時に行動後のatb減算処理を実行
    @active_battler.action.subtraction_speed_action unless @active_battler == nil
    spell_speed
    # アクティブバトラーの行動を初期化&nil代入して無効化
    unless @active_battler == nil
    @active_battler.action.turn_end
    @active_battler.add_action_battler_list = false
    if $imported["CooperationSkill"] == true
    init_cooperation_skill if @active_battler.is_a?(Game_CooperationBattler)
    end
    end
    remove_states_auto_all_turn_end
    @status_window.refresh
    unless @active_battler == nil
    @active_battler = nil unless @forcing_battler == true
    end
    @forcing_battler = false
    @enter_action = false
    @command_input = false
    $game_troop.turn_ending = true
    $game_troop.all_members
    $game_party.slip_damage_effect
    $game_troop.slip_damage_effect
    wait_for_animation
    $game_party.do_auto_recovery
    wait_for_animation
    $game_troop.preemptive = false
    $game_troop.surprise = false
    process_battle_event
    $game_troop.turn_ending = false
    @message_window.clear
    $game_troop.increase_turn
    end
    end


    Última edición por DaviX el Miér Ago 08, 2012 10:12 pm, editado 4 veces (Razón : problemas con [code] y [/code])
    Volver arriba Ir abajo
    Ver perfil de usuario
    TigreX
    Maestro Maker
    Maestro Maker


    Cantidad de envíos: 149
    Miembro desde: 19/05/2010
    Edad: 15
    Localización: Chile/concepcion/Bio-Bio
    Sexo: Masculino

    Maker: RMVX


    MensajeTema: Re: ATB en 1 solo script   Miér Jun 16, 2010 11:43 am

    No esta mal la idea pero podrias ponerlo en ["code"]["/code"] sin las comillas....
    y algunos detalles e imagenes Sad
    Volver arriba Ir abajo
    Ver perfil de usuario http://rmaker.foroactivo.com
    VR0
    Escudero Experimentado
    Escudero Experimentado


    Cantidad de envíos: 59
    Miembro desde: 08/08/2009
    Edad: 27
    Localización: 23XX, destruyendo enemigos
    Sexo: Masculino

    Maker: RMVX


    MensajeTema: Re: ATB en 1 solo script   Dom Jun 20, 2010 8:42 am

    aclaraciones:
    Si usas XP main (STR11c), instala: draw_atb_gauge(actor, rect.x, rect.y + 72, w)
    si usas cara en batalla KGC, instala draw_atb_gauge(actor, x, y , width)
    ACTOR_ACTION_SE: audio de espera
    ACTOR_SPELL_SE: Audio de conjuros
    ENEMY_ATB_WINDOW: True: ve el ATB en el enemigo, False: no lo vé
    en controles (Re-editalos a las teclas del teclado, ya que son teclas del RPGVX):
    A: menu, B: no hace nada, C: acción
    Imagenes tomadas del script adjunto con batalla XP (STR11)

    Volver arriba Ir abajo
    Ver perfil de usuario
     

    ATB en 1 solo script

    Ver el tema anterior Ver el tema siguiente Volver arriba 
    Página 1 de 1.

     Temas similares

    -
    » Los script en OGAME
    » Script ABS Hero , RPG Maker VX Ace
    » Han solo y repetir tiradas.
    » Team speak no solo para raids
    » [RPG Maker VX] Necesito un script de barra de pv y pm del enemigo

    Permisos de este foro:No puedes responder a temas en este foro.
    Maker Palace :: RGSS Scripts :: Scripts Maker VX / VX Ace-