v0.3.3: implemented the UNDEAD property
This commit is contained in:
parent
338073a3f3
commit
83b73c50ad
|
@ -46,6 +46,7 @@ public class FetidRat extends Rat {
|
|||
state = WANDERING;
|
||||
|
||||
properties.add(Property.MINIBOSS);
|
||||
properties.add(Property.UNDEAD);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -53,6 +53,8 @@ public class Guard extends Mob {
|
|||
|
||||
loot = null; //see createloot.
|
||||
lootChance = 1;
|
||||
|
||||
properties.add(Property.UNDEAD);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -68,6 +68,7 @@ public class King extends Mob {
|
|||
Undead.count = 0;
|
||||
|
||||
properties.add(Property.BOSS);
|
||||
properties.add(Property.UNDEAD);
|
||||
}
|
||||
|
||||
private boolean nextPedestal = true;
|
||||
|
@ -281,6 +282,8 @@ public class King extends Mob {
|
|||
EXP = 0;
|
||||
|
||||
state = WANDERING;
|
||||
|
||||
properties.add(Property.UNDEAD);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -52,6 +52,8 @@ public class Monk extends Mob {
|
|||
|
||||
loot = new Food();
|
||||
lootChance = 0.083f;
|
||||
|
||||
properties.add(Property.UNDEAD);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -52,6 +52,8 @@ public class Skeleton extends Mob {
|
|||
|
||||
loot = Generator.Category.WEAPON;
|
||||
lootChance = 0.2f;
|
||||
|
||||
properties.add(Property.UNDEAD);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -58,6 +58,8 @@ public class Warlock extends Mob implements Callback {
|
|||
|
||||
loot = Generator.Category.POTION;
|
||||
lootChance = 0.83f;
|
||||
|
||||
properties.add(Property.UNDEAD);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -49,6 +49,8 @@ public class Wraith extends Mob {
|
|||
EXP = 0;
|
||||
|
||||
flying = true;
|
||||
|
||||
properties.add(Property.UNDEAD);
|
||||
}
|
||||
|
||||
private static final String LEVEL = "level";
|
||||
|
|
|
@ -233,6 +233,7 @@ public class Yog extends Mob {
|
|||
state = WANDERING;
|
||||
|
||||
properties.add(Property.BOSS);
|
||||
properties.add(Property.UNDEAD);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -69,22 +69,6 @@ public class WandOfTransfusion extends Wand {
|
|||
|
||||
private boolean freeCharge = false;
|
||||
|
||||
//FIXME: this is sloppy
|
||||
private static HashSet<Class> undeadMobs = new HashSet<Class>(Arrays.asList(
|
||||
//Any Location
|
||||
Wraith.class,
|
||||
//Sewers
|
||||
FetidRat.class,
|
||||
//Prison
|
||||
Skeleton.class,
|
||||
//City
|
||||
Warlock.class, Monk.class, Senior.class,
|
||||
King.class, King.Undead.class,
|
||||
//Halls
|
||||
Succubus.class,
|
||||
Yog.RottingFist.class
|
||||
));
|
||||
|
||||
@Override
|
||||
protected void onZap(Ballistica beam) {
|
||||
|
||||
|
@ -114,7 +98,7 @@ public class WandOfTransfusion extends Wand {
|
|||
ch.sprite.showStatus(CharSprite.POSITIVE, "+%dHP", healing);
|
||||
|
||||
//harms the undead
|
||||
} else if (undeadMobs.contains(ch.getClass())){
|
||||
} else if (ch.properties().contains(Char.Property.UNDEAD)){
|
||||
|
||||
//deals 30%+5%*lvl total HP.
|
||||
int damage = (int) Math.ceil(ch.HT*(0.3f+(0.05f*level())));
|
||||
|
|
Loading…
Reference in New Issue
Block a user