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
@@ -31,48 +31,48 @@ import java.util.Iterator;
public class AlchemyPot {
private static final String TXT_SELECT_SEED = "Select a seed to throw";
private static final String TXT_POT = "Alchemy Pot";
private static final String TXT_FRUIT = "Cook a Blandfruit";
private static final String TXT_POTION = "Brew a Potion";
private static final String TXT_OPTIONS =
"Do you want to cook a Blandfruit with a seed, or brew a Potion from seeds?";
private static final String TXT_POT = "Alchemy Pot";
private static final String TXT_FRUIT = "Cook a Blandfruit";
private static final String TXT_POTION = "Brew a Potion";
private static final String TXT_OPTIONS =
"Do you want to cook a Blandfruit with a seed, or brew a Potion from seeds?";
public static Hero hero;
public static int pos;
public static boolean foundFruit;
public static Item curItem = null;
public static boolean foundFruit;
public static Item curItem = null;
public static void operate( Hero hero, int pos ) {
AlchemyPot.hero = hero;
AlchemyPot.pos = pos;
Iterator<Item> items = hero.belongings.iterator();
foundFruit = false;
Heap heap = Dungeon.level.heaps.get( pos );
Iterator<Item> items = hero.belongings.iterator();
foundFruit = false;
Heap heap = Dungeon.level.heaps.get( pos );
if (heap == null)
while (items.hasNext() && !foundFruit){
curItem = items.next();
if (curItem instanceof Blandfruit && ((Blandfruit) curItem).potionAttrib == null){
GameScene.show(
new WndOptions(TXT_POT, TXT_OPTIONS, TXT_FRUIT, TXT_POTION) {
@Override
protected void onSelect(int index) {
if (index == 0) {
curItem.cast( AlchemyPot.hero, AlchemyPot.pos );
} else
GameScene.selectItem(itemSelector, WndBag.Mode.SEED, TXT_SELECT_SEED);
}
}
);
foundFruit = true;
}
}
if (heap == null)
while (items.hasNext() && !foundFruit){
curItem = items.next();
if (curItem instanceof Blandfruit && ((Blandfruit) curItem).potionAttrib == null){
GameScene.show(
new WndOptions(TXT_POT, TXT_OPTIONS, TXT_FRUIT, TXT_POTION) {
@Override
protected void onSelect(int index) {
if (index == 0) {
curItem.cast( AlchemyPot.hero, AlchemyPot.pos );
} else
GameScene.selectItem(itemSelector, WndBag.Mode.SEED, TXT_SELECT_SEED);
}
}
);
foundFruit = true;
}
}
if (!foundFruit)
GameScene.selectItem(itemSelector, WndBag.Mode.SEED, TXT_SELECT_SEED);
if (!foundFruit)
GameScene.selectItem(itemSelector, WndBag.Mode.SEED, TXT_SELECT_SEED);
}
private static final WndBag.Listener itemSelector = new WndBag.Listener() {
@@ -45,13 +45,13 @@ public class Chasm {
private static final String TXT_CHASM = "Chasm";
private static final String TXT_YES = "Yes, I know what I'm doing";
private static final String TXT_NO = "No, I changed my mind";
private static final String TXT_JUMP =
private static final String TXT_JUMP =
"Do you really want to jump into the chasm? You can probably die.";
public static boolean jumpConfirmed = false;
public static void heroJump( final Hero hero ) {
GameScene.show(
GameScene.show(
new WndOptions( TXT_CHASM, TXT_JUMP, TXT_YES, TXT_NO ) {
@Override
protected void onSelect( int index ) {
@@ -73,8 +73,8 @@ public class Chasm {
Buff buff = Dungeon.hero.buff(TimekeepersHourglass.timeFreeze.class);
if (buff != null) buff.detach();
for (Mob mob : Dungeon.level.mobs.toArray( new Mob[0] ))
if (mob instanceof DriedRose.GhostHero) mob.destroy();
for (Mob mob : Dungeon.level.mobs.toArray( new Mob[0] ))
if (mob instanceof DriedRose.GhostHero) mob.destroy();
if (Dungeon.hero.isAlive()) {
Dungeon.hero.interrupt();
@@ -44,41 +44,41 @@ public class HighGrass {
Level.set( pos, Terrain.GRASS );
GameScene.updateMap( pos );
if (!Dungeon.isChallenged( Challenges.NO_HERBALISM )) {
int naturalismLevel = 0;
if (!Dungeon.isChallenged( Challenges.NO_HERBALISM )) {
int naturalismLevel = 0;
if (ch != null) {
SandalsOfNature.Naturalism naturalism = ch.buff( SandalsOfNature.Naturalism.class );
if (naturalism != null) {
if (!naturalism.isCursed()) {
naturalismLevel = naturalism.level() + 1;
naturalism.charge();
} else {
naturalismLevel = -1;
}
}
}
if (ch != null) {
SandalsOfNature.Naturalism naturalism = ch.buff( SandalsOfNature.Naturalism.class );
if (naturalism != null) {
if (!naturalism.isCursed()) {
naturalismLevel = naturalism.level() + 1;
naturalism.charge();
} else {
naturalismLevel = -1;
}
}
}
if (naturalismLevel >= 0) {
// Seed, scales from 1/16 to 1/4
if (Random.Int(16 - ((int) (naturalismLevel * 3))) == 0) {
Item seed = Generator.random(Generator.Category.SEED);
if (naturalismLevel >= 0) {
// Seed, scales from 1/16 to 1/4
if (Random.Int(16 - ((int) (naturalismLevel * 3))) == 0) {
Item seed = Generator.random(Generator.Category.SEED);
if (seed instanceof BlandfruitBush.Seed) {
if (Random.Int(15) - Dungeon.limitedDrops.blandfruitSeed.count >= 0) {
level.drop(seed, pos).sprite.drop();
Dungeon.limitedDrops.blandfruitSeed.count++;
}
} else
level.drop(seed, pos).sprite.drop();
}
if (seed instanceof BlandfruitBush.Seed) {
if (Random.Int(15) - Dungeon.limitedDrops.blandfruitSeed.count >= 0) {
level.drop(seed, pos).sprite.drop();
Dungeon.limitedDrops.blandfruitSeed.count++;
}
} else
level.drop(seed, pos).sprite.drop();
}
// Dew, scales from 1/6 to 1/3
if (Random.Int(24 - naturalismLevel*3) <= 3) {
level.drop(new Dewdrop(), pos).sprite.drop();
}
}
}
// Dew, scales from 1/6 to 1/3
if (Random.Int(24 - naturalismLevel*3) <= 3) {
level.drop(new Dewdrop(), pos).sprite.drop();
}
}
}
int leaves = 4;
@@ -31,7 +31,7 @@ import com.shatteredpixel.shatteredpixeldungeon.windows.WndMessage;
public class Sign {
private static final String TXT_DEAD_END =
private static final String TXT_DEAD_END =
"What are you doing here?!";
private static final String[] TIPS = {
@@ -103,17 +103,17 @@ public class Sign {
if (index < TIPS.length) {
GameScene.show( new WndMessage( TIPS[index] ) );
if (index >= 21) {
if (index >= 21) {
Level.set( pos, Terrain.EMBERS );
GameScene.updateMap( pos );
GameScene.discoverTile( pos, Terrain.SIGN );
Level.set( pos, Terrain.EMBERS );
GameScene.updateMap( pos );
GameScene.discoverTile( pos, Terrain.SIGN );
GLog.w( TXT_BURN );
GLog.w( TXT_BURN );
CellEmitter.get( pos ).burst( ElmoParticle.FACTORY, 6 );
Sample.INSTANCE.play( Assets.SND_BURNING );
}
CellEmitter.get( pos ).burst( ElmoParticle.FACTORY, 6 );
Sample.INSTANCE.play( Assets.SND_BURNING );
}
}
}