Let strategic actors address human players

This commit is contained in:
Meta Vens 2026-08-23 23:44:23 +02:00
commit a81f7c7adc

View file

@ -2667,7 +2667,6 @@ pub fn strategic_activity_targets(campaign: &Campaign, subject_id: &str) -> BTre
.filter(|target| {
target.subject_id != subject_id
&& target.active_leaf
&& target.simulation_eligible
&& !source.location_ids.is_disjoint(&target.location_ids)
})
.map(|target| target.subject_id.clone()),
@ -3077,6 +3076,23 @@ pub(crate) mod tests {
);
}
#[test]
fn human_controlled_actor_remains_a_target_without_becoming_a_simulation_subject() {
let mut value = campaign(1, 1);
value
.agency_profiles
.get_mut("faction-0000")
.unwrap()
.location_ids
.insert("center".into());
assert!(!value.agency_profiles["player"].simulation_eligible);
assert!(
strategic_activity_targets(&value, "faction-0000").contains("player"),
"simulation eligibility controls who may act through a Persona cell, not who may be addressed"
);
}
#[test]
fn materialized_member_actor_has_one_exact_cell_authority() {
let mut value = campaign(0, 2);
@ -3707,6 +3723,12 @@ pub(crate) mod tests {
},
);
ensure_agency_profiles(&mut value);
assert!(
member_activity_targets(&value, "mira")
.unwrap()
.contains("player"),
"a folded named member may address the co-located human without making the human Persona-controlled"
);
value
.agency_profiles
.get_mut("refugees")