v3.0.0: added the holy lance spell
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 7.2 KiB After Width: | Height: | Size: 7.2 KiB |
@@ -568,6 +568,13 @@ actors.hero.spells.guidinglight.desc_priest=_This spell is more powerful when ca
|
||||
actors.hero.spells.guidinglight$guidinglightpriestcooldown.name=Guiding Light
|
||||
actors.hero.spells.guidinglight$guidinglightpriestcooldown.desc=The Priest will be able to cast Guiding Light for free again after 100 turns elapse.\n\nTurns remaining: %s.
|
||||
|
||||
actors.hero.spells.holylance.name=holy lance
|
||||
actors.hero.spells.holylance.prompt=Choose a target
|
||||
actors.hero.spells.holylance.short_desc=Deals heavy ranged magic damage.
|
||||
actors.hero.spells.holylance.desc=The Priest concentrates a large amount of energy into a devastating thrown lance made of light. This lance deals %1$d-%2$d damage and always deals maximum damage to undead and demonic targets.\n\nThis spell is very expensive, and has a cooldown of 50 turns.
|
||||
actors.hero.spells.holylance$lancecooldown.name=holy lance cooldown
|
||||
actors.hero.spells.holylance$lancecooldown.desc=The Priest has recently cast Holy Lance, and must wait before casting it again.\n\nTurns remaining: %s.
|
||||
|
||||
actors.hero.spells.holyward.name=holy ward
|
||||
actors.hero.spells.holyward.glyph_name=%s of light
|
||||
actors.hero.spells.holyward.glyph_desc=This glyph slightly increases the amount of damage armor can block.
|
||||
@@ -1064,8 +1071,8 @@ actors.hero.talent.clerict3a.desc=This talent hasn't been implemented yet, it cu
|
||||
actors.hero.talent.light_reading.title=Light Reading
|
||||
actors.hero.talent.light_reading.desc=_+1:_ The Cleric can use his holy tome when it is not equipped, but it recharges at _25% speed_ when unequipped.\n\n_+2:_ The Cleric can use his holy tome when it is not equipped, but it recharges at _50% speed_ when unequipped.\n\n_+3:_ The Cleric can use his holy tome when it is not equipped, but it recharges at _75% speed_ when unequipped.
|
||||
|
||||
actors.hero.talent.priestt3a.title=Unknown
|
||||
actors.hero.talent.priestt3a.desc=This talent hasn't been implemented yet, it currently does nothing.
|
||||
actors.hero.talent.holy_lance.title=Holy Lance
|
||||
actors.hero.talent.holy_lance.desc=_+1:_ The Priest can cast _Holy Lance,_ a devastating spell that deals _30-55 damage_ at the cost of 4 charges.\n\n_+2:_ The Priest can cast _Holy Lance,_ a devastating spell that deals _45-83 damage_ at the cost of 4 charges.\n\n_+3:_ The Priest can cast _Holy Lance,_ a devastating spell that deals _60-110 damage_ at the cost of 4 charges.\n\nHoly Lance always deals maximum damage to demonic and undead foes. Holy Lance has a 50 turn cooldown before it can be cast again.
|
||||
actors.hero.talent.priestt3b.title=Unknown
|
||||
actors.hero.talent.priestt3b.desc=This talent hasn't been implemented yet, it currently does nothing.
|
||||
actors.hero.talent.priestt3c.title=Unknown
|
||||
|
||||
@@ -181,7 +181,7 @@ public enum Talent {
|
||||
//Cleric T3
|
||||
CLERICT3A(169, 3), LIGHT_READING(170, 3),
|
||||
//Priest T3
|
||||
PRIESTT3A(171, 3), PRIESTT3B(172, 3), PRIESTT3C(173, 3),
|
||||
HOLY_LANCE(171, 3), PRIESTT3B(172, 3), PRIESTT3C(173, 3),
|
||||
//Paladin T3
|
||||
PALADINT3A(174, 3), PALADINT3B(175, 3), PALADINT3C(176, 3),
|
||||
//Cleric A1 T4
|
||||
@@ -1025,7 +1025,7 @@ public enum Talent {
|
||||
Collections.addAll(tierTalents, UNENCUMBERED_SPIRIT, MONASTIC_VIGOR, COMBINED_ENERGY);
|
||||
break;
|
||||
case PRIEST:
|
||||
Collections.addAll(tierTalents, PRIESTT3A, PRIESTT3B, PRIESTT3C);
|
||||
Collections.addAll(tierTalents, HOLY_LANCE, PRIESTT3B, PRIESTT3C);
|
||||
break;
|
||||
case PALADIN:
|
||||
Collections.addAll(tierTalents, PALADINT3A, PALADINT3B, PALADINT3C);
|
||||
|
||||
@@ -26,6 +26,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Barrier;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Invisibility;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroSubClass;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.HolyTome;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
@@ -101,6 +102,20 @@ public abstract class ClericSpell {
|
||||
spells.add(DivineSense.INSTANCE);
|
||||
}
|
||||
|
||||
} else if (tier == 3){
|
||||
|
||||
if (cleric.subClass == HeroSubClass.PRIEST) {
|
||||
//TODO innate radiance spell
|
||||
|
||||
if (cleric.hasTalent(Talent.HOLY_LANCE)){
|
||||
spells.add(HolyLance.INSTANCE);
|
||||
}
|
||||
|
||||
} else if (cleric.subClass == HeroSubClass.PALADIN){
|
||||
//TODO innate smite spell
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return spells;
|
||||
|
||||
@@ -0,0 +1,169 @@
|
||||
/*
|
||||
* Pixel Dungeon
|
||||
* Copyright (C) 2012-2015 Oleg Dolya
|
||||
*
|
||||
* Shattered Pixel Dungeon
|
||||
* Copyright (C) 2014-2024 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.actors.hero.spells;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.FlavourBuff;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.Splash;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.SparkParticle;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.HolyTome;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.wands.Wand;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.mechanics.Ballistica;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.MissileSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.HeroIcon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
||||
import com.watabou.noosa.Image;
|
||||
import com.watabou.noosa.audio.Sample;
|
||||
import com.watabou.noosa.particles.Emitter;
|
||||
import com.watabou.utils.Callback;
|
||||
import com.watabou.utils.Random;
|
||||
|
||||
public class HolyLance extends TargetedClericSpell {
|
||||
|
||||
public static final HolyLance INSTANCE = new HolyLance();
|
||||
|
||||
@Override
|
||||
public int icon() {
|
||||
return HeroIcon.HOLY_LANCE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String desc() {
|
||||
int min = 15 + 15*Dungeon.hero.pointsInTalent(Talent.HOLY_LANCE);
|
||||
int max = Math.round(27.5f + 27.5f*Dungeon.hero.pointsInTalent(Talent.HOLY_LANCE));
|
||||
return Messages.get(this, "desc", min, max) + "\n\n" + Messages.get(this, "charge_cost", (int)chargeUse(Dungeon.hero));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canCast(Hero hero) {
|
||||
return super.canCast(hero) && hero.buff(LanceCooldown.class) == null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float chargeUse(Hero hero) {
|
||||
return 4;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onTargetSelected(HolyTome tome, Hero hero, Integer target) {
|
||||
if (target == null){
|
||||
return;
|
||||
}
|
||||
|
||||
Ballistica aim = new Ballistica(hero.pos, target, Ballistica.PROJECTILE);
|
||||
|
||||
if (Actor.findChar( aim.collisionPos ) == hero){
|
||||
GLog.i( Messages.get(Wand.class, "self_target") );
|
||||
return;
|
||||
}
|
||||
|
||||
hero.sprite.zap( target );
|
||||
hero.busy();
|
||||
|
||||
Sample.INSTANCE.play(Assets.Sounds.ZAP);
|
||||
|
||||
Char enemy = Actor.findChar(aim.collisionPos);
|
||||
if (enemy != null) {
|
||||
((MissileSprite) hero.sprite.parent.recycle(MissileSprite.class)).
|
||||
reset(hero.sprite,
|
||||
enemy.sprite,
|
||||
new HolyLanceVFX(),
|
||||
new Callback() {
|
||||
@Override
|
||||
public void call() {
|
||||
int min = 15 + 15*Dungeon.hero.pointsInTalent(Talent.HOLY_LANCE);
|
||||
int max = Math.round(27.5f + 27.5f*Dungeon.hero.pointsInTalent(Talent.HOLY_LANCE));
|
||||
if (Char.hasProp(enemy, Char.Property.UNDEAD) || Char.hasProp(enemy, Char.Property.DEMONIC)){
|
||||
min = max;
|
||||
}
|
||||
enemy.damage(Random.NormalIntRange(min, max), HolyLance.this);
|
||||
Sample.INSTANCE.play( Assets.Sounds.HIT_MAGIC, 1, Random.Float(0.8f, 1f) );
|
||||
Sample.INSTANCE.play( Assets.Sounds.HIT_STAB, 1, Random.Float(0.8f, 1f) );
|
||||
|
||||
enemy.sprite.burst(0xFFFFFFFF, 10);
|
||||
hero.spendAndNext(1f);
|
||||
FlavourBuff.affect(hero, LanceCooldown.class, 50f);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
((MissileSprite) hero.sprite.parent.recycle(MissileSprite.class)).
|
||||
reset(hero.sprite,
|
||||
target,
|
||||
new HolyLanceVFX(),
|
||||
new Callback() {
|
||||
@Override
|
||||
public void call() {
|
||||
Splash.at(target, 0xFFFFFFFF, 10);
|
||||
hero.spendAndNext(1f);
|
||||
FlavourBuff.affect(hero, LanceCooldown.class, 50f);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static class HolyLanceVFX extends Item {
|
||||
|
||||
{
|
||||
image = ItemSpriteSheet.THROWING_SPIKE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemSprite.Glowing glowing() {
|
||||
return new ItemSprite.Glowing(0xFFFFFF, 0.1f);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Emitter emitter() {
|
||||
Emitter emitter = new Emitter();
|
||||
emitter.pos( 5, 5, 0, 0);
|
||||
emitter.fillTarget = false;
|
||||
emitter.pour(SparkParticle.FACTORY, 0.025f);
|
||||
return emitter;
|
||||
}
|
||||
}
|
||||
|
||||
public static class LanceCooldown extends FlavourBuff {
|
||||
|
||||
@Override
|
||||
public int icon() {
|
||||
return BuffIndicator.TIME;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void tintIcon(Image icon) {
|
||||
icon.hardlight(0.67f, 0.67f, 0);
|
||||
}
|
||||
|
||||
public float iconFadePercent() { return Math.max(0, visualcooldown() / 50); }
|
||||
}
|
||||
}
|
||||
@@ -32,6 +32,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.hero.abilities.duelist.El
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.abilities.mage.ElementalBlast;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.abilities.mage.WarpBeacon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.spells.GuidingLight;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.spells.HolyLance;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.spells.HolyWeapon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.spells.Sunray;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.CrystalWisp;
|
||||
@@ -94,6 +95,7 @@ public class AntiMagic extends Armor.Glyph {
|
||||
RESISTS.add( GuidingLight.class );
|
||||
RESISTS.add( HolyWeapon.class );
|
||||
RESISTS.add( Sunray.class );
|
||||
RESISTS.add( HolyLance.class );
|
||||
|
||||
RESISTS.add( ElementalBlast.class );
|
||||
RESISTS.add( CursedWand.class );
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
package com.shatteredpixel.shatteredpixeldungeon.sprites;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.spells.HolyLance;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.GnollGeomancer;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.SpiritBow;
|
||||
@@ -101,6 +102,7 @@ public class MissileSprite extends ItemSprite implements Tweener.Listener {
|
||||
|
||||
ANGULAR_SPEEDS.put(SpiritBow.SpiritArrow.class, 0);
|
||||
ANGULAR_SPEEDS.put(ScorpioSprite.ScorpioShot.class, 0);
|
||||
ANGULAR_SPEEDS.put(HolyLance.HolyLanceVFX.class, 0);
|
||||
|
||||
//720 is default
|
||||
|
||||
|
||||
@@ -81,6 +81,7 @@ public class HeroIcon extends Image {
|
||||
public static final int SUNRAY = 45;
|
||||
public static final int DIVINE_SENSE = 46;
|
||||
public static final int RECALL_GLYPH = 47;
|
||||
public static final int HOLY_LANCE = 48;
|
||||
|
||||
//action indicator visuals
|
||||
public static final int BERSERK = 80;
|
||||
|
||||
Reference in New Issue
Block a user