diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Actor.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Actor.java index cb80074c1..fe1c8a93a 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Actor.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Actor.java @@ -65,6 +65,10 @@ public abstract class Actor implements Bundlable { this.time = Math.round(this.time); } } + + public void spendToWhole(){ + time = (float)Math.ceil(time); + } protected void postpone( float time ) { if (this.time < now + time) { @@ -157,7 +161,7 @@ public abstract class Actor implements Bundlable { if (Dungeon.hero != null && all.contains( Dungeon.hero )) { Statistics.duration += (int)now; } - now = 0; + now = now % 1; } public static void init() { diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Buff.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Buff.java index 134b21240..14f9f59dd 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Buff.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Buff.java @@ -69,8 +69,10 @@ public class Buff extends Actor { if (target.buffs().contains(this)){ if (target.sprite != null) fx( true ); return true; - } else + } else { + this.target = null; return false; + } } public void detach() { diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Tengu.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Tengu.java index b661da2bf..589dfa442 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Tengu.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Tengu.java @@ -164,7 +164,7 @@ public class Tengu extends Mob { Dungeon.hero.resting = false; sprite.attack( enemy.pos ); spend( attackDelay() ); - return true; + return !Dungeon.level.adjacent(pos, enemy.pos); } private void jump() { diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/CircleArc.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/CircleArc.java index 84db94361..bd906d299 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/CircleArc.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/CircleArc.java @@ -58,9 +58,8 @@ public class CircleArc extends Visual { public CircleArc( int triangles, float radius ) { super( 0, 0, 0, 0 ); - - int gradient[] = {0xFFFFFFFF, 0xFFFFFFFF}; - texture = TextureCache.createGradient( gradient ); + + texture = TextureCache.createSolid( 0xFFFFFFFF ); this.nTris = triangles; this.rad = radius; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Item.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Item.java index 46919ef17..962ba51f2 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Item.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Item.java @@ -58,7 +58,7 @@ public class Item implements Bundlable { protected static final float TIME_TO_THROW = 1.0f; protected static final float TIME_TO_PICK_UP = 1.0f; - protected static final float TIME_TO_DROP = 0.5f; + protected static final float TIME_TO_DROP = 1.0f; public static final String AC_DROP = "DROP"; public static final String AC_THROW = "THROW"; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/MissileWeapon.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/MissileWeapon.java index b2adcf1ff..6ff9ee1ce 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/MissileWeapon.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/MissileWeapon.java @@ -109,6 +109,7 @@ abstract public class MissileWeapon extends Weapon { if (upgraded.quantity() == 1 && !upgraded.collect()) { Dungeon.level.drop(upgraded, Dungeon.hero.pos); } + updateQuickslot(); return upgraded; } else { durability = MAX_DURABILITY; @@ -119,6 +120,7 @@ abstract public class MissileWeapon extends Weapon { detach(Dungeon.hero.belongings.backpack); return similar.merge(this); } + updateQuickslot(); return this; } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/InterlevelScene.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/InterlevelScene.java index f292747a7..755a611de 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/InterlevelScene.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/InterlevelScene.java @@ -192,7 +192,12 @@ public class InterlevelScene extends PixelScene { public void run() { try { - + + if (Dungeon.hero != null){ + Dungeon.hero.spendToWhole(); + } + Actor.fixTime(); + switch (mode) { case DESCEND: descend(); @@ -308,8 +313,6 @@ public class InterlevelScene extends PixelScene { private void descend() throws IOException { - Actor.fixTime(); - if (Dungeon.hero == null) { DriedRose.clearHeldGhostHero(); Dungeon.init(); @@ -335,7 +338,6 @@ public class InterlevelScene extends PixelScene { private void fall() throws IOException { - Actor.fixTime(); DriedRose.holdGhostHero( Dungeon.level ); Buff.affect( Dungeon.hero, Chasm.Falling.class ); @@ -353,7 +355,6 @@ public class InterlevelScene extends PixelScene { private void ascend() throws IOException { - Actor.fixTime(); DriedRose.holdGhostHero( Dungeon.level ); Dungeon.saveAll(); @@ -364,7 +365,6 @@ public class InterlevelScene extends PixelScene { private void returnTo() throws IOException { - Actor.fixTime(); DriedRose.holdGhostHero( Dungeon.level ); Dungeon.saveAll(); @@ -375,7 +375,6 @@ public class InterlevelScene extends PixelScene { private void restore() throws IOException { - Actor.fixTime(); DriedRose.clearHeldGhostHero(); GameLog.wipe(); @@ -392,7 +391,6 @@ public class InterlevelScene extends PixelScene { private void resurrect() throws IOException { - Actor.fixTime(); DriedRose.holdGhostHero( Dungeon.level ); if (Dungeon.level.locked) { @@ -408,7 +406,6 @@ public class InterlevelScene extends PixelScene { private void reset() throws IOException { - Actor.fixTime(); DriedRose.holdGhostHero( Dungeon.level ); SpecialRoom.resetPitRoom(Dungeon.depth+1);