rename to red and blue
This commit is contained in:
parent
08cc37e2b7
commit
8a78528c80
@ -85,9 +85,9 @@ class CrypImage extends Phaser.GameObjects.Image {
|
|||||||
scene.add.text(nameX, nameY, cryp.name, TEXT.NORMAL).setOrigin(team, 0);
|
scene.add.text(nameX, nameY, cryp.name, TEXT.NORMAL).setOrigin(team, 0);
|
||||||
// Add cryp stat bars
|
// Add cryp stat bars
|
||||||
this.health = scene.add.existing(new StatBar(scene, this, 'HP'));
|
this.health = scene.add.existing(new StatBar(scene, this, 'HP'));
|
||||||
this.armour = scene.add.existing(new StatBar(scene, this, 'Armour'));
|
this.red_shield = scene.add.existing(new StatBar(scene, this, 'Red Shield'));
|
||||||
|
this.blue_shield = scene.add.existing(new StatBar(scene, this, 'Blue Shield'));
|
||||||
this.evasion = scene.add.existing(new StatBar(scene, this, 'Evasion'));
|
this.evasion = scene.add.existing(new StatBar(scene, this, 'Evasion'));
|
||||||
this.spellShield = scene.add.existing(new StatBar(scene, this, 'Spell Shield'));
|
|
||||||
|
|
||||||
this.effects = scene.add.existing(new Effects(scene, team, iter));
|
this.effects = scene.add.existing(new Effects(scene, team, iter));
|
||||||
this.statusText = scene.add.text(statusX, statusY, '', TEXT.NORMAL);
|
this.statusText = scene.add.text(statusX, statusY, '', TEXT.NORMAL);
|
||||||
@ -116,9 +116,9 @@ class CrypImage extends Phaser.GameObjects.Image {
|
|||||||
|
|
||||||
reduceDefense(amount, type) {
|
reduceDefense(amount, type) {
|
||||||
if (type === 'PhysDmg') {
|
if (type === 'PhysDmg') {
|
||||||
this.armour.takeDamage(amount);
|
this.red_shield.takeDamage(amount);
|
||||||
} else if (type === 'SpellDmg') {
|
} else if (type === 'BlueDmg') {
|
||||||
this.spellShield.takeDamage(amount);
|
this.blue_shield.takeDamage(amount);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -162,31 +162,31 @@ module.exports = {
|
|||||||
[ { name: 'Amplify',
|
[ { name: 'Amplify',
|
||||||
description: 'increase the magic damage dealt by a cryp' },
|
description: 'increase the magic damage dealt by a cryp' },
|
||||||
{ name: 'Attack',
|
{ name: 'Attack',
|
||||||
description: 'a fast physical attack with phys dmg' },
|
description: 'a fast attack with red dmg' },
|
||||||
{ name: 'Banish',
|
{ name: 'Banish',
|
||||||
description:
|
description:
|
||||||
'target cryp is prevented from casting any skills and taking any damage' },
|
'target cryp is prevented from casting any skills and taking any damage' },
|
||||||
{ name: 'Blast',
|
{ name: 'Blast',
|
||||||
description: 'blast the target with magic damage' },
|
description: 'blast the target with magic damage' },
|
||||||
{ name: 'Block',
|
{ name: 'Block',
|
||||||
description: 'decreases incoming physical damage for 1T' },
|
description: 'decreases incoming red damage for 1T' },
|
||||||
{ name: 'Curse',
|
{ name: 'Curse',
|
||||||
description: 'target cryp takes increased magic damage' },
|
description: 'target cryp takes increased magic damage' },
|
||||||
{ name: 'Decay',
|
{ name: 'Decay',
|
||||||
description:
|
description:
|
||||||
'afflict a cryp with a spell damage based damage over time debuff' },
|
'afflict a cryp with a blue damage based damage over time debuff' },
|
||||||
{ name: 'Drain',
|
{ name: 'Drain',
|
||||||
description: 'drain hp from target cryp with a spell damage based debuff' },
|
description: 'drain hp from target cryp with a blue damage based debuff' },
|
||||||
{ name: 'Empower',
|
{ name: 'Empower',
|
||||||
description: 'increase the physical damage dealt by a cryp' },
|
description: 'increase the red damage dealt by a cryp' },
|
||||||
{ name: 'Haste',
|
{ name: 'Haste',
|
||||||
description: 'magical skill that increases speed of target cryp' },
|
description: 'magical skill that increases speed of target cryp' },
|
||||||
{ name: 'Heal', description: 'heal a cryp with spell dmg' },
|
{ name: 'Heal', description: 'heal a cryp with blue dmg' },
|
||||||
{ name: 'Hex',
|
{ name: 'Hex',
|
||||||
description:
|
description:
|
||||||
'magical based skill that prevents target cryp from using any skills' },
|
'magical based skill that prevents target cryp from using any skills' },
|
||||||
{ name: 'Parry',
|
{ name: 'Parry',
|
||||||
description: 'prevents all physical damage for 1T' },
|
description: 'prevents all red damage for 1T' },
|
||||||
{ name: 'Purge',
|
{ name: 'Purge',
|
||||||
description: 'remove magical buffs from target cryp' },
|
description: 'remove magical buffs from target cryp' },
|
||||||
{ name: 'Purify',
|
{ name: 'Purify',
|
||||||
@ -198,14 +198,14 @@ module.exports = {
|
|||||||
{ name: 'Slow',
|
{ name: 'Slow',
|
||||||
description: 'magical skill that reduces speed of target cryp' },
|
description: 'magical skill that reduces speed of target cryp' },
|
||||||
{ name: 'Snare',
|
{ name: 'Snare',
|
||||||
description: 'prevents physical skills from being used for 2T' },
|
description: 'prevents red skills from being used for 2T' },
|
||||||
{ name: 'Stun',
|
{ name: 'Stun',
|
||||||
description:
|
description:
|
||||||
'physical skill that prevents target cryp from using any skills' },
|
'red skill that prevents target cryp from using any skills' },
|
||||||
{ name: 'Throw',
|
{ name: 'Throw',
|
||||||
description: 'stuns and makes the target take increased physical damage' },
|
description: 'stuns and makes the target take increased red damage' },
|
||||||
{ name: 'Triage',
|
{ name: 'Triage',
|
||||||
description: 'grants a spell dmg based healing over time buff' }
|
description: 'grants a blue dmg based healing over time buff' }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@ -29,17 +29,17 @@ class StatBar extends Phaser.GameObjects.Graphics {
|
|||||||
this.val = this.crypObj.cryp.hp.base;
|
this.val = this.crypObj.cryp.hp.base;
|
||||||
this.max = this.crypObj.cryp.stamina.base;
|
this.max = this.crypObj.cryp.stamina.base;
|
||||||
this.margin = 0;
|
this.margin = 0;
|
||||||
} else if (type === 'Armour') {
|
} else if (type === 'RedShield') {
|
||||||
this.val = this.crypObj.cryp.armour.base;
|
this.val = this.crypObj.cryp.red_shield.base;
|
||||||
this.max = this.crypObj.cryp.armour.base;
|
this.max = this.crypObj.cryp.red_shield.base;
|
||||||
this.margin = 1;
|
this.margin = 1;
|
||||||
} else if (type === 'Evasion') {
|
} else if (type === 'Evasion') {
|
||||||
this.val = this.crypObj.cryp.evasion.base;
|
this.val = this.crypObj.cryp.evasion.base;
|
||||||
this.max = this.crypObj.cryp.evasion.base;
|
this.max = this.crypObj.cryp.evasion.base;
|
||||||
this.margin = 2;
|
this.margin = 2;
|
||||||
} else if (type === 'Spell Shield') {
|
} else if (type === 'Blue Shield') {
|
||||||
this.val = this.crypObj.cryp.spell_shield.base;
|
this.val = this.crypObj.cryp.blue_shield.base;
|
||||||
this.max = this.crypObj.cryp.spell_shield.base;
|
this.max = this.crypObj.cryp.blue_shield.base;
|
||||||
this.margin = 3;
|
this.margin = 3;
|
||||||
}
|
}
|
||||||
const { statTextX, statTextY } = statTextCoord(cryp.team, cryp.iter, this.margin);
|
const { statTextX, statTextY } = statTextCoord(cryp.team, cryp.iter, this.margin);
|
||||||
|
|||||||
@ -113,10 +113,10 @@ class MenuCrypList extends Phaser.Scene {
|
|||||||
.setOrigin(0.5, 0.5));
|
.setOrigin(0.5, 0.5));
|
||||||
const CRYP_STATS = [
|
const CRYP_STATS = [
|
||||||
cryp.stamina,
|
cryp.stamina,
|
||||||
cryp.armour,
|
cryp.red_shield,
|
||||||
cryp.spell_shield,
|
cryp.blue_shield,
|
||||||
cryp.phys_dmg,
|
cryp.red_dmg,
|
||||||
cryp.spell_dmg,
|
cryp.blue_dmg,
|
||||||
cryp.speed,
|
cryp.speed,
|
||||||
];
|
];
|
||||||
CRYP_STATS.forEach((stat, j) => crypStat(stat, j, crypInfo));
|
CRYP_STATS.forEach((stat, j) => crypStat(stat, j, crypInfo));
|
||||||
|
|||||||
@ -2,79 +2,79 @@ const passiveNodes = [
|
|||||||
{ x: 860, y: 1011, id: 'CMED1', alloc: false, text: '5% Increased Speed for Chaos Slow skills, 5% Increased Slow Effect'},
|
{ x: 860, y: 1011, id: 'CMED1', alloc: false, text: '5% Increased Speed for Chaos Slow skills, 5% Increased Slow Effect'},
|
||||||
{ x: 905, y: 970, id: 'CSTAT7', alloc: false, text: '+2 Chaos Stat'},
|
{ x: 905, y: 970, id: 'CSTAT7', alloc: false, text: '+2 Chaos Stat'},
|
||||||
{ x: 940, y: 917.5, id: 'CSTAT8', alloc: false, text: '+2 Chaos Stat'},
|
{ x: 940, y: 917.5, id: 'CSTAT8', alloc: false, text: '+2 Chaos Stat'},
|
||||||
{ x: 950, y: 1172.5, id: 'CMED2', alloc: false, text: '5% Increased Speed for Damaging Spells, 5% Increased Speed for Healing Skills'},
|
{ x: 950, y: 1172.5, id: 'CMED2', alloc: false, text: '5% Increased Speed for Damaging Blues, 5% Increased Speed for Healing Skills'},
|
||||||
{ x: 955, y: 1120, id: 'CSDMG1', alloc: false, text: '+5% Increased Spell Damage'},
|
{ x: 955, y: 1120, id: 'CSDMG1', alloc: false, text: '+5% Increased Blue Damage'},
|
||||||
{ x: 965, y: 1082.5, id: 'CSDMG2', alloc: false, text: '+5% Increased Spell Damage'},
|
{ x: 965, y: 1082.5, id: 'CSDMG2', alloc: false, text: '+5% Increased Blue Damage'},
|
||||||
{ x: 970, y: 872.5, id: 'CSTAT9', alloc: false, text: '+2 Chaos Stat'},
|
{ x: 970, y: 872.5, id: 'CSTAT9', alloc: false, text: '+2 Chaos Stat'},
|
||||||
{ x: 975, y: 1012.5, id: 'CSTAT6', alloc: false, text: '+2 Chaos Stat'},
|
{ x: 975, y: 1012.5, id: 'CSTAT6', alloc: false, text: '+2 Chaos Stat'},
|
||||||
{ x: 995, y: 1062.5, id: 'CSDMG3', alloc: false, text: '+5% Increased Spell Damage'},
|
{ x: 995, y: 1062.5, id: 'CSDMG3', alloc: false, text: '+5% Increased Blue Damage'},
|
||||||
{ x: 1000, y: 1150, id: 'CHEAL1', alloc: false, text: '+5% Increased Healing'},
|
{ x: 1000, y: 1150, id: 'CHEAL1', alloc: false, text: '+5% Increased Healing'},
|
||||||
{ x: 1005, y: 812.5, id: 'CMED20', alloc: false, text: '5% Increased Speed for Healing skills, 5% Increased Stamina'},
|
{ x: 1005, y: 812.5, id: 'CMED20', alloc: false, text: '5% Increased Speed for Healing skills, 5% Increased Stamina'},
|
||||||
{ x: 1024.5, y: 1122.5, id: 'CHEAL2', alloc: false, text: '+5% Increased Healing'},
|
{ x: 1024.5, y: 1122.5, id: 'CHEAL2', alloc: false, text: '+5% Increased Healing'},
|
||||||
{ x: 1036.5, y: 896.5, id: 'CMED19', alloc: false, text: '5% Increased Speed for Healing skills, 5% Increased Stamina'},
|
{ x: 1036.5, y: 896.5, id: 'CMED19', alloc: false, text: '5% Increased Speed for Healing skills, 5% Increased Stamina'},
|
||||||
{ x: 1036.5, y: 1042.5, id: 'CMED18', alloc: false, text: '5% Increased Speed for Damaging Spells, 5% Increased Speed for Healing Skills'},
|
{ x: 1036.5, y: 1042.5, id: 'CMED18', alloc: false, text: '5% Increased Speed for Damaging Blues, 5% Increased Speed for Healing Skills'},
|
||||||
{ x: 1036.5, y: 1082.5, id: 'CHEAL3', alloc: false, text: '+5% Increased Healing'},
|
{ x: 1036.5, y: 1082.5, id: 'CHEAL3', alloc: false, text: '+5% Increased Healing'},
|
||||||
{ x: 1041.5, y: 772.5, id: 'CSTAT10', alloc: false, text: '+2 Chaos Stat'},
|
{ x: 1041.5, y: 772.5, id: 'CSTAT10', alloc: false, text: '+2 Chaos Stat'},
|
||||||
{ x: 1055, y: 1327.5, id: 'CMED3', alloc: false, text: '5% Increased Speed for Damaging Spells, 5% Increased Speed for Banish Skills'},
|
{ x: 1055, y: 1327.5, id: 'CMED3', alloc: false, text: '5% Increased Speed for Damaging Blues, 5% Increased Speed for Banish Skills'},
|
||||||
{ x: 1066.5, y: 939.5, id: 'CHEAL5', alloc: false, text: '+5% Increased Healing'},
|
{ x: 1066.5, y: 939.5, id: 'CHEAL5', alloc: false, text: '+5% Increased Healing'},
|
||||||
{ x: 1067.5, y: 995, id: 'CHEAL4', alloc: false, text: '+5% Increased Healing'},
|
{ x: 1067.5, y: 995, id: 'CHEAL4', alloc: false, text: '+5% Increased Healing'},
|
||||||
{ x: 1070, y: 1250, id: 'CSTAT4', alloc: false, text: '+2 Chaos Stat'},
|
{ x: 1070, y: 1250, id: 'CSTAT4', alloc: false, text: '+2 Chaos Stat'},
|
||||||
{ x: 1072.5, y: 840.5, id: 'CHEAL8', alloc: false, text: '+5% Increased Healing'},
|
{ x: 1072.5, y: 840.5, id: 'CHEAL8', alloc: false, text: '+5% Increased Healing'},
|
||||||
{ x: 1087.5, y: 700, id: 'CSTAT11', alloc: false, text: '+2 Chaos Stat'},
|
{ x: 1087.5, y: 700, id: 'CSTAT11', alloc: false, text: '+2 Chaos Stat'},
|
||||||
{ x: 1097.5, y: 1052.5, id: 'CSDMG4', alloc: false, text: '+5% Increased Spell Damage'},
|
{ x: 1097.5, y: 1052.5, id: 'CSDMG4', alloc: false, text: '+5% Increased Blue Damage'},
|
||||||
{ x: 1102.5, y: 1140, id: 'CSTAT5', alloc: false, text: '+2 Chaos Stat'},
|
{ x: 1102.5, y: 1140, id: 'CSTAT5', alloc: false, text: '+2 Chaos Stat'},
|
||||||
{ x: 1102.5, y: 917.5, id: 'CHEAL6', alloc: false, text: '+5% Increased Healing'},
|
{ x: 1102.5, y: 917.5, id: 'CHEAL6', alloc: false, text: '+5% Increased Healing'},
|
||||||
{ x: 1115, y: 1332.5, id: 'CSTAT1', alloc: false, text: '+2 Chaos Stat'},
|
{ x: 1115, y: 1332.5, id: 'CSTAT1', alloc: false, text: '+2 Chaos Stat'},
|
||||||
{ x: 1115, y: 875, id: 'CHEAL7', alloc: false, text: '+5% Increased Healing'},
|
{ x: 1115, y: 875, id: 'CHEAL7', alloc: false, text: '+5% Increased Healing'},
|
||||||
{ x: 1130, y: 640, id: 'CSTAT12', alloc: false, text: '+2 Chaos Stat'},
|
{ x: 1130, y: 640, id: 'CSTAT12', alloc: false, text: '+2 Chaos Stat'},
|
||||||
{ x: 1145, y: 1287.5, id: 'CSTAT3', alloc: false, text: '+2 Chaos Stat'},
|
{ x: 1145, y: 1287.5, id: 'CSTAT3', alloc: false, text: '+2 Chaos Stat'},
|
||||||
{ x: 1145, y: 1057.5, id: 'CSDMG5', alloc: false, text: '+5% Increased Spell Damage'},
|
{ x: 1145, y: 1057.5, id: 'CSDMG5', alloc: false, text: '+5% Increased Blue Damage'},
|
||||||
{ x: 1175, y: 1332.5, id: 'CSTAT2', alloc: false, text: '+2 Chaos Stat'},
|
{ x: 1175, y: 1332.5, id: 'CSTAT2', alloc: false, text: '+2 Chaos Stat'},
|
||||||
{ x: 1180, y: 1247.5, id: 'CMED10', alloc: false, text: '5% Increased Speed for Banish Spells, 5% Increased Stamina'},
|
{ x: 1180, y: 1247.5, id: 'CMED10', alloc: false, text: '5% Increased Speed for Banish Blues, 5% Increased Stamina'},
|
||||||
{ x: 1180, y: 950, id: 'CMED14', alloc: false, text: '5% Increased Speed for Chaos Slow skills, 5% Increased Speed for Banish Skills'},
|
{ x: 1180, y: 950, id: 'CMED14', alloc: false, text: '5% Increased Speed for Chaos Slow skills, 5% Increased Speed for Banish Skills'},
|
||||||
{ x: 1195, y: 875, id: 'CHEAL9', alloc: false, text: '+5% Increased Healing'},
|
{ x: 1195, y: 875, id: 'CHEAL9', alloc: false, text: '+5% Increased Healing'},
|
||||||
{ x: 1196.5, y: 635, id: 'CMED21', alloc: false, text: '5% Increased Effect of Slow, 5% Increased Stamina'},
|
{ x: 1196.5, y: 635, id: 'CMED21', alloc: false, text: '5% Increased Effect of Slow, 5% Increased Stamina'},
|
||||||
{ x: 1205, y: 1062.5, id: 'CSDMG6', alloc: false, text: '+5% Increased Spell Damage'},
|
{ x: 1205, y: 1062.5, id: 'CSDMG6', alloc: false, text: '+5% Increased Blue Damage'},
|
||||||
{ x: 1212.5, y: 1200, id: 'CHEAL14', alloc: false, text: '+5% Increased Healing'},
|
{ x: 1212.5, y: 1200, id: 'CHEAL14', alloc: false, text: '+5% Increased Healing'},
|
||||||
{ x: 1231.5, y: 590, id: 'CSTAT14', alloc: false, text: '+2 Chaos Stat'},
|
{ x: 1231.5, y: 590, id: 'CSTAT14', alloc: false, text: '+2 Chaos Stat'},
|
||||||
{ x: 1235, y: 772.5, id: 'CHEAL12', alloc: false, text: '+5% Increased Healing'},
|
{ x: 1235, y: 772.5, id: 'CHEAL12', alloc: false, text: '+5% Increased Healing'},
|
||||||
{ x: 1240, y: 1225, id: 'CPHYS1', alloc: false, text: '+2% Reduced Physical Damage Taken'},
|
{ x: 1240, y: 1225, id: 'CPHYS1', alloc: false, text: '+2% Reduced Physical Damage Taken'},
|
||||||
{ x: 1240, y: 1322.5, id: 'CMED4', alloc: false, text: '5% Increased Speed for Damaging Spells, 5% Increased Stamina'},
|
{ x: 1240, y: 1322.5, id: 'CMED4', alloc: false, text: '5% Increased Speed for Damaging Blues, 5% Increased Stamina'},
|
||||||
{ x: 1258.5, y: 1107.5, id: 'CHEAL15', alloc: false, text: '+5% Increased Healing'},
|
{ x: 1258.5, y: 1107.5, id: 'CHEAL15', alloc: false, text: '+5% Increased Healing'},
|
||||||
{ x: 1260, y: 917.5, id: 'CHEAL10', alloc: false, text: '+5% Increased Healing'},
|
{ x: 1260, y: 917.5, id: 'CHEAL10', alloc: false, text: '+5% Increased Healing'},
|
||||||
{ x: 1263, y: 520, id: 'CLRG4', alloc: false, text: 'Damaging spells have a 20% chance to inflict slow'},
|
{ x: 1263, y: 520, id: 'CLRG4', alloc: false, text: 'Damaging blues have a 20% chance to inflict slow'},
|
||||||
{ x: 1273.5, y: 1057.5, id: 'CMED13', alloc: false, text: '5% Increased Speed for Banish Spells, 5% Increased Speed for Damaging Spells'},
|
{ x: 1273.5, y: 1057.5, id: 'CMED13', alloc: false, text: '5% Increased Speed for Banish Blues, 5% Increased Speed for Damaging Blues'},
|
||||||
{ x: 1275, y: 1167.5, id: 'CMED11', alloc: false, text: '5% Increased Speed for Banish Spells, 5% Increased Stamina'},
|
{ x: 1275, y: 1167.5, id: 'CMED11', alloc: false, text: '5% Increased Speed for Banish Blues, 5% Increased Stamina'},
|
||||||
{ x: 1275, y: 947.5, id: 'CMED15', alloc: false, text: '5% Increased Speed for Chaos Slow skills, 5% Increased Speed for Damaging Spells'},
|
{ x: 1275, y: 947.5, id: 'CMED15', alloc: false, text: '5% Increased Speed for Chaos Slow skills, 5% Increased Speed for Damaging Blues'},
|
||||||
{ x: 1277.5, y: 872.5, id: 'CMED16', alloc: false, text: '5% Increased Speed for Damaging Spells, 5% Increased Speed for Healing Skills'},
|
{ x: 1277.5, y: 872.5, id: 'CMED16', alloc: false, text: '5% Increased Speed for Damaging Blues, 5% Increased Speed for Healing Skills'},
|
||||||
{ x: 1278.5, y: 812.5, id: 'CHEAL11', alloc: false, text: '+5% Increased Healing'},
|
{ x: 1278.5, y: 812.5, id: 'CHEAL11', alloc: false, text: '+5% Increased Healing'},
|
||||||
{ x: 1280, y: 732.5, id: 'CHEAL13', alloc: false, text: '+5% Increased Healing'},
|
{ x: 1280, y: 732.5, id: 'CHEAL13', alloc: false, text: '+5% Increased Healing'},
|
||||||
{ x: 1281.5, y: 1002.5, id: 'CSDMG7', alloc: false, text: '+5% Increased Spell Damage'},
|
{ x: 1281.5, y: 1002.5, id: 'CSDMG7', alloc: false, text: '+5% Increased Blue Damage'},
|
||||||
{ x: 1284, y: 640, id: 'CSTAT15', alloc: false, text: '+2 Chaos Stat'},
|
{ x: 1284, y: 640, id: 'CSTAT15', alloc: false, text: '+2 Chaos Stat'},
|
||||||
{ x: 1298.5, y: 1107.5, id: 'CPHYS4', alloc: false, text: '+2% Reduced Physical Damage Taken'},
|
{ x: 1298.5, y: 1107.5, id: 'CPHYS4', alloc: false, text: '+2% Reduced Physical Damage Taken'},
|
||||||
{ x: 1302.5, y: 917.5, id: 'CSDMG8', alloc: false, text: '+5% Increased Spell Damage'},
|
{ x: 1302.5, y: 917.5, id: 'CSDMG8', alloc: false, text: '+5% Increased Blue Damage'},
|
||||||
{ x: 1305, y: 1307.5, id: 'CPHYS2', alloc: false, text: '+2% Reduced Physical Damage Taken'},
|
{ x: 1305, y: 1307.5, id: 'CPHYS2', alloc: false, text: '+2% Reduced Physical Damage Taken'},
|
||||||
{ x: 1306, y: 1347.5, id: 'CSDMG10', alloc: false, text: '+5% Increased Spell Damage'},
|
{ x: 1306, y: 1347.5, id: 'CSDMG10', alloc: false, text: '+5% Increased Blue Damage'},
|
||||||
{ x: 1315, y: 762.5, id: 'CMED17', alloc: false, text: '5% Increased Speed for Healing skills, 5% Increased Stamina'},
|
{ x: 1315, y: 762.5, id: 'CMED17', alloc: false, text: '5% Increased Speed for Healing skills, 5% Increased Stamina'},
|
||||||
{ x: 1326.5, y: 590, id: 'CSTAT16', alloc: false, text: '+2 Chaos Stat'},
|
{ x: 1326.5, y: 590, id: 'CSTAT16', alloc: false, text: '+2 Chaos Stat'},
|
||||||
{ x: 1346.5, y: 635, id: 'CMED22', alloc: false, text: '5% Increased Effect of Slow, 5% Increased Stamina'},
|
{ x: 1346.5, y: 635, id: 'CMED22', alloc: false, text: '5% Increased Effect of Slow, 5% Increased Stamina'},
|
||||||
{ x: 1348.5, y: 535, id: 'CSTAT13', alloc: false, text: '+2 Chaos Stat'},
|
{ x: 1348.5, y: 535, id: 'CSTAT13', alloc: false, text: '+2 Chaos Stat'},
|
||||||
{ x: 1355, y: 1322.5, id: 'CMED5', alloc: false, text: '5% Increased Speed for Damaging Spells, 5% Increased Stamina'},
|
{ x: 1355, y: 1322.5, id: 'CMED5', alloc: false, text: '5% Increased Speed for Damaging Blues, 5% Increased Stamina'},
|
||||||
{ x: 1360, y: 1002.5, id: 'CSDMG9', alloc: false, text: '+5% Increased Spell Damage'},
|
{ x: 1360, y: 1002.5, id: 'CSDMG9', alloc: false, text: '+5% Increased Blue Damage'},
|
||||||
{ x: 1399.5, y: 1107.5, id: 'CPHYS5', alloc: false, text: '+2% Reduced Physical Damage Taken'},
|
{ x: 1399.5, y: 1107.5, id: 'CPHYS5', alloc: false, text: '+2% Reduced Physical Damage Taken'},
|
||||||
{ x: 1400, y: 807.5, id: 'CMED24', alloc: false, text: '5% Increased Speed for Damaging Spells, 5% Increased Speed for Healing Skills'},
|
{ x: 1400, y: 807.5, id: 'CMED24', alloc: false, text: '5% Increased Speed for Damaging Blues, 5% Increased Speed for Healing Skills'},
|
||||||
{ x: 1409.5, y: 1312.5, id: 'CPHYS3', alloc: false, text: '+2% Reduced Physical Damage Taken'},
|
{ x: 1409.5, y: 1312.5, id: 'CPHYS3', alloc: false, text: '+2% Reduced Physical Damage Taken'},
|
||||||
{ x: 1410, y: 1347.5, id: 'CSDMG11', alloc: false, text: '+5% Increased Spell Damage'},
|
{ x: 1410, y: 1347.5, id: 'CSDMG11', alloc: false, text: '+5% Increased Blue Damage'},
|
||||||
{ x: 1410, y: 532.5, id: 'CMED23', alloc: false, text: '5% Increased Speed for Banish Spells, 5% Increased Effect of Slow'},
|
{ x: 1410, y: 532.5, id: 'CMED23', alloc: false, text: '5% Increased Speed for Banish Blues, 5% Increased Effect of Slow'},
|
||||||
{ x: 1420, y: 732.5, id: 'CSTAT19', alloc: false, text: '+2 Chaos Stat'},
|
{ x: 1420, y: 732.5, id: 'CSTAT19', alloc: false, text: '+2 Chaos Stat'},
|
||||||
{ x: 1430, y: 1205, id: 'CPHYS7', alloc: false, text: '+2% Reduced Physical Damage Taken'},
|
{ x: 1430, y: 1205, id: 'CPHYS7', alloc: false, text: '+2% Reduced Physical Damage Taken'},
|
||||||
{ x: 1447.5, y: 765, id: 'CMED25', alloc: false, text: '5% Increased Speed for Damaging Spells, 5% Increased Speed for Healing Skills'},
|
{ x: 1447.5, y: 765, id: 'CMED25', alloc: false, text: '5% Increased Speed for Damaging Blues, 5% Increased Speed for Healing Skills'},
|
||||||
{ x: 1452.5, y: 1322.5, id: 'CMED6', alloc: false, text: '5% Increased Speed for Damaging Spells, 5% Increased Stamina'},
|
{ x: 1452.5, y: 1322.5, id: 'CMED6', alloc: false, text: '5% Increased Speed for Damaging Blues, 5% Increased Stamina'},
|
||||||
{ x: 1455, y: 1267.5, id: 'CSTAT33', alloc: false, text: '+2 Chaos Stat'},
|
{ x: 1455, y: 1267.5, id: 'CSTAT33', alloc: false, text: '+2 Chaos Stat'},
|
||||||
{ x: 1455, y: 1147.5, id: 'CMED12', alloc: false, text: '5% Increased Speed for Banish Spells, 5% Increased Stamina'},
|
{ x: 1455, y: 1147.5, id: 'CMED12', alloc: false, text: '5% Increased Speed for Banish Blues, 5% Increased Stamina'},
|
||||||
{ x: 1455, y: 1042.5, id: 'CSTAT35', alloc: false, text: '+2 Chaos Stat'},
|
{ x: 1455, y: 1042.5, id: 'CSTAT35', alloc: false, text: '+2 Chaos Stat'},
|
||||||
{ x: 1457.5, y: 975, id: 'CSTAT37', alloc: false, text: '+2 Chaos Stat'},
|
{ x: 1457.5, y: 975, id: 'CSTAT37', alloc: false, text: '+2 Chaos Stat'},
|
||||||
{ x: 1462.5, y: 825, id: 'CLRG3', alloc: false, text: '20% critical strike chance for spells'},
|
{ x: 1462.5, y: 825, id: 'CLRG3', alloc: false, text: '20% critical strike chance for blues'},
|
||||||
{ x: 1485, y: 640, id: 'CSTAT17', alloc: false, text: '+2 Chaos Stat'},
|
{ x: 1485, y: 640, id: 'CSTAT17', alloc: false, text: '+2 Chaos Stat'},
|
||||||
{ x: 1500, y: 1110, id: 'CPHYS6', alloc: false, text: '+2% Reduced Physical Damage Taken'},
|
{ x: 1500, y: 1110, id: 'CPHYS6', alloc: false, text: '+2% Reduced Physical Damage Taken'},
|
||||||
{ x: 1505, y: 1242.5, id: 'CSTAT32', alloc: false, text: '+2 Chaos Stat'},
|
{ x: 1505, y: 1242.5, id: 'CSTAT32', alloc: false, text: '+2 Chaos Stat'},
|
||||||
@ -85,8 +85,8 @@ const passiveNodes = [
|
|||||||
{ x: 1555, y: 732.5, id: 'CSTAT18', alloc: false, text: '+2 Chaos Stat'},
|
{ x: 1555, y: 732.5, id: 'CSTAT18', alloc: false, text: '+2 Chaos Stat'},
|
||||||
{ x: 1597.5, y: 827.5, id: 'CSTAT21', alloc: false, text: '+2 Chaos Stat'},
|
{ x: 1597.5, y: 827.5, id: 'CSTAT21', alloc: false, text: '+2 Chaos Stat'},
|
||||||
{ x: 1607.5, y: 1277.5, id: 'CSTAT30', alloc: false, text: '+2 Chaos Stat'},
|
{ x: 1607.5, y: 1277.5, id: 'CSTAT30', alloc: false, text: '+2 Chaos Stat'},
|
||||||
{ x: 1612.5, y: 1137.5, id: 'CLRG1', alloc: false, text: 'When you take physical damage there is a 20% chance to heal for 150% of physical damage taken'},
|
{ x: 1612.5, y: 1137.5, id: 'CLRG1', alloc: false, text: 'When you take red damage there is a 20% chance to heal for 150% of red damage taken'},
|
||||||
{ x: 1612.5, y: 955, id: 'CLRG2', alloc: false, text: 'Your healing spells have a 20% chance to increase ally speed by 100%'},
|
{ x: 1612.5, y: 955, id: 'CLRG2', alloc: false, text: 'Your healing blues have a 20% chance to increase ally speed by 100%'},
|
||||||
{ x: 1657.5, y: 822.5, id: 'CSTAT22', alloc: false, text: '+2 Chaos Stat'},
|
{ x: 1657.5, y: 822.5, id: 'CSTAT22', alloc: false, text: '+2 Chaos Stat'},
|
||||||
{ x: 1657.5, y: 1312.5, id: 'CSTAT29', alloc: false, text: '+2 Chaos Stat'},
|
{ x: 1657.5, y: 1312.5, id: 'CSTAT29', alloc: false, text: '+2 Chaos Stat'},
|
||||||
{ x: 1685, y: 1187.5, id: 'CSTAT27', alloc: false, text: '+2 Chaos Stat'},
|
{ x: 1685, y: 1187.5, id: 'CSTAT27', alloc: false, text: '+2 Chaos Stat'},
|
||||||
@ -94,7 +94,7 @@ const passiveNodes = [
|
|||||||
{ x: 1690, y: 1117.5, id: 'CSTAT26', alloc: false, text: '+2 Chaos Stat'},
|
{ x: 1690, y: 1117.5, id: 'CSTAT26', alloc: false, text: '+2 Chaos Stat'},
|
||||||
{ x: 1705, y: 960, id: 'CSTAT24', alloc: false, text: '+2 Chaos Stat'},
|
{ x: 1705, y: 960, id: 'CSTAT24', alloc: false, text: '+2 Chaos Stat'},
|
||||||
{ x: 1712.5, y: 850, id: 'CMED9', alloc: false, text: '5% Increased Speed for Healing skills, 5% Increased Stamina'},
|
{ x: 1712.5, y: 850, id: 'CMED9', alloc: false, text: '5% Increased Speed for Healing skills, 5% Increased Stamina'},
|
||||||
{ x: 1717.5, y: 1267.5, id: 'CMED7', alloc: false, text: '5% Increased Speed for Damaging Spells, 5% Increased Stamina'},
|
{ x: 1717.5, y: 1267.5, id: 'CMED7', alloc: false, text: '5% Increased Speed for Damaging Blues, 5% Increased Stamina'},
|
||||||
{ x: 1725, y: 1222.5, id: 'CSTAT28', alloc: false, text: '+2 Chaos Stat'},
|
{ x: 1725, y: 1222.5, id: 'CSTAT28', alloc: false, text: '+2 Chaos Stat'},
|
||||||
{ x: 1727.5, y: 1062.5, id: 'CMED8', alloc: false, text: '5% Increased Speed for Chaos Slow skills, 5% Increased Speed for Banish Skills'},
|
{ x: 1727.5, y: 1062.5, id: 'CMED8', alloc: false, text: '5% Increased Speed for Chaos Slow skills, 5% Increased Speed for Banish Skills'},
|
||||||
{ x: 1737.5, y: 917.5, id: 'CSTAT23', alloc: false, text: '+2 Chaos Stat'},
|
{ x: 1737.5, y: 917.5, id: 'CSTAT23', alloc: false, text: '+2 Chaos Stat'},
|
||||||
|
|||||||
@ -66,11 +66,11 @@ class StatSheet extends Phaser.Scene {
|
|||||||
|
|
||||||
const CRYP_STATS = [
|
const CRYP_STATS = [
|
||||||
cryp.stamina,
|
cryp.stamina,
|
||||||
cryp.armour,
|
cryp.red_shield,
|
||||||
cryp.spell_shield,
|
cryp.blue_shield,
|
||||||
cryp.evasion,
|
cryp.evasion,
|
||||||
cryp.phys_dmg,
|
cryp.red_dmg,
|
||||||
cryp.spell_dmg,
|
cryp.blue_dmg,
|
||||||
cryp.speed,
|
cryp.speed,
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@ -19,7 +19,7 @@ This homepage shows your cryps, joinable online games, PVE options and your item
|
|||||||
If you have no cryps yet, press SPAWN and give your cryp a name to create one.
|
If you have no cryps yet, press SPAWN and give your cryp a name to create one.
|
||||||
Once you have made a cryp, click on them to visit their stat page and teach them some SKILLS.
|
Once you have made a cryp, click on them to visit their stat page and teach them some SKILLS.
|
||||||
The stat page also has descriptions of each skill and their effects.
|
The stat page also has descriptions of each skill and their effects.
|
||||||
cryps have 3 basic stats: stamina, physical damage and magic damage.
|
cryps have 3 basic stats: stamina, red damage and magic damage.
|
||||||
Toggle whether a cryp is selected for your team by clicking the coloured stripes next to the cryp or press 1,2,3.
|
Toggle whether a cryp is selected for your team by clicking the coloured stripes next to the cryp or press 1,2,3.
|
||||||
Once you have a team ready press the New PVE Game button to start playing.
|
Once you have a team ready press the New PVE Game button to start playing.
|
||||||
`;
|
`;
|
||||||
@ -29,7 +29,7 @@ A cryps battle has two main phases. This first phase is called the SKILL PHASE.
|
|||||||
Your cryps are positioned on the left, your opponent's are on the right.
|
Your cryps are positioned on the left, your opponent's are on the right.
|
||||||
In the centre are your cryps' SKILLS, grayed out SKILLS are currently ON COOLDOWN.
|
In the centre are your cryps' SKILLS, grayed out SKILLS are currently ON COOLDOWN.
|
||||||
A skill's cooldown reduces on every turn that cryp does not use a skill with a cooldown.
|
A skill's cooldown reduces on every turn that cryp does not use a skill with a cooldown.
|
||||||
For the moment, drag ATTACK onto the opponent team to have your cryps attack them with physical damage.
|
For the moment, drag ATTACK onto the opponent team to have your cryps attack them with red damage.
|
||||||
`;
|
`;
|
||||||
|
|
||||||
// const TARGET_PHASE_MESSAGE = `
|
// const TARGET_PHASE_MESSAGE = `
|
||||||
|
|||||||
@ -6,16 +6,16 @@
|
|||||||
Rare `Increased Stamina`
|
Rare `Increased Stamina`
|
||||||
|
|
||||||
Common `Increased Evasion rating`
|
Common `Increased Evasion rating`
|
||||||
Common `Increased Spell Shield rating`
|
Common `Increased Blue Shield rating`
|
||||||
Common `Increased Armour rating`
|
Common `Increased RedShield rating`
|
||||||
Common `Increased Healing done`
|
Common `Increased Healing done`
|
||||||
Common `Increased Healing received`
|
Common `Increased Healing received`
|
||||||
Common `Increased Spell Damage`
|
Common `Increased Blue Damage`
|
||||||
Common `Increased Physical Damage`
|
Common `Increased Red Damage`
|
||||||
|
|
||||||
Uncommon `Reduced hp loss penalty to evade chance`
|
Uncommon `Reduced hp loss penalty to evade chance`
|
||||||
Uncommon `Increased base evasion chance per X evasion rating`
|
Uncommon `Increased base evasion chance per X evasion rating`
|
||||||
Uncommon `Increased % mitigation from armour`
|
Uncommon `Increased % mitigation from red_shield`
|
||||||
Uncommon `Increased % mitigation from spell shield`
|
Uncommon `Increased % mitigation from spell shield`
|
||||||
Uncommon `Increased damage over time`
|
Uncommon `Increased damage over time`
|
||||||
|
|
||||||
|
|||||||
@ -23,7 +23,7 @@ resolve phase:
|
|||||||
|
|
||||||
## Dmg Chart
|
## Dmg Chart
|
||||||
|
|
||||||
| Physical | Magic | Modifiers |
|
| Red | Magic | Modifiers |
|
||||||
| ------ | ------ | ------ |
|
| ------ | ------ | ------ |
|
||||||
| dmg | dmg | speed |
|
| dmg | dmg | speed |
|
||||||
| evasion | resistance | cooldowns |
|
| evasion | resistance | cooldowns |
|
||||||
|
|||||||
@ -30,7 +30,7 @@
|
|||||||
* phys is faster and chaotic
|
* phys is faster and chaotic
|
||||||
* spells are slow and reliable
|
* spells are slow and reliable
|
||||||
* defensives are implicit
|
* defensives are implicit
|
||||||
* armour is restored, not gained
|
* red_shield is restored, not gained
|
||||||
* players can feel aggressive
|
* players can feel aggressive
|
||||||
|
|
||||||
# ask sam
|
# ask sam
|
||||||
@ -56,10 +56,16 @@ taunt
|
|||||||
|
|
||||||
## NOW
|
## NOW
|
||||||
|
|
||||||
|
rename physical and spell
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
inventory + drops table
|
inventory + drops table
|
||||||
id
|
id
|
||||||
|
account
|
||||||
data
|
data
|
||||||
game
|
game ref games
|
||||||
|
index on game,account
|
||||||
|
|
||||||
drops_buy(game_id, index)
|
drops_buy(game_id, index)
|
||||||
drops_get()
|
drops_get()
|
||||||
|
|||||||
@ -45,14 +45,14 @@ pub enum Stat {
|
|||||||
Hp,
|
Hp,
|
||||||
Speed,
|
Speed,
|
||||||
Stamina,
|
Stamina,
|
||||||
PhysicalDamage,
|
RedDamage,
|
||||||
PhysicalDamageTaken,
|
RedDamageTaken,
|
||||||
SpellDamage,
|
BlueDamage,
|
||||||
SpellDamageTaken,
|
BlueDamageTaken,
|
||||||
Healing,
|
Healing,
|
||||||
HealingTaken,
|
HealingTaken,
|
||||||
Armour,
|
RedShield,
|
||||||
SpellShield,
|
BlueShield,
|
||||||
Evasion,
|
Evasion,
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -136,13 +136,13 @@ pub struct CrypRecover {
|
|||||||
pub struct Cryp {
|
pub struct Cryp {
|
||||||
pub id: Uuid,
|
pub id: Uuid,
|
||||||
pub account: Uuid,
|
pub account: Uuid,
|
||||||
pub phys_dmg: CrypStat,
|
pub red_dmg: CrypStat,
|
||||||
pub spell_dmg: CrypStat,
|
pub red_shield: CrypStat,
|
||||||
|
pub blue_shield: CrypStat,
|
||||||
|
pub blue_dmg: CrypStat,
|
||||||
pub speed: CrypStat,
|
pub speed: CrypStat,
|
||||||
pub stamina: CrypStat,
|
pub stamina: CrypStat,
|
||||||
pub hp: CrypStat,
|
pub hp: CrypStat,
|
||||||
pub armour: CrypStat,
|
|
||||||
pub spell_shield: CrypStat,
|
|
||||||
pub evasion: CrypStat,
|
pub evasion: CrypStat,
|
||||||
pub xp: u64,
|
pub xp: u64,
|
||||||
pub lvl: u8,
|
pub lvl: u8,
|
||||||
@ -164,13 +164,13 @@ impl Cryp {
|
|||||||
return Cryp {
|
return Cryp {
|
||||||
id,
|
id,
|
||||||
account: id,
|
account: id,
|
||||||
phys_dmg: CrypStat { base: 0, value: 0, stat: Stat::PhysicalDamage },
|
red_dmg: CrypStat { base: 0, value: 0, stat: Stat::RedDamage },
|
||||||
spell_dmg: CrypStat { base: 0, value: 0, stat: Stat::SpellDamage },
|
red_shield: CrypStat { base: 0, value: 0, stat: Stat::RedShield },
|
||||||
|
blue_dmg: CrypStat { base: 0, value: 0, stat: Stat::BlueDamage },
|
||||||
|
blue_shield: CrypStat { base: 0, value: 0, stat: Stat::BlueShield },
|
||||||
speed: CrypStat { base: 0, value: 0, stat: Stat::Speed },
|
speed: CrypStat { base: 0, value: 0, stat: Stat::Speed },
|
||||||
stamina: CrypStat { base: 0, value: 0, stat: Stat::Stamina },
|
stamina: CrypStat { base: 0, value: 0, stat: Stat::Stamina },
|
||||||
hp: CrypStat { base: 0, value: 0, stat: Stat::Hp },
|
hp: CrypStat { base: 0, value: 0, stat: Stat::Hp },
|
||||||
armour: CrypStat { base: 0, value: 0, stat: Stat::Armour },
|
|
||||||
spell_shield: CrypStat { base: 0, value: 0, stat: Stat::SpellShield },
|
|
||||||
evasion: CrypStat { base: 0, value: 0, stat: Stat::Evasion },
|
evasion: CrypStat { base: 0, value: 0, stat: Stat::Evasion },
|
||||||
lvl: 0,
|
lvl: 0,
|
||||||
xp: 0,
|
xp: 0,
|
||||||
@ -238,15 +238,15 @@ impl Cryp {
|
|||||||
let evasion_max = 5;
|
let evasion_max = 5;
|
||||||
|
|
||||||
match stat {
|
match stat {
|
||||||
Stat::PhysicalDamage => self.phys_dmg.set(rng.gen_range(stat_min, stat_max), &self.specs),
|
Stat::RedDamage => self.red_dmg.set(rng.gen_range(stat_min, stat_max), &self.specs),
|
||||||
Stat::SpellDamage => self.spell_dmg.set(rng.gen_range(stat_min, stat_max), &self.specs),
|
Stat::BlueDamage => self.blue_dmg.set(rng.gen_range(stat_min, stat_max), &self.specs),
|
||||||
Stat::Speed => self.speed.set(rng.gen_range(stat_min, stat_max), &self.specs),
|
Stat::Speed => self.speed.set(rng.gen_range(stat_min, stat_max), &self.specs),
|
||||||
Stat::Stamina => {
|
Stat::Stamina => {
|
||||||
self.stamina.set(rng.gen_range(stam_min, stam_max), &self.specs);
|
self.stamina.set(rng.gen_range(stam_min, stam_max), &self.specs);
|
||||||
self.hp.set(self.stamina.base, &self.specs)
|
self.hp.set(self.stamina.base, &self.specs)
|
||||||
},
|
},
|
||||||
Stat::SpellShield => self.spell_shield.set(rng.gen_range(stat_min, stat_max), &self.specs),
|
Stat::BlueShield => self.blue_shield.set(rng.gen_range(stat_min, stat_max), &self.specs),
|
||||||
Stat::Armour => self.armour.set(rng.gen_range(stat_min, stat_max), &self.specs),
|
Stat::RedShield => self.red_shield.set(rng.gen_range(stat_min, stat_max), &self.specs),
|
||||||
Stat::Evasion => self.evasion.set(rng.gen_range(evasion_min, evasion_max), &self.specs),
|
Stat::Evasion => self.evasion.set(rng.gen_range(evasion_min, evasion_max), &self.specs),
|
||||||
_ => panic!("{:?} not a rollable stat", stat),
|
_ => panic!("{:?} not a rollable stat", stat),
|
||||||
};
|
};
|
||||||
@ -262,8 +262,8 @@ impl Cryp {
|
|||||||
|
|
||||||
self.xp = xp;
|
self.xp = xp;
|
||||||
|
|
||||||
self.roll_stat(Stat::PhysicalDamage);
|
self.roll_stat(Stat::RedDamage);
|
||||||
self.roll_stat(Stat::SpellDamage);
|
self.roll_stat(Stat::BlueDamage);
|
||||||
self.roll_stat(Stat::Speed);
|
self.roll_stat(Stat::Speed);
|
||||||
self.roll_stat(Stat::Stamina);
|
self.roll_stat(Stat::Stamina);
|
||||||
|
|
||||||
@ -331,11 +331,11 @@ impl Cryp {
|
|||||||
fn recalculate_stats(&mut self) -> &mut Cryp {
|
fn recalculate_stats(&mut self) -> &mut Cryp {
|
||||||
self.stamina.recalculate(&self.specs);
|
self.stamina.recalculate(&self.specs);
|
||||||
self.hp.recalculate(&self.specs);
|
self.hp.recalculate(&self.specs);
|
||||||
self.phys_dmg.recalculate(&self.specs);
|
self.red_dmg.recalculate(&self.specs);
|
||||||
self.spell_dmg.recalculate(&self.specs);
|
self.red_shield.recalculate(&self.specs);
|
||||||
|
self.blue_dmg.recalculate(&self.specs);
|
||||||
|
self.blue_shield.recalculate(&self.specs);
|
||||||
self.evasion.recalculate(&self.specs);
|
self.evasion.recalculate(&self.specs);
|
||||||
self.armour.recalculate(&self.specs);
|
|
||||||
self.spell_shield.recalculate(&self.specs);
|
|
||||||
self.speed.recalculate(&self.specs);
|
self.speed.recalculate(&self.specs);
|
||||||
|
|
||||||
self
|
self
|
||||||
@ -468,24 +468,24 @@ impl Cryp {
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
// Stats
|
// Stats
|
||||||
pub fn phys_dmg(&self) -> u64 {
|
pub fn red_dmg(&self) -> u64 {
|
||||||
let phys_dmg_mods = self.effects.iter()
|
let red_dmg_mods = self.effects.iter()
|
||||||
.filter(|e| e.effect.modifications().contains(&Stat::PhysicalDamage))
|
.filter(|e| e.effect.modifications().contains(&Stat::RedDamage))
|
||||||
.map(|cryp_effect| cryp_effect.effect)
|
.map(|cryp_effect| cryp_effect.effect)
|
||||||
.collect::<Vec<Effect>>();
|
.collect::<Vec<Effect>>();
|
||||||
|
|
||||||
let modified_phys_dmg = phys_dmg_mods.iter().fold(self.phys_dmg.value, |acc, m| m.apply(acc));
|
let modified_red_dmg = red_dmg_mods.iter().fold(self.red_dmg.value, |acc, m| m.apply(acc));
|
||||||
return modified_phys_dmg;
|
return modified_red_dmg;
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn spell_dmg(&self) -> u64 {
|
pub fn blue_dmg(&self) -> u64 {
|
||||||
let spell_dmg_mods = self.effects.iter()
|
let blue_dmg_mods = self.effects.iter()
|
||||||
.filter(|e| e.effect.modifications().contains(&Stat::SpellDamage))
|
.filter(|e| e.effect.modifications().contains(&Stat::BlueDamage))
|
||||||
.map(|cryp_effect| cryp_effect.effect)
|
.map(|cryp_effect| cryp_effect.effect)
|
||||||
.collect::<Vec<Effect>>();
|
.collect::<Vec<Effect>>();
|
||||||
|
|
||||||
let modified_spell_dmg = spell_dmg_mods.iter().fold(self.spell_dmg.value, |acc, m| m.apply(acc));
|
let modified_blue_dmg = blue_dmg_mods.iter().fold(self.blue_dmg.value, |acc, m| m.apply(acc));
|
||||||
return modified_spell_dmg;
|
return modified_blue_dmg;
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn skill_speed(&self, s: Skill) -> u64 {
|
pub fn skill_speed(&self, s: Skill) -> u64 {
|
||||||
@ -518,7 +518,7 @@ impl Cryp {
|
|||||||
ResolutionResult::Healing {
|
ResolutionResult::Healing {
|
||||||
amount: 0,
|
amount: 0,
|
||||||
overhealing: 0,
|
overhealing: 0,
|
||||||
category: Category::PhysHeal,
|
category: Category::RedHeal,
|
||||||
immunity: immunity.clone(),
|
immunity: immunity.clone(),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@ -546,12 +546,12 @@ impl Cryp {
|
|||||||
return ResolutionResult::Healing {
|
return ResolutionResult::Healing {
|
||||||
amount: healing,
|
amount: healing,
|
||||||
overhealing,
|
overhealing,
|
||||||
category: Category::PhysHeal,
|
category: Category::RedHeal,
|
||||||
immunity,
|
immunity,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn deal_phys_dmg(&mut self, skill: Skill, amount: u64) -> ResolutionResult {
|
pub fn deal_red_dmg(&mut self, skill: Skill, amount: u64) -> ResolutionResult {
|
||||||
let immunity = self.immune(skill);
|
let immunity = self.immune(skill);
|
||||||
let immune = immunity.immune;
|
let immune = immunity.immune;
|
||||||
|
|
||||||
@ -559,29 +559,29 @@ impl Cryp {
|
|||||||
return ResolutionResult::Damage {
|
return ResolutionResult::Damage {
|
||||||
amount: 0,
|
amount: 0,
|
||||||
mitigation: 0,
|
mitigation: 0,
|
||||||
category: Category::PhysDmg,
|
category: Category::RedDmg,
|
||||||
immunity,
|
immunity,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
let phys_dmg_mods = self.effects.iter()
|
let red_dmg_mods = self.effects.iter()
|
||||||
.filter(|e| e.effect.modifications().contains(&Stat::PhysicalDamageTaken))
|
.filter(|e| e.effect.modifications().contains(&Stat::RedDamageTaken))
|
||||||
.map(|cryp_effect| cryp_effect.effect)
|
.map(|cryp_effect| cryp_effect.effect)
|
||||||
.collect::<Vec<Effect>>();
|
.collect::<Vec<Effect>>();
|
||||||
|
|
||||||
// println!("{:?}", phys_dmg_mods);
|
// println!("{:?}", red_dmg_mods);
|
||||||
|
|
||||||
let modified_dmg = phys_dmg_mods.iter().fold(amount, |acc, m| m.apply(acc));
|
let modified_dmg = red_dmg_mods.iter().fold(amount, |acc, m| m.apply(acc));
|
||||||
|
|
||||||
// calculate amount of damage armour will not absorb
|
// calculate amount of damage red_shield will not absorb
|
||||||
// eg 50 armour 25 dmg -> 0 remainder 25 mitigation
|
// eg 50 red_shield 25 dmg -> 0 remainder 25 mitigation
|
||||||
// 50 armour 100 dmg -> 50 remainder 50 mitigation
|
// 50 red_shield 100 dmg -> 50 remainder 50 mitigation
|
||||||
// 50 armour 5 dmg -> 0 remainder 5 mitigation
|
// 50 red_shield 5 dmg -> 0 remainder 5 mitigation
|
||||||
let remainder = modified_dmg.saturating_sub(self.armour.value);
|
let remainder = modified_dmg.saturating_sub(self.red_shield.value);
|
||||||
let mitigation = modified_dmg.saturating_sub(remainder);
|
let mitigation = modified_dmg.saturating_sub(remainder);
|
||||||
|
|
||||||
// reduce armour by mitigation amount
|
// reduce red_shield by mitigation amount
|
||||||
self.armour.reduce(mitigation);
|
self.red_shield.reduce(mitigation);
|
||||||
|
|
||||||
// deal remainder to hp
|
// deal remainder to hp
|
||||||
self.hp.reduce(remainder);
|
self.hp.reduce(remainder);
|
||||||
@ -589,12 +589,12 @@ impl Cryp {
|
|||||||
return ResolutionResult::Damage {
|
return ResolutionResult::Damage {
|
||||||
amount: remainder,
|
amount: remainder,
|
||||||
mitigation,
|
mitigation,
|
||||||
category: Category::PhysDmg,
|
category: Category::RedDmg,
|
||||||
immunity,
|
immunity,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn deal_spell_dmg(&mut self, skill: Skill, amount: u64) -> ResolutionResult {
|
pub fn deal_blue_dmg(&mut self, skill: Skill, amount: u64) -> ResolutionResult {
|
||||||
let immunity = self.immune(skill);
|
let immunity = self.immune(skill);
|
||||||
let immune = immunity.immune;
|
let immune = immunity.immune;
|
||||||
|
|
||||||
@ -602,29 +602,29 @@ impl Cryp {
|
|||||||
return ResolutionResult::Damage {
|
return ResolutionResult::Damage {
|
||||||
amount: 0,
|
amount: 0,
|
||||||
mitigation: 0,
|
mitigation: 0,
|
||||||
category: Category::SpellDmg,
|
category: Category::BlueDmg,
|
||||||
immunity,
|
immunity,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
let spell_dmg_mods = self.effects.iter()
|
let blue_dmg_mods = self.effects.iter()
|
||||||
.filter(|e| e.effect.modifications().contains(&Stat::SpellDamageTaken))
|
.filter(|e| e.effect.modifications().contains(&Stat::BlueDamageTaken))
|
||||||
.map(|cryp_effect| cryp_effect.effect)
|
.map(|cryp_effect| cryp_effect.effect)
|
||||||
.collect::<Vec<Effect>>();
|
.collect::<Vec<Effect>>();
|
||||||
|
|
||||||
// println!("{:?}", spell_dmg_mods);
|
// println!("{:?}", blue_dmg_mods);
|
||||||
|
|
||||||
let modified_dmg = spell_dmg_mods.iter().fold(amount, |acc, m| m.apply(acc));
|
let modified_dmg = blue_dmg_mods.iter().fold(amount, |acc, m| m.apply(acc));
|
||||||
let remainder = modified_dmg.saturating_sub(self.armour.value);
|
let remainder = modified_dmg.saturating_sub(self.blue_shield.value);
|
||||||
let mitigation = modified_dmg.saturating_sub(remainder);
|
let mitigation = modified_dmg.saturating_sub(remainder);
|
||||||
|
|
||||||
self.armour.reduce(mitigation);
|
self.blue_shield.reduce(mitigation);
|
||||||
self.hp.reduce(remainder);
|
self.hp.reduce(remainder);
|
||||||
|
|
||||||
return ResolutionResult::Damage {
|
return ResolutionResult::Damage {
|
||||||
amount: remainder,
|
amount: remainder,
|
||||||
mitigation,
|
mitigation,
|
||||||
category: Category::SpellDmg,
|
category: Category::BlueDmg,
|
||||||
immunity,
|
immunity,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1014,12 +1014,12 @@ mod tests {
|
|||||||
let x_cryp = x_team.cryps[0].clone();
|
let x_cryp = x_team.cryps[0].clone();
|
||||||
let y_cryp = y_team.cryps[0].clone();
|
let y_cryp = y_team.cryps[0].clone();
|
||||||
|
|
||||||
game.team_by_id(y_team.id).cryp_by_id(y_cryp.id).unwrap().phys_dmg.force(u64::max_value());
|
game.team_by_id(y_team.id).cryp_by_id(y_cryp.id).unwrap().red_dmg.force(u64::max_value());
|
||||||
game.team_by_id(y_team.id).cryp_by_id(y_cryp.id).unwrap().speed.force(u64::max_value());
|
game.team_by_id(y_team.id).cryp_by_id(y_cryp.id).unwrap().speed.force(u64::max_value());
|
||||||
|
|
||||||
// just in case
|
// just in case
|
||||||
// remove all mitigation
|
// remove all mitigation
|
||||||
game.team_by_id(x_team.id).cryp_by_id(x_cryp.id).unwrap().armour.force(0);
|
game.team_by_id(x_team.id).cryp_by_id(x_cryp.id).unwrap().red_shield.force(0);
|
||||||
|
|
||||||
let _x_stun_id = game.add_skill(x_team.id, x_cryp.id, Some(y_cryp.id), Skill::TestStun).unwrap();
|
let _x_stun_id = game.add_skill(x_team.id, x_cryp.id, Some(y_cryp.id), Skill::TestStun).unwrap();
|
||||||
game.add_skill(y_team.id, y_cryp.id, Some(x_cryp.id), Skill::Attack).unwrap();
|
game.add_skill(y_team.id, y_cryp.id, Some(x_cryp.id), Skill::Attack).unwrap();
|
||||||
|
|||||||
@ -1104,7 +1104,7 @@ mod tests {
|
|||||||
let x_cryp = x_team.cryps[0].clone();
|
let x_cryp = x_team.cryps[0].clone();
|
||||||
let y_cryp = y_team.cryps[0].clone();
|
let y_cryp = y_team.cryps[0].clone();
|
||||||
|
|
||||||
game.team_by_id(y_team.id).cryp_by_id(y_cryp.id).unwrap().phys_dmg.set(u64::max_value());
|
game.team_by_id(y_team.id).cryp_by_id(y_cryp.id).unwrap().red_dmg.set(u64::max_value());
|
||||||
|
|
||||||
let x_stun_id = game.add_skill(x_team.id, x_cryp.id, Some(y_team.id), Skill::TestStun).unwrap();
|
let x_stun_id = game.add_skill(x_team.id, x_cryp.id, Some(y_team.id), Skill::TestStun).unwrap();
|
||||||
let y_attack_id = game.add_skill(y_team.id, y_cryp.id, Some(x_team.id), Skill::Attack).unwrap();
|
let y_attack_id = game.add_skill(y_team.id, y_cryp.id, Some(x_team.id), Skill::Attack).unwrap();
|
||||||
|
|||||||
@ -17,19 +17,19 @@ use spec::{Spec, SpecType};
|
|||||||
|
|
||||||
#[derive(Debug,Clone,Copy,PartialEq,Serialize,Deserialize)]
|
#[derive(Debug,Clone,Copy,PartialEq,Serialize,Deserialize)]
|
||||||
pub enum ItemAction {
|
pub enum ItemAction {
|
||||||
RerollPhysDamage,
|
RerollRedDamage,
|
||||||
RerollSpellDamage,
|
RerollBlueDamage,
|
||||||
RerollSpeed,
|
RerollSpeed,
|
||||||
RerollStamina,
|
RerollStamina,
|
||||||
RerollArmour,
|
RerollRedShield,
|
||||||
RerollSpellShield,
|
RerollBlueShield,
|
||||||
RerollEvasion,
|
RerollEvasion,
|
||||||
|
|
||||||
SpecPhysDmg5,
|
SpecRedDmg5,
|
||||||
SpecSpellDmg5,
|
SpecBlueDmg5,
|
||||||
SpecArmour5,
|
SpecRedShield5,
|
||||||
SpecSpellShield5,
|
SpecBlueShield5,
|
||||||
SpecSpellEvasion5,
|
SpecBlueEvasion5,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug,Clone,Copy,PartialEq,Serialize,Deserialize)]
|
#[derive(Debug,Clone,Copy,PartialEq,Serialize,Deserialize)]
|
||||||
@ -53,15 +53,15 @@ impl Item {
|
|||||||
fn apply(&mut self, tx: &mut Transaction, target: Uuid) -> Result<(), Error> {
|
fn apply(&mut self, tx: &mut Transaction, target: Uuid) -> Result<(), Error> {
|
||||||
match self.action {
|
match self.action {
|
||||||
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::RerollRedDamage => reroll(self, tx, target, Stat::RedDamage),
|
||||||
ItemAction::RerollSpellDamage => reroll(self, tx, target, Stat::SpellDamage),
|
ItemAction::RerollBlueDamage => reroll(self, tx, target, Stat::BlueDamage),
|
||||||
ItemAction::RerollSpeed => reroll(self, tx, target, Stat::Speed),
|
ItemAction::RerollSpeed => reroll(self, tx, target, Stat::Speed),
|
||||||
ItemAction::RerollArmour => reroll(self, tx, target, Stat::Armour),
|
ItemAction::RerollRedShield => reroll(self, tx, target, Stat::RedShield),
|
||||||
ItemAction::RerollSpellShield => reroll(self, tx, target, Stat::SpellShield),
|
ItemAction::RerollBlueShield => reroll(self, tx, target, Stat::BlueShield),
|
||||||
ItemAction::RerollEvasion => reroll(self, tx, target, Stat::Evasion),
|
ItemAction::RerollEvasion => reroll(self, tx, target, Stat::Evasion),
|
||||||
|
|
||||||
ItemAction::SpecPhysDmg5 => spec_add(self, tx, target, SpecType::PhysDamage5),
|
ItemAction::SpecRedDmg5 => spec_add(self, tx, target, SpecType::RedDamage5),
|
||||||
ItemAction::SpecSpellDmg5 => spec_add(self, tx, target, SpecType::SpellDamage5),
|
ItemAction::SpecBlueDmg5 => spec_add(self, tx, target, SpecType::BlueDamage5),
|
||||||
_ => unimplemented!(),
|
_ => unimplemented!(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -86,8 +86,8 @@ fn mode_drops(mode: GameMode) -> Vec<(ItemAction, usize)> {
|
|||||||
match mode {
|
match mode {
|
||||||
GameMode::Normal => vec![
|
GameMode::Normal => vec![
|
||||||
(ItemAction::RerollStamina, 1),
|
(ItemAction::RerollStamina, 1),
|
||||||
(ItemAction::RerollPhysDamage, 1),
|
(ItemAction::RerollRedDamage, 1),
|
||||||
(ItemAction::RerollSpellDamage, 1),
|
(ItemAction::RerollBlueDamage, 1),
|
||||||
],
|
],
|
||||||
GameMode::Pvp => vec![
|
GameMode::Pvp => vec![
|
||||||
(ItemAction::RerollSpeed, 1),
|
(ItemAction::RerollSpeed, 1),
|
||||||
@ -96,19 +96,19 @@ fn mode_drops(mode: GameMode) -> Vec<(ItemAction, usize)> {
|
|||||||
GameMode::Zone2v2Caster |
|
GameMode::Zone2v2Caster |
|
||||||
GameMode::Zone3v3MeleeMiniboss => vec![
|
GameMode::Zone3v3MeleeMiniboss => vec![
|
||||||
(ItemAction::RerollEvasion, 1),
|
(ItemAction::RerollEvasion, 1),
|
||||||
(ItemAction::RerollArmour, 1),
|
(ItemAction::RerollRedShield, 1),
|
||||||
(ItemAction::RerollSpellShield, 1),
|
(ItemAction::RerollBlueShield, 1),
|
||||||
],
|
],
|
||||||
GameMode::Zone3v3HealerBoss => vec![
|
GameMode::Zone3v3HealerBoss => vec![
|
||||||
(ItemAction::RerollSpeed, 1),
|
(ItemAction::RerollSpeed, 1),
|
||||||
],
|
],
|
||||||
// _ => vec![
|
// _ => vec![
|
||||||
// (ItemAction::RerollStamina, 1),
|
// (ItemAction::RerollStamina, 1),
|
||||||
// (ItemAction::RerollPhysDamage, 1),
|
// (ItemAction::RerollRedDamage, 1),
|
||||||
// (ItemAction::RerollSpellDamage, 1),
|
// (ItemAction::RerollBlueDamage, 1),
|
||||||
// (ItemAction::RerollSpeed, 1),
|
// (ItemAction::RerollSpeed, 1),
|
||||||
// (ItemAction::RerollArmour, 1),
|
// (ItemAction::RerollRedShield, 1),
|
||||||
// (ItemAction::RerollSpellShield, 1),
|
// (ItemAction::RerollBlueShield, 1),
|
||||||
// (ItemAction::RerollEvasion, 1),
|
// (ItemAction::RerollEvasion, 1),
|
||||||
// ],
|
// ],
|
||||||
}
|
}
|
||||||
|
|||||||
@ -330,15 +330,15 @@ impl Rpc {
|
|||||||
|
|
||||||
fn press_r(_data: Vec<u8>, tx: &mut Transaction, account: Account, _client: &mut WebSocket<TcpStream>) -> Result<RpcResponse, Error> {
|
fn press_r(_data: Vec<u8>, tx: &mut Transaction, account: Account, _client: &mut WebSocket<TcpStream>) -> Result<RpcResponse, Error> {
|
||||||
for action in [
|
for action in [
|
||||||
ItemAction::RerollPhysDamage,
|
ItemAction::RerollRedDamage,
|
||||||
ItemAction::RerollSpellDamage,
|
ItemAction::RerollBlueDamage,
|
||||||
ItemAction::RerollSpeed,
|
ItemAction::RerollSpeed,
|
||||||
ItemAction::RerollStamina,
|
ItemAction::RerollStamina,
|
||||||
ItemAction::RerollArmour,
|
ItemAction::RerollRedShield,
|
||||||
ItemAction::RerollSpellShield,
|
ItemAction::RerollBlueShield,
|
||||||
ItemAction::RerollEvasion,
|
ItemAction::RerollEvasion,
|
||||||
ItemAction::SpecPhysDmg5,
|
ItemAction::SpecRedDmg5,
|
||||||
ItemAction::SpecSpellDmg5,
|
ItemAction::SpecBlueDmg5,
|
||||||
].into_iter() {
|
].into_iter() {
|
||||||
let item = Item::new(*action, account.id);
|
let item = Item::new(*action, account.id);
|
||||||
item_create(item, tx, account.id)?;
|
item_create(item, tx, account.id)?;
|
||||||
|
|||||||
@ -137,13 +137,13 @@ impl Effect {
|
|||||||
pub fn immune(&self, skill: Skill) -> bool {
|
pub fn immune(&self, skill: Skill) -> bool {
|
||||||
match self {
|
match self {
|
||||||
Effect::Parry => match skill.category() {
|
Effect::Parry => match skill.category() {
|
||||||
Category::Spell => false,
|
Category::Blue => false,
|
||||||
Category::Physical => true,
|
Category::Red => true,
|
||||||
_ => false,
|
_ => false,
|
||||||
},
|
},
|
||||||
Effect::Shield => match skill.category() {
|
Effect::Shield => match skill.category() {
|
||||||
Category::Spell => true,
|
Category::Blue => true,
|
||||||
Category::Physical => false,
|
Category::Red => false,
|
||||||
_ => false,
|
_ => false,
|
||||||
},
|
},
|
||||||
Effect::Banish => true,
|
Effect::Banish => true,
|
||||||
@ -157,18 +157,18 @@ impl Effect {
|
|||||||
Effect::Hex => true,
|
Effect::Hex => true,
|
||||||
Effect::Banish => true,
|
Effect::Banish => true,
|
||||||
Effect::Silence => match skill.category() {
|
Effect::Silence => match skill.category() {
|
||||||
Category::Spell => true,
|
Category::Blue => true,
|
||||||
Category::Physical => false,
|
Category::Red => false,
|
||||||
_ => false,
|
_ => false,
|
||||||
},
|
},
|
||||||
Effect::Snare => match skill.category() {
|
Effect::Snare => match skill.category() {
|
||||||
Category::Spell => false,
|
Category::Blue => false,
|
||||||
Category::Physical => true,
|
Category::Red => true,
|
||||||
_ => false,
|
_ => false,
|
||||||
},
|
},
|
||||||
|
|
||||||
Effect::Ko => match skill.category() {
|
Effect::Ko => match skill.category() {
|
||||||
Category::SpellTick => false,
|
Category::BlueTick => false,
|
||||||
_ => true,
|
_ => true,
|
||||||
},
|
},
|
||||||
_ => false,
|
_ => false,
|
||||||
@ -177,12 +177,12 @@ impl Effect {
|
|||||||
|
|
||||||
pub fn modifications(&self) -> Vec<Stat> {
|
pub fn modifications(&self) -> Vec<Stat> {
|
||||||
match self {
|
match self {
|
||||||
Effect::Empower => vec![Stat::PhysicalDamage],
|
Effect::Empower => vec![Stat::RedDamage],
|
||||||
Effect::Vulnerable => vec![Stat::PhysicalDamageTaken],
|
Effect::Vulnerable => vec![Stat::RedDamageTaken],
|
||||||
Effect::Block => vec![Stat::PhysicalDamageTaken],
|
Effect::Block => vec![Stat::RedDamageTaken],
|
||||||
|
|
||||||
Effect::Amplify => vec![Stat::SpellDamage],
|
Effect::Amplify => vec![Stat::BlueDamage],
|
||||||
Effect::Curse => vec![Stat::SpellDamageTaken],
|
Effect::Curse => vec![Stat::BlueDamageTaken],
|
||||||
|
|
||||||
Effect::Haste => vec![Stat::Speed],
|
Effect::Haste => vec![Stat::Speed],
|
||||||
Effect::Slow => vec![Stat::Speed],
|
Effect::Slow => vec![Stat::Speed],
|
||||||
@ -216,43 +216,43 @@ impl Effect {
|
|||||||
pub fn category(&self) -> Category {
|
pub fn category(&self) -> Category {
|
||||||
match self {
|
match self {
|
||||||
// physical
|
// physical
|
||||||
Effect::Stun => Category::PhysDebuff,
|
Effect::Stun => Category::RedDebuff,
|
||||||
Effect::Block => Category::PhysBuff,
|
Effect::Block => Category::RedBuff,
|
||||||
Effect::Parry => Category::PhysBuff,
|
Effect::Parry => Category::RedBuff,
|
||||||
Effect::Bleed => Category::PhysDebuff,
|
Effect::Bleed => Category::RedDebuff,
|
||||||
Effect::Leech => Category::PhysDebuff,
|
Effect::Leech => Category::RedDebuff,
|
||||||
Effect::Airborne => Category::PhysDebuff,
|
Effect::Airborne => Category::RedDebuff,
|
||||||
Effect::Untouchable => Category::PhysBuff,
|
Effect::Untouchable => Category::RedBuff,
|
||||||
Effect::Deadly => Category::PhysBuff,
|
Effect::Deadly => Category::RedBuff,
|
||||||
Effect::Vulnerable => Category::PhysDebuff,
|
Effect::Vulnerable => Category::RedDebuff,
|
||||||
Effect::Fury => Category::PhysBuff,
|
Effect::Fury => Category::RedBuff,
|
||||||
Effect::Blind => Category::PhysDebuff,
|
Effect::Blind => Category::RedDebuff,
|
||||||
Effect::Snare => Category::PhysDebuff,
|
Effect::Snare => Category::RedDebuff,
|
||||||
|
|
||||||
Effect::Empower => Category::PhysBuff,
|
Effect::Empower => Category::RedBuff,
|
||||||
|
|
||||||
// magic
|
// magic
|
||||||
Effect::Hex => Category::SpellDebuff,
|
Effect::Hex => Category::BlueDebuff,
|
||||||
Effect::Curse => Category::SpellDebuff,
|
Effect::Curse => Category::BlueDebuff,
|
||||||
Effect::Banish => Category::SpellDebuff, // todo randomise
|
Effect::Banish => Category::BlueDebuff, // todo randomise
|
||||||
Effect::Slow => Category::SpellDebuff,
|
Effect::Slow => Category::BlueDebuff,
|
||||||
Effect::Haste => Category::SpellBuff,
|
Effect::Haste => Category::BlueBuff,
|
||||||
Effect::Enslave => Category::SpellDebuff,
|
Effect::Enslave => Category::BlueDebuff,
|
||||||
Effect::Mesmerise => Category::SpellDebuff,
|
Effect::Mesmerise => Category::BlueDebuff,
|
||||||
Effect::Amplify => Category::SpellBuff,
|
Effect::Amplify => Category::BlueBuff,
|
||||||
Effect::Silence => Category::SpellDebuff,
|
Effect::Silence => Category::BlueDebuff,
|
||||||
|
|
||||||
// magic immunity
|
// magic immunity
|
||||||
Effect::Shield => Category::SpellBuff,
|
Effect::Shield => Category::BlueBuff,
|
||||||
|
|
||||||
// effects over time
|
// effects over time
|
||||||
Effect::Triage => Category::SpellBuff,
|
Effect::Triage => Category::BlueBuff,
|
||||||
Effect::Decay => Category::SpellDebuff,
|
Effect::Decay => Category::BlueDebuff,
|
||||||
Effect::Regen => Category::SpellBuff,
|
Effect::Regen => Category::BlueBuff,
|
||||||
Effect::Drain => Category::SpellDebuff,
|
Effect::Drain => Category::BlueDebuff,
|
||||||
|
|
||||||
Effect::SpeedDrain => Category::SpellDebuff,
|
Effect::SpeedDrain => Category::BlueDebuff,
|
||||||
Effect::SpeedIncrease => Category::SpellBuff,
|
Effect::SpeedIncrease => Category::BlueBuff,
|
||||||
|
|
||||||
Effect::Ko => Category::Ko,
|
Effect::Ko => Category::Ko,
|
||||||
}
|
}
|
||||||
@ -296,18 +296,18 @@ impl Effect {
|
|||||||
|
|
||||||
#[derive(Debug,Clone,Copy,PartialEq,Serialize,Deserialize)]
|
#[derive(Debug,Clone,Copy,PartialEq,Serialize,Deserialize)]
|
||||||
pub enum Category {
|
pub enum Category {
|
||||||
Physical,
|
Red,
|
||||||
PhysHeal,
|
RedHeal,
|
||||||
PhysDmg,
|
RedDmg,
|
||||||
PhysDebuff,
|
RedDebuff,
|
||||||
PhysBuff,
|
RedBuff,
|
||||||
PhysTick,
|
RedTick,
|
||||||
Spell,
|
Blue,
|
||||||
SpellDmg,
|
BlueDmg,
|
||||||
SpellHeal,
|
BlueHeal,
|
||||||
SpellDebuff,
|
BlueDebuff,
|
||||||
SpellBuff,
|
BlueBuff,
|
||||||
SpellTick,
|
BlueTick,
|
||||||
Ko,
|
Ko,
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -485,88 +485,88 @@ impl Skill {
|
|||||||
|
|
||||||
pub fn category(&self) -> Category {
|
pub fn category(&self) -> Category {
|
||||||
match self {
|
match self {
|
||||||
Skill::Attack => Category::Physical,
|
Skill::Attack => Category::Red,
|
||||||
|
|
||||||
// -----------------
|
// -----------------
|
||||||
// Nature
|
// Nature
|
||||||
// -----------------
|
// -----------------
|
||||||
Skill::Block => Category::Physical, // reduce dmg
|
Skill::Block => Category::Red, // reduce dmg
|
||||||
Skill::Parry => Category::Physical, // avoid all dmg
|
Skill::Parry => Category::Red, // avoid all dmg
|
||||||
Skill::Snare => Category::Physical,
|
Skill::Snare => Category::Red,
|
||||||
|
|
||||||
Skill::Paralyse => Category::Physical,
|
Skill::Paralyse => Category::Red,
|
||||||
Skill::Strangle => Category::Physical,
|
Skill::Strangle => Category::Red,
|
||||||
|
|
||||||
// Strangle
|
// Strangle
|
||||||
|
|
||||||
Skill::Stun => Category::Physical,
|
Skill::Stun => Category::Red,
|
||||||
|
|
||||||
// -----------------
|
// -----------------
|
||||||
// Technology
|
// Technology
|
||||||
// -----------------
|
// -----------------
|
||||||
Skill::Replicate => Category::Physical,
|
Skill::Replicate => Category::Red,
|
||||||
Skill::Swarm => Category::Physical,
|
Skill::Swarm => Category::Red,
|
||||||
Skill::Orbit => Category::Physical,
|
Skill::Orbit => Category::Red,
|
||||||
Skill::Repair => Category::Physical,
|
Skill::Repair => Category::Red,
|
||||||
Skill::Scan => Category::Physical, // track?
|
Skill::Scan => Category::Red, // track?
|
||||||
|
|
||||||
// -----------------
|
// -----------------
|
||||||
// Preservation
|
// Preservation
|
||||||
// -----------------
|
// -----------------
|
||||||
Skill::Heal => Category::Physical,
|
Skill::Heal => Category::Red,
|
||||||
Skill::Triage => Category::Spell, // hot
|
Skill::Triage => Category::Blue, // hot
|
||||||
Skill::TriageTick => Category::SpellTick, // hot
|
Skill::TriageTick => Category::BlueTick, // hot
|
||||||
Skill::Throw => Category::Physical, // no dmg stun, adds vulnerable
|
Skill::Throw => Category::Red, // no dmg stun, adds vulnerable
|
||||||
Skill::Charm => Category::Spell,
|
Skill::Charm => Category::Blue,
|
||||||
Skill::Calm => Category::Physical,
|
Skill::Calm => Category::Red,
|
||||||
Skill::Rez => Category::Spell,
|
Skill::Rez => Category::Blue,
|
||||||
|
|
||||||
// -----------------
|
// -----------------
|
||||||
// Destruction
|
// Destruction
|
||||||
// -----------------
|
// -----------------
|
||||||
Skill::Blast => Category::Spell,
|
Skill::Blast => Category::Blue,
|
||||||
Skill::Amplify => Category::Spell,
|
Skill::Amplify => Category::Blue,
|
||||||
Skill::Decay => Category::Spell, // dot
|
Skill::Decay => Category::Blue, // dot
|
||||||
Skill::DecayTick => Category::SpellTick, // hot
|
Skill::DecayTick => Category::BlueTick, // hot
|
||||||
Skill::Drain => Category::Spell,
|
Skill::Drain => Category::Blue,
|
||||||
Skill::DrainTick => Category::SpellTick, // hot
|
Skill::DrainTick => Category::BlueTick, // hot
|
||||||
Skill::Curse => Category::Spell,
|
Skill::Curse => Category::Blue,
|
||||||
Skill::Plague => Category::Spell, // aoe dot
|
Skill::Plague => Category::Blue, // aoe dot
|
||||||
Skill::Ruin => Category::Spell, // aoe
|
Skill::Ruin => Category::Blue, // aoe
|
||||||
|
|
||||||
// -----------------
|
// -----------------
|
||||||
// Purity
|
// Purity
|
||||||
// -----------------
|
// -----------------
|
||||||
// Skill::Precision => 1,
|
// Skill::Precision => 1,
|
||||||
Skill::Empower => Category::Physical,
|
Skill::Empower => Category::Red,
|
||||||
Skill::Slay => Category::Physical,
|
Skill::Slay => Category::Red,
|
||||||
Skill::Shield => Category::Spell,
|
Skill::Shield => Category::Blue,
|
||||||
Skill::Silence => Category::Spell,
|
Skill::Silence => Category::Blue,
|
||||||
Skill::Inquiry => Category::Spell,
|
Skill::Inquiry => Category::Blue,
|
||||||
Skill::Purify => Category::Spell,
|
Skill::Purify => Category::Blue,
|
||||||
Skill::Purge => Category::Spell,
|
Skill::Purge => Category::Blue,
|
||||||
|
|
||||||
// -----------------
|
// -----------------
|
||||||
// Chaos
|
// Chaos
|
||||||
// -----------------
|
// -----------------
|
||||||
Skill::Banish => Category::Spell,
|
Skill::Banish => Category::Blue,
|
||||||
Skill::Hex => Category::Spell,
|
Skill::Hex => Category::Blue,
|
||||||
Skill::Fear => Category::Spell,
|
Skill::Fear => Category::Blue,
|
||||||
Skill::Taunt => Category::Spell,
|
Skill::Taunt => Category::Blue,
|
||||||
Skill::Pause => Category::Spell, // extend durations
|
Skill::Pause => Category::Blue, // extend durations
|
||||||
// Skill::Lag => 2, //
|
// Skill::Lag => 2, //
|
||||||
Skill::Haste => Category::Spell,
|
Skill::Haste => Category::Blue,
|
||||||
Skill::Slow => Category::Spell,
|
Skill::Slow => Category::Blue,
|
||||||
|
|
||||||
|
|
||||||
// -----------------
|
// -----------------
|
||||||
// Test
|
// Test
|
||||||
// -----------------
|
// -----------------
|
||||||
Skill::TestTouch => Category::Physical,
|
Skill::TestTouch => Category::Red,
|
||||||
Skill::TestStun => Category::Physical,
|
Skill::TestStun => Category::Red,
|
||||||
Skill::TestParry => Category::Physical,
|
Skill::TestParry => Category::Red,
|
||||||
Skill::TestBlock => Category::Physical,
|
Skill::TestBlock => Category::Red,
|
||||||
Skill::TestDrain => Category::Spell,
|
Skill::TestDrain => Category::Blue,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -664,7 +664,7 @@ impl Skill {
|
|||||||
return resolution;
|
return resolution;
|
||||||
}
|
}
|
||||||
|
|
||||||
match self.category() == Category::Physical {
|
match self.category() == Category::Red {
|
||||||
true => {
|
true => {
|
||||||
if let Some(evasion) = target.evade(*self) {
|
if let Some(evasion) = target.evade(*self) {
|
||||||
resolution.results.push(evasion);
|
resolution.results.push(evasion);
|
||||||
@ -780,8 +780,8 @@ impl Skill {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn attack(cryp: &mut Cryp, target: &mut Cryp, mut resolution: Resolution) -> Resolution {
|
fn attack(cryp: &mut Cryp, target: &mut Cryp, mut resolution: Resolution) -> Resolution {
|
||||||
let amount = cryp.phys_dmg();
|
let amount = cryp.red_dmg();
|
||||||
resolution.results.push(target.deal_phys_dmg(Skill::Attack, amount));
|
resolution.results.push(target.deal_red_dmg(Skill::Attack, amount));
|
||||||
return resolution;
|
return resolution;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -828,7 +828,7 @@ fn empower(_cryp: &mut Cryp, target: &mut Cryp, mut resolution: Resolution) -> R
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn heal(cryp: &mut Cryp, target: &mut Cryp, mut resolution: Resolution) -> Resolution {
|
fn heal(cryp: &mut Cryp, target: &mut Cryp, mut resolution: Resolution) -> Resolution {
|
||||||
let amount = cryp.spell_dmg();
|
let amount = cryp.blue_dmg();
|
||||||
resolution.results.push(target.heal(Skill::Heal, amount));
|
resolution.results.push(target.heal(Skill::Heal, amount));
|
||||||
return resolution;
|
return resolution;
|
||||||
}
|
}
|
||||||
@ -858,14 +858,14 @@ fn triage(cryp: &mut Cryp, target: &mut Cryp, mut resolution: Resolution) -> Res
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn triage_tick(cryp: &mut Cryp, target: &mut Cryp, mut resolution: Resolution) -> Resolution {
|
fn triage_tick(cryp: &mut Cryp, target: &mut Cryp, mut resolution: Resolution) -> Resolution {
|
||||||
let amount = cryp.spell_dmg().wrapping_div(2);
|
let amount = cryp.blue_dmg().wrapping_div(2);
|
||||||
resolution.results.push(target.heal(Skill::TriageTick, amount));
|
resolution.results.push(target.heal(Skill::TriageTick, amount));
|
||||||
return resolution;
|
return resolution;
|
||||||
}
|
}
|
||||||
|
|
||||||
fn blast(cryp: &mut Cryp, target: &mut Cryp, mut resolution: Resolution) -> Resolution {
|
fn blast(cryp: &mut Cryp, target: &mut Cryp, mut resolution: Resolution) -> Resolution {
|
||||||
let amount = cryp.spell_dmg();
|
let amount = cryp.blue_dmg();
|
||||||
resolution.results.push(target.deal_spell_dmg(Skill::Blast, amount));
|
resolution.results.push(target.deal_blue_dmg(Skill::Blast, amount));
|
||||||
return resolution;
|
return resolution;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -898,8 +898,8 @@ fn decay(cryp: &mut Cryp, target: &mut Cryp, mut resolution: Resolution) -> Reso
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn decay_tick(cryp: &mut Cryp, target: &mut Cryp, mut resolution: Resolution) -> Resolution {
|
fn decay_tick(cryp: &mut Cryp, target: &mut Cryp, mut resolution: Resolution) -> Resolution {
|
||||||
let amount = cryp.spell_dmg();
|
let amount = cryp.blue_dmg();
|
||||||
resolution.results.push(target.deal_spell_dmg(Skill::DecayTick, amount));
|
resolution.results.push(target.deal_blue_dmg(Skill::DecayTick, amount));
|
||||||
return resolution;
|
return resolution;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -926,8 +926,8 @@ fn drain(cryp: &mut Cryp, target: &mut Cryp, mut resolution: Resolution) -> Reso
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn drain_tick(cryp: &mut Cryp, target: &mut Cryp, mut resolution: Resolution) -> Resolution {
|
fn drain_tick(cryp: &mut Cryp, target: &mut Cryp, mut resolution: Resolution) -> Resolution {
|
||||||
let amount = cryp.spell_dmg();
|
let amount = cryp.blue_dmg();
|
||||||
let drain_dmg = target.deal_spell_dmg(Skill::DrainTick, amount);
|
let drain_dmg = target.deal_blue_dmg(Skill::DrainTick, amount);
|
||||||
resolution.results.push(drain_dmg.clone());
|
resolution.results.push(drain_dmg.clone());
|
||||||
|
|
||||||
match drain_dmg {
|
match drain_dmg {
|
||||||
@ -960,7 +960,7 @@ fn purge(_cryp: &mut Cryp, target: &mut Cryp, mut resolution: Resolution) -> Res
|
|||||||
|
|
||||||
if !immune {
|
if !immune {
|
||||||
for (i, ce) in target.effects.clone().iter_mut().enumerate() {
|
for (i, ce) in target.effects.clone().iter_mut().enumerate() {
|
||||||
if ce.effect.category() == Category::SpellBuff {
|
if ce.effect.category() == Category::BlueBuff {
|
||||||
target.effects.remove(i);
|
target.effects.remove(i);
|
||||||
resolution.results.push(ResolutionResult::Removal { effect: ce.effect, immunity: immunity.clone() });
|
resolution.results.push(ResolutionResult::Removal { effect: ce.effect, immunity: immunity.clone() });
|
||||||
}
|
}
|
||||||
@ -976,7 +976,7 @@ fn purify(_cryp: &mut Cryp, target: &mut Cryp, mut resolution: Resolution) -> Re
|
|||||||
|
|
||||||
if !immune {
|
if !immune {
|
||||||
for (i, ce) in target.effects.clone().iter_mut().enumerate() {
|
for (i, ce) in target.effects.clone().iter_mut().enumerate() {
|
||||||
if ce.effect.category() == Category::SpellDebuff {
|
if ce.effect.category() == Category::BlueDebuff {
|
||||||
target.effects.remove(i);
|
target.effects.remove(i);
|
||||||
resolution.results.push(ResolutionResult::Removal { effect: ce.effect, immunity: immunity.clone() });
|
resolution.results.push(ResolutionResult::Removal { effect: ce.effect, immunity: immunity.clone() });
|
||||||
}
|
}
|
||||||
@ -1011,7 +1011,7 @@ mod tests {
|
|||||||
.learn(Skill::Heal)
|
.learn(Skill::Heal)
|
||||||
.create();
|
.create();
|
||||||
|
|
||||||
x.deal_phys_dmg(Skill::Attack, 5);
|
x.deal_red_dmg(Skill::Attack, 5);
|
||||||
|
|
||||||
heal(&mut y, &mut x, Resolution::new(Skill::Heal));
|
heal(&mut y, &mut x, Resolution::new(Skill::Heal));
|
||||||
}
|
}
|
||||||
@ -1051,7 +1051,7 @@ mod tests {
|
|||||||
.create();
|
.create();
|
||||||
|
|
||||||
// ensure it doesn't have 0 pd
|
// ensure it doesn't have 0 pd
|
||||||
x.phys_dmg.force(100);
|
x.red_dmg.force(100);
|
||||||
y.hp.force(500);
|
y.hp.force(500);
|
||||||
|
|
||||||
block(&mut y.clone(), &mut y, Resolution::new(Skill::Block));
|
block(&mut y.clone(), &mut y, Resolution::new(Skill::Block));
|
||||||
@ -1078,13 +1078,13 @@ mod tests {
|
|||||||
.create();
|
.create();
|
||||||
|
|
||||||
// ensure it doesn't have 0 sd
|
// ensure it doesn't have 0 sd
|
||||||
x.spell_dmg.force(50);
|
x.blue_dmg.force(50);
|
||||||
|
|
||||||
// remove all mitigation
|
// remove all mitigation
|
||||||
y.armour.force(0);
|
y.red_shield.force(0);
|
||||||
y.spell_shield.force(0);
|
y.blue_shield.force(0);
|
||||||
|
|
||||||
y.deal_phys_dmg(Skill::Attack, 5);
|
y.deal_red_dmg(Skill::Attack, 5);
|
||||||
let prev_hp = y.hp();
|
let prev_hp = y.hp();
|
||||||
|
|
||||||
let res = Resolution::new(Skill::Triage);
|
let res = Resolution::new(Skill::Triage);
|
||||||
@ -1118,11 +1118,11 @@ mod tests {
|
|||||||
.level(8)
|
.level(8)
|
||||||
.create();
|
.create();
|
||||||
|
|
||||||
x.spell_dmg.force(50);
|
x.blue_dmg.force(50);
|
||||||
|
|
||||||
amplify(&mut x.clone(), &mut x, Resolution::new(Skill::Amplify));
|
amplify(&mut x.clone(), &mut x, Resolution::new(Skill::Amplify));
|
||||||
assert!(x.effects.iter().any(|e| e.effect == Effect::Amplify));
|
assert!(x.effects.iter().any(|e| e.effect == Effect::Amplify));
|
||||||
assert_eq!(x.spell_dmg(), 100);
|
assert_eq!(x.blue_dmg(), 100);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|||||||
@ -25,30 +25,30 @@ impl Spec {
|
|||||||
|
|
||||||
pub fn apply(&self, modified: u64, base: u64) -> u64 {
|
pub fn apply(&self, modified: u64, base: u64) -> u64 {
|
||||||
match self.spec {
|
match self.spec {
|
||||||
SpecType::PhysDamage5 => modified + (base * 5 / 100),
|
SpecType::RedDamage5 => modified + (base * 5 / 100),
|
||||||
SpecType::SpellDamage5 => modified + (base * 5 / 100),
|
SpecType::BlueDamage5 => modified + (base * 5 / 100),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug,Copy,Clone,Serialize,Deserialize,PartialEq)]
|
#[derive(Debug,Copy,Clone,Serialize,Deserialize,PartialEq)]
|
||||||
pub enum SpecType {
|
pub enum SpecType {
|
||||||
PhysDamage5,
|
RedDamage5,
|
||||||
SpellDamage5,
|
BlueDamage5,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl SpecType {
|
impl SpecType {
|
||||||
fn affects(&self) -> Stat {
|
fn affects(&self) -> Stat {
|
||||||
match *self {
|
match *self {
|
||||||
SpecType::PhysDamage5 => Stat::PhysicalDamage,
|
SpecType::RedDamage5 => Stat::RedDamage,
|
||||||
SpecType::SpellDamage5 => Stat::SpellDamage,
|
SpecType::BlueDamage5 => Stat::BlueDamage,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn level(&self) -> SpecLevel {
|
fn level(&self) -> SpecLevel {
|
||||||
match *self {
|
match *self {
|
||||||
SpecType::PhysDamage5 => SpecLevel::Common,
|
SpecType::RedDamage5 => SpecLevel::Common,
|
||||||
SpecType::SpellDamage5 => SpecLevel::Common,
|
SpecType::BlueDamage5 => SpecLevel::Common,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user