@@ -33,7 +33,7 @@ public EncounterBot7B(PokeBotState cfg, PokeBotHub<PK8> hub) : base(cfg)
33
33
public override async Task MainLoop ( CancellationToken token )
34
34
{
35
35
Log ( "Identifying trainer data of the host console." ) ;
36
- var sav = await IdentifyTrainer ( token ) . ConfigureAwait ( false ) ;
36
+ await IdentifyTrainer ( token ) . ConfigureAwait ( false ) ;
37
37
await InitializeHardware ( Settings , token ) . ConfigureAwait ( false ) ;
38
38
39
39
try
@@ -65,13 +65,23 @@ private async Task DoLiveStatsChecking(CancellationToken token)
65
65
{
66
66
while ( ! token . IsCancellationRequested )
67
67
{
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 ) )
69
71
{
70
72
await EnableNatureTeller ( token ) . ConfigureAwait ( false ) ;
71
73
await EditWildNature ( Settings . SetFortuneTellerNature , token ) . ConfigureAwait ( false ) ;
72
74
Log ( $ "Fortune Teller enabled, Nature set to { await ReadWildNature ( token ) . ConfigureAwait ( false ) } .") ;
73
75
}
74
76
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
+
75
85
while ( await IsInCatchScreen ( token ) . ConfigureAwait ( false ) || await IsGiftFound ( token ) . ConfigureAwait ( false ) || await IsInBattle ( token ) . ConfigureAwait ( false ) || await IsInTrade ( token ) . ConfigureAwait ( false ) )
76
86
await Task . Delay ( 1_000 , token ) . ConfigureAwait ( false ) ;
77
87
0 commit comments