diff --git a/ops/migrations/20181020104420_games.js b/ops/migrations/20181020104420_games.js index 09e8ccf0..0fc18d17 100644 --- a/ops/migrations/20181020104420_games.js +++ b/ops/migrations/20181020104420_games.js @@ -22,14 +22,6 @@ exports.up = async knex => { .onDelete('CASCADE'); table.index('game'); - // cryp in a game - table.uuid('cryp').notNullable() - table.foreign('cryp') - .references('id') - .inTable('cryps') - .onDelete('CASCADE'); - table.index('cryp'); - // account in a game table.uuid('account').notNullable() table.foreign('account') diff --git a/server/.env b/server/.env old mode 100755 new mode 100644 diff --git a/server/Cargo.toml b/server/Cargo.toml old mode 100755 new mode 100644 diff --git a/server/README.md b/server/README.md old mode 100755 new mode 100644 diff --git a/server/WORKLOG.md b/server/WORKLOG.md old mode 100755 new mode 100644 index f46ed28c..0bdc8ede --- a/server/WORKLOG.md +++ b/server/WORKLOG.md @@ -1,18 +1,3 @@ -Pve needs to be good, not many players early on -Randomly generated PVE graph to traverse with scattered rewards - -Two types of XP -> Skill xp and Cryp XP -Skill XP allocates points in skill tree -Cryp XP allocates points in Cryp passive tree - -Skills can be customised via skill tree - -Cryp obiendience a deteoriating bar (placeholder name) -Cryps gain obedience when playing with you in PVE, PVP or using items -Obedience drains over time -Obedience drains faster when training / missions -Having obedience is desirable for getting good rewards - # Principles * Experience something * Express something @@ -62,14 +47,6 @@ skill order defined by cryp/skill speed counter -> dmg <-> heal -immune to status effects - - -physical, magic, pure dmg? - elemental? - -items give skills - gem td style attr combinations stoney + spikey = jagged @@ -90,7 +67,6 @@ gem td style attr combinations ghostly - * 1: Fighting against human nature is a losing game * 2: Aesthetics matter * 3: Resonance is important diff --git a/server/src/account.rs b/server/src/account.rs old mode 100755 new mode 100644 diff --git a/server/src/cryp.rs b/server/src/cryp.rs old mode 100755 new mode 100644 diff --git a/server/src/game.rs b/server/src/game.rs old mode 100755 new mode 100644 index 7116b832..0187ae66 --- a/server/src/game.rs +++ b/server/src/game.rs @@ -592,27 +592,22 @@ pub fn game_get(tx: &mut Transaction, id: Uuid) -> Result { return Ok(game); } -/// write a row for every cryp in a team when added to a battle -pub fn players_write(team: &Team, game_id: Uuid, tx: &mut Transaction) -> Result<(), Error> { +pub fn players_write(account: &Account, game_id: Uuid, tx: &mut Transaction) -> Result<(), Error> { // pve - if !team.id.is_nil() { - for cryp in &team.cryps { - let id = Uuid::new_v4(); + let id = Uuid::new_v4(); - let query = " - INSERT INTO players (id, game, cryp, account) - VALUES ($1, $2, $3, $4) - RETURNING id, account; - "; + let query = " + INSERT INTO players (id, game, account) + VALUES ($1, $2, $3) + RETURNING id, account; + "; - let result = tx - .query(query, &[&id, &game_id, &cryp.id, &team.id])?; + let result = tx + .query(query, &[&id, &game_id, &account.id])?; - let _returned = result.iter().next().expect("no row written"); + let _returned = result.iter().next().expect("no row written"); - println!("wrote player entry game:{:?} cryp:{:?} account:{:?}", game_id, cryp.id, team.id); - } - } + println!("wrote player {:?} joined game: {:?}", account.name, game_id); return Ok(()); } @@ -695,7 +690,6 @@ pub fn game_pve(params: GamePveParams, tx: &mut Transaction, account: &Account) // persist game_new(&game, tx)?; - // players_write(&game.team_by_id(account.id), game_id, tx)?; Ok(game) } @@ -723,7 +717,7 @@ pub fn game_pvp(params: GamePvpParams, tx: &mut Transaction, account: &Account) // persist game_new(&game, tx)?; - players_write(&game.team_by_id(account.id), game_id, tx)?; + players_write(account, game_id, tx)?; Ok(game) } @@ -757,7 +751,7 @@ pub fn game_join(params: GameJoinParams, tx: &mut Transaction, account: &Account } game_update(&game, tx)?; - players_write(&game.team_by_id(account.id), game_id, tx)?; + players_write(account, game_id, tx)?; Ok(game) } diff --git a/server/src/main.rs b/server/src/main.rs old mode 100755 new mode 100644 diff --git a/server/src/net.rs b/server/src/net.rs old mode 100755 new mode 100644 diff --git a/server/src/rpc.rs b/server/src/rpc.rs old mode 100755 new mode 100644 diff --git a/server/src/skill.rs b/server/src/skill.rs old mode 100755 new mode 100644