From 031aeded8f92b6bce21d6097930f06513163a9f9 Mon Sep 17 00:00:00 2001 From: Kara Alexandra Date: Wed, 24 Sep 2025 14:20:55 -0500 Subject: [PATCH] Add spellbooks and amulets --- NethackHelper/Item.cs | 12 ++- NethackHelper/ItemDisplay.cs | 8 +- NethackHelper/MainForm.Designer.cs | 94 +++++++++++------- NethackHelper/MainForm.cs | 19 ++++ NethackHelper/MainForm.resx | 57 ++++++++--- NethackHelper/NethackHelper.csproj | 2 +- NethackHelper/SaveData.cs | 14 +++ NethackHelper/Versions.cs | 2 + NethackHelper/items/amulets-36.yaml | 22 +++++ NethackHelper/items/amulets-37.yaml | 26 +++++ NethackHelper/items/rings.yaml | 4 + NethackHelper/items/spellbooks-36.yaml | 124 ++++++++++++++++++++++++ NethackHelper/items/spellbooks-37.yaml | 127 +++++++++++++++++++++++++ NethackHelper/items/versions.yaml | 6 +- 14 files changed, 462 insertions(+), 55 deletions(-) create mode 100644 NethackHelper/items/amulets-36.yaml create mode 100644 NethackHelper/items/amulets-37.yaml create mode 100644 NethackHelper/items/spellbooks-36.yaml create mode 100644 NethackHelper/items/spellbooks-37.yaml diff --git a/NethackHelper/Item.cs b/NethackHelper/Item.cs index 0cbb361..483fb14 100644 --- a/NethackHelper/Item.cs +++ b/NethackHelper/Item.cs @@ -5,7 +5,9 @@ public string Name { get; set; } = string.Empty; public int Cost { get; set; } public int Ink { get; set; } + public string School { get; set; } = string.Empty; public string? Appearance { get; set; } + public bool UsuallyCursed { get; set; } = false; } public class ItemList { @@ -13,9 +15,11 @@ } public enum ItemAttribute { - Name, - Cost, - Ink, - Appearance, + Name = 0, + Cost = 1, + Ink = 2, + School = 4, + Appearance = 3, + UsuallyCursed = 5, } } diff --git a/NethackHelper/ItemDisplay.cs b/NethackHelper/ItemDisplay.cs index 10e3ee5..9a5e45e 100644 --- a/NethackHelper/ItemDisplay.cs +++ b/NethackHelper/ItemDisplay.cs @@ -17,7 +17,9 @@ namespace NethackHelper { [ItemAttribute.Name] = item => item.Name, [ItemAttribute.Cost] = item => item.Cost.ToString(), [ItemAttribute.Ink] = item => item.Ink.ToString(), + [ItemAttribute.School] = item => item.School.ToString(), [ItemAttribute.Appearance] = item => item.Appearance ?? UNIDENTIFIED, + [ItemAttribute.UsuallyCursed] = item => item.UsuallyCursed ? "C" : string.Empty, }; [Browsable(false)] @@ -41,7 +43,11 @@ namespace NethackHelper { if (this.Columns != null) { this.itemListView.Columns.Clear(); 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); } } } diff --git a/NethackHelper/MainForm.Designer.cs b/NethackHelper/MainForm.Designer.cs index ee7efd4..5d269be 100644 --- a/NethackHelper/MainForm.Designer.cs +++ b/NethackHelper/MainForm.Designer.cs @@ -28,26 +28,21 @@ namespace NethackHelper { private void InitializeComponent() { components = new System.ComponentModel.Container(); 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(); itemsTab = new TabPage(); suckerBox = new CheckBox(); saveSourceBindingSource = new BindingSource(components); - shoppingTabControl = new TabControl(); + itemTabControl = new TabControl(); scrollPotionTab = new TabPage(); potionDisplay = new ItemDisplay(); scrollDisplay = new ItemDisplay(); wandRingTab = new TabPage(); ringDisplay = new ItemDisplay(); wandDisplay = new ItemDisplay(); + spellbookTab = new TabPage(); + amuletDisplay = new ItemDisplay(); + spellbookDisplay = new ItemDisplay(); charismaSelector = new ComboBox(); - charismaSourceBindingSource = new BindingSource(components); intrinsicsTab = new TabPage(); label2 = new Label(); lastPrayerPicker = new NumericUpDown(); @@ -76,21 +71,23 @@ namespace NethackHelper { sokobanNext = new Button(); sokobanSolution = new Label(); sokobanLevelList = new ListBox(); + charismaSourceBindingSource = new BindingSource(components); mainMenu = new MenuStrip(); fileToolStripMenuItem = new ToolStripMenuItem(); resetToolStripMenuItem = new ToolStripMenuItem(); mainTabControl.SuspendLayout(); itemsTab.SuspendLayout(); ((System.ComponentModel.ISupportInitialize) saveSourceBindingSource).BeginInit(); - shoppingTabControl.SuspendLayout(); + itemTabControl.SuspendLayout(); scrollPotionTab.SuspendLayout(); wandRingTab.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize) charismaSourceBindingSource).BeginInit(); + spellbookTab.SuspendLayout(); intrinsicsTab.SuspendLayout(); ((System.ComponentModel.ISupportInitialize) lastPrayerPicker).BeginInit(); ((System.ComponentModel.ISupportInitialize) intrinsicsBindingSource).BeginInit(); ((System.ComponentModel.ISupportInitialize) protectionPicker).BeginInit(); sokobanTab.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize) charismaSourceBindingSource).BeginInit(); mainMenu.SuspendLayout(); SuspendLayout(); // @@ -109,7 +106,7 @@ namespace NethackHelper { // itemsTab // itemsTab.Controls.Add(suckerBox); - itemsTab.Controls.Add(shoppingTabControl); + itemsTab.Controls.Add(itemTabControl); itemsTab.Controls.Add(charismaSelector); itemsTab.Location = new Point(4, 24); itemsTab.Name = "itemsTab"; @@ -136,16 +133,17 @@ namespace NethackHelper { saveSourceBindingSource.DataSource = typeof(SaveSource); saveSourceBindingSource.Position = 0; // - // shoppingTabControl + // itemTabControl // - shoppingTabControl.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right; - shoppingTabControl.Controls.Add(scrollPotionTab); - shoppingTabControl.Controls.Add(wandRingTab); - shoppingTabControl.Location = new Point(6, 35); - shoppingTabControl.Name = "shoppingTabControl"; - shoppingTabControl.SelectedIndex = 0; - shoppingTabControl.Size = new Size(652, 555); - shoppingTabControl.TabIndex = 1; + itemTabControl.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right; + itemTabControl.Controls.Add(scrollPotionTab); + itemTabControl.Controls.Add(wandRingTab); + itemTabControl.Controls.Add(spellbookTab); + itemTabControl.Location = new Point(6, 35); + itemTabControl.Name = "itemTabControl"; + itemTabControl.SelectedIndex = 0; + itemTabControl.Size = new Size(652, 555); + itemTabControl.TabIndex = 1; // // scrollPotionTab // @@ -207,25 +205,46 @@ namespace NethackHelper { wandDisplay.Size = new Size(313, 515); 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) 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) resources.GetObject("spellbookDisplay.Columns"); + spellbookDisplay.Location = new Point(6, 6); + spellbookDisplay.Name = "spellbookDisplay"; + spellbookDisplay.Size = new Size(313, 515); + spellbookDisplay.TabIndex = 0; + // // charismaSelector // charismaSelector.DataBindings.Add(new Binding("SelectedItem", saveSourceBindingSource, "CharismaClass", true)); - charismaSelector.DataSource = charismaSourceBindingSource; - charismaSelector.DisplayMember = "DisplayName"; charismaSelector.FormattingEnabled = true; - charismaSelector.Items.AddRange(new object[] { charismaClass8, charismaClass9, charismaClass10, charismaClass11, charismaClass12, charismaClass13, charismaClass14 }); charismaSelector.Location = new Point(6, 6); charismaSelector.Name = "charismaSelector"; charismaSelector.Size = new Size(121, 23); charismaSelector.TabIndex = 0; - charismaSelector.ValueMember = "Multiplier"; charismaSelector.SelectedIndexChanged += charismaSelector_SelectedIndexChanged; // - // charismaSourceBindingSource - // - charismaSourceBindingSource.DataSource = typeof(CharismaSource); - charismaSourceBindingSource.Position = 0; - // // intrinsicsTab // intrinsicsTab.Controls.Add(label2); @@ -547,6 +566,11 @@ namespace NethackHelper { sokobanLevelList.SelectedIndexChanged += sokobanLevelList_SelectedIndexChanged; sokobanLevelList.KeyDown += sokobanLevelList_KeyDown; // + // charismaSourceBindingSource + // + charismaSourceBindingSource.DataSource = typeof(CharismaSource); + charismaSourceBindingSource.Position = 0; + // // mainMenu // mainMenu.Items.AddRange(new ToolStripItem[] { fileToolStripMenuItem }); @@ -589,16 +613,17 @@ namespace NethackHelper { itemsTab.ResumeLayout(false); itemsTab.PerformLayout(); ((System.ComponentModel.ISupportInitialize) saveSourceBindingSource).EndInit(); - shoppingTabControl.ResumeLayout(false); + itemTabControl.ResumeLayout(false); scrollPotionTab.ResumeLayout(false); wandRingTab.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize) charismaSourceBindingSource).EndInit(); + spellbookTab.ResumeLayout(false); intrinsicsTab.ResumeLayout(false); intrinsicsTab.PerformLayout(); ((System.ComponentModel.ISupportInitialize) lastPrayerPicker).EndInit(); ((System.ComponentModel.ISupportInitialize) intrinsicsBindingSource).EndInit(); ((System.ComponentModel.ISupportInitialize) protectionPicker).EndInit(); sokobanTab.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize) charismaSourceBindingSource).EndInit(); mainMenu.ResumeLayout(false); mainMenu.PerformLayout(); ResumeLayout(false); @@ -617,7 +642,7 @@ namespace NethackHelper { private CheckBox sokobanHorizontal; private TabPage itemsTab; private ComboBox charismaSelector; - private TabControl shoppingTabControl; + private TabControl itemTabControl; private TabPage potionsTab; private TabPage scrollPotionTab; private ItemDisplay scrollDisplay; @@ -652,5 +677,8 @@ namespace NethackHelper { private MenuStrip mainMenu; private ToolStripMenuItem fileToolStripMenuItem; private ToolStripMenuItem resetToolStripMenuItem; + private TabPage spellbookTab; + private ItemDisplay spellbookDisplay; + private ItemDisplay amuletDisplay; } } \ No newline at end of file diff --git a/NethackHelper/MainForm.cs b/NethackHelper/MainForm.cs index 6df035f..407f7b5 100644 --- a/NethackHelper/MainForm.cs +++ b/NethackHelper/MainForm.cs @@ -18,6 +18,15 @@ namespace NethackHelper { this.potionDisplay.CostFormatter = GetCostString; this.wandDisplay.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")) { var sokoban = new SokobanSolution(YamlOptions.DeserializeFile(filename)); @@ -65,6 +74,12 @@ namespace NethackHelper { var rings = YamlOptions.DeserializeFile(Path.Join("items", version.Rings)); this.ringDisplay.DisplayItemList(rings, save.Rings); + + var spellbooks = YamlOptions.DeserializeFile(Path.Join("items", version.Spellbooks)); + this.spellbookDisplay.DisplayItemList(spellbooks, save.Spellbooks); + + var amulets = YamlOptions.DeserializeFile(Path.Join("items", version.Amulets)); + this.amuletDisplay.DisplayItemList(amulets, save.Amulets); } private string GetCostString(int cost) { @@ -147,6 +162,8 @@ namespace NethackHelper { this.potionDisplay.UpdateCostHeaders(); this.wandDisplay.UpdateCostHeaders(); this.ringDisplay.UpdateCostHeaders(); + this.spellbookDisplay.UpdateCostHeaders(); + this.amuletDisplay.UpdateCostHeaders(); } private void charismaSelector_SelectedIndexChanged(object sender, EventArgs e) { @@ -173,6 +190,8 @@ namespace NethackHelper { save.Rings = this.ringDisplay.Export(); save.Scrolls = this.scrollDisplay.Export(); save.Wands = this.wandDisplay.Export(); + save.Spellbooks = this.spellbookDisplay.Export(); + save.Amulets = this.amuletDisplay.Export(); save.Save(); } diff --git a/NethackHelper/MainForm.resx b/NethackHelper/MainForm.resx index f8edac3..24ec6e2 100644 --- a/NethackHelper/MainForm.resx +++ b/NethackHelper/MainForm.resx @@ -120,9 +120,6 @@ 410, 17 - - 410, 17 - AAEAAAD/////AQAAAAAAAAAMAgAAAEROZXRoYWNrSGVscGVyLCBWZXJzaW9uPTEuMC4wLjAsIEN1bHR1 @@ -160,13 +157,14 @@ cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49bnVsbAQBAAAAeVN5c3RlbS5Db2xsZWN0aW9ucy5HZW5l cmljLkxpc3RgMVtbTmV0aGFja0hlbHBlci5JdGVtRGlzcGxheUNvbHVtbiwgTmV0aGFja0hlbHBlciwg Q3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1udWxsXV0DAAAABl9pdGVtcwVfc2l6ZQhfdmVy - c2lvbgQAACFOZXRoYWNrSGVscGVyLkl0ZW1EaXNwbGF5Q29sdW1uW10CAAAACAgJAwAAAAIAAAAIAAAA + c2lvbgQAACFOZXRoYWNrSGVscGVyLkl0ZW1EaXNwbGF5Q29sdW1uW10CAAAACAgJAwAAAAMAAAAUAAAA DAQAAAAzTmV0aGFja0hlbHBlciwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1udWxsBwMA - AAAAAQAAAAQAAAAEH05ldGhhY2tIZWxwZXIuSXRlbURpc3BsYXlDb2x1bW4EAAAACQUAAAAJBgAAAA0C - BQUAAAAfTmV0aGFja0hlbHBlci5JdGVtRGlzcGxheUNvbHVtbgIAAAAaPEF0dHJpYnV0ZT5rX19CYWNr - aW5nRm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AAAkH + AAAACgUFAAAAH05ldGhhY2tIZWxwZXIuSXRlbURpc3BsYXlDb2x1bW4CAAAAGjxBdHRyaWJ1dGU+a19f + QmFja2luZ0ZpZWxkFjxXaWR0aD5rX19CYWNraW5nRmllbGQEABtOZXRoYWNrSGVscGVyLkl0ZW1BdHRy + aWJ1dGUEAAAACAQAAAAF+P///xtOZXRoYWNrSGVscGVyLkl0ZW1BdHRyaWJ1dGUBAAAAB3ZhbHVlX18A + CAQAAAAAAAAAbgAAAAEGAAAABQAAAAH3////+P///wQAAABZAAAAAQcAAAAFAAAAAfb////4////AwAA + AFoAAAAL + + + + 232, 17 + 17, 17 - - 232, 17 - - - 232, 17 - 600, 17 diff --git a/NethackHelper/NethackHelper.csproj b/NethackHelper/NethackHelper.csproj index dd58048..b516735 100644 --- a/NethackHelper/NethackHelper.csproj +++ b/NethackHelper/NethackHelper.csproj @@ -27,7 +27,7 @@ - + diff --git a/NethackHelper/SaveData.cs b/NethackHelper/SaveData.cs index 34b6d92..ea0bbf9 100644 --- a/NethackHelper/SaveData.cs +++ b/NethackHelper/SaveData.cs @@ -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 Rings { get; set; } = new(); public List Scrolls { get; set; } = new(); public List Wands { get; set; } = new(); + public List Spellbooks { get; set; } = new(); + public List Amulets { get; set; } = new(); } public class Intrinsics { diff --git a/NethackHelper/Versions.cs b/NethackHelper/Versions.cs index 98bcba4..7bd0fca 100644 --- a/NethackHelper/Versions.cs +++ b/NethackHelper/Versions.cs @@ -5,5 +5,7 @@ public string Potions { get; set; } public string Wands { get; set; } public string Rings { get; set; } + public string Spellbooks { get; set; } + public string Amulets { get; set; } } } diff --git a/NethackHelper/items/amulets-36.yaml b/NethackHelper/items/amulets-36.yaml new file mode 100644 index 0000000..cdba13f --- /dev/null +++ b/NethackHelper/items/amulets-36.yaml @@ -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 \ No newline at end of file diff --git a/NethackHelper/items/amulets-37.yaml b/NethackHelper/items/amulets-37.yaml new file mode 100644 index 0000000..757db32 --- /dev/null +++ b/NethackHelper/items/amulets-37.yaml @@ -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 \ No newline at end of file diff --git a/NethackHelper/items/rings.yaml b/NethackHelper/items/rings.yaml index 28356eb..50c9489 100644 --- a/NethackHelper/items/rings.yaml +++ b/NethackHelper/items/rings.yaml @@ -2,6 +2,7 @@ - name: Adornment cost: 100 - name: Hunger + usuallyCursed: true cost: 100 - name: Protection cost: 100 @@ -14,6 +15,7 @@ - name: Warning cost: 100 - name: Aggravate Monster + usuallyCursed: true cost: 150 - name: Cold Resistance cost: 150 @@ -46,10 +48,12 @@ - name: Slow Digestion cost: 200 - name: Teleportation + usuallyCursed: true cost: 200 - name: Conflict cost: 300 - name: Polymorph + usuallyCursed: true cost: 300 - name: Polymorph Control cost: 300 diff --git a/NethackHelper/items/spellbooks-36.yaml b/NethackHelper/items/spellbooks-36.yaml new file mode 100644 index 0000000..daf1c03 --- /dev/null +++ b/NethackHelper/items/spellbooks-36.yaml @@ -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 \ No newline at end of file diff --git a/NethackHelper/items/spellbooks-37.yaml b/NethackHelper/items/spellbooks-37.yaml new file mode 100644 index 0000000..3591718 --- /dev/null +++ b/NethackHelper/items/spellbooks-37.yaml @@ -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 \ No newline at end of file diff --git a/NethackHelper/items/versions.yaml b/NethackHelper/items/versions.yaml index f08d137..dd33647 100644 --- a/NethackHelper/items/versions.yaml +++ b/NethackHelper/items/versions.yaml @@ -3,8 +3,12 @@ rings: rings.yaml potions: potions-36.yaml wands: wands.yaml + spellbooks: spellbooks-36.yaml + amulets: amulets-36.yaml - name: Vanilla 3.7 scrolls: scrolls.yaml rings: rings.yaml potions: potions-37.yaml - wands: wands.yaml \ No newline at end of file + wands: wands.yaml + spellbooks: spellbooks-37.yaml + amulets: amulets-37.yaml \ No newline at end of file