拆顺ai增加蓄谋牌检测
This commit is contained in:
parent
5d47247535
commit
0ae1804afe
|
@ -2111,12 +2111,13 @@ game.import("card", function () {
|
||||||
pos = get.position(button.link),
|
pos = get.position(button.link),
|
||||||
name = get.name(button.link);
|
name = get.name(button.link);
|
||||||
if (pos == "j") {
|
if (pos == "j") {
|
||||||
if (name == "lebu") {
|
let viewAs = button.link.viewAs;
|
||||||
|
if (viewAs == "lebu") {
|
||||||
let needs = target.needsToDiscard(2);
|
let needs = target.needsToDiscard(2);
|
||||||
btv *= 1.08 + 0.2 * needs;
|
btv *= 1.08 + 0.2 * needs;
|
||||||
} else if (name == "shandian" || name == "fulei" || name == "plague") btv /= 2;
|
} else if (viewAs == "shandian" || viewAs == "fulei") btv /= 2;
|
||||||
}
|
}
|
||||||
if (get.attitude(player, get.owner(button.link)) > 0) btv = -btv;
|
if (att > 0) btv = -btv;
|
||||||
if (pos != "e") {
|
if (pos != "e") {
|
||||||
if (pos == "h" && !player.hasSkillTag("viewHandcard", null, target, true))
|
if (pos == "h" && !player.hasSkillTag("viewHandcard", null, target, true))
|
||||||
return btv + 0.1;
|
return btv + 0.1;
|
||||||
|
@ -2156,6 +2157,7 @@ game.import("card", function () {
|
||||||
return get.value(card, target) > 0 && card != target.getEquip('jinhe');
|
return get.value(card, target) > 0 && card != target.getEquip('jinhe');
|
||||||
}) && !js.some(card => {
|
}) && !js.some(card => {
|
||||||
var cardj = card.viewAs ? { name: card.viewAs } : card;
|
var cardj = card.viewAs ? { name: card.viewAs } : card;
|
||||||
|
if (cardj.name == "xumou_jsrg") return true;
|
||||||
return get.effect(target, cardj, target, player) < 0;
|
return get.effect(target, cardj, target, player) < 0;
|
||||||
})) return 0;
|
})) return 0;
|
||||||
}
|
}
|
||||||
|
@ -2164,6 +2166,7 @@ game.import("card", function () {
|
||||||
return get.value(card, target) <= 0;
|
return get.value(card, target) <= 0;
|
||||||
}) || js.some(card => {
|
}) || js.some(card => {
|
||||||
var cardj = card.viewAs ? { name: card.viewAs } : card;
|
var cardj = card.viewAs ? { name: card.viewAs } : card;
|
||||||
|
if (cardj.name == "xumou_jsrg") return false;
|
||||||
return get.effect(target, cardj, target, player) < 0;
|
return get.effect(target, cardj, target, player) < 0;
|
||||||
})) ? 1.5 : 0;
|
})) ? 1.5 : 0;
|
||||||
}
|
}
|
||||||
|
@ -2180,6 +2183,7 @@ game.import("card", function () {
|
||||||
return get.value(card, target) > 0 && card != target.getEquip('jinhe');
|
return get.value(card, target) > 0 && card != target.getEquip('jinhe');
|
||||||
}) || js.some(card => {
|
}) || js.some(card => {
|
||||||
var cardj = card.viewAs ? { name: card.viewAs } : card;
|
var cardj = card.viewAs ? { name: card.viewAs } : card;
|
||||||
|
if (cardj.name == "xumou_jsrg") return true;
|
||||||
return get.effect(target, cardj, target, player) < 0;
|
return get.effect(target, cardj, target, player) < 0;
|
||||||
})) ? -1.5 : 1.5;
|
})) ? -1.5 : 1.5;
|
||||||
}
|
}
|
||||||
|
@ -2187,6 +2191,7 @@ game.import("card", function () {
|
||||||
return get.value(card, target) <= 0;
|
return get.value(card, target) <= 0;
|
||||||
}) || js.some(card => {
|
}) || js.some(card => {
|
||||||
var cardj = card.viewAs ? { name: card.viewAs } : card;
|
var cardj = card.viewAs ? { name: card.viewAs } : card;
|
||||||
|
if (cardj.name == "xumou_jsrg") return false;
|
||||||
return get.effect(target, cardj, target, player) < 0;
|
return get.effect(target, cardj, target, player) < 0;
|
||||||
})) ? 1.5 : -1.5;
|
})) ? 1.5 : -1.5;
|
||||||
},
|
},
|
||||||
|
@ -2218,6 +2223,7 @@ game.import("card", function () {
|
||||||
}) ||
|
}) ||
|
||||||
js.some((card) => {
|
js.some((card) => {
|
||||||
var cardj = card.viewAs ? { name: card.viewAs } : card;
|
var cardj = card.viewAs ? { name: card.viewAs } : card;
|
||||||
|
if (cardj.name == "xumou_jsrg") return true;
|
||||||
return get.effect(target, cardj, target, player) < 0;
|
return get.effect(target, cardj, target, player) < 0;
|
||||||
})
|
})
|
||||||
? -1.5
|
? -1.5
|
||||||
|
@ -2228,6 +2234,7 @@ game.import("card", function () {
|
||||||
}) ||
|
}) ||
|
||||||
js.some((card) => {
|
js.some((card) => {
|
||||||
var cardj = card.viewAs ? { name: card.viewAs } : card;
|
var cardj = card.viewAs ? { name: card.viewAs } : card;
|
||||||
|
if (cardj.name == "xumou_jsrg") return false;
|
||||||
return get.effect(target, cardj, target, player) < 0;
|
return get.effect(target, cardj, target, player) < 0;
|
||||||
})
|
})
|
||||||
? 1.5
|
? 1.5
|
||||||
|
@ -2250,6 +2257,7 @@ game.import("card", function () {
|
||||||
}) &&
|
}) &&
|
||||||
!js.some((card) => {
|
!js.some((card) => {
|
||||||
var cardj = card.viewAs ? { name: card.viewAs } : card;
|
var cardj = card.viewAs ? { name: card.viewAs } : card;
|
||||||
|
if (cardj.name == "xumou_jsrg") return true;
|
||||||
return get.effect(target, cardj, target, player) < 0;
|
return get.effect(target, cardj, target, player) < 0;
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
@ -2260,6 +2268,7 @@ game.import("card", function () {
|
||||||
}) ||
|
}) ||
|
||||||
js.some((card) => {
|
js.some((card) => {
|
||||||
var cardj = card.viewAs ? { name: card.viewAs } : card;
|
var cardj = card.viewAs ? { name: card.viewAs } : card;
|
||||||
|
if (cardj.name == "xumou_jsrg") return false;
|
||||||
return get.effect(target, cardj, target, player) < 0;
|
return get.effect(target, cardj, target, player) < 0;
|
||||||
})
|
})
|
||||||
? 1.5
|
? 1.5
|
||||||
|
@ -2423,12 +2432,13 @@ game.import("card", function () {
|
||||||
pos = get.position(button.link),
|
pos = get.position(button.link),
|
||||||
name = get.name(button.link);
|
name = get.name(button.link);
|
||||||
if (pos === "j") {
|
if (pos === "j") {
|
||||||
if (name === "lebu") {
|
let viewAs = button.link.viewAs;
|
||||||
|
if (viewAs === "lebu") {
|
||||||
let needs = target.needsToDiscard(2);
|
let needs = target.needsToDiscard(2);
|
||||||
val *= 1.08 + 0.2 * needs;
|
val *= 1.08 + 0.2 * needs;
|
||||||
} else if (name == "shandian" || name == "fulei" || name == "plague") val /= 2;
|
} else if (viewAs == "shandian" || viewAs == "fulei") val /= 2;
|
||||||
}
|
}
|
||||||
if (get.attitude(player, get.owner(button.link)) > 0) val = -val;
|
if (att > 0) val = -val;
|
||||||
if (pos !== "e") return val;
|
if (pos !== "e") return val;
|
||||||
let sub = get.subtypes(button.link);
|
let sub = get.subtypes(button.link);
|
||||||
if (sub.includes("equip1")) return (val * Math.min(3.6, target.hp)) / 3;
|
if (sub.includes("equip1")) return (val * Math.min(3.6, target.hp)) / 3;
|
||||||
|
@ -2466,6 +2476,7 @@ game.import("card", function () {
|
||||||
if (att > 0) {
|
if (att > 0) {
|
||||||
if (js.some(card => {
|
if (js.some(card => {
|
||||||
const cardj = card.viewAs ? { name: card.viewAs } : card;
|
const cardj = card.viewAs ? { name: card.viewAs } : card;
|
||||||
|
if (cardj.name == "xumou_jsrg") return false;
|
||||||
return get.effect(target, cardj, target, player) < 0;
|
return get.effect(target, cardj, target, player) < 0;
|
||||||
})) return 3;
|
})) return 3;
|
||||||
if (target.isDamaged() && es.some(card => card.name == 'baiyin') &&
|
if (target.isDamaged() && es.some(card => card.name == 'baiyin') &&
|
||||||
|
@ -2485,6 +2496,7 @@ game.import("card", function () {
|
||||||
}));
|
}));
|
||||||
const noj = (js.length == 0 || !js.some(card => {
|
const noj = (js.length == 0 || !js.some(card => {
|
||||||
const cardj = card.viewAs ? { name: card.viewAs } : card;
|
const cardj = card.viewAs ? { name: card.viewAs } : card;
|
||||||
|
if (cardj.name == "xumou_jsrg") return true;
|
||||||
return get.effect(target, cardj, target, player) < 0;
|
return get.effect(target, cardj, target, player) < 0;
|
||||||
}))
|
}))
|
||||||
if (noh && noe2 && noj) return 1.5;
|
if (noh && noe2 && noj) return 1.5;
|
||||||
|
@ -2518,6 +2530,7 @@ game.import("card", function () {
|
||||||
if (
|
if (
|
||||||
js.some((card) => {
|
js.some((card) => {
|
||||||
const cardj = card.viewAs ? { name: card.viewAs } : card;
|
const cardj = card.viewAs ? { name: card.viewAs } : card;
|
||||||
|
if (cardj.name == "xumou_jsrg") return false;
|
||||||
return get.effect(target, cardj, target, player) < 0;
|
return get.effect(target, cardj, target, player) < 0;
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
@ -2548,6 +2561,7 @@ game.import("card", function () {
|
||||||
js.length == 0 ||
|
js.length == 0 ||
|
||||||
!js.some((card) => {
|
!js.some((card) => {
|
||||||
const cardj = card.viewAs ? { name: card.viewAs } : card;
|
const cardj = card.viewAs ? { name: card.viewAs } : card;
|
||||||
|
if (cardj.name == "xumou_jsrg") return true;
|
||||||
return get.effect(target, cardj, target, player) < 0;
|
return get.effect(target, cardj, target, player) < 0;
|
||||||
});
|
});
|
||||||
if (noh && noe2 && noj) return 1.5;
|
if (noh && noe2 && noj) return 1.5;
|
||||||
|
|
|
@ -61,7 +61,7 @@ game.import("card", function () {
|
||||||
var base = 0;
|
var base = 0;
|
||||||
if (get.cardtag(card, "yingbian_all")) {
|
if (get.cardtag(card, "yingbian_all")) {
|
||||||
if (
|
if (
|
||||||
targets.filter(function (current) {
|
targets.some(function (current) {
|
||||||
var att = get.attitude(player, current);
|
var att = get.attitude(player, current);
|
||||||
if (att <= 0)
|
if (att <= 0)
|
||||||
return (
|
return (
|
||||||
|
@ -74,7 +74,7 @@ game.import("card", function () {
|
||||||
return get.position(card) == "j" || get.value(card, current) <= 0;
|
return get.position(card) == "j" || get.value(card, current) <= 0;
|
||||||
}) > 1
|
}) > 1
|
||||||
);
|
);
|
||||||
}).length
|
})
|
||||||
)
|
)
|
||||||
base += 6;
|
base += 6;
|
||||||
}
|
}
|
||||||
|
@ -138,13 +138,11 @@ game.import("card", function () {
|
||||||
? -1.5
|
? -1.5
|
||||||
: 1.5;
|
: 1.5;
|
||||||
var js = target.getCards("j");
|
var js = target.getCards("j");
|
||||||
if (js.length) {
|
if (js.length && js.some(i => {
|
||||||
var jj = js[0].viewAs ? { name: js[0].viewAs } : js[0];
|
let cardj = i.viewAs ? { name: i.viewAs } : i;
|
||||||
if (js.length == 1 && get.effect(target, jj, target, player) >= 0) {
|
if (cardj.name == "xumou_jsrg") return false;
|
||||||
return -1.5;
|
return get.effect(target, cardj, target, player) < 0;
|
||||||
}
|
})) return 3;
|
||||||
return 3;
|
|
||||||
}
|
|
||||||
return -1.5;
|
return -1.5;
|
||||||
},
|
},
|
||||||
player: function (player, target) {
|
player: function (player, target) {
|
||||||
|
@ -159,13 +157,11 @@ game.import("card", function () {
|
||||||
}
|
}
|
||||||
if (get.attitude(player, target) > 1) {
|
if (get.attitude(player, target) > 1) {
|
||||||
var js = target.getCards("j");
|
var js = target.getCards("j");
|
||||||
if (js.length) {
|
if (js.length && js.some(i => {
|
||||||
var jj = js[0].viewAs ? { name: js[0].viewAs } : js[0];
|
let cardj = i.viewAs ? { name: i.viewAs } : i;
|
||||||
if (js.length == 1 && get.effect(target, jj, target, player) >= 0) {
|
if (cardj.name == "xumou_jsrg") return false;
|
||||||
return 0;
|
return get.effect(target, cardj, target, player) < 0;
|
||||||
}
|
})) return 1;
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
|
|
Loading…
Reference in New Issue