From 9bd9ad579c8a8149bc422c6a1f0fbb0f5ed1d9a7 Mon Sep 17 00:00:00 2001 From: OfficialCHenry Date: Mon, 9 May 2022 11:32:06 -0400 Subject: [PATCH] percent atk bugfix --- src/shattered_sword/Player/PlayerController.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/shattered_sword/Player/PlayerController.ts b/src/shattered_sword/Player/PlayerController.ts index 8a1b60a..db2fb88 100644 --- a/src/shattered_sword/Player/PlayerController.ts +++ b/src/shattered_sword/Player/PlayerController.ts @@ -471,7 +471,7 @@ export default class PlayerController extends StateMachineAI implements BattlerA case BuffCategory.ATTACK: attackBuffs.sort(() => 0.5 - Math.random()); if(attackBuffs.length == 0){ - selected.push({type:BuffType.PERCENT_HEALTH, value:num/100, category: BuffCategory.ATTACK, string: "\n\nIncrease Attack \nby "+num+"%"}); + selected.push({type:BuffType.PERCENT_ATK, value:num/100, category: BuffCategory.ATTACK, string: "\n\nIncrease Attack \nby "+num+"%"}); } else{ selected.push(attackBuffs.pop()); @@ -538,8 +538,9 @@ export default class PlayerController extends StateMachineAI implements BattlerA } else if (!init){ //increase weight of selected buff category - if(buff.category != BuffCategory.EXTRA) + if(buff.category != BuffCategory.EXTRA){ PlayerController.buffPool.push(buff.category); + } PlayerController.appliedBuffs.push(buff); } // TODO