<% results.each do |result| %> <% case result[:type] %> <% when "item" %>

You got <%= result[:quantity] %> <%= result[:item].name %> <% if result[:xp]&.any? %> (<%= result[:xp].map { |award| "#{award[:amount]} xp #{award[:skill].name}" }.join(", ") %>) <% end %>

<% when "hearth_amenity" %>

You constructed <%= result[:hearth_amenity].name %>.

<% when "activity" %>

You realized how to <%= result[:activity].name %>!

<% when "message" %>

<%= result[:body] %>

<% when "error" %>

<%= result[:message] %>

<% end %> <% end %>