From ce7dfedb6c969352b66212707b1a6c82fc624317 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Wed, 27 Nov 2024 16:29:59 -0500 Subject: [PATCH] v3.0.0: implemented the Radiance spell --- .../src/main/assets/interfaces/hero_icons.png | Bin 2712 -> 2783 bytes .../assets/messages/actors/actors.properties | 4 + .../actors/hero/spells/ClericSpell.java | 3 +- .../actors/hero/spells/Radiance.java | 76 ++++++++++++++++++ .../shatteredpixeldungeon/ui/HeroIcon.java | 1 + 5 files changed, 83 insertions(+), 1 deletion(-) create mode 100644 core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/spells/Radiance.java diff --git a/core/src/main/assets/interfaces/hero_icons.png b/core/src/main/assets/interfaces/hero_icons.png index 60a5bdfc4aaaf319f0d315c6e4ae98dd5505fd90..5c506ce885e0d3ece1e7cab349734765f078b93e 100644 GIT binary patch delta 1241 zcmV;~1Sb2K72g$*Dgpoiku0=u@07<`e~}3g^^GoCTIp#SF&;h_MEUu?Ac& zG7dihtl92VfCzXqs5K%w}r|E@;{h{OPqD!{lL6;KEP1p@FN8NmK0 zfc;+ul%w!^TmTUS5TS7g9Df&pp8)*B0+)$2V#j1VAF-cqFT zzxX4k1a#I1_zON%ecKEWxfvqcfJJ9rBqSq!K+DuwAK-p|)Pw#$@qd7#hf=T(z&y_$ zU~29N;NjF;AMlRfe!d6brvU%sJ$(dJ@BYiXY9pYtKAvfS&u8WD?}Fa?fPXjw6yV>U1tJy@{r!Wmw?3dA0Seq-0<6Gpz6&aUeH!Wp0-Eas znj-+4dBrC}zm-i1sQqyw(kg7~tq-W*AWW?Ud>V4I0Q_}AV;Q`xCrg= zSHV5!Uygf!a5TYZ2Lk7U|Kj+9pr6kSDEistmZ0kQ;{xz|z<;8;j0(W7?&q2Mvrz#U z9j4}C0l}}vJgYG#0RLG5!9RW%MF04MF#69p4Ws{riD-%b@l)}F|D1sHFULueBuSDa zNs=T(2>f2@j z>jy%@^W(#ijDHkpSwFb^=2!Rgq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K(|}00000NkvXXu0mjf(X}uq diff --git a/core/src/main/assets/messages/actors/actors.properties b/core/src/main/assets/messages/actors/actors.properties index f8f180ae2..a0084eb49 100644 --- a/core/src/main/assets/messages/actors/actors.properties +++ b/core/src/main/assets/messages/actors/actors.properties @@ -591,6 +591,10 @@ actors.hero.spells.holyweapon.desc=The Cleric enchants their worn weapon with ho 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\nTurns renaming: %s. +actors.hero.spells.radiance.name=radiance +actors.hero.spells.radiance.short_desc=Illuminates and briefly stuns visible enemies. +actors.hero.spells.radiance.desc=The Priest erupts in holy light, stunning all visible enemies for 2 turns and illuminating them as if they were hit by Guiding Light. Radiance will also cause the Priest to glow for 100 turns if the current floor is dark. + actors.hero.spells.recallglyph.name=recall glyph actors.hero.spells.recallglyph.short_desc=Repeats a recently used stone or scroll. actors.hero.spells.recallglyph.desc=The Cleric uses holy magic to replicate and re-cast the effect of a magical glyph found on a runestone or scroll they used in the last %s turns.\n\nRecall Glyph cannot be used to replicate scrolls of upgrade. This spell's charge cost varies based on which item was used recently: 1 for a runestone, 2 for a scroll, 3 for an exotic scroll. This charge cost is also doubled when replicating a scroll of transmutation, or alchemy items that must be crafted using transmutation or upgrade. diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/spells/ClericSpell.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/spells/ClericSpell.java index 374abde05..1744c5123 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/spells/ClericSpell.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/spells/ClericSpell.java @@ -105,7 +105,7 @@ public abstract class ClericSpell { } else if (tier == 3){ if (cleric.subClass == HeroSubClass.PRIEST) { - //TODO innate radiance spell + spells.add(Radiance.INSTANCE); if (cleric.hasTalent(Talent.HOLY_LANCE)){ spells.add(HolyLance.INSTANCE); @@ -131,6 +131,7 @@ public abstract class ClericSpell { spells.add(Sunray.INSTANCE); spells.add(RecallGlyph.INSTANCE); spells.add(DivineSense.INSTANCE); + spells.add(Radiance.INSTANCE); spells.add(HolyLance.INSTANCE); return spells; } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/spells/Radiance.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/spells/Radiance.java new file mode 100644 index 000000000..5e5c1faa8 --- /dev/null +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/spells/Radiance.java @@ -0,0 +1,76 @@ +/* + * 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 + */ + +package com.shatteredpixel.shatteredpixeldungeon.actors.hero.spells; + +import com.shatteredpixel.shatteredpixeldungeon.Assets; +import com.shatteredpixel.shatteredpixeldungeon.Challenges; +import com.shatteredpixel.shatteredpixeldungeon.Dungeon; +import com.shatteredpixel.shatteredpixeldungeon.actors.Char; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Light; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Paralysis; +import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; +import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob; +import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.HolyTome; +import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene; +import com.shatteredpixel.shatteredpixeldungeon.ui.HeroIcon; +import com.watabou.noosa.audio.Sample; + +public class Radiance extends ClericSpell { + + public static final Radiance INSTANCE = new Radiance(); + + @Override + public int icon() { + return HeroIcon.RADIANCE; + } + + @Override + public float chargeUse(Hero hero) { + return 2; + } + + @Override + public void onCast(HolyTome tome, Hero hero) { + + GameScene.flash( 0x80FFFFFF ); + Sample.INSTANCE.play(Assets.Sounds.BLAST); + + if (Dungeon.level.viewDistance < 6 ){ + Buff.affect(hero, Light.class, Dungeon.isChallenged(Challenges.DARKNESS) ? 20 : 100); + } + + for (Mob mob : Dungeon.level.mobs.toArray( new Mob[0] )) { + if (mob.alignment != Char.Alignment.ALLY && Dungeon.level.heroFOV[mob.pos]) { + Buff.affect(mob, GuidingLight.Illuminated.class); + Buff.affect(mob, Paralysis.class, 1f); + } + } + + hero.spend( 1f ); + hero.busy(); + hero.sprite.operate(hero.pos); + + onSpellCast(tome, hero); + + } +} diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/HeroIcon.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/HeroIcon.java index 309facc6c..666518226 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/HeroIcon.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/HeroIcon.java @@ -82,6 +82,7 @@ public class HeroIcon extends Image { public static final int DIVINE_SENSE = 46; public static final int RECALL_GLYPH = 47; public static final int HOLY_LANCE = 48; + public static final int RADIANCE = 49; //all cleric spells have a separate icon with no background for the action indicator public static final int SPELL_ACTION_OFFSET = 32;