v2.4.0: converted all dmg-boosting duelist abilities to use flat boosts

this results in more consistent numbers overall, but is DPS neutral (or only changes it very slightly). Yes, some internal numbers are a bit weird atm due to keeping the boosts equivalent, but more balance changes are planned
This commit is contained in:
Evan Debenham
2024-04-09 15:03:28 -04:00
parent 998cc211cd
commit dafbb6f859
23 changed files with 197 additions and 100 deletions

View File

@@ -1623,15 +1623,17 @@ items.weapon.melee.flail.name=flail
items.weapon.melee.flail.stats_desc=This is a rather inaccurate weapon.\nThis weapon cannot surprise attack.
items.weapon.melee.flail.ability_name=spin
items.weapon.melee.flail.spin_warn=You can't spin the flail any more.
items.weapon.melee.flail.ability_desc=The Duelist can _spin_ a flail to build up power for a short time. Each turn the flail is spun it will deal +33% damage, to a max of 3 times. A spinning flail is also guaranteed to hit. Starting to spin the flail costs 2 charges.
items.weapon.melee.flail.typical_ability_desc=The Duelist can _spin_ a flail to build up power for a short time. Each turn the flail is spun it will typically deal _+%d damage_, to a max of 3 times. A spinning flail is also guaranteed to hit. Starting to spin the flail costs 2 charges.
items.weapon.melee.flail.ability_desc=The Duelist can _spin_ a flail to build up power for a short time. Each turn the flail is spun it will deal _+%d damage_, to a max of 3 times. A spinning flail is also guaranteed to hit. Starting to spin the flail costs 2 charges.
items.weapon.melee.flail.desc=A spiked ball attached to a handle by a length of chain. Very unwieldy, but devastating if it lands a solid hit.
items.weapon.melee.flail$spinabilitytracker.name=spinning
items.weapon.melee.flail$spinabilitytracker.desc=The Duelist is spinning her flail, building damage for her next attack with it. Each spin takes one turn but increases damage by 33%%. The flail is also guaranteed to hit while spinning.\n\nCurrent bonus damage: %1$d%%.\nTurns remaining: %2$s.
items.weapon.melee.flail$spinabilitytracker.desc=The Duelist is spinning her flail, building damage for her next attack with it. Each spin takes one turn but increases damage, to a max of three spins. The flail is also guaranteed to hit while spinning.\n\nCurrent spins: %1$d%%.\nTurns remaining: %2$s.
items.weapon.melee.gauntlet.name=stone gauntlet
items.weapon.melee.gauntlet.stats_desc=This is a very fast weapon.
items.weapon.melee.gauntlet.ability_name=combo strike
items.weapon.melee.gauntlet.ability_desc=The Duelist can perform a _combo strike_ with a stone gauntlet. This attack is guaranteed to hit and deals +35% damage for each time the Duelist has already successfully attacked with melee or thrown weapons in the last 5 turns.
items.weapon.melee.gauntlet.typical_ability_desc=The Duelist can perform a _combo strike_ with a stone gauntlet. This attack is guaranteed to hit and typically deals _+%d damage_ for each time the Duelist has already successfully attacked with melee or thrown weapons in the last 5 turns.
items.weapon.melee.gauntlet.ability_desc=The Duelist can perform a _combo strike_ with a stone gauntlet. This attack is guaranteed to hit and deals _+%d damage_ for each time the Duelist has already successfully attacked with melee or thrown weapons in the last 5 turns.
items.weapon.melee.gauntlet.desc=This massive gauntlet is made of crimson fabric with heavy magical stone layered on top. The fabric tightens around you, making the thick stone plates almost like a second skin. Swinging such a heavy weapon requires strength, but adds tremendous force to your blows.
items.weapon.melee.glaive.name=glaive
@@ -1644,7 +1646,8 @@ items.weapon.melee.glaive.desc=A massive polearm consisting of a sword blade on
items.weapon.melee.gloves.name=studded gloves
items.weapon.melee.gloves.stats_desc=This is a very fast weapon.
items.weapon.melee.gloves.ability_name=combo strike
items.weapon.melee.gloves.ability_desc=The Duelist can perform a _combo strike_ with studded gloves. This attack is guaranteed to hit and deals +45% damage for each time the Duelist has already successfully attacked with melee or thrown weapons in the last 5 turns.
items.weapon.melee.gloves.typical_ability_desc=The Duelist can perform a _combo strike_ with studded gloves. This attack is guaranteed to hit and typically deals _+%d damage_ for each time the Duelist has already successfully attacked with melee or thrown weapons in the last 5 turns.
items.weapon.melee.gloves.ability_desc=The Duelist can perform a _combo strike_ with studded gloves. This attack is guaranteed to hit and deals _+%d damage_ for each time the Duelist has already successfully attacked with melee or thrown weapons in the last 5 turns.
items.weapon.melee.gloves.desc=These studded gloves don't provide any real protection, but they act as a serviceable weapon while keeping the hands free.
items.weapon.melee.greataxe.name=greataxe
@@ -1769,7 +1772,8 @@ items.weapon.melee.runicblade.desc=A mysterious weapon from a distant land, with
items.weapon.melee.sai.name=sai
items.weapon.melee.sai.stats_desc=This is a very fast weapon.
items.weapon.melee.sai.ability_name=combo strike
items.weapon.melee.sai.ability_desc=The Duelist can perform a _combo strike_ with sai. This attack is guaranteed to hit and deals +40% damage for each time the Duelist has already successfully attacked with melee or thrown weapons in the last 5 turns.
items.weapon.melee.sai.typical_ability_desc=The Duelist can perform a _combo strike_ with sai. This attack is guaranteed to hit and typically deals _+%d damage_ for each time the Duelist has already successfully attacked with melee or thrown weapons in the last 5 turns.
items.weapon.melee.sai.ability_desc=The Duelist can perform a _combo strike_ with sai. This attack is guaranteed to hit and deals _+%d damage_ for each time the Duelist has already successfully attacked with melee or thrown weapons in the last 5 turns.
items.weapon.melee.sai.desc=Two thin blades meant to be wielded in one hand each. Excellent for tearing down enemies with a flurry of cuts.
items.weapon.melee.sai$combostriketracker.name=combo strike
items.weapon.melee.sai$combostriketracker.desc=The Duelist is building combo that can be used to increase the damage of the combo strike ability. Each strike made with a melee or thrown weapon in the last 5 turns will count.\n\nRecent hits: %d.
@@ -1785,8 +1789,8 @@ items.weapon.melee.scimitar$sworddance.desc=The Duelist is making quick momentum
items.weapon.melee.sickle.name=sickle
items.weapon.melee.sickle.stats_desc=This is a rather inaccurate weapon.
items.weapon.melee.sickle.ability_name=harvest
items.weapon.melee.sickle.typical_ability_desc=The Duelist can _harvest_ an enemy with a sickle. This devastating attack typically inflicts _%1$d-%2$d bleed_ instead of damage and is guaranteed to hit, but costs 2 charges.
items.weapon.melee.sickle.ability_desc=The Duelist can _harvest_ an enemy with a sickle. This devastating attack inflicts _%1$d-%2$d bleed_ instead of damage and is guaranteed to hit, but costs 2 charges.
items.weapon.melee.sickle.typical_ability_desc=The Duelist can _harvest_ an enemy with a sickle. This devastating attack typically inflicts _%1$d-%2$d bleeding_ instead of damage and is guaranteed to hit, but costs 2 charges.
items.weapon.melee.sickle.ability_desc=The Duelist can _harvest_ an enemy with a sickle. This devastating attack inflicts _%1$d-%2$d bleeding_ instead of damage and is guaranteed to hit, but costs 2 charges.
items.weapon.melee.sickle.desc=A handheld farming tool that can double as a strong but unwieldy weapon.
items.weapon.melee.spear.name=spear
@@ -1807,15 +1811,15 @@ items.weapon.melee.sword$cleavetracker.desc=The Duelist is ready to follow up on
items.weapon.melee.warhammer.name=war hammer
items.weapon.melee.warhammer.stats_desc=This is a rather accurate weapon.
items.weapon.melee.warhammer.ability_name=heavy blow
items.weapon.melee.warhammer.typical_ability_desc=The Duelist can perform a _heavy blow_ with a v. This concentrated attack typically deals _%1$d-%2$d damage_ and dazes for 5 turns, reducing accuracy and evasion by 50%%. This ability costs 2 charges if it does not surprise the enemy.
items.weapon.melee.warhammer.typical_ability_desc=The Duelist can perform a _heavy blow_ with a war hammer. This concentrated attack typically deals _%1$d-%2$d damage_ and dazes for 5 turns, reducing accuracy and evasion by 50%%. This ability costs 2 charges if it does not surprise the enemy.
items.weapon.melee.warhammer.ability_desc=The Duelist can perform a _heavy blow_ with a war hammer. This concentrated attack deals _%1$d-%2$d damage_ and dazes for 5 turns, reducing accuracy and evasion by 50%%. This ability costs 2 charges if it does not surprise the enemy.
items.weapon.melee.warhammer.desc=Few creatures can withstand the crushing blow of this towering mass of lead and steel, but it takes great strength to use effectively.
items.weapon.melee.warscythe.name=war scythe
items.weapon.melee.warscythe.stats_desc=This is a rather inaccurate weapon.
items.weapon.melee.warscythe.ability_name=harvest
items.weapon.melee.warscythe.typical_ability_desc=The Duelist can _harvest_ an enemy with a war scythe. This devastating attack typically inflicts _%1$d-%2$d bleed_ instead of damage and is guaranteed to hit, but costs 2 charges.
items.weapon.melee.warscythe.ability_desc=The Duelist can _harvest_ an enemy with a war scythe. This devastating attack inflicts _%1$d-%2$d bleed_ instead of damage and is guaranteed to hit, but costs 2 charges.
items.weapon.melee.warscythe.typical_ability_desc=The Duelist can _harvest_ an enemy with a war scythe. This devastating attack typically inflicts _%1$d-%2$d bleeding_ instead of damage and is guaranteed to hit, but costs 2 charges.
items.weapon.melee.warscythe.ability_desc=The Duelist can _harvest_ an enemy with a war scythe. This devastating attack inflicts _%1$d-%2$d bleeding_ instead of damage and is guaranteed to hit, but costs 2 charges.
items.weapon.melee.warscythe.desc=This large and unwieldy tool has been reinforced to make it better at cutting foes than crops.
items.weapon.melee.whip.name=whip

