h-x effect->effect_use

This commit is contained in:
157 2024-05-11 16:40:41 +08:00
parent a24ef4791e
commit 3b39fa28ed
15 changed files with 81 additions and 81 deletions

View File

@ -9820,7 +9820,7 @@ const skills = {
},
ai: {
effect: {
player: function (card, player, target) {
player_use(card, player, target) {
if (player !== target && get.itemtype(target) === "player" && (card.name === "sha" || get.type(card, false) === "trick") && target.countCards("he") && !target.hasSkillTag("noh")) return [1, 0, 1, -1];
},
},
@ -10483,7 +10483,7 @@ const skills = {
},
ai: {
effect: {
target: function (card, player, target) {
target_use(card, player, target) {
if (typeof card == "object" && player != target) {
var suit = get.suit(card);
if (suit == "none") return;
@ -13093,7 +13093,7 @@ const skills = {
},
ai: {
effect: {
target: function (card, player, target) {
target_use(card, player, target) {
if (_status._dcdanying_aiChecking) return;
_status._dcdanying_aiChecking = true;
let eff = get.effect(target, { name: "guohe_copy2" }, player, player);

View File

@ -5964,7 +5964,7 @@ const skills = {
ai: {
halfneg: true,
effect: {
player_use: function (card, player, target) {
player_use(card, player, target) {
if (card.name == "jiu") return [1, 1];
},
},
@ -6773,7 +6773,7 @@ const skills = {
},
ai: {
effect: {
target: function (card, player, target) {
target_use(card, player, target) {
if (lib.skill.jsrgjuxia.countSkill(target) >= lib.skill.jsrgjuxia.countSkill(player)) return;
if (card && (card.cards || card.isCard) && get.attitude(target, player) > 0 && (!target.storage.counttrigger || !target.storage.counttrigger.jsrgjuxia)) return [0, 0.5, 0, 0.5];
},
@ -8034,7 +8034,7 @@ const skills = {
pretao: true,
threaten: 1.8,
effect: {
player(card, player, target) {
player_use(card, player, target) {
if (
typeof card === "object" &&
card.name !== "shan" &&

View File

@ -2250,7 +2250,7 @@ const skills = {
ai: {
threaten: 0.7,
effect: {
target(card, player, target, current) {
target_use(card, player, target, current) {
if (card.name == "sha") return 0.7;
},
},
@ -9797,10 +9797,10 @@ const skills = {
},
ai: {
effect: {
target(card, player, target) {
target_use(card, player, target) {
if (card.name == "sha" && get.color(card) == "red") return [1, 0.6];
},
player(card, player, target) {
player_use(card, player, target) {
if (card.name == "sha" && get.color(card) == "red") return [1, 1];
},
},

View File

@ -119,7 +119,7 @@ const skills = {
},
ai: {
effect: {
player(card, player, target, current) {
player_use(card, player, target, current) {
if (!target) return;
const counttrigger = player.storage.counttrigger;
if (counttrigger && counttrigger.mbkuangli_target && counttrigger.mbkuangli_target >= lib.skill.mbkuangli_target.usable) return;
@ -5176,7 +5176,7 @@ const skills = {
},
ai: {
effect: {
target: function (card, player, target) {
target_use(card, player, target) {
if (player.canUse(card, target) && get.distance(player, target) != 1) return 1.2;
},
},
@ -7599,7 +7599,7 @@ const skills = {
},
ai: {
effect: {
target: function (card, player, target, current) {
target_use(card, player, target, current) {
if (card.name == "sha" && current < 0) return 0.7;
},
},
@ -8046,7 +8046,7 @@ const skills = {
ai: {
reverseEquip: true,
effect: {
target: function (card, player, target, current) {
target_use(card, player, target, current) {
if (get.type(card) == "equip" && !get.tag(card, "gifts") && target.storage.jueyong && target.storage.jueyong[1].length) {
var result1 = get.equipResult(player, target, card.name),
subtype = get.subtype(card);
@ -10239,7 +10239,7 @@ const skills = {
ai: {
expose: 0.2,
effect: {
target: function (card, player, target) {
target_use(card, player, target) {
if (card.name != "sha") return;
var players = game.filterPlayer();
if (get.attitude(player, target) <= 0) {
@ -15180,7 +15180,7 @@ const skills = {
},
ai: {
effect: {
target: function (card, player, target, current) {
target_use(card, player, target, current) {
if (["tiesuo", "lulitongxin"].includes(card.name)) {
return "zerotarget";
}
@ -15205,7 +15205,7 @@ const skills = {
},
ai: {
effect: {
target: function (card, player, target) {
target_use(card, player, target) {
if (typeof card !== "object" || target.hasSkillTag("unequip2")) return;
if (
player.hasSkillTag("unequip", false, {
@ -15238,7 +15238,7 @@ const skills = {
inherit: "rw_minguangkai_link",
ai: {
effect: {
target: function (card, player, target, current) {
target_use(card, player, target, current) {
if (["tiesuo", "lulitongxin"].includes(card.name)) {
return "zeroplayertarget";
}

View File

@ -442,7 +442,7 @@ const skills = {
},
ai: {
effect: {
target(card, player, target) {
target_use(card, player, target) {
if (card.name == "sha" && !game.hasNature(card) && game.countPlayer(targetx => player.inRange(targetx)) >= 3) return "zerotarget";
},
},
@ -1487,7 +1487,7 @@ const skills = {
threaten: 100,
reverseEquip: true,
effect: {
player: (card, player, target) => {
player_use(card, player, target) {
if (typeof card !== "object") return;
let suit = get.suit(card);
if (
@ -1506,7 +1506,7 @@ const skills = {
}),
];
},
target: (card, player, target) => {
target(card, player, target) {
if (
card.name === "sha" &&
!player.hasSkillTag(
@ -1580,7 +1580,7 @@ const skills = {
},
ai: {
effect: {
target: function (card, player, target) {
target_use(card, player, target) {
if (card.name === "sha" && game.hasNature(card) && target.hasEmptySlot(2)) return "zeroplayertarget";
if (get.subtype(card) == "equip2" && target.isEmpty(2)) return [0.6, -0.8];
},
@ -2290,7 +2290,7 @@ const skills = {
threaten: 1.1,
combo: "psshiyin",
effect: {
target: function (card, player, target, current) {
target_use(card, player, target, current) {
var list = target.getExpansions("psshiyin");
for (var cardx of list) {
if (get.suit(cardx) == get.suit(card)) return "zeroplayertarget";
@ -6442,7 +6442,7 @@ const skills = {
},
ai: {
effect: {
target: function (card, player, target) {
target_use(card, player, target) {
var type = get.type2(card);
var list = target.getExpansions("zuixiang2");
for (var i of list) {

View File

@ -432,7 +432,7 @@ const skills = {
subSkill: {
ai: {
effect: {
player(card, player) {
player_use(card, player) {
if (
!game.hasPlayer(target => {
return target.hasSkill("olsbhetao") && (get.attitude(player, target) < 0 || get.attitude(target, player) < 0);

View File

@ -1479,7 +1479,7 @@ const skills = {
},
ai: {
effect: {
player: function (card, player, target) {
player_use(card, player, target) {
if (player.getStorage("sbyijue_effect").includes(target)) return "zeroplayertarget";
},
},
@ -2736,10 +2736,10 @@ const skills = {
},
ai: {
effect: {
target: function (card, player, target) {
target_use(card, player, target) {
if (card.name == "sha" && get.color(card) == "red") return [1, 0.6];
},
player: function (card, player, target) {
player_use(card, player, target) {
if (card.name == "sha" && get.color(card) == "red") return [1, 1];
},
},
@ -3451,7 +3451,7 @@ const skills = {
},
ai: {
effect: {
player: function (card, player, target) {
player_use(card, player, target) {
if (player != target && target && target.group == "qun" && card.name != "tao") return [1, 0.1];
},
},

View File

@ -971,7 +971,7 @@ const skills = {
},
ai: {
effect: {
target(card, player, target) {
target_use(card, player, target) {
let hs = player.getCards("h", i => i !== card && (!card.cards || !card.cards.includes(i))),
num = player.getCardUsable("sha");
if ((card.name !== "sha" && card.name !== "juedou") || hs.length < target.countCards("h")) return 1;
@ -2382,7 +2382,7 @@ const skills = {
return false;
},
effect: {
target(card, player, target) {
target_use(card, player, target) {
if (
player == target &&
get.type(card) == "equip" &&
@ -3901,10 +3901,10 @@ const skills = {
},
ai: {
effect: {
target(card, player, target) {
target_use(card, player, target) {
if (card.name == "sha" && get.color(card) == "red") return [1, 0.6];
},
player(card, player, target) {
player_use(card, player, target) {
if (card.name == "sha" && get.color(card) == "red") return [1, 1];
},
},

View File

@ -1471,13 +1471,13 @@ const skills = {
},
ai: {
effect: {
player: function (card, player, target) {
player_use(card, player, target) {
var hp = player.hp,
evt = _status.event;
if (evt.name == "chooseToUse" && evt.player == player && evt.skill == "spjungong" && !ui.selected.cards.length) hp -= (player.getStat("skill").spjungong || 0) + 1;
if (card && card.name == "sha" && hp == target.hp) return [1, 0.3];
},
target: function (card, player, target) {
target_use(card, player, target) {
if (card && card.name == "sha" && player.hp == target.hp) return [1, 0.3];
},
},
@ -1710,7 +1710,7 @@ const skills = {
},
ai: {
effect: {
player: function (card, player, target) {
player_use(card, player, target) {
if (get.name(card) == "shan") {
let num = get.number(card);
if (!num || num <= player.storage.shanxie_banned.num) return "zeroplayertarget";
@ -2119,7 +2119,7 @@ const skills = {
},
ai: {
effect: {
target: function (card, player, target, current) {
target_use(card, player, target, current) {
if (card.name == "sha" && player.hp > target.hp && get.attitude(player, target) < 0) {
var num = get.number(card);
if (typeof num != "number") return false;

View File

@ -2420,7 +2420,7 @@ const skills = {
},
ai: {
effect: {
player: function (card, player, target) {
player_use(card, player, target) {
if (card.name == "tiesuo" && (!player.storage.counttrigger || !player.storage.counttrigger.hezhong_0)) return "zerotarget";
},
},
@ -2457,7 +2457,7 @@ const skills = {
},
ai: {
effect: {
player: function (card, player, target) {
player_use(card, player, target) {
if (card.name == "tiesuo" && (!player.storage.counttrigger || !player.storage.counttrigger.hezhong_1)) return "zerotarget";
},
},
@ -4320,7 +4320,7 @@ const skills = {
diamond_ai: {
ai: {
effect: {
player: function (card, player, target) {
player_use(card, player, target) {
if (get.name(card) == "sha" && !player.hasSkill("oltianhou_diamond") && target != player.getNext() && target != player.getPrevious()) {
let num = get.number(card),
max = _status.aiyh_MAXNUM || 13;
@ -5067,7 +5067,7 @@ const skills = {
ai: {
threaten: 3,
effect: {
player_use: function (card, player, target) {
player_use(card, player, target) {
if (
typeof card == "object" &&
card.cards &&
@ -6587,7 +6587,7 @@ const skills = {
order: 1,
threaten: 1.1,
effect: {
player_use: function (card, player, target) {
player_use(card, player, target) {
if (_status._olkenshang_aiChecking || ui.selected.targets.length) return;
if (typeof card != "object" || !card.storage || !card.storage.olkenshang) return false;
_status._olkenshang_aiChecking = true;
@ -6795,7 +6795,7 @@ const skills = {
threaten: 0.8,
halfneg: true,
effect: {
player: function (card, player, target) {
player_use(card, player, target) {
if ((!card.isCard || !card.cards) && get.itemtype(card) != "card") return;
let cs = 0;
if (
@ -10746,7 +10746,7 @@ const skills = {
},
ai: {
effect: {
target: function (card, player, target) {
target_use(card, player, target) {
if (card.name != "sha") return;
if (
target.hasSkillTag("unequip2") ||
@ -10871,7 +10871,7 @@ const skills = {
},
ai: {
effect: {
target: function (card, player, target, effect) {
target_use(card, player, target, effect) {
if (
effect > 0 ||
player.hasSkillTag("unequip", false, {
@ -12042,7 +12042,7 @@ const skills = {
},
ai: {
effect: {
player_use: function (card, player, target) {
player_use(card, player, target) {
if (!target || player._saodi_judging || ui.selected.targets.length || player == target || target.hasSkill("nodis")) return;
if (typeof card != "object" || (card.name != "sha" && get.type(card) != "trick")) return false;
player._saodi_judging = true;
@ -16192,17 +16192,6 @@ const skills = {
}
},
group: "neifa_use",
ai: {
reverseOrder: true,
skillTagFilter: function (player) {
if (player.storage.counttrigger && player.storage.counttrigger.neifa_use >= 2) return false;
},
effect: {
target: function (card, player, target) {
if ((!player.storage.counttrigger || !player.storage.counttrigger.neifa_use || player.storage.counttrigger.neifa_use < 2) && player == target && get.type(card) == "equip") return [1, 3];
},
},
},
},
neifa_use: {
audio: "neifa",
@ -16215,6 +16204,17 @@ const skills = {
content: function () {
player.draw(player.countMark("neifa_nobasic"));
},
ai: {
reverseOrder: true,
skillTagFilter(player) {
if (player.storage.counttrigger && player.storage.counttrigger.neifa_use >= 2) return false;
},
effect: {
player_use(card, player, target) {
if (player.countSkill("neifa_use") < 2 && get.type(card) == "equip") return [1, player.countMark("neifa_nobasic")];
},
},
},
},
//许靖
yuxu: {
@ -16686,7 +16686,7 @@ const skills = {
ai: {
threaten: 1.8,
effect: {
target: function (card, player, target, current) {
target_use(card, player, target, current) {
let used = target.getHistory("useCard").length + target.getHistory("respond").length;
if (get.subtype(card) == "equip1" && !get.cardtag(card, "gifts")) {
if (player != target || !player.isPhaseUsing()) return;
@ -23894,7 +23894,7 @@ const skills = {
},
ai: {
effect: {
target: function (card) {
target_use(card) {
if (get.type(card) != "trick") return;
if (card.name == "tiesuo") return [0, 0];
if (card.name == "yihuajiemu") return [0, 1];
@ -24055,7 +24055,7 @@ const skills = {
},
ai: {
effect: {
target: function (card, player, target) {
target_use(card, player, target) {
if (get.color(card) == "black" && target.countCards("h") > 0) {
return [1, 0.5];
}
@ -26673,7 +26673,7 @@ const skills = {
},
ai: {
effect: {
target: function (card, player, target, current) {
target_use(card, player, target, current) {
if (card.name == "sha") return [1, 0.5];
},
},

View File

@ -889,7 +889,7 @@ const skills = {
},
ai: {
effect: {
player_use: function (card, player, target) {
player_use(card, player, target) {
var targets = game.filterPlayer(targetx => targetx != player && targetx.getStorage("starcanxi_xiangsi").includes(player.group));
if (!targets.length) return;
if (get.tag(card, "recover") && target == player && target.hp > 2) return 0;
@ -2249,7 +2249,7 @@ const skills = {
},
ai: {
effect: {
player: function (card, player, target) {
player_use(card, player, target) {
if (_status.event.name == "chooseToUse" && get.name(card) == "sha" && (!player.storage.counttrigger || !player.storage.counttrigger.dctingxian) && !_status._dctingxian_aiChecking) {
_status._dctingxian_aiChecking = true;
var eff = get.effect(target, { name: "sha" }, player, player);
@ -11789,7 +11789,7 @@ const skills = {
},
ai: {
effect: {
player: function (card, player, target) {
player_use(card, player, target) {
var evt = player.getLastUsed();
if (evt && evt.targets.includes(target) && (!player.storage.counttrigger || !player.storage.counttrigger.xinfu_lianpian || !player.storage.counttrigger.xinfu_lianpian < 3) && player.isPhaseUsing(player)) return [1.5, 0];
},

View File

@ -1651,7 +1651,7 @@ const skills = {
},
ai: {
effect: {
target(card, player, target) {
target_use(card, player, target) {
if (target.countCards("he") == 0) return;
if (card.name != "sha") return;
let min = 1;

View File

@ -8888,7 +8888,7 @@ const skills = {
charlotte: true,
ai: {
effect: {
player_use: function (card, player, target) {
player_use(card, player, target) {
if (
card.cards &&
card.cards.some(i => i.hasGaintag("twkujianx")) &&
@ -9519,7 +9519,7 @@ const skills = {
},
ai: {
effect: {
target: function (card, player, target, current) {
target_use(card, player, target, current) {
if (card.name == "sha" && player.hp > target.hp && get.attitude(player, target) < 0) {
var num = get.number(card);
var bs = player.getCards("h", function (cardx) {
@ -13976,7 +13976,7 @@ const skills = {
},
ai: {
effect: {
target: function (card, player, target, current, isLink) {
target_use(card, player, target, current, isLink) {
if (card.name == "sha" && !isLink) return 0.8;
},
},
@ -14317,7 +14317,7 @@ const skills = {
},
ai: {
effect: {
player: function (card, player, target) {
player_use(card, player, target) {
if (get.type(card) !== "delay" && get.type(card) !== "equip") return 1;
let za = game.findPlayer(cur => cur.hasSkill("twzhian") && (!cur.storage.counttrigger || !cur.storage.counttrigger.twzhian) && get.attitude(player, cur) <= 0);
if (za) return [0.5, -0.8];

View File

@ -1146,7 +1146,7 @@ const skills = {
},
ai: {
effect: {
player(card, player, target, current) {
player_use(card, player, target, current) {
if (get.type(card) == "trick" && player.getStorage("dcjujian_forbid").includes(target)) return "zeroplayertarget";
},
},
@ -5670,7 +5670,7 @@ const skills = {
},
ai: {
effect: {
player: (card, player, target) => {
player_use(card, player, target) {
if (get.itemtype(card) === "card" && cardx.hasGaintag("dczhaowen_tag") && get.color(card, player) === "red") return [1, 1];
},
},
@ -5737,7 +5737,7 @@ const skills = {
if (name != "phase") return false;
},
effect: {
target_use: (card, player, target) => {
target_use(card, player, target) {
if (player === target || typeof card !== "object" || get.color(card) !== "black") return;
if (target.hasSkill("jiu")) {
if (
@ -7056,7 +7056,7 @@ const skills = {
},
ai: {
effect: {
player: function (card, player, target) {
player_use(card, player, target) {
var evt = player.getLastUsed();
if (evt && evt.targets.includes(target)) return [1.5, 0];
},
@ -8630,7 +8630,7 @@ const skills = {
},
ai: {
effect: {
player_use: function (card, player, target) {
player_use(card, player, target) {
if (get.tag(card, "recover") && target.hp > 0) return 0;
if (get.tag(card, "damage")) return 0.5;
},
@ -8906,7 +8906,7 @@ const skills = {
},
ai: {
effect: {
target_use: (card, player, target) => {
target_use(card, player, target) {
if (player === target) return;
if (
game.hasPlayer2(current => {
@ -9451,7 +9451,7 @@ const skills = {
},
ai: {
effect: {
player_use: function (card, player, target) {
player_use(card, player, target) {
if (typeof card != "object") return;
var storage = player.getStorage("olddcxiangmian_countdown");
for (var i = 0; i < storage.length / 3; i++) {
@ -9553,7 +9553,7 @@ const skills = {
},
ai: {
effect: {
player_use: function (card, player, target) {
player_use(card, player, target) {
if (typeof card != "object") return;
var storage = player.getStorage("dcxiangmian_countdown");
for (var i = 0; i < storage.length / 3; i++) {
@ -13133,7 +13133,7 @@ const skills = {
},
ai: {
effect: {
player: function (card, player, target) {
player_use(card, player, target) {
if (
target &&
target.getExpansions("xinzhoufu2").length > 0 &&
@ -13988,7 +13988,7 @@ const skills = {
},
ai: {
effect: {
player_use: function (card, player, target) {
player_use(card, player, target) {
if (
typeof card == "object" &&
player == _status.currentPhase &&
@ -14985,7 +14985,7 @@ const skills = {
},
ai: {
effect: {
target_use: function (card, player, target) {
target_use(card, player, target) {
if (get.itemtype(player) !== "player" || player === target) return 1;
let num = 1,
ds = 2 + get.sgn(player.hp - target.hp);

View File

@ -930,7 +930,7 @@ const skills = {
},
ai: {
effect: {
player_use: function (card, player, target) {
player_use(card, player, target) {
if (typeof card != "object" || !player.isPhaseUsing()) return;
var hasPanjun = game.hasPlayer(function (current) {
return (
@ -1581,7 +1581,7 @@ const skills = {
pretao: true,
threaten: 1.8,
effect: {
player(card, player, target) {
player_use(card, player, target) {
if (
typeof card === "object" &&
card.name !== "shan" &&