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:
+18
-13
@@ -42,6 +42,7 @@ import com.watabou.noosa.audio.Sample;
|
|||||||
import com.watabou.utils.Callback;
|
import com.watabou.utils.Callback;
|
||||||
import com.watabou.utils.PathFinder;
|
import com.watabou.utils.PathFinder;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
|
|
||||||
public class WandOfFireblast extends DamageWand {
|
public class WandOfFireblast extends DamageWand {
|
||||||
@@ -70,7 +71,8 @@ public class WandOfFireblast extends DamageWand {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onZap( Ballistica bolt ) {
|
protected void onZap( Ballistica bolt ) {
|
||||||
|
|
||||||
|
ArrayList<Char> affectedChars = new ArrayList<>();
|
||||||
for( int cell : affectedCells){
|
for( int cell : affectedCells){
|
||||||
|
|
||||||
//ignore caster cell
|
//ignore caster cell
|
||||||
@@ -86,18 +88,21 @@ public class WandOfFireblast extends DamageWand {
|
|||||||
|
|
||||||
Char ch = Actor.findChar( cell );
|
Char ch = Actor.findChar( cell );
|
||||||
if (ch != null) {
|
if (ch != null) {
|
||||||
|
affectedChars.add(ch);
|
||||||
processSoulMark(ch, chargesPerCast());
|
}
|
||||||
ch.damage(damageRoll(), this);
|
}
|
||||||
Buff.affect( ch, Burning.class ).reignite( ch );
|
|
||||||
switch(chargesPerCast()){
|
for ( Char ch : affectedChars ){
|
||||||
case 1:
|
processSoulMark(ch, chargesPerCast());
|
||||||
break; //no effects
|
ch.damage(damageRoll(), this);
|
||||||
case 2:
|
Buff.affect( ch, Burning.class ).reignite( ch );
|
||||||
Buff.affect(ch, Cripple.class, 4f); break;
|
switch(chargesPerCast()){
|
||||||
case 3:
|
case 1:
|
||||||
Buff.affect(ch, Paralysis.class, 4f); break;
|
break; //no effects
|
||||||
}
|
case 2:
|
||||||
|
Buff.affect(ch, Cripple.class, 4f); break;
|
||||||
|
case 3:
|
||||||
|
Buff.affect(ch, Paralysis.class, 4f); break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+6
-2
@@ -310,7 +310,9 @@ public class WandOfRegrowth extends Wand {
|
|||||||
|
|
||||||
ArrayList<Integer> candidates = new ArrayList<Integer>();
|
ArrayList<Integer> candidates = new ArrayList<Integer>();
|
||||||
for (int i : PathFinder.NEIGHBOURS8){
|
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);
|
candidates.add(pos+i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -344,7 +346,9 @@ public class WandOfRegrowth extends Wand {
|
|||||||
|
|
||||||
ArrayList<Integer> candidates = new ArrayList<Integer>();
|
ArrayList<Integer> candidates = new ArrayList<Integer>();
|
||||||
for (int i : PathFinder.NEIGHBOURS8){
|
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);
|
candidates.add(pos+i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+34
-17
@@ -62,38 +62,55 @@ public class SecretChestChasmRoom extends SecretRoom {
|
|||||||
Painter.fill(level, this, Terrain.WALL);
|
Painter.fill(level, this, Terrain.WALL);
|
||||||
Painter.fill(level, this, 1, Terrain.CHASM);
|
Painter.fill(level, this, 1, Terrain.CHASM);
|
||||||
|
|
||||||
Point p = new Point(left+1, top+1);
|
int chests = 0;
|
||||||
Painter.set(level, p, Terrain.EMPTY_SP);
|
|
||||||
level.drop(new GoldenKey(Dungeon.depth), level.pointToCell(p));
|
|
||||||
|
|
||||||
p.x = right-1;
|
Point p = new Point(left+3, top+3);
|
||||||
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);
|
|
||||||
Painter.set(level, p, Terrain.EMPTY_SP);
|
Painter.set(level, p, Terrain.EMPTY_SP);
|
||||||
level.drop(Generator.random(), level.pointToCell(p)).type = Heap.Type.LOCKED_CHEST;
|
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;
|
p.x = right-3;
|
||||||
Painter.set(level, p, Terrain.EMPTY_SP);
|
Painter.set(level, p, Terrain.EMPTY_SP);
|
||||||
level.drop(Generator.random(), level.pointToCell(p)).type = Heap.Type.LOCKED_CHEST;
|
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;
|
p.y = bottom-3;
|
||||||
Painter.set(level, p, Terrain.EMPTY_SP);
|
Painter.set(level, p, Terrain.EMPTY_SP);
|
||||||
level.drop(Generator.random(), level.pointToCell(p)).type = Heap.Type.LOCKED_CHEST;
|
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;
|
p.x = left+3;
|
||||||
Painter.set(level, p, Terrain.EMPTY_SP);
|
Painter.set(level, p, Terrain.EMPTY_SP);
|
||||||
level.drop(Generator.random(), level.pointToCell(p)).type = Heap.Type.LOCKED_CHEST;
|
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());
|
level.addItemToSpawn(new PotionOfLevitation());
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user