v0.3.0c: rebalanced wand of venom
This commit is contained in:
parent
35da3512df
commit
4d5d690335
|
@ -6,25 +6,51 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Venom;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Venom;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.effects.BlobEmitter;
|
import com.shatteredpixel.shatteredpixeldungeon.effects.BlobEmitter;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
|
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
|
||||||
|
import com.watabou.utils.Bundle;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by Evan on 12/04/2015.
|
* Created by Evan on 12/04/2015.
|
||||||
*/
|
*/
|
||||||
public class VenomGas extends Blob {
|
public class VenomGas extends Blob {
|
||||||
|
|
||||||
|
private int strength = 0;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void evolve() {
|
protected void evolve() {
|
||||||
super.evolve();
|
super.evolve();
|
||||||
|
|
||||||
Char ch;
|
if (volume == 0){
|
||||||
for (int i=0; i < LENGTH; i++) {
|
strength = 0;
|
||||||
if (cur[i] > 0 && (ch = Actor.findChar(i)) != null) {
|
} else {
|
||||||
if (!ch.immunities().contains(this.getClass()))
|
Char ch;
|
||||||
Buff.affect(ch, Venom.class).set(2f);
|
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
|
@Override
|
||||||
public void use( BlobEmitter emitter ) {
|
public void use( BlobEmitter emitter ) {
|
||||||
super.use( emitter );
|
super.use( emitter );
|
||||||
|
|
|
@ -10,7 +10,7 @@ import com.watabou.utils.Bundle;
|
||||||
*/
|
*/
|
||||||
public class Venom extends Poison implements Hero.Doom {
|
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";
|
private static final String DAMAGE = "damage";
|
||||||
|
|
||||||
|
@ -31,8 +31,12 @@ public class Venom extends Poison implements Hero.Doom {
|
||||||
damage = bundle.getInt( DAMAGE );
|
damage = bundle.getInt( DAMAGE );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void set(float duration, int damage) {
|
||||||
|
set(duration);
|
||||||
|
this.damage = damage;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
//TODO: new icon?
|
|
||||||
public int icon() {
|
public int icon() {
|
||||||
return BuffIndicator.POISON;
|
return BuffIndicator.POISON;
|
||||||
}
|
}
|
||||||
|
@ -55,7 +59,8 @@ public class Venom extends Poison implements Hero.Doom {
|
||||||
public boolean act() {
|
public boolean act() {
|
||||||
if (target.isAlive()) {
|
if (target.isAlive()) {
|
||||||
target.damage(damage, this);
|
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.
|
//want it to act after the cloud of venom it came from.
|
||||||
spend( TICK+0.1f );
|
spend( TICK+0.1f );
|
||||||
|
|
|
@ -27,8 +27,9 @@ public class WandOfVenom extends Wand {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onZap(Ballistica bolt) {
|
protected void onZap(Ballistica bolt) {
|
||||||
//TODO: final balancing
|
Blob venomGas = Blob.seed(bolt.collisionPos, 50 + 10 * level, VenomGas.class);
|
||||||
GameScene.add(Blob.seed(bolt.collisionPos, 40+20*level, VenomGas.class));
|
((VenomGas)venomGas).setStrength(level+1);
|
||||||
|
GameScene.add(venomGas);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue
Block a user