v3.0.0: implemented aura of protection minus the glyph sharing property
This commit is contained in:
@@ -566,7 +566,7 @@ actors.hero.abilities.ratmogrify$transmograt.rankings_desc=Slain by: ratmogrifie
|
|||||||
##Cleric Spells
|
##Cleric Spells
|
||||||
actors.hero.spells.auraofprotection.name=aura of protection
|
actors.hero.spells.auraofprotection.name=aura of protection
|
||||||
actors.hero.spells.auraofprotection.short_desc=Boosts defence for Paladin and nearby allies.
|
actors.hero.spells.auraofprotection.short_desc=Boosts defence for Paladin and nearby allies.
|
||||||
actors.hero.spells.auraofprotection.desc=The Paladin begins radiating protective energy for 20 turns. Any ally within 2 tiles of the Paladin (including themselves) takes %1$d%% less damage, and gains the effect of the Paladin's armor glyph at +%2$d%% power.\n\nThe power boost will always apply, but this spell cannot cause the Paladin's glyph to apply more than once if a character is already benefitting from it (e.g. the Paladin themselves, or a prismatic image).
|
actors.hero.spells.auraofprotection.desc=The Paladin begins radiating protective energy in a sparkling aura around themselves for 20 turns. Any ally within 2 tiles of the Paladin (including themselves) takes %1$d%% less damage, and gains the effect of the Paladin's armor glyph at +%2$d%% power.\n\nThis damage reduction takes place before other damage-reducing effects (e.g. armor). The glyph power boost will always apply, but this spell cannot cause the Paladin's glyph to apply more than once if a character is already benefitting from it (e.g. the Paladin themselves, or a prismatic image).
|
||||||
actors.hero.spells.auraofprotection$aurabuff.name=aura of protection
|
actors.hero.spells.auraofprotection$aurabuff.name=aura of protection
|
||||||
actors.hero.spells.auraofprotection$aurabuff.desc=The Paladin is radiating protective energy around themselves.\n\nAny nearby ally (including the Paladin themselves) takes reduced damage and gains the effect of the Paladin's armor glyph with boosted power.\n\nTurns Remaining: %s.
|
actors.hero.spells.auraofprotection$aurabuff.desc=The Paladin is radiating protective energy around themselves.\n\nAny nearby ally (including the Paladin themselves) takes reduced damage and gains the effect of the Paladin's armor glyph with boosted power.\n\nTurns Remaining: %s.
|
||||||
|
|
||||||
|
|||||||
@@ -80,6 +80,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent;
|
|||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.abilities.duelist.Challenge;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.abilities.duelist.Challenge;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.abilities.rogue.DeathMark;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.abilities.rogue.DeathMark;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.abilities.warrior.Endure;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.abilities.warrior.Endure;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.spells.AuraOfProtection;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.spells.GuidingLight;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.spells.GuidingLight;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.spells.ShieldOfLight;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.spells.ShieldOfLight;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Brute;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Brute;
|
||||||
@@ -438,6 +439,12 @@ public abstract class Char extends Actor {
|
|||||||
dmg *= 0.67f;
|
dmg *= 0.67f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Dungeon.hero.alignment == enemy.alignment
|
||||||
|
&& Dungeon.level.distance(enemy.pos, Dungeon.hero.pos) <= 2
|
||||||
|
&& Dungeon.hero.buff(AuraOfProtection.AuraBuff.class) != null){
|
||||||
|
dmg *= 0.925f - 0.075f*Dungeon.hero.pointsInTalent(Talent.AURA_OF_PROTECTION);
|
||||||
|
}
|
||||||
|
|
||||||
if (enemy.buff(MonkEnergy.MonkAbility.Meditate.MeditateResistance.class) != null){
|
if (enemy.buff(MonkEnergy.MonkAbility.Meditate.MeditateResistance.class) != null){
|
||||||
dmg *= 0.2f;
|
dmg *= 0.2f;
|
||||||
}
|
}
|
||||||
@@ -737,6 +744,15 @@ public abstract class Char extends Actor {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//if dmg is from a character we already reduced it in defenseProc
|
||||||
|
if (!(src instanceof Char)) {
|
||||||
|
if (Dungeon.hero.alignment == alignment
|
||||||
|
&& Dungeon.level.distance(pos, Dungeon.hero.pos) <= 2
|
||||||
|
&& Dungeon.hero.buff(AuraOfProtection.AuraBuff.class) != null) {
|
||||||
|
dmg *= 0.925f - 0.075f*Dungeon.hero.pointsInTalent(Talent.AURA_OF_PROTECTION);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Terror t = buff(Terror.class);
|
Terror t = buff(Terror.class);
|
||||||
if (t != null){
|
if (t != null){
|
||||||
t.recover();
|
t.recover();
|
||||||
|
|||||||
+19
-1
@@ -21,15 +21,19 @@
|
|||||||
|
|
||||||
package com.shatteredpixel.shatteredpixeldungeon.actors.hero.spells;
|
package com.shatteredpixel.shatteredpixeldungeon.actors.hero.spells;
|
||||||
|
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.FlavourBuff;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.FlavourBuff;
|
||||||
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.actors.hero.Talent;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
|
||||||
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.BuffIndicator;
|
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.ui.HeroIcon;
|
import com.shatteredpixel.shatteredpixeldungeon.ui.HeroIcon;
|
||||||
|
import com.watabou.noosa.audio.Sample;
|
||||||
|
import com.watabou.noosa.particles.Emitter;
|
||||||
|
|
||||||
public class AuraOfProtection extends ClericSpell {
|
public class AuraOfProtection extends ClericSpell {
|
||||||
|
|
||||||
@@ -57,7 +61,7 @@ public class AuraOfProtection extends ClericSpell {
|
|||||||
|
|
||||||
Buff.affect(hero,AuraBuff.class, AuraBuff.DURATION);
|
Buff.affect(hero,AuraBuff.class, AuraBuff.DURATION);
|
||||||
|
|
||||||
//TODO vfx/sfx
|
Sample.INSTANCE.play(Assets.Sounds.READ);
|
||||||
|
|
||||||
hero.spend( 1f );
|
hero.spend( 1f );
|
||||||
hero.busy();
|
hero.busy();
|
||||||
@@ -71,6 +75,8 @@ public class AuraOfProtection extends ClericSpell {
|
|||||||
|
|
||||||
public static float DURATION = 20f;
|
public static float DURATION = 20f;
|
||||||
|
|
||||||
|
private Emitter particles;
|
||||||
|
|
||||||
{
|
{
|
||||||
type = buffType.POSITIVE;
|
type = buffType.POSITIVE;
|
||||||
}
|
}
|
||||||
@@ -80,6 +86,18 @@ public class AuraOfProtection extends ClericSpell {
|
|||||||
return BuffIndicator.PROT_AURA;
|
return BuffIndicator.PROT_AURA;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void fx(boolean on) {
|
||||||
|
if (on && (particles == null || particles.parent == null)){
|
||||||
|
particles = target.sprite.emitter(); //emitter is much bigger than char so it needs to manage itself
|
||||||
|
particles.pos(target.sprite, -32, -32, 80, 80);
|
||||||
|
particles.fillTarget = false;
|
||||||
|
particles.pour(Speck.factory(Speck.LIGHT), 0.02f);
|
||||||
|
} else if (!on && particles != null){
|
||||||
|
particles.on = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public float iconFadePercent() {
|
public float iconFadePercent() {
|
||||||
return Math.max(0, (DURATION - visualcooldown()) / DURATION);
|
return Math.max(0, (DURATION - visualcooldown()) / DURATION);
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
|||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroClass;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroClass;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroSubClass;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroSubClass;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.spells.AuraOfProtection;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.spells.HolyWard;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.spells.HolyWard;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
|
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.BrokenSeal;
|
import com.shatteredpixel.shatteredpixeldungeon.items.BrokenSeal;
|
||||||
@@ -757,7 +758,15 @@ public class Armor extends EquipableItem {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static float genericProcChanceMultiplier( Char defender ){
|
public static float genericProcChanceMultiplier( Char defender ){
|
||||||
return RingOfArcana.enchantPowerMultiplier(defender);
|
float multi = RingOfArcana.enchantPowerMultiplier(defender);
|
||||||
|
|
||||||
|
if (Dungeon.hero.alignment == defender.alignment
|
||||||
|
&& Dungeon.level.distance(defender.pos, Dungeon.hero.pos) <= 2
|
||||||
|
&& Dungeon.hero.buff(AuraOfProtection.AuraBuff.class) != null){
|
||||||
|
multi += 0.25f + 0.25f*Dungeon.hero.pointsInTalent(Talent.AURA_OF_PROTECTION);
|
||||||
|
}
|
||||||
|
|
||||||
|
return multi;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String name() {
|
public String name() {
|
||||||
|
|||||||
Reference in New Issue
Block a user