v0.4.1: fixed some items being burned/frozen when held by thieves
This commit is contained in:
parent
3de8225f9b
commit
43f3582e1e
|
@ -125,9 +125,16 @@ public class Burning extends Buff implements Hero.Doom {
|
||||||
target.damage( damage, this );
|
target.damage( damage, this );
|
||||||
}
|
}
|
||||||
|
|
||||||
if (target instanceof Thief && ((Thief)target).item instanceof Scroll) {
|
if (target instanceof Thief) {
|
||||||
((Thief)target).item = null;
|
|
||||||
|
Item item = ((Thief) target).item;
|
||||||
|
|
||||||
|
if (item instanceof Scroll &&
|
||||||
|
!(item instanceof ScrollOfUpgrade || item instanceof ScrollOfMagicalInfusion)) {
|
||||||
target.sprite.emitter().burst( ElmoParticle.FACTORY, 6 );
|
target.sprite.emitter().burst( ElmoParticle.FACTORY, 6 );
|
||||||
|
((Thief)target).item = null;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -74,10 +74,14 @@ public class Chill extends FlavourBuff {
|
||||||
GLog.w( Messages.get(this, "freezes", item.toString()) );
|
GLog.w( Messages.get(this, "freezes", item.toString()) );
|
||||||
|
|
||||||
}
|
}
|
||||||
} else if (target instanceof Thief && ((Thief)target).item instanceof Potion) {
|
} else if (target instanceof Thief) {
|
||||||
|
|
||||||
|
Item item = ((Thief) target).item;
|
||||||
|
|
||||||
|
if (item instanceof Potion && !(item instanceof PotionOfStrength || item instanceof PotionOfMight)) {
|
||||||
((Potion) ((Thief) target).item).shatter(target.pos);
|
((Potion) ((Thief) target).item).shatter(target.pos);
|
||||||
((Thief) target).item = null;
|
((Thief) target).item = null;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -74,13 +74,16 @@ public class Frost extends FlavourBuff {
|
||||||
GLog.w( Messages.get(this, "freezes", item.toString()) );
|
GLog.w( Messages.get(this, "freezes", item.toString()) );
|
||||||
|
|
||||||
}
|
}
|
||||||
} else if (target instanceof Thief && ((Thief)target).item instanceof Potion) {
|
} else if (target instanceof Thief) {
|
||||||
|
|
||||||
|
Item item = ((Thief) target).item;
|
||||||
|
|
||||||
|
if (item instanceof Potion && !(item instanceof PotionOfStrength || item instanceof PotionOfMight)) {
|
||||||
((Potion) ((Thief) target).item).shatter(target.pos);
|
((Potion) ((Thief) target).item).shatter(target.pos);
|
||||||
((Thief) target).item = null;
|
((Thief) target).item = null;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user