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:
parent
24e311dc58
commit
b6f8aacd9d
|
@ -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 {
|
||||
|
@ -71,6 +72,7 @@ public class WandOfFireblast extends DamageWand {
|
|||
@Override
|
||||
protected void onZap( Ballistica bolt ) {
|
||||
|
||||
ArrayList<Char> affectedChars = new ArrayList<>();
|
||||
for( int cell : affectedCells){
|
||||
|
||||
//ignore caster cell
|
||||
|
@ -86,7 +88,11 @@ public class WandOfFireblast extends DamageWand {
|
|||
|
||||
Char ch = Actor.findChar( cell );
|
||||
if (ch != null) {
|
||||
affectedChars.add(ch);
|
||||
}
|
||||
}
|
||||
|
||||
for ( Char ch : affectedChars ){
|
||||
processSoulMark(ch, chargesPerCast());
|
||||
ch.damage(damageRoll(), this);
|
||||
Buff.affect( ch, Burning.class ).reignite( ch );
|
||||
|
@ -100,7 +106,6 @@ public class WandOfFireblast extends DamageWand {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//burn... BURNNNNN!.....
|
||||
private void spreadFlames(int cell, float strength){
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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());
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user