- 825
- Posts
- 9
- Years
- The Dissa Region
- Seen Oct 7, 2024
I'm trying to get Hidden Power (and a new pair that together I'm calling "Hidden Power X") to display their actual type - rather than Normal - when you hover over them in battle.
Right now I've replaced the line (in PokeBattle_Scene) :
with
And it works perfectly so far - the move Hidden Power will display as Dark, and Hidden Power PX and Hidden Power SX will display as Fairy.
The next step is to call forth the Pokemon's actual IVs so that it will display the correct type. I've tried calling for pokemon.iv, @pokemon.iv, battlers[index].iv, battler.iv, and many different ways I've seen people call for Pokemon. They all throw up an error. I assume that this is because the function doesn't know about the Pokemon in question. So I was going to add an argument to refresh function. But where is it called so I can add the new arguments to the function?
Right now I've replaced the line (in PokeBattle_Scene) :
Code:
self.bitmap.blt(416,13+UPPERGAP,@typebitmap.bitmap,Rect.new(0,moves[i].type*28,64,28))
Code:
if moves[i].name=="Hidden Power"
hptype=pbHiddenPower([COLOR="red"][31,31,31,31,31,31][/COLOR])
self.bitmap.blt(416,13+UPPERGAP,@typebitmap.bitmap,Rect.new(0,hptype[0]*28,64,28))
elsif moves[i].name=="Hidden Power PX" || moves[i].name=="Hidden Power SX"
hptype=pbHiddenPower2([COLOR="Red"][31,31,31,31,31,31][/COLOR])
self.bitmap.blt(416,13+UPPERGAP,@typebitmap.bitmap,Rect.new(0,hptype[0]*28,64,28))
else
self.bitmap.blt(416,13+UPPERGAP,@typebitmap.bitmap,Rect.new(0,moves[i].type*28,64,28))
end
And it works perfectly so far - the move Hidden Power will display as Dark, and Hidden Power PX and Hidden Power SX will display as Fairy.
The next step is to call forth the Pokemon's actual IVs so that it will display the correct type. I've tried calling for pokemon.iv, @pokemon.iv, battlers[index].iv, battler.iv, and many different ways I've seen people call for Pokemon. They all throw up an error. I assume that this is because the function doesn't know about the Pokemon in question. So I was going to add an argument to refresh function. But where is it called so I can add the new arguments to the function?