胡遵bugfix

This commit is contained in:
copcap 2024-04-27 16:20:08 +08:00
parent 96c3c77163
commit d05b087291
No known key found for this signature in database
GPG Key ID: 30E7AB6699451AEE
1 changed files with 4 additions and 6 deletions

View File

@ -1890,19 +1890,17 @@ game.import("character", function () {
logTarget: "player", logTarget: "player",
async content(event, trigger, player) { async content(event, trigger, player) {
player player
.judge((card) => { .judge(card => {
const evt = get.event().getParent(get.event("eventName")).getTrigger(); const evt = get.event().getParent(get.event("eventName")).getTrigger();
if (!evt.source.isIn() || !evt.card || typeof get.number(evt.card) !== "number") if (!evt.source || !evt.source.isIn() || !evt.card || typeof get.number(evt.card) !== "number") return 0;
return 0;
if (get.number(card) > get.number(evt.card)) return 1.5; if (get.number(card) > get.number(evt.card)) return 1.5;
return 0; return 0;
}) })
.set("judge2", (r) => r.bool) .set("judge2", r => r.bool)
.set("callback", () => { .set("callback", () => {
const evtx = event.getParent(); const evtx = event.getParent();
const evt = event.getParent(evtx.eventName).getTrigger(); const evt = event.getParent(evtx.eventName).getTrigger();
if (!evt.source.isIn() || !evt.card || typeof get.number(evt.card) !== "number") if (!evt.source || !evt.source.isIn() || !evt.card || typeof get.number(evt.card) !== "number") return;
return;
if (event.judgeResult.number > get.number(evt.card)) { if (event.judgeResult.number > get.number(evt.card)) {
const sha = new lib.element.VCard({ name: "sha" }), const sha = new lib.element.VCard({ name: "sha" }),
target = evt.source; target = evt.source;