v3.0.0: smite no longer guarantees a hit with encumbered weapons

This commit is contained in:
Evan Debenham
2025-01-29 13:59:49 -05:00
parent 89e2cfcd26
commit 0640475c4c
2 changed files with 14 additions and 8 deletions

View File

@@ -575,8 +575,8 @@ actors.hero.spells.blessspell.short_desc=Blesses & shields Cleric, blesses & hea
actors.hero.spells.blessspell.desc=The Cleric places a holy blessing on themselves or another character they can see.\n\nWhen cast on themselves the effect is weaker, granting %1$d turns of bless and %2$d barrier.\n\nWhen cast on other characters the spell is more powerful, granting %3$d turns of bless and %4$d healing. Excess healing is converted into barrier. actors.hero.spells.blessspell.desc=The Cleric places a holy blessing on themselves or another character they can see.\n\nWhen cast on themselves the effect is weaker, granting %1$d turns of bless and %2$d barrier.\n\nWhen cast on other characters the spell is more powerful, granting %3$d turns of bless and %4$d healing. Excess healing is converted into barrier.
actors.hero.spells.bodyform.name=body form actors.hero.spells.bodyform.name=body form
actors.hero.spells.bodyform.short_desc=TODO actors.hero.spells.bodyform.short_desc=Assigns Trinity to an enchant or glyph.
actors.hero.spells.bodyform.desc=TODO actors.hero.spells.bodyform.desc=The Cleric chooses an enchantment or glyph that they have identified this run and imbues Trinity with its effect.\n\nWhen Trinity is used, The Cleric gains the effect of the chosen enchantment or glyph for %d turns. This temporary enchant or glyph will work with any effect that a regular enchantment or glyph would.\n\nThis spell replaces any other effect that Trinity is currently imbued with.
actors.hero.spells.cleanse.name=cleanse actors.hero.spells.cleanse.name=cleanse
actors.hero.spells.cleanse.short_desc=Clears debuffs and grants shielding. actors.hero.spells.cleanse.short_desc=Clears debuffs and grants shielding.
@@ -658,8 +658,8 @@ actors.hero.spells.layonhands.short_desc=Instantly heals an adjacent character o
actors.hero.spells.layonhands.desc=The Paladin channels holy energy through their hands, healing or protecting whatever they touch.\n\nThe Paladin can cast this spell on any adjacent character to give them %1$d healing, or on themselves to gain %1$d shielding. Excess healing from this spell is converted into shielding.\n\nThis spell is cast instantaneously and can be cast repeatedly, but cannot grant more than three casts worth of shielding at a time. actors.hero.spells.layonhands.desc=The Paladin channels holy energy through their hands, healing or protecting whatever they touch.\n\nThe Paladin can cast this spell on any adjacent character to give them %1$d healing, or on themselves to gain %1$d shielding. Excess healing from this spell is converted into shielding.\n\nThis spell is cast instantaneously and can be cast repeatedly, but cannot grant more than three casts worth of shielding at a time.
actors.hero.spells.mindform.name=mind form actors.hero.spells.mindform.name=mind form
actors.hero.spells.mindform.short_desc=TODO actors.hero.spells.mindform.short_desc=Assigns Trinity to a wand or thrown weapon.
actors.hero.spells.mindform.desc=TODO actors.hero.spells.mindform.desc=The Cleric chooses a wand or thrown weapons that they have identified this run and imbues Trinity with its effect.\n\nWhen Trinity is used, The Cleric can make a single attack as if they were using the chosen item at +%d. This will trigger all effects that using that type of item would normally trigger.\n\nThis spell replaces any other effect that Trinity is currently imbued with.
actors.hero.spells.mnemonicprayer.name=mnemonic prayer actors.hero.spells.mnemonicprayer.name=mnemonic prayer
actors.hero.spells.mnemonicprayer.short_desc=Extends buffs/debuffs on an ally/enemy, & re-applies illuminated. actors.hero.spells.mnemonicprayer.short_desc=Extends buffs/debuffs on an ally/enemy, & re-applies illuminated.
@@ -682,12 +682,12 @@ actors.hero.spells.shieldoflight$shieldoflighttracker.name=shield of light
actors.hero.spells.shieldoflight$shieldoflighttracker.desc=A thin shield of light is standing between the Cleric and an enemy. It's not strong enough to outright block attacks, but will soften them.\n\nTurns Remaining: %s actors.hero.spells.shieldoflight$shieldoflighttracker.desc=A thin shield of light is standing between the Cleric and an enemy. It's not strong enough to outright block attacks, but will soften them.\n\nTurns Remaining: %s
actors.hero.spells.spiritform.name=spirit form actors.hero.spells.spiritform.name=spirit form
actors.hero.spells.spiritform.short_desc=TODO actors.hero.spells.spiritform.short_desc=Assigns Trinity to a ring or artifact.
actors.hero.spells.spiritform.desc=TODO actors.hero.spells.spiritform.desc=The Cleric chooses a ring or artifact that they have identified this run (except the holy tome) and imbues Trinity with its effect.\n\nIf a ring is chosen, then Trinity grants that ring's effect at +%1$d for 20 turns.\n\nIf an artifact is chosen, then Trinity is next cast, The Cleric can make a single attack as if they were using the chosen item at +%d. This will trigger all effects that using that type of item would normally trigger.\n\nThis spell replaces any other effect that Trinity is currently imbued with.
actors.hero.spells.smite.name=smite actors.hero.spells.smite.name=smite
actors.hero.spells.smite.short_desc=Guarantees a hit with bonus damage and enchant power. actors.hero.spells.smite.short_desc=Guarantees a hit with bonus damage and enchant power.
actors.hero.spells.smite.desc=The Paladin infuses a melee strike with righteous destructive power.\n\nIn addition to dealing normal melee damage, Smite is guaranteed to hit, has +300%% enchantment power, and deals %1$d - %2$d bonus magic damage.\n\nSmite's bonus magic damage scales with the Paladin's level, and it will always deal maximum bonus magic damage against undead or demonic foes. actors.hero.spells.smite.desc=The Paladin infuses a melee strike with righteous destructive power.\n\nIn addition to dealing normal melee damage, Smite makes non-encumbered attacks guaranteed to hit, has +300%% enchantment power, and deals %1$d - %2$d bonus magic damage.\n\nSmite's bonus magic damage scales with the Paladin's level, and it will always deal maximum bonus magic damage against undead or demonic foes.
actors.hero.spells.sunray.name=sunray actors.hero.spells.sunray.name=sunray
actors.hero.spells.sunray.short_desc=Deals ranged magic damage and blinds a target once. actors.hero.spells.sunray.short_desc=Deals ranged magic damage and blinds a target once.

