mirror of
https://github.com/thepaperpilot/Super-Auto-Coots.git
synced 2024-11-22 00:21:33 +00:00
Implement removing fainted streamers
This commit is contained in:
parent
d6170f36d8
commit
0eacc77aec
1 changed files with 15 additions and 0 deletions
|
@ -776,6 +776,21 @@ export const main = createLayer("main", function (this: BaseLayer) {
|
|||
if (battle.value == null) {
|
||||
throw "Preparing move while not in battle";
|
||||
}
|
||||
if (
|
||||
queue.value.length === 0 &&
|
||||
(battle.value.streamers.find(m => m.relevancy <= 0 || m.presence <= 0) ||
|
||||
battle.value.enemyStreamers.find(m => m.relevancy <= 0 || m.presence <= 0))
|
||||
) {
|
||||
battle.value.streamers = battle.value.streamers.filter(
|
||||
m => m.relevancy > 0 && m.presence > 0
|
||||
);
|
||||
battle.value.enemyStreamers = battle.value.enemyStreamers.filter(
|
||||
m => m.relevancy > 0 && m.presence > 0
|
||||
);
|
||||
playClicked.value = false;
|
||||
setTimeout(prepareMove, settings.fast ? 750 : 1250);
|
||||
return;
|
||||
}
|
||||
if (
|
||||
queue.value.length === 0 &&
|
||||
battle.value.team.length === 0 &&
|
||||
|
|
Loading…
Reference in a new issue