Removed chanceSameSideIsHostilePercent config property and code that uses it, now implemented inside every maps base.json

This commit is contained in:
Dev 2024-08-22 19:08:40 +01:00
parent 6d7c4d95b6
commit 607189926a
3 changed files with 0 additions and 26 deletions

View File

@ -189,7 +189,6 @@
"botRelativeLevelDeltaMin": 70,
"_isUsec": "Percentage chance PMC will be USEC",
"isUsec": 50,
"chanceSameSideIsHostilePercent": 90,
"_pmcType": "Controls what bot brain can be chosen for each PMC bot type, the number is the weighting to be picked",
"pmcType": {
"pmcbear": {

View File

@ -43,22 +43,10 @@ export class BotDifficultyHelper {
const difficultySettings = this.getDifficultySettings(pmcType, difficulty);
const friendlyType = pmcType === "bear" ? bearType : usecType;
const enemyType = pmcType === "bear" ? usecType : bearType;
// Is PMC hostile to other PMC side
const hostileToSameSide = this.randomUtil.getChance100(this.pmcConfig.chanceSameSideIsHostilePercent);
// Add all non-PMC types to PMCs enemy list
this.addBotToEnemyList(difficultySettings, this.pmcConfig.enemyTypes, friendlyType);
// Add same/opposite side to enemy list
const hostilePMCTypes = hostileToSameSide ? [enemyType, friendlyType] : [enemyType];
this.addBotToEnemyList(difficultySettings, hostilePMCTypes);
if (hostileToSameSide) {
this.setDifficultyToHostileToBearAndUsec(difficultySettings);
}
return difficultySettings;
}
@ -89,18 +77,6 @@ export class BotDifficultyHelper {
}
}
/**
* Configure difficulty settings to be hostile to USEC and BEAR
* Look up value in bot.json/chanceSameSideIsHostilePercent
* @param difficultySettings pmc difficulty settings
*/
protected setDifficultyToHostileToBearAndUsec(difficultySettings: Difficulty): void {
difficultySettings.Mind.CAN_RECEIVE_PLAYER_REQUESTS_BEAR = false;
difficultySettings.Mind.CAN_RECEIVE_PLAYER_REQUESTS_USEC = false;
difficultySettings.Mind.DEFAULT_USEC_BEHAVIOUR = "AlwaysEnemies";
difficultySettings.Mind.DEFAULT_BEAR_BEHAVIOUR = "AlwaysEnemies";
}
/**
* Get difficulty settings for desired bot type, if not found use assault bot types
* @param type bot type to retrieve difficulty of

View File

@ -30,7 +30,6 @@ export interface IPmcConfig extends IBaseConfig {
usecType: string;
/** WildSpawnType enum value BEAR PMCs use */
bearType: string;
chanceSameSideIsHostilePercent: number;
/** What 'brain' does a PMC use, keyed by map and side (USEC/BEAR) key: map location, value: type for usec/bear */
pmcType: Record<string, Record<string, Record<string, number>>>;
maxBackpackLootTotalRub: number;