Fix status move immunity not working (ie. Thunder Wave)
parent
5844f2d742
commit
52f0f5a149
|
@ -21,7 +21,6 @@ splashMessages.push(...[
|
||||||
'Questionable Balancing!',
|
'Questionable Balancing!',
|
||||||
'Cool Shaders!',
|
'Cool Shaders!',
|
||||||
'AI-Free!',
|
'AI-Free!',
|
||||||
'Help Wanted!',
|
|
||||||
'Sudden Difficulty Spikes!',
|
'Sudden Difficulty Spikes!',
|
||||||
'Based on an Unfinished Flash Game!',
|
'Based on an Unfinished Flash Game!',
|
||||||
'More Addictive than Intended!',
|
'More Addictive than Intended!',
|
||||||
|
|
|
@ -1091,17 +1091,17 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||||
// 2nd argument is for MoveTypeChangePowerMultiplierAbAttr
|
// 2nd argument is for MoveTypeChangePowerMultiplierAbAttr
|
||||||
applyAbAttrs(VariableMoveTypeAbAttr, source, null, variableType, typeChangeMovePowerMultiplier);
|
applyAbAttrs(VariableMoveTypeAbAttr, source, null, variableType, typeChangeMovePowerMultiplier);
|
||||||
const type = variableType.value as Type;
|
const type = variableType.value as Type;
|
||||||
|
const types = this.getTypes(true, true);
|
||||||
|
|
||||||
const cancelled = new Utils.BooleanHolder(false);
|
const cancelled = new Utils.BooleanHolder(false);
|
||||||
const typeless = !!move.getAttrs(TypelessAttr).length;
|
const typeless = !!move.getAttrs(TypelessAttr).length;
|
||||||
const types = this.getTypes(true, true);
|
const typeMultiplier = new Utils.NumberHolder(!typeless && (moveCategory !== MoveCategory.STATUS || move.getAttrs(StatusMoveTypeImmunityAttr).find(attr => types.includes((attr as StatusMoveTypeImmunityAttr).immuneType)))
|
||||||
const typeMultiplier = new Utils.NumberHolder(!typeless && (moveCategory !== MoveCategory.STATUS || move.getAttrs(StatusMoveTypeImmunityAttr).find(attr => (attr as StatusMoveTypeImmunityAttr).immuneType === type))
|
|
||||||
? getTypeDamageMultiplier(type, types[0]) * (types.length > 1 ? getTypeDamageMultiplier(type, types[1]) : 1)
|
? getTypeDamageMultiplier(type, types[0]) * (types.length > 1 ? getTypeDamageMultiplier(type, types[1]) : 1)
|
||||||
: 1);
|
: 1);
|
||||||
applyMoveAttrs(VariableMoveTypeMultiplierAttr, source, this, move, typeMultiplier);
|
applyMoveAttrs(VariableMoveTypeMultiplierAttr, source, this, move, typeMultiplier);
|
||||||
if (typeless)
|
if (typeless)
|
||||||
typeMultiplier.value = 1;
|
typeMultiplier.value = 1;
|
||||||
if (this.getTypes(true, true).find(t => move.isTypeImmune(t)))
|
if (types.find(t => move.isTypeImmune(t)))
|
||||||
typeMultiplier.value = 0;
|
typeMultiplier.value = 0;
|
||||||
|
|
||||||
switch (moveCategory) {
|
switch (moveCategory) {
|
||||||
|
|
Loading…
Reference in New Issue