Pantheon: no faction choice, only decorations Elyos can place (the legion is Elyos-only)

The faction toggle is removed; Asmodian-only decorations are hidden and no longer counted. This also fixes
switching the faction, which was lost when no decoration was placed yet (the plan counted as empty).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Maaxxs 2026-09-24 00:40:36 +02:00
parent 0977ef4f37
commit f0d8411fac
5 changed files with 27 additions and 39 deletions

View file

@ -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

View file

@ -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; }

View file

@ -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();

View file

@ -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)
. '<span class="gear-deco-info"><span class="gear-deco-name ' . e(gear_grade_class($item['grade'])) . '">' . e($item['name']) . '</span>'
. '<span class="gear-deco-meta">' . e((GEAR_PANTHEON_TYPES[$item['ui']][0] ?? $item['ui']) . ' · ' . $item['grade'])
. ($item['race'] !== 'All' ? ' · ' . e(GEAR_PANTHEON_FACTIONS[$item['race']] ?? $item['race']) : '') . '</span>'
. ($item['race'] !== 'All' ? ' · nur Elyos' : '') . '</span>'
. '<span class="gear-deco-domains">' . ($chips !== '' ? $chips : '<span class="text-muted">nur Deko, keine Werte</span>') . '</span></span>'
. ($isOwn ? '<span class="gear-deco-check" aria-hidden="true">' . icon('check') . '</span>' : '')
. '</' . $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.
</p>
<div class="gear-plan-layout">
<div class="gear-plan-main">
@ -808,13 +808,6 @@ function gear_render_pantheon(array $set, array $plan, bool $isOwn): void
<form method="post" action="/gear_action.php" class="gear-pantheon-form" data-plan-form data-pantheon
data-slots="<?= e((string) json_encode(array_map(static fn (string $ui): int => gear_pantheon_slots($data, $ui), array_combine(array_keys(GEAR_PANTHEON_TYPES), array_keys(GEAR_PANTHEON_TYPES))))) ?>">
<?= gear_plan_form_fields($set, 'pantheon') ?>
<div class="gear-plan-toggle" role="radiogroup" aria-label="Seite">
<?php foreach (GEAR_PANTHEON_FACTIONS as $faction => $factionLabel): ?>
<label class="gear-tab<?= $plan['faction'] === $faction ? ' is-active' : '' ?>"><input type="radio" name="faction" value="<?= e($faction) ?>"<?= $plan['faction'] === $faction ? ' checked' : '' ?> data-plan-reload> <?= e($factionLabel) ?></label>
<?php endforeach; ?>
</div>
<?php else: ?>
<p class="text-muted"><?= e(GEAR_PANTHEON_FACTIONS[$plan['faction']] ?? '') ?></p>
<?php endif; ?>
<div class="gear-plan-filter" data-plan-filter="deco" role="group" aria-label="Art">
<button type="button" class="gear-tab is-active" data-filter-value="">Alle</button>
@ -837,7 +830,7 @@ function gear_render_pantheon(array $set, array $plan, bool $isOwn): void
<?php
foreach ($data['items'] as $item) {
$on = isset($placed[(int) $item['id']]);
if (($isOwn || $on) && ($item['race'] === 'All' || $item['race'] === $plan['faction'])) {
if (($isOwn || $on) && gear_pantheon_available($item)) {
echo gear_pantheon_deco_html($item, $on, $isOwn), "\n";
}
}

View file

@ -39,7 +39,7 @@ const PATCHNOTES = [
['type' => 'neu', 'area' => 'Gear-Planer', 'text' => 'Arcana: Pro Kartenart (Kelch, Pergament, Kompass, Glocke, Spiegel) setzt du eine Karte mit Aufwertung ein und wählst, welche Skills sie prägt - so viele Stufen, wie die Karte Plätze hat plus die Aufwertung, je Skill bis +4. Du siehst die Domänenpunkte, die umgerechneten Kampfwerte, die Skill-Boni und die Set-Effekte ab 2 und 4 Teilen.'],
['type' => 'neu', 'area' => 'Gear-Planer', 'text' => 'Pets: Alle 208 Pets mit Stufe 1-3 (besondere Pets hat man oder nicht) und ihren Besitz-Effekten, mit Filter nach Gattung und Suche. Dazu die Gattungs-Einsicht: je Gattung Stufe 1-10, je Platz Seltenheit und Wert - gerechnet mit dem besten Wurf.'],
['type' => 'neu', 'area' => 'Gear-Planer', 'text' => 'Daevanion: Die fünf Bretter deiner Klasse wie im Spiel - vom Start in der Mitte aus Feld für Feld freischalten, Entfernen nimmt alles mit, was nur darüber erreichbar war. Kristalle, Werte und Skill-Boni je Brett und gesamt, dazu „Alle aktivieren“ und „Zurücksetzen“.'],
['type' => 'neu', 'area' => 'Gear-Planer', 'text' => 'Pantheon: Koloss, Statuen und Kunstwerke aufstellen (Elyos oder Asmodier), die Domänenpunkte bis 200 je Domäne und die Kampfwerte daraus. Closet: Sammelpunkte je Kategorie aus dem Spiel eintragen oder Skins abhaken, dazu die Werte (+0,1 % je Punkt).'],
['type' => 'neu', 'area' => 'Gear-Planer', 'text' => 'Pantheon: Koloss, Statuen und Kunstwerke aufstellen, die Domänenpunkte bis 200 je Domäne und die Kampfwerte daraus. Closet: Sammelpunkte je Kategorie aus dem Spiel eintragen oder Skins abhaken, dazu die Werte (+0,1 % je Punkt).'],
['type' => 'verbessert', 'area' => 'Gear-Planer', 'text' => 'Die Reiter stehen jetzt in der Reihenfolge des aion2hub-Planers. Auf der Skills-Seite siehst du an jedem Skill die Boni aus Daevanion und Arcana; liegt eine geplante Stufe über Skillpunkten plus diesen Boni, ist sie markiert. Der Vergleich zeigt die Werte aus allen fünf Seiten, „Kopieren“ nimmt sie mit, und Pets, Pantheon und Co. lassen sich aus einem anderen eigenen Set übernehmen.'],
['type' => 'neu', 'area' => 'Gear-Planer', 'text' => 'Die Daten holt die Leitung unter „Gegenstände & Skills verwalten“ → „Planer-Daten übernehmen“ aus dem Build-Planer von aion2hub (bringt auch die Spezialisierungen mit), danach einmal „Bilder laden“ (ca. 6 Minuten).', 'audience' => 'leitung'],
],