-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathStatusEffect.cs
More file actions
35 lines (33 loc) · 947 Bytes
/
Copy pathStatusEffect.cs
File metadata and controls
35 lines (33 loc) · 947 Bytes
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
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace TTRPG_manager
{
public class StatusEffect : INameable
{
private string _name;
public string Name
{
get => _name;
set
{
_name = value;
safeName = MakeSafeName(_name);
}
}
public string safeName { get; set; }
private string MakeSafeName(string name)
{
if (string.IsNullOrEmpty(name))
return string.Empty;
// Remove all non-alphanumeric characters
return System.Text.RegularExpressions.Regex.Replace(name, "[^a-zA-Z0-9]", "");
}
public string Description { get; set; }
public bool IsBuff { get; set; }
public bool IsDebuff { get; set; }
public string Condition { get; set; }
}
}