Trick Room
By xdan
I'm a noob scripter (not even the latter), I made this by request with my poor scripting skills. It worked to the requester so you might find it interesting.
Description:
It adds a "Trick Room" state. For those who haven't played pokemon: if any enemy has the state, the attack order is reversed. Set which state activates trick room in the script, them make a skill that inflicts the state to the whole enemy team. A way better option, thought, is to use it as a field effect with Yanfly Engine Ace - Field State Effects script:
http://yanflychannel.wordpress.com/rmvxa/gameplay-scripts/field-state-effects/
I'm certain it can be done waaay better, and it probably has compatibility issues. But I'm no scripter.
Script:
# Trick Room by Xdan
#
#==============================================================================
# What is "Trick Room"?
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# If you've never played Pokemon, Trick Room is an attack that chages the rules
# of the battle for a few turns. It inverts the attack order, meaning that
# slower battlers attack first while faster attackers now will be the last.
#
#==============================================================================
# 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.
#
# Find "if $game_troop.members.any? {|mem| mem.state?(2)}" (it's right below)
# and change "2" to the id of the trick room state. Then make a skill that
# inflicts the state to the whole enemy team. As long as one enemy has the
# state, the effect of Trick Room will be active.
#
#==============================================================================
class Game_Action
def speed
if $game_troop.members.any? {|mem| mem.state?(2)} #Change "2" to the id of the trick room state
speed = 7999
speed -= subject.agi
speed -= item.speed if item
speed -= subject.atk_speed if attack?
speed
else
speed = subject.agi
speed += item.speed if item
speed += subject.atk_speed if attack?
speed
end
end
end
The instructions are longer than the script lol
Terms of use: you can use it as long as the game's fricking good. No, seriously, no terms. Copy it, modify it, eat it, sell it to a corporation, sacrifice it to your dark god, use it as fuel to kindle the first flame and prolong the linking of the fire... I don't care. I didn't do anything special here.
Demo: Yes demo why not
Hope it helps someone ^^