Jump to content
Rpg²S Forum

Battaglia automatica


payam
 Share

Recommended Posts

Battaglia automatica

Descrizione

Inserisce nei comandi di battaglia questa opzione

(per vx)

 

Autore

Dargor

 

Allegati

Nessuno

 

Istruzioni per l'uso

Incollare sopra main

#======================================================================
========
# ** Auto Battle
#------------------------------------------------------------------------------
#  © Dargor, 2008
#  13/05/08
#  Version 1.2
#------------------------------------------------------------------------------
#  VERSION HISTORY:
#   - 1.0 (24/03/08), Initial release
#   - 1.1 (13/05/08), Added auto-battle modes (Single Turn/Whole Battle)
#   - 1.2 (13/05/08), Added auto-battle cancelation (use SHIFT)
#------------------------------------------------------------------------------
#  INSTRUCTIONS:
#   1) Paste the script above main
#   2) To change an actor's auto battle option, use:
#         $game_actors[actor_id].auto_battle = true/false
#   3) To enable/disable the auto battle option, useL
#         $game_system.auto_battle_disabled = true/false
#==============================================================================

# Vocabulary: Auto Battle Command
Vocab::AutoBattle = 'Auto'

#==============================================================================
# ** Game_System
#------------------------------------------------------------------------------
#  This class handles system-related data. Also manages vehicles and BGM, etc.
# The instance of this class is referenced by $game_system.
#==============================================================================

class Game_System
 #--------------------------------------------------------------------------
 # * Public Instance Variables
 #--------------------------------------------------------------------------
 attr_accessor :auto_battle_disabled
 attr_accessor :auto_battle_mode
 #--------------------------------------------------------------------------
 # * Alias Listing
 #--------------------------------------------------------------------------
 alias dargor_vx_system_auto_battle_initialize initialize
 #--------------------------------------------------------------------------
 # * Object Initialization
 #--------------------------------------------------------------------------
 def initialize
   @auto_battle_disabled = false               # Enable/Disable flag
   @auto_battle_mode = 0                       # 0: Single Turn 1: Whole Battle
   dargor_vx_system_auto_battle_initialize
 end
end

#==============================================================================
# ** Game_Temp
#------------------------------------------------------------------------------
#  This class handles temporary data that is not included with save data.
# The instance of this class is referenced by $game_temp.
#==============================================================================

class Game_Temp
 #--------------------------------------------------------------------------
 # * Public Instance Variables
 #--------------------------------------------------------------------------
 attr_accessor :in_auto_battle                # in-battle flag
 attr_accessor :auto_battle_canceled
 #--------------------------------------------------------------------------
 # * Alias Listing
 #--------------------------------------------------------------------------
 alias dargor_vx_temp_auto_battle_initialize initialize
 #--------------------------------------------------------------------------
 # * Object Initialization
 #--------------------------------------------------------------------------
 def initialize
   @in_auto_battle = false
   @auto_battle_canceled = false
   dargor_vx_temp_auto_battle_initialize
 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_accessor :auto_battle
 #--------------------------------------------------------------------------
 # * Alias Listing
 #--------------------------------------------------------------------------
 alias dargor_vx_actor_auto_battle_setup setup
 #--------------------------------------------------------------------------
 # * Setup
 #     actor_id : actor ID
 #--------------------------------------------------------------------------
 def setup(actor_id)
   actor = $data_actors[actor_id]
   @auto_battle = actor.auto_battle
   dargor_vx_actor_auto_battle_setup(actor_id)
 end
end

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

