v0.4.0: removed equipment from rat king chests

This commit is contained in:
Evan Debenham 2016-06-03 13:19:27 -04:00
parent fe7bf58430
commit d18417f447

View File

@ -21,11 +21,9 @@
package com.shatteredpixel.shatteredpixeldungeon.levels.painters; package com.shatteredpixel.shatteredpixeldungeon.levels.painters;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.RatKing; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.RatKing;
import com.shatteredpixel.shatteredpixeldungeon.items.Generator;
import com.shatteredpixel.shatteredpixeldungeon.items.Gold; import com.shatteredpixel.shatteredpixeldungeon.items.Gold;
import com.shatteredpixel.shatteredpixeldungeon.items.Heap; import com.shatteredpixel.shatteredpixeldungeon.items.Heap;
import com.shatteredpixel.shatteredpixeldungeon.items.Item; import com.shatteredpixel.shatteredpixeldungeon.items.Item;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles.MissileWeapon;
import com.shatteredpixel.shatteredpixeldungeon.levels.Level; import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
import com.shatteredpixel.shatteredpixeldungeon.levels.Room; import com.shatteredpixel.shatteredpixeldungeon.levels.Room;
import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain; import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain;
@ -66,23 +64,7 @@ public class RatKingPainter extends Painter {
return; return;
} }
Item prize; Item prize = new Gold( Random.IntRange( 1, 25 ) );
switch (Random.Int( 10 )) {
case 0:
prize = Generator.random( Generator.Category.WEAPON );
if (prize instanceof MissileWeapon) {
prize.quantity( 1 );
} else {
prize.degrade( Random.Int( 3 ) );
}
break;
case 1:
prize = Generator.random( Generator.Category.ARMOR ).degrade( Random.Int( 3 ) );
break;
default:
prize = new Gold( Random.IntRange( 1, 5 ) );
break;
}
level.drop( prize, pos ).type = Heap.Type.CHEST; level.drop( prize, pos ).type = Heap.Type.CHEST;
} }