From daab42be503c15d019aef62e1491981bb6096dbc Mon Sep 17 00:00:00 2001 From: Kalle <38327916+Sendouc@users.noreply.github.com> Date: Mon, 19 Jun 2023 18:25:43 +0300 Subject: [PATCH] Special damages: Booyah Bomb --- app/features/build-analyzer/analyzer-constants.ts | 2 ++ app/features/build-analyzer/analyzer-types.ts | 1 + app/features/build-analyzer/core/stats.ts | 2 +- app/features/build-analyzer/core/weapon-params.json | 3 ++- .../object-damage-calculator/calculator-constants.ts | 2 +- .../object-damage-calculator/calculator-hooks.ts | 1 + public/locales/en/analyzer.json | 1 + scripts/create-analyzer-json.ts | 9 +++++++++ 8 files changed, 18 insertions(+), 3 deletions(-) diff --git a/app/features/build-analyzer/analyzer-constants.ts b/app/features/build-analyzer/analyzer-constants.ts index 7ade25462..97897682e 100644 --- a/app/features/build-analyzer/analyzer-constants.ts +++ b/app/features/build-analyzer/analyzer-constants.ts @@ -39,6 +39,7 @@ export const DAMAGE_TYPE = [ "SPECIAL_BULLET_MIN", "SPECIAL_BUMP", "SPECIAL_JUMP", + "SPECIAL_TICK", ] as const; export const damageTypeToWeaponType: Record< @@ -80,6 +81,7 @@ export const damageTypeToWeaponType: Record< SPECIAL_CANNON: "SPECIAL", SPECIAL_BUMP: "SPECIAL", SPECIAL_JUMP: "SPECIAL", + SPECIAL_TICK: "SPECIAL", }; export const multiShot: Partial> = { diff --git a/app/features/build-analyzer/analyzer-types.ts b/app/features/build-analyzer/analyzer-types.ts index 674e30e33..2ecaad229 100644 --- a/app/features/build-analyzer/analyzer-types.ts +++ b/app/features/build-analyzer/analyzer-types.ts @@ -135,6 +135,7 @@ export type SpecialWeaponParams = SpecialWeaponParamsObject[SpecialWeaponId] & { CannonDamage?: Array; BumpDamage?: number; JumpDamage?: number; + TickDamage?: number; }; export type ParamsJson = { diff --git a/app/features/build-analyzer/core/stats.ts b/app/features/build-analyzer/core/stats.ts index e976fccd7..077a3a2d4 100644 --- a/app/features/build-analyzer/core/stats.ts +++ b/app/features/build-analyzer/core/stats.ts @@ -434,6 +434,7 @@ const damageTypeToParamsKey: Record< SPECIAL_CANNON: "CannonDamage", SPECIAL_BUMP: "BumpDamage", SPECIAL_JUMP: "JumpDamage", + SPECIAL_TICK: "TickDamage", }; function damages(args: StatFunctionInput): AnalyzedBuild["stats"]["damages"] { @@ -476,7 +477,6 @@ function damages(args: StatFunctionInput): AnalyzedBuild["stats"]["damages"] { return result; } -// xxx: TODO: handle damage distance increasing e.g. inkzooka, small special power up icon next to the distance function specialWeaponDamages( args: StatFunctionInput ): AnalyzedBuild["stats"]["specialWeaponDamages"] { diff --git a/app/features/build-analyzer/core/weapon-params.json b/app/features/build-analyzer/core/weapon-params.json index ed3a48a71..73f53d21b 100644 --- a/app/features/build-analyzer/core/weapon-params.json +++ b/app/features/build-analyzer/core/weapon-params.json @@ -1779,7 +1779,8 @@ "Low": 0.002, "Mid": 0.006 } - } + }, + "TickDamage": 33 }, "7": { "overwrites": { diff --git a/app/features/object-damage-calculator/calculator-constants.ts b/app/features/object-damage-calculator/calculator-constants.ts index e2c75fb37..317ebb5af 100644 --- a/app/features/object-damage-calculator/calculator-constants.ts +++ b/app/features/object-damage-calculator/calculator-constants.ts @@ -93,7 +93,7 @@ export const objectDamageJsonKeyPriority: Record< MovePainter_Direct: null, MultiMissile_BombCore: ["BOMB_NORMAL"], MultiMissile_Bullet: null, - NiceBall: null, + NiceBall: ["SPECIAL_TICK"], ObjectEffect_Up: null, RollerCore: ["ROLL_OVER"], RollerSplash_Compact: [ diff --git a/app/features/object-damage-calculator/calculator-hooks.ts b/app/features/object-damage-calculator/calculator-hooks.ts index e95ad5bc1..b9bd8e79c 100644 --- a/app/features/object-damage-calculator/calculator-hooks.ts +++ b/app/features/object-damage-calculator/calculator-hooks.ts @@ -135,6 +135,7 @@ export const damageTypePriorityList = [ "SPECIAL_BULLET_MIN", "SPECIAL_BUMP", "SPECIAL_JUMP", + "SPECIAL_TICK", ] as const; assertType< (typeof damageTypePriorityList)[number], diff --git a/public/locales/en/analyzer.json b/public/locales/en/analyzer.json index ed16bbd62..9f8c5e0b2 100644 --- a/public/locales/en/analyzer.json +++ b/public/locales/en/analyzer.json @@ -121,6 +121,7 @@ "damage.SPECIAL_CANNON": "Cannon", "damage.SPECIAL_BUMP": "Bump", "damage.SPECIAL_JUMP": "Jump", + "damage.SPECIAL_TICK": "Tick", "suffix.seconds": "s", "suffix.hp": "hp", "suffix.specialPointsShort": "p", diff --git a/scripts/create-analyzer-json.ts b/scripts/create-analyzer-json.ts index c32ae4d5c..f3bd2e67d 100644 --- a/scripts/create-analyzer-json.ts +++ b/scripts/create-analyzer-json.ts @@ -464,6 +464,8 @@ function parametersToSpecialWeaponResult(params: any) { const isCrabTank = () => !!params["CannonParam"]; const isKraken = () => !!params["BodyParam"]?.["DamageJumpValue"]; const isInkjet = () => !!params["JetParam"]; + const isBooyahBomb = () => + params["BlastParam"]?.["$type"] === "spl__BulletSpNiceBallBlastParam"; const SwingDamage = () => { if (!isUltraStamp()) return; @@ -504,6 +506,12 @@ function parametersToSpecialWeaponResult(params: any) { return 1200; }; + const BooyahBombTickDamage = () => { + if (!isBooyahBomb()) return; + + return 33; + }; + return { ArmorHP: params["WeaponSpChariotParam"]?.["ArmorHP"], overwrites: resultUnwrapped, @@ -537,6 +545,7 @@ function parametersToSpecialWeaponResult(params: any) { CannonDamage: Cannon(), BumpDamage: isCrabTank() ? 400 : undefined, JumpDamage: params["BodyParam"]?.["DamageJumpValue"], + TickDamage: BooyahBombTickDamage(), }; }