From 0431895ad93a9cb23cf8687eca26e694a599c98f Mon Sep 17 00:00:00 2001 From: August Johnson Date: Sat, 23 Nov 2024 10:40:00 -0600 Subject: [PATCH] Tests --- ...est_creature_ancient_example.approved.json | 69 +++++- ...test_creature_goblin_example.approved.json | 46 +++- ....test_creature_guard_example.approved.json | 43 +++- ...cts.test_creatureset_example.approved.json | 207 +++++++++++++++++- 4 files changed, 350 insertions(+), 15 deletions(-) diff --git a/api_v2/tests/responses/TestObjects.test_creature_ancient_example.approved.json b/api_v2/tests/responses/TestObjects.test_creature_ancient_example.approved.json index 41392aaf..d5df3cac 100644 --- a/api_v2/tests/responses/TestObjects.test_creature_ancient_example.approved.json +++ b/api_v2/tests/responses/TestObjects.test_creature_ancient_example.approved.json @@ -10,7 +10,28 @@ "actions": [ { "action_type": "ACTION", - "attacks": [], + "attacks": [ + { + "attack_type": "WEAPON", + "damage_bonus": null, + "damage_die_count": 2, + "damage_die_type": "D10", + "damage_type": "thunder", + "distance_unit": "feet", + "extra_damage_bonus": null, + "extra_damage_die_count": null, + "extra_damage_die_type": null, + "extra_damage_type": "thunder", + "key": "srd_ancient-red-dragon_bite_bite-attack", + "long_range": null, + "name": "Bite attack", + "parent": "srd_ancient-red-dragon_bite", + "range": null, + "reach": 15.0, + "target_creature_only": false, + "to_hit_mod": 17 + } + ], "desc": "Melee Weapon Attack: +17 to hit, reach 15 ft., one target. Hit: 21 (2d10 + 10) piercing damage plus 14 (4d6) fire damage.", "form_condition": null, "key": "srd_ancient-red-dragon_bite", @@ -22,7 +43,28 @@ }, { "action_type": "ACTION", - "attacks": [], + "attacks": [ + { + "attack_type": "WEAPON", + "damage_bonus": null, + "damage_die_count": 2, + "damage_die_type": "D6", + "damage_type": "thunder", + "distance_unit": "feet", + "extra_damage_bonus": null, + "extra_damage_die_count": null, + "extra_damage_die_type": null, + "extra_damage_type": null, + "key": "srd_ancient-red-dragon_claw_claw-attack", + "long_range": null, + "name": "Claw attack", + "parent": "srd_ancient-red-dragon_claw", + "range": null, + "reach": 10.0, + "target_creature_only": false, + "to_hit_mod": 17 + } + ], "desc": "Melee Weapon Attack: +17 to hit, reach 10 ft., one target. Hit: 17 (2d6 + 10) slashing damage.", "form_condition": null, "key": "srd_ancient-red-dragon_claw", @@ -82,7 +124,28 @@ }, { "action_type": "ACTION", - "attacks": [], + "attacks": [ + { + "attack_type": "WEAPON", + "damage_bonus": null, + "damage_die_count": 2, + "damage_die_type": "D8", + "damage_type": "thunder", + "distance_unit": "feet", + "extra_damage_bonus": null, + "extra_damage_die_count": null, + "extra_damage_die_type": null, + "extra_damage_type": null, + "key": "srd_ancient-red-dragon_tail_tail-attack", + "long_range": null, + "name": "Tail attack", + "parent": "srd_ancient-red-dragon_tail", + "range": null, + "reach": 20.0, + "target_creature_only": false, + "to_hit_mod": 17 + } + ], "desc": "Melee Weapon Attack: +17 to hit, reach 20 ft., one target. Hit: 19 (2d8 + 10) bludgeoning damage.", "form_condition": null, "key": "srd_ancient-red-dragon_tail", diff --git a/api_v2/tests/responses/TestObjects.test_creature_goblin_example.approved.json b/api_v2/tests/responses/TestObjects.test_creature_goblin_example.approved.json index 26edea98..ee24abc0 100644 --- a/api_v2/tests/responses/TestObjects.test_creature_goblin_example.approved.json +++ b/api_v2/tests/responses/TestObjects.test_creature_goblin_example.approved.json @@ -10,7 +10,28 @@ "actions": [ { "action_type": "ACTION", - "attacks": [], + "attacks": [ + { + "attack_type": "WEAPON", + "damage_bonus": null, + "damage_die_count": 1, + "damage_die_type": "D6", + "damage_type": "thunder", + "distance_unit": "feet", + "extra_damage_bonus": null, + "extra_damage_die_count": null, + "extra_damage_die_type": null, + "extra_damage_type": null, + "key": "srd_goblin_scimitar_scimitar-attack", + "long_range": null, + "name": "Scimitar attack", + "parent": "srd_goblin_scimitar", + "range": null, + "reach": 5.0, + "target_creature_only": false, + "to_hit_mod": 4 + } + ], "desc": "Melee Weapon Attack: +4 to hit, reach 5 ft., one target. Hit: 5 (1d6 + 2) slashing damage.", "form_condition": null, "key": "srd_goblin_scimitar", @@ -22,7 +43,28 @@ }, { "action_type": "ACTION", - "attacks": [], + "attacks": [ + { + "attack_type": "WEAPON", + "damage_bonus": null, + "damage_die_count": 1, + "damage_die_type": "D6", + "damage_type": "thunder", + "distance_unit": "feet", + "extra_damage_bonus": null, + "extra_damage_die_count": null, + "extra_damage_die_type": null, + "extra_damage_type": null, + "key": "srd_goblin_shortbow_shortbow-attack", + "long_range": 320.0, + "name": "Shortbow attack", + "parent": "srd_goblin_shortbow", + "range": 80.0, + "reach": null, + "target_creature_only": false, + "to_hit_mod": 4 + } + ], "desc": "Ranged Weapon Attack: +4 to hit, range 80/320 ft., one target. Hit: 5 (1d6 + 2) piercing damage.", "form_condition": null, "key": "srd_goblin_shortbow", diff --git a/api_v2/tests/responses/TestObjects.test_creature_guard_example.approved.json b/api_v2/tests/responses/TestObjects.test_creature_guard_example.approved.json index 69f2b2a5..7aea5aa4 100644 --- a/api_v2/tests/responses/TestObjects.test_creature_guard_example.approved.json +++ b/api_v2/tests/responses/TestObjects.test_creature_guard_example.approved.json @@ -10,7 +10,48 @@ "actions": [ { "action_type": "ACTION", - "attacks": [], + "attacks": [ + { + "attack_type": "WEAPON", + "damage_bonus": null, + "damage_die_count": 1, + "damage_die_type": "D8", + "damage_type": "thunder", + "distance_unit": "feet", + "extra_damage_bonus": null, + "extra_damage_die_count": null, + "extra_damage_die_type": null, + "extra_damage_type": null, + "key": "srd_guard_spear_spear-melee-attack", + "long_range": 60.0, + "name": "Spear Melee attack", + "parent": "srd_guard_spear", + "range": 20.0, + "reach": 5.0, + "target_creature_only": false, + "to_hit_mod": 3 + }, + { + "attack_type": "WEAPON", + "damage_bonus": null, + "damage_die_count": 1, + "damage_die_type": "D6", + "damage_type": "thunder", + "distance_unit": "feet", + "extra_damage_bonus": null, + "extra_damage_die_count": null, + "extra_damage_die_type": null, + "extra_damage_type": null, + "key": "srd_guard_spear_spear-ranged-attack", + "long_range": 60.0, + "name": "Spear Ranged attack", + "parent": "srd_guard_spear", + "range": 20.0, + "reach": null, + "target_creature_only": false, + "to_hit_mod": 3 + } + ], "desc": "Melee or Ranged Weapon Attack: +3 to hit, reach 5 ft. or range 20/60 ft., one target. Hit: 4 (1d6 + 1) piercing damage, or 5 (1d8 + 1) piercing damage if used with two hands to make a melee attack.", "form_condition": null, "key": "srd_guard_spear", diff --git a/api_v2/tests/responses/TestObjects.test_creatureset_example.approved.json b/api_v2/tests/responses/TestObjects.test_creatureset_example.approved.json index 3932fc13..27dbf13d 100644 --- a/api_v2/tests/responses/TestObjects.test_creatureset_example.approved.json +++ b/api_v2/tests/responses/TestObjects.test_creatureset_example.approved.json @@ -12,7 +12,28 @@ "actions": [ { "action_type": "ACTION", - "attacks": [], + "attacks": [ + { + "attack_type": "WEAPON", + "damage_bonus": null, + "damage_die_count": null, + "damage_die_type": null, + "damage_type": "thunder", + "distance_unit": "feet", + "extra_damage_bonus": null, + "extra_damage_die_count": null, + "extra_damage_die_type": null, + "extra_damage_type": null, + "key": "srd_camel_bite_bite-attack", + "long_range": null, + "name": "Bite attack", + "parent": "srd_camel_bite", + "range": null, + "reach": 5.0, + "target_creature_only": false, + "to_hit_mod": 5 + } + ], "desc": "Melee Weapon Attack: +5 to hit, reach 5 ft., one target. Hit: 2 (1d4) bludgeoning damage.", "form_condition": null, "key": "srd_camel_bite", @@ -270,7 +291,28 @@ "actions": [ { "action_type": "ACTION", - "attacks": [], + "attacks": [ + { + "attack_type": "WEAPON", + "damage_bonus": null, + "damage_die_count": 2, + "damage_die_type": "D4", + "damage_type": "thunder", + "distance_unit": "feet", + "extra_damage_bonus": null, + "extra_damage_die_count": null, + "extra_damage_die_type": null, + "extra_damage_type": null, + "key": "srd_draft-horse_hooves_hooves-attack", + "long_range": null, + "name": "Hooves attack", + "parent": "srd_draft-horse_hooves", + "range": null, + "reach": 5.0, + "target_creature_only": false, + "to_hit_mod": 6 + } + ], "desc": "Melee Weapon Attack: +6 to hit, reach 5 ft., one target. Hit: 9 (2d4 + 4) bludgeoning damage.", "form_condition": null, "key": "srd_draft-horse_hooves", @@ -406,7 +448,28 @@ "actions": [ { "action_type": "ACTION", - "attacks": [], + "attacks": [ + { + "attack_type": "WEAPON", + "damage_bonus": null, + "damage_die_count": 3, + "damage_die_type": "D8", + "damage_type": "thunder", + "distance_unit": "feet", + "extra_damage_bonus": null, + "extra_damage_die_count": null, + "extra_damage_die_type": null, + "extra_damage_type": null, + "key": "srd_elephant_gore_gore-attack", + "long_range": null, + "name": "Gore attack", + "parent": "srd_elephant_gore", + "range": null, + "reach": 5.0, + "target_creature_only": false, + "to_hit_mod": 8 + } + ], "desc": "Melee Weapon Attack: +8 to hit, reach 5 ft., one target. Hit: 19 (3d8 + 6) piercing damage.", "form_condition": null, "key": "srd_elephant_gore", @@ -418,7 +481,28 @@ }, { "action_type": "ACTION", - "attacks": [], + "attacks": [ + { + "attack_type": "WEAPON", + "damage_bonus": null, + "damage_die_count": 3, + "damage_die_type": "D10", + "damage_type": "thunder", + "distance_unit": "feet", + "extra_damage_bonus": null, + "extra_damage_die_count": null, + "extra_damage_die_type": null, + "extra_damage_type": null, + "key": "srd_elephant_stomp_stomp-attack", + "long_range": null, + "name": "Stomp attack", + "parent": "srd_elephant_stomp", + "range": null, + "reach": 5.0, + "target_creature_only": true, + "to_hit_mod": 8 + } + ], "desc": "Melee Weapon Attack: +8 to hit, reach 5 ft., one prone creature. Hit: 22 (3d10 + 6) bludgeoning damage.", "form_condition": null, "key": "srd_elephant_stomp", @@ -556,7 +640,28 @@ "actions": [ { "action_type": "ACTION", - "attacks": [], + "attacks": [ + { + "attack_type": "WEAPON", + "damage_bonus": null, + "damage_die_count": 1, + "damage_die_type": "D6", + "damage_type": "thunder", + "distance_unit": "feet", + "extra_damage_bonus": null, + "extra_damage_die_count": null, + "extra_damage_die_type": null, + "extra_damage_type": null, + "key": "srd_mastiff_bite_bite-attack", + "long_range": null, + "name": "Bite attack", + "parent": "srd_mastiff_bite", + "range": null, + "reach": 5.0, + "target_creature_only": false, + "to_hit_mod": 3 + } + ], "desc": "Melee Weapon Attack: +3 to hit, reach 5 ft., one target. Hit: 4 (1d6 + 1) piercing damage. If the target is a creature, it must succeed on a DC 11 Strength saving throw or be knocked prone.", "form_condition": null, "key": "srd_mastiff_bite", @@ -694,7 +799,28 @@ "actions": [ { "action_type": "ACTION", - "attacks": [], + "attacks": [ + { + "attack_type": "WEAPON", + "damage_bonus": null, + "damage_die_count": 1, + "damage_die_type": "D4", + "damage_type": "thunder", + "distance_unit": "feet", + "extra_damage_bonus": null, + "extra_damage_die_count": null, + "extra_damage_die_type": null, + "extra_damage_type": null, + "key": "srd_mule_hooves_hooves-attack", + "long_range": null, + "name": "Hooves attack", + "parent": "srd_mule_hooves", + "range": null, + "reach": 5.0, + "target_creature_only": false, + "to_hit_mod": 2 + } + ], "desc": "Melee Weapon Attack: +2 to hit, reach 5 ft., one target. Hit: 4 (1d4 + 2) bludgeoning damage.", "form_condition": null, "key": "srd_mule_hooves", @@ -832,7 +958,28 @@ "actions": [ { "action_type": "ACTION", - "attacks": [], + "attacks": [ + { + "attack_type": "WEAPON", + "damage_bonus": null, + "damage_die_count": 2, + "damage_die_type": "D4", + "damage_type": "thunder", + "distance_unit": "feet", + "extra_damage_bonus": null, + "extra_damage_die_count": null, + "extra_damage_die_type": null, + "extra_damage_type": null, + "key": "srd_pony_hooves_hooves-attack", + "long_range": null, + "name": "Hooves attack", + "parent": "srd_pony_hooves", + "range": null, + "reach": 5.0, + "target_creature_only": false, + "to_hit_mod": 4 + } + ], "desc": "Melee Weapon Attack: +4 to hit, reach 5 ft., one target. Hit: 7 (2d4 + 2) bludgeoning damage.", "form_condition": null, "key": "srd_pony_hooves", @@ -969,7 +1116,28 @@ "actions": [ { "action_type": "ACTION", - "attacks": [], + "attacks": [ + { + "attack_type": "WEAPON", + "damage_bonus": null, + "damage_die_count": 2, + "damage_die_type": "D4", + "damage_type": "thunder", + "distance_unit": "feet", + "extra_damage_bonus": null, + "extra_damage_die_count": null, + "extra_damage_die_type": null, + "extra_damage_type": null, + "key": "srd_riding-horse_hooves_hooves-attack", + "long_range": null, + "name": "Hooves attack", + "parent": "srd_riding-horse_hooves", + "range": null, + "reach": 5.0, + "target_creature_only": false, + "to_hit_mod": 5 + } + ], "desc": "Melee Weapon Attack: +5 to hit, reach 5 ft., one target. Hit: 8 (2d4 + 3) bludgeoning damage.", "form_condition": null, "key": "srd_riding-horse_hooves", @@ -1106,7 +1274,28 @@ "actions": [ { "action_type": "ACTION", - "attacks": [], + "attacks": [ + { + "attack_type": "WEAPON", + "damage_bonus": null, + "damage_die_count": 2, + "damage_die_type": "D6", + "damage_type": "thunder", + "distance_unit": "feet", + "extra_damage_bonus": null, + "extra_damage_die_count": null, + "extra_damage_die_type": null, + "extra_damage_type": null, + "key": "srd_warhorse_hooves_hooves-attack", + "long_range": null, + "name": "Hooves attack", + "parent": "srd_warhorse_hooves", + "range": null, + "reach": 5.0, + "target_creature_only": false, + "to_hit_mod": 6 + } + ], "desc": "Melee Weapon Attack: +6 to hit, reach 5 ft., one target. Hit: 11 (2d6 + 4) bludgeoning damage.", "form_condition": null, "key": "srd_warhorse_hooves",