New options menu

This commit is contained in:
resetes12
2023-05-06 15:22:17 +02:00
parent c7b408b134
commit 51b510aa45
41 changed files with 1510 additions and 400 deletions

View File

@@ -85,7 +85,7 @@ BirthIsland_Exterior_EventScript_Deoxys::
delay 40
waitmoncry
setvar VAR_LAST_TALKED, LOCALID_DEOXYS
seteventmon SPECIES_DEOXYS, 60
seteventmon SPECIES_DEOXYS, 70
setflag FLAG_SYS_CTRL_OBJ_DELETE
special BattleSetup_StartLegendaryBattle
waitstate

View File

@@ -129,7 +129,7 @@ FarawayIsland_Interior_EventScript_Mew::
special DestroyMewEmergingGrassSprite
delay 40
waitmoncry
seteventmon SPECIES_MEW, 60
seteventmon SPECIES_MEW, 50
setflag FLAG_SYS_CTRL_OBJ_DELETE
special BattleSetup_StartLegendaryBattle
waitstate

View File

@@ -191,7 +191,7 @@
"y": 1,
"elevation": 0,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY",
"script": "LittlerootTown_ProfessorBirchsLab_EventScript_Gamemode"
"script": "LittlerootTown_ProfessorBirchsLab_EventScript_PC"
},
{
"type": "sign",
@@ -199,7 +199,7 @@
"y": 1,
"elevation": 0,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY",
"script": "LittlerootTown_ProfessorBirchsLab_EventScript_Gamemode"
"script": "LittlerootTown_ProfessorBirchsLab_EventScript_PC"
},
{
"type": "sign",
@@ -207,7 +207,7 @@
"y": 10,
"elevation": 0,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY",
"script": "LittlerootTown_ProfessorBirchsLab_EventScript_Challenge"
"script": "LittlerootTown_ProfessorBirchsLab_EventScript_PC"
},
{
"type": "sign",
@@ -215,7 +215,7 @@
"y": 9,
"elevation": 0,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY",
"script": "LittlerootTown_ProfessorBirchsLab_EventScript_Challenge"
"script": "LittlerootTown_ProfessorBirchsLab_EventScript_PC"
},
{
"type": "sign",

View File

@@ -1094,142 +1094,3 @@ LittlerootTown_ProfessorBirchsLab_Text_ScottAboardSSTidalCall:
.string "we meet. I'll be waiting!\p"
.string "… … … … … …\n"
.string "… … … … … Click!$"
LittlerootTown_ProfessorBirchsLab_EventScript_Challenge::
message LittlerootTown_ProfessorBirchsLab_Text_Challenge
waitmessage
switch VAR_DIFFICULTY
case 0, LittlerootTown_ProfessorBirchsLab_EventScript_DefaultNormal
case 1, LittlerootTown_ProfessorBirchsLab_EventScript_DefaultHard
case 2, LittlerootTown_ProfessorBirchsLab_EventScript_DefaultEasy
LittlerootTown_ProfessorBirchsLab_EventScript_DefaultNormal:
multichoicedefault 21, 6, MULTI_TAG_DIFFICULTY, 1, FALSE
goto LittlerootTown_ProfessorBirchsLab_EventScript_ChallengeSelect
LittlerootTown_ProfessorBirchsLab_EventScript_DefaultHard:
multichoicedefault 21, 6, MULTI_TAG_DIFFICULTY, 2, FALSE
goto LittlerootTown_ProfessorBirchsLab_EventScript_ChallengeSelect
LittlerootTown_ProfessorBirchsLab_EventScript_DefaultEasy:
multichoicedefault 21, 6, MULTI_TAG_DIFFICULTY, 0, FALSE
goto LittlerootTown_ProfessorBirchsLab_EventScript_ChallengeSelect
LittlerootTown_ProfessorBirchsLab_EventScript_ChallengeSelect:
switch VAR_RESULT
case 0, LittlerootTown_ProfessorBirchsLab_EventScript_SelectedEasy
case 1, LittlerootTown_ProfessorBirchsLab_EventScript_SelectedNormal
case 2, LittlerootTown_ProfessorBirchsLab_EventScript_SelectedHard
case MULTI_B_PRESSED, LittlerootTown_ProfessorBirchsLab_EventScript_SelectedCancel
end
LittlerootTown_ProfessorBirchsLab_EventScript_SelectedNormal:
msgbox LittlerootTown_ProfessorBirchsLab_Text_SelectedNormal, MSGBOX_DEFAULT
setvar VAR_DIFFICULTY, 0
closemessage
end
LittlerootTown_ProfessorBirchsLab_EventScript_SelectedHard:
msgbox LittlerootTown_ProfessorBirchsLab_Text_SelectedHard, MSGBOX_DEFAULT
setvar VAR_DIFFICULTY, 1
callnative DifficultyHardStyleToSet
closemessage
end
LittlerootTown_ProfessorBirchsLab_EventScript_SelectedEasy:
msgbox LittlerootTown_ProfessorBirchsLab_Text_SelectedEasy, MSGBOX_DEFAULT
setvar VAR_DIFFICULTY, 2
closemessage
end
LittlerootTown_ProfessorBirchsLab_EventScript_SelectedCancel:
msgbox LittlerootTown_ProfessorBirchsLab_Text_SelectedCancel, MSGBOX_DEFAULT
closemessage
end
LittlerootTown_ProfessorBirchsLab_Text_Challenge:
.string "What DIFFICULTY would\n"
.string "you like to play on?$"
LittlerootTown_ProfessorBirchsLab_Text_SelectedEasy:
.string "EASY DIFFICULTY was chosen.\p"
.string "EASY DIFFICULTY scales down\n"
.string "TRAINERS and WILD BATTLES.$"
LittlerootTown_ProfessorBirchsLab_Text_SelectedNormal:
.string "NORMAL DIFFICULTY was chosen.\p"
.string "NORMAL DIFFICULTY is the standard\n"
.string "difficulty, without any change.$"
LittlerootTown_ProfessorBirchsLab_Text_SelectedHard:
.string "HARD DIFFICULTY was chosen.\p"
.string "HARD DIFFICULTY scales up\n"
.string "TRAINERS and WILD BATTLES,\l"
.string "forces SET BATTLE STYLE,\l"
.string "and adds small additional changes to\l"
.string "make a more challenging experience.$"
LittlerootTown_ProfessorBirchsLab_Text_SelectedCancel:
.string "DIFFICULTY not changed.$"
@Gamemode
LittlerootTown_ProfessorBirchsLab_EventScript_Gamemode::
message LittlerootTown_ProfessorBirchsLab_Text_Gamemode
waitmessage
switch VAR_GAMEMODE
case 0, LittlerootTown_ProfessorBirchsLab_EventScript_GamemodeModern
case 1, LittlerootTown_ProfessorBirchsLab_EventScript_GamemodeClassic
LittlerootTown_ProfessorBirchsLab_EventScript_GamemodeClassic:
multichoicedefault 21, 6, MULTI_TAG_GAMEMODE, 1, FALSE
goto LittlerootTown_ProfessorBirchsLab_EventScript_GamemodeSelect
LittlerootTown_ProfessorBirchsLab_EventScript_GamemodeModern:
multichoicedefault 21, 6, MULTI_TAG_GAMEMODE, 0, FALSE
goto LittlerootTown_ProfessorBirchsLab_EventScript_GamemodeSelect
LittlerootTown_ProfessorBirchsLab_EventScript_GamemodeSelect:
switch VAR_RESULT
case 0, LittlerootTown_ProfessorBirchsLab_EventScript_SelectedClassic
case 1, LittlerootTown_ProfessorBirchsLab_EventScript_SelectedModern
case MULTI_B_PRESSED, LittlerootTown_ProfessorBirchsLab_EventScript_SelectedCancelGamemode
end
LittlerootTown_ProfessorBirchsLab_EventScript_SelectedClassic:
msgbox LittlerootTown_ProfessorBirchsLab_Text_SelectedClassic, MSGBOX_DEFAULT
setvar VAR_GAMEMODE, 0
closemessage
end
LittlerootTown_ProfessorBirchsLab_EventScript_SelectedModern:
msgbox LittlerootTown_ProfessorBirchsLab_Text_SelectedModern, MSGBOX_DEFAULT
setvar VAR_GAMEMODE, 1
closemessage
end
LittlerootTown_ProfessorBirchsLab_EventScript_SelectedCancelGamemode:
msgbox LittlerootTown_ProfessorBirchsLab_Text_SelectedCancelGamemode, MSGBOX_DEFAULT
closemessage
end
LittlerootTown_ProfessorBirchsLab_Text_Gamemode:
.string "What STYLE would\n"
.string "you like to use?$"
LittlerootTown_ProfessorBirchsLab_Text_SelectedModern:
.string "MODERN STYLE was chosen.\p"
.string "MODERN STYLE makes use of the\n"
.string "PHYSICAL and SPECIAL SPLIT made\p"
.string "for MOVES in GENERATION IV.\n"
.string "$"
LittlerootTown_ProfessorBirchsLab_Text_SelectedClassic:
.string "CLASSIC STYLE was chosen.\p"
.string "CLASSIC STYLE does not makes use\n"
.string "of the PHYSICAL and SPECIAL SPLIT\p"
.string "made for MOVES in GENERATION IV.\n"
.string "$"
LittlerootTown_ProfessorBirchsLab_Text_SelectedCancelGamemode:
.string "STYLE not changed.$"

View File

@@ -113,7 +113,7 @@ MossdeepCity_EventScript_Jirachi::
waitmovement 0
msgbox MossdeepCity_Text_ItsAWhiteRock2, MSGBOX_DEFAULT
waitmessage
setwildbattle SPECIES_JIRACHI, 60
setwildbattle SPECIES_JIRACHI, 50
waitse
playmoncry SPECIES_JIRACHI, CRY_MODE_ENCOUNTER
delay 40

View File

@@ -53,7 +53,7 @@ NavelRock_Bottom_EventScript_Lugia::
playmoncry SPECIES_LUGIA, CRY_MODE_ENCOUNTER
waitmoncry
delay 20
seteventmon SPECIES_LUGIA, 60
seteventmon SPECIES_LUGIA, 70
setflag FLAG_SYS_CTRL_OBJ_DELETE
special BattleSetup_StartLegendaryBattle
waitstate

View File

@@ -57,7 +57,7 @@ NavelRock_Top_EventScript_HoOh::
applymovement LOCALID_HO_OH, NavelRock_Top_Movement_HoOhApproach
waitmovement 0
special RemoveCameraObject
seteventmon SPECIES_HO_OH, 60
seteventmon SPECIES_HO_OH, 70
setflag FLAG_SYS_CTRL_OBJ_DELETE
special BattleSetup_StartLegendaryBattle
waitstate

View File

@@ -43,8 +43,8 @@ SkyPillar_Top_EventScript_RayquazaFaceDown::
end
SkyPillar_Top_EventScript_Rayquaza::
call_if_eq VAR_DIFFICULTY, 1, SkyPillar_Top_EventScript_RayquazaHard
call_if_ne VAR_DIFFICULTY, 1, SkyPillar_Top_EventScript_RayquazaNormal
call_if_set FLAG_DIFFICULTY_HARD, SkyPillar_Top_EventScript_RayquazaHard
call_if_unset FLAG_DIFFICULTY_HARD, SkyPillar_Top_EventScript_RayquazaNormal
end
SkyPillar_Top_EventScript_RayquazaNormal::

View File

@@ -40,23 +40,19 @@ gText_Birch_Difficulty::
.string "And... How do you think this\n"
.string "adventure is going to be?$"
gText_Birch_Gamemode::
.string "Is that so? Then...\p"
.string "Do you feel more of a MODERN STYLE of\n"
.string "person, or more of a CLASSIC one?\p"
.string "This option refers to the PHYSICAL and\n"
.string "SPECIAL MOVE split that happened in\l"
.string "GENERATION IV. MODERN activates it,\l"
.string "while CLASSIC doesn't.\p"
.string "Tell me.$"
gText_Birch_LockDifficulty::
.string "If you need to change the DIFFICULTY\n"
.string "you can open the OPTIONS MENU and\l"
.string "change it from there.\p"
.string "You can also lock it, if you want.\n"
.string "Do you want to lock the\l"
.string "chosen DIFFICULTY?\p"
.string "This cannot be changed later.$"
gText_Birch_Challenge::
.string "Oh, I thought so. You look like it!\p"
.string "If you want to learn more about\n"
.string "the DIFFICULTY or the STYLES, just\l"
.string "use the computers in my LAB.\p"
.string "All right.\p"
.string "Do you expect any\n"
.string "Oh, is that so?\p"
.string "All right, with that clear...\n"
.string "Do you expect any\l"
.string "CHALLENGE in your journey?\p"
.string "And what's your name?$"

View File

@@ -77,6 +77,7 @@ static const u8 sWindowVerticalScrollSpeeds[] = {
[OPTIONS_TEXT_SPEED_SLOW] = 1,
[OPTIONS_TEXT_SPEED_MID] = 2,
[OPTIONS_TEXT_SPEED_FAST] = 4,
[OPTIONS_TEXT_SPEED_FASTER] = 4,
};
static const struct GlyphWidthFunc sGlyphWidthFuncs[] =
@@ -935,9 +936,10 @@ void DrawDownArrow(u8 windowId, u16 x, u16 y, u8 bgColor, bool8 drawArrow, u8 *c
static u16 RenderText(struct TextPrinter *textPrinter)
{
struct TextPrinterSubStruct *subStruct = (struct TextPrinterSubStruct *)(&textPrinter->subStructFields);
u16 currChar;
u16 currChar, nextChar;
s32 width;
s32 widthHelper;
u8 repeats;
switch (textPrinter->state)
{
@@ -961,8 +963,26 @@ static u16 RenderText(struct TextPrinter *textPrinter)
else
textPrinter->delayCounter = textPrinter->textSpeed;
switch (GetPlayerTextSpeed())
{
case OPTIONS_TEXT_SPEED_SLOW:
repeats = 1;
break;
case OPTIONS_TEXT_SPEED_MID:
repeats = 1;
break;
case OPTIONS_TEXT_SPEED_FAST:
repeats = 1;
break;
case OPTIONS_TEXT_SPEED_FASTER:
repeats = 2;
break;
}
do {
currChar = *textPrinter->printerTemplate.currentChar;
textPrinter->printerTemplate.currentChar++;
nextChar = *textPrinter->printerTemplate.currentChar;
switch (currChar)
{
@@ -1164,6 +1184,23 @@ static u16 RenderText(struct TextPrinter *textPrinter)
else
textPrinter->printerTemplate.currentX += gCurGlyph.width;
}
if (repeats == 2)
{
switch (nextChar)
{
case CHAR_NEWLINE:
case PLACEHOLDER_BEGIN:
case EXT_CTRL_CODE_BEGIN:
case CHAR_PROMPT_CLEAR:
case CHAR_PROMPT_SCROLL:
case CHAR_KEYPAD_ICON:
case EOS:
repeats--;
break;
}
}
repeats--;
} while (repeats > 0);
return RENDER_PRINT;
case RENDER_STATE_WAIT:
if (TextPrinterWait(textPrinter))

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

View File

@@ -647,7 +647,6 @@ $(PKNAVOPTIONSGFXDIR)/options.4bpp: $(PKNAVOPTIONSGFXDIR)/hoenn_map.4bpp \
$(PKNAVOPTIONSGFXDIR)/match_call.4bpp \
$(PKNAVOPTIONSGFXDIR)/ribbons.4bpp \
$(PKNAVOPTIONSGFXDIR)/switch_off.4bpp \
$(PKNAVOPTIONSGFXDIR)/match_call_2.4bpp \
$(PKNAVOPTIONSGFXDIR)/party.4bpp \
$(PKNAVOPTIONSGFXDIR)/search.4bpp \
$(PKNAVOPTIONSGFXDIR)/cool.4bpp \

View File

@@ -253,7 +253,7 @@
#define FLAG_RECEIVED_TM05 0xE7
#define FLAG_RECEIVED_TM19 0xE8
#define FLAG_ENABLE_FOLLOWER 0xE9 // Used to enable or disable the follower
#define FLAG_DISABLE_AUTORUN 0xE9
#define FLAG_RECEIVED_TM44 0xEA
#define FLAG_RECEIVED_TM45 0xEB
@@ -455,8 +455,8 @@
#define FLAG_REMATCH_DRAKE 0x1A8
#define FLAG_REMATCH_WALLACE 0x1A9
#define FLAG_UNUSED_0x1AA 0x1AA // Unused Flag
#define FLAG_UNUSED_0x1AB 0x1AB // Unused Flag
#define FLAG_DIFFICULTY_HARD 0x1AA
#define FLAG_LOCK_DIFFICULTY 0x1AB
#define FLAG_DEFEATED_DEOXYS 0x1AC
#define FLAG_BATTLED_DEOXYS 0x1AD

View File

@@ -126,6 +126,7 @@
#define OPTIONS_TEXT_SPEED_SLOW 0
#define OPTIONS_TEXT_SPEED_MID 1
#define OPTIONS_TEXT_SPEED_FAST 2
#define OPTIONS_TEXT_SPEED_FASTER 3
#define OPTIONS_SOUND_MONO 0
#define OPTIONS_SOUND_STEREO 1

View File

@@ -235,7 +235,7 @@
#define VAR_SOOTOPOLIS_WALLACE_STATE 0x40D8
#define VAR_HAS_TALKED_TO_SEAFLOOR_CAVERN_ENTRANCE_GRUNT 0x40D9
#define VAR_REGISTER_BIRCH_STATE 0x40DA
#define VAR_GAMEMODE 0x40DB // Modern or classic (changes the Physical/Special split ON/OFF)
#define VAR_UNUSED_0x40DB 0x40DB // Unused Var
#define VAR_UNUSED_0x40DC 0x40DC // Unused Var
#define VAR_GIFT_PICHU_SLOT 0x40DD
#define VAR_GIFT_UNUSED_1 0x40DE // Var is written to, but never read
@@ -268,7 +268,7 @@
#define VAR_UNUSED_0x40F9 0x40F9 // Unused Var
#define VAR_UNUSED_0x40FA 0x40FA // Unused Var
#define VAR_UNUSED_0x40FB 0x40FB // Unused Var
#define VAR_DIFFICULTY 0x40FC // Difficulty Var mod
#define VAR_UNUSED_0x40FC 0x40FC // Unused Var
#define VAR_UNUSED_0x40FD 0x40FD // Unused Var
#define VAR_UNUSED_0x40FE 0x40FE // Unused Var
#define VAR_UNUSED_0x40FF 0x40FF // Unused Var

View File

@@ -511,7 +511,11 @@ struct SaveBlock2
u16 regionMapZoom:1; // whether the map is zoomed in
//u16 padding1:4;
//u16 padding2;
u16 expShare:1; //not used, but not removed to not break compatibility just in case
u16 optionsfollowerEnable:1;
bool8 optionsautoRun;
u16 optionsDisableMatchCall:1;
u16 optionStyle:1;
u16 optionsDifficulty:2;
/*0x18*/ struct Pokedex pokedex;
/*0x90*/ u8 filler_90[0x8];
/*0x98*/ struct Time localTimeOffset;
@@ -527,7 +531,6 @@ struct SaveBlock2
/*0x57C*/ struct RankingHall2P hallRecords2P[FRONTIER_LVL_MODE_COUNT][HALL_RECORDS_COUNT]; // From record mixing.
/*0x624*/ u16 contestLinkResults[CONTEST_CATEGORIES_COUNT][CONTESTANT_COUNT];
/*0x64C*/ struct BattleFrontier frontier;
/*0xF2C*/ bool8 autoRun;
}; // sizeof=0xF2C
extern struct SaveBlock2 *gSaveBlock2Ptr;

6
include/option_plus_menu.h Executable file
View File

@@ -0,0 +1,6 @@
#ifndef GUARD_OPTION_PLUS_MENU_H
#define GUARD_OPTION_PLUS_MENU_H
void CB2_InitOptionPlusMenu(void);
#endif // GUARD_OPTION_PLUS_MENU_H

View File

@@ -152,7 +152,6 @@ enum
POKENAV_MENUITEM_MATCH_CALL,
POKENAV_MENUITEM_RIBBONS,
POKENAV_MENUITEM_SWITCH_OFF,
POKENAV_MENUITEM_CONDITION_ALLOW_MATCH_CALLS,
POKENAV_MENUITEM_CONDITION_PARTY,
POKENAV_MENUITEM_CONDITION_SEARCH,
POKENAV_MENUITEM_CONDITION_CANCEL,
@@ -240,7 +239,6 @@ enum RegionMapFuncIds
{
POKENAV_MENU_FUNC_NONE,
POKENAV_MENU_FUNC_MOVE_CURSOR,
POKENAV_MENU_FUNC_ALLOW_MATCH_CALLS,
POKENAV_MENU_FUNC_OPEN_CONDITION,
POKENAV_MENU_FUNC_RETURN_TO_MAIN,
POKENAV_MENU_FUNC_OPEN_CONDITION_SEARCH,

View File

@@ -305,6 +305,12 @@ extern const u8 gText_BattleSceneOn[];
extern const u8 gText_BattleSceneOff[];
extern const u8 gText_BattleStyleShift[];
extern const u8 gText_BattleStyleSet[];
extern const u8 gText_OptionMenuSave[]; //tx_optionsPlus
extern const u8 gText_FollowerEnable[]; //tx_optionsPlus
extern const u8 gText_AutorunEnable[]; //tx_optionsPlus
extern const u8 gText_OptionMatchCalls[]; //tx_optionsPlus
extern const u8 gText_OptionStyle[]; //tx_optionsPlus
extern const u8 gText_OptionDifficulty[]; //tx_optionsPlus
extern const u8 gText_AutorunOff[];
extern const u8 gText_AutorunOn[];
extern const u8 gText_SoundMono[];
@@ -351,7 +357,7 @@ extern const u8 gText_Birch_MainSpeech[];
extern const u8 gText_Birch_AndYouAre[];
extern const u8 gText_Birch_BoyOrGirl[];
extern const u8 gText_Birch_Difficulty[];
extern const u8 gText_Birch_Gamemode[];
extern const u8 gText_Birch_LockDifficulty[];
extern const u8 gText_Birch_Challenge[];
extern const u8 gText_Birch_WhatsYourName[];
extern const u8 gText_Birch_SoItsPlayer[];
@@ -2983,7 +2989,6 @@ extern const u8 gText_CheckMapOfHoenn[];
extern const u8 gText_CheckPokemonInDetail[];
extern const u8 gText_CallRegisteredTrainer[];
extern const u8 gText_CheckObtainedRibbons[];
extern const u8 gText_Pokenav_AllowCalls[];
extern const u8 gText_PutAwayPokenav[];
extern const u8 gText_CheckPartyPokemonInDetail[];
extern const u8 gText_CheckAllPokemonInDetail[];
@@ -2995,7 +3000,6 @@ extern const u8 gText_FindSmartPokemon[];
extern const u8 gText_FindToughPokemon[];
extern const u8 gText_ReturnToConditionMenu[];
extern const u8 gText_NoRibbonWinners[];
extern const u8 gText_Pokenav_AllowCallsYes[];
// Pokenav
extern const u8 gText_NumberIndex[];

View File

@@ -2225,7 +2225,7 @@ static u8 CreateNPCTrainerParty(struct Pokemon *party, u16 trainerNum, bool8 fir
}
else
CreateMon(&party[i], partyData[i].species, GetScaledLevel(partyData[i].lvl), fixedIV, TRUE, personalityValue, OT_ID_RANDOM_NO_SHINY, 0);
if (VarGet(VAR_DIFFICULTY) == DIFFICULTY_HARD) //only in hard mode
if (gSaveBlock2Ptr->optionsDifficulty == 2) //only in hard mode
{
if (partyData[i].species == SPECIES_SLAKING && gTrainers[trainerNum].trainerPic == TRAINER_PIC_LEADER_NORMAN //norman slaking code
&& gTrainers[trainerNum].trainerClass == TRAINER_CLASS_LEADER) //Set Norman's Slaking to have intimidate
@@ -2246,7 +2246,7 @@ static u8 CreateNPCTrainerParty(struct Pokemon *party, u16 trainerNum, bool8 fir
SetMonData(&party[i], MON_DATA_HELD_ITEM, &partyData[i].heldItem);
helditem = GetMonData(&party[i], MON_DATA_HELD_ITEM);
if (VarGet(VAR_DIFFICULTY) == DIFFICULTY_HARD) //only in hard mode
if (gSaveBlock2Ptr->optionsDifficulty == 2) //only in hard mode
{
if (partyData[i].species == SPECIES_ALTARIA && gTrainers[trainerNum].trainerPic == TRAINER_PIC_LEADER_WINONA
&& gTrainers[trainerNum].trainerClass == TRAINER_CLASS_LEADER)
@@ -4970,7 +4970,7 @@ 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)
&& (gSaveBlock2Ptr->optionsDifficulty == 2)
&& GetBattlerSide(battler1) == B_SIDE_PLAYER)
{
speedBattler1 = (speedBattler1 * 110) / 100;
@@ -5005,7 +5005,7 @@ 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)
&& (gSaveBlock2Ptr->optionsDifficulty == 2)
&& GetBattlerSide(battler2) == B_SIDE_PLAYER)
{
speedBattler2 = (speedBattler2 * 110) / 100;

View File

@@ -1165,10 +1165,10 @@ static void Cmd_accuracycheck(void)
calc = (calc * 130) / 100; // 1.3 compound eyes boost
if (WEATHER_HAS_EFFECT && gBattleMons[gBattlerTarget].ability == ABILITY_SAND_VEIL && gBattleWeather & B_WEATHER_SANDSTORM)
calc = (calc * 80) / 100; // 1.2 sand veil loss
if (VarGet(VAR_GAMEMODE) == GAMEMODE_CLASSIC)
if (gSaveBlock2Ptr->optionStyle == 1)
if (gBattleMons[gBattlerAttacker].ability == ABILITY_HUSTLE && IS_TYPE_PHYSICAL(type))
calc = (calc * 80) / 100; // 1.2 hustle loss
if (VarGet(VAR_GAMEMODE) == GAMEMODE_MODERN)
if (gSaveBlock2Ptr->optionStyle == 0)
if (gBattleMons[gBattlerAttacker].ability == ABILITY_HUSTLE && IS_MOVE_PHYSICAL(move))
calc = (calc * 80) / 100; // 1.2 hustle loss
@@ -1995,7 +1995,7 @@ static void Cmd_datahpupdate(void)
if (!gSpecialStatuses[gActiveBattler].dmg && !(gHitMarker & HITMARKER_PASSIVE_DAMAGE))
gSpecialStatuses[gActiveBattler].dmg = gHpDealt;
if (VarGet(VAR_GAMEMODE) == GAMEMODE_MODERN)
if (gSaveBlock2Ptr->optionStyle == 0)
if (IS_MOVE_PHYSICAL(gCurrentMove) && !(gHitMarker & HITMARKER_PASSIVE_DAMAGE) && gCurrentMove != MOVE_PAIN_SPLIT)
{
gProtectStructs[gActiveBattler].physicalDmg = gHpDealt;
@@ -2026,7 +2026,7 @@ static void Cmd_datahpupdate(void)
gSpecialStatuses[gActiveBattler].specialBattlerId = gBattlerTarget;
}
}
if (VarGet(VAR_GAMEMODE) == GAMEMODE_CLASSIC)
if (gSaveBlock2Ptr->optionStyle == 1)
if (IS_TYPE_PHYSICAL(moveType) && !(gHitMarker & HITMARKER_PASSIVE_DAMAGE) && gCurrentMove != MOVE_PAIN_SPLIT)
{
gProtectStructs[gActiveBattler].physicalDmg = gHpDealt;
@@ -3405,9 +3405,9 @@ static void Cmd_getexp(void)
}
}
if (VarGet(VAR_DIFFICULTY) == DIFFICULTY_HARD) //exp decrease for hard mode
if (gSaveBlock2Ptr->optionsDifficulty == 2) //exp decrease for hard mode
calculatedExp *= 0.65;
if (VarGet(VAR_DIFFICULTY) == DIFFICULTY_EASY) //exp decrease for easy mode
if (gSaveBlock2Ptr->optionsDifficulty == 0) //exp decrease for easy mode
calculatedExp *= 1.2;
*exp = SAFE_DIV(calculatedExp, viaSentIn);

View File

@@ -887,9 +887,9 @@ u8 GetScaledLevel(u8 lvl)
else
levelScaling = 1;
if (VarGet(VAR_DIFFICULTY) == DIFFICULTY_HARD)
if (gSaveBlock2Ptr->optionsDifficulty == 2)
lvl += levelScaling;
else if (VarGet(VAR_DIFFICULTY) == DIFFICULTY_EASY)
else if (gSaveBlock2Ptr->optionsDifficulty == 0)
lvl -= levelScaling;
if (lvl > 100)

View File

@@ -1246,14 +1246,14 @@ static void AddMovePoints(u8 caseId, u16 arg1, u8 arg2, u8 arg3)
}
break;
case PTS_REFLECT:
if (VarGet(VAR_GAMEMODE) == GAMEMODE_MODERN)
if (gSaveBlock2Ptr->optionStyle == 0)
// If hit Reflect with damaging physical move
if (IS_MOVE_PHYSICAL(gCurrentMove) && power != 0 && tvPtr->side[defSide].reflectMonId != 0)
{
u32 id = (tvPtr->side[defSide].reflectMonId - 1) * 4;
movePoints->points[defSide][id + tvPtr->side[defSide].reflectMoveSlot] += sPointsArray[caseId][0];
}
if (VarGet(VAR_GAMEMODE) == GAMEMODE_CLASSIC)
if (gSaveBlock2Ptr->optionStyle == 1)
// If hit Reflect with damaging physical move
if (IS_TYPE_PHYSICAL(type) && power != 0 && tvPtr->side[defSide].reflectMonId != 0)
{
@@ -1262,14 +1262,14 @@ static void AddMovePoints(u8 caseId, u16 arg1, u8 arg2, u8 arg3)
}
break;
case PTS_LIGHT_SCREEN:
if (VarGet(VAR_GAMEMODE) == GAMEMODE_MODERN)
if (gSaveBlock2Ptr->optionStyle == 0)
// If hit Light Screen with damaging special move
if (IS_MOVE_SPECIAL(gCurrentMove) && power != 0 && tvPtr->side[defSide].lightScreenMonId != 0)
{
u32 id = (tvPtr->side[defSide].lightScreenMonId - 1) * 4;
movePoints->points[defSide][id + tvPtr->side[defSide].lightScreenMoveSlot] += sPointsArray[caseId][0];
}
if (VarGet(VAR_GAMEMODE) == GAMEMODE_CLASSIC)
if (gSaveBlock2Ptr->optionStyle == 1)
// If hit Light Screen with damaging special move
if (!IS_TYPE_PHYSICAL(type) && power != 0 && tvPtr->side[defSide].lightScreenMonId != 0)
{

View File

@@ -12,6 +12,7 @@ static const u8 sScrollDistances[] = {
[OPTIONS_TEXT_SPEED_SLOW] = 1,
[OPTIONS_TEXT_SPEED_MID] = 2,
[OPTIONS_TEXT_SPEED_FAST] = 4,
[OPTIONS_TEXT_SPEED_FASTER] = 4,
};
static const u16 sFont_Braille[] = INCBIN_U16("graphics/fonts/braille.fwjpnfont");

View File

@@ -1882,7 +1882,10 @@ static bool8 GetMonInfo(struct Pokemon * mon, u16 *species, u8 *form, u8 *shiny)
// Retrieve graphic information about the following pokemon, if any
static bool8 GetFollowerInfo(u16 *species, u8 *form, u8 *shiny)
{
if (gSaveBlock2Ptr->optionsfollowerEnable == 0)
return GetMonInfo(GetFirstLiveMon(), species, form, shiny);
else
return;
}
void UpdateFollowingPokemon(void) { // Update following pokemon if any
@@ -1891,36 +1894,35 @@ void UpdateFollowingPokemon(void) { // Update following pokemon if any
u16 species;
bool8 shiny;
u8 form;
if (FlagGet(FLAG_ENABLE_FOLLOWER) == TRUE) //if enabled, enable following mons
// Avoid spawning large (64x64) follower pokemon inside buildings
if (GetFollowerInfo(&species, &form, &shiny) && !(gMapHeader.mapType == MAP_TYPE_INDOOR && SpeciesToGraphicsInfo(species, 0)->height == 64) && !FlagGet(FLAG_TEMP_HIDE_FOLLOWER)) {
if (objEvent == NULL) { // Spawn follower
struct ObjectEventTemplate template = {
.localId = OBJ_EVENT_ID_FOLLOWER,
.graphicsId = OBJ_EVENT_GFX_MON_BASE + species,
.flagId = 0,
.x = gSaveBlock1Ptr->pos.x,
.y = gSaveBlock1Ptr->pos.y,
// If player active, copy player elevation
.elevation = gObjectEvents[gPlayerAvatar.objectEventId].active ? gObjectEvents[gPlayerAvatar.objectEventId].currentElevation : 3,
.movementType = MOVEMENT_TYPE_FOLLOW_PLAYER,
// store form info in template
.trainerRange_berryTreeId = (form & 0x1F) | (shiny << 5),
};
objEvent = &gObjectEvents[SpawnSpecialObjectEvent(&template)];
objEvent->invisible = TRUE;
}
sprite = &gSprites[objEvent->spriteId];
// Follower appearance changed; move to player and set invisible
if (species != OW_SPECIES(objEvent) || shiny != objEvent->shiny || form != OW_FORM(objEvent)) {
MoveObjectEventToMapCoords(objEvent, gObjectEvents[gPlayerAvatar.objectEventId].currentCoords.x, gObjectEvents[gPlayerAvatar.objectEventId].currentCoords.y);
FollowerSetGraphics(objEvent, species, form, shiny, TRUE);
objEvent->invisible = TRUE;
}
sprite->data[6] = 0; // set animation data
} else {
RemoveFollowingPokemon();
// Avoid spawning large (64x64) follower pokemon inside buildings
if (GetFollowerInfo(&species, &form, &shiny) && !(gMapHeader.mapType == MAP_TYPE_INDOOR && SpeciesToGraphicsInfo(species, 0)->height == 64) && !FlagGet(FLAG_TEMP_HIDE_FOLLOWER)) {
if (objEvent == NULL) { // Spawn follower
struct ObjectEventTemplate template = {
.localId = OBJ_EVENT_ID_FOLLOWER,
.graphicsId = OBJ_EVENT_GFX_MON_BASE + species,
.flagId = 0,
.x = gSaveBlock1Ptr->pos.x,
.y = gSaveBlock1Ptr->pos.y,
// If player active, copy player elevation
.elevation = gObjectEvents[gPlayerAvatar.objectEventId].active ? gObjectEvents[gPlayerAvatar.objectEventId].currentElevation : 3,
.movementType = MOVEMENT_TYPE_FOLLOW_PLAYER,
// store form info in template
.trainerRange_berryTreeId = (form & 0x1F) | (shiny << 5),
};
objEvent = &gObjectEvents[SpawnSpecialObjectEvent(&template)];
objEvent->invisible = TRUE;
}
sprite = &gSprites[objEvent->spriteId];
// Follower appearance changed; move to player and set invisible
if (species != OW_SPECIES(objEvent) || shiny != objEvent->shiny || form != OW_FORM(objEvent)) {
MoveObjectEventToMapCoords(objEvent, gObjectEvents[gPlayerAvatar.objectEventId].currentCoords.x, gObjectEvents[gPlayerAvatar.objectEventId].currentCoords.y);
FollowerSetGraphics(objEvent, species, form, shiny, TRUE);
objEvent->invisible = TRUE;
}
sprite->data[6] = 0; // set animation data
} else {
RemoveFollowingPokemon();
}
}
void RemoveFollowingPokemon(void) { // Remove follower object. Idempotent.

View File

@@ -606,11 +606,11 @@ static void PlayerNotOnBikeTurningInPlace(u8 direction, u16 heldKeys)
static bool8 IsPlayerTryingToRun(u16 heldKeys)
{
if (gSaveBlock2Ptr->autoRun)
return TRUE;
else if (heldKeys & B_BUTTON)
return TRUE;
return FALSE;
if (gSaveBlock2Ptr->optionsautoRun == 0)
return TRUE;
else if (heldKeys & B_BUTTON)
return TRUE;
return FALSE;
}
static void PlayerNotOnBikeMoving(u8 direction, u16 heldKeys)
@@ -652,7 +652,7 @@ static void PlayerNotOnBikeMoving(u8 direction, u16 heldKeys)
if (!(gPlayerAvatar.flags & PLAYER_AVATAR_FLAG_UNDERWATER) && IsPlayerTryingToRun(heldKeys) && FlagGet(FLAG_SYS_B_DASH)
&& IsRunningDisallowed(gObjectEvents[gPlayerAvatar.objectEventId].currentMetatileBehavior) == 0)
{
if (heldKeys & B_BUTTON && gSaveBlock2Ptr->autoRun == TRUE)
if (heldKeys & B_BUTTON && gSaveBlock2Ptr->optionsautoRun == 0)
{
PlayerWalkNormal(direction);
}

View File

@@ -2016,11 +2016,11 @@ static void AppendIfValid(u16 species, u16 heldItem, u16 hp, u8 lvlMode, u8 monL
{
s32 i = 0;
u16* gFrontierBannedSpecies;
if (VarGet(VAR_DIFFICULTY) == DIFFICULTY_NORMAL)
if (gSaveBlock2Ptr->optionsDifficulty == 1)
gFrontierBannedSpecies = gFrontierBannedSpeciesNormal;
if (VarGet(VAR_DIFFICULTY) == DIFFICULTY_EASY)
if (gSaveBlock2Ptr->optionsDifficulty == 0)
gFrontierBannedSpecies = gFrontierBannedSpeciesEasy;
if (VarGet(VAR_DIFFICULTY) == DIFFICULTY_HARD)
if (gSaveBlock2Ptr->optionsDifficulty == 2)
gFrontierBannedSpecies = gFrontierBannedSpeciesHard;
if (species == SPECIES_EGG || species == SPECIES_NONE)
@@ -2118,11 +2118,11 @@ static void CheckPartyIneligibility(void)
s32 i;
s32 caughtBannedMons = 0;
u16* gFrontierBannedSpecies;
if (VarGet(VAR_DIFFICULTY) == DIFFICULTY_NORMAL)
if (gSaveBlock2Ptr->optionsDifficulty == 1)
gFrontierBannedSpecies = gFrontierBannedSpeciesNormal;
if (VarGet(VAR_DIFFICULTY) == DIFFICULTY_EASY)
if (gSaveBlock2Ptr->optionsDifficulty == 0)
gFrontierBannedSpecies = gFrontierBannedSpeciesEasy;
if (VarGet(VAR_DIFFICULTY) == DIFFICULTY_HARD)
if (gSaveBlock2Ptr->optionsDifficulty == 2)
gFrontierBannedSpecies = gFrontierBannedSpeciesHard;
s32 species = gFrontierBannedSpecies[0];
for (i = 0; species != 0xFFFF; i++, species = gFrontierBannedSpecies[i])

View File

@@ -500,8 +500,8 @@ static const struct MenuAction sMenuActions_Difficulty[] = {
};
static const struct MenuAction sMenuActions_Gamemode[] = {
{gText_Classic, NULL},
{gText_Modern, NULL}
{gText_No, NULL},
{gText_Yes, NULL}
};
static const u8 *const sMalePresetNames[] = {
@@ -1678,29 +1678,32 @@ static void Task_NewGameBirchSpeech_ChooseDifficulty(u8 taskId)
{
case 0:
PlaySE(SE_SELECT);
VarSet(VAR_DIFFICULTY, 2); //easy
gSaveBlock2Ptr->optionsDifficulty = 0; //easy
FlagClear(FLAG_DIFFICULTY_HARD);
NewGameBirchSpeech_ClearDifficultyWindow(1, 1);
gTasks[taskId].func = Task_NewGameBirchSpeech_Gamemode;
break;
case 1:
PlaySE(SE_SELECT);
VarSet(VAR_DIFFICULTY, 0); //normal
gSaveBlock2Ptr->optionsDifficulty = 1; //normal
FlagClear(FLAG_DIFFICULTY_HARD);
NewGameBirchSpeech_ClearDifficultyWindow(1, 1);
gTasks[taskId].func = Task_NewGameBirchSpeech_Gamemode;
break;
case 2:
PlaySE(SE_SELECT);
VarSet(VAR_DIFFICULTY, 1); //hard
gSaveBlock2Ptr->optionsDifficulty = 2; //hard
FlagSet(FLAG_DIFFICULTY_HARD);
NewGameBirchSpeech_ClearDifficultyWindow(1, 1);
gTasks[taskId].func = Task_NewGameBirchSpeech_Gamemode;
break;
}
}
static void Task_NewGameBirchSpeech_Gamemode(u8 taskId) //gamemode
static void Task_NewGameBirchSpeech_Gamemode(u8 taskId) //Lock difficulty
{
NewGameBirchSpeech_ClearWindow(0);
StringExpandPlaceholders(gStringVar4, gText_Birch_Gamemode);
StringExpandPlaceholders(gStringVar4, gText_Birch_LockDifficulty);
AddTextPrinterForMessage(TRUE);
gTasks[taskId].func = Task_NewGameBirchSpeech_WaitToShowGamemodeMenu;
}
@@ -1721,13 +1724,13 @@ static void Task_NewGameBirchSpeech_ChooseGamemode(u8 taskId)
{
case 0:
PlaySE(SE_SELECT);
VarSet(VAR_GAMEMODE, 0); //CLASSIC
FlagClear(FLAG_LOCK_DIFFICULTY); //Don't lock
NewGameBirchSpeech_ClearGamemodeWindow(1, 1);
gTasks[taskId].func = Task_NewGameBirchSpeech_Challenge;
break;
case 1:
PlaySE(SE_SELECT);
VarSet(VAR_GAMEMODE, 1); //MODERN
FlagSet(FLAG_LOCK_DIFFICULTY); //Yes lock
NewGameBirchSpeech_ClearGamemodeWindow(1, 1);
gTasks[taskId].func = Task_NewGameBirchSpeech_Challenge;
break;
@@ -2311,12 +2314,12 @@ static s8 NewGameBirchSpeech_ProcessDifficultyMenuInput(void)
static void NewGameBirchSpeech_ShowGamemodeMenu(void)
{
DrawMainMenuWindowBorder(&sNewGameBirchSpeechTextWindows[4], 0xF3);
FillWindowPixelBuffer(4, PIXEL_FILL(1));
PrintMenuTable(4, 2, sMenuActions_Gamemode);
InitMenuInUpperLeftCornerNormal(4, 2, 0);
PutWindowTilemap(4);
CopyWindowToVram(4, COPYWIN_FULL);
DrawMainMenuWindowBorder(&sNewGameBirchSpeechTextWindows[1], 0xF3);
FillWindowPixelBuffer(1, PIXEL_FILL(1));
PrintMenuTable(1, ARRAY_COUNT(sMenuActions_Gamemode), sMenuActions_Gamemode);
InitMenuInUpperLeftCornerNormal(1, ARRAY_COUNT(sMenuActions_Gamemode), 0);
PutWindowTilemap(1);
CopyWindowToVram(1, COPYWIN_FULL);
}
static s8 NewGameBirchSpeech_ProcessGamemodeMenuInput(void)
@@ -2475,7 +2478,7 @@ static void NewGameBirchSpeech_ClearDifficultyWindow(u8 windowId, bool8 copyToVr
static void NewGameBirchSpeech_ClearGamemodeWindowTilemap(u8 bg, u8 x, u8 y, u8 width, u8 height, u8 unused)
{
FillBgTilemapBufferRect(bg, 0, x + 255, y + 255, width + 3, height + 3, 2);
FillBgTilemapBufferRect(bg, 0, x + 255, y + 255, width + 2, height + 2, 2);
}
static void NewGameBirchSpeech_ClearGamemodeWindow(u8 windowId, bool8 copyToVram)

View File

@@ -1154,6 +1154,9 @@ static u32 GetActiveMatchCallTrainerId(u32 activeMatchCallId)
*/
bool32 TryStartMatchCall(void)
{
if (gSaveBlock2Ptr->optionsDisableMatchCall == 1) //tx_optionsPlus
return FALSE;
if (FlagGet(FLAG_HAS_MATCH_CALL)
&& UpdateMatchCallStepCounter()
&& UpdateMatchCallMinutesCounter()

View File

@@ -78,7 +78,8 @@ static const u8 sTextSpeedFrameDelays[] =
{
[OPTIONS_TEXT_SPEED_SLOW] = 8,
[OPTIONS_TEXT_SPEED_MID] = 4,
[OPTIONS_TEXT_SPEED_FAST] = 1
[OPTIONS_TEXT_SPEED_FAST] = 1,
[OPTIONS_TEXT_SPEED_FASTER] = 1
};
static const struct WindowTemplate sStandardTextBox_WindowTemplates[] =
@@ -484,8 +485,8 @@ u32 GetPlayerTextSpeed(void)
u8 GetPlayerTextSpeedDelay(void)
{
u32 speed;
if (gSaveBlock2Ptr->optionsTextSpeed > OPTIONS_TEXT_SPEED_FAST)
gSaveBlock2Ptr->optionsTextSpeed = OPTIONS_TEXT_SPEED_MID;
if (gSaveBlock2Ptr->optionsTextSpeed > OPTIONS_TEXT_SPEED_FASTER)
gSaveBlock2Ptr->optionsTextSpeed = OPTIONS_TEXT_SPEED_FAST;
speed = GetPlayerTextSpeed();
return sTextSpeedFrameDelays[speed];
}

View File

@@ -97,6 +97,11 @@ static void SetDefaultOptions(void)
gSaveBlock2Ptr->optionsBattleStyle = OPTIONS_BATTLE_STYLE_SET;
gSaveBlock2Ptr->optionsBattleSceneOff = FALSE;
gSaveBlock2Ptr->regionMapZoom = FALSE;
gSaveBlock2Ptr->optionsDifficulty = 1;
gSaveBlock2Ptr->optionsfollowerEnable = 0;
gSaveBlock2Ptr->optionsautoRun = 1;
gSaveBlock2Ptr->optionsDisableMatchCall = 0;
gSaveBlock2Ptr->optionStyle = 1;
}
static void ClearPokedexFlags(void)
@@ -150,8 +155,9 @@ void ResetMenuAndMonGlobals(void)
void NewGameInitData(void)
{
bool8 difficultyPrev = VarGet(VAR_DIFFICULTY);
bool8 gamemodePrev = VarGet(VAR_GAMEMODE);
//bool8 difficultyPrev = VarGet(VAR_DIFFICULTY);
bool8 HardPrev = FlagGet(FLAG_DIFFICULTY_HARD);
bool8 lockPrev = FlagGet(FLAG_LOCK_DIFFICULTY);
if (gSaveFileStatus == SAVE_STATUS_EMPTY || gSaveFileStatus == SAVE_STATUS_CORRUPT)
RtcReset();
@@ -209,20 +215,17 @@ void NewGameInitData(void)
WipeTrainerNameRecords();
ResetTrainerHillResults();
ResetContestLinkResults();
gSaveBlock2Ptr->expShare = 0; //unused but not removed just in case
gSaveBlock2Ptr->autoRun = FALSE;
if (difficultyPrev == DIFFICULTY_EASY)
HardPrev ? FlagSet(FLAG_DIFFICULTY_HARD) : FlagClear(FLAG_DIFFICULTY_HARD);
lockPrev ? FlagSet(FLAG_LOCK_DIFFICULTY) : FlagClear(FLAG_LOCK_DIFFICULTY);
/*if (difficultyPrev == DIFFICULTY_EASY)
VarSet(VAR_DIFFICULTY, DIFFICULTY_EASY);
else if (difficultyPrev == DIFFICULTY_NORMAL)
VarSet(VAR_DIFFICULTY, DIFFICULTY_NORMAL);
else if (difficultyPrev == DIFFICULTY_HARD)
VarSet(VAR_DIFFICULTY, DIFFICULTY_HARD);
VarSet(VAR_DIFFICULTY, DIFFICULTY_HARD);*/
if (gamemodePrev == GAMEMODE_CLASSIC)
VarSet(VAR_GAMEMODE, GAMEMODE_CLASSIC);
else if (gamemodePrev == GAMEMODE_MODERN)
VarSet(VAR_GAMEMODE, GAMEMODE_MODERN);
}
static void ResetMiniGamesRecords(void)

View File

@@ -19,6 +19,9 @@
#include "constants/rgb.h"
#include "constants/songs.h"
#include "event_data.h"
#include "option_plus_menu.h"
#define useOptionPlusMenu TRUE
#define tMenuSelection data[0]
#define tTextSpeed data[1]
@@ -161,6 +164,12 @@ static void VBlankCB(void)
void CB2_InitOptionMenu(void)
{
if (useOptionPlusMenu)
{
CB2_InitOptionPlusMenu();
return;
}
switch (gMain.state)
{
default:
@@ -241,7 +250,7 @@ void CB2_InitOptionMenu(void)
gTasks[taskId].tTextSpeed = gSaveBlock2Ptr->optionsTextSpeed;
gTasks[taskId].tBattleSceneOff = gSaveBlock2Ptr->optionsBattleSceneOff;
gTasks[taskId].tBattleStyle = gSaveBlock2Ptr->optionsBattleStyle;
gTasks[taskId].tAutorun = gSaveBlock2Ptr->autoRun;
//gTasks[taskId].tAutorun = gSaveBlock2Ptr->optionsautoRun;
gTasks[taskId].tSound = gSaveBlock2Ptr->optionsSound;
gTasks[taskId].tButtonMode = gSaveBlock2Ptr->optionsButtonMode;
gTasks[taskId].tWindowFrameType = gSaveBlock2Ptr->optionsWindowFrameType;
@@ -486,7 +495,7 @@ static void BattleScene_DrawChoices(u8 selection)
static u8 BattleStyle_ProcessInput(u8 selection)
{
if (JOY_NEW(DPAD_LEFT | DPAD_RIGHT))
if (VarGet(VAR_DIFFICULTY) == DIFFICULTY_HARD)
if (gSaveBlock2Ptr->optionsDifficulty == 2)
{
PlaySE(SE_FAILURE);
}
@@ -532,11 +541,11 @@ static void Autorun_DrawChoices(u8 selection)
if (selection == 0)
{
gSaveBlock2Ptr->autoRun = FALSE;
//gSaveBlock2Ptr->optionsautoRun = FALSE;
}
else
{
gSaveBlock2Ptr->autoRun = TRUE;
//gSaveBlock2Ptr->optionsautoRun = TRUE;
}
DrawOptionMenuChoice(gText_AutorunOff, 104, YPOS_AUTORUN, styles[0]);

1246
src/options_plus_menu.c Executable file

File diff suppressed because it is too large Load Diff

View File

@@ -5723,11 +5723,11 @@ static bool8 GetBattleEntryEligibility(struct Pokemon *mon)
u16 i = 0;
u16 species;
u16* gFrontierBannedSpecies;
if (VarGet(VAR_DIFFICULTY) == DIFFICULTY_NORMAL)
if (gSaveBlock2Ptr->optionsDifficulty == 1)
gFrontierBannedSpecies = gFrontierBannedSpeciesNormal;
if (VarGet(VAR_DIFFICULTY) == DIFFICULTY_EASY)
if (gSaveBlock2Ptr->optionsDifficulty == 0)
gFrontierBannedSpecies = gFrontierBannedSpeciesEasy;
if (VarGet(VAR_DIFFICULTY) == DIFFICULTY_HARD)
if (gSaveBlock2Ptr->optionsDifficulty == 2)
gFrontierBannedSpecies = gFrontierBannedSpeciesHard;
if (GetMonData(mon, MON_DATA_IS_EGG)

View File

@@ -5904,7 +5904,7 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de
// Apply type-bonus hold item
for (i = 0; i < ARRAY_COUNT(sHoldEffectToType); i++)
{
if (VarGet(VAR_GAMEMODE) == GAMEMODE_CLASSIC)
if (gSaveBlock2Ptr->optionStyle == 1)
if (attackerHoldEffect == sHoldEffectToType[i][0]
&& type == sHoldEffectToType[i][1])
{
@@ -5914,7 +5914,7 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de
spAttack = (spAttack * (attackerHoldEffectParam + 100)) / 100;
break;
}
if (VarGet(VAR_GAMEMODE) == GAMEMODE_MODERN)
if (gSaveBlock2Ptr->optionStyle == 0)
if (attackerHoldEffect == sHoldEffectToType[i][0]
&& type == sHoldEffectToType[i][1])
{
@@ -5943,10 +5943,10 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de
attack *= 2;
// Apply abilities / field sports
if (VarGet(VAR_GAMEMODE) == GAMEMODE_MODERN)
if (gSaveBlock2Ptr->optionStyle == 0)
if (defender->ability == ABILITY_THICK_FAT && (type == TYPE_FIRE || type == TYPE_ICE))
gBattleMovePower /= 2;
if (VarGet(VAR_GAMEMODE) ==GAMEMODE_CLASSIC)
if (gSaveBlock2Ptr->optionStyle == 1)
if (defender->ability == ABILITY_THICK_FAT && (type == TYPE_FIRE || type == TYPE_ICE))
spAttack /= 2;
if (attacker->ability == ABILITY_HUSTLE)
@@ -5975,7 +5975,7 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de
// Self-destruct / Explosion cut defense in half
if (gBattleMoves[gCurrentMove].effect == EFFECT_EXPLOSION)
defense /= 2;
if (VarGet(VAR_GAMEMODE) == GAMEMODE_MODERN)
if (gSaveBlock2Ptr->optionStyle == 0)
if (IS_MOVE_PHYSICAL(gCurrentMove))
{
if (gCritMultiplier == 2)
@@ -6027,7 +6027,7 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de
if (damage == 0)
damage = 1;
}
if (VarGet(VAR_GAMEMODE) == GAMEMODE_CLASSIC)
if (gSaveBlock2Ptr->optionStyle == 1)
if (IS_TYPE_PHYSICAL(type))
{
if (gCritMultiplier == 2)
@@ -6083,7 +6083,7 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de
if (type == TYPE_MYSTERY)
damage = 0; // is ??? type. does 0 damage.
if (VarGet(VAR_GAMEMODE) == GAMEMODE_MODERN)
if (gSaveBlock2Ptr->optionStyle == 0)
if (IS_MOVE_SPECIAL(gCurrentMove))
{
if (gCritMultiplier == 2)
@@ -6128,7 +6128,7 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de
damage /= 2;
}
if (VarGet(VAR_GAMEMODE) == GAMEMODE_CLASSIC)
if (gSaveBlock2Ptr->optionStyle == 1)
if (IS_TYPE_SPECIAL(type))
{
if (gCritMultiplier == 2)
@@ -6214,7 +6214,7 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de
}
// Are effects of weather negated with cloud nine or air lock
if (VarGet(VAR_GAMEMODE) == GAMEMODE_MODERN)
if (gSaveBlock2Ptr->optionStyle == 0)
if (WEATHER_HAS_EFFECT2)
{
// Rain weakens Fire, boosts Water
@@ -6292,7 +6292,7 @@ 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)
if (gSaveBlock2Ptr->optionsDifficulty == 2)
return FALSE;
else if (GetBattlerSide(battlerId) != B_SIDE_PLAYER)
return FALSE;

View File

@@ -4,11 +4,6 @@
#include "main.h"
#include "sound.h"
#include "constants/songs.h"
#include "task.h"
#include "palette.h"
#include "script.h"
#include "overworld.h"
#include "event_scripts.h"
struct Pokenav_Menu
{
@@ -42,7 +37,7 @@ static const u8 sLastCursorPositions[] =
[POKENAV_MENU_TYPE_DEFAULT] = 2,
[POKENAV_MENU_TYPE_UNLOCK_MC] = 3,
[POKENAV_MENU_TYPE_UNLOCK_MC_RIBBONS] = 4,
[POKENAV_MENU_TYPE_CONDITION] = 3,
[POKENAV_MENU_TYPE_CONDITION] = 2,
[POKENAV_MENU_TYPE_CONDITION_SEARCH] = 5
};
@@ -71,11 +66,10 @@ static const u8 sMenuItems[][MAX_POKENAV_MENUITEMS] =
},
[POKENAV_MENU_TYPE_CONDITION] =
{
POKENAV_MENUITEM_CONDITION_ALLOW_MATCH_CALLS,
POKENAV_MENUITEM_CONDITION_PARTY,
POKENAV_MENUITEM_CONDITION_SEARCH,
POKENAV_MENUITEM_CONDITION_CANCEL,
[4 ... MAX_POKENAV_MENUITEMS - 1] = POKENAV_MENUITEM_SWITCH_OFF
[3 ... MAX_POKENAV_MENUITEMS - 1] = POKENAV_MENUITEM_SWITCH_OFF
},
[POKENAV_MENU_TYPE_CONDITION_SEARCH] =
{
@@ -152,7 +146,7 @@ bool32 PokenavCallback_Init_ConditionMenu(void)
menu->menuType = POKENAV_MENU_TYPE_CONDITION;
menu->cursorPos = 0; //party
menu->currMenuItem = POKENAV_MENUITEM_CONDITION_ALLOW_MATCH_CALLS;
menu->currMenuItem = POKENAV_MENUITEM_CONDITION_PARTY;
menu->helpBarIndex = HELPBAR_NONE;
SetMenuInputHandler(menu);
return TRUE;
@@ -344,23 +338,6 @@ static u32 HandleCantOpenRibbonsInput(struct Pokenav_Menu *menu)
return POKENAV_MENU_FUNC_NONE;
}
static u32 HandleAllowMatchCalls(struct Pokenav_Menu *menu)
{
if (UpdateMenuCursorPos(menu))
{
menu->callback = HandleConditionMenuInput;
return POKENAV_MENU_FUNC_MOVE_CURSOR;
}
if (JOY_NEW(A_BUTTON | B_BUTTON))
{
menu->callback = HandleConditionMenuInput;
return POKENAV_MENU_FUNC_RESHOW_DESCRIPTION;
}
return POKENAV_MENU_FUNC_NONE;
}
static u32 HandleConditionMenuInput(struct Pokenav_Menu *menu)
{
if (UpdateMenuCursorPos(menu))
@@ -376,19 +353,6 @@ static u32 HandleConditionMenuInput(struct Pokenav_Menu *menu)
menu->currMenuItem = sMenuItems[POKENAV_MENU_TYPE_CONDITION_SEARCH][0];
menu->callback = HandleConditionSearchMenuInput;
return POKENAV_MENU_FUNC_OPEN_CONDITION_SEARCH;
case POKENAV_MENUITEM_CONDITION_ALLOW_MATCH_CALLS:
if (FlagGet(FLAG_HAS_MATCH_CALL) == TRUE)
{
PlaySE(SE_PC_OFF);
FlagClear(FLAG_HAS_MATCH_CALL);
}
else
{
PlaySE(SE_PC_ON);
FlagSet(FLAG_HAS_MATCH_CALL);
}
//menu->callback = HandleAllowMatchCalls;
return POKENAV_MENU_FUNC_ALLOW_MATCH_CALLS;
case POKENAV_MENUITEM_CONDITION_PARTY:
menu->helpBarIndex = 0;
SetMenuIdAndCB(menu, POKENAV_CONDITION_GRAPH_PARTY);

View File

@@ -1,7 +1,6 @@
#include "global.h"
#include "malloc.h"
#include "decompress.h"
#include "event_data.h"
#include "bg.h"
#include "palette.h"
#include "trig.h"
@@ -85,8 +84,6 @@ static void DestroyRematchBlueLightSprite(void);
static void AddOptionDescriptionWindow(void);
static void PrintCurrentOptionDescription(void);
static void PrintNoRibbonWinners(void);
static void PrintAllowMatchCallsYes(void);
static void PrintAllowMatchCallsNo(void);
static bool32 IsDma3ManagerBusyWithBgCopy_(void);
static void CreateMovingBgDotsTask(void);
static void DestroyMovingDotsBgTask(void);
@@ -150,15 +147,14 @@ static const LoopedTask sMenuHandlerLoopTaskFuncs[] =
[POKENAV_MENU_FUNC_RETURN_TO_CONDITION] = LoopedTask_ReturnToConditionMenu,
[POKENAV_MENU_FUNC_NO_RIBBON_WINNERS] = LoopedTask_SelectRibbonsNoWinners,
[POKENAV_MENU_FUNC_RESHOW_DESCRIPTION] = LoopedTask_ReShowDescription,
[POKENAV_MENU_FUNC_OPEN_FEATURE] = LoopedTask_OpenPokenavFeature,
[POKENAV_MENU_FUNC_ALLOW_MATCH_CALLS] = LoopedTask_AllowMatchCalls
[POKENAV_MENU_FUNC_OPEN_FEATURE] = LoopedTask_OpenPokenavFeature
};
static const struct CompressedSpriteSheet sPokenavOptionsSpriteSheets[] =
{
{
.data = gPokenavOptions_Gfx,
.size = 0x3800,
.size = 0x3400,
.tag = GFXTAG_OPTIONS
},
{
@@ -185,15 +181,14 @@ static const u16 sOptionsLabelGfx_Condition[] = {0x020, PALTAG_OPTIONS_BLUE - PA
static const u16 sOptionsLabelGfx_MatchCall[] = {0x040, PALTAG_OPTIONS_RED - PALTAG_OPTIONS_START};
static const u16 sOptionsLabelGfx_Ribbons[] = {0x060, PALTAG_OPTIONS_PINK - PALTAG_OPTIONS_START};
static const u16 sOptionsLabelGfx_SwitchOff[] = {0x080, PALTAG_OPTIONS_BEIGE - PALTAG_OPTIONS_START};
static const u16 sOptionsLabelGfx_AllowMatchCalls[] = {0x0A0, PALTAG_OPTIONS_RED - PALTAG_OPTIONS_START};
static const u16 sOptionsLabelGfx_Party[] = {0x0C0, PALTAG_OPTIONS_BLUE - PALTAG_OPTIONS_START};
static const u16 sOptionsLabelGfx_Search[] = {0x0E0, PALTAG_OPTIONS_BLUE - PALTAG_OPTIONS_START};
static const u16 sOptionsLabelGfx_Cool[] = {0x100, PALTAG_OPTIONS_RED - PALTAG_OPTIONS_START};
static const u16 sOptionsLabelGfx_Beauty[] = {0x120, PALTAG_OPTIONS_BLUE - PALTAG_OPTIONS_START};
static const u16 sOptionsLabelGfx_Cute[] = {0x140, PALTAG_OPTIONS_PINK - PALTAG_OPTIONS_START};
static const u16 sOptionsLabelGfx_Smart[] = {0x160, PALTAG_OPTIONS_DEFAULT - PALTAG_OPTIONS_START};
static const u16 sOptionsLabelGfx_Tough[] = {0x180, PALTAG_OPTIONS_DEFAULT - PALTAG_OPTIONS_START};
static const u16 sOptionsLabelGfx_Cancel[] = {0x1A0, PALTAG_OPTIONS_BEIGE - PALTAG_OPTIONS_START};
static const u16 sOptionsLabelGfx_Party[] = {0x0A0, PALTAG_OPTIONS_BLUE - PALTAG_OPTIONS_START};
static const u16 sOptionsLabelGfx_Search[] = {0x0C0, PALTAG_OPTIONS_BLUE - PALTAG_OPTIONS_START};
static const u16 sOptionsLabelGfx_Cool[] = {0x0E0, PALTAG_OPTIONS_RED - PALTAG_OPTIONS_START};
static const u16 sOptionsLabelGfx_Beauty[] = {0x100, PALTAG_OPTIONS_BLUE - PALTAG_OPTIONS_START};
static const u16 sOptionsLabelGfx_Cute[] = {0x120, PALTAG_OPTIONS_PINK - PALTAG_OPTIONS_START};
static const u16 sOptionsLabelGfx_Smart[] = {0x140, PALTAG_OPTIONS_DEFAULT - PALTAG_OPTIONS_START};
static const u16 sOptionsLabelGfx_Tough[] = {0x160, PALTAG_OPTIONS_DEFAULT - PALTAG_OPTIONS_START};
static const u16 sOptionsLabelGfx_Cancel[] = {0x180, PALTAG_OPTIONS_BEIGE - PALTAG_OPTIONS_START};
struct
{
@@ -237,10 +232,9 @@ struct
},
[POKENAV_MENU_TYPE_CONDITION] =
{
.yStart = 49,
.yStart = 56,
.deltaY = 20,
.gfx = {
sOptionsLabelGfx_AllowMatchCalls,
sOptionsLabelGfx_Party,
sOptionsLabelGfx_Search,
sOptionsLabelGfx_Cancel
@@ -279,7 +273,6 @@ static const u8 *const sPageDescriptions[] =
[POKENAV_MENUITEM_MATCH_CALL] = gText_CallRegisteredTrainer,
[POKENAV_MENUITEM_RIBBONS] = gText_CheckObtainedRibbons,
[POKENAV_MENUITEM_SWITCH_OFF] = gText_PutAwayPokenav,
[POKENAV_MENUITEM_CONDITION_ALLOW_MATCH_CALLS] = gText_Pokenav_AllowCalls,
[POKENAV_MENUITEM_CONDITION_PARTY] = gText_CheckPartyPokemonInDetail,
[POKENAV_MENUITEM_CONDITION_SEARCH] = gText_CheckAllPokemonInDetail,
[POKENAV_MENUITEM_CONDITION_CANCEL] = gText_ReturnToPokenavMenu,
@@ -737,31 +730,6 @@ static u32 LoopedTask_SelectRibbonsNoWinners(s32 state)
return LT_FINISH;
}
static u32 LoopedTask_AllowMatchCalls(s32 state)
{
switch (state)
{
case 0:
PlaySE(SE_FAILURE);
PrintAllowMatchCallsYes();
return LT_INC_AND_PAUSE;
case 1:
if (IsDma3ManagerBusyWithBgCopy())
return LT_PAUSE;
break;
}
return LT_FINISH;
}
static void PrintAllowMatchCallsYes(void)
{
struct Pokenav_MenuGfx * gfx = GetSubstructPtr(POKENAV_SUBSTRUCT_MENU_GFX);
const u8 * s = gText_Pokenav_AllowCallsYes;
u32 width = GetStringWidth(FONT_NORMAL, s, -1);
FillWindowPixelBuffer(gfx->optionDescWindowId, PIXEL_FILL(6));
AddTextPrinterParameterized3(gfx->optionDescWindowId, FONT_NORMAL, (192 - width) / 2, 1, sOptionDescTextColors2, 0, s);
}
// For redisplaying the Ribbons description to replace the No Ribbon Winners message
static u32 LoopedTask_ReShowDescription(s32 state)
{

View File

@@ -975,10 +975,8 @@ const u8 gText_CheckMapOfHoenn[] = _("Check the map of the HOENN region.");
const u8 gText_CheckPokemonInDetail[] = _("Check POKéMON in detail.");
const u8 gText_CallRegisteredTrainer[] = _("Call a registered TRAINER.");
const u8 gText_CheckObtainedRibbons[] = _("Check obtained RIBBONS.");
const u8 gText_Pokenav_AllowCalls[] = _("Enable or disable MATCH CALLS.");
const u8 gText_PutAwayPokenav[] = _("Put away the POKéNAV.");
const u8 gText_NoRibbonWinners[] = _("There are no RIBBON winners.");
const u8 gText_Pokenav_AllowCallsYes[] = _("MATCH CALLS enabled/disabled.");
const u8 gText_NoTrainersRegistered[] = _("No TRAINERS are registered."); // Unused
const u8 gText_CheckPartyPokemonInDetail[] = _("Check party POKéMON in detail.");
const u8 gText_CheckAllPokemonInDetail[] = _("Check all POKéMON in detail.");
@@ -1516,23 +1514,29 @@ const u8 gText_Autorun[] = _("AUTORUN");
const u8 gText_Sound[] = _("SOUND");
const u8 gText_Frame[] = _("FRAME");
const u8 gText_OptionMenuCancel[] = _("CANCEL");
const u8 gText_FollowerEnable[] = _("FOLLOWER"); //tx_optionsPlus
const u8 gText_AutorunEnable[] = _("AUTORUN"); //tx_optionsPlus
const u8 gText_OptionMatchCalls[] = _("MATCH CALLS"); //tx_optionsPlus
const u8 gText_OptionMenuSave[] = _("SAVE"); //tx_optionsPlus
const u8 gText_OptionStyle[] = _("MOVE SPLIT"); //tx_optionsPlus
const u8 gText_OptionDifficulty[] = _("DIFFICULTY"); //tx_optionsPlus
const u8 gText_ButtonMode[] = _("BUTTON MODE");
const u8 gText_TextSpeedSlow[] = _("{COLOR GREEN}{SHADOW LIGHT_GREEN}SLOW");
const u8 gText_TextSpeedMid[] = _("{COLOR GREEN}{SHADOW LIGHT_GREEN}MID");
const u8 gText_TextSpeedFast[] = _("{COLOR GREEN}{SHADOW LIGHT_GREEN}FAST");
const u8 gText_BattleSceneOn[] = _("{COLOR GREEN}{SHADOW LIGHT_GREEN}ON");
const u8 gText_BattleSceneOff[] = _("{COLOR GREEN}{SHADOW LIGHT_GREEN}OFF");
const u8 gText_BattleStyleShift[] = _("{COLOR GREEN}{SHADOW LIGHT_GREEN}SHIFT");
const u8 gText_BattleStyleSet[] = _("{COLOR GREEN}{SHADOW LIGHT_GREEN}SET");
const u8 gText_AutorunOff[] = _("{COLOR GREEN}{SHADOW LIGHT_GREEN}OFF");
const u8 gText_AutorunOn[] = _("{COLOR GREEN}{SHADOW LIGHT_GREEN}ON");
const u8 gText_SoundMono[] = _("{COLOR GREEN}{SHADOW LIGHT_GREEN}MONO");
const u8 gText_SoundStereo[] = _("{COLOR GREEN}{SHADOW LIGHT_GREEN}STEREO");
const u8 gText_FrameType[] = _("{COLOR GREEN}{SHADOW LIGHT_GREEN}TYPE");
const u8 gText_FrameTypeNumber[] = _("{COLOR GREEN}{SHADOW LIGHT_GREEN}");
const u8 gText_ButtonTypeNormal[] = _("{COLOR GREEN}{SHADOW LIGHT_GREEN}NORMAL");
const u8 gText_ButtonTypeLR[] = _("{COLOR GREEN}{SHADOW LIGHT_GREEN}LR");
const u8 gText_ButtonTypeLEqualsA[] = _("{COLOR GREEN}{SHADOW LIGHT_GREEN}L=A");
const u8 gText_TextSpeedSlow[] = _("SLOW");
const u8 gText_TextSpeedMid[] = _("MID");
const u8 gText_TextSpeedFast[] = _("FAST");
const u8 gText_BattleSceneOn[] = _("ON");
const u8 gText_BattleSceneOff[] = _("OFF");
const u8 gText_BattleStyleShift[] = _("SHIFT");
const u8 gText_BattleStyleSet[] = _("SET");
const u8 gText_SoundMono[] = _("MONO");
const u8 gText_SoundStereo[] = _("STEREO");
const u8 gText_FrameType[] = _("TYPE");
const u8 gText_FrameTypeNumber[] = _("");
const u8 gText_ButtonTypeNormal[] = _("NORMAL");
const u8 gText_ButtonTypeLR[] = _("LR");
const u8 gText_ButtonTypeLEqualsA[] = _("L=A");
const u8 gText_AutorunOff[] = _("{COLOR GREEN}{SHADOW LIGHT_GREEN}OFF"); //OLD
const u8 gText_AutorunOn[] = _("{COLOR GREEN}{SHADOW LIGHT_GREEN}ON"); //OLD
const u8 gText_NumPlayerLink[] = _("{STR_VAR_1}P LINK");
const u8 gText_BronzeCard[] = _("BRONZE");
const u8 gText_CopperCard[] = _("COPPER");

View File

@@ -356,13 +356,13 @@ u8 GetCurrentPartyLevelCap(void)
return MAX_LEVEL;
if (gSaveBlock1Ptr->tx_Challenges_LevelCap == 1) //normal level cap
if (VarGet(VAR_DIFFICULTY) == DIFFICULTY_HARD)
if (gSaveBlock2Ptr->optionsDifficulty == 2)
return sLevelCapTable_NormalHard[badgeCount];
else
return sLevelCapTable_Normal[badgeCount];
if (gSaveBlock1Ptr->tx_Challenges_LevelCap == 2) //hard level cap
if (VarGet(VAR_DIFFICULTY) == DIFFICULTY_HARD)
if (gSaveBlock2Ptr->optionsDifficulty == 2)
return sLevelCapTable_HardHard[badgeCount];
else
return sLevelCapTable_Hard[badgeCount];

View File

@@ -293,21 +293,21 @@ static u8 ChooseWildMonLevel(const struct WildPokemon *wildPokemon)
if (ability == ABILITY_HUSTLE || ability == ABILITY_VITAL_SPIRIT || ability == ABILITY_PRESSURE)
{
if (Random() % 2 == 0) //Max level of the mon + (n), only for Hard Difficulty
if (VarGet(VAR_DIFFICULTY) == DIFFICULTY_HARD && FlagGet(FLAG_IS_CHAMPION))
if (gSaveBlock2Ptr->optionsDifficulty == 2 && FlagGet(FLAG_IS_CHAMPION))
return max + 10;
else if (VarGet(VAR_DIFFICULTY) == DIFFICULTY_HARD && FlagGet(FLAG_BADGE08_GET))
else if (gSaveBlock2Ptr->optionsDifficulty == 2 && FlagGet(FLAG_BADGE08_GET))
return max + 8;
else if (VarGet(VAR_DIFFICULTY) == DIFFICULTY_HARD && FlagGet(FLAG_BADGE07_GET))
else if (gSaveBlock2Ptr->optionsDifficulty == 2 && FlagGet(FLAG_BADGE07_GET))
return max + 7;
else if (VarGet(VAR_DIFFICULTY) == DIFFICULTY_HARD && FlagGet(FLAG_BADGE06_GET))
else if (gSaveBlock2Ptr->optionsDifficulty == 2 && FlagGet(FLAG_BADGE06_GET))
return max + 6;
else if (VarGet(VAR_DIFFICULTY) == DIFFICULTY_HARD && FlagGet(FLAG_BADGE05_GET))
else if (gSaveBlock2Ptr->optionsDifficulty == 2 && FlagGet(FLAG_BADGE05_GET))
return max + 5;
else if (VarGet(VAR_DIFFICULTY) == DIFFICULTY_HARD && FlagGet(FLAG_BADGE04_GET))
else if (gSaveBlock2Ptr->optionsDifficulty == 2 && FlagGet(FLAG_BADGE04_GET))
return max + 4;
else if (VarGet(VAR_DIFFICULTY) == DIFFICULTY_HARD && FlagGet(FLAG_BADGE03_GET))
else if (gSaveBlock2Ptr->optionsDifficulty == 2 && FlagGet(FLAG_BADGE03_GET))
return max + 3;
else if (VarGet(VAR_DIFFICULTY) == DIFFICULTY_HARD && FlagGet(FLAG_BADGE02_GET))
else if (gSaveBlock2Ptr->optionsDifficulty == 2 && FlagGet(FLAG_BADGE02_GET))
return max + 1;
else
return max;
@@ -316,21 +316,21 @@ static u8 ChooseWildMonLevel(const struct WildPokemon *wildPokemon)
rand--;
}
}
if (VarGet(VAR_DIFFICULTY) == DIFFICULTY_HARD && FlagGet(FLAG_IS_CHAMPION))
if (gSaveBlock2Ptr->optionsDifficulty == 2 && FlagGet(FLAG_IS_CHAMPION))
return min + rand + 10;
else if (VarGet(VAR_DIFFICULTY) == DIFFICULTY_HARD && FlagGet(FLAG_BADGE08_GET))
else if (gSaveBlock2Ptr->optionsDifficulty == 2 && FlagGet(FLAG_BADGE08_GET))
return min + rand + 8;
else if (VarGet(VAR_DIFFICULTY) == DIFFICULTY_HARD && FlagGet(FLAG_BADGE07_GET))
else if (gSaveBlock2Ptr->optionsDifficulty == 2 && FlagGet(FLAG_BADGE07_GET))
return min + rand + 7;
else if (VarGet(VAR_DIFFICULTY) == DIFFICULTY_HARD && FlagGet(FLAG_BADGE06_GET))
else if (gSaveBlock2Ptr->optionsDifficulty == 2 && FlagGet(FLAG_BADGE06_GET))
return min + rand + 6;
else if (VarGet(VAR_DIFFICULTY) == DIFFICULTY_HARD && FlagGet(FLAG_BADGE05_GET))
else if (gSaveBlock2Ptr->optionsDifficulty == 2 && FlagGet(FLAG_BADGE05_GET))
return min + rand + 5;
else if (VarGet(VAR_DIFFICULTY) == DIFFICULTY_HARD && FlagGet(FLAG_BADGE04_GET))
else if (gSaveBlock2Ptr->optionsDifficulty == 2 && FlagGet(FLAG_BADGE04_GET))
return min + rand + 4;
else if (VarGet(VAR_DIFFICULTY) == DIFFICULTY_HARD && FlagGet(FLAG_BADGE03_GET))
else if (gSaveBlock2Ptr->optionsDifficulty == 2 && FlagGet(FLAG_BADGE03_GET))
return min + rand + 3;
else if (VarGet(VAR_DIFFICULTY) == DIFFICULTY_HARD && FlagGet(FLAG_BADGE02_GET))
else if (gSaveBlock2Ptr->optionsDifficulty == 2 && FlagGet(FLAG_BADGE02_GET))
return min + rand + 1;
else
return min + rand;

View File

@@ -152,3 +152,4 @@
.include "src/tx_rac_menu.o"
.include "src/tx_randomizer_and_challenges.o"
.include "src/starter_choose.o"
.include "src/option_plus_menu.o"