v2.5.3: buffed all alchemy bombs
This commit is contained in:
@@ -476,7 +476,7 @@ items.bags.magicalholster.desc=This slim holster is made from some exotic animal
|
||||
|
||||
###bombs
|
||||
items.bombs.arcanebomb.name=arcane bomb
|
||||
items.bombs.arcanebomb.desc=This bomb has been imbued with arcane properties. It will explode into a powerful blast similar to Goo's pumped up attack. This blast penetrates armor and reaches further than a regular bomb's explosion.
|
||||
items.bombs.arcanebomb.desc=This bomb has been imbued with arcane properties. It will explode into a powerful blast similar to Goo's pumped up attack, dealing _%1$d-%2$d magical damage_ to anything within 2 tiles.
|
||||
|
||||
items.bombs.bomb.name=bomb
|
||||
items.bombs.bomb.ac_lightthrow=LIGHT & THROW
|
||||
@@ -490,32 +490,32 @@ 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.firebomb.name=firebomb
|
||||
items.bombs.firebomb.desc=This bomb has been modified to burst into a sustained flame in a larger area when it explodes.
|
||||
items.bombs.firebomb.desc=This bomb has been modified to explode in a larger area, dealing _%1$d-%2$d damage_ and spreading sustained flame within 2 tiles.
|
||||
|
||||
items.bombs.flashbang.name=flashbang
|
||||
items.bombs.flashbang.desc=This customized bomb will erupt into a burst of blinding light when it explodes. Anything nearby will be disoriented based on how close it was to the bomb.
|
||||
items.bombs.flashbangbomb.name=flashbang
|
||||
items.bombs.flashbangbomb.desc=This customized bomb will erupt into a blast of light, sound, and electricity when it explodes. Anything within 2 tiles will take _%1$d-%2$d damage_ from the explosion, an additional 25%% damage from the electricity, and be stunned for 10 turns.
|
||||
|
||||
items.bombs.frostbomb.name=frost bomb
|
||||
items.bombs.frostbomb.desc=This bomb has been modified to burst into a sustained gust of freezing air in a larger area when it explodes.
|
||||
items.bombs.frostbomb.desc=This bomb has been modified to explode in a larger area, dealing _%1$d-%2$d damage_ and spreading a sustained gust of freezing air within 2 tiles.
|
||||
|
||||
items.bombs.holybomb.name=holy bomb
|
||||
items.bombs.holybomb.desc=This bomb has been modified to flash holy light in a larger area when it explodes, dealing bonus damage to undead and demonic enemies.
|
||||
items.bombs.holybomb.desc=This bomb has been modified to flash holy light in a larger area when it explodes. Anything within 2 tiles will take _%1$d-%2$d damage_ from the explosion, and undead or demonic enemies will take an additional 50%% damage from the holy light.
|
||||
|
||||
items.bombs.noisemaker.name=noisemaker
|
||||
items.bombs.noisemaker.desc=This customized bomb will repeatedly make noise when its fuse runs out. When something touches the bomb, it will explode!
|
||||
items.bombs.noisemaker.desc=This customized bomb will repeatedly make noise when its fuse runs out. When something touches the bomb, it will explode and deal _%1$d-%2$d damage_ to anything within 2 tiles!
|
||||
items.bombs.noisemaker.desc_burning=The noisemaker is ticking away, it'll explode when something gets near!
|
||||
|
||||
items.bombs.shockbomb.name=shock bomb
|
||||
items.bombs.shockbomb.desc=This bomb has been modified to unleash bolts of electricity when it explodes. Anything nearby will be damaged and stunned based on how close it was to the bomb.
|
||||
items.bombs.smokebomb.name=smoke bomb
|
||||
items.bombs.smokebomb.desc=This bomb has been modified to spew a thick cloud of gas as the same time as exploding. It will deal _%1$d-%2$d damage_ and spread shrouding fog within 2 tiles.
|
||||
|
||||
items.bombs.regrowthbomb.name=regrowth bomb
|
||||
items.bombs.regrowthbomb.desc=This customized bomb will splash life-giving liquid all around it instead of exploding. The area caught in the blast will rapidly sprout grass and plants. Yourself and any allies caught in the blast will be healed as if they had drank a potion of healing.
|
||||
items.bombs.regrowthbomb.desc=This customized bomb will splash life-giving liquid everywhere within 3 tiles instead of exploding. The area caught in the blast will rapidly sprout grass and plants. Yourself and any allies caught in the blast will be healed as if they had drank a potion of healing.
|
||||
|
||||
items.bombs.shrapnelbomb.name=shrapnel bomb
|
||||
items.bombs.shrapnelbomb.desc=This bomb has been modified with scraps of DM-300's metal, which will fragment and fly everywhere when it explodes, damaging anything in a huge range around the bomb. You had better hide behind something when using it...
|
||||
items.bombs.shrapnelbomb.desc=This bomb has been modified with scraps of DM-300's metal, which will fragment and fly everywhere when it explodes, dealing _%1$d-%2$d damage_ in a huge range around the bomb. You had better hide behind something when using it...
|
||||
|
||||
items.bombs.woollybomb.name=woolly bomb
|
||||
items.bombs.woollybomb.desc=This customized bomb will create a wide field of magical sheep after exploding. These sheep will block movement and persist for a very long time! The sheep will not last as long in the presence of powerful enemies though, and can be manually dispelled sooner by interacting with them.
|
||||
items.bombs.woollybomb.desc=This customized bomb will create a wide field of magical sheep after exploding. The explosion will deal _%1$d-%2$d damage_ to anything within 2 tiles. The sheep will block movement and persist for a very long time! The sheep will not last as long in the presence of powerful enemies though, and can be manually dispelled sooner by interacting with them.
|
||||
|
||||
###food
|
||||
items.food.berry.name=dungeon berry
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
@@ -49,6 +49,14 @@ public class ShatteredPixelDungeon extends Game {
|
||||
public ShatteredPixelDungeon( PlatformSupport platform ) {
|
||||
super( sceneClass == null ? WelcomeScene.class : sceneClass, platform );
|
||||
|
||||
//pre-v2.5.2
|
||||
com.watabou.utils.Bundle.addAlias(
|
||||
com.shatteredpixel.shatteredpixeldungeon.items.bombs.FlashBangBomb.class,
|
||||
"com.shatteredpixel.shatteredpixeldungeon.items.bombs.ShockBomb" );
|
||||
com.watabou.utils.Bundle.addAlias(
|
||||
com.shatteredpixel.shatteredpixeldungeon.items.bombs.SmokeBomb.class,
|
||||
"com.shatteredpixel.shatteredpixeldungeon.items.bombs.FlashBang" );
|
||||
|
||||
//pre-v2.5.0
|
||||
com.watabou.utils.Bundle.addAlias(
|
||||
com.shatteredpixel.shatteredpixeldungeon.actors.mobs.MobSpawner.class,
|
||||
|
||||
@@ -42,31 +42,37 @@ public class ArcaneBomb extends Bomb {
|
||||
{
|
||||
image = ItemSpriteSheet.ARCANE_BOMB;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean explodesDestructively() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int explosionRange() {
|
||||
return 2;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onThrow(int cell) {
|
||||
super.onThrow(cell);
|
||||
if (fuse != null){
|
||||
PathFinder.buildDistanceMap( cell, BArray.not( Dungeon.level.solid, null ), 2 );
|
||||
PathFinder.buildDistanceMap( cell, BArray.not( Dungeon.level.solid, null ), explosionRange() );
|
||||
for (int i = 0; i < PathFinder.distance.length; i++) {
|
||||
if (PathFinder.distance[i] < Integer.MAX_VALUE)
|
||||
if (PathFinder.distance[i] < Integer.MAX_VALUE) {
|
||||
GameScene.add(Blob.seed(i, 3, GooWarn.class));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean explodesDestructively() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void explode(int cell) {
|
||||
super.explode(cell);
|
||||
|
||||
ArrayList<Char> affected = new ArrayList<>();
|
||||
|
||||
PathFinder.buildDistanceMap( cell, BArray.not( Dungeon.level.solid, null ), 2 );
|
||||
PathFinder.buildDistanceMap( cell, BArray.not( Dungeon.level.solid, null ), explosionRange() );
|
||||
for (int i = 0; i < PathFinder.distance.length; i++) {
|
||||
if (PathFinder.distance[i] < Integer.MAX_VALUE) {
|
||||
if (Dungeon.level.heroFOV[i]) {
|
||||
@@ -80,10 +86,9 @@ public class ArcaneBomb extends Bomb {
|
||||
}
|
||||
|
||||
for (Char ch : affected){
|
||||
// 100%/83%/67% bomb damage based on distance, but pierces armor.
|
||||
int damage = Math.round(Random.NormalIntRange( Dungeon.scalingDepth()+5, 10 + Dungeon.scalingDepth() * 2 ));
|
||||
float multiplier = 1f - (.16667f*Dungeon.level.distance(cell, ch.pos));
|
||||
ch.damage(Math.round(damage*multiplier), this);
|
||||
//pierces armor, and damage in 5x5 instead of 3x3
|
||||
int damage = Math.round(Random.NormalIntRange( 4 + Dungeon.scalingDepth(), 12 + 3*Dungeon.scalingDepth() ));
|
||||
ch.damage(damage, this);
|
||||
if (ch == Dungeon.hero && !ch.isAlive()){
|
||||
Badges.validateDeathFromFriendlyMagic();
|
||||
Dungeon.fail(this);
|
||||
|
||||
@@ -53,6 +53,7 @@ import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
||||
import com.watabou.noosa.audio.Sample;
|
||||
import com.watabou.utils.BArray;
|
||||
import com.watabou.utils.Bundle;
|
||||
import com.watabou.utils.PathFinder;
|
||||
import com.watabou.utils.Random;
|
||||
@@ -89,6 +90,10 @@ public class Bomb extends Item {
|
||||
return true;
|
||||
}
|
||||
|
||||
protected int explosionRange(){
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArrayList<String> actions(Hero hero) {
|
||||
ArrayList<String> actions = super.actions( hero );
|
||||
@@ -144,25 +149,26 @@ public class Bomb extends Item {
|
||||
}
|
||||
|
||||
boolean terrainAffected = false;
|
||||
for (int n : PathFinder.NEIGHBOURS9) {
|
||||
int c = cell + n;
|
||||
if (c >= 0 && c < Dungeon.level.length()) {
|
||||
if (Dungeon.level.heroFOV[c]) {
|
||||
CellEmitter.get(c).burst(SmokeParticle.FACTORY, 4);
|
||||
PathFinder.buildDistanceMap( cell, BArray.not( Dungeon.level.solid, null ), explosionRange() );
|
||||
for (int i = 0; i < PathFinder.distance.length; i++) {
|
||||
if (PathFinder.distance[i] != Integer.MAX_VALUE) {
|
||||
if (Dungeon.level.heroFOV[i]) {
|
||||
CellEmitter.get(i).burst(SmokeParticle.FACTORY, 4);
|
||||
}
|
||||
|
||||
if (Dungeon.level.flamable[c]) {
|
||||
Dungeon.level.destroy(c);
|
||||
GameScene.updateMap(c);
|
||||
if (Dungeon.level.flamable[i]) {
|
||||
Dungeon.level.destroy(i);
|
||||
GameScene.updateMap(i);
|
||||
terrainAffected = true;
|
||||
}
|
||||
|
||||
//destroys items / triggers bombs caught in the blast.
|
||||
Heap heap = Dungeon.level.heaps.get(c);
|
||||
if (heap != null)
|
||||
Heap heap = Dungeon.level.heaps.get(i);
|
||||
if (heap != null) {
|
||||
heap.explode();
|
||||
}
|
||||
|
||||
Char ch = Actor.findChar(c);
|
||||
Char ch = Actor.findChar(i);
|
||||
if (ch != null) {
|
||||
affected.add(ch);
|
||||
}
|
||||
@@ -339,8 +345,8 @@ public class Bomb extends Item {
|
||||
validIngredients.put(PotionOfLiquidFlame.class, Firebomb.class);
|
||||
validIngredients.put(ScrollOfRage.class, Noisemaker.class);
|
||||
|
||||
validIngredients.put(PotionOfInvisibility.class, Flashbang.class);
|
||||
validIngredients.put(ScrollOfRecharging.class, ShockBomb.class);
|
||||
validIngredients.put(PotionOfInvisibility.class, SmokeBomb.class);
|
||||
validIngredients.put(ScrollOfRecharging.class, FlashBangBomb.class);
|
||||
|
||||
validIngredients.put(PotionOfHealing.class, RegrowthBomb.class);
|
||||
validIngredients.put(ScrollOfRemoveCurse.class, HolyBomb.class);
|
||||
@@ -357,8 +363,8 @@ public class Bomb extends Item {
|
||||
bombCosts.put(Firebomb.class, 1);
|
||||
bombCosts.put(Noisemaker.class, 1);
|
||||
|
||||
bombCosts.put(Flashbang.class, 2);
|
||||
bombCosts.put(ShockBomb.class, 2);
|
||||
bombCosts.put(SmokeBomb.class, 2);
|
||||
bombCosts.put(FlashBangBomb.class, 2);
|
||||
|
||||
bombCosts.put(RegrowthBomb.class, 3);
|
||||
bombCosts.put(HolyBomb.class, 3);
|
||||
|
||||
@@ -38,18 +38,24 @@ public class Firebomb extends Bomb {
|
||||
{
|
||||
image = ItemSpriteSheet.FIRE_BOMB;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected int explosionRange() {
|
||||
return 2;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void explode(int cell) {
|
||||
super.explode(cell);
|
||||
|
||||
PathFinder.buildDistanceMap( cell, BArray.not( Dungeon.level.solid, null ), 2 );
|
||||
PathFinder.buildDistanceMap( cell, BArray.not( Dungeon.level.solid, null ), explosionRange() );
|
||||
for (int i = 0; i < PathFinder.distance.length; i++) {
|
||||
if (PathFinder.distance[i] < Integer.MAX_VALUE) {
|
||||
if (Dungeon.level.pit[i])
|
||||
if (Dungeon.level.pit[i]) {
|
||||
GameScene.add(Blob.seed(i, 2, Fire.class));
|
||||
else
|
||||
} else {
|
||||
GameScene.add(Blob.seed(i, 10, Fire.class));
|
||||
}
|
||||
CellEmitter.get(i).burst(FlameParticle.FACTORY, 5);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,17 +22,21 @@
|
||||
package com.shatteredpixel.shatteredpixeldungeon.items.bombs;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Badges;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Electricity;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Paralysis;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.Lightning;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.SparkParticle;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.mechanics.Ballistica;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.tiles.DungeonTilemap;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
||||
import com.watabou.noosa.audio.Sample;
|
||||
import com.watabou.utils.BArray;
|
||||
import com.watabou.utils.PathFinder;
|
||||
@@ -40,41 +44,45 @@ import com.watabou.utils.Random;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class ShockBomb extends Bomb {
|
||||
public class FlashBangBomb extends Bomb {
|
||||
|
||||
{
|
||||
image = ItemSpriteSheet.SHOCK_BOMB;
|
||||
image = ItemSpriteSheet.FLASHBANG;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected int explosionRange() {
|
||||
return 2;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void explode(int cell) {
|
||||
super.explode(cell);
|
||||
|
||||
ArrayList<Char> affected = new ArrayList<>();
|
||||
PathFinder.buildDistanceMap( cell, BArray.not( Dungeon.level.solid, null ), 3 );
|
||||
PathFinder.buildDistanceMap( cell, BArray.not( Dungeon.level.solid, null ), explosionRange() );
|
||||
for (int i = 0; i < PathFinder.distance.length; i++) {
|
||||
if (PathFinder.distance[i] < Integer.MAX_VALUE
|
||||
&& Actor.findChar(i) != null) {
|
||||
if (PathFinder.distance[i] < Integer.MAX_VALUE && Actor.findChar(i) != null) {
|
||||
affected.add(Actor.findChar(i));
|
||||
}
|
||||
}
|
||||
|
||||
for (Char ch : affected.toArray(new Char[0])){
|
||||
Ballistica LOS = new Ballistica(cell, ch.pos, Ballistica.PROJECTILE);
|
||||
if (LOS.collisionPos != ch.pos){
|
||||
affected.remove(ch);
|
||||
}
|
||||
}
|
||||
|
||||
ArrayList<Lightning.Arc> arcs = new ArrayList<>();
|
||||
for (Char ch : affected){
|
||||
int power = 16 - 4*Dungeon.level.distance(ch.pos, cell);
|
||||
if (power > 0){
|
||||
//32% to 8% regular bomb damage
|
||||
int damage = Math.round(Random.NormalIntRange(5 + Dungeon.scalingDepth(), 10 + 2*Dungeon.scalingDepth()) * (power/50f));
|
||||
ch.damage(damage, this);
|
||||
if (ch.isAlive()) Buff.prolong(ch, Paralysis.class, power);
|
||||
arcs.add(new Lightning.Arc(DungeonTilemap.tileCenterToWorld(cell), ch.sprite.center()));
|
||||
//25% bonus damage and 10 turns of stun
|
||||
int damage = Math.round(Random.NormalIntRange(4 + Dungeon.scalingDepth(), 12 + 3*Dungeon.scalingDepth()) / 4f);
|
||||
ch.damage(damage, Electricity.class);
|
||||
if (ch.isAlive()) Buff.prolong(ch, Paralysis.class, Paralysis.DURATION);
|
||||
arcs.add(new Lightning.Arc(DungeonTilemap.tileCenterToWorld(cell), ch.sprite.center()));
|
||||
|
||||
if (ch == Dungeon.hero){
|
||||
GameScene.flash(0x80FFFFFF);
|
||||
}
|
||||
|
||||
if (ch == Dungeon.hero && !ch.isAlive()) {
|
||||
Badges.validateDeathFromFriendlyMagic();
|
||||
GLog.n(Messages.get(this, "ondeath"));
|
||||
Dungeon.fail(this);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,11 +38,16 @@ public class FrostBomb extends Bomb {
|
||||
{
|
||||
image = ItemSpriteSheet.FROST_BOMB;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int explosionRange() {
|
||||
return 2;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void explode(int cell) {
|
||||
super.explode(cell);
|
||||
PathFinder.buildDistanceMap( cell, BArray.not( Dungeon.level.solid, null ), 2 );
|
||||
PathFinder.buildDistanceMap( cell, BArray.not( Dungeon.level.solid, null ), explosionRange() );
|
||||
for (int i = 0; i < PathFinder.distance.length; i++) {
|
||||
if (PathFinder.distance[i] < Integer.MAX_VALUE) {
|
||||
GameScene.add(Blob.seed(i, 10, Freezing.class));
|
||||
|
||||
@@ -41,7 +41,12 @@ public class HolyBomb extends Bomb {
|
||||
{
|
||||
image = ItemSpriteSheet.HOLY_BOMB;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected int explosionRange() {
|
||||
return 2;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void explode(int cell) {
|
||||
super.explode(cell);
|
||||
@@ -52,7 +57,7 @@ public class HolyBomb extends Bomb {
|
||||
|
||||
ArrayList<Char> affected = new ArrayList<>();
|
||||
|
||||
PathFinder.buildDistanceMap( cell, BArray.not( Dungeon.level.solid, null ), 2 );
|
||||
PathFinder.buildDistanceMap( cell, BArray.not( Dungeon.level.solid, null ), explosionRange() );
|
||||
for (int i = 0; i < PathFinder.distance.length; i++) {
|
||||
if (PathFinder.distance[i] < Integer.MAX_VALUE) {
|
||||
Char ch = Actor.findChar(i);
|
||||
@@ -67,8 +72,8 @@ public class HolyBomb extends Bomb {
|
||||
if (ch.properties().contains(Char.Property.UNDEAD) || ch.properties().contains(Char.Property.DEMONIC)){
|
||||
ch.sprite.emitter().start( ShadowParticle.UP, 0.05f, 10 );
|
||||
|
||||
//bomb deals an additional 50% damage to unholy enemies in a 5x5 range
|
||||
int damage = Math.round(Random.NormalIntRange( Dungeon.scalingDepth()+5, 10 + Dungeon.scalingDepth() * 2 ) * 0.5f);
|
||||
//bomb deals an additional 50% damage to unholy enemies
|
||||
int damage = Math.round(Random.NormalIntRange( Dungeon.scalingDepth()+4, 12 + 3*Dungeon.scalingDepth() ) * 0.5f);
|
||||
ch.damage(damage, new HolyDamage());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,6 +39,11 @@ public class Noisemaker extends Bomb {
|
||||
image = ItemSpriteSheet.NOISEMAKER;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int explosionRange() {
|
||||
return 2;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Fuse createFuse() {
|
||||
return new NoisemakerFuse();
|
||||
|
||||
@@ -51,7 +51,12 @@ public class RegrowthBomb extends Bomb {
|
||||
public boolean explodesDestructively() {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected int explosionRange() {
|
||||
return 3;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void explode(int cell) {
|
||||
super.explode(cell);
|
||||
@@ -62,7 +67,7 @@ public class RegrowthBomb extends Bomb {
|
||||
|
||||
ArrayList<Integer> plantCandidates = new ArrayList<>();
|
||||
|
||||
PathFinder.buildDistanceMap( cell, BArray.not( Dungeon.level.solid, null ), 2 );
|
||||
PathFinder.buildDistanceMap( cell, BArray.not( Dungeon.level.solid, null ), explosionRange() );
|
||||
for (int i = 0; i < PathFinder.distance.length; i++) {
|
||||
if (PathFinder.distance[i] < Integer.MAX_VALUE) {
|
||||
Char ch = Actor.findChar(i);
|
||||
@@ -82,7 +87,7 @@ public class RegrowthBomb extends Bomb {
|
||||
}
|
||||
}
|
||||
|
||||
int plants = Random.chances(new float[]{0, 6, 3, 1});
|
||||
int plants = Random.chances(new float[]{0, 0, 2, 1});
|
||||
|
||||
for (int i = 0; i < plants; i++) {
|
||||
Integer plantPos = Random.element(plantCandidates);
|
||||
|
||||
@@ -43,14 +43,19 @@ public class ShrapnelBomb extends Bomb {
|
||||
public boolean explodesDestructively() {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected int explosionRange() {
|
||||
return 8;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void explode(int cell) {
|
||||
super.explode(cell);
|
||||
|
||||
boolean[] FOV = new boolean[Dungeon.level.length()];
|
||||
Point c = Dungeon.level.cellToPoint(cell);
|
||||
ShadowCaster.castShadow(c.x, c.y, Dungeon.level.width(), FOV, Dungeon.level.losBlocking, 8);
|
||||
ShadowCaster.castShadow(c.x, c.y, Dungeon.level.width(), FOV, Dungeon.level.losBlocking, explosionRange());
|
||||
|
||||
ArrayList<Char> affected = new ArrayList<>();
|
||||
|
||||
@@ -67,9 +72,8 @@ public class ShrapnelBomb extends Bomb {
|
||||
}
|
||||
|
||||
for (Char ch : affected){
|
||||
//regular bomb damage, which falls off at a rate of 5% per tile of distance
|
||||
int damage = Math.round(Random.NormalIntRange( Dungeon.scalingDepth()+5, 10 + Dungeon.scalingDepth() * 2 ));
|
||||
damage = Math.round(damage * (1f - .05f*Dungeon.level.distance(cell, ch.pos)));
|
||||
//regular bomb damage over an FOV up to 8-range
|
||||
int damage = Random.NormalIntRange( 4 + Dungeon.scalingDepth(), 12 + 3*Dungeon.scalingDepth() );
|
||||
damage -= ch.drRoll();
|
||||
ch.damage(damage, this);
|
||||
if (ch == Dungeon.hero && !ch.isAlive()) {
|
||||
|
||||
@@ -22,38 +22,41 @@
|
||||
package com.shatteredpixel.shatteredpixeldungeon.items.bombs;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Blindness;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Cripple;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Blob;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.SmokeScreen;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
||||
import com.watabou.utils.BArray;
|
||||
import com.watabou.utils.PathFinder;
|
||||
|
||||
public class Flashbang extends Bomb {
|
||||
public class SmokeBomb extends Bomb {
|
||||
|
||||
{
|
||||
image = ItemSpriteSheet.FLASHBANG;
|
||||
image = ItemSpriteSheet.SMOKE_BOMB;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int explosionRange() {
|
||||
return 2;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void explode(int cell) {
|
||||
super.explode(cell);
|
||||
|
||||
Level l = Dungeon.level;
|
||||
for (Char ch : Actor.chars()){
|
||||
if (ch.fieldOfView != null && ch.fieldOfView[cell]){
|
||||
int power = 16 - 4*l.distance(ch.pos, cell);
|
||||
if (power > 0){
|
||||
Buff.prolong(ch, Blindness.class, power);
|
||||
Buff.prolong(ch, Cripple.class, power);
|
||||
if (ch == Dungeon.hero){
|
||||
GameScene.flash(0x80FFFFFF);
|
||||
}
|
||||
}
|
||||
int centerVolume = 1000; //40*25
|
||||
PathFinder.buildDistanceMap( cell, BArray.not( Dungeon.level.solid, null ), explosionRange() );
|
||||
for (int i = 0; i < PathFinder.distance.length; i++) {
|
||||
if (PathFinder.distance[i] < Integer.MAX_VALUE) {
|
||||
GameScene.add( Blob.seed( i, 40, SmokeScreen.class ) );
|
||||
centerVolume -= 40;
|
||||
}
|
||||
}
|
||||
|
||||
//excess volume if some cells were blocked
|
||||
if (centerVolume > 0){
|
||||
GameScene.add( Blob.seed( cell, centerVolume, SmokeScreen.class ) );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -40,12 +40,17 @@ public class WoollyBomb extends Bomb {
|
||||
{
|
||||
image = ItemSpriteSheet.WOOLY_BOMB;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected int explosionRange() {
|
||||
return 2;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void explode(int cell) {
|
||||
super.explode(cell);
|
||||
|
||||
PathFinder.buildDistanceMap( cell, BArray.not( Dungeon.level.solid, null ), 4 );
|
||||
PathFinder.buildDistanceMap( cell, BArray.not( Dungeon.level.solid, null ), explosionRange()+2 );
|
||||
ArrayList<Integer> spawnPoints = new ArrayList<>();
|
||||
for (int i = 0; i < PathFinder.distance.length; i++) {
|
||||
if (PathFinder.distance[i] < Integer.MAX_VALUE) {
|
||||
|
||||
@@ -45,12 +45,12 @@ import com.shatteredpixel.shatteredpixeldungeon.items.bags.VelvetPouch;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.bombs.ArcaneBomb;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.bombs.Bomb;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.bombs.Firebomb;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.bombs.Flashbang;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.bombs.SmokeBomb;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.bombs.FrostBomb;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.bombs.HolyBomb;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.bombs.Noisemaker;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.bombs.RegrowthBomb;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.bombs.ShockBomb;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.bombs.FlashBangBomb;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.bombs.ShrapnelBomb;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.bombs.WoollyBomb;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.food.Berry;
|
||||
@@ -237,8 +237,8 @@ public enum Catalog {
|
||||
|
||||
EXOTIC_SCROLLS.addItems(ExoticScroll.exoToReg.keySet().toArray(new Class[0]));
|
||||
|
||||
BOMBS.addItems( Bomb.class, FrostBomb.class, Firebomb.class, Flashbang.class, RegrowthBomb.class,
|
||||
WoollyBomb.class, Noisemaker.class, ShockBomb.class, HolyBomb.class, ArcaneBomb.class, ShrapnelBomb.class);
|
||||
BOMBS.addItems( Bomb.class, FrostBomb.class, Firebomb.class, SmokeBomb.class, RegrowthBomb.class,
|
||||
WoollyBomb.class, Noisemaker.class, FlashBangBomb.class, HolyBomb.class, ArcaneBomb.class, ShrapnelBomb.class);
|
||||
|
||||
TIPPED_DARTS.addItems(TippedDart.types.values().toArray(new Class[0]));
|
||||
|
||||
|
||||
@@ -188,8 +188,8 @@ public class ItemSpriteSheet {
|
||||
public static final int FIRE_BOMB = BOMBS+2;
|
||||
public static final int FROST_BOMB = BOMBS+3;
|
||||
public static final int REGROWTH_BOMB = BOMBS+4;
|
||||
public static final int FLASHBANG = BOMBS+5;
|
||||
public static final int SHOCK_BOMB = BOMBS+6;
|
||||
public static final int SMOKE_BOMB = BOMBS+5;
|
||||
public static final int FLASHBANG = BOMBS+6;
|
||||
public static final int HOLY_BOMB = BOMBS+7;
|
||||
public static final int WOOLY_BOMB = BOMBS+8;
|
||||
public static final int NOISEMAKER = BOMBS+9;
|
||||
@@ -202,8 +202,8 @@ public class ItemSpriteSheet {
|
||||
assignItemRect(FIRE_BOMB, 13, 12);
|
||||
assignItemRect(FROST_BOMB, 13, 12);
|
||||
assignItemRect(REGROWTH_BOMB, 13, 12);
|
||||
assignItemRect(FLASHBANG, 13, 12);
|
||||
assignItemRect(SHOCK_BOMB, 10, 13);
|
||||
assignItemRect(SMOKE_BOMB, 13, 12);
|
||||
assignItemRect(FLASHBANG, 10, 13);
|
||||
assignItemRect(HOLY_BOMB, 10, 13);
|
||||
assignItemRect(WOOLY_BOMB, 10, 13);
|
||||
assignItemRect(NOISEMAKER, 10, 13);
|
||||
|
||||
Reference in New Issue
Block a user