-
Notifications
You must be signed in to change notification settings - Fork 0
Restricted Sparring
WARNING: this branch isn't ready for public usage, use at your own risk. there are optimizations I want to make before I release.
![Demo of Master Dojo and Restricted Sparring](https://private-user-images.githubusercontent.com/77138753/278162298-809a41b2-f177-4b9c-a86e-283e143e8d31.gif?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzOTU3MTgsIm5iZiI6MTczOTM5NTQxOCwicGF0aCI6Ii83NzEzODc1My8yNzgxNjIyOTgtODA5YTQxYjItZjE3Ny00YjljLWE4NmUtMjgzZTE0M2U4ZDMxLmdpZj9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEyVDIxMjMzOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWUxNGFlZDY4YTk2MGU2ZDY1NGJiNTVlNjBhZmJlMzJlMjBiMDAyYzg4ZjkyZmIzNzZjYzk1YTRmNmU3OTNjMDcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.YRdGxy-EW7JOQEYFr7CVPKRzLCNnwsLKqvIlWjnvBd4)
This branch allows developers to add Restricted Sparring to their pokeemerald
decompilation projects.
Restricted Sparring is a battle facility challenge introduced in The Isle of Armor that takes place in the Master Dojo's Battle Court. The goal is for challengers to win five consecutive battles using a team of three Pokémon of a common type.
This is not a 1:1 recreation of Restricted Sparring. The goal was able re-imagine Restricted Sparring as a Battle Facility in pokeemerald, adhering to the common conventions of pokeemerald
while retaining the original spirit of the battle mode. The feature is set up in a way that the developer could replace the Battle Arena in the Battle Frontier with the Master Dojo.
![Gif of the player attempting to enter Restricted Sparring without having a party that matches the selected type](https://private-user-images.githubusercontent.com/77138753/278162702-9daaac31-1857-4962-b47b-d8348c1ab7c2.gif?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzOTU3MTgsIm5iZiI6MTczOTM5NTQxOCwicGF0aCI6Ii83NzEzODc1My8yNzgxNjI3MDItOWRhYWFjMzEtMTg1Ny00OTYyLWI0N2ItZDgzNDhjMWFiN2MyLmdpZj9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEyVDIxMjMzOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTdlNGIwN2IwZGY1NGZjZTNhOGEwZDhjMDk0NDBjNmRlZWNjYmQ4MTkzODE0NDY2ZDMzZjM5YWM0NzQxNjEzYjQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.nccUDMhEooKCiYdy29cLeTgmdbsqoCqw_Ii9wjAiEVk)
The player's party is checked to see if it matches the selected type.
![Gif of player scrolling through list of types, showing the number of wins for each type](https://private-user-images.githubusercontent.com/77138753/278162812-0d740d30-e51e-480e-8bf5-e3a7c9761cca.gif?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzOTU3MTgsIm5iZiI6MTczOTM5NTQxOCwicGF0aCI6Ii83NzEzODc1My8yNzgxNjI4MTItMGQ3NDBkMzAtZTUxZS00ODBlLThiZjUtZTNhN2M5NzYxY2NhLmdpZj9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEyVDIxMjMzOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWE4ZTc2MTdiMWExNTg2MzZlNmM2M2M2NzQ1NjJkOTA0YTRjOTY0ODdiNmNjZjhjNGQ1MDU1ZTMyYjhhNTI0MWUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0._TAnO5Kc53bHTT25cW9DXT-6XUZGjJJ_cGx7tFK5KrY)
For each type and level mode, the game will remember the player's streak. Optionally, the game can remember what Pokémon were used by the player.
![Gif of player healing their Pokemon between battles](https://private-user-images.githubusercontent.com/77138753/278162919-5c1729e5-1152-459c-93b7-35a7ca171f1f.gif?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzOTU3MTgsIm5iZiI6MTczOTM5NTQxOCwicGF0aCI6Ii83NzEzODc1My8yNzgxNjI5MTktNWMxNzI5ZTUtMTE1Mi00NTljLTkzYjctMzVhN2NhMTcxZjFmLmdpZj9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEyVDIxMjMzOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWZlNWUxZDU4MTFkMzk1ZTdjZjY0YjU2OTAxZGQ3YjY1NGI5NWIxNzViMDAxNmMxZWI0MzQzZWZkOWM2MGNkZmUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.2d17i91RMY2Ag4P6_zdh-ljZqSNsH9HkxWrxPV7hLIA)
Over the course a challenge, players can only heal a limited number of times.
![Gif of the player getting BP after finishing a challenge](https://private-user-images.githubusercontent.com/77138753/278164136-4c38c54f-8ae7-4f3f-96de-f3d12c5e9829.gif?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzOTU3MTgsIm5iZiI6MTczOTM5NTQxOCwicGF0aCI6Ii83NzEzODc1My8yNzgxNjQxMzYtNGMzOGM1NGYtOGFlNy00ZjNmLTk2ZGUtZjNkMTJjNWU5ODI5LmdpZj9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEyVDIxMjMzOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTE2NGVkOWQ3ZmVlNDFlZjlhYTc2ODgxN2ZhYjkwZjlkOGFlYjRlMGNlMGNlZjA0MTRmZjFkYWUxMjQ5MGNiNTYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.oBWruhddewmQhd4ksIYnAl15tlwfr6pfkrnSvteOClQ)
At the end of the challenge, players will receive Battle Points based on length of their streak.
![Gif of Alakazam using Trick, losing its item, and then getting it back after the battle](https://private-user-images.githubusercontent.com/77138753/278164637-f6a8df84-e54a-4d4b-be5f-af0c8d04b470.gif?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzOTU3MTgsIm5iZiI6MTczOTM5NTQxOCwicGF0aCI6Ii83NzEzODc1My8yNzgxNjQ2MzctZjZhOGRmODQtZTU0YS00ZDRiLWJlNWYtYWYwYzhkMDRiNDcwLmdpZj9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEyVDIxMjMzOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWYxOTY4MTMzNWVhNzQ5YTE2Yzg3NDQyYzMzYTcyZjZmNmRiYmNmYTVjMmViZGEwY2Y0YTQ3OTJkMGJmYTQ0N2YmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.vCBoNXktVz-XV4bD2eKrlq82shtmwBs5K8zVtcuV_6o)
After battle, items are restored, unless they are consumable items like Berries.
![Gif of the player running into a legendary during their first fight in the facility](https://private-user-images.githubusercontent.com/77138753/278164696-014519b4-8f96-4958-87db-d291f20a1b27.gif?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzOTU3MTgsIm5iZiI6MTczOTM5NTQxOCwicGF0aCI6Ii83NzEzODc1My8yNzgxNjQ2OTYtMDE0NTE5YjQtOGY5Ni00OTU4LTg3ZGItZDI5MWYyMGExYjI3LmdpZj9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEyVDIxMjMzOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTM1MzNiMTQ0YjA5Y2M2NmQ5ZGNkOGQ0ZmQ0ZmI0OWI4Nzk3ODhiZDVjZTEzM2YxMTliYmI4N2VhNTU3ZmVkZTYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.Xyvr7O5mMC2RFwZnyp1FxLzcqMVff8yExBVAcU9Jy-E)
Restricted Sparring battles begin in the highest difficulty of Frontier Trainers, as opposed to building over the course of a streak.
![Gif of the player recording their last battle and then taking a rest](https://private-user-images.githubusercontent.com/77138753/278164780-2ada5d01-ce34-45c1-b0d0-d37afce46ddb.gif?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzOTU3MTgsIm5iZiI6MTczOTM5NTQxOCwicGF0aCI6Ii83NzEzODc1My8yNzgxNjQ3ODAtMmFkYTVkMDEtY2UzNC00NWMxLWIwZDAtZDM3YWZjZTQ2ZGRiLmdpZj9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEyVDIxMjMzOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTU5NmI0ODY1NjQ4MzgzNmU5NDI4ZjljNmZlNTAwODhhNmRjMzMzOWY4MzFkMTU3N2NmOGQ4NzIwZTlkNDU4ZDkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.KyxmUsRTFVLLOwGbmVoNo2xQrhy0IlAHzxsaSXjOGCo)
Features from pokeemerald
's Battle Facilities return:
- Record: Use the Battle Recorder to save the player's last battle.
- Rest: Player can save and turn off the game in the middle of a challenge. Booting up the game returns to the challenge.
- Level Mode:
- Level 50: All opposing Pokémon are Level 50. The player can use Pokémon that are less than level 51.
- Open Level: All opposing Pokémon match the level of the player's highest level Pokémon, but is no less than 60.
![Gif of the player getting the Gold Guts symbol](https://private-user-images.githubusercontent.com/77138753/278164136-4c38c54f-8ae7-4f3f-96de-f3d12c5e9829.gif?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzOTU3MTgsIm5iZiI6MTczOTM5NTQxOCwicGF0aCI6Ii83NzEzODc1My8yNzgxNjQxMzYtNGMzOGM1NGYtOGFlNy00ZjNmLTk2ZGUtZjNkMTJjNWU5ODI5LmdpZj9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEyVDIxMjMzOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTE2NGVkOWQ3ZmVlNDFlZjlhYTc2ODgxN2ZhYjkwZjlkOGFlYjRlMGNlMGNlZjA0MTRmZjFkYWUxMjQ5MGNiNTYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.oBWruhddewmQhd4ksIYnAl15tlwfr6pfkrnSvteOClQ)
After winning 50% of the types in a Level Mode, the player recieves the Silver Guts Symbol. After winning 100% of the types in a Level mode, the player recieves the Gold Guts Symbol.
This branch comes with the scripts required for the entire facility to work. Optionally, the developer can pull the restricted_sparring_maps
branch, which features the Lobby and Battle Room (copied from the Battle Arena). .pory
files are also included for developers that utilize poryscript.
![Screenshot showing the player with their cursor on the Normal type, and a window showing the Pokémon used to achieve the highest streak.](https://private-user-images.githubusercontent.com/77138753/278185961-93883d26-e874-4aba-b360-c4997851c388.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzOTU3MTgsIm5iZiI6MTczOTM5NTQxOCwicGF0aCI6Ii83NzEzODc1My8yNzgxODU5NjEtOTM4ODNkMjYtZTg3NC00YWJhLWIzNjAtYzQ5OTc4NTFjMzg4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEyVDIxMjMzOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTI2NjEwZGI4NWQ1NzRiNmE2OWNlNjIyODcyMDNlOGUwZGZiYzkzM2FmMjI0NTYxOWVjMjA5ZjU4NGU1MjZlZDUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.GavTWHcuYHQCzWy4Rx75tlRulIUKuqN9WKwmYdHgk4c)
Developers can enable the ability to save the Pokémon used to set a type's streak, which will appear when the player is choosing a type.
Players will need to save when starting a challenge. Resetting the game in the middle of a challenge will render a challenge invalid - the player will not recieve any rewards, and their streak will reset to zero.
Players will recieve Battle Points at the end of the challenge, not after every match.
There is no level scaling for opposing Trainers.
Players cannot Dynamax.
These instructions assume that you can build pokeemerald, have a basic understanding of C, and are familiar with using the in-game scripting language. If you do not, please watch the tutorials series from Team Aqua's Hideout.
If you would like the version of this branch that comes with maps, replace restricted_sparring
with restricted_sparring_maps
in all following instructions.
From the root directory of your project, run the following commands in your terminal program of choice:
git remote add psf-emerald https://github.com/PokemonSanFran/pokeemerald/ # This adds our team's `pokeemerald` branch as a remote repo.
git pull psf-emerald restricted_sparring # This pulls in the restricted_sparring feature branch
If your project is:
- Too far behind
pokeemerald
- Using a different base (pokeemerald-expansion or pokefirered)
- Some other reason that I can't think of
You can manually implement the features using the diff between this branch and vanilla pokeemerald as a guide. You will need to manually edit or create each of these files in your project to properly recreate the feature.
Restricted Sparring consumes 36 bytes of space in gSaveblock2
, used for storing the number of wins for each types and each level mode.
If the developer enables RESTRICTED_SPARRING_MONS
, Restricted Sparring consumes 684 bytes of space, storing the species and personality for the 3 Pokémon for each type and level mode. gSaveblock2
does not have 684 bytes of free space, so developers will need to free up more space before compiling.
A developer could save space by doing any of the following:
Remove | Impact | % Saved | % Saved w/ RESTRICTED_SPARRING_MONS
|
---|---|---|---|
Level Mode | Players can only enter the facility with the mon level defined by the developer. | 50 | 50 |
Personality | Saved mons will only show a species but not the right form | n/a | 37 |
struct RestrictedSparringMon
{
u16 species; // 2 bytes
u32 personality; // 4 bytes
}__attribute__((packed));
struct RestrictedSparring
{
struct RestrictedSparringMon sparringMon[FRONTIER_PARTY_SIZE]; // FRONTIER_PARTY_SIZE * 6 = 18 bytes, optional
u8 winStreak; // 1 byte
}__attribute__((packed));
struct RestrictedSparring restrictedSparring[NUMBER_OF_MON_TYPES][FRONTIER_LVL_MODE_COUNT]; // NUMBER_OF_MON_TYPES * FRONTIER_LVL_MODE_COUNT * 19 = 684 bytes
If you pulled the restricted_sparring
branch, this feature will not work out of the box.
-
data/scripts/restricted_sparring.inc
has all of the scripts for Restricted Sparring to work, but all of the calls to map specific scripts have been commented out. You will need to manually re-enable them. -
data/maps/MasterDojo_Lobby/scripts.inc
has the mapscripts that are required to go in the entrance or lobby of your intended Battle Facility.- To start a Restricted Sparring challenge, run the script
RestrictedSparring_Entrance_EventScript_AskEnterChallenge
. - To check the Restricted Sparring records, run the script
RestrictedSparring_Entrance_EventScript_ShowResults
. - To read the Restricted Sparring rules, run the script
RestrictedSparring_EventScript_RulesBoard
.
- To start a Restricted Sparring challenge, run the script
-
data/maps/MasterDojo_BattleRoom/scripts.inc
has the mapscripts that are required to go in the arena of Battle Room of your intended Battle Facility.
All aforementioned directories contain .pory
files are also included for developers that utilize poryscript.
To start a challenge, the player talks to the attendant (RestrictedSparring_Entrance_EventScript_AskEnterChallenge
) , chooses a level mode, and a type. If Sparring_CheckIfPartyMonMatchesType
does not detect that player has three Pokémon that matches the chosen type and level, the challenge registration is refused.
In the type menu, when the player's cursor is selecting a type that the player has previous won for the selected Level Mode, the longest streak for that type is shown by FillRestrictedSparringWinWindow
. When enabled in include/config.h
, when the cursor is hovering over a type that the player has won, the Pokémon used are displayed by FillRestrictedSparringTypeMons
.
GetRandomScaledFrontierTrainerId
looks at the number of consectutive challenges the player has won in that Battle Facility, and sets table that Pokémon are pulled from based on the progress - the greater the number, the more powerful the Pokémon are, up to 7. Sparring_SetChallengeNumToMax
bypasses this, always skipping to the hardest possible difficulty, mimicking the difficulty of the battles from Sword and Shield.
Developers can disable this by either removing the line where Sparring_SetChallengeNumToMax
is called, or having that function always return challegeNum
, and battles will resume the same difficulty curve found in pokeemerald
.
Over the course of a challenge, players can only heal their Pokémon SPARRING_MAX_NUM_RESTORE
number of times. This is set to 2 by default, but can be changed by the developer.
When the player achieves SPARRING_MIN_STREAK
, they are registered as having a win for that type and Level Mode. Players can keep going until they win SPARRING_MAX_STREAK
times in a row, which will automatically end the battle. By default, these are 5, and 255 respectively, but can be changed by the developer.
Increasing this value past 255 requires the developer to also change the winStreak
on the SaveBlock, or record will overflow to 0 after win 255.
Developers can comment out RestrictedSparring_BattleCourt_EventScript_StopChallenge
from being called, which will allow players to continue the challenge until they retire or lose a battle. Battles over SPARRING_MAX_STREAK
will not be counted towards a streak or rewards.
After every battle, RestoreNonConsumableHeldItems
will restore the player's Pokémon's held item, unless the item belongs in POCKET_BERRIES
. At the end of the challenge, all items are restored. To allow berries to be restored, develoeprs can disable the check for IsItemConsumable
, or always return FALSE
.
After every battle, if Sketch was used, ResetSketchedMoves
will revert the new move to Sketch and retore its PP. Disabling this will allow Sketch to retain the sketched move until the player ends the challenge and returns to the Lobby.
CalculateBattlePoints
works as follows:
For every battle that the player wins, they recieve SPARRING_BP_BASE
points.
For every battle won that is a multiple of SPARRING_BP_BONUS_MATCH
, the player will instead recieve SPARRING_BP_STREAK_BONUS
.
If the player achieves a streak of SPARRING_BP_BONUS_MATCH
for that type and Level Mode for the first time, the player additionally recieves SPARRING_BP_TYPE_WIN_BONUS
.
Default values are as follows, but can be changed by the developer.
Name | Value |
---|---|
SPARRING_BP_BASE |
3 |
SPARRING_BP_BONUS_MATCH |
SPARRING_MIN_STREAK (5) |
SPARRING_BP_STREAK_BONUS |
20 |
SPARRING_BP_TYPE_WIN_BONUS |
30 |
![Screenshot showing the player with their cursor on the Normal type, and a window showing the Pokémon used to achieve the highest streak.](https://private-user-images.githubusercontent.com/77138753/278178484-c1151b43-94a7-4648-81cd-26c4dc6a8d06.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzOTU3MTgsIm5iZiI6MTczOTM5NTQxOCwicGF0aCI6Ii83NzEzODc1My8yNzgxNzg0ODQtYzExNTFiNDMtOTRhNy00NjQ4LTgxY2QtMjZjNGRjNmE4ZDA2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEyVDIxMjMzOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWQwNTZiNTdlMDkyYzJmNWI3MTkzZjRmOTA0YWI5MzBiNmY1NGUwNjMwMTI5MzFmNjQ1ODg4MjExYTc4ODdjNWImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.gAhYWyPoRVKBfgT0WQJMrAgfi07y-7Ghjq7OoMy2KYM)
There are not enough unused palettes in the overworld to support three unique mon icons. Using a dynamic overworld palette management system will resolve this issue.
n/a
If you have read all of the documentation here and still have questions, please ask a good question in the pokeemerald
channel of the pret Discord server. You can tag pkmnsnfrn
and we will try to help if we can.
If you got some use out of this feature, please consider donating. We are currently not taking any donations, so please donate to some of our favorite charities.
- Centre for Effective Altruism USA Inc.
- Doctors Without Borders, USA
- The Climate Reality Project
- First Nations Development Institute
- Tested the feature from a player perspective
All changes to this project will be documented in this section. The format is based on Keep a Changelog, and this project tries to adhere to Semantic Versioning.
n/a