added makeContact to the physical part of shell side arm

This commit is contained in:
geeil-han 2024-12-10 09:52:49 +01:00
parent 5db3074e2c
commit 4539416af9

View File

@ -4612,11 +4612,13 @@ export class ShellSideArmCategoryAttr extends VariableMoveCategoryAttr {
const predictedPhysDmg = target.getBaseDamage(user, move, MoveCategory.PHYSICAL, true, true); const predictedPhysDmg = target.getBaseDamage(user, move, MoveCategory.PHYSICAL, true, true);
const predictedSpecDmg = target.getBaseDamage(user, move, MoveCategory.SPECIAL, true, true); const predictedSpecDmg = target.getBaseDamage(user, move, MoveCategory.SPECIAL, true, true);
if (predictedPhysDmg > predictedSpecDmg) { const shouldUsePhysical =
category.value = MoveCategory.PHYSICAL; predictedPhysDmg > predictedSpecDmg ||
return true; (predictedPhysDmg === predictedSpecDmg && user.randSeedInt(2) === 0);
} else if (predictedPhysDmg === predictedSpecDmg && user.randSeedInt(2) === 0) {
if (shouldUsePhysical) {
category.value = MoveCategory.PHYSICAL; category.value = MoveCategory.PHYSICAL;
move.makesContact();
return true; return true;
} }
return false; return false;