v0.8.1: fixed the following bugs:
- rare crashes involving preparation buff icon - quickslot errors when blacksmith reforges wands - rare crashes involving Tengu, he now keeps distance from his target and the hero - errors involving seed selection and sandals of nature - fireblast applying stun/cripple to dead enemies - github update checker connecting on metered networks
This commit is contained in:
parent
37fa457f33
commit
452a67f03b
|
@ -154,11 +154,12 @@ public class Preparation extends Buff implements ActionIndicator.Action {
|
|||
|
||||
@Override
|
||||
public float iconFadePercent() {
|
||||
if (AttackLevel.getLvl(turnsInvis) == AttackLevel.LVL_4){
|
||||
AttackLevel level = AttackLevel.getLvl(turnsInvis);
|
||||
if (level == AttackLevel.LVL_4){
|
||||
return 0;
|
||||
} else {
|
||||
float turnsForCur = AttackLevel.getLvl(turnsInvis).turnsReq;
|
||||
float turnsForNext = AttackLevel.values()[AttackLevel.getLvl(turnsInvis).ordinal()+1].turnsReq;
|
||||
float turnsForCur = level.turnsReq;
|
||||
float turnsForNext = AttackLevel.values()[level.ordinal()+1].turnsReq;
|
||||
turnsForNext -= turnsForCur;
|
||||
float turnsToNext = turnsInvis - turnsForCur;
|
||||
return Math.min(1, (turnsForNext - turnsToNext)/(turnsForNext));
|
||||
|
|
|
@ -244,7 +244,9 @@ public class NewTengu extends Mob {
|
|||
|
||||
do {
|
||||
newPos = ((NewPrisonBossLevel)Dungeon.level).randomTenguCellPos();
|
||||
} while ( (level.trueDistance(newPos, enemy.pos) <= 4 || Actor.findChar(newPos) != null));
|
||||
} while ( level.trueDistance(newPos, enemy.pos) <= 4
|
||||
|| level.trueDistance(newPos, Dungeon.hero.pos) <= 4
|
||||
|| Actor.findChar(newPos) != null);
|
||||
|
||||
if (level.heroFOV[pos]) CellEmitter.get( pos ).burst( Speck.factory( Speck.WOOL ), 6 );
|
||||
|
||||
|
@ -266,6 +268,8 @@ public class NewTengu extends Mob {
|
|||
level.solid[newPos] ||
|
||||
level.distance(newPos, enemy.pos) < 5 ||
|
||||
level.distance(newPos, enemy.pos) > 7 ||
|
||||
level.distance(newPos, Dungeon.hero.pos) < 5 ||
|
||||
level.distance(newPos, Dungeon.hero.pos) > 7 ||
|
||||
level.distance(newPos, pos) < 6 ||
|
||||
Actor.findChar(newPos) != null ||
|
||||
Dungeon.level.heaps.get(newPos) != null);
|
||||
|
|
|
@ -246,6 +246,7 @@ public class Blacksmith extends NPC {
|
|||
}
|
||||
Dungeon.hero.spendAndNext( 2f );
|
||||
Badges.validateItemLevelAquired( first );
|
||||
Item.updateQuickslot();
|
||||
|
||||
Quest.reforged = true;
|
||||
|
||||
|
|
|
@ -78,9 +78,7 @@ public class SandalsOfNature extends Artifact {
|
|||
|
||||
if (action.equals(AC_FEED)){
|
||||
|
||||
selectingFootwear = this;
|
||||
GameScene.selectItem(itemSelector, mode, Messages.get(this, "prompt"));
|
||||
selectingFootwear = null;
|
||||
|
||||
} else if (action.equals(AC_ROOT) && level() > 0){
|
||||
|
||||
|
@ -140,11 +138,10 @@ public class SandalsOfNature extends Artifact {
|
|||
return super.upgrade();
|
||||
}
|
||||
|
||||
private static SandalsOfNature selectingFootwear = null;
|
||||
|
||||
public static boolean canUseSeed(Item item){
|
||||
if (item instanceof Plant.Seed){
|
||||
return selectingFootwear == null || !selectingFootwear.seeds.contains(item.getClass());
|
||||
return !(curItem instanceof SandalsOfNature) ||
|
||||
!((SandalsOfNature) curItem).seeds.contains(item.getClass());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -91,14 +91,18 @@ public class WandOfFireblast extends DamageWand {
|
|||
for ( Char ch : affectedChars ){
|
||||
processSoulMark(ch, chargesPerCast());
|
||||
ch.damage(damageRoll(), this);
|
||||
Buff.affect( ch, Burning.class ).reignite( ch );
|
||||
switch(chargesPerCast()){
|
||||
case 1:
|
||||
break; //no effects
|
||||
case 2:
|
||||
Buff.affect(ch, Cripple.class, 4f); break;
|
||||
case 3:
|
||||
Buff.affect(ch, Paralysis.class, 4f); break;
|
||||
if (ch.isAlive()) {
|
||||
Buff.affect(ch, Burning.class).reignite(ch);
|
||||
switch (chargesPerCast()) {
|
||||
case 1:
|
||||
break; //no effects
|
||||
case 2:
|
||||
Buff.affect(ch, Cripple.class, 4f);
|
||||
break;
|
||||
case 3:
|
||||
Buff.affect(ch, Paralysis.class, 4f);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -139,6 +143,7 @@ public class WandOfFireblast extends DamageWand {
|
|||
bolt.path.get(dist/2),
|
||||
callback );
|
||||
Sample.INSTANCE.play( Assets.Sounds.ZAP );
|
||||
Sample.INSTANCE.play( Assets.Sounds.BURNING );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -63,11 +63,10 @@ public class Dart extends MissileWeapon {
|
|||
|
||||
@Override
|
||||
public void execute(Hero hero, String action) {
|
||||
super.execute(hero, action);
|
||||
if (action.equals(AC_TIP)){
|
||||
GameScene.selectItem(itemSelector, WndBag.Mode.SEED, Messages.get(this, "prompt"));
|
||||
}
|
||||
|
||||
super.execute(hero, action);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -72,6 +72,7 @@ public abstract class TippedDart extends Dart {
|
|||
|
||||
@Override
|
||||
public void execute(final Hero hero, String action) {
|
||||
super.execute(hero, action);
|
||||
if (action.equals( AC_CLEAN )){
|
||||
|
||||
GameScene.show(new WndOptions(Messages.get(this, "clean_title"),
|
||||
|
@ -100,7 +101,6 @@ public abstract class TippedDart extends Dart {
|
|||
});
|
||||
|
||||
}
|
||||
super.execute(hero, action);
|
||||
}
|
||||
|
||||
//exact same damage as regular darts, despite being higher tier.
|
||||
|
|
|
@ -571,9 +571,9 @@ public class NewPrisonBossLevel extends Level {
|
|||
PathFinder.buildDistanceMap(tenguPos, BArray.not(trapsPatch, null));
|
||||
//note that the effective range of fill is 40%-90%
|
||||
//so distance to tengu starts at 3-6 tiles and scales up to 7-8 as fill increases
|
||||
} while (PathFinder.distance[heroPos] > Math.ceil(4 + 4*fill)
|
||||
|| PathFinder.distance[heroPos] < Math.ceil(7*fill));
|
||||
|
||||
} while (((PathFinder.distance[heroPos] < Math.ceil(7*fill))
|
||||
|| (PathFinder.distance[heroPos] > Math.ceil(4 + 4*fill))));
|
||||
|
||||
PathFinder.setMapSize(width(), height());
|
||||
|
||||
for (int i = 0; i < trapsPatch.length; i++){
|
||||
|
|
|
@ -43,6 +43,7 @@ public class GitHubUpdates extends UpdateService {
|
|||
|
||||
if (!Game.platform.connectedToUnmeteredNetwork()){
|
||||
callback.onConnectionFailed();
|
||||
return;
|
||||
}
|
||||
|
||||
Net.HttpRequest httpGet = new Net.HttpRequest(Net.HttpMethods.GET);
|
||||
|
|
Loading…
Reference in New Issue
Block a user