diff --git a/consts/battle.json b/consts/battle.json new file mode 100644 index 0000000000..3396ea5088 --- /dev/null +++ b/consts/battle.json @@ -0,0 +1,554 @@ +{ + "targets": { + "battle": [ + "@BattleEffect", + "@MessageTag", + "@MoveSubscriptPointer", + "@SideEffectType", + "@Terrain" + ] + }, + "definitions": { + "@BattleEffect": { + "type": "enum", + "values": [ + "BATTLE_EFFECT_HIT", + "BATTLE_EFFECT_STATUS_SLEEP", + "BATTLE_EFFECT_POISON_HIT", + "BATTLE_EFFECT_RECOVER_HALF_DAMAGE_DEALT", + "BATTLE_EFFECT_BURN_HIT", + "BATTLE_EFFECT_FREEZE_HIT", + "BATTLE_EFFECT_PARALYZE_HIT", + "BATTLE_EFFECT_HALVE_DEFENSE", + "BATTLE_EFFECT_RECOVER_DAMAGE_SLEEP", + "BATTLE_EFFECT_COPY_MOVE", + "BATTLE_EFFECT_ATK_UP", + "BATTLE_EFFECT_DEF_UP", + "BATTLE_EFFECT_SPEED_UP", + "BATTLE_EFFECT_SP_ATK_UP", + "BATTLE_EFFECT_SP_DEF_UP", + "BATTLE_EFFECT_ACC_UP", + "BATTLE_EFFECT_EVA_UP", + "BATTLE_EFFECT_BYPASS_ACCURACY", + "BATTLE_EFFECT_ATK_DOWN", + "BATTLE_EFFECT_DEF_DOWN", + "BATTLE_EFFECT_SPEED_DOWN", + "BATTLE_EFFECT_SP_ATK_DOWN", + "BATTLE_EFFECT_SP_DEF_DOWN", + "BATTLE_EFFECT_ACC_DOWN", + "BATTLE_EFFECT_EVA_DOWN", + "BATTLE_EFFECT_RESET_STAT_CHANGES", + "BATTLE_EFFECT_BIDE", + "BATTLE_EFFECT_CONTINUE_AND_CONFUSE_SELF", + "BATTLE_EFFECT_FORCE_SWITCH", + "BATTLE_EFFECT_MULTI_HIT", + "BATTLE_EFFECT_CONVERSION", + "BATTLE_EFFECT_FLINCH_HIT", + "BATTLE_EFFECT_RESTORE_HALF_HP", + "BATTLE_EFFECT_STATUS_BADLY_POISON", + "BATTLE_EFFECT_INCREASE_PRIZE_MONEY", + "BATTLE_EFFECT_SET_LIGHT_SCREEN", + "BATTLE_EFFECT_TRI_ATTACK", + "BATTLE_EFFECT_REST", + "BATTLE_EFFECT_ONE_HIT_KO", + "BATTLE_EFFECT_CHARGE_TURN_HIGH_CRIT", + "BATTLE_EFFECT_HALVE_HP", + "BATTLE_EFFECT_40_DAMAGE_FLAT", + "BATTLE_EFFECT_BIND_HIT", + "BATTLE_EFFECT_HIGH_CRITICAL", + "BATTLE_EFFECT_HIT_TWICE", + "BATTLE_EFFECT_CRASH_ON_MISS", + "BATTLE_EFFECT_PREVENT_STAT_REDUCTION", + "BATTLE_EFFECT_CRIT_UP_2", + "BATTLE_EFFECT_RECOIL_QUARTER", + "BATTLE_EFFECT_STATUS_CONFUSE", + "BATTLE_EFFECT_ATK_UP_2", + "BATTLE_EFFECT_DEF_UP_2", + "BATTLE_EFFECT_SPEED_UP_2", + "BATTLE_EFFECT_SP_ATK_UP_2", + "BATTLE_EFFECT_SP_DEF_UP_2", + "BATTLE_EFFECT_ACC_UP_2", + "BATTLE_EFFECT_EVA_UP_2", + "BATTLE_EFFECT_TRANSFORM", + "BATTLE_EFFECT_ATK_DOWN_2", + "BATTLE_EFFECT_DEF_DOWN_2", + "BATTLE_EFFECT_SPEED_DOWN_2", + "BATTLE_EFFECT_SP_ATK_DOWN_2", + "BATTLE_EFFECT_SP_DEF_DOWN_2", + "BATTLE_EFFECT_EVA_DOWN_2", + "BATTLE_EFFECT_ACC_DOWN_2", + "BATTLE_EFFECT_SET_REFLECT", + "BATTLE_EFFECT_STATUS_POISON", + "BATTLE_EFFECT_STATUS_PARALYZE", + "BATTLE_EFFECT_LOWER_ATTACK_HIT", + "BATTLE_EFFECT_LOWER_DEFENSE_HIT", + "BATTLE_EFFECT_LOWER_SPEED_HIT", + "BATTLE_EFFECT_LOWER_SP_ATK_HIT", + "BATTLE_EFFECT_LOWER_SP_DEF_HIT", + "BATTLE_EFFECT_LOWER_ACCURACY_HIT", + "BATTLE_EFFECT_LOWER_EVASION_HIT", + "BATTLE_EFFECT_CHARGE_TURN_HIGH_CRIT_FLINCH", + "BATTLE_EFFECT_CONFUSE_HIT", + "BATTLE_EFFECT_POISON_MULTI_HIT", + "BATTLE_EFFECT_PRIORITY_NEG_1_BYPASS_ACCURACY", + "BATTLE_EFFECT_SET_SUBSTITUTE", + "BATTLE_EFFECT_RECHARGE_AFTER", + "BATTLE_EFFECT_RAISE_ATK_WHEN_HIT", + "BATTLE_EFFECT_COPY_MOVE_FOR_BATTLE", + "BATTLE_EFFECT_CALL_RANDOM_MOVE", + "BATTLE_EFFECT_STATUS_LEECH_SEED", + "BATTLE_EFFECT_DO_NOTHING", + "BATTLE_EFFECT_DISABLE", + "BATTLE_EFFECT_LEVEL_DAMAGE_FLAT", + "BATTLE_EFFECT_RANDOM_DAMAGE_1_TO_150_LEVEL", + "BATTLE_EFFECT_COUNTER", + "BATTLE_EFFECT_ENCORE", + "BATTLE_EFFECT_AVERAGE_HP", + "BATTLE_EFFECT_DAMAGE_WHILE_ASLEEP", + "BATTLE_EFFECT_CONVERSION2", + "BATTLE_EFFECT_NEXT_ATTACK_ALWAYS_HITS", + "BATTLE_EFFECT_LEARN_MOVE_PERMANENT", + "BATTLE_EFFECT_UNUSED_96", + "BATTLE_EFFECT_USE_RANDOM_LEARNED_MOVE_SLEEP", + "BATTLE_EFFECT_KO_MON_THAT_DEFEATED_USER", + "BATTLE_EFFECT_INCREASE_POWER_WITH_LESS_HP", + "BATTLE_EFFECT_DECREASE_LAST_MOVE_PP", + "BATTLE_EFFECT_LEAVE_WITH_1_HP", + "BATTLE_EFFECT_CURE_PARTY_STATUS", + "BATTLE_EFFECT_PRIORITY_1", + "BATTLE_EFFECT_HIT_THREE_TIMES", + "BATTLE_EFFECT_STEAL_HELD_ITEM", + "BATTLE_EFFECT_PREVENT_ESCAPE", + "BATTLE_EFFECT_STATUS_NIGHTMARE", + "BATTLE_EFFECT_EVA_UP_2_MINIMIZE", + "BATTLE_EFFECT_CURSE", + "BATTLE_EFFECT_UNUSED_110", + "BATTLE_EFFECT_PROTECT", + "BATTLE_EFFECT_SET_SPIKES", + "BATTLE_EFFECT_IGNORE_EVASION_REMOVE_GHOST_IMMUNE", + "BATTLE_EFFECT_ALL_FAINT_3_TURNS", + "BATTLE_EFFECT_WEATHER_SANDSTORM", + "BATTLE_EFFECT_SURVIVE_WITH_1_HP", + "BATTLE_EFFECT_DOUBLE_POWER_EACH_TURN_LOCK_INTO", + "BATTLE_EFFECT_ATK_UP_2_STATUS_CONFUSION", + "BATTLE_EFFECT_DOUBLE_POWER_EACH_TURN", + "BATTLE_EFFECT_INFATUATE", + "BATTLE_EFFECT_POWER_BASED_ON_FRIENDSHIP", + "BATTLE_EFFECT_RANDOM_POWER_MAYBE_HEAL", + "BATTLE_EFFECT_POWER_BASED_ON_LOW_FRIENDSHIP", + "BATTLE_EFFECT_PREVENT_STATUS", + "BATTLE_EFFECT_THAW_AND_BURN_HIT", + "BATTLE_EFFECT_RANDOM_POWER_10_CASES", + "BATTLE_EFFECT_PASS_STATS_AND_STATUS", + "BATTLE_EFFECT_HIT_BEFORE_SWITCH", + "BATTLE_EFFECT_REMOVE_HAZARDS_AND_BINDING", + "BATTLE_EFFECT_10_DAMAGE_FLAT", + "BATTLE_EFFECT_UNUSED_131", + "BATTLE_EFFECT_HEAL_HALF_MORE_IN_SUN", + "BATTLE_EFFECT_UNUSED_133", + "BATTLE_EFFECT_UNUSED_134", + "BATTLE_EFFECT_RANDOM_POWER_BASED_ON_IVS", + "BATTLE_EFFECT_WEATHER_RAIN", + "BATTLE_EFFECT_WEATHER_SUN", + "BATTLE_EFFECT_RAISE_DEF_HIT", + "BATTLE_EFFECT_RAISE_ATTACK_HIT", + "BATTLE_EFFECT_RAISE_ALL_STATS_HIT", + "BATTLE_EFFECT_UNUSED_141", + "BATTLE_EFFECT_MAX_ATK_LOSE_HALF_MAX_HP", + "BATTLE_EFFECT_COPY_STAT_CHANGES", + "BATTLE_EFFECT_MIRROR_COAT", + "BATTLE_EFFECT_CHARGE_TURN_DEF_UP", + "BATTLE_EFFECT_FLINCH_DOUBLE_DAMAGE_FLY_OR_BOUNCE", + "BATTLE_EFFECT_DOUBLE_DAMAGE_DIG", + "BATTLE_EFFECT_HIT_IN_3_TURNS", + "BATTLE_EFFECT_DOUBLE_DAMAGE_FLY_OR_BOUNCE", + "BATTLE_EFFECT_FLINCH_MINIMIZE_DOUBLE_HIT", + "BATTLE_EFFECT_SKIP_CHARGE_TURN_IN_SUN", + "BATTLE_EFFECT_THUNDER", + "BATTLE_EFFECT_FLEE_FROM_WILD_BATTLE", + "BATTLE_EFFECT_BEAT_UP", + "BATTLE_EFFECT_FLY", + "BATTLE_EFFECT_DEF_UP_DOUBLE_ROLLOUT_POWER", + "BATTLE_EFFECT_UNUSED_157", + "BATTLE_EFFECT_ALWAYS_FLINCH_FIRST_TURN_ONLY", + "BATTLE_EFFECT_UPROAR", + "BATTLE_EFFECT_STOCKPILE", + "BATTLE_EFFECT_SPIT_UP", + "BATTLE_EFFECT_SWALLOW", + "BATTLE_EFFECT_UNUSED_163", + "BATTLE_EFFECT_WEATHER_HAIL", + "BATTLE_EFFECT_TORMENT", + "BATTLE_EFFECT_SP_ATK_UP_CAUSE_CONFUSION", + "BATTLE_EFFECT_STATUS_BURN", + "BATTLE_EFFECT_FAINT_AND_ATK_SP_ATK_DOWN_2", + "BATTLE_EFFECT_DOUBLE_POWER_WHEN_STATUSED", + "BATTLE_EFFECT_HIT_LAST_WHIFF_IF_HIT", + "BATTLE_EFFECT_DOUBLE_POWER_AND_CURE_PARALYSIS", + "BATTLE_EFFECT_MAKE_GLOBAL_TARGET", + "BATTLE_EFFECT_NATURE_POWER", + "BATTLE_EFFECT_SP_DEF_UP_DOUBLE_ELECTRIC_POWER", + "BATTLE_EFFECT_TAUNT", + "BATTLE_EFFECT_BOOST_ALLY_POWER_BY_50_PERCENT", + "BATTLE_EFFECT_SWITCH_HELD_ITEMS", + "BATTLE_EFFECT_COPY_ABILITY", + "BATTLE_EFFECT_HEAL_IN_3_TURNS", + "BATTLE_EFFECT_USE_RANDOM_ALLY_MOVE", + "BATTLE_EFFECT_GROUND_TRAP_USER_CONTINUOUS_HEAL", + "BATTLE_EFFECT_LOWER_OWN_ATK_AND_DEF", + "BATTLE_EFFECT_APPLY_MAGIC_COAT", + "BATTLE_EFFECT_RECYCLE", + "BATTLE_EFFECT_DOUBLE_POWER_IF_HIT", + "BATTLE_EFFECT_REMOVE_SCREENS", + "BATTLE_EFFECT_STATUS_SLEEP_NEXT_TURN", + "BATTLE_EFFECT_REMOVE_HELD_ITEM", + "BATTLE_EFFECT_SET_HP_EQUAL_TO_USER", + "BATTLE_EFFECT_DECREASE_POWER_WITH_LESS_USER_HP", + "BATTLE_EFFECT_SWITCH_ABILITIES", + "BATTLE_EFFECT_MAKE_SHARED_MOVES_UNUSEABLE", + "BATTLE_EFFECT_HEAL_STATUS", + "BATTLE_EFFECT_REMOVE_ALL_PP_ON_DEFEAT", + "BATTLE_EFFECT_STEAL_STATUS_MOVE", + "BATTLE_EFFECT_INCREASE_POWER_WITH_WEIGHT", + "BATTLE_EFFECT_SECRET_POWER", + "BATTLE_EFFECT_RECOIL_THIRD", + "BATTLE_EFFECT_CONFUSE_ALL", + "BATTLE_EFFECT_HIGH_CRITICAL_BURN_HIT", + "BATTLE_EFFECT_HALVE_ELECTRIC_DAMAGE", + "BATTLE_EFFECT_BADLY_POISON_HIT", + "BATTLE_EFFECT_CHANGE_TYPE_WITH_WEATHER", + "BATTLE_EFFECT_USER_SP_ATK_DOWN_2", + "BATTLE_EFFECT_ATK_DEF_DOWN", + "BATTLE_EFFECT_DEF_SPD_UP", + "BATTLE_EFFECT_HIT_FLY", + "BATTLE_EFFECT_ATK_DEF_UP", + "BATTLE_EFFECT_HIGH_CRITICAL_POISON_HIT", + "BATTLE_EFFECT_HALVE_FIRE_DAMAGE", + "BATTLE_EFFECT_SP_ATK_SP_DEF_UP", + "BATTLE_EFFECT_ATK_SPD_UP", + "BATTLE_EFFECT_CAMOUFLAGE", + "BATTLE_EFFECT_HEAL_HALF_REMOVE_FLYING_TYPE", + "BATTLE_EFFECT_GRAVITY", + "BATTLE_EFFECT_IGNORE_EVATION_REMOVE_DARK_IMMUNE", + "BATTLE_EFFECT_DOUBLE_POWER_HEAL_SLEEP", + "BATTLE_EFFECT_SPEED_DOWN_HIT", + "BATTLE_EFFECT_POWER_BASED_ON_LOW_SPEED", + "BATTLE_EFFECT_FAINT_AND_FULL_HEAL_NEXT_MON", + "BATTLE_EFFECT_DOUBLE_POWER_WHEN_BELOW_HALF", + "BATTLE_EFFECT_NATURAL_GIFT", + "BATTLE_EFFECT_REMOVE_PROTECT", + "BATTLE_EFFECT_EAT_BERRY", + "BATTLE_EFFECT_DOUBLE_SPEED_3_TURNS", + "BATTLE_EFFECT_RANDOM_STAT_UP_2", + "BATTLE_EFFECT_METAL_BURST", + "BATTLE_EFFECT_SWITCH_HIT", + "BATTLE_EFFECT_DEF_SPD_DOWN_HIT", + "BATTLE_EFFECT_DOUBLE_POWER_IF_MOVING_SECOND", + "BATTLE_EFFECT_DOUBLE_POWER_IF_TARGET_HIT", + "BATTLE_EFFECT_PREVENT_ITEM_USE", + "BATTLE_EFFECT_FLING", + "BATTLE_EFFECT_TRANSFER_STATUS", + "BATTLE_EFFECT_HIGHER_POWER_WHEN_LOW_PP", + "BATTLE_EFFECT_PREVENT_HEALING", + "BATTLE_EFFECT_INCREASE_POWER_WITH_MORE_HP", + "BATTLE_EFFECT_SWAP_ATK_DEF", + "BATTLE_EFFECT_SUPRESS_ABILITY", + "BATTLE_EFFECT_PREVENT_CRITS", + "BATTLE_EFFECT_USE_MOVE_FIRST", + "BATTLE_EFFECT_USE_LAST_USED_MOVE", + "BATTLE_EFFECT_SWAP_ATK_SP_ATK_STAT_CHANGES", + "BATTLE_EFFECT_SWAP_DEF_SP_DEF_STAT_CHANGES", + "BATTLE_EFFECT_INCREASE_POWER_WITH_MORE_STAT_UP", + "BATTLE_EFFECT_FAIL_IF_NOT_USED_ALL_OTHER_MOVES", + "BATTLE_EFFECT_SET_ABILITY_TO_INSOMNIA", + "BATTLE_EFFECT_HIT_FIRST_IF_TARGET_ATTACKING", + "BATTLE_EFFECT_TOXIC_SPIKES", + "BATTLE_EFFECT_SWAP_STAT_CHANGES", + "BATTLE_EFFECT_RESTORE_HP_EVERY_TURN", + "BATTLE_EFFECT_GIVE_GROUND_IMMUNITY", + "BATTLE_EFFECT_RECOIL_BURN_HIT", + "BATTLE_EFFECT_STRUGGLE", + "BATTLE_EFFECT_DIVE", + "BATTLE_EFFECT_DIG", + "BATTLE_EFFECT_DOUBLE_DAMAGE_DIVE", + "BATTLE_EFFECT_REMOVE_HAZARDS_SCREENS_EVA_DOWN", + "BATTLE_EFFECT_TRICK_ROOM", + "BATTLE_EFFECT_BLIZZARD", + "BATTLE_EFFECT_WHIRLPOOL", + "BATTLE_EFFECT_RECOIL_PARALYZE_HIT", + "BATTLE_EFFECT_BOUNCE", + "BATTLE_EFFECT_UNUSED_264", + "BATTLE_EFFECT_SP_ATK_DOWN_2_OPPOSITE_GENDER", + "BATTLE_EFFECT_STEALTH_ROCK", + "BATTLE_EFFECT_CHATTER", + "BATTLE_EFFECT_JUDGEMENT", + "BATTLE_EFFECT_RECOIL_HALF", + "BATTLE_EFFECT_FAINT_FULL_RESTORE_NEXT_MON", + "BATTLE_EFFECT_LOWER_SP_DEF_2_HIT", + "BATTLE_EFFECT_SHADOW_FORCE", + "BATTLE_EFFECT_FLINCH_BURN_HIT", + "BATTLE_EFFECT_FLINCH_FREEZE_HIT", + "BATTLE_EFFECT_FLINCH_PARALYZE_HIT", + "BATTLE_EFFECT_RAISE_SP_ATK_HIT" + ] + }, + "@MessageTag": { + "type": "enum", + "values": [ + "TAG_NONE", + "TAG_NONE_SIDE_CONSCIOUS", + "TAG_NICKNAME", + "TAG_MOVE", + "TAG_STAT", + "TAG_ITEM", + "TAG_NUMBER", + "TAG_NUMBERS", + "TAG_TRNAME", + "TAG_NICKNAME_NICKNAME", + "TAG_NICKNAME_MOVE", + "TAG_NICKNAME_ABILITY", + "TAG_NICKNAME_STAT", + "TAG_NICKNAME_TYPE", + "TAG_NICKNAME_POKE", + "TAG_NICKNAME_ITEM", + "TAG_NICKNAME_POFFIN", + "TAG_NICKNAME_NUM", + "TAG_NICKNAME_TRNAME", + "TAG_NICKNAME_BOX", + "TAG_MOVE_SIDE", + "TAG_MOVE_NICKNAME", + "TAG_MOVE_MOVE", + "TAG_ABILITY_NICKNAME", + "TAG_ITEM_MOVE", + "TAG_NUMBER_NUMBER", + "TAG_TRNAME_TRNAME", + "TAG_TRNAME_NICKNAME", + "TAG_TRNAME_ITEM", + "TAG_TRNAME_NUM", + "TAG_TRCLASS_TRNAME", + "TAG_NICKNAME_NICKNAME_MOVE", + "TAG_NICKNAME_NICKNAME_ABILITY", + "TAG_NICKNAME_NICKNAME_ITEM", + "TAG_NICKNAME_MOVE_MOVE", + "TAG_NICKNAME_MOVE_NUMBER", + "TAG_NICKNAME_ABILITY_NICKNAME", + "TAG_NICKNAME_ABILITY_MOVE", + "TAG_NICKNAME_ABILITY_ITEM", + "TAG_NICKNAME_ABILITY_STAT", + "TAG_NICKNAME_ABILITY_TYPE", + "TAG_NICKNAME_ABILITY_STATUS", + "TAG_NICKNAME_ABILITY_NUMBER", + "TAG_NICKNAME_ITEM_NICKNAME", + "TAG_NICKNAME_ITEM_MOVE", + "TAG_NICKNAME_ITEM_STAT", + "TAG_NICKNAME_ITEM_STATUS", + "TAG_NICKNAME_BOX_BOX", + "TAG_ITEM_NICKNAME_FLAVOR", + "TAG_TRNAME_NICKNAME_NICKNAME", + "TAG_TRCLASS_TRNAME_NICKNAME", + "TAG_TRCLASS_TRNAME_ITEM", + "TAG_NICKNAME_ABILITY_NICKNAME_MOVE", + "TAG_NICKNAME_ABILITY_NICKNAME_ABILITY", + "TAG_NICKNAME_ABILITY_NICKNAME_STAT", + "TAG_NICKNAME_ITEM_NICKNAME_ITEM", + "TAG_TRNAME_NICKNAME_TRNAME_NICKNAME", + "TAG_TRCLASS_TRNAME_NICKNAME_NICKNAME", + "TAG_TRCLASS_TRNAME_NICKNAME_TRNAME", + "TAG_TRCLASS_TRNAME_TRCLASS_TRNAME", + "TAG_TRCLASS_TRNAME_NICKNAME_TRCLASS_TRNAME_NICKNAME" + ] + }, + "@MoveSubscriptPointer": { + "type": "enum", + "values": [ + "MOVE_SUBSCRIPT_PTR_NONE", + "MOVE_SUBSCRIPT_PTR_SLEEP", + "MOVE_SUBSCRIPT_PTR_POISON", + "MOVE_SUBSCRIPT_PTR_BURN", + "MOVE_SUBSCRIPT_PTR_FREEZE", + "MOVE_SUBSCRIPT_PTR_PARALYZE", + "MOVE_SUBSCRIPT_PTR_BADLY_POISON", + "MOVE_SUBSCRIPT_PTR_CONFUSE", + "MOVE_SUBSCRIPT_PTR_FLINCH", + "MOVE_SUBSCRIPT_PTR_REST", + "MOVE_SUBSCRIPT_PTR_UPROAR", + "MOVE_SUBSCRIPT_PTR_PAY_DAY", + "MOVE_SUBSCRIPT_PTR_VANISH_CHARGE_TURN", + "MOVE_SUBSCRIPT_PTR_BIND_TARGET", + "MOVE_SUBSCRIPT_PTR_QUARTER_RECOIL", + "MOVE_SUBSCRIPT_PTR_ATTACK_UP_1_STAGE", + "MOVE_SUBSCRIPT_PTR_DEFENSE_UP_1_STAGE", + "MOVE_SUBSCRIPT_PTR_SPEED_UP_1_STAGE", + "MOVE_SUBSCRIPT_PTR_SP_ATTACK_UP_1_STAGE", + "MOVE_SUBSCRIPT_PTR_SP_DEFENSE_UP_1_STAGE", + "MOVE_SUBSCRIPT_PTR_ACCURACY_UP_1_STAGE", + "MOVE_SUBSCRIPT_PTR_EVASION_UP_1_STAGE", + "MOVE_SUBSCRIPT_PTR_ATTACK_DOWN_1_STAGE", + "MOVE_SUBSCRIPT_PTR_DEFENSE_DOWN_1_STAGE", + "MOVE_SUBSCRIPT_PTR_SPEED_DOWN_1_STAGE", + "MOVE_SUBSCRIPT_PTR_SP_ATTACK_DOWN_1_STAGE", + "MOVE_SUBSCRIPT_PTR_SP_DEFENSE_DOWN_1_STAGE", + "MOVE_SUBSCRIPT_PTR_ACCURACY_DOWN_1_STAGE", + "MOVE_SUBSCRIPT_PTR_EVASION_DOWN_1_STAGE", + "MOVE_SUBSCRIPT_PTR_RECHARGE_TURN", + "MOVE_SUBSCRIPT_PTR_SET_RAGE_FLAG", + "MOVE_SUBSCRIPT_PTR_STEAL_ITEM", + "MOVE_SUBSCRIPT_PTR_MEAN_LOOK", + "MOVE_SUBSCRIPT_PTR_NIGHTMARE_START", + "MOVE_SUBSCRIPT_PTR_BOOST_ALL_STATS", + "MOVE_SUBSCRIPT_PTR_RAPID_SPIN", + "MOVE_SUBSCRIPT_PTR_HEAL_TARGET_PARALYSIS", + "MOVE_SUBSCRIPT_PTR_USER_ATK_AND_DEF_DOWN_1_STAGE", + "MOVE_SUBSCRIPT_PTR_RECOIL_1_3", + "MOVE_SUBSCRIPT_PTR_ATTACK_UP_2_STAGES", + "MOVE_SUBSCRIPT_PTR_DEFENSE_UP_2_STAGES", + "MOVE_SUBSCRIPT_PTR_SPEED_UP_2_STAGES", + "MOVE_SUBSCRIPT_PTR_SP_ATTACK_UP_2_STAGES", + "MOVE_SUBSCRIPT_PTR_SP_DEFENSE_UP_2_STAGES", + "MOVE_SUBSCRIPT_PTR_ACCURACY_UP_2_STAGES", + "MOVE_SUBSCRIPT_PTR_EVASION_UP_2_STAGES", + "MOVE_SUBSCRIPT_PTR_ATTACK_DOWN_2_STAGES", + "MOVE_SUBSCRIPT_PTR_DEFENSE_DOWN_2_STAGES", + "MOVE_SUBSCRIPT_PTR_SPEED_DOWN_2_STAGES", + "MOVE_SUBSCRIPT_PTR_SP_ATTACK_DOWN_2_STAGES", + "MOVE_SUBSCRIPT_PTR_SP_DEFENSE_DOWN_2_STAGES", + "MOVE_SUBSCRIPT_PTR_ACCURACY_DOWN_2_STAGES", + "MOVE_SUBSCRIPT_PTR_EVASION_DOWN_2_STAGES", + "MOVE_SUBSCRIPT_PTR_THRASH", + "MOVE_SUBSCRIPT_PTR_KNOCK_OFF", + "MOVE_SUBSCRIPT_PTR_USER_DEF_AND_SPDEF_UP_1_STAGE", + "MOVE_SUBSCRIPT_PTR_USER_ATK_AND_DEF_UP_1_STAGE", + "MOVE_SUBSCRIPT_PTR_TARGET_ATK_AND_DEF_DOWN_1_STAGE", + "MOVE_SUBSCRIPT_PTR_USER_SPATK_AND_SPDEF_UP_1_STAGE", + "MOVE_SUBSCRIPT_PTR_USER_ATK_AND_SPEED_UP_1_STAGE", + "MOVE_SUBSCRIPT_PTR_DRAIN_HALF_DAMAGE_DEALT", + "MOVE_SUBSCRIPT_PTR_DREAM_EATER", + "MOVE_SUBSCRIPT_PTR_RESET_ALL_STAT_STAGES", + "MOVE_SUBSCRIPT_PTR_BIDE_START", + "MOVE_SUBSCRIPT_PTR_STRUGGLE", + "MOVE_SUBSCRIPT_PTR_CONVERSION", + "MOVE_SUBSCRIPT_PTR_RECOVER_HALF_MAX_HP", + "MOVE_SUBSCRIPT_PTR_LIGHT_SCREEN", + "MOVE_SUBSCRIPT_PTR_REFLECT", + "MOVE_SUBSCRIPT_PTR_MIST", + "MOVE_SUBSCRIPT_PTR_FOCUS_ENERGY", + "MOVE_SUBSCRIPT_PTR_MIMIC", + "MOVE_SUBSCRIPT_PTR_LEECH_SEED_START", + "MOVE_SUBSCRIPT_PTR_DISABLE_START", + "MOVE_SUBSCRIPT_PTR_ENCORE_START", + "MOVE_SUBSCRIPT_PTR_PAIN_SPLIT", + "MOVE_SUBSCRIPT_PTR_CONVERSION_2", + "MOVE_SUBSCRIPT_PTR_LOCK_ON", + "MOVE_SUBSCRIPT_PTR_SKETCH", + "MOVE_SUBSCRIPT_PTR_FEINT", + "MOVE_SUBSCRIPT_PTR_DESTINY_BOND", + "MOVE_SUBSCRIPT_PTR_REDUCE_TARGET_PP", + "MOVE_SUBSCRIPT_PTR_PROTECT", + "MOVE_SUBSCRIPT_PTR_HEAL_BELL", + "MOVE_SUBSCRIPT_PTR_TRY_SUBSTITUTE", + "MOVE_SUBSCRIPT_PTR_FORCE_TARGET_TO_SWITCH_OR_FLEE", + "MOVE_SUBSCRIPT_PTR_TRANSFORM_INTO_TARGET", + "MOVE_SUBSCRIPT_PTR_MINIMIZE", + "MOVE_SUBSCRIPT_PTR_CURSE_NORMAL", + "MOVE_SUBSCRIPT_PTR_CURSE_GHOST", + "MOVE_SUBSCRIPT_PTR_PRINT_MESSAGE_AND_PLAY_ANIMATION", + "MOVE_SUBSCRIPT_PTR_FORESIGHT", + "MOVE_SUBSCRIPT_PTR_PERISH_SONG_START", + "MOVE_SUBSCRIPT_PTR_WEATHER_START", + "MOVE_SUBSCRIPT_PTR_SWAGGER", + "MOVE_SUBSCRIPT_PTR_INFATUATE", + "MOVE_SUBSCRIPT_PTR_SAFEGUARD_START", + "MOVE_SUBSCRIPT_PTR_PRESENT_HEAL", + "MOVE_SUBSCRIPT_PTR_MAGNITUDE", + "MOVE_SUBSCRIPT_PTR_BATON_PASS", + "MOVE_SUBSCRIPT_PTR_BELLY_DRUM", + "MOVE_SUBSCRIPT_PTR_TELEPORT", + "MOVE_SUBSCRIPT_PTR_FUTURE_SIGHT_START", + "MOVE_SUBSCRIPT_PTR_STOCKPILE", + "MOVE_SUBSCRIPT_PTR_SWALLOW", + "MOVE_SUBSCRIPT_PTR_TORMENT_START", + "MOVE_SUBSCRIPT_PTR_FLATTER", + "MOVE_SUBSCRIPT_PTR_MEMENTO", + "MOVE_SUBSCRIPT_PTR_CHARGE", + "MOVE_SUBSCRIPT_PTR_TAUNT_START", + "MOVE_SUBSCRIPT_PTR_EXCHANGE_ITEMS", + "MOVE_SUBSCRIPT_PTR_COPY_ABILITY", + "MOVE_SUBSCRIPT_PTR_BREAK_SCREENS", + "MOVE_SUBSCRIPT_PTR_YAWN", + "MOVE_SUBSCRIPT_PTR_EXCHANGE_ABILITIES", + "MOVE_SUBSCRIPT_PTR_RECOVER_PSN_PRZ_BRN", + "MOVE_SUBSCRIPT_PTR_ROOST", + "MOVE_SUBSCRIPT_PTR_HEAL_TARGET_SLEEP", + "MOVE_SUBSCRIPT_PTR_GRAVITY_START", + "MOVE_SUBSCRIPT_PTR_MIRACLE_EYE", + "MOVE_SUBSCRIPT_PTR_HEALING_WISH", + "MOVE_SUBSCRIPT_PTR_TAILWIND_START", + "MOVE_SUBSCRIPT_PTR_USER_DEF_AND_SPDEF_DOWN_1_STAGE", + "MOVE_SUBSCRIPT_PTR_USER_SWAP_ATK_AND_DEF", + "MOVE_SUBSCRIPT_PTR_SUPPRESS_TARGET_ABILITY", + "MOVE_SUBSCRIPT_PTR_LUCKY_CHANT_START", + "MOVE_SUBSCRIPT_PTR_EXCHANGE_ATK_AND_SPATK_STAGES", + "MOVE_SUBSCRIPT_PTR_EXCHANGE_DEF_AND_SPDEF_STAGES", + "MOVE_SUBSCRIPT_PTR_GIVE_TARGET_INSOMNIA", + "MOVE_SUBSCRIPT_PTR_EXCHANGE_ALL_STAT_STAGES", + "MOVE_SUBSCRIPT_PTR_RECOIL_1_3_CHANCE_TO_BURN", + "MOVE_SUBSCRIPT_PTR_DEFOG", + "MOVE_SUBSCRIPT_PTR_HEAL_BLOCK_START", + "MOVE_SUBSCRIPT_PTR_ATTACK_THEN_SWITCH_OUT", + "MOVE_SUBSCRIPT_PTR_EMBARGO_START", + "MOVE_SUBSCRIPT_PTR_PLUCK", + "MOVE_SUBSCRIPT_PTR_FLING", + "MOVE_SUBSCRIPT_PTR_RECOIL_1_3_CHANCE_TO_PARALYZE", + "MOVE_SUBSCRIPT_PTR_RECOIL_1_2", + "MOVE_SUBSCRIPT_PTR_BURN_OR_FLINCH", + "MOVE_SUBSCRIPT_PTR_FREEZE_OR_FLINCH", + "MOVE_SUBSCRIPT_PTR_PARALYZE_OR_FLINCH", + "MOVE_SUBSCRIPT_PTR_CHATTER", + "MOVE_SUBSCRIPT_PTR_LUNAR_DANCE", + "MOVE_SUBSCRIPT_PTR_GIVE_TARGET_OWN_STATUS" + ] + }, + "@SideEffectType": { + "type": "enum", + "values": [ + "SIDE_EFFECT_TYPE_NONE", + "SIDE_EFFECT_TYPE_DIRECT", + "SIDE_EFFECT_TYPE_INDIRECT", + "SIDE_EFFECT_TYPE_ABILITY", + "SIDE_EFFECT_TYPE_MOVE_EFFECT", + "SIDE_EFFECT_TYPE_HELD_ITEM", + "SIDE_EFFECT_TYPE_TOXIC_SPIKES", + "SIDE_EFFECT_TYPE_DISOBEDIENCE" + ] + }, + "@Terrain": { + "type": "enum", + "values": [ + "TERRAIN_PLAIN", + "TERRAIN_SAND", + "TERRAIN_GRASS", + "TERRAIN_PUDDLE", + "TERRAIN_MOUNTAIN", + "TERRAIN_CAVE", + "TERRAIN_SNOW", + "TERRAIN_WATER", + "TERRAIN_ICE", + "TERRAIN_BUILDING", + "TERRAIN_GREAT_MARSH", + "TERRAIN_BRIDGE", + "TERRAIN_AARON", + "TERRAIN_BERTHA", + "TERRAIN_FLINT", + "TERRAIN_LUCIAN", + "TERRAIN_CYNTHIA", + "TERRAIN_DISTORTION_WORLD", + "TERRAIN_BATTLE_TOWER", + "TERRAIN_BATTLE_FACTORY", + "TERRAIN_BATTLE_ARCADE", + "TERRAIN_BATTLE_CASTLE", + "TERRAIN_BATTLE_HALL", + "TERRAIN_GIRATINA", + "TERRAIN_MAX" + ] + } + } +} \ No newline at end of file diff --git a/consts/meson.build b/consts/meson.build new file mode 100644 index 0000000000..443966e991 --- /dev/null +++ b/consts/meson.build @@ -0,0 +1,22 @@ +consts_manifests = files( + 'battle.json' +) + +gen_consts_includes = include_directories('.') + +gen_consts_root = meson.current_build_dir() / 'generated' +gen_c_consts_root = gen_consts_root / 'c' +gen_asm_consts_root = gen_consts_root / 'asm' + +generated_c_consts = custom_target('gen_c_consts', + build_by_default: true, + capture: true, + output: 'gen_c_consts', + input: consts_manifests, + command: [ + constgen_py, + '-f', '@INPUT@', + '-r', gen_c_consts_root, + '-l', 'c' + ] +) diff --git a/include/constants/battle.h b/include/constants/battle.h index a1ab30217d..da8eeff85c 100644 --- a/include/constants/battle.h +++ b/include/constants/battle.h @@ -1,7 +1,6 @@ #ifndef POKEPLATINUM_CONSTANTS_BATTLE_H #define POKEPLATINUM_CONSTANTS_BATTLE_H -#include "constants/battle/battle_effects.h" #include "constants/battle/condition.h" #include "constants/battle/message_tags.h" #include "constants/battle/moves.h" @@ -11,6 +10,8 @@ #include "constants/battle/terrain.h" #include "constants/battle/turn_flags.h" +#include "consts/generated/c/battle.h" + #define BATTLE_TYPE_SINGLES (0 << 0) #define BATTLE_TYPE_WILD_MON (0 << 0) #define BATTLE_TYPE_TRAINER (1 << 0) diff --git a/include/constants/battle/battle_effects.h b/include/constants/battle/battle_effects.h deleted file mode 100644 index a4310b1bf2..0000000000 --- a/include/constants/battle/battle_effects.h +++ /dev/null @@ -1,284 +0,0 @@ -#ifndef POKEPLATINUM_CONSTANTS_BATTLE_EFFECTS_H -#define POKEPLATINUM_CONSTANTS_BATTLE_EFFECTS_H - -enum { - BATTLE_EFFECT_HIT = 0, - BATTLE_EFFECT_STATUS_SLEEP, - BATTLE_EFFECT_POISON_HIT, - BATTLE_EFFECT_RECOVER_HALF_DAMAGE_DEALT, - BATTLE_EFFECT_BURN_HIT, - BATTLE_EFFECT_FREEZE_HIT, - BATTLE_EFFECT_PARALYZE_HIT, - BATTLE_EFFECT_HALVE_DEFENSE, - BATTLE_EFFECT_RECOVER_DAMAGE_SLEEP, - BATTLE_EFFECT_COPY_MOVE, - BATTLE_EFFECT_ATK_UP, - BATTLE_EFFECT_DEF_UP, - BATTLE_EFFECT_SPEED_UP, - BATTLE_EFFECT_SP_ATK_UP, - BATTLE_EFFECT_SP_DEF_UP, - BATTLE_EFFECT_ACC_UP, - BATTLE_EFFECT_EVA_UP, - BATTLE_EFFECT_BYPASS_ACCURACY, - BATTLE_EFFECT_ATK_DOWN, - BATTLE_EFFECT_DEF_DOWN, - BATTLE_EFFECT_SPEED_DOWN, - BATTLE_EFFECT_SP_ATK_DOWN, - BATTLE_EFFECT_SP_DEF_DOWN, - BATTLE_EFFECT_ACC_DOWN, - BATTLE_EFFECT_EVA_DOWN, - BATTLE_EFFECT_RESET_STAT_CHANGES, - BATTLE_EFFECT_BIDE, - BATTLE_EFFECT_CONTINUE_AND_CONFUSE_SELF, - BATTLE_EFFECT_FORCE_SWITCH, - BATTLE_EFFECT_MULTI_HIT, - BATTLE_EFFECT_CONVERSION, - BATTLE_EFFECT_FLINCH_HIT, - BATTLE_EFFECT_RESTORE_HALF_HP, - BATTLE_EFFECT_STATUS_BADLY_POISON, - BATTLE_EFFECT_INCREASE_PRIZE_MONEY, - BATTLE_EFFECT_SET_LIGHT_SCREEN, - BATTLE_EFFECT_TRI_ATTACK, - BATTLE_EFFECT_REST, - BATTLE_EFFECT_ONE_HIT_KO, - BATTLE_EFFECT_CHARGE_TURN_HIGH_CRIT, - BATTLE_EFFECT_HALVE_HP, - BATTLE_EFFECT_40_DAMAGE_FLAT, - BATTLE_EFFECT_BIND_HIT, - BATTLE_EFFECT_HIGH_CRITICAL, - BATTLE_EFFECT_HIT_TWICE, - BATTLE_EFFECT_CRASH_ON_MISS, - BATTLE_EFFECT_PREVENT_STAT_REDUCTION, - BATTLE_EFFECT_CRIT_UP_2, - BATTLE_EFFECT_RECOIL_QUARTER, - BATTLE_EFFECT_STATUS_CONFUSE, - BATTLE_EFFECT_ATK_UP_2, - BATTLE_EFFECT_DEF_UP_2, - BATTLE_EFFECT_SPEED_UP_2, - BATTLE_EFFECT_SP_ATK_UP_2, - BATTLE_EFFECT_SP_DEF_UP_2, - BATTLE_EFFECT_ACC_UP_2, - BATTLE_EFFECT_EVA_UP_2, - BATTLE_EFFECT_TRANSFORM, - BATTLE_EFFECT_ATK_DOWN_2, - BATTLE_EFFECT_DEF_DOWN_2, - BATTLE_EFFECT_SPEED_DOWN_2, - BATTLE_EFFECT_SP_ATK_DOWN_2, - BATTLE_EFFECT_SP_DEF_DOWN_2, - BATTLE_EFFECT_EVA_DOWN_2, - BATTLE_EFFECT_ACC_DOWN_2, - BATTLE_EFFECT_SET_REFLECT, - BATTLE_EFFECT_STATUS_POISON, - BATTLE_EFFECT_STATUS_PARALYZE, - BATTLE_EFFECT_LOWER_ATTACK_HIT, - BATTLE_EFFECT_LOWER_DEFENSE_HIT, - BATTLE_EFFECT_LOWER_SPEED_HIT, - BATTLE_EFFECT_LOWER_SP_ATK_HIT, - BATTLE_EFFECT_LOWER_SP_DEF_HIT, - BATTLE_EFFECT_LOWER_ACCURACY_HIT, - BATTLE_EFFECT_LOWER_EVASION_HIT, - BATTLE_EFFECT_CHARGE_TURN_HIGH_CRIT_FLINCH, - BATTLE_EFFECT_CONFUSE_HIT, - BATTLE_EFFECT_POISON_MULTI_HIT, - BATTLE_EFFECT_PRIORITY_NEG_1_BYPASS_ACCURACY, - BATTLE_EFFECT_SET_SUBSTITUTE, - BATTLE_EFFECT_RECHARGE_AFTER, - BATTLE_EFFECT_RAISE_ATK_WHEN_HIT, - BATTLE_EFFECT_COPY_MOVE_FOR_BATTLE, - BATTLE_EFFECT_CALL_RANDOM_MOVE, - BATTLE_EFFECT_STATUS_LEECH_SEED, - BATTLE_EFFECT_DO_NOTHING, - BATTLE_EFFECT_DISABLE, - BATTLE_EFFECT_LEVEL_DAMAGE_FLAT, - BATTLE_EFFECT_RANDOM_DAMAGE_1_TO_150_LEVEL, - BATTLE_EFFECT_COUNTER, - BATTLE_EFFECT_ENCORE, - BATTLE_EFFECT_AVERAGE_HP, - BATTLE_EFFECT_DAMAGE_WHILE_ASLEEP, - BATTLE_EFFECT_CONVERSION2, - BATTLE_EFFECT_NEXT_ATTACK_ALWAYS_HITS, - BATTLE_EFFECT_LEARN_MOVE_PERMANENT, - BATTLE_EFFECT_UNUSED_96, - BATTLE_EFFECT_USE_RANDOM_LEARNED_MOVE_SLEEP, - BATTLE_EFFECT_KO_MON_THAT_DEFEATED_USER, - BATTLE_EFFECT_INCREASE_POWER_WITH_LESS_HP, - BATTLE_EFFECT_DECREASE_LAST_MOVE_PP, - BATTLE_EFFECT_LEAVE_WITH_1_HP, - BATTLE_EFFECT_CURE_PARTY_STATUS, - BATTLE_EFFECT_PRIORITY_1, - BATTLE_EFFECT_HIT_THREE_TIMES, - BATTLE_EFFECT_STEAL_HELD_ITEM, - BATTLE_EFFECT_PREVENT_ESCAPE, - BATTLE_EFFECT_STATUS_NIGHTMARE, - BATTLE_EFFECT_EVA_UP_2_MINIMIZE, - BATTLE_EFFECT_CURSE, - BATTLE_EFFECT_UNUSED_110, - BATTLE_EFFECT_PROTECT, - BATTLE_EFFECT_SET_SPIKES, - BATTLE_EFFECT_IGNORE_EVASION_REMOVE_GHOST_IMMUNE, - BATTLE_EFFECT_ALL_FAINT_3_TURNS, - BATTLE_EFFECT_WEATHER_SANDSTORM, - BATTLE_EFFECT_SURVIVE_WITH_1_HP, - BATTLE_EFFECT_DOUBLE_POWER_EACH_TURN_LOCK_INTO, - BATTLE_EFFECT_ATK_UP_2_STATUS_CONFUSION, - BATTLE_EFFECT_DOUBLE_POWER_EACH_TURN, - BATTLE_EFFECT_INFATUATE, - BATTLE_EFFECT_POWER_BASED_ON_FRIENDSHIP, - BATTLE_EFFECT_RANDOM_POWER_MAYBE_HEAL, - BATTLE_EFFECT_POWER_BASED_ON_LOW_FRIENDSHIP, - BATTLE_EFFECT_PREVENT_STATUS, - BATTLE_EFFECT_THAW_AND_BURN_HIT, - BATTLE_EFFECT_RANDOM_POWER_10_CASES, - BATTLE_EFFECT_PASS_STATS_AND_STATUS, - BATTLE_EFFECT_HIT_BEFORE_SWITCH, - BATTLE_EFFECT_REMOVE_HAZARDS_AND_BINDING, - BATTLE_EFFECT_10_DAMAGE_FLAT, - BATTLE_EFFECT_UNUSED_131, - BATTLE_EFFECT_HEAL_HALF_MORE_IN_SUN, - BATTLE_EFFECT_UNUSED_133, - BATTLE_EFFECT_UNUSED_134, - BATTLE_EFFECT_RANDOM_POWER_BASED_ON_IVS, - BATTLE_EFFECT_WEATHER_RAIN, - BATTLE_EFFECT_WEATHER_SUN, - BATTLE_EFFECT_RAISE_DEF_HIT, - BATTLE_EFFECT_RAISE_ATTACK_HIT, - BATTLE_EFFECT_RAISE_ALL_STATS_HIT, - BATTLE_EFFECT_UNUSED_141, - BATTLE_EFFECT_MAX_ATK_LOSE_HALF_MAX_HP, - BATTLE_EFFECT_COPY_STAT_CHANGES, - BATTLE_EFFECT_MIRROR_COAT, - BATTLE_EFFECT_CHARGE_TURN_DEF_UP, - BATTLE_EFFECT_FLINCH_DOUBLE_DAMAGE_FLY_OR_BOUNCE, - BATTLE_EFFECT_DOUBLE_DAMAGE_DIG, - BATTLE_EFFECT_HIT_IN_3_TURNS, - BATTLE_EFFECT_DOUBLE_DAMAGE_FLY_OR_BOUNCE, - BATTLE_EFFECT_FLINCH_MINIMIZE_DOUBLE_HIT, - BATTLE_EFFECT_SKIP_CHARGE_TURN_IN_SUN, - BATTLE_EFFECT_THUNDER, - BATTLE_EFFECT_FLEE_FROM_WILD_BATTLE, - BATTLE_EFFECT_BEAT_UP, - BATTLE_EFFECT_FLY, - BATTLE_EFFECT_DEF_UP_DOUBLE_ROLLOUT_POWER, - BATTLE_EFFECT_UNUSED_157, - BATTLE_EFFECT_ALWAYS_FLINCH_FIRST_TURN_ONLY, - BATTLE_EFFECT_UPROAR, - BATTLE_EFFECT_STOCKPILE, - BATTLE_EFFECT_SPIT_UP, - BATTLE_EFFECT_SWALLOW, - BATTLE_EFFECT_UNUSED_163, - BATTLE_EFFECT_WEATHER_HAIL, - BATTLE_EFFECT_TORMENT, - BATTLE_EFFECT_SP_ATK_UP_CAUSE_CONFUSION, - BATTLE_EFFECT_STATUS_BURN, - BATTLE_EFFECT_FAINT_AND_ATK_SP_ATK_DOWN_2, - BATTLE_EFFECT_DOUBLE_POWER_WHEN_STATUSED, - BATTLE_EFFECT_HIT_LAST_WHIFF_IF_HIT, - BATTLE_EFFECT_DOUBLE_POWER_AND_CURE_PARALYSIS, - BATTLE_EFFECT_MAKE_GLOBAL_TARGET, - BATTLE_EFFECT_NATURE_POWER, - BATTLE_EFFECT_SP_DEF_UP_DOUBLE_ELECTRIC_POWER, - BATTLE_EFFECT_TAUNT, - BATTLE_EFFECT_BOOST_ALLY_POWER_BY_50_PERCENT, - BATTLE_EFFECT_SWITCH_HELD_ITEMS, - BATTLE_EFFECT_COPY_ABILITY, - BATTLE_EFFECT_HEAL_IN_3_TURNS, - BATTLE_EFFECT_USE_RANDOM_ALLY_MOVE, - BATTLE_EFFECT_GROUND_TRAP_USER_CONTINUOUS_HEAL, - BATTLE_EFFECT_LOWER_OWN_ATK_AND_DEF, - BATTLE_EFFECT_APPLY_MAGIC_COAT, - BATTLE_EFFECT_RECYCLE, - BATTLE_EFFECT_DOUBLE_POWER_IF_HIT, - BATTLE_EFFECT_REMOVE_SCREENS, - BATTLE_EFFECT_STATUS_SLEEP_NEXT_TURN, - BATTLE_EFFECT_REMOVE_HELD_ITEM, - BATTLE_EFFECT_SET_HP_EQUAL_TO_USER, - BATTLE_EFFECT_DECREASE_POWER_WITH_LESS_USER_HP, - BATTLE_EFFECT_SWITCH_ABILITIES, - BATTLE_EFFECT_MAKE_SHARED_MOVES_UNUSEABLE, - BATTLE_EFFECT_HEAL_STATUS, - BATTLE_EFFECT_REMOVE_ALL_PP_ON_DEFEAT, - BATTLE_EFFECT_STEAL_STATUS_MOVE, - BATTLE_EFFECT_INCREASE_POWER_WITH_WEIGHT, - BATTLE_EFFECT_SECRET_POWER, - BATTLE_EFFECT_RECOIL_THIRD, - BATTLE_EFFECT_CONFUSE_ALL, - BATTLE_EFFECT_HIGH_CRITICAL_BURN_HIT, - BATTLE_EFFECT_HALVE_ELECTRIC_DAMAGE, - BATTLE_EFFECT_BADLY_POISON_HIT, - BATTLE_EFFECT_CHANGE_TYPE_WITH_WEATHER, - BATTLE_EFFECT_USER_SP_ATK_DOWN_2, - BATTLE_EFFECT_ATK_DEF_DOWN, - BATTLE_EFFECT_DEF_SPD_UP, - BATTLE_EFFECT_HIT_FLY, - BATTLE_EFFECT_ATK_DEF_UP, - BATTLE_EFFECT_HIGH_CRITICAL_POISON_HIT, - BATTLE_EFFECT_HALVE_FIRE_DAMAGE, - BATTLE_EFFECT_SP_ATK_SP_DEF_UP, - BATTLE_EFFECT_ATK_SPD_UP, - BATTLE_EFFECT_CAMOUFLAGE, - BATTLE_EFFECT_HEAL_HALF_REMOVE_FLYING_TYPE, - BATTLE_EFFECT_GRAVITY, - BATTLE_EFFECT_IGNORE_EVATION_REMOVE_DARK_IMMUNE, - BATTLE_EFFECT_DOUBLE_POWER_HEAL_SLEEP, - BATTLE_EFFECT_SPEED_DOWN_HIT, - BATTLE_EFFECT_POWER_BASED_ON_LOW_SPEED, - BATTLE_EFFECT_FAINT_AND_FULL_HEAL_NEXT_MON, - BATTLE_EFFECT_DOUBLE_POWER_WHEN_BELOW_HALF, - BATTLE_EFFECT_NATURAL_GIFT, - BATTLE_EFFECT_REMOVE_PROTECT, - BATTLE_EFFECT_EAT_BERRY, - BATTLE_EFFECT_DOUBLE_SPEED_3_TURNS, - BATTLE_EFFECT_RANDOM_STAT_UP_2, - BATTLE_EFFECT_METAL_BURST, - BATTLE_EFFECT_SWITCH_HIT, - BATTLE_EFFECT_DEF_SPD_DOWN_HIT, - BATTLE_EFFECT_DOUBLE_POWER_IF_MOVING_SECOND, - BATTLE_EFFECT_DOUBLE_POWER_IF_TARGET_HIT, - BATTLE_EFFECT_PREVENT_ITEM_USE, - BATTLE_EFFECT_FLING, - BATTLE_EFFECT_TRANSFER_STATUS, - BATTLE_EFFECT_HIGHER_POWER_WHEN_LOW_PP, - BATTLE_EFFECT_PREVENT_HEALING, - BATTLE_EFFECT_INCREASE_POWER_WITH_MORE_HP, - BATTLE_EFFECT_SWAP_ATK_DEF, - BATTLE_EFFECT_SUPRESS_ABILITY, - BATTLE_EFFECT_PREVENT_CRITS, - BATTLE_EFFECT_USE_MOVE_FIRST, - BATTLE_EFFECT_USE_LAST_USED_MOVE, - BATTLE_EFFECT_SWAP_ATK_SP_ATK_STAT_CHANGES, - BATTLE_EFFECT_SWAP_DEF_SP_DEF_STAT_CHANGES, - BATTLE_EFFECT_INCREASE_POWER_WITH_MORE_STAT_UP, - BATTLE_EFFECT_FAIL_IF_NOT_USED_ALL_OTHER_MOVES, - BATTLE_EFFECT_SET_ABILITY_TO_INSOMNIA, - BATTLE_EFFECT_HIT_FIRST_IF_TARGET_ATTACKING, - BATTLE_EFFECT_TOXIC_SPIKES, - BATTLE_EFFECT_SWAP_STAT_CHANGES, - BATTLE_EFFECT_RESTORE_HP_EVERY_TURN, - BATTLE_EFFECT_GIVE_GROUND_IMMUNITY, - BATTLE_EFFECT_RECOIL_BURN_HIT, - BATTLE_EFFECT_STRUGGLE, - BATTLE_EFFECT_DIVE, - BATTLE_EFFECT_DIG, - BATTLE_EFFECT_DOUBLE_DAMAGE_DIVE, - BATTLE_EFFECT_REMOVE_HAZARDS_SCREENS_EVA_DOWN, - BATTLE_EFFECT_TRICK_ROOM, - BATTLE_EFFECT_BLIZZARD, - BATTLE_EFFECT_WHIRLPOOL, - BATTLE_EFFECT_RECOIL_PARALYZE_HIT, - BATTLE_EFFECT_BOUNCE, - BATTLE_EFFECT_UNUSED_264, - BATTLE_EFFECT_SP_ATK_DOWN_2_OPPOSITE_GENDER, - BATTLE_EFFECT_STEALTH_ROCK, - BATTLE_EFFECT_CHATTER, - BATTLE_EFFECT_JUDGEMENT, - BATTLE_EFFECT_RECOIL_HALF, - BATTLE_EFFECT_FAINT_FULL_RESTORE_NEXT_MON, - BATTLE_EFFECT_LOWER_SP_DEF_2_HIT, - BATTLE_EFFECT_SHADOW_FORCE, - BATTLE_EFFECT_FLINCH_BURN_HIT, - BATTLE_EFFECT_FLINCH_FREEZE_HIT, - BATTLE_EFFECT_FLINCH_PARALYZE_HIT, - BATTLE_EFFECT_RAISE_SP_ATK_HIT, -}; - -#endif // POKEPLATINUM_CONSTANTS_BATTLE_EFFECTS_H \ No newline at end of file diff --git a/include/constants/battle/condition.h b/include/constants/battle/condition.h index e3d7867f44..5d0884d700 100644 --- a/include/constants/battle/condition.h +++ b/include/constants/battle/condition.h @@ -103,28 +103,26 @@ #define FIELD_CONDITION_GRAVITY_SHIFT 12 #define FIELD_CONDITION_TRICK_ROOM_SHIFT 16 -enum { - OVERWORLD_WEATHER_CLEAR = 0, - OVERWORLD_WEATHER_CLOUDY, - OVERWORLD_WEATHER_RAINING, - OVERWORLD_WEATHER_HEAVY_RAIN, - OVERWORLD_WEATHER_THUNDERSTORM, - OVERWORLD_WEATHER_SNOWING, - OVERWORLD_WEATHER_HEAVY_SNOW, - OVERWORLD_WEATHER_BLIZZARD, - OVERWORLD_WEATHER_CLEAR_8, - OVERWORLD_WEATHER_SLOW_ASHFALL, - OVERWORLD_WEATHER_SANDSTORM, - OVERWORLD_WEATHER_HAILING, - OVERWORLD_WEATHER_SPIRITS, - OVERWORLD_WEATHER_CLEAR_13, - OVERWORLD_WEATHER_FOG, - OVERWORLD_WEATHER_DEEP_FOG, - OVERWORLD_WEATHER_DARK_FLASH, - - // these are only for the Battle Frontier - OVERWORLD_WEATHER_HARSH_SUN = 1001, - OVERWORLD_WEATHER_TRICK_ROOM, -}; +#define OVERWORLD_WEATHER_CLEAR 0 +#define OVERWORLD_WEATHER_CLOUDY 1 +#define OVERWORLD_WEATHER_RAINING 2 +#define OVERWORLD_WEATHER_HEAVY_RAIN 3 +#define OVERWORLD_WEATHER_THUNDERSTORM 4 +#define OVERWORLD_WEATHER_SNOWING 5 +#define OVERWORLD_WEATHER_HEAVY_SNOW 6 +#define OVERWORLD_WEATHER_BLIZZARD 7 +#define OVERWORLD_WEATHER_CLEAR_8 8 +#define OVERWORLD_WEATHER_SLOW_ASHFALL 9 +#define OVERWORLD_WEATHER_SANDSTORM 10 +#define OVERWORLD_WEATHER_HAILING 11 +#define OVERWORLD_WEATHER_SPIRITS 12 +#define OVERWORLD_WEATHER_CLEAR_13 13 +#define OVERWORLD_WEATHER_FOG 14 +#define OVERWORLD_WEATHER_DEEP_FOG 15 +#define OVERWORLD_WEATHER_DARK_FLASH 16 + +// these are only for the Battle Frontier +#define OVERWORLD_WEATHER_HARSH_SUN 1001 +#define OVERWORLD_WEATHER_TRICK_ROOM 1002 #endif // POKEPLATINUM_CONSTANTS_BATTLE_CONDITION_H \ No newline at end of file diff --git a/include/constants/battle/message_tags.h b/include/constants/battle/message_tags.h index 2ff18c51a6..4edc389f47 100644 --- a/include/constants/battle/message_tags.h +++ b/include/constants/battle/message_tags.h @@ -5,74 +5,4 @@ #define TAG_GLOBAL_MESSAGE (1 << 7) // do not perform any message adjustment for a calling side #define TAG_IGNORE_SIDES ~(TAG_USE_DIRECTION | TAG_SKIP_DIRECTION) -enum MessageTags { - TAG_NONE = 0, - - TAG_NONE_SIDE_CONSCIOUS, - TAG_NICKNAME, - TAG_MOVE, - TAG_STAT, - TAG_ITEM, - TAG_NUMBER, - TAG_NUMBERS, - TAG_TRNAME, - - TAG_NICKNAME_NICKNAME, - TAG_NICKNAME_MOVE, - TAG_NICKNAME_ABILITY, - TAG_NICKNAME_STAT, - TAG_NICKNAME_TYPE, - TAG_NICKNAME_POKE, - TAG_NICKNAME_ITEM, - TAG_NICKNAME_POFFIN, - TAG_NICKNAME_NUM, - TAG_NICKNAME_TRNAME, - TAG_NICKNAME_BOX, - TAG_MOVE_SIDE, - TAG_MOVE_NICKNAME, - TAG_MOVE_MOVE, - TAG_ABILITY_NICKNAME, - TAG_ITEM_MOVE, - TAG_NUMBER_NUMBER, - TAG_TRNAME_TRNAME, - TAG_TRNAME_NICKNAME, - TAG_TRNAME_ITEM, - TAG_TRNAME_NUM, - TAG_TRCLASS_TRNAME, - - TAG_NICKNAME_NICKNAME_MOVE, - TAG_NICKNAME_NICKNAME_ABILITY, - TAG_NICKNAME_NICKNAME_ITEM, - TAG_NICKNAME_MOVE_MOVE, - TAG_NICKNAME_MOVE_NUMBER, - TAG_NICKNAME_ABILITY_NICKNAME, - TAG_NICKNAME_ABILITY_MOVE, - TAG_NICKNAME_ABILITY_ITEM, - TAG_NICKNAME_ABILITY_STAT, - TAG_NICKNAME_ABILITY_TYPE, - TAG_NICKNAME_ABILITY_STATUS, - TAG_NICKNAME_ABILITY_NUMBER, - TAG_NICKNAME_ITEM_NICKNAME, - TAG_NICKNAME_ITEM_MOVE, - TAG_NICKNAME_ITEM_STAT, - TAG_NICKNAME_ITEM_STATUS, - TAG_NICKNAME_BOX_BOX, - TAG_ITEM_NICKNAME_FLAVOR, - TAG_TRNAME_NICKNAME_NICKNAME, - TAG_TRCLASS_TRNAME_NICKNAME, - TAG_TRCLASS_TRNAME_ITEM, - - TAG_NICKNAME_ABILITY_NICKNAME_MOVE, - TAG_NICKNAME_ABILITY_NICKNAME_ABILITY, - TAG_NICKNAME_ABILITY_NICKNAME_STAT, - TAG_NICKNAME_ITEM_NICKNAME_ITEM, - TAG_TRNAME_NICKNAME_TRNAME_NICKNAME, - TAG_TRCLASS_TRNAME_NICKNAME_NICKNAME, - TAG_TRCLASS_TRNAME_NICKNAME_TRNAME, - TAG_TRCLASS_TRNAME_TRCLASS_TRNAME, - - TAG_TRCLASS_TRNAME_NICKNAME_TRCLASS_TRNAME_NICKNAME, -}; - #endif // POKEPLATINUM_CONSTANTS_BATTLE_MESSAGE_TAGS_H - diff --git a/include/constants/battle/side_effects.h b/include/constants/battle/side_effects.h index 982e1e3845..994f313c02 100644 --- a/include/constants/battle/side_effects.h +++ b/include/constants/battle/side_effects.h @@ -22,166 +22,4 @@ | MOVE_SIDE_EFFECT_TO_DEFENDER) #define MOVE_SIDE_EFFECT_SUBSCRIPT_POINTER (~MOVE_SIDE_EFFECT_FLAGS) -enum { - MOVE_SUBSCRIPT_PTR_NONE = 0, - MOVE_SUBSCRIPT_PTR_SLEEP, - MOVE_SUBSCRIPT_PTR_POISON, - MOVE_SUBSCRIPT_PTR_BURN, - MOVE_SUBSCRIPT_PTR_FREEZE, - MOVE_SUBSCRIPT_PTR_PARALYZE, - MOVE_SUBSCRIPT_PTR_BADLY_POISON, - MOVE_SUBSCRIPT_PTR_CONFUSE, - MOVE_SUBSCRIPT_PTR_FLINCH, - MOVE_SUBSCRIPT_PTR_REST, - MOVE_SUBSCRIPT_PTR_UPROAR, - MOVE_SUBSCRIPT_PTR_PAY_DAY, - MOVE_SUBSCRIPT_PTR_VANISH_CHARGE_TURN, - MOVE_SUBSCRIPT_PTR_BIND_TARGET, - MOVE_SUBSCRIPT_PTR_QUARTER_RECOIL, - MOVE_SUBSCRIPT_PTR_ATTACK_UP_1_STAGE, - MOVE_SUBSCRIPT_PTR_DEFENSE_UP_1_STAGE, - MOVE_SUBSCRIPT_PTR_SPEED_UP_1_STAGE, - MOVE_SUBSCRIPT_PTR_SP_ATTACK_UP_1_STAGE, - MOVE_SUBSCRIPT_PTR_SP_DEFENSE_UP_1_STAGE, - MOVE_SUBSCRIPT_PTR_ACCURACY_UP_1_STAGE, - MOVE_SUBSCRIPT_PTR_EVASION_UP_1_STAGE, - MOVE_SUBSCRIPT_PTR_ATTACK_DOWN_1_STAGE, - MOVE_SUBSCRIPT_PTR_DEFENSE_DOWN_1_STAGE, - MOVE_SUBSCRIPT_PTR_SPEED_DOWN_1_STAGE, - MOVE_SUBSCRIPT_PTR_SP_ATTACK_DOWN_1_STAGE, - MOVE_SUBSCRIPT_PTR_SP_DEFENSE_DOWN_1_STAGE, - MOVE_SUBSCRIPT_PTR_ACCURACY_DOWN_1_STAGE, - MOVE_SUBSCRIPT_PTR_EVASION_DOWN_1_STAGE, - MOVE_SUBSCRIPT_PTR_RECHARGE_TURN, - MOVE_SUBSCRIPT_PTR_SET_RAGE_FLAG, - MOVE_SUBSCRIPT_PTR_STEAL_ITEM, - MOVE_SUBSCRIPT_PTR_MEAN_LOOK, - MOVE_SUBSCRIPT_PTR_NIGHTMARE_START, - MOVE_SUBSCRIPT_PTR_BOOST_ALL_STATS, - MOVE_SUBSCRIPT_PTR_RAPID_SPIN, - MOVE_SUBSCRIPT_PTR_HEAL_TARGET_PARALYSIS, - MOVE_SUBSCRIPT_PTR_USER_ATK_AND_DEF_DOWN_1_STAGE, - MOVE_SUBSCRIPT_PTR_RECOIL_1_3, - MOVE_SUBSCRIPT_PTR_ATTACK_UP_2_STAGES, - MOVE_SUBSCRIPT_PTR_DEFENSE_UP_2_STAGES, - MOVE_SUBSCRIPT_PTR_SPEED_UP_2_STAGES, - MOVE_SUBSCRIPT_PTR_SP_ATTACK_UP_2_STAGES, - MOVE_SUBSCRIPT_PTR_SP_DEFENSE_UP_2_STAGES, - MOVE_SUBSCRIPT_PTR_ACCURACY_UP_2_STAGES, - MOVE_SUBSCRIPT_PTR_EVASION_UP_2_STAGES, - MOVE_SUBSCRIPT_PTR_ATTACK_DOWN_2_STAGES, - MOVE_SUBSCRIPT_PTR_DEFENSE_DOWN_2_STAGES, - MOVE_SUBSCRIPT_PTR_SPEED_DOWN_2_STAGES, - MOVE_SUBSCRIPT_PTR_SP_ATTACK_DOWN_2_STAGES, - MOVE_SUBSCRIPT_PTR_SP_DEFENSE_DOWN_2_STAGES, - MOVE_SUBSCRIPT_PTR_ACCURACY_DOWN_2_STAGES, - MOVE_SUBSCRIPT_PTR_EVASION_DOWN_2_STAGES, - MOVE_SUBSCRIPT_PTR_THRASH, - MOVE_SUBSCRIPT_PTR_KNOCK_OFF, - MOVE_SUBSCRIPT_PTR_USER_DEF_AND_SPDEF_UP_1_STAGE, - MOVE_SUBSCRIPT_PTR_USER_ATK_AND_DEF_UP_1_STAGE, - MOVE_SUBSCRIPT_PTR_TARGET_ATK_AND_DEF_DOWN_1_STAGE, - MOVE_SUBSCRIPT_PTR_USER_SPATK_AND_SPDEF_UP_1_STAGE, - MOVE_SUBSCRIPT_PTR_USER_ATK_AND_SPEED_UP_1_STAGE, - MOVE_SUBSCRIPT_PTR_DRAIN_HALF_DAMAGE_DEALT, - MOVE_SUBSCRIPT_PTR_DREAM_EATER, - MOVE_SUBSCRIPT_PTR_RESET_ALL_STAT_STAGES, - MOVE_SUBSCRIPT_PTR_BIDE_START, - MOVE_SUBSCRIPT_PTR_STRUGGLE, - MOVE_SUBSCRIPT_PTR_CONVERSION, - MOVE_SUBSCRIPT_PTR_RECOVER_HALF_MAX_HP, - MOVE_SUBSCRIPT_PTR_LIGHT_SCREEN, - MOVE_SUBSCRIPT_PTR_REFLECT, - MOVE_SUBSCRIPT_PTR_MIST, - MOVE_SUBSCRIPT_PTR_FOCUS_ENERGY, - MOVE_SUBSCRIPT_PTR_MIMIC, - MOVE_SUBSCRIPT_PTR_LEECH_SEED_START, - MOVE_SUBSCRIPT_PTR_DISABLE_START, - MOVE_SUBSCRIPT_PTR_ENCORE_START, - MOVE_SUBSCRIPT_PTR_PAIN_SPLIT, - MOVE_SUBSCRIPT_PTR_CONVERSION_2, - MOVE_SUBSCRIPT_PTR_LOCK_ON, - MOVE_SUBSCRIPT_PTR_SKETCH, - MOVE_SUBSCRIPT_PTR_FEINT, - MOVE_SUBSCRIPT_PTR_DESTINY_BOND, - MOVE_SUBSCRIPT_PTR_REDUCE_TARGET_PP, - MOVE_SUBSCRIPT_PTR_PROTECT, - MOVE_SUBSCRIPT_PTR_HEAL_BELL, - MOVE_SUBSCRIPT_PTR_TRY_SUBSTITUTE, - MOVE_SUBSCRIPT_PTR_FORCE_TARGET_TO_SWITCH_OR_FLEE, - MOVE_SUBSCRIPT_PTR_TRANSFORM_INTO_TARGET, - MOVE_SUBSCRIPT_PTR_MINIMIZE, - MOVE_SUBSCRIPT_PTR_CURSE_NORMAL, - MOVE_SUBSCRIPT_PTR_CURSE_GHOST, - MOVE_SUBSCRIPT_PTR_PRINT_MESSAGE_AND_PLAY_ANIMATION, - MOVE_SUBSCRIPT_PTR_FORESIGHT, - MOVE_SUBSCRIPT_PTR_PERISH_SONG_START, - MOVE_SUBSCRIPT_PTR_WEATHER_START, - MOVE_SUBSCRIPT_PTR_SWAGGER, - MOVE_SUBSCRIPT_PTR_INFATUATE, - MOVE_SUBSCRIPT_PTR_SAFEGUARD_START, - MOVE_SUBSCRIPT_PTR_PRESENT_HEAL, - MOVE_SUBSCRIPT_PTR_MAGNITUDE, - MOVE_SUBSCRIPT_PTR_BATON_PASS, - MOVE_SUBSCRIPT_PTR_BELLY_DRUM, - MOVE_SUBSCRIPT_PTR_TELEPORT, - MOVE_SUBSCRIPT_PTR_FUTURE_SIGHT_START, - MOVE_SUBSCRIPT_PTR_STOCKPILE, - MOVE_SUBSCRIPT_PTR_SWALLOW, - MOVE_SUBSCRIPT_PTR_TORMENT_START, - MOVE_SUBSCRIPT_PTR_FLATTER, - MOVE_SUBSCRIPT_PTR_MEMENTO, - MOVE_SUBSCRIPT_PTR_CHARGE, - MOVE_SUBSCRIPT_PTR_TAUNT_START, - MOVE_SUBSCRIPT_PTR_EXCHANGE_ITEMS, - MOVE_SUBSCRIPT_PTR_COPY_ABILITY, - MOVE_SUBSCRIPT_PTR_BREAK_SCREENS, - MOVE_SUBSCRIPT_PTR_YAWN, - MOVE_SUBSCRIPT_PTR_EXCHANGE_ABILITIES, - MOVE_SUBSCRIPT_PTR_RECOVER_PSN_PRZ_BRN, - MOVE_SUBSCRIPT_PTR_ROOST, - MOVE_SUBSCRIPT_PTR_HEAL_TARGET_SLEEP, - MOVE_SUBSCRIPT_PTR_GRAVITY_START, - MOVE_SUBSCRIPT_PTR_MIRACLE_EYE, - MOVE_SUBSCRIPT_PTR_HEALING_WISH, - MOVE_SUBSCRIPT_PTR_TAILWIND_START, - MOVE_SUBSCRIPT_PTR_USER_DEF_AND_SPDEF_DOWN_1_STAGE, - MOVE_SUBSCRIPT_PTR_USER_SWAP_ATK_AND_DEF, - MOVE_SUBSCRIPT_PTR_SUPPRESS_TARGET_ABILITY, - MOVE_SUBSCRIPT_PTR_LUCKY_CHANT_START, - MOVE_SUBSCRIPT_PTR_EXCHANGE_ATK_AND_SPATK_STAGES, - MOVE_SUBSCRIPT_PTR_EXCHANGE_DEF_AND_SPDEF_STAGES, - MOVE_SUBSCRIPT_PTR_GIVE_TARGET_INSOMNIA, - MOVE_SUBSCRIPT_PTR_EXCHANGE_ALL_STAT_STAGES, - MOVE_SUBSCRIPT_PTR_RECOIL_1_3_CHANCE_TO_BURN, - MOVE_SUBSCRIPT_PTR_DEFOG, - MOVE_SUBSCRIPT_PTR_HEAL_BLOCK_START, - MOVE_SUBSCRIPT_PTR_ATTACK_THEN_SWITCH_OUT, - MOVE_SUBSCRIPT_PTR_EMBARGO_START, - MOVE_SUBSCRIPT_PTR_PLUCK, - MOVE_SUBSCRIPT_PTR_FLING, - MOVE_SUBSCRIPT_PTR_RECOIL_1_3_CHANCE_TO_PARALYZE, - MOVE_SUBSCRIPT_PTR_RECOIL_1_2, - MOVE_SUBSCRIPT_PTR_BURN_OR_FLINCH, - MOVE_SUBSCRIPT_PTR_FREEZE_OR_FLINCH, - MOVE_SUBSCRIPT_PTR_PARALYZE_OR_FLINCH, - MOVE_SUBSCRIPT_PTR_CHATTER, - MOVE_SUBSCRIPT_PTR_LUNAR_DANCE, - MOVE_SUBSCRIPT_PTR_GIVE_TARGET_OWN_STATUS, - - MOVE_SUBSCRIPT_PTR_MAX = MOVE_SIDE_EFFECT_SUBSCRIPT_POINTER, -}; - -enum SideEffectType { - SIDE_EFFECT_TYPE_NONE = 0, //< No side effect to apply - SIDE_EFFECT_TYPE_DIRECT, //< A direct side effect; used for, e.g., status moves whose only purpose is the effect - SIDE_EFFECT_TYPE_INDIRECT, //< An indirect side effect; used for moves which deal damage and have some secondary effect - SIDE_EFFECT_TYPE_ABILITY, //< An effect applied from an ability, e.g. Effect Spore or Static - SIDE_EFFECT_TYPE_MOVE_EFFECT, //< An effect which comes from another move's effect, e.g. Yawn, where the sleep is delayed - SIDE_EFFECT_TYPE_HELD_ITEM, //< An effect which comes from a held item, e.g. Flame Orb - SIDE_EFFECT_TYPE_TOXIC_SPIKES, //< An effect which comes from specifically Toxic Spikes - SIDE_EFFECT_TYPE_DISOBEDIENCE, //< An effect which comes from a Pokemon disobeying its trainer -}; - #endif // POKEPLATINUM_CONSTANTS_BATTLE_SIDE_EFFECTS_H - diff --git a/include/constants/battle/terrain.h b/include/constants/battle/terrain.h index ae163f6159..2a72c7b977 100644 --- a/include/constants/battle/terrain.h +++ b/include/constants/battle/terrain.h @@ -1,36 +1,6 @@ #ifndef POKEPLATINUM_CONSTANTS_BATTLE_TERRAIN_H #define POKEPLATINUM_CONSTANTS_BATTLE_TERRAIN_H -enum Terrain { - TERRAIN_PLAIN = 0, - TERRAIN_SAND, - TERRAIN_GRASS, - TERRAIN_PUDDLE, - TERRAIN_MOUNTAIN, - TERRAIN_CAVE, - TERRAIN_SNOW, - TERRAIN_WATER, - TERRAIN_ICE, - TERRAIN_BUILDING, - TERRAIN_GREAT_MARSH, - TERRAIN_BRIDGE, - TERRAIN_SPECIAL, - - TERRAIN_AARON = TERRAIN_SPECIAL, - TERRAIN_BERTHA, - TERRAIN_FLINT, - TERRAIN_LUCIAN, - TERRAIN_CYNTHIA, - - TERRAIN_DISTORTION_WORLD, - TERRAIN_BATTLE_TOWER, - TERRAIN_BATTLE_FACTORY, - TERRAIN_BATTLE_ARCADE, - TERRAIN_BATTLE_CASTLE, - TERRAIN_BATTLE_HALL, - TERRAIN_GIRATINA, - - TERRAIN_MAX -}; +#define TERRAIN_SPECIAL TERRAIN_AARON #endif // POKEPLATINUM_CONSTANTS_BATTLE_TERRAIN_H \ No newline at end of file diff --git a/meson.build b/meson.build index 6a64fb0508..e85e4e2e06 100644 --- a/meson.build +++ b/meson.build @@ -127,6 +127,12 @@ subdir('lib') subdir('res') +############################################################ +### CONSTS ### +############################################################ +subdir('consts') + + ############################################################ ### ARM9 BINARY ### ############################################################ diff --git a/res/text/meson.build b/res/text/meson.build index df142db8be..f035fb15e6 100644 --- a/res/text/meson.build +++ b/res/text/meson.build @@ -729,6 +729,7 @@ gmm_header_target = meson.current_build_dir() / 'gmm' gmm_header_includes = include_directories('.') gmm_header_dir = custom_target('gmm_header_dir', + capture: true, output: 'gmm_header_dir', command: [ 'sh', '-c', '"$@"', diff --git a/subprojects/constgen.wrap b/subprojects/constgen.wrap index 31272a0225..d5cfd5072c 100644 --- a/subprojects/constgen.wrap +++ b/subprojects/constgen.wrap @@ -1,5 +1,5 @@ [wrap-git] url = https://github.com/lhearachel/constgen.git -revision = meson +revision = main depth = 1 directory = constgen