v0.9.2: added the projectile momentum talent

This commit is contained in:
Evan Debenham 2021-02-05 20:17:28 -05:00
parent c9cec834cf
commit cc7b5940b6
3 changed files with 17 additions and 2 deletions

View File

@ -388,6 +388,8 @@ actors.hero.talent.bounty_hunter.title=bounty hunter
actors.hero.talent.bounty_hunter.desc=_+1:_ When the Assassin kills an enemy with a prepared strike they drop _10 extra gold_.\n\n_+2:_ When the Assassin kills an enemy with a prepared strike they drop _20 extra gold_.\n\n_+3:_ When the Assassin kills an enemy with a prepared strike they drop _30 extra gold_.
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.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

@ -97,7 +97,7 @@ public enum Talent {
//Assassin T3
ENHANCED_LETHALITY(75, 3), ASSASSIN_T3_2(76, 3), BOUNTY_HUNTER(77, 3),
//Freerunner T3
EVASIVE_ARMOR(78, 3), FREERUNNER_T3_2(79, 3), FREERUNNER_T3_3(80, 3),
EVASIVE_ARMOR(78, 3), PROJECTILE_MOMENTUM(79, 3), FREERUNNER_T3_3(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, ASSASSIN_T3_2, BOUNTY_HUNTER);
break;
case FREERUNNER:
Collections.addAll(tierTalents, EVASIVE_ARMOR, FREERUNNER_T3_2, FREERUNNER_T3_3);
Collections.addAll(tierTalents, EVASIVE_ARMOR, PROJECTILE_MOMENTUM, FREERUNNER_T3_3);
break;
case SNIPER:
Collections.addAll(tierTalents, FARSIGHT, SNIPER_T3_2, SNIPER_T3_3);

View File

@ -26,6 +26,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Corruption;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Momentum;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.PinCushion;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent;
@ -150,6 +151,15 @@ abstract public class MissileWeapon extends Weapon {
}
}
@Override
public float accuracyFactor(Char owner) {
float accFactor = super.accuracyFactor(owner);
if (owner instanceof Hero && owner.buff(Momentum.class) != null && owner.buff(Momentum.class).freerunning()){
accFactor *= 1f + 0.2f*((Hero) owner).pointsInTalent(Talent.PROJECTILE_MOMENTUM);
}
return accFactor;
}
@Override
public void doThrow(Hero hero) {
parent = null; //reset parent before throwing, just incase
@ -270,6 +280,9 @@ abstract public class MissileWeapon extends Weapon {
if (exStr > 0) {
damage += Random.IntRange( 0, exStr );
}
if (owner.buff(Momentum.class) != null && owner.buff(Momentum.class).freerunning()) {
damage = Math.round(damage * (1f + 0.1f * ((Hero) owner).pointsInTalent(Talent.PROJECTILE_MOMENTUM)));
}
}
return damage;