Add ability to convert scavs to bosses

This commit is contained in:
Kaeno 2024-06-17 23:36:41 +01:00
parent 5d0cfd7971
commit de6980b0a8
3 changed files with 53 additions and 13 deletions

View File

@ -49,17 +49,17 @@
"pmcBEAR": 15
},
"bosses": [
"bossbully",
"bossgluhar",
"bosskilla",
"bosskojaniy",
"bosssanitar",
"bosstagilla",
"bossknight",
"bosszryachiy",
"bossboar",
"bossboarSniper",
"bosskolontay"
"bossBully",
"bossGluhar",
"bossKilla",
"bossKojaniy",
"bossSanitar",
"bossTagilla",
"bossKnight",
"bossZryachiy",
"bossBoar",
"bossBoarSniper",
"bossKolontay"
],
"durability": {
"default": {
@ -2705,5 +2705,22 @@
}
},
"lowProfileGasBlockTpls": ["61702f1b67085e45ef140b26", "5dfa3d45dfc58d14537c20b0", "5bb20dcad4351e3bac1212da", "56eabcd4d2720b66698b4574", "6065dc8a132d4d12c81fd8e3", "55d4af3a4bdc2d972f8b456f"],
"disableLootOnBotTypes": []
}
"disableLootOnBotTypes": [],
"assaultToBossConvertion": {
"bossConvertEnabled": false,
"bossesToConvertTo": [
"bossKilla",
"bossSanitar",
"bossKolontay",
"bossKnight",
"followerBigPipe",
"followerBirdEye"
],
"bossConvertMinMax": {
"assault": {
"min": 100,
"max": 100
}
}
}
}

View File

@ -434,6 +434,21 @@ export class BotController
botGenerationDetails.botCountToGenerate = this.botConfig.presetBatch[botGenerationDetails.role];
}
}
// Only runs if bot didnt get picked to be PMC & Boss Convert is enabled
if (this.botConfig.assaultToBossConversion.bossConvertEnabled && !botGenerationDetails.isPmc) {
const bossConvertPercent = this.botConfig.assaultToBossConversion.bossConvertMinMax[requestedBot.Role.toLowerCase()];
// Only Pass if role exists
if (bossConvertPercent) {
const convertToBoss = this.botHelper.rollChanceToBePmc(requestedBot.Role, bossConvertPercent);
// Should become Boss
if (convertToBoss) {
// Seems Actual bosses have the same Brain issues like PMC gaining Boss Brains We cant use all bosses
botGenerationDetails.role = this.randomUtil.drawRandomFromList(this.botConfig.assaultToBossConversion.bossesToConvertTo)[0];
botGenerationDetails.botDifficulty = this.getPMCDifficulty(requestedBot.Difficulty);
botGenerationDetails.botCountToGenerate = this.botConfig.presetBatch[botGenerationDetails.role];
}
}
}
// Construct cache key
const cacheKey = `${

View File

@ -45,6 +45,14 @@ export interface IBotConfig extends IBaseConfig
lowProfileGasBlockTpls: string[]
/** What bottypes should be excluded from having loot generated on them (backpack/pocket/vest) does not disable food/drink/special/ */
disableLootOnBotTypes: string[]
assaultToBossConversion: IAssaultToBossConversion
}
export interface IAssaultToBossConversion
{
bossConvertEnabled: boolean
bossesToConvertTo: string[]
bossConvertMinMax: Record<string, MinMax>
}
/** Number of bots to generate and store in cache on raid start per bot type */