@@ -33,7 +33,7 @@ public EncounterBot7B(PokeBotState cfg, PokeBotHub<PK8> hub) : base(cfg)
3333 public override async Task MainLoop ( CancellationToken token )
3434 {
3535 Log ( "Identifying trainer data of the host console." ) ;
36- var sav = await IdentifyTrainer ( token ) . ConfigureAwait ( false ) ;
36+ await IdentifyTrainer ( token ) . ConfigureAwait ( false ) ;
3737 await InitializeHardware ( Settings , token ) . ConfigureAwait ( false ) ;
3838
3939 try
@@ -65,13 +65,23 @@ private async Task DoLiveStatsChecking(CancellationToken token)
6565 {
6666 while ( ! token . IsCancellationRequested )
6767 {
68- if ( Settings . SetFortuneTellerNature is not Nature . Random && ! await IsNatureTellerEnabled ( token ) . ConfigureAwait ( false ) )
68+ //Force the Fortune Teller Nature value, value is reset at the end of the day
69+ if ( Settings . SetFortuneTellerNature != Nature . Random &&
70+ ( ! await IsNatureTellerEnabled ( token ) . ConfigureAwait ( false ) || await ReadWildNature ( token ) . ConfigureAwait ( false ) != Settings . SetFortuneTellerNature ) )
6971 {
7072 await EnableNatureTeller ( token ) . ConfigureAwait ( false ) ;
7173 await EditWildNature ( Settings . SetFortuneTellerNature , token ) . ConfigureAwait ( false ) ;
7274 Log ( $ "Fortune Teller enabled, Nature set to { await ReadWildNature ( token ) . ConfigureAwait ( false ) } .") ;
7375 }
7476
77+ //Check Lure Type
78+ if ( await ReadLureType ( token ) . ConfigureAwait ( false ) != Settings . SetLure )
79+ await EditLureType ( ( uint ) Settings . SetLure , token ) . ConfigureAwait ( false ) ;
80+
81+ //Check Lure Steps
82+ if ( Settings . SetLure != Lure . None && await ReadLureCounter ( token ) . ConfigureAwait ( false ) < 20 )
83+ await EditLureCounter ( 100 , token ) . ConfigureAwait ( false ) ;
84+
7585 while ( await IsInCatchScreen ( token ) . ConfigureAwait ( false ) || await IsGiftFound ( token ) . ConfigureAwait ( false ) || await IsInBattle ( token ) . ConfigureAwait ( false ) || await IsInTrade ( token ) . ConfigureAwait ( false ) )
7686 await Task . Delay ( 1_000 , token ) . ConfigureAwait ( false ) ;
7787
0 commit comments