v0.6.3: reduced the spawn rate of missile weapons by ~50%
This commit is contained in:
parent
07158daed2
commit
3701a2aac7
|
@ -30,6 +30,8 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Burning;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Poison;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.Ghost;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Generator;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles.MissileWeapon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.mechanics.Ballistica;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.GnollTricksterSprite;
|
||||
|
@ -48,6 +50,7 @@ public class GnollTrickster extends Gnoll {
|
|||
|
||||
state = WANDERING;
|
||||
|
||||
//at half quantity, see createLoot()
|
||||
loot = Generator.Category.MISSILE;
|
||||
lootChance = 1f;
|
||||
|
||||
|
@ -98,7 +101,15 @@ public class GnollTrickster extends Gnoll {
|
|||
return super.getCloser( target );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected Item createLoot() {
|
||||
MissileWeapon drop = (MissileWeapon)super.createLoot();
|
||||
//half quantity, rounded up
|
||||
drop.quantity((drop.quantity()+1)/2);
|
||||
return drop;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void die( Object cause ) {
|
||||
super.die( cause );
|
||||
|
|
|
@ -89,9 +89,9 @@ public class Skeleton extends Mob {
|
|||
protected Item createLoot() {
|
||||
Item loot;
|
||||
do {
|
||||
loot = Random.Int(4) == 0 ? Generator.randomMissile() : Generator.randomWeapon();
|
||||
loot = Generator.randomWeapon();
|
||||
//50% chance of re-rolling tier 4 or 5 melee weapons
|
||||
} while (loot instanceof MeleeWeapon && ((MeleeWeapon) loot).tier >= 4 && Random.Int(2) == 0);
|
||||
} while (((MeleeWeapon) loot).tier >= 4 && Random.Int(2) == 0);
|
||||
loot.level(0);
|
||||
return loot;
|
||||
}
|
||||
|
|
|
@ -168,7 +168,7 @@ public class Generator {
|
|||
|
||||
ARMOR ( 4, Armor.class ),
|
||||
|
||||
MISSILE ( 5, MissileWeapon.class ),
|
||||
MISSILE ( 3, MissileWeapon.class ),
|
||||
MIS_T1 ( 0, MissileWeapon.class ),
|
||||
MIS_T2 ( 0, MissileWeapon.class ),
|
||||
MIS_T3 ( 0, MissileWeapon.class ),
|
||||
|
|
|
@ -98,11 +98,11 @@ abstract public class MissileWeapon extends Weapon {
|
|||
public Item random() {
|
||||
if (!stackable) return this;
|
||||
|
||||
//+0: 50% (1/2)
|
||||
//+1: 40% (4/10)
|
||||
//+2: 10% (1/10)
|
||||
//2: 66.67% (2/3)
|
||||
//3: 26.67% (4/15)
|
||||
//4: 6.67% (1/15)
|
||||
quantity = 2;
|
||||
if (Random.Int(2) == 0) {
|
||||
if (Random.Int(3) == 0) {
|
||||
quantity++;
|
||||
if (Random.Int(5) == 0) {
|
||||
quantity++;
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
|
||||
package com.shatteredpixel.shatteredpixeldungeon.levels.rooms.secret;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Bomb;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Generator;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain;
|
||||
|
@ -37,14 +38,18 @@ public class SecretArtilleryRoom extends SecretRoom {
|
|||
|
||||
Painter.set(level, center(), Terrain.STATUE_SP);
|
||||
|
||||
for (int i = 0; i < 4; i++){
|
||||
for (int i = 0; i < 3; i++){
|
||||
int itemPos;
|
||||
do{
|
||||
itemPos = level.pointToCell(random());
|
||||
} while ( level.map[itemPos] != Terrain.EMPTY_SP
|
||||
|| level.heaps.get(itemPos) != null);
|
||||
|
||||
level.drop(Generator.randomMissile(), itemPos);
|
||||
if( i == 0 ){
|
||||
level.drop(new Bomb.DoubleBomb(), itemPos);
|
||||
} else {
|
||||
level.drop(Generator.randomMissile(), itemPos);
|
||||
}
|
||||
}
|
||||
|
||||
entrance().set(Door.Type.HIDDEN);
|
||||
|
|
|
@ -68,7 +68,7 @@ public class ArmoryRoom extends SpecialRoom {
|
|||
}
|
||||
|
||||
private static Item prize( Level level ) {
|
||||
switch (Random.Int( 5 )){
|
||||
switch (Random.Int( 4 )){
|
||||
case 0:
|
||||
return new Bomb().random();
|
||||
case 1:
|
||||
|
|
Loading…
Reference in New Issue
Block a user