Make luck independent from shininess and variant
This commit is contained in:
1 parent
744ff2899b
commit
bf2a83993c
7 files changed
+44
-2
No files matched your search
@@ -1189,6 +1189,10 @@ export class GameData {
|
||||
return Math.pow(2, this.getSpeciesDefaultNature(species));
|
||||
}
|
||||
|
||||
getDexAttrLuck(dexAttr: bigint): integer {
|
||||
return dexAttr & DexAttr.SHINY ? dexAttr & DexAttr.VARIANT_3 ? 3 : dexAttr & DexAttr.VARIANT_2 ? 2 : 1 : 0;
|
||||
}
|
||||
|
||||
getNaturesForAttr(natureAttr: integer): Nature[] {
|
||||
let ret: Nature[] = [];
|
||||
for (let n = 0; n < 25; n++) {
|
||||
|
||||
@@ -36,6 +36,7 @@ export default class PokemonData {
|
||||
public friendship: integer;
|
||||
public metLevel: integer;
|
||||
public metBiome: Biome | -1;
|
||||
public luck: integer;
|
||||
public pauseEvolutions: boolean;
|
||||
public pokerus: boolean;
|
||||
|
||||
@@ -75,6 +76,7 @@ export default class PokemonData {
|
||||
this.friendship = source.friendship !== undefined ? source.friendship : getPokemonSpecies(this.species).baseFriendship;
|
||||
this.metLevel = source.metLevel || 5;
|
||||
this.metBiome = source.metBiome !== undefined ? source.metBiome : -1;
|
||||
this.luck = source.luck !== undefined ? source.luck : (source.shiny ? (source.variant + 1) : 0) + (source.fusionShiny ? source.fusionVariant + 1 : 0);
|
||||
if (!forHistory)
|
||||
this.pauseEvolutions = !!source.pauseEvolutions;
|
||||
this.pokerus = !!source.pokerus;
|
||||
|
||||
Reference in new issue
Block a user