v0.7.2: more bugfixes / adjustments:
- blessed ankhs now cleanse more debuffs, not just paralysis - added a safety check to warlock zapping incase enemy is null - added a safety check to vampiric incase attacker is dead
This commit is contained in:
parent
11ae926341
commit
616de2db3d
|
@ -80,6 +80,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.keys.Key;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.keys.SkeletonKey;
|
import com.shatteredpixel.shatteredpixeldungeon.items.keys.SkeletonKey;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.potions.Potion;
|
import com.shatteredpixel.shatteredpixeldungeon.items.potions.Potion;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfExperience;
|
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfExperience;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfHealing;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfStrength;
|
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfStrength;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.potions.elixirs.ElixirOfMight;
|
import com.shatteredpixel.shatteredpixeldungeon.items.potions.elixirs.ElixirOfMight;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfAccuracy;
|
import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfAccuracy;
|
||||||
|
@ -1377,6 +1378,7 @@ public class Hero extends Char {
|
||||||
this.HP = HT/4;
|
this.HP = HT/4;
|
||||||
|
|
||||||
//ensures that you'll get to act first in almost any case, to prevent reviving and then instantly dieing again.
|
//ensures that you'll get to act first in almost any case, to prevent reviving and then instantly dieing again.
|
||||||
|
PotionOfHealing.cure(this);
|
||||||
Buff.detach(this, Paralysis.class);
|
Buff.detach(this, Paralysis.class);
|
||||||
spend(-cooldown());
|
spend(-cooldown());
|
||||||
|
|
||||||
|
|
|
@ -96,6 +96,8 @@ public class Warlock extends Mob implements Callback {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void zap() {
|
private void zap() {
|
||||||
|
if (enemy == null) return;
|
||||||
|
|
||||||
spend( TIME_TO_ZAP );
|
spend( TIME_TO_ZAP );
|
||||||
|
|
||||||
if (hit( this, enemy, true )) {
|
if (hit( this, enemy, true )) {
|
||||||
|
|
|
@ -41,7 +41,7 @@ public class Vampiric extends Weapon.Enchantment {
|
||||||
int healAmt = Math.round(healPercent * damage);
|
int healAmt = Math.round(healPercent * damage);
|
||||||
healAmt = Math.min( healAmt, attacker.HT - attacker.HP );
|
healAmt = Math.min( healAmt, attacker.HT - attacker.HP );
|
||||||
|
|
||||||
if (healAmt > 0) {
|
if (healAmt > 0 && attacker.isAlive()) {
|
||||||
|
|
||||||
attacker.HP += healAmt;
|
attacker.HP += healAmt;
|
||||||
attacker.sprite.emitter().start( Speck.factory( Speck.HEALING ), 0.4f, 1 );
|
attacker.sprite.emitter().start( Speck.factory( Speck.HEALING ), 0.4f, 1 );
|
||||||
|
|
Loading…
Reference in New Issue
Block a user