• 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!
  • 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