-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRules.cs
56 lines (48 loc) · 1.7 KB
/
Rules.cs
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
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace NuzlockeHelper
{
public class Rules : Command
{
public List<string> FinalRules = new();
public Rules() : base("rules")
{
/*The first core rules are always added, otherwise it's not a Nuzlocke run. */
FinalRules.Add(RulesDictionary.CoreRuleDescriptions[0]);
FinalRules.Add(RulesDictionary.CoreRuleDescriptions[1]);
}
public void AddRule(string rule)
{
FinalRules.Add(rule);
}
public override void RunCommand()
{
SManager.ScreenInfo.ResetInfo();
SManager.ScreenInfo.AddInfo("These are the rules you have chosen for this playthrough:");
SManager.ScreenInfo.AddInfo(FinalRules);
SManager.ScreenInfo.AddInfo(" ");
SManager.ScreenInfo.AddInfo("Type \"return\" to go back to the playthrough menu.");
SManager.ScreenInfo.PrintInfo();
string command = Console.ReadLine();
if (command.ToLower() == "return")
{
SManager.ScreenInfo.ResetInfo();
SManager.ScreenInfo.AddInfo(StageInfo.GetMessage(SManager.Stages.CurrentStage));
return;
}
else RunCommand();
}
/*Methods related to saving FinalRules list info. */
//public async Task SaveFinalRules(StoreData data)
//{
// await data.CheckIfNoRoutesStored(FinalRules);
//}
public async Task SaveRules(StoreData data)
{
await data.CheckIfNoRulesStored(FinalRules);
}
}
}