Added skill descriptions, cleaned up some scenes
This commit is contained in:
parent
d4c43ce50f
commit
e7aee86aae
@ -169,55 +169,187 @@ module.exports = {
|
|||||||
// chargeBall: [300, 500],
|
// chargeBall: [300, 500],
|
||||||
},
|
},
|
||||||
|
|
||||||
SKILLS: {
|
ITEMS: {
|
||||||
LEARNABLE:
|
SKILLS: {
|
||||||
[ { name: 'Amplify',
|
Amplify: {
|
||||||
description: 'increase the magic damage dealt by a cryp' },
|
description: 'increase the magic damage dealt by a cryp',
|
||||||
{ name: 'Attack',
|
colours: '2 Blue',
|
||||||
description: 'a fast attack with red damage' },
|
},
|
||||||
{ name: 'Banish',
|
|
||||||
description:
|
Attack: {
|
||||||
'target cryp is prevented from casting any skills and taking any damage' },
|
description: 'a fast attack with red damage',
|
||||||
{ name: 'Blast',
|
upgrades: 'combine with any combination of 2 red / blue / green - red + blue attack not implemented',
|
||||||
description: 'blast the target with magic damage' },
|
},
|
||||||
{ name: 'Block',
|
|
||||||
description: 'decreases incoming red damage for 1T' },
|
Banish: {
|
||||||
{ name: 'Curse',
|
description: 'target cryp is prevented from casting any skills and taking any damage',
|
||||||
description: 'target cryp takes increased magic damage' },
|
},
|
||||||
{ name: 'Decay',
|
|
||||||
description:
|
Blast: {
|
||||||
'afflict a cryp with a blue damage based damage over time debuff' },
|
description: 'blast the target with magic damage',
|
||||||
{ name: 'Siphon',
|
},
|
||||||
description: 'siphon hp from target cryp with a blue damage based debuff' },
|
|
||||||
{ name: 'Empower',
|
Block: {
|
||||||
description: 'increase the red damage dealt by a cryp' },
|
description: 'decreases incoming red damage for 1T',
|
||||||
{ name: 'Haste',
|
upgrades: 'combine with any combination of 2 red / blue / green',
|
||||||
description: 'magical skill that increases speed of target cryp' },
|
},
|
||||||
{ name: 'Heal', description: 'heal a cryp with blue damage' },
|
|
||||||
{ name: 'Hex',
|
Buff: {
|
||||||
description:
|
description: 'increase target cryp speed',
|
||||||
'magical based skill that prevents target cryp from using any skills' },
|
upgrades: 'combine with any combination of 2 red / blue / green',
|
||||||
{ name: 'Parry',
|
},
|
||||||
description: 'prevents all red damage for 1T' },
|
|
||||||
{ name: 'Purge',
|
Clutch: {
|
||||||
description: 'remove magical buffs from target cryp' },
|
description: '??????',
|
||||||
{ name: 'Purify',
|
},
|
||||||
description: 'remove magical debuffs from target cryp' },
|
|
||||||
{ name: 'Shield',
|
Curse: {
|
||||||
description: 'grants immunity to magical skills to target cryp' },
|
description: 'target cryp takes increased magic damage',
|
||||||
{ name: 'Silence',
|
},
|
||||||
description: 'prevent target cryp from casting magical skills' },
|
|
||||||
{ name: 'Slow',
|
Debuff: {
|
||||||
description: 'magical skill that reduces speed of target cryp' },
|
description: 'reduce target cryp speed',
|
||||||
{ name: 'Snare',
|
upgrades: 'combine with any combination of 2 red / blue / green',
|
||||||
description: 'prevents red skills from being used for 2T' },
|
},
|
||||||
{ name: 'Stun',
|
|
||||||
description:
|
Decay: {
|
||||||
'red skill that prevents target cryp from using any skills' },
|
description: 'afflict a cryp with a blue damage based damage over time debuff',
|
||||||
{ name: 'Throw',
|
},
|
||||||
description: 'stuns and makes the target take increased red damage' },
|
|
||||||
{ name: 'Triage',
|
Empower: {
|
||||||
description: 'grants a blue damage based healing over time buff' }
|
description: 'increase the red damage dealt by a cryp',
|
||||||
]
|
},
|
||||||
|
|
||||||
|
Haste: {
|
||||||
|
description: 'magical skill that increases speed of target cryp',
|
||||||
|
},
|
||||||
|
|
||||||
|
Heal: {
|
||||||
|
description: 'heal a cryp with blue damage',
|
||||||
|
},
|
||||||
|
|
||||||
|
Hex: {
|
||||||
|
description: 'magical bsed skill that prevents target cryp from using any skills',
|
||||||
|
},
|
||||||
|
|
||||||
|
Hostility: {
|
||||||
|
description: 'magical bsed skill that prevents target cryp from using any skills',
|
||||||
|
},
|
||||||
|
|
||||||
|
Invert: {
|
||||||
|
description: 'reverse ???',
|
||||||
|
},
|
||||||
|
|
||||||
|
Parry: {
|
||||||
|
description: 'prevents all red damage for 1T',
|
||||||
|
},
|
||||||
|
|
||||||
|
Purge: {
|
||||||
|
description: 'remove magical buffs from target cryp',
|
||||||
|
},
|
||||||
|
|
||||||
|
Purify: {
|
||||||
|
description: 'remove magical debuffs from target cryp',
|
||||||
|
},
|
||||||
|
|
||||||
|
Recharge: {
|
||||||
|
description: 'restore something',
|
||||||
|
},
|
||||||
|
|
||||||
|
Reflect: {
|
||||||
|
description: 'reflect damage back to attacker',
|
||||||
|
},
|
||||||
|
|
||||||
|
Riposte: {
|
||||||
|
description: '???',
|
||||||
|
},
|
||||||
|
|
||||||
|
Ruin: {
|
||||||
|
description: 'Stun the entire enemy team',
|
||||||
|
},
|
||||||
|
|
||||||
|
Shield: {
|
||||||
|
description: 'grants immunity to magical skills to target cryp',
|
||||||
|
},
|
||||||
|
|
||||||
|
Silence: {
|
||||||
|
description: 'prevent target cryp from casting magical skills',
|
||||||
|
},
|
||||||
|
|
||||||
|
Siphon: {
|
||||||
|
description: 'siphon hp from target cryp with a blue damage based debuff',
|
||||||
|
},
|
||||||
|
|
||||||
|
Slay: {
|
||||||
|
description: '????',
|
||||||
|
},
|
||||||
|
|
||||||
|
Slow: {
|
||||||
|
description: 'magical skill that reduces speed of target cryp',
|
||||||
|
},
|
||||||
|
|
||||||
|
Snare: {
|
||||||
|
description: 'prevents red skills from being used for 2T',
|
||||||
|
},
|
||||||
|
|
||||||
|
Strangle: {
|
||||||
|
description: 'Stun the enemy and inflict physical damage over 3T',
|
||||||
|
},
|
||||||
|
|
||||||
|
Strike: {
|
||||||
|
description: 'Fast attacking red skill',
|
||||||
|
},
|
||||||
|
|
||||||
|
Stun: {
|
||||||
|
description: 'red skill hat prevents target cryp from using any skills',
|
||||||
|
upgrades: 'combine with any combination of 2 red / blue / green',
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
Taunt: {
|
||||||
|
description: 'Enemy skills will prioritise cryps with this skill active',
|
||||||
|
},
|
||||||
|
|
||||||
|
Throw: {
|
||||||
|
description: 'stuns and makes the target take increased red damage',
|
||||||
|
},
|
||||||
|
|
||||||
|
Triage: {
|
||||||
|
description: 'grants a blue damage based healing over time buff',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
SPECS: {
|
||||||
|
Damage: {
|
||||||
|
description: 'Increase red / green / blue power stats cryp',
|
||||||
|
upgrades: 'combine with any combination of 2 red / blue / green',
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
Hp: {
|
||||||
|
description: 'Increases health of cryp',
|
||||||
|
upgrades: 'combine with any combination of 2 red / blue / green',
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
Speed: {
|
||||||
|
description: 'Increases speed of cryp',
|
||||||
|
upgrades: 'combine with any combination of 2 red / blue / green',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
COLOURS: {
|
||||||
|
Red: {
|
||||||
|
description: 'Used to create offensive type combos - fast and chaotic',
|
||||||
|
},
|
||||||
|
|
||||||
|
Green: {
|
||||||
|
description: 'Used to create defensive / healing type combos',
|
||||||
|
},
|
||||||
|
|
||||||
|
Blue: {
|
||||||
|
description: 'Used to create offensive type combos - slow and reliable',
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@ -16,7 +16,7 @@ class HomeNavigation extends Phaser.Scene {
|
|||||||
}
|
}
|
||||||
|
|
||||||
create() {
|
create() {
|
||||||
const ranks = this.add
|
/* const ranks = this.add
|
||||||
.rectangle(X, Y, BTN_WIDTH, BTN_HEIGHT, 0x222222)
|
.rectangle(X, Y, BTN_WIDTH, BTN_HEIGHT, 0x222222)
|
||||||
.setInteractive()
|
.setInteractive()
|
||||||
.setOrigin(0);
|
.setOrigin(0);
|
||||||
@ -50,7 +50,7 @@ class HomeNavigation extends Phaser.Scene {
|
|||||||
this.add
|
this.add
|
||||||
.text(instances.getCenter().x, instances.getCenter().y, 'Instances', TEXT.HEADER)
|
.text(instances.getCenter().x, instances.getCenter().y, 'Instances', TEXT.HEADER)
|
||||||
.setOrigin(0.5, 0.5);
|
.setOrigin(0.5, 0.5);
|
||||||
instances.on('pointerdown', () => this.registry.set('homeInstances', true));
|
instances.on('pointerdown', () => this.registry.set('homeInstances', true));*/
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanUp() {
|
cleanUp() {
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
const Phaser = require('phaser');
|
const Phaser = require('phaser');
|
||||||
const { POSITIONS: { MENU_MAIN }, TEXT } = require('./constants');
|
const { POSITIONS: { MENU_MAIN }, TEXT, ITEMS: { SKILLS, SPECS, COLOURS } } = require('./constants');
|
||||||
|
|
||||||
const X = MENU_MAIN.x();
|
const X = MENU_MAIN.x();
|
||||||
const Y = MENU_MAIN.y();
|
const Y = MENU_MAIN.y();
|
||||||
@ -18,12 +18,39 @@ class ItemInfo extends Phaser.Scene {
|
|||||||
create(props) {
|
create(props) {
|
||||||
const { item, cryp } = props;
|
const { item, cryp } = props;
|
||||||
if (!item) return false;
|
if (!item) return false;
|
||||||
this.add.text(X, Y, item, TEXT.HEADER);
|
|
||||||
this.add.text(X, Y + HEIGHT * 0.1, 'descriptions go here', TEXT.NORMAL);
|
// Default item text
|
||||||
|
let title = item;
|
||||||
|
let description = 'Description missing';
|
||||||
|
let upgrades = '';
|
||||||
|
|
||||||
|
// Replace item text with constants if it exists
|
||||||
|
if (SKILLS[item]) {
|
||||||
|
title = `Skill Item - ${item}`;
|
||||||
|
({ description } = SKILLS[item]);
|
||||||
|
if (SKILLS[item].upgrades) ({ upgrades } = SKILLS[item]);
|
||||||
|
} else if (SPECS[item]) {
|
||||||
|
title = `Spec Item - ${item}`;
|
||||||
|
({ description } = SPECS[item]);
|
||||||
|
if (SPECS[item].upgrades) ({ upgrades } = SPECS[item]);
|
||||||
|
} else if (COLOURS[item]) {
|
||||||
|
title = `Colour Item - ${item}`;
|
||||||
|
({ description } = COLOURS[item]);
|
||||||
|
if (COLOURS[item].upgrades) ({ upgrades } = COLOURS[item]);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add text objects
|
||||||
|
this.add.text(X, Y, title, TEXT.HEADER);
|
||||||
|
this.add
|
||||||
|
.text(X, Y + HEIGHT * 0.1, description, TEXT.NORMAL)
|
||||||
|
.setWordWrapWidth(WIDTH * 0.75);
|
||||||
|
this.add
|
||||||
|
.text(X, Y + HEIGHT * 0.25, upgrades, TEXT.NORMAL)
|
||||||
|
.setWordWrapWidth(WIDTH * 0.75);
|
||||||
|
|
||||||
if (!cryp) return true;
|
if (!cryp) return true;
|
||||||
const ws = this.registry.get('ws');
|
const ws = this.registry.get('ws');
|
||||||
const { vbox } = this.registry.get('player');
|
const { vbox } = this.registry.get('player');
|
||||||
|
|
||||||
const unEquip = this.add.rectangle(X, UNEQUIP_Y, UNEQUIP_WIDTH, UNEQUIP_HEIGHT, 0x222222)
|
const unEquip = this.add.rectangle(X, UNEQUIP_Y, UNEQUIP_WIDTH, UNEQUIP_HEIGHT, 0x222222)
|
||||||
.setOrigin(0, 0)
|
.setOrigin(0, 0)
|
||||||
.setInteractive()
|
.setInteractive()
|
||||||
|
|||||||
@ -54,17 +54,19 @@ class StatSheet extends Phaser.Scene {
|
|||||||
|
|
||||||
create(cryp) {
|
create(cryp) {
|
||||||
this.registry.events.on('changedata', this.updateData, this);
|
this.registry.events.on('changedata', this.updateData, this);
|
||||||
const ws = this.registry.get('ws');
|
// const ws = this.registry.get('ws');
|
||||||
|
|
||||||
const player = this.registry.get('player');
|
const player = this.registry.get('player');
|
||||||
if (!player) return false;
|
if (!player) return false;
|
||||||
const { vbox } = player;
|
// const { vbox } = player;
|
||||||
|
|
||||||
this.cryp = cryp;
|
this.cryp = cryp;
|
||||||
|
|
||||||
|
/*
|
||||||
const del = this.add.existing(new DeleteHitBox(this, X + WIDTH * 0.7, Y + HEIGHT * 0.6));
|
const del = this.add.existing(new DeleteHitBox(this, X + WIDTH * 0.7, Y + HEIGHT * 0.6));
|
||||||
this.add.text(del.getCenter().x, del.getCenter().y, 'unequip', TEXT.HEADER)
|
this.add.text(del.getCenter().x, del.getCenter().y, 'unequip', TEXT.HEADER)
|
||||||
.setOrigin(0.5, 0.5);
|
.setOrigin(0.5, 0.5);
|
||||||
|
*/
|
||||||
|
|
||||||
this.add.text(X, Y, cryp.name, TEXT.HEADER);
|
this.add.text(X, Y, cryp.name, TEXT.HEADER);
|
||||||
|
|
||||||
@ -85,6 +87,7 @@ class StatSheet extends Phaser.Scene {
|
|||||||
];
|
];
|
||||||
|
|
||||||
CRYP_STATS.forEach(crypStat);
|
CRYP_STATS.forEach(crypStat);
|
||||||
|
/*
|
||||||
const knownSkill = (skill, i) => {
|
const knownSkill = (skill, i) => {
|
||||||
const SKILL_X = X + WIDTH * 0.4 + WIDTH * 0.125 * i;
|
const SKILL_X = X + WIDTH * 0.4 + WIDTH * 0.125 * i;
|
||||||
const SKILL_Y = Y + HEIGHT * 0.15;
|
const SKILL_Y = Y + HEIGHT * 0.15;
|
||||||
@ -127,19 +130,10 @@ class StatSheet extends Phaser.Scene {
|
|||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
|
*/
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
displaySkillText(x, y, description, pointer) {
|
|
||||||
if (this.skillText) this.skillText.destroy();
|
|
||||||
this.skillText = this.add.text(x, y, description, TEXT.HOVER).setPadding(32);
|
|
||||||
this.skillText.setAlpha(0.8);
|
|
||||||
this.skillText.setOrigin(pointer.x >= WIDTH * 0.65 ? 1 : 0,
|
|
||||||
pointer.y >= HEIGHT * 0.25 ? 1 : 0);
|
|
||||||
this.skillText.setWordWrapWidth(450);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
cleanUp() {
|
cleanUp() {
|
||||||
this.registry.events.off('changedata', this.updateData, this);
|
this.registry.events.off('changedata', this.updateData, this);
|
||||||
this.scene.remove();
|
this.scene.remove();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user