add-mod-resolver
БесплатноБез исполняемых скриптовНе проверенUse when adding new push* resolver functions inside resolveModsForOffenseSkill to handle mod-based combat mechanics like tangles, debuffs, or conditional…
от aclinia★ 46 звёзд на GitHubОб этом скилле
Adding Mod Resolvers
Overview
Mod resolvers are push* functions defined inside resolveModsForOffenseSkill in src/tli/calcs/offense.ts. They read from the mods array (and optionally config, prenormMods, resourcePool, defenses) and push new derived mods based on game mechanics. Each resolver handles one mechanic (e.g., frostbite, numbed, tangles, infiltrations).
When to Use
- Adding a new combat mechanic that derives mods from existing mods or configuration
- Adding conditional damage bonuses based on presence of a flag mod (e.g.,
IsTangle,WindStalker) - Adding enemy debuff calculations (e.g., numbed stacks, frostbite, frail)
- Adding buff/aura effect calculations with effect multipliers
Project File Locations
| Purpose | File Path |
|---|---|
| Resolver function location | src/tli/calcs/offense.ts (inside resolveModsForOffenseSkill) |
| Mod type definitions | src/tli/mod.ts (ModDefinitions interface) |
| Configuration interface & defaults | src/tli/core.ts (Configuration, DEFAULT_CONFIGURATION) |
| Mod helper utilities | src/tli/calcs/mod-utils.ts |
| Tests | src/tli/calcs/offense.test.ts |
Architecture
applyModFilters preprocesses all mods into four groups:
mods— non-per mods withoutcondThresholdorresolvedCond(ready to use immediately)prenormMods— all mods withoutresolvedCond(source for per-stackable normalization)condThresholdMods— non-per mods withcondThreshold(pushed back bynormalize()when threshold is met)resolvedCondMods— mods withresolvedCond(pushed back by individualpush*resolvers when condition is met)
IMPORTANT: Mods with a per field are filtered into prenormMods only — they do NOT appear in mods. The per field (from ModBase) triggers automatic per-stackable normalization via normalize(). If a mod needs custom resolver logic (e.g., applying an effect multiplier before scaling by stacks), do NOT use per on the mod type. Instead, store the scaling info in a custom field (e.g., perFervorAmt: number) so the mod stays in mods and the resolver can find it via filterMods().
resolveModsForOffenseSkill then runs a sequence of push* resolver functions that push new derived mods into mods via pm(). Each push* function is a closure that captures:
mods: Mod[]— the shared mutable array of resolved modsprenormMods— mods needing per-stackable normalizationcondThresholdMods— mods held back until their stackable threshold is evaluated bynormalize()resolvedCondMods— mods held back until their resolved condition is evaluated by apush*resolverconfig: Configuration— user-configured combat parametersresourcePool— stats, mana, blessings, etc.defenses— armor, evasion, resistances, etc.loadout: Loadout— full parsed loadout- Helper functions:
pm()(push mods),normalize()(normalize stackables),step()(dependency tracking)
The execution sequence begins with normalizeFromConfig(), which normalizes all stackables whose values come purely from config fields (e.g., level, num_enemies_nearby, enemy_numbed_stacks). This runs before pushStatNorms() and all other resolvers. Normalize calls whose values depend on mods, stats, defenses, or resourcePool remain in their respective push* functions or inline in the execution sequence.
Available Helpers
From closure (defined in resolveModsForOffenseSkill):
pm(...ms: Mod[])— shorthand formods.push(...ms)normalize(stackable, value)— normalizes per-stackable mods fromprenormModsand pushes satisfiedcondThresholdModsfor that stackablenormalizeFromConfig()— callsnormalize()for all stackables whose values come purely fromconfigfields; called once at the start of the execution sequence beforepushStatNorms()step(stepName)— registers a step for dependency tracking (only needed if other steps depend on this one)resolvedCondMods: Mod[]— mods withresolvedCond, separated out byapplyModFilters; push matching ones intomodsviapm()when the condition is metcondThresholdMods: Mod[]— non-per mods withcondThreshold, separated out byapplyModFilters; pushed back automatically bynormalize()when their stackable threshold is met
From src/tli/calcs/mod-utils.ts:
modExists(mods, "ModType")— returnsboolean, checks if any mod of that type existsfindMod(mods, "ModType")— returns first mod of type orundefinedfilterMods(mods, "ModType")— returns all mods of type asModT<T>[]sumByValue(mods)— sums.valueof all mods in arraycalcEffMult(mods, "ModType")— calculates(1 + sum_of_inc) * product_of_addnmultipliermultModValue(mod, multiplier)— returns new mod with.valuemultiplied
Implementation Checklist
1. Ensure the Trigger Mod Type Exists
Check src/tli/mod.ts under ModDefinitions. If the flag mod (e.g., IsTangle) doesn't exist, add it
Установить add-mod-resolver в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл add-mod-resolver?
Use when adding new push* resolver functions inside resolveModsForOffenseSkill to handle mod-based combat mechanics like tangles, debuffs, or conditional damage bonuses (project)
Как установить скилл add-mod-resolver?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл add-mod-resolver запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic