Go Back   Smogon Community > Socialization in the Empire > Thread Cryonics > Closed Forums > Pokemon Online
Register FAQ Social Groups Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
Old Mar 23rd, 2012, 11:37:22 AM   #1
Antar*
That's Dr. Antar to you
is a Battle Server Administratoris a Super Moderatoris a Programmeris a Community Contributor
 
Antar's Avatar
 
Super Moderator
Join Date: Feb 2010
Posts: 2,051
DC Metro Area
Default Self-KO clause

I share with you a conversation I had with a friend.

Quote:
[12:24:56 PM] ZellMurasame: I just encountered a problem with PO (not sure if you deal with it but I bet you know who does).
[12:26:31 PM] ZellMurasame: I was playing a ladder match with Self KO Clause. He attacked me and died to LO at the same time, PO dropped a "Self KO clause acted as a tiebreaker" (which shouldn't it be a win for me?) but I ended up losing points.
[12:29:48 PM] ZellMurasame: (12:17:41) +Desolate: There's no way we can reverse it or anything.
(12:18:00) ZellMurasame: No, but you can fix the program.
(12:18:05) ZellMurasame: It's clearly broken.
(12:18:14) +Desolate: I'll remember that.
[10:35:40 AM] Antar1011: hmm...
[10:35:50 AM] Antar1011: IIRC, self-KO isn't a standard rule, is it?
[10:36:06 AM] Antar1011: are you sure this was ladder?
[10:37:33 AM] ZellMurasame: Yes.
[10:37:38 AM] Antar1011: yeah, I just reread
[10:37:46 AM] ZellMurasame: And it pops up in the list.
[10:38:27 AM] Antar1011: I thought self-ko just referred to explosion
[10:38:42 AM] ZellMurasame: I'unno.
[10:38:55 AM] ZellMurasame: I just didn't like seeing it was a tie then losing points.
[10:39:07 AM] ZellMurasame: Either way something is broken.
[10:39:11 AM] Antar1011: you shouldn't lose points in a tie
[10:39:23 AM] Antar1011: so PO told you: "Self KO clause acted as a tiebreaker" ?
[10:39:29 AM] ZellMurasame: Yes.
[10:39:43 AM] Antar1011: that is very strange
[10:39:51 AM] Antar1011: but we're the wrong people to be bugging
[10:39:57 AM] Antar1011: you should take it up with PO
[10:40:01 AM] Antar1011: since they're the developers
[10:40:15 AM] Antar1011: I'll investigate on my own, though
[10:40:19 AM] ZellMurasame: I figured since it was a clause related thing it would be server specific.
[10:40:20 AM] Antar1011: I might be able to apply a patch
[10:40:32 AM] Antar1011: no, it means that self-ko isn't working correctly
[10:40:37 AM] Antar1011: that battle should have been a tie
[10:40:57 AM] Antar1011: and if it told gave you that message, it should have been a win for you
[10:41:04 AM] Antar1011: but IMO, LO recoil = tie
Now, ordinarily, as I told him, this is the kind of stuff that should be directed towards PO. But if it's something simple to fix, I'd like to see if I can implement a patch.

So has anyone else had a problem with self-KO clause doing this? And, more importantly, is it wrong?
__________________
Codes and Hacks I Use
PBR FC: 4898-8739-8815 (See here)
Black FC: 4040 5386 0128 / White 2 FC: 4771 3664 7215
My Narrated PBR & Gen V Battles
My Trade Thread
Convert any sim team to pkms
Pokemetrics: A Blog
Antar is offline   Reply With Quote
Old Mar 23rd, 2012, 12:41:37 PM   #2
Steamroll
Woof
is a Smogon IRC AOpis a Battle Server Moderator
 
Steamroll's Avatar
 
Join Date: Jan 2011
Posts: 1,766
(*・_・)ノ⌒┻━┻
Default

I have heard complaints about KO clause before but they are extremely rare and usually happen in events like with the user you were talking to. I am not sure about the clause but I know it doesn't disallow explosion (because I used to ladder with a CB explosion Ferrothorn to be an ass). I believe it comes down to 1-1 events were both mons are KO'd at the same time via LO, rocky helmet, aftermath, etc. This seriously should just be ruled a tie and no points are awarded to either battler but Self-KO clause is so rare an occurance I don't really know.
Steamroll is online now   Reply With Quote
Old Mar 23rd, 2012, 12:46:53 PM   #3
Antar*
That's Dr. Antar to you
is a Battle Server Administratoris a Super Moderatoris a Programmeris a Community Contributor
 
Antar's Avatar
 
Super Moderator
Join Date: Feb 2010
Posts: 2,051
DC Metro Area
Default

Quote:
Originally Posted by Fat Steamroll View Post
This seriously should just be ruled a tie and no points are awarded to either battler but Self-KO clause is so rare an occurance I don't really know.
I agree.

Here are two (anonymized) battle logs:

LO Recoil


Iron Barbs


IMO, these both should have been declared ties. Ugh. Time to poke through PO's source code...
__________________
Codes and Hacks I Use
PBR FC: 4898-8739-8815 (See here)
Black FC: 4040 5386 0128 / White 2 FC: 4771 3664 7215
My Narrated PBR & Gen V Battles
My Trade Thread
Convert any sim team to pkms
Pokemetrics: A Blog
Antar is offline   Reply With Quote
Old Mar 23rd, 2012, 12:54:28 PM   #4
Antar*
That's Dr. Antar to you
is a Battle Server Administratoris a Super Moderatoris a Programmeris a Community Contributor
 
Antar's Avatar
 
Super Moderator
Join Date: Feb 2010
Posts: 2,051
DC Metro Area
Default

...and here's the relevant source code:

Code:
    if (recoil < 0) {
        inflictDamage(source, damage, source, false);

        /* Self KO Clause! */
        if (koed(source)) {
            /* In VGC 2011 (gen 5), the user of the recoil move wins instead of losing with the Self KO Clause */
            if (gen() <= 4)
                selfKoer() = source;
            else
                selfKoer() = target;
        }
    } else  {
        if (hasWorkingItem(source, Item::BigRoot)) /* Big root */ {
            damage = damage * 13 / 10;
        }

        if (hasWorkingAbility(target, Ability::LiquidOoze)) {
            sendMoveMessage(1,2,source,Pokemon::Poison,target);
            inflictDamage(source,damage,source,false);

            /* Self KO Clause! */
            if (koed(source)) {
                if (gen() >= 5)
                    selfKoer() = target;
            }
        } else {
            if (pokeMemory(source).value("HealBlockCount").toInt() > 0) {
                sendMoveMessage(60, 0, source);
            } else {
                healLife(source, damage);
            }
        }
    }
}
and

