v0.7.2d: bugfixes:

- fixed assassin blink not working on targets standing on traps
- fixed glyph of stone seriously over-calculating hit chance when evasion is greater than accuracy
- fixed cloak of shadows not saving turns until charge cost
- adjusted timekeeper's hourglass charges to behave like cloak of shadows charges
- fixed corrupted enemies never dropping loot
This commit is contained in:
Evan Debenham 2019-04-26 16:36:25 -04:00
parent 69a26f86b4
commit dc8f6a1dbf
5 changed files with 32 additions and 18 deletions

View File

@ -249,6 +249,8 @@ public class Preparation extends Buff implements ActionIndicator.Action {
AttackLevel lvl = AttackLevel.getLvl(turnsInvis);
boolean[] passable = Dungeon.level.passable.clone();
//need to consider enemy cell as passable in case they are on a trap or chasm
passable[cell] = true;
PathFinder.buildDistanceMap(Dungeon.hero.pos, passable, lvl.blinkDistance+1);
if (PathFinder.distance[cell] == Integer.MAX_VALUE){
GLog.w(Messages.get(Preparation.class, "out_of_reach"));

View File

@ -39,7 +39,7 @@ public class Stone extends Armor.Glyph {
float hitChance;
if (evasion >= accuracy){
hitChance = 1f - (1f - (accuracy/evasion))/2f;
hitChance = (accuracy/evasion)/2f;
} else {
hitChance = 1f - (evasion/accuracy)/2f;
}

View File

@ -303,5 +303,21 @@ public class CloakOfShadows extends Artifact {
updateQuickslot();
super.detach();
}
private static final String TURNSTOCOST = "turnsToCost";
@Override
public void storeInBundle(Bundle bundle) {
super.storeInBundle(bundle);
bundle.put( TURNSTOCOST , turnsToCost);
}
@Override
public void restoreFromBundle(Bundle bundle) {
super.restoreFromBundle(bundle);
turnsToCost = bundle.getInt( TURNSTOCOST );
}
}
}

View File

@ -197,7 +197,7 @@ public class TimekeepersHourglass extends Artifact {
if (bundle.contains( BUFF )){
Bundle buffBundle = bundle.getBundle( BUFF );
if (buffBundle.contains( timeFreeze.PARTIALTIME ))
if (buffBundle.contains( timeFreeze.PRESSES ))
activeBuff = new timeFreeze();
else
activeBuff = new timeStasis();
@ -290,15 +290,15 @@ public class TimekeepersHourglass extends Artifact {
type = buffType.POSITIVE;
}
float partialTime = 0f;
float turnsToCost = 0f;
ArrayList<Integer> presses = new ArrayList<Integer>();
ArrayList<Integer> presses = new ArrayList<>();
public void processTime(float time){
partialTime += time;
turnsToCost -= time;
while (partialTime >= 2f){
partialTime -= 2f;
while (turnsToCost < 0f){
turnsToCost += 2f;
charge --;
}
@ -337,11 +337,6 @@ public class TimekeepersHourglass extends Artifact {
for (Mob mob : Dungeon.level.mobs.toArray(new Mob[0]))
if (mob.paralysed <= 0) mob.sprite.remove(CharSprite.State.PARALYSED);
GameScene.freezeEmitters = false;
while (partialTime > 0f){
partialTime -= 2f;
charge --;
}
updateQuickslot();
super.detach();
@ -351,7 +346,7 @@ public class TimekeepersHourglass extends Artifact {
}
private static final String PRESSES = "presses";
private static final String PARTIALTIME = "partialtime";
private static final String TURNSTOCOST = "turnsToCost";
@Override
public void storeInBundle(Bundle bundle) {
@ -362,7 +357,7 @@ public class TimekeepersHourglass extends Artifact {
values[i] = presses.get(i);
bundle.put( PRESSES , values );
bundle.put( PARTIALTIME , partialTime );
bundle.put( TURNSTOCOST , turnsToCost);
}
@Override
@ -373,7 +368,7 @@ public class TimekeepersHourglass extends Artifact {
for (int value : values)
presses.add(value);
partialTime = bundle.getFloat( PARTIALTIME );
turnsToCost = bundle.getFloat( TURNSTOCOST );
}
}

View File

@ -226,6 +226,10 @@ public class WandOfCorruption extends Wand {
buff.detach();
}
}
if (enemy.alignment == Char.Alignment.ENEMY){
enemy.rollToDropLoot();
}
Buff.affect(enemy, Corruption.class);
Statistics.enemiesSlain++;
@ -237,9 +241,6 @@ public class WandOfCorruption extends Wand {
} else {
curUser.earnExp(0, enemy.getClass());
}
if (enemy.alignment == Char.Alignment.ENEMY){
enemy.rollToDropLoot();
}
} else {
Buff.affect(enemy, Doom.class);
}