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],
|
||||
},
|
||||
|
||||
ITEMS: {
|
||||
SKILLS: {
|
||||
LEARNABLE:
|
||||
[ { name: 'Amplify',
|
||||
description: 'increase the magic damage dealt by a cryp' },
|
||||
{ name: 'Attack',
|
||||
description: 'a fast attack with red damage' },
|
||||
{ name: 'Banish',
|
||||
description:
|
||||
'target cryp is prevented from casting any skills and taking any damage' },
|
||||
{ name: 'Blast',
|
||||
description: 'blast the target with magic damage' },
|
||||
{ name: 'Block',
|
||||
description: 'decreases incoming red damage for 1T' },
|
||||
{ name: 'Curse',
|
||||
description: 'target cryp takes increased magic damage' },
|
||||
{ name: 'Decay',
|
||||
description:
|
||||
'afflict a cryp with a blue damage based damage over time debuff' },
|
||||
{ name: 'Siphon',
|
||||
description: 'siphon hp from target cryp with a blue damage based debuff' },
|
||||
{ name: 'Empower',
|
||||
description: 'increase the red damage dealt by a cryp' },
|
||||
{ name: 'Haste',
|
||||
description: 'magical skill that increases speed of target cryp' },
|
||||
{ name: 'Heal', description: 'heal a cryp with blue damage' },
|
||||
{ name: 'Hex',
|
||||
description:
|
||||
'magical based skill that prevents target cryp from using any skills' },
|
||||
{ name: 'Parry',
|
||||
description: 'prevents all red damage for 1T' },
|
||||
{ name: 'Purge',
|
||||
description: 'remove magical buffs from target cryp' },
|
||||
{ name: 'Purify',
|
||||
description: 'remove magical debuffs from target cryp' },
|
||||
{ name: 'Shield',
|
||||
description: 'grants immunity to magical skills to target cryp' },
|
||||
{ name: 'Silence',
|
||||
description: 'prevent target cryp from casting magical skills' },
|
||||
{ name: 'Slow',
|
||||
description: 'magical skill that reduces speed of target cryp' },
|
||||
{ name: 'Snare',
|
||||
description: 'prevents red skills from being used for 2T' },
|
||||
{ name: 'Stun',
|
||||
description:
|
||||
'red skill that prevents target cryp from using any skills' },
|
||||
{ name: 'Throw',
|
||||
description: 'stuns and makes the target take increased red damage' },
|
||||
{ name: 'Triage',
|
||||
description: 'grants a blue damage based healing over time buff' }
|
||||
]
|
||||
Amplify: {
|
||||
description: 'increase the magic damage dealt by a cryp',
|
||||
colours: '2 Blue',
|
||||
},
|
||||
|
||||
Attack: {
|
||||
description: 'a fast attack with red damage',
|
||||
upgrades: 'combine with any combination of 2 red / blue / green - red + blue attack not implemented',
|
||||
},
|
||||
|
||||
Banish: {
|
||||
description: 'target cryp is prevented from casting any skills and taking any damage',
|
||||
},
|
||||
|
||||
Blast: {
|
||||
description: 'blast the target with magic damage',
|
||||
},
|
||||
|
||||
Block: {
|
||||
description: 'decreases incoming red damage for 1T',
|
||||
upgrades: 'combine with any combination of 2 red / blue / green',
|
||||
},
|
||||
|
||||
Buff: {
|
||||
description: 'increase target cryp speed',
|
||||
upgrades: 'combine with any combination of 2 red / blue / green',
|
||||
},
|
||||
|
||||
Clutch: {
|
||||
description: '??????',
|
||||
},
|
||||
|
||||
Curse: {
|
||||
description: 'target cryp takes increased magic damage',
|
||||
},
|
||||
|
||||
Debuff: {
|
||||
description: 'reduce target cryp speed',
|
||||
upgrades: 'combine with any combination of 2 red / blue / green',
|
||||
},
|
||||
|
||||
Decay: {
|
||||
description: 'afflict a cryp with a blue damage based damage over time debuff',
|
||||
},
|
||||
|
||||
Empower: {
|
||||
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() {
|
||||
const ranks = this.add
|
||||
/* const ranks = this.add
|
||||
.rectangle(X, Y, BTN_WIDTH, BTN_HEIGHT, 0x222222)
|
||||
.setInteractive()
|
||||
.setOrigin(0);
|
||||
@ -50,7 +50,7 @@ class HomeNavigation extends Phaser.Scene {
|
||||
this.add
|
||||
.text(instances.getCenter().x, instances.getCenter().y, 'Instances', TEXT.HEADER)
|
||||
.setOrigin(0.5, 0.5);
|
||||
instances.on('pointerdown', () => this.registry.set('homeInstances', true));
|
||||
instances.on('pointerdown', () => this.registry.set('homeInstances', true));*/
|
||||
}
|
||||
|
||||
cleanUp() {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
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 Y = MENU_MAIN.y();
|
||||
@ -18,12 +18,39 @@ class ItemInfo extends Phaser.Scene {
|
||||
create(props) {
|
||||
const { item, cryp } = props;
|
||||
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;
|
||||
const ws = this.registry.get('ws');
|
||||
const { vbox } = this.registry.get('player');
|
||||
|
||||
const unEquip = this.add.rectangle(X, UNEQUIP_Y, UNEQUIP_WIDTH, UNEQUIP_HEIGHT, 0x222222)
|
||||
.setOrigin(0, 0)
|
||||
.setInteractive()
|
||||
|
||||
@ -54,17 +54,19 @@ class StatSheet extends Phaser.Scene {
|
||||
|
||||
create(cryp) {
|
||||
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');
|
||||
if (!player) return false;
|
||||
const { vbox } = player;
|
||||
// const { vbox } = player;
|
||||
|
||||
this.cryp = cryp;
|
||||
|
||||
/*
|
||||
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)
|
||||
.setOrigin(0.5, 0.5);
|
||||
*/
|
||||
|
||||
this.add.text(X, Y, cryp.name, TEXT.HEADER);
|
||||
|
||||
@ -85,6 +87,7 @@ class StatSheet extends Phaser.Scene {
|
||||
];
|
||||
|
||||
CRYP_STATS.forEach(crypStat);
|
||||
/*
|
||||
const knownSkill = (skill, i) => {
|
||||
const SKILL_X = X + WIDTH * 0.4 + WIDTH * 0.125 * i;
|
||||
const SKILL_Y = Y + HEIGHT * 0.15;
|
||||
@ -127,19 +130,10 @@ class StatSheet extends Phaser.Scene {
|
||||
}
|
||||
return true;
|
||||
});
|
||||
*/
|
||||
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() {
|
||||
this.registry.events.off('changedata', this.updateData, this);
|
||||
this.scene.remove();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user