Territory Traits: Difference between revisions
Appearance
No edit summary |
No edit summary |
||
| Line 6: | Line 6: | ||
<div style="max-width:420px; margin:0 auto;"> | <div style="max-width:420px; margin:0 auto;"> | ||
<style> | <style> | ||
.mw-tab-buttons { display: flex; width: 100%; background: #0b0f14; border-radius: 10px; padding: 4px; gap: 4px; } | |||
.mw-tab-buttons { | .mw-tab-btn { flex: 1; text-align: center; padding: 10px 0; font-weight: 600; color: #cfd6df; background: #11161c; border-radius: 6px; cursor: pointer; } | ||
.mw-tab-btn.active { background: linear-gradient(180deg, #1ec8ff, #0ea5e9); color: #001018; } | |||
.dropdown { width: 100%; margin-top: 10px; } | |||
.dropdown select { width: 100%; padding: 10px; background: #11161c; color: #e6edf3; border: 1px solid #1f2a35; border-radius: 8px; font-size: 14px; } | |||
.output { margin-top: 10px; background: #0d1319; border: 1px solid #1f2a35; border-radius: 10px; padding: 12px; } | |||
.output-title { font-weight: 700; margin-bottom: 8px; color: #e6edf3; } | |||
.output-line { font-size: 13px; color: #9fb0c3; padding: 4px 0; border-top: 1px solid #1a222b; } | |||
} | .output-line:first-of-type { border-top: none; } | ||
.mw-tab-btn { | .mw-tab-content { display: none; } | ||
.mw-tab-content.active { display: block; } | |||
} | |||
.mw-tab-btn.active { | |||
} | |||
.dropdown { | |||
} | |||
.dropdown select { | |||
} | |||
.output { | |||
} | |||
.output-title { | |||
} | |||
.output-line { | |||
} | |||
.output-line:first-of-type { | |||
} | |||
.mw-tab-content { | |||
} | |||
.mw-tab-content.active { | |||
} | |||
</style> | </style> | ||
<div class="mw-tab-buttons"> | <div class="mw-tab-buttons"> | ||
<div class="mw-tab-btn active" data-tab="slot1">Slot 1</div> | <div class="mw-tab-btn active" data-tab="slot1">Slot 1</div> | ||
| Line 78: | Line 23: | ||
<div class="mw-tab-btn" data-tab="slot3">Slot 3</div> | <div class="mw-tab-btn" data-tab="slot3">Slot 3</div> | ||
</div> | </div> | ||
<div id="slot1" class="mw-tab-content active"> | <div id="slot1" class="mw-tab-content active"> | ||
<div class="dropdown"> | <div class="dropdown"> | ||
| Line 104: | Line 48: | ||
<div id="slot1Output" class="output" style="display:none;"></div> | <div id="slot1Output" class="output" style="display:none;"></div> | ||
</div> | </div> | ||
<div id="slot2" class="mw-tab-content"> | <div id="slot2" class="mw-tab-content"> | ||
<div class="dropdown"> | <div class="dropdown"> | ||
| Line 134: | Line 77: | ||
<div id="slot2Output" class="output" style="display:none;"></div> | <div id="slot2Output" class="output" style="display:none;"></div> | ||
</div> | </div> | ||
<div id="slot3" class="mw-tab-content"> | <div id="slot3" class="mw-tab-content"> | ||
<div class="dropdown"> | <div class="dropdown"> | ||
| Line 143: | Line 85: | ||
<option value="extra_load">Extra Load</option> | <option value="extra_load">Extra Load</option> | ||
<option value="feline">Feline Creatures</option> | <option value="feline">Feline Creatures</option> | ||
<option value="herbivore">Herbivore (Deer)</option> | |||
<option value="moonlight">Moonlight Assault</option> | <option value="moonlight">Moonlight Assault</option> | ||
<option value="top_grunt">Top Grunt</option> | <option value="top_grunt">Top Grunt</option> | ||
| Line 151: | Line 94: | ||
</div> | </div> | ||
<script> | <script> | ||
document.querySelectorAll('.mw-tab-btn').forEach(function(btn) { | |||
document.querySelectorAll('.mw-tab-btn').forEach(btn | btn.onclick = function() { | ||
btn.onclick = () | document.querySelectorAll('.mw-tab-btn').forEach(function(b) { b.classList.remove('active'); }); | ||
document.querySelectorAll('.mw-tab-btn').forEach(b | document.querySelectorAll('.mw-tab-content').forEach(function(c) { c.classList.remove('active'); }); | ||
document.querySelectorAll('.mw-tab-content').forEach(c | |||
btn.classList.add('active'); | btn.classList.add('active'); | ||
document.getElementById(btn.dataset.tab).classList.add('active'); | document.getElementById(btn.dataset.tab).classList.add('active'); | ||
}; | }; | ||
}); | }); | ||
var slot1Data = { | |||
cheer_up: { title: "Cheer Up", lines: ["Max Mood +30% / +40% / +50%"] }, | |||
cheer_up: { | covert_energy: { title: "Covert Energy", lines: ["Max Deviant Power +10% to +35%"] }, | ||
feeling_blue: { title: "Feeling Blue", lines: ["Max Mood -5% / -10%"] }, | |||
growing_pains: { title: "Growing Pains", lines: ["Max Power +30 to 50%; Mood recovery -5%"] }, | |||
optimist: { title: "Optimist", lines: ["Max Mood +15 to 35%"] }, | |||
covert_energy: { | power_rewind: { title: "Power Rewind", lines: ["Power recovery +5 to 10%"] }, | ||
rise_and_shine: { title: "Rise and Shine", lines: ["Mood recovery +5 to 25%"] }, | |||
stable_energy: { title: "Stable Energy", lines: ["Max Deviant Power +30"] }, | |||
stable_vitality: { title: "Stable Vitality", lines: ["Max Mood +30"] }, | |||
feeling_blue: { | upper_hand: { title: "Upper Hand", lines: ["Convert Mood to Power at 0"] }, | ||
worn_out: { title: "Worn-out", lines: ["Max Power -5% / -10%"] }, | |||
pumpkin: { title: "Pumpkin Lantern (Buzzy Bee)", lines: ["+10% Power"] }, | |||
gold_lightning: { title: "Gold Lightning (Electric Eel)", lines: ["+15% Recovery"] }, | |||
growing_pains: { | good_fortune: { title: "Optimism - Cat", lines: ["+40% Mood"] }, | ||
aquarius: { title: "Aquarius (Fetch-A-Lot)", lines: ["+30% Recovery"] }, | |||
golden_toad: { title: "Golden Toad", lines: ["+20% Recovery"] }, | |||
shadow_shroom: { title: "Shadow Shroom", lines: ["+40% Energy"] } | |||
optimist: { | |||
power_rewind: { | |||
rise_and_shine: { | |||
stable_energy: { | |||
stable_vitality: { | |||
upper_hand: { | |||
worn_out: { | |||
pumpkin: { | |||
gold_lightning: { | |||
good_fortune: { | |||
aquarius: { | |||
golden_toad: { | |||
shadow_shroom: { | |||
}; | }; | ||
var slot2Data = { | |||
world_charm: { | world_charm: { title: "A World of Charm", lines: ["10% give +20 Mood"] }, | ||
anti_burnout: { title: "Anti-Burnout", lines: ["20% give +5 Power"] }, | |||
devoted: { title: "Devoted Laborer", lines: ["+20% duration"] }, | |||
dream_wild: { title: "Dream Wild", lines: ["10% give +10 Power"] }, | |||
anti_burnout: { | hydrophilic: { title: "Hydrophilic", lines: ["+30% near water"] }, | ||
lazy: { title: "Lazy Bones", lines: ["-5% speed"] }, | |||
living_map: { title: "Living Map", lines: ["-5% interval"] }, | |||
oneplus: { title: "OnePlus", lines: ["Rare crystals chance"] }, | |||
devoted: { | panovision: { title: "Panovision", lines: ["-10% speed"] }, | ||
slacking: { title: "Slacking Off", lines: ["+5% consumption"] }, | |||
stardust: { title: "Stardust Affinity", lines: ["20% no Mood cost"] }, | |||
sweet_talk: { title: "Sweet Talk", lines: ["20% give Mood"] }, | |||
dream_wild: { | overtime: { title: "Voluntary Overtime", lines: ["10% no cost"] }, | ||
workaholic: { title: "Workaholic", lines: ["+10% duration"] }, | |||
lunar_oracle: { title: "Lunar Oracle", lines: ["+20% duration"] }, | |||
daydreaming: { title: "Daydreaming", lines: ["Restore Power"] }, | |||
hydrophilic: { | toxicologist: { title: "Toxicologist", lines: ["25% no cost"] }, | ||
admiral: { title: "Admiral", lines: ["3% no cost"] }, | |||
diamond_duke: { title: "Diamond Duke", lines: ["5% no cost"] }, | |||
workaholic_lights: { title: "Workaholic - Lights", lines: ["+20% duration"] }, | |||
lazy: { | gold_speaker: { title: "Gold Speaker", lines: ["Extra ores"] } | ||
living_map: { | |||
oneplus: { | |||
panovision: { | |||
slacking: { | |||
stardust: { | |||
sweet_talk: { | |||
overtime: { | |||
workaholic: { | |||
lunar_oracle: { | |||
daydreaming: { | |||
toxicologist: { | |||
admiral: { | |||
diamond_duke: { | |||
workaholic_lights: { | |||
gold_speaker: { | |||
}; | }; | ||
var slot3Data = { | |||
brute_force: { | brute_force: { title: "Brute Force Rules", lines: ["10% double output"] }, | ||
clean: { title: "Clean and Hygienic", lines: ["Sanity over 20%"] }, | |||
extra_load: { title: "Extra Load", lines: ["+15% storage"] }, | |||
feline: { title: "Feline Creatures", lines: ["Extra lightweight item"] }, | |||
clean: { | herbivore: { title: "Herbivore (Deer)", lines: ["Chance to yield an additional deviated plant during production"] }, | ||
moonlight: { title: "Moonlight Assault", lines: ["+15% at night"] }, | |||
top_grunt: { title: "Top Grunt", lines: ["Convert Mood to Energy"] } | |||
extra_load: { | |||
feline: { | |||
}, | |||
moonlight: { | |||
top_grunt: { | |||
}; | }; | ||
function bindDropdown(selectId, outputId, data) { | function bindDropdown(selectId, outputId, data) { | ||
document.getElementById(selectId).onchange = function () { | document.getElementById(selectId).onchange = function() { | ||
var val = this.value; | |||
var output = document.getElementById(outputId); | |||
if (!val) { | if (!val) { output.style.display = "none"; return; } | ||
var item = data[val]; | |||
output.innerHTML = '<div class="output-title">' + item.title + '</div>' + | |||
item.lines.map(function(line) { return '<div class="output-line">' + line + '</div>'; }).join(""); | |||
output.innerHTML = | |||
item.lines.map(line | |||
output.style.display = "block"; | output.style.display = "block"; | ||
}; | }; | ||