• 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!
  • Our weekly protagonist poll is now up! Vote for your favorite Conquest protagonist in the poll by clicking here.
  • 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.

All gen 7 abilities

If the player fights Minior x Minior, the colors will be the same (when the first trigger the ability, the opponent will have the same color, thanks @@miniorform= any number). We need to find a way for the program record each Minior Cores. I am trying to use some code inside 'Form' script, but I still don't get it:
Code:
MultipleForms.register(:UNOWN,{
"getFormOnCreation"=>proc{|pokemon|
   next rand(28)
}
})

I fixed it. The code is in the post that you quoted; I just replaced the class variable with an instance variable. This is my test of the new code:
[PokeCommunity.com] All gen 7 abilities
 
Also we need to find a way to make the correct code for that ability:
Code:
At the start of battle or at the end of a turn, if Minior's HP is above half, it will change into its Meteor Form. At the end of the turn, if its HP is below half, it will change back to its Core Form.

The code must trigger when send out one time (like Pressure's codes) and each end of a turn (like Moody's code).

Also we have this situation:
Into the battle, the Minior will changes for Core and then the player runs into the player. If the player heals 100% HP Minior (overworld) its keep into Core Form until start a battle to trigger its ability and then, turn back for Meteor Form.

EDIT: About Follower Pokémon, this will help us. Inside 'Form' script, paste below Hoopa's code:
Code:
MultipleForms.register(:MINIOR,{
"getForm"=>proc{|pokemon|
   next 0 if pokemon.hp>((pokemon.totalhp/2).floor)
   next nil
}
})

EDIT: Done! Check here:
https://www.pokecommunity.com/posts/10074381
 
Last edited:
That's not necessary, because outside battle is in Core form, regardless of any situation.
 
Wimp Out and Emergency Exit:
V1.0
Spoiler:


V2.0: https://www.pokecommunity.com/posts/10106987
 
Last edited:
I made a better script for Wimp Out and Emergency Exit. Check it out!
Fixed Stealth Rock, Spikes, Confuse, Hail, Sandstorm effect (and finally the final version):

In 'PokeBattle_Battler' script:
Spoiler:


Now, in 'PokeBattle_MoveEffects' script:
Spoiler:


Finally, 'PokeBattle_Battle' script inside 'def pbOnActiveOne(pkmn,onlyabilities=false,moldbreaker=false)', replace Stealth Rock and Spikes code:
Spoiler:


And done! Cya
 
Last edited:
What's the difference between this one and the one made by mybusiness?
 
Last edited:
Upgrade about CORROSION ability. Only trigger about opponent type (POISON or METAL):
V1.0
Spoiler:


V2.0
Spoiler:


V3.0
Inside def pbPoison?(attacker,showMessages,move=nil), replace the code to recognize STEEL and POISON types to:
Code:
if (pbHasType?(:POISON) || pbHasType?(:STEEL))  && !(attacker && attacker.hasWorkingAbility(:CORROSION)) && !hasWorkingItem(:RINGTARGET)
  @battle.pbDisplay(_INTL("It doesn't affect {1}...",pbThis(true))) if showMessages
  return false
end
 
Last edited:
Upgrade about CORROSION ability. Only trigger about opponent type (POISON or METAL):

I didn't quite follow all your code, so maybe this suggestion is bad, but I'd recommend trying to change pbCanPoison? to do the Corrosion check because then you wouldn't need to change each move effect (and it should automatically work if you add new move effects that can poison).
 
I didn't quite follow all your code, so maybe this suggestion is bad, but I'd recommend trying to change pbCanPoison? to do the Corrosion check because then you wouldn't need to change each move effect (and it should automatically work if you add new move effects that can poison).

I tried but if I add for this unique case, sometimes will crash the game with this error:
https://www.pokecommunity.com/threads/401106

That is why I made that, adding inside Move Effect instead BattleEffect.

EDIT: New code (V3.0) into previous post than I made.
 
Last edited:
Yeah, probably you have to replace "damagemult" with "finaldamagemult". Meanwhile you repair that, these are the next abilities:

Queenly Majesty and Dazzling:
In PokeBattle_Battler, just under def pbSuccessCheck":
Spoiler:
In PokeBattle_Move, under def isBombMove?, place this def:
Spoiler:

Done.

We need to add one more think for Queenly Majestic/ Dazzling:
Code:
Moves that target all Pokémon (except Perish Song, Flower Shield, and Rototiller) cannot be blocked by Queenly Majesty, even if they become priority moves. 
[URL="https://bulbapedia.bulbagarden.net/wiki/Queenly_Majesty_(Ability)"]Font.[/URL]

Am trying to code but I still don't get how to make this part: "except Perish Song, Flower Shield, and Rototiller".

What I have so far inside 'def pbSuccessCheck(thismove,user,target,turneffects,accuracy=true)':
Code:
    partner=target.pbPartner
    if (target.hasWorkingAbility(:DAZZLING)  || target.hasWorkingAbility(:QUEENLYMAJESTY) || 
        partner.hasWorkingAbility(:DAZZLING) || partner.hasWorkingAbility(:QUEENLYMAJESTY))
      if !user.hasMoldBreaker && p>0 && !PBTargets.hasMultipleTargets?(thismove)
        thismove.pp -=1
        @battle.pbDisplay(_INTL("{1} cannot use {2}!",user.pbThis,PBMoves.getName(thismove)))
        return false
      end
    end
    if target.pbOwnSide.effects[PBEffects::QuickGuard] && thismove.canProtectAgainst? &&
 
