Commit graph

389 commits

Author SHA1 Message Date
Eduardo Quezada
3219a48adf Merge branch '_RHH/master' into _RHH/upcoming
# Conflicts:
#	src/battle_script_commands.c
2024-05-13 11:00:12 -04:00
Alex
56cee80fbf
Explosion and Mind Blown / Steel Beam refactor (CFRU port) (#4516)
* Explosion and Mind Blown / Steel Beam refactor (CFRU port)

* forgot ndebug

* Restored EFFECT_MIND_BLOWN

* requested changes

---------

Co-authored-by: Eduardo Quezada <eduardo602002@gmail.com>
2024-05-12 11:41:18 -04:00
sneed
a8bb82778a
Remove and replace MOVE_EFFECT_SP_ATK_TWO_DOWN (#4557) 2024-05-12 15:07:43 +02:00
Eduardo Quezada
0c74fd31c3 Merge branch '_RHH/master' into _RHH/upcoming 2024-05-02 14:24:17 -04:00
PhallenTree
6ad443c9a8
Fixes Eject Items causing wrong pokemon to take damage from entry hazards (#4465)
* Fix hazards damaging the wrong pokemon using eject items

* Added Stealth Rock test as requested

* Added Stealth Rock double battle test
2024-04-29 23:16:58 +02:00
kittenchilly
d58e6517f8
Add abilities Tera Shift, Tera Shell, and Teraform Zero (#4418)
* Add abilities Tera Shift, Tera Shell, and Teraform Zero

* Address reviews

* Tests and misc cleanup

* Fix alignments

* Update battle_script_commands.c

* New tests and fix behavior

* Address more reviews

* Update battle_util.c
2024-04-27 19:52:31 +02:00
AgustinGDLV
84a9d4ffcf
Terastallization (#4110)
* wrote foundational terastal tests

* implemented baseline test-only Tera functionality; modified GetBattlerType + STAB calculations, misc. changes to some moves

* added tests and func. for Stellar type, more tests for Tera Blast

* more tests for Stellar type, Conversion fixes, Color Change + Conversion2 future proof

* implemented tera blast, expanded stellar type func., fixed tests

* last set of Tera/Tera Blast tests for checklist, protean fix

* implemented in-battle Terastallization, WIP stellar indicator and tera animation

* fixed bad merge

* expanded NUMBER_OF_MON_TYPES, cut down on TYPE_STELLAR hackiness, added Stellar type to summary

* fixed type indicators

* added tera logic to AI

* implemented code review changes, added B_TERA_ORB_NO_COST

* updated AI to calc damage with Tera when applicable; minor rework to AI gimmick handling

* fixed Tera Blast split choice occuring when not Terastallized

* fixed Tera Blast using Last Respects BP calcs

* added tera type to TrainerMon, code review tweaks
2024-04-24 11:17:46 +02:00
kittenchilly
e19b05a3a9
Add Fog weather (#4359)
* Add Fog weather

* Update battle_string_ids.h

* Update battle.h

* some tweaks

* Update battle_anim_scripts.s

* Address reviews

* Update battle_util.c

* Update battle_util.c

* Update include/config/battle.h

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

* Address reviews, changes, fix bugs

---------

Co-authored-by: Eduardo Quezada <eduardo602002@gmail.com>
2024-04-17 12:06:49 -04:00
Eduardo Quezada
5bf379720f Merge branch '_RHH/master' into _RHH/upcoming
# Conflicts:
#	src/data/moves_info.h
2024-04-12 21:30:52 -04:00
kittenchilly
3fb52b6b0e
Change Frostbite abbreviation from FSB to FRB (#4355)
* Change Frostbite abbreviation from FSB to FRB

* Melted the ice is actually the one used

* Update moves_info.h

* Update moves_info.h

* Update items.h
2024-04-10 09:16:32 +02:00
Alex
3c85089428
Fixes Gulp Missile Dive / Power Herb interaction (#4371)
* Fixed Cramorant Dive / Power Herb interaction

* remove file

* leftover
2024-04-09 10:32:11 +02:00
Alex
db42d2b5a4
Adds Booster Energy (#4337)
* Adds Booster Energy

* fix string

* fixes strings in tests

* Apply suggestions from code review

---------

Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>
2024-04-05 19:38:50 +02:00
Eduardo Quezada
75ad61e5bf Merge branch '_RHH/master' into _RHH/upcoming
# Conflicts:
#	data/battle_scripts_1.s
#	include/constants/battle_move_effects.h
#	src/battle_ai_main.c
#	src/battle_ai_util.c
#	src/battle_tv.c
#	src/data/battle_moves.h
#	src/data/graphics/pokemon.h
2024-02-19 10:13:13 -03:00
Alex
cd596fdd80
Adds Tidy Up + minor Dragon Cheer follow up (#4136)
* Adds Tidy Up + minor Dragon Cheer follow up

* improve tidy up script

* Add IncreaseTidyUpScore function

* remove useless calls

* 2 small tests and a correction for IncreasyTidyUpScore
2024-02-18 20:00:36 +01:00
ghoulslash
ce99db0086
Generic Starting Battle Status Variable (#4176)
* setup generic starting battle status variable, ABILITYEFFECT_SWITCH_IN_STATUSES

* fix B_ANIM_TAILWIND, assign to starting statuses, and change B_VAR_STARTING_STATUS check for only the variable and not trainers

* Update src/battle_main.c

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

* Update src/battle_util.c

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

* Update src/battle_util.c

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

* style fixes

* General_Room naims play SE

* fix sText_BizarreArenaCreated

---------

Co-authored-by: ghoulslash <pokevoyager0@gmail.com>
Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>
2024-02-14 10:05:37 +01:00
Nephrite
65c508d193
Secondary effects overhaul minor follow-up (#4062)
* settwoturnstring command

* Unified two-turn attacks and Meteor Beam

To do: Solar Beam

* Solar Beam

Also fixed various function, removed EFFECT_GUST (who knows why that exists?)

* Updated Solar Beam + tests

* Redid two turn move + animations logic

Removed pointless various function; to do: remove Skull Bash, fix AI test

* Removed now-pointless flag

* Removed Skull Bash

And temporarily commented out failing AI tests

* Removed Sky Uppercut effect

Not sure when or why this was ever necessary

* Removed BattleScript_EffectSemiInvulnerable

Now uses BattleScript_EffectTwoTurnsAttack. Kept the effect; used the argument field to determine which STATUS3 such moves should apply but added a function to jump over weather checks in BattleScript_EffectTwoTurnsAttack if the current move is semi-invulnerable (since the instant-fire weather check and STATUS3 use the same field)

* Applied review changes

* Replaced VARIOUS with callnative

Tried to fix test but couldn't :/ wtf is going on

* Fixed one AI test

Cant fix the other...

* Added KNOWN_FAILING to failing AI tests

Separated them out into their own test

* Optimised script, overhauled charge turn string setting

Condensed multiple confusing macros into one, jumpifweathercheckchargeeffects. Script now tweaked and trimmed, string ids for charge turns now added to argument along with status3 (thanks to compression macro) and instant-fire-weather for semi-invulnerable and two-turn moves respectively. Also introduced a savedStringId in gBattleScripting to make string selection work.

* Unified two turn move tests + minor corrections

* Added semi-invulnerable move tests

Set the Razor Wind test to known failing - something to do with its animation?

---------

Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>
2024-02-04 23:02:59 +01:00
ghoulslash
83b9b95662
add supersweet syrup, unify single-use entry abilities to single field (#4115)
Co-authored-by: ghoulslash <pokevoyager0@gmail.com>
2024-02-02 15:44:14 +01:00
ZnogyroP
71b49a114f
Adds move Upper Hand (#4085)
* Remove non-existent tilesets from label comments and alphabetize

* Fixed braces style

* gbagfx bit depth upconversion fix

* jsonproc: filter out every non-alphanumeric character

* fix(linking): link gflib/malloc.c at top of EWRAM in ld_script_modern.ld

* Adds move Upper Hand

* Requested changes

- Tabs / spaces where proper
- HitFromAtkString -> HitFromAccCheck
- Actually compiles now lol
- Moved assumes into relevant tests
- Cleaned up the check for TryUpperHand

* Fixed || positioning

* Update upper_hand.c

* Revert "Merge remote-tracking branch 'upstream/master' into upper-hand"

This reverts commit b21275dfe9, reversing
changes made to 89b1ad1ea1.

* AI logic and conflicts solved

* Test fix

* Fix Sheer Force test

* Requested changes

* Requested changes

* Update battle_script_commands.c

---------

Co-authored-by: GriffinR <griffin.g.richards@gmail.com>
Co-authored-by: Eduardo Quezada <eduardo602002@gmail.com>
Co-authored-by: Sierraffinity <sierra@domoreaweso.me>
Co-authored-by: sbird <sbird@no.tld>
2024-02-01 12:23:58 +01:00
Alex
6d3fa525d5
Rename EFFECT_FAKE_OUT to EFFECT_FIRST_TURN_ONLY (#4081)
* Splits First Impression effect from Fake Out

* Fix test failing

* rename EFFECT_FAKE_OUT

* use moveeffect chance for fake out and priority field for first impression

* rename rest of fake out

* messed up merge

* remove useful comment

---------

Co-authored-by: Eduardo Quezada D'Ottone <eduardo602002@gmail.com>
2024-01-31 09:32:58 -03:00
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
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
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
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
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
Nephrite
a76e3c70ba Applied more review fixes 2024-01-12 03:02:48 +09:00
Nephrite
39773c0659 Burn Up and Double Shock
Both working by applying an additional effect; added a generic "jumpifnotcurrentmoveargtype" type command to make it possible, relpacing secret power's function
2023-12-29 12:44:38 +09:00
Nephrite
cd5c59ae5a Merge remote-tracking branch 'rhh/upcoming' into secondary_effects_overhaul 2023-12-26 13:19:10 +09:00
Nephrite
c5061f0161 Updated remaining moves which use secondaryEffectChance
secondaryEffectChance is no longer considered anywhere in the code; tidied up scripts and more
2023-12-26 13:12:11 +09:00
Alex
1339256d5d
Adds Ability Hospitality (#3818)
* Adds Ability Hospitality

* fix agbcc
2023-12-25 01:43:57 +01:00
DizzyEggg
6137db102e
Ally Switch (#3533)
* ally switch move animation

* Ally Switch anim done

* ally switch test and improve animation

* derp

* add ally switch known failing test for ally targeting moves

* moves which targetted ally fail after ally switch

* ally switch works like protect

---------

Co-authored-by: root <root@LAPTOP-3SNV7DEQ>
Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>
2023-12-20 15:26:28 +01:00
Alex
b9edbb429b
Adds combined pledge move effects (#3336)
* Adds combined pledge move effects

* added pledge status and various other fixes

* leftover

* fix triple arrow test tag

* pledge moves can not be redirected by absorbing abilities

* more pledge changes

* remove duplicate test

* Stab boost, Rainbow anim and new SeaOfFire anim

* leftover

---------

Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>
2023-11-21 16:23:22 +01:00
Alex
4b3c96a89b
Adds ability Zero to Hero (#3542) 2023-11-09 08:25:46 -03:00
Alex
f6781a77d4 merge rhh/upcoming 2023-10-25 09:42:19 +02:00
Alex
91b6722322 Octolock, more tests 2023-10-18 20:25:34 +02:00
Eduardo Quezada
c0540a3559 Merge branch 'RHH/upcoming' into RHH/pr/upcoming/dynamax
# Conflicts:
#	include/battle.h
#	include/constants/battle_move_effects.h
#	include/constants/battle_string_ids.h
#	src/battle_main.c
#	src/battle_message.c
#	src/battle_script_commands.c
#	src/battle_util.c
2023-10-15 00:30:00 -03:00
Alex
0b9126ff53
Adds moves Matcha Gotcha, Syrup Bomb and Ivy Cudgel (#3402)
* initial commit

* done

* clean up
2023-10-11 11:09:50 +02:00
ghoulslash
70fbf9e9df
Opportunist Ability (#2994)
Co-authored-by: Eduardo Quezada D'Ottone <eduardo602002@gmail.com>
Co-authored-by: ghoulslash <pokevoyager0@gmail.com>
2023-10-09 22:35:00 -03:00
Eduardo Quezada
92301398bc Merge branch 'RHH/upcoming' into RHH/pr/upcoming/dynamax
# Conflicts:
#	asm/macros/battle_script.inc
#	data/battle_anim_scripts.s
#	data/battle_scripts_1.s
#	include/battle.h
#	include/battle_controllers.h
#	include/battle_interface.h
#	include/config/battle.h
#	include/constants/battle.h
#	include/constants/battle_anim.h
#	include/constants/battle_move_effects.h
#	include/constants/battle_string_ids.h
#	include/data.h
#	include/random.h
#	sound/cry_tables.inc
#	src/battle_anim_new.c
#	src/battle_controller_opponent.c
#	src/battle_controller_player.c
#	src/battle_controller_player_partner.c
#	src/battle_interface.c
#	src/battle_main.c
#	src/battle_message.c
#	src/battle_script_commands.c
#	src/battle_util.c
#	src/data/pokemon/form_change_table_pointers.h
#	src/data/pokemon/species_info.h
#	src/data/text/move_names.h
#	test/test_runner_battle.c
2023-10-09 16:51:41 -03:00
Alex
a073e7bd59
Adds Gigaton Hammer and Salt Cure (#3297) 2023-09-15 11:18:47 -03:00
Eduardo Quezada
f3217c18dc Merge branch 'RHH/master' into RHH/upcoming
# Conflicts:
#	src/battle_util.c
2023-09-14 09:12:12 -03:00
DizzyEggg
7936910f90
Bug Bite - Tests and small fix (#3282)
Co-authored-by: Eduardo Quezada D'Ottone <eduardo602002@gmail.com>
2023-09-14 08:57:30 -03:00
Eduardo Quezada
820113d883 Merge branch 'RHH/master' into RHH/upcoming
# Conflicts:
#	data/battle_anim_scripts.s
#	data/battle_scripts_1.s
#	include/battle_scripts.h
#	include/battle_util.h
#	src/battle_script_commands.c
#	src/battle_util.c
2023-09-07 15:13:06 -03:00
DizzyEggg
cfd802423b
Fling fixes and tests (#3191)
* begin fling tests

* fling fixes and tests

* Update test/move_effect_fling.c

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

* Update test/move_effect_fling.c

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

* Update test/move_effect_fling.c

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

* Update test/move_effect_fling.c

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

* Update test/move_effect_fling.c

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

* Update test/move_effect_fling.c

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

* Update test/move_effect_fling.c

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

* Update test/move_effect_fling.c

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

* scripts names change

* fix fling's test file

---------

Co-authored-by: Eduardo Quezada D'Ottone <eduardo602002@gmail.com>
2023-09-05 06:56:36 -03:00
Eduardo Quezada D'Ottone
c4e88760f5
Pret merge (2023/08/31) (#3268) 2023-08-31 14:52:18 -04:00
Eduardo Quezada
0d5b00aaf2 Merge remote-tracking branch 'pret/master' into RHH/pr/upcoming/pret_20230829
# Conflicts:
#	README.md
#	data/battle_ai_scripts.s
#	data/battle_scripts_1.s
#	data/maps/BattleFrontier_Lounge7/scripts.inc
#	include/battle_anim.h
#	include/battle_message.h
#	include/constants/items.h
#	src/battle_ai_script_commands.c
#	src/battle_ai_switch_items.c
#	src/battle_anim_throw.c
#	src/battle_anim_utility_funcs.c
#	src/battle_controller_link_opponent.c
#	src/battle_controller_link_partner.c
#	src/battle_controller_opponent.c
#	src/battle_controller_player.c
#	src/battle_controller_player_partner.c
#	src/battle_controller_recorded_opponent.c
#	src/battle_controller_recorded_player.c
#	src/battle_controller_wally.c
#	src/battle_gfx_sfx_util.c
#	src/battle_message.c
#	src/battle_script_commands.c
#	src/battle_util.c
#	src/data/party_menu.h
#	src/data/pokemon/tmhm_learnsets.h
#	src/daycare.c
#	src/field_specials.c
#	src/hall_of_fame.c
#	src/party_menu.c
#	src/pokemon.c
#	src/tv.c
2023-08-31 14:28:01 -04:00
LOuroboros
d78d63e537
Fixed redundant calls in Teleport's battle script (#3212)
The battle script was originally making an extra call to attackcanceler and attackstring pointlessly whenever there was a jump to BattleScript_EffectBatonPass.
This commit addresses that by relocating BattleScript_EffectTeleport's own calls to attackcanceler and attackstring.
2023-08-31 09:07:06 +02:00
kittenchilly
c3e31af5f3 Ultra burst trigger 2023-08-09 22:12:26 -05:00
Eduardo Quezada
f94efa94e1 Merge branch 'RHH/master' into RHH/upcoming 2023-08-02 01:18:07 -04:00
DizzyEggg
5eec3b2fc3
fix various issues with primal weather blocking water/fire type moves (#3138)
* fix various issues with primal weather blocking water/fire type moves

* forgot to change return to effect=1

* fix bugs
2023-07-30 10:50:51 -04:00
Eduardo Quezada
47cea526ec Merge branch 'RHH/master' into RHH/upcoming
# Conflicts:
#	src/battle_util.c
2023-07-19 23:22:07 -04:00