diff --git a/README.md b/README.md index f37edcb..95e49b7 100644 --- a/README.md +++ b/README.md @@ -762,8 +762,8 @@ Skillstufen) und auf der eigenen Profilseite zeigen. angrenzend, Entfernen nimmt Unerreichbares mit, die ersten vier Bretter teilen sich 570 Daevanion-Kristalle, das Saison-Brett hat eigene. Skillfelder geben je +1 Stufe (über alle vier Bretter +4 je Skill) - die Skills-Seite zeigt diese Boni zusammen mit denen der Arcana an jedem Skill. - - *Pantheon:* 1 Koloss, 4 Statuen, 12 Kunstwerke (aus dem Datensatz), nur Dekorationen für alle oder - die gewählte Seite (Elyos/Asmodier), Domänenpunkte je Domäne höchstens 200. + - *Pantheon:* 1 Koloss, 4 Statuen, 12 Kunstwerke (aus dem Datensatz), nur Dekorationen für alle und für + Elyos - die Legion spielt nur Elyos (`GEAR_PANTHEON_RACE`), Domänenpunkte je Domäne höchstens 200. - *Closet:* Sammelpunkte je Kategorie (Waffe der Klasse, Rüstung, Schmuck; bis 500) aus dem Spiel eintragen oder aus abgehakten Skins schätzen (Gewicht je Seltenheit laut aion2hub), je Punkt +0,1 %. Pets, Pantheon und Closet sind meist in allen Sets gleich - jede Seite lässt sich deshalb aus einem diff --git a/assets/css/style.css b/assets/css/style.css index c4a1527..9c83be0 100644 --- a/assets/css/style.css +++ b/assets/css/style.css @@ -6056,10 +6056,10 @@ label.gear-part:hover:not(.is-locked) { border-color: rgba(201, 162, 39, 0.6); } /* ---- Planer-Seiten: Arcana, Pets, Daevanion, Pantheon, Closet (includes/gear_planner_view.php) ---- */ .gear-tab-count:empty { display: none; } -button.gear-tab, label.gear-tab { font-size: 0.9rem; line-height: 1.25; cursor: pointer; } +button.gear-tab { font-size: 0.9rem; line-height: 1.25; cursor: pointer; } button.gear-tab { background: var(--bg-panel); color: var(--text); padding: 0.4rem 0.8rem; } -button.gear-tab:hover, label.gear-tab:hover { background: var(--bg-panel); color: var(--text); box-shadow: none; } -button.gear-tab.is-active, button.gear-tab.is-active:hover, label.gear-tab.is-active { background: rgba(201, 162, 39, 0.14); color: var(--gold); } +button.gear-tab:hover { background: var(--bg-panel); color: var(--text); box-shadow: none; } +button.gear-tab.is-active, button.gear-tab.is-active:hover { background: rgba(201, 162, 39, 0.14); color: var(--gold); } .gear-plan [hidden] { display: none !important; } .gear-plan-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(250px, 320px); gap: 1rem 1.5rem; align-items: start; margin-top: 0.9rem; } .gear-plan-main { min-width: 0; } @@ -6118,9 +6118,6 @@ button.gear-tab.is-active, button.gear-tab.is-active:hover, label.gear-tab.is-ac .gear-plan-tools input[type="search"] { flex: 1 1 220px; width: auto; min-width: 0; padding: 0.45rem 0.7rem; font-size: 0.92rem; } .gear-plan-tools select { width: auto; padding: 0.45rem 0.7rem; font-size: 0.92rem; } .gear-plan-tools .checkbox-label { display: inline-flex; align-items: center; gap: 0.35rem; font-weight: 400; font-size: 0.88rem; } -.gear-plan-toggle { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.2rem 0 0.4rem; } -.gear-plan-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; } -.gear-plan-toggle label:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 1px; } .gear-plan-copy { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-top: 1.25rem; padding-top: 0.9rem; border-top: 1px solid var(--border); } .gear-plan-copy select { width: auto; max-width: 100%; padding: 0.4rem 0.6rem; font-size: 0.9rem; } diff --git a/includes/gear_planner.php b/includes/gear_planner.php index 9b40d6c..fa50528 100644 --- a/includes/gear_planner.php +++ b/includes/gear_planner.php @@ -794,7 +794,14 @@ function gear_daevanion_totals(array $plan, string $class): array // Arten der Dekorationen: Anzeige => [deutscher Name, Art in den Daten] const GEAR_PANTHEON_TYPES = ['Colossus' => ['Koloss', 'Large'], 'Statue' => ['Statue', 'Small'], 'Artwork' => ['Kunstwerk', 'Frame']]; -const GEAR_PANTHEON_FACTIONS = ['Light' => 'Elyos', 'Dark' => 'Asmodier']; +// Die Legion spielt nur Elyos: Dekorationen, die es nur fuer Asmodier gibt ("Dark"), gibt es hier nicht +const GEAR_PANTHEON_RACE = 'Light'; + +/** Kann ein Elyos diese Dekoration aufstellen? (fuer alle oder nur fuer Elyos) */ +function gear_pantheon_available(array $item): bool +{ + return $item['race'] === 'All' || $item['race'] === GEAR_PANTHEON_RACE; +} /** Pantheon: Dekorationen nach ID, Domaenen, Plaetze je Art. null = noch nicht uebernommen. */ function gear_pantheon_data(): ?array @@ -820,19 +827,18 @@ function gear_pantheon_slots(array $data, string $ui): int } /** - * Pantheon-Plan pruefen: Seite (Elyos/Asmodier), nur Dekorationen fuer alle oder die eigene Seite, je Art - * hoechstens so viele wie Plaetze (die zuerst gewaehlten bleiben). + * Pantheon-Plan pruefen: nur Dekorationen fuer alle oder fuer Elyos, je Art hoechstens so viele wie Plaetze + * (die zuerst gewaehlten bleiben). * - * @param array $input ['faction' => 'Light'|'Dark', 'decos' => [IDs]] + * @param array $input ['decos' => [IDs]] */ function gear_pantheon_normalize(array $input, array $data): array { - $faction = isset(GEAR_PANTHEON_FACTIONS[$input['faction'] ?? '']) ? (string) $input['faction'] : 'Light'; $placed = []; $used = []; foreach ((array) ($input['decos'] ?? []) as $id) { $item = $data['items'][(int) $id] ?? null; - if (!$item || in_array((int) $id, $placed, true) || ($item['race'] !== 'All' && $item['race'] !== $faction)) { + if (!$item || in_array((int) $id, $placed, true) || !gear_pantheon_available($item)) { continue; } if (($used[$item['type']] ?? 0) >= (int) ($data['slots'][$item['type']] ?? 0)) { @@ -841,7 +847,7 @@ function gear_pantheon_normalize(array $input, array $data): array $used[$item['type']] = ($used[$item['type']] ?? 0) + 1; $placed[] = (int) $id; } - return ['faction' => $faction, 'decos' => $placed]; + return ['decos' => $placed]; } /** @@ -855,7 +861,7 @@ function gear_pantheon_totals(array $plan, array $data): array $placed = array_fill_keys(array_keys(GEAR_PANTHEON_TYPES), 0); foreach ($plan['decos'] ?? [] as $id) { $item = $data['items'][(int) $id] ?? null; - if (!$item) { + if (!$item || !gear_pantheon_available($item)) { continue; } $placed[$item['ui']] = ($placed[$item['ui']] ?? 0) + 1; @@ -1051,17 +1057,9 @@ function gear_plan_input(string $section, array $post, array $old, array $set): $data = gear_pantheon_data(); $wanted = array_map('intval', (array) ($post['deco'] ?? [])); $decos = array_values(array_unique(array_merge(array_intersect(array_map('intval', $old['decos'] ?? []), $wanted), $wanted))); - $plan = gear_pantheon_normalize(['faction' => (string) ($post['faction'] ?? 'Light'), 'decos' => $decos], $data); - $notes = []; - $dropped = array_diff($decos, $plan['decos']); - $otherSide = array_filter($dropped, static fn (int $id): bool => ($data['items'][$id]['race'] ?? 'All') !== 'All' && $data['items'][$id]['race'] !== $plan['faction']); - if ($otherSide) { - $notes[] = count($otherSide) . (count($otherSide) === 1 ? ' Dekoration gibt' : ' Dekorationen gibt') . ' es nur für die andere Seite – entfernt.'; - } - if (count($dropped) > count($otherSide)) { - $notes[] = 'Alle Plätze dieser Art sind belegt – erst eine andere Dekoration entfernen.'; - } - return [$plan, $notes]; + $plan = gear_pantheon_normalize(['decos' => $decos], $data); + $full = array_filter(array_diff($decos, $plan['decos']), static fn (int $id): bool => isset($data['items'][$id]) && gear_pantheon_available($data['items'][$id])); + return [$plan, $full ? ['Alle Plätze dieser Art sind belegt – erst eine andere Dekoration entfernen.'] : []]; case 'closet': $data = gear_closet_data(); diff --git a/includes/gear_planner_view.php b/includes/gear_planner_view.php index 05f6978..1297590 100644 --- a/includes/gear_planner_view.php +++ b/includes/gear_planner_view.php @@ -781,7 +781,7 @@ function gear_pantheon_deco_html(array $item, bool $on, bool $isOwn): string . gear_plan_icon_html((int) $item['item'], $item['name'], $item['grade'], 38) . '' . e($item['name']) . '' . '' + . ($item['race'] !== 'All' ? ' · nur Elyos' : '') . '' . '' . ($chips !== '' ? $chips : 'nur Deko, keine Werte') . '' . ($isOwn ? '' : '') . '' . $tag . '>'; @@ -790,7 +790,7 @@ function gear_pantheon_deco_html(array $item, bool $on, bool $isOwn): string function gear_render_pantheon(array $set, array $plan, bool $isOwn): void { $data = gear_pantheon_data(); - $plan += ['faction' => 'Light', 'decos' => []]; + $plan += ['decos' => []]; $totals = gear_pantheon_totals($plan, $data); $fragments = gear_plan_fragments('pantheon', $set, $plan); $placed = array_flip(array_map('intval', $plan['decos'])); @@ -800,7 +800,7 @@ function gear_render_pantheon(array $set, array $plan, bool $isOwn): void Stell Dekorationen aus deiner Sammlung im Pantheon auf: Platz für = gear_pantheon_slots($data, 'Colossus') ?> Koloss, = gear_pantheon_slots($data, 'Statue') ?> Statuen und = gear_pantheon_slots($data, 'Artwork') ?> Kunstwerke. Jede gibt Punkte in Domänen der Götter (je Domäne höchstens = (int) (reset($data['domains'])['cap'] ?? 200) ?>), jeder Punkt wird in zwei Kampfwerte umgerechnet. - Manche Dekorationen gibt es nur für Elyos oder Asmodier. + Gezeigt werden alle Dekorationen, die Elyos aufstellen können.