v0.9.2: implemented the barkskin talent
This commit is contained in:
parent
cacc689429
commit
320b634425
|
@ -417,6 +417,8 @@ 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.talent.barkskin.title=barkskin
|
||||
actors.hero.talent.barkskin.desc=_+1:_ When stepping in grass, the Warden gains barkskin equivalent to her level for _1 turn_.\n\n_+2:_ When stepping in grass, the Warden gains barkskin equivalent to her level for _2 turns_.\n\n_+3:_ When stepping in grass, the Warden gains barkskin equivalent to her level for _3 turns_.
|
||||
|
||||
actors.hero.hero.name=you
|
||||
actors.hero.hero.leave=You can't leave yet, the rest of the dungeon awaits below!
|
||||
|
|
|
@ -59,7 +59,7 @@ public class Barkskin extends Buff {
|
|||
|
||||
public void set( int value, int time ) {
|
||||
//decide whether to override, preferring high value + low interval
|
||||
if (Math.sqrt(interval)*level < Math.sqrt(time)*value) {
|
||||
if (Math.sqrt(interval)*level <= Math.sqrt(time)*value) {
|
||||
level = value;
|
||||
interval = time;
|
||||
spend(time - cooldown() - 1);
|
||||
|
@ -74,7 +74,7 @@ public class Barkskin extends Buff {
|
|||
@Override
|
||||
public float iconFadePercent() {
|
||||
if (target instanceof Hero){
|
||||
float max = ((Hero) target).lvl + 5;
|
||||
float max = ((Hero) target).lvl;
|
||||
return (max-level)/max;
|
||||
}
|
||||
return 0;
|
||||
|
|
|
@ -643,8 +643,8 @@ public class Hero extends Char {
|
|||
}
|
||||
}
|
||||
|
||||
if( subClass == HeroSubClass.WARDEN && Dungeon.level.map[pos] == Terrain.FURROWED_GRASS){
|
||||
Buff.affect(this, Barkskin.class).set( lvl + 5, 1 );
|
||||
if(hasTalent(Talent.BARKSKIN) && Dungeon.level.map[pos] == Terrain.FURROWED_GRASS){
|
||||
Buff.affect(this, Barkskin.class).set( lvl, pointsInTalent(Talent.BARKSKIN) );
|
||||
}
|
||||
|
||||
return actResult;
|
||||
|
|
|
@ -108,7 +108,7 @@ public enum Talent {
|
|||
//Sniper T3
|
||||
FARSIGHT(107, 3), SNIPER_T3_2(108, 3), SNIPER_T3_3(109, 3),
|
||||
//Warden T3
|
||||
DURABLE_TIPS(110, 3), WARDEN_T3_2(111, 3), WARDEN_T3_3(112, 3);
|
||||
DURABLE_TIPS(110, 3), BARKSKIN(111, 3), WARDEN_T3_3(112, 3);
|
||||
|
||||
public static class ImprovisedProjectileCooldown extends FlavourBuff{};
|
||||
public static class LethalMomentumTracker extends FlavourBuff{};
|
||||
|
@ -479,7 +479,7 @@ public enum Talent {
|
|||
Collections.addAll(tierTalents, FARSIGHT, SNIPER_T3_2, SNIPER_T3_3);
|
||||
break;
|
||||
case WARDEN:
|
||||
Collections.addAll(tierTalents, DURABLE_TIPS, WARDEN_T3_2, WARDEN_T3_3);
|
||||
Collections.addAll(tierTalents, DURABLE_TIPS, BARKSKIN, WARDEN_T3_3);
|
||||
break;
|
||||
}
|
||||
for (Talent talent : tierTalents){
|
||||
|
|
Loading…
Reference in New Issue
Block a user