Commit ec5fc11b authored by nanahira's avatar nanahira

add spell&trap dialogues

parent 28a64df3
......@@ -1433,9 +1433,9 @@ ygopro.stoc_follow 'GAME_MSG', false, (buffer, info, client, server)->
#登场台词
if settings.modules.dialogues.enabled
if ygopro.constants.MSG[msg] == 'SUMMONING' or ygopro.constants.MSG[msg] == 'SPSUMMONING'
if ygopro.constants.MSG[msg] == 'SUMMONING' or ygopro.constants.MSG[msg] == 'SPSUMMONING' or ygopro.constants.MSG[msg] == 'CHAINING'
card = buffer.readUInt32LE(1)
if dialogues.dialogues[card]
if dialogues.dialogues[card] and (ygopro.constants.MSG[msg] != 'CHAINING' or (buffer.readUInt8(4) & 0x8) != 0)
for line in _.lines dialogues.dialogues[card][Math.floor(Math.random() * dialogues.dialogues[card].length)]
ygopro.stoc_send_chat(client, line, ygopro.constants.COLORS.PINK)
return
......
......@@ -1738,9 +1738,9 @@
}
}
if (settings.modules.dialogues.enabled) {
if (ygopro.constants.MSG[msg] === 'SUMMONING' || ygopro.constants.MSG[msg] === 'SPSUMMONING') {
if (ygopro.constants.MSG[msg] === 'SUMMONING' || ygopro.constants.MSG[msg] === 'SPSUMMONING' || ygopro.constants.MSG[msg] === 'CHAINING') {
card = buffer.readUInt32LE(1);
if (dialogues.dialogues[card]) {
if (dialogues.dialogues[card] && (ygopro.constants.MSG[msg] !== 'CHAINING' || (buffer.readUInt8(4) & 0x8) !== 0)) {
ref2 = _.lines(dialogues.dialogues[card][Math.floor(Math.random() * dialogues.dialogues[card].length)]);
for (j = 0, len = ref2.length; j < len; j++) {
line = ref2[j];
......
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