v2.2.0: fixed a variety of small bugs:

- guardians 'dodging' instead of 'blocking'
- guardians having defenseSkill while recovering
- spire not finishing attacks if hero leaves vision range
- beacon of returning allowing return to mining level
- 'cash out' being repeatedly selectable
This commit is contained in:
Evan Debenham
2023-10-04 14:18:31 -04:00
parent 538914864a
commit 098ab9d772
5 changed files with 86 additions and 73 deletions
@@ -1112,6 +1112,7 @@ actors.mobs.crab.name=sewer crab
actors.mobs.crab.desc=These huge crabs are at the top of the food chain in the sewers. They are extremely fast and their thick carapace can withstand heavy blows. actors.mobs.crab.desc=These huge crabs are at the top of the food chain in the sewers. They are extremely fast and their thick carapace can withstand heavy blows.
actors.mobs.crystalguardian.name=crystal guardian actors.mobs.crystalguardian.name=crystal guardian
actors.mobs.crystalguardian.def_verb=blocked
actors.mobs.crystalguardian.desc=These large crystalline guardians almost look like statues, if it weren't for their bright glowing eyes. The hardened crystal they're made out of causes them to be sluggish but very tough, so _it's best to leave them to sleep in their crystal nest for as long as possible._\n\nDue to their size, crystal guardians will move much more slowly in enclosed spaces. They're also so durable that they're impossible to kill outright. They can be beaten down and temporarily disabled, but they'll just get back up again after a little while. actors.mobs.crystalguardian.desc=These large crystalline guardians almost look like statues, if it weren't for their bright glowing eyes. The hardened crystal they're made out of causes them to be sluggish but very tough, so _it's best to leave them to sleep in their crystal nest for as long as possible._\n\nDue to their size, crystal guardians will move much more slowly in enclosed spaces. They're also so durable that they're impossible to kill outright. They can be beaten down and temporarily disabled, but they'll just get back up again after a little while.
actors.mobs.crystalmimic.name=crystal mimic actors.mobs.crystalmimic.name=crystal mimic
@@ -89,6 +89,12 @@ public class CrystalGuardian extends Mob{
return 20; return 20;
} }
@Override
public int defenseSkill(Char enemy) {
if (recovering) return 0;
return super.defenseSkill(enemy);
}
@Override @Override
public int drRoll() { public int drRoll() {
return super.drRoll() + Random.NormalIntRange(0, 10); return super.drRoll() + Random.NormalIntRange(0, 10);
@@ -103,11 +103,6 @@ public class CrystalSpire extends Mob {
enemySeen = enemy.isAlive() && fieldOfView[enemy.pos]; enemySeen = enemy.isAlive() && fieldOfView[enemy.pos];
//end of char/mob logic //end of char/mob logic
if (hits < 3 || !enemySeen){
spend(TICK);
return true;
} else {
if (!targetedCells.isEmpty()){ if (!targetedCells.isEmpty()){
ArrayList<Integer> cellsToAttack = targetedCells.remove(0); ArrayList<Integer> cellsToAttack = targetedCells.remove(0);
@@ -180,6 +175,11 @@ public class CrystalSpire extends Mob {
} }
if (hits < 3 || !enemySeen){
spend(TICK);
return true;
} else {
if (abilityCooldown <= 0){ if (abilityCooldown <= 0){
if (Random.Int(2) == 0) { if (Random.Int(2) == 0) {
@@ -155,6 +155,12 @@ public class BeaconOfReturning extends Spell {
return; return;
} }
//cannot return to mining level
if (returnDepth >= 11 && returnDepth <= 14 && returnBranch == 1){
GLog.w( Messages.get(ScrollOfTeleportation.class, "no_tele") );
return;
}
Level.beforeTransition(); Level.beforeTransition();
Invisibility.dispel(); Invisibility.dispel();
InterlevelScene.mode = InterlevelScene.Mode.RETURN; InterlevelScene.mode = InterlevelScene.Mode.RETURN;
@@ -144,7 +144,7 @@ public class WndBlacksmith extends Window {
WndBlacksmith.this.hide(); WndBlacksmith.this.hide();
} }
}; };
cashOut.enable(true); cashOut.enable(Blacksmith.Quest.favor > 0);
buttons.add(cashOut); buttons.add(cashOut);
float pos = message.bottom() + 3*GAP; float pos = message.bottom() + 3*GAP;