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