v3.0.0: implemented the detect curse talent

This commit is contained in:
Evan Debenham
2024-10-24 12:52:50 -04:00
parent d40d9e10c8
commit 3cf13f0458
6 changed files with 98 additions and 4 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@@ -535,6 +535,13 @@ actors.hero.abilities.ratmogrify$transmograt.rankings_desc=Slain by: ratmogrifie
##Cleric Spells ##Cleric Spells
actors.hero.spells.clericspell.charge_cost=Charge cost: %d actors.hero.spells.clericspell.charge_cost=Charge cost: %d
actors.hero.spells.detectcurse.name=detect curse
actors.hero.spells.detectcurse.prompt=choose an item
actors.hero.spells.detectcurse.cursed=You sense malevolent magic lurking within this item.
actors.hero.spells.detectcurse.uncursed=This item is free of malevolent magic.
actors.hero.spells.detectcurse.short_desc=identifies whether an item is cursed or not.
actors.hero.spells.detectcurse.desc=The Cleric focuses their senses on an item and determines whether it is cursed or not without having to equip it.
actors.hero.spells.guidinglight.name=guiding light actors.hero.spells.guidinglight.name=guiding light
actors.hero.spells.guidinglight.prompt=choose a target actors.hero.spells.guidinglight.prompt=choose a target
actors.hero.spells.guidinglight.short_desc=Deals ranged magic damage and guarantees a hit. actors.hero.spells.guidinglight.short_desc=Deals ranged magic damage and guarantees a hit.
@@ -989,8 +996,8 @@ actors.hero.talent.counter_ability.desc=_+1:_ If the Duelist uses a weapon abili
#cleric #cleric
actors.hero.talent.clerict1a.title=fasting actors.hero.talent.clerict1a.title=fasting
actors.hero.talent.clerict1a.desc=_+1:_ The Cleric can cast _???_ at the cost of 1 charge. This spell restores _30 turns of satiety_, grants _3 shielding_, and is cast instantly.\n\n_+2:_ The Cleric can cast _???_ at the cost of 1 charge. This spell restores _50 turns of satiety_, grants _5 shielding_, and is cast instantly. actors.hero.talent.clerict1a.desc=_+1:_ The Cleric can cast _???_ at the cost of 1 charge. This spell restores _30 turns of satiety_, grants _3 shielding_, and is cast instantly.\n\n_+2:_ The Cleric can cast _???_ at the cost of 1 charge. This spell restores _50 turns of satiety_, grants _5 shielding_, and is cast instantly.
actors.hero.talent.clerict1b.title=detect curse actors.hero.talent.detect_curse.title=detect curse
actors.hero.talent.clerict1b.desc=_+1:_ The Cleric can cast _Detect Curse,_ a spell that reveals whether an item is cursed at the cost of _3 charges._\n\n_+2:_ The Cleric can cast _Detect Curse,_ a spell that reveals whether an item is cursed at the cost of _2 charges._ actors.hero.talent.detect_curse.desc=_+1:_ The Cleric can cast _Detect Curse,_ a spell that reveals whether an item is cursed at the cost of _3 charges._\n\n_+2:_ The Cleric can cast _Detect Curse,_ a spell that reveals whether an item is cursed at the cost of _2 charges._
actors.hero.talent.searing_light.title=searing light actors.hero.talent.searing_light.title=searing light
actors.hero.talent.searing_light.desc=_+1:_ Physical attacks on enemies illuminated by _Guiding Light_ deal _+3 damage._\n\n_+2:_ Physical attacks on enemies illuminated by _Guiding Light_ deal _+5 damage._ actors.hero.talent.searing_light.desc=_+1:_ Physical attacks on enemies illuminated by _Guiding Light_ deal _+3 damage._\n\n_+2:_ Physical attacks on enemies illuminated by _Guiding Light_ deal _+5 damage._
actors.hero.talent.clerict1d.title=circle of healing actors.hero.talent.clerict1d.title=circle of healing

View File

