mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-27 13:53:52 +01:00
Merge pull request #1482 from cstyles/physical-macro
Use the `IS_TYPE_PHYSICAL` macro in `AddMovePoints`
This commit is contained in:
commit
876a89eba4
@ -1246,7 +1246,7 @@ static void AddMovePoints(u8 caseId, u16 arg1, u8 arg2, u8 arg3)
|
|||||||
break;
|
break;
|
||||||
case PTS_REFLECT:
|
case PTS_REFLECT:
|
||||||
// If hit Reflect with damaging physical move
|
// 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;
|
u32 id = (tvPtr->side[defSide].reflectMonId - 1) * 4;
|
||||||
movePoints->points[defSide][id + tvPtr->side[defSide].reflectMoveSlot] += sPointsArray[caseId][0];
|
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;
|
break;
|
||||||
case PTS_LIGHT_SCREEN:
|
case PTS_LIGHT_SCREEN:
|
||||||
// If hit Light Screen with damaging special move
|
// 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;
|
u32 id = (tvPtr->side[defSide].lightScreenMonId - 1) * 4;
|
||||||
movePoints->points[defSide][id + tvPtr->side[defSide].lightScreenMoveSlot] += sPointsArray[caseId][0];
|
movePoints->points[defSide][id + tvPtr->side[defSide].lightScreenMoveSlot] += sPointsArray[caseId][0];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user