v0.4.3: fixed a number of issues, including:
- dead heroes sometimes being able to use quickslots - wand of fireblast not always ingiting barriers - horn of plenty sometimes gaining 21 max charges - animations being skipped when the player moves into grass or doors - fire constantly re-igniting when a burning character is standing in a doorway. - bugginess when rapidly tapping on search - stench and venom gas being hard to see - Fog of war not completely updating on player death.
This commit is contained in:
parent
2ffffa4162
commit
4c38f73fdf
|
@ -67,24 +67,28 @@ public class SmartTexture extends Texture {
|
||||||
protected void generate() {
|
protected void generate() {
|
||||||
super.generate();
|
super.generate();
|
||||||
bitmap( bitmap, premultiplied );
|
bitmap( bitmap, premultiplied );
|
||||||
filter( fModeMin, fModeMax );
|
super.filter( fModeMin, fModeMax );
|
||||||
wrap( wModeH, wModeV );
|
super.wrap( wModeH, wModeV );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void filter(int minMode, int maxMode) {
|
public void filter(int minMode, int maxMode) {
|
||||||
|
if (fModeMin == minMode && fModeMax == maxMode) return;
|
||||||
|
|
||||||
fModeMin = minMode;
|
fModeMin = minMode;
|
||||||
fModeMax = maxMode;
|
fModeMax = maxMode;
|
||||||
if (id != -1)
|
if (id != -1)
|
||||||
super.filter( fModeMin = minMode, fModeMax = maxMode);
|
super.filter( fModeMin, fModeMax );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void wrap( int s, int t ) {
|
public void wrap( int s, int t ) {
|
||||||
|
if (wModeH == s && wModeV == t) return;
|
||||||
|
|
||||||
wModeH = s;
|
wModeH = s;
|
||||||
wModeV = t;
|
wModeV = t;
|
||||||
if (id != -1)
|
if (id != -1)
|
||||||
super.wrap( wModeH = s, wModeV = t );
|
super.wrap( wModeH, wModeV );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -413,13 +413,13 @@ public abstract class Char extends Actor {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Dungeon.level.map[pos] == Terrain.OPEN_DOOR) {
|
if (Dungeon.level.map[pos] == Terrain.OPEN_DOOR) {
|
||||||
Door.leave( pos, this );
|
Door.leave( pos );
|
||||||
}
|
}
|
||||||
|
|
||||||
pos = step;
|
pos = step;
|
||||||
|
|
||||||
if (flying && Dungeon.level.map[pos] == Terrain.DOOR) {
|
if (flying && Dungeon.level.map[pos] == Terrain.DOOR) {
|
||||||
Door.enter( pos, this );
|
Door.enter( pos );
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this != Dungeon.hero) {
|
if (this != Dungeon.hero) {
|
||||||
|
|
|
@ -240,4 +240,13 @@ public class Blob extends Actor {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static int volumeAt( int cell, Class<? extends Blob> type){
|
||||||
|
Blob gas = Dungeon.level.blobs.get( type );
|
||||||
|
if (gas == null) {
|
||||||
|
return 0;
|
||||||
|
} else {
|
||||||
|
return gas.cur[cell];
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,7 +32,6 @@ import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.plants.Plant;
|
import com.shatteredpixel.shatteredpixeldungeon.plants.Plant;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||||
import com.watabou.utils.Random;
|
|
||||||
|
|
||||||
public class Fire extends Blob {
|
public class Fire extends Blob {
|
||||||
|
|
||||||
|
@ -53,7 +52,7 @@ public class Fire extends Blob {
|
||||||
burn( cell );
|
burn( cell );
|
||||||
|
|
||||||
fire = cur[cell] - 1;
|
fire = cur[cell] - 1;
|
||||||
if (flamable[cell] && Random.Int(fire+1) == 0) {
|
if (fire <= 0 && flamable[cell]) {
|
||||||
|
|
||||||
int oldTile = Dungeon.level.map[cell];
|
int oldTile = Dungeon.level.map[cell];
|
||||||
Dungeon.level.destroy( cell );
|
Dungeon.level.destroy( cell );
|
||||||
|
|
|
@ -141,7 +141,7 @@ public class Burning extends Buff implements Hero.Doom {
|
||||||
detach();
|
detach();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Level.flamable[target.pos]) {
|
if (Level.flamable[target.pos] && Blob.volumeAt(target.pos, Fire.class) == 0) {
|
||||||
GameScene.add( Blob.seed( target.pos, 4, Fire.class ) );
|
GameScene.add( Blob.seed( target.pos, 4, Fire.class ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1335,6 +1335,7 @@ public class Hero extends Char {
|
||||||
Bones.leave();
|
Bones.leave();
|
||||||
|
|
||||||
Dungeon.observe();
|
Dungeon.observe();
|
||||||
|
GameScene.updateFog();
|
||||||
|
|
||||||
Dungeon.hero.belongings.identify();
|
Dungeon.hero.belongings.identify();
|
||||||
|
|
||||||
|
|
|
@ -103,7 +103,7 @@ public class Swarm extends Mob {
|
||||||
clone.state = clone.HUNTING;
|
clone.state = clone.HUNTING;
|
||||||
|
|
||||||
if (Dungeon.level.map[clone.pos] == Terrain.DOOR) {
|
if (Dungeon.level.map[clone.pos] == Terrain.DOOR) {
|
||||||
Door.enter( clone.pos, clone );
|
Door.enter( clone.pos );
|
||||||
}
|
}
|
||||||
|
|
||||||
GameScene.add( clone, SPLIT_DELAY );
|
GameScene.add( clone, SPLIT_DELAY );
|
||||||
|
|
|
@ -423,7 +423,7 @@ public class Speck extends Image {
|
||||||
case VENOM:
|
case VENOM:
|
||||||
hardlight( ColorMath.interpolate( 0x8844FF, 0x00FF00 , p ));
|
hardlight( ColorMath.interpolate( 0x8844FF, 0x00FF00 , p ));
|
||||||
case STENCH:
|
case STENCH:
|
||||||
am = (float)Math.sqrt( (p < 0.5f ? p : 1 - p) * 0.5f );
|
am = (float)Math.sqrt( (p < 0.5f ? p : 1 - p) );
|
||||||
scale.set( 1 + p );
|
scale.set( 1 + p );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -158,6 +158,12 @@ public class HornOfPlenty extends Artifact {
|
||||||
return desc;
|
return desc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void level(int value) {
|
||||||
|
super.level(value);
|
||||||
|
chargeCap = 10 + visiblyUpgraded();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Item upgrade() {
|
public Item upgrade() {
|
||||||
super.upgrade();
|
super.upgrade();
|
||||||
|
|
|
@ -96,7 +96,7 @@ public class WandOfFireblast extends DamageWand {
|
||||||
|
|
||||||
//burn... BURNNNNN!.....
|
//burn... BURNNNNN!.....
|
||||||
private void spreadFlames(int cell, float strength){
|
private void spreadFlames(int cell, float strength){
|
||||||
if (strength >= 0 && Level.passable[cell]){
|
if (strength >= 0 && (Level.passable[cell] || Level.flamable[cell])){
|
||||||
affectedCells.add(cell);
|
affectedCells.add(cell);
|
||||||
if (strength >= 1.5f) {
|
if (strength >= 1.5f) {
|
||||||
visualCells.remove(cell);
|
visualCells.remove(cell);
|
||||||
|
|
|
@ -814,7 +814,7 @@ public abstract class Level implements Bundlable {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Terrain.DOOR:
|
case Terrain.DOOR:
|
||||||
Door.enter( cell, ch );
|
Door.enter( cell );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -862,7 +862,7 @@ public abstract class Level implements Bundlable {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Terrain.DOOR:
|
case Terrain.DOOR:
|
||||||
Door.enter( cell, mob );
|
Door.enter( cell );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,6 @@ package com.shatteredpixel.shatteredpixeldungeon.levels.features;
|
||||||
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
|
import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain;
|
import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||||
|
@ -30,25 +29,21 @@ import com.watabou.noosa.audio.Sample;
|
||||||
|
|
||||||
public class Door {
|
public class Door {
|
||||||
|
|
||||||
public static void enter( int pos, Char ch ) {
|
public static void enter( int pos ) {
|
||||||
Level.set( pos, Terrain.OPEN_DOOR );
|
Level.set( pos, Terrain.OPEN_DOOR );
|
||||||
GameScene.updateMap( pos );
|
GameScene.updateMap( pos );
|
||||||
|
|
||||||
if (ch == Dungeon.hero){
|
if (Dungeon.visible[pos]) {
|
||||||
//don't obsserve here as that already happens on hero move
|
|
||||||
Sample.INSTANCE.play( Assets.SND_OPEN );
|
|
||||||
} else if (Dungeon.visible[pos]) {
|
|
||||||
Sample.INSTANCE.play( Assets.SND_OPEN );
|
|
||||||
Dungeon.observe();
|
Dungeon.observe();
|
||||||
|
Sample.INSTANCE.play( Assets.SND_OPEN );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void leave( int pos, Char ch ) {
|
public static void leave( int pos ) {
|
||||||
if (Dungeon.level.heaps.get( pos ) == null) {
|
if (Dungeon.level.heaps.get( pos ) == null) {
|
||||||
Level.set( pos, Terrain.DOOR );
|
Level.set( pos, Terrain.DOOR );
|
||||||
GameScene.updateMap( pos );
|
GameScene.updateMap( pos );
|
||||||
|
if (Dungeon.visible[pos])
|
||||||
if (ch != Dungeon.hero && Dungeon.visible[pos])
|
|
||||||
Dungeon.observe();
|
Dungeon.observe();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -103,8 +103,7 @@ public class HighGrass {
|
||||||
}
|
}
|
||||||
|
|
||||||
CellEmitter.get( pos ).burst( LeafParticle.LEVEL_SPECIFIC, leaves );
|
CellEmitter.get( pos ).burst( LeafParticle.LEVEL_SPECIFIC, leaves );
|
||||||
//observe already happens when hero moves
|
if (Dungeon.visible[pos])
|
||||||
if (ch != Dungeon.hero)
|
|
||||||
Dungeon.observe();
|
Dungeon.observe();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -806,6 +806,7 @@ public class GameScene extends PixelScene {
|
||||||
public static void ready() {
|
public static void ready() {
|
||||||
selectCell( defaultCellListener );
|
selectCell( defaultCellListener );
|
||||||
QuickSlotButton.cancel();
|
QuickSlotButton.cancel();
|
||||||
|
scene.toolbar.examining = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void examineCell( Integer cell ) {
|
public static void examineCell( Integer cell ) {
|
||||||
|
|
|
@ -47,7 +47,7 @@ public class Toolbar extends Component {
|
||||||
private PickedUpItem pickedUp;
|
private PickedUpItem pickedUp;
|
||||||
|
|
||||||
private boolean lastEnabled = true;
|
private boolean lastEnabled = true;
|
||||||
private boolean examining = false;
|
public boolean examining = false;
|
||||||
|
|
||||||
private static Toolbar instance;
|
private static Toolbar instance;
|
||||||
|
|
||||||
|
@ -249,8 +249,8 @@ public class Toolbar extends Component {
|
||||||
public void update() {
|
public void update() {
|
||||||
super.update();
|
super.update();
|
||||||
|
|
||||||
if (lastEnabled != Dungeon.hero.ready) {
|
if (lastEnabled != (Dungeon.hero.ready && Dungeon.hero.isAlive())) {
|
||||||
lastEnabled = Dungeon.hero.ready;
|
lastEnabled = (Dungeon.hero.ready && Dungeon.hero.isAlive());
|
||||||
|
|
||||||
for (Gizmo tool : members) {
|
for (Gizmo tool : members) {
|
||||||
if (tool instanceof Tool) {
|
if (tool instanceof Tool) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user