Move conversion to boss code into its own function - force difficulty to be normal
Fixed bad type for bot type weights Small formatting changes
This commit is contained in:
parent
0a6ef574d0
commit
adb18884b8
@ -444,14 +444,14 @@ export class BotController
|
||||
// Only Pass if role exists
|
||||
if (bossConvertPercent)
|
||||
{
|
||||
const convertToBoss = this.botHelper.rollChanceToBePmc(requestedBot.Role, bossConvertPercent);
|
||||
const convertToBoss = this.botHelper.rollChanceToBePmc(
|
||||
requestedBot.Role,
|
||||
bossConvertPercent);
|
||||
if (convertToBoss)
|
||||
{
|
||||
// Seems Actual bosses have the same Brain issues like PMC gaining Boss Brains We cant use all bosses
|
||||
botGenerationDetails.role
|
||||
= this.weightedRandomHelper.getWeightedValue(toBossSettings.bossesToConvertToWeights);
|
||||
botGenerationDetails.botDifficulty = this.getPMCDifficulty(requestedBot.Difficulty);
|
||||
botGenerationDetails.botCountToGenerate = this.botConfig.presetBatch[botGenerationDetails.role];
|
||||
this.convertBotGenerationDetailsToRandomBoss(
|
||||
botGenerationDetails,
|
||||
toBossSettings.bossesToConvertToWeights);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -487,6 +487,19 @@ export class BotController
|
||||
return [desiredBot];
|
||||
}
|
||||
|
||||
protected convertBotGenerationDetailsToRandomBoss(
|
||||
botGenerationDetails: BotGenerationDetails,
|
||||
possibleBossTypeWeights: Record<string, number>): void
|
||||
{
|
||||
// Seems Actual bosses have the same Brain issues like PMC gaining Boss Brains We cant use all bosses
|
||||
botGenerationDetails.role
|
||||
= this.weightedRandomHelper.getWeightedValue(possibleBossTypeWeights);
|
||||
|
||||
// Bosses are only ever 'normal'
|
||||
botGenerationDetails.botDifficulty = "normal";
|
||||
botGenerationDetails.botCountToGenerate = this.botConfig.presetBatch[botGenerationDetails.role];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the difficulty passed in, if its not "asonline", get selected difficulty from config
|
||||
* @param requestedDifficulty
|
||||
|
@ -51,7 +51,7 @@ export interface IBotConfig extends IBaseConfig
|
||||
export interface IAssaultToBossConversion
|
||||
{
|
||||
bossConvertEnabled: boolean
|
||||
bossesToConvertToWeights: Record<string, MinMax>
|
||||
bossesToConvertToWeights: Record<string, number>
|
||||
bossConvertMinMax: Record<string, MinMax>
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user