• 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.
  • Our friends from the Johto Times are hosting a favorite Pokémon poll - and we'd love for you to participate! Click here for information on how to vote for your favorites!
  • Scottie, Todd, Serena, Kris - which Pokémon protagonist is your favorite? Let us know by voting in our poll!
  • 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.

need help on Pokemon Abilities

  • 4
    Posts
    9
    Years
    • Seen Jun 9, 2016
    I trying to create a new pokemon abilities that could make the pokemon immune to poison status and restore hp every turn, can anyone help me write the sprite
     
    I haven't tested this mind you.
    Let's say you already created the new ability and that you called it MITHRIDATISM:
    Around line 136 of Pokèbattle_Battlereffects you'll find this code, add the red part:

    Code:
     if !attacker || !attacker.hasMoldBreaker
          if hasWorkingAbility(:IMMUNITY) ||
             (hasWorkingAbility(:FLOWERVEIL) && pbHasType?(:GRASS)) ||
             (hasWorkingAbility(:LEAFGUARD) && (@battle.pbWeather==PBWeather::SUNNYDAY ||
                                                @battle.pbWeather==PBWeather::HARSHSUN)) [COLOR="Red"]|| hasWorkingAbility(:MITHRIDATISM)[/COLOR]
     @battle.pbDisplay(_INTL(.....etc


    Around line 3651 of Pokèbattle_battle paste the red part (it's a rough addition but it should work):

    Code:
    for i in priority
          next if i.isFainted?
          # Poison/Bad poison
          if i.status==PBStatuses::POISON [COLOR="Red"]|| i.hasWorkingAbility(:MITHRIDATISM)[/COLOR]

    Around line 3659 of Pokèbattle_battle paste the red part:

    Code:
    if i.hasWorkingAbility(:POISONHEAL)
              pbCommonAnimation("Poison",i,nil)
              if i.effects[PBEffects::HealBlock]==0 && i.hp<i.totalhp
                PBDebug.log("[Ability triggered] #{i.pbThis}'s Poison Heal")
                i.pbRecoverHP((i.totalhp/8).floor,true)
                pbDisplay(_INTL("{1} healed itself!",i.pbThis))
              end
    [COLOR="red"]elsif i.hasWorkingAbility(:MITHRIDATISM)
    pbCommonAnimation("HealthUp",i,nil)
     if i.effects[PBEffects::HealBlock]==0 && i.hp<i.totalhp
      i.pbRecoverHP((i.totalhp/8).floor,true)
      pbDisplay(_INTL("{1} healed itself thanks to his ability!",i.pbThis))
     end[/COLOR]
    else

    It should work.
     
    Last edited:
    I haven't tested this mind you.
    Let's say you already created the new ability and that you called it MITHRIDATISM:
    Around line 136 of Pokèbattle_Battlereffects you'll find this code, add the red part:

    Code:
     if !attacker || !attacker.hasMoldBreaker
          if hasWorkingAbility(:IMMUNITY) ||
             (hasWorkingAbility(:FLOWERVEIL) && pbHasType?(:GRASS)) ||
             (hasWorkingAbility(:LEAFGUARD) && (@battle.pbWeather==PBWeather::SUNNYDAY ||
                                                @battle.pbWeather==PBWeather::HARSHSUN)) [COLOR="Red"]|| hasWorkingAbility(:MITHRIDATISM)[/COLOR]
     @battle.pbDisplay(_INTL(.....etc


    Around line 3651 of Pokèbattle_battle paste the red part (it's a rough addition but it should work):

    Code:
    for i in priority
          next if i.isFainted?
          # Poison/Bad poison
          if i.status==PBStatuses::POISON [COLOR="Red"]|| i.hasWorkingAbility(:MITHRIDATISM)[/COLOR]

    Around line 3659 of Pokèbattle_battle paste the red part:

    Code:
    if i.hasWorkingAbility(:POISONHEAL)
              pbCommonAnimation("Poison",i,nil)
              if i.effects[PBEffects::HealBlock]==0 && i.hp<i.totalhp
                PBDebug.log("[Ability triggered] #{i.pbThis}'s Poison Heal")
                i.pbRecoverHP((i.totalhp/8).floor,true)
                pbDisplay(_INTL("{1} healed itself!",i.pbThis))
              end
    [COLOR="red"]elsif i.hasWorkingAbility(:MITHRIDATISM)
    pbCommonAnimation("HealthUp",i,nil)
     if i.effects[PBEffects::HealBlock]==0 && i.hp<i.totalhp
      i.pbRecoverHP((i.totalhp/8).floor,true)
      pbDisplay(_INTL("{1} healed itself thanks to his ability!",i.pbThis))
     end[/COLOR]
    else

    It should work.
    I did test but It do blood loss of pokemon use here abilities. And it don't disable Poison type
     
    Back
    Top