v0.9.2: implemented the farsight talent
This commit is contained in:
parent
778fafbcdd
commit
37ddbe19e6
|
@ -395,6 +395,8 @@ actors.hero.talent.durable_projectiles.title=durable projectiles
|
|||
actors.hero.talent.durable_projectiles.desc=_+1:_ Thrown weapons have _+50% durability_ when used by the Huntress.\n\n_+2:_ Thrown weapons have _+75% durability_ when used by the Huntress.
|
||||
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.hero.name=you
|
||||
actors.hero.hero.leave=You can't leave yet, the rest of the dungeon awaits below!
|
||||
|
|
|
@ -28,6 +28,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Awareness;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Light;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.MindVision;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.Blacksmith;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.Ghost;
|
||||
|
@ -58,7 +59,6 @@ import com.shatteredpixel.shatteredpixeldungeon.levels.SewerBossLevel;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.levels.SewerLevel;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.secret.SecretRoom;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.special.SpecialRoom;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.mechanics.ShadowCaster;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.QuickSlotButton;
|
||||
|
@ -695,7 +695,9 @@ public class Dungeon {
|
|||
|
||||
//TODO hero max vision is now separate from shadowcaster max vision. Might want to adjust.
|
||||
public static void observe(){
|
||||
observe( ShadowCaster.MAX_DISTANCE+1 );
|
||||
int dist = Dungeon.hero.viewDistance;
|
||||
dist *= 1f + 0.25f*Dungeon.hero.pointsInTalent(Talent.FARSIGHT);
|
||||
observe( dist+1 );
|
||||
}
|
||||
|
||||
public static void observe( int dist ) {
|
||||
|
|
|
@ -106,7 +106,7 @@ public enum Talent {
|
|||
//Huntress T3
|
||||
POINT_BLANK(105, 3), HUNTRESS_T3_2(106, 3),
|
||||
//Sniper T3
|
||||
SNIPER_T3_1(107, 3), SNIPER_T3_2(108, 3), SNIPER_T3_3(109, 3),
|
||||
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);
|
||||
|
||||
|
@ -169,6 +169,10 @@ public enum Talent {
|
|||
if (hero.belongings.ring instanceof Ring) hero.belongings.ring.setKnown();
|
||||
if (hero.belongings.misc instanceof Ring) ((Ring) hero.belongings.misc).setKnown();
|
||||
}
|
||||
|
||||
if (talent == FARSIGHT){
|
||||
Dungeon.observe();
|
||||
}
|
||||
}
|
||||
|
||||
public static class CachedRationsDropped extends CounterBuff{};
|
||||
|
@ -470,7 +474,7 @@ public enum Talent {
|
|||
Collections.addAll(tierTalents, FREERUNNER_T3_1, FREERUNNER_T3_2, FREERUNNER_T3_3);
|
||||
break;
|
||||
case SNIPER:
|
||||
Collections.addAll(tierTalents, SNIPER_T3_1, SNIPER_T3_2, SNIPER_T3_3);
|
||||
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);
|
||||
|
|
|
@ -1074,7 +1074,9 @@ public abstract class Level implements Bundlable {
|
|||
}
|
||||
|
||||
int viewDist = c.viewDistance;
|
||||
if (c instanceof Hero && ((Hero) c).subClass == HeroSubClass.SNIPER) viewDist *= 1.5f;
|
||||
if (c instanceof Hero){
|
||||
viewDist *= 1f + 0.25f*((Hero) c).pointsInTalent(Talent.FARSIGHT);
|
||||
}
|
||||
|
||||
ShadowCaster.castShadow( cx, cy, fieldOfView, blocking, viewDist );
|
||||
} else {
|
||||
|
|
|
@ -28,7 +28,7 @@ import com.shatteredpixel.shatteredpixeldungeon.utils.BArray;
|
|||
//based on: http://www.roguebasin.com/index.php?title=FOV_using_recursive_shadowcasting
|
||||
public final class ShadowCaster {
|
||||
|
||||
public static final int MAX_DISTANCE = 12;
|
||||
public static final int MAX_DISTANCE = 14;
|
||||
|
||||
//max length of rows as FOV moves out, for each FOV distance
|
||||
//This is used to make the overall FOV circular, instead of square
|
||||
|
|
Loading…
Reference in New Issue
Block a user