v2.0.0: fixed several missing bits in flail ability
This commit is contained in:
@@ -1514,6 +1514,8 @@ 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.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 +20% damage, to a max of 3 times. At 3 spins the 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 +20% damage, to a max of 3 times. At 3 spins the 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.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 20%%. At 60%% bonus damage, the flail is also guaranteed to hit.\n\nCurrent bonus damage: %1$d%%.\nTurns remaining: %2$s.
|
||||||
|
|
||||||
items.weapon.melee.gauntlet.name=stone gauntlet
|
items.weapon.melee.gauntlet.name=stone gauntlet
|
||||||
items.weapon.melee.gauntlet.stats_desc=This is a very fast weapon.
|
items.weapon.melee.gauntlet.stats_desc=This is a very fast weapon.
|
||||||
|
|||||||
+20
-11
@@ -53,26 +53,30 @@ public class Flail extends MeleeWeapon {
|
|||||||
lvl*Math.round(1.6f*(tier+1)); //+8 per level, up from +5
|
lvl*Math.round(1.6f*(tier+1)); //+8 per level, up from +5
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static float spinBonus = 1f;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int damageRoll(Char owner) {
|
public int damageRoll(Char owner) {
|
||||||
int dmg = super.damageRoll(owner);
|
int dmg = Math.round(super.damageRoll(owner) * spinBonus);
|
||||||
|
if (spinBonus == 1.6f) Sample.INSTANCE.play(Assets.Sounds.HIT_STRONG);
|
||||||
SpinAbilityTracker spin = owner.buff(SpinAbilityTracker.class);
|
spinBonus = 1f;
|
||||||
if (spin != null){
|
|
||||||
dmg = Math.round(dmg * (1f + 0.2f*spin.spins));
|
|
||||||
if (spin.spins == 3) Sample.INSTANCE.play(Assets.Sounds.HIT_STRONG);
|
|
||||||
spin.detach();
|
|
||||||
}
|
|
||||||
|
|
||||||
return dmg;
|
return dmg;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public float accuracyFactor(Char owner, Char target) {
|
public float accuracyFactor(Char owner, Char target) {
|
||||||
SpinAbilityTracker spin = owner.buff(SpinAbilityTracker.class);
|
SpinAbilityTracker spin = owner.buff(SpinAbilityTracker.class);
|
||||||
if (spin != null && spin.spins >= 3f) {
|
if (spin != null) {
|
||||||
return Float.POSITIVE_INFINITY;
|
//we detach and calculate bonus here in case the attack misses
|
||||||
|
spin.detach();
|
||||||
|
spinBonus = 1f + 0.2f*spin.spins;
|
||||||
|
if (spinBonus == 1.6f){
|
||||||
|
return Float.POSITIVE_INFINITY;
|
||||||
|
} else {
|
||||||
|
return super.accuracyFactor(owner, target);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
|
spinBonus = 1f;
|
||||||
return super.accuracyFactor(owner, target);
|
return super.accuracyFactor(owner, target);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -137,6 +141,11 @@ public class Flail extends MeleeWeapon {
|
|||||||
return Math.max(0, (3 - visualcooldown()) / 3);
|
return Math.max(0, (3 - visualcooldown()) / 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String desc() {
|
||||||
|
return Messages.get(this, "desc", 20*spins, dispTurns());
|
||||||
|
}
|
||||||
|
|
||||||
public static String SPINS = "spins";
|
public static String SPINS = "spins";
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user