v2.5.0: filled out final common/uncommon cursed wand effects

This commit is contained in:
Evan Debenham
2024-08-18 15:46:22 -04:00
parent 41422a9147
commit 4c7a5c4aa6
3 changed files with 79 additions and 3 deletions

View File

@@ -254,7 +254,7 @@ actors.buffs.invulnerability.name=invulnerable
actors.buffs.invulnerability.desc=You are suffuse with great protective power, granting you a brief period of invulnerability!\n\nTurns remaining: %s.
actors.buffs.levitation.name=levitating
actors.buffs.levitation.desc=A magical force is levitating you over the ground, making you feel weightless.\n\nWhile levitating you ignore all ground-based effects. Traps won't trigger, water won't put out fire, plants won't be trampled, roots will miss you, and you will hover right over pits. Be careful, as all these things can come into effect the second the levitation ends!\n\nTurns of levitation remaining: %s.
actors.buffs.levitation.desc=A magical force is levitating you over the ground, making you feel weightless.\n\nlevitating characters ignore all ground-based effects. Traps won't trigger, water won't put out fire, plants won't be trampled, roots will miss, and pits will be hovered over. Be careful, as all these things can come into effect the second the levitation ends!\n\nTurns of levitation remaining: %s.
actors.buffs.lifelink.name=life link
actors.buffs.lifelink.desc=This characters's life force is linked to another character nearby. Any damage taken is shared between them.\n\nWhenever this character takes damage, half of it will be dealt to the life link target instead.\n\nTurns of life link remaining: %s, or until the linked character dies.

View File

@@ -1135,7 +1135,7 @@ items.scrolls.exotic.scrollofantimagic.desc=The incantation on this scroll will
items.scrolls.exotic.scrollofchallenge.name=scroll of challenge
items.scrolls.exotic.scrollofchallenge.desc=When read aloud, this scroll will unleash a great roar that draws enemies to the user while simultaneously creating a small arena around them.\n\nAs long as the reader stays in this arena they will take 33% less damage from all sources (this is applied before other forms of damage reduction), and they will not lose satiety.\n\nThe size of the arena will scale with the size of the area the reader is in. It will be particularly small in some boss areas.
items.scrolls.exotic.scrollofchallenge$challengearena.name=challenge arena
items.scrolls.exotic.scrollofchallenge$challengearena.desc=A scroll of challenge has created an arena around you, denoted by a billowing red fog.\n\nWhile standing in the fog, your hunger will not increase and you will take 33%% less damage from all sources. If you have any other sources of damage reduction (such as armor), they will apply after the 33%% reduction.\n\nTurns remaining: %d.
items.scrolls.exotic.scrollofchallenge$challengearena.desc=A magical arena has appeared around you, denoted by a billowing red fog.\n\nWhile standing in the fog, your hunger will not increase and you will take 33%% less damage from all sources. If you have any other sources of damage reduction (such as armor), they will apply after the 33%% reduction.\n\nTurns remaining: %d.
items.scrolls.exotic.scrollofdivination.name=scroll of divination
items.scrolls.exotic.scrollofdivination.nothing_left=There is nothing left to identify!

View File

