Hypergiant stars — markedDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/tutosrive/Constellations/llms.txt
Use this file to discover all available pages before exploring further.
"hypergiant": true in the constellation JSON and rendered in gold — trigger a unique event when the donkey arrives. Unlike ordinary stars, hypergiants offer the donkey an opportunity to teleport to any reachable star in the graph, instantly recalculating the remaining route from that new position. This makes them powerful tactical waypoints, especially in long-path strategies where the donkey’s resources may already be under pressure.
Identifying Hypergiant Stars
To mark a star as hypergiant, set the boolean field on its object in the JSON file:_process_star_activities(), the controller checks:
"hypergiant": true flag.
The Hypergiant Event
When the donkey arrives at a hypergiant star, the following sequence runs inside_process_star_activities() and _hypergiant_decision():
Arrival dialog
The donkey arrives at the hypergiant star. Travel and status-bar updates have already completed. A
DialogComponent appears with the prompt:Player chooses NO
If the player clicks NO (The donkey continues along the original path from the next index, with no bonus and no teleport.
dialog_closed_status = False), _hypergiant_decision() calls:Player chooses YES — destination input dialog
If the player clicks YES (The player types a star label into the
dialog_closed_status = True), _hypergiant_decision() immediately opens a second DialogComponent with require_input=True:UIInputText field and clicks the OK button.Resource bonus applied
After the destination dialog is shown, Energy is boosted by 50%, capped at 100. Grass is doubled with no cap. Status bars refresh immediately.
_hypergiant_travel() is called to apply the resource bonus:Input retrieval and validation
When the dialog closes,
_choose_new_destination() reads the typed label from view.last_dialog_input and converts it to uppercase. If the value is empty or the label does not exist in graph.vertex_list, an error dialog is shown and teleportation is cancelled.Resource Bonus
The full bonus code from_hypergiant_travel() is:
_update_status_bars() immediately after the bonus is applied. Note that in _hypergiant_decision(), the destination input dialog is opened first and then _hypergiant_travel() is called — so the resource boost takes effect while the destination dialog is still on screen.
Path Recalculation
After teleporting, the new route is computed withget_shortest_path_avoiding(), which accepts a forbidden set of already-visited star labels:
self.visited_stars is a Python set that grows with every star the donkey arrives at during the current run (visited_stars.add(star_label) in _handle_movement()). Passing it as forbidden tells the path-finding algorithm to exclude those vertices from the subgraph entirely, so the donkey never backtracks through a star it has already visited after a teleport.
The destination input dialog is a
DialogComponent instantiated with require_input=True. This causes a UIInputText widget to be added to the dialog layout. When the dialog closes, the component reads UIInputText.text and assigns it to view.last_dialog_input via setattr. The controller then reads it back with getattr(self.view, "last_dialog_input", None).