@@ -172,7 +172,7 @@ public enum Talent {
FEIGNED_RETREAT(151, 4), EXPOSE_WEAKNESS(152, 4), COUNTER_ABILITY(153, 4), FEIGNED_RETREAT(151, 4), EXPOSE_WEAKNESS(152, 4), COUNTER_ABILITY(153, 4),
//Cleric T1 //Cleric T1
CLERICT1A(160), CLERICT1B(161), SEARING_LIGHT(162), CLERICT1D(163), CLERICT1A(160), DETECT_CURSE(161), SEARING_LIGHT(162), CLERICT1D(163),
//Cleric T2 //Cleric T2
CLERICT2A(164), CLERICT2B(165), CLERICT2C(166), CLERICT2D(167), CLERICT2E(168), CLERICT2A(164), CLERICT2B(165), CLERICT2C(166), CLERICT2D(167), CLERICT2E(168),
//Cleric T3 //Cleric T3
@@ -869,7 +869,7 @@ public enum Talent {
Collections.addAll(tierTalents, STRENGTHENING_MEAL, ADVENTURERS_INTUITION, PATIENT_STRIKE, AGGRESSIVE_BARRIER); Collections.addAll(tierTalents, STRENGTHENING_MEAL, ADVENTURERS_INTUITION, PATIENT_STRIKE, AGGRESSIVE_BARRIER);
break; break;
case CLERIC: case CLERIC:
Collections.addAll(tierTalents, CLERICT1A, CLERICT1B, SEARING_LIGHT, CLERICT1D); Collections.addAll(tierTalents, CLERICT1A, DETECT_CURSE, SEARING_LIGHT, CLERICT1D);
break; break;
} }
for (Talent talent : tierTalents){ for (Talent talent : tierTalents){

View File

@@ -21,7 +21,9 @@
package com.shatteredpixel.shatteredpixeldungeon.actors.hero.spells; package com.shatteredpixel.shatteredpixeldungeon.actors.hero.spells;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent;
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.HolyTome; import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.HolyTome;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.ui.HeroIcon; import com.shatteredpixel.shatteredpixeldungeon.ui.HeroIcon;
@@ -59,6 +61,10 @@ public abstract class ClericSpell {
spells.add(HolyWeapon.INSTANCE); spells.add(HolyWeapon.INSTANCE);
spells.add(HolyWard.INSTANCE); spells.add(HolyWard.INSTANCE);
if (cleric.hasTalent(Talent.DETECT_CURSE)){
spells.add(DetectCurse.INSTANCE);
}
return spells; return spells;
}; };

View File

@@ -0,0 +1,80 @@
/*
* 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.actors.buffs.Invisibility;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent;
import com.shatteredpixel.shatteredpixeldungeon.items.EquipableItem;
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.HolyTome;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.ui.HeroIcon;
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
import com.watabou.noosa.audio.Sample;
public class DetectCurse extends InventoryClericSpell {
public static final DetectCurse INSTANCE = new DetectCurse();
@Override
public int icon() {
return HeroIcon.DETECT_CURSE;
}
@Override
protected boolean usableOnItem(Item item) {
return item instanceof EquipableItem && !item.isIdentified() && !item.cursedKnown;
}
@Override
public float chargeUse(Hero hero) {
return 4 - hero.pointsInTalent(Talent.DETECT_CURSE);
}
@Override
protected void onItemSelected(HolyTome tome, Hero hero, Item item) {
if (item == null){
return;
}
item.cursedKnown = true;
if (item.cursed){
GLog.w(Messages.get(this, "cursed"));
} else {
GLog.i(Messages.get(this, "uncursed"));
}
hero.spend( 1f );
hero.busy();
hero.sprite.operate(hero.pos);
tome.spendCharge(chargeUse(hero));
Sample.INSTANCE.play( Assets.Sounds.SCAN );
Invisibility.dispel();
}
}

View File

@@ -71,6 +71,7 @@ public class HeroIcon extends Image {
public static final int GUIDING_LIGHT = 40; public static final int GUIDING_LIGHT = 40;
public static final int HOLY_WEAPON = 41; public static final int HOLY_WEAPON = 41;
public static final int HOLY_WARD = 42; public static final int HOLY_WARD = 42;
public static final int DETECT_CURSE = 43;
//action indicator visuals //action indicator visuals
public static final int BERSERK = 80; public static final int BERSERK = 80;