@@ -42,6 +42,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Burning;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Frost;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.HeroDisguise;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Hex;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Levitation;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Ooze;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Paralysis;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Poison;
@@ -51,6 +52,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.TimeStasis;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.GoldenMimic;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mimic;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.NPC;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.Sheep;
import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter;
@@ -71,6 +73,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.bombs.Bomb;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfMirrorImage;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfRecharging;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfTeleportation;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.exotic.ScrollOfChallenge;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.exotic.ScrollOfMetamorphosis;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.exotic.ScrollOfSirensSong;
import com.shatteredpixel.shatteredpixeldungeon.items.trinkets.WondrousResin;
@@ -99,6 +102,7 @@ import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
import com.shatteredpixel.shatteredpixeldungeon.windows.WndOptions;
import com.watabou.noosa.Game;
import com.watabou.noosa.audio.Sample;
import com.watabou.utils.BArray;
import com.watabou.utils.Callback;
import com.watabou.utils.PathFinder;
import com.watabou.utils.Point;
@@ -193,6 +197,7 @@ public class CursedWand {
COMMON_EFFECTS.add(new RandomAreaEffect());
COMMON_EFFECTS.add(new Bubbles());
COMMON_EFFECTS.add(new RandomWand());
COMMON_EFFECTS.add(new SelfOoze());
}
public static CursedEffect randomCommonEffect(){
@@ -343,7 +348,7 @@ public class CursedWand {
@Override
public boolean valid(Item origin, Char user, Ballistica bolt, boolean positiveOnly) {
//TODO we have this limit atm because some wands are coded to depend on their fx logic
//we have this limit atm because some wands are coded to depend on their fx logic
// and chaos elementals trigger the effect directly, with no FX first
return super.valid(origin, user, bolt, positiveOnly) && user instanceof Hero;
}
@@ -373,6 +378,31 @@ public class CursedWand {
}
}
public static class SelfOoze extends CursedEffect{
@Override
public void FX(Item origin, Char user, Ballistica bolt, Callback callback) {
callback.call(); //no fx
}
@Override
public boolean effect(Item origin, Char user, Ballistica bolt, boolean positiveOnly) {
PathFinder.buildDistanceMap(user.pos, BArray.not( Dungeon.level.solid, null ), 2 );
for (int i = 0; i < PathFinder.distance.length; i++) {
if (PathFinder.distance[i] < Integer.MAX_VALUE) {
Splash.at( i, 0x000000, 5);
Char ch = Actor.findChar( i );
//does not harm hero or allies when positive only
if (ch != null && (!positiveOnly || ch.alignment != Char.Alignment.ALLY)){
Buff.affect(ch, Ooze.class).set( Ooze.DURATION );
}
}
}
Sample.INSTANCE.play(Assets.Sounds.SHATTER);
return true;
}
}
//************************
//*** Uncommon Effects ***
//************************
@@ -385,6 +415,8 @@ public class CursedWand {
UNCOMMON_EFFECTS.add(new LightningBolt());
UNCOMMON_EFFECTS.add(new Geyser());
UNCOMMON_EFFECTS.add(new SummonSheep());
UNCOMMON_EFFECTS.add(new Levitate());
UNCOMMON_EFFECTS.add(new Alarm());
}
public static CursedEffect randomUncommonEffect(){
@@ -579,6 +611,50 @@ public class CursedWand {
}
}
public static class Levitate extends CursedEffect {
@Override
public boolean valid(Item origin, Char user, Ballistica bolt, boolean positiveOnly) {
return positiveOnly || Actor.findChar(bolt.collisionPos) != null;
}
@Override
public boolean effect(Item origin, Char user, Ballistica bolt, boolean positiveOnly) {
if (!positiveOnly) {
Char ch = Actor.findChar(bolt.collisionPos);
if (ch != null){
Buff.affect(ch, Levitation.class, Levitation.DURATION);
}
} else {
Buff.affect(user, Levitation.class, Levitation.DURATION);
}
return true;
}
}
public static class Alarm extends CursedEffect {
@Override
public void FX(Item origin, Char user, Ballistica bolt, Callback callback) {
callback.call(); //no vfx
}
@Override
public boolean effect(Item origin, Char user, Ballistica bolt, boolean positiveOnly) {
for (Mob mob : Dungeon.level.mobs) {
mob.beckon( user.pos );
}
user.sprite.centerEmitter().start( Speck.factory( Speck.SCREAM ), 0.3f, 3 );
if (!positiveOnly){
Buff.affect(user, ScrollOfChallenge.ChallengeArena.class).setup(user.pos);
Sample.INSTANCE.play( Assets.Sounds.CHALLENGE );
} else {
Sample.INSTANCE.play(Assets.Sounds.ALERT);
}
return true;
}
}
//********************
//*** Rare Effects ***
//********************