Skip to content
This repository has been archived by the owner on May 22, 2022. It is now read-only.

Commit

Permalink
clan-battle boss level 5
Browse files Browse the repository at this point in the history
  • Loading branch information
yuudi committed Dec 23, 2020
1 parent e8bc593 commit b66df7c
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion scripts/yobot-gocqhttp-auto.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ else
curl -fsSL "https://get.docker.com" | sh
fi

docker network create qqbot
docker network create qqbot || true
docker pull pcrbot/gocqhttp:0.9.29-fix2
docker pull yobot/yobot:slim

Expand Down
4 changes: 2 additions & 2 deletions src/client/public/static/admin/setting.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ var vm = new Vue({
});
},
switch_levels: function (area) {
if (this.setting.boss[area].length <= 3) {
if (this.setting.boss[area].length < 5) {
this.setting.boss[area].push([0, 0, 0, 0, 0]);
} else {
this.setting.boss[area].pop();
this.setting.boss[area] = this.setting.boss[area].slice(0, -2);
}
},
comfirm_change_clan_mode: function (event) {
Expand Down
2 changes: 1 addition & 1 deletion src/client/public/template/admin/setting.html
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ <h4>[[ {jp:"日服",tw:"台服",cn:"国服",eff:"得分系数"}[area] ]]</h4>
</tr>
</table><button @click="switch_levels(area)">切换阶段数</button>
</div>
<div class="comment">备注:<br>1阶段:1~3周目<br>2阶段:4~10周目<br>3阶段:11~34周目<br>4阶段:35以上</div>
<div class="comment">备注:<br>1阶段:1~3周目<br>2阶段:4~10周目<br>3阶段:11~34周目<br>4阶段:35~44周目<br>5阶段:45以上</div>
</div>
</el-collapse-item>
</el-collapse>
Expand Down
20 changes: 10 additions & 10 deletions src/client/ybplugins/clan_battle/battle.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,17 +112,17 @@ def __init__(self,
User.qqid.in_(self.setting['super-admin'])
).execute()

def _level_by_cycle(self, cycle, *, level_4=None, game_server=None):
def _level_by_cycle(self, cycle, *, game_server=None):
if cycle <= 3:
return 0
elif cycle <= 10:
return 1
else:
if level_4 is None:
level_4 = (len(self.setting['boss'][game_server]) == 4)
if level_4 and cycle >= 35:
return 3
return 2
return 0 # 1~3 周目:一阶段
if cycle <= 10:
return 1 # 4~10 周目:二阶段
server_total = len(self.setting['boss'][game_server])
if cycle <= 34 or server_total <= 3:
return 2 # 11~34 周目:三阶段
if cycle <= 44 or server_total <= 4:
return 3 # 35~44 周目:四阶段
return 4 # 45~ 周目:五阶段

@timed_cached_func(128, 3600, ignore_self=True)
def _get_nickname_by_qqid(self, qqid) -> Union[str, None]:
Expand Down
4 changes: 2 additions & 2 deletions src/client/yobot.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@


class Yobot:
Version = "[v3.6.7]"
Version_id = 218
Version = "[v3.6.8]"
Version_id = 225
# "git rev-list --count HEAD"

def __init__(self, *,
Expand Down

0 comments on commit b66df7c

Please sign in to comment.