public List <StatusEffect> GetInterventions(Level level, Agent agent) { var candidates = new List <StatusEffect>(); if (!FavorPerTeam.ContainsKey(agent.Team)) { FavorPerTeam[agent.Team] = 0; } if (FavorPerTeam[agent.Team] > 0) { candidates.AddRange(Archetype.GetGoodInterventions(this, level, agent)); foreach (var domain in Domains) { candidates.AddRange(domain.GetGoodInterventions(this, level, agent)); } } else if (FavorPerTeam[agent.Team] < 0) { candidates.AddRange(Archetype.GetBadInterventions(this, level, agent)); foreach (var domain in Domains) { candidates.AddRange(domain.GetBadInterventions(this, level, agent)); } } if (FavorPerTeam[agent.Team] > 4 && agent.StatusEffects.Count < 2 && Globals.Random.NextDouble() < ChanceOfBlessing) { var effect = MakeBlessing(level, agent); if (!agent.StatusEffects.Any(e => e.Name == effect.Name)) { candidates.Add(effect); } } if (FavorPerTeam[agent.Team] < 1 && agent.StatusEffects.Count < 3 && Globals.Random.NextDouble() < ChanceOfBlessing) { var effect = MakeCurse(level, agent); if (!agent.StatusEffects.Any(e => e.Name == effect.Name)) { candidates.Add(effect); } } return(candidates); }