Compare commits

...

6 Commits

Author SHA1 Message Date
Dakurei
b10102b52a
[QoL] [Localization] Make achv-bar ui resize dynamically based on content (#1520)
* Make achv-bar ui 'responsive'

  To facilitate translation, among other things

* Apply suggestions on PR
2024-05-29 09:02:41 +01:00
InfernoVulpix
19ec18677b
Prevent useless Ethers (#1474)
Moves with 5 or less max PP now only boost Ether/Elixer rates if they are at less than max PP.
2024-05-29 00:04:02 -04:00
40chyan
bbaaf80f1d
Update zh_CN translation pokemon-info-container.ts (#1479) 2024-05-28 23:57:40 -04:00
AJ Fontaine
53200b2112
Correctly capitalize Mega Evolved (#1527) 2024-05-28 23:55:05 -04:00
Lugiad
92db0db2b7
Updated pkmnems font (#1485) 2024-05-28 22:51:05 -05:00
Lugiad
637b8bd6c6
French typos in dialogue.ts (#1521) 2024-05-28 21:11:03 -05:00
6 changed files with 33 additions and 16 deletions

Binary file not shown.

View File

@ -321,7 +321,7 @@ export function getSpeciesFormChangeMessage(pokemon: Pokemon, formChange: Specie
const isRevert = !isMega && formChange.formKey === pokemon.species.forms[0].formKey;
const prefix = !pokemon.isPlayer() ? pokemon.hasTrainer() ? "Foe " : "Wild " : "Your ";
if (isMega) {
return `${prefix}${preName} mega-evolved\ninto ${pokemon.name}!`;
return `${prefix}${preName} Mega Evolved\ninto ${pokemon.name}!`;
}
if (isGmax) {
return `${prefix}${preName} Gigantamaxed\ninto ${pokemon.name}!`;

View File

@ -4564,7 +4564,7 @@ export const PGMbattleSpecDialogue: SimpleTranslationEntries = {
$Tu es la seule présence ici, bien que jai le sentiment den ressentir une autre.
$Vas-tu enfin me livrer un affrontement digne de ce nom ?\nCe challenge dont je rêve depuis un millénaire ?
$Commençons.`,
"firstStageWin": `Je vois. Cette précence était bien réelle.\nJe nai donc plus besoin de retenir mes coups.
"firstStageWin": `Je vois. Cette présence était bien réelle.\nJe nai donc plus besoin de retenir mes coups.
$Ne me déçoit pas.`,
"secondStageWin": "… Magnifique."
};
@ -4579,7 +4579,7 @@ export const PGFbattleSpecDialogue: SimpleTranslationEntries = {
$Tu es la seule présence ici, bien que jai le sentiment den ressentir une autre.
$Vas-tu enfin me livrer un affrontement digne de ce nom ?\nCe challenge dont je rêve depuis un millénaire ?
$Commençons.`,
"firstStageWin": `Je vois. Cette précence était bien réelle.\nJe nai donc plus besoin de retenir mes coups.
"firstStageWin": `Je vois. Cette présence était bien réelle.\nJe nai donc plus besoin de retenir mes coups.
$Ne me déçoit pas.`,
"secondStageWin": "… Magnifique."
};

View File

@ -1,11 +1,11 @@
import { SimpleTranslationEntries } from "#app/plugins/i18n";
export const pokemonInfoContainer: SimpleTranslationEntries = {
"moveset": "Moveset",
"gender": "Gender:",
"ability": "Ability:",
"nature": "Nature:",
"epic": "Epic",
"rare": "Rare",
"common": "Common"
"moveset": "招式",
"gender": "性别:",
"ability": "特性:",
"nature": "性格:",
"epic": "史诗",
"rare": "稀有",
"common": "常见"
} as const;

View File

@ -1230,11 +1230,11 @@ const modifierPool: ModifierPool = {
return thresholdPartyMemberCount;
}, 3),
new WeightedModifierType(modifierTypes.ETHER, (party: Pokemon[]) => {
const thresholdPartyMemberCount = Math.min(party.filter(p => p.hp && p.getMoveset().filter(m => (m.getMovePp() - m.ppUsed) <= 5).length).length, 3);
const thresholdPartyMemberCount = Math.min(party.filter(p => p.hp && p.getMoveset().filter(m => m.ppUsed && (m.getMovePp() - m.ppUsed) <= 5).length).length, 3);
return thresholdPartyMemberCount * 3;
}, 9),
new WeightedModifierType(modifierTypes.MAX_ETHER, (party: Pokemon[]) => {
const thresholdPartyMemberCount = Math.min(party.filter(p => p.hp && p.getMoveset().filter(m => (m.getMovePp() - m.ppUsed) <= 5).length).length, 3);
const thresholdPartyMemberCount = Math.min(party.filter(p => p.hp && p.getMoveset().filter(m => m.ppUsed && (m.getMovePp() - m.ppUsed) <= 5).length).length, 3);
return thresholdPartyMemberCount;
}, 3),
new WeightedModifierType(modifierTypes.LURE, 2),
@ -1275,11 +1275,11 @@ const modifierPool: ModifierPool = {
return thresholdPartyMemberCount;
}, 3),
new WeightedModifierType(modifierTypes.ELIXIR, (party: Pokemon[]) => {
const thresholdPartyMemberCount = Math.min(party.filter(p => p.hp && p.getMoveset().filter(m => (m.getMovePp() - m.ppUsed) <= 5).length).length, 3);
const thresholdPartyMemberCount = Math.min(party.filter(p => p.hp && p.getMoveset().filter(m => m.ppUsed && (m.getMovePp() - m.ppUsed) <= 5).length).length, 3);
return thresholdPartyMemberCount * 3;
}, 9),
new WeightedModifierType(modifierTypes.MAX_ELIXIR, (party: Pokemon[]) => {
const thresholdPartyMemberCount = Math.min(party.filter(p => p.hp && p.getMoveset().filter(m => (m.getMovePp() - m.ppUsed) <= 5).length).length, 3);
const thresholdPartyMemberCount = Math.min(party.filter(p => p.hp && p.getMoveset().filter(m => m.ppUsed && (m.getMovePp() - m.ppUsed) <= 5).length).length, 3);
return thresholdPartyMemberCount;
}, 3),
new WeightedModifierType(modifierTypes.DIRE_HIT, 4),

View File

@ -4,6 +4,9 @@ import { Voucher } from "../system/voucher";
import { TextStyle, addTextObject } from "./text";
export default class AchvBar extends Phaser.GameObjects.Container {
private defaultWidth: number;
private defaultHeight: number;
private bg: Phaser.GameObjects.NineSlice;
private icon: Phaser.GameObjects.Sprite;
private titleText: Phaser.GameObjects.Text;
@ -19,7 +22,10 @@ export default class AchvBar extends Phaser.GameObjects.Container {
}
setup(): void {
this.bg = this.scene.add.nineslice(0, 0, "achv_bar", null, 160, 40, 41, 6, 16, 4);
this.defaultWidth = 160;
this.defaultHeight = 40;
this.bg = this.scene.add.nineslice(0, 0, "achv_bar", null, this.defaultWidth, this.defaultHeight, 41, 6, 16, 4);
this.bg.setOrigin(0, 0);
this.add(this.bg);
@ -66,11 +72,22 @@ export default class AchvBar extends Phaser.GameObjects.Container {
this.scoreText.setText(`+${(achv as Achv).score}pt`);
}
// Take the width of the default interface or the title if longest
this.bg.width = Math.max(this.defaultWidth, this.icon.displayWidth + this.titleText.displayWidth + this.scoreText.displayWidth + 16);
this.scoreText.x = this.bg.width - 2;
this.descriptionText.width = this.bg.width - this.icon.displayWidth - 16;
this.descriptionText.setWordWrapWidth(this.descriptionText.width * 6);
// Take the height of the default interface or the description if longest
this.bg.height = Math.max(this.defaultHeight, this.titleText.displayHeight + this.descriptionText.displayHeight + 8);
this.icon.y = (this.bg.height / 2) - (this.icon.height / 2);
(this.scene as BattleScene).playSound("achv");
this.scene.tweens.add({
targets: this,
x: (this.scene.game.canvas.width / 6) - 76,
x: (this.scene.game.canvas.width / 6) - (this.bg.width / 2),
duration: 500,
ease: "Sine.easeOut"
});