v1.2.0: balance changes to plants, seeds, and darts

This commit is contained in:
Evan Debenham 2022-03-04 14:30:55 -05:00
parent 13548eb423
commit 946f17a09a
14 changed files with 79 additions and 66 deletions

View File

@ -726,7 +726,7 @@ items.potions.exotic.exoticpotion.no=No, I changed my mind
items.potions.exotic.potionofcleansing.name=potion of cleansing
items.potions.exotic.potionofcleansing.desc=This powerful reagent will render the drinker immune to all harmful effects for a few turns when quaffed. It can be thrown at a target to cleanse them as well.
items.potions.exotic.potionofcleansing$cleanse.name=Cleansed
items.potions.exotic.potionofcleansing$cleanse.desc=A potion of cleansing is granting this character temporary immunity from all harmful effects!\n\nTurns remaining: %s.
items.potions.exotic.potionofcleansing$cleanse.desc=This character is temporarily immune to all harmful effects!\n\nTurns remaining: %s.
items.potions.exotic.potionofcorrosivegas.name=potion of corrosive gas
items.potions.exotic.potionofcorrosivegas.desc=Uncorking or shattering this pressurized glass will cause its contents to explode into a deadly cloud of corrosive rust-colored gas. The gas spreads more quickly than toxic gas and is more deadly, but also won't last as long.
@ -1547,6 +1547,9 @@ items.weapon.missiles.darts.blindingdart.desc=These darts are tipped with a blin
items.weapon.missiles.darts.chillingdart.name=chilling dart
items.weapon.missiles.darts.chillingdart.desc=These darts are tipped with an icecap-based compound which will significantly chill their target.
items.weapon.missiles.darts.cleansingdart.name=cleansing dart
items.weapon.missiles.darts.cleansingdart.desc=These darts are tipped with a dreamfoil-based compound which will temporarily make their target immune to all negative effects. The dart itself is still harmful to enemies, but will not harm allies.
items.weapon.missiles.darts.dart.name=dart
items.weapon.missiles.darts.dart.ac_tip=TIP
items.weapon.missiles.darts.dart.prompt=Select a seed
@ -1578,14 +1581,11 @@ items.weapon.missiles.darts.poisondart.name=poison dart
items.weapon.missiles.darts.poisondart.desc=These darts are tipped with a sorrowmoss-based compound which will poison their target.
items.weapon.missiles.darts.rotdart.name=rot dart
items.weapon.missiles.darts.rotdart.desc=These wicked darts are tipped with an acidic rotberry-based compound, which will aggressively eat through anything the dart comes into contact with. Powerful foes will resist most of the effect, but the corrosion is strong enough to easily kill most standard enemies. Unfortunately, the compound is unstable, and will always expire after a single use.
items.weapon.missiles.darts.rotdart.desc=These wicked darts are tipped with an acidic rotberry-based compound, which will aggressively eat through anything the dart comes into contact with. Powerful foes will resist most of the effect, but the corrosion is strong enough to easily kill most standard enemies. These last longer than other tipped darts, but their durability cannot be boosted.
items.weapon.missiles.darts.shockingdart.name=shocking dart
items.weapon.missiles.darts.shockingdart.desc=These darts are tipped with a stormvine-based compound which will deliver a nasty shock to their target.
items.weapon.missiles.darts.sleepdart.name=sleep dart
items.weapon.missiles.darts.sleepdart.desc=These darts are tipped with a dreamfoil-based compound which will instantly put their target into a light sleep.
items.weapon.missiles.darts.tippeddart.ac_clean=CLEAN
items.weapon.missiles.darts.tippeddart.clean_title=Clean Darts
items.weapon.missiles.darts.tippeddart.clean_desc=This action will remove the seed tipping on your darts, reverting them back to regular darts.

View File

@ -9,7 +9,7 @@ plants.blindweed$seed.name=seed of blindweed
plants.dreamfoil.name=dreamfoil
plants.dreamfoil.refreshed=You feel refreshed.
plants.dreamfoil.desc=The dreamfoil's prickly flowers contain a chemical which is known for its properties as a strong neutralizing agent. Most weaker creatures are overwhelmed and knocked unconscious, which gives the plant its namesake.
plants.dreamfoil.desc=The dreamfoil's prickly flowers contain a chemical which is known for its properties as a strong neutralizing agent. Anything that steps in this plant will be cleansed of many negative effects.
plants.dreamfoil.warden_desc=In addition to the neutralizing effect, _the Warden_ will become temporarily immune to all area-bound effects when stepping on dreamfoil.
plants.dreamfoil$seed.name=seed of dreamfoil

View File

