summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
Diffstat (limited to 'app/views')
-rw-r--r--app/views/application/_results.html.erb8
-rw-r--r--app/views/look/look.html.erb4
2 files changed, 10 insertions, 2 deletions
diff --git a/app/views/application/_results.html.erb b/app/views/application/_results.html.erb
index a7dc002..71d6992 100644
--- a/app/views/application/_results.html.erb
+++ b/app/views/application/_results.html.erb
@@ -12,6 +12,12 @@
<% when "hearth_planting" %>
<p>You planted <%= link_to result[:hearth_planting].item.name,
item_path(result[:hearth_planting].item) %> in the loam.</p>
+ <% when "hearth_location" %>
+ <% if current_char.hearth&.location %>
+ <p>You appear in <%= result[:location].name %>.</p>
+ <% else %>
+ <p>Lacking a hearth to return to, you appear in an empty patch of land in <%= result[:location].name %>.</p>
+ <% end %>
<% when "activity" %>
<p>You learned how to <%= result[:activity].name %>!</p>
<% when "monster" %>
@@ -20,6 +26,8 @@
<% when "monster_spawn" %>
<p>You found the <%= result[:monster_spawn].monster.name %>!</p>
<p class="text-xs italic"><%= result[:monster_spawn].monster.description %></p>
+ <% when "create_monster_spawn" %>
+ <p>You've called a <%= result[:monster].name %>!</p>
<% when "xp" %>
<p class="text-xs">You gained <%= result[:xp] %> <%= result[:skill].name %> XP.</p>
<% when "title" %>
diff --git a/app/views/look/look.html.erb b/app/views/look/look.html.erb
index 2f1074a..ef0f6c4 100644
--- a/app/views/look/look.html.erb
+++ b/app/views/look/look.html.erb
@@ -3,10 +3,10 @@
<p class="italic"><%= @location.description %></p>
</div>
+<%# TODO: Don't load into memory %>
<% @location.monster_spawns.select(&:alive?).each do |ms| %>
<p class="text-yellow-400">A <%= ms.monster.name %> is ravaging this location! (<%= ms.remaining_hp %> HP)</p>
- <%# TODO: HACK %>
- <% activity = Activity.find_by_gid("beastslay_leviathan_floret") %>
+ <% activity = Activity.find_by_gid("beastslay_leviathan_#{@location.gid}") %>
<%= form_with url: start_activity_path(activity) do |f| %>
<%= f.hidden_field :id, value: activity.id %>
<%= f.submit "Hunt" %>