From a1197debd26763541d39daab802be283355a75b4 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Tue, 8 Mar 2022 16:07:46 -0500 Subject: [PATCH] v1.2.0: geyser traps, aqua blast, and storm clouds now clear fire --- core/src/main/assets/messages/items/items.properties | 4 ++-- core/src/main/assets/messages/levels/levels.properties | 2 +- .../shatteredpixeldungeon/actors/blobs/StormCloud.java | 6 +++++- .../shatteredpixeldungeon/levels/traps/GeyserTrap.java | 8 ++++++++ 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/core/src/main/assets/messages/items/items.properties b/core/src/main/assets/messages/items/items.properties index cdf81ca54..8e7eb0543 100644 --- a/core/src/main/assets/messages/items/items.properties +++ b/core/src/main/assets/messages/items/items.properties @@ -766,7 +766,7 @@ items.potions.exotic.potionofstamina.name=potion of stamina items.potions.exotic.potionofstamina.desc=Drinking this oddly sweet liquid will imbue you with a long-lasting boost of energy, allowing you to run at a quickened pace for an extended period of time. items.potions.exotic.potionofstormclouds.name=potion of storm clouds -items.potions.exotic.potionofstormclouds.desc=Throwing this potion will create a quickly-spreading cloud of concentrated vapor, which will condense and pour down onto the environment. Most terrain will be converted to water, and traps will be overwhelmed and break. +items.potions.exotic.potionofstormclouds.desc=Throwing this potion will create a quickly-spreading cloud of concentrated vapor, which will condense and pour down onto the environment. Most terrain will be converted to water, fire will be doused, and traps will be overwhelmed and break. @@ -1048,7 +1048,7 @@ items.spells.alchemize$wndalchemizeitem.energize_1=Turn 1 into %d energy items.spells.alchemize$wndalchemizeitem.energize_all=Turn all into %d energy items.spells.aquablast.name=aqua blast -items.spells.aquablast.desc=This spell will create a burst of water at the target location. It isn't forceful enough to do damage (even to fiery enemies), but it will spread water to nearby terrain and knock back characters near the burst. +items.spells.aquablast.desc=This spell will create a burst of water at the target location. It isn't forceful enough to do damage (even to fiery enemies), but it will spread water to nearby terrain, douse fires, and knock back characters near the burst. items.spells.arcanecatalyst.name=arcane catalyst items.spells.arcanecatalyst.desc=This ball of golden dust is made from the deconstructed essence of a scroll. It glimmers in the darkness of the dungeon.\n\nThis catalyst is primarily useful as an alchemy ingredient, but you can also channel the magic directly to get the effect of a random scroll. diff --git a/core/src/main/assets/messages/levels/levels.properties b/core/src/main/assets/messages/levels/levels.properties index 89a2415e1..dc2f566fb 100644 --- a/core/src/main/assets/messages/levels/levels.properties +++ b/core/src/main/assets/messages/levels/levels.properties @@ -69,7 +69,7 @@ levels.traps.gatewaytrap.name=gateway trap levels.traps.gatewaytrap.desc=This special teleportation trap can activate an infinite numbers of times and always teleports to the same location. levels.traps.geysertrap.name=geyser trap -levels.traps.geysertrap.desc=When triggered, this trap will cause a geyser of water to spew forth, knocking away all nearby characters and converting the surrounding terrain to water. +levels.traps.geysertrap.desc=When triggered, this trap will cause a geyser of water to spew forth, knocking away all nearby characters, dousing fires, and converting the surrounding terrain to water. levels.traps.grimtrap.name=grim trap levels.traps.grimtrap.ondeath=You were killed by the blast of a grim trap... diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/StormCloud.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/StormCloud.java index 3682636be..24f9cfd56 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/StormCloud.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/StormCloud.java @@ -33,12 +33,16 @@ public class StormCloud extends Blob { super.evolve(); int cell; - + + Fire fire = (Fire) Dungeon.level.blobs.get(Fire.class); for (int i = area.left; i < area.right; i++){ for (int j = area.top; j < area.bottom; j++){ cell = i + j*Dungeon.level.width(); if (cur[cell] > 0) { Dungeon.level.setCellToWater(true, cell); + if (fire != null){ + fire.clear(i); + } } } } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/traps/GeyserTrap.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/traps/GeyserTrap.java index 7c8915da7..278c92535 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/traps/GeyserTrap.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/traps/GeyserTrap.java @@ -25,6 +25,7 @@ import com.shatteredpixel.shatteredpixeldungeon.Assets; import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.actors.Actor; import com.shatteredpixel.shatteredpixeldungeon.actors.Char; +import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Fire; import com.shatteredpixel.shatteredpixeldungeon.effects.Splash; import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfBlastWave; import com.shatteredpixel.shatteredpixeldungeon.mechanics.Ballistica; @@ -51,12 +52,19 @@ public class GeyserTrap extends Trap { Splash.at( DungeonTilemap.tileCenterToWorld( pos ), -PointF.PI/2, PointF.PI/2, 0x5bc1e3, 100, 0.01f); Sample.INSTANCE.play(Assets.Sounds.GAS, 1f, 0.75f); + Fire fire = (Fire) Dungeon.level.blobs.get(Fire.class); PathFinder.buildDistanceMap( pos, BArray.not( Dungeon.level.solid, null ), 2 ); for (int i = 0; i < PathFinder.distance.length; i++) { if (PathFinder.distance[i] == 2 && Random.Int(3) > 0){ Dungeon.level.setCellToWater(true, i); + if (fire != null){ + fire.clear(i); + } } else if (PathFinder.distance[i] < 2){ Dungeon.level.setCellToWater(true, i); + if (fire != null){ + fire.clear(i); + } } }