commit
1c7114160c
|
@ -4062,6 +4062,7 @@ const skills = {
|
||||||
return 0;
|
return 0;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
combo: "tianren"
|
||||||
},
|
},
|
||||||
subSkill: {
|
subSkill: {
|
||||||
effect: {
|
effect: {
|
||||||
|
|
|
@ -538,6 +538,7 @@ const skills = {
|
||||||
},
|
},
|
||||||
jsrgyangge: {
|
jsrgyangge: {
|
||||||
global: "jsrgyangge_mizhao",
|
global: "jsrgyangge_mizhao",
|
||||||
|
derivation: "mizhao",
|
||||||
subSkill: {
|
subSkill: {
|
||||||
mizhao: {
|
mizhao: {
|
||||||
//直接继承mizhao
|
//直接继承mizhao
|
||||||
|
@ -574,11 +575,59 @@ const skills = {
|
||||||
player.addTempSkill("jsrgguanshi_effect");
|
player.addTempSkill("jsrgguanshi_effect");
|
||||||
},
|
},
|
||||||
position: "hs",
|
position: "hs",
|
||||||
//这个AI难写,交给157了!
|
selectTargetAi(card) {
|
||||||
check() {
|
let cache = _status.event.getTempCache("jsrgguanshi", "targets");
|
||||||
return -1;
|
if (Array.isArray(cache)) return cache.length;
|
||||||
|
let player = _status.event.player,
|
||||||
|
targets = [],
|
||||||
|
shas = player.mayHaveSha(player, "respond", player.getCards("h", i => {
|
||||||
|
return card === i;
|
||||||
|
}));
|
||||||
|
game.countPlayer(tar => {
|
||||||
|
if (player === tar) return;
|
||||||
|
let eff = get.effect(tar, get.autoViewAs({ name: "juedou" }, [card]), player, player);
|
||||||
|
if (eff <= 0) return;
|
||||||
|
if (get.attitude(player, tar) > 0) targets.push([tar, eff, 0]);
|
||||||
|
else targets.push([tar, eff, tar.mayHaveSha(player, "respond", null, "count")]);
|
||||||
|
});
|
||||||
|
targets.sort((a, b) => {
|
||||||
|
if (!a[2]) return -1;
|
||||||
|
if (!b[2]) return 1;
|
||||||
|
return b[1] / b[2] - a[1] / a[2];
|
||||||
|
});
|
||||||
|
for (let i = 0; i < targets.length; i++) {
|
||||||
|
if (targets[i][2] > shas) {
|
||||||
|
targets = targets.slice(0, i);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
else shas -= targets[i][2];
|
||||||
|
}
|
||||||
|
_status.event.putTempCache("jsrgguanshi", "targets", targets);
|
||||||
|
return targets.length;
|
||||||
|
},
|
||||||
|
check(card) {
|
||||||
|
let num = lib.skill.jsrgguanshi.selectTargetAi(card);
|
||||||
|
if (!num) return -1;
|
||||||
|
if (num === 1) return 4 - get.value(card);
|
||||||
|
return num + 5 - get.value(card);
|
||||||
|
},
|
||||||
|
ai: {
|
||||||
|
order: 9,
|
||||||
|
result: {
|
||||||
|
player(player, target) {
|
||||||
|
let tars = _status.event.putTempCache("jsrgguanshi", "targets", targets);
|
||||||
|
if (!tars) return lib.card.juedou.ai.result.player(player, target);
|
||||||
|
},
|
||||||
|
target(player, target) {
|
||||||
|
let tars = _status.event.putTempCache("jsrgguanshi", "targets", targets);
|
||||||
|
if (!tars) return lib.card.juedou.ai.result.target(player, target);
|
||||||
|
for (let tar of tars) {
|
||||||
|
if (tar[0] === target) return tar[1] / get.attitude(player, target);
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
ai: {},
|
|
||||||
subSkill: {
|
subSkill: {
|
||||||
effect: {
|
effect: {
|
||||||
trigger: {
|
trigger: {
|
||||||
|
|
|
@ -6631,6 +6631,7 @@ const skills = {
|
||||||
player.removeSkills("godan_feiqu");
|
player.removeSkills("godan_feiqu");
|
||||||
},
|
},
|
||||||
ai: {
|
ai: {
|
||||||
|
combo: "godan_feiqu",
|
||||||
halfneg: true
|
halfneg: true
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -4774,7 +4774,6 @@ const skills = {
|
||||||
if (card) player.gain(card, "gain2");
|
if (card) player.gain(card, "gain2");
|
||||||
},
|
},
|
||||||
ai: {
|
ai: {
|
||||||
combo: "fenli",
|
|
||||||
effect: {
|
effect: {
|
||||||
target: function (card) {
|
target: function (card) {
|
||||||
if (card.name == "lebu" || card.name == "bingliang") return 0.5;
|
if (card.name == "lebu" || card.name == "bingliang") return 0.5;
|
||||||
|
|
|
@ -2293,7 +2293,7 @@ const skills = {
|
||||||
},
|
},
|
||||||
check: function (event, player) {
|
check: function (event, player) {
|
||||||
if (player.hasJudge("lebu") || player.hasJudge("bingliang")) return true;
|
if (player.hasJudge("lebu") || player.hasJudge("bingliang")) return true;
|
||||||
if (player.getHistory("skipped").length > 0) return false;
|
if (!player.hasSkill("repingkou") || player.getHistory("skipped").length > 0) return false;
|
||||||
return game.hasPlayer(function (current) {
|
return game.hasPlayer(function (current) {
|
||||||
return get.attitude(player, current) < 0 && current.hp == 1 && get.damageEffect(current, player, player) > 0;
|
return get.attitude(player, current) < 0 && current.hp == 1 && get.damageEffect(current, player, player) > 0;
|
||||||
});
|
});
|
||||||
|
@ -2311,6 +2311,7 @@ const skills = {
|
||||||
return player.isMaxHp();
|
return player.isMaxHp();
|
||||||
},
|
},
|
||||||
check: function (event, player) {
|
check: function (event, player) {
|
||||||
|
if (!player.hasSkill("repingkou")) return false;
|
||||||
if (!player.needsToDiscard() || (player.countCards("e") && player.isMaxEquip())) return true;
|
if (!player.needsToDiscard() || (player.countCards("e") && player.isMaxEquip())) return true;
|
||||||
if (player.getHistory("skipped").length > 0) return false;
|
if (player.getHistory("skipped").length > 0) return false;
|
||||||
return game.hasPlayer(function (current) {
|
return game.hasPlayer(function (current) {
|
||||||
|
@ -2334,9 +2335,6 @@ const skills = {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
ai: {
|
|
||||||
combo: "repingkou",
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
repingkou: {
|
repingkou: {
|
||||||
audio: 2,
|
audio: 2,
|
||||||
|
|
|
@ -23146,6 +23146,9 @@ const skills = {
|
||||||
player.stat[player.stat.length - 1].card.sha--;
|
player.stat[player.stat.length - 1].card.sha--;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
ai: {
|
||||||
|
combo: "wusheng"
|
||||||
|
},
|
||||||
group: "nuzhan2",
|
group: "nuzhan2",
|
||||||
},
|
},
|
||||||
nuzhan2: {
|
nuzhan2: {
|
||||||
|
|
|
@ -7145,6 +7145,9 @@ const skills = {
|
||||||
player.addTempSkill("csyizheng2", { player: "phaseBegin" });
|
player.addTempSkill("csyizheng2", { player: "phaseBegin" });
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
ai: {
|
||||||
|
combo: "cslilu"
|
||||||
|
},
|
||||||
},
|
},
|
||||||
csyizheng2: {
|
csyizheng2: {
|
||||||
audio: "csyizheng",
|
audio: "csyizheng",
|
||||||
|
|
|
@ -336,6 +336,7 @@ const skills = {
|
||||||
.sortBySeat();
|
.sortBySeat();
|
||||||
if (targets.length) {
|
if (targets.length) {
|
||||||
for (const target of targets) {
|
for (const target of targets) {
|
||||||
|
if (!target.isIn()) continue;
|
||||||
const next = target.chooseToUse("挥战:是否替" + get.translation(trigger.player) + "使用一张【闪】?", { name: "shan" });
|
const next = target.chooseToUse("挥战:是否替" + get.translation(trigger.player) + "使用一张【闪】?", { name: "shan" });
|
||||||
next.set("ai", () => {
|
next.set("ai", () => {
|
||||||
const event = _status.event;
|
const event = _status.event;
|
||||||
|
|
|
@ -3677,7 +3677,7 @@ const skills = {
|
||||||
return player.isMaxHandcard();
|
return player.isMaxHandcard();
|
||||||
},
|
},
|
||||||
check: function (event, player) {
|
check: function (event, player) {
|
||||||
if (player.getHistory("skipped").length > 0) return false;
|
if (!player.hasSkill("pingkou") && !player.hasSkill("xinpingkou") || player.getHistory("skipped").length > 0) return false;
|
||||||
return game.hasPlayer(function (current) {
|
return game.hasPlayer(function (current) {
|
||||||
return get.attitude(player, current) < 0 && current.hp == 1 && get.damageEffect(current, player, player) > 0;
|
return get.attitude(player, current) < 0 && current.hp == 1 && get.damageEffect(current, player, player) > 0;
|
||||||
});
|
});
|
||||||
|
@ -3695,6 +3695,7 @@ const skills = {
|
||||||
return player.isMaxHp();
|
return player.isMaxHp();
|
||||||
},
|
},
|
||||||
check: function (event, player) {
|
check: function (event, player) {
|
||||||
|
if (!player.hasSkill("pingkou") && !player.hasSkill("xinpingkou")) return false;
|
||||||
if (!player.needsToDiscard() || (player.countCards("e") && player.isMaxEquip())) return true;
|
if (!player.needsToDiscard() || (player.countCards("e") && player.isMaxEquip())) return true;
|
||||||
if (player.getHistory("skipped").length > 0) return false;
|
if (player.getHistory("skipped").length > 0) return false;
|
||||||
return game.hasPlayer(function (current) {
|
return game.hasPlayer(function (current) {
|
||||||
|
@ -3719,9 +3720,6 @@ const skills = {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
ai: {
|
|
||||||
combo: "pingkou",
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
pingkou: {
|
pingkou: {
|
||||||
audio: 2,
|
audio: 2,
|
||||||
|
@ -3754,7 +3752,6 @@ const skills = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
ai: {
|
ai: {
|
||||||
combo: "fenli",
|
|
||||||
effect: {
|
effect: {
|
||||||
target: function (card) {
|
target: function (card) {
|
||||||
if (card.name == "lebu" || card.name == "bingliang") return 0.5;
|
if (card.name == "lebu" || card.name == "bingliang") return 0.5;
|
||||||
|
|
4
node_modules/@types/noname-typings/nonameModules/noname/library/element/player.d.ts
generated
vendored
4
node_modules/@types/noname-typings/nonameModules/noname/library/element/player.d.ts
generated
vendored
|
@ -1262,8 +1262,8 @@ export class Player extends HTMLDivElement {
|
||||||
*/
|
*/
|
||||||
hasSha(respond?: string | boolean, noauto?: boolean): boolean;
|
hasSha(respond?: string | boolean, noauto?: boolean): boolean;
|
||||||
hasShan(respond: any): boolean;
|
hasShan(respond: any): boolean;
|
||||||
mayHaveSha(viewer: any, type: any, ignore: any, rvt: any): number | boolean;
|
mayHaveSha(viewer: Player, type?: string, ignore?: CCards | Function, rvt?: string): number | boolean;
|
||||||
mayHaveShan(viewer: any, type: any, ignore: any, rvt: any): number | boolean;
|
mayHaveShan(viewer: Player, type?: string, ignore?: CCards | Function, rvt?: string): number | boolean;
|
||||||
hasCard(name: any, position: any): boolean;
|
hasCard(name: any, position: any): boolean;
|
||||||
getEquip(name: any): import("noname-typings/nonameModules/noname/library/element/card.js").Card;
|
getEquip(name: any): import("noname-typings/nonameModules/noname/library/element/card.js").Card;
|
||||||
getJudge(name: any): ChildNode;
|
getJudge(name: any): ChildNode;
|
||||||
|
|
Loading…
Reference in New Issue