v1.2.0: fixed pharmacophobia still blocking some health potion recipes

This commit is contained in:
Evan Debenham 2022-02-23 13:29:42 -05:00
parent b1a697916c
commit fe581e690f
3 changed files with 2 additions and 7 deletions

View File

@ -260,11 +260,6 @@ public class Blandfruit extends Food {
if (fruit.quantity() >= 1 && fruit.potionAttrib == null
&& seed.quantity() >= 1){
if (Dungeon.isChallenged(Challenges.NO_HEALING)
&& seed instanceof Sungrass.Seed){
return false;
}
return true;
}

View File

@ -60,6 +60,7 @@ public class AlchemicalCatalyst extends Potion {
@Override
public void apply(Hero hero) {
Potion p = Reflection.newInstance(Random.chances(potionChances));
//Don't allow this to roll healing in pharma
while (Dungeon.isChallenged(Challenges.NO_HEALING) && p instanceof PotionOfHealing){
p = Reflection.newInstance(Random.chances(potionChances));
}

View File

@ -514,8 +514,7 @@ public class Potion extends Item {
}
while (result instanceof PotionOfHealing
&& (Dungeon.isChallenged(Challenges.NO_HEALING)
|| Random.Int(10) < Dungeon.LimitedDrops.COOKING_HP.count)) {
&& Random.Int(10) < Dungeon.LimitedDrops.COOKING_HP.count) {
result = (Potion) Generator.randomUsingDefaults(Generator.Category.POTION);
}