v3.1.0: fixed metamorphed cleanse clearing lost inventory debuff
This commit is contained in:
@@ -35,6 +35,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.EnhancedRings;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.FlavourBuff;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Haste;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Invisibility;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.LostInventory;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.PhysicalEmpower;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Recharging;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.RevealedArea;
|
||||
@@ -799,7 +800,8 @@ public enum Talent {
|
||||
&& Random.Int(10) < Dungeon.hero.pointsInTalent(Talent.CLEANSE)){
|
||||
boolean removed = false;
|
||||
for (Buff b : Dungeon.hero.buffs()) {
|
||||
if (b.type == Buff.buffType.NEGATIVE) {
|
||||
if (b.type == Buff.buffType.NEGATIVE
|
||||
&& !(b instanceof LostInventory)) {
|
||||
b.detach();
|
||||
removed = true;
|
||||
}
|
||||
|
||||
@@ -31,6 +31,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Blindness;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Degrade;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Invisibility;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.LostInventory;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.MagicImmune;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Recharging;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Regeneration;
|
||||
@@ -526,7 +527,8 @@ public abstract class Wand extends Item {
|
||||
&& Random.Int(10) < Dungeon.hero.pointsInTalent(Talent.CLEANSE)){
|
||||
boolean removed = false;
|
||||
for (Buff b : Dungeon.hero.buffs()) {
|
||||
if (b.type == Buff.buffType.NEGATIVE) {
|
||||
if (b.type == Buff.buffType.NEGATIVE
|
||||
&& !(b instanceof LostInventory)) {
|
||||
b.detach();
|
||||
removed = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user