Skip to content

Destiny Bond final mutual KO should make the Destiny Bond user lose #6

Description

@safadfadf

The engine currently appears to lack special win/loss handling for the case where Destiny Bond causes both players' final Pokemon to faint. Under the intended rule, if both final Pokemon faint because of Destiny Bond, the player whose Pokemon used Destiny Bond should lose.

In the reproduced state below:

  • Side one active: HIPPOWDON
  • Side two active: GENGARMEGA
  • Both sides have no remaining healthy Pokemon
  • GENGARMEGA can use DESTINYBOND
  • HIPPOWDON can KO GENGARMEGA with EARTHQUAKE
  • DESTINYBOND then also KOs HIPPOWDON

Current simulation shows both sides faint, but the engine does not apply the special Destiny Bond final-KO tiebreak.

State String

HIPPOWDON,50,GROUND,TYPELESS,GROUND,TYPELESS,214,214,SANDSTREAM,SANDSTREAM,NONE,IMPISH,31;0;5;0;30;0,132,157,79,122,67,NONE,0,0,300,EARTHQUAKE;false;16,YAWN;false;15,SLACKOFF;false;7,STEALTHROCK;false;31,false,GROUND,0,false=GRENINJAMEGA,50,ICE,TYPELESS,WATER,DARK,0,153,PROTEAN,PROTEAN,NONE,TIMID,6;0;0;32;1;27,130,97,185,102,207,NONE,0,0,40,DARKPULSE;false;24,ICEBEAM;false;14,SLUDGEWAVE;false;16,TOXICSPIKES;false;32,false,WATER,0,true=ARCHALUDON,50,STEEL,DRAGON,STEEL,DRAGON,0,197,STAMINA,STAMINA,LEFTOVERS,MODEST,32;0;5;17;12;0,112,155,178,97,105,NONE,0,0,60,FLASHCANNON;false;16,DRAGONTAIL;false;14,THUNDERBOLT;false;24,SUBSTITUTE;false;15,false,STEEL,0,false=NONE,1,NORMAL,TYPELESS,NORMAL,TYPELESS,0,100,NONE,NONE,NONE,SERIOUS,11;11;11;11;11;11,100,100,100,100,100,NONE,0,0,0,NONE;true;0,NONE;true;0,NONE;true;0,NONE;true;0,true,TYPELESS,0,false=NONE,1,NORMAL,TYPELESS,NORMAL,TYPELESS,0,100,NONE,NONE,NONE,SERIOUS,11;11;11;11;11;11,100,100,100,100,100,NONE,0,0,0,NONE;true;0,NONE;true;0,NONE;true;0,NONE;true;0,true,TYPELESS,0,false=NONE,1,NORMAL,TYPELESS,NORMAL,TYPELESS,0,100,NONE,NONE,NONE,SERIOUS,11;11;11;11;11;11,100,100,100,100,100,NONE,0,0,0,NONE;true;0,NONE;true;0,NONE;true;0,NONE;true;0,true,TYPELESS,0,false=0=0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0==0;0;0;0;0;0=0=0=0=0=0=0=0=0=0=0=0=0=false=NONE=false=false=false=move:0=false=true/GENGARMEGA,50,GHOST,POISON,GHOST,POISON,61,137,SHADOWTAG,SHADOWTAG,NONE,TIMID,2;0;0;32;0;32,76,100,222,115,200,NONE,0,0,40.5,SHADOWBALL;false;22,SLUDGEWAVE;false;16,DESTINYBOND;false;8,FOCUSBLAST;false;8,false,GHOST,0,true=NONE,1,NORMAL,TYPELESS,NORMAL,TYPELESS,0,100,NONE,NONE,NONE,SERIOUS,11;11;11;11;11;11,100,100,100,100,100,NONE,0,0,0,NONE;true;0,NONE;true;0,NONE;true;0,NONE;true;0,true,TYPELESS,0,false=NONE,1,NORMAL,TYPELESS,NORMAL,TYPELESS,0,100,NONE,NONE,NONE,SERIOUS,11;11;11;11;11;11,100,100,100,100,100,NONE,0,0,0,NONE;true;0,NONE;true;0,NONE;true;0,NONE;true;0,true,TYPELESS,0,false=NONE,1,NORMAL,TYPELESS,NORMAL,TYPELESS,0,100,NONE,NONE,NONE,SERIOUS,11;11;11;11;11;11,100,100,100,100,100,NONE,0,0,0,NONE;true;0,NONE;true;0,NONE;true;0,NONE;true;0,true,TYPELESS,0,false=NONE,1,NORMAL,TYPELESS,NORMAL,TYPELESS,0,100,NONE,NONE,NONE,SERIOUS,11;11;11;11;11;11,100,100,100,100,100,NONE,0,0,0,NONE;true;0,NONE;true;0,NONE;true;0,NONE;true;0,true,TYPELESS,0,false=NONE,1,NORMAL,TYPELESS,NORMAL,TYPELESS,0,100,NONE,NONE,NONE,SERIOUS,11;11;11;11;11;11,100,100,100,100,100,NONE,0,0,0,NONE;true;0,NONE;true;0,NONE;true;0,NONE;true;0,true,TYPELESS,0,false=0=0;0;0;0;0;0;0;0;0;0;0;0;0;1;0;0;0;0;0==0;0;0;0;0;0=0=0=0=0=0=0=0=0=0=0=0=0=false=NONE=false=false=false=move:0=false=true/SAND;5/NONE;0/false;0/false

Current Output

simulate_turn:
  side_one_move=earthquake
  side_two_move=destinybond
  branches=1
  damage_side_one_taken=100.00%:100.00%
  damage_side_two_taken=44.53%:100.00%
  ko_probability_side_one=100.00%
  ko_probability_side_two=100.00%

search_time_ms=5000
total_visits=10000000
best=yawn
best_visits=7699737
best_avg_score=0.765100
policy:
  yawn: visits=7699737 pct=77.00 avg_score=0.765100
  slackoff: visits=1160141 pct=11.60 avg_score=0.761873
  earthquake: visits=1136279 pct=11.36 avg_score=0.761818
  stealthrock: visits=3843 pct=0.04 avg_score=0.675533

Expected Behavior

When GENGARMEGA uses DESTINYBOND and HIPPOWDON KOs it with EARTHQUAKE, causing both final Pokemon to faint, side two should lose because side two was the Destiny Bond user. Therefore this branch should be evaluated as a side-one win.

Actual Behavior

The engine treats the final mutual KO as an ordinary both-sides-fainted state. It appears to lack cause-aware tiebreak logic for Destiny Bond, so this branch is not scored as a side-one win.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions