Add weapon boost automation#22298
Conversation
|
Heyo, thanks for starting work on this. Talks of this have circulated and we kinda have an idea of what it should look like, so if you're patient, could you make these adjustments?
|
|
I've started to do suggested updates and there is an incosistency with the rules in a way how boost traits are defined. Currently, there are following traits defined in the system: I think, it makes sense to refactor the boost trait definition to make it consistent with In any case, I will process only |
@CarlosFdez
|
|
@TikaelSol what's the reason we have |
| for (const trait of weaponTraits.filter((t) => t.startsWith("boost-1d"))) { | ||
| if (!weapon.isOfType("weapon")) continue; | ||
| const dieSize = trait.substring(trait.indexOf("-") + 2) as DamageDieSize; | ||
| const isBoosted = options.has(`item:${weapon.id}:boosted`) || options.has("item:weapon:boosted"); |
There was a problem hiding this comment.
you can move this to the predicate field of the lower damage die object. [{ or: [] }] if you need both.
There was a problem hiding this comment.
Doing that will also allow a disabled boost row to exist in the damage roll as well in the same way deadly does on non-crits, allowing it to work with npcs as well if you remove the weapon check.
There was a problem hiding this comment.
I don't understand exactly. It was showing boost toggle even when there were no effect present and now after removing weapon check it works for npc as well
There was a problem hiding this comment.
No you're right, I misread. Preferable use predicate because its cleaner but not to fix any bug or anything.
|
|
||
| // Boost trait, ignore invalid boost traits | ||
| for (const trait of weaponTraits.filter((t) => t.startsWith("boost-1d"))) { | ||
| if (!weapon.isOfType("weapon")) continue; |
There was a problem hiding this comment.
This should work on npcs as well. Bo-Shek for example has 2d10 boost. You can more or less copy what deadly does for the diceNumber. While npcs don't support aux actions yet, the existance of the effect as well as the toggle in the damage roll should be handy.
There was a problem hiding this comment.
Made it work for npc and tested it. It is working as intended when the effect is applied from the compendium and user otherwise can toggle it manually. We can make checkbox in the sheet since it is controlled by roll option right now.
|
Fair point on boost being per weapon. There might be a better way to handle boost being per weapon if we want to restrict that using a choice set, but I'm not certain about it so I'll come back to you with it later!
Boost 1 looks like a holdover from playtest and we can probably remove it (depends on what tikael says). Boost-2d10 is used by an NPC (Bo-Shek). I'm thinking its like deadly where the number of dice are on the trait itself. EDIT: We may have to move boost-2d10 to npc attack traits. |
Add
boostdamage dice to the weapon damage rolls whenboost-*trait is present. By default the extra dice are disabled.If
Effect: Boostis present, the damage dice become enabled. When the effect is added via auxiliary actions buttom the effect is customized for the particular weapon.The effect lasts till the end of the next turn and doesn't clear itself after the strike.