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 889d49554..d8140d794 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Char.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Char.java @@ -415,7 +415,7 @@ public abstract class Char extends Actor { return; } - if (src != LifeLink.class && buff(LifeLink.class) != null){ + if (!(src instanceof LifeLink) && buff(LifeLink.class) != null){ HashSet links = buffs(LifeLink.class); for (LifeLink link : links.toArray(new LifeLink[0])){ if (Actor.findById(link.object) == null){ @@ -426,7 +426,7 @@ public abstract class Char extends Actor { dmg = (int)Math.ceil(dmg / (float)(links.size()+1)); for (LifeLink link : links){ Char ch = (Char)Actor.findById(link.object); - ch.damage(dmg, LifeLink.class); + ch.damage(dmg, link); if (!ch.isAlive()){ link.detach(); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/NewTengu.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/NewTengu.java index 9aeb18ea0..ad0da70fc 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/NewTengu.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/NewTengu.java @@ -1005,7 +1005,7 @@ public class NewTengu extends Mob { Char ch = Actor.findChar(cell); if (ch != null && !(ch instanceof NewTengu)){ - ch.damage(2 + Dungeon.depth, Electricity.class); + ch.damage(2 + Dungeon.depth, new Electricity()); if (ch == Dungeon.hero && !ch.isAlive()) { Dungeon.fail(NewTengu.class); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Pylon.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Pylon.java index d6cd1908a..19602ed8d 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Pylon.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Pylon.java @@ -108,7 +108,7 @@ public class Pylon extends Mob { private void shockChar( Char ch ){ if (ch != null && !(ch instanceof NewDM300)){ ch.sprite.flash(); - ch.damage(Random.NormalIntRange(10, 20), Electricity.class); + ch.damage(Random.NormalIntRange(10, 20), new Electricity()); if (ch == Dungeon.hero && !ch.isAlive()){ Dungeon.fail(NewDM300.class); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/MageArmor.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/MageArmor.java index 295e1f248..d18f413ac 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/MageArmor.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/MageArmor.java @@ -53,7 +53,7 @@ public class MageArmor extends ClassArmor { && mob.alignment != Char.Alignment.ALLY) { Buff.affect( mob, Burning.class ).reignite( mob ); Buff.prolong( mob, Roots.class, 5 ); - mob.damage(Random.NormalIntRange(4, 16 + Dungeon.depth), Burning.class); + mob.damage(Random.NormalIntRange(4, 16 + Dungeon.depth), new Burning()); } }