From 458916fb78dcef3ff77cb29b7ba98d9f646819fc Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Fri, 19 Jun 2026 02:08:55 -0400 Subject: feat: rough pharmacy skill added --- TODO.md | 175 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 155 insertions(+), 20 deletions(-) (limited to 'TODO.md') diff --git a/TODO.md b/TODO.md index 26c3c96..6f013d5 100644 --- a/TODO.md +++ b/TODO.md @@ -1,28 +1,163 @@ # TODO -Upcoming work for The House of Icarus. See `AGENTS.md` for architecture, commands, and reference. +Upcoming work for The House of Icarus. See `AGENTS.md` for architecture and reference. +Detailed implementation plans for each skill/system are in `skill_plans/`. -## Phase 1: Core Skill Chains (breadth over depth) +--- -- [x] Cooking — fire/range object, raw fish → cooked food, bread dough → bread, eat command -- [ ] Smithing — furnace + anvil objects (`use` type), ore → bars → weapons/armor -- [ ] Fletching — fletching table object (`use` type), logs → arrow shafts/bows -- [ ] Equipment: bronze/iron weapons, axes, cooked trout, arrows, bows +## Completed -## Phase 2: World Depth +- [x] Cooking — fire/range, raw fish → cooked food, bread dough → bread, eat command +- [x] Smithing — furnace + anvil, ore → bars → weapons/armor +- [x] Fletching — logs → arrow shafts/bows, fletching as background action +- [x] Equipment — bronze/iron/steel/mithril/adamantite/rune weapons and armor, bows, arrows -- [ ] Shop system — talk node action for buy/sell interface with credits -- [ ] Bank system — deposit/withdraw items at bank booth objects -- [ ] Ranged combat — bows/crossbows/ammo, add Ranged to combat formulas -- [ ] Aggressive mobs — initiate combat on room entry -- [ ] Flee command -- [ ] Equipment skill requirements +--- -## Phase 3: Polish +## Step 1: Pharmacy Rename -- [ ] Hacking, Thieving, Agility, Alchemy, Construction, Crafting, Scavenging, Farming, Assassin -- [ ] Quest system (already supported via talk nodes + world/player flags) -- [ ] PvP combat, multi-combat zones -- [ ] Admin commands -- [ ] Persist ground items and mob state across restarts -- [ ] More rooms — flesh out the asteroid world +- [x] Rename Alchemy → Pharmacy across the entire codebase. `Alchemy SkillName = "alchemy"` → `Pharmacy SkillName = "pharmacy"` in `player.go`. Update `AllSkills`, `SkillAbbr` (`"alc"` → `"pha"`). Search all Go files and YAML files (help, rooms, etc.) for any reference to "alchemy" and replace with "pharmacy". This is a mechanical find-and-replace — do it now before any new code references the old name. See `skill_plans/pharmacy.md` section 2. + +--- + +## Step 2: Combat Overhaul + +The combat system needs to be upgraded from single AttackBonus/DefenseBonus to OSRS-style per-type bonuses (stab/slash/crush/science/ranged) before building Technology, Science, or Assassin on top of it. See `skill_plans/combat.md` for full details. + +- [x] **2a: ItemStats + Formulas** — Replace the `ItemStats` struct with per-type attack bonuses (stab/slash/crush/science/ranged), per-type defense bonuses, strength bonus, ranged strength, science damage, and technology bonus. Add `AttackType string` field to `ItemDef`. Update `formulas.go` with OSRS accuracy formula (hit chance based on attack/defense roll comparison). Update `MobDef` and `MobInstance` with Science/Ranged levels, per-type defense bonuses, attack bonus, strength bonus, and elemental weakness field. Propagate new mob fields through `SeedMobs`. + +- [x] **2b: Update All Item YAMLs** — Convert every weapon and armor YAML from the old `attack_bonus`/`defense_bonus` format to the new per-type format. Set `attack_type` on every weapon (swords=slash, daggers=stab, maces=crush, axes=slash, bows=ranged). Fix the shortbow/longbow bug where `attack:` should be `ranged_attack:`. See `combat.md` stat tables for exact numbers per tier. + +- [x] **2c: Update Mob YAMLs + New Mobs** — Update the 5 existing mobs (cow, man, guard, newbie_trainer, tanner) with new defense bonus fields. Add 8+ new mobs at various combat levels to give players something to fight: rat, goblin, skeleton, zombie, moss giant, lesser drone, greater drone, iron sentinel. Place them in appropriate rooms. See `combat.md` section 13. + +- [x] **2d: Wire Up Combat** — Update `playerAttack()` to determine attack type from weapon, sum all equipment's matching attack bonus, use mob's matching defense bonus. Update `mobAttack()` to use mob's attack bonus and strength bonus, sum player's matching defense bonus per the mob's attack type. Add a `playerEquipBonuses()` helper that sums all equipped items into a single stats struct. Remove the old single-bonus code paths. + +- [x] **2e: Equipment Stats Display** — When examining an equippable item via `look`, display its attack and defense bonuses in a formatted two-column layout. Add a new `stats` command (Instant) that shows total equipment bonuses summed from all worn items, current attack type, and weapon speed. Update `cmd_score.go` to show combat level calculation breakdown. + +- [x] **2f: Ranged Combat** — Make ranged weapons functional: when `weapon_type` is "ranged", use Ranged level for attack rolls and ranged_attack bonus for accuracy. Consume 1 ammo per attack from the ammo equipment slot. Use `ranged_strength` from ammo for max hit calculation. Award XP to Ranged (75%) + Hitpoints (25%). If ammo runs out mid-combat, switch to unarmed with a message. Require ammo to be equipped to attack with a bow. + +--- + +## Step 3: Combat Feel + +Small additions that make combat feel complete before building bigger systems on top. + +- [ ] **Aggressive Mobs** — Mobs with `aggressive: true` initiate combat when a player enters their room. Add an `AggroTick()` or check in room-enter logic. Respect combat level difference (only aggro if mob's combat level is close to or above player's, or always aggro for certain mobs). Configurable via mob YAML. Some of the new mobs from step 2c should be aggressive. + +- [ ] **Equipment Skill Requirements** — Add optional `requirements` map to `ItemDef` (e.g., `requirements: { attack: 20, defense: 10 }`). Check in `cmd_wear.go` before equipping. Display requirements when examining items. This prevents low-level players from wearing rune gear immediately. + +--- + +## Step 4: Technology (Prayer System) + +See `skill_plans/technology.md`. Battery = prayer points. Techs = prayers. Players toggle techs for combat bonuses and damage reduction. Battery drains per tick while techs are active. 1-tick flicking works like OSRS — enable and disable within the same tick for no drain. + +- [ ] **Technology System** — Add `Battery float64` and `ActiveTechs map[string]bool` to Player. Define ~25 techs in Go (attack/strength/defense/ranged/science boosts at 3 tiers, 3 protection techs, utility techs). Add `tech` command (Instant): `tech ` toggles, `tech` toggles quick tech, `tech list` shows all. Add `TechTick()` to drain battery based on active techs, reduced by equipment TechnologyBonus. Implement 1-tick flicking (drain based on tick-start snapshot). Integrate protection techs into `mobAttack()` (40% damage reduction). Integrate stat boost techs into `playerAttack()`. Add "Charging Station" object to recharge battery. Show battery and active techs on score page. + +--- + +## Step 5: Scavenging + +See `skill_plans/scavenging.md`. The simplest new skill — mine scrap (already exists), identify it at altars to produce junk. Must be implemented before Science since Science consumes junk. + +- [ ] **Scavenging** — Verify existing mine_scrap behavior and scrap_pile object work. Create 4 base junk items (solarjunk, hydrojunk, ecojunk, biojunk — all stackable). Create 4 identifier tool items and 4 altar objects. Add `id`/`identify` command (Active): checks for correct identifier in inventory, converts all scrap to corresponding junk on next tick, awards Scavenging XP. Higher levels produce more junk per scrap (multiplier tiers). Create rooms for altars (off the existing Scavenging room 9). Add 6 higher-tier junk types (chaosjunk, deathjunk, bloodjunk, lawjunk, cosmicjunk, naturejunk) with corresponding altars and identifiers for Science to use later. + +--- + +## Step 6: Science (Magic System) + +See `skill_plans/science.md`. Players "trigger mods" (cast spells) powered by junk (runes). Decks (staves) provide unlimited supply of one junk type and remove scrap requirement. Depends on combat overhaul + scavenging. + +- [ ] **Science System** — Define ~40 mods in Go: 20 combat mods (5 levels each of solar/hydro/eco/bio strikes), ~20 utility mods (low/high level processing, bones to nutrients, electromagnetic grab, superheat item, transport/teleport mods, jewelry enchants, bolt chipping). Add `ProvidesJunk string` field to ItemDef. Create deck items (basic, solar, hydro, eco, bio — each provides unlimited of one junk type; any deck removes scrap requirement). Add `trigger`/`cast` command (Active for combat, instant for utility), `autocast` command (Instant), `mods` command (Instant — shows known mods and junk costs). Integrate autocast into combat loop in `cmd_attack.go`. Science combat uses Science level + science_attack for accuracy, mod's MaxHit for damage. Elemental weakness gives +30% accuracy. Award Science XP per cast. + +--- + +## Step 7: Shop System + +Originally Phase 2, but needed before Assassin and generally useful. Add a buy/sell interface via talk node actions. + +- [ ] **Shop System** — Add a `shop` talk node action that opens a buy/sell interface. The shop inventory is defined in the behavior YAML as a list of items with buy/sell prices. Player enters `StateShop`. Commands: `buy `, `sell `, `browse`/`list`, `leave`. Items are bought with credits, sold back at a percentage. Add a General Store NPC and a Weapons Shop NPC. Place in appropriate rooms. + +--- + +## Step 8: Thieving + +See `skill_plans/thieving.md`. Steal from mobs and objects. Sneak mode, guard mechanics. + +- [ ] **Thieving** — Add `steal`/`thieve` command (Active) and `sneak` command (Instant toggle). Stealing from mobs: roll success based on Thieving level vs mob's thieving level requirement. On fail, mob turns hostile (starts combat). Stealing from objects: market stall gives random low-value food. Guard watching mechanic: mobs can guard objects, `sneak` mode shows guard attention cycle, lower success when watched, guard called on watched failure. Create credit_stick item (non-stackable, searchable for credits). Create Farmer and Bioengineer mobs (steal seeds from them). Add guard confrontation dialog (bribe/jail/fight). Create jail room. Update Man mob to be stealable. + +--- + +## Step 9: Assassin (Slayer) + +See `skill_plans/assassin.md`. Task system, reputation, slayer-only mobs. Depends on combat being solid and having enough mobs to assign as tasks. + +- [ ] **Assassin System** — Add `task` command (Instant) to check current assignment. Create Client NPC with talk behavior: assigns random mob kill tasks, skip/extend via reputation, reputation shop. Store task state in player flags (task_mob, task_count, task_remaining, tasks_completed, streak, reputation). In `endCombat()`, check if killed mob is on-task and award Assassin XP + reputation. Streak bonuses at 10th/50th/100th/250th/1000th task. Create 4+ slayer-only mobs with assassin_level requirements, finishing blow items (slug+salt, crawler+acid_vial), and damage-without equipment (drone needs insulated_gloves, phantom needs spectral_visor). Add assassin equipment items (cheap, sold by Client). Place slayer mobs in appropriate rooms. + +--- + +## Step 10: Pharmacy + +See `skill_plans/pharmacy.md`. Herb cleaning and potion mixing. Can work initially with herbs as mob drops; Farming adds the growing mechanic later. + +- [x] **Pharmacy Skill** — Add `clean` command (Free, background action like fletching): auto-cleans grimy herbs in inventory one at a time, each clean awards Pharmacy XP based on herb level. Add `mix` command (Active, production system): no station required, shows recipe table, mixes potions. Create ~14 grimy herb items and ~14 clean herb items (guam through torstol). Create ~16 potion items (stim potion, fortify potion, restore serum, etc. — sci-fi names). Create vial_of_water and ~14 unfinished potion items. Create ~11 reagent items (eye_of_newt, limpwurt_root, etc.). Create ~30 recipes (14 clean-herb, 16 mix-potion). Add grimy herbs to mob drop tables. Potion effects are item-only for now (no buff system — just items in inventory for future use or sale). + +--- + +## Step 11: Farming + +See `skill_plans/farming.md`. Grows herbs for Pharmacy and allotment crops. Per-player plot state via player flags. + +- [ ] **Farming Skill** — Add `plant`, `harvest`, `rake`, `water`, `cure`, `inspect` commands. Farming state tracked per-player via player flags (each plot stores seed, growth stage, watered, diseased status). Add `FarmTick()` that runs every ~500 ticks for online players: advances growth stages, rolls disease chance (watering prevents), diseased plants die if not cured. Create seed items (14 herb seeds, 7 allotment seeds). Create farming tools (rake, spade, watering_can, plant_cure). Create plot objects (herb_patch, allotment_patch). Create tool_shed object with store/retrieve interaction. Harvesting gives 3-15 herbs or 3-10 crops based on farming level. Create farming area rooms south of room 15. + +--- + +## Step 12: Bank System + +Quality of life — by this point players have many items. Simple deposit/withdraw at bank booth objects. + +- [ ] **Bank System** — Add bank storage to player (saved in character YAML, no slot limit or large slot limit). Create bank_booth object. `use bank` or `bank` command opens bank interface in a new session state. Commands: `deposit `, `withdraw `, `deposit all`, `list`/`browse`, `leave`. Bank is shared across all characters on the same account. Place bank booths in town and key areas. + +--- + +## Step 13: Construction + +See `skill_plans/construction.md`. Player housing and workshop crafting. Very independent — can be done in any order. + +- [ ] **Construction Skill** — Create real estate broker NPC (talk behavior, sells house for 10 credits via `cost` + `set_player_flags`). Create Local Neighborhood room north of room 16 with Directory object. Directory: `look` shows all homeowners (scan character files), `use` teleports to a house. Player houses are virtual rooms generated in code (not YAML files). Each house has entrance + workshop. Workshop has workbench station object. Add `make`/`construct` command (Active, production system). Create plank items (regular through mahogany). Create construction recipes: logs → planks (very slow, ~20 ticks), planks → furniture items (shelf, table, chair, etc. — sellable items with credit value). All recipes use `type: "construction"`, `station: ["workbench"]`. + +--- + +## Step 14: Agility + +See `skill_plans/agility.md`. Obstacle courses with custom commands. Independent. + +- [ ] **Agility Skill** — Create course definition system: `data/courses/.yaml` defines a sequence of obstacle rooms with custom verbs (scramble, jump, swing, balance, climb, etc.), messages per phase, ticks per phase, and XP per obstacle. Add a single `doObstacle()` handler that all obstacle verbs route to. Course loader builds a `roomID → {courseID, obstacleIndex, verb}` map. Each obstacle is a 3-phase multi-tick action (approach → attempt → complete/fail). Fail chance based on agility vs required level; failure deals minor damage and teleports to course start. Track laps per course in player flags. Create 3 courses: Ventilation Shaft (Lv1, 5 obstacles), Rooftop (Lv20, 6 obstacles), Reactor (Lv50, 7 obstacles). Create ~18 obstacle rooms with descriptions. Big XP drop on course completion. + +--- + +## Step 15: Hacking + +See `skill_plans/hacking.md`. Jack into terminals, play minigames for Hacking XP. Most independent skill. + +- [ ] **Hacking Skill** — Add `StateHacking` session state. Add `jack`/`jackin` command (Active). Create `HackingMinigame` interface with `Init(level) string` and `HandleInput(input) (output, done, won)`. Terminal objects are registered in a Go map (not YAML behaviors). Implement 3 minigames: Hunt the Wumpus (Lv1, 20-node dodecahedron, probes, hazards), Mastermind/Code Breaker (Lv20, 4-digit cipher, 10 guesses, feedback), Liar's Dice/Signal Bluff (Lv40, hidden dice bidding/bluffing vs AI, wilds, exact calls). Create terminal objects and Netrunner NPC with tips dialog. Award XP on completion (more for winning, bonus for efficiency). Place terminals in rooms. + +--- + +## Step 16: World Building + +Content additions that flesh out the game world after all systems are in place. + +- [ ] More rooms — expand the asteroid world with distinct areas: residential district, industrial sector, reactor level, docking bay, science wing, maintenance tunnels +- [ ] More mobs — fill out the combat level curve with 15-20 more mobs at various levels +- [ ] Quest lines — use existing talk node + flag system to create multi-step quest chains connecting the different areas +- [ ] Ensure player actions broadcast to other players in the same room (e.g., "John starts mining a copper rock!", "Jane jacks into a terminal.") + +--- + +## Step 17: Polish + +- [ ] Admin commands — kick, teleport, spawn items, god mode, broadcast +- [ ] PvP combat and multi-combat zones +- [ ] Persist ground items and mob state across restarts (serialize to YAML on shutdown, load on startup) +- [ ] Potion buff system — consuming potions gives temporary stat boosts (builds on Pharmacy items created in Step 10) -- cgit v1.2.3