mh3-data
Version:
Monster Hunter Tri data for monsters, quests, and weapons
90 lines (89 loc) • 4.24 kB
TypeScript
import type { MonsterLevelTypes } from '../../model/monster-levels';
import type { MonsterTypes } from '../../model/monsters';
import { Sharpness, type WeaponTypes } from '../../model/weapons';
import type { DamageBuffArgs } from '../types';
/**
* @returns true if weapon has the provided sharpness level, otherwise throws error
* @throws Error if weapon does not have provided sharpness level
*/
export declare function validateWeaponSharpness(weapon: WeaponTypes.Weapon, sharpness: Sharpness): true;
/**
* @returns sharpness multiplier for RAW damage (as opposed to ELEMENTAL)
*/
export declare function getSharpnessRawMultiplier(sharpness: Sharpness): number;
/**
* @returns sharpness multiplier for ELEMENTAL damage (as opposed to RAW)
*/
export declare function getSharpnessElementalMultiplier(sharpness: Sharpness): number;
/**
* Get additional attack buffs multiplied against the weapon's class modifier.
*
* Taken from Lord Grahf's [Monster Hunter Tri Damage Formula FAQ](https://gamefaqs.gamespot.com/wii/943655-monster-hunter-tri/faqs/59207)
* - Section 9a. Attack Up Multipliers (ATKUP)
*
* Items and armor skills can affect attack stats. Multipliers are broken into different sub-categories
* which can stack amongst each other. Each category has a multiplier which is applied to the weapon's class modifier.
*/
export declare function getWeaponClassMultiplier(weaponClassArgs?: DamageBuffArgs['weaponClassArgs']): number;
/**
* Get additional attack buffs multiplied against the weapon's raw
*
* - Critical hits recieve a 1.25 bonus (0.75 for negative critical)
*
* - Felyne Heroics recieves a 1.35 bonus
* - Adrenaline+2 recieves a 1.30 bonus
* - Does not stack with heroics (and vice versa)
*
* - Fortify recieves a 10% bonus per faint
*/
export declare function getRawMultiplier(rawArgs?: DamageBuffArgs['rawArgs']): number;
/**
* Handles decimal logic when applying the defense multiplier.
* The damage decimal is always dropped before being put against a defense multiplier.
* The result then has its decimal dropped again.
*/
export declare function applyDefenseMultiplier(damage: number, defenseMultiplier: MonsterLevelTypes.MonsterLevelMultipliers['defense']): number;
interface ElementalDamageArgs {
readonly weapon: WeaponTypes.Weapon;
/** Current sharpness of weapon */
readonly sharpness: Sharpness;
/** Derived from Monster hitzone */
readonly hitzoneValues: MonsterTypes.HitzoneValues;
readonly elementArgs?: DamageBuffArgs['elementArgs'];
}
/**
* This should be used for calculating elemental damage as part of the overall damage formula.
*
* @see {@link calculateIsolatedElementalDamage} for calculating elemental damage standalone.
*
* Taken from Lord Grahf's [Monster Hunter Tri Damage Formula FAQ](https://gamefaqs.gamespot.com/wii/943655-monster-hunter-tri/faqs/59207)
* - Section 1c. Elemental Damage Formula (EFMLA)
*
* [ELEMENT x ESHARP x ELMZONE] / [DIVIDER] = Elemental Damage
*
* @param weapon
* @param sharpness
* @param hitzoneValues
* @param elementArgs Optional, default all `false`
*
* @example
* [ELEMENT]: 250 // (250 thunder element)
* [ESHARP]: 1.0 // (Green sharpness for elements, x 1.0)
* [ELMZONE]: .20 // (Rathian's weakness to thunder at head is 20)
* [DIVIDER]: 10 // (Elemental Divider is always 10)
* [DEFENSE]: .75 // (.75 online high rank defense from earlier)
*
* [ELEMENT x ESHARP x ELMZONE] / [DIVIDER] = Elemental Damage [X DEFENSE]
* 250 x 1.0 x .20 / 10 = 5 (Added Thunder Damage)
*/
export declare function calculateElementalDamage({ weapon, sharpness, hitzoneValues, elementArgs }: ElementalDamageArgs): number;
/**
* Use this for calculation elemental damage in isolation, meaning it's assumed the result
* will not be used as part of an overall damage calculation that includes raw.
*
* @see {@link calculateElementalDamage} for calculating elemental damage as part of the overall damage
*/
export declare function calculateIsolatedElementalDamage({ weapon, sharpness, hitzoneValues, elementArgs, defenseMultiplier }: ElementalDamageArgs & {
defenseMultiplier: MonsterLevelTypes.MonsterLevelMultipliers['defense'];
}): number;
export {};