v0.3.5: fixed quickslot issues with chains and beacon.
This commit is contained in:
parent
97365b1ecf
commit
c632b016f8
|
@ -35,6 +35,7 @@ import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.CellSelector;
|
import com.shatteredpixel.shatteredpixeldungeon.scenes.CellSelector;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.ui.QuickSlotButton;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
||||||
import com.watabou.utils.Callback;
|
import com.watabou.utils.Callback;
|
||||||
import com.watabou.utils.Random;
|
import com.watabou.utils.Random;
|
||||||
|
@ -71,10 +72,19 @@ public class EtherealChains extends Artifact {
|
||||||
|
|
||||||
curUser = hero;
|
curUser = hero;
|
||||||
|
|
||||||
if (!isEquipped( hero )) GLog.i( Messages.get(Artifact.class, "need_to_equip") );
|
if (!isEquipped( hero )) {
|
||||||
else if (charge < 1) GLog.i( Messages.get(this, "no_charge") );
|
GLog.i( Messages.get(Artifact.class, "need_to_equip") );
|
||||||
else if (cursed) GLog.w( Messages.get(this, "cursed") );
|
QuickSlotButton.cancel();
|
||||||
else {
|
|
||||||
|
} else if (charge < 1) {
|
||||||
|
GLog.i( Messages.get(this, "no_charge") );
|
||||||
|
QuickSlotButton.cancel();
|
||||||
|
|
||||||
|
} else if (cursed) {
|
||||||
|
GLog.w( Messages.get(this, "cursed") );
|
||||||
|
QuickSlotButton.cancel();
|
||||||
|
|
||||||
|
} else {
|
||||||
GameScene.selectCell(caster);
|
GameScene.selectCell(caster);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,6 @@
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||||
*/
|
*/
|
||||||
package com.shatteredpixel.shatteredpixeldungeon.items.artifacts;
|
package com.shatteredpixel.shatteredpixeldungeon.items.artifacts;
|
||||||
//If it weren't super obvious, this is going to become an artifact soon.
|
|
||||||
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||||
|
@ -41,6 +40,7 @@ import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.InterlevelScene;
|
import com.shatteredpixel.shatteredpixeldungeon.scenes.InterlevelScene;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite.Glowing;
|
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite.Glowing;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.ui.QuickSlotButton;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
||||||
import com.watabou.noosa.Game;
|
import com.watabou.noosa.Game;
|
||||||
import com.watabou.noosa.audio.Sample;
|
import com.watabou.noosa.audio.Sample;
|
||||||
|
@ -126,9 +126,15 @@ public class LloydsBeacon extends Artifact {
|
||||||
curUser = hero;
|
curUser = hero;
|
||||||
int chargesToUse = Dungeon.depth > 20 ? 2 : 1;
|
int chargesToUse = Dungeon.depth > 20 ? 2 : 1;
|
||||||
|
|
||||||
if (!isEquipped( hero )) GLog.i( Messages.get(Artifact.class, "need_to_equip") );
|
if (!isEquipped( hero )) {
|
||||||
else if (charge < chargesToUse) GLog.i( Messages.get(this, "no_charge") );
|
GLog.i( Messages.get(Artifact.class, "need_to_equip") );
|
||||||
else {
|
QuickSlotButton.cancel();
|
||||||
|
|
||||||
|
} else if (charge < chargesToUse) {
|
||||||
|
GLog.i( Messages.get(this, "no_charge") );
|
||||||
|
QuickSlotButton.cancel();
|
||||||
|
|
||||||
|
} else {
|
||||||
GameScene.selectCell(zapper);
|
GameScene.selectCell(zapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user