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

@@ -5,7 +5,9 @@
public string Name { get; set; } = string.Empty; public string Name { get; set; } = string.Empty;
public int Cost { get; set; } public int Cost { get; set; }
public int Ink { get; set; } public int Ink { get; set; }
public string School { get; set; } = string.Empty;
public string? Appearance { get; set; } public string? Appearance { get; set; }
public bool UsuallyCursed { get; set; } = false;
} }
public class ItemList { public class ItemList {
@@ -13,9 +15,11 @@
} }
public enum ItemAttribute { public enum ItemAttribute {
Name, Name = 0,
Cost, Cost = 1,
Ink, Ink = 2,
Appearance, School = 4,
Appearance = 3,
UsuallyCursed = 5,
} }
} }

View File

@@ -17,7 +17,9 @@ namespace NethackHelper {
[ItemAttribute.Name] = item => item.Name, [ItemAttribute.Name] = item => item.Name,
[ItemAttribute.Cost] = item => item.Cost.ToString(), [ItemAttribute.Cost] = item => item.Cost.ToString(),
[ItemAttribute.Ink] = item => item.Ink.ToString(), [ItemAttribute.Ink] = item => item.Ink.ToString(),
[ItemAttribute.School] = item => item.School.ToString(),
[ItemAttribute.Appearance] = item => item.Appearance ?? UNIDENTIFIED, [ItemAttribute.Appearance] = item => item.Appearance ?? UNIDENTIFIED,
[ItemAttribute.UsuallyCursed] = item => item.UsuallyCursed ? "C" : string.Empty,
}; };
[Browsable(false)] [Browsable(false)]
@@ -41,7 +43,11 @@ namespace NethackHelper {
if (this.Columns != null) { if (this.Columns != null) {
this.itemListView.Columns.Clear(); this.itemListView.Columns.Clear();
foreach (var column in this.Columns) { foreach (var column in this.Columns) {
this.itemListView.Columns.Add(column.Attribute.ToString(), column.Width); var header = column.Attribute.ToString();
if (column.Attribute == ItemAttribute.UsuallyCursed) {
header = string.Empty;
}
this.itemListView.Columns.Add(header, column.Width);
} }
} }
} }

View File

