diff --git a/include/constants/battle_move_effects.h b/include/constants/battle_move_effects.h index abdd19377..b018429de 100644 --- a/include/constants/battle_move_effects.h +++ b/include/constants/battle_move_effects.h @@ -302,55 +302,54 @@ #define EFFECT_CLEAR_SMOG 296 #define EFFECT_HIT_SWITCH_TARGET 297 #define EFFECT_FINAL_GAMBIT 298 -#define EFFECT_TECHNO_BLAST 299 -#define EFFECT_JUDGMENT 300 -#define EFFECT_AUTOTOMIZE 301 -#define EFFECT_COPYCAT 302 -#define EFFECT_DEFOG 303 -#define EFFECT_HIT_ENEMY_HEAL_ALLY 304 // Pollen Puff -#define EFFECT_SMACK_DOWN 305 -#define EFFECT_SYNCHRONOISE 306 -#define EFFECT_PSYCHO_SHIFT 307 -#define EFFECT_POWER_TRICK 308 -#define EFFECT_FLAME_BURST 309 -#define EFFECT_AFTER_YOU 310 -#define EFFECT_BESTOW 311 -#define EFFECT_ROTOTILLER 312 -#define EFFECT_FLOWER_SHIELD 313 -#define EFFECT_HIT_PREVENT_ESCAPE 314 -#define EFFECT_SPEED_SWAP 315 -#define EFFECT_DEFENSE_UP2_HIT 316 -#define EFFECT_REVELATION_DANCE 317 -#define EFFECT_AURORA_VEIL 318 -#define EFFECT_THIRD_TYPE 319 -#define EFFECT_FEINT 320 -#define EFFECT_SPARKLING_ARIA 321 -#define EFFECT_ACUPRESSURE 322 -#define EFFECT_AROMATIC_MIST 323 -#define EFFECT_POWDER 324 -#define EFFECT_SP_ATTACK_UP_HIT 325 -#define EFFECT_BELCH 326 -#define EFFECT_PARTING_SHOT 327 -#define EFFECT_SPECTRAL_THIEF 328 -#define EFFECT_V_CREATE 329 -#define EFFECT_MAT_BLOCK 330 -#define EFFECT_STOMPING_TANTRUM 331 -#define EFFECT_CORE_ENFORCER 332 -#define EFFECT_INSTRUCT 333 -#define EFFECT_THROAT_CHOP 334 -#define EFFECT_LASER_FOCUS 335 -#define EFFECT_MAGNETIC_FLUX 336 -#define EFFECT_GEAR_UP 337 -#define EFFECT_INCINERATE 338 -#define EFFECT_BUG_BITE 339 -#define EFFECT_STRENGTH_SAP 340 -#define EFFECT_MIND_BLOWN 341 -#define EFFECT_PURIFY 342 -#define EFFECT_BURN_UP 343 -#define EFFECT_SHORE_UP 344 -#define EFFECT_GEOMANCY 345 -#define EFFECT_FAIRY_LOCK 346 -#define EFFECT_ALLY_SWITCH 347 -#define EFFECT_SLEEP_HIT 348 // Relic Song +#define EFFECT_CHANGE_TYPE_ON_ITEM 299 // Techno Blast, Multi Attack, Judgment +#define EFFECT_AUTOTOMIZE 300 +#define EFFECT_COPYCAT 301 +#define EFFECT_DEFOG 302 +#define EFFECT_HIT_ENEMY_HEAL_ALLY 303 // Pollen Puff +#define EFFECT_SMACK_DOWN 304 +#define EFFECT_SYNCHRONOISE 305 +#define EFFECT_PSYCHO_SHIFT 306 +#define EFFECT_POWER_TRICK 307 +#define EFFECT_FLAME_BURST 308 +#define EFFECT_AFTER_YOU 309 +#define EFFECT_BESTOW 310 +#define EFFECT_ROTOTILLER 311 +#define EFFECT_FLOWER_SHIELD 312 +#define EFFECT_HIT_PREVENT_ESCAPE 313 +#define EFFECT_SPEED_SWAP 314 +#define EFFECT_DEFENSE_UP2_HIT 315 +#define EFFECT_REVELATION_DANCE 316 +#define EFFECT_AURORA_VEIL 317 +#define EFFECT_THIRD_TYPE 318 +#define EFFECT_FEINT 319 +#define EFFECT_SPARKLING_ARIA 320 +#define EFFECT_ACUPRESSURE 321 +#define EFFECT_AROMATIC_MIST 322 +#define EFFECT_POWDER 323 +#define EFFECT_SP_ATTACK_UP_HIT 324 +#define EFFECT_BELCH 325 +#define EFFECT_PARTING_SHOT 326 +#define EFFECT_SPECTRAL_THIEF 327 +#define EFFECT_V_CREATE 328 +#define EFFECT_MAT_BLOCK 329 +#define EFFECT_STOMPING_TANTRUM 330 +#define EFFECT_CORE_ENFORCER 331 +#define EFFECT_INSTRUCT 332 +#define EFFECT_THROAT_CHOP 333 +#define EFFECT_LASER_FOCUS 334 +#define EFFECT_MAGNETIC_FLUX 335 +#define EFFECT_GEAR_UP 336 +#define EFFECT_INCINERATE 337 +#define EFFECT_BUG_BITE 338 +#define EFFECT_STRENGTH_SAP 339 +#define EFFECT_MIND_BLOWN 340 +#define EFFECT_PURIFY 341 +#define EFFECT_BURN_UP 342 +#define EFFECT_SHORE_UP 343 +#define EFFECT_GEOMANCY 344 +#define EFFECT_FAIRY_LOCK 345 +#define EFFECT_ALLY_SWITCH 346 +#define EFFECT_SLEEP_HIT 347 // Relic Song #endif // GUARD_CONSTANTS_BATTLE_MOVE_EFFECTS_H diff --git a/include/constants/hold_effects.h b/include/constants/hold_effects.h index 669d7c0b8..85017cb40 100644 --- a/include/constants/hold_effects.h +++ b/include/constants/hold_effects.h @@ -134,6 +134,7 @@ #define HOLD_EFFECT_SEEDS 151 #define HOLD_EFFECT_ADRENALINE_ORB 152 #define HOLD_EFFECT_MEMORY 153 +#define HOLD_EFFECT_PLATE 154 #define HOLD_EFFECT_CHOICE(holdEffect)((holdEffect == HOLD_EFFECT_CHOICE_BAND || holdEffect == HOLD_EFFECT_CHOICE_SCARF || holdEffect == HOLD_EFFECT_CHOICE_SPECS)) diff --git a/src/battle_main.c b/src/battle_main.c index accd7605b..bd782beb4 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -4972,20 +4972,11 @@ void SetTypeBeforeUsingMove(u16 move, u8 battlerAtk) gBattleStruct->dynamicMoveType++; gBattleStruct->dynamicMoveType |= 0xC0; } - else if (gBattleMoves[move].effect == EFFECT_TECHNO_BLAST) + else if (gBattleMoves[move].effect == EFFECT_CHANGE_TYPE_ON_ITEM) { - if (GetBattlerHoldEffect(battlerAtk, TRUE) == HOLD_EFFECT_DRIVE) + if (GetBattlerHoldEffect(battlerAtk, TRUE) == gBattleMoves[move].argument) gBattleStruct->dynamicMoveType = ItemId_GetSecondaryId(gBattleMons[battlerAtk].item) | 0x80; } - else if (move == MOVE_MULTI_ATTACK) - { - if (GetBattlerHoldEffect(battlerAtk, TRUE) == HOLD_EFFECT_MEMORY) - gBattleStruct->dynamicMoveType = ItemId_GetSecondaryId(gBattleMons[battlerAtk].item) | 0x80; - } - else if (gBattleMoves[move].effect == EFFECT_JUDGMENT) - { - // TODO: - } else if (gBattleMoves[move].effect == EFFECT_REVELATION_DANCE) { if (gBattleMons[battlerAtk].type1 != TYPE_MYSTERY) @@ -5011,7 +5002,7 @@ void SetTypeBeforeUsingMove(u16 move, u8 battlerAtk) else if (gBattleMoves[move].type == TYPE_NORMAL && gBattleMoves[move].effect != EFFECT_HIDDEN_POWER && gBattleMoves[move].effect != EFFECT_WEATHER_BALL - && gBattleMoves[move].effect != EFFECT_JUDGMENT + && gBattleMoves[move].effect != EFFECT_CHANGE_TYPE_ON_ITEM && gBattleMoves[move].effect != EFFECT_NATURAL_GIFT && ((attackerAbility == ABILITY_PIXILATE && (ateType = TYPE_FAIRY)) || (attackerAbility == ABILITY_REFRIGERATE && (ateType = TYPE_ICE)) diff --git a/src/data/battle_moves.h b/src/data/battle_moves.h index b290b2a5b..cba21d140 100644 --- a/src/data/battle_moves.h +++ b/src/data/battle_moves.h @@ -7006,7 +7006,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] = [MOVE_JUDGMENT] = { - .effect = EFFECT_JUDGMENT, + .effect = EFFECT_CHANGE_TYPE_ON_ITEM, .power = 100, .type = TYPE_NORMAL, .accuracy = 100, @@ -7016,6 +7016,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGSROCK_AFFECTED, .split = SPLIT_SPECIAL, + .argument = HOLD_EFFECT_PLATE, }, [MOVE_BUG_BITE] = @@ -8456,7 +8457,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] = #else .power = 85, #endif - .effect = EFFECT_TECHNO_BLAST, + .effect = EFFECT_CHANGE_TYPE_ON_ITEM, .type = TYPE_NORMAL, .accuracy = 100, .pp = 5, @@ -8465,6 +8466,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] = .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGSROCK_AFFECTED, .split = SPLIT_SPECIAL, + .argument = HOLD_EFFECT_DRIVE }, [MOVE_RELIC_SONG] = @@ -10263,7 +10265,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] = #else .power = 90, #endif - .effect = EFFECT_PLACEHOLDER, + .effect = EFFECT_CHANGE_TYPE_ON_ITEM, .type = TYPE_NORMAL, .accuracy = 100, .pp = 10, @@ -10272,6 +10274,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] = .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGSROCK_AFFECTED, .split = SPLIT_PHYSICAL, + .argument = HOLD_EFFECT_MEMORY, }, [MOVE_MIND_BLOWN] =