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:
parent
69a26f86b4
commit
dc8f6a1dbf
|
@ -249,6 +249,8 @@ public class Preparation extends Buff implements ActionIndicator.Action {
|
||||||
AttackLevel lvl = AttackLevel.getLvl(turnsInvis);
|
AttackLevel lvl = AttackLevel.getLvl(turnsInvis);
|
||||||
|
|
||||||
boolean[] passable = Dungeon.level.passable.clone();
|
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);
|
PathFinder.buildDistanceMap(Dungeon.hero.pos, passable, lvl.blinkDistance+1);
|
||||||
if (PathFinder.distance[cell] == Integer.MAX_VALUE){
|
if (PathFinder.distance[cell] == Integer.MAX_VALUE){
|
||||||
GLog.w(Messages.get(Preparation.class, "out_of_reach"));
|
GLog.w(Messages.get(Preparation.class, "out_of_reach"));
|
||||||
|
|
|
@ -39,7 +39,7 @@ public class Stone extends Armor.Glyph {
|
||||||
|
|
||||||
float hitChance;
|
float hitChance;
|
||||||
if (evasion >= accuracy){
|
if (evasion >= accuracy){
|
||||||
hitChance = 1f - (1f - (accuracy/evasion))/2f;
|
hitChance = (accuracy/evasion)/2f;
|
||||||
} else {
|
} else {
|
||||||
hitChance = 1f - (evasion/accuracy)/2f;
|
hitChance = 1f - (evasion/accuracy)/2f;
|
||||||
}
|
}
|
||||||
|
|
|
@ -303,5 +303,21 @@ public class CloakOfShadows extends Artifact {
|
||||||
updateQuickslot();
|
updateQuickslot();
|
||||||
super.detach();
|
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 );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -197,7 +197,7 @@ public class TimekeepersHourglass extends Artifact {
|
||||||
if (bundle.contains( BUFF )){
|
if (bundle.contains( BUFF )){
|
||||||
Bundle buffBundle = bundle.getBundle( BUFF );
|
Bundle buffBundle = bundle.getBundle( BUFF );
|
||||||
|
|
||||||
if (buffBundle.contains( timeFreeze.PARTIALTIME ))
|
if (buffBundle.contains( timeFreeze.PRESSES ))
|
||||||
activeBuff = new timeFreeze();
|
activeBuff = new timeFreeze();
|
||||||
else
|
else
|
||||||
activeBuff = new timeStasis();
|
activeBuff = new timeStasis();
|
||||||
|
@ -290,15 +290,15 @@ public class TimekeepersHourglass extends Artifact {
|
||||||
type = buffType.POSITIVE;
|
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){
|
public void processTime(float time){
|
||||||
partialTime += time;
|
turnsToCost -= time;
|
||||||
|
|
||||||
while (partialTime >= 2f){
|
while (turnsToCost < 0f){
|
||||||
partialTime -= 2f;
|
turnsToCost += 2f;
|
||||||
charge --;
|
charge --;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -338,11 +338,6 @@ public class TimekeepersHourglass extends Artifact {
|
||||||
if (mob.paralysed <= 0) mob.sprite.remove(CharSprite.State.PARALYSED);
|
if (mob.paralysed <= 0) mob.sprite.remove(CharSprite.State.PARALYSED);
|
||||||
GameScene.freezeEmitters = false;
|
GameScene.freezeEmitters = false;
|
||||||
|
|
||||||
while (partialTime > 0f){
|
|
||||||
partialTime -= 2f;
|
|
||||||
charge --;
|
|
||||||
}
|
|
||||||
|
|
||||||
updateQuickslot();
|
updateQuickslot();
|
||||||
super.detach();
|
super.detach();
|
||||||
activeBuff = null;
|
activeBuff = null;
|
||||||
|
@ -351,7 +346,7 @@ public class TimekeepersHourglass extends Artifact {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final String PRESSES = "presses";
|
private static final String PRESSES = "presses";
|
||||||
private static final String PARTIALTIME = "partialtime";
|
private static final String TURNSTOCOST = "turnsToCost";
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void storeInBundle(Bundle bundle) {
|
public void storeInBundle(Bundle bundle) {
|
||||||
|
@ -362,7 +357,7 @@ public class TimekeepersHourglass extends Artifact {
|
||||||
values[i] = presses.get(i);
|
values[i] = presses.get(i);
|
||||||
bundle.put( PRESSES , values );
|
bundle.put( PRESSES , values );
|
||||||
|
|
||||||
bundle.put( PARTIALTIME , partialTime );
|
bundle.put( TURNSTOCOST , turnsToCost);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -373,7 +368,7 @@ public class TimekeepersHourglass extends Artifact {
|
||||||
for (int value : values)
|
for (int value : values)
|
||||||
presses.add(value);
|
presses.add(value);
|
||||||
|
|
||||||
partialTime = bundle.getFloat( PARTIALTIME );
|
turnsToCost = bundle.getFloat( TURNSTOCOST );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -226,6 +226,10 @@ public class WandOfCorruption extends Wand {
|
||||||
buff.detach();
|
buff.detach();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (enemy.alignment == Char.Alignment.ENEMY){
|
||||||
|
enemy.rollToDropLoot();
|
||||||
|
}
|
||||||
|
|
||||||
Buff.affect(enemy, Corruption.class);
|
Buff.affect(enemy, Corruption.class);
|
||||||
|
|
||||||
Statistics.enemiesSlain++;
|
Statistics.enemiesSlain++;
|
||||||
|
@ -237,9 +241,6 @@ public class WandOfCorruption extends Wand {
|
||||||
} else {
|
} else {
|
||||||
curUser.earnExp(0, enemy.getClass());
|
curUser.earnExp(0, enemy.getClass());
|
||||||
}
|
}
|
||||||
if (enemy.alignment == Char.Alignment.ENEMY){
|
|
||||||
enemy.rollToDropLoot();
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
Buff.affect(enemy, Doom.class);
|
Buff.affect(enemy, Doom.class);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user