<!DOCTYPE html>
<html lang="de">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Abenteuerblatt - {{.Character.Name}}</title>
    <link rel="stylesheet" href="shared/export_format_a4_quer.css">
</head>
<body>
    <div class="container">
        <div class="header">
            <span class="header-left">Abenteuerblatt</span>
            <span class="header-right">Datum: {{.Meta.Date}}</span>
        </div>        
        <div class="title-row">
            <img src="shared/images/headerimg.png" alt="Schmuckgrafik" class="header-decoration">
            <div class="info-box">
                <div><strong>Figur</strong> {{.Character.Name}} &nbsp;&nbsp; <strong>Grad</strong> {{.Character.Grade}}</div>
                <hr>
                <div><strong>Typ</strong> {{.Character.Type}} &nbsp;&nbsp; <strong>GG</strong> {{.DerivedValues.GG}} &nbsp;&nbsp; <strong>SG</strong> {{.DerivedValues.SG}}</div>
            </div>
            <img src="shared/images/headerimg.png" alt="Schmuckgrafik" class="header-decoration">
        </div>        
        <div class="flex main-content">
            <!-- Left section -->
            <div class="left-section">
                <!-- Stats boxes top -->
                <div class="stats-row">
                    <div class="attr-box"><div class="attr-label">St</div><div class="attr-value">{{.Attributes.St}}</div></div>
                    <div class="attr-box"><div class="attr-label">Gs</div><div class="attr-value">{{.Attributes.Gs}}</div></div>
                    <div class="attr-box"><div class="attr-label">Gw</div><div class="attr-value">{{.Attributes.Gw}}</div></div>
                    <div class="attr-box"><div class="attr-label">Ko</div><div class="attr-value">{{.Attributes.Ko}}</div></div>
                    <div class="attr-box"><div class="attr-label">In</div><div class="attr-value">{{.Attributes.In}}</div></div>
                </div>
                <div class="stats-row">
                    <div class="attr-box"><div class="attr-label">Zt</div><div class="attr-value">{{.Attributes.Zt}}</div></div>
                    <div class="attr-box"><div class="attr-label">Au</div><div class="attr-value">{{.Attributes.Au}}</div></div>
                    <div class="attr-box"><div class="attr-label">pA</div><div class="attr-value">{{.Attributes.PA}}</div></div>
                    <div class="attr-box"><div class="attr-label">Wk</div><div class="attr-value">{{.Attributes.Wk}}</div></div>
                    <div class="attr-box"><div class="attr-label">B</div><div class="attr-value">{{.Attributes.B}}</div></div>
                </div>                
                <!-- Combat stats -->
                <div class="combat-stats">
                    <div><strong>Abwehr + {{.DerivedValues.Abwehr}}+{{.DerivedValues.AbwehrBonus}}</strong></div>
                    <div><strong>+</strong> <span class="combat-stats-small">mit Vert. waffe</span></div>
                    <div><strong>Resistenz + {{.DerivedValues.ResistenzKoerper}}+{{.DerivedValues.ResistenzBonusKoerper}}/{{.DerivedValues.ResistenzGeist}}+{{.DerivedValues.ResistenzBonusGeist}}</strong></div>
                    <div><strong>Zaubern + {{.DerivedValues.Zaubern}}+{{.DerivedValues.ZauberBonus}}</strong></div>
                </div>                
                <!-- Skills tables -->
                <div class="skills-row">
                    <!-- BLOCK: skills_learned, TYPE: skills, MAX: 19, FILTER: learned -->
                    <table class="skills-table">
                        <tr>
                            <th>Fertigkeit</th>
                            <th>EW</th>
                            <th>PP</th>
                        </tr>
                        {{range .SkillsLearned}}
                        <tr><td>{{.Name}}{{if .Bemerkung}}:<span style="font-size: smaller;">{{.Bemerkung}}</span>{{end}}</td><td>{{if .Value}}+ {{.Value}}{{else}}&nbsp;{{end}}</td><td>{{if .PracticePoints}}{{.PracticePoints}}{{end}}</td></tr>
                        {{end}}
                    </table>
                    <div class="skills-stack">
                        <!-- BLOCK: skills_unlearned, TYPE: skills, MAX: 15, FILTER: unlearned -->
                        <table class="skills-col-table">
                            <tr>
                                <th colspan="2"><em>ungelernte Fertigkeiten</em></th>
                            </tr>
                            <tr><td colspan="2" class="unlearned-small">alle wenigstens +(0) außer Musizieren, Schreiben, Sprache, Lesen von Zauberschrift</td></tr>
                            <tr><td>Akrobatik+(6)</td>       <td>Stehlen+(3)</td></tr>
                            <tr><td>Athletik+(6)</td>        <td>Tanzen+(6)</td></tr>
                            <tr><td>Balancieren+(6)</td>     <td>Tarnen+(3)</td></tr>
                            <tr><td>Betäubungsgriff+(6)</td> <td>Tauchen~(6)</td></tr>
                            <tr><td>Bootfahren+(3)</td>      <td>Trinken+(3)</td></tr>
                            <tr><td>Einschüchtern+(3)</td>   <td>Überreden+(6)</td></tr>
                            <tr><td>Klettern+(6)</td>        <td>Verführen+(3)</td></tr>
                            <tr><td>Menschenkenntnis+(3)</td><td>Verfroren+(3)</td></tr>
                            <tr><td>Reiten+(6)</td>          <td>Verstecken+(3)</td></tr>
                            <tr><td>Schwimmen+(3)</td>       <td>Wahrnehmung+(6)</td></tr>
                            <tr><td>Seilkunst+(3)</td>       <td>&nbsp;</td></tr>
                        </table>
                        <!-- BLOCK: skills_languages, TYPE: skills, MAX: 5, FILTER: language -->
                        <table class="skills-table" style="width: 100%; height: unset;">
                            <tr>
                                <th>Fertigkeit</th>
                                <th>EW</th>
                                <th>PP</th>
                            </tr>
                            {{range .SkillsLanguage}}
                            <tr><td>{{.Name}}{{if .Bemerkung}}:<span style="font-size: smaller;">{{.Bemerkung}}</span>{{end}}</td><td>{{if .Value}}+ {{.Value}}{{else}}&nbsp;{{end}}</td><td>{{if .PracticePoints}}{{.PracticePoints}}{{end}}</td></tr>
                            {{end}}
                        </table>
                    </div>
                </div>
            </div>            
            <!-- Right section -->
            <div class="right-section">
                <div>
                    <table class="table">
                    <tr>
                        <td>LP {{.DerivedValues.LPMax}}</td>
                        {{range $i := iterate 13}}<td>&nbsp;&nbsp;&nbsp;&nbsp;</td>{{end}}
                    </tr><tr>
                        <td>AP {{.DerivedValues.APMax}}</td>
                        {{range $i := iterate 13}}<td>&nbsp;&nbsp;&nbsp;&nbsp;</td>{{end}}
                    </tr>
                    </table>
                </div>
                <!-- Bonus table -->
                <div class="margin-bottom-3">
                    <table class="bonus-table">
                        <tr>
                            <th colspan="3">Bonus für:</th>
                            <th rowspan="2">Rüstung</th>
                            <th colspan="2"><strong>RK</strong> {{.DerivedValues.RKShort}}</th>
                            <th colspan="2">-{{.DerivedValues.RKSave}} auf LP-Verlust</th>
                        </tr>
                        <tr>
                            <td><strong>Schaden</strong></td>
                            <td><strong>Angriff</strong></td>
                            <td><strong>Abwehr</strong></td>
                           
                            <td rowspan="4" colspan="3">mit Rüstung</td>
                            <td rowspan="2" colspan="2"><strong>B</strong> {{.Attributes.B}}-{{.DerivedValues.RKMalus}}</td>
                        </tr>
                        <tr>
                            <td>{{.DerivedValues.SchadenBonus}}</td>
                            <td>{{.DerivedValues.AngriffBonus}}</td>
                            <td>{{.DerivedValues.AbwehrBonus}}</td>
                            <td rowspan="2">{{.DerivedValues.RKName}}</td>
                        </tr>
                        <tr>
                            <td>mit<br>Rüstung</td>
                            <td>{{.DerivedValues.AngriffBonus}}-{{.DerivedValues.RKMalus}}</td>
                            <td>{{.DerivedValues.AbwehrBonus}}-{{.DerivedValues.RKMalus}}</td>
                            
                            <td rowspan="2"><strong>Gw</strong> {{.Attributes.Gw}}-{{.DerivedValues.RKMalus}} </td>
                        </tr>
                    </table>
                </div>
                
                <!-- Weapons table -->
                <div class="margin-bottom-3">
                    <!-- BLOCK: weapons_main, TYPE: weapons, MAX: 21 -->
                    <table class="weapons-table">
                        <tr>
                            <th>Waffe</th>
                            <th>Fert.<br>wert</th>
                            <th>Schaden</th>
                            <th>Reichweite<br/>nah/mitte/fern</th>
                        </tr>
                        {{range .Weapons}}
                        <tr>
                            <td>{{.Name}}</td>
                            <td>{{if .Value}}{{.Value}}{{else}}&nbsp;{{end}}</td>
                            <td>{{if .Damage}}{{.Damage}}{{else}}&nbsp;{{end}}</td>
                            <td>{{if .Range}}{{.Range}}{{else}}&nbsp;{{end}}</td>
                        </tr>
                        {{end}}
                    </table>
                </div>
                
                <!-- Senses row at bottom -->
                <div class="senses-row">
                    <span><b>Sehen</b> +{{.DerivedValues.Sehen}}</span>
                    <span><b>Nachtsicht</b> +{{.DerivedValues.Sehen}}</span>
                    <span><b>Hören</b> +{{.DerivedValues.Horen}}</span>
                    <span><b>Riechen/Schmecken</b> +{{.DerivedValues.Riechen}}</span>
                    <span><b>Sechster Sinn</b> +{{.DerivedValues.Sechster}}</span>
                </div>
            </div>
        </div>
    </div>
</body>
</html>
