v3.0.0: more spell refactoring

This commit is contained in:
Evan Debenham
2024-10-24 12:36:03 -04:00
parent 1a9310d368
commit d40d9e10c8
6 changed files with 30 additions and 8 deletions

View File

@@ -533,21 +533,26 @@ actors.hero.abilities.ratmogrify$transmograt.desc=This enemy has been transforme
actors.hero.abilities.ratmogrify$transmograt.rankings_desc=Slain by: ratmogrified enemy
##Cleric Spells
actors.hero.spells.clericspell.charge_cost=Charge cost: %d
actors.hero.spells.guidinglight.name=guiding light
actors.hero.spells.guidinglight.prompt=choose a target
actors.hero.spells.guidinglight.desc=The Cleric files a bolt of magical energy which strikes a target, dealing 2-6 damage and illuminating them. The next physical attack made against an illuminated enemy is guaranteed to hit them.\n\nThis spell costs 1 charge.
actors.hero.spells.guidinglight.short_desc=Deals ranged magic damage and guarantees a hit.
actors.hero.spells.guidinglight.desc=The Cleric fires a bolt of magical energy which strikes a target, dealing 2-6 damage and illuminating them. The next physical attack made against an illuminated enemy is guaranteed to hit them.
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.
actors.hero.spells.holyward.desc=The Cleric imbues their worn armor with glyphs of holy light, increasing the armor's damage blocking by 1.\n\nThis glyph lasts for 50 turns, and will override any beneficial glyph the armor has for the duration.\n\nThis spell costs 1 charge.
actors.hero.spells.holyward.short_desc=Temporarily overrides glyphs to boost armor blocking.
actors.hero.spells.holyward.desc=The Cleric imbues their worn armor with glyphs of holy light, increasing the armor's damage blocking by 1.\n\nThis glyph lasts for 50 turns, and will override any beneficial glyph the armor has for the duration.
actors.hero.spells.holyward$holyarmbuff.name=holy ward
actors.hero.spells.holyward$holyarmbuff.desc=The Cleric has imbued their worn armor with holy energy, temporarily overriding any existing glyph and causing the armor to block an extra 1 point of damage.\n\nTurn renaming: %s.
actors.hero.spells.holyweapon.name=holy weapon
actors.hero.spells.holyweapon.ench_name=holy %s
actors.hero.spells.holyweapon.ench_desc=Enemies struck by a holy weapon will take extra magical damage.
actors.hero.spells.holyweapon.desc=The Cleric enchants their worn weapon with holy energy, causing the weapon to deal an additional 2 magical damage any time they strike an enemy with it.\n\nThis enchantment lasts for 50 turns, and will override any beneficial enchantment the weapon has for the duration.\n\nThis spell costs 2 charges.
actors.hero.spells.holyweapon.short_desc=Temporarily overrides enchantments to boost damage.
actors.hero.spells.holyweapon.desc=The Cleric enchants their worn weapon with holy energy, causing the weapon to deal an additional 2 magical damage any time they strike an enemy with it.\n\nThis enchantment lasts for 50 turns, and will override any beneficial enchantment the weapon has for the duration.
actors.hero.spells.holyweapon$holywepbuff.name=holy weapon
actors.hero.spells.holyweapon$holywepbuff.desc=The Cleric has imbued their worn weapon with holy energy, temporarily overriding any existing enchantment and causing the weapon to deal an extra 2 magical damage on each attack.\n\nTurn renaming: %s.

View File

@@ -41,11 +41,11 @@ public abstract class ClericSpell {
}
public String shortDesc(){
return Messages.get(this, "short_desc");
return Messages.get(this, "short_desc") + " " + Messages.get(this, "charge_cost", (int)chargeUse(Dungeon.hero));
}
public String desc(){
return Messages.get(this, "desc");
return Messages.get(this, "desc") + "\n\n" + Messages.get(this, "charge_cost", (int)chargeUse(Dungeon.hero));
}
public int icon(){

View File

@@ -25,6 +25,7 @@ import com.shatteredpixel.shatteredpixeldungeon.Assets;
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.Invisibility;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
import com.shatteredpixel.shatteredpixeldungeon.effects.MagicMissile;
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.HolyTome;
@@ -79,6 +80,8 @@ public class GuidingLight extends TargetedClericSpell {
tome.spendCharge( chargeUse(hero) );
hero.spend( 1f );
hero.next();
Invisibility.dispel();
}
});
}

View File

@@ -24,6 +24,7 @@ package com.shatteredpixel.shatteredpixeldungeon.actors.hero.spells;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.FlavourBuff;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Invisibility;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.HolyTome;
@@ -48,9 +49,12 @@ public class HolyWard extends ClericSpell {
Sample.INSTANCE.play(Assets.Sounds.READ);
tome.spendCharge( chargeUse(hero) );
hero.sprite.operate(hero.pos);
hero.spend( 1f );
hero.next();
hero.busy();
hero.sprite.operate(hero.pos);
Invisibility.dispel();
}
public static class HolyArmBuff extends FlavourBuff {

View File

@@ -24,6 +24,7 @@ package com.shatteredpixel.shatteredpixeldungeon.actors.hero.spells;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.FlavourBuff;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Invisibility;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.HolyTome;
@@ -54,8 +55,12 @@ public class HolyWeapon extends ClericSpell {
Sample.INSTANCE.play(Assets.Sounds.READ);
tome.spendCharge( chargeUse(hero) );
hero.sprite.operate(hero.pos);
hero.spend( 1f );
hero.next();
hero.busy();
hero.sprite.operate(hero.pos);
Invisibility.dispel();
}
public static class HolyWepBuff extends FlavourBuff {

View File

@@ -141,6 +141,11 @@ public class WndClericSpells extends Window {
}
}
}
@Override
protected String hoverText() {
return "_" + Messages.titleCase(spell.name()) + "_\n" + spell.shortDesc();
}
}
}