fix: format.
This commit is contained in:
parent
e78f942335
commit
15d15cdc69
|
@ -1,6 +1,6 @@
|
||||||
window.noname_character_rank = {
|
window.noname_character_rank = {
|
||||||
s: [
|
s: [
|
||||||
'sp_sunce',
|
"sp_sunce",
|
||||||
"gjqt_bailitusu",
|
"gjqt_bailitusu",
|
||||||
"gjqt_beiluo",
|
"gjqt_beiluo",
|
||||||
"gjqt_xieyi",
|
"gjqt_xieyi",
|
||||||
|
@ -1720,7 +1720,7 @@ window.noname_character_rank = {
|
||||||
],
|
],
|
||||||
rarity: {
|
rarity: {
|
||||||
legend: [
|
legend: [
|
||||||
'sp_sunce',
|
"sp_sunce",
|
||||||
"star_caoren",
|
"star_caoren",
|
||||||
"dc_zhaoyun",
|
"dc_zhaoyun",
|
||||||
"dc_caocao",
|
"dc_caocao",
|
||||||
|
|
308
character/sp.js
308
character/sp.js
|
@ -143,7 +143,7 @@ game.import("character", function () {
|
||||||
"sp_zhangliao",
|
"sp_zhangliao",
|
||||||
"sp_ol_zhanghe",
|
"sp_ol_zhanghe",
|
||||||
"sp_menghuo",
|
"sp_menghuo",
|
||||||
'sp_sunce',
|
"sp_sunce",
|
||||||
],
|
],
|
||||||
sp_qifu: [
|
sp_qifu: [
|
||||||
"ol_feiyi",
|
"ol_feiyi",
|
||||||
|
@ -184,12 +184,12 @@ game.import("character", function () {
|
||||||
ol_mengda(mode) {
|
ol_mengda(mode) {
|
||||||
return mode !== "guozhan";
|
return mode !== "guozhan";
|
||||||
},
|
},
|
||||||
ol_mengda(mode){
|
ol_mengda(mode) {
|
||||||
return mode!=='guozhan';
|
return mode !== "guozhan";
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
character: {
|
character: {
|
||||||
sp_sunce:['male','qun',4,['olliantao']],
|
sp_sunce: ["male", "qun", 4, ["olliantao"]],
|
||||||
ol_liupi: ["male", "qun", 4, ["olyicheng"]],
|
ol_liupi: ["male", "qun", 4, ["olyicheng"]],
|
||||||
ol_lukai: ["male", "wu", 3, ["olxuanzhu", "oljiane"]],
|
ol_lukai: ["male", "wu", 3, ["olxuanzhu", "oljiane"]],
|
||||||
liupan: ["male", "qun", 4, ["olpijing"]],
|
liupan: ["male", "qun", 4, ["olpijing"]],
|
||||||
|
@ -968,117 +968,177 @@ game.import("character", function () {
|
||||||
},
|
},
|
||||||
skill: {
|
skill: {
|
||||||
//SP孙策
|
//SP孙策
|
||||||
olliantao:{
|
olliantao: {
|
||||||
audio:2,
|
audio: 2,
|
||||||
trigger:{player:'phaseUseBegin'},
|
trigger: { player: "phaseUseBegin" },
|
||||||
filter(event,player){
|
filter(event, player) {
|
||||||
return game.hasPlayer(target=>target!=player);
|
return game.hasPlayer((target) => target != player);
|
||||||
},
|
},
|
||||||
async cost(event,trigger,player){
|
async cost(event, trigger, player) {
|
||||||
event.result=await player.chooseTarget(get.prompt2('olliantao'),lib.filter.notMe).set('ai',target=>{
|
event.result = await player
|
||||||
const player=get.event('player'),att=get.attitude(player,target);
|
.chooseTarget(get.prompt2("olliantao"), lib.filter.notMe)
|
||||||
const colors=Object.keys(lib.color).filter(i=>i!='none');
|
.set("ai", (target) => {
|
||||||
if(!colors.some(color=>player.hasCard(card=>{
|
const player = get.event("player"),
|
||||||
const juedou=get.autoViewAs({name:'juedou'},[card]);
|
att = get.attitude(player, target);
|
||||||
return player.canUse(juedou,target,false);
|
const colors = Object.keys(lib.color).filter((i) => i != "none");
|
||||||
},'h'))) return 20+(3-get.sgn(att))+Math.random();
|
if (
|
||||||
const effs=colors.reduce((list,color)=>{
|
!colors.some((color) =>
|
||||||
const cards=player.getCards('h',card=>{
|
player.hasCard((card) => {
|
||||||
const juedou=get.autoViewAs({name:'juedou'},[card]);
|
const juedou = get.autoViewAs({ name: "juedou" }, [card]);
|
||||||
return player.canUse(juedou,target,false);
|
return player.canUse(juedou, target, false);
|
||||||
});
|
}, "h")
|
||||||
if(cards.length){
|
)
|
||||||
list.push(cards.reduce((sum,card)=>{
|
)
|
||||||
const juedou=get.autoViewAs({name:'juedou'},[card]);
|
return 20 + (3 - get.sgn(att)) + Math.random();
|
||||||
return sum+get.effect(target,card,player,player);
|
const effs = colors.reduce((list, color) => {
|
||||||
},0));
|
const cards = player.getCards("h", (card) => {
|
||||||
}
|
const juedou = get.autoViewAs({ name: "juedou" }, [card]);
|
||||||
return list;
|
return player.canUse(juedou, target, false);
|
||||||
},[]);
|
});
|
||||||
return Math[att>0?'max':'min'].apply(Math,list);
|
if (cards.length) {
|
||||||
}).forResult();
|
list.push(
|
||||||
|
cards.reduce((sum, card) => {
|
||||||
|
const juedou = get.autoViewAs({ name: "juedou" }, [card]);
|
||||||
|
return sum + get.effect(target, card, player, player);
|
||||||
|
}, 0)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
}, []);
|
||||||
|
return Math[att > 0 ? "max" : "min"].apply(Math, list);
|
||||||
|
})
|
||||||
|
.forResult();
|
||||||
},
|
},
|
||||||
async content(event,trigger,player){
|
async content(event, trigger, player) {
|
||||||
const target=event.targets[0];
|
const target = event.targets[0];
|
||||||
const colors=Object.keys(lib.color).filter(i=>i!='none');
|
const colors = Object.keys(lib.color).filter((i) => i != "none");
|
||||||
if(colors.length&&player.countCards('h')){
|
if (colors.length && player.countCards("h")) {
|
||||||
const result=await target.chooseControl(colors)
|
const result = await target
|
||||||
.set('prompt','连讨:请选择一个颜色').set('ai',()=>{
|
.chooseControl(colors)
|
||||||
const player=get.event('player'),source=get.event().getParent().player;
|
.set("prompt", "连讨:请选择一个颜色")
|
||||||
let controls=get.event('controls').slice();
|
.set("ai", () => {
|
||||||
if(controls.length==1) return controls[0];
|
const player = get.event("player"),
|
||||||
const getSum=function(color,player,source){
|
source = get.event().getParent().player;
|
||||||
return source.getCards('h',card=>{
|
let controls = get.event("controls").slice();
|
||||||
if(get.color(card)!=color) return false;
|
if (controls.length == 1) return controls[0];
|
||||||
const juedou=get.autoViewAs({name:'juedou'},[card]);
|
const getSum = function (color, player, source) {
|
||||||
return source.canUse(juedou,player,false);
|
return source
|
||||||
}).reduce((num,card)=>{
|
.getCards("h", (card) => {
|
||||||
const juedou=get.autoViewAs({name:'juedou'},[card]);
|
if (get.color(card) != color) return false;
|
||||||
return num+get.effect(player,card,source,player);
|
const juedou = get.autoViewAs({ name: "juedou" }, [card]);
|
||||||
},0);
|
return source.canUse(juedou, player, false);
|
||||||
};
|
})
|
||||||
return controls.sort((a,b)=>getSum(b,player,source)-getSum(a,player,source))[0];
|
.reduce((num, card) => {
|
||||||
}).set('prompt2',get.translation(player)+'将对你依次使用由其手牌中所有此颜色的牌转化的【决斗】').forResult();
|
const juedou = get.autoViewAs({ name: "juedou" }, [card]);
|
||||||
const color=result.control;
|
return num + get.effect(player, card, source, player);
|
||||||
game.broadcastAll((color,target)=>{
|
}, 0);
|
||||||
lib.skill.olliantao_backup.filterCardx=[color,target];
|
};
|
||||||
lib.skill.olliantao_backup.filterCard=function(card,player){
|
return controls.sort(
|
||||||
const list=lib.skill.olliantao_backup.filterCardx;
|
(a, b) => getSum(b, player, source) - getSum(a, player, source)
|
||||||
if(get.color(card)!=list[0]) return false;
|
)[0];
|
||||||
const juedou=get.autoViewAs({name:'juedou'},[card]);
|
})
|
||||||
return player.canUse(juedou,list[1],false);
|
.set(
|
||||||
};
|
"prompt2",
|
||||||
},color,target);
|
get.translation(player) +
|
||||||
while(target.isIn()&&player.hasCard(card=>lib.skill.olliantao_backup.filterCard(card,player))&&!game.getGlobalHistory('everything',evt=>{
|
"将对你依次使用由其手牌中所有此颜色的牌转化的【决斗】"
|
||||||
return evt.name=='dying'&&[player,target].includes(evt.player)&&evt.getParent('olliantao')==event;
|
)
|
||||||
}).length){
|
.forResult();
|
||||||
await player.chooseToUse().set('forced',true)
|
const color = result.control;
|
||||||
.set('openskilldialog','连讨:将一张'+get.translation(color)+'手牌当作【决斗】对'+get.translation(target)+'使用')
|
game.broadcastAll(
|
||||||
.set('norestore',true).set('_backupevent','olliantao_backup').set('custom',{
|
(color, target) => {
|
||||||
add:{},
|
lib.skill.olliantao_backup.filterCardx = [color, target];
|
||||||
replace:{window:function(){}},
|
lib.skill.olliantao_backup.filterCard = function (card, player) {
|
||||||
}).backup('olliantao_backup').set('targetRequired',true).set('complexSelect',true)
|
const list = lib.skill.olliantao_backup.filterCardx;
|
||||||
.set('filterTarget',function(card,player,target){
|
if (get.color(card) != list[0]) return false;
|
||||||
if(target!=_status.event.sourcex&&!ui.selected.targets.includes(_status.event.sourcex)) return false;
|
const juedou = get.autoViewAs({ name: "juedou" }, [card]);
|
||||||
return lib.filter.targetEnabled.apply(this, arguments);
|
return player.canUse(juedou, list[1], false);
|
||||||
}).set('sourcex',target).set('addCount',false);
|
};
|
||||||
|
},
|
||||||
|
color,
|
||||||
|
target
|
||||||
|
);
|
||||||
|
while (
|
||||||
|
target.isIn() &&
|
||||||
|
player.hasCard((card) => lib.skill.olliantao_backup.filterCard(card, player)) &&
|
||||||
|
!game.getGlobalHistory("everything", (evt) => {
|
||||||
|
return (
|
||||||
|
evt.name == "dying" &&
|
||||||
|
[player, target].includes(evt.player) &&
|
||||||
|
evt.getParent("olliantao") == event
|
||||||
|
);
|
||||||
|
}).length
|
||||||
|
) {
|
||||||
|
await player
|
||||||
|
.chooseToUse()
|
||||||
|
.set("forced", true)
|
||||||
|
.set(
|
||||||
|
"openskilldialog",
|
||||||
|
"连讨:将一张" +
|
||||||
|
get.translation(color) +
|
||||||
|
"手牌当作【决斗】对" +
|
||||||
|
get.translation(target) +
|
||||||
|
"使用"
|
||||||
|
)
|
||||||
|
.set("norestore", true)
|
||||||
|
.set("_backupevent", "olliantao_backup")
|
||||||
|
.set("custom", {
|
||||||
|
add: {},
|
||||||
|
replace: { window: function () {} },
|
||||||
|
})
|
||||||
|
.backup("olliantao_backup")
|
||||||
|
.set("targetRequired", true)
|
||||||
|
.set("complexSelect", true)
|
||||||
|
.set("filterTarget", function (card, player, target) {
|
||||||
|
if (
|
||||||
|
target != _status.event.sourcex &&
|
||||||
|
!ui.selected.targets.includes(_status.event.sourcex)
|
||||||
|
)
|
||||||
|
return false;
|
||||||
|
return lib.filter.targetEnabled.apply(this, arguments);
|
||||||
|
})
|
||||||
|
.set("sourcex", target)
|
||||||
|
.set("addCount", false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const num=player.getHistory('sourceDamage',evt=>{
|
const num = player
|
||||||
return evt.getParent(4)==event;
|
.getHistory("sourceDamage", (evt) => {
|
||||||
}).reduce((sum,evt)=>sum+evt.num,0);
|
return evt.getParent(4) == event;
|
||||||
if(num) await player.draw(num);
|
})
|
||||||
if(!game.hasPlayer2(current=>{
|
.reduce((sum, evt) => sum + evt.num, 0);
|
||||||
return current.getHistory('damage',evt=>{
|
if (num) await player.draw(num);
|
||||||
return evt.getParent(4)==event;
|
if (
|
||||||
}).length;
|
!game.hasPlayer2((current) => {
|
||||||
})){
|
return current.getHistory("damage", (evt) => {
|
||||||
|
return evt.getParent(4) == event;
|
||||||
|
}).length;
|
||||||
|
})
|
||||||
|
) {
|
||||||
await player.draw(3);
|
await player.draw(3);
|
||||||
player.addTempSkill('olliantao_buff');
|
player.addTempSkill("olliantao_buff");
|
||||||
player.addMark('olliantao_buff',3,false);
|
player.addMark("olliantao_buff", 3, false);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
subSkill:{
|
subSkill: {
|
||||||
backup:{
|
backup: {
|
||||||
viewAs:{name:'juedou'},
|
viewAs: { name: "juedou" },
|
||||||
position:'h',
|
position: "h",
|
||||||
check:()=>1+Math.random(),
|
check: () => 1 + Math.random(),
|
||||||
precontent(){
|
precontent() {
|
||||||
delete event.result.skill;
|
delete event.result.skill;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
buff:{
|
buff: {
|
||||||
charlotte:true,
|
charlotte: true,
|
||||||
onremove:true,
|
onremove: true,
|
||||||
mod:{
|
mod: {
|
||||||
maxHandcard(player,num){
|
maxHandcard(player, num) {
|
||||||
return num+player.countMark('olliantao_buff');
|
return num + player.countMark("olliantao_buff");
|
||||||
},
|
},
|
||||||
cardEnabled(card){
|
cardEnabled(card) {
|
||||||
if(card.name=='sha') return false;
|
if (card.name == "sha") return false;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
intro:{content:'手牌上限+#,不能使用【杀】'},
|
intro: { content: "手牌上限+#,不能使用【杀】" },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -3056,7 +3116,7 @@ game.import("character", function () {
|
||||||
? ""
|
? ""
|
||||||
: `。若${get.translation(
|
: `。若${get.translation(
|
||||||
trigger.player
|
trigger.player
|
||||||
)}受到了此【杀】的伤害,你获得其一张牌。`
|
)}受到了此【杀】的伤害,你获得其一张牌。`
|
||||||
}`
|
}`
|
||||||
);
|
);
|
||||||
next.set("norestore", true);
|
next.set("norestore", true);
|
||||||
|
@ -3395,9 +3455,8 @@ game.import("character", function () {
|
||||||
];
|
];
|
||||||
[0, 1, 2].forEach((item, index) => {
|
[0, 1, 2].forEach((item, index) => {
|
||||||
if (event.list.includes(item)) {
|
if (event.list.includes(item)) {
|
||||||
choiceList[
|
choiceList[index] =
|
||||||
index
|
`<span style="text-decoration: line-through; opacity:0.5; ">${choiceList[index]}</span>`;
|
||||||
] = `<span style="text-decoration: line-through; opacity:0.5; ">${choiceList[index]}</span>`;
|
|
||||||
} else choices.push(`选项${get.cnNumber(index + 1, true)}`);
|
} else choices.push(`选项${get.cnNumber(index + 1, true)}`);
|
||||||
});
|
});
|
||||||
game.me
|
game.me
|
||||||
|
@ -7028,7 +7087,7 @@ game.import("character", function () {
|
||||||
delete stat.gushe;
|
delete stat.gushe;
|
||||||
},
|
},
|
||||||
ai: {
|
ai: {
|
||||||
combo: "gushe"
|
combo: "gushe",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
//OL刘老板
|
//OL刘老板
|
||||||
|
@ -12778,10 +12837,13 @@ game.import("character", function () {
|
||||||
(_status.connectMode || current.hasSha())
|
(_status.connectMode || current.hasSha())
|
||||||
) {
|
) {
|
||||||
current
|
current
|
||||||
.chooseToUse(function (card, player, event) {
|
.chooseToUse(
|
||||||
if (get.name(card) != "sha") return false;
|
function (card, player, event) {
|
||||||
return lib.filter.filterCard.apply(this, arguments);
|
if (get.name(card) != "sha") return false;
|
||||||
}, "同协:是否对" + get.translation(target) + "使用一张杀?")
|
return lib.filter.filterCard.apply(this, arguments);
|
||||||
|
},
|
||||||
|
"同协:是否对" + get.translation(target) + "使用一张杀?"
|
||||||
|
)
|
||||||
.set("targetRequired", true)
|
.set("targetRequired", true)
|
||||||
.set("complexSelect", true)
|
.set("complexSelect", true)
|
||||||
.set("filterTarget", function (card, player, target) {
|
.set("filterTarget", function (card, player, target) {
|
||||||
|
@ -17318,10 +17380,13 @@ game.import("character", function () {
|
||||||
"step 0";
|
"step 0";
|
||||||
var target = trigger.targets[0];
|
var target = trigger.targets[0];
|
||||||
target
|
target
|
||||||
.chooseToUse(function (card, player, event) {
|
.chooseToUse(
|
||||||
if (get.name(card) != "sha") return false;
|
function (card, player, event) {
|
||||||
return lib.filter.filterCard.apply(this, arguments);
|
if (get.name(card) != "sha") return false;
|
||||||
}, "武娘:是否对" + get.translation(player) + "使用一张杀?")
|
return lib.filter.filterCard.apply(this, arguments);
|
||||||
|
},
|
||||||
|
"武娘:是否对" + get.translation(player) + "使用一张杀?"
|
||||||
|
)
|
||||||
.set("targetRequired", true)
|
.set("targetRequired", true)
|
||||||
.set("complexSelect", true)
|
.set("complexSelect", true)
|
||||||
.set("filterTarget", function (card, player, target) {
|
.set("filterTarget", function (card, player, target) {
|
||||||
|
@ -21948,7 +22013,7 @@ game.import("character", function () {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
ai: {
|
ai: {
|
||||||
combo: "wylianji"
|
combo: "wylianji",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
jingong: {
|
jingong: {
|
||||||
|
@ -28882,7 +28947,7 @@ game.import("character", function () {
|
||||||
player.changeSkills(["xiaoji"], ["liangzhu"]);
|
player.changeSkills(["xiaoji"], ["liangzhu"]);
|
||||||
},
|
},
|
||||||
ai: {
|
ai: {
|
||||||
combo: "liangzhu"
|
combo: "liangzhu",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
mingshi: {
|
mingshi: {
|
||||||
|
@ -34505,10 +34570,11 @@ game.import("character", function () {
|
||||||
olyicheng: "易城",
|
olyicheng: "易城",
|
||||||
olyicheng_info:
|
olyicheng_info:
|
||||||
"出牌阶段限一次,你可以亮出牌堆顶的三张牌,然后你可以以任意手牌交换这些牌,若这三张牌的点数和因此增加,则你可以选择用所有手牌交换这三张牌。最后你将这三张牌置于牌堆顶。",
|
"出牌阶段限一次,你可以亮出牌堆顶的三张牌,然后你可以以任意手牌交换这些牌,若这三张牌的点数和因此增加,则你可以选择用所有手牌交换这三张牌。最后你将这三张牌置于牌堆顶。",
|
||||||
sp_sunce:'SP孙策',
|
sp_sunce: "SP孙策",
|
||||||
sp_sunce_prefix:'SP',
|
sp_sunce_prefix: "SP",
|
||||||
olliantao:'连讨',
|
olliantao: "连讨",
|
||||||
olliantao_info:'出牌阶段开始时,你可以令一名其他角色选择一个颜色,然后你依次将此颜色的所有手牌当作【决斗】对其使用直到有一方进入濒死状态,然后你摸X张牌(X为你本次以此法造成的伤害数)。若没有角色因本次技能结算受到伤害,你摸三张牌,本回合手牌上限+3且本回合你不能使用【杀】。',
|
olliantao_info:
|
||||||
|
"出牌阶段开始时,你可以令一名其他角色选择一个颜色,然后你依次将此颜色的所有手牌当作【决斗】对其使用直到有一方进入濒死状态,然后你摸X张牌(X为你本次以此法造成的伤害数)。若没有角色因本次技能结算受到伤害,你摸三张牌,本回合手牌上限+3且本回合你不能使用【杀】。",
|
||||||
|
|
||||||
sp_tianji: "天极·皇室宗亲",
|
sp_tianji: "天极·皇室宗亲",
|
||||||
sp_sibi: "四弼·辅国文曲",
|
sp_sibi: "四弼·辅国文曲",
|
||||||
|
|
Loading…
Reference in New Issue