v0.6.5b: bugfixes

- piranha are now immune to vertigo (prevents odd behaviour)
- imp can no longer spawn on traps
- prismatic light now updates map before dealing damage
- fixed respawner active right after loading a floor
This commit is contained in:
Evan Debenham 2018-05-16 11:25:34 -04:00
parent cfaf6eeb82
commit 0de59c01e9
5 changed files with 22 additions and 14 deletions

View File

@ -372,7 +372,7 @@ public class Dungeon {
Actor respawner = level.respawner();
if (respawner != null) {
Actor.add( level.respawner() );
Actor.addDelayed( respawner, level.respawnTime() );
}
hero.pos = pos;

View File

@ -26,6 +26,7 @@ import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.Statistics;
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Burning;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Vertigo;
import com.shatteredpixel.shatteredpixeldungeon.items.food.MysteryMeat;
import com.shatteredpixel.shatteredpixeldungeon.levels.RegularLevel;
import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.Room;
@ -130,6 +131,7 @@ public class Piranha extends Mob {
{
immunities.add( Burning.class );
immunities.add( Vertigo.class );
}
private class Hunting extends Mob.Hunting{

View File

@ -188,6 +188,7 @@ public class Imp extends NPC {
} while (
npc.pos == -1 ||
level.heaps.get( npc.pos ) != null ||
level.traps.get( npc.pos) != null ||
level.findMob( npc.pos ) != null ||
//The imp doesn't move, so he cannot obstruct a passageway
!(level.passable[npc.pos + PathFinder.CIRCLE4[0]] && level.passable[npc.pos + PathFinder.CIRCLE4[2]]) ||

View File

@ -66,13 +66,8 @@ public class WandOfPrismaticLight extends DamageWand {
@Override
protected void onZap(Ballistica beam) {
Char ch = Actor.findChar(beam.collisionPos);
if (ch != null){
processSoulMark(ch, chargesPerCast());
affectTarget(ch);
}
affectMap(beam);
if (Dungeon.level.viewDistance < 6 ){
if (Dungeon.isChallenged(Challenges.DARKNESS)){
Buff.prolong( curUser, Light.class, 2f + level());
@ -80,6 +75,12 @@ public class WandOfPrismaticLight extends DamageWand {
Buff.prolong( curUser, Light.class, 10f+level()*5);
}
}
Char ch = Actor.findChar(beam.collisionPos);
if (ch != null){
processSoulMark(ch, chargesPerCast());
affectTarget(ch);
}
}
private void affectTarget(Char ch){

View File

@ -490,18 +490,22 @@ public abstract class Level implements Bundlable {
}
}
}
if (Statistics.amuletObtained){
spend(TIME_TO_RESPAWN/2f);
} else if (Dungeon.level.feeling == Feeling.DARK){
spend(2*TIME_TO_RESPAWN/3f);
} else {
spend(TIME_TO_RESPAWN);
}
spend(respawnTime());
return true;
}
};
}
public float respawnTime(){
if (Statistics.amuletObtained){
return TIME_TO_RESPAWN/2f;
} else if (Dungeon.level.feeling == Feeling.DARK){
return 2*TIME_TO_RESPAWN/3f;
} else {
return TIME_TO_RESPAWN;
}
}
public int randomRespawnCell() {
int cell;
do {