StevensSEC / pokemonbattlelib

A portable library for accurately simulating Pokemon battles.
GNU General Public License v3.0
13 stars 2 forks source link

Struggle #378

Closed adapap closed 2 years ago

adapap commented 3 years ago

Also adds BattleRuleStruggle

Closes #329

dyc3 commented 3 years ago

We also need to have a pokemon validation rule that disallows pokemon from having struggle.

codecov[bot] commented 3 years ago

Codecov Report

Merging #378 (ae30584) into main (b2fced1) will increase coverage by 0.7828%. The diff coverage is 93.2692%.

:exclamation: Current head ae30584 differs from pull request most recent head 8b8fb6c. Consider uploading reports for the commit 8b8fb6c to get more accurate results Impacted file tree graph

@@               Coverage Diff                @@
##               main       #378        +/-   ##
================================================
+ Coverage   94.5475%   95.3303%   +0.7828%     
================================================
  Files            16         16                
  Lines          1779       2013       +234     
================================================
+ Hits           1682       1919       +237     
+ Misses           77         72         -5     
- Partials         20         22         +2     
Impacted Files Coverage Δ
battle_round.go 94.4134% <ø> (ø)
move.go 91.6666% <ø> (+1.6666%) :arrow_up:
party.go 94.4444% <ø> (+1.8518%) :arrow_up:
transactions.go 96.0377% <84.2105%> (-0.0609%) :arrow_down:
calc.go 93.5064% <92.3076%> (+0.7528%) :arrow_up:
battle.go 96.9387% <96.0784%> (+3.6054%) :arrow_up:
pokemon.go 92.0704% <100.0000%> (+6.2750%) :arrow_up:
rng.go 100.0000% <0.0000%> (ø)
items.go 100.0000% <0.0000%> (ø)
types.go 100.0000% <0.0000%> (ø)
... and 13 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update b2fced1...8b8fb6c. Read the comment docs.

adapap commented 3 years ago

Needs to have a new PokemonValidationRule to ensure that you can't battle with pokemon that know MoveStruggle as one of their 4 moves.

To clarify, are you saying that struggle should not be allowed as one of the Pokemon's moves when validating a Pokemon? Wouldn't this be better to include with learnsets?

dyc3 commented 3 years ago

Yeah, that's correct. We don't have learnsets yet, so it'll be a temporary thing we can replace when we do learnsets.