Add number of spells cast field
- Ngôn ngữ chính
- TypeScript
- Star
- 637
- Fork
- 189
- Merge trung bình
- 5 giờ 51 phút
- Pull request đã merge (30 ngày)
- 16
Mô tả
Database issue: https://github.com/5e-bits/5e-database/issues/541
I'd like to propose a new optional field for spells similar to `damage_at_slot_level`: `casts_at_slot_level`. `casts_at_slot_level` holds the value of how many times a specific spell is cast per usage.
For instance, [Magic Missile](https://roll20.net/compendium/dnd5e/Magic%20Missile#content) can be cast 3 times, increasing by 1 for each slot level. An example field for Magic Missile would contain the following:
```json
"casts_at_slot_level": {
"1": 3,
"2": 4,
"3": 5,
"4": 6,
"5": 7,
"6": 8,
"7": 9,
"8": 10,
"9": 11
}
```
Another spell that would contain this field would be [Eldritch Blast](https://roll20.net/compendium/dnd5e/Eldritch%20Blast#content). I'm not sure the extent of spells that would need this field.
I'm not sure if there is a spell that does this, but this may also need to add `casts_at_character_level` if casts increases by character level and not slot level.
The API changes would likely just need to add something similar to [damage for spells](https://github.com/5e-bits/5e-srd-api/blob/main/src/models/spell/types.d.ts#L4).
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Hướng nghiên cứu
The issue points to the TypeScript type definitions for spells in src/models/spell/types.d.ts. Start by examining the existing 'damage_at_slot_level' field to understand the structure. Add the new optional field 'casts_at_slot_level' (and potentially 'casts_at_character_level') to the type definition. Check the actual spell data JSON files to see where this data would be populated. A test to verify the type change may be needed.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- json, typescript
- Lĩnh vực
- api, database
- Loại issue
- Tính năng
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức phù hợp với người mới
- 65/100