-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPlayerStats.cs
More file actions
63 lines (55 loc) · 1.73 KB
/
PlayerStats.cs
File metadata and controls
63 lines (55 loc) · 1.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
using System;
using System.Linq;
using FunkEngine;
using Godot;
public partial class PlayerStats : Resource
{
public int Money = 0;
public int MaxHealth = 100;
public int CurrentHealth = 100;
public int MaxComboBar = 60;
public int MaxComboMult = 25;
public int NotesToIncreaseCombo = 4;
public int RewardAmountModifier = 0;
public int Rerolls = 0;
public int Shortcuts = 0;
//Array in order of descending rarities, Legendary -> ... Common. Int odds out of 100.
public int[] RarityOdds = [1, 5, 10, 20, 100];
public Note[] CurNotes = new Note[]
{
Scribe.NoteDictionary[1].Clone(),
Scribe.NoteDictionary[1].Clone(),
Scribe.NoteDictionary[2].Clone(),
Scribe.NoteDictionary[3].Clone(),
};
public RelicTemplate[] CurRelics = Array.Empty<RelicTemplate>();
public int Attack = 1;
public void AddRelic(RelicTemplate relic)
{
foreach (RelicEffect effect in relic.Effects)
{
if (effect.GetTrigger() == BattleEffectTrigger.OnPickup)
{
effect.OnTrigger(null);
}
}
CurRelics = CurRelics.Append(relic).ToArray();
Scribe.RemoveRelicFromPool(relic);
}
public void AddNote(Note nSelection)
{
//If the note is vampire, check to see if we already have 2 of them
if (
nSelection.Name == "PlayerVampire"
&& CurNotes.Count(note => note.Name == "PlayerVampire") >= 2
)
{
SteamWhisperer.PopAchievement("vampire");
}
CurNotes = CurNotes.Append(nSelection).ToArray();
}
public void RemoveNote(Note nSelection)
{
CurNotes = CurNotes.Where(n => n != nSelection).ToArray();
}
}