Minor fix for spliced names

pull/12/head
Flashfyre 2023-12-03 00:08:13 -05:00
parent 839264506b
commit 2f6f7c9dc6
2 changed files with 3 additions and 1 deletions

View File

@ -34,7 +34,7 @@ export function getFusedSpeciesName(speciesAName: string, speciesBName: string):
if (fragBMatch) { if (fragBMatch) {
const lastCharA = fragA.slice(fragA.length - 1); const lastCharA = fragA.slice(fragA.length - 1);
const prevCharB = fragBMatch[1].slice(fragBMatch.length - 1); const prevCharB = fragBMatch[1].slice(fragBMatch.length - 1);
fragB = (/[\-']/.test(prevCharB) || /[aeiou]/i.test(lastCharA) ? prevCharB : '') + fragBMatch[2] || prevCharB; fragB = (/[\-']/.test(prevCharB) ? prevCharB : '') + fragBMatch[2] || prevCharB;
if (lastCharA === fragB[0] && /[aiu]/.test(lastCharA)) if (lastCharA === fragB[0] && /[aiu]/.test(lastCharA))
fragB = fragB.slice(1); fragB = fragB.slice(1);
} else } else

View File

@ -180,6 +180,8 @@ export default class BattleInfo extends Phaser.GameObjects.Container {
const offsetElements = [ this.nameText, this.genderText, this.statusIndicator, this.levelContainer ]; const offsetElements = [ this.nameText, this.genderText, this.statusIndicator, this.levelContainer ];
offsetElements.forEach(el => el.y += 1.5 * (mini ? -1 : 1)); offsetElements.forEach(el => el.y += 1.5 * (mini ? -1 : 1));
this.shinyIcon.setPositionRelative(this.levelContainer, -12, -5);
const toggledElements = [ this.hpNumbersContainer, this.expBar ]; const toggledElements = [ this.hpNumbersContainer, this.expBar ];
toggledElements.forEach(el => el.setVisible(!mini)); toggledElements.forEach(el => el.setVisible(!mini));
} }