• 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.
  • Our friends from the Johto Times are hosting a favorite Pokémon poll - and we'd love for you to participate! Click here for information on how to vote for your favorites!
  • Serena, Kris, Dawn, Red - which Pokémon protagonist is your favorite? Let us know by voting in our grand final favorite protagonist poll!
  • PokéCommunity supports the Stop Killing Games movement. If you're a resident of the UK or EU, consider signing one of the petitions to stop publishers from destroying games. Click here for more information!
  • 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.

[Scripting Question] Ability that disguises the user as a specific Pokemon

  • 79
    Posts
    9
    Years
    • Seen Jan 12, 2024
    Hello, I'm trying to script an ability for an evolution of Dugtrio. How it would work, is that when it's first sent out into battle it has the name, sprite and stats of Dugtrio, and once it's hit by a damaging move it would change form to have its actual name, sprite, and stats. I originally tried basing the script off of Mimikyu's ability, with form 0 having dugtrio's info and form 1 having its actual info, but this would make its sprite and stats dugtrio's outside of battle, which I don't want. Instead, I have form 1 having Dugtrio's information, so it shows the correct sprite and stats outside of battle. So my question is, how do I make it so that when it's first sent out into battle it's form 1?

    Here's what I did for form 1 in Pokemonforms.txt:

    #------------------------------
    [DUGTREMOR-1]
    Name=Dugtrio
    BaseStats=35,100,50,120,50,70
    Weight=33.3
    BattlerPlayerY=5
    BattlerEnemyY=10
    BattlerAltitude=0

    And Mimikyu's ability script for reference:

    underneath def pbReduceHPDamage:

    Code:
        elsif isConst?(opponent.species,PBSpecies,:MIMIKYU) && opponent.hasWorkingAbility(:DISGUISE) && 
              opponent.form!=1
          @battle.scene.pbDamageAnimation(opponent,0)
          @battle.pbDisplay(_INTL("Its disguise served it as a decoy!"))
          opponent.form=1; opponent.pbUpdate(true)
          @battle.scene.pbChangePokemon(opponent,opponent.pokemon)
          @battle.pbDisplay(_INTL("{1}'s disguise was busted!",opponent.name))
          PBDebug.log("[Form changed] #{opponent.pbThis} changed to form #{opponent.form}")
          opponent.pbReduceHP((opponent.totalhp/8).floor)
     
    Hello, I'm trying to script an ability for an evolution of Dugtrio. How it would work, is that when it's first sent out into battle it has the name, sprite and stats of Dugtrio, and once it's hit by a damaging move it would change form to have its actual name, sprite, and stats. I originally tried basing the script off of Mimikyu's ability, with form 0 having dugtrio's info and form 1 having its actual info, but this would make its sprite and stats dugtrio's outside of battle, which I don't want. Instead, I have form 1 having Dugtrio's information, so it shows the correct sprite and stats outside of battle. So my question is, how do I make it so that when it's first sent out into battle it's form 1?

    Here's what I did for form 1 in Pokemonforms.txt:

    #------------------------------
    [DUGTREMOR-1]
    Name=Dugtrio
    BaseStats=35,100,50,120,50,70
    Weight=33.3
    BattlerPlayerY=5
    BattlerEnemyY=10
    BattlerAltitude=0

    And Mimikyu's ability script for reference:

    underneath def pbReduceHPDamage:

    Code:
        elsif isConst?(opponent.species,PBSpecies,:MIMIKYU) && opponent.hasWorkingAbility(:DISGUISE) && 
              opponent.form!=1
          @battle.scene.pbDamageAnimation(opponent,0)
          @battle.pbDisplay(_INTL("Its disguise served it as a decoy!"))
          opponent.form=1; opponent.pbUpdate(true)
          @battle.scene.pbChangePokemon(opponent,opponent.pokemon)
          @battle.pbDisplay(_INTL("{1}'s disguise was busted!",opponent.name))
          PBDebug.log("[Form changed] #{opponent.pbThis} changed to form #{opponent.form}")
          opponent.pbReduceHP((opponent.totalhp/8).floor)

    Did you look at Illusion? That seems more similar to what you want to do
     
    Back
    Top