shitty animations
This commit is contained in:
@@ -127,9 +127,10 @@ function GamePanel(props) {
|
||||
</figure>
|
||||
));
|
||||
|
||||
const combatText = getCombatText(cryp, resolution);
|
||||
const [combatText, combatClass] = getCombatText(cryp, resolution);
|
||||
const combatTextClass = `combat-text ${combatClass}`;
|
||||
const combatTextEl = combatText
|
||||
? <div className="combat-text">{combatText}</div>
|
||||
? <div className={combatTextClass}>{combatText}</div>
|
||||
: null;
|
||||
|
||||
const effects = cryp.effects.length
|
||||
|
||||
@@ -66,9 +66,10 @@ function GameCryp(props) {
|
||||
});
|
||||
|
||||
|
||||
const combatText = getCombatText(cryp, resolution);
|
||||
const [combatText, combatClass] = getCombatText(cryp, resolution);
|
||||
const combatTextClass = `combat-text ${combatClass}`;
|
||||
const combatTextEl = combatText
|
||||
? <div className="combat-text">{combatText}</div>
|
||||
? <div className={combatTextClass}>{combatText}</div>
|
||||
: null;
|
||||
|
||||
const effects = cryp.effects.length
|
||||
|
||||
+31
-31
@@ -280,7 +280,7 @@ function getCombatSequence(event) {
|
||||
}
|
||||
|
||||
function getCombatText(cryp, resolution) {
|
||||
if (!resolution) return '';
|
||||
if (!resolution) return ['', ''];
|
||||
|
||||
|
||||
const [type, event] = resolution.event;
|
||||
@@ -291,27 +291,27 @@ function getCombatText(cryp, resolution) {
|
||||
const postSkill = resolution.stage === 'POST_SKILL';
|
||||
|
||||
if (type === 'Ko') {
|
||||
if (postSkill && target) return 'KO!';
|
||||
if (postSkill && target) return ['KO!', ''];
|
||||
}
|
||||
|
||||
if (type === 'Disable') {
|
||||
const { skill, disable } = event;
|
||||
if (startSkill && source) return `${skill}`;
|
||||
if (endSkill && target) return `${skill}`;
|
||||
if (postSkill && target) return `${disable}`;
|
||||
if (startSkill && source) return [`${skill}`, ''];
|
||||
if (endSkill && target) return [`${skill}`, ''];
|
||||
if (postSkill && target) return [`${disable}`, ''];
|
||||
}
|
||||
|
||||
if (type === 'Immunity') {
|
||||
const { skill, immunity } = event;
|
||||
if (startSkill && source) return `${skill}`;
|
||||
if (endSkill && target) return `${skill}`;
|
||||
if (postSkill && target) return 'IMMUNE';
|
||||
if (startSkill && source) return [`${skill}`, ''];
|
||||
if (endSkill && target) return [`${skill}`, ''];
|
||||
if (postSkill && target) return ['IMMUNE', ''];
|
||||
}
|
||||
|
||||
if (type === 'TargetKo') {
|
||||
const { skill } = event;
|
||||
if (startSkill && source) return `${skill}`;
|
||||
if (endSkill && target) return `${skill}`;
|
||||
if (startSkill && source) return [`${skill}`, ''];
|
||||
if (endSkill && target) return [`${skill}`, ''];
|
||||
}
|
||||
|
||||
if (type === 'Damage') {
|
||||
@@ -319,55 +319,55 @@ function getCombatText(cryp, resolution) {
|
||||
const mitigationText = mitigation
|
||||
? `(${mitigation})`
|
||||
: '';
|
||||
if (startSkill && source) return `${skill}`;
|
||||
if (endSkill && target) return `${skill}`;
|
||||
if (postSkill && target) return `${amount} ${mitigationText}`;
|
||||
if (startSkill && source) return [`${skill}`, `${skill.toLowerCase()}-cast`];
|
||||
if (endSkill && target) return [`${skill}`, `${skill.toLowerCase()}-hit`];
|
||||
if (postSkill && target) return [`${amount} ${mitigationText}`, ''];
|
||||
}
|
||||
|
||||
if (type === 'Healing') {
|
||||
const { skill, amount, overhealing } = event;
|
||||
if (startSkill && source) return `${skill}`;
|
||||
if (endSkill && target) return `${skill}`;
|
||||
if (postSkill && target) return `${amount} (${overhealing} OH)`;
|
||||
if (startSkill && source) return [`${skill}`, ''];
|
||||
if (endSkill && target) return [`${skill}`, ''];
|
||||
if (postSkill && target) return [`${amount} (${overhealing} OH)`, ''];
|
||||
}
|
||||
|
||||
if (type === 'Inversion') {
|
||||
const { skill } = event;
|
||||
if (startSkill && source) return `${skill}`;
|
||||
if (endSkill && target) return `${skill}`;
|
||||
if (postSkill && target) return 'INVERT';
|
||||
if (startSkill && source) return [`${skill}`, ''];
|
||||
if (endSkill && target) return [`${skill}`, ''];
|
||||
if (postSkill && target) return ['INVERT', ''];
|
||||
}
|
||||
|
||||
if (type === 'Reflection') {
|
||||
const { skill } = event;
|
||||
if (startSkill && source) return `${skill}`;
|
||||
if (endSkill && target) return `${skill}`;
|
||||
if (postSkill && target) return 'REFLECT';
|
||||
if (startSkill && source) return [`${skill}`, ''];
|
||||
if (endSkill && target) return [`${skill}`, ''];
|
||||
if (postSkill && target) return ['REFLECT', ''];
|
||||
}
|
||||
|
||||
if (type === 'Effect') {
|
||||
const { skill, effect, duration } = event;
|
||||
if (startSkill && source) return `${skill}`;
|
||||
if (endSkill && target) return `${skill}`;
|
||||
if (postSkill && target) return `+ ${effect} ${duration}T`;
|
||||
if (startSkill && source) return [`${skill}`, ''];
|
||||
if (endSkill && target) return [`${skill}`, ''];
|
||||
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 (startSkill && source) return [`${skill}`, ''];
|
||||
if (endSkill && target) return [`${skill}`, ''];
|
||||
if (postSkill && target) return [`+${red}R ${blue}B`, ''];
|
||||
}
|
||||
|
||||
if (type === 'Skill' || type === 'AoeSkill') {
|
||||
const { skill } = event;
|
||||
if (startSkill && source) return `${skill}`;
|
||||
if (endSkill && target) return `${skill}`;
|
||||
if (startSkill && source) return [`${skill}`, ''];
|
||||
if (endSkill && target) return [`${skill}`, ''];
|
||||
}
|
||||
|
||||
if (type === 'Removal') {
|
||||
const { effect } = event;
|
||||
if (postSkill && target) return `-${effect}`;
|
||||
if (postSkill && target) return [`-${effect}`, ''];
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user