Code:
    if (c1*c2==0) {
        if (c1 + c2 == 0) {
            if ((clauses() & ChallengeInfo::SelfKO) && selfKoer() != -1) {
                notifyClause(ChallengeInfo::SelfKO);
                endBattle(Win, opponent(player(selfKoer())), player(selfKoer()));
            }
            endBattle(Tie, Player1, Player2);
        } else if (c1 == 0) {
            endBattle(Win, Player2, Player1);
        } else {
            endBattle(Win, Player1, Player2);
        }
    }
Relevant part: apparently the PO staff decided that they'd follow VGC 2011 rules. Need confirmation from someone who knows about VGC--is this a correct implementation of said rule?
__________________
Codes and Hacks I Use
PBR FC: 4898-8739-8815 (See here)
Black FC: 4040 5386 0128 / White 2 FC: 4771 3664 7215
My Narrated PBR & Gen V Battles
My Trade Thread
Convert any sim team to pkms
Pokemetrics: A Blog
Antar is offline   Reply With Quote
Old Mar 23rd, 2012, 4:29:33 PM   #5
Pidge
 
Pidge's Avatar
 
Join Date: Aug 2005
Posts: 2,086
Default

On a cartridge wi-fi battle, I believe it's actually impossible to tie. This is because in 5th gen, the game actually has an inherent Self-KO Clause. For these following videos, pay close attention to the ending message that says "Player defeated/lost against ____."

Life Orb user wins: http://www.youtube.com/watch?v=ESBCyHAK9yE
Destiny Bond user loses: http://www.youtube.com/watch?v=CxdP0ionlFA
Final Gambit user loses: http://www.youtube.com/watch?v=2HE8Mni3dxw
Rocky Helmet holder wins: http://www.youtube.com/watch?v=UpeFDBpxOAU

All these types of scenarios are explained here: http://www.pokemonvgc.com/static/pdf...on_2011_EN.pdf

If you really wanted to emulate wi-fi battles on PO or any other simulator, you would remove Self-KO Clause from being optional, and implement it into the actual coding of all 5th gen battles.

Last edited by Pidge; Mar 23rd, 2012 at 4:40:27 PM.
Pidge is offline   Reply With Quote
Old Mar 23rd, 2012, 6:07:59 PM   #6
Unbreakable
 
