v0.3.0c: rebalanced wand of venom

This commit is contained in:
Evan Debenham 2015-06-06 21:29:06 -04:00
parent 35da3512df
commit 4d5d690335
3 changed files with 42 additions and 10 deletions

View File

@ -6,25 +6,51 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Venom;
import com.shatteredpixel.shatteredpixeldungeon.effects.BlobEmitter;
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
import com.watabou.utils.Bundle;
/**
* Created by Evan on 12/04/2015.
*/
public class VenomGas extends Blob {
private int strength = 0;
@Override
protected void evolve() {
super.evolve();
Char ch;
for (int i=0; i < LENGTH; i++) {
if (cur[i] > 0 && (ch = Actor.findChar(i)) != null) {
if (!ch.immunities().contains(this.getClass()))
Buff.affect(ch, Venom.class).set(2f);
if (volume == 0){
strength = 0;
} else {
Char ch;
for (int i = 0; i < LENGTH; i++) {
if (cur[i] > 0 && (ch = Actor.findChar(i)) != null) {
if (!ch.immunities().contains(this.getClass()))
Buff.affect(ch, Venom.class).set(2f, strength);
}
}
}
}
public void setStrength(int str){
if (str > strength)
strength = str;
}
private static final String STRENGTH = "strength";
@Override
public void restoreFromBundle(Bundle bundle) {
super.restoreFromBundle(bundle);
strength = bundle.getInt( STRENGTH );
}
@Override
public void storeInBundle(Bundle bundle) {
super.storeInBundle(bundle);
bundle.put( STRENGTH, strength );
}
@Override
public void use( BlobEmitter emitter ) {
super.use( emitter );

View File

@ -10,7 +10,7 @@ import com.watabou.utils.Bundle;
*/
public class Venom extends Poison implements Hero.Doom {
private int damage = 1+ Dungeon.depth/5;
private int damage = 1;
private static final String DAMAGE = "damage";
@ -31,8 +31,12 @@ public class Venom extends Poison implements Hero.Doom {
damage = bundle.getInt( DAMAGE );
}
public void set(float duration, int damage) {
set(duration);
this.damage = damage;
}
@Override
//TODO: new icon?
public int icon() {
return BuffIndicator.POISON;
}
@ -55,7 +59,8 @@ public class Venom extends Poison implements Hero.Doom {
public boolean act() {
if (target.isAlive()) {
target.damage(damage, this);
damage = Math.min(damage+1+Dungeon.depth/10, ((Dungeon.depth+1)/2)+1);
if (damage < ((Dungeon.depth+1)/2)+1)
damage++;
//want it to act after the cloud of venom it came from.
spend( TICK+0.1f );

View File

@ -27,8 +27,9 @@ public class WandOfVenom extends Wand {
@Override
protected void onZap(Ballistica bolt) {
//TODO: final balancing
GameScene.add(Blob.seed(bolt.collisionPos, 40+20*level, VenomGas.class));
Blob venomGas = Blob.seed(bolt.collisionPos, 50 + 10 * level, VenomGas.class);
((VenomGas)venomGas).setStrength(level+1);
GameScene.add(venomGas);
}
@Override