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
|
@Override
|
||||||
public float iconFadePercent() {
|
public float iconFadePercent() {
|
||||||
if (AttackLevel.getLvl(turnsInvis) == AttackLevel.LVL_4){
|
AttackLevel level = AttackLevel.getLvl(turnsInvis);
|
||||||
|
if (level == AttackLevel.LVL_4){
|
||||||
return 0;
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
float turnsForCur = AttackLevel.getLvl(turnsInvis).turnsReq;
|
float turnsForCur = level.turnsReq;
|
||||||
float turnsForNext = AttackLevel.values()[AttackLevel.getLvl(turnsInvis).ordinal()+1].turnsReq;
|
float turnsForNext = AttackLevel.values()[level.ordinal()+1].turnsReq;
|
||||||
turnsForNext -= turnsForCur;
|
turnsForNext -= turnsForCur;
|
||||||
float turnsToNext = turnsInvis - turnsForCur;
|
float turnsToNext = turnsInvis - turnsForCur;
|
||||||
return Math.min(1, (turnsForNext - turnsToNext)/(turnsForNext));
|
return Math.min(1, (turnsForNext - turnsToNext)/(turnsForNext));
|
||||||
|
|
|
@ -244,7 +244,9 @@ public class NewTengu extends Mob {
|
||||||
|
|
||||||
do {
|
do {
|
||||||
newPos = ((NewPrisonBossLevel)Dungeon.level).randomTenguCellPos();
|
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 );
|
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.solid[newPos] ||
|
||||||
level.distance(newPos, enemy.pos) < 5 ||
|
level.distance(newPos, enemy.pos) < 5 ||
|
||||||
level.distance(newPos, enemy.pos) > 7 ||
|
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 ||
|
level.distance(newPos, pos) < 6 ||
|
||||||
Actor.findChar(newPos) != null ||
|
Actor.findChar(newPos) != null ||
|
||||||
Dungeon.level.heaps.get(newPos) != null);
|
Dungeon.level.heaps.get(newPos) != null);
|
||||||
|
|
|
@ -246,6 +246,7 @@ public class Blacksmith extends NPC {
|
||||||
}
|
}
|
||||||
Dungeon.hero.spendAndNext( 2f );
|
Dungeon.hero.spendAndNext( 2f );
|
||||||
Badges.validateItemLevelAquired( first );
|
Badges.validateItemLevelAquired( first );
|
||||||
|
Item.updateQuickslot();
|
||||||
|
|
||||||
Quest.reforged = true;
|
Quest.reforged = true;
|
||||||
|
|
||||||
|
|
|
@ -78,9 +78,7 @@ public class SandalsOfNature extends Artifact {
|
||||||
|
|
||||||
if (action.equals(AC_FEED)){
|
if (action.equals(AC_FEED)){
|
||||||
|
|
||||||
selectingFootwear = this;
|
|
||||||
GameScene.selectItem(itemSelector, mode, Messages.get(this, "prompt"));
|
GameScene.selectItem(itemSelector, mode, Messages.get(this, "prompt"));
|
||||||
selectingFootwear = null;
|
|
||||||
|
|
||||||
} else if (action.equals(AC_ROOT) && level() > 0){
|
} else if (action.equals(AC_ROOT) && level() > 0){
|
||||||
|
|
||||||
|
@ -140,11 +138,10 @@ public class SandalsOfNature extends Artifact {
|
||||||
return super.upgrade();
|
return super.upgrade();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static SandalsOfNature selectingFootwear = null;
|
|
||||||
|
|
||||||
public static boolean canUseSeed(Item item){
|
public static boolean canUseSeed(Item item){
|
||||||
if (item instanceof Plant.Seed){
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -91,14 +91,18 @@ public class WandOfFireblast extends DamageWand {
|
||||||
for ( Char ch : affectedChars ){
|
for ( Char ch : affectedChars ){
|
||||||
processSoulMark(ch, chargesPerCast());
|
processSoulMark(ch, chargesPerCast());
|
||||||
ch.damage(damageRoll(), this);
|
ch.damage(damageRoll(), this);
|
||||||
Buff.affect( ch, Burning.class ).reignite( ch );
|
if (ch.isAlive()) {
|
||||||
switch(chargesPerCast()){
|
Buff.affect(ch, Burning.class).reignite(ch);
|
||||||
case 1:
|
switch (chargesPerCast()) {
|
||||||
break; //no effects
|
case 1:
|
||||||
case 2:
|
break; //no effects
|
||||||
Buff.affect(ch, Cripple.class, 4f); break;
|
case 2:
|
||||||
case 3:
|
Buff.affect(ch, Cripple.class, 4f);
|
||||||
Buff.affect(ch, Paralysis.class, 4f); break;
|
break;
|
||||||
|
case 3:
|
||||||
|
Buff.affect(ch, Paralysis.class, 4f);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -139,6 +143,7 @@ public class WandOfFireblast extends DamageWand {
|
||||||
bolt.path.get(dist/2),
|
bolt.path.get(dist/2),
|
||||||
callback );
|
callback );
|
||||||
Sample.INSTANCE.play( Assets.Sounds.ZAP );
|
Sample.INSTANCE.play( Assets.Sounds.ZAP );
|
||||||
|
Sample.INSTANCE.play( Assets.Sounds.BURNING );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -63,11 +63,10 @@ public class Dart extends MissileWeapon {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void execute(Hero hero, String action) {
|
public void execute(Hero hero, String action) {
|
||||||
|
super.execute(hero, action);
|
||||||
if (action.equals(AC_TIP)){
|
if (action.equals(AC_TIP)){
|
||||||
GameScene.selectItem(itemSelector, WndBag.Mode.SEED, Messages.get(this, "prompt"));
|
GameScene.selectItem(itemSelector, WndBag.Mode.SEED, Messages.get(this, "prompt"));
|
||||||
}
|
}
|
||||||
|
|
||||||
super.execute(hero, action);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -72,6 +72,7 @@ public abstract class TippedDart extends Dart {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void execute(final Hero hero, String action) {
|
public void execute(final Hero hero, String action) {
|
||||||
|
super.execute(hero, action);
|
||||||
if (action.equals( AC_CLEAN )){
|
if (action.equals( AC_CLEAN )){
|
||||||
|
|
||||||
GameScene.show(new WndOptions(Messages.get(this, "clean_title"),
|
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.
|
//exact same damage as regular darts, despite being higher tier.
|
||||||
|
|
|
@ -571,8 +571,8 @@ public class NewPrisonBossLevel extends Level {
|
||||||
PathFinder.buildDistanceMap(tenguPos, BArray.not(trapsPatch, null));
|
PathFinder.buildDistanceMap(tenguPos, BArray.not(trapsPatch, null));
|
||||||
//note that the effective range of fill is 40%-90%
|
//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
|
//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)
|
} while (((PathFinder.distance[heroPos] < Math.ceil(7*fill))
|
||||||
|| PathFinder.distance[heroPos] < Math.ceil(7*fill));
|
|| (PathFinder.distance[heroPos] > Math.ceil(4 + 4*fill))));
|
||||||
|
|
||||||
PathFinder.setMapSize(width(), height());
|
PathFinder.setMapSize(width(), height());
|
||||||
|
|
||||||
|
|
|
@ -43,6 +43,7 @@ public class GitHubUpdates extends UpdateService {
|
||||||
|
|
||||||
if (!Game.platform.connectedToUnmeteredNetwork()){
|
if (!Game.platform.connectedToUnmeteredNetwork()){
|
||||||
callback.onConnectionFailed();
|
callback.onConnectionFailed();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Net.HttpRequest httpGet = new Net.HttpRequest(Net.HttpMethods.GET);
|
Net.HttpRequest httpGet = new Net.HttpRequest(Net.HttpMethods.GET);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user