v3.1.0: Fixed lay on hands applying 0 barrier to allies
This commit is contained in:
committed by
Evan Debenham
parent
6512c8b8cd
commit
5f02b2c996
+8
-5
@@ -105,10 +105,10 @@ public class LayOnHands extends TargetedClericSpell {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void affectChar(Hero hero, Char ch){
|
private void affectChar(Hero hero, Char ch){
|
||||||
Barrier barrier = Buff.affect(ch, Barrier.class);
|
|
||||||
int totalHeal = 5 + 5*hero.pointsInTalent(Talent.LAY_ON_HANDS);
|
int totalHeal = 5 + 5*hero.pointsInTalent(Talent.LAY_ON_HANDS);
|
||||||
int totalBarrier = 0;
|
int totalBarrier = 0;
|
||||||
if (ch == hero){
|
if (ch == hero){
|
||||||
|
Barrier barrier = Buff.affect(ch, Barrier.class);
|
||||||
totalBarrier = totalHeal;
|
totalBarrier = totalHeal;
|
||||||
totalBarrier = Math.min(3*totalHeal - barrier.shielding(), totalBarrier);
|
totalBarrier = Math.min(3*totalHeal - barrier.shielding(), totalBarrier);
|
||||||
totalBarrier = Math.max(0, totalBarrier);
|
totalBarrier = Math.max(0, totalBarrier);
|
||||||
@@ -117,15 +117,18 @@ public class LayOnHands extends TargetedClericSpell {
|
|||||||
} else {
|
} else {
|
||||||
if (ch.HT - ch.HP < totalHeal){
|
if (ch.HT - ch.HP < totalHeal){
|
||||||
totalBarrier = totalHeal - (ch.HT - ch.HP);
|
totalBarrier = totalHeal - (ch.HT - ch.HP);
|
||||||
totalBarrier = Math.min(3*totalHeal - barrier.shielding(), totalBarrier);
|
|
||||||
totalBarrier = Math.max(0, totalBarrier);
|
|
||||||
if (ch.HP != ch.HT) {
|
if (ch.HP != ch.HT) {
|
||||||
ch.HP = ch.HT;
|
ch.HP = ch.HT;
|
||||||
ch.sprite.showStatusWithIcon(CharSprite.POSITIVE, Integer.toString(totalHeal - totalBarrier), FloatingText.HEALING);
|
ch.sprite.showStatusWithIcon(CharSprite.POSITIVE, Integer.toString(totalHeal - totalBarrier), FloatingText.HEALING);
|
||||||
}
|
}
|
||||||
if (totalBarrier > 0) {
|
if (totalBarrier > 0) {
|
||||||
barrier.incShield(totalBarrier);
|
Barrier barrier = Buff.affect(ch, Barrier.class);
|
||||||
ch.sprite.showStatusWithIcon(CharSprite.POSITIVE, Integer.toString(totalBarrier), FloatingText.SHIELDING);
|
totalBarrier = Math.min(3 * totalHeal - barrier.shielding(), totalBarrier);
|
||||||
|
totalBarrier = Math.max(0, totalBarrier);
|
||||||
|
if (totalBarrier > 0) {
|
||||||
|
barrier.incShield(totalBarrier);
|
||||||
|
ch.sprite.showStatusWithIcon(CharSprite.POSITIVE, Integer.toString(totalBarrier), FloatingText.SHIELDING);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
ch.HP = ch.HP + totalHeal;
|
ch.HP = ch.HP + totalHeal;
|
||||||
|
|||||||
Reference in New Issue
Block a user