decrement,
hasDungeonBoss,
increment,
+ isDungeonCleared,
toggleBoolean,
unclearAll,
} from '../../helpers/tracker';
const cleared = state[`${dungeon.id}-checks`] || 0;
const total = definition.items;
let status = 'available';
- if (cleared === total) {
- if (['ct', 'gt'].includes(dungeon.id)) {
- if (hasDungeonBoss(state, dungeon)) {
- status = 'cleared';
- }
- } else {
- status = 'cleared';
- }
+ if (isDungeonCleared(state, definition)) {
+ status = 'cleared';
}
return {
...dungeon,