Weapons built from traits, fashion, Hourglass, About tab, and Ithaca
- Every attack is now assembled from traits on its definition instead of per-weapon code: an anchor and path (thrusts, out-and-back, arcs), shared flight physics (gravity, drag, acceleration, homing, and one wall response: end, burst, stick, crawl, bounce, stop, pass, return, latch), and flags like bouncy, drifting, tethered, orbiting, instant and arming. Melee are projectiles too. - Shots have a lifetime and a fade (when damage bottoms out). Range is speed times lifetime. Ricochets and the Vacuum wind lifetime back. - The Vacuum pulls anyone's shots, and its airblast flips them out along the aim, claiming enemies' (fading into your colour). - New trinket: Hourglass, longer projectile lifetime and range. Ropes and chains lengthen with it and the Accelerator. - Fashion: 23 items worn on the head, face or torso, chosen in Profile. - Flamethrower flames hit continuously, the whip coils and sweeps, bouncing shots roll over ramps, and Ricochet relights grenade fuses. - Profile tab, colour tooltips, option hints on every setting, an About tab with credits and links, and the Ithaca font. - Loadouts lock once readied, tomatoes clear with the match, and the round-over pause is 4 seconds. - CC0 license. Tools and CLAUDE.md are no longer tracked, and the web shell moves to web/.
This commit is contained in:
1 parent
e55596b276
commit
e9d8cac926
101 files changed
+5787
-7148
No files matched your search
+19
-4
@@ -19,6 +19,14 @@
|
||||
|
||||
constexpr float PVP_OFF_SHADE = 0.4f;
|
||||
|
||||
// How a fighter's colour is asked for: as it shows in the world (darkened when PvP keeps it out of this screen's
|
||||
// fights), or plain, as the HUD shows it.
|
||||
enum Tint
|
||||
{
|
||||
TINT_PVP,
|
||||
TINT_PLAIN
|
||||
};
|
||||
|
||||
// Every manager in one place, so systems can reach each other through a single reference.
|
||||
// Devices say which input plays each fighter on this screen (none for bots). Sim is the game being
|
||||
// played, saved in snapshots. Local is the fighter this screen
|
||||
@@ -76,11 +84,11 @@ struct Game
|
||||
}
|
||||
|
||||
// A fighter's colour: its match colour (handed out when the match starts), or in the sandbox this screen's own
|
||||
// (picked in Customize, white while unassigned) until others join, when everyone
|
||||
// (picked in Profile, white while unassigned) until others join, when everyone
|
||||
// gets one. With others in the sandbox, everything of another fighter is darkened on this screen unless it and this
|
||||
// screen's own both have PvP on (so they can hurt each other); this screen's own always shows in full. Asked for
|
||||
// plain (as the HUD's tint is), it's never darkened.
|
||||
Color color_get(int fighter, bool isPlain = false)
|
||||
// plain (TINT_PLAIN, as the HUD's tint is), it's never darkened.
|
||||
Color color_get(int fighter, Tint tint = TINT_PVP)
|
||||
{
|
||||
if (sim.match.state == MATCH_PRACTICE && sim.fighterCount == 1)
|
||||
{
|
||||
@@ -89,9 +97,16 @@ struct Game
|
||||
}
|
||||
Color color = PALETTE[sim.match.colors[fighter]];
|
||||
bool isHostile = sim.fighters[fighter].isPvp && sim.fighters[local].isPvp;
|
||||
bool isPeaceful = !isPlain && fighter != local && sim.match.state == MATCH_PRACTICE && !isHostile;
|
||||
bool isPeaceful = tint == TINT_PVP && fighter != local && sim.match.state == MATCH_PRACTICE && !isHostile;
|
||||
return isPeaceful ? color_shade(color, PVP_OFF_SHADE) : color;
|
||||
}
|
||||
|
||||
// What a fighter wears: in the sandbox alone, what Profile has picked, otherwise what the match has them in.
|
||||
int fashion_get(int fighter)
|
||||
{
|
||||
bool isAlone = sim.match.state == MATCH_PRACTICE && sim.fighterCount == 1;
|
||||
return isAlone ? settings.fashion : sim.match.fashions[fighter];
|
||||
}
|
||||
};
|
||||
|
||||
void game_tick(Game& game);
|
||||
Reference in new issue
Block a user