v2.1.0: water effects now damage fiery enemies (burning fist resists)

This commit is contained in:
Evan Debenham
2023-05-04 16:58:36 -04:00
parent f4b12237c4
commit 71204987d0
5 changed files with 46 additions and 10 deletions

View File

@@ -815,7 +815,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, fire will be doused, 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, fiery enemies will take damage, fire will be doused, and traps will be overwhelmed and break.
@@ -1112,7 +1112,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, douse fires, and knock back characters near the burst.
items.spells.aquablast.desc=This spell will create a burst of water at the target location. It's only forceful enough to damage fiery enemies, but it also spreads water to nearby terrain, douses fires, and knocks 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.

View File

@@ -77,7 +77,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, dousing fires, and converting the surrounding terrain to water.
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.grimtrap.name=grim trap
levels.traps.grimtrap.ondeath=You were killed by the blast of a grim trap...

View File

@@ -22,6 +22,8 @@
package com.shatteredpixel.shatteredpixeldungeon.actors.blobs;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.effects.BlobEmitter;
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
@@ -43,6 +45,14 @@ public class StormCloud extends Blob {
if (fire != null){
fire.clear(i);
}
//fiery enemies take damage as if they are in toxic gas
Char ch = Actor.findChar(i);
if (ch != null
&& !ch.isImmune(getClass())
&& Char.hasProp(ch, Char.Property.FIERY)){
ch.damage(1 + Dungeon.scalingDepth()/5, this);
}
}
}
}

View File

@@ -28,6 +28,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Blob;
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Fire;
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.StormCloud;
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.ToxicGas;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Bleeding;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Blindness;
@@ -49,6 +50,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfTeleportat
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.Sickle;
import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain;
import com.shatteredpixel.shatteredpixeldungeon.levels.traps.GeyserTrap;
import com.shatteredpixel.shatteredpixeldungeon.mechanics.Ballistica;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
@@ -266,6 +268,9 @@ public abstract class YogFist extends Mob {
{
immunities.add(Frost.class);
resistances.add(StormCloud.class);
resistances.add(GeyserTrap.class);
}
}

View File

@@ -72,12 +72,24 @@ public class GeyserTrap extends Trap {
for (int i : PathFinder.NEIGHBOURS8){
Char ch = Actor.findChar(pos + i);
if (ch != null){
//trace a ballistica to our target (which will also extend past them)
Ballistica trajectory = new Ballistica(pos, ch.pos, Ballistica.STOP_TARGET);
//trim it to just be the part that goes past them
trajectory = new Ballistica(trajectory.collisionPos, trajectory.path.get(trajectory.path.size()-1), Ballistica.PROJECTILE);
//knock them back along that ballistica
WandOfBlastWave.throwChar(ch, trajectory, 2, true, true, source);
//does the equivalent of a bomb's damage against fiery enemies.
if (Char.hasProp(ch, Char.Property.FIERY)){
int dmg = Random.NormalIntRange(5 + Dungeon.scalingDepth(), 10 + Dungeon.scalingDepth()*2);
dmg *= 0.67f;
if (!ch.isImmune(GeyserTrap.class)){
ch.damage(dmg, this);
}
}
if (ch.isAlive()) {
//trace a ballistica to our target (which will also extend past them)
Ballistica trajectory = new Ballistica(pos, ch.pos, Ballistica.STOP_TARGET);
//trim it to just be the part that goes past them
trajectory = new Ballistica(trajectory.collisionPos, trajectory.path.get(trajectory.path.size() - 1), Ballistica.PROJECTILE);
//knock them back along that ballistica
WandOfBlastWave.throwChar(ch, trajectory, 2, true, true, source);
}
}
}
@@ -102,7 +114,16 @@ public class GeyserTrap extends Trap {
//random direction if it isn't the hero
targetpos = pos + PathFinder.NEIGHBOURS8[Random.Int(8)];
}
if (targetpos != -1){
//does the equivalent of a bomb's damage against fiery enemies.
if (Char.hasProp(ch, Char.Property.FIERY)){
int dmg = Random.NormalIntRange(5 + Dungeon.scalingDepth(), 10 + Dungeon.scalingDepth()*2);
if (!ch.isImmune(GeyserTrap.class)){
ch.damage(dmg, this);
}
}
if (ch.isAlive() && targetpos != -1){
//trace a ballistica in the direction of our target
Ballistica trajectory = new Ballistica(pos, targetpos, Ballistica.MAGIC_BOLT);
//knock them back along that ballistica