BattleData Reference

From PMDOWiki

This page shows all properties of BattleData that can be manipulated from Lua.


BattleData:GetID()

   public override string GetID();

Returns the BattleData's ID.


BattleData:GetDisplayName()

   public override string GetDisplayName()

Returns a short display name for this BattleData object.


BattleData:ToString()

   public override string ToString()

Returns a more descriptive text of what is stored in this BattleData object.


BattleData.Element

   public string Element;

The attack's type. The reason this is here and not on SkillData is so that traps and items can deal typed damage.


BattleData.Category

   public SkillCategory Category;

The attack's category, i.e. whether it is physical, special, or otherwise.

BattleData.SkillCategory

   public enum SkillCategory;

An enumerated type for move categories, with the following values:

  • SkillCategory.None (0, default)
  • SkillCategory.Physical
  • SkillCategory.Magical (Special moves)
  • SkillCategory.Status


BattleData.HitRate

   public int HitRate;

The chance of the attack hitting, as an integer from 0–100. Moves that bypass the accuracy check, such as Swift, will have this set to -1.


BattleData.SkillStates

   public StateCollection<SkillState> SkillStates;

Special variables that this skill contains. They are potentially checked against in a select number of battle events.


BattleData.BeforeTryActions

   public PriorityList<BattleEvent> BeforeTryActions;

Events that occur before the attacker tries to use the skill. If the skill is cancelled here, the turn and skill are not used.


BattleData.BeforeActions

   public PriorityList<BattleEvent> BeforeActions;

Events that occur before the attacker uses the skill. If the skill is cancelled here, the turn will still be passed.


BattleData.OnActions

   public PriorityList<BattleEvent> OnActions;

Events that occur right after the attacker uses the skill. The skill will have been called out, and the turn will be passed. In a skill with multiple strikes, this event will be called at the beginning of each strike.


BattleData.BeforeExplosions

   public PriorityList<BattleEvent> BeforeExplosions;

Events that occur after a tile is targeted and before it creates a splash damage hitbox. Can be used to alter the hitbox or redirect it.


BattleData.BeforeHits

   public PriorityList<BattleEvent> BeforeHits;

Events that occur before the target is hit. At this point, the target variable is available for calculations.


BattleData.OnHits

   public PriorityList<BattleEvent> OnHits;

Events that occur when the target is hit. Does not occur if the target evaded the attack.


BattleData.OnHitTiles

   public PriorityList<BattleEvent> OnHitTiles;

Events that occur when the attack hits a tile. Can be used for terrain deformation.


BattleData.AfterActions

   public PriorityList<BattleEvent> AfterActions;

Events that occur after all targets are hit by the skill. In a skill with multiple strikes, this event will be called at the end of each strike.


BattleData.ElementEffects

   public PriorityList<ElementEffectEvent> ElementEffects;

Events that modify type matchups. Examples include Freeze-Dry, Scrappy, and the Exposed status.

BattleData.IntroFX

   public List<BattleFX> IntroFX;

VFX that play on top of the target before it is hit. Will always play, even if the evasion roll results in a miss.


BattleData.HitFX

   public BattleFX HitFX;

VFX that play when the target is hit. Only plays if the target is actually hit.


BattleData.HitCharAction

   public CharAnimData HitCharAction;

The animation the target Pokémon uses when it is hit. Only plays if the target is actually hit.