Minor change to sprite shader
parent
ab9812f837
commit
1e2bd0dbb9
|
@ -116,8 +116,8 @@ export class BlockItemTheftAbAttr extends AbAttr {
|
|||
|
||||
export class StabBoostAbAttr extends AbAttr {
|
||||
apply(pokemon: Pokemon, cancelled: Utils.BooleanHolder, args: any[]): boolean {
|
||||
if ((args[0] as Utils.IntegerHolder).value > 1)
|
||||
(args[0] as Utils.IntegerHolder).value += 0.5;
|
||||
if ((args[0] as Utils.NumberHolder).value > 1)
|
||||
(args[0] as Utils.NumberHolder).value += 0.5;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -34,11 +34,6 @@ void main()
|
|||
|
||||
%forloop%
|
||||
|
||||
vec4 texel = vec4(outTint.bgr * outTint.a, outTint.a);
|
||||
|
||||
// Multiply texture tint
|
||||
vec4 color = texture * texel;
|
||||
|
||||
for (int i = 0; i < 32; i++) {
|
||||
if (spriteColors[i][3] == 0)
|
||||
break;
|
||||
|
@ -48,11 +43,16 @@ void main()
|
|||
float gray = (bg.r + bg.g + bg.b) / 3.0;
|
||||
bg = vec3(gray, gray, gray);
|
||||
vec3 fg = fusionColor;
|
||||
color.rgb = mix(1.0 - 2.0 * (1.0 - bg) * (1.0 - fg), 2.0 * bg * fg, step(bg, vec3(0.5)));
|
||||
texture.rgb = mix(1.0 - 2.0 * (1.0 - bg) * (1.0 - fg), 2.0 * bg * fg, step(bg, vec3(0.5)));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
vec4 texel = vec4(outTint.bgr * outTint.a, outTint.a);
|
||||
|
||||
// Multiply texture tint
|
||||
vec4 color = texture * texel;
|
||||
|
||||
if (outTintEffect == 1.0) {
|
||||
// Solid color + texture alpha
|
||||
color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a);
|
||||
|
|
|
@ -860,7 +860,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||
}
|
||||
const sourceAtk = source.getBattleStat(isPhysical ? Stat.ATK : Stat.SPATK, this);
|
||||
const targetDef = this.getBattleStat(isPhysical ? Stat.DEF : Stat.SPDEF, source);
|
||||
const stabMultiplier = new Utils.IntegerHolder(source.species.type1 === move.type || (source.species.type2 !== null && source.species.type2 === move.type) ? 1.5 : 1);
|
||||
const stabMultiplier = new Utils.NumberHolder(source.species.type1 === move.type || (source.species.type2 !== null && source.species.type2 === move.type) ? 1.5 : 1);
|
||||
const criticalMultiplier = isCritical ? 2 : 1;
|
||||
const isTypeImmune = (typeMultiplier.value * weatherTypeMultiplier) === 0;
|
||||
|
||||
|
|
Loading…
Reference in New Issue