mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-27 06:20:25 +00:00
Add catch rate for staticencounter1
This commit is contained in:
parent
5350cb4ab6
commit
230073876f
2 changed files with 26 additions and 0 deletions
|
@ -15,6 +15,22 @@
|
|||
Level = level;
|
||||
}
|
||||
|
||||
protected override void ApplyDetails(ITrainerInfo sav, EncounterCriteria criteria, PKM pk)
|
||||
{
|
||||
base.ApplyDetails(sav, criteria, pk);
|
||||
|
||||
var pk1 = (PK1) pk;
|
||||
if (Species == (int) Core.Species.Pikachu && Version == GameVersion.YW && Level == 5 && Moves.Count == 0)
|
||||
{
|
||||
pk1.Catch_Rate = 0xA3; // Light Ball
|
||||
return;
|
||||
}
|
||||
|
||||
// Encounters can have different Catch Rates (RBG vs Y)
|
||||
var table = Version == GameVersion.Y ? PersonalTable.Y : PersonalTable.RB;
|
||||
pk1.Catch_Rate = table[Species].CatchRate;
|
||||
}
|
||||
|
||||
protected override bool IsMatchLevel(PKM pkm, DexLevel evo)
|
||||
{
|
||||
return Level <= evo.Level;
|
||||
|
|
|
@ -71,6 +71,16 @@ namespace PKHeX.Core
|
|||
{
|
||||
base.ApplyDetails(sav, criteria, pk);
|
||||
|
||||
if (Version == GameVersion.Stadium)
|
||||
{
|
||||
var pk1 = (PK1)pk;
|
||||
// Amnesia Psyduck has different catch rates depending on language
|
||||
if (Species == (int)Core.Species.Psyduck)
|
||||
pk1.Catch_Rate = pk1.Japanese ? 167 : 168;
|
||||
else
|
||||
pk1.Catch_Rate = 167 + Util.Rand.Next(2); // 167 or 168
|
||||
}
|
||||
|
||||
if (TID != -1)
|
||||
pk.TID = TID;
|
||||
|
||||
|
|
Loading…
Reference in a new issue