PREEMPTIVE = Party attacks first
SURPRISE = Enemies attack first
Minor bug fix, if you downloaded it before, download it again.
CODE
=begin
AlphaWhelp's Auto Preemptive or Surprise
Add the troop ids to the appropriate variables below
noted with comments above them. If you input a troop
ID into both variables, auto-preemptive takes effect
instead of auto-surprise. Enjoy.
Version 0.2a
Changes from 0.1a
Minor bug fix involving random encounters
Created 6/7/09, 1:34 A.M.
=end
module AW
#Insert auto-preemptive troop IDs below
#E.X. [1, 2, 3, 4]
AUTOPREEMPTTROOPIDS = [1]
#Insert auto-surprise troop IDs below
#E.X. [5, 6, 7, 8]
AUTOSURPRISETROOPIDS = [2]
end
class Scene_Battle < Scene_Base
alias aw_preempt_pbs process_battle_start
def process_battle_start
awtroopid = $game_troop.troop.id
if AW::AUTOPREEMPTTROOPIDS.include?(awtroopid)
$game_troop.preemptive = true
else
if AW::AUTOSURPRISETROOPIDS.include?(awtroopid)
$game_troop.surprise = true
end
end
aw_preempt_pbs
end
end
class Scene_Map < Scene_Base
alias aw_preempt_pos preemptive_or_surprise
def preemptive_or_surprise
awtroopid = $game_troop.troop.id
if AW::AUTOPREEMPTTROOPIDS.include?(awtroopid)
$game_troop.preemptive = true
else
if AW::AUTOSURPRISETROOPIDS.include?(awtroopid)
$game_troop.surprise = true
else
aw_preempt_pos
end
end
end
end
AlphaWhelp's Auto Preemptive or Surprise
Add the troop ids to the appropriate variables below
noted with comments above them. If you input a troop
ID into both variables, auto-preemptive takes effect
instead of auto-surprise. Enjoy.
Version 0.2a
Changes from 0.1a
Minor bug fix involving random encounters
Created 6/7/09, 1:34 A.M.
=end
module AW
#Insert auto-preemptive troop IDs below
#E.X. [1, 2, 3, 4]
AUTOPREEMPTTROOPIDS = [1]
#Insert auto-surprise troop IDs below
#E.X. [5, 6, 7, 8]
AUTOSURPRISETROOPIDS = [2]
end
class Scene_Battle < Scene_Base
alias aw_preempt_pbs process_battle_start
def process_battle_start
awtroopid = $game_troop.troop.id
if AW::AUTOPREEMPTTROOPIDS.include?(awtroopid)
$game_troop.preemptive = true
else
if AW::AUTOSURPRISETROOPIDS.include?(awtroopid)
$game_troop.surprise = true
end
end
aw_preempt_pbs
end
end
class Scene_Map < Scene_Base
alias aw_preempt_pos preemptive_or_surprise
def preemptive_or_surprise
awtroopid = $game_troop.troop.id
if AW::AUTOPREEMPTTROOPIDS.include?(awtroopid)
$game_troop.preemptive = true
else
if AW::AUTOSURPRISETROOPIDS.include?(awtroopid)
$game_troop.surprise = true
else
aw_preempt_pos
end
end
end
end
