First Strike States
Authors: game_guy
Version: 1.0
Type: Turn-Based Modification
Key Term: Battle Add-on
IntroductionRemember in most RPG's there was always an armor that let you strike first at the beginning of battle? This script does exactly that! Note that actors do not attack first unless they have a Strike First state. Note that if two actors have a strike first state at the same time, the faster actor will attack first.
Features
- Setup as many states
- Allows actor to strike first at beginning of battle
- Can also set it up so actor attacks first at the beginning of every turn
ScreenshotsN/A
DemoN/A
Script
#===============================================================================
# First Strike States
# Author game_guy
# Version 1.0
#-------------------------------------------------------------------------------
# Intro:
# Remember in most RPG's there was always an armor that let you strike first
# at the beginning of battle? This script does exactly that!
# Note that actors do not attack first unless they have a Strike First state.
# Note that if two actors have a strike first state at the same time, the faster
# actor will attack first.
#
# Features:
# Setup as many states
# Allows actor to strike first at beginning of battle
# Can also set it up so actor attacks first at the beginning of every turn
#
# Instructions:
# Go down to Config and set everything up.
#
# First_Strike_States = Array of state id's
# State id's that allow the actor to attack first at the beginning of battle.
# Example: First_Strike_States = [17, 18, 19]
# It will include state id's 17, 18, and 19
# Attack_Always = true/false
# If true, if an actor has a strike first state, the actor will attack first
# at the beginning of every turn. If false, the actor will only attack first
# at the beginning of the battle.
# Example: Attack_Always = true
# If an actor has a strike first state, he'll attack first at the beginning
# of every turn in the battle.
#
# You can also turn Attack_Always on and off in game. Use this code.
# $game_system.attack_always = true/false
#
# Compatibility:
# Made for default battle system.
# Not tested with SDK.
# Probably won't work with RTAB. (Haven't tested)
#
# Credits:
# game_guy ~ for making it
# Classic RPG's ~ inspired me to make the script
#===============================================================================
module GameGuy
#==========================================
# Config
#==========================================
First_Strike_States = [17]
Attack_Always = true
#==========================================
# End Config
#==========================================
end
class Game_System
attr_accessor :attack_always
alias gg_first_strike_always_lat initialize
def intitialize
@attack_always = GameGuy::Attack_Always
return gg_first_strike_always_lat
end
end
class Game_Party
attr_accessor :attacked
alias gg_setup_actors_always_lat initialize
def initialize
@attacked = false
return gg_setup_actors_always_lat
end
end
class Scene_Battle
alias gg_reset_attack_party_lat main
def main
$game_party.attacked = false
return gg_reset_attack_party_lat
end
alias gg_attack_first_states_lat make_action_orders
def make_action_orders
gg_attack_first_states_lat
if $game_system.attack_always == false
if $game_party.attacked
return
end
end
@tempa = @action_battlers
@tempa2 = []
@tempa3 = []
for i in @tempa
if GameGuy::First_Strike_States.any? {|j| i.states.include?(j)}
@tempa2.push(i)
else
@tempa3.push(i)
end
end
@action_battlers = []
@tempa2.each {|i| @action_battlers.push(i)}
@tempa3.each {|i| @action_battlers.push(i)}
$game_party.attacked = true
end
end
InstructionsAbove blizzard's scripts and below Scene_Debug.
Rest of instructions in the script.
CompatibilityMade for default battle system.
Not tested with SDK.
Probably won't work with RTAB. (Haven't tested)
Credits and Thanks
- game_guy ~ for making it
- Classic RPG's ~ inspired me to make the script
- Branden ~ Beta Testing
Author's NotesEnjoy!