Image by SEGAmastergirl
‘This script is an add-on for Crystal Engine – Abilities. It allows you to make an ability that had you actor take on the appearance of the last actor in your party. Enemies can do this, too only if a trainer owns it.
How does Illusion work?
From the Bulbapedia Article on Illusion
Illusion will change the appearance of the Pokémon to that of the last Pokémon in the player’s party. Illusion will not activate if the last Pokémon in the player’s party is unable to battle or is of the same species. Illusion will replicate the type ofPoké Ball, nickname (or species name if none), Shininess (if any), gender, and form of the Pokémon it is masquerading as; however, it does not replicate the level of the masqueraded Pokémon. The effect is only aesthetic: it does not affect the Pokémon’s stats, type, moves, etc.
Illusion is broken—causing the user to appear as their true species—when the user is damaged directly by an attack or when Illusion is negated or replaced. Indirect damage or loss of HP, such as through Substitute, Life Orb, weather conditions, status conditions, entry hazards, recoil, and so on, will not break Illusion.
A Pokémon with Illusion can masquerade as another Pokémon with Illusion, provided that they are different species.
Illusion cannot be Traced, copied with Role Play, or replaced with Entrainment or Skill Swap. If a Pokémon other than Zorua or Zoroark obtains this ability with Imposter or Transform, the Pokémon will not copy this ability.
Required: Crystal Engine – Basic Module
Required: Crystal Engine – Class Sprites
Required: Crystal Engine – Pokemon Battle System
Required: Crystal Engine – Pokemon Battle HUD
Required: Crystal Engine – Abilities