summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/models/character.rb4
-rw-r--r--data/activities.yml50
-rw-r--r--data/hearth_amenities.yml12
3 files changed, 60 insertions, 6 deletions
diff --git a/app/models/character.rb b/app/models/character.rb
index 073a986..c973d7d 100644
--- a/app/models/character.rb
+++ b/app/models/character.rb
@@ -118,6 +118,8 @@ class Character < ApplicationRecord
case scaling_entry[:type]
when "skill"
duration -= self.skill_level(scaling_entry[:gid]) * scaling_entry[:scale_value]
+ when "stat"
+ duration -= self.total_stat_change(scaling_entry[:gid]) * scaling_entry[:scale_value]
else
raise "Invalid scaling type." # TODO: Improve this
end
@@ -181,7 +183,7 @@ class Character < ApplicationRecord
end
def total_stat_change(stat)
- effects.filter_map { |e| e[:modifier] if e[:type] == "stat_change" }.sum
+ effects.filter_map { |e| e[:modifier] if e[:type] == "stat_change" && e[:stat] == stat }.sum
end
def can_fight?
diff --git a/data/activities.yml b/data/activities.yml
index 6a0f4c4..4c70da7 100644
--- a/data/activities.yml
+++ b/data/activities.yml
@@ -49,10 +49,16 @@ construct_forge_level2:
cost:
- type: "item"
gid: "stone"
- quantity: 500
+ quantity: 300
- type: "item"
gid: "iron_ingot"
- quantity: 50
+ quantity: 10
+ - type: "item"
+ gid: "arcane_dust"
+ quantity: 500
+ - type: "item"
+ gid: "shimmering_essence"
+ quantity: 10
results:
- type: "hearth_amenity"
gid: "forge"
@@ -71,17 +77,39 @@ construct_labratory_level1:
cost:
- type: "item"
gid: "wood"
+ quantity: 200
+ - type: "item"
+ gid: "stone"
quantity: 100
+ results:
+ - type: "hearth_amenity"
+ gid: "labratory"
+ level: 1
+construct_labratory_level2:
+ name: "Upgrade Labratory to Level 2"
+ description: "Upgrade your labratory to level 2."
+ innate: true
+ whatnot:
+ requirements:
+ - type: "hearth_amenity"
+ gid: "labratory"
+ level: 1
+ duration:
+ base: 2400
+ cost:
+ - type: "item"
+ gid: "wood"
+ quantity: 200
- type: "item"
gid: "stone"
- quantity: 50
+ quantity: 200
- type: "item"
gid: "iron_ingot"
- quantity: 10
+ quantity: 6
results:
- type: "hearth_amenity"
gid: "labratory"
- level: 1
+ level: 2
construct_listern_font_level1:
name: "Construct Listern Font Level 1"
description: "Build a level 1 listern font."
@@ -138,6 +166,9 @@ craft_pig_iron_ingot:
- type: "skill"
gid: "otherforge"
scale_value: 2
+ - type: "stat"
+ gid: "otherforge_speed"
+ scale_value: 1
cost:
- type: "item"
gid: "crude_iron_ore"
@@ -168,6 +199,9 @@ craft_iron_ingot:
- type: "skill"
gid: "otherforge"
scale_value: 2
+ - type: "stat"
+ gid: "otherforge_speed"
+ scale_value: 1
cost:
- type: "item"
gid: "iron_ore"
@@ -194,6 +228,9 @@ craft_mending_salve:
- type: "skill"
gid: "fluxseethe"
scale_value: 2
+ - type: "stat"
+ gid: "fluxseethe_speed"
+ scale_value: 1
cost:
- type: "item"
gid: "aseas_leaf"
@@ -227,6 +264,9 @@ craft_manadross_tincture:
- type: "skill"
gid: "fluxseethe"
scale_value: 2
+ - type: "stat"
+ gid: "fluxseethe_speed"
+ scale_value: 1
cost:
- type: "item"
gid: "arcane_dust"
diff --git a/data/hearth_amenities.yml b/data/hearth_amenities.yml
index a99b9a8..a673ceb 100644
--- a/data/hearth_amenities.yml
+++ b/data/hearth_amenities.yml
@@ -14,6 +14,11 @@ forge:
gid: "construct_forge_level1"
- level: 2
gid: "construct_forge_level2"
+ effects:
+ - type: "stat_change"
+ level: 2
+ stat: "otherforge_speed"
+ modifier: 4
labratory:
name: "Labratory"
description: "A table and some containers, sufficient for practicing the fluxseethe skill."
@@ -21,6 +26,13 @@ labratory:
construct_activities:
- level: 1
gid: "construct_labratory_level1"
+ - level: 2
+ gid: "construct_labratory_level2"
+ effects:
+ - type: "stat_change"
+ level: 2
+ stat: "fluxseethe_speed"
+ modifier: 4
listern_font:
name: "Listern Font"
description: "A basin upon a pedestal. Over time, it fills with a healing liquid."