class Scene_Battle < Scene_Base
 #--------------------------------------------------------------------------
 # * Alias Listing
 #--------------------------------------------------------------------------
 alias dargor_vx_battle_auto_battle_update_basic update_basic
 alias dargor_vx_battle_auto_battle_create_info_viewport create_info_viewport
 alias dargor_vx_battle_auto_battle_start_party_command_selection start_party_command_selection
 alias dargor_vx_battle_auto_battle_update_party_command_selection update_party_command_selection
 alias dargor_vx_battle_auto_battle_process_victory process_victory
 #--------------------------------------------------------------------------
 # * Basic Update Processing
 #     main : Call from main update method
 #--------------------------------------------------------------------------
 def update_basic(main = false)
   if Input.trigger?(Input::SHIFT)
     $game_temp.in_auto_battle = false 
     $game_temp.auto_battle_canceled = true
   end
   dargor_vx_battle_auto_battle_update_basic(main)
 end
 #--------------------------------------------------------------------------
 # * Create Information Display Viewport
 #--------------------------------------------------------------------------
 def create_info_viewport
   commands = $game_system.party_commands
   $game_system.add_party_command(commands.size-1, Vocab::AutoBattle)
   dargor_vx_battle_auto_battle_create_info_viewport
   index = commands.index(Vocab::AutoBattle)
   @party_command_window.draw_item(index, !$game_system.auto_battle_disabled)
 end
 #--------------------------------------------------------------------------
 # * Start party command selection
 #--------------------------------------------------------------------------
 def start_party_command_selection
   if $game_system.auto_battle_mode == 1 && $game_temp.in_auto_battle
     for actor in $game_party.members
       actor.make_action
     end
     start_main
     return
   end
   dargor_vx_battle_auto_battle_start_party_command_selection
 end
 #--------------------------------------------------------------------------
 # * Update Party Command Selection
 #--------------------------------------------------------------------------
 def update_party_command_selection
   dargor_vx_battle_auto_battle_update_party_command_selection
   if Input.trigger?(Input::C)
     case $game_system.party_commands[@party_command_window.index]
     when Vocab::AutoBattle  # Auto Battle
       if $game_system.auto_battle_disabled
         Sound.play_buzzer
         return
       end
       if $game_system.auto_battle_mode == 1
         $game_temp.in_auto_battle = true
       end
       for actor in $game_party.members
         actor.make_action
       end
       Sound.play_decision
       start_main
     end
   end
 end
 #--------------------------------------------------------------------------
 # * Victory Processing
 #--------------------------------------------------------------------------
 def process_victory
   $game_temp.in_auto_battle = false
   dargor_vx_battle_auto_battle_process_victory
 end
end

 

 

Bugs e Conflitti Noti

N/A

 

Altri Dettagli

Nessuno

Edited by payam

Bazar:

Clicca qui!!

Link to comment
Share on other sites

Se è per VX sposto nella giusta sezione ;)

Progetto in corso:

"Hero Walking: Toward Another Life"

Video Old Intro su Youtube

Visite: 11.896!

http://img212.imageshack.us/img212/1060/logheryb0.jpg

 

 

*Posizioni raggiunte nei contest*

 

 

http://www.rpg2s.net/awards/bestuser1.jpghttp://www.rpg2s.net/awards/beststaff1.jpg

http://www.rpg2s.net/awards/bestmaker3.jpghttp://www.rpg2s.net/awards/bestcritical1.jpghttp://www.rpg2s.net/awards/mostcharismatic2.jpg

http://www.rpg2s.net/awards/mosthelpful1.jpghttp://www.rpg2s.net/awards/mostpolite1.jpghttp://www.rpg2s.net/awards/mostpresent1.jpg

 

http://img204.imageshack.us/img204/8039/sccontest3octpl3.gif http://img103.imageshack.us/img103/1496/sccontest2octou1.gif http://img118.imageshack.us/img118/181/sccontest1octdt9.gif http://img230.imageshack.us/img230/1273/sccontest1batio5.gif http://img103.imageshack.us/img103/1496/sccontest2octou1.gif http://img103.imageshack.us/img103/1496/sccontest2octou1.gif http://img103.imageshack.us/img103/1496/sccontest2octou1.gif http://img143.imageshack.us/img143/3755/destroyae4.png

http://img141.imageshack.us/img141/3081/comics3od3.gif http://img118.imageshack.us/img118/181/sccontest1octdt9.gif

 

 

SE VUOI AVERE RENS PER RISORSE, TUTORIAL, DEMO, ECC... LEGGI QUI

Link to comment
Share on other sites

  • 3 years later...
In che senso battaglia automatica?

 

La religione: per il popolo è vera, per il saggio è falsa, per il potente è utile
La religione nasce quando un furbo incontra un idiota

 

Citazioni by me

 

 

Le prove sull'esistenza di dio sono uguali a quelle dell'esistenza dei Pokémon

Soltanto perchè un anime ne parla non vuol dire che esistano.

La fede è l'esatto contrario del metodo scientifico, è stato il metodo scientifico però a far progredire la civiltà umana.

Non bisogna dimostrare che qualcosa non esiste, prima bisogna dimostrare che quella cosa esiste.

Non esistono prove dell'inesistenza di dio ma esistono prove dell'inesistenza dei fatti narrati sulla bibbia il che confuta dio

Dio non ha creato l'universo(vedi Big Bang), Dio non ha creato l'uomo nè la vita(vedi evoluzione per selezione naturale)

Se Dio non ha creato tutto questo allora perchè crederci?

 

Link to comment
Share on other sites

vuol dire che attiva nel menù di battaglia il comando di battaglia automatica

e qnd lo selezioni i tuoi personaggi combattono da soli senza che tu

gli dica di attaccare o eseguire magie,...

Bazar:

Clicca qui!!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...