companions
Opened this issue · 7 comments
JuanPablo2655 commented
Is your feature request related to a problem? Please describe.
I've been trying to figure out the best stats for companions. So far I have this:
export interface RaceData {
race: RaceOptions;
description: string;
health: number;
magicka: number;
defense: number;
attack: number;
}
Describe the ideal solution
probably refactor raceData I don't know.
JuanPablo2655 commented
Yeah this is gonna have to get refactored into something like this:
export interface RaceData {
race: RaceOptions;
description: string;
health: number;
mana: number;
stats: {
strength: number;
dexterity: number;
endurance: number;
intelligence: number;
luck: number; // ?? maybe
};
}
rand0m-cloud commented
RaceData
isn't so clear on what it does. CompanionData
or PetData
should be better.
Maybe the companion stats should be separated into its own class to separate responsibilities.
JuanPablo2655 commented
Oh yeah, CompanionData
sounds a lot better.
JuanPablo2655 commented
JuanPablo2655 commented
okay I've been messing around with the idea and this is what I've come up with so far:
export interface Companion {
_id: Snowflake;
name: string;
exp: Experience;
data: EntityData;
}
export interface Npc {
name: string;
data: EntityData;
killable: boolean;
}
export interface EntityData {
dna: DnaOptions;
gender: string;
class: ClassOptions;
health: number;
mana: number;
stats: Stats;
mutation: 'Vampire' | 'Werewolf' | 'Undead' | null;
}
export interface Experience {
level: number;
xp: number;
}
export interface Stats {
strength: number;
dexterity: number;
endurance: number;
intelligence: number;
}
rand0m-cloud commented
Data
=> EntityData
?
I would avoid using race
and opting for dna
.
JuanPablo2655 commented
Yeah, that works also moved killable to Npc
.