v2.1.0: added visible buffs for some talent effects

This commit is contained in:
Evan Debenham
2023-05-18 11:36:43 -04:00
parent 0bbd63be30
commit 965289eba6
3 changed files with 67 additions and 18 deletions

View File

@@ -591,6 +591,10 @@ actors.hero.herosubclass.monk_short_desc=The _Monk_ builds energy while fighting
actors.hero.herosubclass.monk_desc=The Monk is a master of physical technique. As she defeats enemies, she gains energy which can be used on a variety of defensive and utlity-focused abilities. This energy does not fade over time, but has a cap based on the Monk's level.
##talents
actors.hero.talent$followupstriketracker.name=followup strike
actors.hero.talent$followupstriketracker.desc=The Huntress has recently attacked with a thrown weapon, her next melee attack against the same target will have boosted damage.\n\nTurns remaining: %s.
actors.hero.talent$patientstriketracker.name=patient strike
actors.hero.talent$patientstriketracker.desc=The Duelist has just spent a turn waiting, her next melee attack will deal bonus damage.
actors.hero.talent$improvisedprojectilecooldown.name=improvised projectiles cooldown
actors.hero.talent$improvisedprojectilecooldown.desc=You have recently used this talent, and must wait before using it again.\n\nTurns remaining: %s.
actors.hero.talent$rejuvenatingstepscooldown.name=rejuvenating steps cooldown
@@ -605,6 +609,8 @@ actors.hero.talent$swiftequipcooldown.name=swift equip cooldown
actors.hero.talent$swiftequipcooldown.desc=You have recently used this talent, and must wait before using it again.\n\nTurns remaining: %s.
actors.hero.talent$preciseassaulttracker.name=precise assault
actors.hero.talent$preciseassaulttracker.desc=The Duelist's next regular melee attack will gain bonus accuracy.\n\nTurns remaining: %s.
actors.hero.talent$deadlyfollowuptracker.name=deadly followup
actors.hero.talent$deadlyfollowuptracker.desc=The Duelist has recently attacked an enemy with a thrown weapon, her melee attacks against the same target will have boosted damage.\n\nTurns remaining: %s.
actors.hero.talent$combinedlethalitytriggertracker.name=combined lethality
actors.hero.talent$combinedlethalitytriggertracker.executed=executed
actors.hero.talent$combinedlethalitytriggertracker.desc=The Duelist's next attack will execute enemies below a certain health threshold.\n\nTurns remaining: %s.

View File

@@ -800,6 +800,14 @@ public abstract class Char extends Actor {
if (ch.buff(SnipersMark.class) != null && ch.buff(SnipersMark.class).object == id()){
ch.buff(SnipersMark.class).detach();
}
if (ch.buff(Talent.FollowupStrikeTracker.class) != null
&& ch.buff(Talent.FollowupStrikeTracker.class).object == id()){
ch.buff(Talent.FollowupStrikeTracker.class).detach();
}
if (ch.buff(Talent.DeadlyFollowupTracker.class) != null
&& ch.buff(Talent.DeadlyFollowupTracker.class).object == id()){
ch.buff(Talent.DeadlyFollowupTracker.class).detach();
}
}
}

View File

