Version 1.4.3 (#2968)
This commit is contained in:
commit
1817e0d269
7 changed files with 25 additions and 21 deletions
|
@ -3863,14 +3863,14 @@ static void Cmd_tryfaintmon(void)
|
||||||
if (gBattleResults.playerFaintCounter < 255)
|
if (gBattleResults.playerFaintCounter < 255)
|
||||||
gBattleResults.playerFaintCounter++;
|
gBattleResults.playerFaintCounter++;
|
||||||
AdjustFriendshipOnBattleFaint(gActiveBattler);
|
AdjustFriendshipOnBattleFaint(gActiveBattler);
|
||||||
gSideTimers[0].retaliateTimer = 2;
|
gSideTimers[B_SIDE_PLAYER].retaliateTimer = 2;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (gBattleResults.opponentFaintCounter < 255)
|
if (gBattleResults.opponentFaintCounter < 255)
|
||||||
gBattleResults.opponentFaintCounter++;
|
gBattleResults.opponentFaintCounter++;
|
||||||
gBattleResults.lastOpponentSpecies = GetMonData(&gEnemyParty[gBattlerPartyIndexes[gActiveBattler]], MON_DATA_SPECIES, NULL);
|
gBattleResults.lastOpponentSpecies = GetMonData(&gEnemyParty[gBattlerPartyIndexes[gActiveBattler]], MON_DATA_SPECIES, NULL);
|
||||||
gSideTimers[1].retaliateTimer = 2;
|
gSideTimers[B_SIDE_OPPONENT].retaliateTimer = 2;
|
||||||
}
|
}
|
||||||
if ((gHitMarker & HITMARKER_DESTINYBOND) && gBattleMons[gBattlerAttacker].hp != 0)
|
if ((gHitMarker & HITMARKER_DESTINYBOND) && gBattleMons[gBattlerAttacker].hp != 0)
|
||||||
{
|
{
|
||||||
|
@ -5304,7 +5304,8 @@ static bool32 TryKnockOffBattleScript(u32 battlerDef)
|
||||||
|
|
||||||
gLastUsedItem = gBattleMons[battlerDef].item;
|
gLastUsedItem = gBattleMons[battlerDef].item;
|
||||||
gBattleMons[battlerDef].item = 0;
|
gBattleMons[battlerDef].item = 0;
|
||||||
gBattleStruct->choicedMove[battlerDef] = 0;
|
if (gBattleMons[battlerDef].ability != ABILITY_GORILLA_TACTICS)
|
||||||
|
gBattleStruct->choicedMove[battlerDef] = 0;
|
||||||
gWishFutureKnock.knockedOffMons[side] |= gBitTable[gBattlerPartyIndexes[battlerDef]];
|
gWishFutureKnock.knockedOffMons[side] |= gBitTable[gBattlerPartyIndexes[battlerDef]];
|
||||||
CheckSetUnburden(battlerDef);
|
CheckSetUnburden(battlerDef);
|
||||||
|
|
||||||
|
|
|
@ -6524,8 +6524,8 @@ bool32 CanBeFrozen(u8 battlerId)
|
||||||
|
|
||||||
bool32 CanBeConfused(u8 battlerId)
|
bool32 CanBeConfused(u8 battlerId)
|
||||||
{
|
{
|
||||||
if (GetBattlerAbility(gEffectBattler) == ABILITY_OWN_TEMPO
|
if (GetBattlerAbility(battlerId) == ABILITY_OWN_TEMPO
|
||||||
|| gBattleMons[gEffectBattler].status2 & STATUS2_CONFUSION
|
|| gBattleMons[battlerId].status2 & STATUS2_CONFUSION
|
||||||
|| IsBattlerTerrainAffected(battlerId, STATUS_FIELD_MISTY_TERRAIN))
|
|| IsBattlerTerrainAffected(battlerId, STATUS_FIELD_MISTY_TERRAIN))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -8172,7 +8172,7 @@ u32 GetBattlerHoldEffect(u8 battlerId, bool32 checkNegating)
|
||||||
return gBattleStruct->debugHoldEffects[battlerId];
|
return gBattleStruct->debugHoldEffects[battlerId];
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
if (gBattleMons[battlerId].item == ITEM_ENIGMA_BERRY)
|
if (gBattleMons[battlerId].item == ITEM_ENIGMA_BERRY_E_READER)
|
||||||
return gEnigmaBerries[battlerId].holdEffect;
|
return gEnigmaBerries[battlerId].holdEffect;
|
||||||
else
|
else
|
||||||
return ItemId_GetHoldEffect(gBattleMons[battlerId].item);
|
return ItemId_GetHoldEffect(gBattleMons[battlerId].item);
|
||||||
|
@ -8181,7 +8181,7 @@ u32 GetBattlerHoldEffect(u8 battlerId, bool32 checkNegating)
|
||||||
//
|
//
|
||||||
static u32 GetBattlerItemHoldEffectParam(u8 battlerId, u16 item)
|
static u32 GetBattlerItemHoldEffectParam(u8 battlerId, u16 item)
|
||||||
{
|
{
|
||||||
if (item == ITEM_ENIGMA_BERRY)
|
if (item == ITEM_ENIGMA_BERRY_E_READER)
|
||||||
return gEnigmaBerries[battlerId].holdEffectParam;
|
return gEnigmaBerries[battlerId].holdEffectParam;
|
||||||
else
|
else
|
||||||
return ItemId_GetHoldEffectParam(item);
|
return ItemId_GetHoldEffectParam(item);
|
||||||
|
@ -8189,7 +8189,7 @@ static u32 GetBattlerItemHoldEffectParam(u8 battlerId, u16 item)
|
||||||
|
|
||||||
u32 GetBattlerHoldEffectParam(u8 battlerId)
|
u32 GetBattlerHoldEffectParam(u8 battlerId)
|
||||||
{
|
{
|
||||||
if (gBattleMons[battlerId].item == ITEM_ENIGMA_BERRY)
|
if (gBattleMons[battlerId].item == ITEM_ENIGMA_BERRY_E_READER)
|
||||||
return gEnigmaBerries[battlerId].holdEffectParam;
|
return gEnigmaBerries[battlerId].holdEffectParam;
|
||||||
else
|
else
|
||||||
return ItemId_GetHoldEffectParam(gBattleMons[battlerId].item);
|
return ItemId_GetHoldEffectParam(gBattleMons[battlerId].item);
|
||||||
|
|
|
@ -199,7 +199,7 @@ bool32 IsViableZMove(u8 battlerId, u16 move)
|
||||||
holdEffect = gBattleStruct->debugHoldEffects[battlerId];
|
holdEffect = gBattleStruct->debugHoldEffects[battlerId];
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
if (item == ITEM_ENIGMA_BERRY)
|
if (item == ITEM_ENIGMA_BERRY_E_READER)
|
||||||
return FALSE; // HoldEffect = gEnigmaBerries[battlerId].holdEffect;
|
return FALSE; // HoldEffect = gEnigmaBerries[battlerId].holdEffect;
|
||||||
else
|
else
|
||||||
holdEffect = ItemId_GetHoldEffect(item);
|
holdEffect = ItemId_GetHoldEffect(item);
|
||||||
|
|
|
@ -8399,7 +8399,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] =
|
||||||
.accuracy = 100,
|
.accuracy = 100,
|
||||||
.pp = 5,
|
.pp = 5,
|
||||||
.secondaryEffectChance = 10,
|
.secondaryEffectChance = 10,
|
||||||
.target = MOVE_TARGET_BOTH,
|
.target = MOVE_TARGET_SELECTED,
|
||||||
.priority = 0,
|
.priority = 0,
|
||||||
.flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST,
|
.flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST,
|
||||||
.split = SPLIT_SPECIAL,
|
.split = SPLIT_SPECIAL,
|
||||||
|
|
|
@ -311,7 +311,7 @@ const struct Evolution gEvolutionTable[NUM_SPECIES][EVOS_PER_MON] =
|
||||||
[SPECIES_KRICKETOT] = {{EVO_LEVEL, 10, SPECIES_KRICKETUNE}},
|
[SPECIES_KRICKETOT] = {{EVO_LEVEL, 10, SPECIES_KRICKETUNE}},
|
||||||
[SPECIES_SHINX] = {{EVO_LEVEL, 15, SPECIES_LUXIO}},
|
[SPECIES_SHINX] = {{EVO_LEVEL, 15, SPECIES_LUXIO}},
|
||||||
[SPECIES_LUXIO] = {{EVO_LEVEL, 30, SPECIES_LUXRAY}},
|
[SPECIES_LUXIO] = {{EVO_LEVEL, 30, SPECIES_LUXRAY}},
|
||||||
[SPECIES_BUDEW] = {{EVO_FRIENDSHIP, 0, SPECIES_ROSELIA}},
|
[SPECIES_BUDEW] = {{EVO_FRIENDSHIP_DAY, 0, SPECIES_ROSELIA}},
|
||||||
[SPECIES_CRANIDOS] = {{EVO_LEVEL, 30, SPECIES_RAMPARDOS}},
|
[SPECIES_CRANIDOS] = {{EVO_LEVEL, 30, SPECIES_RAMPARDOS}},
|
||||||
[SPECIES_SHIELDON] = {{EVO_LEVEL, 30, SPECIES_BASTIODON}},
|
[SPECIES_SHIELDON] = {{EVO_LEVEL, 30, SPECIES_BASTIODON}},
|
||||||
[SPECIES_BURMY] = {{EVO_LEVEL_FEMALE, 20, SPECIES_WORMADAM},
|
[SPECIES_BURMY] = {{EVO_LEVEL_FEMALE, 20, SPECIES_WORMADAM},
|
||||||
|
|
19
src/debug.c
19
src/debug.c
|
@ -147,7 +147,7 @@ enum { //Sound
|
||||||
#define DEBUG_NUMBER_DIGITS_VARIABLES 5
|
#define DEBUG_NUMBER_DIGITS_VARIABLES 5
|
||||||
#define DEBUG_NUMBER_DIGITS_VARIABLE_VALUE 5
|
#define DEBUG_NUMBER_DIGITS_VARIABLE_VALUE 5
|
||||||
#define DEBUG_NUMBER_DIGITS_ITEMS 4
|
#define DEBUG_NUMBER_DIGITS_ITEMS 4
|
||||||
#define DEBUG_NUMBER_DIGITS_ITEM_QUANTITY 2
|
#define DEBUG_NUMBER_DIGITS_ITEM_QUANTITY 3
|
||||||
|
|
||||||
#define DEBUG_NUMBER_ICON_X 210
|
#define DEBUG_NUMBER_ICON_X 210
|
||||||
#define DEBUG_NUMBER_ICON_Y 50
|
#define DEBUG_NUMBER_ICON_Y 50
|
||||||
|
@ -1015,8 +1015,8 @@ static void DebugAction_Util_Warp_SelectMapGroup(u8 taskId)
|
||||||
gTasks[taskId].data[3] = 0;
|
gTasks[taskId].data[3] = 0;
|
||||||
gTasks[taskId].data[4] = 0;
|
gTasks[taskId].data[4] = 0;
|
||||||
|
|
||||||
ConvertIntToDecimalStringN(gStringVar1, gTasks[taskId].data[3], STR_CONV_MODE_LEADING_ZEROS, 2);
|
ConvertIntToDecimalStringN(gStringVar1, gTasks[taskId].data[3], STR_CONV_MODE_LEADING_ZEROS, (MAP_GROUP_COUNT[gTasks[taskId].data[5]] - 1 >= 100) ? 3 : 2);
|
||||||
ConvertIntToDecimalStringN(gStringVar2, MAP_GROUP_COUNT[gTasks[taskId].data[5]] - 1, STR_CONV_MODE_LEADING_ZEROS, 2);
|
ConvertIntToDecimalStringN(gStringVar2, MAP_GROUP_COUNT[gTasks[taskId].data[5]] - 1, STR_CONV_MODE_LEADING_ZEROS, (MAP_GROUP_COUNT[gTasks[taskId].data[5]] - 1 >= 100) ? 3 : 2);
|
||||||
StringExpandPlaceholders(gStringVar1, sDebugText_Util_WarpToMap_SelMax);
|
StringExpandPlaceholders(gStringVar1, sDebugText_Util_WarpToMap_SelMax);
|
||||||
GetMapName(gStringVar2, Overworld_GetMapHeaderByGroupAndId(gTasks[taskId].data[5], gTasks[taskId].data[3])->regionMapSectionId, 0);
|
GetMapName(gStringVar2, Overworld_GetMapHeaderByGroupAndId(gTasks[taskId].data[5], gTasks[taskId].data[3])->regionMapSectionId, 0);
|
||||||
StringCopy(gStringVar3, gText_DigitIndicator[gTasks[taskId].data[4]]);
|
StringCopy(gStringVar3, gText_DigitIndicator[gTasks[taskId].data[4]]);
|
||||||
|
@ -1061,8 +1061,8 @@ static void DebugAction_Util_Warp_SelectMap(u8 taskId)
|
||||||
gTasks[taskId].data[4] += 1;
|
gTasks[taskId].data[4] += 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
ConvertIntToDecimalStringN(gStringVar1, gTasks[taskId].data[3], STR_CONV_MODE_LEADING_ZEROS, 2);
|
ConvertIntToDecimalStringN(gStringVar1, gTasks[taskId].data[3], STR_CONV_MODE_LEADING_ZEROS, (max_value >= 100) ? 3 : 2);
|
||||||
ConvertIntToDecimalStringN(gStringVar2, MAP_GROUP_COUNT[gTasks[taskId].data[5]] - 1, STR_CONV_MODE_LEADING_ZEROS, 2);
|
ConvertIntToDecimalStringN(gStringVar2, MAP_GROUP_COUNT[gTasks[taskId].data[5]] - 1, STR_CONV_MODE_LEADING_ZEROS, (max_value >= 100) ? 3 : 2);
|
||||||
StringExpandPlaceholders(gStringVar1, sDebugText_Util_WarpToMap_SelMax);
|
StringExpandPlaceholders(gStringVar1, sDebugText_Util_WarpToMap_SelMax);
|
||||||
GetMapName(gStringVar2, Overworld_GetMapHeaderByGroupAndId(gTasks[taskId].data[5], gTasks[taskId].data[3])->regionMapSectionId, 0);
|
GetMapName(gStringVar2, Overworld_GetMapHeaderByGroupAndId(gTasks[taskId].data[5], gTasks[taskId].data[3])->regionMapSectionId, 0);
|
||||||
StringCopy(gStringVar3, gText_DigitIndicator[gTasks[taskId].data[4]]);
|
StringCopy(gStringVar3, gText_DigitIndicator[gTasks[taskId].data[4]]);
|
||||||
|
@ -1905,15 +1905,18 @@ static void DebugAction_Give_Item_SelectId(u8 taskId)
|
||||||
}
|
}
|
||||||
static void DebugAction_Give_Item_SelectQuantity(u8 taskId)
|
static void DebugAction_Give_Item_SelectQuantity(u8 taskId)
|
||||||
{
|
{
|
||||||
|
u32 itemId = gTasks[taskId].data[5];
|
||||||
|
|
||||||
if (JOY_NEW(DPAD_ANY))
|
if (JOY_NEW(DPAD_ANY))
|
||||||
{
|
{
|
||||||
PlaySE(SE_SELECT);
|
PlaySE(SE_SELECT);
|
||||||
|
|
||||||
if (JOY_NEW(DPAD_UP))
|
if (JOY_NEW(DPAD_UP))
|
||||||
{
|
{
|
||||||
|
u32 maxCapacity = (ItemId_GetPocket(itemId) - 1 == BERRIES_POCKET) ? MAX_BERRY_CAPACITY : MAX_BAG_ITEM_CAPACITY;
|
||||||
gTasks[taskId].data[3] += sPowersOfTen[gTasks[taskId].data[4]];
|
gTasks[taskId].data[3] += sPowersOfTen[gTasks[taskId].data[4]];
|
||||||
if (gTasks[taskId].data[3] >= 100)
|
if (gTasks[taskId].data[3] > maxCapacity)
|
||||||
gTasks[taskId].data[3] = 99;
|
gTasks[taskId].data[3] = maxCapacity;
|
||||||
}
|
}
|
||||||
if (JOY_NEW(DPAD_DOWN))
|
if (JOY_NEW(DPAD_DOWN))
|
||||||
{
|
{
|
||||||
|
@ -1947,7 +1950,7 @@ static void DebugAction_Give_Item_SelectQuantity(u8 taskId)
|
||||||
DestroySprite(&gSprites[gTasks[taskId].data[6]]); //Destroy item icon
|
DestroySprite(&gSprites[gTasks[taskId].data[6]]); //Destroy item icon
|
||||||
|
|
||||||
PlaySE(MUS_OBTAIN_ITEM);
|
PlaySE(MUS_OBTAIN_ITEM);
|
||||||
AddBagItem(gTasks[taskId].data[5], gTasks[taskId].data[3]);
|
AddBagItem(itemId, gTasks[taskId].data[3]);
|
||||||
DebugAction_DestroyExtraWindow(taskId);
|
DebugAction_DestroyExtraWindow(taskId);
|
||||||
}
|
}
|
||||||
else if (JOY_NEW(B_BUTTON))
|
else if (JOY_NEW(B_BUTTON))
|
||||||
|
|
|
@ -6543,7 +6543,7 @@ u16 GetEvolutionTargetSpecies(struct Pokemon *mon, u8 mode, u16 evolutionItem, s
|
||||||
partnerSpecies = GetMonData(tradePartner, MON_DATA_SPECIES, 0);
|
partnerSpecies = GetMonData(tradePartner, MON_DATA_SPECIES, 0);
|
||||||
partnerHeldItem = GetMonData(tradePartner, MON_DATA_HELD_ITEM, 0);
|
partnerHeldItem = GetMonData(tradePartner, MON_DATA_HELD_ITEM, 0);
|
||||||
|
|
||||||
if (partnerHeldItem == ITEM_ENIGMA_BERRY)
|
if (partnerHeldItem == ITEM_ENIGMA_BERRY_E_READER)
|
||||||
partnerHoldEffect = gSaveBlock1Ptr->enigmaBerry.holdEffect;
|
partnerHoldEffect = gSaveBlock1Ptr->enigmaBerry.holdEffect;
|
||||||
else
|
else
|
||||||
partnerHoldEffect = ItemId_GetHoldEffect(partnerHeldItem);
|
partnerHoldEffect = ItemId_GetHoldEffect(partnerHeldItem);
|
||||||
|
@ -7213,7 +7213,7 @@ void MonGainEVs(struct Pokemon *mon, u16 defeatedSpecies)
|
||||||
u8 bonus;
|
u8 bonus;
|
||||||
|
|
||||||
heldItem = GetMonData(mon, MON_DATA_HELD_ITEM, 0);
|
heldItem = GetMonData(mon, MON_DATA_HELD_ITEM, 0);
|
||||||
if (heldItem == ITEM_ENIGMA_BERRY)
|
if (heldItem == ITEM_ENIGMA_BERRY_E_READER)
|
||||||
{
|
{
|
||||||
if (gMain.inBattle)
|
if (gMain.inBattle)
|
||||||
holdEffect = gEnigmaBerries[0].holdEffect;
|
holdEffect = gEnigmaBerries[0].holdEffect;
|
||||||
|
|
Loading…
Reference in a new issue