Add a recharge field to features and other applicable elements
- 主要语言
- TypeScript
- 星标
- 637
- 派生
- 189
- 平均合并
- 5 小时 51 分钟
- 30 天内合并 PR
- 16
描述
Many abilities in the game can only be cast a certain amount of times until they are recharged. A few examples, not all are SRD compliant but there is no detailed info here :
* bardic-inspiration-1 : Charisma times per long rest
* font-of-inspiration : transforms the long rest in short rest for the bardic inspirations
* wand of magic missiles : 7 charges, 1d6+1 recharge per long rest
* ki : level times per short rest
* Druid Star Map: Guiding bolt : proficiency times per long rest
* Githzerai psionics : Either Shield or Detect through 1 times per long rest
It would be great to have a way to represent the amount of times a feature or one of its element can be used. For example on "ki":
```json
{
"index": "ki",
...
"resources": [ {
"name": "Ki Point",
"dependency": {
"name": "ki",
"url": "...."
},
"amount": "${level}",
"amount": "min(1, ${charisma})", // Example of a representation of something that could be parsed and evaluated
"recharge": "short-rest",
"recharge_amount": "full",
"action": "various"
}]
}
```
Having such a representation would help building automated resource management summaries, with checkboxes or textfield to activate or reduce the available amount of resource of a particular ability.
The current workaround would be to parse the "desc" field and hope we have guessed the right information.
贡献指南
这个仓库没有索引到贡献指南
调研方向
Look at the existing feature data structures in the repository, likely in a data directory. Understand how resources are currently represented. The issue suggests adding a 'resources' array with fields like name, dependency, amount, recharge, recharge_amount, and action. Start by examining a sample feature file (like for 'ki') to see the current schema. Determine where to add this new field and how to parse expressions like '${level}'. Check if there are existing tests for data validation.
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- json, typescript
- 领域
- api, data
- Issue 类型
- 功能
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 50/100