From 5e33b8a71fb29fd2718074e2bd6bad7fa9d13ffc Mon Sep 17 00:00:00 2001 From: OfficialCHenry Date: Thu, 21 Apr 2022 11:44:45 -0400 Subject: [PATCH 1/4] quick fix --- src/shattered_sword/Player/PlayerController.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shattered_sword/Player/PlayerController.ts b/src/shattered_sword/Player/PlayerController.ts index 5f8d21c..6be9894 100644 --- a/src/shattered_sword/Player/PlayerController.ts +++ b/src/shattered_sword/Player/PlayerController.ts @@ -450,7 +450,7 @@ export default class PlayerController extends StateMachineAI implements BattlerA this.hasBleed = true; break; case BuffType.BURN: - this.hasBleed = true; + this.hasBurn = true; break; case BuffType.POISON: this.hasPoison = true; From 1fce158301ce601018582c583b7020dbbeff49cf Mon Sep 17 00:00:00 2001 From: OfficialCHenry Date: Thu, 21 Apr 2022 12:42:08 -0400 Subject: [PATCH 2/4] added bufflabels --- .../GameSystems/BattleManager.ts | 3 ++ src/shattered_sword/Scenes/GameLevel.ts | 28 +++++++++++++------ 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/src/shattered_sword/GameSystems/BattleManager.ts b/src/shattered_sword/GameSystems/BattleManager.ts index c8f6cb4..a6c23ea 100644 --- a/src/shattered_sword/GameSystems/BattleManager.ts +++ b/src/shattered_sword/GameSystems/BattleManager.ts @@ -41,6 +41,9 @@ export default class BattleManager { if(player.hasDoubleStrike){ enemy.damage(weapon.type.damage * (this.players[0]).CURRENT_ATK/200); } + if(player.hasLifesteal){ + player.addHealth(weapon.type.damage * player.CURRENT_ATK/100 * player.lifestealratio); + } } } } diff --git a/src/shattered_sword/Scenes/GameLevel.ts b/src/shattered_sword/Scenes/GameLevel.ts index 996f11d..3e2f2a6 100644 --- a/src/shattered_sword/Scenes/GameLevel.ts +++ b/src/shattered_sword/Scenes/GameLevel.ts @@ -108,8 +108,11 @@ export default class GameLevel extends Scene { //buffs layer buffLayer: Layer; buffButton1 : Button; + buffLabel1 : Label; buffButton2 : Button; + buffLabel2 : Label; buffButton3 : Button; + buffLabel3 : Label; buffs: Array; //pause layer @@ -268,24 +271,26 @@ export default class GameLevel extends Scene { case Player_Events.GIVE_BUFF: this.buffs = (this.player._ai).generateBuffs(); if(this.buffs[0].string !== undefined){ - this.buffButton1.text = this.buffs[0].string; + //this.buffButton1.text = this.buffs[0].string; + this.buffLabel1.text = this.buffs[0].string; } else{ - this.buffButton1.text = "Increase "+this.buffs[0].type + " by "+this.buffs[0].value; + //this.buffButton1.text = "Increase "+this.buffs[0].type + " by "+this.buffs[0].value; + this.buffLabel1.text = "Increase "+this.buffs[0].type + " by "+this.buffs[0].value; } if(this.buffs[1].string !== undefined){ - this.buffButton2.text = this.buffs[1].string; + this.buffLabel2.text = this.buffs[1].string; } else{ - this.buffButton2.text = "Increase "+this.buffs[1].type + " by "+this.buffs[1].value; + this.buffLabel2.text = "Increase "+this.buffs[1].type + " by "+this.buffs[1].value; } if(this.buffs[2].string !== undefined){ - this.buffButton3.text = this.buffs[2].string; + this.buffLabel3.text = this.buffs[2].string; } else{ - this.buffButton3.text = "Increase "+this.buffs[2].type + " by "+this.buffs[2].value; + this.buffLabel3.text = "Increase "+this.buffs[2].type + " by "+this.buffs[2].value; } //pause game here @@ -609,7 +614,7 @@ export default class GameLevel extends Scene { //TODO - //determine button location - this.buffButton1 =