From 002d0bccdd83c3b1a70d5d625f0b99bb9e5e6e5b Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Wed, 20 Dec 2023 13:22:07 -0500 Subject: [PATCH] v2.3.0: standardized rockfall gnoll behaviour: - all gnoll rockfall effects now deal 8-12 dmg - all gnoll rockfall effects now ignore armor --- core/src/main/assets/messages/actors/actors.properties | 1 + core/src/main/assets/messages/levels/levels.properties | 2 +- .../shatteredpixel/shatteredpixeldungeon/actors/Char.java | 3 +++ .../shatteredpixeldungeon/actors/mobs/GnollGeomancer.java | 8 +++++++- .../levels/traps/GnollRockfallTrap.java | 5 ++--- 5 files changed, 14 insertions(+), 5 deletions(-) diff --git a/core/src/main/assets/messages/actors/actors.properties b/core/src/main/assets/messages/actors/actors.properties index de5ac6eaf..2eeeebd8d 100644 --- a/core/src/main/assets/messages/actors/actors.properties +++ b/core/src/main/assets/messages/actors/actors.properties @@ -1221,6 +1221,7 @@ actors.mobs.gnollgeomancer.name=gnoll geomancer actors.mobs.gnollgeomancer.warning=The geomancer begins to stir. Make sure you're ready before you continue! actors.mobs.gnollgeomancer.alert=The geomancer awakens! The entire cave seems to shift as it leaps away while laughing madly! actors.mobs.gnollgeomancer.rock_kill=The flying boulder killed you... +actors.mobs.gnollgeomancer.rockfall_kill=The falling rocks killed you... actors.mobs.gnollgeomancer.desc=This impressively tall senior gnoll must be the source of the various earth-moving magic around here, and the organizer of all the gnoll activity. Unlike the gnoll sappers in the area, the geomancer is quite adept with its magic, and cannot be damaged by thrown or falling rocks. It doesn't have any way to fight in melee combat though. actors.mobs.gnollgeomancer.desc_armor=The geomancer is currently encased in a layer of rock armor. _You'll need to get up close and break it away with your pickaxe before you can damage the geomancer._ actors.mobs.gnollgeomancer.desc_armor_sapper=_A nearby gnoll sapper is holding a device that is empowering the geomancer's rock armor. You won't be able to damage it at all right now!_ diff --git a/core/src/main/assets/messages/levels/levels.properties b/core/src/main/assets/messages/levels/levels.properties index 33606debc..88c419739 100644 --- a/core/src/main/assets/messages/levels/levels.properties +++ b/core/src/main/assets/messages/levels/levels.properties @@ -85,7 +85,7 @@ levels.traps.geysertrap.name=geyser trap levels.traps.geysertrap.desc=When triggered, this trap will cause a geyser of water to spew forth, damaging fiery enemies, knocking away all nearby characters, dousing fires, and converting the surrounding terrain to water. levels.traps.gnollrockfalltrap.name=gnoll rockfall trap -levels.traps.gnollrockfalltrap.desc=This rockfall trap is made with some form of magical assistance. When triggered, it will cause rocks to loosen and immediately fall from above in a 5x5 area around it. It's not been as methodically set up as other rockfall traps, and so isn't quite as dangerous. Rocks also won't fall in locations with am adjacent barricade, as they help hold the ceiling up.\n\n_This trap can't tell friend from foe, and so is just as harmful to the gnolls as it is to you._ +levels.traps.gnollrockfalltrap.desc=This rockfall trap is made with some form of magical assistance. When triggered, it will cause rocks to loosen and immediately fall from above in a 5x5 area around it. Due to the softer rocks in the area, It won't deal as much damage as a regular rockfall trap, but your armor also won't be effective against it. Rocks also won't fall in locations with an adjacent barricade, as they help hold the ceiling up.\n\n_This trap can't tell friend from foe, and so is just as harmful to the gnolls as it is to you._ 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/Char.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Char.java index ffd7fb7a2..2eda0f44d 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Char.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Char.java @@ -117,6 +117,7 @@ import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain; import com.shatteredpixel.shatteredpixeldungeon.levels.features.Chasm; import com.shatteredpixel.shatteredpixeldungeon.levels.features.Door; import com.shatteredpixel.shatteredpixeldungeon.levels.traps.GeyserTrap; +import com.shatteredpixel.shatteredpixeldungeon.levels.traps.GnollRockfallTrap; import com.shatteredpixel.shatteredpixeldungeon.levels.traps.GrimTrap; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.plants.Earthroot; @@ -842,6 +843,8 @@ public abstract class Char extends Actor { { NO_ARMOR_PHYSICAL_SOURCES.add(CrystalSpire.SpireSpike.class); NO_ARMOR_PHYSICAL_SOURCES.add(GnollGeomancer.Boulder.class); + NO_ARMOR_PHYSICAL_SOURCES.add(GnollGeomancer.GnollRockFall.class); + NO_ARMOR_PHYSICAL_SOURCES.add(GnollRockfallTrap.class); NO_ARMOR_PHYSICAL_SOURCES.add(DwarfKing.KingDamager.class); NO_ARMOR_PHYSICAL_SOURCES.add(DwarfKing.Summoning.class); NO_ARMOR_PHYSICAL_SOURCES.add(Chasm.class); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/GnollGeomancer.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/GnollGeomancer.java index cdc4723a1..f12bd6312 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/GnollGeomancer.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/GnollGeomancer.java @@ -793,7 +793,13 @@ public class GnollGeomancer extends Mob { @Override public void affectChar(Char ch) { - Buff.prolong(ch, Paralysis.class, ch instanceof GnollGuard ? 10 : 3); + ch.damage(Random.NormalIntRange(8, 12), this); + if (ch.isAlive()) { + Buff.prolong(ch, Paralysis.class, ch instanceof GnollGuard ? 10 : 3); + } else if (ch == Dungeon.hero){ + Dungeon.fail( target ); + GLog.n( Messages.get( GnollGeomancer.class, "rockfall_kill") ); + } } @Override diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/traps/GnollRockfallTrap.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/traps/GnollRockfallTrap.java index 1255d92ce..9469248a8 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/traps/GnollRockfallTrap.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/traps/GnollRockfallTrap.java @@ -80,9 +80,8 @@ public class GnollRockfallTrap extends RockfallTrap { Char ch = Actor.findChar( cell ); if (ch != null && ch.isAlive() && !(ch instanceof GnollGeomancer)){ - //5-10 less damage than normal rockfall traps - int damage = Random.NormalIntRange(scalingDepth(), scalingDepth()*2); - damage -= ch.drRoll(); + //deals notably less damage than a regular rockfall trap, but ignores armor + int damage = Random.NormalIntRange(8, 12); ch.damage( Math.max(damage, 0) , this); //guards take full paralysis, otherwise just a little