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

need help on Pokemon Abilities

4
Posts
8
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
     

    Telemetius

    Tele*
    267
    Posts
    9
    Years
  • 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:
    4
    Posts
    8
    Years
    • Seen Jun 9, 2016
    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