v0.3.3: implemented BOSS and MINIBOSS properties
This commit is contained in:
@@ -292,8 +292,10 @@ public class CursedWand {
|
||||
cursedFX(user, bolt, new Callback() {
|
||||
public void call() {
|
||||
Char ch = Actor.findChar( bolt.collisionPos );
|
||||
//TODO: this is lazy, should think of a better way to ID bosses, or have this effect be more sophisticated.
|
||||
if (ch != null && ch != user && !Dungeon.bossLevel()){
|
||||
|
||||
if (ch != null && ch != user
|
||||
&& !ch.properties().contains(Char.Property.BOSS)
|
||||
&& !ch.properties().contains(Char.Property.MINIBOSS)){
|
||||
Sheep sheep = new Sheep();
|
||||
sheep.lifespan = 10;
|
||||
sheep.pos = ch.pos;
|
||||
|
||||
@@ -48,13 +48,6 @@ public class WandOfCorruption extends Wand {
|
||||
image = ItemSpriteSheet.WAND_CORRUPTION;
|
||||
}
|
||||
|
||||
//FIXME: sloppy
|
||||
private static HashSet<Class> bosses = new HashSet<Class>(Arrays.asList(
|
||||
FetidRat.class, GnollTrickster.class, GreatCrab.class,
|
||||
Goo.class, Tengu.class, DM300.class, King.class,
|
||||
Yog.class, Yog.BurningFist.class, Yog.RottingFist.class
|
||||
));
|
||||
|
||||
@Override
|
||||
protected void onZap(Ballistica bolt) {
|
||||
Char ch = Actor.findChar(bolt.collisionPos);
|
||||
@@ -66,7 +59,7 @@ public class WandOfCorruption extends Wand {
|
||||
return;
|
||||
}
|
||||
|
||||
if (bosses.contains(ch.getClass())){
|
||||
if (ch.properties().contains(Char.Property.BOSS) || ch.properties().contains(Char.Property.MINIBOSS)){
|
||||
GLog.w("Bosses are immune to corruption");
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user