v3.0.0: finished implementing the judgement spell

This commit is contained in:
Evan Debenham
2024-12-15 23:24:45 -05:00
parent c9585102ed
commit 3c577c3fbc
2 changed files with 38 additions and 14 deletions

View File

@@ -618,7 +618,7 @@ actors.hero.spells.holyweapon$holywepbuff.desc=The Cleric has imbued their worn
actors.hero.spells.judgement.name=judgement
actors.hero.spells.judgement.short_desc=Damages all visible enemies.
actors.hero.spells.judgement.desc=TODO
actors.hero.spells.judgement.desc=The Cleric slams their fist onto the ground, causing an eruption of light that deals damage to all enemies they can see. This deals %1$d-%2$d damage at base, but also deals an additional 5-10 damage for each spell the Cleric has cast since entering ascended form (or since they last cast Judgement).\n\nCurrently Judgement will deal %3$d-%4$d damage.
actors.hero.spells.mnemonicprayer.name=mnemonic prayer
actors.hero.spells.mnemonicprayer.short_desc=Extends buffs/debuffs on an ally/enemy, & re-applies illuminated.
@@ -1123,7 +1123,7 @@ actors.hero.talent.paladint3c.desc=This talent hasn't been implemented yet, it c
actors.hero.talent.divine_intervention.title=divine intervention
actors.hero.talent.divine_intervention.desc=_+1:_ While in Ascended Form, the Cleric can cast _Divine Intervention,_ which boosts the Cleric and all allies up to _200 shielding._\n\n_+2:_ While in Ascended Form, the Cleric can cast _Divine Intervention,_ which boosts the Cleric and all allies up to _250 shielding._\n\n_+3:_ While in Ascended Form, the Cleric can cast _Divine Intervention,_ which boosts the Cleric and all allies up to _300 shielding._\n\n_+4:_ While in Ascended Form, the Cleric can cast _Divine Intervention,_ which boosts the Cleric and all allies up to _350 shielding._\n\nDivine Intervention costs a whopping 6 tome charges, and can only be cast once in the same ascended form.
actors.hero.talent.judgement.title=judgement
actors.hero.talent.judgement.desc=_+1:_ While in Ascended Form, the Cleric can cast _Judgement,_ which deals _10-20 damage_ to all visible enemies.\n\n_+2:_ While in Ascended Form, the Cleric can cast _Judgement,_ which deals _15-30 damage_ to all visible enemies.\n\n_+3:_ While in Ascended Form, the Cleric can cast _Judgement,_ which deals _20-40 damage_ to all visible enemies.\n\n_+4:_ While in Ascended Form, the Cleric can cast _Judgement,_ which deals _25-50 damage_ to all visible enemies.\n\nJudgement costs 3 tome charges. Judgement deals an additional 5-10 damage for every spell the Cleric has cast since entering ascended form or since the last cast of judgement, whichever is most recent.
actors.hero.talent.judgement.desc=_+1:_ While in Ascended Form, the Cleric can cast _Judgement,_ which deals _10-20 damage_ to all visible enemies.\n\n_+2:_ While in Ascended Form, the Cleric can cast _Judgement,_ which deals _15-30 damage_ to all visible enemies.\n\n_+3:_ While in Ascended Form, the Cleric can cast _Judgement,_ which deals _20-40 damage_ to all visible enemies.\n\n_+4:_ While in Ascended Form, the Cleric can cast _Judgement,_ which deals _25-50 damage_ to all visible enemies.\n\nJudgement costs 3 tome charges. Judgement deals an additional 5-10 damage for every spell the Cleric has cast since entering ascended form or since the last cast of Judgement.
actors.hero.talent.flash.title=flash
actors.hero.talent.flash.desc=_+1:_ While in Ascended Form, the Cleric can cast _Flash_ to teleport up to _3 tiles_ away.\n\n_+2:_ While in Ascended Form, the Cleric can cast _Flash_ to teleport up to _4 tiles_ away.\n\n_+3:_ While in Ascended Form, the Cleric can cast _Flash_ to teleport up to _5 tiles_ away..\n\n_+4:_ While in Ascended Form, the Cleric can cast _Flash_ to teleport up to _6 tiles_ away.\n\nFlash costs 1 tome charge initially, and 1 more charge for each use in the same ascended form.

View File

@@ -21,6 +21,7 @@
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;
@@ -28,7 +29,11 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.abilities.cleric.AscendedForm;
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.HolyTome;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
import com.shatteredpixel.shatteredpixeldungeon.ui.HeroIcon;
import com.watabou.noosa.audio.Sample;
import com.watabou.utils.Callback;
import com.watabou.utils.Random;
public class Judgement extends ClericSpell {
@@ -53,21 +58,40 @@ public class Judgement extends ClericSpell {
@Override
public void onCast(HolyTome tome, Hero hero) {
//TODO vfx
hero.sprite.attack(hero.pos, new Callback() {
@Override
public void call() {
GameScene.flash( 0x80FFFFFF );
Sample.INSTANCE.play(Assets.Sounds.BLAST);
int damageBase = 5 + 5*hero.pointsInTalent(Talent.JUDGEMENT);
damageBase += 5*hero.buff(AscendedForm.AscendBuff.class).spellCasts;
int damageBase = 5 + 5*hero.pointsInTalent(Talent.JUDGEMENT);
damageBase += 5*hero.buff(AscendedForm.AscendBuff.class).spellCasts;
for (Char ch : Actor.chars()){
if (ch.alignment != hero.alignment && Dungeon.level.heroFOV[ch.pos]){
ch.damage( Random.NormalIntRange(damageBase, 2*damageBase), Judgement.this);
}
}
hero.spendAndNext( 1f );
onSpellCast(tome, hero);
hero.buff(AscendedForm.AscendBuff.class).spellCasts = 0;
for (Char ch : Actor.chars()){
if (ch.alignment != hero.alignment && Dungeon.level.heroFOV[ch.pos]){
ch.damage( Random.NormalIntRange(damageBase, 2*damageBase), Judgement.this);
}
}
hero.spendAndNext( 1f );
onSpellCast(tome, hero);
hero.buff(AscendedForm.AscendBuff.class).spellCasts = 0;
});
hero.busy();
}
@Override
public String desc() {
int baseDmg = 5 + 5*Dungeon.hero.pointsInTalent(Talent.JUDGEMENT);
int totalBaseDmg = baseDmg;
if (Dungeon.hero.buff(AscendedForm.AscendBuff.class) != null) {
totalBaseDmg += 5 * Dungeon.hero.buff(AscendedForm.AscendBuff.class).spellCasts;
}
return Messages.get(this, "desc", baseDmg, 2*baseDmg, totalBaseDmg, 2*totalBaseDmg) + "\n\n" + Messages.get(this, "charge_cost", (int)chargeUse(Dungeon.hero));
}
}