1 | # -*- encoding : utf-8 -*- |
---|
2 | class Card |
---|
3 | module Set::TransitionPack |
---|
4 | extend Set |
---|
5 | |
---|
6 | format :html do |
---|
7 | |
---|
8 | view :core, :right=>:pattern_confidence do |args| |
---|
9 | star_card = Card[ "#{Card[:pattern_confidence].name}+#{Card[:image].name}" ] |
---|
10 | star = if star_card |
---|
11 | args[:size] ||= :icon |
---|
12 | subformat(star_card).render_core args |
---|
13 | else |
---|
14 | '*' |
---|
15 | end |
---|
16 | result = '' |
---|
17 | if item=card.item_names[0] and char = item[0,1] and num = char.to_i |
---|
18 | |
---|
19 | num.times { result += star } |
---|
20 | result |
---|
21 | else |
---|
22 | '<!-- pattern_confidence error: invalid item -->' |
---|
23 | end |
---|
24 | end |
---|
25 | |
---|
26 | view :core, :right=>:pattern_summary do |args| |
---|
27 | add_name_context |
---|
28 | _final_core args |
---|
29 | end |
---|
30 | |
---|
31 | end |
---|
32 | |
---|
33 | end |
---|
34 | end |
---|