fix ko cryps requiring a skill
This commit is contained in:
@@ -54,6 +54,7 @@ class CrypImage extends Phaser.GameObjects.Image {
|
||||
|
||||
class CrypSkill extends Phaser.GameObjects.Text {
|
||||
constructor(scene, row, iter, team, skill, cryp) {
|
||||
console.log(skill, cryp);
|
||||
// Avatar will be a property of cryp
|
||||
const {
|
||||
CRYP_MARGIN, TEXT_MARGIN, TEAM_MARGIN, X_PADDING, Y_PADDING,
|
||||
@@ -151,6 +152,10 @@ function renderSkills(scene, group, cryp, game, team, iter) {
|
||||
});
|
||||
} else if (game.phase === 'Target') {
|
||||
const blockSkill = game.stack.find(skill => skill.source_cryp_id === cryp.id);
|
||||
|
||||
// cryp not casting this turn
|
||||
if (!blockSkill) return false;
|
||||
|
||||
group.add(scene.add.existing(new CrypSkill(scene, 1, iter, team, blockSkill, cryp)));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user