diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/Actor.java b/src/com/shatteredpixel/shatteredpixeldungeon/actors/Actor.java index 5f9b7afed..0f7e136c2 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/actors/Actor.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/actors/Actor.java @@ -55,7 +55,7 @@ public abstract class Actor implements Bundlable { } } - protected float cooldown() { + public float cooldown() { return time - now; } diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Venom.java b/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Venom.java index b3186f9e1..ef1db9371 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Venom.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Venom.java @@ -51,7 +51,7 @@ public class Venom extends Poison implements Hero.Doom { public void set(float duration, int damage) { set(duration); - this.damage = damage; + if (this.damage < damage) this.damage = damage; } @Override diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/wands/Wand.java b/src/com/shatteredpixel/shatteredpixeldungeon/items/wands/Wand.java index 6c14c97d2..a450f55a9 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/items/wands/Wand.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/items/wands/Wand.java @@ -33,7 +33,6 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroClass; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroSubClass; import com.shatteredpixel.shatteredpixeldungeon.effects.MagicMissile; -import com.shatteredpixel.shatteredpixeldungeon.effects.particles.ShadowParticle; import com.shatteredpixel.shatteredpixeldungeon.items.Item; import com.shatteredpixel.shatteredpixeldungeon.items.bags.Bag; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.MagesStaff; @@ -252,7 +251,7 @@ public abstract class Wand extends Item { public Item random() { int n = 0; - if (Random.Int(2) == 0) { + if (Random.Int(3) == 0) { n++; if (Random.Int(5) == 0) { n++; diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfBlastWave.java b/src/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfBlastWave.java index 90c8914ac..6f961fd3a 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfBlastWave.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfBlastWave.java @@ -56,7 +56,7 @@ public class WandOfBlastWave extends Wand { Sample.INSTANCE.play( Assets.SND_BLAST ); BlastWave.blast(bolt.collisionPos); - int damage = Random.NormalIntRange(1, 6+(int)(level()*level()/4f)); + int damage = Random.NormalIntRange(1 + level(), 5+3*level()); //presses all tiles in the AOE first for (int i : Level.NEIGHBOURS9){ @@ -69,11 +69,11 @@ public class WandOfBlastWave extends Wand { if (ch != null){ processSoulMark(ch, chargesPerCast()); - ch.damage(damage, this); + ch.damage(Math.round(damage * 0.667f), this); if (ch.isAlive()) { Ballistica trajectory = new Ballistica(ch.pos, ch.pos + i, Ballistica.MAGIC_BOLT); - int strength = 1 + ((level() + 1) / 3); + int strength = 1 + Math.round(level() / 2f); throwChar(ch, trajectory, strength); } } diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfDisintegration.java b/src/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfDisintegration.java index c922170c7..6e2f7381b 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfDisintegration.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfDisintegration.java @@ -90,8 +90,8 @@ public class WandOfDisintegration extends Wand { } int lvl = level + chars.size() + terrainBonus; - int dmgMin = lvl; - int dmgMax = (int) (8 + lvl * lvl / 3f); + int dmgMin = 2 + lvl; + int dmgMax = 8 + 4*lvl; for (Char ch : chars) { processSoulMark(ch, chargesPerCast()); ch.damage( Random.NormalIntRange( dmgMin, dmgMax ), this ); diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfFireblast.java b/src/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfFireblast.java index ac1501fca..53e5f203a 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfFireblast.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfFireblast.java @@ -68,17 +68,21 @@ public class WandOfFireblast extends Wand { Char ch = Actor.findChar( cell ); if (ch != null) { - ch.damage(Random.NormalIntRange(1, (int) (8 + (level() * level() * (1 + chargesPerCast()) / 6f))), this); + int min = 1+level(); + int max = Math.round(5 + 3*level()); + + //1x/1.5x/2.25x damage + int damage = (int)Math.round(Random.NormalIntRange(min, max) * Math.pow(1.5f, chargesPerCast()-1)); + + ch.damage(damage, this); Buff.affect( ch, Burning.class ).reignite( ch ); switch(chargesPerCast()){ case 1: - Buff.affect(ch, Cripple.class, 3f); break; + break; //no effects case 2: - Buff.affect(ch, Cripple.class, 6f); break; + Buff.affect(ch, Cripple.class, 4f); break; case 3: - Buff.affect(ch, Paralysis.class, 3f); break; - case 4: - Buff.affect(ch, Paralysis.class, 6f); break; + Buff.affect(ch, Paralysis.class, 4f); break; } } } @@ -120,7 +124,8 @@ public class WandOfFireblast extends Wand { affectedCells = new HashSet<>(); visualCells = new HashSet<>(); - int maxDist = 1 + chargesPerCast()*2; + // 4/6/9 distance + int maxDist = (int)(4 * Math.pow(1.5,(chargesPerCast()-1))); int dist = Math.min(bolt.dist, maxDist); for (int i = 0; i < Level.NEIGHBOURS8.length; i++){ @@ -156,8 +161,8 @@ public class WandOfFireblast extends Wand { @Override protected int chargesPerCast() { - //consumes 40% of current charges, rounded up, with a minimum of one. - return Math.max(1, (int)Math.ceil(curCharges*0.4f)); + //consumes 30% of current charges, rounded up, with a minimum of one. + return Math.max(1, (int)Math.ceil(curCharges*0.3f)); } @Override diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfFrost.java b/src/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfFrost.java index 2f47f638a..8bb70aafd 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfFrost.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfFrost.java @@ -56,13 +56,15 @@ public class WandOfFrost extends Wand { Char ch = Actor.findChar(bolt.collisionPos); if (ch != null){ - int damage = Random.NormalIntRange(5+level(), 10+(level()*level()/3)); + int damage = Random.NormalIntRange(5+level(), 10+5*level()); if (ch.buff(Frost.class) != null){ return; //do nothing, can't affect a frozen target } if (ch.buff(Chill.class) != null){ - damage = Math.round(damage * ch.buff(Chill.class).speedFactor()); + //5% less damage per turn of chill remaining + float chill = ch.buff(Chill.class).cooldown(); + damage = (int)Math.round(damage * Math.pow(0.95f, chill)); } else { ch.sprite.burst( 0xFF99CCFF, level() / 2 + 2 ); } @@ -71,15 +73,10 @@ public class WandOfFrost extends Wand { ch.damage(damage, this); if (ch.isAlive()){ - if (Level.water[ch.pos]){ - //20+(10*level)% chance - if (Random.Int(10) >= 8-level() ) - Buff.affect(ch, Frost.class, Frost.duration(ch)*Random.Float(2f, 4f)); - else - Buff.prolong(ch, Chill.class, 6+level()); - } else { + if (Level.water[ch.pos]) Buff.prolong(ch, Chill.class, 4+level()); - } + else + Buff.prolong(ch, Chill.class, 2+level()); } } } diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfLightning.java b/src/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfLightning.java index a5877487f..cb0a149a2 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfLightning.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfLightning.java @@ -55,10 +55,11 @@ public class WandOfLightning extends Wand { //lightning deals less damage per-target, the more targets that are hit. float multipler = 0.4f + (0.6f/affected.size()); - if (Level.water[bolt.collisionPos]) multipler *= 1.5f; + //if the main target is in water, all affected take full damage + if (Level.water[bolt.collisionPos]) multipler = 1f; - int min = 5+level(); - int max = Math.round(10 + (level() * level() / 4f)); + int min = 5 + level(); + int max = 10 + 5*level(); for (Char ch : affected){ processSoulMark(ch, chargesPerCast()); diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfMagicMissile.java b/src/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfMagicMissile.java index 3da8660e4..8317d1cd8 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfMagicMissile.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfMagicMissile.java @@ -43,7 +43,7 @@ public class WandOfMagicMissile extends Wand { if (ch != null) { processSoulMark(ch, chargesPerCast()); - ch.damage(Random.NormalIntRange(3 + level() , 6 + level() * 2), this); + ch.damage(Random.NormalIntRange(2 + level() , 8 + level() * 2), this); ch.sprite.burst(0xFFFFFFFF, level() / 2 + 2); diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfPrismaticLight.java b/src/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfPrismaticLight.java index 4315f83fa..8e7cb580b 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfPrismaticLight.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfPrismaticLight.java @@ -68,11 +68,11 @@ public class WandOfPrismaticLight extends Wand { } private void affectTarget(Char ch){ - int dmg = Random.NormalIntRange(level(), (int) (8+(level()*(level()/5f)))); + int dmg = Random.NormalIntRange(1+level(), 5+3*level()); //three in (5+lvl) chance of failing if (Random.Int(5+level()) >= 3) { - Buff.prolong(ch, Blindness.class, 2f + (level() * 0.34f)); + Buff.prolong(ch, Blindness.class, 2f + (level() * 0.333f)); ch.sprite.emitter().burst(Speck.factory(Speck.LIGHT), 6 ); } @@ -80,7 +80,7 @@ public class WandOfPrismaticLight extends Wand { ch.sprite.emitter().start( ShadowParticle.UP, 0.05f, 10+level() ); Sample.INSTANCE.play(Assets.SND_BURNING); - ch.damage((int)(dmg*1.5), this); + ch.damage(Math.round(dmg*1.333f), this); } else { ch.sprite.centerEmitter().burst( RainbowParticle.BURST, 10+level() );