v2.3.0: fixed potion shatters not cleansing fire/ooze outside of FOV
This commit is contained in:
@@ -315,10 +315,10 @@ public class Potion extends Item {
|
||||
}
|
||||
|
||||
public void shatter( int cell ) {
|
||||
splash( cell );
|
||||
if (Dungeon.level.heroFOV[cell]) {
|
||||
GLog.i( Messages.get(Potion.class, "shatter") );
|
||||
Sample.INSTANCE.play( Assets.Sounds.SHATTER );
|
||||
splash( cell );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -391,20 +391,23 @@ public class Potion extends Item {
|
||||
}
|
||||
|
||||
protected void splash( int cell ) {
|
||||
|
||||
Fire fire = (Fire)Dungeon.level.blobs.get( Fire.class );
|
||||
if (fire != null)
|
||||
fire.clear( cell );
|
||||
|
||||
final int color = splashColor();
|
||||
if (fire != null) {
|
||||
fire.clear(cell);
|
||||
}
|
||||
|
||||
Char ch = Actor.findChar(cell);
|
||||
if (ch != null && ch.alignment == Char.Alignment.ALLY) {
|
||||
Buff.detach(ch, Burning.class);
|
||||
Buff.detach(ch, Ooze.class);
|
||||
Splash.at( ch.sprite.center(), color, 5 );
|
||||
} else {
|
||||
Splash.at( cell, color, 5 );
|
||||
}
|
||||
|
||||
if (Dungeon.level.heroFOV[cell]) {
|
||||
if (ch != null) {
|
||||
Splash.at(ch.sprite.center(), splashColor(), 5);
|
||||
} else {
|
||||
Splash.at(cell, splashColor(), 5);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -38,11 +38,11 @@ public class PotionOfFrost extends Potion {
|
||||
|
||||
@Override
|
||||
public void shatter( int cell ) {
|
||||
|
||||
|
||||
splash( cell );
|
||||
if (Dungeon.level.heroFOV[cell]) {
|
||||
identify();
|
||||
|
||||
splash( cell );
|
||||
|
||||
Sample.INSTANCE.play( Assets.Sounds.SHATTER );
|
||||
}
|
||||
|
||||
|
||||
@@ -43,10 +43,10 @@ public class PotionOfLevitation extends Potion {
|
||||
@Override
|
||||
public void shatter( int cell ) {
|
||||
|
||||
splash( cell );
|
||||
if (Dungeon.level.heroFOV[cell]) {
|
||||
identify();
|
||||
|
||||
splash( cell );
|
||||
Sample.INSTANCE.play( Assets.Sounds.SHATTER );
|
||||
Sample.INSTANCE.play( Assets.Sounds.GAS );
|
||||
}
|
||||
|
||||
@@ -39,10 +39,10 @@ public class PotionOfLiquidFlame extends Potion {
|
||||
@Override
|
||||
public void shatter( int cell ) {
|
||||
|
||||
splash( cell );
|
||||
if (Dungeon.level.heroFOV[cell]) {
|
||||
identify();
|
||||
|
||||
splash( cell );
|
||||
Sample.INSTANCE.play( Assets.Sounds.SHATTER );
|
||||
Sample.INSTANCE.play( Assets.Sounds.BURNING );
|
||||
}
|
||||
|
||||
@@ -38,10 +38,10 @@ public class PotionOfParalyticGas extends Potion {
|
||||
@Override
|
||||
public void shatter( int cell ) {
|
||||
|
||||
splash( cell );
|
||||
if (Dungeon.level.heroFOV[cell]) {
|
||||
identify();
|
||||
|
||||
splash( cell );
|
||||
Sample.INSTANCE.play( Assets.Sounds.SHATTER );
|
||||
Sample.INSTANCE.play( Assets.Sounds.GAS );
|
||||
}
|
||||
|
||||
@@ -77,10 +77,10 @@ public class PotionOfPurity extends Potion {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
splash( cell );
|
||||
if (Dungeon.level.heroFOV[cell]) {
|
||||
splash(cell);
|
||||
Sample.INSTANCE.play(Assets.Sounds.SHATTER);
|
||||
|
||||
identify();
|
||||
|
||||
@@ -38,10 +38,10 @@ public class PotionOfToxicGas extends Potion {
|
||||
@Override
|
||||
public void shatter( int cell ) {
|
||||
|
||||
splash( cell );
|
||||
if (Dungeon.level.heroFOV[cell]) {
|
||||
identify();
|
||||
|
||||
splash( cell );
|
||||
Sample.INSTANCE.play( Assets.Sounds.SHATTER );
|
||||
Sample.INSTANCE.play( Assets.Sounds.GAS );
|
||||
}
|
||||
|
||||
@@ -40,8 +40,8 @@ public class BlizzardBrew extends Brew {
|
||||
|
||||
@Override
|
||||
public void shatter(int cell) {
|
||||
splash( cell );
|
||||
if (Dungeon.level.heroFOV[cell]) {
|
||||
splash( cell );
|
||||
Sample.INSTANCE.play( Assets.Sounds.SHATTER );
|
||||
Sample.INSTANCE.play( Assets.Sounds.GAS );
|
||||
}
|
||||
|
||||
@@ -43,9 +43,9 @@ public class CausticBrew extends Brew {
|
||||
|
||||
@Override
|
||||
public void shatter(int cell) {
|
||||
|
||||
|
||||
splash( cell );
|
||||
if (Dungeon.level.heroFOV[cell]) {
|
||||
splash( cell );
|
||||
Sample.INSTANCE.play( Assets.Sounds.SHATTER );
|
||||
}
|
||||
|
||||
|
||||
@@ -40,9 +40,9 @@ public class InfernalBrew extends Brew {
|
||||
|
||||
@Override
|
||||
public void shatter(int cell) {
|
||||
|
||||
|
||||
splash( cell );
|
||||
if (Dungeon.level.heroFOV[cell]) {
|
||||
splash( cell );
|
||||
Sample.INSTANCE.play( Assets.Sounds.SHATTER );
|
||||
Sample.INSTANCE.play( Assets.Sounds.GAS );
|
||||
}
|
||||
|
||||
@@ -41,8 +41,8 @@ public class ShockingBrew extends Brew {
|
||||
|
||||
@Override
|
||||
public void shatter(int cell) {
|
||||
splash( cell );
|
||||
if (Dungeon.level.heroFOV[cell]) {
|
||||
splash( cell );
|
||||
Sample.INSTANCE.play( Assets.Sounds.SHATTER );
|
||||
Sample.INSTANCE.play(Assets.Sounds.LIGHTNING);
|
||||
}
|
||||
|
||||
@@ -51,9 +51,9 @@ public class ElixirOfHoneyedHealing extends Elixir {
|
||||
|
||||
@Override
|
||||
public void shatter(int cell) {
|
||||
splash( cell );
|
||||
if (Dungeon.level.heroFOV[cell]) {
|
||||
Sample.INSTANCE.play( Assets.Sounds.SHATTER );
|
||||
splash( cell );
|
||||
}
|
||||
|
||||
Char ch = Actor.findChar(cell);
|
||||
|
||||
@@ -56,9 +56,9 @@ public class PotionOfCleansing extends ExoticPotion {
|
||||
if (Actor.findChar(cell) == null){
|
||||
super.shatter(cell);
|
||||
} else {
|
||||
splash( cell );
|
||||
if (Dungeon.level.heroFOV[cell]) {
|
||||
Sample.INSTANCE.play(Assets.Sounds.SHATTER);
|
||||
splash(cell);
|
||||
identify();
|
||||
}
|
||||
|
||||
|
||||
@@ -38,11 +38,11 @@ public class PotionOfCorrosiveGas extends ExoticPotion {
|
||||
|
||||
@Override
|
||||
public void shatter( int cell ) {
|
||||
|
||||
|
||||
splash( cell );
|
||||
if (Dungeon.level.heroFOV[cell]) {
|
||||
identify();
|
||||
|
||||
splash( cell );
|
||||
|
||||
Sample.INSTANCE.play( Assets.Sounds.SHATTER );
|
||||
Sample.INSTANCE.play( Assets.Sounds.GAS );
|
||||
}
|
||||
|
||||
@@ -38,11 +38,11 @@ public class PotionOfShroudingFog extends ExoticPotion {
|
||||
|
||||
@Override
|
||||
public void shatter( int cell ) {
|
||||
|
||||
|
||||
splash( cell );
|
||||
if (Dungeon.level.heroFOV[cell]) {
|
||||
identify();
|
||||
|
||||
splash( cell );
|
||||
|
||||
Sample.INSTANCE.play( Assets.Sounds.SHATTER );
|
||||
Sample.INSTANCE.play( Assets.Sounds.GAS );
|
||||
}
|
||||
|
||||
@@ -40,11 +40,11 @@ public class PotionOfSnapFreeze extends ExoticPotion {
|
||||
|
||||
@Override
|
||||
public void shatter(int cell) {
|
||||
|
||||
|
||||
splash( cell );
|
||||
if (Dungeon.level.heroFOV[cell]) {
|
||||
identify();
|
||||
|
||||
splash( cell );
|
||||
|
||||
Sample.INSTANCE.play( Assets.Sounds.SHATTER );
|
||||
}
|
||||
|
||||
|
||||
@@ -38,11 +38,11 @@ public class PotionOfStormClouds extends ExoticPotion {
|
||||
|
||||
@Override
|
||||
public void shatter(int cell) {
|
||||
|
||||
|
||||
splash( cell );
|
||||
if (Dungeon.level.heroFOV[cell]) {
|
||||
identify();
|
||||
|
||||
splash( cell );
|
||||
|
||||
Sample.INSTANCE.play( Assets.Sounds.SHATTER );
|
||||
Sample.INSTANCE.play( Assets.Sounds.GAS );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user