forked from phenom/healer-man
Release Healer Man 0.1.6
This commit is contained in:
1 parent
55cfd43d66
commit
b12fb84859
96 files changed
+10874
-609
No files matched your search
@@ -63,6 +63,7 @@ export interface RomSourceComponent {
|
||||
};
|
||||
readonly attack?: {
|
||||
readonly type: number;
|
||||
readonly calculationType?: number;
|
||||
readonly damagePower: number;
|
||||
readonly damagePowerSkillLevelArg: number;
|
||||
readonly fixedValue: number;
|
||||
@@ -121,6 +122,7 @@ export type RomAbilitySemantic =
|
||||
readonly fixedValue: number;
|
||||
readonly fixedType: number;
|
||||
readonly fixedPerSkillLevel: number;
|
||||
readonly calculationType: number | null;
|
||||
readonly percentMaxHealth?: number;
|
||||
})
|
||||
| (RomSemanticBase & {
|
||||
@@ -170,6 +172,7 @@ export type RomAbilitySemantic =
|
||||
readonly operation: "restore" | "drain" | "modify";
|
||||
readonly amount: number;
|
||||
readonly intervalSeconds: number | null;
|
||||
readonly durationSeconds?: number;
|
||||
readonly percentage?: boolean;
|
||||
})
|
||||
| (RomSemanticBase & {
|
||||
@@ -225,9 +228,9 @@ const MODIFIER_NAMES: Readonly<Record<number, string>> = Object.freeze({
|
||||
15: "magical-attack",
|
||||
16: "physical-hit",
|
||||
17: "dodge",
|
||||
18: "physical-critical-rate",
|
||||
18: "physical-critical-strike",
|
||||
19: "physical-critical-power",
|
||||
20: "magical-critical-rate",
|
||||
20: "magical-critical-strike",
|
||||
21: "magical-critical-power",
|
||||
22: "parry",
|
||||
23: "attack-speed",
|
||||
@@ -240,6 +243,66 @@ const MODIFIER_NAMES: Readonly<Record<number, string>> = Object.freeze({
|
||||
30: "wind-resistance",
|
||||
31: "light-resistance",
|
||||
32: "dark-resistance",
|
||||
33: "mana-cost",
|
||||
37: "off-hand-damage",
|
||||
44: "all-magic-damage",
|
||||
45: "earth-damage",
|
||||
46: "water-damage",
|
||||
47: "fire-damage",
|
||||
48: "wind-damage",
|
||||
49: "light-damage",
|
||||
50: "dark-damage",
|
||||
51: "spell-speed",
|
||||
52: "ranged-damage",
|
||||
56: "melee-damage",
|
||||
68: "ranged-attack-speed",
|
||||
72: "melee-attack-speed",
|
||||
134: "physical-attack-percent",
|
||||
135: "physical-defense-percent",
|
||||
138: "threat-percent",
|
||||
139: "rage-regeneration-percent",
|
||||
140: "focus-regeneration-percent",
|
||||
141: "energy-regeneration-percent",
|
||||
142: "magic-damage-absorption-percent",
|
||||
143: "physical-damage-absorption-percent",
|
||||
144: "healing-absorption-percent",
|
||||
148: "magical-damage-points",
|
||||
149: "healing-power-percent",
|
||||
150: "healing-points",
|
||||
161: "strength-percent",
|
||||
162: "stamina-percent",
|
||||
163: "intellect-percent",
|
||||
164: "wisdom-percent",
|
||||
165: "dexterity-percent",
|
||||
166: "all-primary-attributes-percent",
|
||||
167: "maximum-health-percent",
|
||||
168: "maximum-mana-percent",
|
||||
170: "magical-defense-percent",
|
||||
171: "magical-attack-percent",
|
||||
173: "weapon-damage-percent",
|
||||
191: "magical-damage",
|
||||
192: "magical-damage-percent",
|
||||
195: "magical-hit",
|
||||
197: "physical-hit-percent",
|
||||
198: "physical-dodge-percent",
|
||||
199: "magical-hit-percent",
|
||||
204: "player-damage-percent",
|
||||
205: "npc-damage-percent",
|
||||
206: "player-damage-taken-percent",
|
||||
207: "npc-damage-taken-percent",
|
||||
208: "area-magic-damage-percent",
|
||||
209: "area-magic-damage-taken-percent",
|
||||
214: "rage-cost-percent",
|
||||
215: "energy-cost-percent",
|
||||
216: "focus-cost-percent",
|
||||
220: "all-resistance-percent",
|
||||
221: "earth-resistance-percent",
|
||||
222: "water-resistance-percent",
|
||||
223: "fire-resistance-percent",
|
||||
224: "wind-resistance-percent",
|
||||
225: "light-resistance-percent",
|
||||
226: "dark-resistance-percent",
|
||||
227: "parry-percent",
|
||||
});
|
||||
|
||||
const MAGIC_SCHOOLS = ["earth", "water", "fire", "wind", "light", "dark"] as const;
|
||||
@@ -481,6 +544,7 @@ function componentSemantics(component: RomSourceComponent, target: RomAbilityTar
|
||||
operation: dot.base > 0 ? "restore" : "drain",
|
||||
amount: Math.abs(dot.base),
|
||||
intervalSeconds: dot.timeSeconds,
|
||||
durationSeconds: positiveDuration(component),
|
||||
...componentSource(component),
|
||||
}, String(component.id));
|
||||
}
|
||||
@@ -498,6 +562,8 @@ function componentSemantics(component: RomSourceComponent, target: RomAbilityTar
|
||||
fixedValue: Math.abs(attack.fixedValue),
|
||||
fixedType: attack.fixedType,
|
||||
fixedPerSkillLevel: Math.abs(attack.fixedDamageSkillLevelArg),
|
||||
calculationType: attack.calculationType ?? null,
|
||||
...(healing && attack.calculationType === 8 ? { percentMaxHealth: Math.abs(attack.damagePower) / 100 } : {}),
|
||||
...componentSource(component),
|
||||
}, String(component.id));
|
||||
} else {
|
||||
@@ -712,7 +778,7 @@ function tooltipSemantics(ability: RomGeneratedAbilityLike, rows: RomAbilitySema
|
||||
});
|
||||
}
|
||||
if (/(?:deals?|inflicts?|causes?)\b[^.]*\b(?:physical|magical|earth|water|fire|wind|light|dark)?\s*damage/.test(lower) && !hasKind(rows, "damage")) {
|
||||
rows.push({ kind: "damage", school: "tooltip-defined", power: 0, powerPerSkillLevel: 0, fixedValue: 0, fixedType: 0, fixedPerSkillLevel: 0, ...tooltipSource() });
|
||||
rows.push({ kind: "damage", school: "tooltip-defined", power: 0, powerPerSkillLevel: 0, fixedValue: 0, fixedType: 0, fixedPerSkillLevel: 0, calculationType: null, ...tooltipSource() });
|
||||
}
|
||||
if (/(?:heals?|restores?|recovers?)\b[^.]*\b(?:hp|health)/.test(lower) && !hasKind(rows, "heal") && !hasKind(rows, "hot")) {
|
||||
const percentMaxHealth = firstNumber(lower, /(\d+(?:\.\d+)?)%[^.]*?(?:hp|health)/);
|
||||
@@ -724,6 +790,7 @@ function tooltipSemantics(ability: RomGeneratedAbilityLike, rows: RomAbilitySema
|
||||
fixedValue: 0,
|
||||
fixedType: 0,
|
||||
fixedPerSkillLevel: 0,
|
||||
calculationType: null,
|
||||
...(percentMaxHealth === null ? {} : { percentMaxHealth: percentMaxHealth / 100 }),
|
||||
...tooltipSource(),
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user