v0.9.0: reworked the Pharmacophobia challenge
This commit is contained in:
parent
4ed1a33cb0
commit
2a7b94d51d
|
@ -615,6 +615,7 @@ items.potions.potionofhaste.desc=Drinking this oddly sweet liquid will imbue you
|
|||
|
||||
items.potions.potionofhealing.name=potion of healing
|
||||
items.potions.potionofhealing.heal=Your wounds begin to close.
|
||||
items.potions.potionofhealing.poison=You feel sick!
|
||||
items.potions.potionofhealing.desc=This elixir will rapidly restore your health and instantly cure many ailments.
|
||||
|
||||
items.potions.potionofinvisibility.name=potion of invisibility
|
||||
|
|
|
@ -70,11 +70,11 @@ badges$badge.unlock_rogue=Unlocked the Rogue
|
|||
badges$badge.unlock_huntress=Unlocked the Huntress
|
||||
|
||||
challenges.no_food=On diet
|
||||
challenges.no_food_desc=Food's already scarce, but you have to watch your portions as welL!\n\n- Food and the horn of plenty are one third as effective at satisfying hunger\n- Other sources of satiety are unaffected
|
||||
challenges.no_food_desc=Food's already scarce, but you have to watch your portions as well!\n\n- Food and the horn of plenty are one third as effective at satisfying hunger\n- Other sources of satiety are unaffected
|
||||
challenges.no_armor=Faith is my armor
|
||||
challenges.no_armor_desc=Take on the dungeon with nothing but some cloth to protect you!\n\n- All armor except starting cloth is removed
|
||||
challenges.no_healing=Pharmacophobia
|
||||
challenges.no_healing_desc=Without healing potions, you'll need to rely on alternate healing sources to survive\n\n- Potions of healing are removed
|
||||
challenges.no_healing_desc=Healing potions sure are handy, unfortunately you're allergic!\n\n- Potions of healing, and items made using potions of healing, poison the hero instead of healing them\n- Alchemical catalysts cannot randomly poison or heal the hero\n- These items still work normally for other characters
|
||||
challenges.no_herbalism=Barren land
|
||||
challenges.no_herbalism_desc=There seems to be no clean water left in this accursed dungeon...\n\n- Dew drops are removed\n- Plants are removed\n- Seeds still appear, but will not take root
|
||||
challenges.swarm_intelligence=Swarm intelligence
|
||||
|
|
|
@ -26,8 +26,6 @@ import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.items.armor.Armor;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.armor.ClassArmor;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.armor.ClothArmor;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.food.Blandfruit;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfHealing;
|
||||
|
||||
public class Challenges {
|
||||
|
||||
|
@ -64,15 +62,6 @@ public class Challenges {
|
|||
}
|
||||
}
|
||||
|
||||
if (Dungeon.isChallenged(NO_HEALING)){
|
||||
if (item instanceof PotionOfHealing){
|
||||
return true;
|
||||
} else if (item instanceof Blandfruit
|
||||
&& ((Blandfruit) item).potionAttrib instanceof PotionOfHealing){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (Dungeon.isChallenged(NO_HERBALISM)){
|
||||
if (item instanceof Dewdrop) {
|
||||
return true;
|
||||
|
|
|
@ -26,8 +26,6 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Blob;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Regrowth;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Healing;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.Splash;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Generator;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfHealing;
|
||||
|
@ -72,8 +70,8 @@ public class RegrowthBomb extends Bomb {
|
|||
if (ch != null){
|
||||
if (ch.alignment == Dungeon.hero.alignment) {
|
||||
//same as a healing potion
|
||||
Buff.affect( ch, Healing.class ).setHeal((int)(0.8f*ch.HT + 14), 0.25f, 0);
|
||||
PotionOfHealing.cure(ch);
|
||||
PotionOfHealing.heal(ch);
|
||||
}
|
||||
} else if ( Dungeon.level.map[i] == Terrain.EMPTY ||
|
||||
Dungeon.level.map[i] == Terrain.EMBERS ||
|
||||
|
|
|
@ -21,6 +21,8 @@
|
|||
|
||||
package com.shatteredpixel.shatteredpixeldungeon.items.potions;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Challenges;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.potions.exotic.ExoticPotion;
|
||||
|
@ -58,6 +60,9 @@ public class AlchemicalCatalyst extends Potion {
|
|||
@Override
|
||||
public void apply(Hero hero) {
|
||||
Potion p = Reflection.newInstance(Random.chances(potionChances));
|
||||
while (Dungeon.isChallenged(Challenges.NO_HEALING) && p instanceof PotionOfHealing){
|
||||
p = Reflection.newInstance(Random.chances(potionChances));
|
||||
}
|
||||
p.anonymize();
|
||||
p.apply(hero);
|
||||
}
|
||||
|
|
|
@ -21,6 +21,8 @@
|
|||
|
||||
package com.shatteredpixel.shatteredpixeldungeon.items.potions;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Challenges;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Bleeding;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Blindness;
|
||||
|
@ -49,10 +51,26 @@ public class PotionOfHealing extends Potion {
|
|||
@Override
|
||||
public void apply( Hero hero ) {
|
||||
setKnown();
|
||||
//starts out healing 30 hp, equalizes with hero health total at level 11
|
||||
Buff.affect( hero, Healing.class ).setHeal((int)(0.8f*hero.HT + 14), 0.25f, 0);
|
||||
cure( hero );
|
||||
GLog.p( Messages.get(this, "heal") );
|
||||
heal( hero );
|
||||
}
|
||||
|
||||
public static void heal( Char ch ){
|
||||
if (ch == Dungeon.hero && Dungeon.isChallenged(Challenges.NO_HEALING)){
|
||||
pharmacophobiaProc(Dungeon.hero);
|
||||
GLog.p( Messages.get(PotionOfHealing.class, "poison") );
|
||||
} else {
|
||||
//starts out healing 30 hp, equalizes with hero health total at level 11
|
||||
Buff.affect(ch, Healing.class).setHeal((int) (0.8f * ch.HT + 14), 0.25f, 0);
|
||||
if (ch == Dungeon.hero){
|
||||
GLog.p( Messages.get(PotionOfHealing.class, "heal") );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void pharmacophobiaProc( Hero hero ){
|
||||
// harms the hero for ~40% of their max HP in poison
|
||||
Buff.affect( hero, Poison.class).set(4 + hero.lvl/2);
|
||||
}
|
||||
|
||||
public static void cure( Char ch ) {
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
|
||||
package com.shatteredpixel.shatteredpixeldungeon.items.potions.elixirs;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Challenges;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||
|
@ -44,7 +45,11 @@ public class ElixirOfAquaticRejuvenation extends Elixir {
|
|||
|
||||
@Override
|
||||
public void apply(Hero hero) {
|
||||
Buff.affect(hero, AquaHealing.class).set(Math.round(hero.HT * 1.5f));
|
||||
if (Dungeon.isChallenged(Challenges.NO_HEALING)){
|
||||
PotionOfHealing.pharmacophobiaProc(hero);
|
||||
} else {
|
||||
Buff.affect(hero, AquaHealing.class).set(Math.round(hero.HT * 1.5f));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -26,7 +26,6 @@ import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Healing;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Hunger;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Bee;
|
||||
|
@ -43,8 +42,8 @@ public class ElixirOfHoneyedHealing extends Elixir {
|
|||
|
||||
@Override
|
||||
public void apply(Hero hero) {
|
||||
Buff.affect( hero, Healing.class ).setHeal((int)(0.8f*hero.HT + 14), 0.25f, 0);
|
||||
PotionOfHealing.cure(hero);
|
||||
PotionOfHealing.heal(hero);
|
||||
Buff.affect(hero, Hunger.class).satisfy(Hunger.STARVING/5f);
|
||||
}
|
||||
|
||||
|
@ -57,12 +56,11 @@ public class ElixirOfHoneyedHealing extends Elixir {
|
|||
|
||||
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);
|
||||
PotionOfHealing.heal(ch);
|
||||
if (ch instanceof Bee && ch.alignment != curUser.alignment){
|
||||
ch.alignment = Char.Alignment.ALLY;
|
||||
((Bee)ch).setPotInfo(-1, null);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,9 +21,12 @@
|
|||
|
||||
package com.shatteredpixel.shatteredpixeldungeon.items.potions.exotic;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Challenges;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Barrier;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfHealing;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
||||
|
||||
public class PotionOfShielding extends ExoticPotion {
|
||||
|
@ -35,8 +38,12 @@ public class PotionOfShielding extends ExoticPotion {
|
|||
@Override
|
||||
public void apply(Hero hero) {
|
||||
setKnown();
|
||||
|
||||
//~75% of a potion of healing
|
||||
Buff.affect(hero, Barrier.class).setShield((int)(0.6f*hero.HT + 10));
|
||||
|
||||
if (Dungeon.isChallenged(Challenges.NO_HEALING)){
|
||||
PotionOfHealing.pharmacophobiaProc(hero);
|
||||
} else {
|
||||
//~75% of a potion of healing
|
||||
Buff.affect(hero, Barrier.class).setShield((int) (0.6f * hero.HT + 10));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,8 +37,8 @@ public class HealingDart extends TippedDart {
|
|||
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 );
|
||||
Buff.affect( defender, Healing.class ).setHeal((int)(0.5f*defender.HT + 30), 0.25f, 0);
|
||||
|
||||
if (attacker.alignment == defender.alignment){
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue
Block a user