Unbreakable's Avatar
 
Join Date: May 2010
Posts: 349
A paper bag
Default

In response to Pidge's post (nice finds, btw!), it seems that the rule is implemented various ways based on the mechanics of the specific method used.

Destiny Bond/Final Gambit/Explosion has the user faint as an activation cost before the effect of the move resolves. Obviously, if the user of those moves got themselves into such a situation that they need to drag the opponent down with them, they were most likely (I say "likely" instead of "certainly" because lol hax) outplayed and don't deserve the win, so this interpretation makes sense.

The Rocky Helmet holder winning, however, is a bit less straightforward. In that example, note how damage from Bug Bite was applied, then Rocky Helmet's effect activated, then Scizor faints first after the effect of Rocky Helmet before Metagross bites it. Also, it's fairly common knowledge that LO recoil is applied after a KO is scored.

In all of these examples, a common thread can be found: The loser was the one whose last Pokemon fainted first. (In the case of the weather double kill, for once you can be glad that your opponent outspeeds you!)
__________________
But I got wiped out with no saving grace at all!
And then I'm told I don't have any talent?! Man...
Unbreakable is offline   Reply With Quote
Old Mar 23rd, 2012, 6:56:45 PM   #7
Antar*
That's Dr. Antar to you
is a Battle Server Administratoris a Super Moderatoris a Programmeris a Community Contributor
 
Antar's Avatar
 
Super Moderator
Join Date: Feb 2010
Posts: 2,051
DC Metro Area
Default

So, bottom line: is PO is correctly implementing the VGC rule?
__________________
Codes and Hacks I Use
PBR FC: 4898-8739-8815 (See here)
Black FC: 4040 5386 0128 / White 2 FC: 4771 3664 7215
My Narrated PBR & Gen V Battles
My Trade Thread
Convert any sim team to pkms
Pokemetrics: A Blog
Antar is offline   Reply With Quote
Old Mar 23rd, 2012, 9:40:36 PM   #8
muffinhead
b202 wifi vgc
is a Forum Moderator Alumnusis a Contributor Alumnus
 
muffinhead's Avatar
 
Join Date: Mar 2010
Posts: 933
wow, fantastic baby
Default

in vgc, recoil moves (double-edge, flare blitz), life orb recoil = user of move wins.

destiny bond, explosion selfdestruct = user of move loses.

edit: also at the bottom of the link that pidge posted is extremely important ( # of pokemon, then average % hp remaining, then # total hp, THEN bo1 match). is any of that implemented?
__________________


12:49:41 JRank lol i've still won more than you guys have
12:49:47 JRank i'll win with whatever team wins
geee geee
um
muffinhead is offline   Reply With Quote
Old Mar 23rd, 2012, 11:32:32 PM   #9
Antar*
That's Dr. Antar to you
is a Battle Server Administratoris a Super Moderatoris a Programmeris a Community Contributor
 
Antar's Avatar
 
Super Moderator
Join Date: Feb 2010
Posts: 2,051
DC Metro Area
Default

Quote:
Originally Posted by Fat muffinhead View Post
edit: also at the bottom of the link that pidge posted is extremely important ( # of pokemon, then average % hp remaining, then # total hp, THEN bo1 match). is any of that implemented?
Yes, partially. I can't remember how far down the line I went.
__________________
Codes and Hacks I Use
PBR FC: 4898-8739-8815 (See here)
Black FC: 4040 5386 0128 / White 2 FC: 4771 3664 7215
My Narrated PBR & Gen V Battles
My Trade Thread
Convert any sim team to pkms
Pokemetrics: A Blog
Antar is offline   Reply With Quote
Old Mar 30th, 2012, 6:40:43 AM   #10
Pwnemon
 
Pwnemon's Avatar
 
Join Date: Aug 2010
Posts: 4,011
Maryland
Default

It appears that, since Pidge is correct, at least based on my past experience, the only problem with Self-KO clause is the message. Zell correctly lost points, but he shouldn't have been told that the match was a tie.
__________________
[11:56pm] Pwnemon: statutory rape and all
[11:56pm] bmelts: i have such a huge boner right now

[9:28pm] Kadew: pwnemon that signature is like an x marking the spot of treasure, except instead of treasure its a pile of humorous garbage that turtles crapped out
Pwnemon is offline   Reply With Quote
Reply Smogon Community > Socialization in the Empire > Thread Cryonics > Closed Forums > Pokemon Online

« Previous Thread | Next Thread »
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT -4. The time now is 4:39:20 PM.