diff options
author | David Gay <david@davidgay.org> | 2021-06-06 19:06:46 -0400 |
---|---|---|
committer | David Gay <david@davidgay.org> | 2021-06-06 19:06:46 -0400 |
commit | e37402ff309311a14d7dd666d0d8b29517504017 (patch) | |
tree | 3d6604805e9004bc0c37130f451376e79a68c989 /app/views | |
parent | 3622126380278d9bed8ea0e1e05a0bd1ea040596 (diff) |
Leviathans
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/application/_results.html.erb | 3 | ||||
-rw-r--r-- | app/views/locations/show.html.erb | 10 |
2 files changed, 13 insertions, 0 deletions
diff --git a/app/views/application/_results.html.erb b/app/views/application/_results.html.erb index 31fb93e..ec62991 100644 --- a/app/views/application/_results.html.erb +++ b/app/views/application/_results.html.erb @@ -17,6 +17,9 @@ <% when "monster" %> <p>You encountered a <%= result[:monster].name %>.</p> <p class="text-xs italic"><%= result[:monster].description %></p> + <% 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 "xp" %> <p class="text-xs">You gained <%= result[:xp] %> <%= result[:skill].name %> XP.</p> <% when "title" %> diff --git a/app/views/locations/show.html.erb b/app/views/locations/show.html.erb index ff7b2a8..fcc668a 100644 --- a/app/views/locations/show.html.erb +++ b/app/views/locations/show.html.erb @@ -3,6 +3,16 @@ <p class="italic"><%= @location.description %></p> </div> +<% @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_region") %> + <%= form_with url: start_activity_path(activity) do |f| %> + <%= f.hidden_field :id, value: activity.id %> + <%= f.submit "Hunt" %> + <% end %> +<% end %> + <% @location.activities.order(:name).each do |activity| %> <div class="my-4"> <h2 class="text-xl"><%= link_to activity.name, activity_path(activity) %></h2> |