v0.9.2: implemented the speedy stealth talent

This commit is contained in:
Evan Debenham 2021-02-12 18:37:18 -05:00
parent b28e7a99e2
commit 831e9fee20
4 changed files with 28 additions and 12 deletions

View File

@ -403,7 +403,9 @@ actors.hero.talent.bounty_hunter.desc=_+1:_ When the Assassin kills an enemy wit
actors.hero.talent.evasive_armor.title=evasive armor
actors.hero.talent.evasive_armor.desc=_+1:_ While freerunning, the Freerunner gains an additional _+1 evasion_ per excess point of strength on his armor.\n\n_+2:_ While freerunning, the Freerunner gains an additional _+2 evasion_ per excess point of strength on his armor.\n\n_+3:_ While freerunning, the Freerunner gains an additional _+3 evasion_ per excess point of strength on his armor.
actors.hero.talent.projectile_momentum.title=projectile momentum
actors.hero.talent.projectile_momentum.desc=_+1:_ While freerunning, the Freerunner gains _+20% accuracy and +10% damage_ with thrown weapons.\n\n_+1:_ While freerunning, the Freerunner gains _+40% accuracy and +20% damage_ with thrown weapons.\n\n_+1:_ While freerunning, the Freerunner gains _+60% accuracy and +30% damage_ with thrown weapons.
actors.hero.talent.projectile_momentum.desc=_+1:_ While freerunning, the Freerunner gains _+20% accuracy and +10% damage_ with thrown weapons.\n\n_+2:_ While freerunning, the Freerunner gains _+40% accuracy and +20% damage_ with thrown weapons.\n\n_+3:_ While freerunning, the Freerunner gains _+60% accuracy and +30% damage_ with thrown weapons.
actors.hero.talent.speedy_stealth.title=speedy stealth
actors.hero.talent.speedy_stealth.desc=_+1:_ The Freerunner gains 2 stacks of momentum per turn while he is invisible.\n\n_+2:_ In addition to the benefits of +1, freerunning no longer counts down while the Freerunner is invisible.\n\n_+3:_ In addition to the benefits of +1 and +2, The Freerunner moves at 2x speed while invisible, regardless of whether he is freerunning or not.
actors.hero.talent.natures_bounty.title=nature's bounty
actors.hero.talent.natures_bounty.desc=_+1:_ The Huntress can find _4 berries_ hidden in tall grass as she explores the earlier stages of the dungeon.\n\n_+2:_ The Huntress can find _6 berries_ hidden in tall grass as she explores the earlier stages of the dungeon.

View File

@ -52,8 +52,16 @@ public class Momentum extends Buff implements ActionIndicator.Action {
if (freerunCooldown > 0){
freerunCooldown--;
}
if (freerunCooldown == 0 && target.invisible > 0 && Dungeon.hero.pointsInTalent(Talent.SPEEDY_STEALTH) >= 1){
momentumStacks = Math.min(momentumStacks + 2, 10);
movedLastTurn = true;
}
if (freerunTurns > 0){
freerunTurns--;
if (target.invisible == 0 || Dungeon.hero.pointsInTalent(Talent.SPEEDY_STEALTH) < 2) {
freerunTurns--;
}
} else if (!movedLastTurn){
momentumStacks = Math.min(momentumStacks -1, Math.round(momentumStacks * 0.667f));
if (momentumStacks <= 0) {
@ -81,7 +89,13 @@ public class Momentum extends Buff implements ActionIndicator.Action {
}
public float speedMultiplier(){
return (freerunTurns > 0) ? 2 : 1;
if (freerunning()){
return 2;
} else if (target.invisible > 0 && Dungeon.hero.pointsInTalent(Talent.SPEEDY_STEALTH) == 3){
return 2;
} else {
return 1;
}
}
public int evasionBonus( int heroLvl, int excessArmorStr ){

View File

@ -483,8 +483,8 @@ public class Hero extends Char {
}
Momentum momentum = buff(Momentum.class);
if (momentum != null && momentum.freerunning()){
((HeroSprite)sprite).sprint( 1.5f );
if (momentum != null){
((HeroSprite)sprite).sprint( momentum.freerunning() ? 1.5f : 1f );
speed *= momentum.speedMultiplier();
} else {
((HeroSprite)sprite).sprint( 1f );
@ -1294,7 +1294,11 @@ public class Hero extends Char {
}
if (step != -1) {
if (subClass == HeroSubClass.FREERUNNER){
Buff.affect(this, Momentum.class).gainStack();
}
float speed = speed();
sprite.move(pos, step);
@ -1304,10 +1308,6 @@ public class Hero extends Char {
justMoved = true;
search(false);
if (subClass == HeroSubClass.FREERUNNER){
Buff.affect(this, Momentum.class).gainStack();
}
return true;

View File

@ -97,7 +97,7 @@ public enum Talent {
//Assassin T3
ENHANCED_LETHALITY(75, 3), ASSASSINS_REACH(76, 3), BOUNTY_HUNTER(77, 3),
//Freerunner T3
EVASIVE_ARMOR(78, 3), PROJECTILE_MOMENTUM(79, 3), FREERUNNER_T3_3(80, 3),
EVASIVE_ARMOR(78, 3), PROJECTILE_MOMENTUM(79, 3), SPEEDY_STEALTH(80, 3),
//Huntress T1
NATURES_BOUNTY(96), SURVIVALISTS_INTUITION(97), FOLLOWUP_STRIKE(98), NATURES_AID(99),
@ -473,7 +473,7 @@ public enum Talent {
Collections.addAll(tierTalents, ENHANCED_LETHALITY, ASSASSINS_REACH, BOUNTY_HUNTER);
break;
case FREERUNNER:
Collections.addAll(tierTalents, EVASIVE_ARMOR, PROJECTILE_MOMENTUM, FREERUNNER_T3_3);
Collections.addAll(tierTalents, EVASIVE_ARMOR, PROJECTILE_MOMENTUM, SPEEDY_STEALTH);
break;
case SNIPER:
Collections.addAll(tierTalents, FARSIGHT, SHARED_ENCHANTMENT, SHARED_UPGRADES);