牵招 涉及改判技能时bug修复

This commit is contained in:
Spmario233 2024-05-05 17:45:15 +08:00
parent 9e674d4124
commit 20022976f3
1 changed files with 19 additions and 23 deletions

View File

@ -3406,30 +3406,28 @@ const skills = {
return player.hasCard(card => lib.filter.cardDiscardable(card, player), "he");
},
check: function (card) {
var player = _status.event.player;
var player = get.player();
return (5 - get.value(card)) / Math.pow(Math.max(0.1, player.getUseValue(card)), 0.33);
},
content: function () {
"step 0";
player
.judge(card => {
var evt = _status.event.getParent();
var cardx = evt.cards[0];
if (get.type2(card) == get.type2(cardx)) return 0.5;
return 0.1;
})
.set("callback", function () {
var card = event.judgeResult.card;
player.addTempSkill("olweifu_clear");
player.addTempSkill("olweifu_add");
if (!get.is.object(player.storage.olweifu_add)) player.storage.olweifu_add = {};
var type = get.type2(card, player);
if (typeof player.storage.olweifu_add[type] != "number") player.storage.olweifu_add[type] = 0;
player.storage.olweifu_add[type]++;
player.markSkill("olweifu_add");
if (type == get.type2(event.getParent(2).cards[0], player)) player.draw();
})
.set("judge2", result => result.bool);
player.judge(card => {
var evt = get.event().getParent("olweifu");
if (evt.name !== "olweifu") return 0;
var cardx = evt.cards[0];
if (get.type2(card) == get.type2(cardx)) return 0.5;
return 0.1;
}).set("callback", function () {
var card = event.judgeResult.card;
player.addTempSkill("olweifu_clear");
player.addTempSkill("olweifu_add");
if (!get.is.object(player.storage.olweifu_add)) player.storage.olweifu_add = {};
var type = get.type2(card, player);
if (typeof player.storage.olweifu_add[type] != "number") player.storage.olweifu_add[type] = 0;
player.storage.olweifu_add[type]++;
player.markSkill("olweifu_add");
if (type == get.type2(event.getParent(2).cards[0], player)) player.draw();
}).set("judge2", result => result.bool);
},
ai: {
order: 7,
@ -3447,9 +3445,7 @@ const skills = {
1 >
(get.is.object(player.storage.olweifu_add) ? player.storage.olweifu_add[type] || 0 : 0)
);
}, "hs")
? 1
: 0;
}, "hs") ? 1 : 0;
},
},
},