Added new format dmg numbers don't work
This commit is contained in:
parent
171367ab06
commit
f406b2251d
@ -87,7 +87,7 @@ class CrypImage extends Phaser.GameObjects.Image {
|
|||||||
this.health = scene.add.existing(new StatBar(scene, this, 'HP'));
|
this.health = scene.add.existing(new StatBar(scene, this, 'HP'));
|
||||||
this.red_shield = scene.add.existing(new StatBar(scene, this, 'Red Shield'));
|
this.red_shield = scene.add.existing(new StatBar(scene, this, 'Red Shield'));
|
||||||
this.blue_shield = scene.add.existing(new StatBar(scene, this, 'Blue Shield'));
|
this.blue_shield = scene.add.existing(new StatBar(scene, this, 'Blue Shield'));
|
||||||
this.evasion = scene.add.existing(new StatBar(scene, this, 'Evasion'));
|
// this.evasion = scene.add.existing(new StatBar(scene, this, 'Evasion'));
|
||||||
|
|
||||||
this.effects = scene.add.existing(new Effects(scene, team, iter));
|
this.effects = scene.add.existing(new Effects(scene, team, iter));
|
||||||
this.statusText = scene.add.text(statusX, statusY, '', TEXT.NORMAL);
|
this.statusText = scene.add.text(statusX, statusY, '', TEXT.NORMAL);
|
||||||
|
|||||||
@ -46,9 +46,8 @@ function calculateTweenParams(sourceSpawn, targetSpawn, account) {
|
|||||||
|
|
||||||
function animatePhase(scene, game, resolution, cb) {
|
function animatePhase(scene, game, resolution, cb) {
|
||||||
// return early for disabled skills
|
// return early for disabled skills
|
||||||
const { resolution: { results } } = resolution;
|
if (resolution.resolutions.length === 0) return cb();
|
||||||
if (results.length === 0) return cb();
|
// if (events[0] === 'Disable') return cb();
|
||||||
if (results[0][0] === 'Disable') return cb();
|
|
||||||
|
|
||||||
const group = scene.scene.get('CombatCryps').cryps;
|
const group = scene.scene.get('CombatCryps').cryps;
|
||||||
const animations = new CombatAnimations(scene);
|
const animations = new CombatAnimations(scene);
|
||||||
@ -77,34 +76,31 @@ function animatePhase(scene, game, resolution, cb) {
|
|||||||
|
|
||||||
// animate animation
|
// animate animation
|
||||||
animations.getSkill(resolution.skill, isAlly, castLocation);
|
animations.getSkill(resolution.skill, isAlly, castLocation);
|
||||||
|
|
||||||
// Target cryp takes damage
|
// Target cryp takes damage
|
||||||
scene.time.delayedCall(ANIMATION_DURATION, () => {
|
scene.time.delayedCall(ANIMATION_DURATION, () => {
|
||||||
eachSeries(results,
|
console.log(resolution.resolutions);
|
||||||
(result, tickCb) => {
|
eachSeries(resolution.resolutions, (events, tickCb) => {
|
||||||
// touch
|
// touch
|
||||||
if (!results.length) return tickCb();
|
if (!resolution.resolutions.length) return tickCb();
|
||||||
|
if (events.event[0] === 'Damage') {
|
||||||
const [resultType, values] = result;
|
targetSpawn.takeDamage(events.event[1].amount);
|
||||||
if (resultType === 'Damage') {
|
|
||||||
targetSpawn.takeDamage(values);
|
|
||||||
scene.registry.set('gameLog', scene.registry.get('gameLog') + 1);
|
scene.registry.set('gameLog', scene.registry.get('gameLog') + 1);
|
||||||
return setTimeout(tickCb, DAMAGE_TICK);
|
return setTimeout(tickCb, DAMAGE_TICK);
|
||||||
}
|
}
|
||||||
if (resultType === 'Healing') {
|
if (events.event[0] === 'Healing') {
|
||||||
targetSpawn.takeHealing(values.amount);
|
targetSpawn.takeHealing(events.event[1].amount);
|
||||||
scene.registry.set('gameLog', scene.registry.get('gameLog') + 1);
|
scene.registry.set('gameLog', scene.registry.get('gameLog') + 1);
|
||||||
return setTimeout(tickCb, DAMAGE_TICK);
|
return setTimeout(tickCb, DAMAGE_TICK);
|
||||||
}
|
}
|
||||||
if (resultType === 'Effect') {
|
if (events.event[0] === 'Effect') {
|
||||||
targetSpawn.effects.addEffect(values);
|
targetSpawn.effects.addEffect(events.event[0]);
|
||||||
console.log('target has new effect', values.effect);
|
console.log('target has new effect', events.event[1].effect);
|
||||||
return setTimeout(tickCb, DAMAGE_TICK);
|
return setTimeout(tickCb, DAMAGE_TICK);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (resultType === 'Removal') {
|
if (events.event[0] === 'Removal') {
|
||||||
targetSpawn.effects.removeEffect(values.effect);
|
targetSpawn.effects.removeEffect(events.event[1].effect);
|
||||||
console.log('target effect removed', values.effect);
|
console.log('target effect removed', events.event[1].effect);
|
||||||
return setTimeout(tickCb, DAMAGE_TICK);
|
return setTimeout(tickCb, DAMAGE_TICK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -24,7 +24,6 @@ class StatBar extends Phaser.GameObjects.Graphics {
|
|||||||
super(scene);
|
super(scene);
|
||||||
this.crypObj = cryp;
|
this.crypObj = cryp;
|
||||||
this.type = type;
|
this.type = type;
|
||||||
console.log(type);
|
|
||||||
|
|
||||||
if (type === 'HP') {
|
if (type === 'HP') {
|
||||||
this.val = this.crypObj.cryp.hp.value;
|
this.val = this.crypObj.cryp.hp.value;
|
||||||
|
|||||||
0
server/COMBOS.md
Executable file → Normal file
0
server/COMBOS.md
Executable file → Normal file
@ -37,6 +37,7 @@ constants
|
|||||||
change to ownership pattern
|
change to ownership pattern
|
||||||
|
|
||||||
## SOON
|
## SOON
|
||||||
|
* Remove debuffs on KO
|
||||||
* Descriptions
|
* Descriptions
|
||||||
* Stats - How they work
|
* Stats - How they work
|
||||||
* Items - What they give
|
* Items - What they give
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user