Advertiser Content

Alan Flygon

A new GUY!!!

Male
Kerala
Seen 5 Days Ago
Posted 5 Days Ago
76 posts
1.2 Years
Hi there Guys
I found this script for Innards Out:
Spoiler:

if target.hasWorkingAbility(:INNARDSOUT,true) && !user.isFainted?
          @battle.pbDisplayEffect(target)
          PBDebug.log("[#{target.pbThis}'s Innardsout triggered]")
          @battle.scene.pbDamageAnimation(user,0)
          user.pbReduceHP((user.totalhp/8).floor)
          @battle.pbDisplay(_INTL("{3} is hurt!",target.pbThis,
             PBAbilities.getName(target.ability),user.pbThis(true)))
        end


But this isn't the correct functioning method of this ability. This script reduces the HP of the opponent every time when the user is hit by a Physical type Move, but Innards Out only does damage equal to the user's last HP when it faints.
According to Bulbapedia:
Bulbapedia:
When a Pokémon with this Ability is knocked out by an opponent's attack, it deals damage to that opponent equal to the amount of HP it had left before last being hit.
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.
If a Pokémon with this Ability moves first and is then knocked out by Core Enforcer, Innards Out will not activate.
If Innards Out causes two opposing Pokemon to faint at the same time, and neither party has any remaining Pokémon, then the Pokémon that activated Innards Out loses.
So can anyone please help me for creating a new script for Innards Out?
Thanks in Advance 😃

WolfPP

Discord: Wolf#1235

Male
Brazil
Seen 1 Hour Ago
Posted 22 Hours Ago
622 posts
331 Days
Stop to flood and try to make the code yourself or wait untill someone make it for you.

EDIT:
Here, made by mybusiness:
Inside 'PokeBattle_Battler', find Destiny Bond's code, and then, above:
    # Faint if 0 HP
    target.pbFaint if target.fainted? # no return
    user.pbFaint if user.fainted? # no return
    thismove.pbEffectAfterHit(user,target,turneffects)
    target.pbFaint if target.fainted? # no return
    user.pbFaint if user.fainted? # no return
Paste:
    # Innards Out
    if target.ability==PBAbilities::INNARDSOUT && target.fainted? && 
     thismove.pbIsDamaging? && !target.effects[PBEffects::GastroAcid]
      PBDebug.log("[Ability triggered] #{target.pbThis}'s Innards Out")
      @battle.pbDisplay(_INTL("{1} was hurt by {2}'s {3}!",user.pbThis,
      target.pbThis,PBAbilities.getName(target.ability)))
      user.pbReduceHP(turneffects[PBEffects::TotalDamage])
    end
P.S: You have 2 or 3 thread about ability/move request, please is better for us you just post a new request there (new post request) instead create a new thread asking for new codes...

Can any mod merge all Alan Flygon's thread request into only one, please? '-'

mgriffin

Seen 2 Hours Ago
Posted 4 Hours Ago
531 posts
5.3 Years
I agree with Wolf. It's great that you're excited about nearly being done with your Gen 7 scripts, but if you're waiting for help then you need to be patient.

