11 CodexCreature codexCreature = this.creatures.TryGetValue(
id,
null);
12 if (codexCreature ==
null)
18 this.creatures[id] = codexCreature;
26 foreach (KeyValuePair<string, CodexCreature> keyValuePair
in this.creatures)
28 keyValuePair.Value.id = keyValuePair.Key;
33 public void AddCard(
string id,
int num = 1)
35 this.GetOrCreate(
id).numCard += num;
39 public bool Has(
string id)
41 return this.creatures.ContainsKey(
id);
45 public void MarkCardDrop(
string id)
47 this.GetOrCreate(
id).droppedCard =
true;
51 public bool DroppedCard(
string id)
53 return this.creatures.ContainsKey(
id) && this.creatures[id].droppedCard;
57 public void AddKill(
string id)
60 int kills = orCreate.kills;
61 orCreate.kills = kills + 1;
65 public void AddWeakspot(
string id)
68 int weakspot = orCreate.weakspot;
69 orCreate.weakspot = weakspot + 1;
73 public void AddSpawn(
string id)
76 int spawns = orCreate.spawns;
77 orCreate.spawns = spawns + 1;
81 public List<CardRow> ListKills()
83 List<CardRow> list =
new List<CardRow>();
84 foreach (KeyValuePair<string, CodexCreature> keyValuePair
in this.creatures)
86 if (keyValuePair.Value.kills > 0)
88 CardRow cardRow =
EClass.sources.cards.map.TryGetValue(keyValuePair.Key,
null);
89 if (cardRow !=
null && !cardRow.HasTag(CTAG.noRandomProduct))
100 public Dictionary<string, CodexCreature> creatures =
new Dictionary<string, CodexCreature>();