v0.9.2b: fixed more cases of vfx/sfx incorrectly playing
This commit is contained in:
parent
9dbc24998d
commit
db037cc4e8
|
@ -28,10 +28,8 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.ToxicGas;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.items.Generator;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.mechanics.Ballistica;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.DM200Sprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
||||
import com.watabou.utils.Bundle;
|
||||
import com.watabou.utils.Random;
|
||||
|
||||
|
@ -124,8 +122,6 @@ public class DM200 extends Mob {
|
|||
for (int i : trajectory.subPath(0, trajectory.dist)){
|
||||
GameScene.add(Blob.seed(i, 20, ToxicGas.class));
|
||||
}
|
||||
|
||||
GLog.w(Messages.get(this, "vent"));
|
||||
GameScene.add(Blob.seed(trajectory.collisionPos, 100, ToxicGas.class));
|
||||
|
||||
}
|
||||
|
|
|
@ -21,17 +21,13 @@
|
|||
|
||||
package com.shatteredpixel.shatteredpixeldungeon.actors.mobs;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Blob;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.CorrosiveGas;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.quest.MetalShard;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.DM201Sprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
||||
import com.watabou.noosa.audio.Sample;
|
||||
import com.watabou.utils.PathFinder;
|
||||
import com.watabou.utils.Random;
|
||||
|
||||
|
@ -95,14 +91,12 @@ public class DM201 extends DM200 {
|
|||
threatened = false;
|
||||
spend(TICK);
|
||||
|
||||
GLog.w(Messages.get(this, "vent"));
|
||||
GameScene.add(Blob.seed(enemy.pos, 15, CorrosiveGas.class).setStrength(8));
|
||||
for (int i : PathFinder.NEIGHBOURS8){
|
||||
if (!Dungeon.level.solid[enemy.pos+i]) {
|
||||
GameScene.add(Blob.seed(enemy.pos + i, 5, CorrosiveGas.class).setStrength(8));
|
||||
}
|
||||
}
|
||||
Sample.INSTANCE.play(Assets.Sounds.GAS);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -188,7 +188,7 @@ public abstract class Elemental extends Mob {
|
|||
protected void meleeProc( Char enemy, int damage ) {
|
||||
if (Random.Int( 2 ) == 0 && !Dungeon.level.water[enemy.pos]) {
|
||||
Buff.affect( enemy, Burning.class ).reignite( enemy );
|
||||
Splash.at( enemy.sprite.center(), sprite.blood(), 5);
|
||||
if (enemy.sprite.visible) Splash.at( enemy.sprite.center(), sprite.blood(), 5);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -197,7 +197,7 @@ public abstract class Elemental extends Mob {
|
|||
if (!Dungeon.level.water[enemy.pos]) {
|
||||
Buff.affect( enemy, Burning.class ).reignite( enemy, 4f );
|
||||
}
|
||||
Splash.at( enemy.sprite.center(), sprite.blood(), 5);
|
||||
if (enemy.sprite.visible) Splash.at( enemy.sprite.center(), sprite.blood(), 5);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -247,14 +247,14 @@ public abstract class Elemental extends Mob {
|
|||
protected void meleeProc( Char enemy, int damage ) {
|
||||
if (Random.Int( 3 ) == 0 || Dungeon.level.water[enemy.pos]) {
|
||||
Freezing.freeze( enemy.pos );
|
||||
Splash.at( enemy.sprite.center(), sprite.blood(), 5);
|
||||
if (enemy.sprite.visible) Splash.at( enemy.sprite.center(), sprite.blood(), 5);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void rangedProc( Char enemy ) {
|
||||
Freezing.freeze( enemy.pos );
|
||||
Splash.at( enemy.sprite.center(), sprite.blood(), 5);
|
||||
if (enemy.sprite.visible) Splash.at( enemy.sprite.center(), sprite.blood(), 5);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -282,9 +282,16 @@ public abstract class Elemental extends Mob {
|
|||
for (Char ch : affected) {
|
||||
ch.damage( Math.round( damage * 0.4f ), this );
|
||||
}
|
||||
|
||||
sprite.parent.addToFront( new Lightning( arcs, null ) );
|
||||
Sample.INSTANCE.play( Assets.Sounds.LIGHTNING );
|
||||
|
||||
boolean visible = sprite.visible || enemy.sprite.visible;
|
||||
for (Char ch : affected){
|
||||
if (ch.sprite.visible) visible = true;
|
||||
}
|
||||
|
||||
if (visible) {
|
||||
sprite.parent.addToFront(new Lightning(arcs, null));
|
||||
Sample.INSTANCE.play(Assets.Sounds.LIGHTNING);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -113,7 +113,7 @@ public abstract class Shaman extends Mob {
|
|||
|
||||
if (Random.Int( 2 ) == 0) {
|
||||
debuff( enemy );
|
||||
Sample.INSTANCE.play( Assets.Sounds.DEBUFF );
|
||||
if (enemy == Dungeon.hero) Sample.INSTANCE.play( Assets.Sounds.DEBUFF );
|
||||
}
|
||||
|
||||
int dmg = Random.NormalIntRange( 6, 15 );
|
||||
|
|
|
@ -25,6 +25,8 @@ import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.DM200;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.MagicMissile;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
||||
import com.watabou.noosa.TextureFilm;
|
||||
import com.watabou.noosa.audio.Sample;
|
||||
import com.watabou.utils.Callback;
|
||||
|
@ -72,6 +74,7 @@ public class DM200Sprite extends MobSprite {
|
|||
}
|
||||
} );
|
||||
Sample.INSTANCE.play( Assets.Sounds.GAS );
|
||||
GLog.w(Messages.get(DM200.class, "vent"));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -25,6 +25,8 @@ import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.DM201;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.MagicMissile;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
||||
import com.watabou.noosa.TextureFilm;
|
||||
import com.watabou.noosa.audio.Sample;
|
||||
import com.watabou.utils.Callback;
|
||||
|
@ -81,11 +83,12 @@ public class DM201Sprite extends MobSprite {
|
|||
new Callback() {
|
||||
@Override
|
||||
public void call() {
|
||||
Sample.INSTANCE.play( Assets.Sounds.PUFF );
|
||||
Sample.INSTANCE.play( Assets.Sounds.GAS );
|
||||
((DM201)ch).onZapComplete();
|
||||
}
|
||||
} );
|
||||
Sample.INSTANCE.play( Assets.Sounds.MISS, 0.6f, 0.6f, 1.5f );
|
||||
Sample.INSTANCE.play( Assets.Sounds.MISS, 1f, 1.5f );
|
||||
GLog.w(Messages.get(DM201.class, "vent"));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue
Block a user