From 23aafe1e801fff47a2eb13dc669ad386bae775cc Mon Sep 17 00:00:00 2001 From: ntr Date: Mon, 7 Jan 2019 19:55:46 +1100 Subject: [PATCH] random fixes --- client/index.html | 1 - client/src/scenes/constants.js | 151 ++++++++++----------------- client/src/scenes/menu.cryps.list.js | 24 ++--- client/src/scenes/statsheet.js | 2 +- server/src/cryp.rs | 2 +- server/src/item.rs | 2 +- server/src/skill.rs | 11 ++ 7 files changed, 79 insertions(+), 114 deletions(-) diff --git a/client/index.html b/client/index.html index f2f0d978..828d2eee 100644 --- a/client/index.html +++ b/client/index.html @@ -4,7 +4,6 @@ cryps.gg - mnml pvp atbs - diff --git a/client/src/scenes/constants.js b/client/src/scenes/constants.js index 29745c94..3acebda5 100644 --- a/client/src/scenes/constants.js +++ b/client/src/scenes/constants.js @@ -147,103 +147,58 @@ module.exports = { }, SKILLS: { - LEARNABLE: [ - { - name: 'Attack', - description: 'a fast physical attack with phys dmg', - }, - { - name: 'Block', - description: 'decreases incoming physical damage for 1T', - }, - { - name: 'Parry', - description: 'prevents all physical damage for 1T', - }, - { - name: 'Evade', - description: 'gives a chance to evade physical damage for 1T', - }, - { - name: 'Snare', - description: 'prevents physical skills from being used for 2T', - }, - { - name: 'Stun', - description: 'physical skill that prevents target cryp from using any skills', - }, - { - name: 'Evasion', - description: 'grants Evade effect to a cryp', - }, - { - name: 'Heal', - description: 'heal a cryp with spell dmg', - }, - { - name: 'Triage', - description: 'grants a spell dmg based healing over time buff', - }, - { - name: 'Throw', - description: 'stuns and makes the target take increased physical damage', - }, - { - name: 'Blast', - description: 'blast the target with magic damage', - }, - { - name: 'Amplify', - description: 'increase the magic damage dealt by a cryp', - }, - { - name: 'Decay', - description: 'afflict a cryp with a spell damage based damage over time debuff', - }, - { - name: 'Drain', - description: 'drain hp from target cryp with a spell damage based debuff', - }, - { - name: 'Curse', - description: 'target cryp takes increased magic damage', - }, - { - name: 'Empower', - description: 'increase the physical damage dealt by a cryp', - }, - { - name: 'Shield', - description: 'grants immunity to magical skills to target cryp', - }, - { - name: 'Silence', - description: 'prevent target cryp from casting magical skills', - }, - { - name: 'Purify', - description: 'remove magical debuffs from target cryp', - }, - { - name: 'Purge', - description: 'remove magical buffs from target cryp', - }, - { - name: 'Banish', - description: 'target cryp is prevented from casting any skills and taking any damage', - }, - { - name: 'Hex', - description: 'magical based skill that prevents target cryp from using any skills', - }, - { - name: 'Haste', - description: 'magical skill that increases speed of target cryp', - }, - { - name: 'Slow', - description: 'magical skill that reduces speed of target cryp', - }, - ], + LEARNABLE: + [ { name: 'Amplify', + description: 'increase the magic damage dealt by a cryp' }, + { name: 'Attack', + description: 'a fast physical attack with phys dmg' }, + { name: 'Banish', + description: + 'target cryp is prevented from casting any skills and taking any damage' }, + { name: 'Blast', + description: 'blast the target with magic damage' }, + { name: 'Block', + description: 'decreases incoming physical damage for 1T' }, + { name: 'Curse', + description: 'target cryp takes increased magic damage' }, + { name: 'Decay', + description: + 'afflict a cryp with a spell damage based damage over time debuff' }, + { name: 'Drain', + description: 'drain hp from target cryp with a spell damage based debuff' }, + { name: 'Empower', + description: 'increase the physical damage dealt by a cryp' }, + { name: 'Evade', + description: 'gives a chance to evade physical damage for 1T' }, + { name: 'Evasion', + description: 'grants Evade effect to a cryp' }, + { name: 'Haste', + description: 'magical skill that increases speed of target cryp' }, + { name: 'Heal', description: 'heal a cryp with spell dmg' }, + { name: 'Hex', + description: + 'magical based skill that prevents target cryp from using any skills' }, + { name: 'Parry', + description: 'prevents all physical damage for 1T' }, + { name: 'Purge', + description: 'remove magical buffs from target cryp' }, + { name: 'Purify', + description: 'remove magical debuffs from target cryp' }, + { name: 'Shield', + description: 'grants immunity to magical skills to target cryp' }, + { name: 'Silence', + description: 'prevent target cryp from casting magical skills' }, + { name: 'Slow', + description: 'magical skill that reduces speed of target cryp' }, + { name: 'Snare', + description: 'prevents physical skills from being used for 2T' }, + { name: 'Stun', + description: + 'physical skill that prevents target cryp from using any skills' }, + { name: 'Throw', + description: 'stuns and makes the target take increased physical damage' }, + { name: 'Triage', + description: 'grants a spell dmg based healing over time buff' } + ] }, }; diff --git a/client/src/scenes/menu.cryps.list.js b/client/src/scenes/menu.cryps.list.js index 03f6451c..fdf1399d 100644 --- a/client/src/scenes/menu.cryps.list.js +++ b/client/src/scenes/menu.cryps.list.js @@ -119,20 +119,20 @@ class MenuCrypList extends Phaser.Scene { this.game.events.emit('CRYP_SPAWN'); }); this.add - .text(spawn.getCenter().x, spawn.getCenter().y, 'Spawn Cryp', TEXT.HEADER) + .text(spawn.getCenter().x, spawn.getCenter().y, '+', TEXT.HEADER) .setOrigin(0.5, 0.5); // Dialog to view all cryps - const crypList = this.add - .rectangle(ROW_WIDTH * 0.55, ROW_HEIGHT * 3.5, ROW_WIDTH * 0.4, ROW_HEIGHT, 0xff9215) - .setInteractive() - .setOrigin(0) - .on('pointerdown', () => { - // this.game.events.emit('CRYP_LIST'); - // Placeholder will give a full list of all cryps in the center - }); - this.add - .text(crypList.getCenter().x, crypList.getCenter().y, 'Cryp List (soon)', TEXT.NORMAL) - .setOrigin(0.5, 0.5); + // const crypList = this.add + // .rectangle(ROW_WIDTH * 0.55, ROW_HEIGHT * 3.5, ROW_WIDTH * 0.4, ROW_HEIGHT, 0xff9215) + // .setInteractive() + // .setOrigin(0) + // .on('pointerdown', () => { + // // this.game.events.emit('CRYP_LIST'); + // // Placeholder will give a full list of all cryps in the center + // }); + // this.add + // .text(crypList.getCenter().x, crypList.getCenter().y, 'Cryp List (soon)', TEXT.NORMAL) + // .setOrigin(0.5, 0.5); } cleanUp() { diff --git a/client/src/scenes/statsheet.js b/client/src/scenes/statsheet.js index 485af1d1..61567459 100644 --- a/client/src/scenes/statsheet.js +++ b/client/src/scenes/statsheet.js @@ -63,7 +63,7 @@ class StatSheet extends Phaser.Scene { this.stats.add(this.add .text(STAT_X, STAT_Y, `${stat.stat}: ${stat.base}`, TEXT.NORMAL)); }; - const CRYP_STATS = [cryp.stamina, cryp.phys_dmg, cryp.spell_dmg]; + const CRYP_STATS = [cryp.stamina, cryp.phys_dmg, cryp.spell_dmg, cryp.speed]; CRYP_STATS.forEach(crypStat); } diff --git a/server/src/cryp.rs b/server/src/cryp.rs index 8a35a60d..f17a94d4 100644 --- a/server/src/cryp.rs +++ b/server/src/cryp.rs @@ -115,7 +115,7 @@ impl Cryp { account: id, phys_dmg: CrypStat { base: 0, stat: Stat::PhysicalDamage }, spell_dmg: CrypStat { base: 0, stat: Stat::SpellDamage }, - speed: CrypStat { base: 0, stat: Stat::SpellDamage }, + speed: CrypStat { base: 0, stat: Stat::Speed }, stamina: CrypStat { base: 0, stat: Stat::Stamina }, hp: CrypStat { base: 0, stat: Stat::Hp }, lvl: 0, diff --git a/server/src/item.rs b/server/src/item.rs index 738a9ce9..8301118a 100644 --- a/server/src/item.rs +++ b/server/src/item.rs @@ -44,7 +44,7 @@ impl Item { ItemAction::RerollStamina => reroll(self, tx, target, Stat::Stamina), ItemAction::RerollPhysDamage => reroll(self, tx, target, Stat::PhysicalDamage), ItemAction::RerollSpellDamage => reroll(self, tx, target, Stat::SpellDamage), - ItemAction::RerollSpeed => reroll(self, tx, target, Stat::SpellDamage), + ItemAction::RerollSpeed => reroll(self, tx, target, Stat::Speed), } } } diff --git a/server/src/skill.rs b/server/src/skill.rs index e9f9150c..f7076cfe 100644 --- a/server/src/skill.rs +++ b/server/src/skill.rs @@ -188,6 +188,10 @@ impl Effect { Effect::Amplify => vec![Stat::SpellDamage], Effect::Curse => vec![Stat::SpellDamageTaken], + + Effect::Haste => vec![Stat::Speed], + Effect::Slow => vec![Stat::Speed], + _ => vec![], } } @@ -203,6 +207,10 @@ impl Effect { Effect::Amplify => value << 1, Effect::Curse => value << 1, + + Effect::Haste => value << 1, + Effect::Slow => value >> 1, + _ => { println!("{:?} does not have a mod effect", self); return value; @@ -275,6 +283,9 @@ impl Effect { Effect::Amplify => 2, Effect::Silence => 2, + Effect::Haste => 2, + Effect::Slow => 2, + _ => { println!("{:?} does not have a duration", self); return 1;