Merge branch 'PR-Branch' of https://github.com/libccy/noname into PR-Branch
This commit is contained in:
commit
a986b58076
|
@ -1007,6 +1007,7 @@ game.import("card", function () {
|
||||||
});
|
});
|
||||||
game.loseAsync({
|
game.loseAsync({
|
||||||
lose_list: lose_list,
|
lose_list: lose_list,
|
||||||
|
visible: true,
|
||||||
}).setContent("chooseToCompareLose");
|
}).setContent("chooseToCompareLose");
|
||||||
}
|
}
|
||||||
if (cards2.length) game.cardsGotoOrdering(cards2);
|
if (cards2.length) game.cardsGotoOrdering(cards2);
|
||||||
|
|
|
@ -126,7 +126,7 @@ game.import("character", function () {
|
||||||
if (!skill || skill === "jingyu") return false;
|
if (!skill || skill === "jingyu") return false;
|
||||||
let info = get.info(skill);
|
let info = get.info(skill);
|
||||||
while (true) {
|
while (true) {
|
||||||
if (!info || info.charlotte) return false;
|
if (!info || info.charlotte || info.equipSkill) return false;
|
||||||
if (info && !info.sourceSkill) break;
|
if (info && !info.sourceSkill) break;
|
||||||
skill = info.sourceSkill;
|
skill = info.sourceSkill;
|
||||||
info = get.info(skill);
|
info = get.info(skill);
|
||||||
|
@ -235,13 +235,13 @@ game.import("character", function () {
|
||||||
if (["global", "equip"].includes(event.type)) return false;
|
if (["global", "equip"].includes(event.type)) return false;
|
||||||
const skill = event.sourceSkill || event.skill;
|
const skill = event.sourceSkill || event.skill;
|
||||||
const info = get.info(skill);
|
const info = get.info(skill);
|
||||||
return info && !info.charlotte;
|
return info && !info.charlotte && !info.equipSkill;
|
||||||
},
|
},
|
||||||
forced: true,
|
forced: true,
|
||||||
onremove: true,
|
onremove: true,
|
||||||
charlotte: true,
|
charlotte: true,
|
||||||
async content(event, trigger, player) {
|
async content(event, trigger, player) {
|
||||||
player.loseHp(player.countMark("lvxin_recover"));
|
player.recover(player.countMark("lvxin_recover"));
|
||||||
player.removeSkill("lvxin_recover");
|
player.removeSkill("lvxin_recover");
|
||||||
},
|
},
|
||||||
intro: {
|
intro: {
|
||||||
|
@ -256,7 +256,7 @@ game.import("character", function () {
|
||||||
if (["global", "equip"].includes(event.type)) return false;
|
if (["global", "equip"].includes(event.type)) return false;
|
||||||
const skill = event.sourceSkill || event.skill;
|
const skill = event.sourceSkill || event.skill;
|
||||||
const info = get.info(skill);
|
const info = get.info(skill);
|
||||||
return info && !info.charlotte;
|
return info && !info.charlotte && !info.equipSkill;
|
||||||
},
|
},
|
||||||
forced: true,
|
forced: true,
|
||||||
onremove: true,
|
onremove: true,
|
||||||
|
@ -746,9 +746,9 @@ game.import("character", function () {
|
||||||
filter(event, player) {
|
filter(event, player) {
|
||||||
return (
|
return (
|
||||||
(event.name != "phase" || game.phaseNumber == 0) &&
|
(event.name != "phase" || game.phaseNumber == 0) &&
|
||||||
game.countPlayer(current => {
|
game.countPlayer((current) => {
|
||||||
if (get.mode() != "doudizhu") return !current.isZhu2();
|
if (get.mode() === "doudizhu") return current.getSeatNum() !== 3;
|
||||||
return current.getSeatNum() != 3;
|
return !current.isZhu2();
|
||||||
}) > 1
|
}) > 1
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
@ -757,8 +757,8 @@ game.import("character", function () {
|
||||||
derivation: "tamo_faq",
|
derivation: "tamo_faq",
|
||||||
async content(event, trigger, player) {
|
async content(event, trigger, player) {
|
||||||
const toSortPlayers = game.filterPlayer((current) => {
|
const toSortPlayers = game.filterPlayer((current) => {
|
||||||
if (get.mode() != "doudizhu") return !current.isZhu2();
|
if (get.mode() === "doudizhu") return current.getSeatNum() !== 3;
|
||||||
return current.getSeatNum() != 3;
|
return !current.isZhu2();
|
||||||
});
|
});
|
||||||
toSortPlayers.sortBySeat(game.findPlayer2((current) => current.getSeatNum() == 1, true));
|
toSortPlayers.sortBySeat(game.findPlayer2((current) => current.getSeatNum() == 1, true));
|
||||||
const next = player.chooseToMove("榻谟:是否分配" +
|
const next = player.chooseToMove("榻谟:是否分配" +
|
||||||
|
@ -900,7 +900,12 @@ game.import("character", function () {
|
||||||
game.swapSeat(list[0], list[1], false);
|
game.swapSeat(list[0], list[1], false);
|
||||||
}
|
}
|
||||||
}, toSwapList);
|
}, toSwapList);
|
||||||
if (trigger.name === "phase" && !trigger.player.isZhu2() && trigger.player !== toSortPlayers[0] && !trigger._finished) {
|
if (
|
||||||
|
trigger.name === "phase" &&
|
||||||
|
!trigger.player.isZhu2() &&
|
||||||
|
trigger.player !== toSortPlayers[0] &&
|
||||||
|
!trigger._finished
|
||||||
|
) {
|
||||||
trigger.finish();
|
trigger.finish();
|
||||||
trigger._triggered = 5;
|
trigger._triggered = 5;
|
||||||
const evt = toSortPlayers[0].insertPhase();
|
const evt = toSortPlayers[0].insertPhase();
|
||||||
|
@ -911,10 +916,7 @@ game.import("character", function () {
|
||||||
}
|
}
|
||||||
//跳过新回合的phaseBefore
|
//跳过新回合的phaseBefore
|
||||||
evt.pushHandler("onPhase", (event, option) => {
|
evt.pushHandler("onPhase", (event, option) => {
|
||||||
if (
|
if (event.step === 0 && option.state === "begin") {
|
||||||
event.step === 0 &&
|
|
||||||
option.state === "begin"
|
|
||||||
) {
|
|
||||||
event.step = 1;
|
event.step = 1;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -929,7 +931,8 @@ game.import("character", function () {
|
||||||
filter(event, player) {
|
filter(event, player) {
|
||||||
return game.hasPlayer(target => {
|
return game.hasPlayer(target => {
|
||||||
if (target == player || target.countCards('h') + player.countCards('h') == 0) return false;
|
if (target == player || target.countCards('h') + player.countCards('h') == 0) return false;
|
||||||
return get.mode() == 'identity' || target.countCards('h') <= player.countCards('h') + 1;
|
// return get.mode() == 'identity' || target.countCards('h') <= player.countCards('h') + 1;
|
||||||
|
return true;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
direct: true,
|
direct: true,
|
||||||
|
@ -942,7 +945,8 @@ game.import("character", function () {
|
||||||
"与一名其他角色平分手牌",
|
"与一名其他角色平分手牌",
|
||||||
(card, player, target) => {
|
(card, player, target) => {
|
||||||
if (target == player || target.countCards('h') + player.countCards('h') == 0) return false;
|
if (target == player || target.countCards('h') + player.countCards('h') == 0) return false;
|
||||||
return get.mode() == 'identity' || target.countCards('h') <= player.countCards('h') + 1;
|
// return get.mode() == 'identity' || target.countCards('h') <= player.countCards('h') + 1;
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
.set("ai", (target) => {
|
.set("ai", (target) => {
|
||||||
|
@ -10841,17 +10845,13 @@ game.import("character", function () {
|
||||||
dingzhou_info:
|
dingzhou_info:
|
||||||
"出牌阶段限一次。你可以将X张牌交给一名场上有牌的角色,然后你获得其场上的所有牌(X为其场上的牌数)。",
|
"出牌阶段限一次。你可以将X张牌交给一名场上有牌的角色,然后你获得其场上的所有牌(X为其场上的牌数)。",
|
||||||
tamo: "榻谟",
|
tamo: "榻谟",
|
||||||
tamo_info:
|
tamo_info_doudizhu: "游戏开始时,你可以重新分配除三号位角色外所有角色的座次。",
|
||||||
"游戏开始时,你可以重新分配除主公外所有角色的座次。",
|
tamo_info: "游戏开始时,你可以重新分配除主公外所有角色的座次。",
|
||||||
tamo_info_doudizhu:
|
|
||||||
"游戏开始时,你可以重新分配除三号位外所有角色的座次。",
|
|
||||||
tamo_faq: "FAQ",
|
tamo_faq: "FAQ",
|
||||||
tamo_faq_info:
|
tamo_faq_info:
|
||||||
"<br><li>Q:在一号位不为主公的情况下,〖榻谟〗如何结算?</li><li>A:该角色可以正常进行座次交换。若受此技能影响导致一号位角色发生了变化,则以排列后的一号位角色为起始角色开始本局游戏。</li>",
|
"<br><li>Q:在一号位不为主公的情况下,〖榻谟〗如何结算?</li><li>A:该角色可以正常进行座次交换。若受此技能影响导致一号位角色发生了变化,则以排列后的一号位角色为起始角色开始本局游戏。</li>",
|
||||||
zhimeng: "智盟",
|
zhimeng: "智盟",
|
||||||
zhimeng_info:
|
zhimeng_info:
|
||||||
"回合结束后,你可以选择一名手牌数不大于Y的其他角色(Y为你的手牌数+1)。若如此做,你与其将各自所有手牌置于处理区,然后你随机获得这些牌中的一半(向上取整),其获得剩余的牌。",
|
|
||||||
zhimeng_info_identity:
|
|
||||||
"回合结束后,你可以选择一名其他角色。若如此做,你与其将各自所有手牌置于处理区,然后你随机获得这些牌中的一半(向上取整),其获得剩余的牌。",
|
"回合结束后,你可以选择一名其他角色。若如此做,你与其将各自所有手牌置于处理区,然后你随机获得这些牌中的一半(向上取整),其获得剩余的牌。",
|
||||||
shen_xuzhu: "神许褚",
|
shen_xuzhu: "神许褚",
|
||||||
shen_xuzhu_prefix: "神",
|
shen_xuzhu_prefix: "神",
|
||||||
|
|
|
@ -1063,39 +1063,30 @@ game.import("character", function () {
|
||||||
filter(event, player) {
|
filter(event, player) {
|
||||||
if (!event.isFirstTarget) return false;
|
if (!event.isFirstTarget) return false;
|
||||||
if (get.type(event.card) !== "trick") return false;
|
if (get.type(event.card) !== "trick") return false;
|
||||||
const evt = event.getParent();
|
return true;
|
||||||
const evts = game.getGlobalHistory("useCard", null, evt).slice().remove(evt);
|
|
||||||
return event.targets.some((target) => {
|
|
||||||
return evts.some((evt) => evt.targets.includes(target));
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
direct: true,
|
direct: true,
|
||||||
async content(event, trigger, player) {
|
async content(event, trigger, player) {
|
||||||
const evt = trigger.getParent();
|
|
||||||
const evts = game.getGlobalHistory("useCard", null, evt).slice().remove(evt);
|
|
||||||
const chooseableTargets = trigger.targets.filter((target) => {
|
|
||||||
return evts.some((evt) => evt.targets.includes(target));
|
|
||||||
});
|
|
||||||
const result = await player
|
const result = await player
|
||||||
.chooseTarget()
|
.chooseTarget()
|
||||||
.set("prompt", get.prompt("dcyingshi"))
|
.set("prompt", get.prompt("dcyingshi"))
|
||||||
.set(
|
.set(
|
||||||
"prompt2",
|
"prompt2",
|
||||||
`令一名可选角色选择本回合未被选择过的一项:⒈令你于此牌结算结束后视为对其使用一张${get.translation(
|
`令其中一名角色选择本回合未被选择过的一项:⒈令你于此牌结算结束后视为对其使用一张${get.translation(
|
||||||
trigger.card.name
|
trigger.card.name
|
||||||
)};⒉弃置${get.cnNumber(player.countCards("e"))}张牌,此牌对其无效。`
|
)};⒉弃置${get.cnNumber(player.countCards("e"))}张牌,此牌对其无效。`
|
||||||
)
|
)
|
||||||
.set("filterTarget", (card, player, target) => {
|
.set("filterTarget", (card, player, target) => {
|
||||||
return get.event("targets").includes(target);
|
return get.event("targets").includes(target);
|
||||||
})
|
})
|
||||||
.set("targets", chooseableTargets)
|
.set("targets", trigger.targets)
|
||||||
.set(
|
.set(
|
||||||
"toFriends",
|
"toFriends",
|
||||||
(() => {
|
(() => {
|
||||||
const isPositive = chooseableTargets.some((current) => {
|
const isPositive = trigger.targets.some((current) => {
|
||||||
return get.effect(current, trigger.card, trigger.player, player) > 0;
|
return get.effect(current, trigger.card, trigger.player, player) > 0;
|
||||||
}),
|
}),
|
||||||
isNegative = chooseableTargets.some((current) => {
|
isNegative = trigger.targets.some((current) => {
|
||||||
return get.effect(current, trigger.card, trigger.player, player) < -5;
|
return get.effect(current, trigger.card, trigger.player, player) < -5;
|
||||||
});
|
});
|
||||||
if (
|
if (
|
||||||
|
@ -1536,38 +1527,31 @@ game.import("character", function () {
|
||||||
return evt && evt.hs && evt.hs.length && current.countCards("h") == 0;
|
return evt && evt.hs && evt.hs.length && current.countCards("h") == 0;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
direct: true,
|
async cost(event, trigger, player) {
|
||||||
async content(event, trigger, player) {
|
|
||||||
const targetx = _status.currentPhase;
|
const targetx = _status.currentPhase;
|
||||||
const targets = game
|
const targets = game
|
||||||
.filterPlayer((current) => {
|
.filterPlayer((current) => {
|
||||||
if (targetx && current == targetx) return false;
|
if (targetx && current == targetx || !current.isIn()) return false;
|
||||||
let evt = trigger.getl(current);
|
let evt = trigger.getl(current);
|
||||||
return evt && evt.hs && evt.hs.length && current.countCards("h") == 0;
|
return evt && evt.hs && evt.hs.length && current.countCards("h") == 0;
|
||||||
})
|
})
|
||||||
.sortBySeat(targetx || player);
|
.sortBySeat(targetx || player);
|
||||||
for (const target of targets) {
|
event.result = await player
|
||||||
if (!target.isIn()) continue;
|
.chooseTarget("是否对" + (targets.length > 1 ? "其中一名角色" : get.translation(targets[0])) + "发动【守成】?",
|
||||||
const {
|
"令其摸两张牌",
|
||||||
result: { bool },
|
(card, player, target) => {
|
||||||
} = await player
|
return get.event("targets").includes(target);
|
||||||
.chooseBool(get.prompt2("dcshoucheng", target))
|
}
|
||||||
.set("choice", get.attitude(player, target) > 0);
|
)
|
||||||
if (bool) {
|
.set("targets", targets)
|
||||||
player.logSkill("dcshoucheng", target);
|
.set("ai", target => get.attitude(get.event("player"), target))
|
||||||
if (target != player) player.addExpose(0.2);
|
.forResult();
|
||||||
|
},
|
||||||
|
usable: 1,
|
||||||
|
async content(event, trigger, player) {
|
||||||
|
const target = event.targets[0];
|
||||||
|
if (get.mode() != "identity" || player.identity != "nei") player.addExpose(0.2);
|
||||||
target.draw(2);
|
target.draw(2);
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
ai: {
|
|
||||||
threaten(player, target) {
|
|
||||||
return Math.sqrt(
|
|
||||||
game.countPlayer((i) => {
|
|
||||||
return get.attitude(target, i) > 0;
|
|
||||||
})
|
|
||||||
);
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
subSkill: {
|
subSkill: {
|
||||||
ai: {
|
ai: {
|
||||||
|
@ -16244,7 +16228,7 @@ game.import("character", function () {
|
||||||
dcshengxi: "生息",
|
dcshengxi: "生息",
|
||||||
dcshengxi_info: "弃牌阶段结束时,若你本回合未造成过伤害,你可以摸两张牌。",
|
dcshengxi_info: "弃牌阶段结束时,若你本回合未造成过伤害,你可以摸两张牌。",
|
||||||
dcshoucheng: "守成",
|
dcshoucheng: "守成",
|
||||||
dcshoucheng_info: "一名角色于其回合外失去最后的手牌后,你可令其摸两张牌。",
|
dcshoucheng_info: "每回合限一次,当一名角色于其回合外失去手牌后,若其没有手牌,你可令其摸两张牌。",
|
||||||
dc_liuli: "刘理",
|
dc_liuli: "刘理",
|
||||||
dcfuli: "抚黎",
|
dcfuli: "抚黎",
|
||||||
dcfuli_info:
|
dcfuli_info:
|
||||||
|
@ -16264,7 +16248,7 @@ game.import("character", function () {
|
||||||
"其他角色的出牌阶段限一次。其可以交给你一张牌,若此牌为装备牌,你可以使用之,然后其本回合攻击范围+X(X为你装备区里的牌数)。若你以此法替换了装备,你与其各摸两张牌。",
|
"其他角色的出牌阶段限一次。其可以交给你一张牌,若此牌为装备牌,你可以使用之,然后其本回合攻击范围+X(X为你装备区里的牌数)。若你以此法替换了装备,你与其各摸两张牌。",
|
||||||
dcyingshi: "应时",
|
dcyingshi: "应时",
|
||||||
dcyingshi_info:
|
dcyingshi_info:
|
||||||
"每回合每项各限一次。当你使用普通锦囊牌指定第一个目标后,若有目标不为本回合第一次成为牌的目标,则你可以令其选择一项:⒈令你于此牌结算结束后视为对其使用一张与此牌牌名相同的牌;⒉弃置X张牌,此牌对其无效(X为你装备区里的牌数)。",
|
"每回合每项各限一次。当你使用普通锦囊牌指定目标后,你可令其中一个目标选择一项:⒈令你于此牌结算结束后视为对其使用一张与此牌牌名相同的牌;⒉弃置X张牌,此牌对其无效(X为你装备区里的牌数)。",
|
||||||
dc_wangling: "王淩",
|
dc_wangling: "王淩",
|
||||||
dcjichou: "集筹",
|
dcjichou: "集筹",
|
||||||
dcjichou_info:
|
dcjichou_info:
|
||||||
|
|
|
@ -9722,9 +9722,9 @@ game.import("character", function () {
|
||||||
"step 1";
|
"step 1";
|
||||||
if (result.number < 7) {
|
if (result.number < 7) {
|
||||||
var source = trigger.source;
|
var source = trigger.source;
|
||||||
if (source && source.isIn() && source.countCards("he") > 0) {
|
if (source && source.isIn() && source.countCards("h") > 0) {
|
||||||
player.line(source);
|
player.line(source);
|
||||||
source.chooseToDiscard("he", true);
|
source.chooseToDiscard("h", true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -20724,7 +20724,7 @@ game.import("character", function () {
|
||||||
simafu: "司马孚",
|
simafu: "司马孚",
|
||||||
xunde: "勋德",
|
xunde: "勋德",
|
||||||
xunde_info:
|
xunde_info:
|
||||||
"一名角色受到伤害后,若你至其的距离不大于1,则你可判定。若判定结果:大于5,你令该角色获得判定牌;小于7,你令伤害来源弃置一张牌。",
|
"一名角色受到伤害后,若你至其的距离不大于1,则你可判定。若判定结果:大于5,你令该角色获得判定牌;小于7,你令伤害来源弃置一张手牌。",
|
||||||
chenjie: "臣节",
|
chenjie: "臣节",
|
||||||
chenjie_info:
|
chenjie_info:
|
||||||
"一名角色的判定牌生效前,你可打出一张花色相同的牌。系统将你打出的牌作为新判定牌,将原判定牌置入弃牌堆。然后你摸两张牌。",
|
"一名角色的判定牌生效前,你可打出一张花色相同的牌。系统将你打出的牌作为新判定牌,将原判定牌置入弃牌堆。然后你摸两张牌。",
|
||||||
|
|
|
@ -5425,7 +5425,7 @@ game.import("character", function () {
|
||||||
return val;
|
return val;
|
||||||
},
|
},
|
||||||
prompt: () => "选择要交出的牌和要交给的目标",
|
prompt: () => "选择要交出的牌和要交给的目标",
|
||||||
selectCard: 1,
|
selectCard: [1, Infinity],
|
||||||
discard: false,
|
discard: false,
|
||||||
lose: false,
|
lose: false,
|
||||||
delay: false,
|
delay: false,
|
||||||
|
@ -20495,7 +20495,7 @@ game.import("character", function () {
|
||||||
tw_jiangji_prefix: "TW",
|
tw_jiangji_prefix: "TW",
|
||||||
twjichou: "急筹",
|
twjichou: "急筹",
|
||||||
twjichou_info:
|
twjichou_info:
|
||||||
"①每回合限一次。你可以视为使用一张未被〖急筹①〗记录过的普通锦囊牌并记录此牌。②你无法响应或{使用对应实体牌包含你的手牌的}〖急筹①〗记录过的锦囊牌。③出牌阶段限一次。你可将手牌中的一张〖急筹①〗记录过的锦囊牌交给其他角色。",
|
"①每回合限一次。你可以视为使用一张未被〖急筹①〗记录过的普通锦囊牌并记录此牌。②你无法响应或{使用对应实体牌包含你的手牌的}〖急筹①〗记录过的锦囊牌。③出牌阶段限一次。你可将手牌中任意张〖急筹①〗记录过的锦囊牌交给其他角色。",
|
||||||
twjilun: "机论",
|
twjilun: "机论",
|
||||||
twjilun_info:
|
twjilun_info:
|
||||||
"当你受到伤害后,你可以摸X张牌(X为〖急筹①〗记录数且至少为1,至多为5),或视为使用一张〖急筹①〗记录过且未被〖机论〗记录过的普通锦囊牌并记录此牌。",
|
"当你受到伤害后,你可以摸X张牌(X为〖急筹①〗记录数且至少为1,至多为5),或视为使用一张〖急筹①〗记录过且未被〖机论〗记录过的普通锦囊牌并记录此牌。",
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 79 KiB |
|
@ -141,6 +141,7 @@ export class UI {
|
||||||
*/
|
*/
|
||||||
toastQueue = [];
|
toastQueue = [];
|
||||||
|
|
||||||
|
/**
|
||||||
* @type {HTMLDivElement}
|
* @type {HTMLDivElement}
|
||||||
*/
|
*/
|
||||||
cardPile;
|
cardPile;
|
||||||
|
|
Loading…
Reference in New Issue