v0.9.2: implemented the durable tips talent

This commit is contained in:
Evan Debenham 2021-01-26 23:06:44 -05:00
parent c9a21e5417
commit 6df80d2b3b
3 changed files with 8 additions and 9 deletions

View File

@ -401,6 +401,8 @@ actors.hero.talent.point_blank.title=point blank
actors.hero.talent.point_blank.desc=_+1:_ When the Huntress uses a thrown weapon at melee range it has _-30% accuracy,_ instead of -50%.\n\n_+2:_ When the Huntress uses a thrown weapon at melee range it has _-10% accuracy,_ instead of -50%.\n\n_+3:_ When the Huntress uses a thrown weapon at melee range it has _+10% accuracy,_ instead of -50%.\n\nNote that thrown weapons always have +50% accuracy when used at a distance.
actors.hero.talent.farsight.title=farsight
actors.hero.talent.farsight.desc=_+1:_ The Sniper's vision range is _increased by 25%_\n\n_+2:_ The Sniper's vision range is _increased by 50%_\n\n_+3:_ The Sniper's vision range is _increased by 75%_
actors.hero.talent.durable_tips.title=durable tips
actors.hero.talent.durable_tips.desc=_+1:_ Tipped darts have _2x durability_ when the Warden uses them.\n\n_+2:_ Tipped darts have _3x durability_ when the Warden uses them.\n\n_+3:_ Tipped darts have _4x durability_ when the Warden uses them.
actors.hero.hero.name=you
actors.hero.hero.leave=You can't leave yet, the rest of the dungeon awaits below!

View File

@ -108,7 +108,7 @@ public enum Talent {
//Sniper T3
FARSIGHT(107, 3), SNIPER_T3_2(108, 3), SNIPER_T3_3(109, 3),
//Warden T3
WARDEN_T3_1(110, 3), WARDEN_T3_2(111, 3), WARDEN_T3_3(112, 3);
DURABLE_TIPS(110, 3), WARDEN_T3_2(111, 3), WARDEN_T3_3(112, 3);
public static class ImprovisedProjectileCooldown extends FlavourBuff{};
public static class LethalMomentumTracker extends FlavourBuff{};
@ -477,7 +477,7 @@ public enum Talent {
Collections.addAll(tierTalents, FARSIGHT, SNIPER_T3_2, SNIPER_T3_3);
break;
case WARDEN:
Collections.addAll(tierTalents, WARDEN_T3_1, WARDEN_T3_2, WARDEN_T3_3);
Collections.addAll(tierTalents, DURABLE_TIPS, WARDEN_T3_2, WARDEN_T3_3);
break;
}
for (Talent talent : tierTalents){

View File

@ -27,7 +27,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.PinCushion;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroSubClass;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent;
import com.shatteredpixel.shatteredpixeldungeon.items.Generator;
import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfRegrowth;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
@ -56,8 +56,7 @@ public abstract class TippedDart extends Dart {
{
tier = 2;
//so that 1.5x durability is needed for 2 uses
baseUses = 0.67f;
baseUses = 1f;
}
private static final String AC_CLEAN = "CLEAN";
@ -131,9 +130,7 @@ public abstract class TippedDart extends Dart {
protected float durabilityPerUse() {
float use = super.durabilityPerUse();
if (Dungeon.hero.subClass == HeroSubClass.WARDEN){
use /= 2f;
}
use /= (1 + Dungeon.hero.pointsInTalent(Talent.DURABLE_TIPS));
//checks both destination and source position
float lotusPreserve = 0f;