v0.4.1: nerfed the equipment drops of skeletons and guards
This commit is contained in:
parent
9518f3dbb5
commit
49a73d3cd5
|
@ -28,6 +28,7 @@ import com.shatteredpixel.shatteredpixeldungeon.effects.Chains;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.effects.Pushing;
|
import com.shatteredpixel.shatteredpixeldungeon.effects.Pushing;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.Generator;
|
import com.shatteredpixel.shatteredpixeldungeon.items.Generator;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.items.armor.Armor;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfHealing;
|
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfHealing;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
|
import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.mechanics.Ballistica;
|
import com.shatteredpixel.shatteredpixeldungeon.mechanics.Ballistica;
|
||||||
|
@ -138,7 +139,13 @@ public class Guard extends Mob {
|
||||||
protected Item createLoot() {
|
protected Item createLoot() {
|
||||||
//first see if we drop armor, overall chance is 1/8
|
//first see if we drop armor, overall chance is 1/8
|
||||||
if (Random.Int(2) == 0){
|
if (Random.Int(2) == 0){
|
||||||
return Generator.randomArmor();
|
Armor loot;
|
||||||
|
do{
|
||||||
|
loot = Generator.randomArmor();
|
||||||
|
//50% chance of re-rolling tier 4 or 5 items
|
||||||
|
} while (loot.tier >= 4 && Random.Int(2) == 0);
|
||||||
|
loot.level(0);
|
||||||
|
return loot;
|
||||||
//otherwise, we may drop a health potion. overall chance is 7/(8 * (7 + potions dropped))
|
//otherwise, we may drop a health potion. overall chance is 7/(8 * (7 + potions dropped))
|
||||||
//with 0 potions dropped that simplifies to 1/8
|
//with 0 potions dropped that simplifies to 1/8
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -26,6 +26,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.Generator;
|
import com.shatteredpixel.shatteredpixeldungeon.items.Generator;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Grim;
|
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Grim;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.MeleeWeapon;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
|
import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.SkeletonSprite;
|
import com.shatteredpixel.shatteredpixeldungeon.sprites.SkeletonSprite;
|
||||||
|
@ -88,13 +89,12 @@ public class Skeleton extends Mob {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Item createLoot() {
|
protected Item createLoot() {
|
||||||
Item loot = Generator.random( Generator.Category.WEAPON );
|
Item loot;
|
||||||
for (int i=0; i < 2; i++) {
|
do {
|
||||||
Item l = Generator.random( Generator.Category.WEAPON );
|
loot = Generator.random(Generator.Category.WEAPON);
|
||||||
if (l.level() < loot.level()) {
|
//50% chance of re-rolling tier 4 or 5 items
|
||||||
loot = l;
|
} while (loot instanceof MeleeWeapon && ((MeleeWeapon) loot).tier >= 4 && Random.Int(2) == 0);
|
||||||
}
|
loot.level(0);
|
||||||
}
|
|
||||||
return loot;
|
return loot;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user