Merge conflict resolution trick.
This commit is contained in:
parent
83be1bfc8f
commit
f4af5ea206
4 changed files with 20 additions and 20 deletions
|
@ -4597,7 +4597,7 @@ u8 GetWhoStrikesFirst(u8 battler1, u8 battler2, bool8 ignoreChosenMoves)
|
|||
* (gStatStageRatios[gBattleMons[battler1].statStages[STAT_SPEED]][0])
|
||||
/ (gStatStageRatios[gBattleMons[battler1].statStages[STAT_SPEED]][1]);
|
||||
|
||||
if (gBattleMons[battler1].item == ITEM_ENIGMA_BERRY)
|
||||
if (gBattleMons[battler1].item == ITEM_ENIGMA_BERRY_E_READER)
|
||||
{
|
||||
holdEffect = gEnigmaBerries[battler1].holdEffect;
|
||||
holdEffectParam = gEnigmaBerries[battler1].holdEffectParam;
|
||||
|
@ -4631,7 +4631,7 @@ u8 GetWhoStrikesFirst(u8 battler1, u8 battler2, bool8 ignoreChosenMoves)
|
|||
* (gStatStageRatios[gBattleMons[battler2].statStages[STAT_SPEED]][0])
|
||||
/ (gStatStageRatios[gBattleMons[battler2].statStages[STAT_SPEED]][1]);
|
||||
|
||||
if (gBattleMons[battler2].item == ITEM_ENIGMA_BERRY)
|
||||
if (gBattleMons[battler2].item == ITEM_ENIGMA_BERRY_E_READER)
|
||||
{
|
||||
holdEffect = gEnigmaBerries[battler2].holdEffect;
|
||||
holdEffectParam = gEnigmaBerries[battler2].holdEffectParam;
|
||||
|
|
|
@ -1155,7 +1155,7 @@ static void Cmd_accuracycheck(void)
|
|||
if (gBattleMons[gBattlerAttacker].ability == ABILITY_HUSTLE && IS_TYPE_PHYSICAL(type))
|
||||
calc = (calc * 80) / 100; // 1.2 hustle loss
|
||||
|
||||
if (gBattleMons[gBattlerTarget].item == ITEM_ENIGMA_BERRY)
|
||||
if (gBattleMons[gBattlerTarget].item == ITEM_ENIGMA_BERRY_E_READER)
|
||||
{
|
||||
holdEffect = gEnigmaBerries[gBattlerTarget].holdEffect;
|
||||
param = gEnigmaBerries[gBattlerTarget].holdEffectParam;
|
||||
|
@ -1255,7 +1255,7 @@ static void Cmd_critcalc(void)
|
|||
|
||||
item = gBattleMons[gBattlerAttacker].item;
|
||||
|
||||
if (item == ITEM_ENIGMA_BERRY)
|
||||
if (item == ITEM_ENIGMA_BERRY_E_READER)
|
||||
holdEffect = gEnigmaBerries[gBattlerAttacker].holdEffect;
|
||||
else
|
||||
holdEffect = ItemId_GetHoldEffect(item);
|
||||
|
@ -1658,7 +1658,7 @@ static void Cmd_adjustnormaldamage(void)
|
|||
|
||||
ApplyRandomDmgMultiplier();
|
||||
|
||||
if (gBattleMons[gBattlerTarget].item == ITEM_ENIGMA_BERRY)
|
||||
if (gBattleMons[gBattlerTarget].item == ITEM_ENIGMA_BERRY_E_READER)
|
||||
{
|
||||
holdEffect = gEnigmaBerries[gBattlerTarget].holdEffect;
|
||||
param = gEnigmaBerries[gBattlerTarget].holdEffectParam;
|
||||
|
@ -1700,7 +1700,7 @@ static void Cmd_adjustnormaldamage2(void) // The same as adjustnormaldamage exce
|
|||
|
||||
ApplyRandomDmgMultiplier();
|
||||
|
||||
if (gBattleMons[gBattlerTarget].item == ITEM_ENIGMA_BERRY)
|
||||
if (gBattleMons[gBattlerTarget].item == ITEM_ENIGMA_BERRY_E_READER)
|
||||
{
|
||||
holdEffect = gEnigmaBerries[gBattlerTarget].holdEffect;
|
||||
param = gEnigmaBerries[gBattlerTarget].holdEffectParam;
|
||||
|
@ -4192,7 +4192,7 @@ static void Cmd_moveend(void)
|
|||
endMode = gBattlescriptCurrInstr[1];
|
||||
endState = gBattlescriptCurrInstr[2];
|
||||
|
||||
if (gBattleMons[gBattlerAttacker].item == ITEM_ENIGMA_BERRY)
|
||||
if (gBattleMons[gBattlerAttacker].item == ITEM_ENIGMA_BERRY_E_READER)
|
||||
holdEffectAtk = gEnigmaBerries[gBattlerAttacker].holdEffect;
|
||||
else
|
||||
holdEffectAtk = ItemId_GetHoldEffect(gBattleMons[gBattlerAttacker].item);
|
||||
|
@ -5820,7 +5820,7 @@ static void Cmd_adjustsetdamage(void) // The same as adjustnormaldamage, except
|
|||
{
|
||||
u8 holdEffect, param;
|
||||
|
||||
if (gBattleMons[gBattlerTarget].item == ITEM_ENIGMA_BERRY)
|
||||
if (gBattleMons[gBattlerTarget].item == ITEM_ENIGMA_BERRY_E_READER)
|
||||
{
|
||||
holdEffect = gEnigmaBerries[gBattlerTarget].holdEffect;
|
||||
param = gEnigmaBerries[gBattlerTarget].holdEffectParam;
|
||||
|
@ -7403,7 +7403,7 @@ static void Cmd_tryKO(void)
|
|||
{
|
||||
u8 holdEffect, param;
|
||||
|
||||
if (gBattleMons[gBattlerTarget].item == ITEM_ENIGMA_BERRY)
|
||||
if (gBattleMons[gBattlerTarget].item == ITEM_ENIGMA_BERRY_E_READER)
|
||||
{
|
||||
holdEffect = gEnigmaBerries[gBattlerTarget].holdEffect;
|
||||
param = gEnigmaBerries[gBattlerTarget].holdEffectParam;
|
||||
|
@ -9093,8 +9093,8 @@ static void Cmd_tryswapitems(void) // trick
|
|||
// can't swap if two pokemon don't have an item
|
||||
// or if either of them is an enigma berry or a mail
|
||||
else if ((gBattleMons[gBattlerAttacker].item == 0 && gBattleMons[gBattlerTarget].item == 0)
|
||||
|| gBattleMons[gBattlerAttacker].item == ITEM_ENIGMA_BERRY
|
||||
|| gBattleMons[gBattlerTarget].item == ITEM_ENIGMA_BERRY
|
||||
|| gBattleMons[gBattlerAttacker].item == ITEM_ENIGMA_BERRY_E_READER
|
||||
|| gBattleMons[gBattlerTarget].item == ITEM_ENIGMA_BERRY_E_READER
|
||||
|| IS_ITEM_MAIL(gBattleMons[gBattlerAttacker].item)
|
||||
|| IS_ITEM_MAIL(gBattleMons[gBattlerTarget].item))
|
||||
{
|
||||
|
|
|
@ -1022,7 +1022,7 @@ u8 TrySetCantSelectMoveBattleScript(void)
|
|||
}
|
||||
}
|
||||
|
||||
if (gBattleMons[gActiveBattler].item == ITEM_ENIGMA_BERRY)
|
||||
if (gBattleMons[gActiveBattler].item == ITEM_ENIGMA_BERRY_E_READER)
|
||||
holdEffect = gEnigmaBerries[gActiveBattler].holdEffect;
|
||||
else
|
||||
holdEffect = ItemId_GetHoldEffect(gBattleMons[gActiveBattler].item);
|
||||
|
@ -1066,7 +1066,7 @@ u8 CheckMoveLimitations(u8 battlerId, u8 unusableMoves, u8 check)
|
|||
u16 *choicedMove = &gBattleStruct->choicedMove[battlerId];
|
||||
s32 i;
|
||||
|
||||
if (gBattleMons[battlerId].item == ITEM_ENIGMA_BERRY)
|
||||
if (gBattleMons[battlerId].item == ITEM_ENIGMA_BERRY_E_READER)
|
||||
holdEffect = gEnigmaBerries[battlerId].holdEffect;
|
||||
else
|
||||
holdEffect = ItemId_GetHoldEffect(gBattleMons[battlerId].item);
|
||||
|
@ -3244,7 +3244,7 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn)
|
|||
u16 atkItem, defItem;
|
||||
|
||||
gLastUsedItem = gBattleMons[battlerId].item;
|
||||
if (gLastUsedItem == ITEM_ENIGMA_BERRY)
|
||||
if (gLastUsedItem == ITEM_ENIGMA_BERRY_E_READER)
|
||||
{
|
||||
battlerHoldEffect = gEnigmaBerries[battlerId].holdEffect;
|
||||
battlerHoldEffectParam = gEnigmaBerries[battlerId].holdEffectParam;
|
||||
|
@ -3256,7 +3256,7 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn)
|
|||
}
|
||||
|
||||
atkItem = gBattleMons[gBattlerAttacker].item;
|
||||
if (atkItem == ITEM_ENIGMA_BERRY)
|
||||
if (atkItem == ITEM_ENIGMA_BERRY_E_READER)
|
||||
{
|
||||
atkHoldEffect = gEnigmaBerries[gBattlerAttacker].holdEffect;
|
||||
atkHoldEffectParam = gEnigmaBerries[gBattlerAttacker].holdEffectParam;
|
||||
|
@ -3269,7 +3269,7 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn)
|
|||
|
||||
// def variables are unused
|
||||
defItem = gBattleMons[gBattlerTarget].item;
|
||||
if (defItem == ITEM_ENIGMA_BERRY)
|
||||
if (defItem == ITEM_ENIGMA_BERRY_E_READER)
|
||||
{
|
||||
defHoldEffect = gEnigmaBerries[gBattlerTarget].holdEffect;
|
||||
defHoldEffectParam = gEnigmaBerries[gBattlerTarget].holdEffectParam;
|
||||
|
@ -3606,7 +3606,7 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn)
|
|||
for (battlerId = 0; battlerId < gBattlersCount; battlerId++)
|
||||
{
|
||||
gLastUsedItem = gBattleMons[battlerId].item;
|
||||
if (gBattleMons[battlerId].item == ITEM_ENIGMA_BERRY)
|
||||
if (gBattleMons[battlerId].item == ITEM_ENIGMA_BERRY_E_READER)
|
||||
{
|
||||
battlerHoldEffect = gEnigmaBerries[battlerId].holdEffect;
|
||||
battlerHoldEffectParam = gEnigmaBerries[battlerId].holdEffectParam;
|
||||
|
|
|
@ -3112,7 +3112,7 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de
|
|||
spDefense = defender->spDefense;
|
||||
|
||||
// Get attacker hold item info
|
||||
if (attacker->item == ITEM_ENIGMA_BERRY)
|
||||
if (attacker->item == ITEM_ENIGMA_BERRY_E_READER)
|
||||
{
|
||||
attackerHoldEffect = gEnigmaBerries[battlerIdAtk].holdEffect;
|
||||
attackerHoldEffectParam = gEnigmaBerries[battlerIdAtk].holdEffectParam;
|
||||
|
@ -3124,7 +3124,7 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de
|
|||
}
|
||||
|
||||
// Get defender hold item info
|
||||
if (defender->item == ITEM_ENIGMA_BERRY)
|
||||
if (defender->item == ITEM_ENIGMA_BERRY_E_READER)
|
||||
{
|
||||
defenderHoldEffect = gEnigmaBerries[battlerIdDef].holdEffect;
|
||||
defenderHoldEffectParam = gEnigmaBerries[battlerIdDef].holdEffectParam;
|
||||
|
@ -5921,7 +5921,7 @@ void MonGainEVs(struct Pokemon *mon, u16 defeatedSpecies)
|
|||
}
|
||||
|
||||
heldItem = GetMonData(mon, MON_DATA_HELD_ITEM, 0);
|
||||
if (heldItem == ITEM_ENIGMA_BERRY)
|
||||
if (heldItem == ITEM_ENIGMA_BERRY_E_READER)
|
||||
{
|
||||
if (gMain.inBattle)
|
||||
holdEffect = gEnigmaBerries[0].holdEffect;
|
||||
|
|
Loading…
Reference in a new issue