class RPG::Skill
# skill_id => {actor_id => target_actor_id, ...}, ...
Evolution_Skills = {}
def evolution_skill?
return Evolution_Skills.has_key?(@id)
end
def evolution_data
return Evolution_Skills[@id]
end
end
class Game_Battler
alias_method :seph_actorevolution_amactr_se, :skill_effect
def skill_effect(user, skill)
result = seph_actorevolution_amactr_se(user, skill)
if user.is_a?(Game_Actor) && skill.evolution_skill?
data = skill.evolution_data
if data.has_key?(user.id)
$game_party.evolve_actor(user.id, data[user.id])
end
end
return result
end
end
class Game_Party
def evolve_actor(actor_id, target_actor_id)
actor = $game_actors[actor_id]
return unless @actors.include?(actor)
target_actor = $game_actors[target_actor_id]
target_actor.exp = actor.exp
@actors[@actors.index(actor)] = target_actor
refresh
end
end