Documentation
¶
Overview ¶
Package loot is the drop table: what a slain ship leaves behind, and how often. Combat feeds the fleet rather than only authored pickups, and a tougher hull is worth killing.
The roll is pure — a table plus a number in [0,1) — so the rates are testable without an RNG and identical wherever they are rolled. Which stream that number comes from is the caller's business: Linefire wants a fixed loot stream so a run is reproducible, and a seeded simulation wants its own.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Table = map[string][]Band{
"enemy": {{0.12, "powerup"}},
"turret": {{0.15, "powerup"}, {0.25, "ratepower"}},
"rusher": {{0.15, "powerup"}, {0.23, "firepower"}},
"sniper": {{0.18, "powerup"}, {0.32, "damagepower"}},
"tank": {{0.25, "shield"}, {0.45, "firepower"}, {0.65, "damagepower"}, {0.78, "wpn_missile"}},
}
Table maps a ship kind — its asset Kind, the same key the profiles use — to its cumulative bands. Tougher ships drop more, and better. An unknown kind drops nothing, so a hull nobody wrote a line for is simply not worth looting.