v0.9.1: fixed various minor errors relating to time freeze interactions

This commit is contained in:
Evan Debenham 2020-10-21 13:55:39 -04:00
parent 989c524e33
commit dd9e25308b
3 changed files with 11 additions and 9 deletions

View File

@ -309,7 +309,8 @@ public class TimekeepersHourglass extends Artifact {
public void processTime(float time){
turnsToCost -= time;
while (turnsToCost < 0f){
//use 1/1,000 to account for rounding errors
while (turnsToCost < -0.001f){
turnsToCost += 2f;
charge --;
}

View File

@ -99,8 +99,9 @@ public class Swiftthistle extends Plant {
public void processTime(float time){
left -= time;
if (left <= 0){
//use 1/1,000 to account for rounding errors
while (left < -0.001f){
detach();
}

View File

@ -171,11 +171,11 @@ public class WndTradeItem extends WndInfoItem {
return;
}
item.detachAll( hero.belongings.backpack );
new Gold( item.value() ).doPickUp( hero );
//selling items in the sell interface doesn't spend time
hero.spend(-hero.cooldown());
new Gold( item.value() ).doPickUp( hero );
}
private void sellOne( Item item ) {
@ -187,11 +187,11 @@ public class WndTradeItem extends WndInfoItem {
Hero hero = Dungeon.hero;
item = item.detach( hero.belongings.backpack );
new Gold( item.value() ).doPickUp( hero );
//selling items in the sell interface doesn't spend time
hero.spend(-hero.cooldown());
new Gold( item.value() ).doPickUp( hero );
}
}