diff --git a/assets/css/style.css b/assets/css/style.css index 03197bd..f05d2df 100644 --- a/assets/css/style.css +++ b/assets/css/style.css @@ -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-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-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; } +/* 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-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; } @@ -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.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; } +/* 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-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; } diff --git a/assets/images/daevanion/active-off.png b/assets/images/daevanion/active-off.png new file mode 100644 index 0000000..0ae7d71 Binary files /dev/null and b/assets/images/daevanion/active-off.png differ diff --git a/assets/images/daevanion/active-on.png b/assets/images/daevanion/active-on.png new file mode 100644 index 0000000..f3c237e Binary files /dev/null and b/assets/images/daevanion/active-on.png differ diff --git a/assets/images/daevanion/common-off.png b/assets/images/daevanion/common-off.png new file mode 100644 index 0000000..90a54c2 Binary files /dev/null and b/assets/images/daevanion/common-off.png differ diff --git a/assets/images/daevanion/common-on.png b/assets/images/daevanion/common-on.png new file mode 100644 index 0000000..b05ac3a Binary files /dev/null and b/assets/images/daevanion/common-on.png differ diff --git a/assets/images/daevanion/passive-off.png b/assets/images/daevanion/passive-off.png new file mode 100644 index 0000000..a9bbb41 Binary files /dev/null and b/assets/images/daevanion/passive-off.png differ diff --git a/assets/images/daevanion/passive-on.png b/assets/images/daevanion/passive-on.png new file mode 100644 index 0000000..ebe0183 Binary files /dev/null and b/assets/images/daevanion/passive-on.png differ diff --git a/assets/images/daevanion/unique-off.png b/assets/images/daevanion/unique-off.png new file mode 100644 index 0000000..4fd844d Binary files /dev/null and b/assets/images/daevanion/unique-off.png differ diff --git a/assets/images/daevanion/unique-on.png b/assets/images/daevanion/unique-on.png new file mode 100644 index 0000000..37fdbeb Binary files /dev/null and b/assets/images/daevanion/unique-on.png differ diff --git a/assets/js/gear-guide.js b/assets/js/gear-guide.js index 7f303ff..77087fc 100644 --- a/assets/js/gear-guide.js +++ b/assets/js/gear-guide.js @@ -85,4 +85,22 @@ }; 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')); + }); })(); diff --git a/includes/armory.php b/includes/armory.php index 7bd4296..54c421e 100644 --- a/includes/armory.php +++ b/includes/armory.php @@ -1013,12 +1013,6 @@ function armory_daevanion_html(array $data): string if (!$boards) { return '

Noch kein Daevanion-Board freigeschaltet.

'; } - // Skill-Icons fuer die Skillfelder ("Schutzformation +1" -> Icon von "Schutzformation") - $skillIcons = []; - foreach ($data['skills'] ?? [] as $skill) { - $skillIcons[mb_strtolower($skill['name'])] = $skill['icon']; - } - $html = '
'; foreach ($boards as $index => $board) { $iconUrl = armory_icon_url($board['icon']); @@ -1047,15 +1041,11 @@ function armory_daevanion_html(array $data): string $html .= '
'; 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' : ''); - $skillIcon = $type === 'skill' ? armory_icon_url($skillIcons[mb_strtolower((string) preg_replace('/\s*[+-]\d+$/', '', $effect))] ?? '') : null; - $inner = match (true) { - $skillIcon !== null => '', - $type === 'start' => '◆', - $type === 'skill' => '', - default => '', - }; + $inner = $type === 'start' ? '◆' : ''; $title = $type === 'start' ? 'Startfeld' : trim($name . ($effect !== '' ? ': ' . $effect : '')) . ($isOpen ? '' : ' (nicht freigeschaltet)'); $html .= '' . '' . $inner . ''; diff --git a/includes/gear_guide.php b/includes/gear_guide.php index 35af33c..ada55a5 100644 --- a/includes/gear_guide.php +++ b/includes/gear_guide.php @@ -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['boards'][(int) $board['id']]['count'] ?? 0) > 0)); + $dvSkills = gear_plan_class_skills($class); + ?> +

Daevanion

- Daevanion öffnen →
-
- - 0, 'total' => count($board['nodes'])]; ?> - - - / - ab Lv - - -
+ +
+ $spent): ?> + +
+ + / + +
+ + +
+ Skillstufen aus Daevanion + + +
+ +
+
- -
-
+ +
+ $board): ?> + + +
+ $board): ?> + +
+
+
+ +
+
+
+

· ab Stufe

+ +
+
+ +
    + 'Werte', 'passive' => 'Passive Skills', 'active' => 'Aktive Skills', 'unique' => 'Große Felder'] as $rune => $label): ?> +
  • + +
  • nicht aktiviert
  • +
+ + +
+ Werte und Skill-Boni aller Bretter +
+
diff --git a/includes/gear_planner_view.php b/includes/gear_planner_view.php index 2a96a04..f252236 100644 --- a/includes/gear_planner_view.php +++ b/includes/gear_planner_view.php @@ -640,6 +640,21 @@ function gear_daevanion_node_title(array $node, ?string $class): string 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 * 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; $down = $at[($node['r'] + 1) . ',' . $node['c']] ?? null; $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' : ''); - $skillIcon = $node['type'] === 'skill' ? gear_skill_icon_url($skills[(int) $node['skill']] ?? null) : null; - $inner = match (true) { - $skillIcon !== null => '', - $node['type'] === 'start' => '◆', - $node['type'] === 'skill' => '', - default => '', - }; + // Felder als Runen wie im Spiel (assets/images/daevanion, Bild je nach aktiv/inaktiv per CSS), nur das Startfeld als ◆ + $inner = $node['type'] === 'start' ? '◆' : ''; $title = e(gear_daevanion_node_title($node, $class)); [$tip, $tipMeta] = gear_daevanion_node_tip($node, $class); $tag = $isOwn ? 'label' : 'span';