@@ -8800,15 +8800,26 @@ const skills = {
88008800 //威孙权
88018801 dcwoheng: {
88028802 audio: 2,
8803+ mark: true,
8804+ intro: {
8805+ markcount() {
8806+ const useCnt = game.getRoundHistory("everything", evt => evt.name == "dcwoheng", 0).length;
8807+ return useCnt + 1;
8808+ },
8809+ content() {
8810+ const useCnt = game.getRoundHistory("everything", evt => evt.name == "dcwoheng", 0).length;
8811+ return `令一名其他角色摸${get.cnNumber(useCnt + 1)}张牌或弃置${get.cnNumber(useCnt + 1)}张牌`;
8812+ },
8813+ },
88038814 trigger: { player: "damageEnd" },
88048815 enable: "phaseUse",
88058816 filterTarget: lib.filter.notMe,
88068817 prompt() {
8807- const num = get.player().countMark( "dcwoheng") ;
8818+ const num = game.getRoundHistory("everything", evt => evt.name == "dcwoheng", 0).length ;
88088819 return `令一名其他角色摸${get.cnNumber(num + 1)}张牌或弃置${get.cnNumber(num + 1)}张牌`;
88098820 },
88108821 async cost(event, trigger, player) {
8811- const num = player.countMark(" dcwoheng") ;
8822+ const num = game.getRoundHistory("everything", evt => evt.name == " dcwoheng", 0).length ;
88128823 event.result = await player
88138824 .chooseTarget(get.prompt(event.skill), `令一名其他角色摸${get.cnNumber(num + 1)}张牌或弃置${get.cnNumber(num + 1)}张牌`, lib.filter.notMe)
88148825 .set("ai", target => {
@@ -8819,14 +8830,9 @@ const skills = {
88198830 },
88208831 async content(event, trigger, player) {
88218832 const target = event.target || event.targets[0];
8822- game.countPlayer(current => {
8823- if (current.hasSkill("dcwoheng", null, null, false)) {
8824- current.addTempSkill("dcwoheng_used", "roundStart");
8825- current.addMark("dcwoheng", 1, false);
8826- }
8827- });
8828- const goon = event.getParent(2).name !== "dcyuhui_buff";
8829- const num = goon ? player.countMark("dcwoheng") : 1;
8833+ const goon = event.getParent(2).name !== "dcyuhui_buff",
8834+ useCnt = game.getRoundHistory("everything", evt => evt.name == "dcwoheng", 0).length;
8835+ const num = goon ? useCnt : 1;
88308836 if (!target?.isIn()) {
88318837 return;
88328838 }
@@ -8845,7 +8851,7 @@ const skills = {
88458851 "choice",
88468852 get.effect(target, { name: "draw" }, player, player) *
88478853 (() => {
8848- if (goon && player.countMark("dcwoheng") <= 3) {
8854+ if (goon && useCnt <= 3) {
88498855 if (target.countCards("h") + num === player.countCards("h")) {
88508856 return 100 * num;
88518857 }
@@ -8855,7 +8861,7 @@ const skills = {
88558861 get.effect(target, { name: "guohe_copy2" }, target, player) *
88568862 (() => {
88578863 const numx = Math.min(num, target.countDiscardableCards(target, "he"));
8858- if (goon && player.countMark("dcwoheng") <= 3) {
8864+ if (goon && useCnt <= 3) {
88598865 if (target.countCards("h") - numx === player.countCards("h")) {
88608866 return 100 * numx;
88618867 }
@@ -8872,16 +8878,28 @@ const skills = {
88728878 } else {
88738879 await target.chooseToDiscard(num, true, "he");
88748880 }
8875- if (player.countMark("dcwoheng") > 3 || player.countCards("h") !== target.countCards("h")) {
8881+ if (useCnt > 3 || player.countCards("h") !== target.countCards("h")) {
88768882 await player.draw(2);
88778883 if (player.hasSkill("dcwoheng", null, null, false)) {
88788884 player.tempBanSkill("dcwoheng");
88798885 }
88808886 }
88818887 },
8888+ group: "dcwoheng_refresh",
8889+ subSkill: {
8890+ refresh: {
8891+ charlotte: true,
8892+ trigger: { global: "roundStart" },
8893+ forced: true,
8894+ popup: false,
8895+ async content(event, trigger, player) {
8896+ player.markSkill("dcwoheng");
8897+ },
8898+ },
8899+ },
88828900 ai: {
88838901 order(item, player) {
8884- const num = player.countMark(" dcwoheng") + 1;
8902+ const num = game.getRoundHistory("everything", evt => evt.name == " dcwoheng", 0).length + 1;
88858903 if (
88868904 game.hasPlayer(target => {
88878905 if (get.effect(target, { name: "draw" }, player, player) > 0) {
@@ -8904,12 +8922,13 @@ const skills = {
89048922 },
89058923 result: {
89068924 player(player, target) {
8907- const goon = !get.event()?.getParent()?.name.includes("dcyuhui_buff");
8908- const num = goon ? player.countMark("dcwoheng") + 1 : 1;
8925+ const goon = !get.event()?.getParent()?.name.includes("dcyuhui_buff"),
8926+ useCnt = game.getRoundHistory("everything", evt => evt.name == "dcwoheng", 0).length;
8927+ const num = goon ? useCnt + 1 : 1;
89098928 return Math.max(
89108929 get.effect(target, { name: "draw" }, player, player) *
89118930 (() => {
8912- if (goon && player.countMark("dcwoheng") < 3) {
8931+ if (goon && useCnt < 3) {
89138932 if (target.countCards("h") + num === player.countCards("h")) {
89148933 return 100 * num;
89158934 }
@@ -8919,7 +8938,7 @@ const skills = {
89198938 get.effect(target, { name: "guohe_copy2" }, target, player) *
89208939 (() => {
89218940 const numx = Math.min(num, target.countDiscardableCards(target, "he"));
8922- if (goon && player.countMark("dcwoheng") < 3) {
8941+ if (goon && useCnt < 3) {
89238942 if (target.countCards("h") - numx === player.countCards("h")) {
89248943 return 100 * numx;
89258944 }
@@ -8930,41 +8949,6 @@ const skills = {
89308949 },
89318950 },
89328951 },
8933- init(player) {
8934- const num = (() => {
8935- let num = 0,
8936- globalHistory = _status.globalHistory;
8937- for (let i = globalHistory.length - 1; i >= 0; i--) {
8938- num += globalHistory[i].everything.filter(evt => evt.name === "dcwoheng").length;
8939- if (globalHistory[i].isRound) {
8940- break;
8941- }
8942- }
8943- return num;
8944- })();
8945- if (num) {
8946- player.addTempSkill("dcwoheng_used", "roundStart");
8947- player.addMark("dcwoheng", num, false);
8948- }
8949- },
8950- onremove: true,
8951- mark: true,
8952- intro: {
8953- markcount(num = 0) {
8954- return num + 1;
8955- },
8956- content(num = 0) {
8957- return `令一名其他角色摸${get.cnNumber(num + 1)}张牌或弃置${get.cnNumber(num + 1)}张牌`;
8958- },
8959- },
8960- subSkill: {
8961- used: {
8962- charlotte: true,
8963- onremove(player) {
8964- player.clearMark("dcwoheng", false);
8965- },
8966- },
8967- },
89688952 },
89698953 dcyuhui: {
89708954 audio: 2,
0 commit comments