v3.1.0: little bit of text and buff icon status cleanup for berserker

This commit is contained in:
Evan Debenham
2025-04-09 20:45:11 -04:00
parent a33834e369
commit 1095ee1e35
2 changed files with 28 additions and 13 deletions

View File

@@ -109,8 +109,8 @@ actors.buffs.berserk.angered=angered
actors.buffs.berserk.berserk=berserking
actors.buffs.berserk.exhausted=exhausted
actors.buffs.berserk.recovering=recovering
actors.buffs.berserk.angered_desc=The severity of the Berserker's injuries strengthen his blows. As the berserker takes physical damage, his rage will build, granting him bonus damage. Damage which is blocked by armor still counts towards building rage.\n\nRage will fade over time. The lower the berserker's health, the longer it will last.\n\nAt 100%% rage, the Berserker can go berserk, granting him shielding equal to 10 plus 2x his armor's level. This shielding can have up to a 3x multiplier if he has very low health. His shielding decays over time and once it runs out the berserker will have to rest before building rage again.\n\nCurrent Rage: _%.0f%%_\n_+%.0f%%_ damage
actors.buffs.berserk.berserk_desc=Fear and uncertainty bleed away, leaving only anger. In this state the Berserker is extremely powerful, _dealing +50% damage and gaining bonus shielding._\n\nWhen all of his shielding is reduced to 0, berserking will end.\n\nAfter raging, the Berserker will need to recover before being able to build rage again.
actors.buffs.berserk.angered_desc=The severity of the Berserker's injuries strengthen his blows. As the berserker takes physical damage, his rage will build, granting him bonus damage. Damage which is blocked by armor still counts towards building rage.\n\nRage will fade over time. The lower the berserker's health, the longer it will last.\n\nAt 100%% rage, the Berserker can go berserk, granting him shielding based on the level of his armor and his missing health. While berserking, his shielding decays over time and once it runs out he will have to rest before building rage again.\n\nCurrent Rage: _%1$.0f%%_\n_+%2$.0f%%_ damage\n\nBerserk shield at current armor and HP: _%3$d_
actors.buffs.berserk.berserk_desc=Fear and uncertainty bleed away, leaving only anger. In this state the Berserker is extremely powerful, _dealing +50%% damage and gaining bonus shielding,_ but also losing shielding every turn.\n\nWhen all of his shielding is reduced to 0, berserking will end.\n\nAfter raging, the Berserker will need to recover before being able to build rage again.\n\nShield Remaining: %d
actors.buffs.berserk.recovering_desc=Inner strength has its limits. The Berserker must rest before using his rage again.\n\nWhile recovering the Berserker does not build any rage from taking damage.
actors.buffs.berserk.recovering_desc_turns=Turns until recovered: _%d_
actors.buffs.berserk.recovering_desc_levels=Levels until recovered: _%.2f_
@@ -829,7 +829,7 @@ actors.hero.heroclass.cleric_unlock=To unlock the Cleric _fully cleanse the curs
actors.hero.herosubclass.berserker=berserker
actors.hero.herosubclass.berserker_short_desc=The _Berserker_ builds rage as he takes damage. Rage increases his damage and can be activated at 100% for bonus shielding.
actors.hero.herosubclass.berserker_desc=The Berserker gains rage as he takes physical damage, including damage that gets blocked by his armor! Rage steadily fades away over time, but fades more slowly if he is at low HP.\n\nThe Berserker deals up to +50% damage at 100% rage. At 100% rage he can also go berserk, gaining a burst of shielding and keeping his rage at 100% as long as he has shielding left. The shielding gained has a base value of 10 plus 2x the level of the berserker's armor, but can be boosted by up to 3x based on his missing health. The Berserker needs time to recover after he goes berserk.
actors.hero.herosubclass.berserker_desc=The Berserker gains rage as he takes physical damage, including damage that gets blocked by his armor! Rage steadily fades away over time, but fades more slowly if he is at low HP.\n\nRage can cause the Berserker to deal up to +50% damage. At max rage he can go berserk, gaining a burst of shielding and keeping his rage as long as he has shielding left. The shielding scales with the level of the berserker's armor, and can be massively boosted if he is at low health. The Berserker needs time to recover after he goes berserk.
actors.hero.herosubclass.gladiator=gladiator
actors.hero.herosubclass.gladiator_short_desc=The _Gladiator_ builds combo when he makes successful attacks. He can spend combo to use unique abilities.
actors.hero.herosubclass.gladiator_desc=The Gladiator builds one point of combo every time he makes a successful attack with a melee or thrown weapon. If the Gladiator does not make a successful attack within 5 turns, his combo is reset.\n\nAs he builds combo the Gladiator can use a variety of abilities that are guaranteed to hit:\n2 Combo: knock enemy back, preserves combo\n4 Combo: deal damage based on armor\n6 Combo: parry, preserves combo\n8 Combo: damage target and nearby enemies\n10 Combo: attack once for each combo