@@ -231,12 +231,18 @@ public enum Talent {
public float iconFadePercent() { return Math.max(0, visualcooldown() / 20); }
};
public static class SpiritBladesTracker extends FlavourBuff{};
public static class PatientStrikeTracker extends FlavourBuff{};
public static class PatientStrikeTracker extends FlavourBuff {
{ type = Buff.buffType.POSITIVE; }
public int icon() { return BuffIndicator.TIME; }
public void tintIcon(Image icon) { icon.hardlight(0.5f, 0f, 1f); }
public String iconTextDisplay() { return ""; }
public float iconFadePercent() { return 0; }
};
public static class AggressiveBarrierCooldown extends FlavourBuff{
public int icon() { return BuffIndicator.TIME; }
public void tintIcon(Image icon) { icon.hardlight(0.35f, 0f, 0.7f); }
public float iconFadePercent() { return Math.max(0, visualcooldown() / 50); }
};;
};
public static class RestoredAgilityTracker extends FlavourBuff{};
public static class LethalHasteCooldown extends FlavourBuff{
public int icon() { return BuffIndicator.TIME; }
@@ -268,11 +274,29 @@ public enum Talent {
secondUse = bundle.getBoolean(SECOND_USE);
}
};
public static class DeadlyFollowupTracker extends FlavourBuff{};
public static class DeadlyFollowupTracker extends FlavourBuff{
public int object;
{ type = Buff.buffType.POSITIVE; }
public int icon() { return BuffIndicator.INVERT_MARK; }
public void tintIcon(Image icon) { icon.hardlight(0.5f, 0f, 1f); }
public float iconFadePercent() { return Math.max(0, 1f - (visualcooldown() / 5)); }
private static final String OBJECT = "object";
@Override
public void storeInBundle(Bundle bundle) {
super.storeInBundle(bundle);
bundle.put(OBJECT, object);
}
@Override
public void restoreFromBundle(Bundle bundle) {
super.restoreFromBundle(bundle);
object = bundle.getInt(OBJECT);
}
}
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 float iconFadePercent() { return Math.max(0, 1f - (visualcooldown() / 5)); }
};
public static class CombinedLethalityAbilityTracker extends FlavourBuff{
public MeleeWeapon weapon;
@@ -281,6 +305,7 @@ public enum Talent {
{ type = buffType.POSITIVE; }
public int icon() { return BuffIndicator.CORRUPT; }
public void tintIcon(Image icon) { icon.hardlight(0.6f, 0.15f, 0.6f); }
public float iconFadePercent() { return Math.max(0, 1f - (visualcooldown() / 5)); }
};
public static class CombinedEnergyAbilityTracker extends FlavourBuff{
public int energySpent = -1;
@@ -637,13 +662,11 @@ public enum Talent {
if (hero.hasTalent(Talent.FOLLOWUP_STRIKE)) {
if (hero.belongings.attackingWeapon() instanceof MissileWeapon) {
Buff.affect(enemy, FollowupStrikeTracker.class);
} else if (enemy.buff(FollowupStrikeTracker.class) != null){
Buff.prolong(hero, FollowupStrikeTracker.class, 5f).object = enemy.id();
} else if (hero.buff(FollowupStrikeTracker.class) != null
&& hero.buff(FollowupStrikeTracker.class).object == enemy.id()){
dmg += 1 + hero.pointsInTalent(FOLLOWUP_STRIKE);
if (!(enemy instanceof Mob) || !((Mob) enemy).surprisedBy(hero)){
Sample.INSTANCE.play(Assets.Sounds.HIT_STRONG, 0.75f, 1.2f);
}
enemy.buff(FollowupStrikeTracker.class).detach();
hero.buff(FollowupStrikeTracker.class).detach();
}
}
@@ -659,22 +682,17 @@ public enum Talent {
&& !(hero.belongings.attackingWeapon() instanceof MissileWeapon)){
hero.buff(PatientStrikeTracker.class).detach();
dmg += Random.IntRange(hero.pointsInTalent(Talent.PATIENT_STRIKE), 2);
if (!(enemy instanceof Mob) || !((Mob) enemy).surprisedBy(hero)){
Sample.INSTANCE.play(Assets.Sounds.HIT_STRONG, 0.75f, 1.2f);
}
}
}
if (hero.hasTalent(DEADLY_FOLLOWUP)) {
if (hero.belongings.attackingWeapon() instanceof MissileWeapon) {
if (!(hero.belongings.attackingWeapon() instanceof SpiritBow.SpiritArrow)) {
Buff.prolong(enemy, DeadlyFollowupTracker.class, 5f);
Buff.prolong(hero, DeadlyFollowupTracker.class, 5f).object = enemy.id();
}
} else if (enemy.buff(DeadlyFollowupTracker.class) != null){
} else if (hero.buff(DeadlyFollowupTracker.class) != null
&& hero.buff(DeadlyFollowupTracker.class).object == enemy.id()){
dmg = Math.round(dmg * (1.0f + .08f*hero.pointsInTalent(DEADLY_FOLLOWUP)));
if (!(enemy instanceof Mob) || !((Mob) enemy).surprisedBy(hero)){
Sample.INSTANCE.play(Assets.Sounds.HIT_STRONG, 0.75f, 1.2f);
}
}
}
@@ -682,7 +700,24 @@ public enum Talent {
}
public static class SuckerPunchTracker extends Buff{};
public static class FollowupStrikeTracker extends Buff{};
public static class FollowupStrikeTracker extends FlavourBuff{
public int object;
{ type = Buff.buffType.POSITIVE; }
public int icon() { return BuffIndicator.INVERT_MARK; }
public void tintIcon(Image icon) { icon.hardlight(0f, 0.75f, 1f); }
public float iconFadePercent() { return Math.max(0, 1f - (visualcooldown() / 5)); }
private static final String OBJECT = "object";
@Override
public void storeInBundle(Bundle bundle) {
super.storeInBundle(bundle);
bundle.put(OBJECT, object);
}
@Override
public void restoreFromBundle(Bundle bundle) {
super.restoreFromBundle(bundle);
object = bundle.getInt(OBJECT);
}
};
public static final int MAX_TALENT_TIERS = 4;