<% title(@npc.name) %> <% description("Location: #{location(@npc, inline: true)} | " \ "#{'Rule'.pluralize(@npc.rules.size)}: #{format_rules(@npc, inline: true)}") %>
<%= format_npc_name(@npc) %>
Location
<%= location(@npc, inline: true) %>
Patch
<%= @npc.patch %>
<% if @npc.rules.present? %>
<%= 'Rule'.pluralize(@npc.rules.size) %>
<%= format_rules(@npc, inline: true) %>
<% end %>
Difficulty
<%= difficulty(@npc) %>
<% if user_signed_in? %>
Defeated
<% if npc_defeated?(@npc) %> <%= fa_icon('check', text: 'Yes') %> <% else %> <%= fa_icon('times', text: 'No') %> <% end %>
<% end %> <% if @npc.quest.present? %>
Required Quest
<%= quest(@npc) %>
<% end %>
<%= 'Reward'.pluralize(@rewards.length) %>
<%= render partial: 'cards/large', collection: @rewards, as: :card %>
Deck <%= fa_icon('question-circle') if @npc.variable_cards.present? %>
<%= link_to 'Submit Deck', new_deck_path(npc_id: @npc.id), class: 'btn btn-primary btn-sm', data: { toggle: 'tooltip' }, title: 'Submit a deck to be used against this NPC' %> <%= link_to 'User Decks', decks_path(q: { npc_id_eq: @npc.id }), class: "btn btn-secondary btn-sm#{ ' disabled' unless Deck.exists?(npc_id: @npc.id) }", data: { toggle: 'tooltip' }, title: 'User decks designed to be used against this NPC' %>
<%= render partial: 'cards/large', collection: @npc.fixed_cards, as: :card, deck: true %>
<% if @npc.variable_cards.present? %>
<%= render partial: 'cards/large', collection: @npc.variable_cards, as: :card, deck: true %>
<% end %>