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

Code Without

The document defines a Mongoose schema for a player in a game, including fields for player identification, location, status, experience, money, and various stats. Key attributes include username, nickname, combat status, level, and detailed statistics such as strength, agility, and health points. Default values are provided for each field to ensure consistent player initialization.

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)
15 views2 pages

Code Without

The document defines a Mongoose schema for a player in a game, including fields for player identification, location, status, experience, money, and various stats. Key attributes include username, nickname, combat status, level, and detailed statistics such as strength, agility, and health points. Default values are provided for each field to ensure consistent player initialization.

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
You are on page 1/ 2

const playerSchematon = 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