Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
psytp2 committed Aug 20, 2024
2 parents 133d836 + 6ac18a6 commit 0da5a91
Show file tree
Hide file tree
Showing 86 changed files with 1,714 additions and 323 deletions.
3 changes: 2 additions & 1 deletion .github/ISSUE_TEMPLATE/01_battle_engine_bugs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@ body:
label: Version
description: What version of pokeemerald-expansion are you using as a base?
options:
- 1.9.0 (Latest release)
- 1.9.1 (Latest release)
- master (default, unreleased bugfixes)
- upcoming (Edge)
- 1.9.0
- 1.8.6
- 1.8.5
- 1.8.4
Expand Down
3 changes: 2 additions & 1 deletion .github/ISSUE_TEMPLATE/02_battle_ai_issues.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@ body:
label: Version
description: What version of pokeemerald-expansion are you using as a base?
options:
- 1.9.0 (Latest release)
- 1.9.1 (Latest release)
- master (default, unreleased bugfixes)
- upcoming (Edge)
- 1.9.0
- 1.8.6
- 1.8.5
- 1.8.4
Expand Down
3 changes: 2 additions & 1 deletion .github/ISSUE_TEMPLATE/04_other_errors.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@ body:
label: Version
description: What version of pokeemerald-expansion are you using as a base?
options:
- 1.9.0 (Latest release)
- 1.9.1 (Latest release)
- master (default, unreleased bugfixes)
- upcoming (Edge)
- 1.9.0
- 1.8.6
- 1.8.5
- 1.8.4
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Pokeemerald-Expansion Changelogs

## 1.9.x
- **[Version 1.9.1](docs/changelogs/1.9.x/1.9.1.md) - 🧹 Bugfix Release**
- **[Version 1.9.0](docs/changelogs/1.9.x/1.9.0.md) - ✨ Feature Release**

