v0.3.0: made mimics a bit tougher, rarer, and added a little extra loot to them.

This commit is contained in:
Evan Debenham 2015-04-27 23:52:50 -04:00
parent 06aa051410
commit 2e52491f16
3 changed files with 15 additions and 10 deletions

View File

@ -22,6 +22,7 @@ import java.util.Collection;
import java.util.HashSet; import java.util.HashSet;
import java.util.List; import java.util.List;
import com.shatteredpixel.shatteredpixeldungeon.items.Generator;
import com.watabou.noosa.audio.Sample; import com.watabou.noosa.audio.Sample;
import com.shatteredpixel.shatteredpixeldungeon.Assets; import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
@ -81,7 +82,7 @@ public class Mimic extends Mob {
public void adjustStats( int level ) { public void adjustStats( int level ) {
this.level = level; this.level = level;
HT = (3 + level) * 4; HT = (3 + level) * 5;
EXP = 2 + 2 * (level - 1) / 5; EXP = 2 + 2 * (level - 1) / 5;
defenseSkill = attackSkill( null ) / 2; defenseSkill = attackSkill( null ) / 2;
@ -153,6 +154,18 @@ public class Mimic extends Mob {
CellEmitter.get( pos ).burst( Speck.factory( Speck.STAR ), 10 ); CellEmitter.get( pos ).burst( Speck.factory( Speck.STAR ), 10 );
Sample.INSTANCE.play( Assets.SND_MIMIC ); Sample.INSTANCE.play( Assets.SND_MIMIC );
} }
//generate an extra reward for killing the mimic
switch(Random.Int(5)){
case 0: case 1:
m.items.add(new Gold().random()); break;
case 2:
m.items.add(Generator.randomArmor().identify()); break;
case 3:
m.items.add(Generator.randomWeapon().identify()); break;
case 4:
m.items.add(Generator.random(Generator.Category.RING).identify()); break;
}
return m; return m;
} }

View File

@ -49,14 +49,6 @@ public class RatKingPainter extends Painter {
addChest( level, i * Level.WIDTH + room.right - 1, door ); addChest( level, i * Level.WIDTH + room.right - 1, door );
} }
while (true) {
Heap chest = level.heaps.get( room.random() );
if (chest != null) {
chest.type = Heap.Type.MIMIC;
break;
}
}
RatKing king = new RatKing(); RatKing king = new RatKing();
king.pos = room.random( 1 ); king.pos = room.random( 1 );
level.mobs.add( king ); level.mobs.add( king );

View File

@ -43,7 +43,7 @@ public class TreasuryPainter extends Painter {
do { do {
pos = room.random(); pos = room.random();
} while (level.map[pos] != Terrain.EMPTY || level.heaps.get( pos ) != null); } while (level.map[pos] != Terrain.EMPTY || level.heaps.get( pos ) != null);
level.drop( new Gold().random(), pos ).type = (i == 0 && heapType == Heap.Type.CHEST ? Heap.Type.MIMIC : heapType); level.drop( new Gold().random(), pos ).type = (Random.Int(20) == 0 && heapType == Heap.Type.CHEST ? Heap.Type.MIMIC : heapType);
} }
if (heapType == Heap.Type.HEAP) { if (heapType == Heap.Type.HEAP) {