v0.4.1: refactoring and description changes to wands

This commit is contained in:
Evan Debenham
2016-07-09 21:30:03 -04:00
committed by Evan Debenham
parent 025783f781
commit 30f259f883
12 changed files with 186 additions and 40 deletions
@@ -46,7 +46,7 @@ import com.watabou.utils.Callback;
import com.watabou.utils.PointF;
import com.watabou.utils.Random;
public class WandOfPrismaticLight extends Wand {
public class WandOfPrismaticLight extends DamageWand {
{
image = ItemSpriteSheet.WAND_PRISMATIC_LIGHT;
@@ -54,6 +54,14 @@ public class WandOfPrismaticLight extends Wand {
collisionProperties = Ballistica.MAGIC_BOLT;
}
public int min(int lvl){
return 1+lvl;
}
public int max(int lvl){
return 5+3*lvl;
}
@Override
protected void onZap(Ballistica beam) {
Char ch = Actor.findChar(beam.collisionPos);
@@ -68,7 +76,7 @@ public class WandOfPrismaticLight extends Wand {
}
private void affectTarget(Char ch){
int dmg = Random.NormalIntRange(1+level(), 5+3*level());
int dmg = damageRoll();
//three in (5+lvl) chance of failing
if (Random.Int(5+level()) >= 3) {