## 1.8.x
Expand Down
4 changes: 2 additions & 2 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ If this works, then proceed to [Installation](#installation). Otherwise, ask for
libpng is now installed.
Continue to [Installing pkg-config (macOS)](#installing-pkg-config-macos) if **pkg-config is not installed**. Otherwise, continue to [Installing devkitARM (macOS)](#installing-devkitarm-macos) if **devkitARM is not installed**.
If both pkg-config and devkitARM are already installed, go to [Choosing where to store pokeemerald Expansion (macOS)](#choosing-where-to-store-pokeemerald-expansion-macos).
### Installing pkg-config (macOS)
Expand Down Expand Up @@ -541,7 +541,7 @@ If this works, then proceed to [Installation](#installation). Otherwise, ask for
> ```
> Where *\<folder where pokeemerald-expansion is to be stored>* is the path of the folder [where you chose to store pokeemerald Expansion](#Choosing-where-to-store-pokeemerald-expansion-WSL1). Then run the `git clone` command again.
</details>
Now you're ready to build pokeemerald Expansion.

## Build pokeemerald Expansion
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ pokeemerald-expansion is a decomp hack base project based off pret's [pokeemeral
If you use pokeemerald-expansion in your hack, please add RHH (Rom Hacking Hideout) to your credits list. Optionally, you can list the version used, so it can help players know what features to expect.
You can phrase it as the following:
```
Based off RHH's pokeemerald-expansion 1.9.0 https://github.com/rh-hideout/pokeemerald-expansion/
Based off RHH's pokeemerald-expansion 1.9.1 https://github.com/rh-hideout/pokeemerald-expansion/
```

## What features are included?
Expand Down
13 changes: 11 additions & 2 deletions data/battle_scripts_1.s
Original file line number Diff line number Diff line change
Expand Up @@ -7150,7 +7150,7 @@ BattleScript_TargetFormChangeWithStringNoPopup::

BattleScript_BattlerFormChangeWithStringEnd3::
pause 5
call BattleScript_AbilityPopUp
call BattleScript_AbilityPopUpScripting
flushtextbox
handleformchange BS_SCRIPTING, 0
handleformchange BS_SCRIPTING, 1
Expand Down Expand Up @@ -7754,6 +7754,15 @@ BattleScript_CheekPouchActivates::
copybyte gBattlerAttacker, sSAVED_BATTLER
return

BattleScript_PickupActivates::
pause 5
tryrecycleitem BattleScript_PickupActivatesEnd
call BattleScript_AbilityPopUp
printstring STRINGID_XFOUNDONEY
waitmessage B_WAIT_TIME_LONG
BattleScript_PickupActivatesEnd:
end3

BattleScript_HarvestActivates::
pause 5
tryrecycleitem BattleScript_HarvestActivatesEnd
Expand Down Expand Up @@ -8001,7 +8010,7 @@ BattleScript_DeltaStreamActivates::
end3

BattleScript_ProtosynthesisActivates::
call BattleScript_AbilityPopUp
call BattleScript_AbilityPopUpScripting
printstring STRINGID_SUNLIGHTACTIVATEDABILITY
waitmessage B_WAIT_TIME_MED
printstring STRINGID_STATWASHEIGHTENED
Expand Down
2 changes: 1 addition & 1 deletion data/battle_scripts_2.s
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ BattleScript_UseItemMessage:
printfromtable gTrainerUsedItemStringIds
waitmessage B_WAIT_TIME_LONG
return

BattleScript_ItemRestoreHPRet:
bichalfword gMoveResultFlags, MOVE_RESULT_NO_EFFECT
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE
Expand Down
2 changes: 1 addition & 1 deletion dev_scripts/followers/rename_to_graphics_pokemon.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,6 @@ def rellocate_follower_graphics():
#os.popen('cp followers/' + name + '.png followers/' + name + '/follower.png')
#os.remove('followers/' + name + '.png')
#print(pth)
#subprocess.run(["tools/gbagfx/gbagfx " + name +".png " + name + "_normal.pal'" + str(count) + "'"])
#subprocess.run(["tools/gbagfx/gbagfx " + name +".png " + name + "_normal.pal'" + str(count) + "'"])

rellocate_follower_graphics()
8 changes: 4 additions & 4 deletions docs/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
- [How to add a new move](./how_to_new_move.md)
- [How to add a new trainer class](./how_to_trainer_class.md)
- [How to add a new Pokémon]()
- [v1.9.0](./how_to_new_pokemon_1_9_0.md)
- [v1.8.0](./how_to_new_pokemon_1_8_0.md)
- [v1.7.0](./how_to_new_pokemon_1_7_0.md)
- [v1.6.0](./how_to_new_pokemon_1_6_0.md)
- [v1.9.x](./how_to_new_pokemon_1_9_0.md)
- [v1.8.x](./how_to_new_pokemon_1_8_0.md)
- [v1.7.x](./how_to_new_pokemon_1_7_0.md)
- [v1.6.x](./how_to_new_pokemon_1_6_0.md)
- [How to use the Testing System](./how_to_testing_system.md)
- [Changelog](./CHANGELOG.md)
- [1.9.x]()
Expand Down
16 changes: 8 additions & 8 deletions docs/ai_flags.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ AI: Check Bad Move / Try to Faint / Check Viability. The name of each flag is ju
* Sequence Switching

## `COMPETITIVE_PARTY_SYNTAX != TRUE` / Not Found
If you are not using competitive syntax parties, instead access the trainer data directly in [`src/data/trainers.h`](https://github.com/rh-hideout/pokeemerald-expansion/blob/master/src/data/trainers.h), and add flags like so, typed exactly the same as the flag names themselves:
If you are not using competitive syntax parties, instead access the trainer data directly in [`src/data/trainers.h`](https://github.com/rh-hideout/pokeemerald-expansion/blob/master/src/data/trainers.h), and add flags like so, typed exactly the same as the flag names themselves:
`.aiFlags = AI_FLAG_CHECK_BAD_MOVE | AI_FLAG_TRY_TO_FAINT | AI_FLAG_CHECK_VIABILITY`

# What AI Flags does pokeemerald-expansion have?
This section lists all of expansion’s AI Flags and briefly describes the effect they have on the AI’s behaviour. In all cases, please check the corresponding function or surrounding code around their implementation for more details. Some of these functions are vanilla, some share a name with vanilla but have been modified to varying degrees, and some are completely new.

## `AI_FLAG_CHECK_BAD_MOVE`
The AI will avoid using moves that are likely to fail in the current situation. This flag helps prevent the AI from making ineffective choices, such as using moves into immunities, into invulnerable states, or when the moves are otherwise hindered by abilities, terrain, or status conditions.
The AI will avoid using moves that are likely to fail in the current situation. This flag helps prevent the AI from making ineffective choices, such as using moves into immunities, into invulnerable states, or when the moves are otherwise hindered by abilities, terrain, or status conditions.

## `AI_FLAG_TRY_TO_FAINT`
AI will prioritize KOing the player if able rather than using status moves. Will prioritize using a move that can OHKO the player. If the player can KO the AI’s mon and the AI’s mon is slower, prioritize priority moves (this does not prevent the AI from switching out instead).
Expand Down Expand Up @@ -58,12 +58,12 @@ AI will generally behave more recklessly. This AI enables the following behaviou
* Prioritize Explosion moves

## `AI_FLAG_PREFER_STRONGEST_MOVE`
Adds score bonus to any move the AI has that either OHKOs or 2HKOs the player.
Adds score bonus to any move the AI has that either OHKOs or 2HKOs the player.

Keep in mind that this is a weaker form of `AI_FLAG_TRY_TO_FAINT` at scoring OHKOs as it does not take into account who is attacking first, it does however handle 2HKOs.

## `AI_FLAG_PREFER_BATON_PASS`
AI prefers raising its own stats if it has >= 60% HP, as well as Ingrain, Aqua Ring, and Protect. Prioritizes Baton Bass if the mon is rooted (Ingrain) or has the Aqua Ring effect, and doesn’t if it has been Leech Seeded.
AI prefers raising its own stats if it has >= 60% HP, as well as Ingrain, Aqua Ring, and Protect. Prioritizes Baton Bass if the mon is rooted (Ingrain) or has the Aqua Ring effect, and doesn’t if it has been Leech Seeded.

## `AI_FLAG_DOUBLE_BATTLE`
This flag is automatically set in double battles, and controls much of the doubles-specific scoring. I’ll summarize some of its scoring as follows:
Expand All @@ -83,7 +83,7 @@ With respect to the AI’s mons, in doubles:
In both singles and doubles:
* Prioritizes not using moves that require the user fainting (Destiny Bond, Explosion etc.) and healing moves while on >= 70% HP.
* Prioritize not using moves that require the user fainting or losing significant HP (Belly Drum etc) while between 30% and 70% HP
* Prioritize not using setup moves (Light Screen etc.) and Bide while on <= 30% HP
* Prioritize not using setup moves (Light Screen etc.) and Bide while on <= 30% HP

With respect to the player’s mons:
* Prioritize not using many status moves (stat buffs, Poison, Pain Split) if the player has between 30% and 70% HP
Expand All @@ -96,7 +96,7 @@ AI prioritizes setting up field effects (Trick Room, Rain Dance, etc.) and side
AI does not understand ability suppression (Mold Breaker etc., weather suppression (Air Lock etc.), redirection abilities (Lightningrod etc.) being temporarily removed due to move effects (Sky Drop etc.), or item suppression (Magic Room etc.) and will ignore them. This is a handicap flag.

## `AI_FLAG_WILL_SUICIDE`
AI prioritizes self destruction moves (Explosion, Memento).
AI prioritizes self destruction moves (Explosion, Memento).

## `AI_FLAG_PREFER_STATUS_MOVES`
AI gets a score bonus for status moves. This should be combined with `AI_FLAG_CHECK_BAD_MOVE` to prevent using only status moves.
Expand Down Expand Up @@ -127,7 +127,7 @@ Affects when the AI chooses to switch. AI will make smarter decisions about when
Marks the last Pokemon in the party as the Ace Pokemon. It will not be used unless it is the last one remaining, or is forced to be switched in (Roar, U-Turn with 1 mon remaining, etc.)

## `AI_FLAG_OMNISCIENT`
AI has full knowledge of player moves, abilities, and hold items, and can use this knowledge when making decisions.
AI has full knowledge of player moves, abilities, and hold items, and can use this knowledge when making decisions.

## `AI_FLAG_SMART_MON_CHOICES`
Affects what the AI chooses to send out after a switch. AI will make smarter decisions when choosing which mon to send out mid-battle and after a KO, which are handled separately. Automatically included when `AI_FLAG_SMART_SWITCHING` is enabled.
Expand All @@ -148,7 +148,7 @@ And will choose mons after a mid-battle switch prioritizing the following criter
* Has Baton Pass

## `AI_FLAG_CONSERVATIVE`
AI always assumes it will roll the lowest possible result when comparing damage in scoring.
AI always assumes it will roll the lowest possible result when comparing damage in scoring.

## `AI_FLAG_SEQUENCE_SWITCHING`
AI will always switch out after a KO in exactly party order as defined in the trainer data (ie. slot 1, then 2, then 3, etc.). The AI will never switch out mid-battle unless forced to (Roar etc.). If the AI uses a move that requires a switch where it makes a decision about what to send in (U-Turn etc.), it will always switch out into the lowest available party index.
2 changes: 1 addition & 1 deletion docs/changelogs/1.5.x/1.5.2.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,5 +92,5 @@
* Court Change by @DizzyEggg in https://github.com/rh-hideout/pokeemerald-expansion/pull/3160
* Item Effects
* Utility Umbrella, by @AsparagusEduardo in https://github.com/rh-hideout/pokeemerald-expansion/pull/2835

**Full Changelog**: https://github.com/rh-hideout/pokeemerald-expansion/compare/expansion/1.5.1...expansion/1.5.2
4 changes: 2 additions & 2 deletions docs/changelogs/1.5.x/1.5.3.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
## CRITICAL FIX, please update to avoid the issues detailed down below:
- Fixed memory corruption when handling trigger sprites by @SBird1337 in https://github.com/rh-hideout/pokeemerald-expansion/pull/3238
- This had the posibility of manifesting in weird ways, like camera and music changes, NPC duplication and more. If you've had this issue in the past, we ***heavily*** recommend you update to this version of the expansion.
- Thank you @Bassoonian for helping us pinpointing the issue.
- Thank you @Bassoonian for helping us pinpointing the issue.

![image](https://github.com/rh-hideout/pokeemerald-expansion/assets/2904965/26b9b984-c5db-4dac-85f7-5fc4e95a32ce) ![image](https://github.com/rh-hideout/pokeemerald-expansion/assets/2904965/d490eb30-ce54-4b90-bb2e-79c2e9bb50ac)


Expand Down
2 changes: 1 addition & 1 deletion docs/changelogs/1.7.x/1.7.2.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
* Clodsire
* Crocalor
* Dolliv
* Dudunsparce
* Dudunsparce
* Esparthra
### Fixed
* Multiple Pokémon graphical fixes by @katykat5099 in https://github.com/rh-hideout/pokeemerald-expansion/pull/3805
Expand Down
Loading

0 comments on commit 0da5a91

Please sign in to comment.