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

View File

@@ -21,6 +21,7 @@
package com.shatteredpixel.shatteredpixeldungeon.plants;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Bless;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
@@ -43,7 +44,9 @@ public class Starflower extends Plant {
if (ch != null) {
Buff.prolong(ch, Bless.class, Bless.DURATION);
new Flare( 6, 32 ).color(0xFFFF00, true).show( ch.sprite, 2f );
if (Dungeon.level.heroFOV[ch.pos]){
new Flare(6, 32).color(0xFFFF00, true).show(ch.sprite, 2f);
}
if (ch instanceof Hero && ((Hero) ch).subClass == HeroSubClass.WARDEN){
Buff.prolong(ch, Recharging.class, Recharging.DURATION);
SpellSprite.show( ch, SpellSprite.CHARGE );