v0.2.3f: corrected quickslot refresh logic across items
This commit is contained in:
@@ -4,7 +4,6 @@ import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.QuickSlotButton;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
||||
import com.watabou.utils.Random;
|
||||
|
||||
@@ -60,7 +59,7 @@ public class CapeOfThorns extends Artifact {
|
||||
BuffIndicator.refreshHero();
|
||||
GLog.w("Your Cape becomes inert again.");
|
||||
}
|
||||
QuickSlotButton.refresh();
|
||||
updateQuickslot();
|
||||
}
|
||||
spend(TICK);
|
||||
return true;
|
||||
@@ -92,7 +91,7 @@ public class CapeOfThorns extends Artifact {
|
||||
}
|
||||
|
||||
}
|
||||
QuickSlotButton.refresh();
|
||||
updateQuickslot();
|
||||
return damage;
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,6 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.QuickSlotButton;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
||||
import com.watabou.noosa.audio.Sample;
|
||||
import com.watabou.noosa.tweeners.AlphaTweener;
|
||||
@@ -185,7 +184,7 @@ public class CloakOfShadows extends Artifact {
|
||||
if (cooldown > 0)
|
||||
cooldown --;
|
||||
|
||||
QuickSlotButton.refresh();
|
||||
updateQuickslot();
|
||||
|
||||
spend( TICK );
|
||||
|
||||
@@ -227,7 +226,7 @@ public class CloakOfShadows extends Artifact {
|
||||
GLog.p("Your Cloak Grows Stronger!");
|
||||
}
|
||||
|
||||
QuickSlotButton.refresh();
|
||||
updateQuickslot();
|
||||
|
||||
spend( TICK );
|
||||
|
||||
@@ -247,7 +246,7 @@ public class CloakOfShadows extends Artifact {
|
||||
cooldown = 10 - (level / 3);
|
||||
|
||||
|
||||
QuickSlotButton.refresh();
|
||||
updateQuickslot();
|
||||
super.detach();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,6 @@ import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.GhostSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.QuickSlotButton;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.windows.WndQuest;
|
||||
import com.watabou.noosa.audio.Sample;
|
||||
@@ -106,6 +105,8 @@ public class DriedRose extends Artifact {
|
||||
|
||||
spawned = true;
|
||||
charge = 0;
|
||||
updateQuickslot();
|
||||
|
||||
} else
|
||||
GLog.i("There is no free space near you.");
|
||||
}
|
||||
@@ -211,7 +212,7 @@ public class DriedRose extends Artifact {
|
||||
|
||||
}
|
||||
|
||||
QuickSlotButton.refresh();
|
||||
updateQuickslot();
|
||||
|
||||
spend( TICK );
|
||||
|
||||
|
||||
@@ -175,6 +175,8 @@ public class HornOfPlenty extends Artifact {
|
||||
GLog.p("Your horn is full of food!");
|
||||
partialCharge = 0;
|
||||
}
|
||||
|
||||
updateQuickslot();
|
||||
}
|
||||
} else
|
||||
partialCharge = 0;
|
||||
|
||||
@@ -74,6 +74,7 @@ public class SandalsOfNature extends Artifact {
|
||||
CellEmitter.bottom(hero.pos).start(EarthParticle.FACTORY, 0.05f, 8);
|
||||
Camera.main.shake(1, 0.4f);
|
||||
charge = 0;
|
||||
updateQuickslot();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -177,6 +178,7 @@ public class SandalsOfNature extends Artifact {
|
||||
if (charge < target.HT){
|
||||
//gain 1+(1*level)% of the difference between current charge and max HP.
|
||||
charge+= (Math.round( (target.HT-charge) * (.01+ level*0.01) ));
|
||||
updateQuickslot();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+4
-5
@@ -10,7 +10,6 @@ import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.QuickSlotButton;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.windows.WndOptions;
|
||||
import com.watabou.noosa.audio.Sample;
|
||||
@@ -202,7 +201,7 @@ public class TimekeepersHourglass extends Artifact {
|
||||
} else if (cursed && Random.Int(10) == 0)
|
||||
((Hero) target).spend( TICK );
|
||||
|
||||
QuickSlotButton.refresh();
|
||||
updateQuickslot();
|
||||
|
||||
spend( TICK );
|
||||
|
||||
@@ -226,7 +225,7 @@ public class TimekeepersHourglass extends Artifact {
|
||||
|
||||
target.invisible++;
|
||||
|
||||
QuickSlotButton.refresh();
|
||||
updateQuickslot();
|
||||
|
||||
Dungeon.observe();
|
||||
|
||||
@@ -263,7 +262,7 @@ public class TimekeepersHourglass extends Artifact {
|
||||
charge --;
|
||||
}
|
||||
|
||||
QuickSlotButton.refresh();
|
||||
updateQuickslot();
|
||||
|
||||
if (charge <= 0){
|
||||
detach();
|
||||
@@ -302,7 +301,7 @@ public class TimekeepersHourglass extends Artifact {
|
||||
GameScene.freezeEmitters = false;
|
||||
|
||||
charge = 0;
|
||||
QuickSlotButton.refresh();
|
||||
updateQuickslot();
|
||||
super.detach();
|
||||
activeBuff = null;
|
||||
}
|
||||
|
||||
@@ -13,7 +13,6 @@ import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfMagicMappi
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfRemoveCurse;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.QuickSlotButton;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.windows.WndBag;
|
||||
import com.watabou.noosa.audio.Sample;
|
||||
@@ -197,7 +196,7 @@ public class UnstableSpellbook extends Artifact {
|
||||
}
|
||||
}
|
||||
|
||||
QuickSlotButton.refresh();
|
||||
updateQuickslot();
|
||||
|
||||
spend( TICK );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user