• 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.
Resource icon

Flying Press 1.0

Pokémon Essentials Version
v17.2 ➖
Hey all. So, my Flying Press is a bit of an odd script. I am still working out the kinks in the scripts, but atm, it does massive damage if the opponent is weak to both Fighting and Flying types.

To get started, add this line in PBEffects at the bottom of the section '# These effects apply to a battler':

Code:
Expand Collapse Copy
    ZeroGravity        = 109

Be sure to use the replace 109 with whatever the next number in the sequence is for you.

This next place to go to is PokeBattle_Move and there are two pieces of code to add here, so use CTRL+F and the Electrify to quickly jump around (if you don't already, lol). The first will under the section 'def pbType(type,attacker,opponent)'. Below the following lines...

Code:
Expand Collapse Copy
if attacker.effects[PBEffects::Electrify]
        type=getConst(PBTypes,:ELECTRIC)
        @powerboost=false
      end

... add in these lines...

Code:
Expand Collapse Copy
if attacker.effects[PBEffects::ZeroGravity]
        type=getConst(PBTypes,:FLYING)
        @powerboost=false
      end

With those lines added, let's move down to the next part of this. This one is under the section 'def pbTypeModifier(type,attacker,opponent)'. Below the following lines...

Code:
Expand Collapse Copy
    if @function==0x135 && !attacker.effects[PBEffects::Electrify] # Freeze-Dry
      mod1=4 if isConst?(otype1,PBTypes,:WATER)
      if isConst?(otype2,PBTypes,:WATER)
        mod2=(otype1==otype2) ? 2 : 4
      end
      if isConst?(otype3,PBTypes,:WATER)
        mod3=(otype1==otype3 || otype2==otype3) ? 2 : 4
      end
    end

... add these lines

Code:
Expand Collapse Copy
    if @function==0x144 && !attacker.effects[PBEffects::ZeroGravity] # Flying Press
      mod1=4 if isConst?(otype1,PBTypes,:GRASS) || isConst?(otype1,PBTypes,:BUG) || isConst?(otype1,PBTypes,:FIGHTING)
      if isConst?(otype2,PBTypes,:GRASS) || isConst?(otype2,PBTypes,:BUG) || isConst?(otype2,PBTypes,:FIGHTING)
        mod2=(otype1==otype2) ? 2 : 4
      end
      if isConst?(otype3,PBTypes,:GRASS) || isConst?(otype3,PBTypes,:BUG) || isConst?(otype3,PBTypes,:FIGHTING)
        mod3=(otype1==otype3 || otype2==otype3) ? 2 : 4
      end
    end

Hopefully, Flying Press hasn't changed numbers in your MoveEffects. If it has, be sure to replace my 144 with whatever number is associated with Flying Press.

With those two added, the last place to go is PokeBattle_MoveEffect. At the main bottom, add the following lines in:

Code:
Expand Collapse Copy
################################################################################
# Target's moves become Flying-type for the rest of the round. (Zero Gravity)
################################################################################
class PokeBattle_Move_159 < PokeBattle_Move
  def pbEffect(attacker,opponent,hitnum=0,alltargets=nil,showanimation=true)
    return -1 if pbTypeImmunityByAbility(pbType(@type,attacker,opponent),attacker,opponent)
    if opponent.effects[PBEffects::ZeroGravity]
      @battle.pbDisplay(_INTL("But it failed!"))
      return -1
    end
    if @battle.choices[opponent.index][0]!=1 || # Didn't choose a move
       !@battle.choices[opponent.index][2] ||
       @battle.choices[opponent.index][2].id<=0 ||
       opponent.hasMovedThisRound?
      @battle.pbDisplay(_INTL("But it failed!"))
      return -1
    end
    pbShowAnimation(@id,attacker,opponent,hitnum,alltargets,showanimation)
    opponent.effects[PBEffects::Immolate]=true
    @battle.pbDisplay(_INTL("{1} began to float!",opponent.pbThis))
    return 0
  end
end

Be sure to replace whatever my 159 with whatever the next number in the sequence is for you.
Credits
For crediting me, please use the name Kirik instead of my username here.
Author
AngelusMortis
Views
1,393
First release
Last update

Ratings

0.00 star(s) 0 ratings

More resources from AngelusMortis

Back
Top