• ✨ ARCHIVE MODE ✨
    The forum has now been set to read-only mode, no new posts, resources, replies etc will not be possible.
    We recommend you join our Discord server to get real-time response: Discord Invite Link

pokemon can survive with 0 hp

Status
Not open for further replies.

arnierulezz

Bug Catcher
I was fighting a heracross (lvl 11) when he used selfdestruct.
The result was that my pokemon was left with 0 hp but didn't faint.
0hp.png
 

Xane

Pokémon Ranger
Contributor
I can confirm this, was about to post this bug myself. I was fighting a Pineco with my own Pineco. My opponent used selfdestruct, my own Pineco went down to 0 hp but survived the attack.
 

Sola

Elite
Contributor
This is probably a bug with selfdestruct. When any pokemon hit Hp:0 attacked by any other attack it dies.
 

arnierulezz

Bug Catcher
well I guess it's a bug with the "pokemon fnt" check where it checks the enemy pokemon first and if it faints it ends the check.
meaning the program doesn't check for a dual faint and will always check the opponent first and end the check if the opponent fainted

I will test this in a bit (I first have to have 0 pp left for recoil attacks)
 

arnierulezz

Bug Catcher
oke, recoil mutial kill kills the attacker first.
it appears that the check goes something like this
if(attacker[hp]==0)
faint attacker
elseif(defender[hp]==0)
faint defender
end if

where it should be something like this
if(attacker[hp]==0)
faint attacker
end if

if(defender[hp]==0)
faint defender
end if
 

Davey

Champion
That psuedo code looks almost exactly the same. I know what you mean though, I think what you mean is something like this:

Code:
if (attacker[hp] == 0)
    if (defender[hp] == 0)
        // double faint here
        faint attacker
        faint defender
    endif
    else
        faint attacker
    endif
end
 

arnierulezz

Bug Catcher
well that piece of code would prevent the defender from fainting.
I think that a switch would solve the problem.

Code:
switch
:case (attacker[hp]==0 && defender[hp]!=0)
{faint attacker}
:case (attacker[hp]!0 && defender[hp]==0)
{faint defender}
:case (attacker[hp]==0 && defender[hp]==0)
{faint attacker
faint defender}
:case (attacker[hp]!=0 && defender[hp]!=0)
{end switch}
or a double if check but a switch is better in this case
 

Sola

Elite
Contributor
The same happens with Take Down, so it is a general bug with all recoil moves.
 

Sola

Elite
Contributor
This is probably a bug with selfdestruct.
For a second I read this literally and thought you were just stating the obvious. That it was Heracross, a bug-type, with selfdestruct lmao.
hahaha no... i was just saying i thought it was a problem with the attack, not with the pokemon, or pokemon type, or the hole battle system xD

Now I think it is a bug bigger than just with the attack. The bug happens with all recoil attacks, they can take all the opponent life, but can`t kill it =)
 

DracoHouston

Kolben Developer
Contributor
check faint probably isnt happening after special attack

i'll try the lua versions of the attacks i've made and see if the same behaviour happens, it probably just needs the check faint battle step added after the drain hp one
 

DracoHouston

Kolben Developer
Contributor
hmm bugs out on mine, also bugs out still if you select no to switching. i'll see if i can fix that
 
Status
Not open for further replies.
Top