File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,16 +17,17 @@ onPage('Crafting', function craftMax() {
1717 }
1818
1919 function checkCard ( el ) {
20+ const card = $ ( el ) ;
21+ card . off ( 'hover' ) ;
2022 if ( settings . value ( 'underscript.disable.craftMax' ) ) return ;
2123 const rarity = cardHelper . rarity ( el ) ;
22- const max = cardHelper . craft . max ( rarity ) ;
2324 if ( rarity === 'DETERMINATION' ) return ;
25+ const max = cardHelper . craft . max ( rarity ) ;
2426 const limit = max - cardHelper . craft . quantity ( el ) ;
2527 if ( limit <= 0 ) return ;
2628 const cost = cardHelper . craft . cost ( el ) ;
2729 const total = cardHelper . craft . totalDust ( ) ;
2830 if ( cost > total ) return ;
29- const card = $ ( el ) ;
3031 card . hover ( hover . show ( `CTRL Click: Craft up to max(${ max } )` ) )
3132 . off ( 'click' )
3233 . on ( 'click.script' , ( e ) => {
@@ -51,6 +52,7 @@ onPage('Crafting', function craftMax() {
5152 craft ( id , shiny ) ;
5253 } while ( -- count && total >= cost ) ; // eslint-disable-line no-plusplus
5354 sleep ( 1000 ) . then ( ( ) => { // Wait a second before allowing crafting again
55+ calculate ( ) ; // Re-calculate after crafting
5456 crafting = false ;
5557 } ) ;
5658 }
You can’t perform that action at this time.
0 commit comments