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

Question over certain moves.

44
Posts
11
Years
    • Seen Aug 13, 2014
    Ok, so, I've been editing essentials in hope of updating things as to the way they are in the sixth gen. For example:
    I've changed the base stats of the pokemon that have had their base stats increased https://www.serebii.net/xy/updatedstats.shtml
    I changed to fairy type all pre-gen6 pokemon known to have become fairy-type (such as granbull and azumarill) https://www.serebii.net/xy/fairytype.shtml.

    I have yet to update the movesets of the pokemon, but given that i haven't created the new moves yet, that would be an exercise in futility. Anyway, I was also updating the moves, changing PP, Base Power, Accuracy and Type as appropriate, but I got stumped on two moves:

    Fury Cutter: It's base power has doubled, to 40, however it's max power by it's own eff still should be 160. If i just update the base power without editing scripts, will the max basepower still be 160 or do i have to edit the scripts? Looking at the move's function code in PokeBattle_MoveEffects didn't tell me much, but if I need to edit the scripts, what script would it be?

    Hidden Power: It now has a fixed 60 base power. How would I go about removing the part where the script calculates it's Base Power? I saw the script, but given that i'm not very good at scripting i was afraid of accidentally deleting an important line there. There is no need to change the type formula though: it's the same as in gen5, meaning Fairy Hidden Power is impossible.

    EDIT: One more question now: I recently learned that the move Knock Off has gained an additional effect it didn't have before: in addition to an increase in Base Power and PP, it's damage is now multiplied by 1.5 if the opponent is holding an item. How would I go about adding this effect?
     
    Last edited:
    152
    Posts
    11
    Years
    • Seen May 11, 2015
    For Hidden Power, delete this:
    Code:
    base|=(iv[PBStats::HP]&2)>>1
      base|=(iv[PBStats::ATTACK]&2)
      base|=(iv[PBStats::DEFENSE]&2)<<1
      base|=(iv[PBStats::SPEED]&2)<<2
      base|=(iv[PBStats::SPATK]&2)<<3
      base|=(iv[PBStats::SPDEF]&2)<<4
    and this
    Code:
    powermin=30
      powermax=70
    Then change this:
    Code:
      base=(base*(powermax-powermin)/63).floor+powermin
    to this
    Code:
      base=60
    And then change its definition in moves.txt to
    Code:
    333,HIDDENPOWER,Hidden Power,090,60,NORMAL,Special,100,15,0,00,0,bef,Smart,A unique attack that varies in type depending on the Pokémon using it.

    In the end, the class should look like this:
    Code:
    class PokeBattle_Move_090 < PokeBattle_Move
      def pbType(type,attacker,opponent)
        hp=pbHiddenPower(attacker.iv)
        return hp[0]
      end
    
      def pbBaseDamage(basedmg,attacker,opponent)
        hp=pbHiddenPower(attacker.iv)
        return hp[1]
      end
    end
    
    def pbHiddenPower(iv)
      type=0; base=0
      types=[]
      for i in 0..PBTypes.maxValue
        types.push(i) if !PBTypes.isPseudoType?(i) &&
                         !isConst?(i,PBTypes,:NORMAL) && !isConst?(i,PBTypes,:SHADOW)
      end
      type|=(iv[PBStats::HP]&1)
      type|=(iv[PBStats::ATTACK]&1)<<1
      type|=(iv[PBStats::DEFENSE]&1)<<2
      type|=(iv[PBStats::SPEED]&1)<<3
      type|=(iv[PBStats::SPATK]&1)<<4
      type|=(iv[PBStats::SPDEF]&1)<<5
      type=(type*(types.length-1)/63).floor
      hptype=types[type]
      base=60
      return [hptype,base]
    end

    I'm not very experienced in Ruby, so I can't help you on Fury Cuter, though.
     

    Maruno

    Lead Dev of Pokémon Essentials
    5,286
    Posts
    16
    Years
    • Seen May 3, 2024
    For Hidden Power, you can just delete the def pbBaseDamage and make sure it's defined in moves.txt to have a base power of 60 rather than 1.

    Fury Cutter counts how many times it can double the damage (up to 4-1 times). In PokeBattle_Battler, around line 1925, is the line which increases the count. Change the 4 in that line to a 3.
     
    44
    Posts
    11
    Years
    • Seen Aug 13, 2014
    One more question now: I recently learned that the move Knock Off has gained an additional effect it didn't have before: in addition to an increase in Base Power and PP, it's damage is now multiplied by 1.5 if the opponent is holding an item. How would I go about adding this effect?
     

    FL

    Pokémon Island Creator
    2,453
    Posts
    13
    Years
    • Seen May 10, 2024
    One more question now: I recently learned that the move Knock Off has gained an additional effect it didn't have before: in addition to an increase in Base Power and PP, it's damage is now multiplied by 1.5 if the opponent is holding an item. How would I go about adding this effect?
    Try to add the method below to the class. Untested.

    Code:
    def pbBaseDamage(basedmg,attacker,opponent)
      return opponent.item(true)==0 ? basedmg : basedmg*3/2
    end
     
    44
    Posts
    11
    Years
    • Seen Aug 13, 2014
    Oops. I should've edited this thread: Maruno had already answered this question through PM.
     
    Back
    Top