This commit is contained in:
ntr 2019-03-01 19:37:04 +11:00
parent 298c263a60
commit c60f38716f
4 changed files with 11 additions and 11 deletions

View File

@ -188,7 +188,7 @@ class CombatCryps extends Phaser.Scene {
const crypObj = this.cryps.children.entries
.find(c => c.cryp.id === cryp.id)
|| renderCryp(cryp, iter, team);
crypObj.health.hp = cryp.hp.base;
crypObj.health.hp = cryp.hp.value;
crypObj.health.drawStatBar();
crypObj.effects.update(cryp.effects);
};

View File

@ -152,7 +152,7 @@ class CombatSkills extends Phaser.Scene {
team.cryps.forEach((cryp) => {
// return early if KOd
if (cryp.hp.base === 0) return true;
if (cryp.hp.value === 0) return true;
// find the cryp position
const { iter } = this.scene.get('CombatCryps').cryps.children.entries.find(c => c.cryp.id === cryp.id);

View File

@ -27,20 +27,20 @@ class StatBar extends Phaser.GameObjects.Graphics {
console.log(type);
if (type === 'HP') {
this.val = this.crypObj.cryp.hp.base;
this.max = this.crypObj.cryp.hp.base;
this.val = this.crypObj.cryp.hp.value;
this.max = this.crypObj.cryp.stamina.value;
this.margin = 0;
} else if (type === 'Red Shield') {
this.val = this.crypObj.cryp.red_shield.base;
this.max = this.crypObj.cryp.red_shield.base;
this.val = this.crypObj.cryp.red_shield.value;
this.max = this.crypObj.cryp.red_shield.value;
this.margin = 1;
} else if (type === 'Blue Shield') {
this.val = this.crypObj.cryp.blue_shield.base;
this.max = this.crypObj.cryp.blue_shield.base;
this.val = this.crypObj.cryp.blue_shield.value;
this.max = this.crypObj.cryp.blue_shield.value;
this.margin = 2;
} else if (type === 'Evasion') {
this.val = this.crypObj.cryp.evasion.base;
this.max = this.crypObj.cryp.evasion.base;
this.val = this.crypObj.cryp.evasion.value;
this.max = this.crypObj.cryp.evasion.value;
this.margin = 3;
}
const { statTextX, statTextY } = statTextCoord(cryp.team, cryp.iter, this.margin);

View File

@ -63,7 +63,7 @@ class StatSheet extends Phaser.Scene {
const crypStat = (stat, i) => {
const STAT_X = X;
const STAT_Y = Y + (i + 2) * TEXT_MARGIN;
this.add.text(STAT_X, STAT_Y, `${stat.stat}: ${stat.base}`, TEXT.NORMAL);
this.add.text(STAT_X, STAT_Y, `${stat.stat}: ${stat.value}`, TEXT.NORMAL);
};
const CRYP_STATS = [