summaryrefslogtreecommitdiff
path: root/app/views/characters
diff options
context:
space:
mode:
authorDavid Gay <david@davidgay.org>2021-05-26 19:26:00 -0400
committerDavid Gay <david@davidgay.org>2021-05-26 19:26:00 -0400
commit9b2acceda7e36946f9bb15ff8d1a93f9c45a964f (patch)
tree67ebf8f7fcefb4a1811074c9eec519d865c70391 /app/views/characters
parent0b9b45d573cc4f836ba7a99de77e9da18e768f10 (diff)
Combat styles
Diffstat (limited to 'app/views/characters')
-rw-r--r--app/views/characters/show.html.erb13
1 files changed, 13 insertions, 0 deletions
diff --git a/app/views/characters/show.html.erb b/app/views/characters/show.html.erb
index e7f9696..84e1ff5 100644
--- a/app/views/characters/show.html.erb
+++ b/app/views/characters/show.html.erb
@@ -11,6 +11,19 @@
<p class="mb-4">Learned <%= @character.learned_activities.count %> recipe(s) or technique(s).</p>
+<% if @character == current_char %>
+ <h2 class="text-2xl mb-4">Combat Styles</h2>
+ <%= form_with url: character_combat_styles_path(character_id: @character) do |f| %>
+ <%= f.label :offensive_style, "Offensive" %>
+ <%= f.select :offensive_style, Character.offensive_styles.keys.to_a, selected: @character.offensive_style %>
+
+ <%= f.label :defensive_style, "Defensive" %>
+ <%= f.select :defensive_style, Character.defensive_styles.keys.to_a, selected: @character.defensive_style %>
+
+ <%= f.submit "Set" %>
+ <% end %>
+<% end %>
+
<div class="my-6">
<h2 class="text-2xl mb-4">Combat Statistics</h2>
<table class="table-auto">