-
Notifications
You must be signed in to change notification settings - Fork 1
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 Cairn gear packages #83
Comments
Refactoring Cairn items like armors #88, would allow for us to save Gear packages using something like this: export const GEAR_PACKAGES = {
cleric: [
WEAPONS['War Hammer'],
ARMORS['Chainmail'],
ARMORS['Gauntlets'],
... createWeapon('Cleansing Blade', 'd6') // can be used for custom non-SRD items, which are not repeated elsewhere
... createItem('Holy Symbol (Ward once per day)'),
... createItem('Cloak of the Order')
]
} |
I have a preference for the following: const createItem = ({ name, description, bulky, stacks }: {
name: string,
description?: string,
bulky?: boolean,
stacks?: boolean,
}
): ItemCairn => {
return { name: name, type: 'item', description: description, bulky, stacks: stacks, };
} This allows We could also import GEARS, TOOLS, and TRINKETS under ITEMS, so that we can add |
I like the cleric: [
WEAPONS["War Hammer"],
createWeapon("Cleansing Blade", "d6"),
] results in this: cleric: [
{
name: 'War Hammer (d10, bulky)',
type: 'weapon',
bulky: true,
damage: 'd10'
},
{ 'Cleansing Blade': [Object] }, I think it would be best if we just used simple classes for armor and weapons, like so: export class ArmorCairn {
public record: Record<string, Partial<ItemCairn>>;
constructor ({ name, armor, bulky }: { name: string, armor: string, bulky?: boolean }) {
const prettyName = `${name} (${armor} Armor${bulky ? ', bulky': ''})`;
this.record = {[name]: { name: prettyName, type: 'armor', bulky, armor: armor }};
return this;
}
public getItem() {
return this.record[Object.keys(this.record)[0]];
}
} Then we can use e.g. |
Add https://cairnrpg.com/cairn-srd/#optional-gear-packages as ItemCairn arrays
to allow for more flexible character generation.
The text was updated successfully, but these errors were encountered: