- 853
- Posts
- 4
- Years
- Seen Nov 9, 2023
I might be mistaken, but won't this basically replace Hidden Power Dark with Fairy?
But now that you've replaced ++ (i.e. + 1) with turningTYPE_MYSTERY
(8) intoTYPE_FAIRY
(18) you get this:
Code:i | i == 8 ? 18 : i 9 | TYPE_FAIRY (18) 10 | TYPE_FIRE (10) 11 | TYPE_WATER (11) 12 | TYPE_GRASS (12) 13 | TYPE_ELECTRIC (13) 14 | TYPE_PSYCHIC (14) 15 | TYPE_ICE (15) 16 | TYPE_DRAGON (16)
I think you both need to generate a number that's 1 bigger and remapTYPE_MYSTERY
toTYPE_FAIRY
to have all the types. This might actually be working on your thread? I saw you and Buffel Saft made some changes to howdynamicMoveType
was calculated.
possibly, I'm sending you a message from my thread now. but if it means anything type mystery is actually 0x9, not 0x8.
edit:
looked through things, mgriffin is right, there's one other change that needs to be made for this to work correctly.
This is the original.
Code:
gBattleStruct->dynamicMoveType = (15 * typeBits) / 63 + 1;
if (gBattleStruct->dynamicMoveType >= TYPE_MYSTERY)
++gBattleStruct->dynamicMoveType;
This is what it needs to be changed to.
Code:
gBattleStruct->dynamicMoveType = (16 * typeBits) / 63 + 1;
if (gBattleStruct->dynamicMoveType == TYPE_MYSTERY)
gBattleStruct->dynamicMoveType = TYPE_FAIRY;
Pretty confident about that, if you want to go over the explanations yourself you can check out my thread on the topic Here.
also making this change *may* affect the odds/conditions for certain types appearing I can't confirm that as its theory and I'm not good with bitwise anyway.
And a last note to cover all the bases , while the theory for this is sound, I haven't been able to test yet, so I don't recommend using the trick to try to add any more than
1 type.
Because of the way types have to be added, I am unsure if increasing the number would cause you to run afoul of the non-battle types.
There could be simple ways around that, if you're knowledgeable/savvy but I just didn't feel comfortable leaving people without that warning.
Last edited: