3 Revize

Autor SHA1 Zpráva Datum
  Okos 8df774e11a make icons work again před 5 roky
  Okos 08ab4cae31 bugbear ability fix před 5 roky
  Okos 86984ca943 bigger dnd stats před 5 roky
3 změnil soubory, kde provedl 16 přidání a 8 odebrání
  1. 2
    1
      generator/css/cards.css
  2. 1
    1
      generator/data/card_data_example.js
  3. 13
    6
      generator/js/cards.js

+ 2
- 1
generator/css/cards.css Zobrazit soubor

238
 }
238
 }
239
 
239
 
240
 .card-stats {
240
 .card-stats {
241
-    width: 100%
241
+    width: 100%;
242
+    font-size: 10pt;
242
 }
243
 }
243
 
244
 
244
 .card-stats-header {
245
 .card-stats-header {

+ 1
- 1
generator/data/card_data_example.js Zobrazit soubor

17
       "fill",
17
       "fill",
18
       "section | Abilities",
18
       "section | Abilities",
19
       "description | Brute| A melee weapon deals one extra die of its damage when the bugbear hits with it (included in the attack).",
19
       "description | Brute| A melee weapon deals one extra die of its damage when the bugbear hits with it (included in the attack).",
20
-      "description | Surprise Attack | If the bugbear surprises a creature and hitsection | Actionss it with an attack during the first round of combat, the target takes an extra 7 (2d6) damage from the attack.",
20
+      "description | Surprise Attack | If the bugbear surprises a creature and hits it with an attack during the first round of combat, the target takes an extra 7 (2d6) damage from the attack.",
21
       "fill",
21
       "fill",
22
       "section | Actions",
22
       "section | Actions",
23
       "description | Morningstar | Melee Weapon Attack: +4 to hit, reach 5 ft., one target. Hit: 11 (2d8 + 2) piercing damage.",
23
       "description | Morningstar | Melee Weapon Attack: +4 to hit, reach 5 ft., one target. Hit: 11 (2d8 + 2) piercing damage.",

+ 13
- 6
generator/js/cards.js Zobrazit soubor

97
         classname = "inlineicon";
97
         classname = "inlineicon";
98
     }
98
     }
99
 
99
 
100
-    var stats = card_data.stats?card_data_split_params(card_data.stats):[];
101
     var result = "";
100
     var result = "";
102
-    result += '<div class="card-title-' + classname + '-container">';
103
-    result += '<img class="inline-logo" src="img/footprint.png">' + (stats[0]||"?");
104
-    result += '<img class="inline-logo" src="img/hearts.png">' + (stats[1]||"?");
105
-    result += '<img class="inline-logo" src="img/shield.png">' + (stats[2]||"?");
106
-    result += '</div>';
101
+    if(card_data.icon) {
102
+        result += '<div class="card-title-' + classname + '-container">';
103
+        result += '    <div class="card-title-' + classname + ' icon-' + icon + '">';
104
+        result += '    </div>';
105
+        result += '</div>';
106
+    } else {
107
+        var stats = card_data.stats?card_data_split_params(card_data.stats):[];
108
+        result += '<div class="card-title-' + classname + '-container">';
109
+        result += '<img class="inline-logo" src="img/footprint.png">' + (stats[0]||"?");
110
+        result += '<img class="inline-logo" src="img/hearts.png">' + (stats[1]||"?");
111
+        result += '<img class="inline-logo" src="img/shield.png">' + (stats[2]||"?");
112
+        result += '</div>';
113
+    }
107
     return result;
114
     return result;
108
 }
115
 }
109
 
116
 

Loading…
Zrušit
Uložit