@@ -28,26 +28,21 @@ namespace NethackHelper {
private void InitializeComponent() { private void InitializeComponent() {
components = new System.ComponentModel.Container(); components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm)); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
CharismaClass charismaClass8 = new CharismaClass();
CharismaClass charismaClass9 = new CharismaClass();
CharismaClass charismaClass10 = new CharismaClass();
CharismaClass charismaClass11 = new CharismaClass();
CharismaClass charismaClass12 = new CharismaClass();
CharismaClass charismaClass13 = new CharismaClass();
CharismaClass charismaClass14 = new CharismaClass();
mainTabControl = new TabControl(); mainTabControl = new TabControl();
itemsTab = new TabPage(); itemsTab = new TabPage();
suckerBox = new CheckBox(); suckerBox = new CheckBox();
saveSourceBindingSource = new BindingSource(components); saveSourceBindingSource = new BindingSource(components);
shoppingTabControl = new TabControl(); itemTabControl = new TabControl();
scrollPotionTab = new TabPage(); scrollPotionTab = new TabPage();
potionDisplay = new ItemDisplay(); potionDisplay = new ItemDisplay();
scrollDisplay = new ItemDisplay(); scrollDisplay = new ItemDisplay();
wandRingTab = new TabPage(); wandRingTab = new TabPage();
ringDisplay = new ItemDisplay(); ringDisplay = new ItemDisplay();
wandDisplay = new ItemDisplay(); wandDisplay = new ItemDisplay();
spellbookTab = new TabPage();
amuletDisplay = new ItemDisplay();
spellbookDisplay = new ItemDisplay();
charismaSelector = new ComboBox(); charismaSelector = new ComboBox();
charismaSourceBindingSource = new BindingSource(components);
intrinsicsTab = new TabPage(); intrinsicsTab = new TabPage();
label2 = new Label(); label2 = new Label();
lastPrayerPicker = new NumericUpDown(); lastPrayerPicker = new NumericUpDown();
@@ -76,21 +71,23 @@ namespace NethackHelper {
sokobanNext = new Button(); sokobanNext = new Button();
sokobanSolution = new Label(); sokobanSolution = new Label();
sokobanLevelList = new ListBox(); sokobanLevelList = new ListBox();
charismaSourceBindingSource = new BindingSource(components);
mainMenu = new MenuStrip(); mainMenu = new MenuStrip();
fileToolStripMenuItem = new ToolStripMenuItem(); fileToolStripMenuItem = new ToolStripMenuItem();
resetToolStripMenuItem = new ToolStripMenuItem(); resetToolStripMenuItem = new ToolStripMenuItem();
mainTabControl.SuspendLayout(); mainTabControl.SuspendLayout();
itemsTab.SuspendLayout(); itemsTab.SuspendLayout();
((System.ComponentModel.ISupportInitialize) saveSourceBindingSource).BeginInit(); ((System.ComponentModel.ISupportInitialize) saveSourceBindingSource).BeginInit();
shoppingTabControl.SuspendLayout(); itemTabControl.SuspendLayout();
scrollPotionTab.SuspendLayout(); scrollPotionTab.SuspendLayout();
wandRingTab.SuspendLayout(); wandRingTab.SuspendLayout();
((System.ComponentModel.ISupportInitialize) charismaSourceBindingSource).BeginInit(); spellbookTab.SuspendLayout();
intrinsicsTab.SuspendLayout(); intrinsicsTab.SuspendLayout();
((System.ComponentModel.ISupportInitialize) lastPrayerPicker).BeginInit(); ((System.ComponentModel.ISupportInitialize) lastPrayerPicker).BeginInit();
((System.ComponentModel.ISupportInitialize) intrinsicsBindingSource).BeginInit(); ((System.ComponentModel.ISupportInitialize) intrinsicsBindingSource).BeginInit();
((System.ComponentModel.ISupportInitialize) protectionPicker).BeginInit(); ((System.ComponentModel.ISupportInitialize) protectionPicker).BeginInit();
sokobanTab.SuspendLayout(); sokobanTab.SuspendLayout();
((System.ComponentModel.ISupportInitialize) charismaSourceBindingSource).BeginInit();
mainMenu.SuspendLayout(); mainMenu.SuspendLayout();
SuspendLayout(); SuspendLayout();
// //
@@ -109,7 +106,7 @@ namespace NethackHelper {
// itemsTab // itemsTab
// //
itemsTab.Controls.Add(suckerBox); itemsTab.Controls.Add(suckerBox);
itemsTab.Controls.Add(shoppingTabControl); itemsTab.Controls.Add(itemTabControl);
itemsTab.Controls.Add(charismaSelector); itemsTab.Controls.Add(charismaSelector);
itemsTab.Location = new Point(4, 24); itemsTab.Location = new Point(4, 24);
itemsTab.Name = "itemsTab"; itemsTab.Name = "itemsTab";
@@ -136,16 +133,17 @@ namespace NethackHelper {
saveSourceBindingSource.DataSource = typeof(SaveSource); saveSourceBindingSource.DataSource = typeof(SaveSource);
saveSourceBindingSource.Position = 0; saveSourceBindingSource.Position = 0;
// //
// shoppingTabControl // itemTabControl
// //
shoppingTabControl.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right; itemTabControl.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
shoppingTabControl.Controls.Add(scrollPotionTab); itemTabControl.Controls.Add(scrollPotionTab);
shoppingTabControl.Controls.Add(wandRingTab); itemTabControl.Controls.Add(wandRingTab);
shoppingTabControl.Location = new Point(6, 35); itemTabControl.Controls.Add(spellbookTab);
shoppingTabControl.Name = "shoppingTabControl"; itemTabControl.Location = new Point(6, 35);
shoppingTabControl.SelectedIndex = 0; itemTabControl.Name = "itemTabControl";
shoppingTabControl.Size = new Size(652, 555); itemTabControl.SelectedIndex = 0;
shoppingTabControl.TabIndex = 1; itemTabControl.Size = new Size(652, 555);
itemTabControl.TabIndex = 1;
// //
// scrollPotionTab // scrollPotionTab
// //
@@ -207,25 +205,46 @@ namespace NethackHelper {
wandDisplay.Size = new Size(313, 515); wandDisplay.Size = new Size(313, 515);
wandDisplay.TabIndex = 1; wandDisplay.TabIndex = 1;
// //
// spellbookTab
//
spellbookTab.Controls.Add(amuletDisplay);
spellbookTab.Controls.Add(spellbookDisplay);
spellbookTab.Location = new Point(4, 24);
spellbookTab.Name = "spellbookTab";
spellbookTab.Padding = new Padding(3);
spellbookTab.Size = new Size(644, 527);
spellbookTab.TabIndex = 3;
spellbookTab.Text = "Spellbooks / Amulets";
spellbookTab.UseVisualStyleBackColor = true;
//
// amuletDisplay
//
amuletDisplay.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Right;
amuletDisplay.Columns = (System.Collections.Generic.List<ItemDisplayColumn>) resources.GetObject("amuletDisplay.Columns");
amuletDisplay.Location = new Point(325, 6);
amuletDisplay.Name = "amuletDisplay";
amuletDisplay.Size = new Size(313, 515);
amuletDisplay.TabIndex = 1;
//
// spellbookDisplay
//
spellbookDisplay.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left;
spellbookDisplay.Columns = (System.Collections.Generic.List<ItemDisplayColumn>) resources.GetObject("spellbookDisplay.Columns");
spellbookDisplay.Location = new Point(6, 6);
spellbookDisplay.Name = "spellbookDisplay";
spellbookDisplay.Size = new Size(313, 515);
spellbookDisplay.TabIndex = 0;
//
// charismaSelector // charismaSelector
// //
charismaSelector.DataBindings.Add(new Binding("SelectedItem", saveSourceBindingSource, "CharismaClass", true)); charismaSelector.DataBindings.Add(new Binding("SelectedItem", saveSourceBindingSource, "CharismaClass", true));
charismaSelector.DataSource = charismaSourceBindingSource;
charismaSelector.DisplayMember = "DisplayName";
charismaSelector.FormattingEnabled = true; charismaSelector.FormattingEnabled = true;
charismaSelector.Items.AddRange(new object[] { charismaClass8, charismaClass9, charismaClass10, charismaClass11, charismaClass12, charismaClass13, charismaClass14 });
charismaSelector.Location = new Point(6, 6); charismaSelector.Location = new Point(6, 6);
charismaSelector.Name = "charismaSelector"; charismaSelector.Name = "charismaSelector";
charismaSelector.Size = new Size(121, 23); charismaSelector.Size = new Size(121, 23);
charismaSelector.TabIndex = 0; charismaSelector.TabIndex = 0;
charismaSelector.ValueMember = "Multiplier";
charismaSelector.SelectedIndexChanged += charismaSelector_SelectedIndexChanged; charismaSelector.SelectedIndexChanged += charismaSelector_SelectedIndexChanged;
// //
// charismaSourceBindingSource
//
charismaSourceBindingSource.DataSource = typeof(CharismaSource);
charismaSourceBindingSource.Position = 0;
//
// intrinsicsTab // intrinsicsTab
// //
intrinsicsTab.Controls.Add(label2); intrinsicsTab.Controls.Add(label2);
@@ -547,6 +566,11 @@ namespace NethackHelper {
sokobanLevelList.SelectedIndexChanged += sokobanLevelList_SelectedIndexChanged; sokobanLevelList.SelectedIndexChanged += sokobanLevelList_SelectedIndexChanged;
sokobanLevelList.KeyDown += sokobanLevelList_KeyDown; sokobanLevelList.KeyDown += sokobanLevelList_KeyDown;
// //
// charismaSourceBindingSource
//
charismaSourceBindingSource.DataSource = typeof(CharismaSource);
charismaSourceBindingSource.Position = 0;
//
// mainMenu // mainMenu
// //
mainMenu.Items.AddRange(new ToolStripItem[] { fileToolStripMenuItem }); mainMenu.Items.AddRange(new ToolStripItem[] { fileToolStripMenuItem });
@@ -589,16 +613,17 @@ namespace NethackHelper {
itemsTab.ResumeLayout(false); itemsTab.ResumeLayout(false);
itemsTab.PerformLayout(); itemsTab.PerformLayout();
((System.ComponentModel.ISupportInitialize) saveSourceBindingSource).EndInit(); ((System.ComponentModel.ISupportInitialize) saveSourceBindingSource).EndInit();
shoppingTabControl.ResumeLayout(false); itemTabControl.ResumeLayout(false);
scrollPotionTab.ResumeLayout(false); scrollPotionTab.ResumeLayout(false);
wandRingTab.ResumeLayout(false); wandRingTab.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize) charismaSourceBindingSource).EndInit(); spellbookTab.ResumeLayout(false);
intrinsicsTab.ResumeLayout(false); intrinsicsTab.ResumeLayout(false);
intrinsicsTab.PerformLayout(); intrinsicsTab.PerformLayout();
((System.ComponentModel.ISupportInitialize) lastPrayerPicker).EndInit(); ((System.ComponentModel.ISupportInitialize) lastPrayerPicker).EndInit();
((System.ComponentModel.ISupportInitialize) intrinsicsBindingSource).EndInit(); ((System.ComponentModel.ISupportInitialize) intrinsicsBindingSource).EndInit();
((System.ComponentModel.ISupportInitialize) protectionPicker).EndInit(); ((System.ComponentModel.ISupportInitialize) protectionPicker).EndInit();
sokobanTab.ResumeLayout(false); sokobanTab.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize) charismaSourceBindingSource).EndInit();
mainMenu.ResumeLayout(false); mainMenu.ResumeLayout(false);
mainMenu.PerformLayout(); mainMenu.PerformLayout();
ResumeLayout(false); ResumeLayout(false);
@@ -617,7 +642,7 @@ namespace NethackHelper {
private CheckBox sokobanHorizontal; private CheckBox sokobanHorizontal;
private TabPage itemsTab; private TabPage itemsTab;
private ComboBox charismaSelector; private ComboBox charismaSelector;
private TabControl shoppingTabControl; private TabControl itemTabControl;
private TabPage potionsTab; private TabPage potionsTab;
private TabPage scrollPotionTab; private TabPage scrollPotionTab;
private ItemDisplay scrollDisplay; private ItemDisplay scrollDisplay;
@@ -652,5 +677,8 @@ namespace NethackHelper {
private MenuStrip mainMenu; private MenuStrip mainMenu;
private ToolStripMenuItem fileToolStripMenuItem; private ToolStripMenuItem fileToolStripMenuItem;
private ToolStripMenuItem resetToolStripMenuItem; private ToolStripMenuItem resetToolStripMenuItem;
private TabPage spellbookTab;
private ItemDisplay spellbookDisplay;
private ItemDisplay amuletDisplay;
} }
} }

View File

@@ -18,6 +18,15 @@ namespace NethackHelper {
this.potionDisplay.CostFormatter = GetCostString; this.potionDisplay.CostFormatter = GetCostString;
this.wandDisplay.CostFormatter = GetCostString; this.wandDisplay.CostFormatter = GetCostString;
this.ringDisplay.CostFormatter = GetCostString; this.ringDisplay.CostFormatter = GetCostString;
this.spellbookDisplay.CostFormatter = GetCostString;
this.amuletDisplay.CostFormatter = GetCostString;
}
protected override void OnLoad(EventArgs e) {
base.OnLoad(e);
this.charismaSelector.DataSource = this.charismaSourceBindingSource;
this.charismaSelector.DisplayMember = "DisplayName";
this.charismaSelector.ValueMember = "Multiplier";
foreach (var filename in Directory.EnumerateFiles("sokoban", "*.yaml")) { foreach (var filename in Directory.EnumerateFiles("sokoban", "*.yaml")) {
var sokoban = new SokobanSolution(YamlOptions.DeserializeFile<SokobanFile>(filename)); var sokoban = new SokobanSolution(YamlOptions.DeserializeFile<SokobanFile>(filename));
@@ -65,6 +74,12 @@ namespace NethackHelper {
var rings = YamlOptions.DeserializeFile<ItemList>(Path.Join("items", version.Rings)); var rings = YamlOptions.DeserializeFile<ItemList>(Path.Join("items", version.Rings));
this.ringDisplay.DisplayItemList(rings, save.Rings); this.ringDisplay.DisplayItemList(rings, save.Rings);
var spellbooks = YamlOptions.DeserializeFile<ItemList>(Path.Join("items", version.Spellbooks));
this.spellbookDisplay.DisplayItemList(spellbooks, save.Spellbooks);
var amulets = YamlOptions.DeserializeFile<ItemList>(Path.Join("items", version.Amulets));
this.amuletDisplay.DisplayItemList(amulets, save.Amulets);
} }
private string GetCostString(int cost) { private string GetCostString(int cost) {
@@ -147,6 +162,8 @@ namespace NethackHelper {
this.potionDisplay.UpdateCostHeaders(); this.potionDisplay.UpdateCostHeaders();
this.wandDisplay.UpdateCostHeaders(); this.wandDisplay.UpdateCostHeaders();
this.ringDisplay.UpdateCostHeaders(); this.ringDisplay.UpdateCostHeaders();
this.spellbookDisplay.UpdateCostHeaders();
this.amuletDisplay.UpdateCostHeaders();
} }
private void charismaSelector_SelectedIndexChanged(object sender, EventArgs e) { private void charismaSelector_SelectedIndexChanged(object sender, EventArgs e) {
@@ -173,6 +190,8 @@ namespace NethackHelper {
save.Rings = this.ringDisplay.Export(); save.Rings = this.ringDisplay.Export();
save.Scrolls = this.scrollDisplay.Export(); save.Scrolls = this.scrollDisplay.Export();
save.Wands = this.wandDisplay.Export(); save.Wands = this.wandDisplay.Export();
save.Spellbooks = this.spellbookDisplay.Export();
save.Amulets = this.amuletDisplay.Export();
save.Save(); save.Save();
} }

View File

@@ -120,9 +120,6 @@
<metadata name="saveSourceBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="saveSourceBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>410, 17</value> <value>410, 17</value>
</metadata> </metadata>
<metadata name="saveSourceBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>410, 17</value>
</metadata>
<data name="potionDisplay.Columns" mimetype="application/x-microsoft.net.object.binary.base64"> <data name="potionDisplay.Columns" mimetype="application/x-microsoft.net.object.binary.base64">
<value> <value>
AAEAAAD/////AQAAAAAAAAAMAgAAAEROZXRoYWNrSGVscGVyLCBWZXJzaW9uPTEuMC4wLjAsIEN1bHR1 AAEAAAD/////AQAAAAAAAAAMAgAAAEROZXRoYWNrSGVscGVyLCBWZXJzaW9uPTEuMC4wLjAsIEN1bHR1
@@ -160,13 +157,14 @@
cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49bnVsbAQBAAAAeVN5c3RlbS5Db2xsZWN0aW9ucy5HZW5l cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49bnVsbAQBAAAAeVN5c3RlbS5Db2xsZWN0aW9ucy5HZW5l
cmljLkxpc3RgMVtbTmV0aGFja0hlbHBlci5JdGVtRGlzcGxheUNvbHVtbiwgTmV0aGFja0hlbHBlciwg cmljLkxpc3RgMVtbTmV0aGFja0hlbHBlci5JdGVtRGlzcGxheUNvbHVtbiwgTmV0aGFja0hlbHBlciwg
Q3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1udWxsXV0DAAAABl9pdGVtcwVfc2l6ZQhfdmVy Q3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1udWxsXV0DAAAABl9pdGVtcwVfc2l6ZQhfdmVy
c2lvbgQAACFOZXRoYWNrSGVscGVyLkl0ZW1EaXNwbGF5Q29sdW1uW10CAAAACAgJAwAAAAIAAAAIAAAA c2lvbgQAACFOZXRoYWNrSGVscGVyLkl0ZW1EaXNwbGF5Q29sdW1uW10CAAAACAgJAwAAAAMAAAAUAAAA
DAQAAAAzTmV0aGFja0hlbHBlciwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1udWxsBwMA DAQAAAAzTmV0aGFja0hlbHBlciwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1udWxsBwMA
AAAAAQAAAAQAAAAEH05ldGhhY2tIZWxwZXIuSXRlbURpc3BsYXlDb2x1bW4EAAAACQUAAAAJBgAAAA0C AAAAAQAAAAQAAAAEH05ldGhhY2tIZWxwZXIuSXRlbURpc3BsYXlDb2x1bW4EAAAACQUAAAAJBgAAAAkH
BQUAAAAfTmV0aGFja0hlbHBlci5JdGVtRGlzcGxheUNvbHVtbgIAAAAaPEF0dHJpYnV0ZT5rX19CYWNr AAAACgUFAAAAH05ldGhhY2tIZWxwZXIuSXRlbURpc3BsYXlDb2x1bW4CAAAAGjxBdHRyaWJ1dGU+a19f
aW5nRmllbGQWPFdpZHRoPmtfX0JhY2tpbmdGaWVsZAQAG05ldGhhY2tIZWxwZXIuSXRlbUF0dHJpYnV0 QmFja2luZ0ZpZWxkFjxXaWR0aD5rX19CYWNraW5nRmllbGQEABtOZXRoYWNrSGVscGVyLkl0ZW1BdHRy
ZQQAAAAIBAAAAAX5////G05ldGhhY2tIZWxwZXIuSXRlbUF0dHJpYnV0ZQEAAAAHdmFsdWVfXwAIBAAA aWJ1dGUEAAAACAQAAAAF+P///xtOZXRoYWNrSGVscGVyLkl0ZW1BdHRyaWJ1dGUBAAAAB3ZhbHVlX18A
AAAAAACQAAAAAQYAAAAFAAAAAfj////5////AwAAAJAAAAAL CAQAAAAAAAAAhgAAAAEGAAAABQAAAAH3////+P///wUAAAAUAAAAAQcAAAAFAAAAAfb////4////AwAA
AIYAAAAL
</value> </value>
</data> </data>
<data name="wandDisplay.Columns" mimetype="application/x-microsoft.net.object.binary.base64"> <data name="wandDisplay.Columns" mimetype="application/x-microsoft.net.object.binary.base64">
@@ -184,15 +182,44 @@
AAAAAACQAAAAAQYAAAAFAAAAAfj////5////AwAAAJAAAAAL AAAAAACQAAAAAQYAAAAFAAAAAfj////5////AwAAAJAAAAAL
</value> </value>
</data> </data>
<data name="amuletDisplay.Columns" mimetype="application/x-microsoft.net.object.binary.base64">
<value>
AAEAAAD/////AQAAAAAAAAAMAgAAAEROZXRoYWNrSGVscGVyLCBWZXJzaW9uPTEuMC4wLjAsIEN1bHR1
cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49bnVsbAQBAAAAeVN5c3RlbS5Db2xsZWN0aW9ucy5HZW5l
cmljLkxpc3RgMVtbTmV0aGFja0hlbHBlci5JdGVtRGlzcGxheUNvbHVtbiwgTmV0aGFja0hlbHBlciwg
Q3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1udWxsXV0DAAAABl9pdGVtcwVfc2l6ZQhfdmVy
c2lvbgQAACFOZXRoYWNrSGVscGVyLkl0ZW1EaXNwbGF5Q29sdW1uW10CAAAACAgJAwAAAAMAAAA0AAAA
DAQAAAAzTmV0aGFja0hlbHBlciwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1udWxsBwMA
AAAAAQAAAAQAAAAEH05ldGhhY2tIZWxwZXIuSXRlbURpc3BsYXlDb2x1bW4EAAAACQUAAAAJBgAAAAkH
AAAACgUFAAAAH05ldGhhY2tIZWxwZXIuSXRlbURpc3BsYXlDb2x1bW4CAAAAGjxBdHRyaWJ1dGU+a19f
QmFja2luZ0ZpZWxkFjxXaWR0aD5rX19CYWNraW5nRmllbGQEABtOZXRoYWNrSGVscGVyLkl0ZW1BdHRy
aWJ1dGUEAAAACAQAAAAF+P///xtOZXRoYWNrSGVscGVyLkl0ZW1BdHRyaWJ1dGUBAAAAB3ZhbHVlX18A
CAQAAAAAAAAAhgAAAAEGAAAABQAAAAH3////+P///wUAAAAUAAAAAQcAAAAFAAAAAfb////4////AwAA
AIYAAAAL
</value>
</data>
<data name="spellbookDisplay.Columns" mimetype="application/x-microsoft.net.object.binary.base64">
<value>
AAEAAAD/////AQAAAAAAAAAMAgAAAEROZXRoYWNrSGVscGVyLCBWZXJzaW9uPTEuMC4wLjAsIEN1bHR1
cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49bnVsbAQBAAAAeVN5c3RlbS5Db2xsZWN0aW9ucy5HZW5l
cmljLkxpc3RgMVtbTmV0aGFja0hlbHBlci5JdGVtRGlzcGxheUNvbHVtbiwgTmV0aGFja0hlbHBlciwg
Q3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1udWxsXV0DAAAABl9pdGVtcwVfc2l6ZQhfdmVy
c2lvbgQAACFOZXRoYWNrSGVscGVyLkl0ZW1EaXNwbGF5Q29sdW1uW10CAAAACAgJAwAAAAMAAAA4AAAA
DAQAAAAzTmV0aGFja0hlbHBlciwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1udWxsBwMA
AAAAAQAAAAQAAAAEH05ldGhhY2tIZWxwZXIuSXRlbURpc3BsYXlDb2x1bW4EAAAACQUAAAAJBgAAAAkH
AAAACgUFAAAAH05ldGhhY2tIZWxwZXIuSXRlbURpc3BsYXlDb2x1bW4CAAAAGjxBdHRyaWJ1dGU+a19f
QmFja2luZ0ZpZWxkFjxXaWR0aD5rX19CYWNraW5nRmllbGQEABtOZXRoYWNrSGVscGVyLkl0ZW1BdHRy
aWJ1dGUEAAAACAQAAAAF+P///xtOZXRoYWNrSGVscGVyLkl0ZW1BdHRyaWJ1dGUBAAAAB3ZhbHVlX18A
CAQAAAAAAAAAbgAAAAEGAAAABQAAAAH3////+P///wQAAABZAAAAAQcAAAAFAAAAAfb////4////AwAA
AFoAAAAL
</value>
</data>
<metadata name="intrinsicsBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>232, 17</value>
</metadata>
<metadata name="charismaSourceBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="charismaSourceBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value> <value>17, 17</value>
</metadata> </metadata>
<metadata name="intrinsicsBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>232, 17</value>
</metadata>
<metadata name="intrinsicsBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>232, 17</value>
</metadata>
<metadata name="mainMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="mainMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>600, 17</value> <value>600, 17</value>
</metadata> </metadata>

View File

@@ -27,7 +27,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<EmbeddedResource Update="Form1.resx"> <EmbeddedResource Update="MainForm.resx">
<Generator></Generator> <Generator></Generator>
</EmbeddedResource> </EmbeddedResource>
</ItemGroup> </ItemGroup>

View File

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

View File

@@ -5,5 +5,7 @@
public string Potions { get; set; } public string Potions { get; set; }
public string Wands { get; set; } public string Wands { get; set; }
public string Rings { get; set; } public string Rings { get; set; }
public string Spellbooks { get; set; }
public string Amulets { get; set; }
} }
} }

View File

@@ -0,0 +1,22 @@
items:
- name: Change
usuallyCursed: true
cost: 150
- name: ESP
cost: 150
- name: Life Saving
cost: 150
- name: Magical Breathing
cost: 150
- name: Reflection
cost: 150
- name: Restful Sleep
usuallyCursed: true
cost: 150
- name: Strangulation
usuallyCursed: true
cost: 150
- name: Unchanging
cost: 150
- name: Versus Poison
cost: 150

View File

@@ -0,0 +1,26 @@
items:
- name: Change
usuallyCursed: true
cost: 150
- name: ESP
cost: 150
- name: Flying
cost: 150
- name: Guarding
cost: 150
- name: Life Saving
cost: 150
- name: Magical Breathing
cost: 150
- name: Reflection
cost: 150
- name: Restful Sleep
usuallyCursed: true
cost: 150
- name: Strangulation
usuallyCursed: true
cost: 150
- name: Unchanging
cost: 150
- name: Versus Poison
cost: 150

View File

@@ -2,6 +2,7 @@
- name: Adornment - name: Adornment
cost: 100 cost: 100
- name: Hunger - name: Hunger
usuallyCursed: true
cost: 100 cost: 100
- name: Protection - name: Protection
cost: 100 cost: 100
@@ -14,6 +15,7 @@
- name: Warning - name: Warning
cost: 100 cost: 100
- name: Aggravate Monster - name: Aggravate Monster
usuallyCursed: true
cost: 150 cost: 150
- name: Cold Resistance - name: Cold Resistance
cost: 150 cost: 150
@@ -46,10 +48,12 @@
- name: Slow Digestion - name: Slow Digestion
cost: 200 cost: 200
- name: Teleportation - name: Teleportation
usuallyCursed: true
cost: 200 cost: 200
- name: Conflict - name: Conflict
cost: 300 cost: 300
- name: Polymorph - name: Polymorph
usuallyCursed: true
cost: 300 cost: 300
- name: Polymorph Control - name: Polymorph Control
cost: 300 cost: 300

View File

@@ -0,0 +1,124 @@
items:
- name: Force Bolt
school: attack
cost: 100
- name: Drain Life
school: attack
cost: 200
- name: Magic Missile
school: attack
cost: 200
- name: Cone of Cold
school: attack
cost: 400
- name: Fireball
school: attack
cost: 400
- name: Finger of Death
school: attack
cost: 700
- name: Protection
school: clerical
cost: 100
- name: Create Monster
school: clerical
cost: 200
- name: Remove Curse
school: clerical
cost: 300
- name: Create Familiar
school: clerical
cost: 600
- name: Turn Undead
school: clerical
cost: 600
- name: Detect Monsters
school: divination
cost: 100
- name: Light
school: divination
cost: 100
- name: Detect Food
school: divination
cost: 200
- name: Clairvoyance
school: divination
cost: 300
- name: Detect Unseen
school: divination
cost: 300
- name: Identify
school: divination
cost: 300
- name: Detect Treasure
school: divination
cost: 400
- name: Magic Mapping
school: divination
cost: 500
- name: Sleep
school: enchantment
cost: 100
- name: Confuse Monster
school: enchantment
cost: 200
- name: Slow Monster
school: enchantment
cost: 200
- name: Cause Fear
school: enchantment
cost: 300
- name: Charm Monster
school: enchantment
cost: 300
- name: Jumping
school: escape
cost: 100
- name: Haste Self
school: escape
cost: 300
- name: Invisibility
school: escape
cost: 400
- name: Levitation
school: escape
cost: 400
- name: Teleport Away
school: escape
cost: 600
- name: Healing
school: healing
cost: 100
- name: Cure Blindness
school: healing
cost: 200
- name: Cure Sickness
school: healing
cost: 300
- name: Extra Healing
school: healing
cost: 300
- name: Stone to Flesh
school: healing
cost: 300
- name: Restore Ability
school: healing
cost: 400
- name: Knock
school: matter
cost: 100
- name: Wizard Lock
school: matter
cost: 200
- name: Dig
school: matter
cost: 500
- name: Polymorph
school: matter
cost: 600
- name: Cancellation
school: matter
cost: 700
- name: Blank Paper
appearance: plain
cost: 0

View File

@@ -0,0 +1,127 @@
items:
- name: Force Bolt
school: attack
cost: 100
- name: Chain Lightning
school: attack
cost: 200
- name: Drain Life
school: attack
cost: 200
- name: Magic Missile
school: attack
cost: 200
- name: Cone of Cold
school: attack
cost: 400
- name: Fireball
school: attack
cost: 400
- name: Finger of Death
school: attack
cost: 700
- name: Protection
school: clerical
cost: 100
- name: Create Monster
school: clerical
cost: 200
- name: Remove Curse
school: clerical
cost: 300
- name: Create Familiar
school: clerical
cost: 600
- name: Turn Undead
school: clerical
cost: 600
- name: Detect Monsters
school: divination
cost: 100
- name: Light
school: divination
cost: 100
- name: Detect Food
school: divination
cost: 200
- name: Clairvoyance
school: divination
cost: 300
- name: Detect Unseen
school: divination
cost: 300
- name: Identify
school: divination
cost: 300
- name: Detect Treasure
school: divination
cost: 400
- name: Magic Mapping
school: divination
cost: 500
- name: Confuse Monster
school: enchantment
cost: 100
- name: Slow Monster
school: enchantment
cost: 200
- name: Cause Fear
school: enchantment
cost: 300
- name: Sleep
school: enchantment
cost: 300
- name: Charm Monster
school: enchantment
cost: 500
- name: Jumping
school: escape
cost: 100
- name: Haste Self
school: escape
cost: 300
- name: Invisibility
school: escape
cost: 400
- name: Levitation
school: escape
cost: 400
- name: Teleport Away
school: escape
cost: 600
- name: Healing
school: healing
cost: 100
- name: Cure Blindness
school: healing
cost: 200
- name: Cure Sickness
school: healing
cost: 300
- name: Extra Healing
school: healing
cost: 300
- name: Stone to Flesh
school: healing
cost: 300
- name: Restore Ability
school: healing
cost: 400
- name: Knock
school: matter
cost: 100
- name: Wizard Lock
school: matter
cost: 200
- name: Dig
school: matter
cost: 500
- name: Polymorph
school: matter
cost: 600
- name: Cancellation
school: matter
cost: 700
- name: Blank Paper
appearance: plain
cost: 0

View File

@@ -3,8 +3,12 @@
rings: rings.yaml rings: rings.yaml
potions: potions-36.yaml potions: potions-36.yaml
wands: wands.yaml wands: wands.yaml
spellbooks: spellbooks-36.yaml
amulets: amulets-36.yaml
- name: Vanilla 3.7 - name: Vanilla 3.7
scrolls: scrolls.yaml scrolls: scrolls.yaml
rings: rings.yaml rings: rings.yaml
potions: potions-37.yaml potions: potions-37.yaml
wands: wands.yaml wands: wands.yaml
spellbooks: spellbooks-37.yaml
amulets: amulets-37.yaml