Last edited:
We need to add one more think for Queenly Majestic/ Dazzling:
Code:
Moves that target all Pokémon (except Perish Song, Flower Shield, and Rototiller) cannot be blocked by Queenly Majesty, even if they become priority moves. 
[URL="https://bulbapedia.bulbagarden.net/wiki/Queenly_Majesty_(Ability)"]Font.[/URL]

Am trying to code but I still don't get how to make this part: "except Perish Song, Flower Shield, and Rototiller".
You don't need anything special for those exceptions. The moves should have a target of 20, which means they don't target specific Pokémon, and so they don't call def pbSuccessCheck at all. This means these moves bypass your code for Queenly Majesty/Dazzling as desired.
 
You don't need anything special for those exceptions. The moves should have a target of 20, which means they don't target specific Pokémon, and so they don't call def pbSuccessCheck at all. This means these moves bypass your code for Queenly Majesty/Dazzling as desired.

But if Pokémon with Prankster uses Perish Song/ Rototiller/ Flower Shield will put priority + 1 for them because they are "Status Move". So, Queenly Majestic/ Dazzling need to trigger. Am I wrong?
 
Yep. Queenly Majesty and Dazzling:

First, in ' def pbSuccessCheck(thismove,user,target,turneffects,accuracy=true)' paste below 'if USENEWBATTLEMECHANICS':
Code:
    if p>0 && thismove.target!=PBTargets::AllOpposing && thismove.target!=PBTargets::BothSides
      for i in 0...4; [email protected][i]
        if @battle.field.effects[PBEffects::PsychicTerrain]>0 && !user.isAirborne?
          PBDebug.log("Psychic Terrain prevented #{user.pbThis}'s priority move")
          @battle.pbDisplay(_INTL("The psychic terrain prevented the use of priority moves!"))
          return false
        elsif !user.hasMoldBreaker && pbIsOpposing?(i) && (battler.hasWorkingAbility(:QUEENLYMAJESTY) || 
                                                           battler.hasWorkingAbility(:DAZZLING))
          @battle.pbDisplay(_INTL("{1} cannot use {2}!",user.pbThis,PBMoves.getName(thismove)))
          return false
        end
      end
    end

Now, Replace the Perish Song, Rototiller and Flower Shield move scripts for:
Spoiler:

P.S: Added Psychic Terrain inside the code.
 
Last edited:
Better code for Disguise. Delete all you have (if so and want a new code for that ability):

In 'def pbConfusionDamage' replace for (Disguise will be trigger if Mimikyu hit itself by Confusion):
Spoiler:


Now, in 'def pbReduceHPDamage(damage,attacker,opponent)' add a 'elsif' below Substitute case, like:
Spoiler:


Then, after battle (winning or losing) Mimikyu will turns back to Disguised form. So, go to 'def pbAfterBattle(decision,canlose)' and add for Mimikyu case, like:
Spoiler:


Finally if Mimikyu fainted will turns back to Disguised form. For that case, go inside 'def pbFaint(showMessage=true)' and add below '@pokemon.makeUnprimal if self.isPrimal?':
Spoiler:


P.S: If player revives Mimikyu, it can trigger its Disguise ability again.

Cya!
 
About Innards Out we have:

Inside 'PokeBattle_Battler' script, below 'PBDebug.log("Move did #{numhits} hit(s), total damage=#{turneffects[PBEffects::TotalDamage]}")', paste (like):
Code:
    PBDebug.log("Move did #{numhits} hit(s), total damage=#{turneffects[PBEffects::TotalDamage]}")
    # Innards Out
    if target.ability==PBAbilities::INNARDSOUT && target.fainted? && 
       thismove.basedamage>0 && !target.effects[PBEffects::GastroAcid] &&
       !user.hasWorkingAbility(:MAGICGUARD)
      PBDebug.log("[Ability triggered] #{target.pbThis}'s Innards Out")
      user.pbReduceHP(turneffects[PBEffects::TotalDamage])
      @battle.pbDisplay(_INTL("{1} is hurt!",user.pbThis))
    end
    # Faint if 0 HP

But we still have to implement this part:
Code:
If a Pokémon with this Ability faints through Future Sight or Doom Desire, Innards Out will only activate if the user of the move is still on the field.

Any idea?

EDIT: SOLVED! The new code:
Code:
    # Innards Out
    if target.ability==PBAbilities::INNARDSOUT && target.fainted? && 
       thismove.basedamage>0 && !target.effects[PBEffects::GastroAcid] &&
       !user.hasWorkingAbility(:MAGICGUARD)
      if target.effects[PBEffects::FutureSight]>0
        for i in 0...4
          if target.effects[PBEffects::FutureSightUser][email protected][i].pokemonIndex &&
             [email protected][i].fainted?
            PBDebug.log("[Ability triggered] #{target.pbThis}'s Innards Out")
            user.pbReduceHP(turneffects[PBEffects::TotalDamage])
            @battle.pbDisplay(_INTL("{1} is hurt!",user.pbThis))
            break
          end
        end
      else
        PBDebug.log("[Ability triggered] #{target.pbThis}'s Innards Out")
        user.pbReduceHP(turneffects[PBEffects::TotalDamage])
        @battle.pbDisplay(_INTL("{1} is hurt!",user.pbThis))
      end
    end
 
Last edited:
Back
Top