Game/Idle/IdleTutorial.cs
using System;
using System.Collections.Generic;
/// <summary>
/// What has to happen before a tutorial step is allowed to advance.
///
/// Steps that only explain something use <see cref="Button"/> and wait for the
/// player to click through. Steps that teach an action wait for the action —
/// a player who has actually pressed OVERLOAD once remembers it, and a player
/// who clicked "Got it" four times in a row remembers nothing.
/// </summary>
public enum IdleTutTrigger
{
Button, // "Got it" — pure explanation
CellClick, // player hit a chest by hand
Buy, // player bought any Core upgrade
Overload, // player fired the manual burst
TabChanged, // player switched shop tab
}
/// <summary>Which side of the spotlight the text card sits on.</summary>
public enum IdleTutPlace { Center, Left, Right, Above, Below }
public class IdleTutStep
{
/// <summary>CSS class of the panel to spotlight. Empty means "no spotlight, card centred".</summary>
public string Target = "";
/// <summary>
/// Which HUD block stays lit — "top", "left", "right", "board", "controls"
/// or "meltdown". Empty dims nothing.
///
/// The dim quads alone are not enough: this renderer draws emoji glyphs
/// above overlay panels, so a scrim darkens card backgrounds while every
/// chest, icon and tab glyph stays at full brightness through it. Dimming
/// the containing block with `opacity` is the only thing that takes the
/// glyphs with it — the chest-tier list in this same HUD already relies on
/// exactly that behaviour.
/// </summary>
public string Region = "";
public string Title = "";
public string Text = "";
/// <summary>Shown instead of the Got-it button when the step waits on an action.</summary>
public string Hint = "";
public IdleTutTrigger Trigger = IdleTutTrigger.Button;
public IdleTutPlace Place = IdleTutPlace.Right;
/// <summary>Padding in design pixels added around the measured target rect.</summary>
public float Pad = 10f;
}
/// <summary>
/// The Reactor's teaching script.
///
/// Deliberately short: thirteen beats, none longer than two sentences, and the
/// five that matter most are gated on the player actually doing the thing. The
/// board keeps running underneath the whole time — a tutorial that freezes an
/// idle game teaches the wrong lesson about what the game is.
/// </summary>
public static class IdleTutorial
{
public static readonly List<IdleTutStep> Steps = new()
{
new IdleTutStep {
Target = "idle-board-wrap", Region = "board", Place = IdleTutPlace.Right,
Title = "This board plays itself",
Text = "Chests drop in. Drones land on them and detonate. Everything a blast kills pays you Cores — with your hands off the mouse.",
},
new IdleTutStep {
Target = "idle-board-wrap", Region = "board", Place = IdleTutPlace.Right,
Title = "Chains are the whole game",
Text = "Payout climbs faster than chain length. One blast that clears 20 chests beats four blasts of 5 by a mile — so everything you buy is really buying chain length.",
},
new IdleTutStep {
Target = "idle-board-wrap", Region = "board", Place = IdleTutPlace.Right,
Title = "You can get your hands in",
Text = "Click any chest to crack it yourself. Tougher chests take several hits — the number in the corner counts them down.",
Hint = "Click a chest on the board",
Trigger = IdleTutTrigger.CellClick,
},
new IdleTutStep {
Target = "idle-currencies", Region = "top", Place = IdleTutPlace.Below,
Title = "Cores, and Cores per second",
Text = "Everything you break becomes Cores. The per-second figure is the one number this entire game is about growing.",
},
new IdleTutStep {
Target = "idle-right", Region = "right", Place = IdleTutPlace.Left,
Title = "Spend them immediately",
Text = "Cores sitting in the bank earn nothing. Buy the cheapest thing you can afford, always — it pays for itself before you notice.",
Hint = "Buy any upgrade",
Trigger = IdleTutTrigger.Buy,
},
new IdleTutStep {
Target = "idle-tabs", Region = "right", Place = IdleTutPlace.Left,
Title = "Three benches",
Text = "⚙️ Reactor makes more chests. ⛓️ Chains makes bigger blasts. 🛠️ Systems covers offline income, golden chests and Fragments.",
Hint = "Open another tab",
Trigger = IdleTutTrigger.TabChanged,
},
new IdleTutStep {
Target = "idle-overload", Region = "controls", Place = IdleTutPlace.Above,
Title = "OVERLOAD is your button",
Text = "An instant extra volley at ×3.5 payout, on a short cooldown. SPACE fires it too, so you can keep hammering it while you read.",
Hint = "Fire an Overload",
Trigger = IdleTutTrigger.Overload,
},
new IdleTutStep {
Target = "idle-surge-wrap", Region = "controls", Place = IdleTutPlace.Above,
Title = "Overloads charge the Surge",
Text = "Fill this bar and UNLEASH pays ×10 on everything for 15 seconds. Never leave it sitting full — a spent Surge starts charging again.",
},
new IdleTutStep {
Target = "idle-board-wrap", Region = "board", Place = IdleTutPlace.Right,
Title = "Golden chests are worth chasing",
Text = "A 🌟 lands somewhere on the board every so often and leaves after 11 seconds. Click it for a fat payout and ×3 output for half a minute.",
},
new IdleTutStep {
Target = "idle-card-output", Region = "left", Place = IdleTutPlace.Right,
Title = "Read this card, not the shop",
Text = "Every purchase lands here on the very next detonation. If FEED LINE ever says starving, your blasts have outgrown your chest supply — buy Feed Line or Bulk Hopper.",
},
new IdleTutStep {
Target = "idle-card-contracts", Region = "left", Place = IdleTutPlace.Right,
Title = "Three contracts a day",
Text = "They pay Fragments, and Fragments feed your companion for a permanent output bonus. New set every day at midnight UTC.",
},
new IdleTutStep {
Target = "idle-meltdown-strip", Region = "meltdown", Place = IdleTutPlace.Above,
Title = "When it stalls, melt it down",
Text = "Meltdown burns your Cores and every Core upgrade, and pays permanent Flux. Every Flux you have ever earned makes every future run faster — resetting is progress here.",
},
new IdleTutStep {
Target = "", Place = IdleTutPlace.Center,
Title = "That's the whole loop",
Text = "Buy, detonate, buy bigger, melt down. Come back tomorrow — the daily streak, the contracts and the Fragment condenser all refill overnight.",
},
};
public static int Count => Steps.Count;
}