random fixes

This commit is contained in:
ntr 2019-01-07 19:55:46 +11:00
parent 82c89fb6bc
commit 23aafe1e80
7 changed files with 79 additions and 114 deletions

View File

@ -4,7 +4,6 @@
<title>cryps.gg - mnml pvp atbs</title> <title>cryps.gg - mnml pvp atbs</title>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<script defer src="https://use.fontawesome.com/releases/v5.1.0/js/all.js"></script>
<link rel="stylesheet" href="./node_modules/izitoast/dist/css/iziToast.min.css"></script> <link rel="stylesheet" href="./node_modules/izitoast/dist/css/iziToast.min.css"></script>
</head> </head>
<body> <body>

View File

@ -147,103 +147,58 @@ module.exports = {
}, },
SKILLS: { SKILLS: {
LEARNABLE: [ LEARNABLE:
{ [ { name: 'Amplify',
name: 'Attack', description: 'increase the magic damage dealt by a cryp' },
description: 'a fast physical attack with phys dmg', { name: 'Attack',
}, description: 'a fast physical attack with phys dmg' },
{ { name: 'Banish',
name: 'Block', description:
description: 'decreases incoming physical damage for 1T', 'target cryp is prevented from casting any skills and taking any damage' },
}, { name: 'Blast',
{ description: 'blast the target with magic damage' },
name: 'Parry', { name: 'Block',
description: 'prevents all physical damage for 1T', description: 'decreases incoming physical damage for 1T' },
}, { name: 'Curse',
{ description: 'target cryp takes increased magic damage' },
name: 'Evade', { name: 'Decay',
description: 'gives a chance to evade physical damage for 1T', description:
}, 'afflict a cryp with a spell damage based damage over time debuff' },
{ { name: 'Drain',
name: 'Snare', description: 'drain hp from target cryp with a spell damage based debuff' },
description: 'prevents physical skills from being used for 2T', { name: 'Empower',
}, description: 'increase the physical damage dealt by a cryp' },
{ { name: 'Evade',
name: 'Stun', description: 'gives a chance to evade physical damage for 1T' },
description: 'physical skill that prevents target cryp from using any skills', { name: 'Evasion',
}, description: 'grants Evade effect to a cryp' },
{ { name: 'Haste',
name: 'Evasion', description: 'magical skill that increases speed of target cryp' },
description: 'grants Evade effect to a cryp', { name: 'Heal', description: 'heal a cryp with spell dmg' },
}, { name: 'Hex',
{ description:
name: 'Heal', 'magical based skill that prevents target cryp from using any skills' },
description: 'heal a cryp with spell dmg', { name: 'Parry',
}, description: 'prevents all physical damage for 1T' },
{ { name: 'Purge',
name: 'Triage', description: 'remove magical buffs from target cryp' },
description: 'grants a spell dmg based healing over time buff', { name: 'Purify',
}, description: 'remove magical debuffs from target cryp' },
{ { name: 'Shield',
name: 'Throw', description: 'grants immunity to magical skills to target cryp' },
description: 'stuns and makes the target take increased physical damage', { name: 'Silence',
}, description: 'prevent target cryp from casting magical skills' },
{ { name: 'Slow',
name: 'Blast', description: 'magical skill that reduces speed of target cryp' },
description: 'blast the target with magic damage', { name: 'Snare',
}, description: 'prevents physical skills from being used for 2T' },
{ { name: 'Stun',
name: 'Amplify', description:
description: 'increase the magic damage dealt by a cryp', 'physical skill that prevents target cryp from using any skills' },
}, { name: 'Throw',
{ description: 'stuns and makes the target take increased physical damage' },
name: 'Decay', { name: 'Triage',
description: 'afflict a cryp with a spell damage based damage over time debuff', description: 'grants a spell dmg based healing over time buff' }
}, ]
{
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',
},
],
}, },
}; };

View File

