From 24d63a37d225494f08e91ed53c750bb40a311dfb Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Wed, 25 Jul 2018 10:35:43 -0400 Subject: [PATCH] v0.7.0: various corrections: - fixed freezing in tengu fight - fixed 'TODO' in potion of dragon's breath - fixed incorrect visuals in stone of intuition --- .../shatteredpixeldungeon/actors/mobs/Tengu.java | 6 ++++-- .../items/potions/exotic/PotionOfDragonsBreath.java | 3 ++- .../items/stones/StoneOfIntuition.java | 2 +- .../shatteredpixeldungeon/messages/items/items.properties | 1 + 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Tengu.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Tengu.java index 8d44aab99..aef53e44d 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Tengu.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Tengu.java @@ -178,11 +178,13 @@ public class Tengu extends Mob { if (HP > HT/2) { //place new traps + int tries; for (int i=0; i < 4; i++) { int trapPos; + tries = 15; do { trapPos = Random.Int( level.length() ); - } while (level.map[trapPos] != Terrain.INACTIVE_TRAP + } while (tries-- > 0 && level.map[trapPos] != Terrain.INACTIVE_TRAP && level.map[trapPos] != Terrain.TRAP); if (level.map[trapPos] == Terrain.INACTIVE_TRAP) { @@ -192,7 +194,7 @@ public class Tengu extends Mob { } } - int tries = 50; + tries = 50; do { newPos = Random.IntRange(3, 7) + 32*Random.IntRange(26, 30); } while ( (level.adjacent(newPos, enemy.pos) || Actor.findChar(newPos) != null) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/exotic/PotionOfDragonsBreath.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/exotic/PotionOfDragonsBreath.java index 591ccadc9..bca87b761 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/exotic/PotionOfDragonsBreath.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/exotic/PotionOfDragonsBreath.java @@ -33,6 +33,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Cripple; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; import com.shatteredpixel.shatteredpixeldungeon.effects.MagicMissile; import com.shatteredpixel.shatteredpixeldungeon.mechanics.Ballistica; +import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.scenes.CellSelector; import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene; import com.watabou.noosa.audio.Sample; @@ -154,7 +155,7 @@ public class PotionOfDragonsBreath extends ExoticPotion { @Override public String prompt() { - return "test"; + return Messages.get(PotionOfDragonsBreath.class, "prompt"); } }; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/stones/StoneOfIntuition.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/stones/StoneOfIntuition.java index 93a4e57e9..5ac9d26b1 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/stones/StoneOfIntuition.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/stones/StoneOfIntuition.java @@ -206,7 +206,7 @@ public class StoneOfIntuition extends InventoryStone { super.onClick(); } }; - Image im = new Image(Assets.CONS_ICONS, 7*i, all == potions ? 0 : 8, 7, 8); + Image im = new Image(Assets.CONS_ICONS, 7*i, all == potions ? 0 : 16, 7, 8); im.scale.set(2f); btn.icon(im); btn.setRect(left + placed*BTN_SIZE, top, BTN_SIZE, BTN_SIZE); diff --git a/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/items/items.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/items/items.properties index e8b4e135a..fbc48357b 100644 --- a/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/items/items.properties +++ b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/items/items.properties @@ -568,6 +568,7 @@ items.potions.exotic.potionofcorrosivegas.name=potion of corrosive gas items.potions.exotic.potionofcorrosivegas.desc=Uncorking or shattering this pressurized glass will cause its contents to explode into a deadly cloud of corrosive rust-colored gas. The gas is less concentrated however, and will not last for very long. items.potions.exotic.potionofdragonsbreath.name=potion of dragon's breath +items.potions.exotic.potionofdragonsbreath.prompt=Choose a location to burn items.potions.exotic.potionofdragonsbreath.desc=This flask contains an unusual compound which bursts into flame shortly after mixing with saliva. Quickly spitting the liquid will allow the user to spew flame from their mouth! items.potions.exotic.potionofearthenarmor.name=potion of earthen armor