From efd57f19806d7dbef3c0aa74b726e31128c73af0 Mon Sep 17 00:00:00 2001 From: Joel Fernandes Date: Thu, 17 Aug 2023 13:44:02 +0530 Subject: [PATCH 1/3] qol(sword-slitter): Added a 1 second delay before the second sword slitter --- src/abilities/Bounty-Hunter.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/abilities/Bounty-Hunter.ts b/src/abilities/Bounty-Hunter.ts index 9db1130bf..39ec68f47 100644 --- a/src/abilities/Bounty-Hunter.ts +++ b/src/abilities/Bounty-Hunter.ts @@ -163,7 +163,11 @@ export default (G: Game) => { * make a second attack */ if (targetOriginalHealth - target.health >= target.health && this.isUpgraded()) { - target.takeDamage(damage); + // Added a delay for the second attack + setTimeout(() => { + G.Phaser.camera.shake(0.01, 150, true, G.Phaser.camera.SHAKE_HORIZONTAL, true); + target.takeDamage(damage); + }, 1000); } }, }, From fa6fc2e00ecc46cfc88ff7a917af6c78c7a48b7e Mon Sep 17 00:00:00 2001 From: Joel Fernandes Date: Thu, 17 Aug 2023 21:45:48 +0530 Subject: [PATCH 2/3] qol(sword-slitter): Added custom game log for the second sword slitter --- src/abilities/Bounty-Hunter.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/abilities/Bounty-Hunter.ts b/src/abilities/Bounty-Hunter.ts index 39ec68f47..b77d2ad45 100644 --- a/src/abilities/Bounty-Hunter.ts +++ b/src/abilities/Bounty-Hunter.ts @@ -146,8 +146,6 @@ export default (G: Game) => { const targetOriginalHealth = target.health; const ability = this; - ability.end(); - G.Phaser.camera.shake(0.01, 150, true, G.Phaser.camera.SHAKE_HORIZONTAL, true); const damage = new Damage( ability.creature, // Attacker @@ -157,18 +155,21 @@ export default (G: Game) => { G, ); target.takeDamage(damage); + G.Phaser.camera.shake(0.01, 150, true, G.Phaser.camera.SHAKE_HORIZONTAL, true); /** damage dealt is original health - current health * if current health is lower than damage dealt, * and the ability is upgraded, * make a second attack */ if (targetOriginalHealth - target.health >= target.health && this.isUpgraded()) { - // Added a delay for the second attack + // Added a delay for the second attack with a custom game log setTimeout(() => { G.Phaser.camera.shake(0.01, 150, true, G.Phaser.camera.SHAKE_HORIZONTAL, true); target.takeDamage(damage); + ability.end(true); + G.log('%CreatureName' + ability.creature.id + '% used ' + ability.title + ' twice'); }, 1000); - } + } else ability.end(); }, }, From 58ca637f2377ebf3ab4c97e73296cee1c02eb11e Mon Sep 17 00:00:00 2001 From: Joel Fernandes Date: Thu, 2 Nov 2023 14:41:54 +0530 Subject: [PATCH 3/3] qol(sword-slitter): Fixed the cancelled tooltip showing up --- src/abilities/Bounty-Hunter.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/abilities/Bounty-Hunter.ts b/src/abilities/Bounty-Hunter.ts index b77d2ad45..21e877df8 100644 --- a/src/abilities/Bounty-Hunter.ts +++ b/src/abilities/Bounty-Hunter.ts @@ -154,7 +154,7 @@ export default (G: Game) => { [], // Effects G, ); - target.takeDamage(damage); + ability.end(); G.Phaser.camera.shake(0.01, 150, true, G.Phaser.camera.SHAKE_HORIZONTAL, true); /** damage dealt is original health - current health * if current health is lower than damage dealt, @@ -165,11 +165,11 @@ export default (G: Game) => { // Added a delay for the second attack with a custom game log setTimeout(() => { G.Phaser.camera.shake(0.01, 150, true, G.Phaser.camera.SHAKE_HORIZONTAL, true); - target.takeDamage(damage); ability.end(true); + target.takeDamage(damage); G.log('%CreatureName' + ability.creature.id + '% used ' + ability.title + ' twice'); }, 1000); - } else ability.end(); + } else target.takeDamage(damage); }, },