Daevanion-Bretter mit Runen wie im Spiel (grau = Werte, gruen = passive, blau = aktive Skills, orange = grosse Felder; je inaktiv/aktiv) statt Punkten - im Planer, im Guide, in der Vorschau "Aus dem Spiel" und im Profil-Popup; Guide-Abschnitt Daevanion mit Kristall-Leisten, Reitern je Brett und dem Brett selbst samt Werten und Skill-Boni
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
@ -6758,12 +6758,42 @@ button.gear-guide-skill:hover { border-color: var(--gold); transform: translateY
|
||||||
.gear-guide-stat-note { display: block; color: var(--text-muted); font-size: 0.78rem; line-height: 1.3; }
|
.gear-guide-stat-note { display: block; color: var(--text-muted); font-size: 0.78rem; line-height: 1.3; }
|
||||||
.gear-guide-stat-row { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1.2fr); align-items: center; gap: 0.5rem; margin-bottom: 0.45rem; }
|
.gear-guide-stat-row { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1.2fr); align-items: center; gap: 0.5rem; margin-bottom: 0.45rem; }
|
||||||
.gear-guide-daevanion { margin-bottom: 1rem; }
|
.gear-guide-daevanion { margin-bottom: 1rem; }
|
||||||
.gear-guide-dv-boards { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 0.5rem; margin-bottom: 1rem; }
|
|
||||||
.gear-guide-dv-board { display: flex; flex-direction: column; gap: 0.1rem; padding: 0.55rem 0.75rem; border: 1px solid var(--border); border-radius: 10px; background: rgba(0, 0, 0, 0.2); opacity: 0.55; }
|
|
||||||
.gear-guide-dv-board.is-used { border-color: rgba(201, 162, 39, 0.5); background: rgba(201, 162, 39, 0.08); opacity: 1; }
|
|
||||||
.gear-guide-dv-board strong { font-size: 0.92rem; }
|
|
||||||
.gear-guide-dv-board span { color: var(--gold); font-weight: 700; font-size: 0.85rem; }
|
|
||||||
.gear-guide-dv-note { margin-bottom: 1rem; }
|
.gear-guide-dv-note { margin-bottom: 1rem; }
|
||||||
|
/* Guide: Daevanion mit Kristall-Leisten, Reitern je Brett und dem Brett selbst (Runen, includes/gear_guide.php) */
|
||||||
|
.gear-guide-dv-budgets { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0.5rem; margin-bottom: 1rem; }
|
||||||
|
.gear-guide-dv-budget {
|
||||||
|
position: relative; display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; padding: 0.6rem 0.8rem 0.85rem;
|
||||||
|
border: 1px solid var(--border); border-radius: 10px; background: rgba(0, 0, 0, 0.2); overflow: hidden;
|
||||||
|
}
|
||||||
|
.gear-guide-dv-budget span { color: var(--text-muted); font-size: 0.82rem; }
|
||||||
|
.gear-guide-dv-budget strong { color: var(--gold); font-size: 1.15rem; }
|
||||||
|
.gear-guide-dv-budget strong small { color: var(--text-muted); font-size: 0.8rem; font-weight: 400; }
|
||||||
|
.gear-guide-dv-budget i { position: absolute; left: 0.8rem; right: 0.8rem; bottom: 0.4rem; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.08); }
|
||||||
|
.gear-guide-dv-budget i::after { content: ''; position: absolute; inset: 0 auto 0 0; width: var(--fill); border-radius: 2px; background: linear-gradient(90deg, #a07d1c, #e3bd6e); box-shadow: 0 0 6px rgba(227, 189, 110, 0.5); }
|
||||||
|
.gear-guide-dv-budget.is-skills strong { color: #8fd0ff; }
|
||||||
|
.gear-guide-dv-tabs { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.8rem; }
|
||||||
|
.gear-guide-dv-tab {
|
||||||
|
position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 0.1rem; min-width: 7.5rem; padding: 0.45rem 0.8rem 0.6rem;
|
||||||
|
border: 1px solid var(--border); border-radius: 10px; background: rgba(0, 0, 0, 0.2); box-shadow: none; color: var(--text); font-weight: 400; overflow: hidden;
|
||||||
|
}
|
||||||
|
.gear-guide-dv-tab::after { content: ''; position: absolute; left: 0; bottom: 0; height: 3px; width: var(--fill); background: rgba(201, 162, 39, 0.75); }
|
||||||
|
.gear-guide-dv-tab span { color: var(--text-muted); font-size: 0.78rem; }
|
||||||
|
.gear-guide-dv-tab:hover { border-color: var(--gold); background: rgba(201, 162, 39, 0.07); color: var(--text); box-shadow: none; }
|
||||||
|
.gear-guide-dv-tab.is-active { border-color: var(--gold); background: rgba(201, 162, 39, 0.13); }
|
||||||
|
.gear-guide-dv-tab.is-active strong { color: var(--gold); }
|
||||||
|
.gear-guide-dv-pane { display: grid; grid-template-columns: minmax(0, 1fr) minmax(200px, 300px); gap: 1rem; align-items: start; margin-bottom: 1rem; }
|
||||||
|
.gear-guide-dv-pane[hidden] { display: none; }
|
||||||
|
.gear-guide-dv-board { width: min(100%, 560px); justify-self: center; }
|
||||||
|
.gear-guide-dv-board .gear-dv-grid { border: 1px solid rgba(201, 162, 39, 0.18); }
|
||||||
|
.gear-guide-dv-side .gear-skills-kind { margin-top: 0; }
|
||||||
|
.gear-guide-dv-legend { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; margin: 0 0 0.8rem; padding: 0; list-style: none; color: var(--text-muted); font-size: 0.8rem; }
|
||||||
|
.gear-guide-dv-legend li { display: flex; align-items: center; gap: 0.35rem; }
|
||||||
|
.gear-guide-dv-total { border-top: 1px solid var(--border); padding-top: 0.6rem; }
|
||||||
|
.gear-guide-dv-total summary { cursor: pointer; color: var(--text-muted); font-size: 0.88rem; }
|
||||||
|
.gear-guide-dv-total[open] summary { margin-bottom: 0.4rem; }
|
||||||
|
@media (max-width: 760px) {
|
||||||
|
.gear-guide-dv-pane { grid-template-columns: minmax(0, 1fr); }
|
||||||
|
}
|
||||||
.gear-guide-dv-columns .gear-skills-kind { margin: 0.5rem 0; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
|
.gear-guide-dv-columns .gear-skills-kind { margin: 0.5rem 0; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
|
||||||
.gear-guide-gear-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; margin-bottom: 1rem; }
|
.gear-guide-gear-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; margin-bottom: 1rem; }
|
||||||
.gear-guide-gear-stat { display: flex; flex-direction: column; gap: 0.2rem; padding: 0.6rem 0.7rem; border: 1px solid var(--border); border-radius: 10px; background: rgba(0, 0, 0, 0.22); min-width: 0; }
|
.gear-guide-gear-stat { display: flex; flex-direction: column; gap: 0.2rem; padding: 0.6rem 0.7rem; border: 1px solid var(--border); border-radius: 10px; background: rgba(0, 0, 0, 0.22); min-width: 0; }
|
||||||
|
|
@ -8041,6 +8071,23 @@ label.gear-dv-node.is-open:hover .gear-dv-cell, label.gear-dv-node.is-on:hover .
|
||||||
.gear-dv-node.grade-common .gear-dv-dot { width: 24%; height: 24%; }
|
.gear-dv-node.grade-common .gear-dv-dot { width: 24%; height: 24%; }
|
||||||
.gear-dv-node.is-start .gear-dv-cell { font-size: 1.05rem; }
|
.gear-dv-node.is-start .gear-dv-cell { font-size: 1.05rem; }
|
||||||
.gear-dv-node.link-r::after, .gear-dv-node.link-d::before { content: ''; position: absolute; background: rgba(227, 189, 110, 0.55); z-index: 0; }
|
.gear-dv-node.link-r::after, .gear-dv-node.link-d::before { content: ''; position: absolute; background: rgba(227, 189, 110, 0.55); z-index: 0; }
|
||||||
|
/* Felder als Runen wie im Spiel (includes/gear_planner_view.php gear_daevanion_rune_class): grau = Werte, gruen = passive,
|
||||||
|
blau = aktive Skills, orange = grosse Felder; inaktiv dunkel, aktiv mit Rahmen und Leuchten */
|
||||||
|
.rune-common { --rune-off: url('../images/daevanion/common-off.png'); --rune-on: url('../images/daevanion/common-on.png'); --rune-glow: rgba(214, 196, 150, 0.45); }
|
||||||
|
.rune-passive { --rune-off: url('../images/daevanion/passive-off.png'); --rune-on: url('../images/daevanion/passive-on.png'); --rune-glow: rgba(74, 200, 120, 0.6); }
|
||||||
|
.rune-active { --rune-off: url('../images/daevanion/active-off.png'); --rune-on: url('../images/daevanion/active-on.png'); --rune-glow: rgba(80, 150, 255, 0.6); }
|
||||||
|
.rune-unique { --rune-off: url('../images/daevanion/unique-off.png'); --rune-on: url('../images/daevanion/unique-on.png'); --rune-glow: rgba(255, 140, 50, 0.65); }
|
||||||
|
.gear-dv-node[class*=" rune-"] .gear-dv-cell {
|
||||||
|
width: 94%; height: 94%; border: none; border-radius: 14%;
|
||||||
|
background: var(--rune-off) center / contain no-repeat; box-shadow: none;
|
||||||
|
}
|
||||||
|
.gear-dv-node[class*=" rune-"].is-on .gear-dv-cell { background-image: var(--rune-on); box-shadow: 0 0 7px var(--rune-glow); }
|
||||||
|
.gear-dv-node[class*=" rune-"].is-open .gear-dv-cell { box-shadow: 0 0 0 1px rgba(201, 162, 39, 0.55), 0 0 6px rgba(201, 162, 39, 0.25); filter: brightness(1.3); }
|
||||||
|
label.gear-dv-node[class*=" rune-"]:hover .gear-dv-cell { filter: brightness(1.35); }
|
||||||
|
.gear-dv-node.rune-unique .gear-dv-cell { width: 100%; height: 100%; }
|
||||||
|
/* Bilder der aktiven Runen schon vorab laden, damit beim Anklicken nichts flackert */
|
||||||
|
.gear-dv-grid { position: relative; }
|
||||||
|
.gear-dv-grid::before { content: ''; position: absolute; left: 0; top: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; background: url('../images/daevanion/common-on.png'), url('../images/daevanion/passive-on.png'), url('../images/daevanion/active-on.png'), url('../images/daevanion/unique-on.png'); }
|
||||||
.gear-dv-node.link-r::after { left: 50%; top: calc(50% - 1px); width: 100%; height: 2px; }
|
.gear-dv-node.link-r::after { left: 50%; top: calc(50% - 1px); width: 100%; height: 2px; }
|
||||||
.gear-dv-node.link-d::before { top: 50%; left: calc(50% - 1px); width: 2px; height: 100%; }
|
.gear-dv-node.link-d::before { top: 50%; left: calc(50% - 1px); width: 2px; height: 100%; }
|
||||||
.gear-dv-side { width: min(100%, 680px); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.5rem; align-items: start; font-size: 0.88rem; }
|
.gear-dv-side { width: min(100%, 680px); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.5rem; align-items: start; font-size: 0.88rem; }
|
||||||
|
|
|
||||||
BIN
assets/images/daevanion/active-off.png
Normal file
|
After Width: | Height: | Size: 7.7 KiB |
BIN
assets/images/daevanion/active-on.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
assets/images/daevanion/common-off.png
Normal file
|
After Width: | Height: | Size: 7.4 KiB |
BIN
assets/images/daevanion/common-on.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
assets/images/daevanion/passive-off.png
Normal file
|
After Width: | Height: | Size: 8.7 KiB |
BIN
assets/images/daevanion/passive-on.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
assets/images/daevanion/unique-off.png
Normal file
|
After Width: | Height: | Size: 8.4 KiB |
BIN
assets/images/daevanion/unique-on.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
|
|
@ -85,4 +85,22 @@
|
||||||
};
|
};
|
||||||
input.addEventListener('input', update);
|
input.addEventListener('input', update);
|
||||||
});
|
});
|
||||||
|
// Daevanion: ein Brett nach dem anderen ueber die Reiter (ohne JavaScript stehen alle Bretter untereinander)
|
||||||
|
document.querySelectorAll('[data-guide-dv]').forEach(function (section) {
|
||||||
|
var tabs = section.querySelectorAll('[data-guide-dv-tab]');
|
||||||
|
var panes = section.querySelectorAll('[data-guide-dv-pane]');
|
||||||
|
if (tabs.length < 2) return;
|
||||||
|
var show = function (id) {
|
||||||
|
panes.forEach(function (pane) { pane.hidden = pane.getAttribute('data-guide-dv-pane') !== id; });
|
||||||
|
tabs.forEach(function (tab) {
|
||||||
|
var active = tab.getAttribute('data-guide-dv-tab') === id;
|
||||||
|
tab.classList.toggle('is-active', active);
|
||||||
|
tab.setAttribute('aria-selected', active ? 'true' : 'false');
|
||||||
|
});
|
||||||
|
};
|
||||||
|
tabs.forEach(function (tab) {
|
||||||
|
tab.addEventListener('click', function () { show(tab.getAttribute('data-guide-dv-tab')); });
|
||||||
|
});
|
||||||
|
show(tabs[0].getAttribute('data-guide-dv-tab'));
|
||||||
|
});
|
||||||
})();
|
})();
|
||||||
|
|
|
||||||
|
|
@ -1013,12 +1013,6 @@ function armory_daevanion_html(array $data): string
|
||||||
if (!$boards) {
|
if (!$boards) {
|
||||||
return '<p class="text-muted armory-empty">Noch kein Daevanion-Board freigeschaltet.</p>';
|
return '<p class="text-muted armory-empty">Noch kein Daevanion-Board freigeschaltet.</p>';
|
||||||
}
|
}
|
||||||
// Skill-Icons fuer die Skillfelder ("Schutzformation +1" -> Icon von "Schutzformation")
|
|
||||||
$skillIcons = [];
|
|
||||||
foreach ($data['skills'] ?? [] as $skill) {
|
|
||||||
$skillIcons[mb_strtolower($skill['name'])] = $skill['icon'];
|
|
||||||
}
|
|
||||||
|
|
||||||
$html = '<div class="gear-tabs armory-board-tabs" role="tablist">';
|
$html = '<div class="gear-tabs armory-board-tabs" role="tablist">';
|
||||||
foreach ($boards as $index => $board) {
|
foreach ($boards as $index => $board) {
|
||||||
$iconUrl = armory_icon_url($board['icon']);
|
$iconUrl = armory_icon_url($board['icon']);
|
||||||
|
|
@ -1047,15 +1041,11 @@ function armory_daevanion_html(array $data): string
|
||||||
$html .= '<div class="gear-dv-layout armory-dv-layout"><div class="gear-dv-scroll"><div class="gear-dv-grid" style="--cols: '
|
$html .= '<div class="gear-dv-layout armory-dv-layout"><div class="gear-dv-scroll"><div class="gear-dv-grid" style="--cols: '
|
||||||
. (max($cols) - $minC + 1) . '; --rows: ' . (max($rows) - $minR + 1) . '">';
|
. (max($cols) - $minC + 1) . '; --rows: ' . (max($rows) - $minR + 1) . '">';
|
||||||
foreach ($board['nodes'] as [$r, $c, $type, $grade, $isOpen, $name, $effect]) {
|
foreach ($board['nodes'] as [$r, $c, $type, $grade, $isOpen, $name, $effect]) {
|
||||||
$classes = 'gear-dv-node ' . armory_grade_class($grade) . ' is-' . $type . ($isOpen ? ' is-on' : '')
|
// Runen wie im Gear-Planer (gear_daevanion_rune_class): Rare = passive, Legend = aktive Skills, Unique = grosse Felder
|
||||||
|
$rune = $type === 'start' ? '' : ' rune-' . (['Rare' => 'passive', 'Legend' => 'active', 'Unique' => 'unique', 'Epic' => 'unique', 'Mythic' => 'unique'][$grade] ?? 'common');
|
||||||
|
$classes = 'gear-dv-node ' . armory_grade_class($grade) . ' is-' . $type . $rune . ($isOpen ? ' is-on' : '')
|
||||||
. ($isOpen && isset($open[$r . ',' . ($c + 1)]) ? ' link-r' : '') . ($isOpen && isset($open[($r + 1) . ',' . $c]) ? ' link-d' : '');
|
. ($isOpen && isset($open[$r . ',' . ($c + 1)]) ? ' link-r' : '') . ($isOpen && isset($open[($r + 1) . ',' . $c]) ? ' link-d' : '');
|
||||||
$skillIcon = $type === 'skill' ? armory_icon_url($skillIcons[mb_strtolower((string) preg_replace('/\s*[+-]\d+$/', '', $effect))] ?? '') : null;
|
$inner = $type === 'start' ? '◆' : '';
|
||||||
$inner = match (true) {
|
|
||||||
$skillIcon !== null => '<img src="' . e($skillIcon) . '" alt="" loading="lazy">',
|
|
||||||
$type === 'start' => '◆',
|
|
||||||
$type === 'skill' => '<i class="gear-dv-skill-dot"></i>',
|
|
||||||
default => '<i class="gear-dv-dot"></i>',
|
|
||||||
};
|
|
||||||
$title = $type === 'start' ? 'Startfeld' : trim($name . ($effect !== '' ? ': ' . $effect : '')) . ($isOpen ? '' : ' (nicht freigeschaltet)');
|
$title = $type === 'start' ? 'Startfeld' : trim($name . ($effect !== '' ? ': ' . $effect : '')) . ($isOpen ? '' : ' (nicht freigeschaltet)');
|
||||||
$html .= '<span class="' . e($classes) . '" style="grid-area:' . ($r - $minR + 1) . '/' . ($c - $minC + 1) . '" title="' . e($title) . '">'
|
$html .= '<span class="' . e($classes) . '" style="grid-area:' . ($r - $minR + 1) . '/' . ($c - $minC + 1) . '" title="' . e($title) . '">'
|
||||||
. '<span class="gear-dv-cell">' . $inner . '</span></span>';
|
. '<span class="gear-dv-cell">' . $inner . '</span></span>';
|
||||||
|
|
|
||||||
|
|
@ -858,29 +858,87 @@ function gear_render_guide_tab(array $set, bool $isOwn, array $slots, array $pla
|
||||||
$dvTotals = $dvBoards ? gear_daevanion_totals($plans['daevanion'] ?? [], $class) : null;
|
$dvTotals = $dvBoards ? gear_daevanion_totals($plans['daevanion'] ?? [], $class) : null;
|
||||||
?>
|
?>
|
||||||
<?php if ($dvBoards && ($dvTotals['spent'] || $guide['daevanion'] !== '')): ?>
|
<?php if ($dvBoards && ($dvTotals['spent'] || $guide['daevanion'] !== '')): ?>
|
||||||
<section class="panel gear-guide-section gear-guide-daevanion">
|
<?php
|
||||||
|
// Nur Bretter mit aktivierten Feldern als Reiter; das Brett selbst wie auf der Seite Daevanion (Runen, nur ansehen)
|
||||||
|
$dvChosen = array_flip(array_map('intval', $plans['daevanion']['nodes'] ?? []));
|
||||||
|
$dvUsed = array_values(array_filter($dvBoards, static fn (array $board): bool => ($dvTotals['boards'][(int) $board['id']]['count'] ?? 0) > 0));
|
||||||
|
$dvSkills = gear_plan_class_skills($class);
|
||||||
|
?>
|
||||||
|
<section class="panel gear-guide-section gear-guide-daevanion" data-guide-dv>
|
||||||
<div class="gear-guide-section-head">
|
<div class="gear-guide-section-head">
|
||||||
<h3>Daevanion</h3>
|
<h3>Daevanion</h3>
|
||||||
<span class="text-muted gear-guide-legend"><?= e(gear_daevanion_line($dvTotals, $class)) ?></span>
|
|
||||||
<a href="<?= e($setUrl) ?>&tab=daevanion">Daevanion öffnen →</a>
|
<a href="<?= e($setUrl) ?>&tab=daevanion">Daevanion öffnen →</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="gear-guide-dv-boards">
|
<?php if ($dvTotals['spent']): ?>
|
||||||
<?php foreach ($dvBoards as $board): ?>
|
<div class="gear-guide-dv-budgets">
|
||||||
<?php $boardTotals = $dvTotals['boards'][(int) $board['id']] ?? ['count' => 0, 'total' => count($board['nodes'])]; ?>
|
<?php foreach ($dvTotals['spent'] as $point => $spent): ?>
|
||||||
<span class="gear-guide-dv-board<?= $boardTotals['count'] > 0 ? ' is-used' : '' ?>">
|
<?php $max = gear_daevanion_max((string) $point, $class); ?>
|
||||||
<strong><?= e($board['title']) ?></strong>
|
<div class="gear-guide-dv-budget">
|
||||||
<span><?= (int) $boardTotals['count'] ?> / <?= (int) $boardTotals['total'] ?></span>
|
<span><?= e(gear_daevanion_point_label((string) $point)) ?></span>
|
||||||
<small class="text-muted">ab Lv <?= (int) $board['need'] ?></small>
|
<strong><?= (int) $spent ?><small> / <?= $max ?></small></strong>
|
||||||
</span>
|
<i style="--fill: <?= $max > 0 ? min(100, round($spent / $max * 100, 1)) : 0 ?>%"></i>
|
||||||
<?php endforeach; ?>
|
</div>
|
||||||
</div>
|
<?php endforeach; ?>
|
||||||
|
<?php if ($dvTotals['skills']): ?>
|
||||||
|
<div class="gear-guide-dv-budget is-skills">
|
||||||
|
<span>Skillstufen aus Daevanion</span>
|
||||||
|
<strong>+<?= (int) array_sum($dvTotals['skills']) ?></strong>
|
||||||
|
</div>
|
||||||
|
<?php endif; ?>
|
||||||
|
</div>
|
||||||
|
<?php endif; ?>
|
||||||
<?php if ($guide['daevanion'] !== ''): ?>
|
<?php if ($guide['daevanion'] !== ''): ?>
|
||||||
<div class="gear-description-text gear-guide-dv-note"><?= gear_guide_rich_html($guide['daevanion'], $class) ?></div>
|
<div class="gear-description-text gear-guide-dv-note"><?= gear_guide_rich_html($guide['daevanion'], $class) ?></div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php if ($dvTotals['spent']): ?>
|
<?php if ($dvUsed): ?>
|
||||||
<div class="gear-guide-dv-columns">
|
<div class="gear-guide-dv-tabs" role="tablist">
|
||||||
<div><?= gear_daevanion_summary_html($dvTotals, $class) ?></div>
|
<?php foreach ($dvUsed as $index => $board): ?>
|
||||||
|
<?php $boardTotals = $dvTotals['boards'][(int) $board['id']]; ?>
|
||||||
|
<button type="button" class="gear-guide-dv-tab<?= $index === 0 ? ' is-active' : '' ?>" role="tab" data-guide-dv-tab="<?= (int) $board['id'] ?>"
|
||||||
|
aria-selected="<?= $index === 0 ? 'true' : 'false' ?>" style="--fill: <?= round($boardTotals['count'] / max(1, $boardTotals['total']) * 100, 1) ?>%">
|
||||||
|
<strong><?= e($board['title']) ?></strong>
|
||||||
|
<span><?= (int) $boardTotals['count'] ?>/<?= (int) $boardTotals['total'] ?> Felder</span>
|
||||||
|
</button>
|
||||||
|
<?php endforeach; ?>
|
||||||
</div>
|
</div>
|
||||||
|
<?php foreach ($dvUsed as $index => $board): ?>
|
||||||
|
<?php
|
||||||
|
$at = [];
|
||||||
|
foreach ($board['nodes'] as $node) {
|
||||||
|
$at[$node['r'] . ',' . $node['c']] = (int) $node['id'];
|
||||||
|
}
|
||||||
|
$rows = array_column($board['nodes'], 'r');
|
||||||
|
$cols = array_column($board['nodes'], 'c');
|
||||||
|
?>
|
||||||
|
<div class="gear-guide-dv-pane" role="tabpanel" data-guide-dv-pane="<?= (int) $board['id'] ?>">
|
||||||
|
<div class="gear-guide-dv-board">
|
||||||
|
<div class="gear-dv-grid" style="--cols: <?= max($cols) - min($cols) + 1 ?>; --rows: <?= max($rows) - min($rows) + 1 ?>">
|
||||||
|
<?php
|
||||||
|
foreach ($board['nodes'] as $node) {
|
||||||
|
echo gear_daevanion_node_html($node, min($rows), min($cols), $dvChosen, $at, $dvSkills, $class, false), "
|
||||||
|
";
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="gear-guide-dv-side">
|
||||||
|
<h4 class="gear-skills-kind"><?= e($board['title']) ?> <span class="text-muted">· ab Stufe <?= (int) $board['need'] ?></span></h4>
|
||||||
|
<?= gear_daevanion_board_side_html($board, $dvTotals, $class) ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
<ul class="gear-guide-dv-legend">
|
||||||
|
<?php foreach (['common' => 'Werte', 'passive' => 'Passive Skills', 'active' => 'Aktive Skills', 'unique' => 'Große Felder'] as $rune => $label): ?>
|
||||||
|
<li><img src="/assets/images/daevanion/<?= $rune ?>-on.png" alt="" width="20" height="20"><?= e($label) ?></li>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
<li><img src="/assets/images/daevanion/common-off.png" alt="" width="20" height="20">nicht aktiviert</li>
|
||||||
|
</ul>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if ($dvTotals['spent']): ?>
|
||||||
|
<details class="gear-guide-dv-total">
|
||||||
|
<summary>Werte und Skill-Boni aller Bretter</summary>
|
||||||
|
<div class="gear-guide-dv-columns"><?= gear_daevanion_summary_html($dvTotals, $class) ?></div>
|
||||||
|
</details>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</section>
|
</section>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
|
||||||
|
|
@ -640,6 +640,21 @@ function gear_daevanion_node_title(array $node, ?string $class): string
|
||||||
return $grade . ' · ' . implode(', ', $stats) . ' · ' . $cost;
|
return $grade . ' · ' . implode(', ', $stats) . ' · ' . $cost;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rune eines Feldes wie im Spiel: grau = normale Wertefelder, gruen = passive Skills, blau = aktive Skills,
|
||||||
|
* orange = die grossen Felder (Seltenheit Unique). Bei NCSoft/aion2hub sind Skillfelder der Seltenheit Rare immer
|
||||||
|
* passive und Legend/Epic immer aktive Skills - die Rune richtet sich deshalb nach der Seltenheit (auch beim Saison-Brett).
|
||||||
|
*/
|
||||||
|
function gear_daevanion_rune_class(array $node): string
|
||||||
|
{
|
||||||
|
return 'rune-' . match ((int) $node['g']) {
|
||||||
|
2 => 'passive',
|
||||||
|
3 => 'active',
|
||||||
|
4, 5, 6 => 'unique',
|
||||||
|
default => 'common',
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Ein Feld eines Bretts (eigenes Set: zum Anhaken). Position im Raster, Seltenheit als Farbe, Linien zu
|
* Ein Feld eines Bretts (eigenes Set: zum Anhaken). Position im Raster, Seltenheit als Farbe, Linien zu
|
||||||
* aktiven Nachbarn rechts/unten (link-r/link-d), Skillfelder mit dem Icon des Skills.
|
* aktiven Nachbarn rechts/unten (link-r/link-d), Skillfelder mit dem Icon des Skills.
|
||||||
|
|
@ -654,15 +669,10 @@ function gear_daevanion_node_html(array $node, int $minR, int $minC, array $chos
|
||||||
$right = $at[$node['r'] . ',' . ($node['c'] + 1)] ?? null;
|
$right = $at[$node['r'] . ',' . ($node['c'] + 1)] ?? null;
|
||||||
$down = $at[($node['r'] + 1) . ',' . $node['c']] ?? null;
|
$down = $at[($node['r'] + 1) . ',' . $node['c']] ?? null;
|
||||||
$grade = strtolower(GEAR_PLANNER_GRADE_NUMBERS[(int) $node['g']] ?? 'Common');
|
$grade = strtolower(GEAR_PLANNER_GRADE_NUMBERS[(int) $node['g']] ?? 'Common');
|
||||||
$classes = 'gear-dv-node grade-' . $grade . ' is-' . $node['type'] . ($on ? ' is-on' : '')
|
$classes = 'gear-dv-node grade-' . $grade . ' is-' . $node['type'] . ($node['type'] !== 'start' ? ' ' . gear_daevanion_rune_class($node) : '') . ($on ? ' is-on' : '')
|
||||||
. ($on && $right !== null && isset($chosen[$right]) ? ' link-r' : '') . ($on && $down !== null && isset($chosen[$down]) ? ' link-d' : '');
|
. ($on && $right !== null && isset($chosen[$right]) ? ' link-r' : '') . ($on && $down !== null && isset($chosen[$down]) ? ' link-d' : '');
|
||||||
$skillIcon = $node['type'] === 'skill' ? gear_skill_icon_url($skills[(int) $node['skill']] ?? null) : null;
|
// Felder als Runen wie im Spiel (assets/images/daevanion, Bild je nach aktiv/inaktiv per CSS), nur das Startfeld als ◆
|
||||||
$inner = match (true) {
|
$inner = $node['type'] === 'start' ? '◆' : '';
|
||||||
$skillIcon !== null => '<img src="' . e($skillIcon) . '" alt="" loading="lazy">',
|
|
||||||
$node['type'] === 'start' => '◆',
|
|
||||||
$node['type'] === 'skill' => '<i class="gear-dv-skill-dot"></i>',
|
|
||||||
default => '<i class="gear-dv-dot"></i>',
|
|
||||||
};
|
|
||||||
$title = e(gear_daevanion_node_title($node, $class));
|
$title = e(gear_daevanion_node_title($node, $class));
|
||||||
[$tip, $tipMeta] = gear_daevanion_node_tip($node, $class);
|
[$tip, $tipMeta] = gear_daevanion_node_tip($node, $class);
|
||||||
$tag = $isOwn ? 'label' : 'span';
|
$tag = $isOwn ? 'label' : 'span';
|
||||||
|
|
|
||||||