In[]:=
replay=Import["https://replay.pokemonshowdown.com/gen9doublesou-2096211586.log","Lines"]
Out[]=
{|uhtml|medal-msg|<div class="broadcast-blue">Curious what those medals under the avatar are? PS now has Ladder Seasons! For more information, check out the <a href="https://www.smogon.com/forums/threads/3740067/">thread on Smogon.</a></div>,
⋯177⋯
,|win|emulover9000}
Full expression not available
(
original memory size:
11.7 kB)
In[]:=
SequenceSplit[replay[[3;;]],{"|t:|"~~_}]
Out[]=
|j|☆mrvroomfish,|j|☆emulover9000,|t:|1712268741,|gametype|doubles,|player|p1|mrvroomfish|170|,|player|p2|emulover9000|unknown|,|teamsize|p1|3,|teamsize|p2|3,|gen|9,|tier|[Gen 9] Doubles OU,|rule|Species Clause: Limit one of each Pokémon,|rule|OHKO Clause: OHKO moves are banned,|rule|Evasion Moves Clause: Evasion moves are banned,|rule|Gravity Sleep Clause: The combination of sleep-inducing moves with imperfect accuracy and Gravity or Gigantamax Orbeetle are banned,|rule|Endless Battle Clause: Forcing endless battles is banned,|rule|HP Percentage Mod: HP is shown in percentages,|clearpoke,|poke|p1|Carbink|,|poke|p1|Ambipom, M|,|poke|p1|Torracat, M|,|poke|p2|Rillaboom, F|,|poke|p2|Hawlucha, M|,|poke|p2|Comfey, F|,|teampreview,|,|t:|1712268747,|start,|switch|p1a: Torracat|Torracat, M|100/100,|switch|p1b: Carbink|Carbink|100/100,|switch|p2a: Rillaboom|Rillaboom, F|100/100,|switch|p2b: Hawlucha|Hawlucha, M|100/100,|-ability|p1a: Torracat|Intimidate|boost,|-unboost|p2a: Rillaboom|atk|1,|-unboost|p2b: Hawlucha|atk|1,|turn|1,|,|t:|1712268779,|move|p1a: Torracat|Fake Out|p2a: Rillaboom,|-damage|p2a: Rillaboom|93/100,|cant|p2a: Rillaboom|flinch,|move|p2b: Hawlucha|Swords Dance|p2b: Hawlucha,|-boost|p2b: Hawlucha|atk|2,|move|p1b: Carbink|Moonblast|p2b: Hawlucha,|-supereffective|p2b: Hawlucha,|-crit|p2b: Hawlucha,|-damage|p2b: Hawlucha|12/100,|-unboost|p2b: Hawlucha|spa|1,|,|upkeep,|turn|2,|,|t:|1712268794,|move|p2b: Hawlucha|Protect|p2b: Hawlucha,|-singleturn|p2b: Hawlucha|Protect,|move|p1a: Torracat|Parting Shot|p2b: Hawlucha,|-activate|p2b: Hawlucha|move: Protect,|move|p2a: Rillaboom|U-turn|p1a: Torracat,|-resisted|p1a: Torracat,|-damage|p1a: Torracat|83/100,|,|t:|1712268801,|switch|p2a: Comfey|Comfey, F|100/100|[from] U-turn,|move|p1b: Carbink|Moonblast|p2a: Comfey,|-damage|p2a: Comfey|81/100,|-unboost|p2a: Comfey|spa|1,|,|upkeep,|turn|3,|,|t:|1712268820,|move|p2a: Comfey|Floral Healing|p2b: Hawlucha,|-heal|p2b: Hawlucha|62/100,|move|p2b: Hawlucha|Drain Punch|p1b: Carbink,|-damage|p1b: Carbink|49/100,|-heal|p2b: Hawlucha|81/100|[from] drain|[of] p1b: Carbink,|move|p1a: Torracat|Parting Shot|p2a: Comfey,|-unboost|p2a: Comfey|atk|1,|-unboost|p2a: Comfey|spa|1,|,|t:|1712268830,|switch|p1a: Ambipom|Ambipom, M|100/100|[from] Parting Shot,|move|p1b: Carbink|Moonblast|p2b: Hawlucha,|-supereffective|p2b: Hawlucha,|-damage|p2b: Hawlucha|26/100,|,|-heal|p1b: Carbink|55/100|[from] item: Leftovers,|upkeep,|turn|4,|,|t:|1712268843,|-terastallize|p2b: Hawlucha|Steel,|move|p2a: Comfey|Floral Healing|p2b: Hawlucha,|-heal|p2b: Hawlucha|76/100,|move|p2b: Hawlucha|Drain Punch|p1a: Ambipom,|-supereffective|p1a: Ambipom,|-damage|p1a: Ambipom|0 fnt,|-heal|p2b: Hawlucha|100/100|[from] drain|[of] p1a: Ambipom,|faint|p1a: Ambipom,|move|p1b: Carbink|Moonblast|p2a: Comfey,|-damage|p2a: Comfey|61/100,|,|-heal|p1b: Carbink|61/100|[from] item: Leftovers,|upkeep,|,|t:|1712268850,|switch|p1a: Torracat|Torracat, M|83/100,|-ability|p1a: Torracat|Intimidate|boost,|-unboost|p2a: Comfey|atk|1,|-unboost|p2b: Hawlucha|atk|1,|turn|5,|,|t:|1712268865,|switch|p2b: Rillaboom|Rillaboom, F|93/100,|move|p1a: Torracat|Fake Out|p2a: Comfey,|-damage|p2a: Comfey|52/100,|cant|p2a: Comfey|flinch,|move|p1b: Carbink|Moonblast|p2b: Rillaboom,|-damage|p2b: Rillaboom|80/100,|-unboost|p2b: Rillaboom|spa|1,|,|-heal|p1b: Carbink|68/100|[from] item: Leftovers,|upkeep,|turn|6,|,|t:|1712268881,|move|p2a: Comfey|Taunt|p1a: Torracat,|-start|p1a: Torracat|move: Taunt,|cant|p1a: Torracat|move: Taunt|Parting Shot,|move|p2b: Rillaboom|Wood Hammer|p1b: Carbink,|-supereffective|p1b: Carbink,|-damage|p1b: Carbink|0 fnt,|faint|p1b: Carbink,|-damage|p2b: Rillaboom|66/100|[from] Recoil,|,|upkeep,|turn|7,|,|t:|1712268898,|move|p2a: Comfey|Floral Healing|p2b: Rillaboom,|-heal|p2b: Rillaboom|100/100,|move|p1a: Torracat|Fake Out||[still],|-hint|Fake Out only works on your first turn out.,|-fail|p1a: Torracat,|move|p2b: Rillaboom|Knock Off|p1a: Torracat,|-damage|p1a: Torracat|35/100,|,|upkeep,|turn|8,|,|t:|1712268912,|move|p1a: Torracat|Fake Out||[still],|-hint|Fake Out only works on your first turn out.,|-fail|p1a: Torracat,|move|p2a: Comfey|Tailwind|p2a: Comfey,|-sidestart|p2: emulover9000|move: Tailwind,|move|p2b: Rillaboom|U-turn|p1a: Torracat,|-resisted|p1a: Torracat,|-damage|p1a: Torracat|7/100,|,|t:|1712268919,|switch|p2b: Hawlucha|Hawlucha, M, tera:Steel|100/100|[from] U-turn,|,|-end|p1a: Torracat|move: Taunt,|upkeep,|turn|9,|,|t:|1712268930,|move|p2a: Comfey|Protect|p2a: Comfey,|-singleturn|p2a: Comfey|Protect,|move|p1a: Torracat|Fake Out||[still],|-hint|Fake Out only works on your first turn out.,|-fail|p1a: Torracat,|move|p2b: Hawlucha|Acrobatics|p1a: Torracat,|-damage|p1a: Torracat|0 fnt,|faint|p1a: Torracat,|,|win|emulover9000
​
In[]:=
{"|move|p2b: Hawlucha|Protect|p2b: Hawlucha","|-singleturn|p2b: Hawlucha|Protect","|move|p1a: Torracat|Parting Shot|p2b: Hawlucha","|-activate|p2b: Hawlucha|move: Protect","|move|p2a: Rillaboom|U-turn|p1a: Torracat","|-resisted|p1a: Torracat","|-damage|p1a: Torracat|83/100"}//TableForm
Out[]//TableForm=
|move|p2b: Hawlucha|Protect|p2b: Hawlucha
|-singleturn|p2b: Hawlucha|Protect
|move|p1a: Torracat|Parting Shot|p2b: Hawlucha
|-activate|p2b: Hawlucha|move: Protect
|move|p2a: Rillaboom|U-turn|p1a: Torracat
|-resisted|p1a: Torracat
|-damage|p1a: Torracat|83/100
(*actionleadstoeffect​​" User = hawluchaAction = protectTarget = hawlucha"​​effect​​" Target = hawluchaActiontype = protectresult = "*)
In[]:=
{Ot1,Ot2,OsA,OpA}={Ghost,Fairy,135,55};​​{Yt1,Yt2,YsD,YpD}={Fighting,Water,60,100};
In[]:=
Cases[matchup,{Ot1,___}]
Out[]=
{{Ghost,1,0.5,1,1,1,1,1,1,2,1,1,1,0,1,2,1,1,1}}
tot=Table[matchup[[Position[matchup,a][[1,2]],Position[matchup,b][[2,1]]]],{a,{Ot1,Ot2}},{b,{Yt1,Yt2}}];​​Max[tot](N@Total[tot,2]/)/5
Out[]=
0.5
In[]:=
Position[matchup,Yt1][[2,1]]
Out[]=
7
In[]:=
Max[{(Max[Times@@Transpose@tot]3+(Total[Times@@Transpose@tot]/2))/4,avgdef}]
Out[]=
15
8
​
​
Out[]=
{Fairy,1,2,2,1,1,2,0.5,1,1,1,1,1,1,0.5,1,1,0.5,1}
​
In[]:=
IdentityMatrix[2]
Out[]=
{{1,0},{0,1}}
In[]:=
avgdef=evtA[[{Position[matchup,Ot1][[2,1]]-1},-1,2]][[1]]evtA[[{Position[matchup,Ot2][[2,1]]-1},-1,2]][[1]]evtD[[{Position[matchup,Yt1][[1,2]]-1},-1,2]][[1]]evtD[[{Position[matchup,Yt2][[1,2]]-1},-1,2]][[1]]
Out[]=
1.04104
In[]:=
evtD[[{Position[matchup,Ot1][[1,2]]-1},-1,2]][[1]]evtD[[{Position[matchup,Ot2][[1,2]]-1},-1,2]][[1]]
Out[]=
0.784728
N@
1
4
2
OsA
OsA+OpA
YsD
+
1
4
2
OpA
OsA+OpA
YpD
Out[]=
1336.
In[]:=
N@
2
2
OpA
OsA+OpA
YpD
Out[]=
0.0033518
In[]:=
N[{OpA/YpD,OsA/YsD}]
Out[]=
{0.55,2.25}
In[]:=
OA:=OpA+OsA;​​YD:=YpD+YsD;
In[]:=
(
2
(OpA/OA)
OpA+
2
(OsA/OA)
OsA)//N
Out[]=
72.7632
In[]:=
2
(OsA/OA)
OsA//N
Out[]=
68.1544
In[]:=
OpA
Out[]=
55
In[]:=
N[Mean[{
2
OpA
,
2
OsA
}]]