View File

@@ -192,6 +192,14 @@ public class Berserk extends ShieldBuff implements ActionIndicator.Action {
turnRecovery = 0;
}
int shieldAmount = currentShieldBoost();
setShield(shieldAmount);
target.sprite.showStatusWithIcon( CharSprite.POSITIVE, Integer.toString(shieldAmount), FloatingText.SHIELDING );
BuffIndicator.refreshHero();
}
public int currentShieldBoost(){
//base multiplier scales at 1/1.5/2/2.5/3x at 100/37/20/9/0% HP
float shieldMultiplier = 1f + 2*(float)Math.pow((1f-(target.HP/(float)target.HT)), 3);
@@ -206,11 +214,16 @@ public class Berserk extends ShieldBuff implements ActionIndicator.Action {
if (target instanceof Hero && ((Hero) target).belongings.armor() != null){
baseShield += 2*((Hero) target).belongings.armor().buffedLvl();
}
int shieldAmount = Math.round(baseShield * shieldMultiplier);
setShield(shieldAmount);
target.sprite.showStatusWithIcon( CharSprite.POSITIVE, Integer.toString(shieldAmount), FloatingText.SHIELDING );
return Math.round(baseShield * shieldMultiplier);
}
BuffIndicator.refreshHero();
//not accounting for talents
public int maxShieldBoost(){
int baseShield = 10;
if (target instanceof Hero && ((Hero) target).belongings.armor() != null){
baseShield += 2*((Hero) target).belongings.armor().buffedLvl();
}
return baseShield*3;
}
public void damage(int damage){
@@ -299,20 +312,22 @@ public class Berserk extends ShieldBuff implements ActionIndicator.Action {
float maxPower = 1f + 0.1667f*((Hero)target).pointsInTalent(Talent.ENDLESS_RAGE);
return (maxPower - power)/maxPower;
case BERSERK:
return 0f;
return 1f - shielding() / (float)maxShieldBoost();
case RECOVERING:
if (levelRecovery > 0) {
return 1f - levelRecovery/(LEVEL_RECOVER_START-Dungeon.hero.pointsInTalent(Talent.DEATHLESS_FURY));
return levelRecovery/(LEVEL_RECOVER_START-Dungeon.hero.pointsInTalent(Talent.DEATHLESS_FURY));
} else {
return 1f - turnRecovery/(float)TURN_RECOVERY_START;
return turnRecovery/(float)TURN_RECOVERY_START;
}
}
}
public String iconTextDisplay(){
switch (state){
case NORMAL: case BERSERK: default:
case NORMAL: default:
return (int)(power*100) + "%";
case BERSERK:
return Integer.toString(shielding());
case RECOVERING:
if (levelRecovery > 0) {
return Messages.decimalFormat("#.##", levelRecovery);
@@ -339,9 +354,9 @@ public class Berserk extends ShieldBuff implements ActionIndicator.Action {
float dispDamage = ((int)damageFactor(10000) / 100f) - 100f;
switch (state){
case NORMAL: default:
return Messages.get(this, "angered_desc", Math.floor(power * 100f), dispDamage);
return Messages.get(this, "angered_desc", Math.floor(power * 100f), dispDamage, currentShieldBoost());
case BERSERK:
return Messages.get(this, "berserk_desc");
return Messages.get(this, "berserk_desc", shielding());
case RECOVERING:
if (levelRecovery > 0){
return Messages.get(this, "recovering_desc") + "\n\n" + Messages.get(this, "recovering_desc_levels", levelRecovery);