v0.7.4a: most AOE scrolls now no longer affect allies

This commit is contained in:
Evan Debenham 2019-07-27 13:46:57 -04:00
parent a18d454420
commit 1c290648e9
5 changed files with 9 additions and 5 deletions

View File

@ -23,6 +23,7 @@ package com.shatteredpixel.shatteredpixeldungeon.items.scrolls;
import com.shatteredpixel.shatteredpixeldungeon.Assets; import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Amok; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Amok;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Invisibility; 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] )) { for (Mob mob : Dungeon.level.mobs.toArray( new Mob[0] )) {
mob.beckon( curUser.pos ); 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); Buff.prolong(mob, Amok.class, 5f);
} }
} }

View File

@ -23,6 +23,7 @@ package com.shatteredpixel.shatteredpixeldungeon.items.scrolls;
import com.shatteredpixel.shatteredpixeldungeon.Assets; import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Invisibility; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Invisibility;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Paralysis; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Paralysis;
@ -49,7 +50,7 @@ public class ScrollOfTerror extends Scroll {
int count = 0; int count = 0;
Mob affected = null; Mob affected = null;
for (Mob mob : Dungeon.level.mobs.toArray( new Mob[0] )) { 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(); Buff.affect( mob, Terror.class, 20f ).object = curUser.id();
if (mob.buff(Terror.class) != null){ if (mob.buff(Terror.class) != null){

View File

@ -23,6 +23,7 @@ package com.shatteredpixel.shatteredpixeldungeon.items.scrolls.exotic;
import com.shatteredpixel.shatteredpixeldungeon.Assets; import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Blindness; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Blindness;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Invisibility; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Invisibility;
@ -40,7 +41,7 @@ public class ScrollOfConfusion extends ExoticScroll {
@Override @Override
public void doRead() { public void doRead() {
for (Mob mob : Dungeon.level.mobs.toArray( new Mob[0] )) { 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, Vertigo.class, 10f);
Buff.prolong(mob, Blindness.class, 10f); Buff.prolong(mob, Blindness.class, 10f);
} }

View File

@ -23,6 +23,7 @@ package com.shatteredpixel.shatteredpixeldungeon.items.scrolls.exotic;
import com.shatteredpixel.shatteredpixeldungeon.Assets; import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Invisibility; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Invisibility;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Paralysis; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Paralysis;
@ -43,7 +44,7 @@ public class ScrollOfPetrification extends ExoticScroll {
Invisibility.dispel(); Invisibility.dispel();
for (Mob mob : Dungeon.level.mobs.toArray( new Mob[0] )) { 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 ); Buff.affect( mob, Paralysis.class, Paralysis.DURATION );
} }
} }

View File

@ -49,7 +49,7 @@ public class ScrollOfPolymorph extends ExoticScroll {
Invisibility.dispel(); Invisibility.dispel();
for (Mob mob : Dungeon.level.mobs.toArray( new Mob[0] )) { 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) if (!mob.properties().contains(Char.Property.BOSS)
&& !mob.properties().contains(Char.Property.MINIBOSS)){ && !mob.properties().contains(Char.Property.MINIBOSS)){
Sheep sheep = new Sheep(); Sheep sheep = new Sheep();