diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/Freezing.java b/src/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/Freezing.java index 1673634cf..2aaa417f5 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/Freezing.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/Freezing.java @@ -30,9 +30,8 @@ import com.watabou.utils.Random; public class Freezing { - // It's not really a blob... - - public static void affect( int cell, Fire fire ) { + // Returns true, if this cell is visible + public static boolean affect( int cell, Fire fire ) { Char ch = Actor.findChar( cell ); if (ch != null) { @@ -54,8 +53,9 @@ public class Freezing { if (Dungeon.visible[cell]) { CellEmitter.get( cell ).start( SnowParticle.FACTORY, 0.2f, 6 ); + return true; + } else { + return false; } - - } } diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/WaterOfTransmutation.java b/src/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/WaterOfTransmutation.java index 2b8013f89..77a509087 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/WaterOfTransmutation.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/WaterOfTransmutation.java @@ -33,7 +33,6 @@ import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.Scroll; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfUpgrade; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfWeaponUpgrade; import com.shatteredpixel.shatteredpixeldungeon.items.wands.Wand; -import com.shatteredpixel.shatteredpixeldungeon.items.weapon.Weapon.Enchantment; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.*; import com.shatteredpixel.shatteredpixeldungeon.plants.Plant; @@ -43,41 +42,29 @@ public class WaterOfTransmutation extends WellWater { protected Item affectItem( Item item ) { if (item instanceof MeleeWeapon) { - - return changeWeapon( (MeleeWeapon)item ); - + item = changeWeapon( (MeleeWeapon)item ); } else if (item instanceof Scroll) { - - Journal.remove( Feature.WELL_OF_TRANSMUTATION ); - return changeScroll( (Scroll)item ); - + item = changeScroll( (Scroll)item ); } else if (item instanceof Potion) { - - Journal.remove( Feature.WELL_OF_TRANSMUTATION ); - return changePotion( (Potion)item ); - + item = changePotion( (Potion)item ); } else if (item instanceof Ring) { - - Journal.remove( Feature.WELL_OF_TRANSMUTATION ); - return changeRing( (Ring)item ); - - } else if (item instanceof Wand) { - - Journal.remove( Feature.WELL_OF_TRANSMUTATION ); - return changeWand( (Wand)item ); - + item = changeRing( (Ring)item ); + } else if (item instanceof Wand) { + item = changeWand( (Wand)item ); } else if (item instanceof Plant.Seed) { - - Journal.remove( Feature.WELL_OF_TRANSMUTATION ); - return changeSeed( (Plant.Seed)item ); - + item = changeSeed( (Plant.Seed)item ); } else if (item instanceof Artifact) { - - return changeArtifact( (Artifact)item ); - + item = changeArtifact( (Artifact)item ); } else { - return null; + item = null; } + + if (item != null) { + Journal.remove( Feature.WELL_OF_TRANSMUTATION ); + } + + return item; + } @Override @@ -128,17 +115,16 @@ public class WaterOfTransmutation extends WellWater { } else if (level < 0) { n.degrade( -level ); } - - if (w.isEnchanted()) { - n.enchant( Enchantment.random() ); - } + + //FIXME enchantment should be preserved. + /*if (w.isEnchanted()) { + n.enchant(); + }*/ n.levelKnown = w.levelKnown; n.cursedKnown = w.cursedKnown; n.cursed = w.cursed; - Journal.remove( Feature.WELL_OF_TRANSMUTATION ); - return n; } else { return null; @@ -175,7 +161,6 @@ public class WaterOfTransmutation extends WellWater { n.cursed = a.cursed; n.levelKnown = a.levelKnown; n.transferUpgrade(a.visiblyUpgraded()); - Journal.remove( Feature.WELL_OF_TRANSMUTATION ); } return n;