v0.3.1: added trap generation logic for caves, city, and halls
This commit is contained in:
parent
cf7a8d71e1
commit
f94d2db5dc
|
@ -20,6 +20,7 @@
|
|||
*/
|
||||
package com.shatteredpixel.shatteredpixeldungeon.levels;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.traps.*;
|
||||
import com.watabou.noosa.Game;
|
||||
import com.watabou.noosa.Group;
|
||||
import com.watabou.noosa.Scene;
|
||||
|
@ -60,6 +61,22 @@ public class CavesLevel extends RegularLevel {
|
|||
protected boolean[] grass() {
|
||||
return Patch.generate( feeling == Feeling.GRASS ? 0.55f : 0.35f, 3 );
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Class<?>[] trapClasses() {
|
||||
return new Class[]{ FireTrap.class, FrostTrap.class, PoisonTrap.class, SpearTrap.class, VenomTrap.class,
|
||||
ExplosiveTrap.class, FlashingTrap.class, GrippingTrap.class, ParalyticTrap.class, LightningTrap.class, RockfallTrap.class, OozeTrap.class,
|
||||
ConfusionTrap.class, FlockTrap.class, GuardianTrap.class, PitfallTrap.class, SummoningTrap.class, TeleportationTrap.class,
|
||||
WarpingTrap.class};
|
||||
}
|
||||
|
||||
@Override
|
||||
protected float[] trapChances() {
|
||||
return new float[]{ 8, 8, 8, 8, 8,
|
||||
4, 4, 4, 4, 4, 4, 4,
|
||||
2, 2, 2, 2, 2, 2,
|
||||
1 };
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean assignRoomType() {
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
*/
|
||||
package com.shatteredpixel.shatteredpixeldungeon.levels;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.traps.*;
|
||||
import com.watabou.noosa.Scene;
|
||||
import com.watabou.noosa.particles.Emitter;
|
||||
import com.watabou.noosa.particles.PixelParticle;
|
||||
|
@ -55,6 +56,22 @@ public class CityLevel extends RegularLevel {
|
|||
protected boolean[] grass() {
|
||||
return Patch.generate( feeling == Feeling.GRASS ? 0.60f : 0.40f, 3 );
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Class<?>[] trapClasses() {
|
||||
return new Class[]{ BlazingTrap.class, FrostTrap.class, SpearTrap.class, VenomTrap.class,
|
||||
ExplosiveTrap.class, GrippingTrap.class, LightningTrap.class, RockfallTrap.class, OozeTrap.class, WeakeningTrap.class,
|
||||
CursingTrap.class, FlockTrap.class, GuardianTrap.class, PitfallTrap.class, SummoningTrap.class, TeleportationTrap.class,
|
||||
DisarmingTrap.class, WarpingTrap.class};
|
||||
}
|
||||
|
||||
@Override
|
||||
protected float[] trapChances() {
|
||||
return new float[]{ 8, 8, 8, 8,
|
||||
4, 4, 4, 4, 4, 4,
|
||||
2, 2, 2, 2, 2, 2,
|
||||
1, 1 };
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean assignRoomType() {
|
||||
|
|
|
@ -24,6 +24,7 @@ import javax.microedition.khronos.opengles.GL10;
|
|||
|
||||
import android.opengl.GLES20;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.traps.*;
|
||||
import com.watabou.noosa.Game;
|
||||
import com.watabou.noosa.Group;
|
||||
import com.watabou.noosa.Scene;
|
||||
|
@ -69,6 +70,22 @@ public class HallsLevel extends RegularLevel {
|
|||
protected boolean[] grass() {
|
||||
return Patch.generate( feeling == Feeling.GRASS ? 0.55f : 0.30f, 3 );
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Class<?>[] trapClasses() {
|
||||
return new Class[]{ BlazingTrap.class, DisintegrationTrap.class, FrostTrap.class, SpearTrap.class, VenomTrap.class,
|
||||
ExplosiveTrap.class, GrippingTrap.class, LightningTrap.class, OozeTrap.class, WeakeningTrap.class,
|
||||
CursingTrap.class, FlockTrap.class, GrimTrap.class, GuardianTrap.class, SummoningTrap.class, TeleportationTrap.class,
|
||||
DisarmingTrap.class, DistortionTrap.class, WarpingTrap.class};
|
||||
}
|
||||
|
||||
@Override
|
||||
protected float[] trapChances() {
|
||||
return new float[]{ 8, 8, 8, 8, 8,
|
||||
4, 4, 4, 4, 4,
|
||||
2, 2, 2, 2, 2, 2,
|
||||
1, 1, 1 };
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void decorate() {
|
||||
|
|
Loading…
Reference in New Issue
Block a user