v0.7.0: significant polish for enhanced bombs

This commit is contained in:
Evan Debenham 2018-07-20 18:55:32 -04:00
parent ef3c7b03db
commit f38fe77ff4
8 changed files with 31 additions and 29 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

@ -209,9 +209,9 @@ public class Bomb extends Item {
@Override @Override
public String desc() { public String desc() {
if (fuse == null) if (fuse == null)
return super.desc(); return super.desc()+ "\n\n" + Messages.get(this, "desc_fuse");
else else
return Messages.get(this, "desc_burning"); return super.desc() + "\n\n" + Messages.get(this, "desc_burning");
} }
private static final String FUSE = "fuse"; private static final String FUSE = "fuse";

View File

@ -27,8 +27,10 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
import com.shatteredpixel.shatteredpixeldungeon.actors.Char; import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Blindness; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Blindness;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Cripple;
import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter; import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter;
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.BlastParticle; import com.shatteredpixel.shatteredpixeldungeon.effects.particles.BlastParticle;
import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene; import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
import com.watabou.noosa.audio.Sample; import com.watabou.noosa.audio.Sample;
@ -53,16 +55,15 @@ public class Flashbang extends Bomb {
//no regular explosion damage //no regular explosion damage
//FIXME currently has odd behaviour for the hero //FIXME currently has somewhat odd behaviour, as FOV is updated at the start of a turn.
//TODO final balancing for effect here, based on distance? perhaps also cripple/weaken? Level l = Dungeon.level;
for (Char ch : Actor.chars()){ for (Char ch : Actor.chars()){
if (ch == Dungeon.hero){ if (ch.fieldOfView[cell]){
if (Dungeon.level.heroFOV[cell]){ int power = 10 - l.distance(ch.pos, cell);
Buff.prolong(ch, Blindness.class, 5f); if (power > 0){
GameScene.flash(0xFFFFFF); Buff.prolong(ch, Blindness.class, power);
Buff.prolong(ch, Cripple.class, power);
} }
} else if (ch.fieldOfView[cell]){
Buff.prolong(ch, Blindness.class, 5f);
if (ch == Dungeon.hero){ if (ch == Dungeon.hero){
GameScene.flash(0xFFFFFF); GameScene.flash(0xFFFFFF);
} }

View File

@ -27,8 +27,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
import com.shatteredpixel.shatteredpixeldungeon.actors.Char; import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Healing; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Healing;
import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter; import com.shatteredpixel.shatteredpixeldungeon.effects.Splash;
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.BlastParticle;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfHealing; import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfHealing;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
import com.shatteredpixel.shatteredpixeldungeon.utils.BArray; import com.shatteredpixel.shatteredpixeldungeon.utils.BArray;
@ -50,7 +49,7 @@ public class HealingBomb extends Bomb {
Sample.INSTANCE.play( Assets.SND_BLAST ); Sample.INSTANCE.play( Assets.SND_BLAST );
if (Dungeon.level.heroFOV[cell]) { if (Dungeon.level.heroFOV[cell]) {
CellEmitter.center( cell ).burst( BlastParticle.FACTORY, 30 ); Splash.at(cell, 0x00FF00, 30);
} }
//no regular explosion damage //no regular explosion damage
@ -60,6 +59,7 @@ public class HealingBomb extends Bomb {
if (PathFinder.distance[i] < Integer.MAX_VALUE) { if (PathFinder.distance[i] < Integer.MAX_VALUE) {
Char ch = Actor.findChar(i); Char ch = Actor.findChar(i);
if (ch != null){ if (ch != null){
//same as a healing dart
Buff.affect( ch, Healing.class ).setHeal((int)(0.5f*ch.HT + 30), 0.333f, 0); Buff.affect( ch, Healing.class ).setHeal((int)(0.5f*ch.HT + 30), 0.333f, 0);
PotionOfHealing.cure( ch ); PotionOfHealing.cure( ch );
} }

View File

@ -34,6 +34,7 @@ import com.shatteredpixel.shatteredpixeldungeon.tiles.DungeonTilemap;
import com.shatteredpixel.shatteredpixeldungeon.utils.BArray; import com.shatteredpixel.shatteredpixeldungeon.utils.BArray;
import com.watabou.noosa.audio.Sample; import com.watabou.noosa.audio.Sample;
import com.watabou.utils.PathFinder; import com.watabou.utils.PathFinder;
import com.watabou.utils.Random;
public class HolyBomb extends Bomb { public class HolyBomb extends Bomb {
@ -57,8 +58,8 @@ public class HolyBomb extends Bomb {
if (n != null) { if (n != null) {
Buff.prolong(n, Blindness.class, 1f); Buff.prolong(n, Blindness.class, 1f);
if (n.properties().contains(Char.Property.UNDEAD) || n.properties().contains(Char.Property.DEMONIC)){ if (n.properties().contains(Char.Property.UNDEAD) || n.properties().contains(Char.Property.DEMONIC)){
//TODO decide on damage numbers and other effects here
n.sprite.emitter().start( ShadowParticle.UP, 0.05f, 10 ); n.sprite.emitter().start( ShadowParticle.UP, 0.05f, 10 );
n.damage(Random.NormalIntRange( Dungeon.depth+5, 10 + Dungeon.depth * 2 ), this);
} }
} }
} }

View File

@ -65,20 +65,19 @@ public class Noisemaker extends Bomb {
public void set(int cell){ public void set(int cell){
floor = Dungeon.depth; floor = Dungeon.depth;
this.cell = cell; this.cell = cell;
left = 8; left = 5;
} }
@Override @Override
public boolean act() { public boolean act() {
if (Dungeon.depth == floor){ if (Dungeon.depth == floor){
//VFX
if (Dungeon.level.heroFOV[cell]) { if (Dungeon.level.heroFOV[cell]) {
CellEmitter.center( cell ).start( Speck.factory( Speck.SCREAM ), 0.3f, 3 ); CellEmitter.center( cell ).start( Speck.factory( Speck.SCREAM ), 0.3f, 3 );
Sample.INSTANCE.play( Assets.SND_ALERT ); Sample.INSTANCE.play( Assets.SND_ALERT );
} else { } else {
CellEmitter.center( cell ).start( Speck.factory( Speck.SCREAM ), 0.3f, 3 ); CellEmitter.center( cell ).start( Speck.factory( Speck.SCREAM ), 0.3f, 3 );
Sample.INSTANCE.play( Assets.SND_ALERT, 0.5f ); Sample.INSTANCE.play( Assets.SND_ALERT, 0.25f );
} }
for (Mob m : Dungeon.level.mobs){ for (Mob m : Dungeon.level.mobs){
@ -89,7 +88,7 @@ public class Noisemaker extends Bomb {
} }
if (left > 0) { if (left > 0) {
spend(TICK * 10f); spend(TICK * 20f);
left--; left--;
} else { } else {
detach(); detach();

View File

@ -48,6 +48,6 @@ public class ShockBomb extends Bomb {
GameScene.add(Blob.seed(i, 10, Electricity.class)); GameScene.add(Blob.seed(i, 10, Electricity.class));
} }
} }
Sample.INSTANCE.play(Assets.SND_BURNING); Sample.INSTANCE.play(Assets.SND_LIGHTNING);
} }
} }

View File

@ -349,34 +349,35 @@ items.bombs.bomb.ac_lightthrow=LIGHT & THROW
items.bombs.bomb.snuff_fuse=You quickly snuff the bomb's fuse. items.bombs.bomb.snuff_fuse=You quickly snuff the bomb's fuse.
items.bombs.bomb.ondeath=Killed by an explosion items.bombs.bomb.ondeath=Killed by an explosion
items.bombs.bomb.rankings_desc=Killed by an explosion items.bombs.bomb.rankings_desc=Killed by an explosion
items.bombs.bomb.desc=A fairly hefty black powder bomb. An explosion from this would certainly do damage to anything nearby.\n\nIt looks like the fuse will take a couple rounds to burn down once it is lit. items.bombs.bomb.desc=A fairly hefty black powder bomb. An explosion from this would certainly do damage to anything nearby.
items.bombs.bomb.desc_burning=A fairly hefty black powder bomb. An explosion from this would certainly do damage to anything nearby.\n\nThe bomb's fuse is burning away, keep your distance or put it out! items.bombs.bomb.desc_fuse=It looks like the fuse will take a couple rounds to burn down once it is lit.
items.bombs.bomb.desc_burning=The bomb's fuse is burning away, keep your distance or put it out!
items.bombs.bomb$doublebomb.name=two bombs items.bombs.bomb$doublebomb.name=two bombs
items.bombs.bomb$doublebomb.desc=A stack of two hefty black powder bombs, looks like you get one free! items.bombs.bomb$doublebomb.desc=A stack of two hefty black powder bombs, looks like you get one free!
items.bombs.firebomb.name=firebomb items.bombs.firebomb.name=firebomb
items.bombs.firebomb.desc=TODO items.bombs.firebomb.desc=This bomb has been modified to burst into a sustained firestorm when it explodes.
items.bombs.flashbang.name=flashbang items.bombs.flashbang.name=flashbang
items.bombs.flashbang.desc=TODO items.bombs.flashbang.desc=This customized bomb will erupt into a burst of blinding light instead of exploding. Anything that can see the burst will be disoriented for some time.
items.bombs.frostbomb.name=frost bomb items.bombs.frostbomb.name=frost bomb
items.bombs.frostbomb.desc=TODO items.bombs.frostbomb.desc=This bomb has been modified to burst into a sustained gust of freezing air when it explodes.
items.bombs.healingbomb.name=healing bomb items.bombs.healingbomb.name=healing bomb
items.bombs.healingbomb.desc=TODO items.bombs.healingbomb.desc=This customized bomb will splash healing liquid all around it instead of exploding. Anything caught in the burst will be healed a considerable amount.
items.bombs.holybomb.name=holy bomb items.bombs.holybomb.name=holy bomb
items.bombs.holybomb.desc=TODO items.bombs.holybomb.desc=This bomb has been modified to flash holy light when it explodes, dealing bonus damage to undead and demonic enemies.
items.bombs.noisemaker.name=noisemaker items.bombs.noisemaker.name=noisemaker
items.bombs.noisemaker.desc=TODO items.bombs.noisemaker.desc=This customized bomb will repeatedly make noise instead of exploding. Enemies who aren't otherwise engaged will be repeatedly drawn to the blast location.
items.bombs.shockbomb.name=shock bomb items.bombs.shockbomb.name=shock bomb
items.bombs.shockbomb.desc=TODO items.bombs.shockbomb.desc=This bomb has been modified to unleash a storm of electricity around it when it explodes.
items.bombs.woollybomb.name=woolly bomb items.bombs.woollybomb.name=woolly bomb
items.bombs.woollybomb.desc=TODO items.bombs.woollybomb.desc=This customized bomb will create a field of magical sheep instead of exploding. These sheep will block movement and persist for some time.
###food ###food
items.food.blandfruit.name=blandfruit items.food.blandfruit.name=blandfruit