Kelsidavis-WoWee/tools/editor/cli_creature_resists_catalog.hpp

13 lines
244 B
C++
Raw Normal View History

feat(editor): add WCRE (Creature Resistance & Immunity) — 106th open format Novel replacement for the per-creature resistance columns that vanilla WoW buried inside creature_template (resistance1..6 fields) plus the SpellSchoolMask immunity and mechanic_immune_mask columns. Each entry is one creature's full defensive profile: 6 magic-school resist values (int16, with 32767 as the full-immunity sentinel), a physical-resistance percentage (0..75 game-engine cap), plus three immunity bitmasks (CC kinds, spell mechanics, magic schools). The CC-immunity mask uses 14 named bits: ImmuneRoot / Snare / Stun / Fear / Sleep / Silence / Charm / Disarm / Polymorph / Banish / Knockback / Interrupt / Taunt / Bleed. The info display renders the mask as a "+"-joined token list ("root+stun+fear") for readability; "all" for 0xFFFF (typical raid-boss CC profile) and "none" for 0. Three preset emitters: makeRaidBosses (5 canonical raid bosses with iconic single-school immunities — Ragnaros fire / Vael 50%-all / Hakkar arcane / Kel'Thuzad shadow / Onyxia fire+frost partial), makeElites (5 mid-tier elites with single-school resists), makeImmunities (4 selective CC-immunity test cases — root-immune treant, stun-immune worg, silence-immune acolyte, fear+charm+ poly-immune undead). Validator's most novel check is creatureEntry uniqueness — multiple WCRE entries binding the same creature would make the damage-calc lookup ambiguous (which profile applies?). Also catches negative resists < -100 (extreme >2x damage taken), physicalResistPct > 75 (clamped at runtime to game-engine armor cap), and reserved bits in schoolImmunityMask (only bits 0-5 are meaningful). Format count 105 -> 106. CLI flag count 1162 -> 1167.
2026-05-10 01:40:39 -07:00
#pragma once
namespace wowee {
namespace editor {
namespace cli {
bool handleCreatureResistsCatalog(int& i, int argc, char** argv,
int& outRc);
} // namespace cli
} // namespace editor
} // namespace wowee