@Override protected Item createLoot() { //first see if we drop armor, overall chance is 1/8 if (Random.Int(2) == 0){ 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 1/8 * (6-potions dropped)/6 //with 0 potions dropped that simplifies to 1/8 } else { if (Random.Float() < ((6f - Dungeon.LimitedDrops.GUARD_HP.count) / 6f)){ Dungeon.LimitedDrops.GUARD_HP.count++; return new PotionOfHealing(); } } return null; }
@Override protected Item createLoot() { //first see if we drop armor, overall chance is 1/8 if (Random.Int(2) == 0){ 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 1/8 * (6-potions dropped)/6 //with 0 potions dropped that simplifies to 1/8 } else { if (Random.Float() < ((6f - Dungeon.LimitedDrops.GUARD_HP.count) / 6f)){ Dungeon.LimitedDrops.GUARD_HP.count++; return new PotionOfHealing(); } } return null; }
itemsToSpawn.add( new PotionOfHealing() ); for (int i=0; i < 3; i++) itemsToSpawn.add( Generator.random( Generator.Category.POTION ) );
itemsToSpawn.add( new PotionOfHealing() ); for (int i=0; i < 3; i++) itemsToSpawn.add( Generator.random( Generator.Category.POTION ) );
private static void initWarrior( Hero hero ) { (hero.belongings.weapon = new WornShortsword()).identify(); ThrowingStone stones = new ThrowingStone(); stones.identify().quantity(3).collect(); Dungeon.quickslot.setSlot(0, stones); if (hero.belongings.armor != null){ hero.belongings.armor.affixSeal(new BrokenSeal()); } new PotionBandolier().collect(); Dungeon.LimitedDrops.POTION_BANDOLIER.drop(); new PotionOfHealing().identify(); new ScrollOfRage().identify(); }
private static void initWarrior( Hero hero ) { (hero.belongings.weapon = new WornShortsword()).identify(); ThrowingStone stones = new ThrowingStone(); stones.identify().quantity(3).collect(); Dungeon.quickslot.setSlot(0, stones); if (hero.belongings.armor != null){ hero.belongings.armor.affixSeal(new BrokenSeal()); } new PotionBandolier().collect(); Dungeon.LimitedDrops.POTION_BANDOLIER.drop(); new PotionOfHealing().identify(); new ScrollOfRage().identify(); }
"Scroll of psionic blast still exists however. It is now an exotic scroll!")); changes.addButton( new ChangeButton(new ItemSprite(ItemSpriteSheet.POTION_CRIMSON, null), new PotionOfHealing().trueName(), "_-_ Speed of healing effects (e.g. potion of healing) have been reduced slightly. Overall heal amounts unchanged.")); "_-_ Earthroot now blocks up to a certain amount of damage, based on depth, rather than 50% damage")); changes.addButton( new ChangeButton( new ItemSprite(ItemSpriteSheet.POTION_CRIMSON, null), new PotionOfHealing().trueName(), "Heal potion drops have had their RNG bounded in shattered for a long time, but this bound was always fairly lax. This meant that people who wanted to slowly farm for potions could still amass large numbers of them. I have decided to reign this in more harshly.\n" + "\n" + "_-_ Now has a chance to generate extra loot when defeating enemies.\n\n" + "I'm planning to make further tweaks to this item in future updates.")); changes.addButton( new ChangeButton( new ItemSprite(ItemSpriteSheet.POTION_CRIMSON, null), new PotionOfHealing().trueName(), "Health Potions are getting a changeup to make hoarding and chugging them less effective, and to encourage a bit more strategy than to just drink them on the verge of death.\n\n" + "_-_ Health potions now heal in a burst that fades over time, rather than instantly.\n\n" +
"Scroll of psionic blast still exists however. It is now an exotic scroll!")); changes.addButton( new ChangeButton(new ItemSprite(ItemSpriteSheet.POTION_CRIMSON, null), new PotionOfHealing().trueName(), "_-_ Speed of healing effects (e.g. potion of healing) have been reduced slightly. Overall heal amounts unchanged.")); "_-_ Earthroot now blocks up to a certain amount of damage, based on depth, rather than 50% damage")); changes.addButton( new ChangeButton( new ItemSprite(ItemSpriteSheet.POTION_CRIMSON, null), new PotionOfHealing().trueName(), "Heal potion drops have had their RNG bounded in shattered for a long time, but this bound was always fairly lax. This meant that people who wanted to slowly farm for potions could still amass large numbers of them. I have decided to reign this in more harshly.\n" + "\n" + "_-_ Now has a chance to generate extra loot when defeating enemies.\n\n" + "I'm planning to make further tweaks to this item in future updates.")); changes.addButton( new ChangeButton( new ItemSprite(ItemSpriteSheet.POTION_CRIMSON, null), new PotionOfHealing().trueName(), "Health Potions are getting a changeup to make hoarding and chugging them less effective, and to encourage a bit more strategy than to just drink them on the verge of death.\n\n" + "_-_ Health potions now heal in a burst that fades over time, rather than instantly.\n\n" +