v3.1.0: improvements to color clarity, mainly for colorblind players:

- increased opacity on flare vfx
- added different flare counts for champions
- lightened growing champs slightly
- darkened hero health bar BG on mobile
- lightened shielding on mob HP bar
- increased constrast on inventory button backgrounds
This commit is contained in:
Evan Debenham
2025-05-12 17:42:54 -04:00
parent 047c9884a2
commit 759f550a20
10 changed files with 44 additions and 21 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 976 B

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@@ -44,6 +44,7 @@ public abstract class ChampionEnemy extends Buff {
}
protected int color;
protected int rays;
@Override
public int icon() {
@@ -57,7 +58,7 @@ public abstract class ChampionEnemy extends Buff {
@Override
public void fx(boolean on) {
if (on) target.sprite.aura( color );
if (on) target.sprite.aura( color, rays );
else target.sprite.clearAura();
}
@@ -114,6 +115,7 @@ public abstract class ChampionEnemy extends Buff {
{
color = 0xFF8800;
rays = 4;
}
@Override
@@ -150,6 +152,7 @@ public abstract class ChampionEnemy extends Buff {
{
color = 0x8800FF;
rays = 4;
}
@Override
@@ -178,6 +181,7 @@ public abstract class ChampionEnemy extends Buff {
{
color = 0x00FF00;
rays = 5;
}
@Override
@@ -196,6 +200,7 @@ public abstract class ChampionEnemy extends Buff {
{
color = 0x0088FF;
rays = 5;
}
@Override
@@ -224,6 +229,7 @@ public abstract class ChampionEnemy extends Buff {
{
color = 0xFFFF00;
rays = 6;
}
@Override
@@ -235,7 +241,8 @@ public abstract class ChampionEnemy extends Buff {
public static class Growing extends ChampionEnemy {
{
color = 0xFF0000;
color = 0xFF2222; //a little white helps it stick out from background
rays = 6;
}
private float multiplier = 1.19f;

View File

@@ -36,7 +36,7 @@ public class Invulnerability extends FlavourBuff {
@Override
public void fx(boolean on) {
if (!target.buffs(ChampionEnemy.class).isEmpty()) return;
if (on) target.sprite.aura( 0xFFFF00 );
if (on) target.sprite.aura( 0xFFFF00, 5 );
else target.sprite.clearAura();
}

View File

@@ -55,7 +55,7 @@ public class Flare extends Visual {
super( 0, 0, 0, 0 );
int gradient[] = {0xFFFFFFFF, 0x00FFFFFF};
int gradient[] = {0xFFFFFFFF, 0xBBFFFFFF, 0x88FFFFFF, 0x00FFFF, 0x00FFFFFF};
texture = TextureCache.createGradient( gradient );
this.nRays = nRays;

View File

@@ -373,11 +373,13 @@ public class CharSprite extends MovieClip implements Tweener.Listener, MovieClip
}
private int auraColor = 0;
private int auraRays = 0;
//Aura needs color data too
public void aura( int color ){
//Aura needs color and ray count data too
public void aura( int color, int nRays ){
add(State.AURA);
auraColor = color;
auraRays = nRays;
}
protected synchronized void processStateAddition( State state ) {
@@ -450,7 +452,7 @@ public class CharSprite extends MovieClip implements Tweener.Listener, MovieClip
if (aura != null) aura.killAndErase();
float size = Math.max(width(), height());
size = Math.max(size+4, 16);
aura = new Flare(5, size);
aura = new Flare(auraRays, size);
aura.angularSpeed = 90;
aura.color(auraColor, true);
aura.visible = visible;

View File

@@ -55,7 +55,7 @@ public class RatKingSprite extends MobSprite {
if (Dungeon.hero != null && Dungeon.hero.armorAbility instanceof Ratmogrify){
c = 24;
if (parent != null) aura(0xFFFF00);
if (parent != null) aura(0xFFFF00, 5);
}
texture( Assets.Sprites.RATKING );
@@ -83,7 +83,7 @@ public class RatKingSprite extends MobSprite {
public void link(Char ch) {
super.link(ch);
if (Dungeon.hero != null && Dungeon.hero.armorAbility instanceof Ratmogrify){
aura(0xFFFF00);
aura(0xFFFF00, 5);
}
}
}

View File

@@ -29,7 +29,7 @@ public class HealthBar extends Component {
private static final int COLOR_BG = 0xFFCC0000;
private static final int COLOR_HP = 0xFF00EE00;
private static final int COLOR_SHLD = 0xFFBBEEBB;
private static final int COLOR_SHLD = 0xFFCCFFCC;
private static final int HEIGHT = 2;

View File

@@ -89,12 +89,16 @@ public class InventorySlot extends ItemSlot {
if (item.cursed && item.cursedKnown) {
bg.ra = +0.3f;
bg.ga = -0.15f;
bg.ba = -0.15f;
} else if (!item.isIdentified()) {
if ((item instanceof EquipableItem || item instanceof Wand) && item.cursedKnown){
bg.ba = 0.3f;
bg.ba = +0.3f;
bg.ga = +0.06f;
bg.ra = -0.06f;
} else {
bg.ra = 0.3f;
bg.ba = 0.3f;
bg.ra = +0.3f;
bg.ba = +0.3f;
bg.ga = -0.1f;
}
}

View File

@@ -864,7 +864,7 @@ public class WndJournal extends WndTabbed {
gridItem.addSecondIcon(secondIcon);
}
if (!seen) {
gridItem.hardLightBG(2f, 1f, 2f);
gridItem.hardLightBG(2f, 0.8f, 2f);
}
grid.addItem(gridItem);
}
@@ -1001,7 +1001,7 @@ public class WndJournal extends WndTabbed {
}
};
if (!seen) {
gridItem.hardLightBG(2f, 1f, 2f);
gridItem.hardLightBG(2f, 0.8f, 2f);
}
grid.addItem(gridItem);
}
@@ -1055,10 +1055,10 @@ public class WndJournal extends WndTabbed {
text.measure();
gridItem.addSecondIcon( text );
if (!read) {
gridItem.hardLightBG(1f, 1f, 2f);
gridItem.hardLightBG(0.9f, 0.9f, 2f);
}
} else {
gridItem.hardLightBG(2f, 1f, 2f);
gridItem.hardLightBG(2f, 0.8f, 2f);
}
grid.addItem(gridItem);
}

View File

@@ -32,8 +32,10 @@ import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon;
import com.shatteredpixel.shatteredpixeldungeon.Statistics;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Belongings;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroSubClass;
import com.shatteredpixel.shatteredpixeldungeon.items.EquipableItem;
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
import com.shatteredpixel.shatteredpixeldungeon.items.trinkets.Trinket;
import com.shatteredpixel.shatteredpixeldungeon.items.wands.Wand;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene;
import com.shatteredpixel.shatteredpixeldungeon.sprites.HeroSprite;
@@ -482,11 +484,19 @@ public class WndRanking extends WndTabbed {
slot.item( item );
if (item.cursed && item.cursedKnown) {
bg.ra = +0.2f;
bg.ga = -0.1f;
bg.ra = +0.3f;
bg.ga = -0.15f;
bg.ba = -0.15f;
} else if (!item.isIdentified()) {
bg.ra = 0.1f;
bg.ba = 0.1f;
if ((item instanceof EquipableItem || item instanceof Wand) && item.cursedKnown){
bg.ba = +0.3f;
bg.ga = +0.06f;
bg.ra = -0.06f;
} else {
bg.ra = +0.3f;
bg.ba = +0.3f;
bg.ga = -0.1f;
}
}
}