Commit graph

14435 commits

Author SHA1 Message Date
Eduardo Quezada
00e2ca6030 Merge branch '_RHH/master' into _RHH/upcoming
# Conflicts:
#	data/battle_scripts_1.s
#	include/constants/battle_move_effects.h
#	src/battle_ai_util.c
#	src/battle_script_commands.c
#	src/battle_tv.c
#	src/data/battle_moves.h
#	src/data/pokemon/species_info/gen_9.h
2024-01-22 15:56:10 -03:00
Alex
91f429b5e5
Fixes Glimmering Charm (#4047)
Co-authored-by: Eduardo Quezada D'Ottone <eduardo602002@gmail.com>
2024-01-22 13:55:08 +01:00
Bassoonian
b99ec5d43c
Update level_up_learnsets.h (#4046) 2024-01-22 00:07:19 +01:00
Alex
0ec777dd24
Fixes Mind Blown / Magic Guard interaction and renames Steel Beam effect (#4043)
* Fixes Mind Blown / Magic Guard interaction and renames Steel Beam effect

* review fixes

---------

Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>
2024-01-21 23:42:01 +01:00
Ninjdai
7ba3f53d42
Add ITEMS_COUNT and ITEM_NAME_LENGTH to RHH rom header (#3988)
* Add item count to RHH rom header

There was no way for an external program to access the ITEMS_COUNT.

* Add items.h include

* Add itemNameLength to RHH rom header

* Added padding for additional u8s

Co-authored-by: Eduardo Quezada D'Ottone <eduardo602002@gmail.com>

* Change itemsCount to a u16

* Fix padding (again)

* Update src/rom_header_rhh.c

Co-authored-by: Eduardo Quezada D'Ottone <eduardo602002@gmail.com>

---------

Co-authored-by: Eduardo Quezada D'Ottone <eduardo602002@gmail.com>
Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>
2024-01-21 18:25:43 -03:00
Mathew Arnold
a01d442f36
Fixed Kingra's learnset gen (#4044)
In level_up_learnsets.h, Kingdra's learnset was inside a check for P_GEN_4_CROSS_EVOS. As a Gen 2 Pokemon, this has been updated to check for P_GEN_2_CROSS_EVOS instead.
2024-01-21 18:23:55 +01:00
Bassoonian
9286b80866
Remove illegal moves from teachable learnsets (#4042)
Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>
2024-01-21 13:02:45 +01:00
Alex
35e2157c09
Fixes ability Corrosion (#4037)
* Fixes ability Corrosion

* forgot AI_CanPoisonType

* More tests

* review comments applied

* more review changes

* simplify CanPosionType (original state)

* remove redundant function

---------

Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>
2024-01-21 12:27:58 +01:00
Alex
04fa3aa725
Fixes Emergency Exit when hp is restored over tag out range (#4041)
* Fixes Emergency Exit when hp is restored over tag out range

* Update test/battle/ability/emergency_exit.c

Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>

---------

Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>
2024-01-21 11:08:25 +01:00
Bassoonian
53a46b7a29
Remove faulty teachable learnset moves (#4039) 2024-01-21 10:25:37 +01:00
Philipp AUER
73a1fa30e9
fix: emergency exit cutoff off by 1 on odd max hp (#4040)
* fix: emergency exit cutoff off by 1 on odd max hp

* squash!: newline at end of file

---------

Co-authored-by: sbird <sbird@no.tld>
2024-01-21 09:11:10 +01:00
Alex
d125da7797
Fixes Life Orb + Eject Pack / Red Card interaction (#4038)
* Fixes Life Orb + Eject Pack / Red Card interaction

* fix test
2024-01-20 22:48:34 +01:00
Alex
b0c76563bf
Fixes Psychic Noise, Aroma Veil interaction in doubles (#4021)
Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>
2024-01-20 14:10:22 +01:00
Zimmermann Gyula
58102e6fe8
Fix a typo in the Berry Exp. config setup. (#4028) 2024-01-19 23:58:58 +01:00
Eduardo Quezada D'Ottone
6857497f60
Debug menu tweaks (#4025)
* Moved Access PC to the first option of the PC/Bag debug submenu

* Prevent item give music from cutting off by having a shorter jingle

* Removed redundant "Give all TMs" option

---------

Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>
2024-01-19 21:06:21 +01:00
Bassoonian
f3342de00b
Condense Oinkologne teachable learnsets (#4026)
* Condense Oinkologne teachable learnsets

* Fix redundant backslash
2024-01-19 17:01:14 +01:00
Nephrite
89a632cfa4
Moved scripts array to src/data/battle_move_effects.h (#3994)
* Created gMoveBattleEffects array

* Renamed array to gBattleMoveEffects

Applied array in battle_util.c and battle_script_commands.c; doesn't build yet...

* Got it building...

* Added missing battle_tv effects

* Fixed and got it building

I'm an idiot sometimes

* Added battle_tv scores, encourage Encore flag

All works and builds just fine

* Merge fixes

* Reformatted battle_move_effects

Also tweaked struct, added macro

---------

Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>
2024-01-19 16:44:09 +01:00
Eduardo Quezada
7e8ea89ded Merge branch '_RHH/master' into _RHH/upcoming 2024-01-19 09:34:05 -03:00
tertu
179a0ea97a
Seed the RNG with the time in seconds in HQ mode (#3812) 2024-01-19 10:27:42 +00:00
Alex
d3dbfaf1af
Adds function AI_CalcMoveScore to more easily control score increases (#3984)
* Adds function AI_CalcMoveScore to more easily control score increases
2024-01-19 09:48:31 +00:00
Eduardo Quezada D'Ottone
fd5d5cd055
Fixed incorrect family toggle preproc blocks (#4024)
* Fixed incorrect family toggle preproc blocks

* More fixes
2024-01-19 09:28:51 +01:00
Bassoonian
1aff65029f
Deprecate GetBerryCountString (#4012)
Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>
2024-01-18 18:59:42 +01:00
Alex
9efdd9e0cd
Adds Move Shed Tail (#4016)
Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>
2024-01-18 00:14:18 +01:00
fakuzatsu
cae58ca93e
fixed oversight causing chosen fossil to be lost if bag is full (#3978)
* fixed oversight causing chosen fossil to be lost

* fixed an error with my condition

* - conditional check and + underpass fossil check
2024-01-18 00:03:55 +01:00
Eduardo Quezada D'Ottone
b20be66175
Max Soup ban now checks for mythicals instead of array (#4017)
* Removed sGigantaxFactorLockedSpecies to instead check for mythicals

* Applied review comments

---------

Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>
2024-01-17 13:08:34 -03:00
Bassoonian
1f9655ee2b
Fixed plural item names (#4015)
* Update items.h

* Update items.h

---------

Co-authored-by: Eduardo Quezada D'Ottone <eduardo602002@gmail.com>
2024-01-17 16:53:12 +01:00
Eduardo Quezada
71fe6b34dc Merge branch '_RHH/master' into _RHH/upcoming
# Conflicts:
#	include/battle_scripts.h
#	src/battle_script_commands.c
2024-01-17 12:29:33 -03:00
Eduardo Quezada
cadaeb7074 Non-tagged 2024-01-17 11:52:04 -03:00
Eduardo Quezada D'Ottone
3636ff6d69
Version 1.7.2 (#4013)
* Version 1.7.2

* I got one more in me, couch
2024-01-17 11:51:00 -03:00
Eduardo Quezada D'Ottone
4c5e1317d5
Added Calyrex's blue Dynamax aura (#4018)
* Added Calyrex's blue Dynamax aura

* and
2024-01-17 15:43:09 +01:00
Alex
af27621579
Fixes effect field on Dragon Darts (#4014) 2024-01-17 09:44:15 -03:00
Alex
87472d4a6c
A few new gen 9 move animations (#3989)
* A few new gen 9 move animations

* draco meteor anim

tmp

* applied suggestions

* fix compile

* add more crystals to ice spinner

* further fixes

---------

Co-authored-by: ghoulslash <41651341+ghoulslash@users.noreply.github.com>
2024-01-16 19:33:49 -07:00
Alex
8f99ef16be
Adds Move Psychic Noise (#4005)
* Adds Move Psychic Noise

* changes psychic noise from effect to move_effect

* remove leftover

---------

Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>
2024-01-16 22:52:56 +01:00
psf
cdf7190d15
Add pluralName to gItems to allow the proper spelling when multiple items are received at once (#4001)
* Updated CopyItemNameHandlePlural to deal with plural names

* Fixed whitespace in a few places

* Fixed whitespace in a few places

* Add remaining plural forms.

* Created ITEM_NAME_PLURAL_LENGTH

* Updated ITEM_NAME_PLURAL_LENGTH per feedback https://github.com/rh-hideout/pokeemerald-expansion/pull/4001\#discussion_r1453598165

* Reverted ITEM_NAME_PLURAL_LENGTH to +2 and added new comment

* Removed GetBerryCountString from CopyItemNameHandlePlural
Will deprecate the former in a future feature: https://github.com/rh-hideout/pokeemerald-expansion/issues/4010

---------

Co-authored-by: Zimmermann Gyula <graiondilach@hotmail.com>
Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>
2024-01-16 19:05:41 +01:00
Bassoonian
9a1f6dfb64
Allow one-mon double battles (#4007)
Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>
2024-01-16 18:24:49 +01:00
psf
778712b366
Added directory for migration scripts and added item_ball migration script (#3997)
* Created migration script README
Added Jasper's migration script to migration directory

* Updated relative file paths

* Moved from migration to migration_scripts

* Update migration_scripts/item_ball_refactor.py

Updated script per feedback

https://github.com/rh-hideout/pokeemerald-expansion/pull/3997#discussion_r1453367466

Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>

---------

Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>
2024-01-16 18:12:05 +01:00
Eduardo Quezada D'Ottone
e1cd7b61ed
Small CanFirstMonBoostHeldItemRarity optimization (#4008) 2024-01-16 13:45:09 -03:00
Alex
bb190d33dd
Fix stat drop in doubles for single target moves (#4003)
* Fix stat drop in doubles for single target moves

* Update test/battle/move_effect/pay_day.c

Co-authored-by: Eduardo Quezada D'Ottone <eduardo602002@gmail.com>

* Update test/battle/move_effect/pay_day.c

Co-authored-by: Eduardo Quezada D'Ottone <eduardo602002@gmail.com>

* Update test/battle/move_effect/sp_atk_two_down.c

Co-authored-by: Eduardo Quezada D'Ottone <eduardo602002@gmail.com>

* Update test/battle/move_effect/sp_atk_two_down.c

Co-authored-by: Eduardo Quezada D'Ottone <eduardo602002@gmail.com>

---------

Co-authored-by: Eduardo Quezada D'Ottone <eduardo602002@gmail.com>
2024-01-16 09:25:40 -03:00
Frank DeBlasio
0bdac90cfe
Refactor mugshots (#4000)
* Refactor battle mugshots
The battle mugshot transitions have been merged into the one transition id and are now loaded depending on the trainer data.

Two new fields have been added to struct Trainer; mugshotEnabled and mugshotColor. mugshotEnabled is the toggle for loading the mugshot transition when set to TRUE and mugshotColor is the color of the mugshot for that particular trainer.

The Elite Four and Champion have been updated so their mugshots are correctly loaded when you battle them.

A bug has also been fixed where if the player starts on a tile that has an active field effect, the player's sprite will use the palette of the opponent's sprite.

* Added a new folder in src/data named battle_transitions.

The two look ups for the opponent rotation scaling and coords have been put into their own files and added into this new folder.

The coords look up has also been changed to use the  struct.

* Fixed errors with modern that were preventing compile

* Added mugshot coords to gTrainerSprites

* Added rotation scales to gTrainerSprites

* Replaced tabs with spaces

* Incorporated comments

* Added battle_transition include back to data.c

* Fixed alignment issues in Mugshots_CreateTrainerPics

---------

Co-authored-by: pkmnsnfrn <pkmnsnfrn@gmail.com>
Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>
2024-01-16 00:45:13 +01:00
Bassoonian
e8a238a775
Exp yield configs (#3995)
* Gen 1 exp yield config

* I'm a dumdum

* Gen 2 configs

* Exp yield configs up to gen3

* Gen 4 configs

* Gen 5 configs

* Configs up to gen6

* Gen7 configs

* Final form exp adjustments
2024-01-15 23:49:12 +01:00
Bassoonian
1182368330
Fix battle frontier random loss (#3990)
Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>
2024-01-15 22:07:27 +01:00
Alex
f6c08c08b6
Fix item usage in double battles (#3977)
* Fix item usage in double battles

* fix failing tests

---------

Co-authored-by: Eduardo Quezada D'Ottone <eduardo602002@gmail.com>
2024-01-15 21:55:35 +01:00
ravepossum
95a81badb0
Updates to INSTALL.MD for 1.7.0+ and misc clarifications (#3983)
* Updates to install doc for versions >1.7.0 and other clarifications

* add section about specifying make agbcc to compile with agbcc

---------

Co-authored-by: ravepossum <ravepossum@example.com>
2024-01-15 21:07:43 +01:00
psf
bf8b09b1b6
Item Ball refactor / Pluralize item names for giveitem and finditem (#3942)
* Emptied out item_ball_scripts
Added GetObjectEventTrainerRangeFromTemplate
Added Common_EventScript_FindItem

* Replaced trainer_sight_or_berry_tree_id with item constant
Replaced scripts with Common_EventScript_FindItem

* Renamed to GetItemBallIdAndAmountFromTemplate
Moved to item_ball.c

* Updated ObjectEventTemplate

* Updated inc files to support plural item names

* Refactored CopyItemNameHandlePlural to handle all items

* Change failsafe in GetItemBallIdFromTemplate to be ITEM_NONE + 1 instead of ITEMS_COUNT

* Converted spaces to tabs
https://github.com/rh-hideout/pokeemerald-expansion/pull/3942\#discussion_r1446415663
https://github.com/rh-hideout/pokeemerald-expansion/pull/3942\#discussion_r1446415525
https://github.com/rh-hideout/pokeemerald-expansion/pull/3942\#discussion_r1446415409
https://github.com/rh-hideout/pokeemerald-expansion/pull/3942\#discussion_r1446415130

* Added warning on object_event macro to prevent silent failure
Reverted global.fieldmap to original state, per feedback

---------

Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>
2024-01-14 21:35:45 +01:00
LOuroboros
80ffaa5e2c
Raised the limit of max items per stack to 999 (#3923)
* Expanded the amount of max items per stack from 99 to 999

* Set Battle Pyramid Bag stack limit back to 99
This commit exists for archival purposes.
People who may want to set the limit of item stacks in the Battle Pyramid's bag to 999 can refer to its code diff.

* Reintroduced the Battle Pyramid changes through a MAX_PYRAMID_BAG_ITEM_CAPACITY constant

* Gave 3 digit support to the Battle Pyramid's bag

* Rewrote the comment for MAX_PYRAMID_BAG_ITEM_CAPACITY

* Made DebugAction_Give_Item_SelectQuantity use MAX_ITEM_DIGITS

* Ditched BERRY_CAPACITY_DIGITS and BAG_ITEM_CAPACITY_DIGITS

* Removed MAX_BERRY_CAPACITY
No point in keeping it if we're making all item stacks cap at 999.

* Applied review corrections

* Removed pointless local var in DebugAction_Give_Item_SelectQuantity

* Defined a MAX_PYRAMID_ITEM_DIGITS

* Cleaned up some of the functions in which MAX_ITEM_DIGITS is used

Summary:
-Removed pointless local variables in CheckBagHasSpace, AddBagItem, PrintItemQuantity and PrintItemSoldAmount.
-Removed pointless brackets in an if statement of CheckBagHasSpace.
-Initialized the pocket local variable of CheckBagHasSpace from the get go to save a few lines too.

---------

Co-authored-by: Eduardo Quezada D'Ottone <eduardo602002@gmail.com>
2024-01-14 16:32:38 -03:00
Ninjdai
0b149f6b6a
Fixed move, species and ability counts to u16s in RHH header (#3992) 2024-01-14 12:49:59 -03:00
Bassoonian
4846e2a884
Add updated EV configs (#3993)
* Add updated EV configs

* Fix Misdreavus ternary
2024-01-14 15:26:34 +01:00
Eduardo Quezada D'Ottone
9445953833
Moved Item Effects to gItems (#3991)
* Moved Item Effects to gItems

* Removed redundant item effects

---------

Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>
2024-01-14 10:03:48 +01:00
Eduardo Quezada D'Ottone
ed1dbbb866
Small whitespace fix 2024-01-13 12:38:52 -03:00
Eduardo Quezada D'Ottone
5817344f7c
Move data ternaries (#3987)
* Move data ternaries

* Updated Sky Attack with pre-gen 3 config
2024-01-13 15:33:53 +01:00