Document D&D spell normalization behavior
This commit is contained in:
99
internal/modules/dnd/normalize/spells/testdata/normalizer_accepted_cases.json
vendored
Normal file
99
internal/modules/dnd/normalize/spells/testdata/normalizer_accepted_cases.json
vendored
Normal file
@@ -0,0 +1,99 @@
|
||||
{
|
||||
"cases": [
|
||||
{
|
||||
"name": "canonicalizes references and collapses exact duplicate",
|
||||
"input": {
|
||||
"spell_casts": [
|
||||
{
|
||||
"caster": " Aria ",
|
||||
"spell": " cure wounds ",
|
||||
"effect": "first effect",
|
||||
"narrative_description": "first narrative",
|
||||
"source_refs": [
|
||||
{"source_id": "source", "start_unit_id": 2, "end_unit_id": 2},
|
||||
{"source_id": "source", "start_unit_id": 1, "end_unit_id": 1},
|
||||
{"source_id": "source", "start_unit_id": 1, "end_unit_id": 1}
|
||||
]
|
||||
},
|
||||
{
|
||||
"caster": "aria",
|
||||
"spell": "Cure Wounds",
|
||||
"effect": "duplicate effect",
|
||||
"narrative_description": "duplicate narrative",
|
||||
"source_refs": [
|
||||
{"source_id": "source", "start_unit_id": 1, "end_unit_id": 1},
|
||||
{"source_id": "source", "start_unit_id": 2, "end_unit_id": 2}
|
||||
]
|
||||
},
|
||||
{
|
||||
"caster": "aria",
|
||||
"spell": "Cure Wounds",
|
||||
"effect": "distinct effect",
|
||||
"narrative_description": "distinct narrative",
|
||||
"source_refs": [
|
||||
{"source_id": "source", "start_unit_id": 2, "end_unit_id": 2}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"output": {
|
||||
"spell_casts": [
|
||||
{
|
||||
"caster": " Aria ",
|
||||
"spell": "Cure Wounds",
|
||||
"effect": "first effect",
|
||||
"narrative_description": "first narrative",
|
||||
"source_refs": [
|
||||
{"source_id": "source", "start_unit_id": 1, "end_unit_id": 1},
|
||||
{"source_id": "source", "start_unit_id": 2, "end_unit_id": 2}
|
||||
]
|
||||
},
|
||||
{
|
||||
"caster": "aria",
|
||||
"spell": "Cure Wounds",
|
||||
"effect": "distinct effect",
|
||||
"narrative_description": "distinct narrative",
|
||||
"source_refs": [
|
||||
{"source_id": "source", "start_unit_id": 2, "end_unit_id": 2}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"warning_reason_codes": [
|
||||
"spell_name_canonicalized",
|
||||
"source_references_normalized",
|
||||
"duplicate_spell_cast_collapsed"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "leaves already normalized output unchanged",
|
||||
"input": {
|
||||
"spell_casts": [
|
||||
{
|
||||
"caster": "Aria",
|
||||
"spell": "Cure Wounds",
|
||||
"effect": "heals an ally",
|
||||
"narrative_description": "Aria restores an ally's wounds.",
|
||||
"source_refs": [
|
||||
{"source_id": "source", "start_unit_id": 1, "end_unit_id": 1}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"output": {
|
||||
"spell_casts": [
|
||||
{
|
||||
"caster": "Aria",
|
||||
"spell": "Cure Wounds",
|
||||
"effect": "heals an ally",
|
||||
"narrative_description": "Aria restores an ally's wounds.",
|
||||
"source_refs": [
|
||||
{"source_id": "source", "start_unit_id": 1, "end_unit_id": 1}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"warning_reason_codes": []
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user