5e-database icon indicating copy to clipboard operation
5e-database copied to clipboard

Add number of spells cast field

Open ASTRELION opened this issue 2 years ago • 2 comments

API issue: https://github.com/5e-bits/5e-srd-api/issues/361

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 can be cast 3 times, increasing by 1 for each slot level. An example field for Magic Missile would contain the following:

"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. 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.

ASTRELION avatar Jul 25 '23 02:07 ASTRELION

It might just be those two but I think it's a solid approach.

bagelbits avatar Jul 25 '23 16:07 bagelbits

This definitely looks reasonable to me!

Just a note in case it becomes relevant, these types of attributes (damage_at_slot_level, heals_at_level...) that map a level to a value (map[int]->int) are problematic if/when it comes to generating a GraphQL schema from our MongoDB collections. Here's an old issue where it came up in the past: https://github.com/5e-bits/5e-srd-api/issues/60#issuecomment-719352129

ecshreve avatar Jul 28 '23 06:07 ecshreve