v0.9.2: fixed various crash errors
This commit is contained in:
parent
dd8ec8033c
commit
db8dffe639
|
@ -216,6 +216,7 @@ public class Combo extends Buff implements ActionIndicator.Action {
|
|||
public void useMove(ComboMove move){
|
||||
if (move == ComboMove.PARRY){
|
||||
parryUsed = true;
|
||||
comboTime = 5f;
|
||||
Buff.affect(target, ParryTracker.class, Actor.TICK);
|
||||
((Hero)target).spendAndNext(Actor.TICK);
|
||||
} else {
|
||||
|
@ -422,6 +423,7 @@ public class Combo extends Buff implements ActionIndicator.Action {
|
|||
if (cell == null) return;
|
||||
final Char enemy = Actor.findChar( cell );
|
||||
if (enemy == null
|
||||
|| enemy == target
|
||||
|| !Dungeon.level.heroFOV[cell]
|
||||
|| target.isCharmedBy( enemy )) {
|
||||
GLog.w(Messages.get(Combo.class, "bad_target"));
|
||||
|
|
|
@ -231,9 +231,7 @@ public class Preparation extends Buff implements ActionIndicator.Action {
|
|||
public void restoreFromBundle(Bundle bundle) {
|
||||
super.restoreFromBundle(bundle);
|
||||
turnsInvis = bundle.getInt(TURNS);
|
||||
if (AttackLevel.getLvl(turnsInvis).blinkDistance() > 0){
|
||||
ActionIndicator.setAction(this);
|
||||
}
|
||||
ActionIndicator.setAction(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -694,10 +694,12 @@ public abstract class Mob extends Char {
|
|||
&& soulMarked
|
||||
&& Random.Int(10) < Dungeon.hero.pointsInTalent(Talent.NECROMANCERS_MINIONS)){
|
||||
Wraith w = Wraith.spawnAt(pos);
|
||||
Buff.affect(w, Corruption.class);
|
||||
if (Dungeon.level.heroFOV[pos]){
|
||||
CellEmitter.get(pos).burst( ShadowParticle.CURSE, 6 );
|
||||
Sample.INSTANCE.play( Assets.Sounds.CURSED );
|
||||
if (w != null) {
|
||||
Buff.affect(w, Corruption.class);
|
||||
if (Dungeon.level.heroFOV[pos]) {
|
||||
CellEmitter.get(pos).burst(ShadowParticle.CURSE, 6);
|
||||
Sample.INSTANCE.play(Assets.Sounds.CURSED);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -265,8 +265,8 @@ public class NewTengu extends Mob {
|
|||
|
||||
if (level.heroFOV[newPos]) CellEmitter.get( newPos ).burst( Speck.factory( Speck.WOOL ), 6 );
|
||||
Sample.INSTANCE.play( Assets.Sounds.PUFF );
|
||||
|
||||
float fill = 0.9f - 0.5f*((HP-80)/80f);
|
||||
|
||||
float fill = 0.9f - 0.5f*((HP-(HT/2f))/(HT/2f));
|
||||
level.placeTrapsInTenguCell(fill);
|
||||
|
||||
//otherwise, jump in a larger possible area, as the room is bigger
|
||||
|
|
|
@ -90,8 +90,10 @@ public class Artifact extends KindofMisc {
|
|||
public boolean doUnequip( Hero hero, boolean collect, boolean single ) {
|
||||
if (super.doUnequip( hero, collect, single )) {
|
||||
|
||||
passiveBuff.detach();
|
||||
passiveBuff = null;
|
||||
if (passiveBuff != null) {
|
||||
passiveBuff.detach();
|
||||
passiveBuff = null;
|
||||
}
|
||||
|
||||
if (activeBuff != null){
|
||||
activeBuff.detach();
|
||||
|
|
|
@ -155,11 +155,10 @@ public class CloakOfShadows extends Artifact {
|
|||
if (passiveBuff != null){
|
||||
passiveBuff.detach();
|
||||
passiveBuff = null;
|
||||
|
||||
if (activeBuff != null){
|
||||
activeBuff.detach();
|
||||
activeBuff = null;
|
||||
}
|
||||
}
|
||||
if (activeBuff != null){
|
||||
activeBuff.detach();
|
||||
activeBuff = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user