• The Eevee Expo Game Jam #10 has concluded, congratulations to all participants! Now it's time for the judges to play through the games, and you can play along to vote who deserves the community choice spotlight.
    You can check out the submitted games here!
    Play through the games and provide some feedback to the devs while you're at it!
  • Hi, Guest!
    Some images might be missing as we move away from using embedded images, sorry for the mess!
    From now on, you'll be required to use a third party to host images. You can learn how to add images here, and if your thread is missing images you can request them here.
    Do not use Discord to host any images you post, these links expire quickly!
IV vitamins

IV vitamins 1.0

Pokémon Essentials Version
v19.1 ➖
This is just the script for IV raising items, with sample names.
How to install:
code:
Expand Collapse Copy
def pbItemRaiseIV(pkmn, stat, scene, ivGain = 2, item = nil, happiness = "")
  if pkmn.iv[stat]>=Pokemon::IV_STAT_LIMIT
    scene.pbDisplay(_INTL("It won't have any effect."))
    return false
  end
  $PokemonBag.pbDeleteItem(item, 1)
  pkmn.iv[stat] += ivGain
  pkmn.iv[stat] = pkmn.iv[stat].clamp(0, Pokemon::IV_STAT_LIMIT)
  scene.pbRefresh
  statName = GameData::Stat.get(stat).name
  scene.pbDisplay(_INTL("{1}'s {2} increased.",pkmn.name,statName))
  pkmn.changeHappiness(happiness)
  return true
end
code:
Expand Collapse Copy
ItemHandlers::UseOnPokemon.add(:STAMINA_GUMMY,proc { |item,pkmn,scene|
  next pbItemRaiseIV(pkmn,:HP,scene,2,item,"vitamin")
})

ItemHandlers::UseOnPokemon.add(:STRENGH_GUMMY,proc { |item,pkmn,scene|
  next pbItemRaiseIV(pkmn,:ATTACK,scene,2,item,"vitamin")
})

ItemHandlers::UseOnPokemon.add(:TOUGHNESS_GUMMY,proc { |item,pkmn,scene|
  next pbItemRaiseIV(pkmn,:DEFENSE,scene,2,item,"vitamin")
})

ItemHandlers::UseOnPokemon.add(:WILL_GUMMY,proc { |item,pkmn,scene|
  next pbItemRaiseIV(pkmn,:SPECIAL_ATTACK,scene,2,item,"vitamin")
})

ItemHandlers::UseOnPokemon.add(:SANITY_GUMMY,proc { |item,pkmn,scene|
  next pbItemRaiseIV(pkmn,:SPECIAL_DEFENSE,scene,2,item,"vitamin")
})

ItemHandlers::UseOnPokemon.add(:REACTION_GUMMY,proc { |item,pkmn,scene|
  next pbItemRaiseIV(pkmn,:SPEED,scene,2,item,"vitamin")
})
Credits
Asto\Astefia
Author
Astefia
Views
1,502
First release
Last update

Ratings

0.00 star(s) 0 ratings

More resources from Astefia

Back
Top