@ -119,20 +119,20 @@ class MenuCrypList extends Phaser.Scene {
this.game.events.emit('CRYP_SPAWN'); this.game.events.emit('CRYP_SPAWN');
}); });
this.add 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); .setOrigin(0.5, 0.5);
// Dialog to view all cryps // Dialog to view all cryps
const crypList = this.add // const crypList = this.add
.rectangle(ROW_WIDTH * 0.55, ROW_HEIGHT * 3.5, ROW_WIDTH * 0.4, ROW_HEIGHT, 0xff9215) // .rectangle(ROW_WIDTH * 0.55, ROW_HEIGHT * 3.5, ROW_WIDTH * 0.4, ROW_HEIGHT, 0xff9215)
.setInteractive() // .setInteractive()
.setOrigin(0) // .setOrigin(0)
.on('pointerdown', () => { // .on('pointerdown', () => {
// this.game.events.emit('CRYP_LIST'); // // this.game.events.emit('CRYP_LIST');
// Placeholder will give a full list of all cryps in the center // // Placeholder will give a full list of all cryps in the center
}); // });
this.add // this.add
.text(crypList.getCenter().x, crypList.getCenter().y, 'Cryp List (soon)', TEXT.NORMAL) // .text(crypList.getCenter().x, crypList.getCenter().y, 'Cryp List (soon)', TEXT.NORMAL)
.setOrigin(0.5, 0.5); // .setOrigin(0.5, 0.5);
} }
cleanUp() { cleanUp() {

View File

@ -63,7 +63,7 @@ class StatSheet extends Phaser.Scene {
this.stats.add(this.add this.stats.add(this.add
.text(STAT_X, STAT_Y, `${stat.stat}: ${stat.base}`, TEXT.NORMAL)); .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); CRYP_STATS.forEach(crypStat);
} }

View File

@ -115,7 +115,7 @@ impl Cryp {
account: id, account: id,
phys_dmg: CrypStat { base: 0, stat: Stat::PhysicalDamage }, phys_dmg: CrypStat { base: 0, stat: Stat::PhysicalDamage },
spell_dmg: CrypStat { base: 0, stat: Stat::SpellDamage }, 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 }, stamina: CrypStat { base: 0, stat: Stat::Stamina },
hp: CrypStat { base: 0, stat: Stat::Hp }, hp: CrypStat { base: 0, stat: Stat::Hp },
lvl: 0, lvl: 0,

View File

@ -44,7 +44,7 @@ impl Item {
ItemAction::RerollStamina => reroll(self, tx, target, Stat::Stamina), ItemAction::RerollStamina => reroll(self, tx, target, Stat::Stamina),
ItemAction::RerollPhysDamage => reroll(self, tx, target, Stat::PhysicalDamage), ItemAction::RerollPhysDamage => reroll(self, tx, target, Stat::PhysicalDamage),
ItemAction::RerollSpellDamage => reroll(self, tx, target, Stat::SpellDamage), ItemAction::RerollSpellDamage => reroll(self, tx, target, Stat::SpellDamage),
ItemAction::RerollSpeed => reroll(self, tx, target, Stat::SpellDamage), ItemAction::RerollSpeed => reroll(self, tx, target, Stat::Speed),
} }
} }
} }

View File

@ -188,6 +188,10 @@ impl Effect {
Effect::Amplify => vec![Stat::SpellDamage], Effect::Amplify => vec![Stat::SpellDamage],
Effect::Curse => vec![Stat::SpellDamageTaken], Effect::Curse => vec![Stat::SpellDamageTaken],
Effect::Haste => vec![Stat::Speed],
Effect::Slow => vec![Stat::Speed],
_ => vec![], _ => vec![],
} }
} }
@ -203,6 +207,10 @@ impl Effect {
Effect::Amplify => value << 1, Effect::Amplify => value << 1,
Effect::Curse => value << 1, Effect::Curse => value << 1,
Effect::Haste => value << 1,
Effect::Slow => value >> 1,
_ => { _ => {
println!("{:?} does not have a mod effect", self); println!("{:?} does not have a mod effect", self);
return value; return value;
@ -275,6 +283,9 @@ impl Effect {
Effect::Amplify => 2, Effect::Amplify => 2,
Effect::Silence => 2, Effect::Silence => 2,
Effect::Haste => 2,
Effect::Slow => 2,
_ => { _ => {
println!("{:?} does not have a duration", self); println!("{:?} does not have a duration", self);
return 1; return 1;