cleaned up formatting:
- removed trailing whitespace - changed all leading whitespace to tabs - removed IDE created author comments
This commit is contained in:
@@ -30,7 +30,7 @@ public abstract class InventoryScroll extends Scroll {
|
||||
protected String inventoryTitle = "Select an item";
|
||||
protected WndBag.Mode mode = WndBag.Mode.ALL;
|
||||
|
||||
private static final String TXT_WARNING =
|
||||
private static final String TXT_WARNING =
|
||||
"Do you really want to cancel this scroll usage? " +
|
||||
"It will be consumed anyway.";
|
||||
private static final String TXT_YES = "Yes, I'm positive";
|
||||
|
||||
@@ -44,12 +44,12 @@ public abstract class Scroll extends Item {
|
||||
protected String initials;
|
||||
|
||||
private static final Class<?>[] scrolls = {
|
||||
ScrollOfIdentify.class,
|
||||
ScrollOfMagicMapping.class,
|
||||
ScrollOfRecharging.class,
|
||||
ScrollOfRemoveCurse.class,
|
||||
ScrollOfTeleportation.class,
|
||||
ScrollOfUpgrade.class,
|
||||
ScrollOfIdentify.class,
|
||||
ScrollOfMagicMapping.class,
|
||||
ScrollOfRecharging.class,
|
||||
ScrollOfRemoveCurse.class,
|
||||
ScrollOfTeleportation.class,
|
||||
ScrollOfUpgrade.class,
|
||||
ScrollOfRage.class,
|
||||
ScrollOfTerror.class,
|
||||
ScrollOfLullaby.class,
|
||||
@@ -57,20 +57,20 @@ public abstract class Scroll extends Item {
|
||||
ScrollOfPsionicBlast.class,
|
||||
ScrollOfMirrorImage.class
|
||||
};
|
||||
private static final String[] runes =
|
||||
private static final String[] runes =
|
||||
{"KAUNAN", "SOWILO", "LAGUZ", "YNGVI", "GYFU", "RAIDO", "ISAZ", "MANNAZ", "NAUDIZ", "BERKANAN", "ODAL", "TIWAZ"};
|
||||
private static final Integer[] images = {
|
||||
ItemSpriteSheet.SCROLL_KAUNAN,
|
||||
ItemSpriteSheet.SCROLL_SOWILO,
|
||||
ItemSpriteSheet.SCROLL_LAGUZ,
|
||||
ItemSpriteSheet.SCROLL_YNGVI,
|
||||
ItemSpriteSheet.SCROLL_GYFU,
|
||||
ItemSpriteSheet.SCROLL_RAIDO,
|
||||
ItemSpriteSheet.SCROLL_ISAZ,
|
||||
ItemSpriteSheet.SCROLL_MANNAZ,
|
||||
ItemSpriteSheet.SCROLL_NAUDIZ,
|
||||
ItemSpriteSheet.SCROLL_BERKANAN,
|
||||
ItemSpriteSheet.SCROLL_ODAL,
|
||||
ItemSpriteSheet.SCROLL_KAUNAN,
|
||||
ItemSpriteSheet.SCROLL_SOWILO,
|
||||
ItemSpriteSheet.SCROLL_LAGUZ,
|
||||
ItemSpriteSheet.SCROLL_YNGVI,
|
||||
ItemSpriteSheet.SCROLL_GYFU,
|
||||
ItemSpriteSheet.SCROLL_RAIDO,
|
||||
ItemSpriteSheet.SCROLL_ISAZ,
|
||||
ItemSpriteSheet.SCROLL_MANNAZ,
|
||||
ItemSpriteSheet.SCROLL_NAUDIZ,
|
||||
ItemSpriteSheet.SCROLL_BERKANAN,
|
||||
ItemSpriteSheet.SCROLL_ODAL,
|
||||
ItemSpriteSheet.SCROLL_TIWAZ};
|
||||
|
||||
private static ItemStatusHandler<Scroll> handler;
|
||||
@@ -80,7 +80,7 @@ public abstract class Scroll extends Item {
|
||||
public boolean ownedByBook = false;
|
||||
|
||||
{
|
||||
stackable = true;
|
||||
stackable = true;
|
||||
defaultAction = AC_READ;
|
||||
}
|
||||
|
||||
@@ -103,11 +103,11 @@ public abstract class Scroll extends Item {
|
||||
syncVisuals();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void syncVisuals(){
|
||||
image = handler.image( this );
|
||||
rune = handler.label( this );
|
||||
};
|
||||
@Override
|
||||
public void syncVisuals(){
|
||||
image = handler.image( this );
|
||||
rune = handler.label( this );
|
||||
};
|
||||
|
||||
@Override
|
||||
public ArrayList<String> actions( Hero hero ) {
|
||||
|
||||
@@ -32,7 +32,7 @@ public class ScrollOfIdentify extends InventoryScroll {
|
||||
inventoryTitle = "Select an item to identify";
|
||||
mode = WndBag.Mode.UNIDENTIFED;
|
||||
|
||||
bones = true;
|
||||
bones = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -45,11 +45,11 @@ public class ScrollOfLullaby extends Scroll {
|
||||
for (Mob mob : Dungeon.level.mobs.toArray( new Mob[0] )) {
|
||||
if (Level.fieldOfView[mob.pos]) {
|
||||
Buff.affect( mob, Drowsy.class );
|
||||
mob.sprite.centerEmitter().start( Speck.factory( Speck.NOTE ), 0.3f, 5 );
|
||||
mob.sprite.centerEmitter().start( Speck.factory( Speck.NOTE ), 0.3f, 5 );
|
||||
}
|
||||
}
|
||||
|
||||
Buff.affect( curUser, Drowsy.class );
|
||||
Buff.affect( curUser, Drowsy.class );
|
||||
|
||||
GLog.i( "The scroll utters a soothing melody. You feel very sleepy." );
|
||||
|
||||
|
||||
+1
-1
@@ -37,7 +37,7 @@ public class ScrollOfMagicalInfusion extends InventoryScroll {
|
||||
inventoryTitle = "Select an item to infuse";
|
||||
mode = WndBag.Mode.ENCHANTABLE;
|
||||
|
||||
bones = true;
|
||||
bones = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -74,7 +74,7 @@ public class ScrollOfMirrorImage extends Scroll {
|
||||
|
||||
@Override
|
||||
public String desc() {
|
||||
return
|
||||
return
|
||||
"The incantation on this scroll will create illusionary twins of the reader, which will chase his enemies.";
|
||||
}
|
||||
}
|
||||
|
||||
+6
-6
@@ -38,7 +38,7 @@ public class ScrollOfPsionicBlast extends Scroll {
|
||||
name = "Scroll of Psionic Blast";
|
||||
initials = "PB";
|
||||
|
||||
bones = true;
|
||||
bones = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -56,7 +56,7 @@ public class ScrollOfPsionicBlast extends Scroll {
|
||||
}
|
||||
|
||||
curUser.damage(Math.max(curUser.HT/5, curUser.HP/2), this);
|
||||
Buff.prolong( curUser, Paralysis.class, Random.Int( 4, 6 ) );
|
||||
Buff.prolong( curUser, Paralysis.class, Random.Int( 4, 6 ) );
|
||||
Buff.prolong( curUser, Blindness.class, Random.Int( 6, 9 ) );
|
||||
Dungeon.observe();
|
||||
|
||||
@@ -64,10 +64,10 @@ public class ScrollOfPsionicBlast extends Scroll {
|
||||
|
||||
curUser.spendAndNext( TIME_TO_READ );
|
||||
|
||||
if (!curUser.isAlive()) {
|
||||
Dungeon.fail( Utils.format(ResultDescriptions.ITEM, name ));
|
||||
GLog.n("The Psionic Blast tears your mind apart...");
|
||||
}
|
||||
if (!curUser.isAlive()) {
|
||||
Dungeon.fail( Utils.format(ResultDescriptions.ITEM, name ));
|
||||
GLog.n("The Psionic Blast tears your mind apart...");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -40,12 +40,12 @@ public class ScrollOfRage extends Scroll {
|
||||
@Override
|
||||
protected void doRead() {
|
||||
|
||||
for (Mob mob : Dungeon.level.mobs.toArray( new Mob[0] )) {
|
||||
mob.beckon( curUser.pos );
|
||||
if (Level.fieldOfView[mob.pos]) {
|
||||
Buff.prolong(mob, Amok.class, 5f);
|
||||
}
|
||||
}
|
||||
for (Mob mob : Dungeon.level.mobs.toArray( new Mob[0] )) {
|
||||
mob.beckon( curUser.pos );
|
||||
if (Level.fieldOfView[mob.pos]) {
|
||||
Buff.prolong(mob, Amok.class, 5f);
|
||||
}
|
||||
}
|
||||
|
||||
for (Heap heap : Dungeon.level.heaps.values()) {
|
||||
if (heap.type == Heap.Type.MIMIC) {
|
||||
@@ -60,7 +60,7 @@ public class ScrollOfRage extends Scroll {
|
||||
GLog.w( "The scroll emits an enraging roar that echoes throughout the dungeon!" );
|
||||
setKnown();
|
||||
|
||||
curUser.sprite.centerEmitter().start( Speck.factory( Speck.SCREAM ), 0.3f, 3 );
|
||||
curUser.sprite.centerEmitter().start( Speck.factory( Speck.SCREAM ), 0.3f, 3 );
|
||||
Sample.INSTANCE.play( Assets.SND_CHALLENGE );
|
||||
Invisibility.dispel();
|
||||
|
||||
@@ -69,7 +69,7 @@ public class ScrollOfRage extends Scroll {
|
||||
|
||||
@Override
|
||||
public String desc() {
|
||||
return
|
||||
return
|
||||
"When read aloud, this scroll will unleash a great roar " +
|
||||
"that draws all enemies to the reader, and enrages nearby ones.";
|
||||
}
|
||||
|
||||
@@ -30,9 +30,9 @@ import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
||||
|
||||
public class ScrollOfRemoveCurse extends Scroll {
|
||||
|
||||
private static final String TXT_PROCCED =
|
||||
private static final String TXT_PROCCED =
|
||||
"Your pack glows with a cleansing light, and a malevolent energy disperses.";
|
||||
private static final String TXT_NOT_PROCCED =
|
||||
private static final String TXT_NOT_PROCCED =
|
||||
"Your pack glows with a cleansing light, but nothing happens.";
|
||||
|
||||
{
|
||||
@@ -47,19 +47,19 @@ public class ScrollOfRemoveCurse extends Scroll {
|
||||
Sample.INSTANCE.play( Assets.SND_READ );
|
||||
Invisibility.dispel();
|
||||
|
||||
boolean procced = uncurse( curUser, curUser.belongings.backpack.items.toArray( new Item[0] ) );
|
||||
procced = uncurse( curUser,
|
||||
curUser.belongings.weapon,
|
||||
curUser.belongings.armor,
|
||||
boolean procced = uncurse( curUser, curUser.belongings.backpack.items.toArray( new Item[0] ) );
|
||||
procced = uncurse( curUser,
|
||||
curUser.belongings.weapon,
|
||||
curUser.belongings.armor,
|
||||
curUser.belongings.misc1,
|
||||
curUser.belongings.misc2) || procced;
|
||||
|
||||
Weakness.detach( curUser, Weakness.class );
|
||||
|
||||
if (procced) {
|
||||
GLog.p( TXT_PROCCED );
|
||||
} else {
|
||||
GLog.i( TXT_NOT_PROCCED );
|
||||
GLog.p( TXT_PROCCED );
|
||||
} else {
|
||||
GLog.i( TXT_NOT_PROCCED );
|
||||
}
|
||||
|
||||
setKnown();
|
||||
|
||||
+2
-2
@@ -29,10 +29,10 @@ import com.watabou.noosa.tweeners.AlphaTweener;
|
||||
|
||||
public class ScrollOfTeleportation extends Scroll {
|
||||
|
||||
public static final String TXT_TELEPORTED =
|
||||
public static final String TXT_TELEPORTED =
|
||||
"In a blink of an eye you were teleported to another location of the level.";
|
||||
|
||||
public static final String TXT_NO_TELEPORT =
|
||||
public static final String TXT_NO_TELEPORT =
|
||||
"Strong magic aura of this place prevents you from teleporting!";
|
||||
|
||||
{
|
||||
|
||||
@@ -36,7 +36,7 @@ public class ScrollOfUpgrade extends InventoryScroll {
|
||||
inventoryTitle = "Select an item to upgrade";
|
||||
mode = WndBag.Mode.UPGRADEABLE;
|
||||
|
||||
bones = true;
|
||||
bones = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user