v0.7.1: Fixed:

- buffs retaining target after failing to attach
- tengu incorrectly not pausing acting in some cases
- being able to carry partial turns between floors (they are spent now)
- quickslot failing to update correctly when thrown weapons are upgraded
- time to drop taking 1/2 turn for no reason
- circle arc using a gradient for no reason
This commit is contained in:
Evan Debenham 2018-12-16 22:41:24 -05:00 committed by Evan Debenham
parent 3474ec95cc
commit 72661657d2
7 changed files with 20 additions and 16 deletions

View File

@ -66,6 +66,10 @@ public abstract class Actor implements Bundlable {
}
}
public void spendToWhole(){
time = (float)Math.ceil(time);
}
protected void postpone( float time ) {
if (this.time < now + time) {
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() {

View File

@ -69,9 +69,11 @@ 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() {
if (target.sprite != null) fx( false );

View File

@ -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() {

View File

@ -59,8 +59,7 @@ public class CircleArc extends Visual {
super( 0, 0, 0, 0 );
int gradient[] = {0xFFFFFFFF, 0xFFFFFFFF};
texture = TextureCache.createGradient( gradient );
texture = TextureCache.createSolid( 0xFFFFFFFF );
this.nTris = triangles;
this.rad = radius;

View File

@ -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";

View File

@ -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;
}

View File

@ -193,6 +193,11 @@ public class InterlevelScene extends PixelScene {
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);