v0.9.1: adjusted and implemented the lethal momentum talent

This commit is contained in:
Evan Debenham 2020-11-30 14:55:24 -05:00
parent c4b9a1a72a
commit a24cc62cb5
4 changed files with 13 additions and 1 deletions

View File

@ -331,7 +331,7 @@ actors.hero.talent.restored_willpower.desc=_+1:_ Drinking a potion of healing in
actors.hero.talent.runic_transference.title=runic transference
actors.hero.talent.runic_transference.desc=_+1:_ The Warrior's broken seal can transfer _common glyphs_ in the same way it transfers an upgrade.\n\n_+2:_ The Warrior's broken seal can transfer _common and uncommon glyphs_ in the same way it transfers an upgrade.
actors.hero.talent.lethal_momentum.title=lethal momentum
actors.hero.talent.lethal_momentum.desc=_+1:_ When the Warrior kills an enemy, his next attack within _1 turn_ is instantaneous.\n\n_+2:_ When the Warrior kills an enemy, his next attack within _3 turns_ is instantaneous.
actors.hero.talent.lethal_momentum.desc=_+1:_ When the Warrior kills an enemy, the killing blow has a _67% chance_ to be instantaneous.\n\n_+2:_ When the Warrior kills an enemy, the killing blow has a _100% chance_ to be instantaneous.
actors.hero.talent.improvised_projectiles.title=improvised projectiles
actors.hero.talent.improvised_projectiles.desc=_+1:_ The Warrior can blind an enemy for _2 turns_ by throwing any item that isnt a thrown weapon at them. This has a 30 turn cooldown.\n\n_+2:_ The Warrior can blind an enemy for _3 turns_ by throwing any item that isnt a thrown weapon at them. This has a 30 turn cooldown.

View File

@ -527,6 +527,11 @@ public class Hero extends Char {
}
public float attackDelay() {
if (buff(Talent.LethalMomentumTracker.class) != null){
buff(Talent.LethalMomentumTracker.class).detach();
return 0;
}
if (belongings.weapon != null) {
return belongings.weapon.speedFactor( this );

View File

@ -107,6 +107,7 @@ public enum Talent {
DURABLE_PROJECTILES(56);
public static class ImprovisedProjectileCooldown extends FlavourBuff{};
public static class LethalMomentumTracker extends FlavourBuff{};
public static class RejuvenatingStepsCooldown extends FlavourBuff{};
int icon;

View File

@ -670,6 +670,12 @@ public abstract class Mob extends Char {
if (alignment == Alignment.ENEMY){
rollToDropLoot();
if (cause == Dungeon.hero
&& Dungeon.hero.hasTalent(Talent.LETHAL_MOMENTUM)
&& Random.Float() < 0.34f + 0.33f* Dungeon.hero.pointsInTalent(Talent.LETHAL_MOMENTUM)){
Buff.affect(Dungeon.hero, Talent.LethalMomentumTracker.class, 1f);
}
}
if (Dungeon.hero.isAlive() && !Dungeon.level.heroFOV[pos]) {