v0.8.1: Various bufixes:
- fixed rogue armor's blink not going over terrain when accounting for range - fixed unblessed ankg revives waking up mimics - fixed enemies not being surprised by invisible heroes in rare cases - fixed pylons being surprised when they shouldn't - fixed dark and bright fists rarely teleporting into unreachable places - fixed rankings conversion logic on game updates not actually doing anything - fixed debuffs being incorrectly persisted in rankings
This commit is contained in:
@@ -70,7 +70,6 @@ public class Assets {
|
|||||||
public static final String BANNERS = "interfaces/banners.png";
|
public static final String BANNERS = "interfaces/banners.png";
|
||||||
public static final String BADGES = "interfaces/badges.png";
|
public static final String BADGES = "interfaces/badges.png";
|
||||||
public static final String LOCKED = "interfaces/locked_badge.png";
|
public static final String LOCKED = "interfaces/locked_badge.png";
|
||||||
public static final String AMULET = "interfaces/amulet.png";
|
|
||||||
|
|
||||||
public static final String CHROME = "interfaces/chrome.png";
|
public static final String CHROME = "interfaces/chrome.png";
|
||||||
public static final String ICONS = "interfaces/icons.png";
|
public static final String ICONS = "interfaces/icons.png";
|
||||||
@@ -215,6 +214,7 @@ public class Assets {
|
|||||||
public static final String HUNTRESS = "sprites/huntress.png";
|
public static final String HUNTRESS = "sprites/huntress.png";
|
||||||
public static final String AVATARS = "sprites/avatars.png";
|
public static final String AVATARS = "sprites/avatars.png";
|
||||||
public static final String PET = "sprites/pet.png";
|
public static final String PET = "sprites/pet.png";
|
||||||
|
public static final String AMULET = "sprites/amulet.png";
|
||||||
|
|
||||||
public static final String RAT = "sprites/rat.png";
|
public static final String RAT = "sprites/rat.png";
|
||||||
public static final String BRUTE = "sprites/brute.png";
|
public static final String BRUTE = "sprites/brute.png";
|
||||||
|
|||||||
@@ -22,6 +22,7 @@
|
|||||||
package com.shatteredpixel.shatteredpixeldungeon;
|
package com.shatteredpixel.shatteredpixeldungeon;
|
||||||
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Belongings;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Belongings;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroClass;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroClass;
|
||||||
@@ -131,6 +132,12 @@ public enum Rankings {
|
|||||||
} else if (!Dungeon.quickslot.contains(item))
|
} else if (!Dungeon.quickslot.contains(item))
|
||||||
belongings.backpack.items.remove(item);
|
belongings.backpack.items.remove(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//remove all buffs (ones tied to equipment will be re-applied)
|
||||||
|
for(Buff b : Dungeon.hero.buffs()){
|
||||||
|
Dungeon.hero.remove(b);
|
||||||
|
}
|
||||||
|
|
||||||
rec.gameData.put( HERO, Dungeon.hero );
|
rec.gameData.put( HERO, Dungeon.hero );
|
||||||
|
|
||||||
//save stats
|
//save stats
|
||||||
|
|||||||
@@ -249,7 +249,7 @@ public class Mimic extends Mob {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean reset() {
|
public boolean reset() {
|
||||||
state = WANDERING;
|
if (state != PASSIVE) state = WANDERING;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -579,7 +579,7 @@ public abstract class Mob extends Char {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean surprisedBy( Char enemy ){
|
public boolean surprisedBy( Char enemy ){
|
||||||
return !enemySeen && enemy == Dungeon.hero;
|
return (!enemySeen || enemy.invisible > 0) && enemy == Dungeon.hero;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void aggro( Char ch ) {
|
public void aggro( Char ch ) {
|
||||||
|
|||||||
@@ -129,6 +129,11 @@ public class Pylon extends Mob {
|
|||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void notice() {
|
||||||
|
//do nothing
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String description() {
|
public String description() {
|
||||||
if (alignment == Alignment.NEUTRAL){
|
if (alignment == Alignment.NEUTRAL){
|
||||||
|
|||||||
@@ -473,7 +473,7 @@ public abstract class YogFist extends Mob {
|
|||||||
} while (Dungeon.level.heroFOV[i]
|
} while (Dungeon.level.heroFOV[i]
|
||||||
|| Dungeon.level.solid[i]
|
|| Dungeon.level.solid[i]
|
||||||
|| Actor.findChar(i) != null
|
|| Actor.findChar(i) != null
|
||||||
|| Dungeon.findStep(this, Dungeon.level.exit, Dungeon.level.passable, fieldOfView, false) == -1);
|
|| PathFinder.getStep(i, Dungeon.level.exit, Dungeon.level.passable) == -1);
|
||||||
ScrollOfTeleportation.appear(this, i);
|
ScrollOfTeleportation.appear(this, i);
|
||||||
state = WANDERING;
|
state = WANDERING;
|
||||||
GameScene.flash(0xFFFFFF);
|
GameScene.flash(0xFFFFFF);
|
||||||
@@ -543,7 +543,7 @@ public abstract class YogFist extends Mob {
|
|||||||
} while (Dungeon.level.heroFOV[i]
|
} while (Dungeon.level.heroFOV[i]
|
||||||
|| Dungeon.level.solid[i]
|
|| Dungeon.level.solid[i]
|
||||||
|| Actor.findChar(i) != null
|
|| Actor.findChar(i) != null
|
||||||
|| Dungeon.findStep(this, Dungeon.level.exit, Dungeon.level.passable, fieldOfView, false) == -1);
|
|| PathFinder.getStep(i, Dungeon.level.exit, Dungeon.level.passable) == -1);
|
||||||
ScrollOfTeleportation.appear(this, i);
|
ScrollOfTeleportation.appear(this, i);
|
||||||
state = WANDERING;
|
state = WANDERING;
|
||||||
GameScene.flash(0, false);
|
GameScene.flash(0, false);
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
|||||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.CellSelector;
|
import com.shatteredpixel.shatteredpixeldungeon.scenes.CellSelector;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.utils.BArray;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
||||||
import com.watabou.noosa.audio.Sample;
|
import com.watabou.noosa.audio.Sample;
|
||||||
import com.watabou.utils.PathFinder;
|
import com.watabou.utils.PathFinder;
|
||||||
@@ -57,11 +58,10 @@ public class RogueArmor extends ClassArmor {
|
|||||||
public void onSelect( Integer target ) {
|
public void onSelect( Integer target ) {
|
||||||
if (target != null) {
|
if (target != null) {
|
||||||
|
|
||||||
PathFinder.buildDistanceMap(curUser.pos, Dungeon.level.passable, 8);
|
PathFinder.buildDistanceMap(curUser.pos, BArray.not(Dungeon.level.solid,null), 8);
|
||||||
|
|
||||||
if ( PathFinder.distance[target] == Integer.MAX_VALUE ||
|
if ( PathFinder.distance[target] == Integer.MAX_VALUE ||
|
||||||
!Dungeon.level.heroFOV[target] ||
|
!Dungeon.level.heroFOV[target] ||
|
||||||
!(Dungeon.level.passable[target] || Dungeon.level.avoid[target]) ||
|
|
||||||
Actor.findChar( target ) != null) {
|
Actor.findChar( target ) != null) {
|
||||||
|
|
||||||
GLog.w( Messages.get(RogueArmor.class, "fov") );
|
GLog.w( Messages.get(RogueArmor.class, "fov") );
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ public class AmuletScene extends PixelScene {
|
|||||||
add( text );
|
add( text );
|
||||||
}
|
}
|
||||||
|
|
||||||
amulet = new Image( Assets.Interfaces.AMULET );
|
amulet = new Image( Assets.Sprites.AMULET );
|
||||||
add( amulet );
|
add( amulet );
|
||||||
|
|
||||||
RedButton btnExit = new RedButton( Messages.get(this, "exit") ) {
|
RedButton btnExit = new RedButton( Messages.get(this, "exit") ) {
|
||||||
|
|||||||
@@ -35,14 +35,14 @@ import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
|||||||
import com.shatteredpixel.shatteredpixeldungeon.ui.Icons;
|
import com.shatteredpixel.shatteredpixeldungeon.ui.Icons;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextBlock;
|
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextBlock;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.ui.StyledButton;
|
import com.shatteredpixel.shatteredpixeldungeon.ui.StyledButton;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.windows.WndMessage;
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.windows.WndStartGame;
|
|
||||||
import com.watabou.glwrap.Blending;
|
import com.watabou.glwrap.Blending;
|
||||||
import com.watabou.noosa.Camera;
|
import com.watabou.noosa.Camera;
|
||||||
import com.watabou.noosa.Game;
|
import com.watabou.noosa.Game;
|
||||||
import com.watabou.noosa.Image;
|
import com.watabou.noosa.Image;
|
||||||
import com.watabou.utils.FileUtils;
|
import com.watabou.utils.FileUtils;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
public class WelcomeScene extends PixelScene {
|
public class WelcomeScene extends PixelScene {
|
||||||
|
|
||||||
private static int LATEST_UPDATE = ShatteredPixelDungeon.v0_8_0;
|
private static int LATEST_UPDATE = ShatteredPixelDungeon.v0_8_0;
|
||||||
@@ -169,10 +169,21 @@ public class WelcomeScene extends PixelScene {
|
|||||||
if (previousVersion < LATEST_UPDATE){
|
if (previousVersion < LATEST_UPDATE){
|
||||||
try {
|
try {
|
||||||
Rankings.INSTANCE.load();
|
Rankings.INSTANCE.load();
|
||||||
|
for (Rankings.Record rec : Rankings.INSTANCE.records.toArray(new Rankings.Record[0])){
|
||||||
|
try {
|
||||||
|
Rankings.INSTANCE.loadGameData(rec);
|
||||||
|
Rankings.INSTANCE.saveGameData(rec);
|
||||||
|
} catch (Exception e) {
|
||||||
|
//if we encounter a fatal per-record error, then clear that record
|
||||||
|
Rankings.INSTANCE.records.remove(rec);
|
||||||
|
ShatteredPixelDungeon.reportException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
Rankings.INSTANCE.save();
|
Rankings.INSTANCE.save();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
//if we encounter a fatal error, then just clear the rankings
|
//if we encounter a fatal error, then just clear the rankings
|
||||||
FileUtils.deleteFile( Rankings.RANKINGS_FILE );
|
FileUtils.deleteFile( Rankings.RANKINGS_FILE );
|
||||||
|
ShatteredPixelDungeon.reportException(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user