• Do not use Discord to host any images you post, these links expire quickly! You can learn how to add images to your posts here.
  • Eevee Expo's webhost has been having technical issues since Nov. 20th and you might be unable to connect to our site. Staff are also facing issues connecting, so please send a DM to Cat on-site or through Discord directly for faster service!
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,523
First release
Last update

Ratings

0.00 star(s) 0 ratings

More resources from Astefia

Back
Top