v0.7.0: adjusted scroll of psi blast, added scroll of retribution

This commit is contained in:
Evan Debenham 2018-07-22 19:46:22 -04:00
parent 4bc2f3b02d
commit 644e6543ad
14 changed files with 121 additions and 28 deletions

View File

@ -136,6 +136,9 @@ public class ShatteredPixelDungeon extends Game {
com.watabou.utils.Bundle.addAlias(
com.shatteredpixel.shatteredpixeldungeon.items.bombs.Bomb.class,
"com.shatteredpixel.shatteredpixeldungeon.items.Bomb" );
com.watabou.utils.Bundle.addAlias(
com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfRetribution.class,
"com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfPsionicBlast" );
}
@Override

View File

@ -61,7 +61,8 @@ import com.shatteredpixel.shatteredpixeldungeon.items.BrokenSeal;
import com.shatteredpixel.shatteredpixeldungeon.items.armor.glyphs.Brimstone;
import com.shatteredpixel.shatteredpixeldungeon.items.armor.glyphs.Potential;
import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfElements;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfPsionicBlast;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfRetribution;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.exotic.ScrollOfPsionicBlast;
import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfFireblast;
import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfLightning;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Blazing;
@ -598,7 +599,7 @@ public abstract class Char extends Actor {
}
public enum Property{
BOSS ( new HashSet<Class>( Arrays.asList(Grim.class, ScrollOfPsionicBlast.class)),
BOSS ( new HashSet<Class>( Arrays.asList(Grim.class, ScrollOfRetribution.class, ScrollOfPsionicBlast.class)),
new HashSet<Class>( Arrays.asList(Corruption.class) )),
MINIBOSS ( new HashSet<Class>(),
new HashSet<Class>( Arrays.asList(Corruption.class) )),

View File

@ -32,7 +32,8 @@ import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
import com.shatteredpixel.shatteredpixeldungeon.items.Generator;
import com.shatteredpixel.shatteredpixeldungeon.items.Gold;
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfPsionicBlast;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfRetribution;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.exotic.ScrollOfPsionicBlast;
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
import com.shatteredpixel.shatteredpixeldungeon.sprites.MimicSprite;
import com.watabou.noosa.audio.Sample;
@ -178,6 +179,7 @@ public class Mimic extends Mob {
}
{
immunities.add( ScrollOfRetribution.class );
immunities.add( ScrollOfPsionicBlast.class );
}
}

View File

@ -41,7 +41,8 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Vertigo;
import com.shatteredpixel.shatteredpixeldungeon.effects.Pushing;
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.ShadowParticle;
import com.shatteredpixel.shatteredpixeldungeon.items.keys.SkeletonKey;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfPsionicBlast;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfRetribution;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.exotic.ScrollOfPsionicBlast;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Grim;
import com.shatteredpixel.shatteredpixeldungeon.mechanics.Ballistica;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
@ -187,6 +188,7 @@ public class Yog extends Mob {
immunities.add( Sleep.class );
immunities.add( Burning.class );
immunities.add( ToxicGas.class );
immunities.add( ScrollOfRetribution.class );
immunities.add( ScrollOfPsionicBlast.class );
immunities.add( Vertigo.class );
}

View File

@ -77,10 +77,10 @@ import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfIdentify;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfLullaby;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfMagicMapping;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfMirrorImage;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfPsionicBlast;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfRage;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfRecharging;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfRemoveCurse;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfRetribution;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfTeleportation;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfTerror;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfTransmutation;
@ -269,8 +269,8 @@ public class Generator {
ScrollOfMirrorImage.class,
ScrollOfRecharging.class,
ScrollOfLullaby.class,
ScrollOfPsionicBlast.class,
ScrollOfRage.class,
ScrollOfRetribution.class,
ScrollOfTeleportation.class,
ScrollOfTerror.class,
ScrollOfTransmutation.class

View File

@ -42,7 +42,8 @@ import com.shatteredpixel.shatteredpixeldungeon.items.Item;
import com.shatteredpixel.shatteredpixeldungeon.items.armor.Armor;
import com.shatteredpixel.shatteredpixeldungeon.items.armor.glyphs.AntiMagic;
import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfElements;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfPsionicBlast;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfRetribution;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.exotic.ScrollOfPsionicBlast;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.MeleeWeapon;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles.Boomerang;
import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
@ -633,6 +634,7 @@ public class DriedRose extends Artifact {
immunities.add( ToxicGas.class );
immunities.add( CorrosiveGas.class );
immunities.add( Burning.class );
immunities.add( ScrollOfRetribution.class );
immunities.add( ScrollOfPsionicBlast.class );
immunities.add( Corruption.class );
}

View File

@ -73,7 +73,7 @@ public abstract class Scroll extends Item {
ScrollOfTerror.class,
ScrollOfLullaby.class,
ScrollOfTransmutation.class,
ScrollOfPsionicBlast.class,
ScrollOfRetribution.class,
ScrollOfMirrorImage.class
};
@ -263,8 +263,8 @@ public abstract class Scroll extends Item {
stones.put(ScrollOfMirrorImage.class, StoneOfFlock.class);
amnts.put(ScrollOfMirrorImage.class, 3);
stones.put(ScrollOfPsionicBlast.class, StoneOfBlast.class);
amnts.put(ScrollOfPsionicBlast.class, 2);
stones.put(ScrollOfRetribution.class, StoneOfBlast.class);
amnts.put(ScrollOfRetribution.class, 2);
stones.put(ScrollOfRage.class, StoneOfAggression.class);
amnts.put(ScrollOfRage.class, 3);

View File

@ -31,7 +31,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob;
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
import com.watabou.noosa.audio.Sample;
public class ScrollOfPsionicBlast extends Scroll {
public class ScrollOfRetribution extends Scroll {
{
initials = 4;
@ -42,24 +42,25 @@ public class ScrollOfPsionicBlast extends Scroll {
GameScene.flash( 0xFFFFFF );
//scales from 2x to 5x power, maxing at ~10% HP
//scales from 0x to 1x power, maxing at ~10% HP
float hpPercent = (curUser.HT - curUser.HP)/(float)(curUser.HT);
float power = Math.min( 5f, 2f + 3.333f*hpPercent);
float power = Math.min( 4f, 4.45f*hpPercent);
Sample.INSTANCE.play( Assets.SND_BLAST );
Invisibility.dispel();
for (Mob mob : Dungeon.level.mobs.toArray( new Mob[0] )) {
if (Dungeon.level.heroFOV[mob.pos]) {
mob.damage(Math.round(mob.HP * power/5f), this);
//deals 10%HT, plus 0-90%HP based on scaling
mob.damage(Math.round(mob.HT/10f + (mob.HP * power * 0.225f)), this);
if (mob.isAlive()) {
Buff.prolong(mob, Blindness.class, Math.round(2*power));
Buff.prolong(mob, Blindness.class, Math.round(6 + power));
}
}
}
Buff.prolong(curUser, Weakness.class, Weakness.DURATION);
Buff.prolong(curUser, Blindness.class, Math.round(2*power));
Buff.prolong(curUser, Weakness.class, Weakness.DURATION/2f);
Buff.prolong(curUser, Blindness.class, Math.round(6 + power));
Dungeon.observe();
setKnown();

View File

@ -29,10 +29,10 @@ import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfIdentify;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfLullaby;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfMagicMapping;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfMirrorImage;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfPsionicBlast;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfRage;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfRecharging;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfRemoveCurse;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfRetribution;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfTeleportation;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfTerror;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfTransmutation;
@ -83,8 +83,8 @@ public abstract class ExoticScroll extends Scroll {
regToExo.put(ScrollOfMagicMapping.class, ScrollOfPetrification.class);
exoToReg.put(ScrollOfPetrification.class, ScrollOfMagicMapping.class);
regToExo.put(ScrollOfPsionicBlast.class, ScrollOfPetrification.class);
exoToReg.put(ScrollOfPetrification.class, ScrollOfPsionicBlast.class);
regToExo.put(ScrollOfRetribution.class, ScrollOfPsionicBlast.class);
exoToReg.put(ScrollOfPsionicBlast.class, ScrollOfRetribution.class);
regToExo.put(ScrollOfMirrorImage.class, ScrollOfPetrification.class);
exoToReg.put(ScrollOfPetrification.class, ScrollOfMirrorImage.class);

View File

@ -0,0 +1,76 @@
/*
* Pixel Dungeon
* Copyright (C) 2012-2015 Oleg Dolya
*
* Shattered Pixel Dungeon
* Copyright (C) 2014-2018 Evan Debenham
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
*/
package com.shatteredpixel.shatteredpixeldungeon.items.scrolls.exotic;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Blindness;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Invisibility;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Weakness;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
import com.watabou.noosa.audio.Sample;
public class ScrollOfPsionicBlast extends ExoticScroll {
{
initials = 4;
}
@Override
public void doRead() {
GameScene.flash( 0xFFFFFF );
Sample.INSTANCE.play( Assets.SND_BLAST );
Invisibility.dispel();
int targets = 0;
for (Mob mob : Dungeon.level.mobs.toArray( new Mob[0] )) {
if (Dungeon.level.heroFOV[mob.pos]) {
targets ++;
mob.damage(Math.round(mob.HT/2f + mob.HP/2f), this);
if (mob.isAlive()) {
Buff.prolong(mob, Blindness.class, 10);
}
}
}
curUser.damage(Math.max(0, Math.round(curUser.HT*(0.35f - 0.5f*targets))), this);
if (curUser.isAlive()) {
Buff.prolong(curUser, Blindness.class, 10);
Buff.prolong(curUser, Weakness.class, 100);
Dungeon.observe();
readAnimation();
} else {
Dungeon.fail( getClass() );
GLog.n( Messages.get(this, "ondeath") );
}
setKnown();
}
}

View File

@ -44,10 +44,10 @@ import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfLullaby;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfMagicMapping;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfMagicalInfusion;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfMirrorImage;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfPsionicBlast;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfRage;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfRecharging;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfRemoveCurse;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfRetribution;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfTeleportation;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfTerror;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfTransmutation;
@ -105,7 +105,7 @@ public class StoneOfIntuition extends InventoryStone {
ScrollOfLullaby.class,
ScrollOfMagicMapping.class,
ScrollOfMirrorImage.class,
ScrollOfPsionicBlast.class,
ScrollOfRetribution.class,
ScrollOfRage.class,
ScrollOfRecharging.class,
ScrollOfRemoveCurse.class,

View File

@ -71,10 +71,10 @@ import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfIdentify;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfLullaby;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfMagicMapping;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfMirrorImage;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfPsionicBlast;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfRage;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfRecharging;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfRemoveCurse;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfRetribution;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfTeleportation;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfTerror;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfTransmutation;
@ -254,7 +254,7 @@ public enum Catalog {
SCROLLS.seen.put( ScrollOfTerror.class, false);
SCROLLS.seen.put( ScrollOfLullaby.class, false);
SCROLLS.seen.put( ScrollOfRage.class, false);
SCROLLS.seen.put( ScrollOfPsionicBlast.class, false);
SCROLLS.seen.put( ScrollOfRetribution.class, false);
SCROLLS.seen.put( ScrollOfTransmutation.class, false);
}

View File

@ -27,10 +27,10 @@ import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfIdentify;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfLullaby;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfMagicMapping;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfMirrorImage;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfPsionicBlast;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfRage;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfRecharging;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfRemoveCurse;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfRetribution;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfTeleportation;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfTerror;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfTransmutation;
@ -61,7 +61,7 @@ public class SecretLibraryRoom extends SecretRoom {
scrollChances.put( ScrollOfMirrorImage.class, 3f );
scrollChances.put( ScrollOfRecharging.class, 3f );
scrollChances.put( ScrollOfLullaby.class, 4f );
scrollChances.put( ScrollOfPsionicBlast.class, 4f );
scrollChances.put( ScrollOfRetribution.class, 4f );
scrollChances.put( ScrollOfRage.class, 4f );
scrollChances.put( ScrollOfTeleportation.class, 4f );
scrollChances.put( ScrollOfTerror.class, 4f );

View File

@ -724,8 +724,8 @@ items.scrolls.scrollofmagicmapping.desc=When this scroll is read, an image of cr
items.scrolls.scrollofmirrorimage.name=scroll of mirror image
items.scrolls.scrollofmirrorimage.desc=The incantation on this scroll will create two illusory twins of the reader. These mirror images act as weaker clones of the reader, and will chase down their enemies. They have no durability however, and will fade upon taking damage.
items.scrolls.scrollofpsionicblast.name=scroll of psionic blast
items.scrolls.scrollofpsionicblast.desc=This scroll contains destructive energy that can be channeled to assault the minds all visible creatures, blinding and damaging them. The power unleashed by the scroll is chaotic, so it will also blind and weaken the user.\n\nThe more injured the user is, the more powerful the scroll will be. At very low health psionic blast can kill most enemies instantly.
items.scrolls.scrollofretribution.name=scroll of retribution
items.scrolls.scrollofretribution.desc=This scroll contains destructive energy which channels the reader's suffering outward into a blast of power. The weaker the reader is, the more damage they will deal. At very low health this scroll can kill most enemies instantly.\n\nUsing the scroll takes a toll on the user however, blinding and weakening them.
items.scrolls.scrollofrage.name=scroll of rage
items.scrolls.scrollofrage.roar=The scroll emits an enraging roar that echoes throughout the dungeon!
@ -767,6 +767,7 @@ items.scrolls.scrollofupgrade.remove_curse=The scroll of upgrade cleanses the cu
items.scrolls.scrollofupgrade.desc=This scroll will upgrade a single item, improving its quality. A wand will increase in power and number of charges, weapons and armor will deal and block more damage, and the effects of rings will intensify. This scroll is even able to mitigate or sometimes totally dispel curse effects, though it is not as potent as a scroll of remove curse.
###exotic scrolls
items.scrolls.exotic.exoticscroll.kaunan=exotic scroll of KAUNAN
items.scrolls.exotic.exoticscroll.sowilo=exotic scroll of SOWILO
@ -809,6 +810,11 @@ items.scrolls.exotic.scrollofmysticalenergy.desc=
items.scrolls.exotic.scrollofpetrification.name=scroll of petrification
items.scrolls.exotic.scrollofpetrification.desc=A flash of red light will overwhelm all creatures in your field of view with such great terror that they will be frozen on the spot.
items.scrolls.exotic.scrollofpsionicblast.name=scroll of psionic blast
items.scrolls.exotic.scrollofpsionicblast.ondeath=The Psionic Blast tears your mind apart...
items.scrolls.exotic.scrollofpsionicblast.desc=This scroll contains incredible destructive energy that can be channeled to destroy the minds of all visible creatures.\n\nThere is significant feedback however, and the reader will also be damaged, blinded, and weakened. The more targets the scroll hits, the less self-damage will be taken.
###runestones
items.stones.inventorystone.ac_use=USE