v3.0.0: implemented the mnemonic prayer talent/spell

This commit is contained in:
Evan Debenham
2024-12-11 15:30:50 -05:00
parent fd7c736e5d
commit 6a62793361
34 changed files with 296 additions and 25 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 496 B

After

Width:  |  Height:  |  Size: 513 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.1 KiB

After

Width:  |  Height:  |  Size: 7.1 KiB

View File

@@ -557,19 +557,6 @@ actors.hero.spells.clericspell.no_target=There is no target there.
actors.hero.spells.clericspell.invalid_target=You can't target that location.
actors.hero.spells.clericspell.charge_cost=Charge cost: %d
actors.hero.spells.hallowedground.name=hallowed ground
actors.hero.spells.hallowedground.prompt=choose a location
actors.hero.spells.hallowedground.short_desc=Heals allies, slows enemies, and spreads grass in an AOE.
actors.hero.spells.hallowedground.desc=The Priest focuses their divine magic into the ground nearby, creating a %1$dx%1$d area of hallowed terrain for 20 turns.\n\nWhen it is cast, this spell heals all allies for 10 HP (healthy allies and the Priest get shielding), briefly roots enemies, and spreads short grass.\n\nThe hallowed terrain heals allies for 1 HP per turn (healthy allies and the Priest get shielding), cripples enemies, and randomly causes tall grass to grow.\n\nHallowed terrain is destroyed by fire, and will produce furrowed grass if passive regen effects are disabled or the Priest has not gained exp in a while.
actors.hero.spells.hallowedground$hallowedterrain.desc=The ground has been hallowed here. Hallowed ground slowly enemies, heals allies, and causes grass to spread.
actors.hero.spells.holyintuition.name=holy intuition
actors.hero.spells.holyintuition.prompt=choose an item
actors.hero.spells.holyintuition.cursed=You sense malevolent magic lurking within this item.
actors.hero.spells.holyintuition.uncursed=This item is free of malevolent magic.
actors.hero.spells.holyintuition.short_desc=identifies whether an item is cursed or not.
actors.hero.spells.holyintuition.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.divinesense.name=divine sense
actors.hero.spells.divinesense.short_desc=Gain temporary mind vision in a wide range.
actors.hero.spells.divinesense.desc=The Cleric focuses their senses on their surroundings, gaining mind vision with a %d tile range for 30 turns.
@@ -583,6 +570,19 @@ actors.hero.spells.guidinglight.desc_priest=_This spell is more powerful when ca
actors.hero.spells.guidinglight$guidinglightpriestcooldown.name=Guiding Light
actors.hero.spells.guidinglight$guidinglightpriestcooldown.desc=The Priest will be able to cast Guiding Light for free again after 100 turns elapse.\n\nTurns remaining: %s.
actors.hero.spells.hallowedground.name=hallowed ground
actors.hero.spells.hallowedground.prompt=choose a location
actors.hero.spells.hallowedground.short_desc=Heals allies, slows enemies, and spreads grass in an AOE.
actors.hero.spells.hallowedground.desc=The Priest focuses their divine magic into the ground nearby, creating a %1$dx%1$d area of hallowed terrain for 20 turns.\n\nWhen it is cast, this spell heals all allies for 10 HP (healthy allies and the Priest get shielding), briefly roots enemies, and spreads short grass.\n\nThe hallowed terrain heals allies for 1 HP per turn (healthy allies and the Priest get shielding), cripples enemies, and randomly causes tall grass to grow.\n\nHallowed terrain is destroyed by fire, and will produce furrowed grass if passive regen effects are disabled or the Priest has not gained exp in a while.
actors.hero.spells.hallowedground$hallowedterrain.desc=The ground has been hallowed here. Hallowed ground slowly enemies, heals allies, and causes grass to spread.
actors.hero.spells.holyintuition.name=holy intuition
actors.hero.spells.holyintuition.prompt=choose an item
actors.hero.spells.holyintuition.cursed=You sense malevolent magic lurking within this item.
actors.hero.spells.holyintuition.uncursed=This item is free of malevolent magic.
actors.hero.spells.holyintuition.short_desc=identifies whether an item is cursed or not.
actors.hero.spells.holyintuition.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.holylance.name=holy lance
actors.hero.spells.holylance.short_desc=Deals heavy ranged magic damage.
actors.hero.spells.holylance.desc=The Priest concentrates a large amount of energy into a devastating thrown lance made of light. This lance deals %1$d-%2$d damage and always deals maximum damage to undead and demonic targets.\n\nThis spell is very expensive, and has a cooldown of 50 turns.
@@ -605,6 +605,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 Remaining: %s.
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.desc=The Priest utters a prayer that extends the duration of all buffs or debuffs on a specific target by %1$d turns. Positive effects will last longer on allies (including the Priest themselves), and harmful effects will last longer on enemies. This spell will also re-apply illuminated to an enemy that has been illuminated previously.\n\nMnemonic Prayer can only extend a specific instance of a buff or debuff once, it can't be used repeatedly to make a specific buff or debuff last forever. Each application of illuminated counts as a separate debuff.
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.
@@ -1091,8 +1095,8 @@ actors.hero.talent.holy_lance.title=Holy Lance
actors.hero.talent.holy_lance.desc=_+1:_ The Priest can cast _Holy Lance,_ a devastating spell that deals _30-55 damage_ at the cost of 4 charges.\n\n_+2:_ The Priest can cast _Holy Lance,_ a devastating spell that deals _45-83 damage_ at the cost of 4 charges.\n\n_+3:_ The Priest can cast _Holy Lance,_ a devastating spell that deals _60-110 damage_ at the cost of 4 charges.\n\nHoly Lance always deals maximum damage to demonic and undead foes. Holy Lance has a 50 turn cooldown before it can be cast again.
actors.hero.talent.hallowed_ground.title=Hallowed Ground
actors.hero.talent.hallowed_ground.desc=_+1:_ The Priest can cast _Hallowed Ground,_ a spell that hallows terrain in a _3x3 area_ for 20 turns, at the cost of 2 charges.\n\n_+2:_ The Priest can cast _Hallowed Ground,_ a spell that hallows terrain in a _5x5 area_ for 20 turns, at the cost of 2 charges.\n\n_+3:_ The Priest can cast _Hallowed Ground,_ a spell that hallows terrain in a _7x7 area_ for 20 turns, at the cost of 2 charges.\n\nWhen it is cast, Hallowed Ground heals allies for 10 HP, briefly roots enemies, and spreads short grass. Afterward, it slowly heals allies, cripples enemies, and causes tall grass to randomly grow. Hallowed ground grants shielding to the Priest instead of healing and is destroyed by fire.
actors.hero.talent.priestt3c.title=Unknown
actors.hero.talent.priestt3c.desc=This talent hasn't been implemented yet, it currently does nothing.
actors.hero.talent.mnemonic_prayer.title=Mnemonic Prayer
actors.hero.talent.mnemonic_prayer.desc=_+1:_ The Priest can cast _Mnemonic Prayer,_ a spell that extends buffs/debuffs on an ally/enemy for _3 turns_ at 1 charge cost.\n\n_+1:_ The Priest can cast _Mnemonic Prayer,_ a spell that extends buffs/debuffs on an ally/enemy for _4 turns_ 1 charge cost.\n\n_+1:_ The Priest can cast _Mnemonic Prayer,_ a spell that extends buffs/debuffs on an ally/enemy for _5 turns_ 1 charge cost.\n\nMnemonic Prayer also re-illuminates the target if they were illuminated previously. Mnemonic Prayer can only extend a particular instance of a buff/debuff once.
actors.hero.talent.paladint3a.title=Unknown
actors.hero.talent.paladint3a.desc=This talent hasn't been implemented yet, it currently does nothing.

