v0.7.4a: most AOE scrolls now no longer affect allies
This commit is contained in:
parent
a18d454420
commit
1c290648e9
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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){
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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 );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue
Block a user