0% found this document useful (0 votes)
5 views2 pages

Player Schema for Game Development

The document defines a player schema for a game using a schema structure that includes various attributes such as username, nickname, location, status, level, experience points, money, and detailed stats. Each attribute has default values or requirements, ensuring unique identification and gameplay mechanics. The stats section includes various characteristics like strength, agility, stamina, and health points, with specific default values set for each.

Uploaded by

mailpiligrim
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views2 pages

Player Schema for Game Development

The document defines a player schema for a game using a schema structure that includes various attributes such as username, nickname, location, status, level, experience points, money, and detailed stats. Each attribute has default values or requirements, ensuring unique identification and gameplay mechanics. The stats section includes various characteristics like strength, agility, stamina, and health points, with specific default values set for each.

Uploaded by

mailpiligrim
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

const playerSchematic = new Schema({

_id: { type: Number },


username: { type: String, default: 'NoName' }, // @имя игрока в TG
nickname: { type: String, required: true, unique: true }, // Уникальное имя
игрока в игре
location: {
id: { type: String, default: 'loc_9_10_0' },
name: {type: String, default: 'Village'},
x: { type: Number, default: 9 },
y: { type: Number, default: 10 },
},
status: {
combat: { type: Boolean, default: false },
},
level: { type: Number, default: 1 }, // Уровень игрока
exp: {
currentLvl: { type: Number, default: 0 }, // Очки опыта на
текущем уровне
forNextLvl: { type: Number, default: 400 },
},
money: { type: Number, default: 0 },
},
stats: {
strength: {
total: { type: Number, default: 2 },
},
agility: {
total: { type: Number, default: 4 },
},
stamina: {
total: { type: Number, default: 2 },
},
intellect: {
total: { type: Number, default: 1 },
},
wisdom: {
total: { type: Number, default: 1 },
},

phyDamage: {
total: { type: Number, default: 5 },
},
phyHit: {
total: { type: Number, default: 2 },
},
phyCrit: {
total: { type: Number, default: 3 },
},
phyCritMulti: {
total: { type: Number, default: 1.5 },
},
phyPenetration: {
total: { type: Number, default: 0 },
},
armor: {
total: { type: Number, default: 0 },
},
evasion: {
total: { type: Number, default: 4 },
},
shieldBlockChance: {
total: { type: Number, default: 0 },
},
shieldBlockValue: {
total: { type: Number, default: 0 },
},

healsRegen: {
total: { type: Number, default: 3 },
},
energyRegen: {
total: { type: Number, default: 10 },
},
initiative: {
total: { type: Number, default: 10 },
},
hp: { type: Number, default: 70 }, // Здоровье
игрока
hpTotal: {
total: { type: Number, default: 70 },
}
},

You might also like