diff --git a/app/features/build-analyzer/analyzer-constants.ts b/app/features/build-analyzer/analyzer-constants.ts index e473e5c3f..75b749725 100644 --- a/app/features/build-analyzer/analyzer-constants.ts +++ b/app/features/build-analyzer/analyzer-constants.ts @@ -34,6 +34,10 @@ export const DAMAGE_TYPE = [ "SPECIAL_THROW_DIRECT", "SPECIAL_THROW", "SPECIAL_SWING", + "SPECIAL_CANNON", + "SPECIAL_BULLET_MAX", + "SPECIAL_BULLET_MIN", + "SPECIAL_BUMP", ] as const; export const damageTypeToWeaponType: Record< @@ -70,6 +74,10 @@ export const damageTypeToWeaponType: Record< SPECIAL_SWING: "SPECIAL", SPECIAL_THROW: "SPECIAL", SPECIAL_THROW_DIRECT: "SPECIAL", + SPECIAL_BULLET_MIN: "SPECIAL", + SPECIAL_BULLET_MAX: "SPECIAL", + SPECIAL_CANNON: "SPECIAL", + SPECIAL_BUMP: "SPECIAL", }; export const multiShot: Partial> = { diff --git a/app/features/build-analyzer/analyzer-types.ts b/app/features/build-analyzer/analyzer-types.ts index 7f9b0e703..6f1887e10 100644 --- a/app/features/build-analyzer/analyzer-types.ts +++ b/app/features/build-analyzer/analyzer-types.ts @@ -130,6 +130,10 @@ export type SpecialWeaponParams = SpecialWeaponParamsObject[SpecialWeaponId] & { SwingDamage?: Array; ThrowDamage?: Array; ThrowDirectDamage?: number; + BulletDamageMin?: number; + BulletDamageMax?: number; + CannonDamage?: Array; + BumpDamage?: number; }; export type ParamsJson = { diff --git a/app/features/build-analyzer/core/stats.ts b/app/features/build-analyzer/core/stats.ts index 7449ea956..f6bc25f24 100644 --- a/app/features/build-analyzer/core/stats.ts +++ b/app/features/build-analyzer/core/stats.ts @@ -13,6 +13,7 @@ import { AUTO_BOMB_ID, TORPEDO_ID, ZIPCASTER_ID, + CRAB_TANK_ID, } from "~/modules/in-game-lists"; import { ANGLE_SHOOTER_ID } from "~/modules/in-game-lists"; import { INK_MINE_ID, POINT_SENSOR_ID } from "~/modules/in-game-lists"; @@ -428,6 +429,10 @@ const damageTypeToParamsKey: Record< SPECIAL_SWING: "SwingDamage", SPECIAL_THROW: "ThrowDamage", SPECIAL_THROW_DIRECT: "ThrowDirectDamage", + SPECIAL_BULLET_MAX: "BulletDamageMax", + SPECIAL_BULLET_MIN: "BulletDamageMin", + SPECIAL_CANNON: "CannonDamage", + SPECIAL_BUMP: "BumpDamage", }; function damages(args: StatFunctionInput): AnalyzedBuild["stats"]["damages"] { @@ -510,13 +515,26 @@ function specialWeaponDamages( } } - // Zipcaster direct damage + // Artifically combined damages if (args.mainWeaponParams.specialWeaponId === ZIPCASTER_ID) { result.unshift({ id: semiRandomId(), distance: 0, value: sumArray(result.map((v) => v.value)), - type: "BOMB_NORMAL", + type: result[0].type, + }); + } + if (args.mainWeaponParams.specialWeaponId === CRAB_TANK_ID) { + const cannonDamages = result.filter((d) => d.type === "SPECIAL_CANNON"); + const firstCannonDamageIdx = result.findIndex( + (d) => d.type === "SPECIAL_CANNON" + ); + + result.splice(firstCannonDamageIdx, 0, { + id: semiRandomId(), + distance: 0, + value: sumArray(cannonDamages.map((v) => v.value)), + type: "SPECIAL_CANNON", }); } diff --git a/app/features/build-analyzer/core/weapon-params.json b/app/features/build-analyzer/core/weapon-params.json index 34954a393..6017e5a05 100644 --- a/app/features/build-analyzer/core/weapon-params.json +++ b/app/features/build-analyzer/core/weapon-params.json @@ -1910,7 +1910,20 @@ "Low": 480, "Mid": 570 } - } + }, + "BulletDamageMin": 160, + "BulletDamageMax": 320, + "CannonDamage": [ + { + "Damage": 600, + "Distance": 1 + }, + { + "Damage": 300, + "Distance": 5.6 + } + ], + "BumpDamage": 400 }, "13": { "overwrites": { diff --git a/app/features/object-damage-calculator/calculator-constants.ts b/app/features/object-damage-calculator/calculator-constants.ts index 87961b10d..632d7e7f7 100644 --- a/app/features/object-damage-calculator/calculator-constants.ts +++ b/app/features/object-damage-calculator/calculator-constants.ts @@ -66,8 +66,12 @@ export const objectDamageJsonKeyPriority: Record< Charger_Light: ["MAX_CHARGE", "TAP_SHOT"], Charger_Long: ["MAX_CHARGE", "TAP_SHOT"], Charger: ["MAX_CHARGE", "TAP_SHOT"], - Chariot_Body: null, - Chariot_Cannon: null, + Chariot_Body: ["SPECIAL_BUMP"], + Chariot_Cannon: [ + "SPECIAL_BULLET_MIN", + "SPECIAL_BULLET_MAX", + "SPECIAL_CANNON", + ], Default: null, EnemyFlyingHohei_BombCore: null, GachihokoTimeUpBurst: null, diff --git a/app/features/object-damage-calculator/calculator-hooks.ts b/app/features/object-damage-calculator/calculator-hooks.ts index 263ff7d38..ab2165c0e 100644 --- a/app/features/object-damage-calculator/calculator-hooks.ts +++ b/app/features/object-damage-calculator/calculator-hooks.ts @@ -120,16 +120,20 @@ export const damageTypePriorityList = [ "SPLATANA_HORIZONTAL", "SPLASH_MIN", "SPLASH_MAX", - "SPLASH_VERTICAL_MIN", "SPLASH_VERTICAL_MAX", - "SPLASH_HORIZONTAL_MIN", + "SPLASH_VERTICAL_MIN", "SPLASH_HORIZONTAL_MAX", + "SPLASH_HORIZONTAL_MIN", "ROLL_OVER", "SPECIAL_MAX_CHARGE", "SPECIAL_MIN_CHARGE", "SPECIAL_THROW_DIRECT", "SPECIAL_THROW", "SPECIAL_SWING", + "SPECIAL_CANNON", + "SPECIAL_BULLET_MAX", + "SPECIAL_BULLET_MIN", + "SPECIAL_BUMP", ] as const; assertType< (typeof damageTypePriorityList)[number], diff --git a/public/locales/en/analyzer.json b/public/locales/en/analyzer.json index edd8ff6ec..8bdf3b8bc 100644 --- a/public/locales/en/analyzer.json +++ b/public/locales/en/analyzer.json @@ -116,6 +116,10 @@ "damage.SPECIAL_THROW_DIRECT": "Throw (Direct)", "damage.SPECIAL_THROW": "Throw", "damage.SPECIAL_SWING": "Swing", + "damage.SPECIAL_BULLET_MIN": "Bullet (Minimum)", + "damage.SPECIAL_BULLET_MAX": "Bullet (Maximum)", + "damage.SPECIAL_CANNON": "Cannon", + "damage.SPECIAL_BUMP": "Bump", "suffix.seconds": "s", "suffix.hp": "hp", "suffix.specialPointsShort": "p", diff --git a/scripts/create-analyzer-json.ts b/scripts/create-analyzer-json.ts index 687708213..df3914b98 100644 --- a/scripts/create-analyzer-json.ts +++ b/scripts/create-analyzer-json.ts @@ -461,6 +461,8 @@ function parametersToSpecialWeaponResult(params: any) { } const isUltraStamp = () => !!params["SwingBigBlastParam"]; + const isCrabTank = () => !!params["CannonParam"]; + const SwingDamage = () => { if (!isUltraStamp()) return; @@ -476,6 +478,18 @@ function parametersToSpecialWeaponResult(params: any) { return params["ThrowBlastParam"]["DistanceDamage"]; }; + const Cannon = () => { + if (!isCrabTank()) return; + + return [ + { + Damage: 600, + Distance: 1, + }, + ...params["CannonParam"]?.["BlastParam"]?.["DistanceDamage"], + ]; + }; + return { ArmorHP: params["WeaponSpChariotParam"]?.["ArmorHP"], overwrites: resultUnwrapped, @@ -500,6 +514,10 @@ function parametersToSpecialWeaponResult(params: any) { SwingDamage: SwingDamage(), ThrowDamage: ThrowDamage(), ThrowDirectDamage: params["ThrowMoveParam"]?.["DirectDamageValue"], + BulletDamageMin: params["ShooterDamageParam"]?.["ValueMin"], + BulletDamageMax: params["ShooterDamageParam"]?.["ValueMax"], + CannonDamage: Cannon(), + BumpDamage: isCrabTank() ? 400 : undefined, }; }