Implement removing fainted streamers

This commit is contained in:
thepaperpilot 2023-02-25 18:39:15 -06:00
parent d6170f36d8
commit 0eacc77aec

View file

@ -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 &&