Signed-off-by: szdytom <szdytom@qq.com>
This commit is contained in:
方而静 2023-08-28 17:00:09 +08:00
parent be70ec3d2b
commit 18c202e469
Signed by: szTom
GPG Key ID: 072D999D60C6473C
2 changed files with 9 additions and 5 deletions

View File

@ -101,18 +101,18 @@ endGameTitle(p, m, s) -> (
);
endTimeout(iv) -> (
endCleanup();
endGameTitle(getPigPlayers(), 'Timeout!'
, str('You didn\'t complete %d goals in time.', iv));
endGameTitle(getWolfPlayers(), 'You won!'
, str('Those fools have failed, good job.', iv));
endCleanup();
);
endFinish() -> (
endCleanup();
endGameTitle(getPigPlayers(), 'Congratulations!', 'You have completed all the goals.');
endGameTitle(getWolfPlayers(), 'Oh no!'
, str('They have completed all the goals.', iv));
endCleanup();
);
getFirstUnsetGoal() -> (
@ -142,7 +142,11 @@ warnDeadline(dt) -> (
);
electionKill(pname) -> (
modify(player(pname), 'kill');
p = player(pname);
if(p != null, (
modify(p, 'tag', 'ica.deceased');
modify(p, 'gamemode', 'spectator');
));
print(player('all'), str('Election victim %s killed.', pname))
);

View File

@ -30,11 +30,11 @@ cmdInfo() -> (
for(cand_names, (
p = player(_);
v_cnt = countVotes(_);
print(str(' - %02d vote%s %s%s', v_cnt, if(v_cnt > 1, 's', ' ')
print(str(' - [%02d vote%s] %s%s', v_cnt, if(v_cnt > 1, 's', ' ')
, _, if(query(p, 'has_scoreboard_tag', 'ica.deceased'), ' [deceased]', '')));
));
abv_cnt = countAbstainVotes();
print(' - %02d vote%s (abstain)', abv_cnt, if(abv_cnt > 1, 's', ' '));
print(str(' - [%2d vote%s] (abstain)', abv_cnt, if(abv_cnt > 1, 's', ' ')));
max_p = findVoteMax();
print(str('Current elected: %s', if(max_p == null, '(nobody)', max_p)));