summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Gay <david@davidgay.org>2021-07-14 17:47:02 -0400
committerDavid Gay <david@davidgay.org>2021-07-14 17:48:30 -0400
commit456cfb0df874ac8cfb217c19c723a3cf738e524f (patch)
tree06da9663e2df553d389a275e57cc3b856e9eb558
parent9cb32635c8df98ef61475ff84a16f9f630e31620 (diff)
New spell: Floret Passage (also code that allows location results)
-rw-r--r--CHANGELOG.md4
-rw-r--r--app/lib/activity_processor.rb4
-rw-r--r--app/views/application/_results.html.erb2
-rw-r--r--data/activities/worldcall.yml33
4 files changed, 40 insertions, 3 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index d803fd8..782d0d2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file.
### Skills
- Worldcall has been implemented.
- - New spells: Hearth Passage, Project Thought
+ - New spells: Hearth Passage, Floret Passage, Project Thought
### Leviathans
- A location can now only have one living leviathan at a time.
@@ -18,7 +18,7 @@ All notable changes to this project will be documented in this file.
- Hearths now have locations, like characters do. All existing hearths are now located at Floret.
### Web
-- Favicon added (contributed by Matt Garrett)
+- Favicon added (contributed by mattagarr)
### Engine
- Some improvements/tweaks.
diff --git a/app/lib/activity_processor.rb b/app/lib/activity_processor.rb
index d14282e..8e5df1b 100644
--- a/app/lib/activity_processor.rb
+++ b/app/lib/activity_processor.rb
@@ -114,6 +114,10 @@ class ActivityProcessor
end
end
end
+ when "location"
+ location = Location.find_by_gid(result[:gid])
+ @character.update(location: location)
+ @results.push({ type: type, location: location })
when "hearth_location"
location = @character.hearth&.location || Location.find_by_gid("floret")
@character.update(location: location)
diff --git a/app/views/application/_results.html.erb b/app/views/application/_results.html.erb
index 71d6992..237dc12 100644
--- a/app/views/application/_results.html.erb
+++ b/app/views/application/_results.html.erb
@@ -12,6 +12,8 @@
<% when "hearth_planting" %>
<p>You planted <%= link_to result[:hearth_planting].item.name,
item_path(result[:hearth_planting].item) %> in the loam.</p>
+ <% when "location" %>
+ <p>You appear in <%= result[:location].name %>.</p>
<% when "hearth_location" %>
<% if current_char.hearth&.location %>
<p>You appear in <%= result[:location].name %>.</p>
diff --git a/data/activities/worldcall.yml b/data/activities/worldcall.yml
index bec622f..752ad1f 100644
--- a/data/activities/worldcall.yml
+++ b/data/activities/worldcall.yml
@@ -31,6 +31,37 @@ worldcall_hearth_passage:
- type: "xp"
gid: "worldcall"
base: 4
+worldcall_floret_passage:
+ name: "Cast Floret Passage"
+ description: "Teleport to Floret."
+ whatnot:
+ tags:
+ - "spell"
+ - "worldcall"
+ requirements:
+ - type: "skill"
+ gid: "worldcall"
+ level: 3
+ cost:
+ - type: "item"
+ gid: "wisp_of_the_current"
+ quantity: 1
+ duration:
+ base: 62
+ minimum: 35
+ scaling:
+ - type: "skill"
+ gid: "worldcall"
+ scale_value: 0.5
+ - type: "stat"
+ gid: "worldcall_speed"
+ scale_value: 1
+ results:
+ - type: "location"
+ gid: "floret"
+ - type: "xp"
+ gid: "worldcall"
+ base: 10
worldcall_project_thought:
name: "Cast Project Thought"
description: "Open brief, faint rifts to random places at your current location, possibly attracting a balgoloth."
@@ -47,7 +78,7 @@ worldcall_project_thought:
gid: "gem_dust"
quantity: 1
duration:
- base: 62
+ base: 64
minimum: 35
scaling:
- type: "skill"