cleaned up formatting:

- removed trailing whitespace
- changed all leading whitespace to tabs
- removed IDE created author comments
This commit is contained in:
Evan Debenham
2015-06-12 16:22:26 -04:00
parent baa83b7e43
commit cebdff0221
335 changed files with 8555 additions and 8714 deletions
@@ -45,7 +45,7 @@ public class Armor extends EquipableItem {
private static final String TXT_TO_STRING = "%s :%d";
private static final String TXT_INCOMPATIBLE =
private static final String TXT_INCOMPATIBLE =
"Interaction of different types of magic has erased the glyph on this armor!";
public int tier;
@@ -107,7 +107,7 @@ public class Armor extends EquipableItem {
((HeroSprite)hero.sprite).updateArmor();
hero.spendAndNext( 2 * time2equip( hero ) );
hero.spendAndNext( 2 * time2equip( hero ) );
return true;
} else {
@@ -118,26 +118,26 @@ public class Armor extends EquipableItem {
}
}
@Override
protected float time2equip( Hero hero ) {
return hero.speed();
}
@Override
protected float time2equip( Hero hero ) {
return hero.speed();
}
@Override
public boolean doUnequip( Hero hero, boolean collect, boolean single ) {
if (super.doUnequip( hero, collect, single )) {
@Override
public boolean doUnequip( Hero hero, boolean collect, boolean single ) {
if (super.doUnequip( hero, collect, single )) {
hero.belongings.armor = null;
((HeroSprite)hero.sprite).updateArmor();
hero.belongings.armor = null;
((HeroSprite)hero.sprite).updateArmor();
return true;
return true;
} else {
} else {
return false;
return false;
}
}
}
}
@Override
public boolean isEquipped( Hero hero ) {
@@ -209,25 +209,25 @@ public class Armor extends EquipableItem {
StringBuilder info = new StringBuilder( desc() );
if (levelKnown) {
info.append(
info.append(
"\n\nThis " + name + " provides damage absorption up to " +
"" + Math.max( DR, 0 ) + " points per attack. " );
if (STR > Dungeon.hero.STR()) {
if (isEquipped( Dungeon.hero )) {
info.append(
info.append(
"\n\nBecause of your inadequate strength your " +
"movement speed and defense skill is decreased. " );
} else {
info.append(
info.append(
"\n\nBecause of your inadequate strength wearing this armor " +
"will decrease your movement speed and defense skill. " );
}
}
} else {
info.append(
info.append(
"\n\nTypical " + name + " provides damage absorption up to " + typicalDR() + " points per attack " +
" and requires " + typicalSTR() + " points of strength. " );
if (typicalSTR() > Dungeon.hero.STR()) {
@@ -240,8 +240,8 @@ public class Armor extends EquipableItem {
}
if (isEquipped( Dungeon.hero )) {
info.append( "\n\nYou are wearing the " + name +
(cursed ? ", and because it is cursed, you are powerless to remove it." : ".") );
info.append( "\n\nYou are wearing the " + name +
(cursed ? ", and because it is cursed, you are powerless to remove it." : ".") );
} else {
if (cursedKnown && cursed) {
info.append( "\n\nYou can feel a malevolent magic lurking within the " + name + "." );
@@ -306,18 +306,18 @@ public class Armor extends EquipableItem {
return price;
}
public Armor inscribe( Glyph glyph ) {
public Armor inscribe( Glyph glyph ) {
if (glyph != null && this.glyph == null) {
DR += tier;
} else if (glyph == null && this.glyph != null) {
DR -= tier;
}
if (glyph != null && this.glyph == null) {
DR += tier;
} else if (glyph == null && this.glyph != null) {
DR -= tier;
}
this.glyph = glyph;
this.glyph = glyph;
return this;
}
return this;
}
public Armor inscribe() {
@@ -341,8 +341,8 @@ public class Armor extends EquipableItem {
public static abstract class Glyph implements Bundlable {
private static final Class<?>[] glyphs = new Class<?>[]{
Bounce.class, Affection.class, AntiEntropy.class, Multiplicity.class,
private static final Class<?>[] glyphs = new Class<?>[]{
Bounce.class, Affection.class, AntiEntropy.class, Multiplicity.class,
Potential.class, Metabolism.class, Stench.class, Viscosity.class,
Displacement.class, Entanglement.class };
@@ -359,11 +359,11 @@ public class Armor extends EquipableItem {
}
@Override
public void restoreFromBundle( Bundle bundle ) {
public void restoreFromBundle( Bundle bundle ) {
}
@Override
public void storeInBundle( Bundle bundle ) {
public void storeInBundle( Bundle bundle ) {
}
public ItemSprite.Glowing glowing() {
@@ -34,7 +34,7 @@ abstract public class ClassArmor extends Armor {
cursedKnown = true;
defaultAction = special();
bones = false;
bones = false;
}
public ClassArmor() {
@@ -108,8 +108,8 @@ abstract public class ClassArmor extends Armor {
doSpecial();
}
} else {
super.execute( hero, action );
} else {
super.execute( hero, action );
}
}
@@ -22,11 +22,11 @@ import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
public class ClothArmor extends Armor {
{
{
name = "cloth armor";
image = ItemSpriteSheet.ARMOR_CLOTH;
bones = false; //Finding them in bones would be semi-frequent and disappointing.
bones = false; //Finding them in bones would be semi-frequent and disappointing.
}
public ClothArmor() {
@@ -36,7 +36,7 @@ public class HuntressArmor extends ClassArmor {
private static final String TXT_NO_ENEMIES = "No enemies in sight";
private static final String TXT_NOT_HUNTRESS = "Only huntresses can use this armor!";
private static final String AC_SPECIAL = "SPECTRAL BLADES";
private static final String AC_SPECIAL = "SPECTRAL BLADES";
{
name = "huntress cloak";
@@ -58,7 +58,7 @@ public class HuntressArmor extends ClassArmor {
for (Mob mob : Dungeon.level.mobs) {
if (Level.fieldOfView[mob.pos]) {
Callback callback = new Callback() {
Callback callback = new Callback() {
@Override
public void call() {
curUser.attack( targets.get( this ) );
@@ -22,7 +22,7 @@ import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
public class LeatherArmor extends Armor {
{
{
name = "leather armor";
image = ItemSpriteSheet.ARMOR_LEATHER;
}
@@ -32,9 +32,9 @@ import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
public class MageArmor extends ClassArmor {
public class MageArmor extends ClassArmor {
private static final String AC_SPECIAL = "MOLTEN EARTH";
private static final String AC_SPECIAL = "MOLTEN EARTH";
private static final String TXT_NOT_MAGE = "Only mages can use this armor!";
@@ -56,7 +56,7 @@ public class MageArmor extends ClassArmor {
}
@Override
public void doSpecial() {
public void doSpecial() {
for (Mob mob : Dungeon.level.mobs) {
if (Level.fieldOfView[mob.pos]) {
@@ -65,7 +65,7 @@ public class MageArmor extends ClassArmor {
}
}
curUser.HP -= (curUser.HP / 3);
curUser.HP -= (curUser.HP / 3);
curUser.spend( Actor.TICK );
curUser.sprite.operate( curUser.pos );
@@ -33,7 +33,7 @@ public class MailArmor extends Armor {
@Override
public String desc() {
return
return
"Interlocking metal links make for a tough but flexible suit of armor.";
}
}
@@ -33,7 +33,7 @@ public class PlateArmor extends Armor {
@Override
public String desc() {
return
return
"Enormous plates of metal are joined together into a suit that provides " +
"unmatched protection to any adventurer strong enough to bear its staggering weight.";
}
@@ -40,7 +40,7 @@ public class RogueArmor extends ClassArmor {
private static final String TXT_FOV = "You can only jump to an empty location in your field of view";
private static final String TXT_NOT_ROGUE = "Only rogues can use this armor!";
private static final String AC_SPECIAL = "SMOKE BOMB";
private static final String AC_SPECIAL = "SMOKE BOMB";
{
name = "rogue garb";
@@ -53,7 +53,7 @@ public class RogueArmor extends ClassArmor {
}
@Override
public void doSpecial() {
public void doSpecial() {
GameScene.selectCell( teleporter );
}
@@ -69,7 +69,7 @@ public class RogueArmor extends ClassArmor {
@Override
public String desc() {
return
return
"Wearing this dark garb, a rogue can perform a trick, that is called \"smoke bomb\" " +
"(though no real explosives are used): he blinds enemies who could see him and jumps aside.";
}
@@ -80,15 +80,15 @@ public class RogueArmor extends ClassArmor {
public void onSelect( Integer target ) {
if (target != null) {
if (!Level.fieldOfView[target] ||
!(Level.passable[target] || Level.avoid[target]) ||
if (!Level.fieldOfView[target] ||
!(Level.passable[target] || Level.avoid[target]) ||
Actor.findChar( target ) != null) {
GLog.w( TXT_FOV );
return;
}
curUser.HP -= (curUser.HP / 3);
curUser.HP -= (curUser.HP / 3);
for (Mob mob : Dungeon.level.mobs) {
if (Level.fieldOfView[mob.pos]) {
@@ -33,7 +33,7 @@ public class ScaleArmor extends Armor {
@Override
public String desc() {
return
return
"The metal scales sewn onto a leather vest create a flexible, yet protective armor.";
}
}
@@ -41,7 +41,7 @@ public class WarriorArmor extends ClassArmor {
private static int LEAP_TIME = 1;
private static int SHOCK_TIME = 3;
private static final String AC_SPECIAL = "HEROIC LEAP";
private static final String AC_SPECIAL = "HEROIC LEAP";
private static final String TXT_NOT_WARRIOR = "Only warriors can use this armor!";
@@ -91,35 +91,35 @@ public class WarriorArmor extends ClassArmor {
cell = route.path.get(route.dist-1);
curUser.HP -= (curUser.HP / 3);
curUser.HP -= (curUser.HP / 3);
if (curUser.subClass == HeroSubClass.BERSERKER && curUser.HP <= curUser.HT * Fury.LEVEL) {
Buff.affect( curUser, Fury.class );
}
final int dest = cell;
curUser.busy();
curUser.sprite.jump(curUser.pos, cell, new Callback() {
@Override
public void call() {
curUser.move(dest);
Dungeon.level.press(dest, curUser);
Dungeon.observe();
final int dest = cell;
curUser.busy();
curUser.sprite.jump(curUser.pos, cell, new Callback() {
@Override
public void call() {
curUser.move(dest);
Dungeon.level.press(dest, curUser);
Dungeon.observe();
for (int i = 0; i < Level.NEIGHBOURS8.length; i++) {
Char mob = Actor.findChar(curUser.pos + Level.NEIGHBOURS8[i]);
if (mob != null && mob != curUser) {
Buff.prolong(mob, Paralysis.class, SHOCK_TIME);
}
}
for (int i = 0; i < Level.NEIGHBOURS8.length; i++) {
Char mob = Actor.findChar(curUser.pos + Level.NEIGHBOURS8[i]);
if (mob != null && mob != curUser) {
Buff.prolong(mob, Paralysis.class, SHOCK_TIME);
}
}
CellEmitter.center(dest).burst(Speck.factory(Speck.DUST), 10);
Camera.main.shake(2, 0.5f);
CellEmitter.center(dest).burst(Speck.factory(Speck.DUST), 10);
Camera.main.shake(2, 0.5f);
curUser.spendAndNext(LEAP_TIME);
}
});
curUser.spendAndNext(LEAP_TIME);
}
});
}
}