mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-17 13:52:18 +02:00
Merge branch 'pagefaultgames:main' into achievements-localization
This commit is contained in:
commit
b1170d0ae3
@ -74,7 +74,7 @@ Check out our [Trello Board](https://trello.com/b/z10B703R/pokerogue-board) to s
|
|||||||
### 🎨 Trainer Portraits
|
### 🎨 Trainer Portraits
|
||||||
- pkmn_realidea (Paid Commissions)
|
- pkmn_realidea (Paid Commissions)
|
||||||
|
|
||||||
### 🎨 Pokemon Sprites
|
### 🎨 Pokemon Sprites and Animation
|
||||||
- GAMEFREAK (Pokémon Black/White 2)
|
- GAMEFREAK (Pokémon Black/White 2)
|
||||||
- Smogon Sprite Project (Various Artists)
|
- Smogon Sprite Project (Various Artists)
|
||||||
- Skyflyer
|
- Skyflyer
|
||||||
@ -100,6 +100,7 @@ Check out our [Trello Board](https://trello.com/b/z10B703R/pokerogue-board) to s
|
|||||||
- bizcoeindoloro
|
- bizcoeindoloro
|
||||||
- mangalos810
|
- mangalos810
|
||||||
- Involuntary-Twitch
|
- Involuntary-Twitch
|
||||||
|
- selstar
|
||||||
|
|
||||||
### 🎨 Move Animations
|
### 🎨 Move Animations
|
||||||
- Pokémon Reborn
|
- Pokémon Reborn
|
||||||
|
@ -1127,7 +1127,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||||||
let shinyThreshold = new Utils.IntegerHolder(32);
|
let shinyThreshold = new Utils.IntegerHolder(32);
|
||||||
if (thresholdOverride === undefined) {
|
if (thresholdOverride === undefined) {
|
||||||
if (!this.hasTrainer()) {
|
if (!this.hasTrainer()) {
|
||||||
if (new Date() < new Date('2024-05-21'))
|
if (new Date() < new Date(2024, 4, 21, 20))
|
||||||
shinyThreshold.value *= 3;
|
shinyThreshold.value *= 3;
|
||||||
this.scene.applyModifiers(ShinyRateBoosterModifier, true, shinyThreshold);
|
this.scene.applyModifiers(ShinyRateBoosterModifier, true, shinyThreshold);
|
||||||
}
|
}
|
||||||
|
@ -36,10 +36,12 @@ describe("check if every variant's sprite are correctly set", () => {
|
|||||||
|
|
||||||
function getMissingMasterlist(mlist, dirpath, excludes = []) {
|
function getMissingMasterlist(mlist, dirpath, excludes = []) {
|
||||||
const errors = [];
|
const errors = [];
|
||||||
|
const trimmedDirpath = `variant${path.sep}${dirpath.split(rootDir)[1]}`;
|
||||||
if (fs.existsSync(dirpath)) {
|
if (fs.existsSync(dirpath)) {
|
||||||
const files = fs.readdirSync(dirpath);
|
const files = fs.readdirSync(dirpath);
|
||||||
for (const filename of files) {
|
for (const filename of files) {
|
||||||
const filePath = `${dirpath}${filename}`
|
const filePath = `${dirpath}${filename}`
|
||||||
|
const trimmedFilePath = `${trimmedDirpath}${filename}`
|
||||||
const ext = filename.split('.')[1];
|
const ext = filename.split('.')[1];
|
||||||
const name = filename.split('.')[0];
|
const name = filename.split('.')[0];
|
||||||
if (excludes.includes(name)) continue;
|
if (excludes.includes(name)) continue;
|
||||||
@ -49,20 +51,30 @@ describe("check if every variant's sprite are correctly set", () => {
|
|||||||
if (ext !== 'json') {
|
if (ext !== 'json') {
|
||||||
if (mlist.hasOwnProperty(id)) {
|
if (mlist.hasOwnProperty(id)) {
|
||||||
const urlJsonFile = `${dirpath}${id}.json`;
|
const urlJsonFile = `${dirpath}${id}.json`;
|
||||||
|
const trimmedUrlJsonFilepath = `${trimmedDirpath}${id}.json`;
|
||||||
const jsonFileExists = fs.existsSync(urlJsonFile);
|
const jsonFileExists = fs.existsSync(urlJsonFile);
|
||||||
if (mlist[id].includes(1)) {
|
if (mlist[id].includes(1)) {
|
||||||
const msg = `MISSING JSON ${urlJsonFile}`;
|
const msg = `[${name}] MISSING JSON ${trimmedUrlJsonFilepath}`;
|
||||||
if (!jsonFileExists && !errors.includes(msg)) errors.push(msg);
|
if (!jsonFileExists && !errors.includes(msg)) errors.push(msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!mlist.hasOwnProperty(id)) errors.push(`missing key ${id} in masterlist for ${filePath}`);
|
if (!mlist.hasOwnProperty(id)) errors.push(`[${id}] missing key ${id} in masterlist for ${trimmedFilePath}`);
|
||||||
else if (mlist[id][parseInt(variant, 10) - 1] !== 2) errors.push(`the value should be 2 for the index ${parseInt(variant, 10) - 1} - ${filePath}`);
|
else if (mlist[id][parseInt(variant, 10) - 1] !== 2) {
|
||||||
|
const urlJsonFile = `${dirpath}${name}.json`;
|
||||||
|
const trimmedUrlJsonFilepath = `${trimmedDirpath}${name}.json`;
|
||||||
|
const jsonFileExists = fs.existsSync(urlJsonFile);
|
||||||
|
if (mlist[id].includes(1)) {
|
||||||
|
const msg = `[${id}] MISSING JSON ${trimmedUrlJsonFilepath}`;
|
||||||
|
if (!jsonFileExists && !errors.includes(msg)) errors.push(msg);
|
||||||
|
}
|
||||||
|
errors.push(`[${id}] [${mlist[id]}] - the value should be 2 for the index ${parseInt(variant, 10) - 1} - ${trimmedFilePath}`);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else if (!mlist.hasOwnProperty(name)) errors.push(`named - missing key ${name} in masterlist for ${filePath}`);else {
|
} else if (!mlist.hasOwnProperty(name)) errors.push(`named - missing key ${name} in masterlist for ${trimmedFilePath}`);else {
|
||||||
const raw = fs.readFileSync(filePath, {encoding: 'utf8', flag: 'r'});
|
const raw = fs.readFileSync(filePath, {encoding: 'utf8', flag: 'r'});
|
||||||
const data = JSON.parse(raw);
|
const data = JSON.parse(raw);
|
||||||
for (const key of Object.keys(data)) {
|
for (const key of Object.keys(data)) {
|
||||||
if (mlist[name][key] !== 1) errors.push(`the value should be 1 in the array ${filePath}`);
|
if (mlist[name][key] !== 1) errors.push(`[${name}] [${mlist[name]}] - the value should be 1 for the index ${key} - ${trimmedFilePath}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user