mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-11 10:52:17 +02:00
Add chinese translation
This commit is contained in:
parent
76ac86d2ae
commit
01153b806b
@ -562,28 +562,19 @@ export class PostDefendStatChangeAbAttr extends PostDefendAbAttr {
|
||||
private stat: BattleStat;
|
||||
private levels: integer;
|
||||
private selfTarget: boolean;
|
||||
private allOthers: boolean;
|
||||
|
||||
constructor(condition: PokemonDefendCondition, stat: BattleStat, levels: integer, selfTarget: boolean = true, allOthers: boolean = false) {
|
||||
constructor(condition: PokemonDefendCondition, stat: BattleStat, levels: integer, selfTarget: boolean = true) {
|
||||
super(true);
|
||||
|
||||
this.condition = condition;
|
||||
this.stat = stat;
|
||||
this.levels = levels;
|
||||
this.selfTarget = selfTarget;
|
||||
this.allOthers = allOthers;
|
||||
}
|
||||
|
||||
applyPostDefend(pokemon: Pokemon, passive: boolean, attacker: Pokemon, move: PokemonMove, hitResult: HitResult, args: any[]): boolean {
|
||||
if (this.condition(pokemon, attacker, move.getMove())) {
|
||||
if (this.allOthers) {
|
||||
let otherPokemon = pokemon.getAlly() ? pokemon.getOpponents().concat([ pokemon.getAlly() ]) : pokemon.getOpponents();
|
||||
for (let other of otherPokemon) {
|
||||
other.scene.unshiftPhase(new StatChangePhase(other.scene, (other).getBattlerIndex(), false, [ this.stat ], this.levels));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
pokemon.scene.unshiftPhase(new StatChangePhase(pokemon.scene, (this.selfTarget ? pokemon : attacker).getBattlerIndex(), this.selfTarget, [ this.stat ], this.levels));
|
||||
pokemon.scene.unshiftPhase(new StatChangePhase(pokemon.scene, (this.selfTarget ? pokemon : attacker).getBattlerIndex(), true, [ this.stat ], this.levels));
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -860,36 +851,6 @@ export class PostDefendAbilityGiveAbAttr extends PostDefendAbAttr {
|
||||
}
|
||||
}
|
||||
|
||||
export class PostDefendMoveDisableAbAttr extends PostDefendAbAttr {
|
||||
private chance: integer;
|
||||
private attacker: Pokemon;
|
||||
private move: PokemonMove;
|
||||
|
||||
constructor(chance: integer) {
|
||||
super();
|
||||
|
||||
this.chance = chance;
|
||||
}
|
||||
|
||||
applyPostDefend(pokemon: Pokemon, passive: boolean, attacker: Pokemon, move: PokemonMove, hitResult: HitResult, args: any[]): boolean {
|
||||
if (!attacker.summonData.disabledMove) {
|
||||
if (move.getMove().checkFlag(MoveFlags.MAKES_CONTACT, attacker, pokemon) && (this.chance === -1 || pokemon.randSeedInt(100) < this.chance) && !attacker.isMax()) {
|
||||
this.attacker = attacker;
|
||||
this.move = move;
|
||||
|
||||
attacker.summonData.disabledMove = move.moveId;
|
||||
attacker.summonData.disabledTurns = 4;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
getTriggerMessage(pokemon: Pokemon, abilityName: string, ...args: any[]): string {
|
||||
return getPokemonMessage(this.attacker, `'s ${this.move.getName()}\nwas disabled!`);
|
||||
}
|
||||
}
|
||||
|
||||
export class PostStatChangeStatChangeAbAttr extends PostStatChangeAbAttr {
|
||||
private condition: PokemonStatChangeCondition;
|
||||
private statsToChange: BattleStat[];
|
||||
@ -2055,30 +2016,13 @@ export class PostTurnAbAttr extends AbAttr {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* After the turn ends, resets the status of either the ability holder or their ally
|
||||
* @param {boolean} allyTarget Whether to target ally, defaults to false (self-target)
|
||||
*/
|
||||
export class PostTurnResetStatusAbAttr extends PostTurnAbAttr {
|
||||
private allyTarget: boolean;
|
||||
private target: Pokemon;
|
||||
|
||||
constructor(allyTarget: boolean = false) {
|
||||
super(true);
|
||||
this.allyTarget = allyTarget;
|
||||
}
|
||||
|
||||
applyPostTurn(pokemon: Pokemon, passive: boolean, args: any[]): boolean {
|
||||
if (this.allyTarget) {
|
||||
this.target = pokemon.getAlly();
|
||||
} else {
|
||||
this.target = pokemon;
|
||||
}
|
||||
if (this.target?.status) {
|
||||
if (pokemon.status) {
|
||||
|
||||
this.target.scene.queueMessage(getPokemonMessage(this.target, getStatusEffectHealText(this.target.status?.effect)));
|
||||
this.target.resetStatus(false);
|
||||
this.target.updateInfo();
|
||||
pokemon.scene.queueMessage(getPokemonMessage(pokemon, getStatusEffectHealText(pokemon.status?.effect)));
|
||||
pokemon.resetStatus();
|
||||
pokemon.updateInfo();
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -3123,10 +3067,9 @@ export function initAbilities() {
|
||||
.attr(BattleStatMultiplierAbAttr, BattleStat.SPATK, 0.5)
|
||||
.condition((pokemon) => pokemon.getHpRatio() <= 0.5),
|
||||
new Ability(Abilities.CURSED_BODY, 5)
|
||||
.attr(PostDefendMoveDisableAbAttr, 30)
|
||||
.bypassFaint(),
|
||||
.unimplemented(),
|
||||
new Ability(Abilities.HEALER, 5)
|
||||
.conditionalAttr(pokemon => pokemon.getAlly() && Utils.randSeedInt(10) < 3, PostTurnResetStatusAbAttr, true),
|
||||
.unimplemented(),
|
||||
new Ability(Abilities.FRIEND_GUARD, 5)
|
||||
.ignorable()
|
||||
.unimplemented(),
|
||||
@ -3462,8 +3405,7 @@ export function initAbilities() {
|
||||
new Ability(Abilities.BALL_FETCH, 8)
|
||||
.unimplemented(),
|
||||
new Ability(Abilities.COTTON_DOWN, 8)
|
||||
.attr(PostDefendStatChangeAbAttr, (target, user, move) => move.category !== MoveCategory.STATUS, BattleStat.SPD, -1, false, true)
|
||||
.bypassFaint(),
|
||||
.unimplemented(),
|
||||
new Ability(Abilities.PROPELLER_TAIL, 8)
|
||||
.unimplemented(),
|
||||
new Ability(Abilities.MIRROR_ARMOR, 8)
|
||||
|
@ -429,7 +429,7 @@ export async function printPokemon() {
|
||||
export async function printAbilities() {
|
||||
const replaceText = true;
|
||||
|
||||
let abilityContent: string = await fs.readFile('./src/data/ability.ts');
|
||||
let abilityContent: string = await fs.readFile('./src/data/abilitybak.ts');
|
||||
|
||||
const api = new MainClient();
|
||||
|
||||
|
@ -5132,6 +5132,7 @@ export function initMoves() {
|
||||
.attr(RecoilAttr, false, 0.33)
|
||||
.attr(HealStatusEffectAttr, true, StatusEffect.FREEZE)
|
||||
.attr(StatusEffectAttr, StatusEffect.BURN)
|
||||
.condition(failOnGravityCondition)
|
||||
.recklessMove(),
|
||||
new AttackMove(Moves.FORCE_PALM, Type.FIGHTING, MoveCategory.PHYSICAL, 60, 100, 10, 30, 0, 4)
|
||||
.attr(StatusEffectAttr, StatusEffect.PARALYSIS),
|
||||
@ -6668,7 +6669,7 @@ export function initMoves() {
|
||||
new AttackMove(Moves.FICKLE_BEAM, Type.DRAGON, MoveCategory.SPECIAL, 80, 100, 5, 30, 0, 9)
|
||||
.attr(PreMoveMessageAttr, doublePowerChanceMessageFunc)
|
||||
.attr(DoublePowerChanceAttr),
|
||||
new SelfStatusMove(Moves.BURNING_BULWARK, Type.FIRE, -1, 10, 100, 4, 9)
|
||||
new StatusMove(Moves.BURNING_BULWARK, Type.FIRE, -1, 10, 100, 4, 9)
|
||||
.attr(ProtectAttr, BattlerTagType.BURNING_BULWARK),
|
||||
new AttackMove(Moves.THUNDERCLAP, Type.ELECTRIC, MoveCategory.SPECIAL, 70, 100, 5, -1, 1, 9)
|
||||
.condition((user, target, move) => user.scene.currentBattle.turnCommands[target.getBattlerIndex()].command === Command.FIGHT && !target.turnData.acted && allMoves[user.scene.currentBattle.turnCommands[target.getBattlerIndex()].move.move].category !== MoveCategory.STATUS),
|
||||
@ -6685,7 +6686,6 @@ export function initMoves() {
|
||||
.target(MoveTarget.NEAR_ALLY)
|
||||
.partial(),
|
||||
new AttackMove(Moves.ALLURING_VOICE, Type.FAIRY, MoveCategory.SPECIAL, 80, 100, 10, -1, 0, 9)
|
||||
.soundBased()
|
||||
.partial(),
|
||||
new AttackMove(Moves.TEMPER_FLARE, Type.FIRE, MoveCategory.PHYSICAL, 75, 100, 10, -1, 0, 9)
|
||||
.attr(MovePowerMultiplierAttr, (user, target, move) => user.getLastXMoves(2)[1]?.result == MoveResult.MISS || user.getLastXMoves(2)[1]?.result == MoveResult.FAIL ? 2 : 1),
|
||||
|
@ -1959,15 +1959,8 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Resets the status of a pokemon
|
||||
* @param revive whether revive should be cured, defaults to true
|
||||
*/
|
||||
resetStatus(revive: boolean = true): void {
|
||||
resetStatus(): void {
|
||||
const lastStatus = this.status?.effect;
|
||||
if (!revive && lastStatus === StatusEffect.FAINT) {
|
||||
return;
|
||||
}
|
||||
this.status = undefined;
|
||||
if (lastStatus === StatusEffect.SLEEP) {
|
||||
this.setFrameRate(12);
|
||||
@ -3213,14 +3206,6 @@ export class PokemonMove {
|
||||
return allMoves[this.moveId];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets {@link ppUsed} for this move and ensures the value does not exceed {@link getMovePp}
|
||||
* @param {number} count Amount of PP to use
|
||||
*/
|
||||
usePp(count: number = 1) {
|
||||
this.ppUsed = Math.min(this.ppUsed + count, this.getMovePp());
|
||||
}
|
||||
|
||||
getMovePp(): integer {
|
||||
return this.getMove().pp + this.ppUp * Math.max(Math.floor(this.getMove().pp / 5), 1);
|
||||
}
|
||||
|
1244
src/locales/cn/ability.ts
Normal file
1244
src/locales/cn/ability.ts
Normal file
File diff suppressed because it is too large
Load Diff
53
src/locales/cn/battle.ts
Normal file
53
src/locales/cn/battle.ts
Normal file
@ -0,0 +1,53 @@
|
||||
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||
|
||||
export const battle: SimpleTranslationEntries = {
|
||||
"bossAppeared": "{{bossName}} 出现了。",
|
||||
"trainerAppeared": "{{trainerName}}\nw想要来场对战!",
|
||||
"singleWildAppeared": "一只野生 {{pokemonName}} 出现了!",
|
||||
"multiWildAppeared": "野生的 {{pokemonName1}}\n和 {{pokemonName2}} 出现了!",
|
||||
"playerComeBack": "回来吧, {{pokemonName}}!",
|
||||
"trainerComeBack": "{{trainerName}} 收回了 {{pokemonName}}!",
|
||||
"playerGo": "去吧! {{pokemonName}}!",
|
||||
"trainerGo": "{{trainerName}} 派出了 {{pokemonName}}!",
|
||||
"switchQuestion": "要更换\n{{pokemonName}}吗?",
|
||||
"trainerDefeated": "你击败了\n{{trainerName}}!",
|
||||
"pokemonCaught": "{{pokemonName}} 被抓住了!",
|
||||
"pokemon": "宝可梦上吧!",
|
||||
"sendOutPokemon": "上吧! {{pokemonName}}!",
|
||||
"hitResultCriticalHit": "击中了要害!",
|
||||
"hitResultSuperEffective": "效果拔群!",
|
||||
"hitResultNotVeryEffective": "收效甚微…",
|
||||
"hitResultNoEffect": "对 {{pokemonName}} 没有效果!!",
|
||||
"hitResultOneHitKO": "一击必杀!",
|
||||
"attackFailed": "但是失败了!",
|
||||
"attackHitsCount": `击中 {{count}} 次!`,
|
||||
"expGain": "{{pokemonName}} 获得了 {{exp}} 经验值!",
|
||||
"levelUp": "{{pokemonName}} 升级到 Lv. {{level}}!",
|
||||
"learnMove": "{{pokemonName}} 学会了 {{moveName}}!",
|
||||
"learnMovePrompt": "{{pokemonName}} 想要学习 {{moveName}}。",
|
||||
"learnMoveLimitReached": "但是,{{pokemonName}} 已经学会了\n四个技能",
|
||||
"learnMoveReplaceQuestion": "要忘记一个技能并学习 {{moveName}} 吗?",
|
||||
"learnMoveStopTeaching": "不再尝试学习 {{moveName}}?",
|
||||
"learnMoveNotLearned": "{{pokemonName}} 没有学会 {{moveName}}。",
|
||||
"learnMoveForgetQuestion": "要忘记哪个技能?",
|
||||
"learnMoveForgetSuccess": "{{pokemonName}} 忘记了\n如何使用 {{moveName}}。",
|
||||
"levelCapUp": "等级上限提升到 {{levelCap}}!",
|
||||
"moveNotImplemented": "{{moveName}} 尚未实装,无法选择。",
|
||||
"moveNoPP": "这个技能的 PP 用完了",
|
||||
"moveDisabled": "{{moveName}} 被禁用!",
|
||||
"noPokeballForce": "一股无形的力量阻止了你使用精灵球。",
|
||||
"noPokeballTrainer": "你不能捕捉其他训练家的宝可梦!",
|
||||
"noPokeballMulti": "只能在剩下一只宝可梦时才能扔出精灵球!",
|
||||
"noPokeballStrong": "目标宝可梦太强了,无法捕捉!你需要先削弱它!",
|
||||
"noEscapeForce": "一股无形的力量阻止你逃跑。",
|
||||
"noEscapeTrainer": "你不能从训练家战斗中逃跑!",
|
||||
"noEscapePokemon": "{{pokemonName}} 的 {{moveName}} 阻止了你 {{escapeVerb}}!",
|
||||
"runAwaySuccess": "你成功逃脱了!",
|
||||
"runAwayCannotEscape": '你无法逃脱!',
|
||||
"escapeVerbSwitch": "切换",
|
||||
"escapeVerbFlee": "逃跑",
|
||||
"notDisabled": "{{moveName}} 不再被禁用!",
|
||||
"skipItemQuestion": "你确定要跳过拾取道具吗?",
|
||||
"eggHatching": "咦?",
|
||||
"ivScannerUseQuestion": "对 {{pokemonName}} 使用个体值扫描仪?"
|
||||
} as const;
|
9
src/locales/cn/command-ui-handler.ts
Normal file
9
src/locales/cn/command-ui-handler.ts
Normal file
@ -0,0 +1,9 @@
|
||||
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||
|
||||
export const commandUiHandler: SimpleTranslationEntries = {
|
||||
"fight": "战斗",
|
||||
"ball": "精灵球",
|
||||
"pokemon": "宝可梦",
|
||||
"run": "逃跑",
|
||||
"actionMessage": "要让\n{{pokemonName}} 做什么?",
|
||||
} as const;
|
28
src/locales/cn/config.ts
Normal file
28
src/locales/cn/config.ts
Normal file
@ -0,0 +1,28 @@
|
||||
import { ability } from "./ability";
|
||||
import { battle } from "./battle";
|
||||
import { commandUiHandler } from "./command-ui-handler";
|
||||
import { fightUiHandler } from "./fight-ui-handler";
|
||||
import { menu } from "./menu";
|
||||
import { menuUiHandler } from "./menu-ui-handler";
|
||||
import { move } from "./move";
|
||||
import { pokeball } from "./pokeball";
|
||||
import { pokemon } from "./pokemon";
|
||||
import { pokemonStat } from "./pokemon-stat";
|
||||
import { starterSelectUiHandler } from "./starter-select-ui-handler";
|
||||
import { tutorial } from "./tutorial";
|
||||
|
||||
|
||||
export const cnConfig = {
|
||||
ability: ability,
|
||||
battle: battle,
|
||||
commandUiHandler: commandUiHandler,
|
||||
fightUiHandler: fightUiHandler,
|
||||
menuUiHandler: menuUiHandler,
|
||||
menu: menu,
|
||||
move: move,
|
||||
pokeball: pokeball,
|
||||
pokemonStat: pokemonStat,
|
||||
pokemon: pokemon,
|
||||
starterSelectUiHandler: starterSelectUiHandler,
|
||||
tutorial: tutorial
|
||||
}
|
6
src/locales/cn/fight-ui-handler.ts
Normal file
6
src/locales/cn/fight-ui-handler.ts
Normal file
@ -0,0 +1,6 @@
|
||||
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||
|
||||
export const fightUiHandler: SimpleTranslationEntries = {
|
||||
"pp": "PP",
|
||||
"power": "POWER",
|
||||
} as const;
|
23
src/locales/cn/menu-ui-handler.ts
Normal file
23
src/locales/cn/menu-ui-handler.ts
Normal file
@ -0,0 +1,23 @@
|
||||
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||
|
||||
export const menuUiHandler: SimpleTranslationEntries = {
|
||||
"GAME_SETTINGS": '游戏设置',
|
||||
"ACHIEVEMENTS": "成就",
|
||||
"STATS": "数据统计",
|
||||
"VOUCHERS": "兑换券",
|
||||
"EGG_LIST": "蛋列表",
|
||||
"EGG_GACHA": "蛋扭蛋",
|
||||
"MANAGE_DATA": "管理数据",
|
||||
"COMMUNITY": "社区",
|
||||
"RETURN_TO_TITLE": "返回标题画面",
|
||||
"LOG_OUT": "登出",
|
||||
"slot": "存档位 {{slotNumber}}",
|
||||
"importSession": "导入存档",
|
||||
"importSlotSelect": "选择要导入到的存档位。",
|
||||
"exportSession": "导出存档",
|
||||
"exportSlotSelect": "选择要导出的存档位。",
|
||||
"importData": "导入数据",
|
||||
"exportData": "导出数据",
|
||||
"cancel": "取消",
|
||||
"losingProgressionWarning": "你将失去自战斗开始以来的所有进度。是否继续?"
|
||||
} as const;
|
46
src/locales/cn/menu.ts
Normal file
46
src/locales/cn/menu.ts
Normal file
@ -0,0 +1,46 @@
|
||||
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||
|
||||
/**
|
||||
* The menu namespace holds most miscellaneous text that isn't directly part of the game's
|
||||
* contents or directly related to Pokemon data. This includes menu navigation, settings,
|
||||
* account interactions, descriptive text, etc.
|
||||
*/
|
||||
export const menu: SimpleTranslationEntries = {
|
||||
"cancel": "取消",
|
||||
"continue": "继续",
|
||||
"dailyRun": "每日挑战 (Beta)",
|
||||
"loadGame": "加载游戏",
|
||||
"newGame": "新游戏",
|
||||
"selectGameMode": "选择一个游戏模式",
|
||||
"logInOrCreateAccount": "登录或创建账户以开始游戏。无需邮箱!",
|
||||
"username": "用户名",
|
||||
"password": "密码",
|
||||
"login": "登录",
|
||||
"register": "注册",
|
||||
"emptyUsername": "用户名不能为空",
|
||||
"invalidLoginUsername": "提供的用户名无效",
|
||||
"invalidRegisterUsername": "用户名只能包含字母、数字或下划线",
|
||||
"invalidLoginPassword": "提供的密码无效",
|
||||
"invalidRegisterPassword": "密码必须至少包含 6 个字符",
|
||||
"usernameAlreadyUsed": "提供的用户名已被使用",
|
||||
"accountNonExistent": "提供的用户不存在",
|
||||
"unmatchingPassword": "提供的密码不匹配",
|
||||
"passwordNotMatchingConfirmPassword": "密码必须与确认密码一致",
|
||||
"confirmPassword": "确认密码",
|
||||
"registrationAgeWarning": "注册即表示您确认您已年满 13 岁。",
|
||||
"backToLogin": "返回登录",
|
||||
"failedToLoadSaveData": "读取存档数据失败。请重新加载页面。如果问题仍然存在,请联系管理员。",
|
||||
"sessionSuccess": "存档加载成功。",
|
||||
"failedToLoadSession": "无法加载您的存档数据。它可能已损坏。",
|
||||
"boyOrGirl": "你是男孩还是女孩?",
|
||||
"boy": "男孩",
|
||||
"girl": "女孩",
|
||||
"dailyRankings": "每日排名",
|
||||
"weeklyRankings": "每周排名",
|
||||
"noRankings": "无排名",
|
||||
"loading": "加载中…",
|
||||
"playersOnline": "在线玩家",
|
||||
"empty": "空",
|
||||
"yes": "是",
|
||||
"no": "否",
|
||||
} as const;
|
3812
src/locales/cn/move.ts
Normal file
3812
src/locales/cn/move.ts
Normal file
File diff suppressed because it is too large
Load Diff
10
src/locales/cn/pokeball.ts
Normal file
10
src/locales/cn/pokeball.ts
Normal file
@ -0,0 +1,10 @@
|
||||
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||
|
||||
export const pokeball: SimpleTranslationEntries = {
|
||||
"pokeBall": "精灵球",
|
||||
"greatBall": "超级球",
|
||||
"ultraBall": "高级球",
|
||||
"rogueBall": "肉鸽球",
|
||||
"masterBall": "大师球",
|
||||
"luxuryBall": "豪华球",
|
||||
} as const;
|
16
src/locales/cn/pokemon-stat.ts
Normal file
16
src/locales/cn/pokemon-stat.ts
Normal file
@ -0,0 +1,16 @@
|
||||
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||
|
||||
export const pokemonStat: SimpleTranslationEntries = {
|
||||
"HP": "最大HP",
|
||||
"HPshortened": "最大HP",
|
||||
"ATK": "攻击",
|
||||
"ATKshortened": "攻击",
|
||||
"DEF": "防御",
|
||||
"DEFshortened": "防御",
|
||||
"SPATK": "特攻",
|
||||
"SPATKshortened": "特攻",
|
||||
"SPDEF": "特防",
|
||||
"SPDEFshortened": "特防",
|
||||
"SPD": "速度",
|
||||
"SPDshortened": "速度"
|
||||
} as const;
|
1086
src/locales/cn/pokemon.ts
Normal file
1086
src/locales/cn/pokemon.ts
Normal file
File diff suppressed because it is too large
Load Diff
32
src/locales/cn/starter-select-ui-handler.ts
Normal file
32
src/locales/cn/starter-select-ui-handler.ts
Normal file
@ -0,0 +1,32 @@
|
||||
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||
|
||||
/**
|
||||
* The menu namespace holds most miscellaneous text that isn't directly part of the game's
|
||||
* contents or directly related to Pokemon data. This includes menu navigation, settings,
|
||||
* account interactions, descriptive text, etc.
|
||||
*/
|
||||
export const starterSelectUiHandler: SimpleTranslationEntries = {
|
||||
"confirmStartTeam":'使用这些宝可梦开始游戏吗?',
|
||||
"growthRate": "成长速度:",
|
||||
"ability": "特性:",
|
||||
"passive": "被动:",
|
||||
"nature": "性格:",
|
||||
"eggMoves": '蛋招式',
|
||||
"start": "开始",
|
||||
"addToParty": "加入队伍",
|
||||
"toggleIVs": '切换个体值',
|
||||
"manageMoves": '管理招式',
|
||||
"useCandies": '使用糖果',
|
||||
"selectMoveSwapOut": "选择要替换的招式。",
|
||||
"selectMoveSwapWith": "选择要替换成的招式",
|
||||
"unlockPassive": "解锁被动",
|
||||
"reduceCost": "降低花费",
|
||||
"cycleShiny": "R: 切换闪光",
|
||||
"cycleForm": 'F: 切换形态',
|
||||
"cycleGender": 'G: 切换性别',
|
||||
"cycleAbility": 'E: 切换特性',
|
||||
"cycleNature": 'N: 切换性格',
|
||||
"cycleVariant": 'V: 切换变种',
|
||||
"enablePassive": "启用被动",
|
||||
"disablePassive": "禁用被动"
|
||||
}
|
42
src/locales/cn/tutorial.ts
Normal file
42
src/locales/cn/tutorial.ts
Normal file
@ -0,0 +1,42 @@
|
||||
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||
|
||||
export const tutorial: SimpleTranslationEntries = {
|
||||
"intro": `欢迎来到PokéRogue!这是一款以战斗为核心的融合了roguelite元素的宝可梦同人游戏。
|
||||
$本游戏未进行商业化,我们没有Pokémon或Pokémon使用的版权资产的所有权。
|
||||
$游戏仍在开发中,但已可完整游玩。\n如需报告错误,请使用 Discord 社区。
|
||||
$如果游戏运行缓慢,请确保在浏览器设置中打开了“硬件加速”。`,
|
||||
|
||||
"accessMenu": `在等待输入时,按 M 或 Escape 键可访问菜单。\n菜单包含设置和各种功能。`,
|
||||
|
||||
"menu": `在此菜单中,您可以访问设置。
|
||||
$在设置中,您可以更改游戏速度、窗口样式和其他选项。
|
||||
$这里还有各种其他功能,请务必全部查看!`,
|
||||
|
||||
"starterSelect": `在此页面中,您可以选择您的初始宝可梦。\n这些是您最初的队伍成员。
|
||||
$每个初始宝可梦都有一个费用。您的队伍最多可以拥有\n6 名成员,只要总费用不超过 10。
|
||||
$您还可以根据\n您捕获或孵化的变种选择性别、特性和形态。
|
||||
$一个物种的个体值是您捕获或孵化的所有宝可梦中最好的,所以尽量获得更多同种宝可梦!`,
|
||||
|
||||
"pokerus": `每天随机 3 个可选的初始宝可梦会有紫色边框。
|
||||
$如果您看到您拥有的初始宝可梦带有紫色边框,\n请尝试将其添加到您的队伍中。请务必查看其概况!`,
|
||||
|
||||
"statChange": `只要您的宝可梦没有被召回,属性变化就会在战斗中持续存在。
|
||||
$在训练家战斗之前和进入新的宝可梦群落之前,您的宝可梦会被召回。
|
||||
$您还可以通过按住 C 或 Shift 键来查看场上宝可梦的能力变化。`,
|
||||
|
||||
"selectItem": `每次战斗后,您都可以选择 3 个随机物品。\n您只能选择其中一个。
|
||||
$这些物品包括消耗品、宝可梦携带物品和永久被动道具。
|
||||
$大多数非消耗品的效果会以各种方式叠加。
|
||||
$某些物品只有在可以使用时才会出现,例如进化物品。
|
||||
$您还可以使用转移选项在宝可梦之间转移携带物品。
|
||||
$一旦您获得了携带物品,转移选项就会出现在右下角。
|
||||
$您可以用金钱购买消耗品,并且随着您游戏的深入,将会有更多种类的消耗品可供选择。
|
||||
$请务必在选择随机物品之前购买这些消耗品,因为一旦您选择,游戏就会进入下一场战斗。`,
|
||||
|
||||
"eggGacha": `在此页面中,您可以使用您的兑换券兑换\n宝可梦蛋。
|
||||
$蛋需要孵化,并且在每场战斗后都会减少孵化周期。稀有蛋需要更长时间才能孵化。
|
||||
$孵化的宝可梦不会被添加到您的队伍中,它们将被添加到您的初始宝可梦中。
|
||||
$从蛋中孵化的宝可梦通常比\n野生宝可梦具有更好的个体值。
|
||||
$有些宝可梦只能从蛋中获得。
|
||||
$有 3 种不同的扭蛋机可供选择,每种扭蛋机都有不同的\n奖励,请选择最适合您的!`,
|
||||
} as const;
|
@ -46,7 +46,7 @@ export const battle: SimpleTranslationEntries = {
|
||||
"runAwayCannotEscape": 'You can\'t escape!',
|
||||
"escapeVerbSwitch": "auswechseln",
|
||||
"escapeVerbFlee": "flucht",
|
||||
"notDisabled": "{{pokemonName}}'s {{moveName}} ist\nnicht mehr deaktiviert!",
|
||||
"notDisabled": "{{moveName}} ist\nnicht mehr deaktiviert!",
|
||||
"skipItemQuestion": "Are you sure you want to skip taking an item?",
|
||||
"eggHatching": "Oh?",
|
||||
"ivScannerUseQuestion": "Use IV Scanner on {{pokemonName}}?"
|
||||
|
@ -46,7 +46,7 @@ export const battle: SimpleTranslationEntries = {
|
||||
"runAwayCannotEscape": 'You can\'t escape!',
|
||||
"escapeVerbSwitch": "switching",
|
||||
"escapeVerbFlee": "fleeing",
|
||||
"notDisabled": "{{pokemonName}}'s {{moveName}} is disabled\nno more!",
|
||||
"notDisabled": "{{moveName}} is disabled\nno more!",
|
||||
"skipItemQuestion": "Are you sure you want to skip taking an item?",
|
||||
"eggHatching": "Oh?",
|
||||
"ivScannerUseQuestion": "Use IV Scanner on {{pokemonName}}?"
|
||||
|
@ -46,7 +46,7 @@ export const battle: SimpleTranslationEntries = {
|
||||
"runAwayCannotEscape": "¡No has podido escapar!",
|
||||
"escapeVerbSwitch": "cambiar",
|
||||
"escapeVerbFlee": "huir",
|
||||
"notDisabled": "¡El movimiento {{moveName}} de {{pokemonName}}\nya no está anulado!",
|
||||
"notDisabled": "¡El movimiento {{moveName}}\nya no está anulado!",
|
||||
"skipItemQuestion": "¿Estás seguro de que no quieres coger un objeto?",
|
||||
"eggHatching": "¿Y esto?",
|
||||
"ivScannerUseQuestion": "¿Quieres usar el Escáner de IVs en {{pokemonName}}?"
|
||||
|
@ -46,7 +46,7 @@ export const battle: SimpleTranslationEntries = {
|
||||
"runAwayCannotEscape": "Fuite impossible !",
|
||||
"escapeVerbSwitch": "le changement",
|
||||
"escapeVerbFlee": "la fuite",
|
||||
"notDisabled": "La capacité {{moveName}}\nde {{pokemonName}} n’est plus sous entrave !",
|
||||
"notDisabled": "{{moveName}} n’est plus sous entrave !",
|
||||
"skipItemQuestion": "Êtes-vous sûr·e de ne pas vouloir prendre d’objet ?",
|
||||
"eggHatching": "Oh ?",
|
||||
"ivScannerUseQuestion": "Utiliser le Scanner d’IV sur {{pokemonName}} ?"
|
||||
|
@ -24,7 +24,7 @@ export const menu: SimpleTranslationEntries = {
|
||||
"confirmPassword": "Confirmer le MDP",
|
||||
"registrationAgeWarning": "Vous confirmez en vous inscrivant que vous avez 13 ans ou plus.",
|
||||
"backToLogin": "Retour",
|
||||
"failedToLoadSaveData": "Échec du chargement des données. Veuillez recharger\nla page. Si cela persiste, contactez l’administrateur.",
|
||||
"failedToLoadSaveData": "Échec du chargement des données. Veuillez recharger la page.\nSi cela continue, veuillez contacter l’administrateur.",
|
||||
"sessionSuccess": "Session chargée avec succès.",
|
||||
"failedToLoadSession": "Vos données de session n’ont pas pu être chargées.\nElles pourraient être corrompues.",
|
||||
"boyOrGirl": "Es-tu un garçon ou une fille ?",
|
||||
|
@ -46,7 +46,7 @@ export const battle: SimpleTranslationEntries = {
|
||||
"runAwayCannotEscape": 'Non puoi fuggire!',
|
||||
"escapeVerbSwitch": "cambiando",
|
||||
"escapeVerbFlee": "fuggendo",
|
||||
"notDisabled": "{{pokemonName}}'s {{moveName}} non è più\ndisabilitata!",
|
||||
"notDisabled": "{{moveName}} non è più\ndisabilitata!",
|
||||
"skipItemQuestion": "Sei sicuro di non voler prendere nessun oggetto?",
|
||||
"eggHatching": "Oh?",
|
||||
"ivScannerUseQuestion": "Vuoi usare lo scanner di IV su {{pokemonName}}?"
|
||||
|
@ -955,7 +955,7 @@ export const modifierTypes = {
|
||||
ENEMY_DAMAGE_BOOSTER: () => new ModifierType('Damage Token', 'Increases damage by 5%', (type, _args) => new Modifiers.EnemyDamageBoosterModifier(type, 5), 'wl_item_drop'),
|
||||
ENEMY_DAMAGE_REDUCTION: () => new ModifierType('Protection Token', 'Reduces incoming damage by 2.5%', (type, _args) => new Modifiers.EnemyDamageReducerModifier(type, 2.5), 'wl_guard_spec'),
|
||||
//ENEMY_SUPER_EFFECT_BOOSTER: () => new ModifierType('Type Advantage Token', 'Increases damage of super effective attacks by 30%', (type, _args) => new Modifiers.EnemySuperEffectiveDamageBoosterModifier(type, 30), 'wl_custom_super_effective'),
|
||||
ENEMY_HEAL: () => new ModifierType('Recovery Token', 'Heals 2% of max HP every turn', (type, _args) => new Modifiers.EnemyTurnHealModifier(type, 2), 'wl_potion'),
|
||||
ENEMY_HEAL: () => new ModifierType('Recovery Token', 'Heals 3% of max HP every turn', (type, _args) => new Modifiers.EnemyTurnHealModifier(type, 3), 'wl_potion'),
|
||||
ENEMY_ATTACK_POISON_CHANCE: () => new EnemyAttackStatusEffectChanceModifierType('Poison Token', 10, StatusEffect.POISON, 'wl_antidote'),
|
||||
ENEMY_ATTACK_PARALYZE_CHANCE: () => new EnemyAttackStatusEffectChanceModifierType('Paralyze Token', 10, StatusEffect.PARALYSIS, 'wl_paralyze_heal'),
|
||||
ENEMY_ATTACK_SLEEP_CHANCE: () => new EnemyAttackStatusEffectChanceModifierType('Sleep Token', 10, StatusEffect.SLEEP, 'wl_awakening'),
|
||||
|
@ -2004,7 +2004,7 @@ export class EnemyTurnHealModifier extends EnemyPersistentModifier {
|
||||
super(type, stackCount);
|
||||
|
||||
// Hardcode temporarily
|
||||
this.healPercent = 2;
|
||||
this.healPercent = 3;
|
||||
}
|
||||
|
||||
match(modifier: Modifier): boolean {
|
||||
@ -2033,7 +2033,7 @@ export class EnemyTurnHealModifier extends EnemyPersistentModifier {
|
||||
}
|
||||
|
||||
getMaxStackCount(scene: BattleScene): integer {
|
||||
return 15;
|
||||
return 10;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -23,7 +23,7 @@ import { FusePokemonModifierType, ModifierPoolType, ModifierType, ModifierTypeFu
|
||||
import SoundFade from "phaser3-rex-plugins/plugins/soundfade";
|
||||
import { BattlerTagLapseType, EncoreTag, HideSpriteTag as HiddenTag, ProtectedTag, TrappedTag } from "./data/battler-tags";
|
||||
import { BattlerTagType } from "./data/enums/battler-tag-type";
|
||||
import { getPokemonMessage, getPokemonPrefix } from "./messages";
|
||||
import { getPokemonMessage } from "./messages";
|
||||
import { Starter } from "./ui/starter-select-ui-handler";
|
||||
import { Gender } from "./data/gender";
|
||||
import { Weather, WeatherType, getRandomWeatherType, getTerrainBlockMessage, getWeatherDamageMessage, getWeatherLapseMessage } from "./data/weather";
|
||||
@ -2046,7 +2046,7 @@ export class TurnEndPhase extends FieldPhase {
|
||||
pokemon.lapseTags(BattlerTagLapseType.TURN_END);
|
||||
|
||||
if (pokemon.summonData.disabledMove && !--pokemon.summonData.disabledTurns) {
|
||||
this.scene.pushPhase(new MessagePhase(this.scene, i18next.t('battle:notDisabled', { pokemonName: `${getPokemonPrefix(pokemon)}${pokemon.name}`, moveName: allMoves[pokemon.summonData.disabledMove].name })));
|
||||
this.scene.pushPhase(new MessagePhase(this.scene, i18next.t('battle:notDisabled', { moveName: allMoves[pokemon.summonData.disabledMove].name })));
|
||||
pokemon.summonData.disabledMove = Moves.NONE;
|
||||
}
|
||||
|
||||
@ -2158,7 +2158,6 @@ export class MovePhase extends BattlePhase {
|
||||
public targets: BattlerIndex[];
|
||||
protected followUp: boolean;
|
||||
protected ignorePp: boolean;
|
||||
protected failed: boolean;
|
||||
protected cancelled: boolean;
|
||||
|
||||
constructor(scene: BattleScene, pokemon: Pokemon, targets: BattlerIndex[], move: PokemonMove, followUp?: boolean, ignorePp?: boolean) {
|
||||
@ -2169,7 +2168,6 @@ export class MovePhase extends BattlePhase {
|
||||
this.move = move;
|
||||
this.followUp = !!followUp;
|
||||
this.ignorePp = !!ignorePp;
|
||||
this.failed = false;
|
||||
this.cancelled = false;
|
||||
}
|
||||
|
||||
@ -2177,12 +2175,6 @@ export class MovePhase extends BattlePhase {
|
||||
return this.pokemon.isActive(true) && this.move.isUsable(this.pokemon, this.ignorePp) && !!this.targets.length;
|
||||
}
|
||||
|
||||
/**Signifies the current move should fail but still use PP */
|
||||
fail(): void {
|
||||
this.failed = true;
|
||||
}
|
||||
|
||||
/**Signifies the current move should cancel and retain PP */
|
||||
cancel(): void {
|
||||
this.cancelled = true;
|
||||
}
|
||||
@ -2222,7 +2214,7 @@ export class MovePhase extends BattlePhase {
|
||||
this.targets[0] = attacker.getBattlerIndex();
|
||||
}
|
||||
if (this.targets[0] === BattlerIndex.ATTACKER) {
|
||||
this.fail(); // Marks the move as failed for later in doMove
|
||||
this.cancel();
|
||||
this.showMoveText();
|
||||
this.showFailedText();
|
||||
}
|
||||
@ -2243,23 +2235,10 @@ export class MovePhase extends BattlePhase {
|
||||
|
||||
this.pokemon.lapseTags(BattlerTagLapseType.PRE_MOVE);
|
||||
|
||||
let ppUsed = 1;
|
||||
// Filter all opponents to include only those this move is targeting
|
||||
const targetedOpponents = this.pokemon.getOpponents().filter(o => this.targets.includes(o.getBattlerIndex()));
|
||||
for (let opponent of targetedOpponents) {
|
||||
if (this.move.ppUsed + ppUsed >= this.move.getMovePp()) // If we're already at max PP usage, stop checking
|
||||
break;
|
||||
if (opponent.hasAbilityWithAttr(IncreasePpAbAttr)) // Accounting for abilities like Pressure
|
||||
ppUsed++;
|
||||
}
|
||||
|
||||
if (!this.followUp && this.canMove() && !this.cancelled) {
|
||||
this.pokemon.lapseTags(BattlerTagLapseType.MOVE);
|
||||
}
|
||||
if (this.cancelled || this.failed) {
|
||||
if (this.failed)
|
||||
this.move.usePp(ppUsed); // Only use PP if the move failed
|
||||
|
||||
if (this.cancelled) {
|
||||
this.pokemon.pushMoveHistory({ move: Moves.NONE, result: MoveResult.FAIL });
|
||||
return this.end();
|
||||
}
|
||||
@ -2274,12 +2253,23 @@ export class MovePhase extends BattlePhase {
|
||||
if ((moveQueue.length && moveQueue[0].move === Moves.NONE) || !targets.length) {
|
||||
moveQueue.shift();
|
||||
this.cancel();
|
||||
}
|
||||
|
||||
if (this.cancelled) {
|
||||
this.pokemon.pushMoveHistory({ move: Moves.NONE, result: MoveResult.FAIL });
|
||||
return this.end();
|
||||
}
|
||||
|
||||
if (!moveQueue.length || !moveQueue.shift().ignorePP) // using .shift here clears out two turn moves once they've been used
|
||||
this.move.usePp(ppUsed);
|
||||
if (!moveQueue.length || !moveQueue.shift().ignorePP) {
|
||||
this.move.ppUsed++;
|
||||
const targetedOpponents = this.pokemon.getOpponents().filter(o => this.targets.includes(o.getBattlerIndex()));
|
||||
for (let opponent of targetedOpponents) {
|
||||
if (this.move.ppUsed === this.move.getMove().pp)
|
||||
break;
|
||||
if (opponent.hasAbilityWithAttr(IncreasePpAbAttr))
|
||||
this.move.ppUsed = Math.min(this.move.ppUsed + 1, this.move.getMovePp());
|
||||
}
|
||||
}
|
||||
|
||||
if (!allMoves[this.move.moveId].getAttrs(CopyMoveAttr).length)
|
||||
this.scene.currentBattle.lastMove = this.move.moveId;
|
||||
|
@ -6,6 +6,7 @@ import { enConfig } from '#app/locales/en/config.js';
|
||||
import { esConfig } from '#app/locales/es/config.js';
|
||||
import { frConfig } from '#app/locales/fr/config.js';
|
||||
import { itConfig } from '#app/locales/it/config.js';
|
||||
import { cnConfig } from '#app/locales/cn/config.js';
|
||||
|
||||
export interface SimpleTranslationEntries {
|
||||
[key: string]: string
|
||||
@ -58,7 +59,7 @@ export function initI18n(): void {
|
||||
i18next.use(LanguageDetector).init({
|
||||
lng: lang,
|
||||
fallbackLng: 'en',
|
||||
supportedLngs: ['en', 'es', 'fr', 'it', 'de'],
|
||||
supportedLngs: ['en', 'es', 'fr', 'it', 'de', 'cn'],
|
||||
debug: true,
|
||||
interpolation: {
|
||||
escapeValue: false,
|
||||
@ -78,6 +79,9 @@ export function initI18n(): void {
|
||||
},
|
||||
de: {
|
||||
...deConfig
|
||||
},
|
||||
cn: {
|
||||
...cnConfig
|
||||
}
|
||||
},
|
||||
});
|
||||
|
@ -569,7 +569,7 @@ export class GameData {
|
||||
resolve(true);
|
||||
});
|
||||
} else {
|
||||
localStorage.setItem(`sessionData${scene.sessionSlotId ? scene.sessionSlotId : ''}`, btoa(JSON.stringify(sessionData)));
|
||||
localStorage.setItem('sessionData', btoa(JSON.stringify(sessionData)));
|
||||
|
||||
console.debug('Session data saved');
|
||||
|
||||
|
@ -183,21 +183,25 @@ export function setSetting(scene: BattleScene, setting: Setting, value: integer)
|
||||
handler: () => changeLocaleHandler('en')
|
||||
},
|
||||
{
|
||||
label: 'Español',
|
||||
label: 'Spanish',
|
||||
handler: () => changeLocaleHandler('es')
|
||||
},
|
||||
{
|
||||
label: 'Italiano',
|
||||
label: 'Italian',
|
||||
handler: () => changeLocaleHandler('it')
|
||||
},
|
||||
{
|
||||
label: 'Français',
|
||||
label: 'French',
|
||||
handler: () => changeLocaleHandler('fr')
|
||||
},
|
||||
{
|
||||
label: 'Deutsch',
|
||||
label: 'German',
|
||||
handler: () => changeLocaleHandler('de')
|
||||
},
|
||||
{
|
||||
label: 'Chinese',
|
||||
handler: () => changeLocaleHandler('cn')
|
||||
},
|
||||
{
|
||||
label: 'Cancel',
|
||||
handler: () => cancelHandler()
|
||||
|
@ -414,7 +414,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
||||
this.classicWinIcons = new Array(81).fill(null).map((_, i) => {
|
||||
const x = (i % 9) * 18;
|
||||
const y = Math.floor(i / 9) * 18;
|
||||
const ret = this.scene.add.image(x + 153, y + 21, 'champion_ribbon');
|
||||
const ret = this.scene.add.image(x + 152, y + 16, 'champion_ribbon');
|
||||
ret.setOrigin(0, 0);
|
||||
ret.setScale(0.5);
|
||||
ret.setVisible(false);
|
||||
@ -462,7 +462,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
||||
this.pokemonCandyDarknessOverlay.setScale(0.5);
|
||||
this.pokemonCandyDarknessOverlay.setOrigin(0, 0);
|
||||
this.pokemonCandyDarknessOverlay.setTint(0x000000);
|
||||
this.pokemonCandyDarknessOverlay.setAlpha(0.50);
|
||||
this.pokemonCandyDarknessOverlay.setAlpha(0.5);
|
||||
this.pokemonCandyDarknessOverlay.setInteractive(new Phaser.Geom.Rectangle(0, 0, 16, 16), Phaser.Geom.Rectangle.Contains);
|
||||
this.starterSelectContainer.add(this.pokemonCandyDarknessOverlay);
|
||||
|
||||
@ -1332,6 +1332,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
||||
}
|
||||
|
||||
this.pokemonCandyDarknessOverlay.setCrop(0,0,16, candyCropY);
|
||||
this.pokemonCandyDarknessOverlay.setCrop(0,0,16, candyCropY);
|
||||
}
|
||||
this.iconAnimHandler.addOrUpdate(this.starterSelectGenIconContainers[species.generation - 1].getAt(this.genSpecies[species.generation - 1].indexOf(species)) as Phaser.GameObjects.Sprite, PokemonIconAnimMode.PASSIVE);
|
||||
|
||||
|
@ -50,8 +50,6 @@ export default class SummaryUiHandler extends UiHandler {
|
||||
private candyShadow: Phaser.GameObjects.Sprite;
|
||||
private candyIcon: Phaser.GameObjects.Sprite;
|
||||
private candyOverlay: Phaser.GameObjects.Sprite;
|
||||
private candyCountText: Phaser.GameObjects.Text;
|
||||
private championRibbon: Phaser.GameObjects.Image;
|
||||
private statusContainer: Phaser.GameObjects.Container;
|
||||
private status: Phaser.GameObjects.Image;
|
||||
private summaryPageContainer: Phaser.GameObjects.Container;
|
||||
@ -144,6 +142,12 @@ export default class SummaryUiHandler extends UiHandler {
|
||||
this.pokeball.setOrigin(0, 1);
|
||||
this.summaryContainer.add(this.pokeball);
|
||||
|
||||
this.candyShadow = this.scene.add.sprite(13, -140, 'candy');
|
||||
this.candyShadow.setTint(0x141414)
|
||||
this.candyShadow.setScale(0.8);
|
||||
this.candyShadow.setInteractive(new Phaser.Geom.Rectangle(0, 0, 16, 16), Phaser.Geom.Rectangle.Contains);
|
||||
this.summaryContainer.add(this.candyShadow);
|
||||
|
||||
this.candyIcon = this.scene.add.sprite(13, -140, 'candy');
|
||||
this.candyIcon.setScale(0.8);
|
||||
this.summaryContainer.add(this.candyIcon);
|
||||
@ -152,24 +156,6 @@ export default class SummaryUiHandler extends UiHandler {
|
||||
this.candyOverlay.setScale(0.8);
|
||||
this.summaryContainer.add(this.candyOverlay);
|
||||
|
||||
this.candyShadow = this.scene.add.sprite(13, -140, 'candy');
|
||||
this.candyShadow.setTint(0x000000);
|
||||
this.candyShadow.setAlpha(0.50);
|
||||
this.candyShadow.setScale(0.8);
|
||||
this.candyShadow.setInteractive(new Phaser.Geom.Rectangle(0, 0, 16, 16), Phaser.Geom.Rectangle.Contains);
|
||||
this.summaryContainer.add(this.candyShadow);
|
||||
|
||||
this.candyCountText = addTextObject(this.scene, 20, -146, 'x0', TextStyle.WINDOW_ALT, { fontSize: '76px' });
|
||||
this.candyCountText.setOrigin(0, 0);
|
||||
this.summaryContainer.add(this.candyCountText);
|
||||
|
||||
this.championRibbon = this.scene.add.image(88, -146, 'champion_ribbon');
|
||||
this.championRibbon.setOrigin(0, 0);
|
||||
//this.championRibbon.setScale(0.8);
|
||||
this.championRibbon.setScale(1.25);
|
||||
this.summaryContainer.add(this.championRibbon);
|
||||
this.championRibbon.setVisible(false);
|
||||
|
||||
this.levelText = addTextObject(this.scene, 36, -17, '', TextStyle.SUMMARY_ALT);
|
||||
this.levelText.setOrigin(0, 1);
|
||||
this.summaryContainer.add(this.levelText);
|
||||
@ -289,11 +275,6 @@ export default class SummaryUiHandler extends UiHandler {
|
||||
this.splicedIcon.on('pointerout', () => (this.scene as BattleScene).ui.hideTooltip());
|
||||
}
|
||||
|
||||
if(this.scene.gameData.starterData[this.pokemon.species.getRootSpeciesId()].classicWinCount > 0 && this.scene.gameData.starterData[this.pokemon.species.getRootSpeciesId(true)].classicWinCount > 0)
|
||||
this.championRibbon.setVisible(true);
|
||||
else
|
||||
this.championRibbon.setVisible(false);
|
||||
|
||||
var currentFriendship = this.scene.gameData.starterData[this.pokemon.species.getRootSpeciesId()].friendship;
|
||||
if (!currentFriendship || currentFriendship === undefined)
|
||||
currentFriendship = 0;
|
||||
@ -306,9 +287,8 @@ export default class SummaryUiHandler extends UiHandler {
|
||||
this.candyShadow.on('pointerout', () => (this.scene as BattleScene).ui.hideTooltip());
|
||||
}
|
||||
|
||||
this.candyCountText.setText(`x${this.scene.gameData.starterData[this.pokemon.species.getRootSpeciesId()].candyCount}`);
|
||||
|
||||
this.candyShadow.setCrop(0,0,16, candyCropY);
|
||||
this.candyIcon.setCrop(0,candyCropY,16, 16);
|
||||
this.candyOverlay.setCrop(0,candyCropY,16, 16);
|
||||
|
||||
const doubleShiny = isFusion && this.pokemon.shiny && this.pokemon.fusionShiny;
|
||||
const baseVariant = !doubleShiny ? this.pokemon.getVariant() : this.pokemon.variant;
|
||||
|
@ -84,7 +84,7 @@ export default class TitleUiHandler extends OptionSelectUiHandler {
|
||||
|
||||
this.updateTitleStats();
|
||||
|
||||
this.titleStatsTimer = setInterval(() => this.updateTitleStats(), 60000);
|
||||
this.titleStatsTimer = setInterval(() => this.updateTitleStats(), 30000);
|
||||
|
||||
this.scene.tweens.add({
|
||||
targets: [ this.titleContainer, ui.getMessageHandler().bg ],
|
||||
|
@ -220,7 +220,7 @@ export function executeIf<T>(condition: boolean, promiseFunc: () => Promise<T>):
|
||||
}
|
||||
|
||||
export const sessionIdKey = 'pokerogue_sessionId';
|
||||
export const isLocal = window.location.hostname === 'localhost' || window.location.hostname === '';
|
||||
export const isLocal = window.location.hostname === 'localhost';
|
||||
export const serverUrl = isLocal ? 'http://localhost:8001' : '';
|
||||
export const apiUrl = isLocal ? serverUrl : 'https://api.pokerogue.net';
|
||||
export const fallbackApiUrl = isLocal ? serverUrl : 'api';
|
||||
|
Loading…
Reference in New Issue
Block a user