Skip to content

Commit c924a3e

Browse files
committed
Add Ultra Burst w/o Ultranecrozium
1 parent bf93462 commit c924a3e

File tree

3 files changed

+33
-1
lines changed

3 files changed

+33
-1
lines changed

Includes/Folders/Battle.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ namespace Battle {
3939
void Bypass1MegaRestrict(MenuEntry *entry);
4040
void InfiniteZMoves(MenuEntry *entry);
4141
void ZMovesWithoutCrystal(MenuEntry *entry);
42+
void UltraBurst(MenuEntry *entry);
4243
void NoEncounters(MenuEntry *entry);
4344
void Spawner(MenuEntry *entry);
4445
void RematchLegendary(MenuEntry *entry);

Sources/Folders/Battle.cpp

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -837,6 +837,34 @@ namespace Battle {
837837
}
838838
}
839839

840+
void UltraBurst(MenuEntry *entry) {
841+
static const vector<u32> address = {0x80A6878, 0x80A687C, 0x80989E4, 0x8098A68, 0x8098A6C};
842+
843+
if (IsInBattle()) {
844+
if (entry->IsActivated()) {
845+
if (CRO::Read32(address[0]) == 0x3A00001) {
846+
if (!CRO::Write32(address[0], {0xE3A00001, 0xEA000000})) {
847+
if (!CRO::Write32(address[2], 0xA000005)) {
848+
if (!CRO::Write32(address[3], {0xE3A00001, 0xEA000000}))
849+
return;
850+
}
851+
}
852+
}
853+
}
854+
855+
if (!entry->IsActivated()) {
856+
if (CRO::Read32(address[0]) == 0xE3A00001) {
857+
if (!CRO::Write32(address[0], {0x3A00001, 0xA000000})) {
858+
if (!CRO::Write32(address[2], 0x2401C03)) {
859+
if (!CRO::Write32(address[3], {0x3A00001, 0xA000000}))
860+
return;
861+
}
862+
}
863+
}
864+
}
865+
}
866+
}
867+
840868
void NoEncounters(MenuEntry *entry) {
841869
static const u32 address = Helpers::GetVersion(0x807A5E8, 0x807E5B8);
842870

Sources/Menu.hpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,12 @@ void InitMenu(PluginMenu &menu) {
7777
*primary += new MenuEntry("Always Critical Hit", Battle::Gen7::AlwaysCriticalHit);
7878
*primary += new MenuEntry("Bypass 1 Mega Restrict.", Battle::Gen7::Bypass1MegaRestrict);
7979
*primary += new MenuEntry("Infinite Z-Moves", Battle::Gen7::InfiniteZMoves);
80-
*primary += EntryWithHotkey(new MenuEntry("Z-Moves Without Crystal", Battle::Gen7::ZMovesWithoutCrystal, note + "activate before intiating a battle! When in battle, hold the hotkey(s) below while pressing on an action when in a battle."), {Key::L, ""});
80+
*primary += EntryWithHotkey(new MenuEntry("Z-Moves w/o Crystal", Battle::Gen7::ZMovesWithoutCrystal, note + "activate before intiating a battle! When in battle, hold the hotkey(s) below while pressing on an action when in a battle."), {Key::L, ""});
8181
}
8282

83+
if (group == Group::USUM)
84+
*primary += new MenuEntry("Ultra Burst w/o Ultranecrozium", Battle::Gen7::UltraBurst);
85+
8386
*battle += primary;
8487
MenuFolder *other = new MenuFolder("Other");
8588

0 commit comments

Comments
 (0)