Skip to content

Commit

Permalink
v2.3.2: fixed 2.3.1 change which let Tengu set himself on fire =S
Browse files Browse the repository at this point in the history
  • Loading branch information
00-Evan committed Jan 31, 2024
1 parent f985884 commit 92b826e
Showing 1 changed file with 18 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Fire;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Blindness;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Burning;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Doom;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Dread;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.LockedFloor;
Expand All @@ -58,6 +59,7 @@
import com.shatteredpixel.shatteredpixeldungeon.levels.PrisonBossLevel;
import com.shatteredpixel.shatteredpixeldungeon.mechanics.Ballistica;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.plants.Plant;
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
Expand Down Expand Up @@ -859,13 +861,26 @@ protected void evolve() {
}

if (cur[cell] > 0 && off[cell] == 0){

if (Actor.findChar( cell ) == Dungeon.hero){

//similar to fire.burn(), but Tengu is immune, and hero loses score
Char ch = Actor.findChar( cell );
if (ch != null && !ch.isImmune(Fire.class) && !(ch instanceof Tengu)) {
Buff.affect( ch, Burning.class ).reignite( ch );
}
if (ch == Dungeon.hero){
Statistics.qualifiedForBossChallengeBadge = false;
Statistics.bossScores[1] -= 100;
}

Fire.burn(cell);
Heap heap = Dungeon.level.heaps.get( cell );
if (heap != null) {
heap.burn();
}

Plant plant = Dungeon.level.plants.get( cell );
if (plant != null){
plant.wither();
}

if (Dungeon.level.flamable[cell]){
Dungeon.level.destroy( cell );
Expand Down

0 comments on commit 92b826e

Please sign in to comment.