mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-05-27 21:52:15 -05:00
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. |
||
|---|---|---|
| .. | ||
| Data | ||
| Generator | ||
| Information | ||
| Verifiers | ||
| EncounterEgg.cs | ||
| EncounterInvalid.cs | ||
| EncounterRejected.cs | ||
| EncounterSlot.cs | ||
| EncounterSlot1.cs | ||
| EncounterSlotMoves.cs | ||
| EncounterSlotPermissions.cs | ||
| EncounterStatic.cs | ||
| EncounterStaticPID.cs | ||
| EncounterStaticShadow.cs | ||
| EncounterStaticTyped.cs | ||
| EncounterTrade.cs | ||
| EncounterTradeCatchRate.cs | ||
| EncounterTradePID.cs | ||
| LegalInfo.cs | ||