v0.8.1: adjusted equipment drops from enemies, and added new ones
This commit is contained in:
parent
8b442d556c
commit
ab6aa5a044
|
@ -99,8 +99,13 @@ public class Dungeon {
|
|||
BLANDFRUIT_SEED,
|
||||
|
||||
//Other limited enemy drops
|
||||
SLIME_WEP,
|
||||
SKELE_WEP,
|
||||
THEIF_MISC,
|
||||
GUARD_ARM,
|
||||
SHAMAN_WAND,
|
||||
DM200_EQUIP,
|
||||
GOLEM_EQUIP,
|
||||
|
||||
//containers
|
||||
DEW_VIAL,
|
||||
|
|
|
@ -21,9 +21,12 @@
|
|||
|
||||
package com.shatteredpixel.shatteredpixeldungeon.actors.mobs;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Blob;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.ToxicGas;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Generator;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.mechanics.Ballistica;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||
|
@ -43,7 +46,8 @@ public class DM200 extends Mob {
|
|||
EXP = 9;
|
||||
maxLvl = 17;
|
||||
|
||||
//TODO loot?
|
||||
loot = Random.oneOf(Generator.Category.WEAPON, Generator.Category.ARMOR);
|
||||
lootChance = 0.125f; //initially, see rollToDropLoot
|
||||
|
||||
properties.add(Property.INORGANIC);
|
||||
properties.add(Property.LARGE);
|
||||
|
@ -66,6 +70,23 @@ public class DM200 extends Mob {
|
|||
return Random.NormalIntRange(0, 8);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void rollToDropLoot() {
|
||||
//each drop makes future drops 1/2 as likely
|
||||
// so loot chance looks like: 1/8, 1/16, 1/32, 1/64, etc.
|
||||
lootChance *= Math.pow(1/2f, Dungeon.LimitedDrops.DM200_EQUIP.count);
|
||||
super.rollToDropLoot();
|
||||
}
|
||||
|
||||
protected Item createLoot() {
|
||||
//uses probability tables for dwarf city
|
||||
if (loot == Generator.Category.WEAPON){
|
||||
return Generator.randomWeapon(4);
|
||||
} else {
|
||||
return Generator.randomArmor(4);
|
||||
}
|
||||
}
|
||||
|
||||
private int ventCooldown = 0;
|
||||
|
||||
private static final String VENT_COOLDOWN = "vent_cooldown";
|
||||
|
|
|
@ -27,6 +27,8 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.MagicImmune;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.Imp;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Generator;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfTeleportation;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.GolemSprite;
|
||||
import com.watabou.utils.Bundle;
|
||||
|
@ -43,7 +45,10 @@ public class Golem extends Mob {
|
|||
|
||||
EXP = 12;
|
||||
maxLvl = 22;
|
||||
|
||||
|
||||
loot = Random.oneOf(Generator.Category.WEAPON, Generator.Category.ARMOR);
|
||||
lootChance = 0.125f; //initially, see rollToDropLoot
|
||||
|
||||
properties.add(Property.INORGANIC);
|
||||
properties.add(Property.LARGE);
|
||||
|
||||
|
@ -65,14 +70,26 @@ public class Golem extends Mob {
|
|||
public int drRoll() {
|
||||
return Random.NormalIntRange(0, 12);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void rollToDropLoot() {
|
||||
Imp.Quest.process( this );
|
||||
|
||||
|
||||
//each drop makes future drops 1/2 as likely
|
||||
// so loot chance looks like: 1/8, 1/16, 1/32, 1/64, etc.
|
||||
lootChance *= Math.pow(1/2f, Dungeon.LimitedDrops.GOLEM_EQUIP.count);
|
||||
super.rollToDropLoot();
|
||||
}
|
||||
|
||||
protected Item createLoot() {
|
||||
//uses probability tables for demon halls
|
||||
if (loot == Generator.Category.WEAPON){
|
||||
return Generator.randomWeapon(5);
|
||||
} else {
|
||||
return Generator.randomArmor(5);
|
||||
}
|
||||
}
|
||||
|
||||
private boolean teleporting = false;
|
||||
private int selfTeleCooldown = 0;
|
||||
private int enemyTeleCooldown = 0;
|
||||
|
|
|
@ -53,7 +53,7 @@ public class Guard extends Mob {
|
|||
maxLvl = 14;
|
||||
|
||||
loot = Generator.Category.ARMOR;
|
||||
lootChance = 0.1667f;
|
||||
lootChance = 0.2f; //by default, see rollToDropLoot()
|
||||
|
||||
properties.add(Property.UNDEAD);
|
||||
|
||||
|
@ -124,14 +124,11 @@ public class Guard extends Mob {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected Item createLoot() {
|
||||
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;
|
||||
public void rollToDropLoot() {
|
||||
//each drop makes future drops 1/2 as likely
|
||||
// so loot chance looks like: 1/5, 1/10, 1/20, 1/40, etc.
|
||||
lootChance *= Math.pow(1/2f, Dungeon.LimitedDrops.GUARD_ARM.count);
|
||||
super.rollToDropLoot();
|
||||
}
|
||||
|
||||
private final String CHAINSUSED = "chainsused";
|
||||
|
|
|
@ -47,7 +47,7 @@ public class Skeleton extends Mob {
|
|||
maxLvl = 10;
|
||||
|
||||
loot = Generator.Category.WEAPON;
|
||||
lootChance = 0.125f;
|
||||
lootChance = 0.1667f; //by default, see rollToDropLoot()
|
||||
|
||||
properties.add(Property.UNDEAD);
|
||||
properties.add(Property.INORGANIC);
|
||||
|
@ -87,16 +87,13 @@ public class Skeleton extends Mob {
|
|||
GLog.n( Messages.get(this, "explo_kill") );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected Item createLoot() {
|
||||
MeleeWeapon loot;
|
||||
do {
|
||||
loot = Generator.randomWeapon();
|
||||
//50% chance of re-rolling tier 4 or 5 melee weapons
|
||||
} while (loot.tier >= 4 && Random.Int(2) == 0);
|
||||
loot.level(0);
|
||||
return loot;
|
||||
public void rollToDropLoot() {
|
||||
//each drop makes future drops 1/2 as likely
|
||||
// so loot chance looks like: 1/6, 1/12, 1/24, 1/48, etc.
|
||||
lootChance *= Math.pow(1/2f, Dungeon.LimitedDrops.SKELE_WEP.count);
|
||||
super.rollToDropLoot();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
|
||||
package com.shatteredpixel.shatteredpixeldungeon.actors.mobs;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Generator;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||
|
@ -40,7 +41,7 @@ public class Slime extends Mob {
|
|||
EXP = 4;
|
||||
maxLvl = 9;
|
||||
|
||||
lootChance = 0.1f;
|
||||
lootChance = 0.2f; //by default, see rollToDropLoot()
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -61,9 +62,18 @@ public class Slime extends Mob {
|
|||
}
|
||||
super.damage(dmg, src);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void rollToDropLoot() {
|
||||
//each drop makes future drops 1/2 as likely
|
||||
// so loot chance looks like: 1/5, 1/10, 1/20, 1/40, etc.
|
||||
lootChance *= Math.pow(1/2f, Dungeon.LimitedDrops.SLIME_WEP.count);
|
||||
super.rollToDropLoot();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Item createLoot() {
|
||||
Dungeon.LimitedDrops.SLIME_WEP.count++;
|
||||
Generator.Category c = Generator.Category.WEP_T2;
|
||||
MeleeWeapon w = (MeleeWeapon) Reflection.newInstance(c.classes[Random.chances(c.probs)]);
|
||||
w.random();
|
||||
|
|
Loading…
Reference in New Issue
Block a user