View File

@@ -31,6 +31,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Invisibility;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroSubClass; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroSubClass;
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.HolyTome; import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.HolyTome;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.Weapon;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.ui.AttackIndicator; import com.shatteredpixel.shatteredpixeldungeon.ui.AttackIndicator;
import com.shatteredpixel.shatteredpixeldungeon.ui.HeroIcon; import com.shatteredpixel.shatteredpixeldungeon.ui.HeroIcon;
@@ -90,7 +91,12 @@ public class Smite extends TargetedClericSpell {
public void call() { public void call() {
AttackIndicator.target(enemy); AttackIndicator.target(enemy);
if (hero.attack(enemy, 1, 0, Char.INFINITE_ACCURACY)){ float accMult = Char.INFINITE_ACCURACY;
if (!(hero.belongings.attackingWeapon() instanceof Weapon)
|| ((Weapon) hero.belongings.attackingWeapon()).STRReq() <= hero.STR()){
accMult = 1;
}
if (hero.attack(enemy, 1, 0, accMult)){
Sample.INSTANCE.play(Assets.Sounds.HIT_STRONG); Sample.INSTANCE.play(Assets.Sounds.HIT_STRONG);
enemy.sprite.burst(0xFFFFFFFF, 10); enemy.sprite.burst(0xFFFFFFFF, 10);
} }