@Override public int proc(Char attacker, Char defender, int damage) { //heals 30 hp at base, scaling with enemy HT Buff.affect( defender, Healing.class ).setHeal((int)(0.5f*defender.HT + 30), 0.25f, 0); PotionOfHealing.cure( defender ); if (attacker.alignment == defender.alignment){ return 0; } return super.proc(attacker, defender, damage); }
@Override public int price() { return isKnown() ? 30 * quantity : super.price(); } }
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" +
@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; }
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" +
@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 public int proc(Char attacker, Char defender, int damage) { //heals 30 hp at base, scaling with enemy HT Buff.affect( defender, Healing.class ).setHeal((int)(0.5f*defender.HT + 30), 0.25f, 0); PotionOfHealing.cure( defender ); if (attacker.alignment == defender.alignment){ return 0; } return super.proc(attacker, defender, damage); }
itemsToSpawn.add( new PotionOfHealing() ); for (int i=0; i < 3; i++) itemsToSpawn.add( Generator.random( Generator.Category.POTION ) );
@Override public int price() { return isKnown() ? 30 * quantity : super.price(); } }
@Override public void apply(Hero hero) { Buff.affect( hero, Healing.class ).setHeal((int)(0.8f*hero.HT + 14), 0.25f, 0); PotionOfHealing.cure(hero); Buff.affect(hero, Barrier.class).setShield((int)(0.6f*hero.HT + 10)); }
itemsToSpawn.add( new PotionOfHealing() ); for (int i=0; i < 3; i++) itemsToSpawn.add( Generator.random( Generator.Category.POTION ) );
@Override public void apply(Hero hero) { Buff.affect( hero, Healing.class ).setHeal((int)(0.8f*hero.HT + 14), 0.25f, 0); PotionOfHealing.cure(hero); Buff.affect(hero, Barrier.class).setShield((int)(0.6f*hero.HT + 10)); }
@Override public void apply(Hero hero) { Buff.affect( hero, Healing.class ).setHeal((int)(0.8f*hero.HT + 14), 0.25f, 0); PotionOfHealing.cure(hero); hero.buff(Hunger.class).satisfy(Hunger.STARVING/5f); }
@Override public void apply(Hero hero) { Buff.affect( hero, Healing.class ).setHeal((int)(0.8f*hero.HT + 14), 0.25f, 0); PotionOfHealing.cure(hero); hero.buff(Hunger.class).satisfy(Hunger.STARVING/5f); }
@Override public void shatter(int cell) { if (Dungeon.level.heroFOV[cell]) { Sample.INSTANCE.play( Assets.SND_SHATTER ); splash( cell ); } Char ch = Actor.findChar(cell); if (ch != null){ Buff.affect( ch, Healing.class ).setHeal((int)(0.8f*ch.HT + 14), 0.25f, 0); PotionOfHealing.cure(ch); if (ch instanceof Bee && ch.alignment != curUser.alignment){ ch.alignment = Char.Alignment.ALLY; ((Bee)ch).setPotInfo(-1, null); } } }
@Override public void shatter(int cell) { if (Dungeon.level.heroFOV[cell]) { Sample.INSTANCE.play( Assets.SND_SHATTER ); splash( cell ); } Char ch = Actor.findChar(cell); if (ch != null){ Buff.affect( ch, Healing.class ).setHeal((int)(0.8f*ch.HT + 14), 0.25f, 0); PotionOfHealing.cure(ch); if (ch instanceof Bee && ch.alignment != curUser.alignment){ ch.alignment = Char.Alignment.ALLY; ((Bee)ch).setPotInfo(-1, null); } } }