feat: complete playtest parity improvements
This commit is contained in:
@@ -61,9 +61,33 @@ func test_save_load_round_trip_preserves_full_run_state_across_multiple_floors_i
|
||||
assert_eq(game.player.cell, Vector2i(2, 2))
|
||||
assert_eq(game.player.focus, 9)
|
||||
assert_eq(game.companion.choice_id, &"moth")
|
||||
assert_eq(game.companion.name, "Donut")
|
||||
assert_eq(game.companion.species, "Chatte")
|
||||
assert_eq(game.companion.endurance, 7)
|
||||
assert_eq(game.companion.regeneration_skill, 3)
|
||||
assert_eq(game.companion.regeneration_perk_bonus, 2)
|
||||
assert_eq(game.party.members[0].id, &"recruit-one")
|
||||
assert_eq(loaded.dialogue_player.race, &"race_humain_standard")
|
||||
|
||||
func test_legacy_ascii_companion_shape_restores_identity_stats_and_behavior() -> void:
|
||||
var legacy_companion := {
|
||||
"id": "companion-1", "name": "Donut", "species": "Chatte", "behavior": "soutien",
|
||||
"x": 2, "y": 3, "hp": 7, "max_hp": 12, "attributes": {"end": 8},
|
||||
"skills": {"regeneration": 4}, "perks": {"regen_bonus": 2},
|
||||
}
|
||||
var companion = repository._companion_from_data(legacy_companion)
|
||||
|
||||
assert_not_null(companion)
|
||||
assert_eq(companion.name, "Donut")
|
||||
assert_eq(companion.species, "Chatte")
|
||||
assert_eq(companion.stance, CompanionState.Stance.DEFEND_ME)
|
||||
assert_eq(companion.actor.cell, Vector2i(2, 3))
|
||||
assert_eq(companion.actor.hit_points, 7)
|
||||
assert_eq(companion.actor.max_hit_points, 12)
|
||||
assert_eq(companion.endurance, 8)
|
||||
assert_eq(companion.regeneration_skill, 4)
|
||||
assert_eq(companion.regeneration_perk_bonus, 2)
|
||||
|
||||
func test_only_five_one_based_slots_are_available_and_missing_or_invalid_slots_are_explicit() -> void:
|
||||
assert_eq(repository.list_slots().map(func(meta: Dictionary) -> int: return int(meta.slot)), [1, 2, 3, 4, 5])
|
||||
assert_false(repository.load(1, catalog).ok)
|
||||
@@ -140,7 +164,10 @@ func _full_fixture() -> Dictionary:
|
||||
player.focus = 9
|
||||
var game := GameState.new(floor_two.map, player, floor_two.enemies)
|
||||
game.set_floor_state(floor_two)
|
||||
game.companion = CompanionState.from_choice(&"moth", Vector2i(1, 2))
|
||||
game.companion = CompanionState.from_choice(&"moth", Vector2i(1, 2), 8, "Donut", "Chatte")
|
||||
game.companion.endurance = 7
|
||||
game.companion.regeneration_skill = 3
|
||||
game.companion.regeneration_perk_bonus = 2
|
||||
game.party = PartyState.new()
|
||||
game.party.members.append(ActorState.new(&"recruit-one", Vector2i(2, 1), 8, 2, &"npc_recruit"))
|
||||
var dialogue_player := {"race": "race_humain_standard", "archetype": "mystic", "level": 2}
|
||||
|
||||
Reference in New Issue
Block a user