diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfRage.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfRage.java index fd7666317..fdab631c7 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfRage.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfRage.java @@ -23,6 +23,7 @@ package com.shatteredpixel.shatteredpixeldungeon.items.scrolls; import com.shatteredpixel.shatteredpixeldungeon.Assets; import com.shatteredpixel.shatteredpixeldungeon.Dungeon; +import com.shatteredpixel.shatteredpixeldungeon.actors.Char; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Amok; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Invisibility; @@ -45,7 +46,7 @@ public class ScrollOfRage extends Scroll { for (Mob mob : Dungeon.level.mobs.toArray( new Mob[0] )) { mob.beckon( curUser.pos ); - if (Dungeon.level.heroFOV[mob.pos]) { + if (mob.alignment != Char.Alignment.ALLY && Dungeon.level.heroFOV[mob.pos]) { Buff.prolong(mob, Amok.class, 5f); } } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfTerror.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfTerror.java index 5139ae322..22d239053 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfTerror.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfTerror.java @@ -23,6 +23,7 @@ package com.shatteredpixel.shatteredpixeldungeon.items.scrolls; import com.shatteredpixel.shatteredpixeldungeon.Assets; import com.shatteredpixel.shatteredpixeldungeon.Dungeon; +import com.shatteredpixel.shatteredpixeldungeon.actors.Char; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Invisibility; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Paralysis; @@ -49,7 +50,7 @@ public class ScrollOfTerror extends Scroll { int count = 0; Mob affected = null; for (Mob mob : Dungeon.level.mobs.toArray( new Mob[0] )) { - if (Dungeon.level.heroFOV[mob.pos]) { + if (mob.alignment != Char.Alignment.ALLY && Dungeon.level.heroFOV[mob.pos]) { Buff.affect( mob, Terror.class, 20f ).object = curUser.id(); if (mob.buff(Terror.class) != null){ diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/exotic/ScrollOfConfusion.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/exotic/ScrollOfConfusion.java index f28eb9582..1fdf9bdc2 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/exotic/ScrollOfConfusion.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/exotic/ScrollOfConfusion.java @@ -23,6 +23,7 @@ package com.shatteredpixel.shatteredpixeldungeon.items.scrolls.exotic; import com.shatteredpixel.shatteredpixeldungeon.Assets; import com.shatteredpixel.shatteredpixeldungeon.Dungeon; +import com.shatteredpixel.shatteredpixeldungeon.actors.Char; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Blindness; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Invisibility; @@ -40,7 +41,7 @@ public class ScrollOfConfusion extends ExoticScroll { @Override public void doRead() { for (Mob mob : Dungeon.level.mobs.toArray( new Mob[0] )) { - if (Dungeon.level.heroFOV[mob.pos]) { + if (mob.alignment != Char.Alignment.ALLY && Dungeon.level.heroFOV[mob.pos]) { Buff.prolong(mob, Vertigo.class, 10f); Buff.prolong(mob, Blindness.class, 10f); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/exotic/ScrollOfPetrification.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/exotic/ScrollOfPetrification.java index 4f4d4d038..abc55c5bc 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/exotic/ScrollOfPetrification.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/exotic/ScrollOfPetrification.java @@ -23,6 +23,7 @@ package com.shatteredpixel.shatteredpixeldungeon.items.scrolls.exotic; import com.shatteredpixel.shatteredpixeldungeon.Assets; import com.shatteredpixel.shatteredpixeldungeon.Dungeon; +import com.shatteredpixel.shatteredpixeldungeon.actors.Char; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Invisibility; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Paralysis; @@ -43,7 +44,7 @@ public class ScrollOfPetrification extends ExoticScroll { Invisibility.dispel(); for (Mob mob : Dungeon.level.mobs.toArray( new Mob[0] )) { - if (Dungeon.level.heroFOV[mob.pos]) { + if (mob.alignment != Char.Alignment.ALLY && Dungeon.level.heroFOV[mob.pos]) { Buff.affect( mob, Paralysis.class, Paralysis.DURATION ); } } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/exotic/ScrollOfPolymorph.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/exotic/ScrollOfPolymorph.java index 49027f188..5f9de787d 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/exotic/ScrollOfPolymorph.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/exotic/ScrollOfPolymorph.java @@ -49,7 +49,7 @@ public class ScrollOfPolymorph extends ExoticScroll { Invisibility.dispel(); for (Mob mob : Dungeon.level.mobs.toArray( new Mob[0] )) { - if (Dungeon.level.heroFOV[mob.pos]) { + if (mob.alignment != Char.Alignment.ALLY && Dungeon.level.heroFOV[mob.pos]) { if (!mob.properties().contains(Char.Property.BOSS) && !mob.properties().contains(Char.Property.MINIBOSS)){ Sheep sheep = new Sheep();