@ -47,6 +47,11 @@ public class ShatteredPixelDungeon extends Game {
public ShatteredPixelDungeon( PlatformSupport platform ) {
super( sceneClass == null ? WelcomeScene.class : sceneClass, platform );
//v1.2.0
com.watabou.utils.Bundle.addAlias(
com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles.darts.CleansingDart.class,
"com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles.darts.SleepDart" );
//v1.1.0
com.watabou.utils.Bundle.addAlias(
com.shatteredpixel.shatteredpixeldungeon.items.scrolls.exotic.ScrollOfDread.class,

View File

@ -68,6 +68,10 @@ public class PotionOfCleansing extends ExoticPotion {
}
public static void cleanse(Char ch){
cleanse(ch, Cleanse.DURATION);
}
public static void cleanse(Char ch, float duration){
for (Buff b : ch.buffs()){
if (b.type == Buff.buffType.NEGATIVE
&& !(b instanceof AllyBuff)
@ -78,7 +82,7 @@ public class PotionOfCleansing extends ExoticPotion {
((Hunger) b).satisfy(Hunger.STARVING);
}
}
Buff.affect(ch, Cleanse.class, Cleanse.DURATION);
Buff.affect(ch, Cleanse.class, duration);
}
public static class Cleanse extends FlavourBuff {

View File

@ -35,7 +35,7 @@ public class AdrenalineDart extends TippedDart {
@Override
public int proc(Char attacker, Char defender, int damage) {
Buff.prolong( defender, Adrenaline.class, Adrenaline.DURATION);
Buff.prolong( defender, Adrenaline.class, 3*Adrenaline.DURATION);
if (attacker.alignment == defender.alignment){
return 0;

View File

@ -22,28 +22,23 @@
package com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles.darts;
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.FlavourBuff;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Sleep;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.exotic.PotionOfCleansing;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
public class SleepDart extends TippedDart {
public class CleansingDart extends TippedDart {
{
image = ItemSpriteSheet.SLEEP_DART;
image = ItemSpriteSheet.CLEANSING_DART;
}
@Override
public int proc(Char attacker, final Char defender, int damage) {
//need to delay this so damage from the dart doesn't break the sleep
new FlavourBuff(){
{actPriority = VFX_PRIO;}
public boolean act() {
Buff.affect( defender, Sleep.class );
return super.act();
PotionOfCleansing.cleanse(defender, PotionOfCleansing.Cleanse.DURATION*2f);
if (attacker.alignment == defender.alignment){
return 0;
}
}.attachTo(defender);
return super.proc(attacker, defender, damage);
}

View File

@ -24,6 +24,8 @@ package com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles.darts;
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.items.artifacts.TalismanOfForesight;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfTeleportation;
import com.shatteredpixel.shatteredpixeldungeon.mechanics.ShadowCaster;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
@ -40,50 +42,58 @@ public class DisplacingDart extends TippedDart {
image = ItemSpriteSheet.DISPLACING_DART;
}
int distance = 8;
@Override
public int proc(Char attacker, Char defender, int damage) {
//attempts to teleport the enemy to a position 8-10 cells away from the hero
//prioritizes the closest visible cell to the defender, or closest non-visible if no visible are present
//grants vision on the defender if teleport goes to non-visible
if (!defender.properties().contains(Char.Property.IMMOVABLE)){
int startDist = Dungeon.level.distance(attacker.pos, defender.pos);
ArrayList<Integer> visiblePositions = new ArrayList<>();
ArrayList<Integer> nonVisiblePositions = new ArrayList<>();
HashMap<Integer, ArrayList<Integer>> positions = new HashMap<>();
PathFinder.buildDistanceMap(defender.pos, BArray.or(Dungeon.level.passable, Dungeon.level.avoid, null));
PathFinder.buildDistanceMap(attacker.pos, BArray.or(Dungeon.level.passable, Dungeon.level.avoid, null));
for (int pos = 0; pos < Dungeon.level.length(); pos++){
if (Dungeon.level.heroFOV[pos]
&& Dungeon.level.passable[pos]
&& PathFinder.distance[pos] != Integer.MAX_VALUE
if (Dungeon.level.passable[pos]
&& PathFinder.distance[pos] >= 8
&& PathFinder.distance[pos] <= 10
&& (!Char.hasProp(defender, Char.Property.LARGE) || Dungeon.level.openSpace[pos])
&& Actor.findChar(pos) == null){
int dist = Dungeon.level.distance(attacker.pos, pos);
if (dist > startDist){
if (positions.get(dist) == null){
positions.put(dist, new ArrayList<Integer>());
}
positions.get(dist).add(pos);
if (Dungeon.level.heroFOV[pos]){
visiblePositions.add(pos);
} else {
nonVisiblePositions.add(pos);
}
}
}
float[] probs = new float[distance+1];
int chosenPos = -1;
for (int i = 0; i <= distance; i++){
if (positions.get(i) != null){
probs[i] = i - startDist;
if (!visiblePositions.isEmpty()) {
for (int pos : visiblePositions) {
if (chosenPos == -1 || Dungeon.level.trueDistance(defender.pos, chosenPos)
> Dungeon.level.trueDistance(defender.pos, pos)){
chosenPos = pos;
}
}
} else {
for (int pos : nonVisiblePositions) {
if (chosenPos == -1 || Dungeon.level.trueDistance(defender.pos, chosenPos)
> Dungeon.level.trueDistance(defender.pos, pos)){
chosenPos = pos;
}
}
}
int chosenDist = Random.chances(probs);
if (chosenDist != -1){
int pos = positions.get(chosenDist).get(Random.index(positions.get(chosenDist)));
ScrollOfTeleportation.appear( defender, pos );
if (chosenPos != -1){
ScrollOfTeleportation.appear( defender, chosenPos );
if (!Dungeon.level.heroFOV[chosenPos]){
Buff.affect(attacker, TalismanOfForesight.CharAwareness.class, 5f).charID = defender.id();
}
Dungeon.level.occupyCell(defender );
}

View File

@ -35,7 +35,7 @@ public class HolyDart extends TippedDart {
@Override
public int proc(Char attacker, Char defender, int damage) {
Buff.affect(defender, Bless.class, Bless.DURATION);
Buff.affect(defender, Bless.class, Math.round(3.33f*Bless.DURATION));
if (attacker.alignment == defender.alignment){
return 0;

View File

@ -36,7 +36,7 @@ public class PoisonDart extends TippedDart {
@Override
public int proc(Char attacker, Char defender, int damage) {
Buff.affect( defender, Poison.class ).set( 3 + Dungeon.depth / 3 );
Buff.affect( defender, Poison.class ).set( 3 + Dungeon.depth / 2 );
return super.proc(attacker, defender, damage);
}

View File

@ -49,6 +49,6 @@ public class RotDart extends TippedDart {
@Override
public float durabilityPerUse() {
return 100f;
return 20f;
}
}

View File

@ -22,6 +22,7 @@
package com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles.darts;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.effects.Lightning;
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
@ -41,7 +42,7 @@ public class ShockingDart extends TippedDart {
@Override
public int proc(Char attacker, Char defender, int damage) {
defender.damage(Random.NormalIntRange(8, 12), this);
defender.damage(Random.NormalIntRange(5 + Dungeon.depth/4, 10 + Dungeon.depth/4), this);
CharSprite s = defender.sprite;
if (s != null && s.parent != null) {

View File

@ -173,7 +173,7 @@ public abstract class TippedDart extends Dart {
private static HashMap<Class<?extends Plant.Seed>, Class<?extends TippedDart>> types = new HashMap<>();
static {
types.put(Blindweed.Seed.class, BlindingDart.class);
types.put(Dreamfoil.Seed.class, SleepDart.class);
types.put(Dreamfoil.Seed.class, CleansingDart.class);
types.put(Earthroot.Seed.class, ParalyticDart.class);
types.put(Fadeleaf.Seed.class, DisplacingDart.class);
types.put(Firebloom.Seed.class, IncendiaryDart.class);

View File

@ -44,16 +44,14 @@ public class Dreamfoil extends Plant {
public void activate( Char ch ) {
if (ch != null) {
if (ch instanceof Mob) {
Buff.affect(ch, MagicalSleep.class);
} else if (ch instanceof Hero){
GLog.i( Messages.get(this, "refreshed") );
PotionOfHealing.cure(ch);
if (ch instanceof Hero) {
GLog.i( Messages.get(this, "refreshed") );
if (((Hero) ch).subClass == HeroSubClass.WARDEN){
Buff.affect(ch, BlobImmunity.class, BlobImmunity.DURATION/2f);
}
}
}
}

View File

@ -332,7 +332,7 @@ public class ItemSpriteSheet {
public static final int CHILLING_DART = TIPPED_DARTS+4;
public static final int SHOCKING_DART = TIPPED_DARTS+5;
public static final int POISON_DART = TIPPED_DARTS+6;
public static final int SLEEP_DART = TIPPED_DARTS+7;
public static final int CLEANSING_DART = TIPPED_DARTS+7;
public static final int PARALYTIC_DART = TIPPED_DARTS+8;
public static final int HOLY_DART = TIPPED_DARTS+9;
public static final int DISPLACING_DART = TIPPED_DARTS+10;