Merge branch 'master' of ssh://cryps.gg:40022/~/cryps

This commit is contained in:
Mashy
2019-03-03 11:19:45 +10:00
7 changed files with 94 additions and 49 deletions
+1 -1
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);
};
+1 -1
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);
+8 -8
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);
+1 -1
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 = [
+2 -2
View File
@@ -141,7 +141,7 @@ function createSocket(events) {
}
function sendInstanceJoin(cryps) {
send({ method: 'instance_join', params: { cryp_ids: cryps, pve: true } });
send({ method: 'instance_join', params: { cryp_ids: cryps, pve: false } });
}
function sendInstanceReady(instanceId) {
@@ -255,7 +255,7 @@ function createSocket(events) {
if (!account) events.loginPrompt();
if (process.env.NODE_ENV !== 'production') {
send({ method: 'account_login', params: { name: 'ntr', password: 'grepgrepgrep' } });
// send({ method: 'account_login', params: { name: 'ntr', password: 'grepgrepgrep' } });
}
return true;