feat(packages): ludic.gear - kinds of kit with tiers bought flat through a purse port once the standing is there, the kind's item following, per-tier values and mults, stack limits, the hand and charges that burn by the game hour, facts for a tier bought and a charge run out, a save section by key

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Orkun ÇAKILKAYA 2026-09-25 07:45:29 +03:00
parent 79ed7a335b
commit cc930a114f
11 changed files with 569 additions and 0 deletions

View file

@ -0,0 +1,20 @@
# ports.ludic - what gear asks the game: money and standing to buy with, the pack, and whether a
# kind is on sale at all. Unbound, the pack is empty and takes nothing, and every kind is on sale.
export port GearPurse {
money: fn() -> int
spend: fn(int) -> bool
rep: fn() -> int
}
export port GearPack {
count: fn(int) -> int = fn gear__none
add: fn(int, int) -> int = fn gear__took_none
}
export port GearWorld {
hidden: fn(int) -> bool = fn gear__never
}
function gear__none(it: int) -> int { return 0 }
function gear__took_none(it: int, n: int) -> int { return 0 }
function gear__never(k: int) -> bool { return false }