v2.3.0: made a few improvements to fungi quest layouts and terrain logic
This commit is contained in:
@@ -52,6 +52,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.GnollGeomancer;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Piranha;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.YogFist;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.Blacksmith;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.Sheep;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.FlowParticle;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.WindParticle;
|
||||
@@ -1220,20 +1221,24 @@ public abstract class Level implements Bundlable {
|
||||
if (modifiableBlocking == null || modifiableBlocking.length != Dungeon.level.losBlocking.length){
|
||||
modifiableBlocking = new boolean[Dungeon.level.losBlocking.length];
|
||||
}
|
||||
|
||||
if ((c instanceof Hero && ((Hero) c).subClass == HeroSubClass.WARDEN)
|
||||
|| c instanceof YogFist.SoiledFist || c instanceof GnollGeomancer) {
|
||||
if (blocking == null) {
|
||||
System.arraycopy(Dungeon.level.losBlocking, 0, modifiableBlocking, 0, modifiableBlocking.length);
|
||||
blocking = modifiableBlocking;
|
||||
}
|
||||
for (int i = 0; i < blocking.length; i++){
|
||||
if (blocking[i] && (Dungeon.level.map[i] == Terrain.HIGH_GRASS || Dungeon.level.map[i] == Terrain.FURROWED_GRASS)){
|
||||
blocking[i] = false;
|
||||
|
||||
//grass is see-through by some specific entities, but not during the fungi quest
|
||||
if (!(Dungeon.level instanceof MiningLevel) || Blacksmith.Quest.Type() != Blacksmith.Quest.FUNGI){
|
||||
if ((c instanceof Hero && ((Hero) c).subClass == HeroSubClass.WARDEN)
|
||||
|| c instanceof YogFist.SoiledFist || c instanceof GnollGeomancer) {
|
||||
if (blocking == null) {
|
||||
System.arraycopy(Dungeon.level.losBlocking, 0, modifiableBlocking, 0, modifiableBlocking.length);
|
||||
blocking = modifiableBlocking;
|
||||
}
|
||||
for (int i = 0; i < blocking.length; i++) {
|
||||
if (blocking[i] && (Dungeon.level.map[i] == Terrain.HIGH_GRASS || Dungeon.level.map[i] == Terrain.FURROWED_GRASS)) {
|
||||
blocking[i] = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//allies and specific enemies can see through shrouding fog
|
||||
if ((c.alignment != Char.Alignment.ALLY && !(c instanceof GnollGeomancer))
|
||||
&& Dungeon.level.blobs.containsKey(SmokeScreen.class)
|
||||
&& Dungeon.level.blobs.get(SmokeScreen.class).volume > 0) {
|
||||
|
||||
@@ -30,6 +30,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroClass;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.ArmoredStatue;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.Blacksmith;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.LeafParticle;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Dewdrop;
|
||||
@@ -39,6 +40,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.DriedRose;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.SandalsOfNature;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.food.Berry;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.MiningLevel;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||
import com.watabou.utils.Random;
|
||||
@@ -110,6 +112,13 @@ public class HighGrass {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
//grass gives 1/3 the normal amount of loot in fungi level
|
||||
if (Dungeon.level instanceof MiningLevel
|
||||
&& Blacksmith.Quest.Type() == Blacksmith.Quest.FUNGI
|
||||
&& Random.Int(3) != 0){
|
||||
naturalismLevel = 0;
|
||||
}
|
||||
|
||||
if (naturalismLevel >= 0) {
|
||||
// Seed, scales from 1/25 to 1/9
|
||||
|
||||
@@ -127,14 +127,13 @@ public class MineGiantRoom extends CaveRoom {
|
||||
level.mobs.add(g);
|
||||
|
||||
} else if (Blacksmith.Quest.Type() == Blacksmith.Quest.FUNGI){
|
||||
Painter.fillEllipse(level, this, 3, Terrain.EMPTY);
|
||||
Painter.fillEllipse(level, this, 2, Terrain.HIGH_GRASS);
|
||||
|
||||
Painter.fillEllipse(level, this, 3, Terrain.GRASS);
|
||||
|
||||
Painter.fillEllipse(level, this, 4, Terrain.HIGH_GRASS);
|
||||
Painter.fillEllipse(level, this, 5, Terrain.GRASS);
|
||||
|
||||
for (int i = 0; i < width()*height()/2; i ++){
|
||||
Point r = random(1);
|
||||
if (level.map[level.pointToCell(r)] != Terrain.WALL) {
|
||||
Painter.set(level, r, Terrain.HIGH_GRASS);
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
Painter.fillEllipse(level, this, 3, Terrain.EMPTY);
|
||||
|
||||
@@ -24,6 +24,7 @@ package com.shatteredpixel.shatteredpixeldungeon.levels.rooms.quest;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.CrystalGuardian;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.GnollGuard;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.GnollSapper;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.RotLasher;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.Blacksmith;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain;
|
||||
@@ -180,15 +181,29 @@ public class MineLargeRoom extends CaveRoom {
|
||||
}
|
||||
}
|
||||
} else if (Blacksmith.Quest.Type() == Blacksmith.Quest.FUNGI){
|
||||
Painter.fillEllipse(level, this, 3, Terrain.EMPTY);
|
||||
|
||||
for (int i = 0; i < width() * height() / 4; i++) {
|
||||
for (Point p : getPoints()){
|
||||
int cell = level.pointToCell(p);
|
||||
if (level.map[cell] == Terrain.EMPTY){
|
||||
level.map[cell] = Terrain.HIGH_GRASS;
|
||||
}
|
||||
}
|
||||
|
||||
Painter.fillEllipse(level, this, 3, Terrain.GRASS);
|
||||
|
||||
for (int i = 0; i < width() * height() / 6; i++) {
|
||||
Point r = random(1);
|
||||
if (level.map[level.pointToCell(r)] != Terrain.WALL) {
|
||||
Painter.set(level, r, Terrain.HIGH_GRASS);
|
||||
}
|
||||
}
|
||||
|
||||
Point p = center();
|
||||
RotLasher m = new RotLasher(); //placeholder enemy
|
||||
m.pos = level.pointToCell(p);
|
||||
level.mobs.add(m);
|
||||
Painter.set(level, p, Terrain.GRASS);
|
||||
|
||||
} else {
|
||||
Painter.fillEllipse(level, this, 3, Terrain.EMPTY);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user