perryhuynh / kcauto

kcauto, the successor to kancolle-auto, a Kantai Collection (Kancolle) bot/automation tool
GNU General Public License v3.0
68 stars 23 forks source link

Switcher siesn't update switch criteria for each ship slot #446

Open kl3kka5 opened 4 years ago

kl3kka5 commented 4 years ago

Issue variability

The issue is consistent. In fact it happens every time.

Issue

I am trying to set up switcher for sparkling specific ships used in expeditions. So I use only Slot 1 and Slot 2. Slot 1 has the ship to be sparkled and Ship 2 just a random LvL 1 DD to "soak up damage". Thus Slot 1 has "Ship ID" criteria like so: "1": "morale:>:51|ship:313:::::<=:50::,ship:432:::::<=:50::,ship:274:::::<=:50::", Slot 2 has Class criteria as I don't care which DD is used: "2": "damage:>=:3,level:>=:2|class:2:<:3:<:3:::unlocked:not_ringed"

When the time come to switch the Slot 1 ship as it's morale is >50 and thus sparkled, it selects one of the ships (lets say ID:432) and replaces it successfully. At the same time ship in Slot 2 needs to be switched as it almost always damaged. But switches keeps the same criteria as Slot 1 (Ship ID:432) and ends up just swapping the 2 Ships of the fleet.

After that combat module takes overs and goes for a shortie. I don't seem to have set up the criteria wrong so I suppose this is a bug.

Log

[2020-08-27 22:10:28] Starting sortie.                                                                                                                                                                                                  
[2020-08-27 22:10:28] Going to Node A                                                                                                                                                                                               
[2020-08-27 22:10:41] Fleet 1 / No Damage fleet damage / No Fatigue                                                                                                                                                                            
[2020-08-27 22:10:41] Action at Node A                                                                                                                                                                                                  
[2020-08-27 22:11:05] Rescued Yuudachi (#82).                                                                                                                                                                                                  
[2020-08-27 22:11:07] Fleet 1 / No Damage fleet damage / No Fatigue                                                                                                                                                                            
[2020-08-27 22:11:07] Matsukaze (No Damage damage) : Ooshio (No Damage damage)                                                                                                                                                                 
[2020-08-27 22:11:28] Continuing sortie.                                                                                                                                                                                                       
[2020-08-27 22:11:31] Going to Node C                                                                                                                                                                                               
[2020-08-27 22:11:33] Spinning compass.                                                                                                                                                                                                     
[2020-08-27 22:11:46] Fleet 1 / Heavy fleet damage / No Fatigue                                                                                                                                                                                
[2020-08-27 22:11:47] Action at Node C                                                                                                                                                                                                  
[2020-08-27 22:11:47] Dismissing boss dialogue.                                                                                                                                                                                                
[2020-08-27 22:12:23] Entering night battle.                                                                                                                                                                                                   
[2020-08-27 22:12:25] Fleet 1 / Heavy fleet damage / No Fatigue                                                                                                                                                                                
[2020-08-27 22:12:45] Rescued Wakaba (#77).                                                                                                                                                                                                    
[2020-08-27 22:12:48] Fleet 1 / Heavy fleet damage / No Fatigue                                                                                                                                                                                
[2020-08-27 22:12:48] Matsukaze (Scratch damage) : Ooshio (Heavy damage)                                                                                                                                                                       
[2020-08-27 22:13:08] Next sortie at 2020-08-27 22:13:08                                                                                                                                                                                       
[2020-08-27 22:13:08] Finding kancolle.                                                                                                                                                                                                     
[2020-08-27 22:13:11] At home                                                                                                                                                                       
[2020-08-27 22:13:11] Navigating to repair screen.                                                                                                                                                                                             
[2020-08-27 22:13:19] Selecting lvl2 Ooshio (pg1#0).                                                                                                                                                                                           
[2020-08-27 22:13:20] Ship repair time of 0d 0h 5m 30s.                                                                                                                                                                                        
[2020-08-27 22:13:25] Ariake meets switch-in criteria.                                                                                                                                                                                         
[2020-08-27 22:13:25] Ariake meets switch-in criteria.                                                                                                                                                                                         
[2020-08-27 22:13:25] Need to switch ships.                                                                                                                                                                                                    
[2020-08-27 22:13:27] At side menu                                                                                                                                                                                      
[2020-08-27 22:13:27] Going home.                                                                                                                                                                                   
[2020-08-27 22:13:33] At home                                                                                                                                                                       
[2020-08-27 22:13:33] Navigating to fleetcomp screen.                                                                                                                                                                                          
[2020-08-27 22:13:36] Ariake meets switch-in criteria.                                                                                                                                                                                         
[2020-08-27 22:13:36] Ariake meets switch-in criteria.                                                                                                                                                                                         
[2020-08-27 22:13:36] Ariake meets switch-in criteria.                                                                                                                                                                                         
[2020-08-27 22:13:36] Ariake meets switch-in criteria.                                                                                                                                                                                         
[2020-08-27 22:13:36] Switching Matsukaze (#274:474:13191) / DD lvl46 (3208) / H                                                                                                                                                               P:11/12 (0.917:SCRATCH) / F:9/15 / A:7/15 / M:60 (SPARKLED) in Slot 1.                                                                                                                                                                         
[2020-08-27 22:13:40] Selecting lvl27 Ariake (pg15#143).                                                                                                                                                                                       
[2020-08-27 22:13:52] Switching Ooshio (#86:96:15181) / DD lvl2 (9249) / HP:1/16                                                                                                                                                                (0.0625:REPAIRING) / F:9/15 / A:10/20 / M:28 (MEDIUM_FATIGUE) in Slot 2.                                                                                                                                                                      
[2020-08-27 22:13:56] Selecting lvl27 Ariake (pg15#143).                                                                                                                                                                                       
[2020-08-27 22:14:01] Next sortie at 2020-08-27 22:14:01                                                                                                                                                                                       
[2020-08-27 22:14:01] Fleet 1 needs resupply.                                                                                                                                                                                                  
[2020-08-27 22:14:01] Finding kancolle.                                                                                                                                                                                                     
[2020-08-27 22:14:04] At side menu                                                                                                                                                                                      
[2020-08-27 22:14:06] Resupplying Fleet 1.                                                                                                                                                                                                     
[2020-08-27 22:14:12] At side menu                                                                                                                                                                                      
[2020-08-27 22:14:12] Going home.                                  

Config

  "ship_switcher.enabled": true,
  "ship_switcher.slots": {
    "1": "morale:>:51|ship:313:::::<=:50::,ship:432:::::<=:50::,ship:274:::::<=:50::",
    "2": "damage:>=:3,level:>=:2|class:2:<:3:<:3:::unlocked:not_ringed"