added recharge

This commit is contained in:
Mashy
2019-04-17 09:39:39 +10:00
parent 7045e9ff9c
commit a202af4d3d
2 changed files with 38 additions and 0 deletions
+17
View File
@@ -181,6 +181,15 @@ function eventClasses(resolution, cryp) {
if (type === 'Recharge') {
const { skill, red, blue } = event;
if (source && startSkill) return 'active-skill';
if (target && endSkill) return 'active-skill';
if (target && postSkill) {
cryp.red_life.value += red;
cryp.blue_life.value += blue;
if (red > 0 && blue > 0) return 'purple-damage';
if (red > 0) return 'red-damage';
if (blue > 0) return 'blue-damage';
}
}
if (type === 'Evasion') {
@@ -272,6 +281,14 @@ function getCombatText(cryp, resolution) {
if (postSkill && target) return `+ ${effect} ${duration}T`;
}
if (type === 'Recharge') {
const { skill, red, blue } = event;
if (startSkill && source) return `${skill}`;
if (endSkill && target) return `${skill}`;
if (postSkill && target) return `+${red}R ${blue}B`;
}
if (type === 'Removal') {
const { effect } = event;
if (postSkill && target) return `- ${effect}`;