1
mirror of https://github.com/thepeacockproject/Peacock synced 2025-03-01 14:43:02 +01:00

Sniper locations have no escalations ()

This commit is contained in:
moonysolari 2023-04-30 04:20:55 -04:00 committed by GitHub
parent 51e21ed56b
commit d4df25d6d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 8 deletions

@ -26,7 +26,7 @@ import {
} from "../types/types"
import { SavedChallengeGroup } from "../types/challenges"
import { controller } from "../controller"
import { gameDifficulty } from "../utils"
import { gameDifficulty, isSniperLocation } from "../utils"
export function compileScoringChallenge(
challenge: RegistryChallenge,
@ -269,6 +269,16 @@ export function filterChallenge(
)
}
if (challenge.Tags.includes("escalation")) {
// TODO: change this when pontus is added.
return (
!isSniperLocation(options.parent) &&
!["LOCATION_PARENT_SNUG", "LOCATION_PARENT_ROCKY"].includes(
options.parent,
)
)
}
return true
}
}

@ -588,14 +588,8 @@ export class ChallengeService extends ChallengeRegistry {
gameVersion,
)
// Rocky is the only parent location with no escalations. TODO: change this when pontus is added.
// H2 & H1 have the escalation challenges in "feats"
if (
!["LOCATION_PARENT_SNUG", "LOCATION_PARENT_ROCKY"].includes(
location,
) &&
gameVersion === "h3"
) {
if (gameVersion === "h3") {
this.getGroupedChallengesByLoc(
filter,
"GLOBAL_ESCALATION_CHALLENGES",