v2.0.0: fixed challenge spooking shopkeepers

This commit is contained in:
Evan Debenham
2023-03-08 12:51:40 -05:00
parent 7b4df33d5c
commit d0889e3ecb

View File

@@ -33,6 +33,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.abilities.ArmorAbility;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.NPC;
import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter;
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
import com.shatteredpixel.shatteredpixeldungeon.items.Dewdrop;
@@ -156,7 +157,7 @@ public class Challenge extends ArmorAbility {
boolean bossTarget = Char.hasProp(targetCh, Char.Property.BOSS);
for (Char toFreeze : Actor.chars()){
if (toFreeze != targetCh && toFreeze.alignment != hero.alignment
if (toFreeze != targetCh && toFreeze.alignment != Char.Alignment.ALLY && !(toFreeze instanceof NPC)
&& (!bossTarget || !(Char.hasProp(targetCh, Char.Property.BOSS) || Char.hasProp(targetCh, Char.Property.BOSS_MINION)))) {
Actor.delayChar(toFreeze, DuelParticipant.DURATION);
Buff.affect(toFreeze, SpectatorFreeze.class, DuelParticipant.DURATION);