summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/data/rules/magic_items.yaml22
-rw-r--r--src/rules/magic_items.rs1
-rw-r--r--src/rules/npcs.rs2
3 files changed, 14 insertions, 11 deletions
diff --git a/src/data/rules/magic_items.yaml b/src/data/rules/magic_items.yaml
index 3108e7c..d45bfdd 100644
--- a/src/data/rules/magic_items.yaml
+++ b/src/data/rules/magic_items.yaml
@@ -5,35 +5,35 @@
potion:
name: "Potion"
- kind: potion
+ kind: Potion
scroll:
name: "Scroll"
- kind: scroll
+ kind: Scroll
ring:
name: "Ring"
- kind: ring
+ kind: Ring
rod_staff_wand:
name: "Rod/Staff/Wand"
- kind: rod_staff_wand
+ kind: RodStaffWand
misc:
name: "Misc"
- kind: misc
+ kind: Misc
armor_shield:
name: "Armor/Shield"
- kind: armor_shield
+ kind: ArmorShield
sword:
name: "Sword"
- kind: sword
+ kind: Sword
protection:
name: "Protection"
- kind: ring # Not actually, but this is fine for now.
+ kind: Ring # Not actually, but this is fine for now.
#####
# Remainder of file is actual data.
@@ -41,12 +41,12 @@ protection:
sword_plus_one:
name: "Sword +1"
- kind: sword
+ kind: Sword
ring_of_animal_friendship:
name: "Ring of Animal Friendship"
- kind: ring
+ kind: Ring
rod_of_absorption:
name: "Rod of Absorption (C, M)"
- kind: rod_staff_wand
+ kind: RodStaffWand
diff --git a/src/rules/magic_items.rs b/src/rules/magic_items.rs
index 6806a60..d074b0b 100644
--- a/src/rules/magic_items.rs
+++ b/src/rules/magic_items.rs
@@ -12,6 +12,7 @@ pub struct MagicItem {
#[derive(Debug, Deserialize, Eq, Hash, PartialEq, Clone, Copy)]
pub enum MagicItemKind {
+ Sword,
Potion,
Scroll,
Ring,
diff --git a/src/rules/npcs.rs b/src/rules/npcs.rs
index b228454..7489b0a 100644
--- a/src/rules/npcs.rs
+++ b/src/rules/npcs.rs
@@ -146,6 +146,8 @@ impl Npc {
.unwrap_or(0)
<= rng.gen_range(1..=100)
{
+ // For now, just get a dummy item named after the item type.
+ // Later, we'll add the actual magic items.
self.magic_items.push(
MAGIC_ITEMS
.get(kind_string)