Merge pull request #1410 from PZ157/PR-Branch

ai修复
This commit is contained in:
Spmario233 2024-05-31 18:00:43 +08:00 committed by GitHub
commit 0a0dedd091
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 39 additions and 42 deletions

View File

@ -608,6 +608,12 @@ game.import("card", function () {
if (target !== _status.event.dying) {
if (
!player.isPhaseUsing() ||
player.needsToDiscard(0, (i, player) => {
return (
!player.canIgnoreHandcard(i) &&
taos.includes(i)
);
}) ||
player.hasSkillTag(
"nokeep",
true,
@ -619,7 +625,7 @@ game.import("card", function () {
)
)
return 2;
let min = 7.2 - (4 * player.hp) / player.maxHp,
let min = 8.1 - (4.5 * player.hp) / player.maxHp,
nd = player.needsToDiscard(0, (i, player) => {
return (
!player.canIgnoreHandcard(i) &&

View File

@ -5210,6 +5210,19 @@ const skills = {
subSkill: {
used: {},
},
ai: {
effect: {
target(card, player, target) {
if (get.tag(card, "save")) {
if (_status.currentPhase == player) return 0;
if (target.maxHp > 1 && player != target) return 0;
}
if (get.tag(card, "recover")) {
if (_status.currentPhase == player) return 0;
}
},
},
}
},
nsshishou: {
trigger: { player: "loseEnd" },
@ -5241,18 +5254,7 @@ const skills = {
},
},
ai: {
halfneg: true,
effect: {
target(card, player, target) {
if (get.tag(card, "save")) {
if (_status.currentPhase == player) return 0;
if (target.maxHp > 1 && player != target) return 0;
}
if (get.tag(card, "recover")) {
if (_status.currentPhase == player) return 0;
}
},
},
neg: true,
},
},
nsduijue: {

View File

@ -5769,22 +5769,25 @@ const skills = {
notemp: true,
effect: {
target: (card, player, target) => {
if (!get.tag(card, "damage") || !target.hasFriend()) return;
if (player.hasSkillTag("jueqing", null, target)) return 1.7;
if (!target.hasFriend()) return;
let rec = get.tag(card, "recover"), damage = get.tag(card, "damage");
if (!rec && !damage) return;
if (damage && player.hasSkillTag("jueqing", null, target)) return 1.7;
let die = [null, 1],
temp;
game.filterPlayer(i => {
temp = i.countMark("new_wuhun");
if (i === player && target.hp + target.hujia > 1) temp++;
if (temp >= die[1]) {
if (temp > die[1]) die = [i, temp];
else if (temp === die[1]) {
if (!die[0]) die = [i, temp];
else {
let att = get.attitude(player, i);
if (att < die[1]) die = [i, temp];
}
else if (get.attitude(target, i) < get.attitude(target, die[0])) die = [i, temp];
}
});
if (die[0]) return [1, 0, 1, (-6 * get.sgnAttitude(player, die[0])) / Math.max(1, target.hp)];
if (die[0]) {
if (damage) return [1, 0, 1, (-6 * get.sgnAttitude(player, die[0])) / Math.max(1, target.hp)];
return [1, (6 * get.sgnAttitude(player, die[0])) / Math.max(1, target.hp)];
}
},
},
},
@ -6733,7 +6736,7 @@ const skills = {
target(card, player, target, current) {
if (player.getHp() <= 0) return;
if (!target.hasFriend()) return;
if (target.hp <= 1 && get.tag(card, "damage")) return [1, 0, 0, -2];
if (target.hp <= 1 && get.tag(card, "damage")) return [1, 0, 0, -2 * player.getHp()];
},
},
},

View File

@ -2200,17 +2200,6 @@ game.import("character", function () {
content() {
trigger.num++;
},
},
qingtian_old: {
trigger: { player: "recoverBefore" },
forced: true,
filter(event, player) {
return player.hp > 0 && event.num > 0;
},
content() {
trigger.cancel();
player.changeHujia(trigger.num);
},
ai: {
neg: true,
},

View File

@ -4049,7 +4049,6 @@ const skills = {
},
ai: {
threaten: 2.5,
halfneg: true,
},
subSkill: {
block: {
@ -16128,7 +16127,7 @@ const skills = {
player.draw(event.num);
},
ai: {
halfneg: true,
neg: true,
},
},
yixiang: {

View File

@ -1891,7 +1891,7 @@ const skills = {
player.markAuto("sbyijue_effect", [trigger.player]);
},
ai: {
halfneg: true,
neg: true,
},
marktext: "绝",
intro: { content: "已放$一马" },
@ -7407,7 +7407,6 @@ const skills = {
ai: {
threaten: 3.5,
directHit_ai: true,
halfneg: true,
skillTagFilter: function (player, tag, arg) {
if (arg && arg.card && arg.card.name == "sha") {
var storage = player.getStorage("sbliegong");

View File

@ -7399,7 +7399,7 @@ const skills = {
},
ai: {
threaten: 0.8,
halfneg: true,
neg: true,
effect: {
player_use(card, player, target) {
if ((!card.isCard || !card.cards) && get.itemtype(card) != "card") return;
@ -7751,7 +7751,7 @@ const skills = {
}
},
ai: {
halfneg: true,
neg: true,
},
subSkill: {
swap: {
@ -9700,7 +9700,6 @@ const skills = {
},
ai: {
halfneg: true,
combo: "fenrui",
threaten: 3.2,
},
},

View File

@ -3348,7 +3348,7 @@ const skills = {
}
},
ai: {
halfneg: true,
neg: true,
},
},
xiongrao: {

View File

@ -5963,7 +5963,7 @@ const skills = {
trigger.num++;
},
ai: {
halfneg: true,
neg: true,
},
},
huisheng: {