mirror of https://github.com/pret/pokeemerald.git
Updated Add Difficulty Mode (markdown)
parent
b912b272db
commit
72488da5f3
|
@ -56,16 +56,6 @@ index 6e2cfa9b8..deea675e2 100644
|
|||
```diff
|
||||
------------------------------ src/battle_setup.c ------------------------------
|
||||
index 62158de8d..01b029c06 100644
|
||||
@@ -94,8 +94,9 @@ static u16 GetRematchTrainerId(u16 trainerId);
|
||||
static void RegisterTrainerInMatchCall(void);
|
||||
static void HandleRematchVarsOnBattleEnd(void);
|
||||
static const u8 *GetIntroSpeechOfApproachingTrainer(void);
|
||||
static const u8 *GetTrainerCantBattleSpeech(void);
|
||||
+u8 GetScaledLevel(u8 lvl);
|
||||
|
||||
EWRAM_DATA static u16 sTrainerBattleMode = 0;
|
||||
EWRAM_DATA u16 gTrainerBattleOpponent_A = 0;
|
||||
EWRAM_DATA u16 gTrainerBattleOpponent_B = 0;
|
||||
@@ -810,33 +811,33 @@ static u8 GetSumOfEnemyPartyLevel(u16 opponentId, u8 numMons)
|
||||
{
|
||||
const struct TrainerMonNoItemDefaultMoves *party;
|
||||
|
@ -145,6 +135,21 @@ index 62158de8d..01b029c06 100644
|
|||
+}
|
||||
```
|
||||
|
||||
```diff
|
||||
---------------------------- include/battle_setup.h ----------------------------
|
||||
index feaa30c00..5541cbac6 100644
|
||||
@@ -46,8 +46,9 @@ void SetTrainerFlag(u16 trainerId);
|
||||
void ClearTrainerFlag(u16 trainerId);
|
||||
void BattleSetup_StartTrainerBattle(void);
|
||||
void BattleSetup_StartRematchBattle(void);
|
||||
void ShowTrainerIntroSpeech(void);
|
||||
+u8 GetScaledLevel(u8 lvl);
|
||||
const u8 *BattleSetup_GetScriptAddrAfterBattle(void);
|
||||
const u8 *BattleSetup_GetTrainerPostBattleScript(void);
|
||||
void ShowTrainerCantBattleSpeech(void);
|
||||
void PlayTrainerEncounterMusic(void);
|
||||
```
|
||||
|
||||
## Modify the `CreateNPCTrainerParty` so each Pokemon they use have their levels scaled.
|
||||
```diff
|
||||
------------------------------ src/battle_main.c ------------------------------
|
||||
|
@ -195,6 +200,39 @@ index 0f16660f1..cfd4265a5 100644
|
|||
&& gTrainers[trainerNum].trainerClass == TRAINER_CLASS_LEADER) //Set Norman's Slaking to have intimidate
|
||||
```
|
||||
|
||||
## Remove Badge Boosts on Hard Difficulty If You'd Like
|
||||
```diff
|
||||
------------------------------ src/battle_main.c ------------------------------
|
||||
index cfd4265a5..b92ae84b8 100644
|
||||
@@ -4755,8 +4755,9 @@ u8 GetWhoStrikesFirst(u8 battler1, u8 battler2, bool8 ignoreChosenMoves)
|
||||
|
||||
// badge boost
|
||||
if (!(gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_RECORDED_LINK | BATTLE_TYPE_FRONTIER))
|
||||
&& FlagGet(FLAG_BADGE03_GET)
|
||||
+ && (VarGet(VAR_DIFFICULTY) != DIFFICULTY_HARD)
|
||||
&& GetBattlerSide(battler1) == B_SIDE_PLAYER)
|
||||
{
|
||||
speedBattler1 = (speedBattler1 * 110) / 100;
|
||||
}
|
||||
```
|
||||
|
||||
```diff
|
||||
-------------------------------- src/pokemon.c --------------------------------
|
||||
index db0e8099d..21bf84c15 100644
|
||||
@@ -3421,8 +3421,10 @@ u8 CountAliveMonsInBattle(u8 caseId)
|
||||
static bool8 ShouldGetStatBadgeBoost(u16 badgeFlag, u8 battlerId)
|
||||
{
|
||||
if (gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_EREADER_TRAINER | BATTLE_TYPE_RECORDED_LINK | BATTLE_TYPE_FRONTIER))
|
||||
return FALSE;
|
||||
+ if (VarGet(VAR_DIFFICULTY) == DIFFICULTY_HARD)
|
||||
+ return FALSE;
|
||||
else if (GetBattlerSide(battlerId) != B_SIDE_PLAYER)
|
||||
return FALSE;
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_TRAINER && gTrainerBattleOpponent_A == TRAINER_SECRET_BASE)
|
||||
return FALSE;
|
||||
```
|
||||
|
||||
|
||||
# Adding a Place to Set the Difficulty
|
||||
![pokeemerald_modern-0](https://user-images.githubusercontent.com/36523934/214752540-b96d0388-1615-46e0-a172-b532baf5e379.png)
|
||||
|
||||
|
|
Loading…
Reference in New Issue