Aldeia RPG

Gostaria de reagir a esta mensagem? Crie uma conta em poucos cliques ou inicie sessão para continuar.

Suporte ao desenvolvimento de jogos


    Adicionado de Opções ao Ator

    SrºJokker
    SrºJokker
    Experiente
    Experiente


    Mensagens : 591
    Créditos : 234

    Adicionado de Opções ao Ator Empty Adicionado de Opções ao Ator

    Mensagem por SrºJokker Seg Nov 29, 2010 10:31 pm

    Adicionado de Opções ao Ator
    Versão: 1.0a
    Autor: cozziekuns
    Data: 24 de junho, 2010

    Histórico da Versão

    2010/08/21 - Lançado com Last Stand
    1.0>


    Descrição

    Antes, havia apenas seis opções de ator que você pode escolher, e eles foram um pouco aborrecido. Os únicos que a maioria das pessoas realmente utilizados foram duas espadas estilo e bônus de críticos, e mesmo assim eles foram utilizados com bastante moderação. Acho que as opções ator adicionar muita variedade no jogo, por isso, tomei-o como meu trabalho para criar as melhores opções de ator que eu (e Square Enix, como a maioria deles são arrancadas de FFTA2) poderia pensar.

    Concentração: Dá o ator um bônus de precisão acrescentou.
    Reduzir para metade a MP: Metades do MP para todas as habilidades. Não acumula com a opção de armadura.
    Imunidade: Concede imunidade a todos os estados, bom ou ruim.
    Monkey Grip: Permite que o ator para equipar um escudo independentemente de a sua arma é uma mão ou duas mãos.
    Spellbound: Estados vão permanecer em vigor por duas vezes mais longo.
    Razzle Dazzle: bom nome para Auto-Regen.
    Unscarred: Quando o ator está em plena saúde, o ataque é aumentado.
    Adrenalina: Quando o ator está no crítico de saúde, a velocidade é aumentada.
    Alma sobrecarregada: Quando o ator é crítico para a saúde, ele é nocauteado e todos os outros membros do grupo HP e MP é totalmente recuperado.
    Vigilância: Quando o ator está no crítico de saúde, a defesa é aumentada.
    Príncipe: Habilidades assumir HP ao invés de MP.
    Last Stand: Quando o ator está no crítico de saúde, tanto Dano Crítico e Taxa são aumentadas.

    Características

    Basicamente disse-lhes na descrição, por isso ... yeah.

    Script
    Código:
    #===============================================================================
    #
    # Added Actor Options
    # Last Date Updated: 6/24/2010
    #
    # Before, there were only six actor options that you could choose from, and they
    # were a bit dull. The only ones that most people actually used were two swords
    # style and critical bonus, and even then they were used quite sparingly. I find
    # that actor options add a lot of variety into the game, so I took it up as my
    # job to create the best actor options I (and Square Enix, as most of them are
    # ripped of FFTA2) could think of.
    #
    # Note: The best way to use these skills would be with Modern Algebra's Editable
    # actor options, or with that equipment skill that allowed equipment to have
    # actor options (whoever wrote that script, contact me so I can credit you
    # and your script)
    #
    # Concentration: Gives the actor an added accuracy bonus.
    # Halve MP: Halves the MP for all skills. Does not stack with the armour option.
    # Immunity: Grants immunity to all states, good or bad.
    # Monkey Grip: Allows the actor to equip a shield regardless of whether their
    #              weapon is one-handed or two-handed.
    # Spellbound: States will stay in effect for two times as long.
    # Razzle Dazzle: Nice name for Auto-Regen.
    # Unscarred: When the actor is on full health, attack is increased.
    # Adrenaline: When the actor is on critical health, speed is increased.
    # Burdened Soul: When the actor is on critical health, he is knocked out and all
    #                other party members are fully recovered,
    # Vigilance: When the actor is on critical health, defense is increased.
    # Blood Prince: Skills take up HP instead of MP.
    # Last Stand: When the actor is on critical health, both Critical Damage and
    #            Rate are increased.
    #
    #===============================================================================
    # Updates
    # -----------------------------------------------------------------------------
    # o 06/24/10 Started Script.
    #===============================================================================
    # What's to come?
    # -----------------------------------------------------------------------------
    # o Nothing! Suggest something.
    #===============================================================================
    # Instructions
    # -----------------------------------------------------------------------------
    # To install this script, open up your script editor and copy/paste this script
    # to an open slot below ? Materials but above ? Main. Remember to save.
    #
    # To change the modules, follow the correct syntax. For example, if I wanted
    # Ulrika (who has the actor ID of 2) to have the ability IMMUNITY, I would
    # scroll down to the line with immunity and place her ID in the brackets. Or,
    # essentially:
    #
    # IMMUNITY = [2]
    #===============================================================================

    $imported = {} if $imported == nil
    $imported["CozAddedActorOptions"] = true

    module COZZIEKUNS
      module AAO
      # Syntax: Option = [Actor ID's]
        CONCENTRAITON = [1]
        HALVE_MP = []
        IMMUNITY = []
        MONKEY_GRIP = []
        SPELLBOUND = []
        RAZZLE_DAZZLE = []
        UNSCARRED = []
        ADRENAILINE = []
        BURDENED_SOUL = []
        VIGILANCE = []
        BLOOD_PRINCE = []
        LAST_STAND = []
       
        CONCENTRATION_VARIABLE = 5
        RAZZLE_DAZZLE_WAIT = 90
        RAZZLE_DAZZLE_MESSAGE = "'s HP was restored by a bit!"
        UNSCARRED_VARIABLE = 150
        ADRENAILINE_VARIABLE = 150
        BURDENED_SOUL_WAIT = 90
        BURDENED_SOUL_MESSAGE = "'s soul was released!"
        CRITICAL_HP_VARIABLE = 15
        VIGILANCE_VARIABLE = 150
        LAST_STAND_DAMAGE_VARIABLE = 2  # New damage multiplier for Critical Hits. Stacks on to the original.
        LAST_STAND_RATE_VARIABLE = 2 # New rate multiplier for Critical Hits. Stacks on to the original.
      end
    end

    #==============================================================================
    # ** Game_Battler
    #------------------------------------------------------------------------------
    #  This class deals with battlers. It's used as a superclass of the Game_Actor
    # and Game_Enemy classes.
    #==============================================================================

    class Game_Battler
      #--------------------------------------------------------------------------
      # * Get [Spellbound] option
      #--------------------------------------------------------------------------
      def spellbound
        return false
      end
      #--------------------------------------------------------------------------
      # * Get [Burdened Soul] option
      #--------------------------------------------------------------------------
      def burdened_soul
        return false
      end
      #--------------------------------------------------------------------------
      # * Get [Blood Prince] option
      #--------------------------------------------------------------------------
      def blood_prince
        return false
      end
      #--------------------------------------------------------------------------
      # * Determine Usable Skills
      #    skill : skill
      #--------------------------------------------------------------------------
      def skill_can_use?(skill)
        return false unless skill.is_a?(RPG::Skill)
        return false unless movable?
        return false if silent? and skill.spi_f > 0
        if blood_prince
          return false if calc_mp_cost(skill) > hp
        end
        return false if calc_mp_cost(skill) > mp
        if $game_temp.in_battle
          return skill.battle_ok?
        else
          return skill.menu_ok?
        end
      end
      #--------------------------------------------------------------------------
      # * Natural Removal of States (called up each turn)
      #--------------------------------------------------------------------------
      def remove_states_auto
        clear_action_results
        for i in @state_turns.keys.clone
          if @state_turns[i] > 0
            if spellbound
              @state_turns[i] -= 0.5
            else
              @state_turns[i] -= 1
            end
          elsif rand(100) < $data_states[i].auto_release_prob
            remove_state(i)
            @removed_states.push(i)
          end
        end
      end
    end

    #==============================================================================
    # ** Game_Actor
    #------------------------------------------------------------------------------
    #  This class handles actors. It's used within the Game_Actors class
    # ($game_actors) and referenced by the Game_Party class ($game_party).
    #==============================================================================

    class Game_Actor < Game_Battler
      #--------------------------------------------------------------------------
      # * Public Instance Variables
      #--------------------------------------------------------------------------
      attr_reader  :fatigue
      attr_accessor :razzle_dazzle_message
      attr_accessor :burdened_soul_message
      #--------------------------------------------------------------------------
      # * Setup
      #    actor_id : actor ID
      #--------------------------------------------------------------------------
      alias coz_aao_ga_setup setup
      def setup(actor_id)
        coz_aao_ga_setup(actor_id)
        @concentration = COZZIEKUNS::AAO::CONCENTRAITON
        @halve_mp = COZZIEKUNS::AAO::HALVE_MP
        @immunity = COZZIEKUNS::AAO::IMMUNITY
        @monkey_grip = COZZIEKUNS::AAO::MONKEY_GRIP
        @spellbound = COZZIEKUNS::AAO::SPELLBOUND
        @razzle_dazzle = COZZIEKUNS::AAO::RAZZLE_DAZZLE
        @unscarred = COZZIEKUNS::AAO::UNSCARRED
        @adrenailine = COZZIEKUNS::AAO::ADRENAILINE
        @burdened_soul = COZZIEKUNS::AAO::BURDENED_SOUL
        @vigilance = COZZIEKUNS::AAO::VIGILANCE
        @blood_prince = COZZIEKUNS::AAO::BLOOD_PRINCE
        @last_stand = COZZIEKUNS::AAO::LAST_STAND
        @critical_hp = 0
      end
      #--------------------------------------------------------------------------
      # * Get Added State Success Rate
      #    state_id : state ID
      #--------------------------------------------------------------------------
      alias coz_aao_ga_state_probability state_probability
      def state_probability(state_id)
        n = coz_aao_ga_state_probability(state_id)
        return 0 if @immunity.include?(id)
        return n
      end
      #--------------------------------------------------------------------------
      # * Get [Spellbound] option
      #--------------------------------------------------------------------------
      def spellbound
        return @spellbound.include?(id)
      end
      #--------------------------------------------------------------------------
      # * Check for [Critical HP]
      #--------------------------------------------------------------------------
      def critical_hp?
        @critical_hp = self.maxhp
        @critical_hp *= COZZIEKUNS::AAO::CRITICAL_HP_VARIABLE
        @critical_hp /= 100
        return self.hp <= @critical_hp
      end
      #--------------------------------------------------------------------------
      # * Check for [Burdened Soul] option
      #--------------------------------------------------------------------------
      def burdened_soul
        return true if @burdened_soul.include?(id)
        return false
      end
      #--------------------------------------------------------------------------
      # * Perform Burdened Soul (called at end of turn)
      #--------------------------------------------------------------------------
      def do_burdened_soul
        if @burdened_soul.include?(id) and not dead?
          if critical_hp?
            for i in 0...$game_party.members.size
              $game_party.members[i].hp += 9999
            end
            self.hp = 0
            @burdened_soul_message = "#{self.name}" + COZZIEKUNS::AAO::BURDENED_SOUL_MESSAGE
          end
        end
      end
      #--------------------------------------------------------------------------
      # * Get [Blood Prince] option
      #--------------------------------------------------------------------------
      def blood_prince
        return @blood_prince.include?(id)
      end
      #--------------------------------------------------------------------------
      # * Get Basic Attack
      #--------------------------------------------------------------------------
      alias coz_aao_ga_base_atk base_atk
      def base_atk
        n = coz_aao_ga_base_atk
        if @unscarred.include?(id)
          if self.hp = self.maxhp
            n *= COZZIEKUNS::AAO::UNSCARRED_VARIABLE
            n /= 100
          end
        end
        return n
      end
      #--------------------------------------------------------------------------
      # * Get Basic Defense
      #--------------------------------------------------------------------------
      alias coz_aao_ga_base_def base_def
      def base_def
        n = coz_aao_ga_base_def
        if @vigilance
          if critical_hp?
            n *= COZZIEKUNS::AAO::VIGILANCE_VARIABLE
            n /= 100
          end
        end
        return n
      end
      #--------------------------------------------------------------------------
      # * Get Basic Agility
      #--------------------------------------------------------------------------
      alias coz_aao_ga_base_agi base_agi
      def base_agi
        n = coz_aao_ga_base_agi
        if @adrenailine.include?(id)
          n *= COZZIEKUNS::AAO::ADRENAILINE_VARIABLE
          n /= 100
        end
        return n
      end
      #--------------------------------------------------------------------------
      # * Get Hit Rate
      #--------------------------------------------------------------------------
      alias coz_aao_ga_hit hit
      def hit
        n = coz_aao_ga_hit
        if @concentration.include?(id)
          n += COZZIEKUNS::AAO::CONCENTRATION_VARIABLE
        end
        return n
      end
      #--------------------------------------------------------------------------
      # * Get Critical Ratio
      #--------------------------------------------------------------------------
      alias coz_aao_ga_cri cri
      def cri
        n = coz_aao_ga_cri cri
        if @last_stand.include?(id)
          if critical_hp?
            n += COZZIEKUNS::AAO::LAST_STAND_RATE_VARIABLE
          end
        end
        return n
      end
      #--------------------------------------------------------------------------
      # * Calculation of Damage From Normal Attack
      #    attacker : Attacker
      #    The results are substituted for @hp_damage
      #--------------------------------------------------------------------------
      def make_attack_damage_value(attacker)
        damage = attacker.atk * 4 - self.def * 2        # base calculation
        damage = 0 if damage < 0                        # if negative, make 0
        damage *= elements_max_rate(attacker.element_set)  # elemental adjustment
        damage /= 100
        if damage == 0                                  # if damage is 0,
          damage = rand(2)                              # half of the time, 1 dmg
        elsif damage > 0                                # a positive number?
          @critical = (rand(100) < attacker.cri)        # critical hit?
          @critical = false if prevent_critical        # criticals prevented?
          if @last_stand.include?(id)
            if critical_hp?
              damage *= (3 * COZZIEKUNS::AAO::LAST_STAND_DAMAGE_VARIABLE) if @critical # critical adjustment
            else
              damage *= 3 if @critical
            end
          else
            damage *= 3 if @critical                    # critical adjustment
          end
        end
        damage = apply_variance(damage, 20)            # variance
        damage = apply_guard(damage)                    # guard adjustment
        @hp_damage = damage                            # damage HP
      end
      #--------------------------------------------------------------------------
      # * Get [Auto HP Recovery]
      #--------------------------------------------------------------------------
      alias coz_aao_ga_auto_hp_recover auto_hp_recover
      def auto_hp_recover
        return true if @razzle_dazzle.include?(id)
        coz_aao_ga_auto_hp_recover
      end
      #--------------------------------------------------------------------------
      # * Get [Half MP cost]
      #--------------------------------------------------------------------------
      alias coz_aao_ga_half_mp_cost half_mp_cost
      def half_mp_cost
        return true if @halve_mp.include?(id)
        coz_aao_ga_half_mp_cost
      end
      #--------------------------------------------------------------------------
      # * Perform Automatic Recovery (called at end of turn)
      #--------------------------------------------------------------------------
      alias coz_aao_ga_do_auto_recovery do_auto_recovery
      def do_auto_recovery
        coz_aao_ga_do_auto_recovery
        @razzle_dazzle_message = "#{self.name}" + COZZIEKUNS::AAO::RAZZLE_DAZZLE_MESSAGE
      end
      #--------------------------------------------------------------------------
      # * Change Equipment (designate object)
      #    equip_type : Equip region (0..4)
      #    item      : Weapon or armor (nil is used to unequip)
      #    test      : Test flag (for battle test or temporary equipment)
      #--------------------------------------------------------------------------
      def change_equip(equip_type, item, test = false)
        last_item = equips[equip_type]
        unless test
          return if $game_party.item_number(item) == 0 if item != nil
          $game_party.gain_item(last_item, 1)
          $game_party.lose_item(item, 1)
        end
        item_id = item == nil ? 0 : item.id
        case equip_type
        when 0  # Weapon
          @weapon_id = item_id
          unless two_hands_legal?            # If two hands is not allowed
            unless @monkey_grip.include?(id)
              change_equip(1, nil, test)        # Unequip from other hand
            end
          end
        when 1  # Shield
          @armor1_id = item_id
          unless two_hands_legal?          # If two hands is not allowed
            unless @monkey_grip.include?(id)
              change_equip(0, nil, test)        # Unequip from other hand
            end
          end
        when 2  # Head
          @armor2_id = item_id
        when 3  # Body
          @armor3_id = item_id
        when 4  # Accessory
          @armor4_id = item_id
        end
      end
    end

    #==============================================================================
    # ** Game_Party
    #------------------------------------------------------------------------------
    #  This class handles the party. It includes information on amount of gold
    # and items. The instance of this class is referenced by $game_party.
    #==============================================================================

    class Game_Party < Game_Unit
      #--------------------------------------------------------------------------
      # * Remove Battle States (called when battle ends)
      #--------------------------------------------------------------------------
      def do_burdened_soul
        for actor in members
          actor.do_burdened_soul
        end
      end
    end

    #==============================================================================
    # ** Scene_Battle
    #------------------------------------------------------------------------------
    #  This class performs battle screen processing.
    #==============================================================================

    class Scene_Battle < Scene_Base
      #--------------------------------------------------------------------------
      # * End Turn
      #--------------------------------------------------------------------------
      def turn_end
        $game_troop.turn_ending = true
        $game_party.slip_damage_effect
        $game_troop.slip_damage_effect
        $game_party.do_auto_recovery
        for i in 0...$game_party.members.size
          if $game_party.members[i].auto_hp_recover and $game_party.members[i].dead? == false
            Sound.play_recovery
            $game_troop.screen.flash_color
            @message_window.replace_instant_text($game_party.members[i].razzle_dazzle_message)
            wait(COZZIEKUNS::AAO::RAZZLE_DAZZLE_WAIT)
          end
        end
        for i in 0...$game_party.members.size
          if $game_party.members[i].critical_hp? and $game_party.members[i].dead? == false
            if $game_party.members[i].burdened_soul
              Sound.play_actor_collapse
              $game_troop.screen.start_shake(5, 5, 10)
              @message_window.replace_instant_text($game_party.members[i].burdened_soul_message)
              wait(COZZIEKUNS::AAO::BURDENED_SOUL_WAIT)
            end
          end
        end
        $game_party.do_burdened_soul
        $game_troop.preemptive = false
        $game_troop.surprise = false
        process_battle_event
        $game_troop.turn_ending = false
        start_party_command_selection
      end
      #--------------------------------------------------------------------------
      # * Execute Battle Action: Skill
      #--------------------------------------------------------------------------
      def execute_action_skill
        skill = @active_battler.action.skill
        text = @active_battler.name + skill.message1
        @message_window.add_instant_text(text)
        unless skill.message2.empty?
          wait(10)
          @message_window.add_instant_text(skill.message2)
        end
        targets = @active_battler.action.make_targets
        display_animation(targets, skill.animation_id)
        if @active_battler.blood_prince
          @active_battler.hp -= @active_battler.calc_mp_cost(skill)
        else
          @active_battler.mp -= @active_battler.calc_mp_cost(skill)
        end
        $game_temp.common_event_id = skill.common_event_id
        for target in targets
          target.skill_effect(@active_battler, skill)
          display_action_effects(target, skill)
        end
      end
    end

    #==============================================================================
    # ** Scene_Skill
    #------------------------------------------------------------------------------
    #  This class performs the skill screen processing.
    #==============================================================================

    class Scene_Skill < Scene_Base
      #--------------------------------------------------------------------------
      # * Use Skill (apply effects to non-ally targets)
      #--------------------------------------------------------------------------
      def use_skill_nontarget
        Sound.play_use_skill
        if @actor.blood_prince
          @actor.hp -= @actor.calc_mp_cost(@skill)
        else
          @actor.mp -= @actor.calc_mp_cost(@skill)
        end
        @status_window.refresh
        @skill_window.refresh
        @target_window.refresh
        if $game_party.all_dead?
          $scene = Scene_Gameover.new
        elsif @skill.common_event_id > 0
          $game_temp.common_event_id = @skill.common_event_id
          $scene = Scene_Map.new
        end
      end
    end


    Creditos
    cozziekuns

      Data/hora atual: Sex Nov 22, 2024 2:24 am