v0.7.0a: bugfixes:
- fixed crashes when tengu is healed and then damaged - fixed deaths to arcane and shrapnel bombs not appearing in rankings - fixed runs from before 0.7.0 getting a laboratory every floor - fixed visual bugs involving alchemist's toolkit
This commit is contained in:
parent
a49eab8ed1
commit
02e0de6273
|
@ -89,26 +89,33 @@ public class Tengu extends Mob {
|
||||||
@Override
|
@Override
|
||||||
public void damage(int dmg, Object src) {
|
public void damage(int dmg, Object src) {
|
||||||
|
|
||||||
|
PrisonBossLevel.State state = ((PrisonBossLevel)Dungeon.level).state();
|
||||||
|
|
||||||
|
int hpBracket;
|
||||||
|
if (state == PrisonBossLevel.State.FIGHT_START){
|
||||||
|
hpBracket = 12;
|
||||||
|
} else {
|
||||||
|
hpBracket = 20;
|
||||||
|
}
|
||||||
|
|
||||||
int beforeHitHP = HP;
|
int beforeHitHP = HP;
|
||||||
super.damage(dmg, src);
|
super.damage(dmg, src);
|
||||||
dmg = beforeHitHP - HP;
|
dmg = beforeHitHP - HP;
|
||||||
|
|
||||||
LockedFloor lock = Dungeon.hero.buff(LockedFloor.class);
|
LockedFloor lock = Dungeon.hero.buff(LockedFloor.class);
|
||||||
if (lock != null) {
|
if (lock != null) {
|
||||||
int multiple = beforeHitHP > HT/2 ? 1 : 4;
|
int multiple = state == PrisonBossLevel.State.FIGHT_START ? 1 : 4;
|
||||||
lock.addTime(dmg*multiple);
|
lock.addTime(dmg*multiple);
|
||||||
}
|
}
|
||||||
|
|
||||||
//phase 2 of the fight is over
|
//phase 2 of the fight is over
|
||||||
if (HP == 0 && beforeHitHP <= HT/2) {
|
if (HP == 0 && state == PrisonBossLevel.State.FIGHT_ARENA) {
|
||||||
((PrisonBossLevel)Dungeon.level).progress();
|
((PrisonBossLevel)Dungeon.level).progress();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
int hpBracket = beforeHitHP > HT/2 ? 12 : 20;
|
|
||||||
|
|
||||||
//phase 1 of the fight is over
|
//phase 1 of the fight is over
|
||||||
if (beforeHitHP > HT/2 && HP <= HT/2){
|
if (state == PrisonBossLevel.State.FIGHT_START && HP <= HT/2){
|
||||||
HP = (HT/2)-1;
|
HP = (HT/2)-1;
|
||||||
yell(Messages.get(this, "interesting"));
|
yell(Messages.get(this, "interesting"));
|
||||||
((PrisonBossLevel)Dungeon.level).progress();
|
((PrisonBossLevel)Dungeon.level).progress();
|
||||||
|
@ -175,7 +182,7 @@ public class Tengu extends Mob {
|
||||||
|
|
||||||
int newPos;
|
int newPos;
|
||||||
//if we're in phase 1, want to warp around within the room
|
//if we're in phase 1, want to warp around within the room
|
||||||
if (HP > HT/2) {
|
if (((PrisonBossLevel)Dungeon.level).state() == PrisonBossLevel.State.FIGHT_START) {
|
||||||
|
|
||||||
//place new traps
|
//place new traps
|
||||||
int tries;
|
int tries;
|
||||||
|
|
|
@ -72,6 +72,8 @@ public class ArcaneBomb extends Bomb {
|
||||||
//regular bomb damage, but pierces armor
|
//regular bomb damage, but pierces armor
|
||||||
int damage = Math.round(Random.NormalIntRange( Dungeon.depth+5, 10 + Dungeon.depth * 2 ));
|
int damage = Math.round(Random.NormalIntRange( Dungeon.depth+5, 10 + Dungeon.depth * 2 ));
|
||||||
ch.damage(damage, this);
|
ch.damage(damage, this);
|
||||||
|
if (ch == Dungeon.hero && !ch.isAlive())
|
||||||
|
Dungeon.fail(Bomb.class);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,6 +62,8 @@ public class ShrapnelBomb extends Bomb {
|
||||||
int damage = Math.round(Random.NormalIntRange( Dungeon.depth+5, 10 + Dungeon.depth * 2 ));
|
int damage = Math.round(Random.NormalIntRange( Dungeon.depth+5, 10 + Dungeon.depth * 2 ));
|
||||||
damage -= ch.drRoll();
|
damage -= ch.drRoll();
|
||||||
ch.damage(damage, this);
|
ch.damage(damage, this);
|
||||||
|
if (ch == Dungeon.hero && !ch.isAlive())
|
||||||
|
Dungeon.fail(Bomb.class);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,7 +60,7 @@ public class PrisonBossLevel extends Level {
|
||||||
color2 = 0x88924c;
|
color2 = 0x88924c;
|
||||||
}
|
}
|
||||||
|
|
||||||
private enum State{
|
public enum State {
|
||||||
START,
|
START,
|
||||||
FIGHT_START,
|
FIGHT_START,
|
||||||
MAZE,
|
MAZE,
|
||||||
|
@ -71,6 +71,10 @@ public class PrisonBossLevel extends Level {
|
||||||
private State state;
|
private State state;
|
||||||
private Tengu tengu;
|
private Tengu tengu;
|
||||||
|
|
||||||
|
public State state(){
|
||||||
|
return state;
|
||||||
|
}
|
||||||
|
|
||||||
//keep track of that need to be removed as the level is changed. We dump 'em back into the level at the end.
|
//keep track of that need to be removed as the level is changed. We dump 'em back into the level at the end.
|
||||||
private ArrayList<Item> storedItems = new ArrayList<>();
|
private ArrayList<Item> storedItems = new ArrayList<>();
|
||||||
|
|
||||||
|
|
|
@ -149,7 +149,10 @@ public class SpecialRoom extends Room {
|
||||||
runSpecials.clear();
|
runSpecials.clear();
|
||||||
if (bundle.contains( ROOMS )) {
|
if (bundle.contains( ROOMS )) {
|
||||||
for (Class<? extends Room> type : bundle.getClassArray(ROOMS)) {
|
for (Class<? extends Room> type : bundle.getClassArray(ROOMS)) {
|
||||||
if (type != null) runSpecials.add(type);
|
//pre-0.7.0 saves
|
||||||
|
if (type != null && type != LaboratoryRoom.class) {
|
||||||
|
runSpecials.add(type);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
initForRun();
|
initForRun();
|
||||||
|
|
|
@ -305,6 +305,7 @@ public class AlchemyScene extends PixelScene {
|
||||||
if (item instanceof Dart) {
|
if (item instanceof Dart) {
|
||||||
inputs[i].item(item.detachAll(Dungeon.hero.belongings.backpack));
|
inputs[i].item(item.detachAll(Dungeon.hero.belongings.backpack));
|
||||||
} else if (item instanceof AlchemistsToolkit) {
|
} else if (item instanceof AlchemistsToolkit) {
|
||||||
|
clearSlots();
|
||||||
inputs[i].item(item);
|
inputs[i].item(item);
|
||||||
} else {
|
} else {
|
||||||
inputs[i].item(item.detach(Dungeon.hero.belongings.backpack));
|
inputs[i].item(item.detach(Dungeon.hero.belongings.backpack));
|
||||||
|
|
Loading…
Reference in New Issue
Block a user