v3.0.0: fixed exotic crystals not affecting enemy drops in most cases

This commit is contained in:
Evan Debenham
2025-01-20 15:35:03 -05:00
parent ed9230a950
commit 2989affcb7
11 changed files with 26 additions and 14 deletions

View File

@@ -36,7 +36,7 @@ public class Acidic extends Scorpio {
properties.add(Property.ACIDIC);
loot = new PotionOfExperience();
loot = PotionOfExperience.class;
lootChance = 1f;
}
@Override

View File

@@ -36,7 +36,7 @@ public class Albino extends Rat {
HP = HT = 15;
EXP = 2;
loot = new MysteryMeat();
loot = MysteryMeat.class;
lootChance = 1f;
}

View File

@@ -44,7 +44,7 @@ public class Bat extends Mob {
flying = true;
loot = new PotionOfHealing();
loot = PotionOfHealing.class;
lootChance = 0.1667f; //by default, see lootChance()
}

View File

@@ -38,7 +38,7 @@ public class Crab extends Mob {
EXP = 4;
maxLvl = 9;
loot = new MysteryMeat();
loot = MysteryMeat.class;
lootChance = 0.167f;
}

View File

@@ -228,7 +228,7 @@ public abstract class Elemental extends Mob {
{
spriteClass = ElementalSprite.Fire.class;
loot = new PotionOfLiquidFlame();
loot = PotionOfLiquidFlame.class;
lootChance = 1/8f;
properties.add( Property.FIERY );
@@ -475,7 +475,7 @@ public abstract class Elemental extends Mob {
{
spriteClass = ElementalSprite.Frost.class;
loot = new PotionOfFrost();
loot = PotionOfFrost.class;
lootChance = 1/8f;
properties.add( Property.ICY );
@@ -503,7 +503,7 @@ public abstract class Elemental extends Mob {
{
spriteClass = ElementalSprite.Shock.class;
loot = new ScrollOfRecharging();
loot = ScrollOfRecharging.class;
lootChance = 1/4f;
properties.add( Property.ELECTRIC );
@@ -552,7 +552,7 @@ public abstract class Elemental extends Mob {
{
spriteClass = ElementalSprite.Chaos.class;
loot = new ScrollOfTransmutation();
loot = ScrollOfTransmutation.class;
lootChance = 1f;
}

View File

@@ -45,7 +45,7 @@ public class Monk extends Mob {
EXP = 11;
maxLvl = 21;
loot = new Food();
loot = Food.class;
lootChance = 0.083f;
properties.add(Property.UNDEAD);

View File

@@ -55,7 +55,7 @@ public class Necromancer extends Mob {
EXP = 7;
maxLvl = 14;
loot = new PotionOfHealing();
loot = PotionOfHealing.class;
lootChance = 0.2f; //see lootChance()
properties.add(Property.UNDEAD);

View File

@@ -30,7 +30,7 @@ public class Senior extends Monk {
{
spriteClass = SeniorSprite.class;
loot = new Pasty();
loot = Pasty.class;
lootChance = 1f;
}

View File

@@ -49,7 +49,7 @@ public class Spinner extends Mob {
EXP = 9;
maxLvl = 17;
loot = new MysteryMeat();
loot = MysteryMeat.class;
lootChance = 0.125f;
HUNTING = new Hunting();

View File

@@ -50,7 +50,7 @@ public class Swarm extends Mob {
flying = true;
loot = new PotionOfHealing();
loot = PotionOfHealing.class;
lootChance = 0.1667f; //by default, see lootChance()
}

View File

@@ -746,7 +746,19 @@ public class Generator {
} else if (cat.defaultProbsTotal != null){
return ((Item) Reflection.newInstance(cat.classes[Random.chances(cat.defaultProbsTotal)])).random();
} else {
return ((Item) Reflection.newInstance(cat.classes[Random.chances(cat.defaultProbs)])).random();
Class<?> itemCls = cat.classes[Random.chances(cat.defaultProbs)];
if (ExoticPotion.regToExo.containsKey(itemCls)){
if (Random.Float() < ExoticCrystals.consumableExoticChance()){
itemCls = ExoticPotion.regToExo.get(itemCls);
}
} else if (ExoticScroll.regToExo.containsKey(itemCls)){
if (Random.Float() < ExoticCrystals.consumableExoticChance()){
itemCls = ExoticScroll.regToExo.get(itemCls);
}
}
return ((Item) Reflection.newInstance(itemCls)).random();
}
}