42 lines
1.8 KiB
TypeScript
42 lines
1.8 KiB
TypeScript
export const ROM_ROGUE_MAGE_CHAOS_DAGGER_SPELL_ID = 491178;
|
|
export const ROM_ROGUE_MAGE_CHAOS_DAGGER_DAMAGE_COEFFICIENT = 1.694;
|
|
export const ROM_ROGUE_MAGE_CHAOS_DAGGER_TAG = "rom-491178-chaos-dagger";
|
|
export const ROM_ROGUE_MAGE_CHAOS_DAGGER_DESCRIPTION = "Passive: Each normal attack adds Fire damage equal to 169.4% of the attacking hand's weapon DPS. The CoA page also lists 25 MP while labeling this passive, but does not say whether Mana is spent per attack; no Mana charge is modeled pending clarification. The source describes a slight temporary Physical Attack Power increase without an amount or duration, so that rider is not modeled.";
|
|
|
|
export type RomRogueChaosDaggerWeaponHand = "main-hand" | "off-hand";
|
|
|
|
export interface RomRogueChaosDaggerDamageInput {
|
|
readonly classId: string;
|
|
readonly secondaryClassId: string | null | undefined;
|
|
readonly passiveLearned: boolean;
|
|
readonly isAutoAttack: boolean;
|
|
readonly attackLanded: boolean;
|
|
readonly weaponHand: RomRogueChaosDaggerWeaponHand;
|
|
readonly weaponDps: number;
|
|
}
|
|
|
|
export interface RomRogueChaosDaggerDamage {
|
|
readonly amount: number;
|
|
readonly school: "fire";
|
|
readonly weaponHand: RomRogueChaosDaggerWeaponHand;
|
|
}
|
|
|
|
/** Current CoA Chaos Dagger adds 169.4% of the attacking hand's weapon DPS to each landed autoattack. */
|
|
export function romRogueChaosDaggerDamage(
|
|
input: RomRogueChaosDaggerDamageInput,
|
|
): RomRogueChaosDaggerDamage | null {
|
|
if (input.classId !== "rom-rogue"
|
|
|| input.secondaryClassId !== "rom-mage"
|
|
|| !input.passiveLearned
|
|
|| !input.isAutoAttack
|
|
|| !input.attackLanded
|
|
|| !Number.isFinite(input.weaponDps)
|
|
|| input.weaponDps <= 0) return null;
|
|
|
|
return {
|
|
amount: input.weaponDps * ROM_ROGUE_MAGE_CHAOS_DAGGER_DAMAGE_COEFFICIENT,
|
|
school: "fire",
|
|
weaponHand: input.weaponHand,
|
|
};
|
|
}
|