mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2024-11-26 08:46:55 +00:00
Tweak trainer party member level logic
This commit is contained in:
parent
db33785fc2
commit
7f77507d2b
@ -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({
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user