throw -> break
This commit is contained in:
+5
-5
@@ -302,8 +302,8 @@ module.exports = {
|
||||
// disallow use of comma operator
|
||||
'no-sequences': 'error',
|
||||
|
||||
// restrict what can be thrown as an exception
|
||||
'no-throw-literal': 'error',
|
||||
// restrict what can be breakn as an exception
|
||||
'no-break-literal': 'error',
|
||||
|
||||
// disallow unmodified conditions of loops
|
||||
// https://eslint.org/docs/rules/no-unmodified-loop-condition
|
||||
@@ -479,10 +479,10 @@ module.exports = {
|
||||
// https://eslint.org/docs/rules/no-unexpected-multiline
|
||||
'no-unexpected-multiline': 'error',
|
||||
|
||||
// disallow unreachable statements after a return, throw, continue, or break statement
|
||||
// disallow unreachable statements after a return, break, continue, or break statement
|
||||
'no-unreachable': 'error',
|
||||
|
||||
// disallow return/throw/break/continue inside finally blocks
|
||||
// disallow return/break/break/continue inside finally blocks
|
||||
// https://eslint.org/docs/rules/no-unsafe-finally
|
||||
'no-unsafe-finally': 'error',
|
||||
|
||||
@@ -870,7 +870,7 @@ module.exports = {
|
||||
after: true,
|
||||
overrides: {
|
||||
return: { after: true },
|
||||
throw: { after: true },
|
||||
break: { after: true },
|
||||
case: { after: true }
|
||||
}
|
||||
}],
|
||||
|
||||
@@ -111,7 +111,7 @@ const SKILLS = [
|
||||
'SleepI',
|
||||
'StrikeI',
|
||||
'SustainI',
|
||||
'ThrowI',
|
||||
'BreakI',
|
||||
'TriageI',
|
||||
'TriageTickI',
|
||||
];
|
||||
|
||||
@@ -10,6 +10,7 @@ const Bash = require('./anims/bash');
|
||||
const Blast = require('./anims/blast');
|
||||
const Block = require('./anims/block');
|
||||
const Buff = require('./anims/buff');
|
||||
const Break = require('./anims/break');
|
||||
const Chaos = require('./anims/chaos');
|
||||
const Sustain = require('./anims/sustain');
|
||||
const Counter = require('./anims/counter');
|
||||
@@ -143,7 +144,7 @@ function animations(props) {
|
||||
case 'Bash': return <Bash />;
|
||||
case 'Absorb': return <Absorb />;
|
||||
case 'Sleep': return <Sleep />;
|
||||
case 'Throw': return false;
|
||||
case 'Break': return <Break />;
|
||||
case 'Ruin': return false;
|
||||
|
||||
// Block Base
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
const preact = require('preact');
|
||||
const { Component } = require('preact');
|
||||
const anime = require('animejs').default;
|
||||
|
||||
const { TIMES } = require('../../constants');
|
||||
|
||||
// logarithmic spiral lifted from
|
||||
// https://upload.wikimedia.org/wikipedia/commons/5/5b/Logarithmic_spiral_(1).svg
|
||||
|
||||
class Break extends Component {
|
||||
constructor() {
|
||||
super();
|
||||
this.animations = [];
|
||||
}
|
||||
|
||||
render() {
|
||||
const path = 'M0,100 C100,100 100,100 200,100';
|
||||
|
||||
return (
|
||||
<svg
|
||||
class='skill-animation red'
|
||||
version="1.1"
|
||||
id="break"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="-291 -291 582 582">
|
||||
<filter id='breakFilter'>
|
||||
<feTurbulence type="turbulence" baseFrequency="0" numOctaves="1" result="turbulence"></feTurbulence>
|
||||
<feDisplacementMap in2="turbulence" in="SourceGraphic" scale="1" xChannelSelector="R" yChannelSelector="G"></feDisplacementMap>
|
||||
</filter>
|
||||
|
||||
<g>
|
||||
<path
|
||||
d="M3.6 0c.23-2.93-1.9-4.9-4.8-4.77S-6.37-1.87-6.33 1.3s2.92 7.1 8.03 7 9.4-4.78 9.2-10.5-5-11.95-13.4-12.1S-18.77-6.88-18.85 3.3-10.05 24.97 4.8 24.74 32.78 11.38 32.5-6.5 16.15-42.7-7.8-42.7-55.7-22.02-56.2 9.7s27.3 65 72 64 82.32-42.78 81-92.3S55.41-126.63-23-127.4-168.4-56.97-167.6 30.3s65.85 166.15 161.27 186S246.55 187.18 284.83 0"
|
||||
/>
|
||||
<path
|
||||
d="M3.6 0c.23-2.93-1.9-4.9-4.8-4.77S-6.37-1.87-6.33 1.3s2.92 7.1 8.03 7 9.4-4.78 9.2-10.5-5-11.95-13.4-12.1S-18.77-6.88-18.85 3.3-10.05 24.97 4.8 24.74 32.78 11.38 32.5-6.5 16.15-42.7-7.8-42.7-55.7-22.02-56.2 9.7s27.3 65 72 64 82.32-42.78 81-92.3S55.41-126.63-23-127.4-168.4-56.97-167.6 30.3s65.85 166.15 161.27 186S246.55 187.18 284.83 0"
|
||||
transform="rotate(120)"
|
||||
style="opacity: 0.75"
|
||||
/>
|
||||
<path
|
||||
d="M3.6 0c.23-2.93-1.9-4.9-4.8-4.77S-6.37-1.87-6.33 1.3s2.92 7.1 8.03 7 9.4-4.78 9.2-10.5-5-11.95-13.4-12.1S-18.77-6.88-18.85 3.3-10.05 24.97 4.8 24.74 32.78 11.38 32.5-6.5 16.15-42.7-7.8-42.7-55.7-22.02-56.2 9.7s27.3 65 72 64 82.32-42.78 81-92.3S55.41-126.63-23-127.4-168.4-56.97-167.6 30.3s65.85 166.15 161.27 186S246.55 187.18 284.83 0"
|
||||
transform="rotate(240)"
|
||||
style="opacity: 0.5"
|
||||
/>
|
||||
</g>
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
this.animations.push(anime({
|
||||
targets: ['#break'],
|
||||
opacity: [
|
||||
{ value: 1, delay: TIMES.TARGET_DELAY_MS, duration: TIMES.TARGET_DURATION_MS * 0.2 },
|
||||
{ value: 0, delay: TIMES.TARGET_DURATION_MS * 0.6, duration: TIMES.TARGET_DURATION_MS * 0.2 },
|
||||
],
|
||||
easing: 'easeInOutSine',
|
||||
}));
|
||||
|
||||
this.animations.push(anime({
|
||||
targets: ['#break'],
|
||||
rotate: 180,
|
||||
easing: 'linear',
|
||||
loop: true,
|
||||
delay: TIMES.TARGET_DELAY_MS,
|
||||
duration: TIMES.TARGET_DURATION_MS,
|
||||
}));
|
||||
|
||||
this.animations.push(anime({
|
||||
targets: ['#breakFilter feTurbulence', '#breakFilter feDisplacementMap'],
|
||||
baseFrequency: 2,
|
||||
scale: 10,
|
||||
numOctaves: 5,
|
||||
easing: 'easeOutSine',
|
||||
|
||||
delay: TIMES.TARGET_DELAY_MS,
|
||||
duration: TIMES.TARGET_DURATION_MS,
|
||||
}));
|
||||
|
||||
}
|
||||
|
||||
// this is necessary because
|
||||
// skipping / timing / unmounting race conditions
|
||||
// can cause the animations to cut short, this will ensure the values are reset
|
||||
// because preact will recycle all these components
|
||||
componentWillUnmount() {
|
||||
for (let i = this.animations.length - 1; i >= 0; i--) {
|
||||
this.animations[i].reset();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = Break;
|
||||
@@ -261,7 +261,7 @@ function testInstance(uuid) {
|
||||
"cd": null
|
||||
},
|
||||
{
|
||||
"skill": "Throw",
|
||||
"skill": "Break",
|
||||
"self_targeting": false,
|
||||
"cd": 1
|
||||
},
|
||||
@@ -835,7 +835,7 @@ function testInstance(uuid) {
|
||||
"cd": null
|
||||
},
|
||||
{
|
||||
"skill": "Throw",
|
||||
"skill": "Break",
|
||||
"self_targeting": false,
|
||||
"cd": 1
|
||||
},
|
||||
@@ -961,7 +961,7 @@ function testInstance(uuid) {
|
||||
"cd": 3
|
||||
},
|
||||
{
|
||||
"skill": "Throw",
|
||||
"skill": "Break",
|
||||
"self_targeting": false,
|
||||
"cd": 1
|
||||
}
|
||||
@@ -2112,7 +2112,7 @@ function testInstance(uuid) {
|
||||
"cd": null
|
||||
},
|
||||
{
|
||||
"skill": "Throw",
|
||||
"skill": "Break",
|
||||
"self_targeting": false,
|
||||
"cd": 1
|
||||
},
|
||||
|
||||
@@ -369,7 +369,7 @@ const removeTier = skill => {
|
||||
if (skill.includes('Bash')) return 'Bash';
|
||||
if (skill.includes('Sleep')) return 'Sleep';
|
||||
if (skill.includes('Ruin')) return 'Ruin';
|
||||
if (skill.includes('Throw')) return 'Throw';
|
||||
if (skill.includes('Break')) return 'Break';
|
||||
if (skill.includes('Hex')) return 'Hex';
|
||||
if (skill.includes('Absorb')) return 'Absorb';
|
||||
if (skill.includes('Banish')) return 'Banish';
|
||||
|
||||
Reference in New Issue
Block a user