mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-19 22:09:27 +02:00
Merge branch 'beta' into embody-triggers
This commit is contained in:
commit
d51daabb4f
@ -120,17 +120,23 @@ export class GameOverPhase extends BattlePhase {
|
|||||||
*/
|
*/
|
||||||
private awardRibbons(): void {
|
private awardRibbons(): void {
|
||||||
let ribbonFlags = 0n;
|
let ribbonFlags = 0n;
|
||||||
|
for (const challenge of globalScene.gameMode.challenges) {
|
||||||
|
const ribbon = challenge.ribbonAwarded;
|
||||||
|
if (challenge.value && ribbon) {
|
||||||
|
ribbonFlags |= ribbon;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Block other ribbons if flip stats or inverse is active
|
||||||
|
const flip_or_inverse = ribbonFlags & (RibbonData.FLIP_STATS | RibbonData.INVERSE);
|
||||||
|
if (flip_or_inverse) {
|
||||||
|
ribbonFlags = flip_or_inverse;
|
||||||
|
} else {
|
||||||
if (globalScene.gameMode.isClassic) {
|
if (globalScene.gameMode.isClassic) {
|
||||||
ribbonFlags |= RibbonData.CLASSIC;
|
ribbonFlags |= RibbonData.CLASSIC;
|
||||||
}
|
}
|
||||||
if (isNuzlockeChallenge()) {
|
if (isNuzlockeChallenge()) {
|
||||||
ribbonFlags |= RibbonData.NUZLOCKE;
|
ribbonFlags |= RibbonData.NUZLOCKE;
|
||||||
}
|
}
|
||||||
for (const challenge of globalScene.gameMode.challenges) {
|
|
||||||
const ribbon = challenge.ribbonAwarded;
|
|
||||||
if (challenge.value && ribbon) {
|
|
||||||
ribbonFlags |= ribbon;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
// Award ribbons to all Pokémon in the player's party that are considered valid
|
// Award ribbons to all Pokémon in the player's party that are considered valid
|
||||||
// for the current game mode and challenges.
|
// for the current game mode and challenges.
|
||||||
|
Loading…
Reference in New Issue
Block a user