v2.2.0: fixed starflower showing flare effect from out of FOV

This commit is contained in:
Evan Debenham
2023-08-18 13:39:11 -04:00
parent 8e26ab46a1
commit 2584717742
@@ -21,6 +21,7 @@
package com.shatteredpixel.shatteredpixeldungeon.plants; package com.shatteredpixel.shatteredpixeldungeon.plants;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.actors.Char; import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Bless; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Bless;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
@@ -43,7 +44,9 @@ public class Starflower extends Plant {
if (ch != null) { if (ch != null) {
Buff.prolong(ch, Bless.class, Bless.DURATION); Buff.prolong(ch, Bless.class, Bless.DURATION);
if (Dungeon.level.heroFOV[ch.pos]){
new Flare(6, 32).color(0xFFFF00, true).show(ch.sprite, 2f); new Flare(6, 32).color(0xFFFF00, true).show(ch.sprite, 2f);
}
if (ch instanceof Hero && ((Hero) ch).subClass == HeroSubClass.WARDEN){ if (ch instanceof Hero && ((Hero) ch).subClass == HeroSubClass.WARDEN){
Buff.prolong(ch, Recharging.class, Recharging.DURATION); Buff.prolong(ch, Recharging.class, Recharging.DURATION);
SpellSprite.show( ch, SpellSprite.CHARGE ); SpellSprite.show( ch, SpellSprite.CHARGE );