v2.1.0: added an icon for precise assault and fixed a flail interaction
This commit is contained in:
@@ -269,7 +269,11 @@ public enum Talent {
|
||||
}
|
||||
};
|
||||
public static class DeadlyFollowupTracker extends FlavourBuff{};
|
||||
public static class PreciseAssaultTracker extends FlavourBuff{};
|
||||
public static class PreciseAssaultTracker extends FlavourBuff{
|
||||
{ type = buffType.POSITIVE; }
|
||||
public int icon() { return BuffIndicator.INVERT_MARK; }
|
||||
public void tintIcon(Image icon) { icon.hardlight(1f, 1f, 0.0f); }
|
||||
};
|
||||
public static class CombinedLethalityAbilityTracker extends FlavourBuff{
|
||||
public MeleeWeapon weapon;
|
||||
};
|
||||
|
||||
@@ -218,10 +218,6 @@ public class MeleeWeapon extends Weapon {
|
||||
Buff.affect(hero, Barrier.class).setShield(3);
|
||||
}
|
||||
|
||||
if (hero.buff(Talent.PreciseAssaultTracker.class) != null) {
|
||||
hero.buff(Talent.PreciseAssaultTracker.class).detach();
|
||||
}
|
||||
|
||||
if (hero.buff(Talent.CombinedLethalityAbilityTracker.class) != null
|
||||
&& hero.buff(Talent.CombinedLethalityAbilityTracker.class).weapon != null
|
||||
&& hero.buff(Talent.CombinedLethalityAbilityTracker.class).weapon != this){
|
||||
@@ -234,7 +230,7 @@ public class MeleeWeapon extends Weapon {
|
||||
protected void afterAbilityUsed( Hero hero ){
|
||||
hero.belongings.abilityWeapon = null;
|
||||
if (hero.hasTalent(Talent.PRECISE_ASSAULT)){
|
||||
Buff.affect(hero, Talent.PreciseAssaultTracker.class, hero.cooldown()+4f);
|
||||
Buff.prolong(hero, Talent.PreciseAssaultTracker.class, hero.cooldown()+4f);
|
||||
}
|
||||
if (hero.hasTalent(Talent.COMBINED_LETHALITY)) {
|
||||
Talent.CombinedLethalityAbilityTracker tracker = hero.buff(Talent.CombinedLethalityAbilityTracker.class);
|
||||
@@ -320,10 +316,15 @@ public class MeleeWeapon extends Weapon {
|
||||
public float accuracyFactor(Char owner, Char target) {
|
||||
float ACC = super.accuracyFactor(owner, target);
|
||||
|
||||
if (owner instanceof Hero && ((Hero) owner).hasTalent(Talent.PRECISE_ASSAULT)) {
|
||||
if (((Hero) owner).heroClass != HeroClass.DUELIST){
|
||||
if (owner instanceof Hero
|
||||
&& ((Hero) owner).hasTalent(Talent.PRECISE_ASSAULT)
|
||||
//does not trigger on ability attacks
|
||||
&& ((Hero) owner).belongings.abilityWeapon != this) {
|
||||
if (((Hero) owner).heroClass != HeroClass.DUELIST) {
|
||||
//persistent +10%/20%/30% ACC for other heroes
|
||||
ACC *= 1f + 0.1f*((Hero) owner).pointsInTalent(Talent.PRECISE_ASSAULT);
|
||||
ACC *= 1f + 0.1f * ((Hero) owner).pointsInTalent(Talent.PRECISE_ASSAULT);
|
||||
} else if (this instanceof Flail && owner.buff(Flail.SpinAbilityTracker.class) != null){
|
||||
//do nothing, this is not a regular attack so don't consume preciase assault
|
||||
} else if (owner.buff(Talent.PreciseAssaultTracker.class) != null) {
|
||||
// 2x/4x/8x ACC for duelist if she just used a weapon ability
|
||||
ACC *= Math.pow(2, ((Hero) owner).pointsInTalent(Talent.PRECISE_ASSAULT));
|
||||
|
||||
Reference in New Issue
Block a user