Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
Our weekly protagonist poll is now up! Vote for your favorite Trading Card Game 2 protagonist in the poll by clicking here.
Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.
When a NPC has been using moves that are the same type as the Gem being held, it still consumes the Gem. It does not appear to be boosting the moves damage however. In addition, this only seems to happen if the Pokemon has a move that is the same type as the Gem. It does not happen otherwise. It is also doesn't do this for the player.
I have ZUD Plugin and Generation 8 Project installed, but as far as I can tell, these did not change Gem scripts. I've also been able to consistently have the issue, and it has happened with multiple types of Gems.
Does anyone have any insight or a solution to this problem?
So I may have found my own solution. Just typing it here to log it in case anyone else wants to know, and/or if anyone knows that I did it wrong.
So currently, in the BattleHandlers_Item script page, for each Gem, it reads
pbBattleGem leaves the Gem type check to the script in BattleHandlers, however, it doesn't seem to actually check for the type of the move. I messed with the pbBattleGem script as intensively as my limited scripting experience would allow, and noticed the line:
moveType != type
doesn't seem to do anything at all (as far as deciding weather or not the process should continue. It may do other things that I am unaware of.) After messing with that line for a while, I decided to take my attention to the individual Gem's script in the BattleHandlers_Item section in the spoiler above. I did alot of messing around, and kept getting it to either always work regardless of type, or never work regardless of type. Eventually I looked at other type specific items and found this line of code:
move.calcType != :X #where X is the type trying to be found.
By adding this line in between the proc and pbBattleGem lines for each Gem, the gems have been working properly. Currently, I am testing to make sure they are not multiplying damage when they are not being consumed, but it seems to be working correctly. The final script looks like this:
Spoiler:
BattleHandlers::DamageCalcUserItem.add(:GRASSGEM,
proc { |item,user,target,move,mults,baseDmg,type|
next if move.calcType != :GRASS
pbBattleGem(user,:GRASS,move,mults,type)
I'm sure there is a more effective way of doing this, but I added the line to each individual gem with their respective type, and it seems to be functioning as intended. I am not sure if this was a problem everyone was having, but here is my solution to it.