50 lines
2.2 KiB
TypeScript
50 lines
2.2 KiB
TypeScript
/** Current CoA Knight/Rogue God's Sword passive (skill 491621). */
|
|
export const ROM_COA_KNIGHT_ROGUE_GODS_SWORD_ID = 491_621;
|
|
|
|
/** CoA's passive adds 350% of offhand weapon DPS as Light damage. */
|
|
export const ROM_COA_KNIGHT_ROGUE_GODS_SWORD_OFFHAND_DPS_COEFFICIENT = 3.5;
|
|
|
|
export interface RomCoaKnightRogueGodsSwordInput {
|
|
readonly classId: string;
|
|
readonly secondaryClassId: string | null | undefined;
|
|
readonly learnedPassiveSpellIds: readonly number[];
|
|
/** True for a landed offensive physical-ability damage event. */
|
|
readonly landedOffensivePhysicalAbilityDamageEvent: boolean;
|
|
readonly offhandWeaponDps: number;
|
|
}
|
|
|
|
/**
|
|
* Return God's Sword's separate Light-damage rider for one qualifying event.
|
|
*
|
|
* Current CoA describes God's Sword (491621) as a Knight/Rogue passive whose
|
|
* offensive physical abilities inflict 350% offhand weapon DPS Light damage
|
|
* with high aggro generation. The helper models only that documented damage;
|
|
* it does not invent an aggro multiplier or decide how callers divide
|
|
* multi-hit, channel, or area actions into damage events.
|
|
*
|
|
* The explicit patch chain identifies this as the same reworked ability:
|
|
* 10.6.1 made it an active offhand-DPS physical rider, 11.1.5 changed its
|
|
* damage to 350% Light, and 12.1.0 made it passive.
|
|
*
|
|
* Sources:
|
|
* - Current CoA Knight/Rogue skill list: https://chroniclesofarcadia.com/wiki/skills/list/6-3?locale=ru
|
|
* - CoA patch 10.6.1: https://chroniclesofarcadia.com/en/patch/10-6-1-1000
|
|
* - CoA patch 11.1.5: https://chroniclesofarcadia.com/tr/patch/11-1-5-3000
|
|
* - CoA patch 12.1.0: https://chroniclesofarcadia.com/patch/12-1-0-5000
|
|
*/
|
|
export function romCoaKnightRogueGodsSwordBonusLightDamage(
|
|
input: RomCoaKnightRogueGodsSwordInput,
|
|
): number {
|
|
if (input.classId !== "rom-knight"
|
|
|| input.secondaryClassId !== "rom-rogue"
|
|
|| !input.learnedPassiveSpellIds.includes(ROM_COA_KNIGHT_ROGUE_GODS_SWORD_ID)
|
|
|| !input.landedOffensivePhysicalAbilityDamageEvent
|
|
|| !Number.isFinite(input.offhandWeaponDps)
|
|
|| input.offhandWeaponDps <= 0) {
|
|
return 0;
|
|
}
|
|
|
|
const damage = input.offhandWeaponDps * ROM_COA_KNIGHT_ROGUE_GODS_SWORD_OFFHAND_DPS_COEFFICIENT;
|
|
return Number.isFinite(damage) ? damage : 0;
|
|
}
|