Merge pull request #1482 from cstyles/physical-macro

Use the `IS_TYPE_PHYSICAL` macro in `AddMovePoints`
This commit is contained in:
GriffinR 2021-07-12 01:25:05 -04:00 committed by GitHub
commit 876a89eba4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1246,7 +1246,7 @@ static void AddMovePoints(u8 caseId, u16 arg1, u8 arg2, u8 arg3)
break;
case PTS_REFLECT:
// If hit Reflect with damaging physical move
if (type < TYPE_MYSTERY && power != 0 && tvPtr->side[defSide].reflectMonId != 0)
if (IS_TYPE_PHYSICAL(type) && power != 0 && tvPtr->side[defSide].reflectMonId != 0)
{
u32 id = (tvPtr->side[defSide].reflectMonId - 1) * 4;
movePoints->points[defSide][id + tvPtr->side[defSide].reflectMoveSlot] += sPointsArray[caseId][0];
@ -1254,7 +1254,7 @@ static void AddMovePoints(u8 caseId, u16 arg1, u8 arg2, u8 arg3)
break;
case PTS_LIGHT_SCREEN:
// If hit Light Screen with damaging special move
if (type >= TYPE_MYSTERY && power != 0 && tvPtr->side[defSide].lightScreenMonId != 0)
if (!IS_TYPE_PHYSICAL(type) && power != 0 && tvPtr->side[defSide].lightScreenMonId != 0)
{
u32 id = (tvPtr->side[defSide].lightScreenMonId - 1) * 4;
movePoints->points[defSide][id + tvPtr->side[defSide].lightScreenMoveSlot] += sPointsArray[caseId][0];