Also you should probably at least try to fix the code yourself; there's a whole bunch of people here that will be more willing to help if you can describe what change you're trying to make (which you have done), and what changes you've tried making to the code and what those changes did that wasn't working (which you haven't). Note, "I got an error" is not a change that didn't work, I'd be expecting to see you describe a code change that doesn't cause an error, but also doesn't have the right behavior. For example:
I added a check that the Pokémon with Innards Out was fainted by the attack like so:
      if target.hasWorkingAbility(:INNARDSOUT,true) && !user.isFainted? && target.isFainted?
          @battle.pbDisplayEffect(target)
          PBDebug.log("[#{target.pbThis}'s Innardsout triggered]")
          @battle.scene.pbDamageAnimation(user,0)
          user.pbReduceHP((user.totalhp/8).floor)
          @battle.pbDisplay(_INTL("{3} is hurt!",target.pbThis,
             PBAbilities.getName(target.ability),user.pbThis(true)))
        end
… but now the ability doesn't trigger at all!
Why don't you try looking at other abilities that work how you want? Aftermath triggers when the Pokémon is KOed, so surely you can take the variable damage part of your Innards Out code, and the "on-KO" part of the Aftermath code and combine them to get a working solution?

Alan Flygon

A new GUY!!!

Male
Kerala
Seen 5 Days Ago
Posted 5 Days Ago
76 posts
1.2 Years
Spoiler:
Stop to flood and try to make the code yourself or wait untill someone make it for you.

EDIT:
Here, made by mybusiness:
Inside 'PokeBattle_Battler', find Destiny Bond's code, and then, above:
    # Faint if 0 HP
    target.pbFaint if target.fainted? # no return
    user.pbFaint if user.fainted? # no return
    thismove.pbEffectAfterHit(user,target,turneffects)
    target.pbFaint if target.fainted? # no return
    user.pbFaint if user.fainted? # no return
Paste:
    # Innards Out
    if target.ability==PBAbilities::INNARDSOUT && target.fainted? && 
     thismove.pbIsDamaging? && !target.effects[PBEffects::GastroAcid]
      PBDebug.log("[Ability triggered] #{target.pbThis}'s Innards Out")
      @battle.pbDisplay(_INTL("{1} was hurt by {2}'s {3}!",user.pbThis,
      target.pbThis,PBAbilities.getName(target.ability)))
      user.pbReduceHP(turneffects[PBEffects::TotalDamage])
    end
P.S: You have 2 or 3 thread about ability/move request, please is better for us you just post a new request there (new post request) instead create a new thread asking for new codes...

Can any mod merge all Alan Flygon's thread request into only one, please? '-'
I agree with Wolf. It's great that you're excited about nearly being done with your Gen 7 scripts, but if you're waiting for help then you need to be patient.

Also you should probably at least try to fix the code yourself; there's a whole bunch of people here that will be more willing to help if you can describe what change you're trying to make (which you have done), and what changes you've tried making to the code and what those changes did that wasn't working (which you haven't). Note, "I got an error" is not a change that didn't work, I'd be expecting to see you describe a code change that doesn't cause an error, but also doesn't have the right behavior. For example:


Why don't you try looking at other abilities that work how you want? Aftermath triggers when the Pokémon is KOed, so surely you can take the variable damage part of your Innards Out code, and the "on-KO" part of the Aftermath code and combine them to get a working solution?


Sorry for that Wolf and mgriffin
I tried to make it work the whole day but I couldn't so that's why I started a thread hoping for someone's help, since I am a rookie I can't understand the Ruby language very well but I am trying my level best to learn it. It might take some time I guess, since everyone is not perfect at the beginning.
And I won't make unnecessary new threads from now on
Sorry😩

Alan Flygon

A new GUY!!!

Male
Kerala
Seen 5 Days Ago
Posted 5 Days Ago
76 posts
1.2 Years
Stop to flood and try to make the code yourself or wait untill someone make it for you.

EDIT:
Here, made by mybusiness:
Inside 'PokeBattle_Battler', find Destiny Bond's code, and then, above:
    # Faint if 0 HP
    target.pbFaint if target.fainted? # no return
    user.pbFaint if user.fainted? # no return
    thismove.pbEffectAfterHit(user,target,turneffects)
    target.pbFaint if target.fainted? # no return
    user.pbFaint if user.fainted? # no return
Paste:
    # Innards Out
    if target.ability==PBAbilities::INNARDSOUT && target.fainted? && 
     thismove.pbIsDamaging? && !target.effects[PBEffects::GastroAcid]
      PBDebug.log("[Ability triggered] #{target.pbThis}'s Innards Out")
      @battle.pbDisplay(_INTL("{1} was hurt by {2}'s {3}!",user.pbThis,
      target.pbThis,PBAbilities.getName(target.ability)))
      user.pbReduceHP(turneffects[PBEffects::TotalDamage])
    end
P.S: You have 2 or 3 thread about ability/move request, please is better for us you just post a new request there (new post request) instead create a new thread asking for new codes...

Can any mod merge all Alan Flygon's thread request into only one, please? '-'
Thanks for the script Wolf bro and sorry for the trouble.
Advertiser Content