Clash Deck Generator

Generate a deck based on roles, meta cards, and special slot rules.

<% if deck.any? %>

Deck stats

Average elixir: <%= stats[:average_elixir] %>

Meta cards: <%= stats[:meta_cards_count] %>

Spells: <%= stats[:spells_count] %>

Troops: <%= stats[:troops_count] %>

Buildings: <%= stats[:buildings_count] %>

Champions: <%= stats[:champions_count] %>

Heroes: <%= stats[:heroes_count] %>

Evolutions: <%= stats[:evolutions_count] %>

Deck cards

<% deck.each_with_index do |card, index| %> <% meta_class = card.is_meta == 1 ? "meta" : "non-meta" %> <% meta_text = card.is_meta == 1 ? "META" : "NON-META" %>
<%= index + 1 %>. <%= card.name %>
<%= card.rarity %> | <%= card.type %> | <%= card.elixir_cost %> elixir
<%= meta_text %>
Roles: <%= roles_repo.roles_for(card.name).join(", ") %>
<% end %>
<% end %>