From 3ef02c9bbd98500833785e4fe5d6699e02b54d85 Mon Sep 17 00:00:00 2001 From: innerthunder <168692175+innerthunder@users.noreply.github.com> Date: Sun, 22 Sep 2024 11:07:35 -0700 Subject: [PATCH 1/2] [Balance] Remove Species Locks from Aura Wheel and Poison Puppeteer (#4330) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Remove non-form-change species locks * Fix typo in localization * Mark descriptions that need changes * Update ability.json * Update move.json * Update ability.json * Update src/locales/pt_BR/ability.json * Update src/locales/pt_BR/move.json * KO translations Co-authored-by: Enoch * Update src/locales/de/ability.json * Update src/locales/de/move.json * Update src/locales/de/move.json * Update ability.json * Update move.json * Update src/locales/it/move.json * Update src/locales/it/ability.json * Update src/locales/ja/move.json Co-authored-by: Chapybara-jp * Update src/locales/ja/ability.json Co-authored-by: Chapybara-jp * Update src/locales/es/ability.json Co-authored-by: DanStevensonx <114961842+DanStevensonx@users.noreply.github.com> * Update move.json * Update src/locales/zh_CN/ability.json Co-authored-by: btsrkex <34084904+btsrkex@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: btsrkex <34084904+btsrkex@users.noreply.github.com> --------- Co-authored-by: Lugiad Co-authored-by: José Ricardo Co-authored-by: Enoch Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> Co-authored-by: Niccolò <123510358+NicusPulcis@users.noreply.github.com> Co-authored-by: Chapybara-jp Co-authored-by: DanStevensonx <114961842+DanStevensonx@users.noreply.github.com> Co-authored-by: btsrkex <34084904+btsrkex@users.noreply.github.com> --- src/data/ability.ts | 2 +- src/data/move.ts | 3 +-- src/locales/de/ability.json | 2 +- src/locales/de/move.json | 2 +- src/locales/en/ability.json | 2 +- src/locales/en/move.json | 2 +- src/locales/es/ability.json | 2 +- src/locales/es/move.json | 2 +- src/locales/fr/ability.json | 2 +- src/locales/fr/move.json | 2 +- src/locales/it/ability.json | 2 +- src/locales/it/move.json | 2 +- src/locales/ja/ability.json | 2 +- src/locales/ja/move.json | 2 +- src/locales/ko/ability.json | 2 +- src/locales/ko/move.json | 2 +- src/locales/pt_BR/ability.json | 2 +- src/locales/pt_BR/move.json | 2 +- src/locales/zh_CN/ability.json | 2 +- src/locales/zh_CN/move.json | 2 +- src/locales/zh_TW/ability.json | 2 +- src/locales/zh_TW/move.json | 2 +- 22 files changed, 22 insertions(+), 23 deletions(-) diff --git a/src/data/ability.ts b/src/data/ability.ts index 28784c07134..7a8d77cc022 100755 --- a/src/data/ability.ts +++ b/src/data/ability.ts @@ -5879,6 +5879,6 @@ export function initAbilities() { new Ability(Abilities.POISON_PUPPETEER, 9) .attr(UncopiableAbilityAbAttr) .attr(UnswappableAbilityAbAttr) - .conditionalAttr(pokemon => pokemon.species.speciesId===Species.PECHARUNT, ConfusionOnStatusEffectAbAttr, StatusEffect.POISON, StatusEffect.TOXIC) + .attr(ConfusionOnStatusEffectAbAttr, StatusEffect.POISON, StatusEffect.TOXIC) ); } diff --git a/src/data/move.ts b/src/data/move.ts index a84bf38c5ea..86139a22adf 100644 --- a/src/data/move.ts +++ b/src/data/move.ts @@ -9073,8 +9073,7 @@ export function initMoves() { new AttackMove(Moves.AURA_WHEEL, Type.ELECTRIC, MoveCategory.PHYSICAL, 110, 100, 10, 100, 0, 8) .attr(StatStageChangeAttr, [ Stat.SPD ], 1, true) .makesContact(false) - .attr(AuraWheelTypeAttr) - .condition((user, target, move) => [user.species.speciesId, user.fusionSpecies?.speciesId].includes(Species.MORPEKO)), // Missing custom fail message + .attr(AuraWheelTypeAttr), new AttackMove(Moves.BREAKING_SWIPE, Type.DRAGON, MoveCategory.PHYSICAL, 60, 100, 15, 100, 0, 8) .target(MoveTarget.ALL_NEAR_ENEMIES) .attr(StatStageChangeAttr, [ Stat.ATK ], -1), diff --git a/src/locales/de/ability.json b/src/locales/de/ability.json index 84f30fac755..e6078371535 100644 --- a/src/locales/de/ability.json +++ b/src/locales/de/ability.json @@ -1237,6 +1237,6 @@ }, "poisonPuppeteer": { "name": "Giftpuppenspiel", - "description": "Wenn Infamomo ein Ziel mit einer Attacke vergiftet, so wird dieses auch verwirrt." + "description": "Wenn das Pokémon ein Ziel mit einer Attacke vergiftet, so wird dieses auch verwirrt." } } \ No newline at end of file diff --git a/src/locales/de/move.json b/src/locales/de/move.json index b7a42cb1787..f3502978edd 100644 --- a/src/locales/de/move.json +++ b/src/locales/de/move.json @@ -3129,7 +3129,7 @@ }, "auraWheel": { "name": "Aura-Rad", - "effect": "Mithilfe der in den Backentaschen gespeicherten Energie greift der Anwender an und erhöht seine Initiative. Der Typ der Attacke hängt von Morpekos Form ab." + "effect": "Mithilfe der in den Backentaschen gespeicherten Energie greift der Anwender an und erhöht seine Initiative. Wenn dies von Morpeko verwendet wird hängt der Typ der Attacke von dessen Form ab." }, "breakingSwipe": { "name": "Breitseite", diff --git a/src/locales/en/ability.json b/src/locales/en/ability.json index de2e063e966..f2ffa9b4927 100644 --- a/src/locales/en/ability.json +++ b/src/locales/en/ability.json @@ -1237,6 +1237,6 @@ }, "poisonPuppeteer": { "name": "Poison Puppeteer", - "description": "Pokémon poisoned by Pecharunt's moves will also become confused." + "description": "Pokémon poisoned by this Pokémon's moves will also become confused." } } \ No newline at end of file diff --git a/src/locales/en/move.json b/src/locales/en/move.json index 7a10335ed06..f54003a296c 100644 --- a/src/locales/en/move.json +++ b/src/locales/en/move.json @@ -3129,7 +3129,7 @@ }, "auraWheel": { "name": "Aura Wheel", - "effect": "Morpeko attacks and raises its Speed with the energy stored in its cheeks. This move's type changes depending on the user's form." + "effect": "The user attacks and raises its Speed with the energy stored in its cheeks. If used by Morpeko, this move's type changes depending on the user's form." }, "breakingSwipe": { "name": "Breaking Swipe", diff --git a/src/locales/es/ability.json b/src/locales/es/ability.json index 598694f441e..01b5348d742 100644 --- a/src/locales/es/ability.json +++ b/src/locales/es/ability.json @@ -1237,6 +1237,6 @@ }, "poisonPuppeteer": { "name": "Títere Tóxico", - "description": "Los rivales que Pecharunt envenene con sus movimientos también sufrirán confusión." + "description": "Los rivales que el usuario envenene con sus movimientos también sufrirán confusión." } } diff --git a/src/locales/es/move.json b/src/locales/es/move.json index f4c28dd02e7..21f73bbf1d3 100644 --- a/src/locales/es/move.json +++ b/src/locales/es/move.json @@ -3129,7 +3129,7 @@ }, "auraWheel": { "name": "Rueda Aural", - "effect": "La energía que acumula en las mejillas le sirve para atacar y aumentar su Velocidad. Este movimiento cambia de tipo según la forma que adopte Morpeko." + "effect": "La energía que acumula en las mejillas le sirve para atacar y aumentar su Velocidad. Si es utilizado por Morpeko, este movimiento cambia de tipo según la forma que adopte." }, "breakingSwipe": { "name": "Vasto Impacto", diff --git a/src/locales/fr/ability.json b/src/locales/fr/ability.json index 5dd6184cd97..e5ac2fd3361 100644 --- a/src/locales/fr/ability.json +++ b/src/locales/fr/ability.json @@ -1237,6 +1237,6 @@ }, "poisonPuppeteer": { "name": "Emprise Toxique", - "description": "Lorsque Pêchaminus empoisonne un Pokémon grâce à l’une de ses capacités, ce dernier devient également confus." + "description": "Lorsque le Pokémon en empoisonne un autre grâce à l’une de ses capacités, ce dernier devient également confus." } } diff --git a/src/locales/fr/move.json b/src/locales/fr/move.json index da42f188a80..6fb3cb73385 100644 --- a/src/locales/fr/move.json +++ b/src/locales/fr/move.json @@ -3129,7 +3129,7 @@ }, "auraWheel": { "name": "Roue Libre", - "effect": "Inflige et change en type Ténèbres" + "effect": "Le Pokémon libère l’énergie stockée dans ses joues pour attaquer et augmenter sa Vitesse. Le type de cette capacité change en fonction de la forme du lanceur." }, "breakingSwipe": { "name": "Abattage", diff --git a/src/locales/it/ability.json b/src/locales/it/ability.json index 18eb133d824..deec995cde7 100644 --- a/src/locales/it/ability.json +++ b/src/locales/it/ability.json @@ -1237,6 +1237,6 @@ }, "poisonPuppeteer": { "name": "\tMalia Tossica", - "description": "I Pokémon avvelenati dalle mosse di Pecharunt entreranno anche in stato di confusione." + "description": "I Pokémon avvelenati dalle mosse di questo Pokémon entreranno anche in stato di confusione." } } \ No newline at end of file diff --git a/src/locales/it/move.json b/src/locales/it/move.json index f5bb1954278..ba72e86f812 100644 --- a/src/locales/it/move.json +++ b/src/locales/it/move.json @@ -3129,7 +3129,7 @@ }, "auraWheel": { "name": "Ruota d'Aura", - "effect": "Il Pokémon emette l'energia accumulata nelle guance per attaccare e aumentare la Velocità. Il tipo della mossa cambia in base alla forma assunta da Morpeko." + "effect": "Il Pokémon emette l'energia accumulata nelle guance per attaccare e aumentare la Velocità. Se usata da Morpeko, il tipo della mossa cambia in base alla forma assunta." }, "breakingSwipe": { "name": "Vastoimpatto", diff --git a/src/locales/ja/ability.json b/src/locales/ja/ability.json index c44eeb06234..c7828d89c75 100644 --- a/src/locales/ja/ability.json +++ b/src/locales/ja/ability.json @@ -1237,6 +1237,6 @@ }, "poisonPuppeteer": { "name": "どくくぐつ", - "description": "モモワロウの 技によって どく状態に なった 相手は こんらん状態にも なってしまう。" + "description": "このポケモンの 技によって どく状態に なった 相手は こんらん状態にも なってしまう。" } } diff --git a/src/locales/ja/move.json b/src/locales/ja/move.json index 2e602407902..15c63a81e36 100644 --- a/src/locales/ja/move.json +++ b/src/locales/ja/move.json @@ -3129,7 +3129,7 @@ }, "auraWheel": { "name": "オーラぐるま", - "effect": "ほほぶくろに 溜めた エネルギーで 攻撃し 自分の 素早さを あげる。 モルペコの 姿で タイプが 変わる。" + "effect": "ほほぶくろに 溜めた エネルギーで 攻撃し 自分の 素早さを あげる。 モルペコが この技を 使う場合 姿で 技の タイプが 変わる。" }, "breakingSwipe": { "name": "ワイドブレイカー", diff --git a/src/locales/ko/ability.json b/src/locales/ko/ability.json index 420d27c6011..631a6864e85 100644 --- a/src/locales/ko/ability.json +++ b/src/locales/ko/ability.json @@ -1237,6 +1237,6 @@ }, "poisonPuppeteer": { "name": "독조종", - "description": "복숭악동의 기술에 의해 독 상태가 된 상대는 혼란 상태도 되어 버린다." + "description": "이 기술에 의해 독 상태가 된 상대는 혼란 상태도 되어 버린다." } } \ No newline at end of file diff --git a/src/locales/ko/move.json b/src/locales/ko/move.json index a06bb2b3e27..5b0d6eaeaad 100644 --- a/src/locales/ko/move.json +++ b/src/locales/ko/move.json @@ -3129,7 +3129,7 @@ }, "auraWheel": { "name": "오라휠", - "effect": "볼주머니에 저장해둔 에너지로 공격하고 자신의 스피드를 올린다. 모르페코의 모습에 따라 타입이 바뀐다." + "effect": "볼주머니에 저장해둔 에너지로 공격하고 자신의 스피드를 올린다. 모르페코가 사용할 경우 모습에 따라 타입이 바뀐다." }, "breakingSwipe": { "name": "와이드브레이커", diff --git a/src/locales/pt_BR/ability.json b/src/locales/pt_BR/ability.json index c4180ff01dd..e30a7dd8c4f 100644 --- a/src/locales/pt_BR/ability.json +++ b/src/locales/pt_BR/ability.json @@ -1237,6 +1237,6 @@ }, "poisonPuppeteer": { "name": "Poison Puppeteer", - "description": "Pokémon envenenados pelos movimentos de Pecharunt também ficarão confusos." + "description": "Pokémon envenenados pelos movimentos deste Pokémon também ficarão confusos." } } diff --git a/src/locales/pt_BR/move.json b/src/locales/pt_BR/move.json index c463665f1ad..3c365a207ae 100644 --- a/src/locales/pt_BR/move.json +++ b/src/locales/pt_BR/move.json @@ -3129,7 +3129,7 @@ }, "auraWheel": { "name": "Aura Wheel", - "effect": "Morpeko ataca e aumenta sua Velocidade com a energia armazenada em suas bochechas. O tipo deste movimento muda dependendo da forma do usuário." + "effect": "O usuário ataca e aumenta sua Velocidade com a energia armazenada em suas bochechas. Se usado por Morpeko, o tipo deste movimento muda dependendo da forma do usuário." }, "breakingSwipe": { "name": "Breaking Swipe", diff --git a/src/locales/zh_CN/ability.json b/src/locales/zh_CN/ability.json index 31e3c08161d..0a81a9c6ad2 100644 --- a/src/locales/zh_CN/ability.json +++ b/src/locales/zh_CN/ability.json @@ -1237,6 +1237,6 @@ }, "poisonPuppeteer": { "name": "毒傀儡", - "description": "因桃歹郎的招式而陷入中毒状态的\n对手同时也会陷入混乱状态。" + "description": "因此宝可梦的招式而陷入中毒状态的对手\n同时也会陷入混乱状态。" } } diff --git a/src/locales/zh_CN/move.json b/src/locales/zh_CN/move.json index 5974271abb2..d20b09f02be 100644 --- a/src/locales/zh_CN/move.json +++ b/src/locales/zh_CN/move.json @@ -3129,7 +3129,7 @@ }, "auraWheel": { "name": "气场轮", - "effect": "用储存在颊囊里的能量进行攻击,\n并提高自己的速度。其属性会随着\n莫鲁贝可的样子而改变" + "effect": "用储存在颊囊里的能量进行攻击,\n并提高自己的速度。如果由莫鲁贝可使用,\n其属性会随着它的样子而改变" }, "breakingSwipe": { "name": "广域破坏", diff --git a/src/locales/zh_TW/ability.json b/src/locales/zh_TW/ability.json index 21206c5362a..5d05a6c4e73 100644 --- a/src/locales/zh_TW/ability.json +++ b/src/locales/zh_TW/ability.json @@ -1237,6 +1237,6 @@ }, "poisonPuppeteer": { "name": "毒傀儡", - "description": "因為桃歹郎的招式而陷入中\n毒狀態的對手同時也會陷入\n混亂狀態。" + "description": "因為此寶可夢的招式而陷入中毒狀態的對手\n同時也會陷入混亂狀態。" } } diff --git a/src/locales/zh_TW/move.json b/src/locales/zh_TW/move.json index b8c4ec05033..3a8956b1bf9 100644 --- a/src/locales/zh_TW/move.json +++ b/src/locales/zh_TW/move.json @@ -3129,7 +3129,7 @@ }, "auraWheel": { "name": "氣場輪", - "effect": "用儲存在頰囊裏的能量進行\n攻擊,並提高自己的速度。\n其屬性會隨着莫魯貝可的樣\n子而改變" + "effect": "用儲存在頰囊裏的能量進行\n攻擊,並提高自己的速度。\n如果由莫魯貝可使用,\n其屬性會隨着它的樣子而改變" }, "breakingSwipe": { "name": "廣域破壞", From 23b64b94b546f41d4cd7733bce98e774f4f2213c Mon Sep 17 00:00:00 2001 From: AJ Fontaine <36677462+Fontbane@users.noreply.github.com> Date: Sun, 22 Sep 2024 14:07:45 -0400 Subject: [PATCH 2/2] Function to adjust lure weights (#4354) --- src/modifier/modifier-type.ts | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/src/modifier/modifier-type.ts b/src/modifier/modifier-type.ts index ce2ffc6a462..2b4f910034b 100644 --- a/src/modifier/modifier-type.ts +++ b/src/modifier/modifier-type.ts @@ -1288,6 +1288,21 @@ function skipInClassicAfterWave(wave: integer, defaultWeight: integer): Weighted function skipInLastClassicWaveOrDefault(defaultWeight: integer) : WeightedModifierTypeWeightFunc { return skipInClassicAfterWave(199, defaultWeight); } + +/** + * High order function that returns a WeightedModifierTypeWeightFunc to ensure Lures don't spawn on Classic 199 + * or if the lure still has over 60% of its duration left + * @param maxBattles The max battles the lure type in question lasts. 10 for green, 15 for Super, 30 for Max + * @param weight The desired weight for the lure when it does spawn + * @returns A WeightedModifierTypeWeightFunc + */ +function lureWeightFunc(maxBattles: number, weight: number): WeightedModifierTypeWeightFunc { + return (party: Pokemon[]) => { + const lures = party[0].scene.getModifiers(Modifiers.DoubleBattleChanceBoosterModifier); + return !(party[0].scene.gameMode.isClassic && party[0].scene.currentBattle.waveIndex === 199) && (lures.length === 0 || lures.filter(m => m.getMaxBattles() === maxBattles && m.getBattleCount() >= maxBattles * 0.6).length === 0) ? weight : 0; + }; +} + class WeightedModifierType { public modifierType: ModifierType; public weight: integer | WeightedModifierTypeWeightFunc; @@ -1611,7 +1626,7 @@ const modifierPool: ModifierPool = { const thresholdPartyMemberCount = Math.min(party.filter(p => p.hp && p.getMoveset().filter(m => m?.ppUsed && (m.getMovePp() - m.ppUsed) <= 5 && m.ppUsed >= Math.floor(m.getMovePp() / 2)).length).length, 3); return thresholdPartyMemberCount; }, 3), - new WeightedModifierType(modifierTypes.LURE, skipInLastClassicWaveOrDefault(2)), + new WeightedModifierType(modifierTypes.LURE, lureWeightFunc(10, 2)), new WeightedModifierType(modifierTypes.TEMP_STAT_STAGE_BOOSTER, 4), new WeightedModifierType(modifierTypes.BERRY, 2), new WeightedModifierType(modifierTypes.TM_COMMON, 2), @@ -1668,7 +1683,7 @@ const modifierPool: ModifierPool = { return thresholdPartyMemberCount; }, 3), new WeightedModifierType(modifierTypes.DIRE_HIT, 4), - new WeightedModifierType(modifierTypes.SUPER_LURE, skipInLastClassicWaveOrDefault(4)), + new WeightedModifierType(modifierTypes.SUPER_LURE, lureWeightFunc(15, 4)), new WeightedModifierType(modifierTypes.NUGGET, skipInLastClassicWaveOrDefault(5)), new WeightedModifierType(modifierTypes.EVOLUTION_ITEM, (party: Pokemon[]) => { return Math.min(Math.ceil(party[0].scene.currentBattle.waveIndex / 15), 8); @@ -1691,7 +1706,7 @@ const modifierPool: ModifierPool = { }), [ModifierTier.ULTRA]: [ new WeightedModifierType(modifierTypes.ULTRA_BALL, (party: Pokemon[]) => (hasMaximumBalls(party, PokeballType.ULTRA_BALL)) ? 0 : 15, 15), - new WeightedModifierType(modifierTypes.MAX_LURE, skipInLastClassicWaveOrDefault(4)), + new WeightedModifierType(modifierTypes.MAX_LURE, lureWeightFunc(30, 4)), new WeightedModifierType(modifierTypes.BIG_NUGGET, skipInLastClassicWaveOrDefault(12)), new WeightedModifierType(modifierTypes.PP_MAX, 3), new WeightedModifierType(modifierTypes.MINT, 4),