diff options
Diffstat (limited to 'src/tracker_state.cpp')
-rw-r--r-- | src/tracker_state.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/tracker_state.cpp b/src/tracker_state.cpp index 37a7da8..b0e7ccc 100644 --- a/src/tracker_state.cpp +++ b/src/tracker_state.cpp | |||
@@ -45,6 +45,25 @@ bool IsPanelReachable_Helper(int panel_id, | |||
45 | return (achievements_accessible >= AP_GetMasteryRequirement()); | 45 | return (achievements_accessible >= AP_GetMasteryRequirement()); |
46 | } | 46 | } |
47 | 47 | ||
48 | if (panel_obj.name == "LEVEL 2" && AP_GetVictoryCondition() == kLEVEL_2) { | ||
49 | int counting_panels_accessible = 0; | ||
50 | |||
51 | for (int reachable_room : reachable_rooms) { | ||
52 | const Room& room = GD_GetRoom(reachable_room); | ||
53 | |||
54 | for (int roomed_panel_id : room.panels) { | ||
55 | const Panel& roomed_panel = GD_GetPanel(roomed_panel_id); | ||
56 | |||
57 | if (!roomed_panel.non_counting && | ||
58 | IsPanelReachable_Helper(roomed_panel_id, reachable_rooms)) { | ||
59 | counting_panels_accessible++; | ||
60 | } | ||
61 | } | ||
62 | } | ||
63 | |||
64 | return (counting_panels_accessible >= AP_GetLevel2Requirement()); | ||
65 | } | ||
66 | |||
48 | for (int room_id : panel_obj.required_rooms) { | 67 | for (int room_id : panel_obj.required_rooms) { |
49 | if (!reachable_rooms.count(room_id)) { | 68 | if (!reachable_rooms.count(room_id)) { |
50 | return false; | 69 | return false; |
@@ -57,6 +76,12 @@ bool IsPanelReachable_Helper(int panel_id, | |||
57 | } | 76 | } |
58 | } | 77 | } |
59 | 78 | ||
79 | for (int panel_id : panel_obj.required_panels) { | ||
80 | if (!IsPanelReachable_Helper(panel_id, reachable_rooms)) { | ||
81 | return false; | ||
82 | } | ||
83 | } | ||
84 | |||
60 | if (AP_IsColorShuffle()) { | 85 | if (AP_IsColorShuffle()) { |
61 | for (LingoColor color : panel_obj.colors) { | 86 | for (LingoColor color : panel_obj.colors) { |
62 | if (!AP_HasColorItem(color)) { | 87 | if (!AP_HasColorItem(color)) { |