From 1b10338b37e34f92397cc749fd8419ad94cb3a97 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Thu, 29 Jan 2015 14:16:55 -0500 Subject: [PATCH] Merging 1.7.5 Source: plant changes --- .../shatteredpixel/shatteredpixeldungeon/plants/Fadeleaf.java | 4 +--- .../shatteredpixel/shatteredpixeldungeon/plants/Icecap.java | 1 - .../shatteredpixel/shatteredpixeldungeon/plants/Plant.java | 4 +++- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/plants/Fadeleaf.java b/src/com/shatteredpixel/shatteredpixeldungeon/plants/Fadeleaf.java index a7875e580..51777dbb6 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/plants/Fadeleaf.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/plants/Fadeleaf.java @@ -48,9 +48,7 @@ public class Fadeleaf extends Plant { ((Hero)ch).curAction = null; } else if (ch instanceof Mob) { - - // Why do I try to choose a new position 10 times? - // I don't remember... + int count = 10; int newPos; do { diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/plants/Icecap.java b/src/com/shatteredpixel/shatteredpixeldungeon/plants/Icecap.java index 094cd6f99..b594528b2 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/plants/Icecap.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/plants/Icecap.java @@ -48,7 +48,6 @@ public class Icecap extends Plant { for (int i=0; i < Level.LENGTH; i++) { if (PathFinder.distance[i] < Integer.MAX_VALUE) { - Freezing.affect( i, fire ); } } diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/plants/Plant.java b/src/com/shatteredpixel/shatteredpixeldungeon/plants/Plant.java index fc2eb8d7a..921c03648 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/plants/Plant.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/plants/Plant.java @@ -161,7 +161,9 @@ public class Plant implements Bundlable { public Plant couch( int pos ) { try { - Sample.INSTANCE.play( Assets.SND_PLANT ); + if (Dungeon.visible[pos]) { + Sample.INSTANCE.play(Assets.SND_PLANT); + } Plant plant = plantClass.newInstance(); plant.pos = pos; return plant;