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() {
|
||||
super.generate();
|
||||
bitmap( bitmap, premultiplied );
|
||||
filter( fModeMin, fModeMax );
|
||||
wrap( wModeH, wModeV );
|
||||
super.filter( fModeMin, fModeMax );
|
||||
super.wrap( wModeH, wModeV );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void filter(int minMode, int maxMode) {
|
||||
if (fModeMin == minMode && fModeMax == maxMode) return;
|
||||
|
||||
fModeMin = minMode;
|
||||
fModeMax = maxMode;
|
||||
if (id != -1)
|
||||
super.filter( fModeMin = minMode, fModeMax = maxMode);
|
||||
super.filter( fModeMin, fModeMax );
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void wrap( int s, int t ) {
|
||||
if (wModeH == s && wModeV == t) return;
|
||||
|
||||
wModeH = s;
|
||||
wModeV = t;
|
||||
if (id != -1)
|
||||
super.wrap( wModeH = s, wModeV = t );
|
||||
super.wrap( wModeH, wModeV );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -413,13 +413,13 @@ public abstract class Char extends Actor {
|
|||
}
|
||||
|
||||
if (Dungeon.level.map[pos] == Terrain.OPEN_DOOR) {
|
||||
Door.leave( pos, this );
|
||||
Door.leave( pos );
|
||||
}
|
||||
|
||||
pos = step;
|
||||
|
||||
if (flying && Dungeon.level.map[pos] == Terrain.DOOR) {
|
||||
Door.enter( pos, this );
|
||||
Door.enter( pos );
|
||||
}
|
||||
|
||||
if (this != Dungeon.hero) {
|
||||
|
|
|
@ -240,4 +240,13 @@ public class Blob extends Actor {
|
|||
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,10 +32,9 @@ import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.plants.Plant;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||
import com.watabou.utils.Random;
|
||||
|
||||
public class Fire extends Blob {
|
||||
|
||||
|
||||
@Override
|
||||
protected void evolve() {
|
||||
|
||||
|
@ -53,7 +52,7 @@ public class Fire extends Blob {
|
|||
burn( cell );
|
||||
|
||||
fire = cur[cell] - 1;
|
||||
if (flamable[cell] && Random.Int(fire+1) == 0) {
|
||||
if (fire <= 0 && flamable[cell]) {
|
||||
|
||||
int oldTile = Dungeon.level.map[cell];
|
||||
Dungeon.level.destroy( cell );
|
||||
|
|
|
@ -141,7 +141,7 @@ public class Burning extends Buff implements Hero.Doom {
|
|||
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 ) );
|
||||
}
|
||||
|
||||
|
|
|
@ -1335,6 +1335,7 @@ public class Hero extends Char {
|
|||
Bones.leave();
|
||||
|
||||
Dungeon.observe();
|
||||
GameScene.updateFog();
|
||||
|
||||
Dungeon.hero.belongings.identify();
|
||||
|
||||
|
|
|
@ -103,7 +103,7 @@ public class Swarm extends Mob {
|
|||
clone.state = clone.HUNTING;
|
||||
|
||||
if (Dungeon.level.map[clone.pos] == Terrain.DOOR) {
|
||||
Door.enter( clone.pos, clone );
|
||||
Door.enter( clone.pos );
|
||||
}
|
||||
|
||||
GameScene.add( clone, SPLIT_DELAY );
|
||||
|
|
|
@ -423,7 +423,7 @@ public class Speck extends Image {
|
|||
case VENOM:
|
||||
hardlight( ColorMath.interpolate( 0x8844FF, 0x00FF00 , p ));
|
||||
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 );
|
||||
break;
|
||||
|
||||
|
|
|
@ -158,6 +158,12 @@ public class HornOfPlenty extends Artifact {
|
|||
return desc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void level(int value) {
|
||||
super.level(value);
|
||||
chargeCap = 10 + visiblyUpgraded();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item upgrade() {
|
||||
super.upgrade();
|
||||
|
|
|
@ -96,7 +96,7 @@ public class WandOfFireblast extends DamageWand {
|
|||
|
||||
//burn... BURNNNNN!.....
|
||||
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);
|
||||
if (strength >= 1.5f) {
|
||||
visualCells.remove(cell);
|
||||
|
|
|
@ -814,7 +814,7 @@ public abstract class Level implements Bundlable {
|
|||
break;
|
||||
|
||||
case Terrain.DOOR:
|
||||
Door.enter( cell, ch );
|
||||
Door.enter( cell );
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -862,7 +862,7 @@ public abstract class Level implements Bundlable {
|
|||
break;
|
||||
|
||||
case Terrain.DOOR:
|
||||
Door.enter( cell, mob );
|
||||
Door.enter( cell );
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -22,7 +22,6 @@ package com.shatteredpixel.shatteredpixeldungeon.levels.features;
|
|||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||
|
@ -30,25 +29,21 @@ import com.watabou.noosa.audio.Sample;
|
|||
|
||||
public class Door {
|
||||
|
||||
public static void enter( int pos, Char ch ) {
|
||||
public static void enter( int pos ) {
|
||||
Level.set( pos, Terrain.OPEN_DOOR );
|
||||
GameScene.updateMap( pos );
|
||||
|
||||
if (ch == Dungeon.hero){
|
||||
//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 );
|
||||
if (Dungeon.visible[pos]) {
|
||||
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) {
|
||||
Level.set( pos, Terrain.DOOR );
|
||||
GameScene.updateMap( pos );
|
||||
|
||||
if (ch != Dungeon.hero && Dungeon.visible[pos])
|
||||
if (Dungeon.visible[pos])
|
||||
Dungeon.observe();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -103,8 +103,7 @@ public class HighGrass {
|
|||
}
|
||||
|
||||
CellEmitter.get( pos ).burst( LeafParticle.LEVEL_SPECIFIC, leaves );
|
||||
//observe already happens when hero moves
|
||||
if (ch != Dungeon.hero)
|
||||
if (Dungeon.visible[pos])
|
||||
Dungeon.observe();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -806,6 +806,7 @@ public class GameScene extends PixelScene {
|
|||
public static void ready() {
|
||||
selectCell( defaultCellListener );
|
||||
QuickSlotButton.cancel();
|
||||
scene.toolbar.examining = false;
|
||||
}
|
||||
|
||||
public static void examineCell( Integer cell ) {
|
||||
|
|
|
@ -47,7 +47,7 @@ public class Toolbar extends Component {
|
|||
private PickedUpItem pickedUp;
|
||||
|
||||
private boolean lastEnabled = true;
|
||||
private boolean examining = false;
|
||||
public boolean examining = false;
|
||||
|
||||
private static Toolbar instance;
|
||||
|
||||
|
@ -249,8 +249,8 @@ public class Toolbar extends Component {
|
|||
public void update() {
|
||||
super.update();
|
||||
|
||||
if (lastEnabled != Dungeon.hero.ready) {
|
||||
lastEnabled = Dungeon.hero.ready;
|
||||
if (lastEnabled != (Dungeon.hero.ready && Dungeon.hero.isAlive())) {
|
||||
lastEnabled = (Dungeon.hero.ready && Dungeon.hero.isAlive());
|
||||
|
||||
for (Gizmo tool : members) {
|
||||
if (tool instanceof Tool) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user