diff --git a/character/extra/skill.js b/character/extra/skill.js index b3eb1b383..8f9229c46 100644 --- a/character/extra/skill.js +++ b/character/extra/skill.js @@ -1823,27 +1823,40 @@ const skills = { if (result.bool) { game.broadcastAll( function (moved, player) { - var tags = ["dctuoyu_fengtian", "dctuoyu_qingqu", "dctuoyu_junshan"]; - var cards = []; - for (var i = 0; i < moved.length; i++) { - for (var card of moved[i]) { - cards.unshift(card); - for (var j = 0; j < tags.length; j++) { - if (i == j + 1) { - if (!card.hasGaintag(tags[j] + "_tag")) card.addGaintag(tags[j] + "_tag"); - } else { - if (card.hasGaintag(tags[j] + "_tag")) card.removeGaintag(tags[j] + "_tag"); - } - } - } - } if (player == game.me) { + const cards = moved.flat(1).reverse(); game.addVideo("lose", game.me, [get.cardsInfo(cards), [], [], []]); for (var i = 0; i < cards.length; i++) { cards[i].goto(ui.special); } game.me.directgain(cards, false); } + var tags = ["dctuoyu_fengtian", "dctuoyu_qingqu", "dctuoyu_junshan"]; + var map = {}; + for (var i = 0; i < moved.length; i++) { + for (var card of moved[i]) { + for (var j = 0; j < tags.length; j++) { + const tag = `${tags[j]}_tag`; + if (!map[tag]) map[tag] = [[], []]; + if (i == j + 1) { + map[tag][0].add(card); + if (!card.hasGaintag(tag)) { + card.addGaintag(tag); + } + } else { + if (card.hasGaintag(tag)) { + map[tag][1].add(card); + card.removeGaintag(tag); + } + } + } + } + } + for (const tag in map) { + if (map[tag][0].length) game.addVideo("addGaintag", player, [get.cardsInfo(map[tag][0]), tag]); + if (map[tag][1].length) game.addVideo("removeGaintag", player, [tag, get.cardsInfo(map[tag][1])]); + } + game.addVideo("delay", null, 1); }, result.moved, player diff --git a/character/mobile/voices.js b/character/mobile/voices.js index bef8ec9ff..5234ecfe6 100644 --- a/character/mobile/voices.js +++ b/character/mobile/voices.js @@ -4,24 +4,24 @@ export default { "#mbkuili1": "此犹有转胜之机,吾等切不可自乱。", "#mbkuili2": "不患败战于人,但恐军心已溃啊。", "#mb_sp_guanqiujian:die": "汝不讨篡权逆臣,何杀吾讨贼义军……", - "#mbqianlong1": "朕为天子,岂忍威权而去!", - "#mbqianlong2": "朕行之决矣,正使死有何惧!", + "#mbqianlong1": "朕为天子,岂忍威权日去!", + "#mbqianlong2": "朕行之决矣,正使死又何惧!", "#mbqianlong3": "权臣震主,竟视天子于无物!", "#mbqianlong4": "假以时日,必讨司马一族!", "#mbqianlong5": "若安司马于外,或则皇权可收。", - "#mbqianlong6": "暗恤忠君之士,以待破敌之机。", - "#mbweitong1": "手无实权难卫统,朦胧沉睡,睡去还惊。", + "#mbqianlong6": "暗恤忠君之士,以待破局之机。", + "#mbweitong1": "手无实权难卫统,朦胧成睡,睡去还惊。", "#mb_caomao:die": "纵不成身死,朕亦为太祖子孙,大魏君王……", "#mbkuangli1": "我已受命弑君,汝等还不散去!", "#mbkuangli2": "谁再聚众作乱,我就将其杀之!", "#mbxiongsi1": "既想杀人灭口,那就同归于尽!", "#mbxiongsi2": "贾充!你不仁就别怪我不义!", - "#chengji:die": "汝等要卸磨杀驴吗?额啊……", - "#mbzuoyou1": "陛下亲讨乱臣,臣等安不随护!", + "#chengji:die": "汝等要卸磨杀驴吗?呃啊……", + "#mbzuoyou1": "陛下亲讨乱贼,臣等安不随护!", "#mbzuoyou2": "纵有亡身之险,亦忠陛下一人。", "#mbshishou1": "此乃天子御驾,尔等谁敢近前!", "#mbshishou2": "吾等侍卫在侧,必保陛下无虞!", - "#lizhaojiaobo:die": "陛下!尔等乱臣,安敢弑君,额啊……", + "#lizhaojiaobo:die": "陛下!尔等乱臣,安敢弑君,呃啊……", "#mbxuetu1": "天子依仗在此,逆贼安扰圣驾。", "#mbxuetu2": "末将救驾来迟,还望陛下恕罪。", "#mbweiming1": "诸位东归洛阳,奉愿随驾以护。", @@ -32,7 +32,7 @@ export default { "#shoufa2": "毒蛇恶蝎,奉旨而行!", "#zhoulin1": "本大王承天大法,岂与诸葛亮小计等同!", "#zhoulin2": "料一山野书生,安识我南中御兽之术!", - "#yuxiang": "额啊啊,好大的火光啊!", + "#yuxiang": "呃啊啊,好大的火光啊!", "#muludawang:die": "啊啊,诸葛亮神人降世,吾等难挡天威。", "#guimou1": "不过卒合之师,岂是将军之敌乎?", "#guimou2": "连鸡势不俱栖,依珪计便可一一解离。", diff --git a/character/sp2/voices.js b/character/sp2/voices.js index 053ddf557..f6f24ed25 100644 --- a/character/sp2/voices.js +++ b/character/sp2/voices.js @@ -15,7 +15,7 @@ export default { "#starweilin2": "天下事在我,我今为之,谁敢不从?", "#starzhangrong1": "尔欲行大事,问过吾掌中兵刃否?", "#starzhangrong2": "西凉铁骑曳城,天下高楼可摧!", - "#starhaoshou1": "满朝主公,试吾剑不利否?", + "#starhaoshou1": "满朝诸公,视吾剑不利否?", "#starhaoshou2": "顺我者生,逆我者十死无生!", "#star_dongzhuo:die": "美人迷人眼,溢权昏人智……", "#starcanxi1": "大势散于天下,全宝玺者其谁?", diff --git a/character/tw/voices.js b/character/tw/voices.js index 8abebbd04..b82d207bb 100644 --- a/character/tw/voices.js +++ b/character/tw/voices.js @@ -9,6 +9,11 @@ export default { "#twxiayong1": "一招之差,不足决此战胜负!", "#twxiayong2": "这般身手,也敢来战我?", "#tw_wenchou:die": "黄泉路上,你我兄弟亦不可独行……", + "#twqiaosi1": "身居长位,犹处峭崖之巅。", + "#twqiaosi2": "为长而不得承嗣,岂有善种乎?", + "#twbaizu1": "今袁氏之事,岂独因我?", + "#twbaizu2": "长幼之序不明,何惜操戈以正!", + "#tw_yuantan:die": "咄,儿过我,必使富贵。呃……!", "#twhuajing1": "瞬息之间,已蕴森罗万象之法!", "#twhuajing2": "万般兵器,皆由吾心所化!", "#twtianshou1": "既怀远志,此武可助汝成之!", @@ -246,7 +251,7 @@ export default { "#twfengji1": "蜂趋蚁附,皆为道来。", "#twfengji2": "蜂攒蚁集,皆为道往!", "#twyiju1": "鸱张蚁聚,为从天道!", - "#twyiju2": "黄天之道,苍天之示。", + "#twyiju2": "黄巾之道,苍天之示。", "#twbudao1": "得天之力,从天之道。", "#twbudao2": "黄天大道,泽及苍生。", "#tw_zhangmancheng:die": "天师,曼成尽力了。", diff --git a/noname/game/index.js b/noname/game/index.js index 56ccc0fce..4ed353e5f 100644 --- a/noname/game/index.js +++ b/noname/game/index.js @@ -2988,6 +2988,11 @@ export class Game { player.node["avatar" + map.name.slice(4)].show(); if (goon) delete lib.character[map.to]; }, + changeGroup: function (player, targetGroup) { + if (!player || !targetGroup) return; + player.group = targetGroup; + player.node.name.dataset.nature = get.groupnature(targetGroup); + }, skill: function (player, content) { if (typeof content == "string") { if (lib.skill[content]) lib.skill[content].video(player); @@ -3313,7 +3318,21 @@ export class Game { }, removeGaintag: function (player, content) { if (player && content) { - if (Array.isArray(content)) player.removeGaintag.apply(player, content); + if (Array.isArray(content)) { + const checkMatch = function (l1, l2) { + for (var i = 0; i < l1.length; i++) { + for (var j = 0; j < l2.length; j++) { + if (l2[j].suit == l1[i][0] && l2[j].number == l1[i][1] && l2[j].name == l1[i][2]) { + l2[j].addGaintag(content[0]); + l2.splice(j--, 1); + break; + } + } + } + }; + // player.removeGaintag.apply(player, content); + checkMatch(content[1], player.getCards("h")); + } else player.removeGaintag(content); } else { console.log(player); diff --git a/noname/library/element/content.js b/noname/library/element/content.js index cdba51a66..cb8815137 100644 --- a/noname/library/element/content.js +++ b/noname/library/element/content.js @@ -640,6 +640,7 @@ export const Content = { event.originGroup = player.group; if (!event.group) event.group = player.group; var group = event.group; + game.addVideo("changeGroup", player, group); player.getHistory("custom").push(event); if (event.broadcast !== false) { game.broadcast( @@ -2774,7 +2775,7 @@ export const Content = { if (ui.updateVideoMenu) { ui.updateVideoMenu(); } - _status.videoDuration = 1; + _status.videoDuration = 1 / parseFloat(lib.config.video_default_play_speed.slice(0, -1)); ui.create.system("返回", function () { var mode = localStorage.getItem(lib.configprefix + "playbackmode"); if (mode) { @@ -2787,6 +2788,14 @@ export const Content = { game.playVideo(_status.playback, lib.config.mode); }); ui.create.system("暂停", ui.click.pause, true).id = "pausebutton"; + var atempo = ui.create.system( + "原速", + function () { + _status.videoDuration = 1; + updateDuration(); + }, + true + ); var slow = ui.create.system( "减速", function () { @@ -2804,6 +2813,7 @@ export const Content = { true ); var updateDuration = function () { + atempo.innerHTML = `原速(当前${Math.round(100 / _status.videoDuration) / 100}倍速)`; if (_status.videoDuration > 1) { slow.classList.add("glow"); } else { @@ -2815,6 +2825,7 @@ export const Content = { fast.classList.remove("glow"); } }; + updateDuration(); ui.system.style.display = ""; ui.refresh(ui.system); ui.system.show(); diff --git a/noname/library/index.js b/noname/library/index.js index 392111ffe..55ddbc9c1 100644 --- a/noname/library/index.js +++ b/noname/library/index.js @@ -965,6 +965,20 @@ export class Library { }, unfrequent: true, }, + video_default_play_speed: { + name: "默认录像播放速度", + init: "1x", + intro: "设置播放游戏录像时默认的播放速度", + item: { + "0.25x": "0.25倍速", + "0.5x": "0.5倍速", + "1x": "原速", + "1.5x": "1.5倍速", + "2x": "2倍速", + "4x": "4倍速", + }, + unfrequent: true, + }, max_loadtime: { name: "最长载入时间", intro: "设置游戏从启动到完成载入所需的最长时间,超过此时间未完成载入会报错,若设备较慢或安装了较多扩展可适当延长此时间", @@ -12812,7 +12826,8 @@ export class Library { } player.playerid = i; player.nickname = info.nickname; - player.changeGroup(info.group, false, "nobroadcast"); + player.group = info.group; + player.node.name.dataset.nature = get.groupnature(info.group); player.identity = info.identity; player.identityShown = info.identityShown; player.hp = info.hp;