-
Notifications
You must be signed in to change notification settings - Fork 272
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add weapon categories to more tools #2708
Add weapon categories to more tools #2708
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changes look good. however, i think some tools could be flagged as HOOKED_POLES
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Only thing I'd note is |
i see. maybe weapon categories should be rewritten someday to only account for their shape, for example |
Could be fair to mess with it more in the future, yeah. It already also includes |
or we could go even more extreme and replace all these weapon categories to combo of size + shape
|
Distinguishing between small, medium, and large (like daggers, one-handed swords, and two-handed swords for example) and between general shape could work, yeah. Just something to mess about with another time. |
yeah the migration can be perfectly automated, let's think on that later. Example migration scriptimport { match } from "npm:ts-pattern"
import { distinct } from "https://deno.land/[email protected]/collections/distinct.ts"
type OldCategory = "club" | "hooked_pole" | "knife"
type Length = "SHORT" | "MEDIUM" | "LONG"
type Shape = "POLE" | "HOOK" | "BLADE"
type NewCat = (l: Length) => (s: Shape) => () => [Length, Shape]
const newCat: NewCat = (l) => (s) => () => [l, s]
type MigrateCategory = (c: OldCategory) => string[]
const migrateCategory: MigrateCategory =
(c) => match(c)
.with("club", newCat("LONG")("POLE"))
.with("hooked_pole", newCat("LONG")("HOOK"))
.with("knife", newCat("SHORT")("BLADE"))
.exhaustive()
const flags = [ "club", "hooked_pole" ] as const
const newFlags = distinct(flags.flatMap(migrateCategory))
console.log(newFlags) // [ "LONG", "POLE", "HOOK" ] |
Summary
SUMMARY: Balance "Grant weapon categories to more tools"
Purpose of change
Some simple weapon category things spotted while working on something else.
Describe the solution
1H_AXES
andHOOKED_POLES
category to stone adze, this being what the hoe uses.HAND_AXES
category to hatchet and ice axe, being two small axe-like tools.CLUBS
category to crowbar, makeshift crowbar, claw bar, wooden smoother, digging stick, stone shovel, shovel, torches, and entrenching tool, withHOOKED_POLES
additionally added to crowbar, makeshift crowbar, and claw bar per request.1H_HAMMERS
category to stone hammer.KNIVES
category to screwdriver and soldering iron, basically a shiv. Also to x-acto knife and scalpel.HOOKED_POLES
category to scythe.SHORT_SWORDS
andHOOKED_POLES
categories to sickle, the latter per request.BATONS
category to heavy-duty flashlights.GLAIVES
category to lajatangs and chainsaw lajatangs. While obviously not the most efficient choice, idea is this makes these infamous weapons actually applicable to some vanilla styles.1H_HAMMERS
toFLAILS
as its recipe and description implies metal heads secured by cordage.Describe alternatives you've considered
pickaxesand chainsaws, or at least running chainsaws. Maybe also grapnel, grip hook, and such. EDIT: Didn't notice, pickaxe actually already hasHOOKED_POLES
category.Testing
Additional context