client side descriptions, add counterattack anim

This commit is contained in:
Mashy 2019-10-29 11:49:41 +10:00
parent 2617183b33
commit a254c1d0a7
2 changed files with 10 additions and 9 deletions

View File

@ -143,6 +143,7 @@ function randomPoints(numPoints, radius, dimensions) {
const removeTier = skill => { const removeTier = skill => {
if (!skill) return skill; if (!skill) return skill;
if (skill.includes('CounterAttack')) return 'CounterAttack';
if (skill.includes('SiphonTick')) return 'SiphonTick'; if (skill.includes('SiphonTick')) return 'SiphonTick';
if (skill.includes('TriageTick')) return 'TriageTick'; if (skill.includes('TriageTick')) return 'TriageTick';
if (skill.includes('DecayTick')) return 'DecayTick'; if (skill.includes('DecayTick')) return 'DecayTick';
@ -242,17 +243,17 @@ function effectInfo(i) {
console.log(i); console.log(i);
function multiplier(s) { // Update later to use server info in future function multiplier(s) { // Update later to use server info in future
if (s === 'CounterAttack') return 70; if (s === 'CounterAttack') return 120;
if (s === 'CounterAttack+') return 95; if (s === 'CounterAttack+') return 160;
if (s === 'CounterAttack++') return 120; if (s === 'CounterAttack++') return 230;
if (s === 'DecayTick') return 33; if (s === 'DecayTick') return 33;
if (s === 'DecayTick+') return 45; if (s === 'DecayTick+') return 45;
if (s === 'DecayTick++') return 70; if (s === 'DecayTick++') return 70;
if (s === 'SiphonTick') return 20; if (s === 'SiphonTick') return 25;
if (s === 'SiphonTick+') return 25; if (s === 'SiphonTick+') return 30;
if (s === 'SiphonTick++') return 30; if (s === 'SiphonTick++') return 40;
if (s === 'TriageTick') return 75; if (s === 'TriageTick') return 75;
if (s === 'TriageTick+') return 110; if (s === 'TriageTick+') return 110;
@ -267,8 +268,8 @@ function effectInfo(i) {
switch (i.effect) { switch (i.effect) {
case 'Amplify': return `Increases construct RedPower and BluePower by ${i.meta[1] - 100}%`; case 'Amplify': return `Increases construct RedPower and BluePower by ${i.meta[1] - 100}%`;
case 'Banish': return 'Banished construct cannot cast or take damage'; case 'Banish': return 'Banished construct cannot cast or take damage';
case 'Block': return `Reduces construct red damage taken by ${100 - i.meta[1]}%`; case 'Block': return `Reduces construct red damage and blue damage taken by ${100 - i.meta[1]}%`;
case 'Buff': return `Increases construct RedPower and SpeedStat by ${i.meta[1] - 100}%`; case 'Buff': return `Increases construct RedPower BluePower SpeedStat by ${i.meta[1] - 100}%`;
case 'Sustain': return 'Construct cannot be KO while active. Additionally provides immunity to disables'; case 'Sustain': return 'Construct cannot be KO while active. Additionally provides immunity to disables';
case 'Curse': return `Construct will take ${i.meta[1] - 100}% increased red and blue damage`; case 'Curse': return `Construct will take ${i.meta[1] - 100}% increased red and blue damage`;
case 'Haste': return `Construct has ${i.meta[1] - 100}% increased SpeedStat. Red attack skills will trigger a HasteStrike dealing 30% SpeedStat as red damage.`; case 'Haste': return `Construct has ${i.meta[1] - 100}% increased SpeedStat. Red attack skills will trigger a HasteStrike dealing 30% SpeedStat as red damage.`;

View File

@ -1446,7 +1446,7 @@ fn counter_attack(source: &mut Construct, target: &mut Construct, mut results: R
let amount = source.red_power().pct(skill.multiplier()); let amount = source.red_power().pct(skill.multiplier());
target.deal_red_damage(skill, amount) target.deal_red_damage(skill, amount)
.into_iter() .into_iter()
.for_each(|e| results.push(Resolution::new(source, target).event(e).stages(EventStages::StartPost))); .for_each(|e| results.push(Resolution::new(source, target).event(e)));
return results; return results;
} }