Merge branch 'beta' into hebrew-pr

This commit is contained in:
Lugiad 2024-09-29 12:59:52 +02:00 committed by GitHub
commit 7816e398a1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
19 changed files with 208 additions and 38 deletions

View File

@ -1,6 +1,6 @@
VITE_BYPASS_LOGIN=0
VITE_BYPASS_TUTORIAL=0
VITE_SERVER_URL=https://api.beta.pokerogue.net
VITE_SERVER_URL=https://apibeta.pokerogue.net
VITE_DISCORD_CLIENT_ID=1248062921129459756
VITE_GOOGLE_CLIENT_ID=955345393540-2k6lfftf0fdnb0krqmpthjnqavfvvf73.apps.googleusercontent.com
VITE_I18N_DEBUG=1

View File

@ -527,18 +527,19 @@ interface monotypeOverride {
*/
export class SingleTypeChallenge extends Challenge {
private static TYPE_OVERRIDES: monotypeOverride[] = [
{species: Species.MELOETTA, type: Type.PSYCHIC, fusion: true},
{species: Species.CASTFORM, type: Type.NORMAL, fusion: false},
];
// TODO: Find a solution for all Pokemon with this ssui issue, including Basculin and Burmy
private static SPECIES_OVERRIDES: Species[] = [Species.MELOETTA];
constructor() {
super(Challenges.SINGLE_TYPE, 18);
}
applyStarterChoice(pokemon: PokemonSpecies, valid: Utils.BooleanHolder, dexAttr: DexAttrProps, soft: boolean = false): boolean {
override applyStarterChoice(pokemon: PokemonSpecies, valid: Utils.BooleanHolder, dexAttr: DexAttrProps, soft: boolean = false): boolean {
const speciesForm = getPokemonSpeciesForm(pokemon.speciesId, dexAttr.formIndex);
const types = [speciesForm.type1, speciesForm.type2];
if (soft) {
if (soft && !SingleTypeChallenge.SPECIES_OVERRIDES.includes(pokemon.speciesId)) {
const speciesToCheck = [pokemon.speciesId];
while (speciesToCheck.length) {
const checking = speciesToCheck.pop();

View File

@ -595,6 +595,8 @@ function getTrainerConfigForWave(waveIndex: number) {
}))
.setPartyMemberFunc(4, getRandomPartyMemberFunc(POOL_4_POKEMON, TrainerSlot.TRAINER, true));
} else {
pool3Copy = randSeedShuffle(pool3Copy);
const pool3Mon2 = pool3Copy.pop()!;
config
.setPartyTemplates(new TrainerPartyCompoundTemplate(new TrainerPartyTemplate(4, PartyMemberStrength.AVERAGE), new TrainerPartyTemplate(1, PartyMemberStrength.STRONG)))
.setPartyMemberFunc(0, getRandomPartyMemberFunc([ Species.BEEDRILL ], TrainerSlot.TRAINER, true, p => {
@ -616,9 +618,9 @@ function getTrainerConfigForWave(waveIndex: number) {
p.generateName();
}
}))
.setPartyMemberFunc(3, getRandomPartyMemberFunc([pool3Mon.species], TrainerSlot.TRAINER, true, p => {
if (!isNullOrUndefined(pool3Mon.formIndex)) {
p.formIndex = pool3Mon.formIndex;
.setPartyMemberFunc(3, getRandomPartyMemberFunc([pool3Mon2.species], TrainerSlot.TRAINER, true, p => {
if (!isNullOrUndefined(pool3Mon2.formIndex)) {
p.formIndex = pool3Mon2.formIndex;
p.generateAndPopulateMoveset();
p.generateName();
}

View File

@ -762,6 +762,13 @@ export default class PokemonSpecies extends PokemonSpeciesForm implements Locali
}
}
//TODO: Adjust templates and delays so we don't have to hardcode it
/* TEMPORARY! (Most) Trainers shouldn't be using unevolved Pokemon by the third gym leader / wave 80. Exceptions to this include Breeders, whose large teams are balanced by the use of weaker pokemon */
if (currentWave >= 80 && forTrainer && strength > PartyMemberStrength.WEAKER) {
evolutionChance = 1;
noEvolutionChance = 0;
}
if (evolutionChance > 0) {
if (isRegionalEvolution) {
evolutionChance /= (evolutionSpecies.isRareRegional() ? 16 : 4);

View File

@ -952,32 +952,35 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
const baseStats = this.calculateBaseStats();
// Using base stats, calculate and store stats one by one
for (const s of PERMANENT_STATS) {
let value = Math.floor(((2 * baseStats[s] + this.ivs[s]) * this.level) * 0.01);
const statHolder = new Utils.IntegerHolder(Math.floor(((2 * baseStats[s] + this.ivs[s]) * this.level) * 0.01));
if (s === Stat.HP) {
value = value + this.level + 10;
statHolder.value = statHolder.value + this.level + 10;
this.scene.applyModifier(PokemonIncrementingStatModifier, this.isPlayer(), this, s, statHolder);
if (this.hasAbility(Abilities.WONDER_GUARD, false, true)) {
value = 1;
statHolder.value = 1;
}
if (this.hp > value || this.hp === undefined) {
this.hp = value;
if (this.hp > statHolder.value || this.hp === undefined) {
this.hp = statHolder.value;
} else if (this.hp) {
const lastMaxHp = this.getMaxHp();
if (lastMaxHp && value > lastMaxHp) {
this.hp += value - lastMaxHp;
if (lastMaxHp && statHolder.value > lastMaxHp) {
this.hp += statHolder.value - lastMaxHp;
}
}
} else {
value += 5;
statHolder.value += 5;
const natureStatMultiplier = new Utils.NumberHolder(getNatureStatMultiplier(this.getNature(), s));
this.scene.applyModifier(PokemonNatureWeightModifier, this.isPlayer(), this, natureStatMultiplier);
if (natureStatMultiplier.value !== 1) {
value = Math.max(Math[natureStatMultiplier.value > 1 ? "ceil" : "floor"](value * natureStatMultiplier.value), 1);
statHolder.value = Math.max(Math[natureStatMultiplier.value > 1 ? "ceil" : "floor"](statHolder.value * natureStatMultiplier.value), 1);
}
this.scene.applyModifier(PokemonIncrementingStatModifier, this.isPlayer(), this, s, statHolder);
}
this.setStat(s, value);
statHolder.value = Utils.clampInt(statHolder.value, 1, Number.MAX_SAFE_INTEGER);
this.setStat(s, statHolder.value);
}
this.scene.applyModifier(PokemonIncrementingStatModifier, this.isPlayer(), this, this.stats);
}
calculateBaseStats(): number[] {

View File

@ -75,5 +75,5 @@
"substituteOnAdd": "Ein Delegator von {{pokemonNameWithAffix}} ist erschienen!",
"substituteOnHit": "Der Delegator steckt den Schlag für {{pokemonNameWithAffix}} ein!",
"substituteOnRemove": "Der Delegator von {{pokemonNameWithAffix}} hört auf zu wirken!",
"autotomizeOnAdd": "{{pokemonNameWIthAffix}} ist leichter geworden!"
"autotomizeOnAdd": "{{pokemonNameWithAffix}} ist leichter geworden!"
}

View File

@ -358,6 +358,10 @@
"name": "Llamasfera",
"description": "Extraña esfera que causa quemaduras a quien la usa en combate."
},
"EVOLUTION_TRACKER_GIMMIGHOUL": {
"name": "Tesoros",
"description": "¡A este Pokémon le encantan los tesoros! ¡Sigue coleccionandólos y tal vez pase algo!"
},
"BATON": {
"name": "Testigo",
"description": "Permite pasar los efectos al cambiar de Pokémon, también evita las trampas."
@ -495,6 +499,22 @@
"TART_APPLE": "Manzana ácida",
"STRAWBERRY_SWEET": "Confite fresa",
"UNREMARKABLE_TEACUP": "Cuenco mediocre",
"UPGRADE": "Mejora",
"DUBIOUS_DISC": "Disco Extraño",
"DRAGON_SCALE": "Escama Dragón",
"PRISM_SCALE": "Escama Bella",
"RAZOR_CLAW": "Garra Afilada",
"RAZOR_FANG": "Colmillo Agudo",
"REAPER_CLOTH": "Tela Terrible",
"ELECTIRIZER": "Electrizador",
"MAGMARIZER": "Magmatizador",
"PROTECTOR": "Protector",
"SACHET": "Saquito Fragante",
"WHIPPED_DREAM": "Dulce de Nata",
"LEADERS_CREST": "Distintivo de Líder",
"SUN_FLUTE": "Flauta Solar",
"MOON_FLUTE": "Flauta Lunar",
"CHIPPED_POT": "Tetera rota",
"BLACK_AUGURITE": "Mineral negro",
"GALARICA_CUFF": "Brazal galanuez",

View File

@ -240,6 +240,8 @@
"TOXIC_ORB": { "name": "Orbe Toxique", "description": "Empoisonne gravement son porteur à la fin du tour sil na pas déjà de problème de statut." },
"FLAME_ORB": { "name": "Orbe Flamme", "description": "Brule son porteur à la fin du tour sil na pas déjà de problème de statut." },
"EVOLUTION_TRACKER_GIMMIGHOUL": { "name": "Trésors", "description": "Ce Pokémon adore les trésors ! Ramassez-en le plus possible et voyez ce quil se passe !"},
"BATON": { "name": "Témoin", "description": "Permet de transmettre les effets en cas de changement de Pokémon. Ignore les pièges." },
"SHINY_CHARM": { "name": "Charme Chroma", "description": "Augmente énormément les chances de rencontrer un Pokémon sauvage chromatique." },
@ -330,6 +332,21 @@
"TART_APPLE": "Pomme Acidulée",
"STRAWBERRY_SWEET": "Fraise en Sucre",
"UNREMARKABLE_TEACUP": "Bol Médiocre",
"UPGRADE": "Améliorator",
"DUBIOUS_DISC": "CD Douteux",
"DRAGON_SCALE": "Écaille Draco",
"PRISM_SCALE": "BelÉcaille",
"RAZOR_CLAW": "Griffe Rasoir",
"RAZOR_FANG": "Croc Rasoir",
"REAPER_CLOTH": "Tissu Fauche",
"ELECTIRIZER": "Électriseur",
"MAGMARIZER": "Magmariseur",
"PROTECTOR": "Protecteur",
"SACHET": "Sachet Senteur",
"WHIPPED_DREAM": "Chantibonbon",
"LEADERS_CREST": "Emblème du Général",
"SUN_FLUTE": "Flute du Soleil",
"MOON_FLUTE": "Flute de la Lune",
"CHIPPED_POT": "Théière Ébréchée",
"BLACK_AUGURITE": "Obsidienne",

View File

@ -358,6 +358,10 @@
"name": "Fiammosfera",
"description": "Sfera bizzarra che procura una scottatura a chi lha con sé in una lotta."
},
"EVOLUTION_TRACKER_GIMMIGHOUL": {
"name": "Tesori",
"description": "Questo Pokémon adora i tesori! Continua a collezionare i tesori e potrebbe accadere qualcosa!"
},
"BATON": {
"name": "Staffetta",
"description": "Permette di trasmettere gli effetti quando si cambia Pokémon, aggirando anche le trappole."
@ -495,6 +499,22 @@
"TART_APPLE": "Aspropomo",
"STRAWBERRY_SWEET": "Bonbonfragola",
"UNREMARKABLE_TEACUP": "Tazza dozzinale",
"UPGRADE": "Upgrade",
"DUBIOUS_DISC": "Dubbiodisco",
"DRAGON_SCALE": "Squama drago",
"PRISM_SCALE": "Squama bella",
"RAZOR_CLAW": "Affilartiglio",
"RAZOR_FANG": "Affilodente",
"REAPER_CLOTH": "Terrorpanno",
"ELECTIRIZER": "Elettritore",
"MAGMARIZER": "Magmatore",
"PROTECTOR": "Copertura",
"SACHET": "Bustina aromi",
"WHIPPED_DREAM": "Dolcespuma",
"LEADERS_CREST": "Simbolo del capo",
"SUN_FLUTE": "Flauto solare",
"MOON_FLUTE": "Flauto lunare",
"CHIPPED_POT": "Teiera crepata",
"BLACK_AUGURITE": "Augite nera",
"GALARICA_CUFF": "Fascia Galarnoce",

View File

@ -240,6 +240,11 @@
"TOXIC_ORB": { "name": "どくどくだま", "description": "触ると 毒をだす 不思議な玉。\n持たせると 戦闘中に 猛毒の状態に なる" },
"FLAME_ORB": { "name": "かえんだま", "description": "触ると 熱をだす 不思議な玉。\n持たせると 戦闘中に やけどの状態に なる。" },
"EVOLUTION_TRACKER_GIMMIGHOUL": {
"name": "宝物",
"description": "このポケモンは 宝物が 大好き! 宝物を 集め続けると 良いことが 起こる かもしれません!"
},
"BATON": { "name": "バトン", "description": "持たせると 入れ替えるとき 控えのポケモンが\n能力変化を 受けつげる 逃げられなくする 技や 特性も 回避する" },
"SHINY_CHARM": { "name": "ひかるおまもり", "description": "色違いの ポケモンと 大きく 出会いやすくなる" },
@ -330,6 +335,21 @@
"TART_APPLE": "すっぱいりんご",
"STRAWBERRY_SWEET": "いちごアメざいく",
"UNREMARKABLE_TEACUP": "ボンサクのちゃわん",
"UPGRADE": "アップグレード",
"DUBIOUS_DISC": "あやしいパッチ",
"DRAGON_SCALE": "りゅうのウロコ",
"PRISM_SCALE": "きれいなウロコ",
"RAZOR_CLAW": "するどいツメ",
"RAZOR_FANG": "するどいキバ",
"REAPER_CLOTH": "れいかいのぬの",
"ELECTIRIZER": "エレキブースター",
"MAGMARIZER": "マグマブースター",
"PROTECTOR": "プロテクター",
"SACHET": "においぶくろ",
"WHIPPED_DREAM": "ホイップポップ",
"LEADERS_CREST": "かしらのしるし",
"SUN_FLUTE": "たいようのふえ",
"MOON_FLUTE": "つきのふえ",
"CHIPPED_POT": "かけたポット",
"BLACK_AUGURITE": "くろのきせき",

View File

@ -358,9 +358,13 @@
"name": "화염구슬",
"description": "이 도구를 지닌 포켓몬은 턴이 끝나는 시점에 상태이상에 걸리지 않았다면 화상 상태가 된다."
},
"EVOLUTION_TRACKER_GIMMIGHOUL": {
"name": "보물",
"description": "이 포켓몬은 보물을 좋아한다. 보물을 모으다 보면 어떤 일이 일어날 지도 모른다!"
},
"BATON": {
"name": "배턴",
"description": "포켓몬을 교체할 때 효과를 넘겨줄 수 있으며, 함정의 영향을 받지 않게 함"
"description": "포켓몬을 교체할 때 효과를 넘겨줄 수 있으며, 함정의 영향을 받지 않게 한다."
},
"SHINY_CHARM": {
"name": "빛나는부적",
@ -495,6 +499,22 @@
"TART_APPLE": "새콤한사과",
"STRAWBERRY_SWEET": "딸기사탕공예",
"UNREMARKABLE_TEACUP": "범작찻잔",
"UPGRADE": "업그레이드",
"DUBIOUS_DISC": "괴상한패치",
"DRAGON_SCALE": "용의비늘",
"PRISM_SCALE": "고운비늘",
"RAZOR_CLAW": "예리한손톱",
"RAZOR_FANG": "예리한이빨",
"REAPER_CLOTH": "영계의천",
"ELECTIRIZER": "에레키부스터",
"MAGMARIZER": "마그마부스터",
"PROTECTOR": "프로텍터",
"SACHET": "향기주머니",
"WHIPPED_DREAM": "휘핑크림",
"LEADERS_CREST": "대장의징표",
"SUN_FLUTE": "태양의피리",
"MOON_FLUTE": "달의피리",
"CHIPPED_POT": "이빠진포트",
"BLACK_AUGURITE": "검은휘석",
"GALARICA_CUFF": "가라두구팔찌",

View File

@ -358,6 +358,10 @@
"name": "Esfera da Chama",
"description": "Uma esfera estranha que aquece quando tocada e queima quem a segurar."
},
"EVOLUTION_TRACKER_GIMMIGHOUL": {
"name": "Treasures",
"description": "This Pokémon loves treasure! Keep collecting treasure and something might happen!"
},
"BATON": {
"name": "Bastão",
"description": "Permite passar mudanças de atributo ao trocar Pokémon, ignorando armadilhas."
@ -507,6 +511,22 @@
"TART_APPLE": "Maçã Azeda",
"STRAWBERRY_SWEET": "Doce de Morango",
"UNREMARKABLE_TEACUP": "Xícara Comum",
"UPGRADE": "Melhora",
"DUBIOUS_DISC": "Dubious Disc",
"DRAGON_SCALE": "Escama de Dragão",
"PRISM_SCALE": "Prism Scale",
"RAZOR_CLAW": "Garra de Navalha",
"RAZOR_FANG": "Presa Afiada",
"REAPER_CLOTH": "Capa do Ceifador",
"ELECTIRIZER": "Electirizer",
"MAGMARIZER": "Magmarizer",
"PROTECTOR": "Protector",
"SACHET": "Sachet",
"WHIPPED_DREAM": "Whipped Dream",
"LEADERS_CREST": "Leader's Crest",
"SUN_FLUTE": "Sun Flute",
"MOON_FLUTE": "Moon Flute",
"CHIPPED_POT": "Pote Lascado",
"BLACK_AUGURITE": "Mineral Negro",
"GALARICA_CUFF": "Bracelete de Galar",

View File

@ -358,6 +358,10 @@
"name": "火焰宝珠",
"description": "触碰后会放出热量的神奇宝珠。\n携带后在战斗时会变成灼伤状态。"
},
"EVOLUTION_TRACKER_GIMMIGHOUL": {
"name": "金子宝物",
"description": "这个小精靈爱金子! 继续挑金子然后谁知道什么会发生!"
},
"BATON": {
"name": "接力棒",
"description": "允许在切换宝可梦时保留能力变化, 对陷阱\n同样生效。"
@ -495,6 +499,22 @@
"TART_APPLE": "酸酸苹果",
"STRAWBERRY_SWEET": "草莓糖饰",
"UNREMARKABLE_TEACUP": "凡作茶碗",
"UPGRADE": "升级数据",
"DUBIOUS_DISC": "可疑补丁",
"DRAGON_SCALE": "龙之鳞片",
"PRISM_SCALE": "美丽鳞片",
"RAZOR_CLAW": "锐利之爪",
"RAZOR_FANG": "锐利之牙",
"REAPER_CLOTH": "灵界之布",
"ELECTIRIZER": "电力增幅器",
"MAGMARIZER": "熔岩增幅器",
"PROTECTOR": "护具",
"SACHET": "香袋",
"WHIPPED_DREAM": "泡沫奶油",
"LEADERS_CREST": "头领凭证",
"SUN_FLUTE": "太阳之笛",
"MOON_FLUTE": "月亮之笛",
"CHIPPED_POT": "缺损的茶壶",
"BLACK_AUGURITE": "黑奇石",
"GALARICA_CUFF": "伽勒豆蔻手环",

View File

@ -12,7 +12,7 @@
"good": "一些不错的工具和物品!",
"great": "一些很稀有的工具和物品!!",
"amazing": "哇!金色传说!",
"bad": "哦不!@d{32}\n这个箱子实际上是一个伪装的{{gimmighoul Name}}$你的{{pokeName}}跳到了你面前\n但为了保护你被打倒了"
"bad": "哦不!@d{32}\n这个箱子实际上是一个伪装的{{gimmighoulName}}$你的{{pokeName}}跳到了你面前\n但为了保护你被打倒了"
},
"2": {
"label": "有诈,走了",

View File

@ -20,7 +20,7 @@
"tooltip": "(-)无奖励",
"selected": "呵呵,没想到你竟然是个懦夫。"
},
"selected": "那人递给你两瓶东西后\n然后很快就消失了。${{selected Pokemon}}获得了{{boost}}和{{boost 2}}提升!"
"selected": "那人递给你两瓶东西后\n然后很快就消失了。${{selectedPokemon}}获得了{{boost1}}和{{boost2}}提升!"
},
"cheap_side_effects": "但是药物有一些副作用!$你的{{selectedPokemon}}受到一些伤害,\n并且它的性格变为{{newNature}}",
"no_bad_effects": "看来药物完全没有副作用!"

View File

@ -13,7 +13,7 @@
"label": "干等",
"tooltip": "(-)漫长的等待\n(+)回复队伍",
"selected": ".@d{32}.@d{32}.@d{32}$您等待了好一段时间,但是\n{{snorlaxName}}的哈欠让你的队伍昏昏欲睡…………",
"rest_result": "当你们醒来时,{{snorlax Name}}已无处可寻。\n但你所有的宝可梦都痊愈了"
"rest_result": "当你们醒来时,{{snorlaxName}}已无处可寻。\n但你所有的宝可梦都痊愈了"
},
"3": {
"label": "偷摸",

View File

@ -27,7 +27,7 @@
"tooltip": "(-)无奖励",
"selected": "你无暇训练\n该动身了。"
},
"selected": "{{selected Pokemon}}穿过空地来到你面前……"
"selected": "{{selectedPokemon}}穿过空地来到你面前……"
},
"outro": "这次训练成果不错!"
}

View File

@ -358,6 +358,10 @@
"name": "火焰寶珠",
"description": "觸碰後會放出熱量的神奇寶珠。\n攜帶後在戰鬥時會變成灼傷狀態。"
},
"EVOLUTION_TRACKER_GIMMIGHOUL": {
"name": "金子寶物",
"description": "這個小精靈愛金子! 繼續挑金子然後誰知道什麼會發生!"
},
"BATON": {
"name": "接力棒",
"description": "允許在切換寶可夢時保留能力變化, 對陷阱\n同樣生效。"
@ -495,6 +499,22 @@
"TART_APPLE": "酸酸蘋果",
"STRAWBERRY_SWEET": "草莓糖飾",
"UNREMARKABLE_TEACUP": "凡作茶碗",
"UPGRADE": "升級資料",
"DUBIOUS_DISC": "可疑修正檔",
"DRAGON_SCALE": "龍之鱗片",
"PRISM_SCALE": "美麗鱗片",
"RAZOR_CLAW": "銳利之爪",
"RAZOR_FANG": "銳利之牙",
"REAPER_CLOTH": "靈界之布",
"ELECTIRIZER": "電力增幅器",
"MAGMARIZER": "熔岩增幅器",
"PROTECTOR": "護具",
"SACHET": "香袋",
"WHIPPED_DREAM": "泡沫奶油",
"LEADERS_CREST": "頭領憑證",
"SUN_FLUTE": "太陽之笛",
"MOON_FLUTE": "月亮之笛",
"CHIPPED_POT": "缺損的茶壺",
"BLACK_AUGURITE": "黑奇石",
"GALARICA_CUFF": "伽勒豆蔻手環",

View File

@ -998,26 +998,26 @@ export class PokemonIncrementingStatModifier extends PokemonHeldItemModifier {
}
shouldApply(args: any[]): boolean {
return super.shouldApply(args) && args.length === 2 && args[1] instanceof Array;
return super.shouldApply(args) && args.length === 3 && args[2] instanceof Utils.IntegerHolder;
}
apply(args: any[]): boolean {
// Modifies the passed in stats[] array by +1 per stack for HP, +2 per stack for other stats
// Modifies the passed in stat integer holder by +1 per stack for HP, +2 per stack for other stats
// If the Macho Brace is at max stacks (50), adds additional 5% to total HP and 10% to other stats
const targetToApply = args[0] as Pokemon;
const isHp = args[1] === Stat.HP;
const statHolder = args[2] as Utils.IntegerHolder;
args[1].forEach((v, i) => {
const isHp = i === 0;
// Doesn't modify HP if holder has Wonder Guard
if (!isHp || !targetToApply.hasAbility(Abilities.WONDER_GUARD)) {
let mult = 1;
if (this.stackCount === this.getMaxHeldItemCount()) {
mult = isHp ? 1.05 : 1.1;
}
const newVal = Math.floor((v + this.stackCount * (isHp ? 1 : 2)) * mult);
args[1][i] = Math.min(Math.max(newVal, 1), 999999);
if (isHp) {
statHolder.value += this.stackCount;
if (this.stackCount === this.getMaxHeldItemCount()) {
statHolder.value = Math.floor(statHolder.value * 1.05);
}
});
} else {
statHolder.value += 2 * this.stackCount;
if (this.stackCount === this.getMaxHeldItemCount()) {
statHolder.value = Math.floor(statHolder.value * 1.1);
}
}
return true;
}