Add spellbooks and amulets

This commit is contained in:
2025-09-24 14:20:55 -05:00
parent 7e5e7aad40
commit 031aeded8f
14 changed files with 462 additions and 55 deletions

View File

@@ -37,6 +37,12 @@
if (save.Wands != null && save.Wands.Count > 0) {
this.Wands = new(save.Wands);
}
if (save.Spellbooks != null && save.Spellbooks.Count > 0) {
this.Spellbooks = new(save.Spellbooks);
}
if (save.Amulets != null && save.Amulets.Count > 0) {
this.Amulets = new(save.Amulets);
}
}
}
@@ -52,6 +58,8 @@
Rings = this.Rings?.Export() ?? [],
Scrolls = this.Scrolls?.Export() ?? [],
Wands = this.Wands?.Export() ?? [],
Spellbooks = this.Spellbooks?.Export() ?? [],
Amulets = this.Amulets?.Export() ?? [],
};
YamlOptions.SerializeToFile(fileName, save);
@@ -65,6 +73,8 @@
this.Rings = null;
this.Scrolls = null;
this.Wands = null;
this.Spellbooks = null;
this.Amulets = null;
this.Intrinsics = new();
}
@@ -76,6 +86,8 @@
public IdentificationRecord? Rings { get; set; }
public IdentificationRecord? Scrolls { get; set; }
public IdentificationRecord? Wands { get; set; }
public IdentificationRecord? Spellbooks { get; set; }
public IdentificationRecord? Amulets { get; set; }
}
public struct ItemRecord {
@@ -113,6 +125,8 @@
public List<ItemRecord> Rings { get; set; } = new();
public List<ItemRecord> Scrolls { get; set; } = new();
public List<ItemRecord> Wands { get; set; } = new();
public List<ItemRecord> Spellbooks { get; set; } = new();
public List<ItemRecord> Amulets { get; set; } = new();
}
public class Intrinsics {