2024-04-15 18:36:20 +00:00
|
|
|
|
import { lib, game, ui, get, ai, _status } from "../noname.js";
|
|
|
|
|
game.import("card", function () {
|
|
|
|
|
return {
|
|
|
|
|
name: "huanlekapai",
|
|
|
|
|
connect: true,
|
|
|
|
|
card: {
|
|
|
|
|
monkey: {
|
|
|
|
|
audio: true,
|
|
|
|
|
fullskin: true,
|
|
|
|
|
type: "equip",
|
|
|
|
|
subtype: "equip5",
|
|
|
|
|
skills: ["monkey"],
|
|
|
|
|
ai: {
|
|
|
|
|
basic: {
|
|
|
|
|
equipValue: 8,
|
2020-03-05 13:10:37 +00:00
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
2024-04-15 18:36:20 +00:00
|
|
|
|
mianju: {
|
|
|
|
|
audio: true,
|
|
|
|
|
fullskin: true,
|
|
|
|
|
type: "equip",
|
|
|
|
|
subtype: "equip2",
|
|
|
|
|
skills: ["mianju"],
|
|
|
|
|
ai: {
|
|
|
|
|
order: 9.5,
|
|
|
|
|
basic: {
|
|
|
|
|
equipValue: function (card, player) {
|
|
|
|
|
if (!player.isTurnedOver()) return 6;
|
|
|
|
|
if (player.isTurnedOver()) return -10;
|
2020-03-05 13:10:37 +00:00
|
|
|
|
return 0;
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
2024-04-15 18:36:20 +00:00
|
|
|
|
shoulijian: {
|
|
|
|
|
audio: true,
|
|
|
|
|
type: "basic",
|
|
|
|
|
enable: true,
|
|
|
|
|
fullskin: true,
|
|
|
|
|
outrange: {
|
|
|
|
|
global: 2,
|
2020-03-05 13:10:37 +00:00
|
|
|
|
},
|
2024-04-15 18:36:20 +00:00
|
|
|
|
filterTarget: lib.filter.notMe,
|
|
|
|
|
content: function () {
|
|
|
|
|
"step 0";
|
|
|
|
|
if (!target.countCards("he", { type: "equip" })) {
|
2020-03-05 13:10:37 +00:00
|
|
|
|
target.damage();
|
|
|
|
|
event.finish();
|
2024-04-15 18:36:20 +00:00
|
|
|
|
} else {
|
|
|
|
|
target.chooseToDiscard("he", { type: "equip" }, "弃置一张装备牌或受到1点伤害").ai =
|
|
|
|
|
function (card) {
|
|
|
|
|
var player = _status.event.player;
|
|
|
|
|
var source = _status.event.getParent().player;
|
|
|
|
|
if (get.damageEffect(player, source, player) > 0) return -1;
|
|
|
|
|
return 7 - get.value(card);
|
|
|
|
|
};
|
2020-03-05 13:10:37 +00:00
|
|
|
|
}
|
2024-04-15 18:36:20 +00:00
|
|
|
|
"step 1";
|
|
|
|
|
if (!result.bool) {
|
2020-03-05 13:10:37 +00:00
|
|
|
|
target.damage();
|
|
|
|
|
}
|
|
|
|
|
},
|
2024-04-15 18:36:20 +00:00
|
|
|
|
ai: {
|
|
|
|
|
basic: {
|
|
|
|
|
order: 9,
|
|
|
|
|
value: 6,
|
|
|
|
|
useful: 2,
|
2020-03-05 13:10:37 +00:00
|
|
|
|
},
|
2024-04-15 18:36:20 +00:00
|
|
|
|
result: {
|
|
|
|
|
target: -2,
|
2020-03-05 13:10:37 +00:00
|
|
|
|
},
|
2024-04-15 18:36:20 +00:00
|
|
|
|
tag: {
|
|
|
|
|
discard: 1,
|
|
|
|
|
damage: 1,
|
2020-03-05 13:10:37 +00:00
|
|
|
|
},
|
|
|
|
|
},
|
2024-04-15 18:36:20 +00:00
|
|
|
|
selectTarget: 1,
|
2020-03-05 13:10:37 +00:00
|
|
|
|
},
|
2024-04-15 18:36:20 +00:00
|
|
|
|
kuwu: {
|
|
|
|
|
audio: true,
|
|
|
|
|
fullskin: true,
|
|
|
|
|
type: "equip",
|
|
|
|
|
subtype: "equip1",
|
|
|
|
|
skills: ["kuwu"],
|
|
|
|
|
nomod: true,
|
|
|
|
|
nopower: true,
|
|
|
|
|
unique: true,
|
|
|
|
|
distance: {
|
|
|
|
|
attackFrom: -1,
|
2020-03-05 13:10:37 +00:00
|
|
|
|
},
|
2024-04-15 18:36:20 +00:00
|
|
|
|
ai: {
|
|
|
|
|
equipValue: 6,
|
2020-03-05 13:10:37 +00:00
|
|
|
|
},
|
|
|
|
|
},
|
2024-04-15 18:36:20 +00:00
|
|
|
|
xuelunyang: {
|
|
|
|
|
audio: true,
|
|
|
|
|
fullskin: true,
|
|
|
|
|
type: "equip",
|
|
|
|
|
subtype: "equip5",
|
|
|
|
|
skills: ["xuelunyang"],
|
|
|
|
|
ai: {
|
|
|
|
|
basic: {
|
|
|
|
|
equipValue: 8,
|
2020-03-05 13:10:37 +00:00
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
2024-04-15 18:36:20 +00:00
|
|
|
|
jiuwei: {
|
|
|
|
|
audio: true,
|
|
|
|
|
fullskin: true,
|
|
|
|
|
type: "equip",
|
|
|
|
|
subtype: "equip5",
|
|
|
|
|
skills: ["jiuwei"],
|
|
|
|
|
ai: {
|
|
|
|
|
basic: {
|
|
|
|
|
equipValue: 8,
|
2020-03-05 13:10:37 +00:00
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
2019-11-21 05:51:17 +00:00
|
|
|
|
},
|
2024-04-15 18:36:20 +00:00
|
|
|
|
skill: {
|
|
|
|
|
monkey: {
|
|
|
|
|
trigger: {
|
|
|
|
|
global: "useCardToBegin",
|
2020-03-05 13:10:37 +00:00
|
|
|
|
},
|
2024-04-15 18:36:20 +00:00
|
|
|
|
audio: true,
|
|
|
|
|
filter: function (event, player) {
|
|
|
|
|
var card = player.getEquip(5);
|
|
|
|
|
if (card) {
|
|
|
|
|
var name = card.name;
|
|
|
|
|
if (
|
|
|
|
|
name &&
|
|
|
|
|
name.indexOf("monkey") != -1 &&
|
|
|
|
|
event.name == "tao" &&
|
|
|
|
|
event.player != player &&
|
|
|
|
|
event.cards.filterInD().length > 0
|
|
|
|
|
)
|
|
|
|
|
return true;
|
2020-03-05 13:10:37 +00:00
|
|
|
|
}
|
|
|
|
|
return false;
|
|
|
|
|
},
|
2024-04-15 18:36:20 +00:00
|
|
|
|
check: function (event, player) {
|
|
|
|
|
return get.attitude(player, event.player) <= 0;
|
2020-03-05 13:10:37 +00:00
|
|
|
|
},
|
2024-04-15 18:36:20 +00:00
|
|
|
|
content: function () {
|
|
|
|
|
"step 0";
|
|
|
|
|
player.$fullscreenpop("猴子偷桃", "fire");
|
2020-03-05 13:10:37 +00:00
|
|
|
|
trigger.untrigger();
|
|
|
|
|
trigger.finish();
|
2024-04-15 18:36:20 +00:00
|
|
|
|
"step 1";
|
2020-03-05 13:10:37 +00:00
|
|
|
|
player.discard(player.getEquip(5));
|
2024-04-15 18:36:20 +00:00
|
|
|
|
"step 2";
|
|
|
|
|
player.gain(trigger.cards.filterInD(), "gain2", "log");
|
2020-03-05 13:10:37 +00:00
|
|
|
|
},
|
|
|
|
|
},
|
2024-04-15 18:36:20 +00:00
|
|
|
|
mianju: {
|
|
|
|
|
audio: true,
|
|
|
|
|
trigger: {
|
|
|
|
|
player: "turnOverBefore",
|
2020-03-05 13:10:37 +00:00
|
|
|
|
},
|
2024-04-15 18:36:20 +00:00
|
|
|
|
forced: true,
|
|
|
|
|
equipSkill: true,
|
|
|
|
|
content: function () {
|
2020-03-05 13:10:37 +00:00
|
|
|
|
trigger.cancel();
|
|
|
|
|
},
|
2024-04-15 18:36:20 +00:00
|
|
|
|
ai: {
|
|
|
|
|
noturnOver: true,
|
|
|
|
|
effect: {
|
|
|
|
|
target: function (card, player, target, current) {
|
|
|
|
|
if (get.tag(card, "turnOver")) return [0, 0];
|
2020-03-05 13:10:37 +00:00
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
2024-04-15 18:36:20 +00:00
|
|
|
|
kuwu: {
|
|
|
|
|
audio: true,
|
|
|
|
|
trigger: {
|
|
|
|
|
source: "damageSource",
|
2020-03-05 13:10:37 +00:00
|
|
|
|
},
|
2024-04-15 18:36:20 +00:00
|
|
|
|
forced: true,
|
|
|
|
|
equipSkill: true,
|
|
|
|
|
filter: function (event, player) {
|
|
|
|
|
if (event._notrigger.includes(event.player)) return false;
|
|
|
|
|
return (
|
|
|
|
|
event.card &&
|
|
|
|
|
event.card.name == "sha" &&
|
|
|
|
|
event.notLink() &&
|
|
|
|
|
event.player.countCards("he") > 0
|
|
|
|
|
);
|
2020-03-05 13:10:37 +00:00
|
|
|
|
},
|
2024-04-15 18:36:20 +00:00
|
|
|
|
content: function () {
|
|
|
|
|
trigger.player.chooseToDiscard(true, "he");
|
2020-03-05 13:10:37 +00:00
|
|
|
|
},
|
|
|
|
|
},
|
2024-04-15 18:36:20 +00:00
|
|
|
|
xuelunyang: {
|
|
|
|
|
audio: true,
|
|
|
|
|
trigger: {
|
|
|
|
|
player: "phaseBegin",
|
2020-03-05 13:10:37 +00:00
|
|
|
|
},
|
2024-04-15 18:36:20 +00:00
|
|
|
|
equipSkill: true,
|
|
|
|
|
direct: true,
|
|
|
|
|
content: function () {
|
|
|
|
|
"step 0";
|
|
|
|
|
player
|
|
|
|
|
.chooseTarget(get.prompt2("xuelunyang"), function (card, player, target) {
|
|
|
|
|
var names = [];
|
|
|
|
|
if (target.name && !target.isUnseen(0)) names.add(target.name);
|
|
|
|
|
if (target.name1 && !target.isUnseen(0)) names.add(target.name1);
|
|
|
|
|
if (target.name2 && !target.isUnseen(1)) names.add(target.name2);
|
|
|
|
|
var pss = player.getSkills();
|
|
|
|
|
for (var i = 0; i < names.length; i++) {
|
|
|
|
|
var info = lib.character[names[i]];
|
|
|
|
|
if (info) {
|
|
|
|
|
var skills = info[3];
|
|
|
|
|
for (var j = 0; j < skills.length; j++) {
|
|
|
|
|
if (
|
|
|
|
|
lib.translate[skills[j] + "_info"] &&
|
|
|
|
|
lib.skill[skills[j]] &&
|
|
|
|
|
!lib.skill[skills[j]].unique &&
|
|
|
|
|
!pss.includes(skills[j])
|
|
|
|
|
) {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
2023-10-11 03:06:27 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
2024-04-15 18:36:20 +00:00
|
|
|
|
return false;
|
2023-10-11 03:06:27 +00:00
|
|
|
|
}
|
2024-04-15 18:36:20 +00:00
|
|
|
|
})
|
|
|
|
|
.set("ai", function (target) {
|
|
|
|
|
return Math.random();
|
|
|
|
|
});
|
|
|
|
|
"step 1";
|
|
|
|
|
if (result.bool) {
|
|
|
|
|
event.target = result.targets[0];
|
|
|
|
|
player.logSkill("xuelunyang", event.target);
|
|
|
|
|
} else {
|
2023-10-11 03:06:27 +00:00
|
|
|
|
event.finish();
|
|
|
|
|
}
|
2024-04-15 18:36:20 +00:00
|
|
|
|
"step 2";
|
|
|
|
|
var names = [];
|
|
|
|
|
var list = [];
|
|
|
|
|
if (target.name && !target.isUnseen(0)) names.add(target.name);
|
|
|
|
|
if (target.name1 && !target.isUnseen(0)) names.add(target.name1);
|
|
|
|
|
if (target.name2 && !target.isUnseen(1)) names.add(target.name2);
|
|
|
|
|
var pss = player.getSkills();
|
|
|
|
|
for (var i = 0; i < names.length; i++) {
|
|
|
|
|
var info = lib.character[names[i]];
|
|
|
|
|
if (info) {
|
|
|
|
|
var skills = info[3];
|
|
|
|
|
for (var j = 0; j < skills.length; j++) {
|
|
|
|
|
if (
|
|
|
|
|
lib.translate[skills[j] + "_info"] &&
|
|
|
|
|
lib.skill[skills[j]] &&
|
|
|
|
|
!lib.skill[skills[j]].unique &&
|
|
|
|
|
!pss.includes(skills[j])
|
|
|
|
|
) {
|
2021-02-21 03:37:37 +00:00
|
|
|
|
list.push(skills[j]);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2024-04-15 18:36:20 +00:00
|
|
|
|
player
|
|
|
|
|
.chooseControl(list)
|
|
|
|
|
.set("prompt", "选择获得一个技能")
|
|
|
|
|
.set("choice", get.max(list, get.skillRank, "item"))
|
|
|
|
|
.set("ai", function () {
|
|
|
|
|
return _status.event.choice;
|
|
|
|
|
});
|
|
|
|
|
"step 3";
|
2023-10-11 03:06:27 +00:00
|
|
|
|
player.addTempSkill(result.control);
|
|
|
|
|
player.popup(result.control);
|
2024-04-15 18:36:20 +00:00
|
|
|
|
game.log(player, "获得了", "#g【" + get.translation(result.control) + "】");
|
2023-10-11 03:06:27 +00:00
|
|
|
|
},
|
|
|
|
|
},
|
2024-04-15 18:36:20 +00:00
|
|
|
|
jiuwei: {
|
|
|
|
|
trigger: {
|
|
|
|
|
player: "phaseEnd",
|
2020-03-05 13:10:37 +00:00
|
|
|
|
},
|
2024-04-15 18:36:20 +00:00
|
|
|
|
audio: true,
|
|
|
|
|
frequent: true,
|
|
|
|
|
equipSkill: true,
|
|
|
|
|
content: function () {
|
|
|
|
|
if (player.isDamaged()) {
|
2020-03-05 13:10:37 +00:00
|
|
|
|
player.recover();
|
2024-04-15 18:36:20 +00:00
|
|
|
|
} else {
|
2020-03-05 13:10:37 +00:00
|
|
|
|
player.draw();
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
},
|
2019-11-21 05:51:17 +00:00
|
|
|
|
},
|
2024-04-15 18:36:20 +00:00
|
|
|
|
translate: {
|
|
|
|
|
monkey: "猴子",
|
|
|
|
|
monkey_info:
|
|
|
|
|
"猴子偷桃:当场上有其他角色使用【桃】时,你可以弃掉【猴子】,阻止【桃】的结算并将其收为手牌。",
|
|
|
|
|
mianju: "漩涡面具",
|
|
|
|
|
mianju_info: "<font color=#f00>锁定技</font> 你的武将牌不能被翻面。",
|
|
|
|
|
shoulijian: "手里剑",
|
|
|
|
|
shoulijian_info: "出牌阶段,对一名距离1以外的角色使用,令其弃置一张装备牌或受到1点伤害。",
|
|
|
|
|
kuwu: "苦无",
|
|
|
|
|
kuwu_info: "<font color=#f00>锁定技</font> 每当你使用【杀】造成一次伤害,受伤角色须弃置一张牌。",
|
|
|
|
|
xuelunyang: "写轮眼",
|
|
|
|
|
xuelunyang_info: "回合开始阶段,你可以选择一名角色,然后获得其一项技能,直到回合结束。",
|
|
|
|
|
jiuwei: "九尾",
|
|
|
|
|
jiuwei_info: "(收集查克拉)回合结束时,若你已受伤,你可回复1点体力,否则摸一张牌。",
|
2019-11-21 05:51:17 +00:00
|
|
|
|
},
|
2024-04-15 18:36:20 +00:00
|
|
|
|
list: [
|
|
|
|
|
["diamond", "5", "monkey"],
|
|
|
|
|
["heart", "9", "jiuwei"],
|
|
|
|
|
["heart", "2", "xuelunyang"],
|
|
|
|
|
["spade", "6", "kuwu"],
|
|
|
|
|
["diamond", "4", "shoulijian"],
|
|
|
|
|
["spade", "4", "shoulijian"],
|
|
|
|
|
["club", "3", "mianju"],
|
2019-11-21 05:51:17 +00:00
|
|
|
|
],
|
2024-04-15 18:36:20 +00:00
|
|
|
|
};
|
2019-11-21 05:51:17 +00:00
|
|
|
|
});
|