Ship the 0.8.0 first-hour and campaign milestone
Add the campaign shell, pause-safe checkpoint resume, post-shift campaign continue, confirmed campaign reset, difficulty presets, searchable Help, content-matrix validation, recovery events, contextual dialogue, policy/debrief context and eligible-event previews. Extend persistence with atomic separate files and add campaign/checkpoint/tutorial smokes. Headless 247/247, Python 94/94, tutorial/campaign/session/scenario smokes green.
This commit is contained in:
1 parent
86332cd401
commit
aa51ee331e
38 files changed
+1361
-1144
No files matched your search
@@ -71,10 +71,13 @@ func _build_fsm(initial_state: String) -> void:
|
||||
fsm.add_transition("THREATENING", "FORCING_ENTRY")
|
||||
fsm.start(initial_state)
|
||||
|
||||
func roll_reaction(level: int) -> int:
|
||||
## Weighted pick from profile's reaction table for `level`.
|
||||
func roll_reaction(level: int, compliance_bonus: float = 0.0) -> int:
|
||||
## Weighted pick from profile's reaction table for `level`. Difficulty can
|
||||
## nudge compliance without changing the authored weights.
|
||||
highest_escalation_received = maxi(highest_escalation_received, level)
|
||||
var weights: Dictionary = profile.pickup_reactions_per_level(level).duplicate()
|
||||
if compliance_bonus != 0.0:
|
||||
weights[Rules.Reaction.COMPLY] = maxf(0.0, float(weights.get(Rules.Reaction.COMPLY, 0)) + compliance_bonus * 100.0)
|
||||
var roll_value := rng.randf()
|
||||
var total := 0.0
|
||||
for key in weights.keys():
|
||||
@@ -88,9 +91,12 @@ func roll_reaction(level: int) -> int:
|
||||
return key
|
||||
return Rules.Reaction.LEAVE
|
||||
|
||||
func apply_player_action(level: int) -> Dictionary:
|
||||
func context_line(context: String) -> String:
|
||||
return profile.line_for(context, rng) if profile else ""
|
||||
|
||||
func apply_player_action(level: int, compliance_bonus: float = 0.0) -> Dictionary:
|
||||
## Returns reaction to the player's action and updates FSM when needed.
|
||||
var performed_reaction := roll_reaction(level)
|
||||
var performed_reaction := roll_reaction(level, compliance_bonus)
|
||||
reaction = performed_reaction
|
||||
reaction_set = true
|
||||
_update_state_for_reaction(performed_reaction)
|
||||
|
||||
Reference in new issue
Block a user