Move Effects
Move effects in Pokémon Essentials BES are controlled by function codes that determine what happens when a move is used. Each move inPBS/moves.txt has a function code that defines its unique behavior.
Move Data Structure
Each move is defined with the following format inPBS/moves.txt:
Hexadecimal code defining the move’s unique effect (e.g., 000, 0DD, 116)
Percentage chance of secondary effect occurring (0-100)
Common Function Codes
Damage Function Codes
000 - Standard Damage
000 - Standard Damage
Function Code:
000Basic damaging move with no special effects.Examples:0DD - HP Drain
0DD - HP Drain
Function Code: Implementation:
0DDRestores user’s HP equal to damage dealt (typically 50%).Examples:Status Effect Function Codes
003 - Sleep
003 - Sleep
Function Code:
003Puts the target to sleep.Examples:007 - Paralysis
007 - Paralysis
Function Code:
007Attempts to paralyze the target.Examples:00F - Flinch
00F - Flinch
Function Code:
00FCauses damage and may make the target flinch.Examples:Stat Modification Function Codes
020 - Raise User's Special Attack
020 - Raise User's Special Attack
Function Code:
020Damage move that has a chance to raise the user’s Special Attack.Examples:043 - Lower Target's Defense
043 - Lower Target's Defense
Function Code:
043Damage move that may lower the target’s Defense stat.Examples:044 - Lower Target's Speed
044 - Lower Target's Speed
Function Code:
044Damage move that lowers the target’s Speed stat.Examples:045 - Lower Target's Special Attack
045 - Lower Target's Special Attack
Function Code:
045Damage move that lowers the target’s Special Attack stat.Examples:Multi-Turn and Special Mechanics
Recoil Moves
0FA - Recoil Damage
0FA - Recoil Damage
Function Code:
0FAUser takes recoil damage after attacking.Examples:Switch-Out Moves
0EE - Switch After Attack
0EE - Switch After Attack
Function Code: Implementation concept:
0EEUser switches out after dealing damage.Examples:0EC - Force Target Switch
0EC - Force Target Switch
Function Code:
0ECForces the target to switch out.Examples:Multi-Hit Moves
0BD - Double Hit
0BD - Double Hit
Function Code:
0BDHits exactly twice.Examples:0C0 - Multi-Hit (2-5 times)
0C0 - Multi-Hit (2-5 times)
Function Code:
0C0Hits 2-5 times in one turn.Examples:Self-Targeting Moves
Stat Boost Moves
026 - Dragon Dance
026 - Dragon Dance
Function Code:
026Raises user’s Attack and Speed.Examples:029 - Hone Claws
029 - Hone Claws
Function Code:
029Raises user’s Attack and Accuracy.Examples:032 - Nasty Plot
032 - Nasty Plot
Function Code:
032Sharply raises user’s Special Attack (2 stages).Examples:Special Mechanics
Priority-Based Moves
116 - Sucker Punch
116 - Sucker Punch
Function Code: Implementation:
116Hits first, but fails if target isn’t using an attack.Examples:115 - Focus Punch
115 - Focus Punch
Function Code:
115Charges first, fails if hit during charge.Examples:Item-Based Moves
0F1 - Thief
0F1 - Thief
Function Code:
0F1Steals target’s held item.Examples:0F7 - Fling
0F7 - Fling
Function Code: Power varies by item thrown.
0F7Throws held item at target.Examples:Move Compilation
Moves are compiled fromPBS/moves.txt to Data/moves.dat:
Move Data Access
In battle, move data is read fromData/moves.dat:
Target Types
TheTarget field determines who can be targeted:
00: Single adjacent opponent01: No target (user only)02: Random opponent04: All opponents08: All Pokémon except user10: User’s side
Creating Custom Move Effects
Custom function codes should be implemented in the battle scripts, typically in
PokeBattle_Move classes.Related Systems
See also:- Battle Mechanics - Overall battle system
- Ability Effects - How abilities interact with moves
- PBS Compiler - How moves are compiled from text files