AmethystRain
pixie-powered judgment!
- 253
- Posts
- 12
- Years
- Seen Nov 28, 2022
Okay, so I totally feel annoying for asking two questions right in a row, but, whatever! :X
Actually, last night I spent a good four hours peeling through the scripts to see if I could figure this out myself, but being that I'm not very familiar with Ruby and its logic yet, I eventually resigned...
Anyway, my goal should be pretty self-explanatory from the title.
I searched the other forum posts in this area for this as well, and while it looks like there was one tutorial about this, it was never completed. Furthermore, it was made, as I gather, before HiddenAbility appeared in pokemon.txt so I'm hoping that there's a simpler way now.
Through my digging, I think it would be in this part of PokeBattle_Pokemon, right?
I'm just... not sure where to go from here. I tried! QQ
Anyway, any insight into how I might be able to work this would be much appreciated.
Actually, last night I spent a good four hours peeling through the scripts to see if I could figure this out myself, but being that I'm not very familiar with Ruby and its logic yet, I eventually resigned...
Anyway, my goal should be pretty self-explanatory from the title.
I searched the other forum posts in this area for this as well, and while it looks like there was one tutorial about this, it was never completed. Furthermore, it was made, as I gather, before HiddenAbility appeared in pokemon.txt so I'm hoping that there's a simpler way now.
Through my digging, I think it would be in this part of PokeBattle_Pokemon, right?
Code:
def abilityflag
return @abilityflag if @abilityflag
dexdata=pbOpenDexData
pbDexDataOffset(dexdata,@species,29)
ret1=dexdata.fgetb
ret2=dexdata.fgetb
dexdata.close
if ret1==ret2 || ret2==0
return 0
end
return (@personalID&1)
end
# Gets the ID of this Pokemon's ability
def ability
abil=@abilityflag ? @abilityflag : (@personalID&1)
dexdata=pbOpenDexData
pbDexDataOffset(dexdata,@species,29)
ret1=dexdata.fgetb
ret2=dexdata.fgetb
pbDexDataOffset(dexdata,@species,37)
ret3=dexdata.fgetb
dexdata.close
ret=ret1
if abil==2
if ret3>0
return ret3
else
abil=(@personalID&1)
end
end
if abil==1
ret=ret2
if ret2==0
ret=ret1
end
end
return ret
end
I'm just... not sure where to go from here. I tried! QQ
Anyway, any insight into how I might be able to work this would be much appreciated.