From b46454ba940dea4434e7d729d6f5ce729938ce6d Mon Sep 17 00:00:00 2001
From: Joywin2412 <joywinpinto1@gmail.com>
Date: Sat, 10 Aug 2024 23:17:19 +0530
Subject: [PATCH 1/9] Added cancel icon and fixed the temporary display

---
 .../autoload/phaser/interface/cancel_icon.png | Bin 0 -> 7601 bytes
 src/creature.ts                               |  62 ++++++++++++++++--
 2 files changed, 55 insertions(+), 7 deletions(-)
 create mode 100644 assets/autoload/phaser/interface/cancel_icon.png

diff --git a/assets/autoload/phaser/interface/cancel_icon.png b/assets/autoload/phaser/interface/cancel_icon.png
new file mode 100644
index 0000000000000000000000000000000000000000..344ea537727650c916d54a4750c9d9ad641c9cc1
GIT binary patch
literal 7601
zcmXY0WmHt(*S;V~m!u#dNH@{~qV(_sq=uFb>Fyd3Bn?736daJD2k90BY3UBBp%E!b
z-{XJ1AMVUr6L+0^_TEpOSS?Kz5<+@H2!cpps){<`J@wy(e;d5YV0o;7Hv)H6BQFTT
z(fxN}VOQ)U!H0Lfl?=Ug-R!*mEIn-@KR-VK2UjOAYfE=q0XI+ktbG}J2x5E;Q+%rD
zpS_n8<V^){J!orjIzY`%z#s+upV#ErxA7~q&F~`e8|`pzKgFUxWNHyIW5iU-P-q|e
z<Bf=|+;YD?BJ%JNsTuC=dy2QC?Xd^oHvR;$@18EQAb#)eqqfWUL;kAH{&bYrS(w;T
z+dMFCQ=(a@VQ#zLYVq4E!h@cwaZ8m_>2b3wa#!l8#pqZdQ^=9+YTPVp;qP_i6_axy
z+CHKWVh9?D3NoH(d&m<Oqx^mgQiqC4_}(RSHNvNO4F{oP=*Mev&*VafkSKCSjWK6e
zqf~4Ng?c5bK~#d`;X<<V^J_qeVa$<X>iXg3HPe`Au_YZ9L}%T|*KaS&G;EnSTu1bT
z8<E6w#Lk)3n~XQ5;+0Nhao^hcGhct_RcKhyP{RcBzcj7T(AMm<G?gart%y{96IM=6
zJbsf}989w&79KWMN?KY$em?g4`Z^acZ)a=BrM!8_34HU{&(1ho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m((>sLDZ!~#V%^y
zo#2j6%NvjOJy_)D(8#1pVdF04>QjRx8a~{kXEfAiD0Z0ri%c;lllk@J1=yrsfiM+n
z(&%rQVoqI^mYu}%F(8`qtlx2|7>S^+=>RDCj;(iluCC%=r&8=xsk#1$rR40&mhxf+
z`P{gz(W$l?=GNviww$@2g;E(c%bFAju!XzjDLK@IfUV%i4u66+Dux3&LhaUiUPvco
z@uVFjARv^E>VtXJkuXk+OC&T)vy&mh6RPm=S<diTn*SwZf6ANobqEOwK~4~DQ$&`i
ziW79U|IPgGg~8SNaM<M8?hF9AKv8o1E39@E=q6)V^bxWfXL5oSx=k*x?35|Kh&l3c
zoIxXnJ=avl{eM}^R+!5j@6J%h<+F)W0Mp+NptjNrqv^cZJTqVG!Z6~K0|2iRb5w@&
ziyQHhKtnNU+_2-~BN`%p&*p%GxmxmmK8*Y1k?-z{we@uvh|$%6W=Kp<ehH*1i?lQY
z2oCSB&6X3~ekmDr$_E-TO2mF>d2^%y^f4tK={+H}|NaB#T^(T0`q9l(m?IaclDeH%
zb!E*xWGfJBC)x`7jVfipG~*#fCFqFl@LqOs$m5ei-_gz<L!BU<zZ3EU&G+Xz6gK5U
zAFGHDf#4ma(#>ozPU6mKX2K}ak7$nBTgxw6FhjVFW*v>GTs*^DjuCx~U++!?b2cVy
z+(EcunU>a#i~awh<Wq1cnS#xWjO4=AS0fntd+QZEB8X*%{0=y7g<wjWiskYa5&sAO
C;@g@4

literal 0
HcmV?d00001

diff --git a/src/creature.ts b/src/creature.ts
index 241a50c83..eb226088d 100644
--- a/src/creature.ts
+++ b/src/creature.ts
@@ -687,17 +687,15 @@ export class Creature {
 			},
 			// overwrite any fields of `defaultOptions` that were provided in `options`
 			o = $j.extend(defaultOptions, options);
-
-		if (!o.isAbility) {
-			if (game.UI.selectedAbility != -1) {
-				this.hint('Canceled', 'gamehintblack');
-			}
-
+			if (!o.isAbility) {
+				if (game.UI.selectedAbility !== -1) {
+					this.hint('Canceled', 'gamehintblack');
+				}
 			$j('#abilities .ability').removeClass('active');
 			game.UI.selectAbility(-1);
 			game.UI.updateQueueDisplay();
 		}
-
+		
 		game.grid.orderCreatureZ();
 		this.facePlayerDefault();
 		this.updateHealth();
@@ -2048,7 +2046,57 @@ class CreatureSprite {
 		hint.data.hintType = hintType;
 		hint.data.tweenAlpha = null;
 		hint.data.tweenPos = null;
+		let visited = 0
+		if(hintType === 'gamehintblack')
+		{
+			const frame = this._phaser.add.sprite(0, 50, 'frame');
+			const frameBackground = this._phaser.make.bitmapData(frame.width, frame.height);
+			frameBackground.ctx.fillStyle = 'rgba(0, 0, 0, 0.55)';
+			frameBackground.ctx.fillRect(0, 0, frameBackground.width, frameBackground.height);
+			frameBackground.draw('frame', 0, 0);
+
+			const combinedSprite = this._phaser.add.sprite(0, 50, frameBackground);
+			combinedSprite.anchor.setTo(0.5, 0.175);
+			combinedSprite.setScaleMinMax(0.75, 0.75, 0.75, 0.75);
+			combinedSprite.alpha = 0;
+			combinedSprite.data = {
+				hintType: hintType,
+				tweenAlpha: null,
+				tweenPos: null
+			};
+
+			this._hintGrp.add(combinedSprite);
+
+			combinedSprite.data.tweenAlpha = this._phaser.add.tween(combinedSprite)
+				.to({ alpha: 1 }, tooltipSpeed, tooltipTransition)
+				.to({ alpha: 0 }, tooltipSpeed, tooltipTransition, false, tooltipDisplaySpeed)
+				.start();
+
+			combinedSprite.data.tweenAlpha.onComplete.add(() => combinedSprite.destroy());
+
+			const cancelIcon = this._phaser.add.sprite(0, 50, 'cancel_icon');
+			cancelIcon.anchor.setTo(0.5, 0.7); // Give a bit more vertical space
+			cancelIcon.setScaleMinMax(0.63, 0.63, 0.63, 0.63);
+			cancelIcon.alpha = 0;
+			cancelIcon.data = {
+				hintType: hintType,
+				tweenAlpha: null,
+				tweenPos: null
+			};
+
+			this._hintGrp.add(cancelIcon);
+
+			// Create a fade-in tween for the skip turn icon
+			cancelIcon.data.tweenAlpha = this._phaser.add.tween(cancelIcon)
+				.to({ alpha: 1 }, tooltipSpeed, tooltipTransition)
+				.to({ alpha: 0 }, tooltipSpeed, tooltipTransition, false, tooltipDisplaySpeed)
+				.start();
+
+			cancelIcon.data.tweenAlpha.onComplete.add(() => cancelIcon.destroy());
+
+		}
 
+		
 		if (hintType === 'confirm' || hintType === 'no_action') {
 			hint.data.tweenAlpha = this._phaser.add
 				.tween(hint)

From e42393aca6bf02a86bec5468b7460a61b3585ea1 Mon Sep 17 00:00:00 2001
From: Joywin2412 <joywinpinto1@gmail.com>
Date: Sat, 10 Aug 2024 23:26:43 +0530
Subject: [PATCH 2/9] PR cleanup

---
 src/creature.ts | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/creature.ts b/src/creature.ts
index d57419888..0f02c3822 100644
--- a/src/creature.ts
+++ b/src/creature.ts
@@ -687,6 +687,7 @@ export class Creature {
 			},
 			// overwrite any fields of `defaultOptions` that were provided in `options`
 			o = $j.extend(defaultOptions, options);
+			
 			if (!o.isAbility) {
 				if (game.UI.selectedAbility !== -1) {
 					this.hint('Canceled', 'gamehintblack');

From 89d0010d70ca0d0a8f8c2673da43dfa8a3d8f764 Mon Sep 17 00:00:00 2001
From: Joywin2412 <joywinpinto1@gmail.com>
Date: Mon, 12 Aug 2024 12:41:48 +0530
Subject: [PATCH 3/9] Fixed the issue

---
 src/creature.ts       | 75 ++++++++++++++-----------------------------
 src/ui/interface.js   | 63 +++++++++++++++++++++++++++++++++---
 src/ui/meta-powers.js |  1 +
 webpack.config.js     |  2 +-
 4 files changed, 84 insertions(+), 57 deletions(-)

diff --git a/src/creature.ts b/src/creature.ts
index 0f02c3822..d66df9a82 100644
--- a/src/creature.ts
+++ b/src/creature.ts
@@ -12,7 +12,10 @@ import { Damage } from './damage';
 import { AugmentedMatrix } from './utility/matrices';
 import { HEX_WIDTH_PX, hashOffsetCoords, offsetCoordsToPx, offsetNeighbors } from './utility/const';
 import { CreatureType, Level, Realm, Unit, UnitName } from './data/types';
+// Joywin
 import { UnitDisplayInfo, UnitSize } from './data/units';
+import { UI } from './ui/interface';
+import { getUrl } from './assets';
 
 // to fix @ts-expect-error 2554: properly type the arguments for the trigger functions in `game.ts`
 
@@ -251,7 +254,6 @@ export class Creature {
 			// Extra energy required for abilities
 			reqEnergy: 0,
 		};
-
 		this.stats = {
 			...this.baseStats,
 
@@ -687,12 +689,26 @@ export class Creature {
 			},
 			// overwrite any fields of `defaultOptions` that were provided in `options`
 			o = $j.extend(defaultOptions, options);
-			
+
 			if (!o.isAbility) {
 				if (game.UI.selectedAbility !== -1) {
 					this.hint('Canceled', 'gamehintblack');
 				}
 			$j('#abilities .ability').removeClass('active');
+			let abilitiesButtons = $j('#abilities .ability');
+console.log(abilitiesButtons); // Logs the jQuery object containing the elements
+
+abilitiesButtons.each(function(index, element) {
+
+    // $j(this).css('background-image', 'none !important');
+	$j(this).css('color', 'green');
+	$j(this).css('cursor', 'help');
+
+	console.log(this); // Logs the individual element
+
+
+    $j(this).css('background-image', `icons/cancel.svg`);
+});
 			game.UI.selectAbility(-1);
 			game.UI.updateQueueDisplay();
 		}
@@ -1777,6 +1793,7 @@ class CreatureSprite {
 		this._phaser = phaser;
 		this._creatureSize = size;
 		this._creatureTeam = team;
+		// Joywin
 		this._frameInfo = { originX: display['offset-x'], originY: display['offset-y'] };
 
 		const group: Phaser.Group = phaser.add.group(game.grid.creatureGroup, 'creatureGrp_' + id);
@@ -2047,57 +2064,13 @@ class CreatureSprite {
 		hint.data.hintType = hintType;
 		hint.data.tweenAlpha = null;
 		hint.data.tweenPos = null;
-		let visited = 0
-		if(hintType === 'gamehintblack')
+		
+		const $abilitiesButtons = $j('#abilities .ability');
+		// Joywin
+		if(hintType ==='gamehintblack')
 		{
-			const frame = this._phaser.add.sprite(0, 50, 'frame');
-			const frameBackground = this._phaser.make.bitmapData(frame.width, frame.height);
-			frameBackground.ctx.fillStyle = 'rgba(0, 0, 0, 0.55)';
-			frameBackground.ctx.fillRect(0, 0, frameBackground.width, frameBackground.height);
-			frameBackground.draw('frame', 0, 0);
-
-			const combinedSprite = this._phaser.add.sprite(0, 50, frameBackground);
-			combinedSprite.anchor.setTo(0.5, 0.175);
-			combinedSprite.setScaleMinMax(0.75, 0.75, 0.75, 0.75);
-			combinedSprite.alpha = 0;
-			combinedSprite.data = {
-				hintType: hintType,
-				tweenAlpha: null,
-				tweenPos: null
-			};
-
-			this._hintGrp.add(combinedSprite);
-
-			combinedSprite.data.tweenAlpha = this._phaser.add.tween(combinedSprite)
-				.to({ alpha: 1 }, tooltipSpeed, tooltipTransition)
-				.to({ alpha: 0 }, tooltipSpeed, tooltipTransition, false, tooltipDisplaySpeed)
-				.start();
-
-			combinedSprite.data.tweenAlpha.onComplete.add(() => combinedSprite.destroy());
-
-			const cancelIcon = this._phaser.add.sprite(0, 50, 'cancel_icon');
-			cancelIcon.anchor.setTo(0.5, 0.7); // Give a bit more vertical space
-			cancelIcon.setScaleMinMax(0.63, 0.63, 0.63, 0.63);
-			cancelIcon.alpha = 0;
-			cancelIcon.data = {
-				hintType: hintType,
-				tweenAlpha: null,
-				tweenPos: null
-			};
-
-			this._hintGrp.add(cancelIcon);
-
-			// Create a fade-in tween for the skip turn icon
-			cancelIcon.data.tweenAlpha = this._phaser.add.tween(cancelIcon)
-				.to({ alpha: 1 }, tooltipSpeed, tooltipTransition)
-				.to({ alpha: 0 }, tooltipSpeed, tooltipTransition, false, tooltipDisplaySpeed)
-				.start();
-
-			cancelIcon.data.tweenAlpha.onComplete.add(() => cancelIcon.destroy());
-
+			
 		}
-
-		
 		if (hintType === 'confirm' || hintType === 'no_action') {
 			hint.data.tweenAlpha = this._phaser.add
 				.tween(hint)
diff --git a/src/ui/interface.js b/src/ui/interface.js
index 53d824ede..9ef70fba4 100644
--- a/src/ui/interface.js
+++ b/src/ui/interface.js
@@ -270,12 +270,16 @@ export class UI {
 					$button: $j('.ability[ability="' + i + '"]'),
 					hasShortcut: true,
 					click: () => {
+						if(this.clickedAbility === -1)
+						{
+						this.clickedAbility = i;
+						}
+						console.log("Click happened",i)
 						const game = this.game;
 						if (this.selectedAbility != i) {
 							if (this.dashopen) {
 								return false;
 							}
-
 							const ability = game.activeCreature.abilities[i];
 							// Passive ability icon can cycle between usable abilities
 							if (i == 0) {
@@ -287,6 +291,7 @@ export class UI {
 							}
 							// Colored frame around selected ability
 							if (ability.require() == true && i != 0) {
+								// Joywin2
 								this.selectAbility(i);
 							}
 							// Activate Ability
@@ -575,6 +580,7 @@ export class UI {
 		this.selectedCreature = '';
 		this.selectedPlayer = 0;
 		this.selectedAbility = -1;
+		this.clickedAbility = -1;
 
 		this.queueAnimSpeed = 500; // ms
 		this.dashAnimSpeed = 250; // ms
@@ -630,7 +636,10 @@ export class UI {
 	 * @param {object} payload Event payload.
 	 */
 	_handleUiEvent(message, payload) {
+		// Joywin2
 		if (message === 'toggleDash') {
+			
+			console.log("Hi")
 			this.toggleDash();
 			this.closeMusicPlayer();
 			this.closeScoreboard();
@@ -1517,9 +1526,49 @@ export class UI {
 	 * @param{boolean} [randomize] - True selects a random creature from the grid.
 	 */
 	toggleDash(randomize) {
-		const game = this.game;
-
+		
+		const game = this.game,
+			creature = game.activeCreature;		
 		if (this.$dash.hasClass('active')) {
+// 			let abilitiesButtons = $j('#abilities .ability');
+// console.log(abilitiesButtons); // Logs the jQuery object containing the elements
+
+// Capture the context of 'this'
+const self = this;
+// Joywin
+self.abilitiesButtons.forEach((btn, index) => {
+    console.log(index);
+    console.log(self.clickedAbility);
+
+    if (self.clickedAbility === index) {
+        const getImage = btn.css.normal['background-image'];
+        const btnNow = btn;
+        
+        // Set the initial background image
+        btnNow.css.normal = {
+            'background-image': `url('${getUrl('icons/cancel')}')`
+        };
+
+        // Apply the initial background image to the button element
+        $j(btnNow).css('background-image', btnNow.css.normal['background-image']);
+        console.log($j(btnNow))
+        setTimeout(function() {
+            
+          console.log(btnNow)
+		  console.log(getImage);
+            $j(btnNow.$button).css('background-image', `url('${getUrl(
+					'units/abilities/' + creature.name + ' ' + btn.abilityId,
+				)}')`);
+            console.log($j(btnNow))
+            console.log("Background image updated");
+        }, 1000);
+        
+        // Reset the clickedAbility property
+        self.clickedAbility = -1;
+    }
+});
+
+
 			this.closeDash();
 			return;
 		}
@@ -1778,15 +1827,19 @@ export class UI {
 	/**
 	 * Change ability buttons and bind events
 	 */
-	changeAbilityButtons() {
+	changeAbilityButtons(intent = 'ok') {
+
+
 		const game = this.game,
 			creature = game.activeCreature;
 		this.abilitiesButtons.forEach((btn) => {
 			const ab = creature.abilities[btn.abilityId];
+			// Joywin
 			btn.css.normal = {
-				'background-image': `url('${getUrl(
+			'background-image': `url('${getUrl(
 					'units/abilities/' + creature.name + ' ' + btn.abilityId,
 				)}')`,
+		
 			};
 			const $desc = btn.$button.next('.desc');
 			$desc.find('span.title').text(ab.title);
diff --git a/src/ui/meta-powers.js b/src/ui/meta-powers.js
index d7cb5117d..2642009f2 100644
--- a/src/ui/meta-powers.js
+++ b/src/ui/meta-powers.js
@@ -83,6 +83,7 @@ export class MetaPowers {
 			{
 				$button: this.$els.closeModal,
 				click: () => this._toggleModal(),
+				// Joywin
 			},
 			this.game,
 		);
diff --git a/webpack.config.js b/webpack.config.js
index 201105765..612694c5c 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -146,7 +146,7 @@ module.exports = (env, argv) => {
 		},
 		devServer: {
 			static: process.env.PUBLIC_PATH ? process.env.PUBLIC_PATH : './',
-			port: 8080,
+			port: 8090,
 			proxy: {
 				'/api': '159.65.232.104:7350',
 			},

From 6e0727f658d134a498b85a4fe0061867a9e96f4d Mon Sep 17 00:00:00 2001
From: Joywin2412 <joywinpinto1@gmail.com>
Date: Mon, 12 Aug 2024 15:32:39 +0530
Subject: [PATCH 4/9] Port issue maybe

---
 webpack.config.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/webpack.config.js b/webpack.config.js
index 612694c5c..201105765 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -146,7 +146,7 @@ module.exports = (env, argv) => {
 		},
 		devServer: {
 			static: process.env.PUBLIC_PATH ? process.env.PUBLIC_PATH : './',
-			port: 8090,
+			port: 8080,
 			proxy: {
 				'/api': '159.65.232.104:7350',
 			},

From 57ebed12972c1e1ee26fc24a44b34f1402d6e8df Mon Sep 17 00:00:00 2001
From: Joywin2412 <joywinpinto1@gmail.com>
Date: Mon, 12 Aug 2024 15:58:32 +0530
Subject: [PATCH 5/9] Pr cleanup

---
 .../autoload/phaser/interface/cancel_icon.png | Bin 7601 -> 0 bytes
 src/creature.ts                               |  40 ++------
 src/ui/interface.js                           |  95 ++++++++----------
 src/ui/meta-powers.js                         |   1 -
 webpack.config.js                             |   2 +-
 5 files changed, 50 insertions(+), 88 deletions(-)
 delete mode 100644 assets/autoload/phaser/interface/cancel_icon.png

diff --git a/assets/autoload/phaser/interface/cancel_icon.png b/assets/autoload/phaser/interface/cancel_icon.png
deleted file mode 100644
index 344ea537727650c916d54a4750c9d9ad641c9cc1..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 7601
zcmXY0WmHt(*S;V~m!u#dNH@{~qV(_sq=uFb>Fyd3Bn?736daJD2k90BY3UBBp%E!b
z-{XJ1AMVUr6L+0^_TEpOSS?Kz5<+@H2!cpps){<`J@wy(e;d5YV0o;7Hv)H6BQFTT
z(fxN}VOQ)U!H0Lfl?=Ug-R!*mEIn-@KR-VK2UjOAYfE=q0XI+ktbG}J2x5E;Q+%rD
zpS_n8<V^){J!orjIzY`%z#s+upV#ErxA7~q&F~`e8|`pzKgFUxWNHyIW5iU-P-q|e
z<Bf=|+;YD?BJ%JNsTuC=dy2QC?Xd^oHvR;$@18EQAb#)eqqfWUL;kAH{&bYrS(w;T
z+dMFCQ=(a@VQ#zLYVq4E!h@cwaZ8m_>2b3wa#!l8#pqZdQ^=9+YTPVp;qP_i6_axy
z+CHKWVh9?D3NoH(d&m<Oqx^mgQiqC4_}(RSHNvNO4F{oP=*Mev&*VafkSKCSjWK6e
zqf~4Ng?c5bK~#d`;X<<V^J_qeVa$<X>iXg3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{lhgDN_&st@L>!Fv!khQB_UpBSS1fO
zS`CxUEWanA_^JIOT+BM51%_W$sGf00CiKc5-7m5=+Y(eq_s}M$gYJk@p77`Xszh=w
zVwNw@t2JDhh6g}Qp0uC9%(}?|4?jP(--1sX_`i)&DD9IsM19DPm((>sLDZ!~#V%^y
zo#2j6%NvjOJy_)D(8#1pVdF04>QjRx8a~{kXEfAiD0Z0ri%c;lllk@J1=yrsfiM+n
z(&%rQVoqI^mYu}%F(8`qtlx2|7>S^+=>RDCj;(iluCC%=r&8=xsk#1$rR40&mhxf+
z`P{gz(W$l?=GNviww$@2g;E(c%bFAju!XzjDLK@IfUV%i4u66+Dux3&LhaUiUPvco
z@uVFjARv^E>VtXJkuXk+OC&T)vy&mh6RPm=S<diTn*SwZf6ANobqEOwK~4~DQ$&`i
ziW79U|IPgGg~8SNaM<M8?hF9AKv8o1E39@E=q6)V^bxWfXL5oSx=k*x?35|Kh&l3c
zoIxXnJ=avl{eM}^R+!5j@6J%h<+F)W0Mp+NptjNrqv^cZJTqVG!Z6~K0|2iRb5w@&
ziyQHhKtnNU+_2-~BN`%p&*p%GxmxmmK8*Y1k?-z{we@uvh|$%6W=Kp<ehH*1i?lQY
z2oCSB&6X3~ekmDr$_E-TO2mF>d2^%y^f4tK={+H}|NaB#T^(T0`q9l(m?IaclDeH%
zb!E*xWGfJBC)x`7jVfipG~*#fCFqFl@LqOs$m5ei-_gz<L!BU<zZ3EU&G+Xz6gK5U
zAFGHDf#4ma(#>ozPU6mKX2K}ak7$nBTgxw6FhjVFW*v>GTs*^DjuCx~U++!?b2cVy
z+(EcunU>a#i~awh<Wq1cnS#xWjO4=AS0fntd+QZEB8X*%{0=y7g<wjWiskYa5&sAO
C;@g@4

diff --git a/src/creature.ts b/src/creature.ts
index d66df9a82..241a50c83 100644
--- a/src/creature.ts
+++ b/src/creature.ts
@@ -12,10 +12,7 @@ import { Damage } from './damage';
 import { AugmentedMatrix } from './utility/matrices';
 import { HEX_WIDTH_PX, hashOffsetCoords, offsetCoordsToPx, offsetNeighbors } from './utility/const';
 import { CreatureType, Level, Realm, Unit, UnitName } from './data/types';
-// Joywin
 import { UnitDisplayInfo, UnitSize } from './data/units';
-import { UI } from './ui/interface';
-import { getUrl } from './assets';
 
 // to fix @ts-expect-error 2554: properly type the arguments for the trigger functions in `game.ts`
 
@@ -254,6 +251,7 @@ export class Creature {
 			// Extra energy required for abilities
 			reqEnergy: 0,
 		};
+
 		this.stats = {
 			...this.baseStats,
 
@@ -690,29 +688,16 @@ export class Creature {
 			// overwrite any fields of `defaultOptions` that were provided in `options`
 			o = $j.extend(defaultOptions, options);
 
-			if (!o.isAbility) {
-				if (game.UI.selectedAbility !== -1) {
-					this.hint('Canceled', 'gamehintblack');
-				}
-			$j('#abilities .ability').removeClass('active');
-			let abilitiesButtons = $j('#abilities .ability');
-console.log(abilitiesButtons); // Logs the jQuery object containing the elements
-
-abilitiesButtons.each(function(index, element) {
-
-    // $j(this).css('background-image', 'none !important');
-	$j(this).css('color', 'green');
-	$j(this).css('cursor', 'help');
-
-	console.log(this); // Logs the individual element
-
+		if (!o.isAbility) {
+			if (game.UI.selectedAbility != -1) {
+				this.hint('Canceled', 'gamehintblack');
+			}
 
-    $j(this).css('background-image', `icons/cancel.svg`);
-});
+			$j('#abilities .ability').removeClass('active');
 			game.UI.selectAbility(-1);
 			game.UI.updateQueueDisplay();
 		}
-		
+
 		game.grid.orderCreatureZ();
 		this.facePlayerDefault();
 		this.updateHealth();
@@ -1793,7 +1778,6 @@ class CreatureSprite {
 		this._phaser = phaser;
 		this._creatureSize = size;
 		this._creatureTeam = team;
-		// Joywin
 		this._frameInfo = { originX: display['offset-x'], originY: display['offset-y'] };
 
 		const group: Phaser.Group = phaser.add.group(game.grid.creatureGroup, 'creatureGrp_' + id);
@@ -2064,13 +2048,7 @@ class CreatureSprite {
 		hint.data.hintType = hintType;
 		hint.data.tweenAlpha = null;
 		hint.data.tweenPos = null;
-		
-		const $abilitiesButtons = $j('#abilities .ability');
-		// Joywin
-		if(hintType ==='gamehintblack')
-		{
-			
-		}
+
 		if (hintType === 'confirm' || hintType === 'no_action') {
 			hint.data.tweenAlpha = this._phaser.add
 				.tween(hint)
@@ -2157,4 +2135,4 @@ export type CreatureHintType =
 	| 'creature_name'
 	| 'no_action';
 
-type HealthBubbleType = 'plasma' | 'frozen' | 'health';
+type HealthBubbleType = 'plasma' | 'frozen' | 'health';
\ No newline at end of file
diff --git a/src/ui/interface.js b/src/ui/interface.js
index 9ef70fba4..e37cc1e31 100644
--- a/src/ui/interface.js
+++ b/src/ui/interface.js
@@ -272,14 +272,14 @@ export class UI {
 					click: () => {
 						if(this.clickedAbility === -1)
 						{
-						this.clickedAbility = i;
+							this.clickedAbility = i;
 						}
-						console.log("Click happened",i)
 						const game = this.game;
 						if (this.selectedAbility != i) {
 							if (this.dashopen) {
 								return false;
 							}
+
 							const ability = game.activeCreature.abilities[i];
 							// Passive ability icon can cycle between usable abilities
 							if (i == 0) {
@@ -291,7 +291,6 @@ export class UI {
 							}
 							// Colored frame around selected ability
 							if (ability.require() == true && i != 0) {
-								// Joywin2
 								this.selectAbility(i);
 							}
 							// Activate Ability
@@ -581,7 +580,6 @@ export class UI {
 		this.selectedPlayer = 0;
 		this.selectedAbility = -1;
 		this.clickedAbility = -1;
-
 		this.queueAnimSpeed = 500; // ms
 		this.dashAnimSpeed = 250; // ms
 
@@ -636,10 +634,7 @@ export class UI {
 	 * @param {object} payload Event payload.
 	 */
 	_handleUiEvent(message, payload) {
-		// Joywin2
 		if (message === 'toggleDash') {
-			
-			console.log("Hi")
 			this.toggleDash();
 			this.closeMusicPlayer();
 			this.closeScoreboard();
@@ -1526,49 +1521,43 @@ export class UI {
 	 * @param{boolean} [randomize] - True selects a random creature from the grid.
 	 */
 	toggleDash(randomize) {
-		
 		const game = this.game,
-			creature = game.activeCreature;		
-		if (this.$dash.hasClass('active')) {
-// 			let abilitiesButtons = $j('#abilities .ability');
-// console.log(abilitiesButtons); // Logs the jQuery object containing the elements
-
-// Capture the context of 'this'
-const self = this;
-// Joywin
-self.abilitiesButtons.forEach((btn, index) => {
-    console.log(index);
-    console.log(self.clickedAbility);
-
-    if (self.clickedAbility === index) {
-        const getImage = btn.css.normal['background-image'];
-        const btnNow = btn;
-        
-        // Set the initial background image
-        btnNow.css.normal = {
-            'background-image': `url('${getUrl('icons/cancel')}')`
-        };
-
-        // Apply the initial background image to the button element
-        $j(btnNow).css('background-image', btnNow.css.normal['background-image']);
-        console.log($j(btnNow))
-        setTimeout(function() {
-            
-          console.log(btnNow)
-		  console.log(getImage);
-            $j(btnNow.$button).css('background-image', `url('${getUrl(
-					'units/abilities/' + creature.name + ' ' + btn.abilityId,
-				)}')`);
-            console.log($j(btnNow))
-            console.log("Background image updated");
-        }, 1000);
-        
-        // Reset the clickedAbility property
-        self.clickedAbility = -1;
-    }
-});
-
+			creature = game.activeCreature;
 
+		if (this.$dash.hasClass('active')) {
+            const self = this;
+        	self.abilitiesButtons.forEach((btn, index) => {
+            console.log(index);
+            console.log(self.clickedAbility);
+
+            if (self.clickedAbility === index) {
+				console.log("Clicked ability found");
+                const getImage = btn.css.normal['background-image'];
+                const btnNow = btn;
+                
+                // Set the initial background image
+                btnNow.css.normal = {
+                    'background-image': `url('${getUrl('icons/cancel')}')`
+                };
+
+                // Apply the initial background image to the button element
+                $j(btnNow).css('background-image', btnNow.css.normal['background-image']);
+                console.log($j(btnNow))
+                setTimeout(function() {
+                    
+                console.log(btnNow)
+                console.log(getImage);
+                    $j(btnNow.$button).css('background-image', `url('${getUrl(
+                            'units/abilities/' + creature.name + ' ' + index,
+                        )}')`);
+                    console.log($j(btnNow))
+                    console.log("Background image updated");
+                }, 1000);
+                
+                // Reset the clickedAbility property
+                self.clickedAbility = -1;
+            }
+        });
 			this.closeDash();
 			return;
 		}
@@ -1827,19 +1816,15 @@ self.abilitiesButtons.forEach((btn, index) => {
 	/**
 	 * Change ability buttons and bind events
 	 */
-	changeAbilityButtons(intent = 'ok') {
-
-
+	changeAbilityButtons() {
 		const game = this.game,
 			creature = game.activeCreature;
 		this.abilitiesButtons.forEach((btn) => {
 			const ab = creature.abilities[btn.abilityId];
-			// Joywin
 			btn.css.normal = {
-			'background-image': `url('${getUrl(
+				'background-image': `url('${getUrl(
 					'units/abilities/' + creature.name + ' ' + btn.abilityId,
 				)}')`,
-		
 			};
 			const $desc = btn.$button.next('.desc');
 			$desc.find('span.title').text(ab.title);
@@ -2522,4 +2507,4 @@ const utils = {
 			};
 		};
 	},
-};
+};
\ No newline at end of file
diff --git a/src/ui/meta-powers.js b/src/ui/meta-powers.js
index 2642009f2..d7cb5117d 100644
--- a/src/ui/meta-powers.js
+++ b/src/ui/meta-powers.js
@@ -83,7 +83,6 @@ export class MetaPowers {
 			{
 				$button: this.$els.closeModal,
 				click: () => this._toggleModal(),
-				// Joywin
 			},
 			this.game,
 		);
diff --git a/webpack.config.js b/webpack.config.js
index 201105765..612694c5c 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -146,7 +146,7 @@ module.exports = (env, argv) => {
 		},
 		devServer: {
 			static: process.env.PUBLIC_PATH ? process.env.PUBLIC_PATH : './',
-			port: 8080,
+			port: 8090,
 			proxy: {
 				'/api': '159.65.232.104:7350',
 			},

From 24d13e41b6ae3722b5c94924b412417cbbc7d2e8 Mon Sep 17 00:00:00 2001
From: Joywin2412 <joywinpinto1@gmail.com>
Date: Mon, 12 Aug 2024 16:00:08 +0530
Subject: [PATCH 6/9] Port issue maybe

---
 webpack.config.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/webpack.config.js b/webpack.config.js
index 612694c5c..201105765 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -146,7 +146,7 @@ module.exports = (env, argv) => {
 		},
 		devServer: {
 			static: process.env.PUBLIC_PATH ? process.env.PUBLIC_PATH : './',
-			port: 8090,
+			port: 8080,
 			proxy: {
 				'/api': '159.65.232.104:7350',
 			},

From 8f4370362a4a4f3c60acf4d04c96119a8c0eeb12 Mon Sep 17 00:00:00 2001
From: Joywin2412 <joywinpinto1@gmail.com>
Date: Mon, 12 Aug 2024 21:42:01 +0530
Subject: [PATCH 7/9] Working

---
 src/style/styles.less |  3 +++
 src/ui/interface.js   | 58 ++++++++++++++++---------------------------
 webpack.config.js     |  2 +-
 3 files changed, 25 insertions(+), 38 deletions(-)

diff --git a/src/style/styles.less b/src/style/styles.less
index 40f9ec51e..9e693917e 100644
--- a/src/style/styles.less
+++ b/src/style/styles.less
@@ -361,6 +361,9 @@
 	&.nextIcon {
 		background-image: url('~assets/icons/next.svg') !important;
 	}
+	&.cancelIcon {
+		background-image: url('~assets/icons/cancel.svg') !important;
+	}
 
 	&.upgraded.noclick:hover:before {
 		opacity: 1;
diff --git a/src/ui/interface.js b/src/ui/interface.js
index e37cc1e31..115c20209 100644
--- a/src/ui/interface.js
+++ b/src/ui/interface.js
@@ -270,10 +270,10 @@ export class UI {
 					$button: $j('.ability[ability="' + i + '"]'),
 					hasShortcut: true,
 					click: () => {
-						if(this.clickedAbility === -1)
-						{
+					
+						
 							this.clickedAbility = i;
-						}
+						
 						const game = this.game;
 						if (this.selectedAbility != i) {
 							if (this.dashopen) {
@@ -283,10 +283,26 @@ export class UI {
 							const ability = game.activeCreature.abilities[i];
 							// Passive ability icon can cycle between usable abilities
 							if (i == 0) {
+								// Joywin
 								const selectedAbility = this.selectNextAbility();
+								
 								if (selectedAbility > 0) {
 									b.cssTransition('nextIcon', 1000);
 								}
+								else if(selectedAbility === -1)
+								{
+									
+									const self = this;
+									self.abilitiesButtons.forEach((btn, index) => {
+									console.log(self.clickedAbility);
+									const creature = game.activeCreature;
+									if (self.clickedAbility === index) {
+										b.cssTransition('cancelIcon', 1000);
+										this.clickedAbility = -1;
+									}
+									});
+								}
+
 								return;
 							}
 							// Colored frame around selected ability
@@ -1524,40 +1540,8 @@ export class UI {
 		const game = this.game,
 			creature = game.activeCreature;
 
-		if (this.$dash.hasClass('active')) {
-            const self = this;
-        	self.abilitiesButtons.forEach((btn, index) => {
-            console.log(index);
-            console.log(self.clickedAbility);
-
-            if (self.clickedAbility === index) {
-				console.log("Clicked ability found");
-                const getImage = btn.css.normal['background-image'];
-                const btnNow = btn;
-                
-                // Set the initial background image
-                btnNow.css.normal = {
-                    'background-image': `url('${getUrl('icons/cancel')}')`
-                };
-
-                // Apply the initial background image to the button element
-                $j(btnNow).css('background-image', btnNow.css.normal['background-image']);
-                console.log($j(btnNow))
-                setTimeout(function() {
-                    
-                console.log(btnNow)
-                console.log(getImage);
-                    $j(btnNow.$button).css('background-image', `url('${getUrl(
-                            'units/abilities/' + creature.name + ' ' + index,
-                        )}')`);
-                    console.log($j(btnNow))
-                    console.log("Background image updated");
-                }, 1000);
-                
-                // Reset the clickedAbility property
-                self.clickedAbility = -1;
-            }
-        });
+			if (this.$dash.hasClass('active')) {
+			this.clickedAbility = -1;
 			this.closeDash();
 			return;
 		}
diff --git a/webpack.config.js b/webpack.config.js
index 201105765..612694c5c 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -146,7 +146,7 @@ module.exports = (env, argv) => {
 		},
 		devServer: {
 			static: process.env.PUBLIC_PATH ? process.env.PUBLIC_PATH : './',
-			port: 8080,
+			port: 8090,
 			proxy: {
 				'/api': '159.65.232.104:7350',
 			},

From ef46d140c0ff175a937a070b6825721548c3ad83 Mon Sep 17 00:00:00 2001
From: Joywin2412 <joywinpinto1@gmail.com>
Date: Mon, 12 Aug 2024 23:06:00 +0530
Subject: [PATCH 8/9] Fast fix

---
 src/ui/interface.js | 34 +++++++++++++++++++++++-----------
 1 file changed, 23 insertions(+), 11 deletions(-)

diff --git a/src/ui/interface.js b/src/ui/interface.js
index 115c20209..318a4d46e 100644
--- a/src/ui/interface.js
+++ b/src/ui/interface.js
@@ -285,23 +285,35 @@ export class UI {
 							if (i == 0) {
 								// Joywin
 								const selectedAbility = this.selectNextAbility();
+								const creature = game.activeCreature;
+
 								
 								if (selectedAbility > 0) {
+									this.abilitiesButtons.forEach((btn, index) => {
+										if (index === 0) {
+											btn.$button.removeClass('cancelIcon')
+											btn.$button.removeClass('nextIcon')
+
+											console.log(btn.$button);
+											this.clickedAbility = -1
+										}
+									});
 									b.cssTransition('nextIcon', 1000);
-								}
-								else if(selectedAbility === -1)
-								{
+								
 									
-									const self = this;
-									self.abilitiesButtons.forEach((btn, index) => {
-									console.log(self.clickedAbility);
-									const creature = game.activeCreature;
-									if (self.clickedAbility === index) {
-										b.cssTransition('cancelIcon', 1000);
-										this.clickedAbility = -1;
-									}
+								} else if (selectedAbility === -1) {
+									this.abilitiesButtons.forEach((btn, index) => {
+										console.log(this.clickedAbility);
+										if (index === 0) {
+											btn.$button.removeClass('nextIcon')
+											btn.$button.removeClass('cancelIcon')
+											this.clickedAbility = -1;
+										}
 									});
+									b.cssTransition('cancelIcon', 1000);
+
 								}
+								
 
 								return;
 							}

From eeacdf6aa383c5903627a293add07cc0d5103eb4 Mon Sep 17 00:00:00 2001
From: Joywin2412 <joywinpinto1@gmail.com>
Date: Tue, 13 Aug 2024 18:54:43 +0530
Subject: [PATCH 9/9] PR cleanup

---
 src/creature.ts   | 2 +-
 webpack.config.js | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/creature.ts b/src/creature.ts
index 241a50c83..c60782ae3 100644
--- a/src/creature.ts
+++ b/src/creature.ts
@@ -2135,4 +2135,4 @@ export type CreatureHintType =
 	| 'creature_name'
 	| 'no_action';
 
-type HealthBubbleType = 'plasma' | 'frozen' | 'health';
\ No newline at end of file
+type HealthBubbleType = 'plasma' | 'frozen' | 'health';
diff --git a/webpack.config.js b/webpack.config.js
index 612694c5c..201105765 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -146,7 +146,7 @@ module.exports = (env, argv) => {
 		},
 		devServer: {
 			static: process.env.PUBLIC_PATH ? process.env.PUBLIC_PATH : './',
-			port: 8090,
+			port: 8080,
 			proxy: {
 				'/api': '159.65.232.104:7350',
 			},