File tree Expand file tree Collapse file tree 3 files changed +11
-2
lines changed
Core/src/core/database/game Expand file tree Collapse file tree 3 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,11 @@ import {
33} from "sequelize" ;
44
55export async function up ( { context } : { context : QueryInterface } ) : Promise < void > {
6- await context . addColumn ( "players" , "karma" , DataTypes . INTEGER ) ;
6+ await context . addColumn ( "players" , "karma" , {
7+ type : DataTypes . INTEGER ,
8+ allowNull : false ,
9+ defaultValue : 0
10+ } ) ;
711}
812
913export async function down ( { context } : { context : QueryInterface } ) : Promise < void > {
Original file line number Diff line number Diff line change @@ -1508,6 +1508,10 @@ export function initModel(sequelize: Sequelize): void {
15081508 type : DataTypes . INTEGER ,
15091509 defaultValue : EntityConstants . DEFAULT_VALUES . HEALTH
15101510 } ,
1511+ karma : {
1512+ type : DataTypes . INTEGER ,
1513+ defaultValue : EntityConstants . DEFAULT_VALUES . KARMA
1514+ } ,
15111515 fightPointsLost : {
15121516 type : DataTypes . INTEGER ,
15131517 defaultValue : EntityConstants . DEFAULT_VALUES . FIGHT_POINTS_LOST
Original file line number Diff line number Diff line change @@ -4,7 +4,8 @@ export abstract class EntityConstants {
44 ATTACK : 50 ,
55 DEFENSE : 20 ,
66 SPEED : 10 ,
7- FIGHT_POINTS_LOST : 0
7+ FIGHT_POINTS_LOST : 0 ,
8+ KARMA : 0
89 } ;
910
1011 static readonly HEAL_ENERGY_PRICE = [
You can’t perform that action at this time.
0 commit comments