#==============================================================================
# ** State-Skill Transformation
#------------------------------------------------------------------------------
# By:Gando
# 27/4 2008
#------------------------------------------------------------------------------
# Introduction: First i would like to say that this can be scripted WAY better,
# but i'm not sure how to do it. And secondly, the "transformed"
# skills, should probably not be any skills that the Actor(s)
# can learn permanently, since they will be removed whenever the
# Actor(s) state is removed.
#-----------------------------------------
#
# $game_party.actors[id] - Replace "id" with the id of the characters in your
# party. 0-3, 0 = first member, 1 = second member etc.
#
#
# $game_actors[id] - Replace "id" with the id of the actor in the database,1-?.
# At default, 1 is Aluxes, 2 is Basil etc.
#
#
# for actor in $game_party.actors - This will make it so that every actor in
# the party will learn the skill.
#
# Example: actor.learn_skill(4) will make all actors learn "Remedy".
#
#
# state?(id) - this will check if a certain state is inflicted. Replace "id"
# with the id of the state in the database.
#
# $game_party.actors[0].state?(9) - This will check if the first actor in the
# party has state 9.
#
# skill_can_use?(id) - this will check if an actor has a certain skill. This
# is used when you want to "transform a skill. if the
# actor has that certain skill and a certain state is
# inflicted, the the skill will "transform". Replace "id"
# with the id of the skill in the database.
#
# $game_party.actors[0].skill_can_use?(7) - This will check if the first actor
# in the party has learned skill
# number 7 in the database. You can use this
# when you want to "Transform" a skill.
# If the actor can't use the skill,
# then nothing will happen when he is
# inflicted with the state.
#
# if $game_party.actors[0].state?(9) and $game_party.actors[0].skill_can_use?(7)
#
# This line will check if the first actor has state 9 inflicted AND if he has skill number
# 7 in the database learned, and if both of the statements are true, the skill will
# "transform". (look further down at my example skills transformations)
#
# unless $game_party.actors[0].state?(9) and $game_party.actors[0].skill_can_use?(9)
#
# This line will check if the first actor DOESN'T have state 9 AND if he has skill number
# 9 in the database learned, and if both of the statements are true, the skill will
# "turn back to normal". (look further down at my example skills transformations)
#
#
# learn_skill(id) - This will make the actor learn the skill. Replace "id"
# with the id of the skill in the database.
#
# forget_skill(id) - This will make the actor forget the skill. Replace "id"
# with the id of the skill in the database.
#
#
# I've made some example transformations for you. You can take a look at what
# i've done further down, and maybe you'll understand better on how to set it
# all up so that it suits you!
#
#==============================================================================
class Game_Actor < Game_Battler
#--------------------------------------------------------------------------
# * Skill effect
#--------------------------------------------------------------------------
def skill_effect(user, skill)
skill_effect = super(user, skill)
# Skill-Transform 1 transform
if $game_party.actors[0].state?(9) and $game_party.actors[0].skill_can_use?(7)
$game_party.actors[0].learn_skill(9)
$game_party.actors[0].forget_skill(7)
end
# Skill-Transform 1 return
unless $game_party.actors[0].state?(9) and $game_party.actors[0].skill_can_use?(9)
$game_party.actors[0].forget_skill(9)
$game_party.actors[0].learn_skill(7)
end
# Skill-Transform 2 learn
if $game_actors[2].state?(10)
$game_actors[2].learn_skill(58)
end
# Skill-Transform 2 return
unless $game_actors[2].state?(10)
$game_actors[2].forget_skill(58)
end
# Skill-Transform 3
for actor in $game_party.actors
unless actor.state?(11)
actor.forget_skill(59)
end
if actor.state?(11)
actor.learn_skill(59)
end
end
#ADD YOUR SKILLS HERE!!!!
return skill_effect
end
end
#==============================================================================
# ** Scene_Map
#------------------------------------------------------------------------------
#
# Here you add the same things as you did in the class "Game_Actor".
# If you don't then the skill(s) won't be learned/removed whenever a
# state is changed on the map.
#
#------------------------------------------------------------------------------
class Scene_Map
alias gando_update update
alias gando_main main
#--------------------------------------------------------------------------
# * Update
#--------------------------------------------------------------------------
def update
# Skill-Transform 1 return
unless $game_party.actors[0].state?(9) and $game_party.actors[0].skill_can_use?(9)
$game_party.actors[0].forget_skill(9)
$game_party.actors[0].learn_skill(7)
end
# Skill-Transform 1 transform
if $game_party.actors[0].state?(9)
$game_party.actors[0].learn_skill(9)
$game_party.actors[0].forget_skill(7)
end
# Skill-Transform 2 return
unless $game_actors[2].state?(10)
$game_actors[2].forget_skill(58)
end
# Skill-Transform 2 transform
if $game_actors[2].state?(10)
$game_actors[2].learn_skill(58)
end
for actor in $game_party.actors
unless actor.state?(11)
actor.forget_skill(59)
end
if actor.state?(11)
actor.learn_skill(59)
end
end
#ADD YOUR SKILLS HERE!!!!
gando_update
end
end