|
| 1 | +using System; |
| 2 | +using System.Collections.Generic; |
| 3 | +using System.Linq; |
| 4 | + |
| 5 | +namespace UltraWorldAI.Health; |
| 6 | + |
| 7 | +public class FaithBeliefDisease |
| 8 | +{ |
| 9 | + public string Name = string.Empty; |
| 10 | + public string TriggerBelief = string.Empty; |
| 11 | + public string Culture = string.Empty; |
| 12 | + public float InfectionRate; |
| 13 | + public string Symptom = string.Empty; |
| 14 | + public bool Active; |
| 15 | +} |
| 16 | + |
| 17 | +public class FaithBeliefCure |
| 18 | +{ |
| 19 | + public string Name = string.Empty; |
| 20 | + public string HealingBelief = string.Empty; |
| 21 | + public string Culture = string.Empty; |
| 22 | + public string Effect = string.Empty; |
| 23 | +} |
| 24 | + |
| 25 | +public static class FaithBasedAilmentSystem |
| 26 | +{ |
| 27 | + public static List<FaithBeliefDisease> ActiveDiseases { get; } = new(); |
| 28 | + public static List<FaithBeliefCure> ActiveCures { get; } = new(); |
| 29 | + |
| 30 | + public static void TriggerDisease(string culture, string belief, string symptom, float rate) |
| 31 | + { |
| 32 | + var disease = new FaithBeliefDisease |
| 33 | + { |
| 34 | + Name = $"Doen\u00e7a de {belief}", |
| 35 | + TriggerBelief = belief, |
| 36 | + Culture = culture, |
| 37 | + InfectionRate = rate, |
| 38 | + Symptom = symptom, |
| 39 | + Active = true |
| 40 | + }; |
| 41 | + |
| 42 | + ActiveDiseases.Add(disease); |
| 43 | + Console.WriteLine($"\uD83E\uDD9A {disease.Name} surgiu em '{culture}' (Sintoma: {symptom})"); |
| 44 | + } |
| 45 | + |
| 46 | + public static void RegisterCure(string culture, string healingBelief, string effect) |
| 47 | + { |
| 48 | + var cure = new FaithBeliefCure |
| 49 | + { |
| 50 | + Name = $"Cura de {healingBelief}", |
| 51 | + HealingBelief = healingBelief, |
| 52 | + Culture = culture, |
| 53 | + Effect = effect |
| 54 | + }; |
| 55 | + |
| 56 | + ActiveCures.Add(cure); |
| 57 | + Console.WriteLine($"\uD83D\uDC8A Cura registrada: '{cure.Name}' (Cultura: {culture} \u2192 Efeito: {effect})"); |
| 58 | + } |
| 59 | + |
| 60 | + public static void ApplyCure(string ai, string belief, string culture) |
| 61 | + { |
| 62 | + var cure = ActiveCures.FirstOrDefault(c => c.Culture == culture && c.HealingBelief == belief); |
| 63 | + if (cure != null) |
| 64 | + { |
| 65 | + Console.WriteLine($"\uD83E\uDEF8 {ai} usou a cura: {cure.Name} \u2192 {cure.Effect}"); |
| 66 | + } |
| 67 | + else |
| 68 | + { |
| 69 | + Console.WriteLine($"\u26A0\uFE0F {ai} tentou usar cura baseada em '{belief}', mas nada aconteceu."); |
| 70 | + } |
| 71 | + } |
| 72 | +} |
0 commit comments