commit
bef0f50844
|
@ -3947,12 +3947,6 @@ const skills = {
|
||||||
//裴元绍
|
//裴元绍
|
||||||
dcmoyu: {
|
dcmoyu: {
|
||||||
audio: 2,
|
audio: 2,
|
||||||
init() {
|
|
||||||
game.addGlobalSkill("dcmoyu_ai");
|
|
||||||
},
|
|
||||||
onremove() {
|
|
||||||
if (!game.hasPlayer(i => i.hasSkill("dcmoyu"), true)) game.removeGlobalSkill("dcmoyu_ai");
|
|
||||||
},
|
|
||||||
enable: "phaseUse",
|
enable: "phaseUse",
|
||||||
filter(event, player) {
|
filter(event, player) {
|
||||||
return game.hasPlayer(current => lib.skill.dcmoyu.filterTarget(null, player, current));
|
return game.hasPlayer(current => lib.skill.dcmoyu.filterTarget(null, player, current));
|
||||||
|
@ -3962,7 +3956,7 @@ const skills = {
|
||||||
},
|
},
|
||||||
async content(event, trigger, player) {
|
async content(event, trigger, player) {
|
||||||
const target = event.target;
|
const target = event.target;
|
||||||
player.addTempSkill("dcmoyu_clear");
|
player.addTempSkill("dcmoyu_clear", "phaseUseAfter");
|
||||||
player.markAuto("dcmoyu_clear", [target]);
|
player.markAuto("dcmoyu_clear", [target]);
|
||||||
await player.gainPlayerCard(target, "hej", true, 1 + player.hasSkill("dcmoyu_add"));
|
await player.gainPlayerCard(target, "hej", true, 1 + player.hasSkill("dcmoyu_add"));
|
||||||
player.removeSkill("dcmoyu_add");
|
player.removeSkill("dcmoyu_add");
|
||||||
|
@ -3979,10 +3973,6 @@ const skills = {
|
||||||
return lib.filter.targetEnabled.apply(this, arguments);
|
return lib.filter.targetEnabled.apply(this, arguments);
|
||||||
})
|
})
|
||||||
.set("sourcex", player)
|
.set("sourcex", player)
|
||||||
.set("num", num)
|
|
||||||
.set("oncard", card => {
|
|
||||||
_status.event.baseDamage = _status.event.getParent().num;
|
|
||||||
})
|
|
||||||
.forResult();
|
.forResult();
|
||||||
if (result.bool) {
|
if (result.bool) {
|
||||||
if (
|
if (
|
||||||
|
@ -3991,11 +3981,13 @@ const skills = {
|
||||||
})
|
})
|
||||||
) {
|
) {
|
||||||
player.tempBanSkill("dcmoyu");
|
player.tempBanSkill("dcmoyu");
|
||||||
|
player.addTempSkill("dcmoyu_ban");
|
||||||
} else {
|
} else {
|
||||||
player.addTempSkill("dcmoyu_add", "phaseChange");
|
player.addTempSkill("dcmoyu_add", "phaseChange");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
global: "dcmoyu_ai",
|
||||||
subSkill: {
|
subSkill: {
|
||||||
clear: {
|
clear: {
|
||||||
charlotte: true,
|
charlotte: true,
|
||||||
|
@ -4004,7 +3996,7 @@ const skills = {
|
||||||
ban: {
|
ban: {
|
||||||
charlotte: true,
|
charlotte: true,
|
||||||
mark: true,
|
mark: true,
|
||||||
marktext: "欲",
|
marktext: '<span style="text-decoration: line-through;">欲</span>',
|
||||||
intro: { content: "偷马贼被反打了!" },
|
intro: { content: "偷马贼被反打了!" },
|
||||||
},
|
},
|
||||||
add: {
|
add: {
|
||||||
|
@ -4014,15 +4006,6 @@ const skills = {
|
||||||
intro: { content: "欲望加速,下次抢两张!" },
|
intro: { content: "欲望加速,下次抢两张!" },
|
||||||
},
|
},
|
||||||
ai: {
|
ai: {
|
||||||
trigger: { player: "dieAfter" },
|
|
||||||
filter: () => {
|
|
||||||
return !game.hasPlayer(i => i.hasSkill("dcmoyu"), true);
|
|
||||||
},
|
|
||||||
silent: true,
|
|
||||||
forceDie: true,
|
|
||||||
content: () => {
|
|
||||||
game.removeGlobalSkill("dcmoyu_ai");
|
|
||||||
},
|
|
||||||
ai: {
|
ai: {
|
||||||
effect: {
|
effect: {
|
||||||
target: function (card, player, target, current) {
|
target: function (card, player, target, current) {
|
||||||
|
|
|
@ -688,6 +688,7 @@ const skills = {
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
async content(event, trigger, player) {
|
async content(event, trigger, player) {
|
||||||
|
player.awakenSkill("jsrgjiebing");
|
||||||
await player.gainMaxHp(2);
|
await player.gainMaxHp(2);
|
||||||
await player.recover(2);
|
await player.recover(2);
|
||||||
await player.addSkills("jsrgbaowei");
|
await player.addSkills("jsrgbaowei");
|
||||||
|
@ -9311,7 +9312,7 @@ const skills = {
|
||||||
aiValue: (player, card, num) => {
|
aiValue: (player, card, num) => {
|
||||||
if (num > 0 && get.itemtype(card) === "card" && card.name !== "zhuge" && get.subtype(card) === "equip1" && !player.getEquip(1)) return 0.01 * num;
|
if (num > 0 && get.itemtype(card) === "card" && card.name !== "zhuge" && get.subtype(card) === "equip1" && !player.getEquip(1)) return 0.01 * num;
|
||||||
},
|
},
|
||||||
aiUseful: () => {
|
aiUseful: function () {
|
||||||
return lib.skill.jsrgzhenqiao.mod.aiValue.apply(this, arguments);
|
return lib.skill.jsrgzhenqiao.mod.aiValue.apply(this, arguments);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -115,7 +115,7 @@ const skills = {
|
||||||
let cards = [];
|
let cards = [];
|
||||||
if (event.name == "cardsDiscard") {
|
if (event.name == "cardsDiscard") {
|
||||||
const evt = event.getParent().relatedEvent;
|
const evt = event.getParent().relatedEvent;
|
||||||
if (evt && evt.name == "judge" && evt.player == player) {
|
if (evt && evt.name == "judge" && evt.player != player) {
|
||||||
cards.addArray(event.cards.filter(i => get.position(i, true) == "d"));
|
cards.addArray(event.cards.filter(i => get.position(i, true) == "d"));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -1419,33 +1419,28 @@ const skills = {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 4: {
|
case 4: {
|
||||||
let map = {};
|
const result = await player
|
||||||
game.dead.forEach(target => (map[target.playerid] = get.translation(target)));
|
.chooseTarget(
|
||||||
const {
|
"行殇:请选择一名已阵亡角色",
|
||||||
result: { control },
|
(card, player, target) => {
|
||||||
} = await player
|
return target.isDead();
|
||||||
.chooseControl(Object.values(map))
|
},
|
||||||
.set("ai", () => {
|
true,
|
||||||
const getNum = target => {
|
"获得一名已阵亡角色的所有技能,然后失去〖行殇〗〖放逐〗〖颂威〗"
|
||||||
let num = 0;
|
)
|
||||||
if (target.name && lib.character[target.name]) num += get.rank(target.name, true);
|
.set("ai", target => {
|
||||||
if (target.name2 && lib.character[target.name2]) num += get.rank(target.name2, true);
|
return ["name", "name1", "name2"].reduce((sum, name) => {
|
||||||
return num;
|
if (!target[name] || !lib.character[target[name]] || (name == "name1" && target.name1 == target.name)) return sum;
|
||||||
};
|
return sum + get.rank(target[name], true);
|
||||||
let controls = _status.event.controls.slice();
|
}, 0);
|
||||||
controls = controls.map(name => [name, game.dead.find(target => _status.event.map[target.playerid] == name)]);
|
|
||||||
controls.sort((a, b) => getNum(b[1]) - getNum(a[1]));
|
|
||||||
return controls[0][0];
|
|
||||||
})
|
})
|
||||||
.set("prompt", "获得一名已阵亡角色的所有技能")
|
.set("deadTarget", true)
|
||||||
.set("map", map);
|
.forResult();
|
||||||
if (control) {
|
if (result.bool) {
|
||||||
const target2 = game.dead.find(targetx => map[targetx.playerid] == control);
|
const target2 = result.targets[0];
|
||||||
player.line(target2);
|
player.line(target2);
|
||||||
game.log(player, "选择了", target2);
|
game.log(player, "选择了", target2);
|
||||||
const skills = target2.getStockSkills(true, true);
|
await player.changeSkills(target2.getStockSkills(true, true), ["sbxingshang", "sbfangzhu", "sbsongwei"]);
|
||||||
const skills2 = ["sbxingshang", "sbfangzhu", "sbsongwei"];
|
|
||||||
player.changeSkills(skills, skills2);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1485,7 +1480,7 @@ const skills = {
|
||||||
case 3:
|
case 3:
|
||||||
return str + "移去5个“颂”标记,令一名体力上限小于10的角色加1点体力上限并回复1点体力,然后随机恢复一个被废除的装备栏";
|
return str + "移去5个“颂”标记,令一名体力上限小于10的角色加1点体力上限并回复1点体力,然后随机恢复一个被废除的装备栏";
|
||||||
case 4:
|
case 4:
|
||||||
return str + "移去5个“颂”标记,获得一名已阵亡角色的所有技能,然后失去武将牌上的所有技能";
|
return str + "移去5个“颂”标记,获得一名已阵亡角色的所有技能,然后失去〖行殇〗〖放逐〗〖颂威〗";
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
const characters = {
|
const characters = {
|
||||||
caimao: ["male", "wei", 4, ["olzuolian", "oljingzhou"]],
|
caimao: ["male", "wei", 4, ["olzuolian", "oljingzhou"]],
|
||||||
ol_peixiu: ["male", "wei", 3, ["olmaozhu", "oljinlan"]],
|
ol_peixiu: ["male", "wei", 4, ["olmaozhu", "oljinlan"]],
|
||||||
yadan: ["male", "qun", 4, ["olqingya", "oltielun"]],
|
yadan: ["male", "qun", 4, ["olqingya", "oltielun"]],
|
||||||
sp_sunce: ["male", "qun", 4, ["olliantao"]],
|
sp_sunce: ["male", "qun", 4, ["olliantao"]],
|
||||||
ol_liupi: ["male", "qun", 4, ["olyicheng"]],
|
ol_liupi: ["male", "qun", 4, ["olyicheng"]],
|
||||||
|
|
|
@ -663,7 +663,7 @@ const skills = {
|
||||||
cards = moved[0].slice();
|
cards = moved[0].slice();
|
||||||
if (cards.length) {
|
if (cards.length) {
|
||||||
await game.cardsGotoOrdering(cards);
|
await game.cardsGotoOrdering(cards);
|
||||||
for (let i = cards.length - 1; i--; i >= 0) {
|
for (let i = cards.length - 1; i >= 0; i--) {
|
||||||
ui.cardPile.insertBefore(cards[i], ui.cardPile.firstChild);
|
ui.cardPile.insertBefore(cards[i], ui.cardPile.firstChild);
|
||||||
}
|
}
|
||||||
game.log(cards, "被放回了牌堆顶");
|
game.log(cards, "被放回了牌堆顶");
|
||||||
|
@ -687,7 +687,7 @@ const skills = {
|
||||||
cards = hs.slice();
|
cards = hs.slice();
|
||||||
if (cards.length) {
|
if (cards.length) {
|
||||||
await game.cardsGotoOrdering(cards);
|
await game.cardsGotoOrdering(cards);
|
||||||
for (let i = cards.length - 1; i--; i >= 0) {
|
for (let i = cards.length - 1; i >= 0; i--) {
|
||||||
ui.cardPile.insertBefore(cards[i], ui.cardPile.firstChild);
|
ui.cardPile.insertBefore(cards[i], ui.cardPile.firstChild);
|
||||||
}
|
}
|
||||||
game.log(cards, "被放回了牌堆顶");
|
game.log(cards, "被放回了牌堆顶");
|
||||||
|
|
|
@ -240,6 +240,7 @@ const skills = {
|
||||||
selectCard: 2,
|
selectCard: 2,
|
||||||
position: "hes",
|
position: "hes",
|
||||||
viewAs: { name: "juedou" },
|
viewAs: { name: "juedou" },
|
||||||
|
selectTarget: 2,
|
||||||
viewAsFilter(player) {
|
viewAsFilter(player) {
|
||||||
if (player.countCards("hes") < 2) return false;
|
if (player.countCards("hes") < 2) return false;
|
||||||
},
|
},
|
||||||
|
|
|
@ -208,8 +208,8 @@ const translates = {
|
||||||
stddaizui: "戴罪",
|
stddaizui: "戴罪",
|
||||||
stddaizui_info: "锁定技,当你受到伤害后,你视为本轮未发动过〖盗书〗。",
|
stddaizui_info: "锁定技,当你受到伤害后,你视为本轮未发动过〖盗书〗。",
|
||||||
stdxiongxia: "凶侠",
|
stdxiongxia: "凶侠",
|
||||||
stdxiongxia_info: "你可以将两张牌当作【决斗】使用。你以此法使用的【决斗】结算完毕后,若所有目标角色都受到了此牌造成的伤害,则〖凶侠〗于本回合失效。",
|
stdxiongxia_info: "你可以将两张牌当作【决斗】对两名其他角色使用。你以此法使用的【决斗】结算完毕后,若所有目标角色都受到了此牌造成的伤害,则〖凶侠〗于本回合失效。",
|
||||||
stdhuizhan: "挥战",
|
stdhuizhan: "挥戟",
|
||||||
stdhuizhan_info: "你使用【杀】可以额外指定至多两个目标。若如此做,目标角色响应此【杀】时,其他目标角色可以代替其使用【闪】。",
|
stdhuizhan_info: "你使用【杀】可以额外指定至多两个目标。若如此做,目标角色响应此【杀】时,其他目标角色可以代替其使用【闪】。",
|
||||||
stdmingfa: "明伐",
|
stdmingfa: "明伐",
|
||||||
stdmingfa_info: "出牌阶段,你可以对一名体力值大于1的角色造成1点伤害,然后此技能失效直至其死亡或回复体力。",
|
stdmingfa_info: "出牌阶段,你可以对一名体力值大于1的角色造成1点伤害,然后此技能失效直至其死亡或回复体力。",
|
||||||
|
|
|
@ -798,6 +798,7 @@ const skills = {
|
||||||
subSkill: {
|
subSkill: {
|
||||||
g: {
|
g: {
|
||||||
audio: "dcwuyou",
|
audio: "dcwuyou",
|
||||||
|
forceaudio: true,
|
||||||
enable: "phaseUse",
|
enable: "phaseUse",
|
||||||
usable: 1,
|
usable: 1,
|
||||||
filter(event, player) {
|
filter(event, player) {
|
||||||
|
@ -934,6 +935,10 @@ const skills = {
|
||||||
if (!card.cards) return;
|
if (!card.cards) return;
|
||||||
if (card.cards.some(card => card.hasGaintag("dcwuyou_transfer"))) return Infinity;
|
if (card.cards.some(card => card.hasGaintag("dcwuyou_transfer"))) return Infinity;
|
||||||
},
|
},
|
||||||
|
targetInRange(card, player) {
|
||||||
|
if (!card.cards) return;
|
||||||
|
if (card.cards.some(card => card.hasGaintag("dcwuyou_transfer"))) return true;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -1049,7 +1054,7 @@ const skills = {
|
||||||
result: {
|
result: {
|
||||||
player(player) {
|
player(player) {
|
||||||
const enemies = game.filterPlayer(current => {
|
const enemies = game.filterPlayer(current => {
|
||||||
return get.rawAttitude(player, current) < 0 && get.attitude(player, current) >= 0;
|
return (!get.rawAttitude || get.rawAttitude(player, current) < 0) && get.attitude(player, current) >= 0;
|
||||||
}),
|
}),
|
||||||
knownEnemies = game.filterPlayer(current => {
|
knownEnemies = game.filterPlayer(current => {
|
||||||
return get.attitude(player, current) < 0;
|
return get.attitude(player, current) < 0;
|
||||||
|
|
Loading…
Reference in New Issue