v0.7.0: various balance changes to exotic potions and scrolls

This commit is contained in:
Evan Debenham 2018-09-22 16:59:58 -04:00
parent 2cf03c5595
commit a82c40e774
7 changed files with 34 additions and 10 deletions

View File

@ -32,7 +32,7 @@ public class AdrenalineSurge extends Buff {
} }
private int boost; private int boost;
private static final float INTERVAL = TICK * 500f; private static final float INTERVAL = TICK * 800f;
public void reset(){ public void reset(){
boost = 2; boost = 2;

View File

@ -29,7 +29,7 @@ import com.watabou.noosa.Image;
public class MagicalSight extends FlavourBuff { public class MagicalSight extends FlavourBuff {
public static final float DURATION = 30f; public static final float DURATION = 50f;
public int distance = 8; public int distance = 8;

View File

@ -44,6 +44,6 @@ public class PotionOfCorrosiveGas extends ExoticPotion {
Sample.INSTANCE.play( Assets.SND_SHATTER ); Sample.INSTANCE.play( Assets.SND_SHATTER );
} }
GameScene.add( Blob.seed( cell, 120, CorrosiveGas.class ).setStrength( 1 + Dungeon.depth/5)); GameScene.add( Blob.seed( cell, 200, CorrosiveGas.class ).setStrength( 1 + Dungeon.depth/5));
} }
} }

View File

@ -74,26 +74,43 @@ public class ScrollOfDivination extends ExoticScroll {
ArrayList<Item> IDed = new ArrayList<>(); ArrayList<Item> IDed = new ArrayList<>();
int left = 4; int left = 4;
float[] baseProbs = new float[]{3, 3, 3};
float[] probs = baseProbs.clone();
while (left > 0 && total > 0) { while (left > 0 && total > 0) {
try { try {
switch (Random.Int(3)) { switch (Random.chances(probs)) {
case 0:
default: default:
if (potions.isEmpty()) continue; probs = baseProbs.clone();
continue;
case 0:
if (potions.isEmpty()) {
probs[0] = 0;
continue;
}
probs[0]--;
Potion p = Random.element(potions).newInstance(); Potion p = Random.element(potions).newInstance();
p.setKnown(); p.setKnown();
IDed.add(p); IDed.add(p);
potions.remove(p.getClass()); potions.remove(p.getClass());
break; break;
case 1: case 1:
if (scrolls.isEmpty()) continue; if (scrolls.isEmpty()) {
probs[1] = 0;
continue;
}
probs[1]--;
Scroll s = Random.element(scrolls).newInstance(); Scroll s = Random.element(scrolls).newInstance();
s.setKnown(); s.setKnown();
IDed.add(s); IDed.add(s);
scrolls.remove(s.getClass()); scrolls.remove(s.getClass());
break; break;
case 2: case 2:
if (rings.isEmpty()) continue; if (rings.isEmpty()) {
probs[2] = 0;
continue;
}
probs[2]--;
Ring r = Random.element(rings).newInstance(); Ring r = Random.element(rings).newInstance();
r.setKnown(); r.setKnown();
IDed.add(r); IDed.add(r);

View File

@ -40,7 +40,7 @@ public class ScrollOfForesight extends ExoticScroll {
Sample.INSTANCE.play( Assets.SND_READ ); Sample.INSTANCE.play( Assets.SND_READ );
Invisibility.dispel(); Invisibility.dispel();
Buff.affect(curUser, Foresight.class, 500f); Buff.affect(curUser, Foresight.class, 600f);
setKnown(); setKnown();

View File

@ -33,6 +33,7 @@ import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene; import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
import com.shatteredpixel.shatteredpixeldungeon.ui.TargetHealthIndicator; import com.shatteredpixel.shatteredpixeldungeon.ui.TargetHealthIndicator;
import com.watabou.noosa.audio.Sample; import com.watabou.noosa.audio.Sample;
import com.watabou.utils.Random;
public class ScrollOfPolymorph extends ExoticScroll { public class ScrollOfPolymorph extends ExoticScroll {
@ -54,6 +55,12 @@ public class ScrollOfPolymorph extends ExoticScroll {
Sheep sheep = new Sheep(); Sheep sheep = new Sheep();
sheep.lifespan = 10; sheep.lifespan = 10;
sheep.pos = mob.pos; sheep.pos = mob.pos;
//awards half exp for each sheep-ified mob
//50% chance to round up, 50% to round down
if (mob.EXP % 2 == 1) mob.EXP += Random.Int(2);
mob.EXP /= 2;
mob.destroy(); mob.destroy();
mob.sprite.killAndErase(); mob.sprite.killAndErase();
Dungeon.level.mobs.remove(mob); Dungeon.level.mobs.remove(mob);

View File

@ -58,7 +58,7 @@ public class ScrollOfPsionicBlast extends ExoticScroll {
} }
} }
curUser.damage(Math.max(0, Math.round(curUser.HT*(0.35f - 0.5f*targets))), this); curUser.damage(Math.max(0, Math.round(curUser.HT*(0.5f * (float)Math.pow(0.9, targets)))), this);
if (curUser.isAlive()) { if (curUser.isAlive()) {
Buff.prolong(curUser, Blindness.class, 10); Buff.prolong(curUser, Blindness.class, 10);
Buff.prolong(curUser, Weakness.class, 100); Buff.prolong(curUser, Weakness.class, 100);