From 52fe813db01583dc2c32fd10c7f5c4225b1a115e Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Sat, 2 Jan 2021 17:26:35 -0500 Subject: [PATCH] v0.9.1b: piranha are now vulnerable to electricity and frost --- .../shatteredpixeldungeon/actors/Char.java | 3 --- .../shatteredpixeldungeon/actors/mobs/Piranha.java | 11 +++++++++-- 2 files changed, 9 insertions(+), 5 deletions(-) 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 279bbd278..cf7d78e69 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Char.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Char.java @@ -23,7 +23,6 @@ package com.shatteredpixel.shatteredpixeldungeon.actors; import com.shatteredpixel.shatteredpixeldungeon.Assets; import com.shatteredpixel.shatteredpixeldungeon.Dungeon; -import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Blob; import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Electricity; import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.ToxicGas; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Adrenaline; @@ -786,8 +785,6 @@ public abstract class Char extends Actor { DEMONIC, INORGANIC ( new HashSet(), new HashSet( Arrays.asList(Bleeding.class, ToxicGas.class, Poison.class) )), - BLOB_IMMUNE ( new HashSet(), - new HashSet( Arrays.asList(Blob.class) )), FIERY ( new HashSet( Arrays.asList(WandOfFireblast.class, Elemental.FireElemental.class)), new HashSet( Arrays.asList(Burning.class, Blazing.class))), ICY ( new HashSet( Arrays.asList(WandOfFrost.class, Elemental.FrostElemental.class)), diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Piranha.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Piranha.java index 0e066bb67..909d96112 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Piranha.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Piranha.java @@ -25,6 +25,9 @@ import com.shatteredpixel.shatteredpixeldungeon.Badges; import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.Statistics; import com.shatteredpixel.shatteredpixeldungeon.actors.Char; +import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Electricity; +import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Freezing; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.BlobImmunity; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Burning; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; import com.shatteredpixel.shatteredpixeldungeon.items.food.MysteryMeat; @@ -49,8 +52,7 @@ public class Piranha extends Mob { HUNTING = new Hunting(); state = SLEEPING; - - properties.add(Property.BLOB_IMMUNE); + } public Piranha() { @@ -144,6 +146,11 @@ public class Piranha extends Mob { } { + for (Class c : new BlobImmunity().immunities()){ + if (c != Electricity.class && c != Freezing.class){ + immunities.add(c); + } + } immunities.add( Burning.class ); }