Skip to content

Commit 1136c49

Browse files
authored
Merge pull request #189 from Tiagobuzzz/codex/adicionar-ia-com-perda-de-sanidade-e-arquivistas-fanáticos
2 parents 851d5b8 + f96fbc8 commit 1136c49

File tree

4 files changed

+82
-0
lines changed

4 files changed

+82
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
using System;
2+
using System.Collections.Generic;
3+
4+
namespace UltraWorldAI.Knowledge;
5+
6+
public class ArchivistFervor
7+
{
8+
public string Name = string.Empty;
9+
public string Document = string.Empty;
10+
public string Outcome = string.Empty; // "Fanático" ou "Mártir"
11+
}
12+
13+
public static class ArchivistFervorSystem
14+
{
15+
public static List<ArchivistFervor> Records { get; } = new();
16+
17+
public static void GuardDocument(string name, string document, string outcome)
18+
{
19+
Records.Add(new ArchivistFervor
20+
{
21+
Name = name,
22+
Document = document,
23+
Outcome = outcome
24+
});
25+
26+
Console.WriteLine($"\uD83D\uDD6F️ Arquivista {name} tornou-se {outcome} ao proteger '{document}'");
27+
}
28+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
using System;
2+
using System.Collections.Generic;
3+
4+
namespace UltraWorldAI.Psychology;
5+
6+
public class SanityLossRecord
7+
{
8+
public string AIName = string.Empty;
9+
public string Topic = string.Empty;
10+
public int Amount;
11+
}
12+
13+
public static class SanityLossSystem
14+
{
15+
public static List<SanityLossRecord> Records { get; } = new();
16+
17+
public static void LoseSanity(string name, string topic, int amount)
18+
{
19+
Records.Add(new SanityLossRecord
20+
{
21+
AIName = name,
22+
Topic = topic,
23+
Amount = amount
24+
});
25+
26+
Console.WriteLine($"\U0001F9EC {name} perdeu {amount} de sanidade ao descobrir '{topic}'");
27+
}
28+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
using UltraWorldAI.Knowledge;
2+
using Xunit;
3+
4+
public class ArchivistFervorSystemTests
5+
{
6+
[Fact]
7+
public void GuardDocumentAddsRecord()
8+
{
9+
ArchivistFervorSystem.Records.Clear();
10+
ArchivistFervorSystem.GuardDocument("Lena", "Pergaminho", "Mártir");
11+
Assert.Single(ArchivistFervorSystem.Records);
12+
}
13+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
using UltraWorldAI.Psychology;
2+
using Xunit;
3+
4+
public class SanityLossSystemTests
5+
{
6+
[Fact]
7+
public void LoseSanityStoresRecord()
8+
{
9+
SanityLossSystem.Records.Clear();
10+
SanityLossSystem.LoseSanity("Athena", "Segredo", 10);
11+
Assert.Single(SanityLossSystem.Records);
12+
}
13+
}

0 commit comments

Comments
 (0)