View File

@@ -762,7 +762,7 @@ public abstract class Char extends Actor {
b = new Bleeding();
}
b.announced = false;
b.set(dmg*buff(Sickle.HarvestBleedTracker.class).bleedFactor, Sickle.HarvestBleedTracker.class);
b.set(dmg, Sickle.HarvestBleedTracker.class);
b.attachTo(this);
sprite.showStatus(CharSprite.WARNING, Messages.titleCase(b.name()) + " " + (int)b.level());
buff(Sickle.HarvestBleedTracker.class).detach();

View File

@@ -216,18 +216,19 @@ public class Pickaxe extends MeleeWeapon {
hero.sprite.attack(enemy.pos, new Callback() {
@Override
public void call() {
float damageMulti = 1f;
int damageBoost = 0;
if (Char.hasProp(enemy, Char.Property.INORGANIC)
|| enemy instanceof Swarm
|| enemy instanceof Bee
|| enemy instanceof Crab
|| enemy instanceof Spinner
|| enemy instanceof Scorpio) {
damageMulti = 2f;
//+(8+2*lvl) damage, equivalent to +100% damage
damageBoost = augment.damageFactor(8 + 2*buffedLvl());
}
beforeAbilityUsed(hero, enemy);
AttackIndicator.target(enemy);
if (hero.attack(enemy, damageMulti, 0, Char.INFINITE_ACCURACY)) {
if (hero.attack(enemy, 1, damageBoost, Char.INFINITE_ACCURACY)) {
if (enemy.isAlive()) {
Buff.affect(enemy, Vulnerable.class, 3f);
} else {
@@ -244,7 +245,8 @@ public class Pickaxe extends MeleeWeapon {
@Override
public String abilityInfo() {
return Messages.get(this, "ability_desc", augment.damageFactor(Math.round(min() * 2f)), augment.damageFactor(Math.round(max() * 2f)));
int dmgBoost = 8 + 2*buffedLvl();
return Messages.get(this, "ability_desc", augment.damageFactor(min()+dmgBoost), augment.damageFactor(max()+dmgBoost));
}
private static final String BLOODSTAINED = "bloodStained";

View File

@@ -61,15 +61,18 @@ public class BattleAxe extends MeleeWeapon {
@Override
protected void duelistAbility(Hero hero, Integer target) {
Mace.heavyBlowAbility(hero, target, 1.35f, this);
//+(4+lvl) damage, roughly equivalent to +35% damage
int dmgBoost = augment.damageFactor(4 + buffedLvl());
Mace.heavyBlowAbility(hero, target, 1, dmgBoost, this);
}
@Override
public String abilityInfo() {
if (levelKnown) {
return Messages.get(this, "ability_desc", augment.damageFactor(Math.round(min() * 1.35f)), augment.damageFactor(Math.round(max() * 1.35f)));
int dmgBoost = levelKnown ? 4 + buffedLvl() : 4;
if (levelKnown){
return Messages.get(this, "ability_desc", augment.damageFactor(min()+dmgBoost), augment.damageFactor(max()+dmgBoost));
} else {
return Messages.get(this, "typical_ability_desc", Math.round(min(0) * 1.35f), Math.round(max(0) * 1.35f));
return Messages.get(this, "typical_ability_desc", min(0)+dmgBoost, max(0)+dmgBoost);
}
}

View File

@@ -54,13 +54,13 @@ public class Flail extends MeleeWeapon {
lvl*Math.round(1.6f*(tier+1)); //+8 per level, up from +5
}
private static float spinBonus = 1f;
private static int spinBoost = 0;
@Override
public int damageRoll(Char owner) {
int dmg = Math.round(super.damageRoll(owner) * spinBonus);
if (spinBonus > 1f) Sample.INSTANCE.play(Assets.Sounds.HIT_STRONG);
spinBonus = 1f;
int dmg = super.damageRoll(owner) + spinBoost;
if (spinBoost > 0) Sample.INSTANCE.play(Assets.Sounds.HIT_STRONG);
spinBoost = 0;
return dmg;
}
@@ -81,10 +81,10 @@ public class Flail extends MeleeWeapon {
});
//we detach and calculate bonus here in case the attack misses (e.g. vs. monks)
spin.detach();
spinBonus = 1f + (spin.spins/3f);
spinBoost = spin.spins * augment.damageFactor(Math.round(6.5f + 1.5f*buffedLvl()));
return Float.POSITIVE_INFINITY;
} else {
spinBonus = 1f;
spinBoost = 0;
return super.accuracyFactor(owner, target);
}
}
@@ -122,6 +122,16 @@ public class Flail extends MeleeWeapon {
afterAbilityUsed(hero);
}
@Override
public String abilityInfo() {
int dmgBoost = levelKnown ? Math.round(6.5f + 1.5f*buffedLvl()) : 7;
if (levelKnown){
return Messages.get(this, "ability_desc", augment.damageFactor(dmgBoost));
} else {
return Messages.get(this, "typical_ability_desc", augment.damageFactor(dmgBoost));
}
}
public static class SpinAbilityTracker extends FlavourBuff {
{

View File

@@ -50,7 +50,19 @@ public class Gauntlet extends MeleeWeapon {
@Override
protected void duelistAbility(Hero hero, Integer target) {
Sai.comboStrikeAbility(hero, target, 0.35f, this);
//+(3.5+0.75*lvl) damage, roughly equivalent to +35% damage
int dmgBoost = augment.damageFactor(Math.round(3.5f + 0.75f*buffedLvl()));
Sai.comboStrikeAbility(hero, target, 0, dmgBoost, this);
}
@Override
public String abilityInfo() {
int dmgBoost = levelKnown ? Math.round(3.5f + 0.75f*buffedLvl()) : 4;
if (levelKnown){
return Messages.get(this, "ability_desc", augment.damageFactor(dmgBoost));
} else {
return Messages.get(this, "typical_ability_desc", augment.damageFactor(dmgBoost));
}
}
}

View File

@@ -51,15 +51,18 @@ public class Glaive extends MeleeWeapon {
@Override
protected void duelistAbility(Hero hero, Integer target) {
Spear.spikeAbility(hero, target, 1.30f, this);
//+(7+1.33*lvl) damage, roughly equivalent to +30% damage
int dmgBoost = augment.damageFactor(7 + Math.round(1.33f*buffedLvl()));
Spear.spikeAbility(hero, target, 1, dmgBoost, this);
}
@Override
public String abilityInfo() {
if (levelKnown) {
return Messages.get(this, "ability_desc", augment.damageFactor(Math.round(min() * 1.30f)), augment.damageFactor(Math.round(max() * 1.30f)));
int dmgBoost = levelKnown ? 7 + Math.round(1.33f*buffedLvl()) : 7;
if (levelKnown){
return Messages.get(this, "ability_desc", augment.damageFactor(min()+dmgBoost), augment.damageFactor(max()+dmgBoost));
} else {
return Messages.get(this, "typical_ability_desc", Math.round(min(0) * 1.30f), Math.round(max(0) * 1.30f));
return Messages.get(this, "typical_ability_desc", min(0)+dmgBoost, max(0)+dmgBoost);
}
}

View File

@@ -52,7 +52,19 @@ public class Gloves extends MeleeWeapon {
@Override
protected void duelistAbility(Hero hero, Integer target) {
Sai.comboStrikeAbility(hero, target, 0.45f, this);
//+(1.5+0.5*lvl) damage, roughly equivalent to +45% damage
int dmgBoost = augment.damageFactor(Math.round(1.5f + 0.5f*buffedLvl()));
Sai.comboStrikeAbility(hero, target, 0, dmgBoost, this);
}
@Override
public String abilityInfo() {
int dmgBoost = levelKnown ? Math.round(1.5f + 0.5f*buffedLvl()) : 2;
if (levelKnown){
return Messages.get(this, "ability_desc", augment.damageFactor(dmgBoost));
} else {
return Messages.get(this, "typical_ability_desc", augment.damageFactor(dmgBoost));
}
}
}

View File

@@ -90,6 +90,10 @@ public class Greataxe extends MeleeWeapon {
public void call() {
beforeAbilityUsed(hero, enemy);
AttackIndicator.target(enemy);
//+(12.5+(1.75*lvl)) damage, equivalent to +50% damage
int dmgBoost = augment.damageFactor(Math.round(12.5f + 1.75f*buffedLvl()));
if (hero.attack(enemy, 1.50f, 0, Char.INFINITE_ACCURACY)){
Sample.INSTANCE.play(Assets.Sounds.HIT_STRONG);
if (!enemy.isAlive()){
@@ -105,10 +109,11 @@ public class Greataxe extends MeleeWeapon {
@Override
public String abilityInfo() {
if (levelKnown) {
return Messages.get(this, "ability_desc", augment.damageFactor(Math.round(min() * 1.50f)), augment.damageFactor(Math.round(max() * 1.50f)));
int dmgBoost = levelKnown ? Math.round(12.5f + 1.75f*buffedLvl()) : 13;
if (levelKnown){
return Messages.get(this, "ability_desc", augment.damageFactor(min()+dmgBoost), augment.damageFactor(max()+dmgBoost));
} else {
return Messages.get(this, "typical_ability_desc", Math.round(min(0) * 1.50f), Math.round(max(0) * 1.50f));
return Messages.get(this, "typical_ability_desc", min(0)+dmgBoost, max(0)+dmgBoost);
}
}
}

View File

@@ -53,15 +53,18 @@ public class Greatsword extends MeleeWeapon {
@Override
protected void duelistAbility(Hero hero, Integer target) {
Sword.cleaveAbility(hero, target, 1.20f, this);
//+(3.5+0.7*lvl) damage, roughly equivalent to +20% damage
int dmgBoost = augment.damageFactor(Math.round(3.5f + 0.7f*buffedLvl()));
Sword.cleaveAbility(hero, target, 1, dmgBoost, this);
}
@Override
public String abilityInfo() {
if (levelKnown) {
return Messages.get(this, "ability_desc", augment.damageFactor(Math.round(min() * 1.20f)), augment.damageFactor(Math.round(max() * 1.20f)));
int dmgBoost = levelKnown ? Math.round(3.5f + 0.7f*buffedLvl()) : 4;
if (levelKnown){
return Messages.get(this, "ability_desc", augment.damageFactor(min()+dmgBoost), augment.damageFactor(max()+dmgBoost));
} else {
return Messages.get(this, "typical_ability_desc", Math.round(min(0) * 1.20f), Math.round(max(0) * 1.20f));
return Messages.get(this, "typical_ability_desc", min(0)+dmgBoost, max(0)+dmgBoost);
}
}

View File

@@ -61,15 +61,18 @@ public class HandAxe extends MeleeWeapon {
@Override
protected void duelistAbility(Hero hero, Integer target) {
Mace.heavyBlowAbility(hero, target, 1.45f, this);
//+(3+lvl) damage, roughly equivalent to +45% damage
int dmgBoost = augment.damageFactor(3 + buffedLvl());
Mace.heavyBlowAbility(hero, target, 1, dmgBoost, this);
}
@Override
public String abilityInfo() {
if (levelKnown) {
return Messages.get(this, "ability_desc", augment.damageFactor(Math.round(min() * 1.45f)), augment.damageFactor(Math.round(max() * 1.45f)));
int dmgBoost = levelKnown ? 3 + buffedLvl() : 3;
if (levelKnown){
return Messages.get(this, "ability_desc", augment.damageFactor(min()+dmgBoost), augment.damageFactor(max()+dmgBoost));
} else {
return Messages.get(this, "typical_ability_desc", Math.round(min(0) * 1.45f), Math.round(max(0) * 1.45f));
return Messages.get(this, "typical_ability_desc", min(0)+dmgBoost, max(0)+dmgBoost);
}
}

View File

@@ -55,15 +55,18 @@ public class Katana extends MeleeWeapon {
@Override
protected void duelistAbility(Hero hero, Integer target) {
Rapier.lungeAbility(hero, target, 1.35f, 0, this);
//+(4+lvl) damage, equivalent to +33% damage
int dmgBoost = augment.damageFactor(4 + buffedLvl());
Rapier.lungeAbility(hero, target, 1, dmgBoost, this);
}
@Override
public String abilityInfo() {
if (levelKnown) {
return Messages.get(this, "ability_desc", augment.damageFactor(Math.round(min() * 1.35f)), augment.damageFactor(Math.round(max() * 1.35f)));
int dmgBoost = levelKnown ? 4+buffedLvl() : 4;
if (levelKnown){
return Messages.get(this, "ability_desc", augment.damageFactor(min()+dmgBoost), augment.damageFactor(max()+dmgBoost));
} else {
return Messages.get(this, "typical_ability_desc", Math.round(min(0) * 1.35f), Math.round(max(0) * 1.35f));
return Messages.get(this, "typical_ability_desc", min(0)+dmgBoost, max(0)+dmgBoost);
}
}

View File

@@ -53,15 +53,18 @@ public class Longsword extends MeleeWeapon {
@Override
protected void duelistAbility(Hero hero, Integer target) {
Sword.cleaveAbility(hero, target, 1.23f, this);
//+(3.5+0.7*lvl) damage, roughly equivalent to +23% damage
int dmgBoost = augment.damageFactor(Math.round(3.5f + 0.7f*buffedLvl()));
Sword.cleaveAbility(hero, target, 1, dmgBoost, this);
}
@Override
public String abilityInfo() {
if (levelKnown) {
return Messages.get(this, "ability_desc", augment.damageFactor(Math.round(min() * 1.23f)), augment.damageFactor(Math.round(max() * 1.23f)));
int dmgBoost = levelKnown ? Math.round(3.5f + 0.7f*buffedLvl()) : 4;
if (levelKnown){
return Messages.get(this, "ability_desc", augment.damageFactor(min()+dmgBoost), augment.damageFactor(max()+dmgBoost));
} else {
return Messages.get(this, "typical_ability_desc", Math.round(min(0) * 1.23f), Math.round(max(0) * 1.23f));
return Messages.get(this, "typical_ability_desc", min(0)+dmgBoost, max(0)+dmgBoost);
}
}
}

View File

@@ -70,19 +70,22 @@ public class Mace extends MeleeWeapon {
@Override
protected void duelistAbility(Hero hero, Integer target) {
Mace.heavyBlowAbility(hero, target, 1.40f, this);
//+(4+lvl) damage, roughly equivalent to +40% damage
int dmgBoost = augment.damageFactor(4 + buffedLvl());
Mace.heavyBlowAbility(hero, target, 1, dmgBoost, this);
}
@Override
public String abilityInfo() {
if (levelKnown) {
return Messages.get(this, "ability_desc", augment.damageFactor(Math.round(min() * 1.40f)), augment.damageFactor(Math.round(max() * 1.40f)));
int dmgBoost = levelKnown ? 4 + buffedLvl() : 4;
if (levelKnown){
return Messages.get(this, "ability_desc", augment.damageFactor(min()+dmgBoost), augment.damageFactor(max()+dmgBoost));
} else {
return Messages.get(this, "typical_ability_desc", Math.round(min(0) * 1.40f), Math.round(max(0) * 1.40f));
return Messages.get(this, "typical_ability_desc", min(0)+dmgBoost, max(0)+dmgBoost);
}
}
public static void heavyBlowAbility(Hero hero, Integer target, float dmgMulti, MeleeWeapon wep){
public static void heavyBlowAbility(Hero hero, Integer target, float dmgMulti, int dmgBoost, MeleeWeapon wep){
if (target == null) {
return;
}
@@ -122,7 +125,7 @@ public class Mace extends MeleeWeapon {
public void call() {
wep.beforeAbilityUsed(hero, enemy);
AttackIndicator.target(enemy);
if (hero.attack(enemy, dmgMulti, 0, Char.INFINITE_ACCURACY)) {
if (hero.attack(enemy, dmgMulti, dmgBoost, Char.INFINITE_ACCURACY)) {
Sample.INSTANCE.play(Assets.Sounds.HIT_STRONG);
if (enemy.isAlive()){
Buff.affect(enemy, Daze.class, Daze.DURATION);

View File

@@ -68,17 +68,18 @@ public class Rapier extends MeleeWeapon {
@Override
protected void duelistAbility(Hero hero, Integer target) {
//+(3+lvl) damage, equivalent to +67% damage, but more consistent
int dmgBoost = augment.damageFactor(3 + level());
//+(3+lvl) damage, equivalent to +67% damage
int dmgBoost = augment.damageFactor(3 + buffedLvl());
lungeAbility(hero, target, 1, dmgBoost, this);
}
@Override
public String abilityInfo() {
int dmgBoost = levelKnown ? 3+buffedLvl() : 3;
if (levelKnown){
return Messages.get(this, "ability_desc", augment.damageFactor(min()+3+level()), augment.damageFactor(max()+3+level()));
return Messages.get(this, "ability_desc", augment.damageFactor(min()+dmgBoost), augment.damageFactor(max()+dmgBoost));
} else {
return Messages.get(this, "typical_ability_desc", min(0)+3, max(0)+3);
return Messages.get(this, "typical_ability_desc", min(0)+dmgBoost, max(0)+dmgBoost);
}
}

View File

@@ -61,10 +61,22 @@ public class Sai extends MeleeWeapon {
@Override
protected void duelistAbility(Hero hero, Integer target) {
Sai.comboStrikeAbility(hero, target, 0.40f, this);
//+(2.5+0.5*lvl) damage, roughly equivalent to +40% damage
int dmgBoost = augment.damageFactor(Math.round(2.5f + 0.5f*buffedLvl()));
Sai.comboStrikeAbility(hero, target, 0, dmgBoost, this);
}
public static void comboStrikeAbility(Hero hero, Integer target, float boostPerHit, MeleeWeapon wep){
@Override
public String abilityInfo() {
int dmgBoost = levelKnown ? Math.round(2.5f + 0.5f*buffedLvl()) : 3;
if (levelKnown){
return Messages.get(this, "ability_desc", augment.damageFactor(dmgBoost));
} else {
return Messages.get(this, "typical_ability_desc", augment.damageFactor(dmgBoost));
}
}
public static void comboStrikeAbility(Hero hero, Integer target, float multiPerHit, int boostPerHit, MeleeWeapon wep){
if (target == null) {
return;
}
@@ -96,7 +108,7 @@ public class Sai extends MeleeWeapon {
buff.detach();
}
boolean hit = hero.attack(enemy, 1f + boostPerHit*recentHits, 0, Char.INFINITE_ACCURACY);
boolean hit = hero.attack(enemy, 1f + multiPerHit*recentHits, boostPerHit*recentHits, Char.INFINITE_ACCURACY);
if (hit && !enemy.isAlive()){
wep.onAbilityKill(hero, enemy);
}

View File

@@ -53,15 +53,18 @@ public class Shortsword extends MeleeWeapon {
@Override
protected void duelistAbility(Hero hero, Integer target) {
Sword.cleaveAbility(hero, target, 1.30f, this);
//+(2.5+0.6*lvl) damage, roughly equivalent to +30% damage
int dmgBoost = augment.damageFactor(Math.round(2.5f + 0.6f*buffedLvl()));
Sword.cleaveAbility(hero, target, 1, dmgBoost, this);
}
@Override
public String abilityInfo() {
if (levelKnown) {
return Messages.get(this, "ability_desc", augment.damageFactor(Math.round(min() * 1.30f)), augment.damageFactor(Math.round(max() * 1.30f)));
int dmgBoost = levelKnown ? Math.round(2.5f + 0.6f*buffedLvl()) : 3;
if (levelKnown){
return Messages.get(this, "ability_desc", augment.damageFactor(min()+dmgBoost), augment.damageFactor(max()+dmgBoost));
} else {
return Messages.get(this, "typical_ability_desc", Math.round(min(0) * 1.30f), Math.round(max(0) * 1.30f));
return Messages.get(this, "typical_ability_desc", min(0)+dmgBoost, max(0)+dmgBoost);
}
}
}

View File

@@ -65,19 +65,23 @@ public class Sickle extends MeleeWeapon {
@Override
protected void duelistAbility(Hero hero, Integer target) {
harvestAbility(hero, target, 1.10f, this);
//+(1.1+lvl/5) damage, roughly equivalent to +10% damage
//..yes such a small boost is very silly
int dmgBoost = augment.damageFactor(Math.round(1.1f + buffedLvl()/5f));
harvestAbility(hero, target, 1f, dmgBoost, this);
}
@Override
public String abilityInfo() {
if (levelKnown) {
return Messages.get(this, "ability_desc", augment.damageFactor(Math.round(min() * 1.10f)), augment.damageFactor(Math.round(max() * 1.10f)));
int dmgBoost = levelKnown ? Math.round(1.1f + buffedLvl()/5f) : 1;
if (levelKnown){
return Messages.get(this, "ability_desc", augment.damageFactor(min()+dmgBoost), augment.damageFactor(max()+dmgBoost));
} else {
return Messages.get(this, "typical_ability_desc", Math.round(min(0) * 1.10f), Math.round(max(0) * 1.10f));
return Messages.get(this, "typical_ability_desc", min(0)+dmgBoost, max(0)+dmgBoost);
}
}
public static void harvestAbility(Hero hero, Integer target, float bleedFactor, MeleeWeapon wep){
public static void harvestAbility(Hero hero, Integer target, float bleedMulti, int bleedBoost, MeleeWeapon wep){
if (target == null) {
return;
@@ -103,8 +107,8 @@ public class Sickle extends MeleeWeapon {
wep.beforeAbilityUsed(hero, enemy);
AttackIndicator.target(enemy);
Buff.affect(enemy, HarvestBleedTracker.class, 0).bleedFactor = bleedFactor;
if (hero.attack(enemy, 1f, 0, Char.INFINITE_ACCURACY)){
Buff.affect(enemy, HarvestBleedTracker.class, 0);
if (hero.attack(enemy, bleedMulti, bleedBoost, Char.INFINITE_ACCURACY)){
Sample.INSTANCE.play(Assets.Sounds.HIT_STRONG);
}
@@ -119,8 +123,6 @@ public class Sickle extends MeleeWeapon {
}
public static class HarvestBleedTracker extends FlavourBuff{
public float bleedFactor;
};
public static class HarvestBleedTracker extends FlavourBuff{};
}

View File

@@ -61,19 +61,22 @@ public class Spear extends MeleeWeapon {
@Override
protected void duelistAbility(Hero hero, Integer target) {
Spear.spikeAbility(hero, target, 1.45f, this);
//+(5+lvl) damage, roughly equivalent to +45% damage
int dmgBoost = augment.damageFactor(5 + buffedLvl());
Spear.spikeAbility(hero, target, 1, dmgBoost, this);
}
@Override
public String abilityInfo() {
if (levelKnown) {
return Messages.get(this, "ability_desc", augment.damageFactor(Math.round(min() * 1.45f)), augment.damageFactor(Math.round(max() * 1.45f)));
int dmgBoost = levelKnown ? 5 + buffedLvl() : 5;
if (levelKnown){
return Messages.get(this, "ability_desc", augment.damageFactor(min()+dmgBoost), augment.damageFactor(max()+dmgBoost));
} else {
return Messages.get(this, "typical_ability_desc", Math.round(min(0) * 1.45f), Math.round(max(0) * 1.45f));
return Messages.get(this, "typical_ability_desc", min(0)+dmgBoost, max(0)+dmgBoost);
}
}
public static void spikeAbility(Hero hero, Integer target, float dmgMulti, MeleeWeapon wep){
public static void spikeAbility(Hero hero, Integer target, float dmgMulti, int dmgBoost, MeleeWeapon wep){
if (target == null) {
return;
}
@@ -98,7 +101,7 @@ public class Spear extends MeleeWeapon {
wep.beforeAbilityUsed(hero, enemy);
AttackIndicator.target(enemy);
int oldPos = enemy.pos;
if (hero.attack(enemy, dmgMulti, 0, Char.INFINITE_ACCURACY)) {
if (hero.attack(enemy, dmgMulti, dmgBoost, Char.INFINITE_ACCURACY)) {
if (enemy.isAlive() && enemy.pos == oldPos){
//trace a ballistica to our target (which will also extend past them
Ballistica trajectory = new Ballistica(hero.pos, enemy.pos, Ballistica.STOP_TARGET);

View File

@@ -63,19 +63,22 @@ public class Sword extends MeleeWeapon {
@Override
protected void duelistAbility(Hero hero, Integer target) {
Sword.cleaveAbility(hero, target, 1.27f, this);
//+(3+0.67*lvl) damage, roughly equivalent to +27% damage
int dmgBoost = augment.damageFactor(3 + Math.round(0.67f*buffedLvl()));
Sword.cleaveAbility(hero, target, 1, dmgBoost, this);
}
@Override
public String abilityInfo() {
if (levelKnown) {
return Messages.get(this, "ability_desc", augment.damageFactor(Math.round(min() * 1.27f)), augment.damageFactor(Math.round(max() * 1.27f)));
int dmgBoost = levelKnown ? 3+Math.round(0.67f*buffedLvl()) : 3;
if (levelKnown){
return Messages.get(this, "ability_desc", augment.damageFactor(min()+dmgBoost), augment.damageFactor(max()+dmgBoost));
} else {
return Messages.get(this, "typical_ability_desc", Math.round(min(0) * 1.27f), Math.round(max(0) * 1.27f));
return Messages.get(this, "typical_ability_desc", min(0)+dmgBoost, max(0)+dmgBoost);
}
}
public static void cleaveAbility(Hero hero, Integer target, float dmgMulti, MeleeWeapon wep){
public static void cleaveAbility(Hero hero, Integer target, float dmgMulti, int dmgBoost, MeleeWeapon wep){
if (target == null) {
return;
}
@@ -99,7 +102,7 @@ public class Sword extends MeleeWeapon {
public void call() {
wep.beforeAbilityUsed(hero, enemy);
AttackIndicator.target(enemy);
if (hero.attack(enemy, dmgMulti, 0, Char.INFINITE_ACCURACY)){
if (hero.attack(enemy, dmgMulti, dmgBoost, Char.INFINITE_ACCURACY)){
Sample.INSTANCE.play(Assets.Sounds.HIT_STRONG);
}

View File

@@ -61,15 +61,18 @@ public class WarHammer extends MeleeWeapon {
@Override
protected void duelistAbility(Hero hero, Integer target) {
Mace.heavyBlowAbility(hero, target, 1.30f, this);
//+(4+lvl) damage, roughly equivalent to +30% damage
int dmgBoost = augment.damageFactor(4 + buffedLvl());
Mace.heavyBlowAbility(hero, target, 1, dmgBoost, this);
}
@Override
public String abilityInfo() {
if (levelKnown) {
return Messages.get(this, "ability_desc", augment.damageFactor(Math.round(min() * 1.30f)), augment.damageFactor(Math.round(max() * 1.30f)));
int dmgBoost = levelKnown ? 4 + buffedLvl() : 4;
if (levelKnown){
return Messages.get(this, "ability_desc", augment.damageFactor(min()+dmgBoost), augment.damageFactor(max()+dmgBoost));
} else {
return Messages.get(this, "typical_ability_desc", Math.round(min(0) * 1.30f), Math.round(max(0) * 1.30f));
return Messages.get(this, "typical_ability_desc", min(0)+dmgBoost, max(0)+dmgBoost);
}
}

View File

@@ -56,15 +56,16 @@ public class WarScythe extends MeleeWeapon {
@Override
protected void duelistAbility(Hero hero, Integer target) {
Sickle.harvestAbility(hero, target, 1f, this);
//uses the weapon's norma damage
Sickle.harvestAbility(hero, target, 1f, 0, this);
}
@Override
public String abilityInfo() {
if (levelKnown) {
return Messages.get(this, "ability_desc", augment.damageFactor(Math.round(min() * 1.0f)), augment.damageFactor(Math.round(max() * 1.0f)));
return Messages.get(this, "ability_desc", augment.damageFactor(min()), augment.damageFactor(max()));
} else {
return Messages.get(this, "typical_ability_desc", Math.round(min(0) * 1.0f), Math.round(max(0) * 1.0f));
return Messages.get(this, "typical_ability_desc", min(0), max(0));
}
}

View File

@@ -55,15 +55,18 @@ public class WornShortsword extends MeleeWeapon {
@Override
protected void duelistAbility(Hero hero, Integer target) {
Sword.cleaveAbility(hero, target, 1.33f, this);
//+(2+lvl/2) damage, roughly equivalent to +33% damage
int dmgBoost = augment.damageFactor(2 + Math.round(buffedLvl()/2f));
Sword.cleaveAbility(hero, target, 1, dmgBoost, this);
}
@Override
public String abilityInfo() {
if (levelKnown) {
return Messages.get(this, "ability_desc", augment.damageFactor(Math.round(min() * 1.33f)), augment.damageFactor(Math.round(max() * 1.33f)));
int dmgBoost = levelKnown ? 2+Math.round(buffedLvl()/2f) : 2;
if (levelKnown){
return Messages.get(this, "ability_desc", augment.damageFactor(min()+dmgBoost), augment.damageFactor(max()+dmgBoost));
} else {
return Messages.get(this, "typical_ability_desc", Math.round(min(0) * 1.33f), Math.round(max(0) * 1.33f));
return Messages.get(this, "typical_ability_desc", min(0)+dmgBoost, max(0)+dmgBoost);
}
}