v1.2.2: added a safety check to some on-ID vfx

This commit is contained in:
Evan Debenham 2022-04-07 19:13:15 -04:00
parent 66865d0a43
commit f6d30c05d8
2 changed files with 8 additions and 4 deletions

View File

@ -429,9 +429,11 @@ public enum Talent {
if (hero.hasTalent(TEST_SUBJECT)){
//heal for 2/3 HP
hero.HP = Math.min(hero.HP + 1 + hero.pointsInTalent(TEST_SUBJECT), hero.HT);
if (hero.sprite != null) {
Emitter e = hero.sprite.emitter();
if (e != null) e.burst(Speck.factory(Speck.HEALING), hero.pointsInTalent(TEST_SUBJECT));
}
}
if (hero.hasTalent(TESTED_HYPOTHESIS)){
//2/3 turns of wand recharging
Buff.affect(hero, Recharging.class, 1f + hero.pointsInTalent(TESTED_HYPOTHESIS));

View File

@ -56,9 +56,11 @@ public class ScrollOfRecharging extends Scroll {
}
public static void charge( Char user ) {
if (user.sprite != null) {
Emitter e = user.sprite.centerEmitter();
if (e != null) e.burst(EnergyParticle.FACTORY, 15);
}
}
@Override
public int value() {