v0.7.2: small adjustments/fixes:

- improved description for rot lasher
- cleaned up unused text in blandfruit and clarified description
- fixed bombs rarely affecting tengu twice
- guidebook pages default to collected in debug mode
This commit is contained in:
Evan Debenham 2019-02-13 21:36:59 -05:00
parent 08b552e689
commit d940f24571
7 changed files with 91 additions and 58 deletions

View File

@ -34,6 +34,8 @@ import com.shatteredpixel.shatteredpixeldungeon.utils.BArray;
import com.watabou.utils.PathFinder; import com.watabou.utils.PathFinder;
import com.watabou.utils.Random; import com.watabou.utils.Random;
import java.util.ArrayList;
public class ArcaneBomb extends Bomb { public class ArcaneBomb extends Bomb {
{ {
@ -61,6 +63,8 @@ public class ArcaneBomb extends Bomb {
public void explode(int cell) { public void explode(int cell) {
super.explode(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 ), 2 );
for (int i = 0; i < PathFinder.distance.length; i++) { for (int i = 0; i < PathFinder.distance.length; i++) {
if (PathFinder.distance[i] < Integer.MAX_VALUE) { if (PathFinder.distance[i] < Integer.MAX_VALUE) {
@ -69,14 +73,19 @@ public class ArcaneBomb extends Bomb {
} }
Char ch = Actor.findChar(i); Char ch = Actor.findChar(i);
if (ch != null){ if (ch != null){
//regular bomb damage, but pierces armor affected.add(ch);
int damage = Math.round(Random.NormalIntRange( Dungeon.depth+5, 10 + Dungeon.depth * 2 ));
ch.damage(damage, this);
if (ch == Dungeon.hero && !ch.isAlive())
Dungeon.fail(Bomb.class);
} }
} }
} }
for (Char ch : affected){
//regular bomb damage, but pierces armor
int damage = Math.round(Random.NormalIntRange( Dungeon.depth+5, 10 + Dungeon.depth * 2 ));
ch.damage(damage, this);
if (ch == Dungeon.hero && !ch.isAlive()){
Dungeon.fail(Bomb.class);
}
}
} }
@Override @Override

View File

@ -138,6 +138,9 @@ public class Bomb extends Item {
Sample.INSTANCE.play( Assets.SND_BLAST ); Sample.INSTANCE.play( Assets.SND_BLAST );
if (explodesDestructively()) { if (explodesDestructively()) {
ArrayList<Char> affected = new ArrayList<>();
if (Dungeon.level.heroFOV[cell]) { if (Dungeon.level.heroFOV[cell]) {
CellEmitter.center(cell).burst(BlastParticle.FACTORY, 30); CellEmitter.center(cell).burst(BlastParticle.FACTORY, 30);
} }
@ -163,21 +166,26 @@ public class Bomb extends Item {
Char ch = Actor.findChar(c); Char ch = Actor.findChar(c);
if (ch != null) { if (ch != null) {
//those not at the center of the blast take damage less consistently. affected.add(ch);
int minDamage = c == cell ? Dungeon.depth + 5 : 1;
int maxDamage = 10 + Dungeon.depth * 2;
int dmg = Random.NormalIntRange(minDamage, maxDamage) - ch.drRoll();
if (dmg > 0) {
ch.damage(dmg, this);
}
if (ch == Dungeon.hero && !ch.isAlive())
Dungeon.fail(Bomb.class);
} }
} }
} }
for (Char ch : affected){
//those not at the center of the blast take damage less consistently.
int minDamage = ch.pos == cell ? Dungeon.depth + 5 : 1;
int maxDamage = 10 + Dungeon.depth * 2;
int dmg = Random.NormalIntRange(minDamage, maxDamage) - ch.drRoll();
if (dmg > 0) {
ch.damage(dmg, this);
}
if (ch == Dungeon.hero && !ch.isAlive()) {
Dungeon.fail(Bomb.class);
}
}
if (terrainAffected) { if (terrainAffected) {
Dungeon.observe(); Dungeon.observe();
} }

View File

@ -36,6 +36,8 @@ import com.watabou.noosa.audio.Sample;
import com.watabou.utils.PathFinder; import com.watabou.utils.PathFinder;
import com.watabou.utils.Random; import com.watabou.utils.Random;
import java.util.ArrayList;
public class HolyBomb extends Bomb { public class HolyBomb extends Bomb {
{ {
@ -50,22 +52,30 @@ public class HolyBomb extends Bomb {
new Flare(10, 64).show(Dungeon.hero.sprite.parent, DungeonTilemap.tileCenterToWorld(cell), 2f); new Flare(10, 64).show(Dungeon.hero.sprite.parent, DungeonTilemap.tileCenterToWorld(cell), 2f);
} }
ArrayList<Char> affected = new ArrayList<>();
PathFinder.buildDistanceMap( cell, BArray.not( Dungeon.level.solid, null ), 2 ); PathFinder.buildDistanceMap( cell, BArray.not( Dungeon.level.solid, null ), 2 );
for (int i = 0; i < PathFinder.distance.length; i++) { for (int i = 0; i < PathFinder.distance.length; i++) {
if (PathFinder.distance[i] < Integer.MAX_VALUE) { if (PathFinder.distance[i] < Integer.MAX_VALUE) {
Char n = Actor.findChar(i); Char ch = Actor.findChar(i);
if (n != null) { if (ch != null) {
Buff.prolong(n, Blindness.class, 1f); affected.add(ch);
if (n.properties().contains(Char.Property.UNDEAD) || n.properties().contains(Char.Property.DEMONIC)){
n.sprite.emitter().start( ShadowParticle.UP, 0.05f, 10 );
//bomb deals an additional 67% damage to unholy enemies in a 5x5 range
int damage = Math.round(Random.NormalIntRange( Dungeon.depth+5, 10 + Dungeon.depth * 2 ) * 0.67f);
n.damage(damage, this);
}
} }
} }
} }
for (Char ch : affected){
Buff.prolong(ch, Blindness.class, 1f);
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 67% damage to unholy enemies in a 5x5 range
int damage = Math.round(Random.NormalIntRange( Dungeon.depth+5, 10 + Dungeon.depth * 2 ) * 0.67f);
ch.damage(damage, this);
}
}
Sample.INSTANCE.play( Assets.SND_READ ); Sample.INSTANCE.play( Assets.SND_READ );
} }

View File

@ -31,6 +31,8 @@ import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
import com.watabou.utils.Point; import com.watabou.utils.Point;
import com.watabou.utils.Random; import com.watabou.utils.Random;
import java.util.ArrayList;
public class ShrapnelBomb extends Bomb { public class ShrapnelBomb extends Bomb {
{ {
@ -50,6 +52,8 @@ public class ShrapnelBomb extends Bomb {
Point c = Dungeon.level.cellToPoint(cell); Point c = Dungeon.level.cellToPoint(cell);
ShadowCaster.castShadow(c.x, c.y, FOV, Dungeon.level.losBlocking, 8); ShadowCaster.castShadow(c.x, c.y, FOV, Dungeon.level.losBlocking, 8);
ArrayList<Char> affected = new ArrayList<>();
for (int i = 0; i < FOV.length; i++) { for (int i = 0; i < FOV.length; i++) {
if (FOV[i]) { if (FOV[i]) {
if (Dungeon.level.heroFOV[i] && !Dungeon.level.solid[i]) { if (Dungeon.level.heroFOV[i] && !Dungeon.level.solid[i]) {
@ -58,15 +62,20 @@ public class ShrapnelBomb extends Bomb {
} }
Char ch = Actor.findChar(i); Char ch = Actor.findChar(i);
if (ch != null){ if (ch != null){
//regular bomb damage affected.add(ch);
int damage = Math.round(Random.NormalIntRange( Dungeon.depth+5, 10 + Dungeon.depth * 2 ));
damage -= ch.drRoll();
ch.damage(damage, this);
if (ch == Dungeon.hero && !ch.isAlive())
Dungeon.fail(Bomb.class);
} }
} }
} }
for (Char ch : affected){
//regular bomb damage
int damage = Math.round(Random.NormalIntRange( Dungeon.depth+5, 10 + Dungeon.depth * 2 ));
damage -= ch.drRoll();
ch.damage(damage, this);
if (ch == Dungeon.hero && !ch.isAlive()) {
Dungeon.fail(Bomb.class);
}
}
} }
@Override @Override

View File

@ -24,6 +24,7 @@ package com.shatteredpixel.shatteredpixeldungeon.journal;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
import com.watabou.utils.Bundle; import com.watabou.utils.Bundle;
import com.watabou.utils.DeviceCompat;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
@ -101,32 +102,32 @@ public enum Document {
public static final String GUIDE_SEARCH_PAGE = "Examining_and_Searching"; public static final String GUIDE_SEARCH_PAGE = "Examining_and_Searching";
static { static {
ADVENTURERS_GUIDE.pages.put(GUIDE_INTRO_PAGE, false); ADVENTURERS_GUIDE.pages.put(GUIDE_INTRO_PAGE, DeviceCompat.isDebug());
ADVENTURERS_GUIDE.pages.put("Identifying", false); ADVENTURERS_GUIDE.pages.put("Identifying", DeviceCompat.isDebug());
ADVENTURERS_GUIDE.pages.put(GUIDE_SEARCH_PAGE, false); ADVENTURERS_GUIDE.pages.put(GUIDE_SEARCH_PAGE, DeviceCompat.isDebug());
ADVENTURERS_GUIDE.pages.put("Strength", false); ADVENTURERS_GUIDE.pages.put("Strength", DeviceCompat.isDebug());
ADVENTURERS_GUIDE.pages.put("Food", false); ADVENTURERS_GUIDE.pages.put("Food", DeviceCompat.isDebug());
ADVENTURERS_GUIDE.pages.put("Levelling", false); ADVENTURERS_GUIDE.pages.put("Levelling", DeviceCompat.isDebug());
ADVENTURERS_GUIDE.pages.put("Surprise_Attacks", false); ADVENTURERS_GUIDE.pages.put("Surprise_Attacks", DeviceCompat.isDebug());
ADVENTURERS_GUIDE.pages.put("Dieing", false); ADVENTURERS_GUIDE.pages.put("Dieing", DeviceCompat.isDebug());
ADVENTURERS_GUIDE.pages.put("Looting", false); ADVENTURERS_GUIDE.pages.put("Looting", DeviceCompat.isDebug());
ADVENTURERS_GUIDE.pages.put("Magic", false); ADVENTURERS_GUIDE.pages.put("Magic", DeviceCompat.isDebug());
//sewers //sewers
ALCHEMY_GUIDE.pages.put("Potions", false); ALCHEMY_GUIDE.pages.put("Potions", DeviceCompat.isDebug());
ALCHEMY_GUIDE.pages.put("Stones", false); ALCHEMY_GUIDE.pages.put("Stones", DeviceCompat.isDebug());
ALCHEMY_GUIDE.pages.put("Darts", false); ALCHEMY_GUIDE.pages.put("Darts", DeviceCompat.isDebug());
//prison //prison
ALCHEMY_GUIDE.pages.put("Exotic_Potions", false); ALCHEMY_GUIDE.pages.put("Exotic_Potions", DeviceCompat.isDebug());
ALCHEMY_GUIDE.pages.put("Exotic_Scrolls", false); ALCHEMY_GUIDE.pages.put("Exotic_Scrolls", DeviceCompat.isDebug());
ALCHEMY_GUIDE.pages.put("Energy_Food", false); ALCHEMY_GUIDE.pages.put("Energy_Food", DeviceCompat.isDebug());
ALCHEMY_GUIDE.pages.put("Bombs", false); ALCHEMY_GUIDE.pages.put("Bombs", DeviceCompat.isDebug());
//caves //caves
ALCHEMY_GUIDE.pages.put("Catalysts", false); ALCHEMY_GUIDE.pages.put("Catalysts", DeviceCompat.isDebug());
ALCHEMY_GUIDE.pages.put("Brews_Elixirs", false); ALCHEMY_GUIDE.pages.put("Brews_Elixirs", DeviceCompat.isDebug());
ALCHEMY_GUIDE.pages.put("Spells", false); ALCHEMY_GUIDE.pages.put("Spells", DeviceCompat.isDebug());
} }
private static final String DOCUMENTS = "documents"; private static final String DOCUMENTS = "documents";

View File

@ -533,7 +533,7 @@ actors.mobs.rotheart.name=rot heart
actors.mobs.rotheart.desc=A Rotberry's fruit is very unique. Instead of rotting away and providing nutrients, the fruit grows, hardens, and encompasses the seed. It provides protection for the internal organs which grow inside the fruit. This giant orb is referred to as the heart of an adult rotberry plant. actors.mobs.rotheart.desc=A Rotberry's fruit is very unique. Instead of rotting away and providing nutrients, the fruit grows, hardens, and encompasses the seed. It provides protection for the internal organs which grow inside the fruit. This giant orb is referred to as the heart of an adult rotberry plant.
actors.mobs.rotlasher.name=rot lasher actors.mobs.rotlasher.name=rot lasher
actors.mobs.rotlasher.desc=The rot lasher is a part of a mature rotberry plant's root structure, and also their primary means of defense. Lashers are stuck into the ground, but will violently assault anything that gets near to them. When there is no nearby prey, they stand motionless, attempting to blend in with surrounding vegetation. actors.mobs.rotlasher.desc=The rot lasher is a part of a mature rotberry plant's root structure, and also their primary means of defense. Lashers are stuck into the ground, but will violently assault any threat that gets near to them. When there is no nearby enemies, they stand motionless, attempting to blend in with surrounding vegetation.
actors.mobs.rotlasher$waiting.status=This %s is idle. actors.mobs.rotlasher$waiting.status=This %s is idle.
actors.mobs.scorpio.name=scorpio actors.mobs.scorpio.name=scorpio

View File

@ -411,12 +411,8 @@ items.food.blandfruit.dreamfruit=dreamfruit
items.food.blandfruit.starfruit=starfruit items.food.blandfruit.starfruit=starfruit
items.food.blandfruit.swiftfruit=swiftfruit items.food.blandfruit.swiftfruit=swiftfruit
items.food.blandfruit.raw=You can't bear to eat it raw. items.food.blandfruit.raw=You can't bear to eat it raw.
items.food.blandfruit.ice_msg=The icefruit tastes a bit like Frozen Carpaccio.
items.food.blandfruit.fire_msg=You feel a great fire burning within you!
items.food.blandfruit.toxic_msg=You are imbued with vile toxic power!
items.food.blandfruit.para_msg=You feel the power of the earth coursing through you!
items.food.blandfruit.desc=So dry and insubstantial, perhaps stewing it with another ingredient would improve it. items.food.blandfruit.desc=So dry and insubstantial, perhaps stewing it with another ingredient would improve it.
items.food.blandfruit.desc_cooked=The fruit has plumped up from its time soaking in the pot and has even absorbed the properties of the seed it was cooked with. items.food.blandfruit.desc_cooked=The fruit has plumped up from its time soaking in the pot and has even absorbed the properties of the seed it was cooked with. It will have the effect of whatever potion the seed corresponded to.
items.food.blandfruit.desc_eat=It looks ready to be eaten! items.food.blandfruit.desc_eat=It looks ready to be eaten!
items.food.blandfruit.desc_throw=It seems pretty volatile, it might be best to throw it. items.food.blandfruit.desc_throw=It seems pretty volatile, it might be best to throw it.
items.food.blandfruit$chunks.name=blandfruit chunks items.food.blandfruit$chunks.name=blandfruit chunks