• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • 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.

Gen VII Scripts (Z-Moves, Abilities and Moves,)

Ego13

hollow_ego
311
Posts
6
Years
  • If you could post either/both of those I'd appreciate it. I only started looking into pokemon essentials a few days ago and dancer especially is eluding me.

    for Comatose it really is just placing the ability check in the right places in the right way.
    Here are the places where it needs to be added
    Spoiler:

    For Dancer follow these instructions. It is tested for single and double battles and should work just like in the game. Give credit when using this (as it was a real pain to get this stuff working and took me several hours)
    Spoiler:
     
    Last edited:

    Ego13

    hollow_ego
    311
    Posts
    6
    Years
  • It doesn't do it in the end. As soon as a dancer move was used it interrupts the turn order and continues as soon as all dancers did their thing
     
    84
    Posts
    10
    Years
    • Seen Jun 11, 2022
    Code:
    ################################################################################
    # The user's next move will be a critical hit
    ################################################################################
    class PokeBattle_Move_19A < PokeBattle_Move
      def pbEffect(attacker,opponent,hitnum=0,alltargets=nil,showanimation=true)
        attacker.effects[PBEffects::LaserFocus]=2
        @battle.pbDisplay(_INTL("{1} began focusing hard!",attacker.pbThis))
        return 0
      end
    end

    Code:
      def pbIsCritical?(attacker,opponent)
        if opponent.hasWorkingAbility(:SHELLARMOR) && !attacker.hasBypassingAbility 
          return false
        end
        return false if opponent.pbOwnSide.effects[PBEffects::LuckyChant]>0
        return true if @function==0xA0 # Frost Breath
        return true if attacker.hasWorkingAbility(:MERCILESS) && opponent.status==PBStatus::POISON
    [COLOR="Red"]    return true if attacker.effects[PBEffects::LaserFocus]>0[/COLOR]

    Idk if I'm reading this right, but doesn't Laser Focus have to reset its pbeffect to zero after it successfully crits? So that way it only works for one move? So the second bit could look like

    Code:
      def pbIsCritical?(attacker,opponent)
        if opponent.hasWorkingAbility(:SHELLARMOR) && !attacker.hasBypassingAbility 
          return false
        end
        return false if opponent.pbOwnSide.effects[PBEffects::LuckyChant]>0
        return true if @function==0xA0 # Frost Breath
        return true if attacker.hasWorkingAbility(:MERCILESS) && opponent.status==PBStatus::POISON
    [COLOR="Red"]    if attacker.effects[PBEffects::LaserFocus]>0
    attacker.effects[PBEffects::LaserFocus]=0
    return true
    end
    [/COLOR]

    edit: Tested and doesn't seem to be working that way either. a

    And for stomping tantrum, this instruction isn't very clear:

    Add this line as the very last line in PokeBattle_Battler, def pbProcessMoveAgainstTarget:

    Code:
    user.effects[PBEffects::LastMoveFailed]=false

    Could you put it more clearly in context?
     
    Last edited:
    1
    Posts
    6
    Years
    • Seen Feb 6, 2021
    Hey guys, I've been trying to make Long Reach work, but I'm totally new to coding and I have no idea where to start, do you have a code or an advise? I tried editing all the contact moves effects (items, abilities, etc) giving them exeptions for pokemon with Long Reach, but it gave me a ton of error messages haha
     
    7
    Posts
    6
    Years
  • Hey guys, I've been trying to make Long Reach work, but I'm totally new to coding and I have no idea where to start, do you have a code or an advise? I tried editing all the contact moves effects (items, abilities, etc) giving them exeptions for pokemon with Long Reach, but it gave me a ton of error messages haha


    It's easy to add the Long Reach script.
    To add the Long Reach ability script (including the Protective Pads item script that has the same effect) you must first locate this line in PokeBattle_Battler

    Code:
    def pbEffectsOnDealingDamage(move,user,target,damage)
        movetype=move.pbType(move.type,user,target)
        if damage>0 && move.isContactMove?
          if !target.damagestate.substitute
            if target.hasWorkingItem(:STICKYBARB,true) && user.item==0 && !user.fainted?
              user.item=target.item
              target.item=0

    And then you add these lines that are marked in red.

    Code:
    def pbEffectsOnDealingDamage(move,user,target,damage)
        movetype=move.pbType(move.type,user,target)
        if damage>0 && move.isContactMove? [COLOR="Red"]&& !user.hasWorkingAbility(:LONGREACH) && !user.hasWorkingItem(:PROTECTIVEPADS)[/COLOR]
          if !target.damagestate.substitute
            if target.hasWorkingItem(:STICKYBARB,true) && user.item==0 && !user.fainted?
              user.item=target.item
              target.item=0


    I tried this script against Pokémon with the abilities Rough Skin, Flame Body, Iron Barbs and Static and it works perfectly.
     
    32
    Posts
    6
    Years
  • I've tried the code from this thread for the terrain abilities. And while they seemingly did work, there's one thing missing. When my Gyarados (with Grassy Surge) faces Regice (with Psychic Surge), both abilities are active at the same time. One of them does not override the other one. So, Regice can't hurt a non-flying Pkm with Ice Shard, and when Regice gets hurt, its hp gets healed a bit.
    I'm not sure if it's just me implementing the code just wrongly or the code per se has yet to include the overriding turn/effect. Any suggestions?
     
    32
    Posts
    6
    Years
  • I noticed that abilities such as Queenly Majesty and Dazzling are incomplete because they do not protect the user from Prankster. Therefore, I used the code from this thread as a basis and tried to come up with a solution. And so far, my code seems to work.
    New code:
    Code:
    if target.hasWorkingAbility(:QUEENLYMAJESTY) && user.hasWorkingAbility(:PRANKSTER) && thismove.pbIsStatus?
          @battle.pbDisplay(_INTL("{1}'s Queenly Majesty made the move ineffective!",target.pbThis))
          PBDebug.log("[Move failed] The target's Queenly Majesty stopped the attack")
          return false
        end
        if target.hasWorkingAbility(:QUEENLYMAJESTY) && user.hasWorkingAbility(:GALEWINGS) && isConst?(thismove.type,PBTypes,:FLYING) && thismove.pbIsDamaging?
          @battle.pbDisplay(_INTL("{1}'s Queenly Majesty made the move ineffective!",target.pbThis))
          PBDebug.log("[Move failed] The target's Queenly Majesty stopped the attack")
          return false
        end
    The same can be applied to Dazzling, I think, prodvied of course there's nothing wrong with this code.
     
    2
    Posts
    6
    Years
    • Seen Aug 15, 2020
    Does anyone have scripts for the Neuroforce ability (Ultra Necrozma) and the Photon Geyser attack?
     
    24
    Posts
    10
    Years
    • Seen Jul 5, 2018
    Why set-up Shell trap that way when it can easily be a counter?
    For example: In the PBS set it up as 01 instead of 00 for No Target,

    Under the Blast Beak message
    Code:
    elsif pbChoseMoveFunctionCode?(i.index,0x1AE) # Shell Trap
            pbDisplay(_INTL("{1} set up a Shell-Trap!",i.pbThis))
    Then search for opponent.effects[PBEffects::CounterTarget]=attacker.index and under add opponent.effects[PBEffects::ShellTrap]=attacker.index
    and in PBEffects have it modified like Counter. Then for the actualy script function.

    Code:
    ################################################################################
    # Counters a physical move used against the user this round, with an explosion.
    ################################################################################
    class PokeBattle_Move_1AE < PokeBattle_Move
      def pbAddTarget(targets,attacker)
        if attacker.effects[PBEffects::ShellTrap]>=0 &&
           attacker.pbIsOpposing?(attacker.effects[PBEffects::ShellTrap])
          if !attacker.pbAddTarget(targets,@battle.battlers[attacker.effects[PBEffects::ShellTrap]])
            attacker.pbRandomTarget(targets)
          end
        end
      end
    
      def pbEffect(attacker,opponent,hitnum=0,alltargets=nil,showanimation=true)
        if attacker.effects[PBEffects::Counter]<=0 || !opponent
          @battle.pbDisplay(_INTL("Shell Trap failed!"))
          return -1
        end
        ret=pbEffectFixedDamage(150,attacker,opponent,hitnum,alltargets,showanimation)
        return ret
      end
    end
    What is your full code for Beak Blast and Shell Trap because it doesn't seem to be working for me.
     

    WolfPP

    Spriter/ Pixel Artist
    1,309
    Posts
    5
    Years
  • I do to Neuroforce (Ultra Necrozma):
    Spoiler:


    To Prism Armor (Necrozma/Dusk Mane Necrozma/Dawn Wings Necrozma)
    Spoiler:


    To put N-Lunarizer and N-Solarizer:
    Spoiler:


    NEW SCRIPT TO N-LUNARIZER AND N-SOLARIZER (thanks mybusiness to see the problem):
    (Now when you have to separate Necrozma, you can use only N-Solarizer, to Solgaleo, and only N-Lunarizer to Lunala).
    Spoiler:


    So, i edited a little BlackOutG5 scritps to Soul Heart (credit to him):
    Spoiler:


    EDIT
    When Necrozma fused:

    in 'Pokemon_Forms' before 'MultipleForms.register(:GIRATINA,{' add:

    Spoiler:


    NEW SCRIPT TO Pokemon_Form:
    Also, to 'Pokemon_Form', replace what i wrote in 'onSetForm':
    Spoiler:
     

    Attachments

    • item677.png
      item677.png
      510 bytes · Views: 999
    • item676.png
      item676.png
      515 bytes · Views: 986
    • item675.png
      item675.png
      535 bytes · Views: 988
    Last edited:

    WolfPP

    Spriter/ Pixel Artist
    1,309
    Posts
    5
    Years
  • Now, lets add Dream Ball, Park Ball and Beast Ball:

    in item.txt, add (x=last number):
    Code:
    XXX,DREAMBALL,Dream Ball,Dream Balls,3,0,"A special Poké Ball that appears in your Bag out of nowhere in the Entree Forest. It can catch any Pokémon.",0,2,4,
    XXX,PARKBALL,Park Ball,Park Balls,3,0,"A special Poké Ball for the Pal Park.",0,2,4,
    XXX,BEASTBALL,Beast Ball,Beast Balls,3,1000,"A special Poké Ball designed to catch Ultra Beasts.",0,2,4,


    in 'PItem_PokeBalls' search 'PItem_PokeBalls' and add:

    Code:
       24=>:PARKBALL,#
       25=>:DREAMBALL,#
       26=>:BEASTBALL#

    Then, after:
    Spoiler:


    add:
    Spoiler:


    Bellow, the attachments. 'itemxxx' in Icon Folder (Graphics/Icon) and 'icon_ball' in Summary folder (Graphics/Pictures/Summary).

    EDIT:

    Lets add Photon Geyser, the signature moves of Necrozma.

    First, add in moves.txt
    Code:
    XXX,PHOTONGEYSER,Photon Geyser,[B]170[/B],100,PSYCHIC,Special,100,5,0,00,0,bef,"The user attacks a target with a pillar of light. This move inflicts Attack or Sp. Atk damage—whichever stat is higher for the user."
    See '170', he is our number to class the move in 'PokeBattle_MoveEffects'
    So, in the script, add in the last line:
    Credits to Vendily too for fix effect.
    Spoiler:


    EDIT: I try to add this part:

    This move also ignores the target's Ability if the Ability changes the effect of the attack on the target. Abilities that affect the user of the attack, like Pressure, are not ignored. Photon Geyser does not ignore the effects of Shadow Shield and Prism Armor.

    Maybe this but i dont get it:
    Spoiler:


    How can i do that in move effects?

    EDIT 2: DONE!
    In 'PokeBattle_Battler' (with R), find 'def pbUseMove(choice,specialusage=false)'.
    Below:
    Spoiler:

    Paste:
    Spoiler:

    Then, find 'def pbEndTurn(choice)':
    Spoiler:

    and replace to:
    Spoiler:
     

    Attachments

    • item678.png
      item678.png
      485 bytes · Views: 943
    • item621.png
      item621.png
      601 bytes · Views: 954
    • item679.png
      item679.png
      466 bytes · Views: 946
    • icon_ball_26.png
      icon_ball_26.png
      490 bytes · Views: 946
    • icon_ball_25.png
      icon_ball_25.png
      440 bytes · Views: 948
    • icon_ball_24.png
      icon_ball_24.png
      539 bytes · Views: 937
    Last edited:

    WolfPP

    Spriter/ Pixel Artist
    1,309
    Posts
    5
    Years
  • Double Iron Bash, Melmetal signature move:

    in moves.txt, add:
    Code:
    [B][COLOR="Red"]XXX[/COLOR][/B],DOUBLEIRONBASH,Double Iron Bash,191,60,STEEL,Physical,100,5,30,00,0,abej,"The weight of the heavy hex nuts on its arms combined with this spinning motion give this move extraordinary power. After it hits, it may even make the target flinch."
    XXX= Last number in your moves.txt
    Then, in 'PokeBattle_MoveEffects' add:
    Code:
    ################################################################################ 
    # Hits twice. May cause the target to flinch. (Double Iron Bash) 
    ################################################################################ 
    class PokeBattle_Move_191 < PokeBattle_Move 
      def pbAdditionalEffect(attacker,opponent)
        return if opponent.damagestate.substitute
        opponent.pbFlinch(attacker)
      end
    
      def pbIsMultiHit
        return true
      end
    
      def pbNumHits(attacker)
        return 2
      end
    end
     
    Last edited:

    mybusiness

    Guest
    0
    Posts
    Spoiler:

    Bulbapedia says that stat stages also are taken into account when deciding the category of Photon Geyser. Like this, I guess:
    Spoiler:


    As for the part when it ignores abilities, I am not satisfied with that Gastro Acid thing. Those moves of Necrozma should work like mold breakers, not ability-deniers, which means that only these abilities can be violated, and only the effects of these that could potentially affect Photon Geyser. So, it has to be done in particular to each of those abilities, in the manner of the mold breakers, which I did. It's coming soon in a thread.
     

    WolfPP

    Spriter/ Pixel Artist
    1,309
    Posts
    5
    Years
  • Bulbapedia says that stat stages also are taken into account when deciding the category of Photon Geyser. Like this, I guess:
    Spoiler:


    As for the part when it ignores abilities, I am not satisfied with that Gastro Acid thing. Those moves of Necrozma should work like mold breakers, not ability-deniers, which means that only these abilities can be violated, and only the effects of these that could potentially affect Photon Geyser. So, it has to be done in particular to each of those abilities, in the manner of the mold breakers, which I did. It's coming soon in a thread.

    Do the same to SUNSTEELSTRIKE and MOONGEISTBEAM and yours Z-move, if you have z-move script. Looking forward for you script. :D
     
    Last edited:

    mybusiness

    Guest
    0
    Posts
    Do the same to SUNSTEELSTRIKE and MOONGEISTBEAM and yours Z-move, if you have z-move script. Looking forward for you script. :D

    Don't have Z-moves yet >(. I should have started with a clean essentials plus z-add-on. Now, I have to understand the code and carefully transfer it to my creation... Anyway, you should expect a code that emulates Moongeist Beam, Sunsteel Strike and Photon Geyser, and, judging by the way I've put it, you may add easily their z-moves, and, eventually, fake moves.
     

    WolfPP

    Spriter/ Pixel Artist
    1,309
    Posts
    5
    Years
  • Don't have Z-moves yet >(. I should have started with a clean essentials plus z-add-on. Now, I have to understand the code and carefully transfer it to my creation... Anyway, you should expect a code that emulates Moongeist Beam, Sunsteel Strike and Photon Geyser, and, judging by the way I've put it, you may add easily their z-moves, and, eventually, fake moves.

    Correct! I did :D So, im just waitin your photon geyser script (with '!goesignoreability' stuff) to copy to my move and zmove script :D
     

    Juno and Ice

    Developer of Pokémon Floral Tempus
    150
    Posts
    5
    Years
    • Seen Apr 30, 2024
    Plasma Fists ( signature move of Zeraora):
    in 'moves.txt' put (pay attention with this two red colors words):
    Code:
    [COLOR="red"]675[/COLOR],PLASMAFISTS,Plasma Fists,[COLOR="red"]CF2[/COLOR],100,ELECTRIC,Physical,100,15,0,00,0,abef,"The user attacks with electrically charged fists. This move changes Normal-type moves to Electric-type moves."

    In 'PBEffects' search to ' # These effects apply to the battle (i.e. both sides)' and put below the last move (and put its last number too):
    Spoiler:


    Now, in 'PokeBattle_ActiveSideField' add the red line:
    Spoiler:


    Then, in 'PokeBattle_Move' when you find 'def pbType(type,attacker,opponent)' add below:
    Code:
        if type>=0 && hasConst?(PBTypes,:ELECTRIC)
          if @battle.field.effects[PBEffects::IonDeluge] && isConst?(type,PBTypes,:NORMAL)
            type=getConst(PBTypes,:ELECTRIC)
            @powerboost=false
          end
    This:
    Spoiler:


    Now, add a new script (CF2) to Plasma Fists into your game in 'PokeBattle_MoveEffects' below to you last move script:
    Spoiler:


    Finally, in 'PokeBattle_Battle' search to:
    Code:
        @field.effects[PBEffects::FusionBolt]=false
        @field.effects[PBEffects::FusionFlare]=false
        @field.effects[PBEffects::IonDeluge]=false

    And just add below Ion Deluge:
    Code:
        @field.effects[PBEffects::PlasmaFists]=false

    :D

    Have you also done Baneful Bunker? I can't seem to get mine to work right.
     
    Back
    Top