ganba
This commit is contained in:
parent
bd517a1926
commit
adf6700049
@ -72,7 +72,7 @@ class GameConstruct extends Component {
|
||||
} = this.props;
|
||||
|
||||
const ko = construct.green_life.value === 0 ? 'ko' : '';
|
||||
const classes = eventClasses(game, account, resolution, construct);
|
||||
const classes = eventClasses(game, account, resolution, construct, animText);
|
||||
|
||||
const stats = ['RedLife', 'GreenLife', 'BlueLife'].map((s, j) => (
|
||||
<div key={j} alt={STATS[s].stat}>
|
||||
|
||||
@ -66,7 +66,12 @@ function registerEvents(store) {
|
||||
|
||||
if (sequence.includes('START_SKILL')) store.dispatch(actions.setAnimSource(anims.animSource));
|
||||
if (sequence.includes('END_SKILL')) store.dispatch(actions.setAnimTarget(anims.animTarget));
|
||||
if (sequence.includes('POST_SKILL')) store.dispatch(actions.setAnimText(text));
|
||||
if (sequence.includes('POST_SKILL')) {
|
||||
setTimeout(
|
||||
() => store.dispatch(actions.setAnimText(text)),
|
||||
timeout - 1000,
|
||||
);
|
||||
}
|
||||
|
||||
return setTimeout(() => {
|
||||
store.dispatch(actions.setAnimSource(null));
|
||||
|
||||
@ -85,7 +85,7 @@ const STATS = {
|
||||
},
|
||||
};
|
||||
|
||||
function eventClasses(game, account, resolution, construct) {
|
||||
function eventClasses(game, account, resolution, construct, postSkill) {
|
||||
if (!resolution) return '';
|
||||
const source = construct.id === resolution.source.id;
|
||||
const target = construct.id === resolution.target.id;
|
||||
@ -130,7 +130,7 @@ function eventClasses(game, account, resolution, construct) {
|
||||
}
|
||||
|
||||
if (type === 'Healing') {
|
||||
if (target) {
|
||||
if (target && postSkill) {
|
||||
construct.green_life.value = resolution.target.green;
|
||||
return 'green-damage';
|
||||
}
|
||||
@ -138,17 +138,17 @@ function eventClasses(game, account, resolution, construct) {
|
||||
|
||||
if (type === 'Effect') {
|
||||
const { construct_effects: constructEffects } = event;
|
||||
if (target) construct.effects = constructEffects;
|
||||
if (target && postSkill) construct.effects = constructEffects;
|
||||
}
|
||||
|
||||
if (type === 'Removal') {
|
||||
const { construct_effects: constructEffects } = event;
|
||||
if (target) construct.effects = constructEffects;
|
||||
if (target && postSkill) construct.effects = constructEffects;
|
||||
}
|
||||
|
||||
if (type === 'Recharge') {
|
||||
const { red, blue } = event;
|
||||
if (target) {
|
||||
if (target && postSkill) {
|
||||
if (red > 0 && blue > 0) {
|
||||
construct.red_life.value = resolution.target.red;
|
||||
construct.blue_life.value = resolution.target.blue;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user