Merging Source v1.7.2: level changes

This commit is contained in:
Evan Debenham 2014-10-20 22:55:37 -04:00
parent e2b877b6b9
commit 1e62a6bd88
12 changed files with 49 additions and 34 deletions

View File

@ -221,7 +221,7 @@ public class CavesBossLevel extends Level {
locked = true;
Mob boss = Bestiary.mob( Dungeon.depth );
boss.state = Mob.State.HUNTING;
boss.state = boss.HUNTING;
do {
boss.pos = Random.Int( LENGTH );
} while (

View File

@ -179,7 +179,7 @@ public class CityBossLevel extends Level {
locked = true;
Mob boss = Bestiary.mob( Dungeon.depth );
boss.state = Mob.State.HUNTING;
boss.state = boss.HUNTING;
do {
boss.pos = Random.Int( LENGTH );
} while (

View File

@ -238,8 +238,6 @@ public class HallsBossLevel extends Level {
switch (tile) {
case Terrain.WATER:
return "It looks like lava, but it's cold and probably safe to touch.";
case Terrain.EMPTY_DECO:
return "Candles on the floor are probably remains of some ritual that took place here.";
case Terrain.STATUE:
case Terrain.STATUE_SP:
return "The pillar is made of real humanoid skulls. Awesome.";

View File

@ -132,8 +132,6 @@ public class HallsLevel extends RegularLevel {
switch (tile) {
case Terrain.WATER:
return "It looks like lava, but it's cold and probably safe to touch.";
case Terrain.EMPTY_DECO:
return "Candles on the floor are probably remains of some ritual that took place here.";
case Terrain.STATUE:
case Terrain.STATUE_SP:
return "The pillar is made of real humanoid skulls. Awesome.";

View File

@ -114,8 +114,6 @@ public class LastLevel extends Level {
switch (tile) {
case Terrain.WATER:
return "It looks like lava, but it's cold and probably safe to touch.";
case Terrain.EMPTY_DECO:
return "Candles on the floor are probably remains of some ritual that took place here.";
case Terrain.STATUE:
case Terrain.STATUE_SP:
return "The pillar is made of real humanoid skulls. Awesome.";

View File

@ -31,6 +31,7 @@ import com.shatteredpixel.shatteredpixeldungeon.plants.BlandfruitBush;
import com.watabou.noosa.Scene;
import com.watabou.noosa.audio.Sample;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.Challenges;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.Statistics;
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
@ -50,9 +51,13 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob;
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.FlowParticle;
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.WindParticle;
import com.shatteredpixel.shatteredpixeldungeon.items.Generator;
import com.shatteredpixel.shatteredpixeldungeon.items.Gold;
import com.shatteredpixel.shatteredpixeldungeon.items.Heap;
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
import com.shatteredpixel.shatteredpixeldungeon.items.Stylus;
import com.shatteredpixel.shatteredpixeldungeon.items.armor.Armor;
import com.shatteredpixel.shatteredpixeldungeon.items.food.Food;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfHealing;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfStrength;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfUpgrade;
import com.shatteredpixel.shatteredpixeldungeon.levels.features.Chasm;
@ -113,7 +118,7 @@ public abstract class Level implements Bundlable {
public boolean[] visited;
public boolean[] mapped;
public int viewDistance = 8;
public int viewDistance = Dungeon.isChallenged( Challenges.DARKNESS ) ? 3: 8;
public static boolean[] fieldOfView = new boolean[LENGTH];
@ -397,7 +402,7 @@ public abstract class Level implements Bundlable {
if (mobs.size() < nMobs()) {
Mob mob = Bestiary.mutable( Dungeon.depth );
mob.state = Mob.State.WANDERING;
mob.state = mob.WANDERING;
mob.pos = randomRespawnCell();
if (Dungeon.hero.isAlive() && mob.pos != -1) {
GameScene.add( mob );
@ -542,6 +547,16 @@ public abstract class Level implements Bundlable {
public Heap drop( Item item, int cell ) {
if (Dungeon.isChallenged( Challenges.NO_FOOD ) && item instanceof Food) {
item = new Gold( item.price() );
} else
if (Dungeon.isChallenged( Challenges.NO_ARMOR ) && item instanceof Armor) {
item = new Gold( item.price() );
} else
if (Dungeon.isChallenged( Challenges.NO_HEALING ) && item instanceof PotionOfHealing) {
item = new Gold( item.price() );
}
if ((map[cell] == Terrain.ALCHEMY) && (item instanceof BlandfruitBush.Seed || !(item instanceof Plant.Seed ||
(item instanceof Blandfruit && ((Blandfruit) item).potionAttrib == null && heaps.get(cell) == null)))) {
int n;
@ -838,7 +853,6 @@ public abstract class Level implements Bundlable {
}
}
if (c.buff( Awareness.class ) != null) {
for (Heap heap : heaps.values()) {
int p = heap.pos;
fieldOfView[p] = true;

View File

@ -317,7 +317,7 @@ public class PrisonBossLevel extends RegularLevel {
} while (pos == cell || Actor.findChar( pos ) != null);
Mob boss = Bestiary.mob( Dungeon.depth );
boss.state = Mob.State.HUNTING;
boss.state = boss.HUNTING;
boss.pos = pos;
GameScene.add( boss );
boss.notice();

View File

@ -92,7 +92,7 @@ public class Terrain {
flags[WALL] = LOS_BLOCKING | SOLID | UNSTITCHABLE;
flags[DOOR] = PASSABLE | LOS_BLOCKING | FLAMABLE | SOLID | UNSTITCHABLE;
flags[OPEN_DOOR] = PASSABLE | FLAMABLE | UNSTITCHABLE;
flags[ENTRANCE] = PASSABLE;
flags[ENTRANCE] = PASSABLE/* | SOLID*/;
flags[EXIT] = PASSABLE;
flags[EMBERS] = PASSABLE;
flags[LOCKED_DOOR] = LOS_BLOCKING | SOLID | UNSTITCHABLE;

View File

@ -17,6 +17,7 @@
*/
package com.shatteredpixel.shatteredpixeldungeon.levels.features;
import com.shatteredpixel.shatteredpixeldungeon.Challenges;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Barkskin;
@ -40,6 +41,7 @@ public class HighGrass {
Level.set( pos, Terrain.GRASS );
GameScene.updateMap( pos );
if (!Dungeon.isChallenged( Challenges.NO_HERBALISM )) {
int naturalismLevel = 0;
if (ch != null) {
SandalsOfNature.Naturalism naturalism = ch.buff( SandalsOfNature.Naturalism.class );
@ -57,6 +59,7 @@ public class HighGrass {
// Dew
if (Random.Int( 6-naturalismLevel ) == 0) {
level.drop( new Dewdrop(), pos ).sprite.drop();
}
}
int leaves = 4;

View File

@ -28,6 +28,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.Generator;
import com.shatteredpixel.shatteredpixeldungeon.items.Heap;
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
import com.shatteredpixel.shatteredpixeldungeon.items.Torch;
import com.shatteredpixel.shatteredpixeldungeon.items.Weightstone;
import com.shatteredpixel.shatteredpixeldungeon.items.armor.*;
import com.shatteredpixel.shatteredpixeldungeon.items.bags.ScrollHolder;
import com.shatteredpixel.shatteredpixeldungeon.items.bags.SeedPouch;
@ -95,18 +96,21 @@ public class ShopPainter extends Painter {
items.add( (Random.Int( 2 ) == 0 ? new Quarterstaff() : new Spear()).identify() );
items.add( new LeatherArmor().identify() );
items.add( new SeedPouch() );
items.add( new Weightstone() );
break;
case 11:
items.add( (Random.Int( 2 ) == 0 ? new Sword() : new Mace()).identify() );
items.add( new MailArmor().identify() );
items.add( new ScrollHolder() );
items.add( new Weightstone() );
break;
case 16:
items.add( (Random.Int( 2 ) == 0 ? new Longsword() : new BattleAxe()).identify() );
items.add( new ScaleArmor().identify() );
items.add( new WandHolster() );
items.add( new Weightstone() );
break;
case 21:

View File

@ -31,7 +31,7 @@ public class PoisonTrap {
public static void trigger( int pos, Char ch ) {
if (ch != null) {
Buff.affect( ch, Poison.class ).set( 5 + Math.min( Dungeon.depth, 15 ) );
Buff.affect( ch, Poison.class ).set( Poison.durationFactor( ch ) * (4 + Dungeon.depth / 2) );
}
CellEmitter.center( pos ).burst( PoisonParticle.SPLASH, 3 );

View File

@ -80,7 +80,7 @@ public class SummoningTrap {
for (Integer point : respawnPoints) {
Mob mob = Bestiary.mob( Dungeon.depth );
mob.state = Mob.State.WANDERING;
mob.state = mob.WANDERING;
GameScene.add( mob, DELAY );
WandOfBlink.appear( mob, point );
}