File size: 1,499 Bytes
463f868
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
import json

db = json.load(open("data/cards_compiled.json", "r", encoding="utf-8"))

# From game trace Turn 40:
stage_ids = ["53", "238", "91"]
live_ids = ["10023", "10011", "10023"]

print("=== STAGE HEARTS ===")
total = [0] * 7
for cid in stage_ids:
    m = db["member_db"].get(cid)
    if m:
        print(f"{cid}: {m['name']} Hearts={m['hearts']}")
        for i in range(7):
            total[i] += m["hearts"][i]
print(f"TOTAL STAGE HEARTS: {total}")

print("\n=== LIVE REQUIREMENTS ===")
combined = [0] * 7
for cid in live_ids:
    l = db["live_db"].get(cid)
    if l:
        print(f"{cid}: {l['name']} Req={l['required_hearts']}")
        for i in range(7):
            combined[i] += l["required_hearts"][i]
print(f"COMBINED LIVE REQ: {combined}")

print("\n=== CAN CLEAR? ===")
surplus = 0
for i in range(6):
    diff = total[i] - combined[i]
    if diff >= 0:
        surplus += diff
        print(f"Color {i}: Have {total[i]}, Need {combined[i]} -> OK (surplus {diff})")
    else:
        print(f"Color {i}: Have {total[i]}, Need {combined[i]} -> MISSING {abs(diff)}")

any_need = combined[6]
wildcards = total[6]
print(f"\nANY (STAR): Need {any_need}, Have Wildcards {wildcards}, Surplus from colors {surplus}")
print(f"Total available for ANY: {wildcards + surplus}")
if wildcards + surplus >= any_need:
    print("RESULT: CAN CLEAR ALL LIVES")
else:
    print(f"RESULT: CANNOT CLEAR - missing {any_need - wildcards - surplus} for ANY")