PKHeX/PKHeX.Core/Legality/Encounters
Kurt a4a0e3ac6e Fix flute level amp direction
The inputs to "IsLevelWithinRange" are the highest value the
lowest-level can be, and the lowest value the highest level can be...
seems confusing (hence the original error).

If a slot is 6-7, with a wild encounter (flute), we can go +/-3 from
6-7, which is 3-10.
With an encounter of level 5, the inputs are: 5+3, and 5-3 (8, 2).
Since 8>lvlmin and 2<lvlhi, we can get a level 5 pkm from the slot
(using a negative flute yielding a -1 adjustment).

I could probably refactor it to be a 3-input signature (lvl, lvlneg,
lvlpos), and have it do LevelMin - lvlneg <= lvl && lvl <= LevelMax +
lvlpos

I should probably refactor these methods to do minLevel & maxLevel (so
baseSpecies.Level to CurrentLevel for pkm that lost their original met
data) but nothing needs the extra logic at this time.
2019-09-19 22:37:56 -07:00
..
Data Minor reorganization 2019-09-13 09:08:12 -07:00
Generator Split encounter areas, relocate slot finding to obj 2019-09-12 23:20:52 -07:00
Information Extract most common location numbers to class 2019-05-10 20:46:49 -07:00
Verifiers Misc clean 2019-09-10 00:21:51 -07:00
EncounterEgg.cs Extract logic from PKX 2019-09-18 19:58:23 -07:00
EncounterInvalid.cs Add short/long name property differentiation 2019-03-17 22:19:37 -07:00
EncounterRejected.cs Add short/long name property differentiation 2019-03-17 22:19:37 -07:00
EncounterSlot.cs Fix flute level amp direction 2019-09-19 22:37:56 -07:00
EncounterSlot1.cs Split EncounterArea into game-specific classes 2019-09-11 22:06:24 -07:00
EncounterSlotMoves.cs Update iencounterable api with new criteria arg 2018-12-29 22:24:34 -08:00
EncounterSlotPermissions.cs Update iencounterable api with new criteria arg 2018-12-29 22:24:34 -08:00
EncounterStatic.cs Extract logic from PKX 2019-09-18 19:58:23 -07:00
EncounterStaticPID.cs Refactoring iencounterable->pkm 2019-02-09 11:37:20 -08:00
EncounterStaticShadow.cs Misc clean 2019-09-10 00:21:51 -07:00
EncounterStaticTyped.cs Misc clean 2019-09-10 00:21:51 -07:00
EncounterTrade.cs Extract logic from PKX 2019-09-18 19:58:23 -07:00
EncounterTradeCatchRate.cs Misc clean 2019-09-10 00:21:51 -07:00
EncounterTradePID.cs Misc clean 2019-09-10 00:21:51 -07:00
LegalInfo.cs Misc clean 2019-09-10 00:21:51 -07:00