Commit Graph

22 Commits

Author SHA1 Message Date
Maruno17
b5e37248b9 Pokémon sent into battle now default to the Fight option, fixed bugs in Instruct, fixed some AI bugs, fixed parameter mixup for def pbMoveCanTarget?, renamed function to function_code everywhere, fixed black party Pokémon icons in storage, added some more AI testing code 2023-06-18 20:12:36 +01:00
Maruno17
ce549ab62a Rewrote AI item usage (inc. adding Revives), various fixes/changes to AI, removed Struggle from PBS files, some bug fixes 2023-04-23 17:52:39 +01:00
Maruno17
a22c5ea89c More work on the AI, refactored stat stage multipliers 2023-04-09 22:26:48 +01:00
Maruno17
7e4ef4247b Merge branch 'dev' into ai 2023-02-10 21:20:28 +00:00
Maruno17
becce85550 Removed deprecated code, renamed "base_damage"/"baseDamage"/"baseDmg" to "power" 2023-02-10 21:18:10 +00:00
Maruno17
3f5c1f0974 Merge branch 'dev' into ai 2023-02-05 19:10:25 +00:00
Maruno17
13aab8d911 Lots of rubocop 2023-01-28 15:21:12 +00:00
Maruno17
d8f38947f4 AI function code rewrites, added Shadow Sky's missing effects, fixed Shadow End's recoil damage 2023-01-22 21:21:19 +00:00
Maruno17
05b954e262 Merge branch 'dev' into ai 2022-12-31 17:28:56 +00:00
Maruno17
3fe324d0da Generalised a species' types to allow any number of types 2022-12-31 17:24:33 +00:00
Maruno17
8275d40193 Added Mold Breaker consideration to AI, updated some AI calculations, fixed non-ignorable abilities in damage calculation actually being ignorable 2022-08-29 22:39:06 +01:00
Maruno17
a20f378b33 Minor tweaks 2022-08-09 19:30:27 +01:00
Keyacom
30c3f472ef Implement TramplesMinimize as a move flag (#175)
* Implement "TramplesMinimize" as a move flag

Implemented `TramplesMinimize` as a move flag. Due to it, removed effect codes `FlinchTargetTrampleMinimize` and `ParalyzeTargetTrampleMinimize` (the second one was exclusive to Body Slam). Moves that had them now have the effect codes `FlinchTarget` and `ParalyzeTarget`, respectively.

The code now does not check if the parameter of `tramplesMinimize?` is 1 or 2, it now checks if it is `true` or `false`. For the effect that causes the moves with this flag to skip accuracy checks, it also checks if `Settings::MECHANICS_GENERATION` is equal to or greater than 6.

Data on which moves are to be treated as able to double damage if Minimized and skip accuracy checks are [here](https://bulbapedia.bulbagarden.net/wiki/Minimize_(move)#Vulnerability_to_moves).

**Remarks:**
- Dragon Rush, Heat Crash and Heavy Slam could not trample Minimize in Gen 5. Dragon Rush and Heat Crash could do so in Gen 6+, but Heavy Slam could not until Gen 7.
- Double Iron Bash could only trample Minimize in Gen 7.

**TL;DR:**
- Implemented `TramplesMinimize` as a move flag.
- Modified the check for this move flag.
- Removed effect codes `FlinchTargetTrampleMinimize` and `ParalyzeTargetTrampleMinimize`. Moves that had them now have the effect codes `FlinchTarget` and `ParalyzeTarget`, respectively.
2022-02-06 19:36:51 +00:00
Maruno17
132a16950d Yet more Rubocopping 2021-12-23 00:27:17 +00:00
Maruno17
65b1a8d6c3 More tweaks from the Rubocop overlord 2021-12-19 17:28:59 +00:00
Maruno17
33781493f4 More aligning of code 2021-12-19 12:19:08 +00:00
Maruno17
13a238cc6a Many more Rubocop-inspired code improvements 2021-12-18 19:06:22 +00:00
Maruno17
d17fc40a47 Added decent spacing to all scripts thanks to Rubocop 2021-12-18 15:25:40 +00:00
Maruno17
f7b76ae62e The Great Enspacening begins! 2021-12-18 12:20:31 +00:00
Maruno17
2480ab0f9e Applied most Rubocop-suggested layout fixes 2021-12-18 01:56:10 +00:00
Maruno17
048a18b415 Refactored ability/item/ball battle handlers, added "UltraBeast" species flag for Beast Ball 2021-11-18 22:52:19 +00:00
Maruno17
1c4819e5f0 Renamed all battle-related classes and modules 2021-11-16 23:05:16 +00:00