# Plan 6 Task 5 (the blackout rule): the host's side WINS, but the partner's three battle Pokemon are all down (their HP is poked to 0 in the
# battle party on the partner's core, slots 3-5). The partner has two set-aside Pokemon that can fight (the copies at slots 3 and 4 before
# the battle, HP 999), so the partner does NOT black out: back on the field, paid the prize like the host (+128), no white-out.
#
# want: PASS linkwait 2
# want: PASS linkresultwait
# want: link: result a 16 01 01 02 00 4D 01 3E 01 80 00 00 00 00 00 00 00
# want: link: result b 16 01 01 02 00 4D 01 3E 01 80 00 00 00 00 00 00 00
# want: PASS link money 3128 (mark 3000 + 128)
pair $PARTNER_SAVE
on b
@boot
poke16 0x02024542 999
poke16 0x02024544 999
memcopy 0x020244EC 0x02024618 100
memcopy 0x020244EC 0x0202467C 100
reown 0x02024618 0x1111AAAA
reown 0x0202467C 0x2222BBBB
poke8 0x020244E9 5
on a
poke16 0x02024542 999
poke16 0x02024544 999
linkmoneymark 0
coopbegin 1 2 333 318
on b
linkmoneymark 0
coopbegin 0 2 333 318
linkwait 2 1500
on a
waitmem32 0x03005D60 0x08057589 3000
on b
waitmem32 0x03005D68 0x08057589 3000
poke16 0x0202466E 0
poke16 0x020246D2 0
poke16 0x02024736 0
on a
poke8 0x0202433A 1
hold A 4
linkrun 40
hold A 4
linkrun 40
hold A 4
linkrun 40
on b
hold A 4
linkrun 40
hold A 4
linkrun 40
hold A 4
linkrun 40
linkresultwait 5000
on a
linkresult a
linkmoneyexpect 0 128
coopexpectfree 1
on b
linkresult b
expect8 0x020244E9 5
linkmoneyexpect 0 128
linkflag 333 1
linkflag 318 1
coopexpectfree 1
