Skip to content

Commit 92b826e

Browse files
committed
v2.3.2: fixed 2.3.1 change which let Tengu set himself on fire =S
1 parent f985884 commit 92b826e

File tree

1 file changed

+18
-3
lines changed
  • core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs

1 file changed

+18
-3
lines changed

core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Tengu.java

+18-3
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Fire;
3434
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Blindness;
3535
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
36+
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Burning;
3637
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Doom;
3738
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Dread;
3839
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.LockedFloor;
@@ -58,6 +59,7 @@
5859
import com.shatteredpixel.shatteredpixeldungeon.levels.PrisonBossLevel;
5960
import com.shatteredpixel.shatteredpixeldungeon.mechanics.Ballistica;
6061
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
62+
import com.shatteredpixel.shatteredpixeldungeon.plants.Plant;
6163
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
6264
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
6365
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
@@ -859,13 +861,26 @@ protected void evolve() {
859861
}
860862

861863
if (cur[cell] > 0 && off[cell] == 0){
862-
863-
if (Actor.findChar( cell ) == Dungeon.hero){
864+
865+
//similar to fire.burn(), but Tengu is immune, and hero loses score
866+
Char ch = Actor.findChar( cell );
867+
if (ch != null && !ch.isImmune(Fire.class) && !(ch instanceof Tengu)) {
868+
Buff.affect( ch, Burning.class ).reignite( ch );
869+
}
870+
if (ch == Dungeon.hero){
864871
Statistics.qualifiedForBossChallengeBadge = false;
865872
Statistics.bossScores[1] -= 100;
866873
}
867874

868-
Fire.burn(cell);
875+
Heap heap = Dungeon.level.heaps.get( cell );
876+
if (heap != null) {
877+
heap.burn();
878+
}
879+
880+
Plant plant = Dungeon.level.plants.get( cell );
881+
if (plant != null){
882+
plant.wither();
883+
}
869884

870885
if (Dungeon.level.flamable[cell]){
871886
Dungeon.level.destroy( cell );

0 commit comments

Comments
 (0)