mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-16 19:47:35 +01:00
Moved form change defines and descriptions to their own header
This commit is contained in:
parent
ceb5c8a00a
commit
8f289714b2
@ -3,6 +3,7 @@
|
||||
|
||||
// should they be included here or included individually by every file?
|
||||
#include "constants/battle.h"
|
||||
#include "constants/form_change_types.h"
|
||||
#include "battle_main.h"
|
||||
#include "battle_message.h"
|
||||
#include "battle_util.h"
|
||||
|
81
include/constants/form_change_types.h
Normal file
81
include/constants/form_change_types.h
Normal file
@ -0,0 +1,81 @@
|
||||
|
||||
// FORM_CHANGE_BATTLE_HP_PERCENT param2 arguments
|
||||
#define HP_HIGHER_THAN 1
|
||||
#define HP_LOWER_EQ_THAN 2
|
||||
// FORM_CHANGE_MOVE param2 Arguments
|
||||
#define WHEN_LEARNED 0
|
||||
#define WHEN_FORGOTTEN 1
|
||||
// FORM_CHANGE_ITEM_USE param2 Arguments
|
||||
#define DAY 1
|
||||
#define NIGHT 2
|
||||
|
||||
#define FORM_CHANGE_END 0 // Form table terminator
|
||||
|
||||
// Form change that activates when the specified item is given to or taken from the selected Pokémon.
|
||||
// param1: item to hold.
|
||||
// param2: ability to check for, optional.
|
||||
#define FORM_CHANGE_ITEM_HOLD 1
|
||||
|
||||
// Form change that activates when the item is used on the selected Pokémon.
|
||||
// param1: item to use
|
||||
// param2: time of day to check, optional.
|
||||
// - DAY if Form change that activates in the daytime.
|
||||
// - NIGHT if Form change that activates at nighttime.
|
||||
#define FORM_CHANGE_ITEM_USE 2
|
||||
|
||||
// TODO: Form change that activates when the Pokémon learns or forgets the move.
|
||||
// param1: move to check for
|
||||
// param2:
|
||||
// - WHEN_LEARNED if Form change that activates when move is forgotten
|
||||
// - WHEN_FORGOTTEN if Form change that activates when move is learned
|
||||
#define FORM_CHANGE_MOVE 3
|
||||
|
||||
// Form change that activates when the Pokémon is withdrawn from the PC or Daycare.
|
||||
// Daycare withdraw done, PC withdraw TODO.
|
||||
// - No parameters.
|
||||
#define FORM_CHANGE_WITHDRAW 4
|
||||
|
||||
// Form change that activates when the Pokémon faints, either in battle or in the overworld by poison.
|
||||
// If species is not specified and it's on the player's side, it will try to use the value
|
||||
// saved in gBattleStruct->changedSpecies from a previous form change.
|
||||
// - No parameters.
|
||||
#define FORM_CHANGE_FAINT 5
|
||||
|
||||
// Form change that activates when the Pokémon is sent out at the beginning of a battle
|
||||
// param1: item to hold, optional
|
||||
// param2: a move that will be replaced, optional
|
||||
// param3: a new move to replace it with, optional
|
||||
#define FORM_CHANGE_BATTLE_BEGIN 6
|
||||
|
||||
// Form change that activates at the end of a battle. If species is not specified and it's on the player's side, it will try to use the value saved in gBattleStruct->changedSpecies from a previous form change.
|
||||
// param1: item to hold, optional
|
||||
// param2: a move that will be replaced, optional
|
||||
// param3: a new move to replace it with, optional
|
||||
#define FORM_CHANGE_BATTLE_END 7
|
||||
|
||||
// Form change that activates when the Pokémon is switched out in battle.
|
||||
// - No parameters.
|
||||
#define FORM_CHANGE_BATTLE_SWITCH 8
|
||||
|
||||
// Form change that activates when the Pokémon's HP % passes a certain threshold.
|
||||
// param1: Ability to check.
|
||||
// param2: HP comparer
|
||||
// - HP_HIGHER_THAN if the form triggers when the current HP is higher than the specified threshold.
|
||||
// - HP_LOWER_EQ_THAN if the form triggers when the current HP is lower or equal than the specified threshold.
|
||||
// param3: HP percentage threshold.
|
||||
#define FORM_CHANGE_BATTLE_HP_PERCENT 9
|
||||
|
||||
// Form change that activates when the mon has the defined item.
|
||||
// If it's on the player's side, it also requires ITEM_MEGA_RING in the user's bag and for the player to trigger it by pressing START before selecting a move.
|
||||
// param1: item to hold.
|
||||
#define FORM_CHANGE_MEGA_EVOLUTION_ITEM 10
|
||||
|
||||
// Form change that activates when the mon has the defined move.
|
||||
// If it's on the player's side, it also requires ITEM_MEGA_RING in the user's bag and for the player to trigger it by pressing START before selecting a move.
|
||||
// param1: move to have.
|
||||
#define FORM_CHANGE_MEGA_EVOLUTION_MOVE 11
|
||||
|
||||
// Form change that activates automatically when entering battle with the specified item.
|
||||
// If the item is a Red Orb, it uses the Omega Symbol for the animation and icon. Otherwise, it defaults to the Alpha symbol.
|
||||
// param1: item to hold.
|
||||
#define FORM_CHANGE_PRIMAL_REVERSION 12
|
@ -313,25 +313,6 @@
|
||||
#define EVO_MODE_BATTLE_SPECIAL 4
|
||||
#define EVO_MODE_OVERWORLD_SPECIAL 5
|
||||
|
||||
// Form change types
|
||||
#define FORM_CHANGE_END 0 // Form table terminator
|
||||
#define FORM_CHANGE_ITEM_HOLD 1
|
||||
#define FORM_CHANGE_ITEM_USE 2
|
||||
#define FORM_CHANGE_MOVE 3 // Todo
|
||||
#define FORM_CHANGE_WITHDRAW 4 // Daycare done, Todo PC
|
||||
#define FORM_CHANGE_FAINT 5
|
||||
#define FORM_CHANGE_BATTLE_BEGIN 6
|
||||
#define FORM_CHANGE_BATTLE_END 7
|
||||
#define FORM_CHANGE_BATTLE_SWITCH 8
|
||||
#define FORM_CHANGE_BATTLE_HP_PERCENT 9
|
||||
#define FORM_CHANGE_MEGA_EVOLUTION_ITEM 10
|
||||
#define FORM_CHANGE_MEGA_EVOLUTION_MOVE 11
|
||||
#define FORM_CHANGE_PRIMAL_REVERSION 12
|
||||
|
||||
// FORM_CHANGE_BATTLE_HP_PERCENT param2 arguments
|
||||
#define HP_HIGHER_THAN 1
|
||||
#define HP_LOWER_EQ_THAN 2
|
||||
|
||||
#define MON_PIC_WIDTH 64
|
||||
#define MON_PIC_HEIGHT 64
|
||||
#define MON_PIC_SIZE (MON_PIC_WIDTH * MON_PIC_HEIGHT / 2)
|
||||
|
@ -1,81 +1,3 @@
|
||||
/*
|
||||
FORM_CHANGE_ITEM_HOLD:
|
||||
Form change activates when the specified item is given to or taken from the selected Pokémon.
|
||||
Alternatively, form change activates when the specified item is is given to or taken from
|
||||
the selected Pokémon that has a particular ability.
|
||||
param1 = item to hold
|
||||
param2 = ability to check for, optional
|
||||
|
||||
FORM_CHANGE_ITEM_USE:
|
||||
Form change activates when the item is used on the selected Pokémon.
|
||||
param1 = item to use
|
||||
param2 = DAY if form change activates in the daytime, optional
|
||||
NIGHT if form change activates at nighttime, optional
|
||||
|
||||
FORM_CHANGE_MOVE:
|
||||
Form change activates when the Pokémon learns or forgets the move.
|
||||
param1 = move to check for
|
||||
param2 = WHEN_LEARNED if form change activates when move is forgotten
|
||||
WHEN_FORGOTTEN if form change activates when move is learned
|
||||
|
||||
FORM_CHANGE_WITHDRAW:
|
||||
Form change activates when the Pokémon is withdrawn from the PC or Daycare.
|
||||
No parameters.
|
||||
|
||||
FORM_CHANGE_FAINT:
|
||||
Form change activates when the Pokémon faints, either in battle or in the overworld by poison.
|
||||
If species is not specified and it's on the player's side, it will try to use the value
|
||||
saved in gBattleStruct->changedSpecies from a previous form change.
|
||||
No parameters.
|
||||
|
||||
FORM_CHANGE_BATTLE_BEGIN:
|
||||
Form change activates when the Pokémon is sent out at the beginning of a battle
|
||||
param1 = item to hold, optional
|
||||
param2 = a move that will be replaced, optional
|
||||
param3 = a new move to replace it with, optional
|
||||
|
||||
FORM_CHANGE_BATTLE_END:
|
||||
Form change activates at the end of a battle. If species is not specified and it's on the player's side,
|
||||
it will try to use the value saved in gBattleStruct->changedSpecies from a previous form change.
|
||||
param1 = item to hold, optional
|
||||
param2 = a move that will be replaced, optional
|
||||
param3 = a new move to replace it with, optional
|
||||
|
||||
FORM_CHANGE_BATTLE_SWITCH:
|
||||
Form change activates when the Pokémon is switched out in battle.
|
||||
No parameters.
|
||||
|
||||
FORM_CHANGE_BATTLE_HP_PERCENT:
|
||||
Form change activates when the Pokémon's HP % passes a certain threshold.
|
||||
param1 = Ability to check.
|
||||
param2 = HP_HIGHER_THAN if the form triggers when the current HP is higher than the specified threshold.
|
||||
HP_LOWER_EQ_THAN if the form triggers when the current HP is lower or equal than the specified threshold.
|
||||
param3 = HP percentage threshold.
|
||||
|
||||
FORM_CHANGE_MEGA_EVOLUTION_ITEM:
|
||||
Form change activates when the mon has the defined item. If it's on the player's side, it also requires
|
||||
ITEM_MEGA_RING in the user's bag and for the player to choose to enable it.
|
||||
param1 = item to hold.
|
||||
|
||||
FORM_CHANGE_MEGA_EVOLUTION_MOVE:
|
||||
Form change activates when the mon has the defined move. If it's on the player's side, it also requires
|
||||
ITEM_MEGA_RING in the user's bag and for the player to choose to enable it.
|
||||
param1 = move to have.
|
||||
|
||||
FORM_CHANGE_PRIMAL_REVERSION:
|
||||
Form change activates automatically when entering battle with the specified item. If the item is a Red Orb,
|
||||
it uses the Omega Symbol for the animation and icon. Otherwise, it defaults to Alpha.
|
||||
param1 = item to hold.
|
||||
*/
|
||||
|
||||
// FORM_CHANGE_MOVE param2 Arguments
|
||||
#define WHEN_LEARNED 0
|
||||
#define WHEN_FORGOTTEN 1
|
||||
|
||||
// FORM_CHANGE_ITEM_USE param2 Arguments
|
||||
#define DAY 1
|
||||
#define NIGHT 2
|
||||
|
||||
static const struct FormChange sVenusaurFormChangeTable[] = {
|
||||
{FORM_CHANGE_MEGA_EVOLUTION_ITEM, SPECIES_VENUSAUR_MEGA, ITEM_VENUSAURITE},
|
||||
{FORM_CHANGE_FAINT, SPECIES_VENUSAUR},
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include "list_menu.h"
|
||||
#include "overworld.h"
|
||||
#include "item.h"
|
||||
#include "constants/form_change_types.h"
|
||||
#include "constants/items.h"
|
||||
#include "constants/moves.h"
|
||||
#include "constants/region_map_sections.h"
|
||||
|
@ -15,6 +15,7 @@
|
||||
#include "task.h"
|
||||
#include "trainer_hill.h"
|
||||
#include "constants/field_poison.h"
|
||||
#include "constants/form_change_types.h"
|
||||
#include "constants/party_menu.h"
|
||||
|
||||
static bool32 IsMonValidSpecies(struct Pokemon *pokemon)
|
||||
|
@ -66,6 +66,7 @@
|
||||
#include "constants/battle.h"
|
||||
#include "constants/battle_frontier.h"
|
||||
#include "constants/field_effects.h"
|
||||
#include "constants/form_change_types.h"
|
||||
#include "constants/item_effects.h"
|
||||
#include "constants/items.h"
|
||||
#include "constants/moves.h"
|
||||
|
@ -43,6 +43,7 @@
|
||||
#include "constants/battle_frontier.h"
|
||||
#include "constants/battle_move_effects.h"
|
||||
#include "constants/battle_script_commands.h"
|
||||
#include "constants/form_change_types.h"
|
||||
#include "constants/hold_effects.h"
|
||||
#include "constants/item_effects.h"
|
||||
#include "constants/items.h"
|
||||
|
@ -36,6 +36,7 @@
|
||||
#include "trig.h"
|
||||
#include "walda_phrase.h"
|
||||
#include "window.h"
|
||||
#include "constants/form_change_types.h"
|
||||
#include "constants/items.h"
|
||||
#include "constants/moves.h"
|
||||
#include "constants/rgb.h"
|
||||
|
Loading…
Reference in New Issue
Block a user