Take planets by killing what defends them
#211 conquest is the fight now: a planet registers the garrison its setup authors, each defender's own death counts against it, and the last one takes the world. The capture points - stand in a ring, wait out a timer, once per ring - are gone, along with the editor palette that placed them. #212 conquest opens a dialog on the surface naming the research points recovered; the award travels with the signal, after it is banked. #209 the prologue's charted sectors go with the breach, so the map the survivors keep is of where they now are - and "chart 30 sectors" is no longer complete before they have flown anywhere. #218 enemy variety is gated on the FLEET, not on wave strength: a starting fleet meets chasers only at any wave number, and each vessel past three opens one more kind. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019AJMdB7iuHuLFZM1aBu3GD
This commit is contained in:
parent
78836882af
commit
6e13b6397c
42 changed files with 540 additions and 749 deletions
|
|
@ -98,34 +98,34 @@ func _initialize() -> void:
|
|||
if int(lab_definition.conquest_research_points) != 0:
|
||||
return _fail("the research_lab planet type still grants %d point(s) of its own - the reward belongs to the authored map now" \
|
||||
% int(lab_definition.conquest_research_points))
|
||||
game_state.register_capture_points("test_lab_no_reward", 1, "research_lab")
|
||||
game_state.mark_point_captured("test_lab_no_reward", 0)
|
||||
game_state.register_planet_garrison("test_lab_no_reward", 1, "research_lab")
|
||||
game_state.mark_garrison_enemy_destroyed("test_lab_no_reward")
|
||||
if game_state.research_points != 0:
|
||||
return _fail("a lab whose map states no reward still awarded %d" % game_state.research_points)
|
||||
print("the planet type grants nothing by itself; an unpriced map awards nothing")
|
||||
|
||||
# What an authored map is worth is passed through as the override, exactly
|
||||
# as PlanetSetupHost does from the setup's research_point_reward.
|
||||
game_state.register_capture_points("test_lab_planet", 2, "research_lab", 1)
|
||||
game_state.register_planet_garrison("test_lab_planet", 2, "research_lab", 1)
|
||||
if game_state.is_planet_conquered("test_lab_planet"):
|
||||
return _fail("a lab with 2 real capture points started conquered")
|
||||
game_state.mark_point_captured("test_lab_planet", 0)
|
||||
game_state.mark_garrison_enemy_destroyed("test_lab_planet")
|
||||
if game_state.research_points != 0:
|
||||
return _fail("a research point was awarded before every point was captured")
|
||||
game_state.mark_point_captured("test_lab_planet", 1)
|
||||
game_state.mark_garrison_enemy_destroyed("test_lab_planet")
|
||||
if game_state.research_points != 1:
|
||||
return _fail("conquering a research_lab did not award the 1 point its map is worth: %d" % game_state.research_points)
|
||||
if totals_seen != [1]:
|
||||
return _fail("research_points_changed did not fire exactly once with the new total: %s" % [totals_seen])
|
||||
print("conquering a research_lab awarded exactly what its map is worth, once")
|
||||
|
||||
game_state.mark_point_captured("test_lab_planet", 0) # already captured - redundant re-mark
|
||||
game_state.mark_garrison_enemy_destroyed("test_lab_planet") # already beaten - redundant kill
|
||||
if game_state.research_points != 1:
|
||||
return _fail("re-marking an already-captured point re-awarded a research point: %d" % game_state.research_points)
|
||||
print("double-award guarded against")
|
||||
|
||||
game_state.register_capture_points("test_rocky_planet", 1, "rocky")
|
||||
game_state.mark_point_captured("test_rocky_planet", 0)
|
||||
game_state.register_planet_garrison("test_rocky_planet", 1, "rocky")
|
||||
game_state.mark_garrison_enemy_destroyed("test_rocky_planet")
|
||||
if game_state.research_points != 1:
|
||||
return _fail("conquering a non-research_lab planet awarded a research point: %d" % game_state.research_points)
|
||||
print("a non-research_lab planet's conquest never awards a point")
|
||||
|
|
|
|||
Loading…
Reference in a new issue