v0.7.1: bugfixes:

- fixed keys spawning without chests in secret chest chasms rooms when challenges were enabled
- fixed fireblast rarely damaging enemies who move into it's effect as it's resolving
- fixed dew drops rarely landing on stairs, making them inaccessible.
This commit is contained in:
Evan Debenham 2018-11-18 19:23:55 -05:00
parent 24e311dc58
commit b6f8aacd9d
3 changed files with 58 additions and 32 deletions

View File

@ -42,6 +42,7 @@ import com.watabou.noosa.audio.Sample;
import com.watabou.utils.Callback;
import com.watabou.utils.PathFinder;
import java.util.ArrayList;
import java.util.HashSet;
public class WandOfFireblast extends DamageWand {
@ -70,7 +71,8 @@ public class WandOfFireblast extends DamageWand {
@Override
protected void onZap( Ballistica bolt ) {
ArrayList<Char> affectedChars = new ArrayList<>();
for( int cell : affectedCells){
//ignore caster cell
@ -86,18 +88,21 @@ public class WandOfFireblast extends DamageWand {
Char ch = Actor.findChar( cell );
if (ch != null) {
processSoulMark(ch, chargesPerCast());
ch.damage(damageRoll(), this);
Buff.affect( ch, Burning.class ).reignite( ch );
switch(chargesPerCast()){
case 1:
break; //no effects
case 2:
Buff.affect(ch, Cripple.class, 4f); break;
case 3:
Buff.affect(ch, Paralysis.class, 4f); break;
}
affectedChars.add(ch);
}
}
for ( Char ch : affectedChars ){
processSoulMark(ch, chargesPerCast());
ch.damage(damageRoll(), this);
Buff.affect( ch, Burning.class ).reignite( ch );
switch(chargesPerCast()){
case 1:
break; //no effects
case 2:
Buff.affect(ch, Cripple.class, 4f); break;
case 3:
Buff.affect(ch, Paralysis.class, 4f); break;
}
}
}

View File

@ -310,7 +310,9 @@ public class WandOfRegrowth extends Wand {
ArrayList<Integer> candidates = new ArrayList<Integer>();
for (int i : PathFinder.NEIGHBOURS8){
if (Dungeon.level.passable[pos+i]){
if (Dungeon.level.passable[pos+i]
&& pos+i != Dungeon.level.entrance
&& pos+i != Dungeon.level.exit){
candidates.add(pos+i);
}
}
@ -344,7 +346,9 @@ public class WandOfRegrowth extends Wand {
ArrayList<Integer> candidates = new ArrayList<Integer>();
for (int i : PathFinder.NEIGHBOURS8){
if (Dungeon.level.passable[pos+i]){
if (Dungeon.level.passable[pos+i]
&& pos+i != Dungeon.level.entrance
&& pos+i != Dungeon.level.exit){
candidates.add(pos+i);
}
}

View File

@ -62,38 +62,55 @@ public class SecretChestChasmRoom extends SecretRoom {
Painter.fill(level, this, Terrain.WALL);
Painter.fill(level, this, 1, Terrain.CHASM);
Point p = new Point(left+1, top+1);
Painter.set(level, p, Terrain.EMPTY_SP);
level.drop(new GoldenKey(Dungeon.depth), level.pointToCell(p));
int chests = 0;
p.x = right-1;
Painter.set(level, p, Terrain.EMPTY_SP);
level.drop(new GoldenKey(Dungeon.depth), level.pointToCell(p));
p.y = bottom-1;
Painter.set(level, p, Terrain.EMPTY_SP);
level.drop(new GoldenKey(Dungeon.depth), level.pointToCell(p));
p.x = left+1;
Painter.set(level, p, Terrain.EMPTY_SP);
level.drop(new GoldenKey(Dungeon.depth), level.pointToCell(p));
p = new Point(left+3, top+3);
Point p = new Point(left+3, top+3);
Painter.set(level, p, Terrain.EMPTY_SP);
level.drop(Generator.random(), level.pointToCell(p)).type = Heap.Type.LOCKED_CHEST;
if (level.heaps.get(level.pointToCell(p)) != null) chests++;
p.x = right-3;
Painter.set(level, p, Terrain.EMPTY_SP);
level.drop(Generator.random(), level.pointToCell(p)).type = Heap.Type.LOCKED_CHEST;
if (level.heaps.get(level.pointToCell(p)) != null) chests++;
p.y = bottom-3;
Painter.set(level, p, Terrain.EMPTY_SP);
level.drop(Generator.random(), level.pointToCell(p)).type = Heap.Type.LOCKED_CHEST;
if (level.heaps.get(level.pointToCell(p)) != null) chests++;
p.x = left+3;
Painter.set(level, p, Terrain.EMPTY_SP);
level.drop(Generator.random(), level.pointToCell(p)).type = Heap.Type.LOCKED_CHEST;
if (level.heaps.get(level.pointToCell(p)) != null) chests++;
p = new Point(left+1, top+1);
Painter.set(level, p, Terrain.EMPTY_SP);
if (chests > 0) {
level.drop(new GoldenKey(Dungeon.depth), level.pointToCell(p));
chests--;
}
p.x = right-1;
Painter.set(level, p, Terrain.EMPTY_SP);
if (chests > 0) {
level.drop(new GoldenKey(Dungeon.depth), level.pointToCell(p));
chests--;
}
p.y = bottom-1;
Painter.set(level, p, Terrain.EMPTY_SP);
if (chests > 0) {
level.drop(new GoldenKey(Dungeon.depth), level.pointToCell(p));
chests--;
}
p.x = left+1;
Painter.set(level, p, Terrain.EMPTY_SP);
if (chests > 0) {
level.drop(new GoldenKey(Dungeon.depth), level.pointToCell(p));
chests--;
}
level.addItemToSpawn(new PotionOfLevitation());