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
@@ -105,10 +105,10 @@ public class LayOnHands extends TargetedClericSpell {
|
||||
}
|
||||
|
||||
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 totalBarrier = 0;
|
||||
if (ch == hero){
|
||||
Barrier barrier = Buff.affect(ch, Barrier.class);
|
||||
totalBarrier = totalHeal;
|
||||
totalBarrier = Math.min(3*totalHeal - barrier.shielding(), totalBarrier);
|
||||
totalBarrier = Math.max(0, totalBarrier);
|
||||
@@ -117,15 +117,18 @@ public class LayOnHands extends TargetedClericSpell {
|
||||
} else {
|
||||
if (ch.HT - ch.HP < totalHeal){
|
||||
totalBarrier = totalHeal - (ch.HT - ch.HP);
|
||||
totalBarrier = Math.min(3*totalHeal - barrier.shielding(), totalBarrier);
|
||||
totalBarrier = Math.max(0, totalBarrier);
|
||||
if (ch.HP != ch.HT) {
|
||||
ch.HP = ch.HT;
|
||||
ch.sprite.showStatusWithIcon(CharSprite.POSITIVE, Integer.toString(totalHeal - totalBarrier), FloatingText.HEALING);
|
||||
}
|
||||
if (totalBarrier > 0) {
|
||||
barrier.incShield(totalBarrier);
|
||||
ch.sprite.showStatusWithIcon(CharSprite.POSITIVE, Integer.toString(totalBarrier), FloatingText.SHIELDING);
|
||||
Barrier barrier = Buff.affect(ch, Barrier.class);
|
||||
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 {
|
||||
ch.HP = ch.HP + totalHeal;
|
||||
|
||||
Reference in New Issue
Block a user