diff --git a/src/data/ability.ts b/src/data/ability.ts index 16f310f67..3a6d5a7ac 100644 --- a/src/data/ability.ts +++ b/src/data/ability.ts @@ -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; } diff --git a/src/pipelines/sprite.ts b/src/pipelines/sprite.ts index f70a4da2e..c494e7e0c 100644 --- a/src/pipelines/sprite.ts +++ b/src/pipelines/sprite.ts @@ -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); diff --git a/src/pokemon.ts b/src/pokemon.ts index f263428e0..233899812 100644 --- a/src/pokemon.ts +++ b/src/pokemon.ts @@ -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;