v0.9.2b: fixed various cases of tele effects placing onto traps

This commit is contained in:
Evan Debenham 2021-03-19 22:54:39 -04:00
parent f0996a2b85
commit 023a5972f0
6 changed files with 11 additions and 11 deletions

View File

@ -91,7 +91,7 @@ public class ScrollOfTeleportation extends Scroll {
return;
}
int count = 10;
int count = 20;
int pos;
do {
pos = Dungeon.level.randomRespawnCell( ch );

View File

@ -45,14 +45,14 @@ public class PhaseShift extends TargetedSpell {
if (ch == hero){
ScrollOfTeleportation.teleportHero(curUser);
} else if (ch != null) {
int count = 10;
int count = 20;
int pos;
do {
pos = Dungeon.level.randomRespawnCell( hero );
if (count-- <= 0) {
break;
}
} while (pos == -1);
} while (pos == -1 || Dungeon.level.secret[pos]);
if (pos == -1 || Dungeon.bossLevel()) {

View File

@ -39,14 +39,14 @@ public class Displacing extends Weapon.Enchantment {
float procChance = 1/12f * procChanceMultiplier(attacker);
if (Random.Float() < procChance && !defender.properties().contains(Char.Property.IMMOVABLE)){
int count = 10;
int count = 20;
int newPos;
do {
newPos = Dungeon.level.randomRespawnCell( defender );
if (count-- <= 0) {
break;
}
} while (newPos == -1);
} while (newPos == -1 || Dungeon.level.secret[newPos]);
if (newPos != -1 && !Dungeon.bossLevel()) {

View File

@ -54,14 +54,14 @@ public class TeleportationTrap extends Trap {
if (ch instanceof Hero) {
ScrollOfTeleportation.teleportHero((Hero) ch);
} else {
int count = 10;
int count = 20;
int pos;
do {
pos = Dungeon.level.randomRespawnCell( ch );
if (count-- <= 0) {
break;
}
} while (pos == -1);
} while (pos == -1 || Dungeon.level.secret[pos]);
if (pos == -1 || Dungeon.bossLevel()) {

View File

@ -60,14 +60,14 @@ public class WarpingTrap extends Trap {
Dungeon.observe();
} else {
int count = 10;
int count = 20;
int pos;
do {
pos = Dungeon.level.randomRespawnCell( ch );
if (count-- <= 0) {
break;
}
} while (pos == -1);
} while (pos == -1 || Dungeon.level.secret[pos]);
if (pos == -1 || Dungeon.bossLevel()) {

View File

@ -77,14 +77,14 @@ public class Fadeleaf extends Plant {
if (!Dungeon.bossLevel()) {
int count = 10;
int count = 20;
int newPos;
do {
newPos = Dungeon.level.randomRespawnCell(ch);
if (count-- <= 0) {
break;
}
} while (newPos == -1);
} while (newPos == -1 || Dungeon.level.secret[newPos]);
if (newPos != -1) {