feat: complete playtest parity improvements

This commit is contained in:
goose
2026-10-08 19:06:19 -04:00
parent cce25a1908
commit eca098b4b9
139 changed files with 3001 additions and 982 deletions
+21
View File
@@ -0,0 +1,21 @@
extends GutTest
const ActorStateType = preload("res://scripts/domain/actor_state.gd")
const HealthRegenerationType = preload("res://scripts/domain/combat/health_regeneration.gd")
func test_amount_matches_ascii_endurance_skill_perk_and_difficulty_rules() -> void:
assert_eq(HealthRegenerationType.amount(8, 1, 0, &"crawler"), 2)
assert_eq(HealthRegenerationType.amount(8, 7, 0, &"crawler"), 3)
assert_eq(HealthRegenerationType.amount(8, 1, 1, &"touriste"), 4)
assert_eq(HealthRegenerationType.amount(8, 1, 0, &"veteran"), 1)
assert_eq(HealthRegenerationType.amount(8, 1, 0, &"masochiste"), 1)
func test_apply_caps_at_maximum_and_never_revives_a_dead_actor() -> void:
var actor := ActorStateType.new(&"player", Vector2i.ZERO, 12, 3)
actor.hit_points = 11
assert_eq(HealthRegenerationType.apply(actor, 8, 1, 0, &"crawler"), 1)
assert_eq(actor.hit_points, 12)
actor.hit_points = 0
assert_eq(HealthRegenerationType.apply(actor, 8, 1, 0, &"crawler"), 0)
assert_eq(actor.hit_points, 0)