Clean up Corrosive Gas

Remove code and unused move effect.
This commit is contained in:
BuffelSaft 2021-11-22 15:13:54 +13:00
parent d2eb5f0e61
commit 50d0cd52e8
4 changed files with 4 additions and 15 deletions

View file

@ -245,7 +245,6 @@ struct WishFutureKnock
u8 wishMonId[MAX_BATTLERS_COUNT]; u8 wishMonId[MAX_BATTLERS_COUNT];
u8 weatherDuration; u8 weatherDuration;
u8 knockedOffMons[2]; // Each battler is represented by a bit. The array entry is dependent on the battler's side. u8 knockedOffMons[2]; // Each battler is represented by a bit. The array entry is dependent on the battler's side.
u8 meltedItemMons[2]; // Same as above
}; };
struct AI_SavedBattleMon struct AI_SavedBattleMon

View file

@ -415,7 +415,6 @@ extern const u8 BattleScript_AttackerFormChangeMoveEffect[];
extern const u8 BattleScript_BothCanNoLongerEscape[]; extern const u8 BattleScript_BothCanNoLongerEscape[];
extern const u8 BattleScript_OctolockEndTurn[]; extern const u8 BattleScript_OctolockEndTurn[];
extern const u8 BattleScript_NeutralizingGasExits[]; extern const u8 BattleScript_NeutralizingGasExits[];
extern const u8 BattleScript_MeltedItem[];
extern const u8 BattleScript_BeakBlastSetUp[]; extern const u8 BattleScript_BeakBlastSetUp[];
extern const u8 BattleScript_BeakBlastBurn[]; extern const u8 BattleScript_BeakBlastBurn[];
extern const u8 BattleScript_DefDownSpeedUp[]; extern const u8 BattleScript_DefDownSpeedUp[];

View file

@ -360,8 +360,7 @@
#define MOVE_EFFECT_RELIC_SONG 0x47 #define MOVE_EFFECT_RELIC_SONG 0x47
#define MOVE_EFFECT_TRAP_BOTH 0x48 #define MOVE_EFFECT_TRAP_BOTH 0x48
#define MOVE_EFFECT_SCALE_SHOT 0x49 #define MOVE_EFFECT_SCALE_SHOT 0x49
#define MOVE_EFFECT_MELT_ITEM 0x4A #define NUM_MOVE_EFFECTS 0x4A
#define NUM_MOVE_EFFECTS 0x4B
#define MOVE_EFFECT_AFFECTS_USER 0x4000 #define MOVE_EFFECT_AFFECTS_USER 0x4000
#define MOVE_EFFECT_CERTAIN 0x8000 #define MOVE_EFFECT_CERTAIN 0x8000

View file

@ -3160,8 +3160,7 @@ void SetMoveEffect(bool32 primary, u32 certain)
| BATTLE_TYPE_LINK | BATTLE_TYPE_LINK
| BATTLE_TYPE_RECORDED_LINK | BATTLE_TYPE_RECORDED_LINK
| BATTLE_TYPE_SECRET_BASE)) | BATTLE_TYPE_SECRET_BASE))
&& (gWishFutureKnock.knockedOffMons[side] & gBitTable[gBattlerPartyIndexes[gBattlerAttacker]] && (gWishFutureKnock.knockedOffMons[side] & gBitTable[gBattlerPartyIndexes[gBattlerAttacker]]))
|| gWishFutureKnock.meltedItemMons[side] & gBitTable[gBattlerPartyIndexes[gBattlerAttacker]]))
{ {
gBattlescriptCurrInstr++; gBattlescriptCurrInstr++;
} }
@ -5583,11 +5582,6 @@ static void Cmd_switchindataupdate(void)
{ {
gBattleMons[gActiveBattler].item = 0; gBattleMons[gActiveBattler].item = 0;
} }
// check melted items
if (gWishFutureKnock.meltedItemMons[i] & gBitTable[gBattlerPartyIndexes[gActiveBattler]])
{
gBattleMons[gActiveBattler].item = 0;
}
if (gBattleMoves[gCurrentMove].effect == EFFECT_BATON_PASS) if (gBattleMoves[gCurrentMove].effect == EFFECT_BATON_PASS)
{ {
@ -12305,16 +12299,14 @@ static void Cmd_tryswapitems(void) // trick
u8 sideAttacker = GetBattlerSide(gBattlerAttacker); u8 sideAttacker = GetBattlerSide(gBattlerAttacker);
u8 sideTarget = GetBattlerSide(gBattlerTarget); u8 sideTarget = GetBattlerSide(gBattlerTarget);
// you can't swap items if they were knocked off or melted in regular battles // You can't swap items if they were knocked off in regular battles
if (!(gBattleTypeFlags & (BATTLE_TYPE_LINK if (!(gBattleTypeFlags & (BATTLE_TYPE_LINK
| BATTLE_TYPE_EREADER_TRAINER | BATTLE_TYPE_EREADER_TRAINER
| BATTLE_TYPE_FRONTIER | BATTLE_TYPE_FRONTIER
| BATTLE_TYPE_SECRET_BASE | BATTLE_TYPE_SECRET_BASE
| BATTLE_TYPE_RECORDED_LINK)) | BATTLE_TYPE_RECORDED_LINK))
&& (gWishFutureKnock.knockedOffMons[sideAttacker] & gBitTable[gBattlerPartyIndexes[gBattlerAttacker]] && (gWishFutureKnock.knockedOffMons[sideAttacker] & gBitTable[gBattlerPartyIndexes[gBattlerAttacker]]
|| gWishFutureKnock.knockedOffMons[sideTarget] & gBitTable[gBattlerPartyIndexes[gBattlerTarget]] || gWishFutureKnock.knockedOffMons[sideTarget] & gBitTable[gBattlerPartyIndexes[gBattlerTarget]]))
|| gWishFutureKnock.meltedItemMons[sideTarget] & gBitTable[gBattlerPartyIndexes[gBattlerAttacker]]
|| gWishFutureKnock.meltedItemMons[sideTarget] & gBitTable[gBattlerPartyIndexes[gBattlerTarget]]))
{ {
gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1); gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1);
} }