From 088eea665a2995390fdd44b01c13118d7e882a03 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Fri, 21 Apr 2023 14:10:49 -0400 Subject: [PATCH] v2.1.0: adjusted combo window to be consistent with monk ability window --- .../main/assets/messages/actors/actors.properties | 15 ++++++++++----- .../assets/messages/windows/windows.properties | 1 + .../shatteredpixeldungeon/actors/buffs/Combo.java | 10 +++++++--- .../shatteredpixeldungeon/windows/WndCombo.java | 3 ++- 4 files changed, 20 insertions(+), 9 deletions(-) diff --git a/core/src/main/assets/messages/actors/actors.properties b/core/src/main/assets/messages/actors/actors.properties index 56f469248..2f27ef23a 100644 --- a/core/src/main/assets/messages/actors/actors.properties +++ b/core/src/main/assets/messages/actors/actors.properties @@ -153,11 +153,16 @@ actors.buffs.combo.combo=%d hit combo! actors.buffs.combo.bad_target=You must target an enemy in attack range. actors.buffs.combo.prompt=Select a target to attack. actors.buffs.combo.desc=The gladiator builds momentum as they land successful blows. Each attack increases the combo counter by one, but taking too long between hits will reset the combo counter to 0.\n\nBuilding combo unlocks special combo attacks that cannot miss! A different attack is unlocked at 2, 4, 6, 8, and 10 combo count. Some moves reset combo and some do not, but each move can only be used once per combo session.\n\nCurrent combo: %1$d.\n\nTurns until Combo is lost: %2$s. -actors.buffs.combo$combomove.clobber_desc=_2 Combo: Clobber_ knocks an enemy back 2 tiles, but deals no damage and cannot knock into pits. Increments combo by 1. -actors.buffs.combo$combomove.slam_desc=_4 Combo: Slam_ deals %d%% (combo*20%%) of your damage blocking power as bonus damage. Resets combo when used. -actors.buffs.combo$combomove.parry_desc=_6 Combo: Parry_ blocks the next attack within 1 turn when activated, and instantly retaliates to it. Resets combo if nothing is parried. -actors.buffs.combo$combomove.crush_desc=_8 Combo: Crush_ deals %d%% (combo*25%%) of your melee damage to the primary target, and half that damage to all other enemies in a 7x7 AOE. Resets combo when used. -actors.buffs.combo$combomove.fury_desc=_10 Combo: Fury_ hits an enemy once for each combo you have, each hit deals 60% damage and can trigger enchantments. Resets combo when used. +actors.buffs.combo$combomove.clobber.name=clobber +actors.buffs.combo$combomove.clobber.desc=Knocks an enemy back 2 tiles, but deals no damage and cannot knock into pits. Increments combo by 1. +actors.buffs.combo$combomove.slam.name=slam +actors.buffs.combo$combomove.slam.desc=Deals %d%% (combo*20%%) of your damage blocking power as bonus damage. Resets combo when used. +actors.buffs.combo$combomove.parry.name=parry +actors.buffs.combo$combomove.parry.desc=Blocks the next attack within 1 turn when activated, and instantly retaliates to it. Resets combo if nothing is parried. +actors.buffs.combo$combomove.crush.name=crush +actors.buffs.combo$combomove.crush.desc=Deals %d%% (combo*25%%) of your melee damage to the primary target, and half that damage to all other enemies in a 7x7 AOE. Resets combo when used. +actors.buffs.combo$combomove.fury.name=fury +actors.buffs.combo$combomove.fury.desc=Hits an enemy once for each combo you have, each hit deals 60% damage and can trigger enchantments. Resets combo when used. actors.buffs.corruption.name=corrupted actors.buffs.corruption.desc=Corruption seeps into the essence of a being, twisting them against their former nature.\n\nCorrupted creatures will attack their allies, and ignore their former enemies. Corruption is damaging as well, and will slowly cause its target to succumb.\n\nCorruption is permanent, its effects only end in death. diff --git a/core/src/main/assets/messages/windows/windows.properties b/core/src/main/assets/messages/windows/windows.properties index eb89fa8dd..c58d1bee5 100644 --- a/core/src/main/assets/messages/windows/windows.properties +++ b/core/src/main/assets/messages/windows/windows.properties @@ -20,6 +20,7 @@ windows.wndchoosesubclass.no=No, I'll decide later. windows.wndclass.mastery=Mastery windows.wndcombo.title=choose a combo move +windows.wndcombo.combo_req=(%d combo) windows.wnddailies.title=Daily History windows.wnddailies.date=Date diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Combo.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Combo.java index 80373112e..559bf7f92 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Combo.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Combo.java @@ -224,14 +224,18 @@ public class Combo extends Buff implements ActionIndicator.Action { this.tintColor = tintColor; } + public String title(){ + return Messages.get(this, name() + ".name"); + } + public String desc(int count){ switch (this){ default: - return Messages.get(this, name()+"_desc"); + return Messages.get(this, name() + ".desc"); case SLAM: - return Messages.get(this, name()+"_desc", count*20); + return Messages.get(this, name() + ".desc", count*20); case CRUSH: - return Messages.get(this, name()+"_desc", count*25); + return Messages.get(this, name() + ".desc", count*25); } } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndCombo.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndCombo.java index a7a45a138..cd9aa29c0 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndCombo.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndCombo.java @@ -63,7 +63,8 @@ public class WndCombo extends Window { for (Combo.ComboMove move : Combo.ComboMove.values()) { - RedButton moveBtn = new RedButton(move.desc(combo.getComboCount()), 6){ + String text = "_" + Messages.titleCase(move.title()) + " " + Messages.get(this, "combo_req", move.comboReq) + ":_ " + move.desc(combo.getComboCount()); + RedButton moveBtn = new RedButton(text, 6){ @Override protected void onClick() { super.onClick();