BattleData Reference: Difference between revisions

From PMDOWiki
IDK (talk | contribs)
Created page with "This page shows all properties of BattleData that can be manipulated from Lua Category:Quick Reference"
 
Shitpost Sunkern (talk | contribs)
mNo edit summary
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
This page shows all properties of BattleData that can be manipulated from Lua
This page shows all properties of BattleData that can be manipulated from Lua.




[[Category:Quick Reference]]
== 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 Reference|SkillData]] is so that traps and items can deal typed damage.
 
 
== BattleData.Category ==
 
    public [[#BattleData.SkillCategory|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 Reference|StateCollection]]<[[SkillState Reference|SkillState]]> SkillStates;
 
Special variables that this skill contains.
They are potentially checked against in a select number of battle events.
 
 
== BattleData.BeforeTryActions ==
 
    public [[PriorityList Reference|PriorityList]]<[[BattleEvent Reference|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 Reference|PriorityList]]<[[BattleEvent Reference|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 Reference|PriorityList]]<[[BattleEvent Reference|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 Reference|PriorityList]]<[[BattleEvent Reference|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 Reference|PriorityList]]<[[BattleEvent Reference|BattleEvent]]> BeforeHits;
 
Events that occur before the target is hit.
At this point, the target variable is available for calculations.
 
 
== BattleData.OnHits ==
 
    public [[PriorityList Reference|PriorityList]]<[[BattleEvent Reference|BattleEvent]]> OnHits;
 
Events that occur when the target is hit.
Does not occur if the target evaded the attack.
 
 
== BattleData.OnHitTiles ==
 
    public [[PriorityList Reference|PriorityList]]<[[BattleEvent Reference|BattleEvent]]> OnHitTiles;
 
Events that occur when the attack hits a tile.
Can be used for terrain deformation.
 
 
== BattleData.AfterActions ==
 
    public [[PriorityList Reference|PriorityList]]<[[BattleEvent Reference|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 Reference|PriorityList]]<[[ElementEffectEvent Reference|ElementEffectEvent]]> ElementEffects;
 
Events that modify type matchups. Examples include [[Freeze-Dry]], [[Scrappy]], and the [[Exposed]] status.
 
== BattleData.IntroFX ==
 
    public [https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.list-1 List]<[[BattleFX Reference|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 Reference|BattleFX]] HitFX;
 
VFX that play when the target is hit.
Only plays if the target is actually hit.
 
 
== BattleData.HitCharAction ==
 
    public [[CharAnimData Reference|CharAnimData]] HitCharAction;
 
The animation the target Pokémon uses when it is hit.
Only plays if the target is actually hit.
 
 
[[Category:Data Class Documentation]]

Latest revision as of 15:45, 26 August 2024

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.