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