v0.9.2b: toned down the intensity of white flash effects

This commit is contained in:
Evan Debenham 2021-03-16 17:17:35 -04:00
parent 889c5b5621
commit 59ffaa1b8c
10 changed files with 23 additions and 18 deletions

View File

@ -291,7 +291,7 @@ public abstract class Elemental extends Mob {
protected void rangedProc( Char enemy ) {
Buff.affect( enemy, Blindness.class, Blindness.DURATION/2f );
if (enemy == Dungeon.hero) {
GameScene.flash(0xFFFFFF);
GameScene.flash(0x80FFFFFF);
}
}
}

View File

@ -481,11 +481,11 @@ public abstract class YogFist extends Mob {
|| PathFinder.getStep(i, Dungeon.level.exit, Dungeon.level.passable) == -1);
ScrollOfTeleportation.appear(this, i);
state = WANDERING;
GameScene.flash(0xFFFFFF);
GameScene.flash(0x80FFFFFF);
GLog.w( Messages.get( this, "teleport" ));
} else if (!isAlive()){
Buff.prolong( Dungeon.hero, Blindness.class, Blindness.DURATION*3f );
GameScene.flash(0xFFFFFF);
GameScene.flash(0x80FFFFFF);
}
}

View File

@ -97,7 +97,7 @@ public class TimekeepersHourglass extends Artifact {
protected void onSelect(int index) {
if (index == 0) {
GLog.i( Messages.get(TimekeepersHourglass.class, "onstasis") );
GameScene.flash(0xFFFFFF);
GameScene.flash(0x80FFFFFF);
Sample.INSTANCE.play(Assets.Sounds.TELEPORT);
activeBuff = new timeStasis();
@ -105,7 +105,7 @@ public class TimekeepersHourglass extends Artifact {
activeBuff.attachTo(Dungeon.hero);
} else if (index == 1) {
GLog.i( Messages.get(TimekeepersHourglass.class, "onfreeze") );
GameScene.flash(0xFFFFFF);
GameScene.flash(0x80FFFFFF);
Sample.INSTANCE.play(Assets.Sounds.TELEPORT);
activeBuff = new timeFreeze();

View File

@ -48,9 +48,9 @@ public class Flashbang extends Bomb {
if (power > 0){
Buff.prolong(ch, Blindness.class, power);
Buff.prolong(ch, Cripple.class, power);
}
if (ch == Dungeon.hero){
GameScene.flash(0xFFFFFF);
if (ch == Dungeon.hero){
GameScene.flash(0x80FFFFFF);
}
}
}
}

View File

@ -40,7 +40,7 @@ public class ScrollOfRetribution extends Scroll {
@Override
public void doRead() {
GameScene.flash( 0xFFFFFF );
GameScene.flash( 0x80FFFFFF );
//scales from 0x to 1x power, maxing at ~10% HP
float hpPercent = (curUser.HT - curUser.HP)/(float)(curUser.HT);

View File

@ -42,7 +42,7 @@ public class ScrollOfPsionicBlast extends ExoticScroll {
@Override
public void doRead() {
GameScene.flash( 0xFFFFFF );
GameScene.flash( 0x80FFFFFF );
Sample.INSTANCE.play( Assets.Sounds.BLAST );

View File

@ -414,7 +414,7 @@ public class NewPrisonBossLevel extends Level {
tengu.sprite.kill();
if (d != null) tengu.add(d);
GameScene.flash(0xFFFFFF);
GameScene.flash(0x80FFFFFF);
Sample.INSTANCE.play(Assets.Sounds.BLAST);
state = State.FIGHT_PAUSE;
@ -435,7 +435,7 @@ public class NewPrisonBossLevel extends Level {
GameScene.add(tengu);
tengu.notice();
GameScene.flash(0xFFFFFF);
GameScene.flash(0x80FFFFFF);
Sample.INSTANCE.play(Assets.Sounds.BLAST);
state = State.FIGHT_ARENA;
@ -485,7 +485,7 @@ public class NewPrisonBossLevel extends Level {
}
}
GameScene.flash(0xFFFFFF);
GameScene.flash(0x80FFFFFF);
Sample.INSTANCE.play(Assets.Sounds.BLAST);
state = State.WON;

View File

@ -360,7 +360,7 @@ public class OldPrisonBossLevel extends Level {
cleanWalls();
GameScene.resetMap();
GameScene.flash(0xFFFFFF);
GameScene.flash(0x80FFFFFF);
Sample.INSTANCE.play(Assets.Sounds.BLAST);
state = State.MAZE;
@ -391,7 +391,7 @@ public class OldPrisonBossLevel extends Level {
GameScene.add(tengu);
tengu.notice();
GameScene.flash(0xFFFFFF);
GameScene.flash(0x80FFFFFF);
Sample.INSTANCE.play(Assets.Sounds.BLAST);
state = State.FIGHT_ARENA;
@ -445,7 +445,7 @@ public class OldPrisonBossLevel extends Level {
for (Item item : storedItems)
drop(item, randomTenguArenaCell());
GameScene.flash(0xFFFFFF);
GameScene.flash(0x80FFFFFF);
Sample.INSTANCE.play(Assets.Sounds.BLAST);
state = State.WON;

View File

@ -71,7 +71,7 @@ public class FlashingTrap extends Trap {
}
if (Dungeon.level.heroFOV[pos]) {
GameScene.flash(0xFFFFFF);
GameScene.flash(0x80FFFFFF);
Sample.INSTANCE.play( Assets.Sounds.BLAST );
}

View File

@ -998,7 +998,12 @@ public class GameScene extends PixelScene {
}
public static void flash( int color, boolean lightmode ) {
scene.fadeIn( 0xFF000000 | color, lightmode );
//greater than 0 to account for negative values (which have the first bit set to 1)
if (color > 0 && color < 0x01000000) {
scene.fadeIn(0xFF000000 | color, lightmode);
} else {
scene.fadeIn(color, lightmode);
}
}
public static void gameOver() {