View File

@@ -42,6 +42,10 @@ public class AdrenalineSurge extends Buff {
this.interval = interval;
spend(interval - cooldown());
}
public void delay( float value ){
spend(value);
}
public int boost(){
return boost;

View File

@@ -67,6 +67,10 @@ public class ArcaneArmor extends Buff {
spend(time - cooldown() - 1);
}
}
public void delay( float value ){
spend(value);
}
@Override
public int icon() {

View File

@@ -74,7 +74,7 @@ public class ArtifactRecharge extends Buff {
return this;
}
public ArtifactRecharge prolong( float amount ){
public ArtifactRecharge extend(float amount ){
left += amount;
return this;
}

View File

@@ -66,6 +66,10 @@ public class Barkskin extends Buff {
spend(time - cooldown() - 1);
}
}
public void delay( float value ){
spend(value);
}
@Override
public int icon() {

View File

@@ -78,6 +78,10 @@ public class Bleeding extends Buff {
this.source = source;
}
}
public void extend( float amount ) {
level += amount;
}
@Override
public int icon() {

View File

@@ -26,6 +26,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
import com.watabou.noosa.Image;
import com.watabou.utils.Bundle;
import com.watabou.utils.Reflection;
import java.util.HashSet;
@@ -34,6 +35,9 @@ public class Buff extends Actor {
public Char target;
//whether this buff was already extended by the mnemonic prayer spell
public boolean mnemonicExtended = false;
{
actPriority = BUFF_PRIO; //low priority, towards the end of a turn
}
@@ -138,6 +142,22 @@ public class Buff extends Actor {
return cooldown()+1f;
}
private static final String MNEMONIC_EXTENDED = "mnemonic_extended";
@Override
public void storeInBundle(Bundle bundle) {
super.storeInBundle(bundle);
if (mnemonicExtended) bundle.put(MNEMONIC_EXTENDED, mnemonicExtended);
}
@Override
public void restoreFromBundle(Bundle bundle) {
super.restoreFromBundle(bundle);
if (bundle.contains(MNEMONIC_EXTENDED)) {
mnemonicExtended = bundle.getBoolean(MNEMONIC_EXTENDED);
}
}
//creates a fresh instance of the buff and attaches that, this allows duplication.
public static<T extends Buff> T append( Char target, Class<T> buffClass ) {
T buff = Reflection.newInstance(buffClass);

View File

@@ -198,9 +198,13 @@ public class Burning extends Buff implements Hero.Doom {
}
}
}
left = duration;
if (left < duration) left = duration;
acted = false;
}
public void extend( float duration ) {
left += duration;
}
@Override
public int icon() {

View File

@@ -73,6 +73,10 @@ public class Corrosion extends Buff implements Hero.Doom {
if (this.damage < damage) this.damage = damage;
this.source = source;
}
public void extend( float duration ) {
left += duration;
}
@Override
public int icon() {

View File

@@ -78,6 +78,10 @@ public class Dread extends Buff {
return true;
}
public void extend( float duration ) {
left += duration;
}
private static final String LEFT = "left";
private static final String OBJECT = "object";

View File

@@ -62,6 +62,10 @@ public class FireImbue extends Buff {
this.left = duration;
}
public void extend( float duration ) {
left += duration;
}
@Override
public boolean act() {
if (Dungeon.level.map[target.pos] == Terrain.GRASS) {

View File

@@ -57,6 +57,10 @@ public class GreaterHaste extends Buff {
left = time;
}
public void extend( float duration ) {
left += duration;
}
@Override
public int icon() {
return BuffIndicator.HASTE;

View File

@@ -651,7 +651,7 @@ public class MonkEnergy extends Buff implements ActionIndicator.Action {
@Override
protected boolean act() {
Buff.affect(hero, Recharging.class, 8f);
Buff.affect(hero, ArtifactRecharge.class).prolong(8f).ignoreHornOfPlenty = false;
Buff.affect(hero, ArtifactRecharge.class).extend(8f).ignoreHornOfPlenty = false;
Actor.remove(this);
return true;
}

View File

@@ -82,6 +82,10 @@ public class Ooze extends Buff {
acted = false;
}
public void extend( float duration ) {
left += duration;
}
@Override
public boolean act() {
//washing away happens before debuff effects if debuff has gotten to act

View File

@@ -61,6 +61,11 @@ public abstract class ShieldBuff extends Buff {
shielding += amt;
if (target != null) target.needsShieldUpdate = true;
}
//doesn't add shield, but postpones it detereorating
public void delay( float value ){
spend(value);
}
public void decShield(){
decShield(1);

View File

@@ -62,6 +62,10 @@ public class ToxicImbue extends Buff {
this.left = duration;
}
public void extend( float duration ) {
left += duration;
}
@Override
public boolean act() {
if (left > 0) {

View File

@@ -72,6 +72,10 @@ public class WellFed extends Buff {
left /= 3;
}
}
public void extend( float duration ) {
left += duration;
}
@Override
public int icon() {

View File

@@ -181,7 +181,7 @@ public enum Talent {
//Cleric T3
CLEANSE(169, 3), LIGHT_READING(170, 3),
//Priest T3
HOLY_LANCE(171, 3), HALLOWED_GROUND(172, 3), PRIESTT3C(173, 3),
HOLY_LANCE(171, 3), HALLOWED_GROUND(172, 3), MNEMONIC_PRAYER(173, 3),
//Paladin T3
PALADINT3A(174, 3), PALADINT3B(175, 3), PALADINT3C(176, 3),
//Cleric A1 T4
@@ -1019,7 +1019,7 @@ public enum Talent {
Collections.addAll(tierTalents, UNENCUMBERED_SPIRIT, MONASTIC_VIGOR, COMBINED_ENERGY);
break;
case PRIEST:
Collections.addAll(tierTalents, HOLY_LANCE, HALLOWED_GROUND, PRIESTT3C);
Collections.addAll(tierTalents, HOLY_LANCE, HALLOWED_GROUND, MNEMONIC_PRAYER);
break;
case PALADIN:
Collections.addAll(tierTalents, PALADINT3A, PALADINT3B, PALADINT3C);

View File

@@ -128,6 +128,10 @@ public abstract class ClericSpell {
spells.add(HallowedGround.INSTANCE);
}
if (cleric.hasTalent(Talent.MNEMONIC_PRAYER)){
spells.add(MnemonicPrayer.INSTANCE);
}
}
return spells;
@@ -148,6 +152,7 @@ public abstract class ClericSpell {
spells.add(Radiance.INSTANCE);
spells.add(HolyLance.INSTANCE);
spells.add(HallowedGround.INSTANCE);
spells.add(MnemonicPrayer.INSTANCE);
return spells;
}
}

View File

@@ -79,6 +79,7 @@ public class GuidingLight extends TargetedClericSpell {
ch.sprite.burst(0xFFFFFF44, 3);
if (ch.isAlive()){
Buff.affect(ch, Illuminated.class);
Buff.affect(ch, WasIlluminatedTracker.class);
}
}
@@ -140,4 +141,6 @@ public class GuidingLight extends TargetedClericSpell {
else target.sprite.remove(CharSprite.State.ILLUMINATED);
}
}
public static class WasIlluminatedTracker extends Buff {}
}

View File

@@ -0,0 +1,166 @@
/*
* 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.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.AdrenalineSurge;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.ArcaneArmor;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.ArtifactRecharge;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Barkskin;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Bleeding;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Burning;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Corrosion;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Dread;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.FireImbue;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.FlavourBuff;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.GreaterHaste;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Healing;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Ooze;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Poison;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.ShieldBuff;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.ToxicImbue;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.WellFed;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent;
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
import com.shatteredpixel.shatteredpixeldungeon.items.armor.glyphs.Viscosity;
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.HolyTome;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.elixirs.ElixirOfAquaticRejuvenation;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.exotic.ScrollOfChallenge;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Kinetic;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.plants.Sungrass;
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
import com.shatteredpixel.shatteredpixeldungeon.ui.HeroIcon;
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
import com.watabou.noosa.audio.Sample;
public class MnemonicPrayer extends TargetedClericSpell {
public static MnemonicPrayer INSTANCE = new MnemonicPrayer();
@Override
public int icon() {
return HeroIcon.MNEMONIC_PRAYER;
}
@Override
@SuppressWarnings("unchecked")
protected void onTargetSelected(HolyTome tome, Hero hero, Integer target) {
if (target == null){
return;
}
Char ch = Actor.findChar(target);
if (ch == null || !Dungeon.level.heroFOV[target]){
GLog.w(Messages.get(this, "no_target"));
return;
}
float extension = 2 + hero.pointsInTalent(Talent.MNEMONIC_PRAYER);
if (ch.alignment == Char.Alignment.ALLY){
Sample.INSTANCE.play(Assets.Sounds.CHARGEUP);
ch.sprite.emitter().start(Speck.factory(Speck.UP), 0.15f, 4);
for (Buff b : ch.buffs()){
if (b.type != Buff.buffType.POSITIVE || b.mnemonicExtended || b.icon() == BuffIndicator.NONE){
continue;
}
//should consider some buffs that may be OP here, e.g. invuln
if (b instanceof FlavourBuff) Buff.affect(ch, (Class<?extends FlavourBuff>)b.getClass(), extension);
else if (b instanceof AdrenalineSurge) ((AdrenalineSurge) b).delay(extension);
else if (b instanceof ArcaneArmor) ((ArcaneArmor) b).delay(extension);
else if (b instanceof ArtifactRecharge) ((ArtifactRecharge) b).extend(extension);
else if (b instanceof Barkskin) ((Barkskin) b).delay(extension);
else if (b instanceof FireImbue) ((FireImbue) b).extend(extension);
else if (b instanceof GreaterHaste) ((GreaterHaste) b).extend(extension);
else if (b instanceof Healing) ((Healing) b).increaseHeal((int)extension);
else if (b instanceof ToxicImbue) ((ToxicImbue) b).extend(extension);
else if (b instanceof WellFed) ((WellFed) b).extend(extension);
else if (b instanceof ElixirOfAquaticRejuvenation.AquaHealing) ((ElixirOfAquaticRejuvenation.AquaHealing) b).extend(extension);
else if (b instanceof ScrollOfChallenge.ChallengeArena) ((ScrollOfChallenge.ChallengeArena) b).extend(extension);
else if (b instanceof ShieldBuff) ((ShieldBuff) b).delay(extension);
else if (b instanceof Kinetic.ConservedDamage) ((Kinetic.ConservedDamage) b).delay(extension);
else if (b instanceof Sungrass.Health) ((Sungrass.Health) b).boost((int) extension);
b.mnemonicExtended = true;
}
} else {
Sample.INSTANCE.play(Assets.Sounds.DEBUFF);
ch.sprite.emitter().start(Speck.factory(Speck.DOWN), 0.15f, 4);
for (Buff b : ch.buffs()){
if (b instanceof GuidingLight.WasIlluminatedTracker){
Buff.affect(ch, GuidingLight.Illuminated.class);
continue;
}
if (b.type != Buff.buffType.NEGATIVE || b.mnemonicExtended){
continue;
}
//this might need a nerf of aggression vs bosses. (perhaps nerf the extension?)
if (b instanceof FlavourBuff) Buff.affect(ch, (Class<?extends FlavourBuff>)b.getClass(), extension);
else if (b instanceof Bleeding) ((Bleeding) b).extend( extension );
else if (b instanceof Burning) ((Burning) b).extend( extension );
else if (b instanceof Corrosion) ((Corrosion) b).extend( extension );
else if (b instanceof Dread) ((Dread) b).extend( extension );
else if (b instanceof Ooze) ((Ooze) b).extend( extension );
else if (b instanceof Poison) ((Poison) b).extend( extension );
else if (b instanceof Viscosity.DeferedDamage) ((Viscosity.DeferedDamage) b).extend( extension );
b.mnemonicExtended = true;
}
}
if (ch == hero){
hero.busy();
hero.sprite.operate(ch.pos);
hero.spend( 1f );
BuffIndicator.refreshHero();
} else {
hero.sprite.zap(ch.pos);
hero.spendAndNext( 1f );
}
onSpellCast(tome, hero);
}
public String desc(){
return Messages.get(this, "desc", 2 + Dungeon.hero.pointsInTalent(Talent.MNEMONIC_PRAYER)) + "\n\n" + Messages.get(this, "charge_cost", (int)chargeUse(Dungeon.hero));
}
}

View File

@@ -62,6 +62,7 @@ public class Radiance extends ClericSpell {
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, GuidingLight.WasIlluminatedTracker.class);
//exactly enough to delay them by 1 turn after the casting
Buff.affect(mob, Paralysis.class, mob.cooldown()+1f);
}

View File

@@ -467,7 +467,7 @@ public class DwarfKing extends Mob {
} else if (phase == 3 && !(src instanceof Viscosity.DeferedDamage)){
if (dmg >= 0) {
Viscosity.DeferedDamage deferred = Buff.affect( this, Viscosity.DeferedDamage.class );
deferred.prolong( dmg );
deferred.extend( dmg );
sprite.showStatus( CharSprite.WARNING, Messages.get(Viscosity.class, "deferred", dmg) );
}

View File

@@ -467,7 +467,7 @@ public abstract class YogFist extends Mob {
if (!isInvulnerable(src.getClass()) && !(src instanceof Viscosity.DeferedDamage)){
dmg = Math.round( dmg * resist( src.getClass() ));
if (dmg >= 0) {
Buff.affect(this, Viscosity.DeferedDamage.class).prolong(dmg);
Buff.affect(this, Viscosity.DeferedDamage.class).extend(dmg);
sprite.showStatus(CharSprite.WARNING, Messages.get(Viscosity.class, "deferred", dmg));
}
} else{

View File

@@ -49,6 +49,7 @@ public class Speck extends Image {
public static final int BUBBLE = 12;
public static final int STEAM = 13;
public static final int COIN = 14;
public static final int DOWN = 15;
public static final int DISCOVER = 101;
public static final int EVOKE = 102;
@@ -224,6 +225,10 @@ public class Speck extends Image {
speed.set( 0, -20 );
lifespan = 1f;
break;
case DOWN:
speed.set( 0, 20 );
lifespan = 1f;
break;
case CALM:
color(0, 1, 1);
@@ -429,6 +434,7 @@ public class Speck extends Image {
break;
case UP:
case DOWN:
scale.set( (float)(Math.sqrt( p < 0.5f ? p : 1 - p ) * 2) );
break;

View File

@@ -85,7 +85,7 @@ public class Viscosity extends Glyph {
if (amount > 0){
DeferedDamage deferred = Buff.affect( target, DeferedDamage.class );
deferred.prolong( amount );
deferred.extend( amount );
target.sprite.showStatus( CharSprite.WARNING, Messages.get(Viscosity.class, "deferred", amount) );
}
@@ -123,7 +123,7 @@ public class Viscosity extends Glyph {
damage = bundle.getInt( DAMAGE );
}
public void prolong( int damage ) {
public void extend( float damage ) {
if (this.damage == 0){
//wait 1 turn before damaging if this is freshly applied
postpone(TICK);

View File

@@ -68,6 +68,10 @@ public class ElixirOfAquaticRejuvenation extends Elixir {
public void set( int amount ){
if (amount > left) left = amount;
}
public void extend( float duration ) {
left += duration;
}
@Override
public boolean act() {

View File

@@ -143,6 +143,10 @@ public class ScrollOfChallenge extends ExoticScroll {
}
public void extend( float duration ) {
left += duration;
}
@Override
public boolean act() {

View File

@@ -66,7 +66,7 @@ public class WildEnergy extends TargetedSpell {
ArtifactRecharge.chargeArtifacts(hero, 4f);
Buff.affect(hero, Recharging.class, 8f);
Buff.affect(hero, ArtifactRecharge.class).prolong( 8 ).ignoreHornOfPlenty = false;
Buff.affect(hero, ArtifactRecharge.class).extend( 8 ).ignoreHornOfPlenty = false;
}
@Override

View File

@@ -115,6 +115,10 @@ public class Kinetic extends Weapon.Enchantment {
spend(TICK);
return true;
}
public void delay( float value ){
spend(value);
}
@Override
public String desc() {

View File

@@ -86,6 +86,7 @@ public class HeroIcon extends Image {
public static final int RADIANCE = 50;
public static final int HOLY_LANCE = 51;
public static final int HALLOWED_GROUND = 52;
public static final int MNEMONIC_PRAYER = 53;
//all cleric spells have a separate icon with no background for the action indicator
public static final int SPELL_ACTION_OFFSET = 32;