Commit 72665f32 authored by nanahira's avatar nanahira

handle score for match kill

parent 693ccfff
......@@ -2376,12 +2376,18 @@ ygopro.stoc_follow 'GAME_MSG', true, (buffer, info, client, server, datas)->
room.winner_name = room.dueling_players[pos].name_vpass
#log.info room.dueling_players, pos
room.scores[room.winner_name] = room.scores[room.winner_name] + 1
if room.match_kill
room.match_kill = false
room.scores[room.winner_name] = 99
if room.death
if settings.modules.http.quick_death_rule == 1 or settings.modules.http.quick_death_rule == 3
room.death = -1
else
room.death = 5
if ygopro.constants.MSG[msg] == 'MATCH_KILL' and client.pos == 0
room.match_kill = true
#lp跟踪
if ygopro.constants.MSG[msg] == 'DAMAGE' and client.pos == 0
pos = buffer.readUInt8(1)
......
......@@ -2926,6 +2926,10 @@
if (room && !room.finished && room.dueling_players[pos]) {
room.winner_name = room.dueling_players[pos].name_vpass;
room.scores[room.winner_name] = room.scores[room.winner_name] + 1;
if (room.match_kill) {
room.match_kill = false;
room.scores[room.winner_name] = 99;
}
}
if (room.death) {
if (settings.modules.http.quick_death_rule === 1 || settings.modules.http.quick_death_rule === 3) {
......@@ -2935,6 +2939,9 @@
}
}
}
if (ygopro.constants.MSG[msg] === 'MATCH_KILL' && client.pos === 0) {
room.match_kill = true;
}
if (ygopro.constants.MSG[msg] === 'DAMAGE' && client.pos === 0) {
pos = buffer.readUInt8(1);
if (!client.is_first) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment