Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #==============================================================================
- # ○Additional Action Ver1.00
- # for RGSS2
- # Originalscripter / Space not far
- # http://muspell.raindrop.jp/
- # Allows a enemy to act more than once.
- # Translation by Zak
- #==============================================================================
- # Insert in the enemy tag following line:
- # <additionalaction:X>
- # X stands for the number of times the enemy should act.
- # <additionalactionstate:X>
- # X stands for the state that should add 1 action
- class Game_Actor < Game_Battler
- def extraaction_number
- return 0
- end
- end
- class Game_Enemy < Game_Battler
- def extraaction_number
- resulta = 0
- resultb = 0
- s = enemy.note[/<additionalaction:([0-9]+?)>/]
- resulta = ($1 != nil ? $1.to_i : 0)
- resulta = 0 if $game_troop.turn_count == 0
- t = enemy.note[/<additionalactionstate:([0-9]+?)>/]
- if $1 != nil
- $game_troop.members[enemy.id].states.include?($1.to_i)
- resultb = 1
- resultb = 0 if $game_troop.turn_count == 0
- end
- return resulta + resultb
- end
- end
- class Scene_Battle < Scene_Base
- alias snf_execute_action execute_action
- def execute_action
- snf_execute_action
- @active_battler.extraaction_number.times do
- @message_window.clear
- @active_battler.make_action
- snf_execute_action
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement