Tweak trainer party member level logic

pull/16/head
Flashfyre 2024-02-25 01:03:06 -05:00
parent db33785fc2
commit 7f77507d2b
2 changed files with 10 additions and 9 deletions

View File

@ -128,17 +128,14 @@ export const trainerPartyTemplates = {
THREE_AVG: new TrainerPartyTemplate(3, TrainerPartyMemberStrength.AVERAGE),
THREE_AVG_SAME: new TrainerPartyTemplate(3, TrainerPartyMemberStrength.AVERAGE, true),
THREE_WEAK_BALANCED: new TrainerPartyTemplate(3, TrainerPartyMemberStrength.WEAK, false, true),
FOUR_WEAKEST: new TrainerPartyTemplate(4, TrainerPartyMemberStrength.WEAKEST),
FOUR_WEAKER: new TrainerPartyTemplate(4, TrainerPartyMemberStrength.WEAKER),
FOUR_WEAKER_SAME: new TrainerPartyTemplate(4, TrainerPartyMemberStrength.WEAKER, true),
FOUR_WEAK: new TrainerPartyTemplate(4, TrainerPartyMemberStrength.WEAK),
FOUR_WEAK_SAME: new TrainerPartyTemplate(4, TrainerPartyMemberStrength.WEAK, true),
FOUR_WEAK_BALANCED: new TrainerPartyTemplate(4, TrainerPartyMemberStrength.WEAK, false, true),
FIVE_WEAKEST: new TrainerPartyTemplate(5, TrainerPartyMemberStrength.WEAKEST),
FIVE_WEAKER: new TrainerPartyTemplate(5, TrainerPartyMemberStrength.WEAKER),
FIVE_WEAK: new TrainerPartyTemplate(5, TrainerPartyMemberStrength.WEAK),
FIVE_WEAK_BALANCED: new TrainerPartyTemplate(5, TrainerPartyMemberStrength.WEAK, false, true),
SIX_WEAKEST: new TrainerPartyTemplate(6, TrainerPartyMemberStrength.WEAKEST),
SIX_WEAKER: new TrainerPartyTemplate(6, TrainerPartyMemberStrength.WEAKER),
SIX_WEAKER_SAME: new TrainerPartyTemplate(6, TrainerPartyMemberStrength.WEAKER, true),
SIX_WEAK_SAME: new TrainerPartyTemplate(6, TrainerPartyMemberStrength.WEAKER, true),
@ -520,7 +517,7 @@ export const trainerConfigs: TrainerConfigs = {
[TrainerPoolTier.ULTRA_RARE]: [ Species.KUBFU ]
}),
[TrainerType.BREEDER]: new TrainerConfig(++t).setMoneyMultiplier(1.325).setEncounterBgm(TrainerType.POKEFAN).setHasGenders().setDouble()
.setPartyTemplateFunc(scene => getWavePartyTemplate(scene, trainerPartyTemplates.FOUR_WEAKEST, trainerPartyTemplates.FIVE_WEAKEST, trainerPartyTemplates.SIX_WEAKEST)),
.setPartyTemplateFunc(scene => getWavePartyTemplate(scene, trainerPartyTemplates.FOUR_WEAKER, trainerPartyTemplates.FIVE_WEAKER, trainerPartyTemplates.SIX_WEAKER)),
[TrainerType.CLERK]: new TrainerConfig(++t).setHasGenders().setEncounterBgm(TrainerType.CLERK)
.setPartyTemplates(trainerPartyTemplates.TWO_WEAK, trainerPartyTemplates.THREE_WEAK, trainerPartyTemplates.ONE_AVG, trainerPartyTemplates.TWO_AVG, trainerPartyTemplates.TWO_WEAK_ONE_AVG)
.setSpeciesPools({

View File

@ -87,12 +87,9 @@ export default class Trainer extends Phaser.GameObjects.Container {
for (let i = 0; i < partyTemplate.size; i++) {
let multiplier = 1;
const strength = partyTemplate.getStrength(i)
const strength = partyTemplate.getStrength(i);
switch (strength) {
case TrainerPartyMemberStrength.WEAKEST:
multiplier = 0.9;
break;
case TrainerPartyMemberStrength.WEAKER:
multiplier = 0.95;
break;
@ -110,7 +107,14 @@ export default class Trainer extends Phaser.GameObjects.Container {
break;
}
const level = Math.ceil(baseLevel * multiplier);
let levelOffset = 0;
if (strength < TrainerPartyMemberStrength.STRONG) {
multiplier = Math.min(multiplier + 0.025 * Math.floor(waveIndex / 25), 1.2);
levelOffset = -Math.floor((waveIndex / 50) * (TrainerPartyMemberStrength.STRONG - strength));
}
const level = Math.ceil(baseLevel * multiplier) + levelOffset;
ret.push(level);
}