commit
eda5b55449
|
@ -932,7 +932,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
translate:{
|
||||
jiu:'酒',
|
||||
jiu_info:'①每回合限一次。出牌阶段,对你自己使用。目标角色使用的下一张【杀】的伤害值基数+1。②当你处于濒死状态时,对你自己使用。目标角色回复1点体力。',
|
||||
jiu_info:'①每回合限一次。出牌阶段,对你自己使用。本回合目标角色使用的下一张【杀】的伤害值基数+1。②当你处于濒死状态时,对你自己使用。目标角色回复1点体力。',
|
||||
huogong:'火攻',
|
||||
tiesuo:'铁索连环',
|
||||
tiesuo_info:'此牌可被重铸。出牌阶段,对至多两名角色使用。目标角色横置。',
|
||||
|
|
|
@ -641,6 +641,53 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
_yongjian_zengyu:{
|
||||
get forceLoad(){
|
||||
return lib.skill._gifting.forceLoad;
|
||||
},
|
||||
set forceLoad(forceLoad){
|
||||
lib.skill._gifting.forceLoad=forceLoad;
|
||||
},
|
||||
get filter(){
|
||||
return lib.skill._gifting.filter;
|
||||
},
|
||||
set filter(filter){
|
||||
lib.skill._gifting.filter=filter;
|
||||
},
|
||||
get filterCard(){
|
||||
return lib.skill._gifting.filterCard;
|
||||
},
|
||||
set filterCard(filterCard){
|
||||
lib.skill._gifting.filterCard=filterCard;
|
||||
},
|
||||
get filterTarget(){
|
||||
return lib.skill._gifting.filterTarget;
|
||||
},
|
||||
set filterTarget(filterTarget){
|
||||
lib.skill._gifting.filterTarget=filterTarget;
|
||||
},
|
||||
get check(){
|
||||
return lib.skill._gifting.check;
|
||||
},
|
||||
set check(check){
|
||||
lib.skill._gifting.check=check;
|
||||
},
|
||||
get content(){
|
||||
return lib.skill._gifting.content;
|
||||
},
|
||||
set content(content){
|
||||
lib.skill._gifting.content=content;
|
||||
},
|
||||
get ai(){
|
||||
return lib.skill._gifting.ai;
|
||||
},
|
||||
set ai(ai){
|
||||
lib.skill._gifting.ai=ai;
|
||||
}
|
||||
}
|
||||
},
|
||||
translate:{
|
||||
|
|
|
@ -19,6 +19,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
clan_wangyun:['male','qun',3,['clanjiexuan','clanmingjie','clanzhongliu'],['clan:太原王氏']],
|
||||
clan_wanghun:['male','jin',3,['clanfuxun','clanchenya','clanzhongliu'],['clan:太原王氏']],
|
||||
clan_zhonghui:['male','wei','3/4',['clanyuzhi','clanxieshu','clanbaozu'],['clan:颍川钟氏']],
|
||||
clan_zhongyu:['male','wei',3,['clanjiejian','clanhuanghan','clanbaozu'],['clan:颍川钟氏']],
|
||||
},
|
||||
characterSort:{
|
||||
clan:{
|
||||
|
@ -26,10 +27,68 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
clan_xun:['clan_xunshu','clan_xunchen','clan_xuncai','clan_xuncan'],
|
||||
clan_han:['clan_hanshao','clan_hanrong'],
|
||||
clan_wang:['clan_wangling','clan_wangyun','clan_wanghun'],
|
||||
clan_zhong:['clan_zhongyan','clan_zhonghui'],
|
||||
clan_zhong:['clan_zhongyan','clan_zhonghui','clan_zhongyu'],
|
||||
},
|
||||
},
|
||||
skill:{
|
||||
//族钟毓
|
||||
clanjiejian:{
|
||||
audio:2,
|
||||
trigger:{player:'useCardToPlayered'},
|
||||
filter:function(event,player){
|
||||
if(!event.isFirstTarget) return false;
|
||||
return get.cardNameLength(event.card)==player.getHistory('useCard').indexOf(event.getParent())+1;
|
||||
},
|
||||
direct:true,
|
||||
content:function(){
|
||||
'step 0'
|
||||
var num=get.cardNameLength(trigger.card);
|
||||
event.num=num;
|
||||
player.chooseTarget(get.prompt('clanjiejian'),'令一名目标角色摸'+get.cnNumber(num)+'张牌',function(card,player,target){
|
||||
return _status.event.getTrigger().targets.contains(target);
|
||||
}).set('ai',target=>get.attitude(_status.event.player,target));
|
||||
'step 1'
|
||||
if(result.bool){
|
||||
var target=result.targets[0];
|
||||
player.logSkill('clanjiejian',target);
|
||||
target.draw(num);
|
||||
}
|
||||
},
|
||||
ai:{threaten:3},
|
||||
mod:{
|
||||
aiOrder:function(player,card,num){
|
||||
if(typeof card=='object'&&get.cardNameLength(card)==player.getHistory('useCard').length+1){
|
||||
if(get.effect(player,card,player,player)>0) return num+10;
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
clanhuanghan:{
|
||||
audio:2,
|
||||
trigger:{player:'damageEnd'},
|
||||
filter:function(event,player){
|
||||
if(!event.card) return false;
|
||||
var num=get.cardNameLength(event.card);
|
||||
return typeof num=='number'&&num>0;
|
||||
},
|
||||
check:function(event,player){
|
||||
var num=get.cardNameLength(event.card);
|
||||
if(num>=player.getDamagedHp()) return true;
|
||||
return player.getHistory('useSkill',evt=>evt.skill=='clanhuanghan').length&&player.hasSkill('clanbaozu',null,false,false)&&player.awakenedSkills.contains('clanbaozu');
|
||||
},
|
||||
content:function(){
|
||||
'step 0'
|
||||
player.draw(get.cardNameLength(trigger.card));
|
||||
if(player.isDamaged()) player.chooseToDiscard(player.getDamagedHp(),'he',true);
|
||||
'step 1'
|
||||
if(player.getHistory('useSkill',evt=>evt.skill=='clanhuanghan').length>1&&player.hasSkill('clanbaozu',null,false,false)&&player.awakenedSkills.contains('clanbaozu')){
|
||||
player.restoreSkill('clanbaozu');
|
||||
player.popup('保族');
|
||||
game.log(player,'恢复了技能','#【保族】');
|
||||
}
|
||||
},
|
||||
ai:{threaten:3},
|
||||
},
|
||||
//族钟会
|
||||
clanyuzhi:{
|
||||
mod:{
|
||||
|
@ -79,18 +138,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(!player.countCards('h')) event.finish();
|
||||
'step 3'
|
||||
player.chooseCard('迂志:请展示一张手牌','摸此牌牌名字数的牌。下一轮开始时,若本轮你使用的牌数或上一轮你以此法摸的牌数小于此牌牌名字数,则你失去1点体力。',true,function(card,player){
|
||||
var num=lib.skill.dcweidang.getLength(card);
|
||||
var num=get.cardNameLength(card);
|
||||
return typeof num=='number'&&num>0;
|
||||
}).set('ai',function(card){
|
||||
if(_status.event.dying&&_status.event.num>0&&lib.skill.dcweidang.getLength(card)>_status.event.num) return 1/lib.skill.dcweidang.getLength(card);//怂
|
||||
return lib.skill.dcweidang.getLength(card);//勇
|
||||
if(_status.event.dying&&_status.event.num>0&&get.cardNameLength(card)>_status.event.num) return 1/get.cardNameLength(card);//怂
|
||||
return get.cardNameLength(card);//勇
|
||||
}).set('dying',player.hp+player.countCards('hs',{name:['tao','jiu']})<1).set('num',event.num1);
|
||||
'step 4'
|
||||
if(result.bool){
|
||||
player.logSkill('clanyuzhi');
|
||||
player.showCards(result.cards,get.translation(player)+'发动了【迂志】');
|
||||
player.draw(lib.skill.dcweidang.getLength(result.cards[0]));
|
||||
player.storage.clanyuzhi=lib.skill.dcweidang.getLength(result.cards[0]);
|
||||
player.draw(get.cardNameLength(result.cards[0]));
|
||||
player.storage.clanyuzhi=get.cardNameLength(result.cards[0]);
|
||||
player.markSkill('clanyuzhi');
|
||||
}
|
||||
},
|
||||
|
@ -106,13 +165,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
trigger:{player:'damageEnd',source:'damageSource'},
|
||||
filter:function(event,player){
|
||||
if(!event.card) return false;
|
||||
var num=lib.skill.dcweidang.getLength(event.card);
|
||||
var num=get.cardNameLength(event.card);
|
||||
return typeof num=='number'&&num>0&&player.countCards('he');
|
||||
},
|
||||
direct:true,
|
||||
content:function(){
|
||||
'step 0'
|
||||
var num=lib.skill.dcweidang.getLength(trigger.card),str='';
|
||||
var num=get.cardNameLength(trigger.card),str='';
|
||||
if(player.getDamagedHp()>0) str+=('并摸'+get.cnNumber(player.getDamagedHp())+'张牌');
|
||||
player.chooseToDiscard(get.prompt('clanxieshu'),'弃置'+get.cnNumber(num)+'张牌'+str,'he',num).set('ai',function(card){
|
||||
var player=_status.event.player;
|
||||
|
@ -234,7 +293,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
var info=get.info(skill);
|
||||
if(info.charlotte) return false;
|
||||
var translation=get.skillInfoTranslation(skill,event.player);
|
||||
if(!translation||!(/(?<!“)出牌阶段限一次/.test(translation))) return false;
|
||||
if(!translation||translation.match(/“?出牌阶段限一次/g).every(value=>value!='出牌阶段限一次')) return false;
|
||||
return event.player.countCards('h')>0;
|
||||
},
|
||||
check:function(event,player){
|
||||
|
@ -248,7 +307,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
var val=get.value(card);
|
||||
return 6-val;
|
||||
}).set('cards',trigger.player.getCards('he',card=>{
|
||||
return lib.skill.dcweidang.getLength(card)==num;
|
||||
return get.cardNameLength(card)==num;
|
||||
}));
|
||||
'step 1'
|
||||
if(result.bool) trigger.player.recast(result.cards);
|
||||
|
@ -542,7 +601,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
else{
|
||||
var list=[4,3,2,1];
|
||||
player.getHistory('useCard',evt=>{
|
||||
var len=lib.skill.dcweidang.getLength(evt.card);
|
||||
var len=get.cardNameLength(evt.card);
|
||||
list.remove(len);
|
||||
});
|
||||
if(list.length) ret=list[0];
|
||||
|
@ -582,7 +641,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
else{
|
||||
var list=[4,3,2,1];
|
||||
player.getHistory('useCard',evt=>{
|
||||
var len=lib.skill.dcweidang.getLength(evt.card);
|
||||
var len=get.cardNameLength(evt.card);
|
||||
list.remove(len);
|
||||
});
|
||||
if(list.length) ret=list[0];
|
||||
|
@ -616,13 +675,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
var len=_status.event.len;
|
||||
var card=button.link;
|
||||
var fix=1;
|
||||
if(lib.skill.dcweidang.getLength(card)==len) fix=2;
|
||||
if(get.cardNameLength(card)==len) fix=2;
|
||||
return fix*_status.event.player.getUseValue(card);
|
||||
}).set('len',function(){
|
||||
if(!player.hasSkill('clanxiaoyong')) return 0;
|
||||
var list=[];
|
||||
player.getHistory('useCard',evt=>{
|
||||
var len=lib.skill.dcweidang.getLength(evt.card);
|
||||
var len=get.cardNameLength(evt.card);
|
||||
list.add(len);
|
||||
});
|
||||
if(!list.contains(count)) return count;
|
||||
|
@ -681,9 +740,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
player:'useCard',
|
||||
},
|
||||
filter:function(event,player){
|
||||
var len=lib.skill.dcweidang.getLength(event.card);
|
||||
var len=get.cardNameLength(event.card);
|
||||
if(player.hasHistory('useCard',function(evt){
|
||||
return evt!=event&&lib.skill.dcweidang.getLength(evt.card)==len;
|
||||
return evt!=event&&get.cardNameLength(evt.card)==len;
|
||||
},event)) return false;
|
||||
if(!player.getStat().skill.clanguangu) return false;
|
||||
var history=player.getAllHistory('useSkill',evt=>{
|
||||
|
@ -722,9 +781,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
break;
|
||||
}
|
||||
}
|
||||
if(numx==lib.skill.dcweidang.getLength(card)){
|
||||
if(numx==get.cardNameLength(card)){
|
||||
if(!player.hasHistory('useCard',evt=>{
|
||||
return numx==lib.skill.dcweidang.getLength(evt.card);
|
||||
return numx==get.cardNameLength(evt.card);
|
||||
})){
|
||||
return num+9;
|
||||
}
|
||||
|
@ -734,7 +793,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
clanbaozu:{
|
||||
audio:2,
|
||||
audioname:['clan_zhongyan','clan_zhonghui'],
|
||||
audioname:['clan_zhongyan','clan_zhonghui','clan_zhongyu'],
|
||||
trigger:{global:'dying'},
|
||||
clanSkill:true,
|
||||
limited:true,
|
||||
|
@ -1676,34 +1735,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
return true;
|
||||
},
|
||||
content:function(){
|
||||
'step 0'
|
||||
event.judgestr=get.translation('shandian');
|
||||
player.judge(lib.card.shandian.judge,event.judgestr).judge2=lib.card.shandian.judge2;
|
||||
game.delayx(1.5);
|
||||
'step 1'
|
||||
var name='shandian';
|
||||
if(event.cancelled&&!event.direct){
|
||||
if(lib.card[name].cancel){
|
||||
var next=game.createEvent(name+'Cancel');
|
||||
next.setContent(lib.card[name].cancel);
|
||||
next.cards=[];
|
||||
next.card=get.autoViewAs({name:name});
|
||||
next.player=player;
|
||||
}
|
||||
}
|
||||
else{
|
||||
var next=game.createEvent(name);
|
||||
next.setContent(function(){
|
||||
if(result.bool==false){
|
||||
player.damage(3,'thunder','nosource');
|
||||
}
|
||||
});
|
||||
next._result=result;
|
||||
next.cards=[];
|
||||
next.card=get.autoViewAs({name:name});
|
||||
next.player=player;
|
||||
}
|
||||
'step 2'
|
||||
player.executeDelayCardEffect('shandian');
|
||||
trigger.player.drawTo(4);
|
||||
},
|
||||
ai:{expose:0.25}
|
||||
|
@ -2264,6 +2296,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
hanrong:'韩融(127年~196年),字元长,颍川舞阳(今属河南省漯河市)人。赢长韩韶子,献帝时大臣。中平五年(188年),融与荀爽、陈纪等十四人并博士征,不至。董卓废立,融等复俱公车征。初平元年(190年)六月,融为大鸿胪,奉命与执金吾胡母班等出使关东。献帝东迁,为李傕、郭汜等所败,融为太仆,奉命至弘农与傕、汜连和,使其放遣公卿百官及宫女妇人。',
|
||||
wukuang:'吴匡(生卒年不详),兖州陈留(今河南开封市)人。东汉末年大臣,大将军何进部将。光熹元年(公元189年),汉灵帝死后,十常侍干预朝政,大将军何进谋诛宦官,但失败被杀,吴匡联合曹操、袁绍等杀尽宦官,攻杀车骑将军何苗。兴平二年(公元195年)十月,李傕、郭汜后悔放汉献帝东归洛阳,于是联合起来追击,曹操遂起兵平乱,但在回朝后,曹操挟天子以令诸侯,实行专权,但遭到吴匡反对。',
|
||||
wanghun:'王浑(223年~297年),字玄冲,太原郡晋阳县(今山西省太原市)人。魏晋时期名臣,曹魏司空王昶的儿子。王浑早年为大将军曹爽的掾吏,高平陵政变后,循例免官,出任怀县县令、散骑侍郎等职,袭封京陵县侯。西晋王朝建立后,加号扬烈将军,历任征虏将军、东中郎将、豫州刺史等职,积极筹划伐吴方略。咸宁五年(279年),配合镇南将军杜预灭亡吴国,迁征东大将军、左仆射、司徒公,晋爵京陵县公。晋惠帝司马衷即位,加任侍中衔。楚王司马玮发动政变,有意寻求支持,遭到严词拒绝。楚王司马玮死后,复任司徒、录尚书事。元康七年(297年),王浑去世,享年七十五岁,谥号为元。《唐会要》尊为“魏晋八君子”之一。',
|
||||
zhongyu:'钟毓(?-263年),字稚叔,颍川长社(今河南长葛市)人。三国时期魏国大臣,太傅钟繇之子、司徒钟会之兄。出身颍川钟氏,机灵敏捷,有其父之遗风。十四岁时,起家散骑侍郎。太和初年,迁黄门侍郎,袭封定陵县侯。正始年间,拜散骑常侍,迁魏郡太守,入为侍中、御史中丞、廷尉 [5] 。随平诸葛诞的淮南叛乱,拜青州刺史、后将军,都督徐州、荆州诸军事。景元四年(263年),去世,追赠车骑将军,谥号为惠,著有文集五卷(见《隋书·经籍志》及《两唐书·经籍志》),传于世。',
|
||||
},
|
||||
dynamicTranslate:{
|
||||
clanlianzhu:function(player){
|
||||
|
@ -2314,7 +2347,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
clanyunshen:'熨身',
|
||||
clanyunshen_info:'出牌阶段限一次。你可以令一名其他角色回复1点体力,然后选择一项:1.你视为对其使用一张冰【杀】;2.其视为对你使用一张冰【杀】。',
|
||||
clanshangshen:'伤神',
|
||||
clanshangshen_info:'当一名角色受到属性伤害后,若本回合此前没有角色或已死亡的角色受到过属性伤害,你可以进行目标角色为你的【闪电】的特殊的使用流程,然后其将手牌摸至四张。',
|
||||
clanshangshen_info:'当一名角色受到属性伤害后,若本回合此前没有角色或已死亡的角色受到过属性伤害,你可以执行目标角色为你的【闪电】效果,然后其将手牌摸至四张。',
|
||||
clanfenchai:'分钗',
|
||||
clanfenchai_info:'锁定技。若你首次发动技能指定的异性目标角色中:存在存活角色,你的判定牌视为♥;不存在存活角色,你的判定牌视为♠。',
|
||||
clan_hanshao:'族韩韶',
|
||||
|
@ -2359,6 +2392,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
clanyuzhi_info:'锁定技。新的一轮开始时,你依次执行以下项:①若你上一轮使用的牌数或你上上轮因〖迂志〗摸的牌数小于你上轮因〖迂志〗摸的牌数,你失去1点体力或失去〖保族〗。②你展示一张手牌,然后摸X张牌(X为此牌牌名字数)。',
|
||||
clanxieshu:'挟术',
|
||||
clanxieshu_info:'当你使用牌造成伤害后,或受到来自牌造成的伤害后,你可以弃置Y张牌并摸你已损失体力值张牌(Y为此牌牌名字数)。',
|
||||
clan_zhongyu:'族钟毓',
|
||||
clanjiejian:'捷谏',
|
||||
clanjiejian_info:'当你于一回合使用第X张牌指定第一个目标后,你可以令一名目标角色摸X张牌。(X为此牌牌名字数)',
|
||||
clanhuanghan:'惶汗',
|
||||
clanhuanghan_info:'当你受到牌造成的伤害后,你可以摸X张牌并弃置Y张牌(X为此牌牌名字数,Y为你已损失的体力值),然后若此次技能发动不为你本回合首次发动此技能,你重置技能〖保族〗。',
|
||||
|
||||
clan_wu:'陈留·吴氏',
|
||||
clan_xun:'颍川·荀氏',
|
||||
|
|
|
@ -1011,7 +1011,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(player==current) return false;
|
||||
if(boole&¤t.countCards('e')==es){
|
||||
var num=trigger.getl(current).es.length;
|
||||
if(trigger.name=='equip'&&trigger==event.player) num--;
|
||||
if(trigger.name=='equip'&&trigger.player==current) num--;
|
||||
if(num!=0) return true;
|
||||
}
|
||||
return false;
|
||||
|
@ -1714,9 +1714,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
mod:{
|
||||
"cardEnabled2":function (card,player){
|
||||
var source=_status.currentPhase;
|
||||
if(!source||source==player||!source.hasSkill('dddfusi')||source.countCards('h')==0||source.hasCard('h',function(card){
|
||||
if(!source||source==player||!source.hasSkill('dddfusi')||source.countCards('h')==0||source.hasCard(function(card){
|
||||
return !card.hasGaintag('dddxujing_tag');
|
||||
})) return;
|
||||
},'h')) return;
|
||||
if(player.getCards('h').contains(card)) return false;
|
||||
},
|
||||
},
|
||||
|
|
|
@ -615,7 +615,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
return current.hasHistory('lose',function(evt){
|
||||
return evt.cards2.length>0;
|
||||
});
|
||||
})&&(_status.connectMode||player.hasCard({type:'basic'},'h'));
|
||||
})&&player.countCards('he')>0;
|
||||
},
|
||||
direct:true,
|
||||
content:function(){
|
||||
|
@ -626,14 +626,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(current.hasHistory('lose',function(evt){
|
||||
return evt.cards2.length>0;
|
||||
})) map[current.playerid]=Math.min(5,current.getHistory('lose').reduce(function(num,evt){
|
||||
return num=evt.cards2.length;
|
||||
return num+evt.cards2.length;
|
||||
},0))+1;
|
||||
});
|
||||
player.chooseCardTarget({
|
||||
prompt:get.prompt('dcporui'),
|
||||
prompt2:get.skillInfoTranslation('dcporui',player),
|
||||
filterCard:function(card,player){
|
||||
return get.type2(card)=='basic'&&lib.filter.cardDiscardable(card,player,'dcporui');
|
||||
return lib.filter.cardDiscardable(card,player,'dcporui');
|
||||
},
|
||||
position:'he',
|
||||
filterTarget:function(card,player,target){
|
||||
|
@ -653,7 +653,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
player.logSkill('dcporui',target);
|
||||
player.discard(cards);
|
||||
event.num2=Math.min(5,target.getHistory('lose').reduce(function(num,evt){
|
||||
return num=evt.cards2.length;
|
||||
return num+evt.cards2.length;
|
||||
},0));
|
||||
event.num=event.num2+1;
|
||||
player.addTempSkill('dcporui_round','roundStart');
|
||||
|
@ -708,7 +708,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
forced:true,
|
||||
filter:function(event,player){
|
||||
if(!_status.currentPhase||_status.currentPhase==player) return false;
|
||||
if(event.name=='damage'){
|
||||
if(player.hasMark('dcgonghu_damage')) return false;
|
||||
var num=0;
|
||||
|
@ -716,6 +715,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
player.getHistory('sourceDamage',evt=>num+=evt.num);
|
||||
return num>1;
|
||||
}
|
||||
if(!_status.currentPhase||_status.currentPhase==player) return false;
|
||||
if(player.hasMark('dcgonghu_basic')) return false;
|
||||
if(_status.currentPhase&&_status.currentPhase==player) return false;
|
||||
var evt=event.getl(player);
|
||||
|
@ -2174,23 +2174,21 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
dcweidang:{
|
||||
audio:2,
|
||||
trigger:{global:'phaseJieshuBegin'},
|
||||
getLength:function(card){
|
||||
var name=get.translation(get.name(card));
|
||||
if(name=='挟令') name='挟天子以令诸侯';
|
||||
if(name=='霹雳投石车') name='霹雳车';
|
||||
return name.length;
|
||||
},
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
getLength:card=>get.cardNameLength(card),
|
||||
direct:true,
|
||||
filter:function(event,player){
|
||||
var num=lib.skill.dcqinshen.getNum();
|
||||
return event.player!=player&&(_status.connectMode?player.countCards('he'):player.hasCard(card=>lib.skill.dcweidang.getLength(card)==num,'he'));
|
||||
return event.player!=player&&(_status.connectMode?player.countCards('he'):player.hasCard(card=>get.cardNameLength(card)==num,'he'));
|
||||
},
|
||||
content:function(){
|
||||
'step 0'
|
||||
var num=lib.skill.dcqinshen.getNum();
|
||||
event.num=num;
|
||||
player.chooseCard(get.prompt('dcweidang'),'将一张字数为'+num+'的牌置于牌堆底,然后获得一张字数为'+num+'的牌。若你能使用此牌,你使用之。','he',(card,player,target)=>{
|
||||
return lib.skill.dcweidang.getLength(card)==_status.event.num;
|
||||
return get.cardNameLength(card)==_status.event.num;
|
||||
}).set('num',num).set('ai',card=>{
|
||||
return 5-get.value(card);
|
||||
});
|
||||
|
@ -2208,7 +2206,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
else event.finish();
|
||||
'step 2'
|
||||
var card=get.cardPile(cardx=>lib.skill.dcweidang.getLength(cardx)==num);
|
||||
var card=get.cardPile(cardx=>get.cardNameLength(cardx)==num);
|
||||
if(card){
|
||||
player.gain(card,'gain2');
|
||||
if(player.hasUseTarget(card)){
|
||||
|
@ -9828,7 +9826,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
return str;
|
||||
},
|
||||
dcporui:function(player){
|
||||
return '每轮限'+(player.hasMark('dcgonghu_basic')?'两':'一')+'次。其他角色的结束阶段,你可以弃置一张基本牌并选择另一名于此回合内失去过牌的其他角色,你视为对其依次使用X+1张【杀】'+(player.hasMark('dcgonghu_damage')?'':',然后你交给其X张手牌')+'(X为其本回合失去的牌数且至多为5)。';
|
||||
return '每轮限'+(player.hasMark('dcgonghu_basic')?'两':'一')+'次。其他角色的结束阶段,你可以弃置一张牌并选择另一名于此回合内失去过牌的其他角色,你视为对其依次使用X+1张【杀】'+(player.hasMark('dcgonghu_damage')?'':',然后你交给其X张手牌')+'(X为其本回合失去的牌数且至多为5)。';
|
||||
},
|
||||
},
|
||||
perfectPair:{},
|
||||
|
@ -9845,7 +9843,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
jiling:['dc_jiling','tw_jiling','jiling'],
|
||||
sp_jiaxu:['dc_sp_jiaxu','sp_jiaxu','yj_jiaxu'],
|
||||
qiaorui:['qiaorui','tw_qiaorui'],
|
||||
|
||||
mamidi:['mamidi','xin_mamidi'],
|
||||
},
|
||||
translate:{
|
||||
re_panfeng:'潘凤',
|
||||
|
@ -10248,9 +10246,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
dcjini_info:'当你受到伤害后,你可以重铸至多Y张手牌(Y为你的体力上限减本回合你以此法重铸过的牌数)。若你以此法获得了【杀】,你可以对伤害来源使用一张无视距离且不可被响应的【杀】。',
|
||||
yuechen:'乐綝',
|
||||
dcporui:'破锐',
|
||||
dcporui_info:'每轮限一次。其他角色的结束阶段,你可以弃置一张基本牌并选择另一名于此回合内失去过牌的其他角色,你视为对其依次使用X+1张【杀】,然后你交给其X张手牌(X为其本回合失去的牌数且至多为5)。',
|
||||
dcporui_info:'每轮限一次。其他角色的结束阶段,你可以弃置一张牌并选择另一名于此回合内失去过牌的其他角色,你视为对其依次使用X+1张【杀】,然后你交给其X张手牌(X为其本回合失去的牌数且至多为5)。',
|
||||
dcgonghu:'共护',
|
||||
dcgonghu_info:'锁定技。①当你于回合外失去基本牌后,若你本回合内失去基本牌的数量大于1,你将〖破锐〗改为每轮限两次。②当你于回合外造成或受到伤害后,若你本回合内造成或受到的伤害大于1,你删除〖破锐〗中的“,然后你交给其X张手牌”。③当你使用红色基本牌/红色普通锦囊牌时,若你已发动过〖共护①〗和〖共护②〗,则此牌不可被响应/可额外增加一个目标。',
|
||||
dcgonghu_info:'锁定技。①当你于回合外失去基本牌后,若你本回合内失去基本牌的数量大于1,你将〖破锐〗改为每轮限两次。②当你造成或受到伤害后,若你本回合内造成或受到的总伤害大于1,你删除〖破锐〗中的“,然后你交给其X张手牌”。③当你使用红色基本牌/红色普通锦囊牌时,若你已发动过〖共护①〗和〖共护②〗,则此牌不可被响应/可额外增加一个目标。',
|
||||
yue_caiwenji:'乐蔡琰',
|
||||
dcshuangjia:'霜笳',
|
||||
dcshuangjia_tag:'胡笳',
|
||||
|
|
|
@ -824,7 +824,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
var target=targets[event.index];
|
||||
if(target.isIn()){
|
||||
target.draw();
|
||||
if(target==player) event.num++;
|
||||
event.num++;
|
||||
}
|
||||
event.index++;
|
||||
if(event.index>=targets.length) event.index=0;
|
||||
|
@ -1249,7 +1249,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
(used.length?('(你不能以此法令其'+reason+get.translation(used)+')'):'')+'?若如此做,你摸一张牌并令〖称贤〗此阶段可发动次数上限+1。';
|
||||
event.str=str;
|
||||
if(!listx.length) event.finish();
|
||||
if(listx.length==1) event._result={bool:true,links:listx};
|
||||
else if(listx.length==1) event._result={bool:true,links:listx};
|
||||
else{
|
||||
event.asked=true;
|
||||
player.chooseButton([
|
||||
|
@ -4019,6 +4019,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
jsrglinghua:{
|
||||
audio:2,
|
||||
locked:false,
|
||||
mod:{
|
||||
judge:(player,result)=>{
|
||||
const parent=_status.event.getParent(2);
|
||||
if(parent.name=='jsrglinghua'&&parent.triggername=='phaseJieshuBegin') result.bool=!result.bool;
|
||||
}
|
||||
},
|
||||
trigger:{
|
||||
player:['phaseZhunbeiBegin','phaseJieshuBegin'],
|
||||
},
|
||||
|
@ -4041,39 +4048,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
content:function(){
|
||||
'step 0'
|
||||
var judge=trigger.name=='phaseZhunbei'?lib.card.shandian.judge:function(card){
|
||||
if(get.suit(card)!='spade'||get.number(card)<=1||get.number(card)>=10) return -5;
|
||||
return 1;
|
||||
}
|
||||
player.judge(judge,get.translation('shandian')).set('judge2',lib.card.shandian.judge2);
|
||||
game.delayx(1.5);
|
||||
event.executeDelayCardEffect=player.executeDelayCardEffect('shandian');
|
||||
'step 1'
|
||||
var name='shandian';
|
||||
if(event.cancelled&&!event.direct){
|
||||
if(lib.card[name].cancel){
|
||||
var next=game.createEvent(name+'Cancel');
|
||||
next.setContent(lib.card[name].cancel);
|
||||
next.cards=[];
|
||||
next.card=get.autoViewAs({name:name});
|
||||
next.player=player;
|
||||
}
|
||||
}
|
||||
else{
|
||||
var next=game.createEvent(name);
|
||||
next.setContent(function(){
|
||||
if(result.bool==false){
|
||||
player.damage(3,'thunder','nosource');
|
||||
}
|
||||
});
|
||||
next._result=result;
|
||||
next.cards=[];
|
||||
next.card=get.autoViewAs({name:name});
|
||||
next.player=player;
|
||||
}
|
||||
'step 2'
|
||||
if(!player.hasHistory('damage',evt=>{
|
||||
return evt.card&&evt.card.name=='shandian'&&evt.getParent(2)==event;
|
||||
})){
|
||||
var executeDelayCardEffect=event.executeDelayCardEffect;
|
||||
if(!player.hasHistory('damage',evt=>evt.getParent(2)==executeDelayCardEffect)){
|
||||
if(trigger.name=='phaseZhunbei'){
|
||||
player.chooseTarget('灵化:是否令一名角色回复1点体力?').set('ai',target=>{
|
||||
var player=_status.event.player;
|
||||
|
@ -4088,7 +4066,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
}
|
||||
else event.finish();
|
||||
'step 3'
|
||||
'step 2'
|
||||
if(result.bool){
|
||||
var target=result.targets[0];
|
||||
player.line(target);
|
||||
|
@ -4214,7 +4192,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
jsrgxundao:'寻道',
|
||||
jsrgxundao_info:'当你的判定牌生效前,你可以令至多两名角色依次弃置一张牌,然后你选择一张以此法弃置且位于弃牌堆中的牌代替此判定牌。',
|
||||
jsrglinghua:'灵化',
|
||||
jsrglinghua_info:'①准备阶段,你可以进行目标角色为你的【闪电】的特殊的使用流程。若你未因此受到伤害,你可以令一名角色回复1点体力。②结束阶段,你可以进行目标角色为你且判定效果反转的【闪电】的特殊的使用流程。若你未因此受到伤害,你可以对一名角色造成1点雷电伤害。',
|
||||
jsrglinghua_info:'①准备阶段,你可以执行目标角色为你的【闪电】效果。若你未因此受到伤害,你可以令一名角色回复1点体力。②结束阶段,你可以执行目标角色为你且判定效果反转的【闪电】效果。若你未因此受到伤害,你可以对一名角色造成1点雷电伤害。',
|
||||
sbyingmen:'盈门',
|
||||
sbyingmen_info:'锁定技。①游戏开始时,你将武将牌堆中随机四张武将牌置于你的武将牌上,称为“访客”。②回合开始时,若你的“访客”数小于4,你随机从武将牌堆中将“访客”补至四张。',
|
||||
sbpingjian:'评鉴',
|
||||
|
@ -4255,7 +4233,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
jsrg_zoushi:'承邹氏',
|
||||
jsrg_zoushi_ab:'邹氏',
|
||||
jsrgguyin:'孤吟',
|
||||
jsrgguyin_info:'准备阶段,你可以翻面,且令所有其他男性角色依次选择是否翻面。然后你和所有背面朝上的角色轮流各摸一张牌直到你本次以此法获得X张牌(X为场上存活角色与死亡角色中男性角色数)。',
|
||||
jsrgguyin_info:'准备阶段,你可以翻面,且令所有其他男性角色依次选择是否翻面。然后你和所有背面朝上的角色轮流各摸一张牌,直到你们累计以此法获得X张牌(X为场上存活角色与死亡角色中男性角色数)。',
|
||||
jsrgzhangdeng:'帐灯',
|
||||
jsrgzhangdeng_info:'①当一名武将牌背面朝上的角色需要使用【酒】时,若你的武将牌背面朝上,其可以视为使用之。②当一名角色于一回合第二次发动〖帐灯①〗时,你将武将牌翻面至正面朝上。',
|
||||
jsrg_guanyu:'承关羽',
|
||||
|
|
|
@ -775,12 +775,27 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
filter:function(event,player){
|
||||
return event.name!='phase'||game.phaseNumber==0;
|
||||
},
|
||||
derivation:'mbdanggu_faq',
|
||||
derivation:['mbdanggu_faq','mbdanggu_faq2'],
|
||||
forced:true,
|
||||
unique:true,
|
||||
onremove:function(player){
|
||||
delete player.storage.mbdanggu;
|
||||
delete player.storage.mbdanggu_current;
|
||||
if(lib.skill.mbdanggu.isSingleShichangshi(player)){
|
||||
game.broadcastAll(function(player){
|
||||
player.name1=player.name;
|
||||
player.smoothAvatar(false);
|
||||
player.node.avatar.setBackground(player.name,'character');
|
||||
player.node.name.innerHTML=get.slimName(player.name);
|
||||
delete player.name2;
|
||||
player.classList.remove('fullskin2');
|
||||
player.node.avatar2.classList.add('hidden');
|
||||
player.node.name2.innerHTML='';
|
||||
if(player==game.me&&ui.fakeme){
|
||||
ui.fakeme.style.backgroundImage=player.node.avatar.style.backgroundImage;
|
||||
}
|
||||
},player);
|
||||
}
|
||||
},
|
||||
changshi:[
|
||||
['scs_zhangrang','scstaoluan'],
|
||||
|
@ -794,17 +809,27 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
['scs_guosheng','scsniqu'],
|
||||
['scs_gaowang','scsmiaoyu']
|
||||
],
|
||||
conflictMap:{
|
||||
scs_zhangrang:[],
|
||||
scs_zhaozhong:[],
|
||||
scs_sunzhang:[],
|
||||
scs_bilan:['scs_hankui'],
|
||||
scs_xiayun:[],
|
||||
scs_hankui:['scs_bilan'],
|
||||
scs_lisong:[],
|
||||
scs_duangui:['scs_guosheng'],
|
||||
scs_guosheng:['scs_duangui'],
|
||||
scs_gaowang:['scs_hankui','scs_duangui','scs_guosheng','scs_bilan'],
|
||||
conflictMap:function(){
|
||||
if(!_status.changshiMap){
|
||||
_status.changshiMap={
|
||||
scs_zhangrang:[],
|
||||
scs_zhaozhong:[],
|
||||
scs_sunzhang:[],
|
||||
scs_bilan:['scs_hankui'],
|
||||
scs_xiayun:[],
|
||||
scs_hankui:['scs_bilan'],
|
||||
scs_lisong:[],
|
||||
scs_duangui:['scs_guosheng'],
|
||||
scs_guosheng:['scs_duangui'],
|
||||
scs_gaowang:[],
|
||||
};
|
||||
var list=lib.skill.mbdanggu.changshi.map(i=>i[0]);
|
||||
for(var i of list){
|
||||
var select=list.filter(scs=>scs!=i&&!_status.changshiMap[i].contains(i));
|
||||
_status.changshiMap[i].addArray(select.randomGets(get.rand(0,select.length)));
|
||||
}
|
||||
}
|
||||
return _status.changshiMap;
|
||||
},
|
||||
group:'mbdanggu_back',
|
||||
content:function(){
|
||||
|
@ -831,68 +856,43 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
contentx:function(){
|
||||
'step 0'
|
||||
var list=player.getStorage('mbdanggu');
|
||||
var first=list.randomRemove(1)[0];
|
||||
var list=player.getStorage('mbdanggu').slice();
|
||||
var first=list.randomRemove();
|
||||
event.first=first;
|
||||
game.broadcastAll(function(changshi){
|
||||
if(lib.config.background_speak) game.playAudio('skill',changshi+'_enter');
|
||||
},first);
|
||||
if(lib.skill.mbdanggu.isSingleShichangshi(player)){
|
||||
game.broadcastAll(function(player,first){
|
||||
if(!player.name2) player.smoothAvatar(false);
|
||||
player.name1=first;
|
||||
player.node.avatar.setBackground(first,'character');
|
||||
player.node.name.innerHTML=get.slimName(first);
|
||||
delete player.name2;
|
||||
player.smoothAvatar(true);
|
||||
player.node.avatar2.classList.add('hidden');
|
||||
player.classList.remove('fullskin2');
|
||||
player.node.name2.innerHTML='';
|
||||
if(player==game.me&&ui.fakeme){
|
||||
ui.fakeme.style.backgroundImage=player.node.avatar.style.backgroundImage;
|
||||
}
|
||||
},player,first);
|
||||
}
|
||||
if(list.contains('scs_gaowang')){
|
||||
var others=list.filter(changshi=>{
|
||||
return changshi!='scs_gaowang';
|
||||
}).randomGets(3);
|
||||
others.push('scs_gaowang');
|
||||
others.randomSort();
|
||||
}
|
||||
var others=list.randomGets(4);
|
||||
if(others.length==1) event._result={bool:true,links:others};
|
||||
else{
|
||||
var others=list.randomGets(4);
|
||||
}
|
||||
var next=player.chooseButton([
|
||||
'党锢:请选择结党对象',
|
||||
[[first],'character'],
|
||||
'<div class="text center">可选常侍</div>',
|
||||
[others,'character']
|
||||
],true);
|
||||
next.set('filterButton',button=>{
|
||||
if(_status.event.canChoose.contains(button.link)) return true;
|
||||
return false;
|
||||
})
|
||||
next.set('canChoose',function(){
|
||||
var list=others.filter(changshi=>{
|
||||
var map=lib.skill.mbdanggu.conflictMap;
|
||||
var conflictList=others.filter(changshi=>{
|
||||
var map=lib.skill.mbdanggu.conflictMap();
|
||||
var names=map[first];
|
||||
return !names.contains(changshi);
|
||||
});
|
||||
return list.length?list:others;
|
||||
}());
|
||||
next.set('ai',button=>{
|
||||
if(button.link=='scs_gaowang') return 10;
|
||||
return Math.random()*10;
|
||||
})
|
||||
return names.contains(changshi);
|
||||
}),list=others.slice();
|
||||
if(conflictList.length){
|
||||
var conflict=conflictList.randomGet();
|
||||
list.remove(conflict);
|
||||
game.broadcastAll(function(changshi,player){
|
||||
if(lib.config.background_speak){
|
||||
if(player.isUnderControl(true)) game.playAudio('skill',changshi+'_enter');
|
||||
}
|
||||
},conflict,player);
|
||||
}
|
||||
player.chooseButton([
|
||||
'党锢:请选择结党对象',
|
||||
[[first],'character'],
|
||||
'<div class="text center">可选常侍</div>',
|
||||
[others,'character']
|
||||
],true).set('filterButton',button=>{
|
||||
return _status.event.canChoose.contains(button.link);
|
||||
}).set('canChoose',list).set('ai',button=>Math.random()*10);
|
||||
}
|
||||
'step 1'
|
||||
if(result.bool){
|
||||
var first=event.first;
|
||||
var chosen=result.links[0];
|
||||
var skills=[];
|
||||
var list=lib.skill.mbdanggu.changshi;
|
||||
var changshis=[event.first,chosen];
|
||||
player.unmarkAuto('mbdanggu',[chosen]);
|
||||
var changshis=[first,chosen];
|
||||
player.unmarkAuto('mbdanggu',changshis);
|
||||
player.storage.mbdanggu_current=changshis;
|
||||
for(var changshi of changshis){
|
||||
for(var cs of list){
|
||||
|
@ -900,7 +900,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
}
|
||||
if(lib.skill.mbdanggu.isSingleShichangshi(player)){
|
||||
game.broadcastAll(function(player,chosen){
|
||||
game.broadcastAll(function(player,first,chosen){
|
||||
player.name1=first;
|
||||
player.node.avatar.setBackground(first,'character');
|
||||
player.node.name.innerHTML=get.slimName(first);
|
||||
player.name2=chosen;
|
||||
player.classList.add('fullskin2');
|
||||
player.node.avatar2.classList.remove('hidden');
|
||||
|
@ -909,21 +912,23 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(player==game.me&&ui.fakeme){
|
||||
ui.fakeme.style.backgroundImage=player.node.avatar.style.backgroundImage;
|
||||
}
|
||||
},player,chosen);
|
||||
},player,first,chosen);
|
||||
}
|
||||
game.log(player,'选择了常侍','#y'+get.translation(changshis));
|
||||
game.broadcastAll(function(changshi){
|
||||
if(lib.config.background_speak) game.playAudio('skill',changshi+'_enter');
|
||||
},chosen);
|
||||
if(skills.length){
|
||||
player.addAdditionalSkill('mbdanggu',skills);
|
||||
game.log(player,'获得了技能','#g'+get.translation(skills));
|
||||
player.popup(skills);
|
||||
var str='';
|
||||
for(var i of skills){
|
||||
str+='【'+get.translation(i)+'】、';
|
||||
player.popup(i);
|
||||
}
|
||||
str=str.slice(0,-1);
|
||||
game.log(player,'获得了技能','#g'+str);
|
||||
}
|
||||
}
|
||||
},
|
||||
isSingleShichangshi:function(player){
|
||||
var map=lib.skill.mbdanggu.conflictMap;
|
||||
var map=lib.skill.mbdanggu.conflictMap();
|
||||
return player.name=='shichangshi'&&(map[player.name1]&&map[player.name2]||map[player.name1]&&!player.name2||!player.name1&&!player.name2||player.name==player.name1&&!player.name2);
|
||||
},
|
||||
mod:{
|
||||
|
@ -934,11 +939,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
return lib.skill.mbdanggu.mod.aiValue.apply(this,arguments);
|
||||
},
|
||||
},
|
||||
ai:{
|
||||
combo:'mbmowang',
|
||||
nokeep:true,
|
||||
},
|
||||
intro:{
|
||||
mark:function(dialog,storage,player){
|
||||
dialog.addText('剩余常侍');
|
||||
dialog.addSmall([storage,'character']);
|
||||
if(player.storage.mbdanggu_current){
|
||||
if(player.storage.mbdanggu_current&&player.isIn()){
|
||||
dialog.addText('当前常侍');
|
||||
dialog.addSmall([player.storage.mbdanggu_current,'character']);
|
||||
}
|
||||
|
@ -953,6 +962,24 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
forced:true,
|
||||
content:function(){
|
||||
'step 0'
|
||||
delete player.storage.mbdanggu_current;
|
||||
if(lib.skill.mbdanggu.isSingleShichangshi(player)){
|
||||
game.broadcastAll(function(player){
|
||||
player.name1=player.name;
|
||||
player.smoothAvatar(false);
|
||||
player.node.avatar.setBackground(player.name,'character');
|
||||
player.node.name.innerHTML=get.slimName(player.name);
|
||||
delete player.name2;
|
||||
player.classList.remove('fullskin2');
|
||||
player.node.avatar2.classList.add('hidden');
|
||||
player.node.name2.innerHTML='';
|
||||
if(player==game.me&&ui.fakeme){
|
||||
ui.fakeme.style.backgroundImage=player.node.avatar.style.backgroundImage;
|
||||
}
|
||||
},player);
|
||||
}
|
||||
'step 1'
|
||||
var next=game.createEvent('mbdanggu_clique');
|
||||
next.player=player;
|
||||
next.setContent(lib.skill.mbdanggu.contentx);
|
||||
|
@ -985,6 +1012,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
trigger.includeOut=true;
|
||||
}
|
||||
},
|
||||
ai:{combo:'mbdanggu'},
|
||||
dieContent:function(){
|
||||
'step 0'
|
||||
event.forceDie=true;
|
||||
|
@ -1595,7 +1623,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
return event.targets.length==1&&event.card.name=='sha';
|
||||
},
|
||||
prompt2:function(event,player){
|
||||
var str='展示牌堆顶的两张牌并增加伤害;且';
|
||||
var str='亮出牌堆顶的两张牌并增加伤害;且';
|
||||
str+=('令'+get.translation(event.target)+'不能使用');
|
||||
str+='这两张牌所包含的花色';
|
||||
str+=('的牌响应'+get.translation(event.card));
|
||||
|
@ -1622,7 +1650,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
var suitx=get.suit(card,false);
|
||||
suits.add(suitx);
|
||||
if(suit==suitx) evt.baseDamage++;
|
||||
ui.cardPile.insertBefore(card,ui.cardPile.firstChild);
|
||||
}
|
||||
game.updateRoundNumber();
|
||||
}
|
||||
|
@ -1665,6 +1692,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
forced:true,
|
||||
firstDo:true,
|
||||
charlotte:true,
|
||||
popup:false,
|
||||
onremove:function(player){
|
||||
delete player.storage.scschihe_block;
|
||||
delete player.storage.scschihe_blocker;
|
||||
|
@ -12397,7 +12425,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
filter:(event,player)=>{
|
||||
if(event.type!='dying') return false;
|
||||
if(player!=event.dying) return false;
|
||||
return player.hasCard(card=>lib.skill.xinfu_jingxie2.filterCard(card,player),lib.skill.xinfu_jingxie2.position);
|
||||
return player.hasCard(card=>lib.skill.xinfu_jingxie2.filterCard(card,player),'he');
|
||||
},
|
||||
position:"he",
|
||||
discard:false,
|
||||
|
@ -14173,7 +14201,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
mbdanggu:'党锢',
|
||||
mbdanggu_info:'锁定技。①游戏开始时,你获得十张“常侍”牌,然后你进行一次结党。②当你修整结束后,你进行一次结党并摸一张牌。③若你有亮出的“常侍”牌,你视为拥有这些牌的技能。',
|
||||
mbdanggu_faq:'关于结党',
|
||||
mbdanggu_faq_info:'<br>系统随机选择一张未亮出过的“常侍”牌,然后选择四张未亮出过的“常侍”牌(若剩余“常侍”牌中有「高望」,则必定出现)。你观看前者,然后从后者中选择一名与前者互相认可的“常侍”牌(不认可的“常侍”牌为不可选状态),你选择这两张牌。然后若此时不为双将模式,你将这两张武将牌作为你的武将牌(不移除原有技能);否则你获得这两张武将牌上的技能。',
|
||||
mbdanggu_faq_info:'<br>系统随机选择一张未亮出过的“常侍”牌,然后选择四张未亮出过的“常侍”牌。你观看前者,然后从后者中选择一名认可前者的“常侍”牌。然后若此时不为双将模式,你将这两张武将牌作为你的武将牌(不移除原有技能);否则你获得这两张武将牌上的技能。',
|
||||
mbdanggu_faq2:'关于认可',
|
||||
mbdanggu_faq2_info:'<br>双向不认可常侍为固定组合:<br><li>郭胜、段珪<br><li>韩悝、毕岚<br>单向不认可常侍为系统随机分配。<br>每次结党至多存在一张不认可主将的常侍牌,且若此次结党仅有一张常侍牌,则不会存在不认可情况。',
|
||||
mbmowang:'殁亡',
|
||||
mbmowang_info:'锁定技。①当你死亡前,若你有未亮出的“常侍”牌且体力上限大于0,你将死亡改为修整至你的下个回合开始前,然后你复原武将牌,且不于此次死亡事件中进行展示身份牌、检测游戏胜利条件与执行奖惩的流程。②回合结束后,你死亡。',
|
||||
mbmowang_faq:'关于修整',
|
||||
|
|
|
@ -15,11 +15,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
refresh_yijiang4:['re_sunluban','re_wuyi','re_hanhaoshihuan','re_caozhen','re_zhoucang','dc_chenqun','re_caifuren','re_guyong','re_jushou','re_zhuhuan','re_zhangsong'],
|
||||
refresh_yijiang5:['re_zhangyi','re_quancong','re_caoxiu','re_sunxiu','re_gongsunyuan','re_guotufengji','re_xiahoushi','re_liuchen','re_zhuzhi','re_caorui'],
|
||||
refresh_yijiang6:['re_guohuanghou','re_sundeng'],
|
||||
refresh_xinghuo:['re_duji','dc_gongsunzan','re_sp_taishici','re_caiyong','re_mazhong','re_wenpin','re_jsp_huangyueying'],
|
||||
refresh_xinghuo:['xin_zhangliang','re_zhugedan','re_simalang','re_duji','dc_gongsunzan','re_sp_taishici','re_caiyong','re_mazhong','re_wenpin','re_jsp_huangyueying'],
|
||||
},
|
||||
},
|
||||
connect:true,
|
||||
character:{
|
||||
xin_zhangliang:['male','qun',4,['rejijun','refangtong'],['unseen']],
|
||||
re_simalang:['male','wei',3,['requji','rejunbing'],['unseen']],
|
||||
re_zhugedan:['male','wei',4,['regongao','rejuyi'],['unseen']],
|
||||
re_caorui:['male','wei',3,['huituo','mingjian','rexingshuai'],['unseen','zhu']],
|
||||
re_caochong:['male','wei',3,['rechengxiang','renxin']],
|
||||
ol_zhangzhang:['male','wu',3,['olzhijian','olguzheng']],
|
||||
|
@ -163,6 +166,206 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
re_guohuai:['xiahouyuan','zhanghe'],
|
||||
},
|
||||
skill:{
|
||||
//界张梁
|
||||
rejijun:{
|
||||
audio:2,
|
||||
trigger:{player:'useCardAfter'},
|
||||
filter:function(event,player){
|
||||
return event.targets&&event.targets.contains(player);
|
||||
},
|
||||
frequent:true,
|
||||
content:function(){
|
||||
player.judge(card=>1).callback=lib.skill.rejijun.callback;
|
||||
},
|
||||
callback:function(){
|
||||
if(typeof card.number=='number') player.addToExpansion(card,'gain2').gaintag.add('rejijun');
|
||||
},
|
||||
onremove:function(player,skill){
|
||||
var cards=player.getExpansions(skill);
|
||||
if(cards.length) player.loseToDiscardpile(cards);
|
||||
},
|
||||
intro:{
|
||||
content:'expansion',
|
||||
markcount:'expansion',
|
||||
},
|
||||
marktext:'方',
|
||||
ai:{combo:'refangtong'},
|
||||
},
|
||||
refangtong:{
|
||||
audio:2,
|
||||
trigger:{player:'phaseJieshuBegin'},
|
||||
filter:function(event,player){
|
||||
return player.countCards('h');
|
||||
},
|
||||
direct:true,
|
||||
content:function(){
|
||||
'step 0'
|
||||
player.chooseCard(get.prompt2('refangtong'),(card,player)=>typeof card.number=='number').set('ai',card=>{
|
||||
var player=_status.event.player;
|
||||
if(!game.hasPlayer(target=>target!=player&&get.damageEffect(target,player,player,'thunder')>0)) return 0;
|
||||
if(player.getExpansions('rejijun').reduce(function(num,card){
|
||||
return num=card.number;
|
||||
},0)>36) return 1/(get.value(card)||0.5);
|
||||
else{
|
||||
if(lib.skill.refangtong.thunderEffect(card,player)) return 10-get.value(card);
|
||||
return 5-get.value(card);
|
||||
}
|
||||
});
|
||||
'step 1'
|
||||
if(result.bool){
|
||||
player.logSkill('refangtong');
|
||||
player.addToExpansion(result.cards,player,'give').gaintag.add('rejijun');
|
||||
}
|
||||
else event.finish();
|
||||
'step 2'
|
||||
player.chooseButton(['###是否移去任意张“方”,对一名其他角色造成1点雷属性伤害?###若你移去的“方”的点数和大于36,则改为造成3点雷属性伤害',player.getExpansions('rejijun')],[1,player.getExpansions('rejijun').length]).set('ai',button=>{
|
||||
var player=_status.event.player;
|
||||
var cards=player.getExpansions('rejijun');
|
||||
if(cards.reduce(function(num,card){
|
||||
return num=card.number;
|
||||
},0)<=36){
|
||||
if(!ui.selected.buttons.length) return 1/button.link.number;
|
||||
return 0;
|
||||
}
|
||||
else{
|
||||
var num=0,list=[];
|
||||
cards.sort((a,b)=>b.number-a.number);
|
||||
for(var i=0;i<cards.length;i++){
|
||||
list.push(cards[i]);
|
||||
num+=cards[i].number;
|
||||
if(num>36) break;
|
||||
}
|
||||
return list.contains(button.link)?1:0;
|
||||
}
|
||||
});
|
||||
'step 3'
|
||||
if(result.bool){
|
||||
var bool=(result.links.reduce(function(num,card){
|
||||
return num=card.number;
|
||||
},0)>36);
|
||||
event.bool=bool;
|
||||
player.loseToDiscardpile(result.links);
|
||||
player.chooseTarget('请选择一名其他角色','对其造成'+(bool?3:1)+'点雷属性伤害',lib.filter.notMe).set('ai',target=>get.damageEffect(target,_status.event.player,_status.event.player,'thunder'));
|
||||
}
|
||||
else event.finish();
|
||||
'step 4'
|
||||
if(result.bool){
|
||||
var target=result.targets[0];
|
||||
player.line(target);
|
||||
target.damage(event.bool?3:1,'thunder');
|
||||
}
|
||||
},
|
||||
thunderEffect:function(card,player){
|
||||
var cards=player.getExpansions('rejijun'),num=0;
|
||||
cards.push(card);
|
||||
if(cards.reduce(function(num,card){
|
||||
return num=card.number;
|
||||
},0)<=36) return false;
|
||||
cards.sort((a,b)=>b.number-a.number);
|
||||
var bool=false;
|
||||
for(var i=0;i<cards.length;i++){
|
||||
if(cards[i]==card) bool=true;
|
||||
num+=cards[i].number;
|
||||
if(num>36) break;
|
||||
}
|
||||
return bool;
|
||||
},
|
||||
ai:{combo:'rejijun'},
|
||||
},
|
||||
//界司马朗
|
||||
requji:{
|
||||
inherit:'quji',
|
||||
content:function(){
|
||||
'step 0'
|
||||
target.recover();
|
||||
'step 1'
|
||||
if(target.isDamaged()) target.draw();
|
||||
'step 2'
|
||||
if(target==targets[targets.length-1]&&cards.some(card=>get.color(card,player)=='black')) player.loseHp();
|
||||
},
|
||||
},
|
||||
rejunbing:{
|
||||
audio:2,
|
||||
trigger:{global:'phaseJieshuBegin'},
|
||||
filter:function(event,player){
|
||||
return event.player.countCards('h')<event.player.getHp();
|
||||
},
|
||||
direct:true,
|
||||
content:function(){
|
||||
'step 0'
|
||||
var target=trigger.player;
|
||||
event.player=player;
|
||||
target.chooseBool(target==player?get.prompt('rejunbing'):'是否响应'+get.translation(player)+'的【郡兵】?','摸一张牌'+(target==player?'':',将所有手牌交给'+get.translation(player)+',然后其可以交给你等量张牌')).set('choice',get.attitude(target,player)>0);
|
||||
'step 1'
|
||||
if(result.bool){
|
||||
player.logSkill('rejunbing',target);
|
||||
if(target!=player) game.log(target,'响应了',player,'的','#g【郡兵】');
|
||||
target.draw();
|
||||
}
|
||||
else event.finish();
|
||||
'step 2'
|
||||
var cards=target.getCards('h');
|
||||
if(target==player||!cards.length){event.finish();return;}
|
||||
target.give(cards,player);
|
||||
event.num=cards.length;
|
||||
'step 3'
|
||||
if(player.countCards('he')<num) event.finish();
|
||||
else player.chooseCard('郡兵:是否还给'+get.translation(target)+get.translation(num)+'张牌?','he',num).set('ai',card=>{
|
||||
var player=_status.event.player;
|
||||
var target=_status.event.target;
|
||||
if(get.attitude(player,target)<=0){
|
||||
if(card.name=='du') return 1145141919810;
|
||||
return -get.value(card);
|
||||
}
|
||||
return 6-get.value(card);
|
||||
}).set('target',target);
|
||||
'step 4'
|
||||
if(result.bool) player.give(result.cards,target);
|
||||
},
|
||||
},
|
||||
//界诸葛诞
|
||||
regongao:{
|
||||
audio:2,
|
||||
trigger:{global:'dying'},
|
||||
filter:function(event,player){
|
||||
if(player==event.player) return false;
|
||||
return !player.getAllHistory('useSkill',evt=>evt.skill=='regongao'&&evt.targets[0]==event.player).length;
|
||||
},
|
||||
forced:true,
|
||||
content:function(){
|
||||
player.gainMaxHp();
|
||||
player.recover();
|
||||
},
|
||||
},
|
||||
rejuyi:{
|
||||
unique:true,
|
||||
audio:2,
|
||||
derivation:['benghuai','reweizhong'],
|
||||
trigger:{player:'phaseZhunbeiBegin'},
|
||||
filter:function(event,player){
|
||||
return player.maxHp>game.countPlayer()&&player.isDamaged();
|
||||
},
|
||||
forced:true,
|
||||
juexingji:true,
|
||||
skillAnimation:true,
|
||||
animationColor:'thunder',
|
||||
content:function(){
|
||||
'step 0'
|
||||
player.awakenSkill('rejuyi');
|
||||
'step 1'
|
||||
player.drawTo(player.maxHp);
|
||||
'step 2'
|
||||
player.addSkillLog('benghuai');
|
||||
player.addSkillLog('reweizhong');
|
||||
}
|
||||
},
|
||||
reweizhong:{
|
||||
audio:2,
|
||||
inherit:'weizhong',
|
||||
content:function(){
|
||||
player.draw(2);
|
||||
},
|
||||
},
|
||||
//堪比界曹冲的界曹叡
|
||||
rexingshuai:{
|
||||
audio:2,
|
||||
|
@ -14749,6 +14952,23 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
re_caorui:'界曹叡',
|
||||
rexingshuai:'兴衰',
|
||||
rexingshuai_info:'主公技,限定技。当你进入濒死状态时,你可令其他魏势力角色依次选择是否令你回复1点体力。然后这些角色依次受到1点伤害。有〖明鉴〗效果的角色于其回合内杀死角色后,你重置〖兴衰〗。',
|
||||
xin_zhangliang:'界张梁',
|
||||
rejijun:'集军',
|
||||
rejijun_info:'当你使用目标角色含有自己的牌结算完毕后,你可以进行一次判定并将判定牌置于武将牌上,称为“方”。',
|
||||
refangtong:'方统',
|
||||
refangtong_info:'结束阶段,你可以将一张手牌置于武将牌上,称为“方”。若如此做,你可以移去任意张“方”并对一名其他角色造成1点雷属性伤害(若你移去的“方”的点数和大于36,则改为造成3点雷属性伤害)。',
|
||||
re_simalang:'界司马朗',
|
||||
requji:'去疾',
|
||||
requji_info:'出牌阶段限一次,你可以弃置至多X张牌并令等量名角色回复1点体力,然后仍处于受伤状态的目标角色摸一张牌,若你以此法弃置了黑色牌,你失去1点体力。',
|
||||
rejunbing:'郡兵',
|
||||
rejunbing_info:'一名角色的结束阶段,若其手牌数小于其体力值,其可以摸一张牌并将所有手牌交给你,然后你可以交给其等量的牌。',
|
||||
re_zhugedan:'界诸葛诞',
|
||||
regongao:'功獒',
|
||||
regongao_info:'锁定技。一名其他角色首次进入濒死状态时,你增加1点体力上限,然后回复1点体力。',
|
||||
rejuyi:'举义',
|
||||
rejuyi_info:'觉醒技。准备阶段,若你已受伤,且你的体力上限大于场上的存活角色数,你将手牌数摸至体力上限,然后获得技能〖崩坏〗和〖威重〗。',
|
||||
reweizhong:'威重',
|
||||
reweizhong_info:'锁定技。当你的体力上限增加或减少时,你摸两张牌。',
|
||||
|
||||
refresh_standard:'界限突破·标',
|
||||
refresh_feng:'界限突破·风',
|
||||
|
|
|
@ -3544,7 +3544,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
ai:{
|
||||
effect:{
|
||||
target:function(card,player,target){
|
||||
if(get.tag(card,'recover')&&player.hp>=player.maxHp-1&&player.maxHp>1) return [0,0];
|
||||
if(get.tag(card,'recover')&&target.hp>=target.maxHp-1&&target.maxHp>1) return [0,0];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5176,7 +5176,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
benghuai:{
|
||||
audio:2,
|
||||
audioname:['zhugedan','re_dongzhuo','ol_dongzhuo'],
|
||||
audioname:['zhugedan','re_dongzhuo','ol_dongzhuo','re_zhugedan'],
|
||||
trigger:{player:'phaseJieshuBegin'},
|
||||
forced:true,
|
||||
check:function(){
|
||||
|
|
|
@ -1139,7 +1139,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(info.type==get.type2(card,false)) return true;
|
||||
if(info.suit!='none'&&info.suit==get.suit(card,false)) return true;
|
||||
if(typeof info.number=='number'&&info.number>0&&info.number==get.suit(card,false)) return true;
|
||||
return info.length==lib.skill.dcweidang.getLength(card)
|
||||
return info.length==get.cardNameLength(card)
|
||||
},
|
||||
content:function(){
|
||||
'step 0'
|
||||
|
@ -1156,7 +1156,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
type:get.type2(card,player),
|
||||
suit:get.suit(card,player),
|
||||
number:get.number(card,player),
|
||||
length:lib.skill.dcweidang.getLength(card),
|
||||
length:get.cardNameLength(card),
|
||||
}
|
||||
event.cards=[];
|
||||
event.forceDie=true;
|
||||
|
@ -2915,7 +2915,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
trigger:{player:'useCard'},
|
||||
forced:true,
|
||||
filter:function(event,player){
|
||||
return lib.skill.dcweidang.getLength(event.card)==player.getHistory('useCard').indexOf(event)+1;
|
||||
return get.cardNameLength(event.card)==player.getHistory('useCard').indexOf(event)+1;
|
||||
},
|
||||
content:function(){
|
||||
var card=trigger.card;
|
||||
|
@ -2928,14 +2928,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
filter:function(event,player){
|
||||
var card=event.card;
|
||||
if(player!=_status.currentPhase||!card||event.getParent().type!='card') return false;
|
||||
return lib.skill.dcweidang.getLength(card)==player.getHistory('useCard').indexOf(event.getParent(2))+1;
|
||||
return get.cardNameLength(card)==player.getHistory('useCard').indexOf(event.getParent(2))+1;
|
||||
},
|
||||
content:function(){
|
||||
trigger.num++;
|
||||
},*/
|
||||
mod:{
|
||||
aiOrder:function(player,card,num){
|
||||
if(typeof card=='object'&&lib.skill.dcweidang.getLength(card)==player.getHistory('useCard').length+1) return num+10;
|
||||
if(typeof card=='object'&&get.cardNameLength(card)==player.getHistory('useCard').length+1) return num+10;
|
||||
},
|
||||
}
|
||||
},
|
||||
|
@ -8170,13 +8170,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
spolzhouxuan:{
|
||||
audio:2,
|
||||
trigger:{player:'phaseDiscardBegin'},
|
||||
direct:true,
|
||||
filter:function(event,player){
|
||||
return player.countCards('h')>0;
|
||||
return player.countCards('h')>0&&player.getExpansions('spolzhouxuan').length<5;
|
||||
},
|
||||
direct:true,
|
||||
content:function(){
|
||||
'step 0'
|
||||
player.chooseCard('h',get.prompt('spolzhouxuan'),[1,5],'将至多五张手牌置于武将牌上作为“旋”').set('ai',function(card){
|
||||
player.chooseCard('h',get.prompt('spolzhouxuan'),[1,5-player.getExpansions('spolzhouxuan').length],'将至多'+get.cnNumber(5-player.getExpansions('spolzhouxuan').length)+'张手牌置于武将牌上').set('ai',function(card){
|
||||
if(ui.selected.cards.length>=player.needsToDiscard()) return 6-get.value(card);
|
||||
return 100-get.useful(card);
|
||||
});
|
||||
|
@ -8201,30 +8201,28 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
use:{
|
||||
audio:'spolzhouxuan',
|
||||
trigger:{player:'useCard'},
|
||||
forced:true,
|
||||
locked:false,
|
||||
filter:function(event,player){
|
||||
return player.getExpansions('spolzhouxuan').length>0;
|
||||
},
|
||||
forced:true,
|
||||
locked:false,
|
||||
content:function(){
|
||||
'step 0'
|
||||
var num=Math.min(5,player.isMaxHandcard(true)?1:player.getExpansions('spolzhouxuan').length);
|
||||
if(num>0) player.draw(num);
|
||||
player.loseToDiscardpile(player.getExpansions('spolzhouxuan').randomGet());
|
||||
'step 1'
|
||||
var cards=player.getExpansions('spolzhouxuan');
|
||||
if(cards.length) player.chooseButton(['选择移去一张“旋”',cards],true);
|
||||
else event.finish();
|
||||
'step 2'
|
||||
if(result.bool) player.loseToDiscardpile(result.links);
|
||||
var num=1;
|
||||
if(!player.isMaxHandcard(true)) num+=player.getExpansions('spolzhouxuan').length;
|
||||
player.draw(num);
|
||||
},
|
||||
},
|
||||
discard:{
|
||||
audio:'spolzhouxuan',
|
||||
trigger:{player:'phaseUseEnd'},
|
||||
forced:true,
|
||||
locked:false,
|
||||
filter:function(event,player){
|
||||
return player.getExpansions('spolzhouxuan').length>0;
|
||||
},
|
||||
forced:true,
|
||||
locked:false,
|
||||
content:function(){
|
||||
player.loseToDiscardpile(player.getExpansions('spolzhouxuan'));
|
||||
},
|
||||
|
@ -21205,6 +21203,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
},
|
||||
yongsi:{
|
||||
audio:'yongsi1',
|
||||
group:['yongsi1','yongsi2'],
|
||||
locked:true,
|
||||
ai:{
|
||||
|
@ -21765,16 +21764,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
ai:{
|
||||
threaten:1.5
|
||||
}
|
||||
},
|
||||
},
|
||||
juyi:{
|
||||
skillAnimation:true,
|
||||
animationColor:'thunder',
|
||||
audio:true,
|
||||
audio:2,
|
||||
derivation:['benghuai','weizhong'],
|
||||
trigger:{player:'phaseZhunbeiBegin'},
|
||||
filter:function(event,player){
|
||||
return player.maxHp>game.players.length&&!player.storage.juyi;
|
||||
return player.maxHp>game.countPlayer()&&!player.storage.juyi;
|
||||
},
|
||||
forced:true,
|
||||
unique:true,
|
||||
|
@ -21788,12 +21787,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
},
|
||||
weizhong:{
|
||||
audio:true,
|
||||
audio:2,
|
||||
trigger:{player:['gainMaxHpEnd','loseMaxHpEnd']},
|
||||
forced:true,
|
||||
content:function(){
|
||||
player.draw(player.isMinHandcard()?2:1);
|
||||
}
|
||||
},
|
||||
},
|
||||
kuangfu:{
|
||||
trigger:{source:'damageSource'},
|
||||
|
@ -23817,7 +23816,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
//zhendu_info_guozhan:'其他角色的出牌阶段开始时,你可以弃置一张手牌,视为该角色使用了一张【酒】。若如此做,你对其造成一点伤害。',
|
||||
shangyi_info:'出牌阶段限一次,你可以观看一名其他角色的手牌,然后弃置其中的一张黑色牌。',
|
||||
zniaoxiang_info:'锁定技,当你使用【杀】指定目标后,你令目标角色响应此【杀】所需要使用的【闪】的数目+1。',
|
||||
shoucheng_info:'当一名其他角色于其回合外失去手牌时,若其没有手牌,则你可令该角色摸一张牌。',
|
||||
shoucheng_info:'当一名角色于其回合外失去手牌时,若其没有手牌,则你可令该角色摸一张牌。',
|
||||
shengxi_info:'弃牌阶段开始时,若你本回合内未造成过伤害,则你可以摸两张牌。',
|
||||
hengzheng_info:'摸牌阶段开始时,若你的体力值为1或你没有手牌,则你可以放弃摸牌,改为获得每名其他角色区域内的一张牌。',
|
||||
cunsi_info:'限定技,出牌阶段,你可以将所有手牌交给一名男性角色。该角色获得技能【勇决】,然后你将武将牌翻面。',
|
||||
|
@ -23911,7 +23910,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
reluanzhan_add:'乱战',
|
||||
reluanzhan_remove:'乱战',
|
||||
reluanzhan_info:'当你受到或造成伤害后,你获得一个“乱”。当你使用【杀】或黑色普通锦囊牌选择目标后,你可为此牌增加至多X个目标。当你使用这些牌指定第一个目标后,若此牌目标数小于X,则你移去X/2(向上取整)个“乱”。(X为“乱”数)',
|
||||
zhuixi:'追袭',
|
||||
zhuixi:'追摄',
|
||||
zhuixi_info:'锁定技,你使用【杀】的次数上限+1。',
|
||||
reduanbing:'短兵',
|
||||
reduanbing_info:'你使用【杀】选择目标后,可以为此【杀】增加一名距离为1的额外目标。你对距离为1的角色使用的【杀】需两张【闪】才能抵消。',
|
||||
|
@ -24009,7 +24008,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
olzaowang_info:'限定技。出牌阶段,你可以令一名角色加1点体力上限,回复1点体力并摸三张牌,且获得如下效果:主公死亡时,若其身份为忠臣,则其和主公交换身份牌;其死亡时,若其身份为反贼且伤害来源的身份为主公或忠臣,则以主忠胜利结束本局游戏。',
|
||||
sp_ol_zhanghe:'SP张郃',
|
||||
spolzhouxuan:'周旋',
|
||||
spolzhouxuan_info:'①弃牌阶段开始时,你可将至多五张置于武将牌上,称为“旋”。②当你使用牌时,你摸一张牌并将一张“旋”置入弃牌堆(若你的手牌数不为全场唯一最多则改为摸X张牌,X为“旋”数)。③出牌阶段结束时,你将所有“旋”置入弃牌堆。',
|
||||
spolzhouxuan_info:'①弃牌阶段开始时,你可将任意张置于武将牌上,称为“旋”(你至多拥有五张“旋”)。②当你使用牌时,你随机将一张“旋”置入弃牌堆,然后摸一张牌(若你的手牌数不为全场唯一最多则额外摸X张牌,X为“旋”数)。③出牌阶段结束时,你将所有“旋”置入弃牌堆。',
|
||||
wuyan:'吾彦',
|
||||
lanjiang:'澜疆',
|
||||
lanjiang_info:'结束阶段,你可以选择所有手牌数不小于你的角色。这些角色依次选择是否令你摸一张牌。然后你可以对其中一名手牌数等于你的角色造成1点伤害,随后可以对其中一名手牌数小于你的角色摸一张牌。',
|
||||
|
|
|
@ -386,8 +386,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
audio:2,
|
||||
trigger:{global:'phaseEnd'},
|
||||
filter:function(event,player){
|
||||
var zhu=game.filterPlayer(i=>i.getSeatNum()==1)[0];
|
||||
return player.hasSkill('shiming_round')&&(game.getGlobalHistory('changeHp',evt=>{
|
||||
var zhu=game.findPlayer(i=>i.getSeatNum()==1);
|
||||
return zhu&&player.hasSkill('shiming_round')&&(game.getGlobalHistory('changeHp',evt=>{
|
||||
return evt.player==zhu&&evt._dyinged;
|
||||
}).length>0||zhu.getHistory('damage').length==0)||!game.hasPlayer2(current=>current.getHistory('damage').length>0);
|
||||
},
|
||||
|
@ -395,7 +395,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
content:function(){
|
||||
'step 0'
|
||||
if(player.hasSkill('shiming_round')){
|
||||
var zhu=game.filterPlayer(i=>i.getSeatNum()==1)[0];
|
||||
var zhu=game.findPlayer(i=>i.getSeatNum()==1);
|
||||
if(game.getGlobalHistory('changeHp',evt=>{
|
||||
return evt.player==zhu&&evt._dyinged;
|
||||
}).length>0||zhu.getHistory('damage').length==0){
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
window.noname_asset_list=[
|
||||
'v1.9.125.1',
|
||||
'v1.9.126.1',
|
||||
'audio/background/aozhan_chaoming.mp3',
|
||||
'audio/background/aozhan_online.mp3',
|
||||
'audio/background/aozhan_rewrite.mp3',
|
||||
|
@ -6445,6 +6445,7 @@ window.noname_asset_list=[
|
|||
'image/character/clan_xunshu.jpg',
|
||||
'image/character/clan_zhonghui.jpg',
|
||||
'image/character/clan_zhongyan.jpg',
|
||||
'image/character/clan_zhongyu.jpg',
|
||||
'image/character/cuimao.jpg',
|
||||
'image/character/cuiyan.jpg',
|
||||
'image/character/daqiao.jpg',
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
window.config={
|
||||
extension_sources:{
|
||||
GitHub:'https://raw.githubusercontent.com/libccy/noname-extension/master/',
|
||||
Coding:'https://raw.fgit.cf/libccy/noname-extension/master/',
|
||||
GitHub:'https://raw.githubusercontent.com/libccy/noname-extension/master/'
|
||||
},
|
||||
extension_source:'Coding',
|
||||
forbidai:['ns_liuzhang'],
|
||||
|
|
555
game/game.js
555
game/game.js
|
@ -29,6 +29,44 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
function _genNext(gen,resolve,reject,_next,_throw,key,arg){
|
||||
try{
|
||||
var info=gen[key](arg);
|
||||
var value=info.value;
|
||||
}catch(error){
|
||||
reject(error);
|
||||
return;
|
||||
}
|
||||
if(info.done){
|
||||
resolve(value);
|
||||
}else{
|
||||
Promise.resolve(value).then(_next,_throw);
|
||||
}
|
||||
}
|
||||
function genAwait(gen){
|
||||
return new Promise((resolve,reject)=>{
|
||||
function _next(value){
|
||||
_genNext(gen,resolve,reject,_next,_throw,"next",value);
|
||||
}
|
||||
function _throw(err){
|
||||
_genNext(gen,resolve,reject,_next,_throw,"throw",err);
|
||||
}
|
||||
_next(undefined);
|
||||
})
|
||||
}
|
||||
function genAsync(fn){
|
||||
return function genCoroutine(){
|
||||
var self=this,args=arguments;
|
||||
return new Promise((resolve,reject)=>{
|
||||
var gen=fn.apply(self,args);
|
||||
genAwait(gen).then((result, err)=>{
|
||||
if(err) reject(err);
|
||||
else resolve(result);
|
||||
});
|
||||
});
|
||||
};
|
||||
}
|
||||
const GeneratorFunction=(function*(){}).constructor;
|
||||
const _status={
|
||||
paused:false,
|
||||
paused2:false,
|
||||
|
@ -69,11 +107,11 @@
|
|||
configprefix:'noname_0.9_',
|
||||
versionOL:27,
|
||||
updateURLS:{
|
||||
coding:'https://ghproxy.com/https://raw.githubusercontent.com/libccy/noname',
|
||||
coding:'https://raw.fgit.cf/libccy/noname',
|
||||
github:'https://raw.githubusercontent.com/libccy/noname',
|
||||
},
|
||||
updateURL:'https://raw.githubusercontent.com/libccy/noname',
|
||||
mirrorURL:'https://nakamurayuri.coding.net/p/noname/d/noname/git/raw',
|
||||
mirrorURL:'https://raw.fgit.cf/libccy/noname',
|
||||
hallURL:'47.99.105.222',
|
||||
assetURL:'',
|
||||
changeLog:[],
|
||||
|
@ -112,6 +150,7 @@
|
|||
card:{},
|
||||
},
|
||||
onload:[],
|
||||
onload2:[],
|
||||
arenaReady:[],
|
||||
onfree:[],
|
||||
inpile:[],
|
||||
|
@ -151,6 +190,8 @@
|
|||
},
|
||||
}
|
||||
},
|
||||
//Yingbian
|
||||
//应变
|
||||
yingbian:{
|
||||
condition:{
|
||||
color:new Map([
|
||||
|
@ -313,15 +354,21 @@
|
|||
}]
|
||||
]),
|
||||
prompt:new Map([
|
||||
['add','当你使用此牌选择目标后,你可为此牌增加一个目标'],
|
||||
['remove','当你使用此牌选择目标后,你可为此牌减少一个目标'],
|
||||
['damage','此牌的伤害值基数+1'],
|
||||
['draw','当你声明使用此牌时,你摸一张牌'],
|
||||
['gain','当你声明使用此牌时,你获得此牌响应的目标牌'],
|
||||
['add','目标+1'],
|
||||
['remove','目标-1'],
|
||||
['damage','伤害+1'],
|
||||
['draw','摸一张牌'],
|
||||
['gain','获得响应的牌'],
|
||||
['hit','此牌不可被响应'],
|
||||
['all','此牌的效果改为依次执行所有选项']
|
||||
['all','无视条件执行所有选项']
|
||||
])
|
||||
},
|
||||
//The actual card name
|
||||
//实际的卡牌名称
|
||||
actualCardName:new Map([
|
||||
['挟令','挟天子以令诸侯'],
|
||||
['霹雳投石车','霹雳车']
|
||||
]),
|
||||
characterDialogGroup:{
|
||||
'收藏':function(name,capt){
|
||||
return lib.config.favouriteCharacter.contains(name)?capt:null;
|
||||
|
@ -7114,6 +7161,8 @@
|
|||
'无名杀 - 录像 - '+_status.videoToSave.name[0]+' - '+_status.videoToSave.name[1]);
|
||||
}
|
||||
},
|
||||
genAsync:fn=>genAsync(fn),
|
||||
genAwait:gen=>genAwait(gen),
|
||||
init:{
|
||||
init:function(){
|
||||
if(typeof __dirname==='string'&&__dirname.length){
|
||||
|
@ -7608,22 +7657,6 @@
|
|||
}
|
||||
});
|
||||
}
|
||||
if(!Array.from){
|
||||
Object.defineProperty(Array, "from", {
|
||||
configurable:true,
|
||||
enumerable:false,
|
||||
writable:true,
|
||||
value:function(args){
|
||||
const list=[];
|
||||
if(args&&args.length){
|
||||
for(let i=0;i<args.length;i++){
|
||||
list.push(args[i]);
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
});
|
||||
}
|
||||
if(!Object.values){
|
||||
Object.defineProperty(Object, 'values', {
|
||||
configurable:true,
|
||||
|
@ -8076,7 +8109,14 @@
|
|||
}
|
||||
const loadPack=()=>{
|
||||
let toLoad=lib.config.all.cards.length+lib.config.all.characters.length+1;
|
||||
if(_status.jsExt) toLoad+=_status.jsExt.length;
|
||||
if(_status.jsExt) toLoad+=_status.jsExt.reduce((previousValue,currentValue)=>{
|
||||
const arrayLengths=Object.values(currentValue).reduce((previousElement,currentElement)=>{
|
||||
if(Array.isArray(currentElement)) previousElement.push(currentElement.length);
|
||||
return previousElement;
|
||||
},[]);
|
||||
if(!arrayLengths.length) return previousValue+1;
|
||||
return previousValue+Math.min(...arrayLengths);
|
||||
},0);
|
||||
const packLoaded=()=>{
|
||||
toLoad--;
|
||||
if(toLoad) return;
|
||||
|
@ -8098,20 +8138,31 @@
|
|||
lib.init.js(`${lib.assetURL}character`,lib.config.all.characters,packLoaded,packLoaded);
|
||||
lib.init.js(`${lib.assetURL}character`,'rank',packLoaded,packLoaded);
|
||||
if(!_status.jsExt) return;
|
||||
const loadJSExt=(jsExt,pathArray,nameArray,index)=>{
|
||||
if(!pathArray&&!nameArray){
|
||||
lib.init.js(jsExt.path,jsExt.name,packLoaded,packLoaded);
|
||||
const loadJSExt=(jsExt,pathArray,fileArray,onloadArray,onerrorArray,index)=>{
|
||||
if(!pathArray&&!fileArray&&!onloadArray&&!onerrorArray){
|
||||
lib.init.js(jsExt.path,jsExt.file,()=>{
|
||||
if(typeof jsExt.onload=='function') jsExt.onload();
|
||||
packLoaded();
|
||||
},()=>{
|
||||
if(typeof jsExt.onerror=='function') jsExt.onerror();
|
||||
packLoaded();
|
||||
});
|
||||
return;
|
||||
}
|
||||
if(typeof index!='number') index=0;
|
||||
if(pathArray&&index>=jsExt.path.length||nameArray&&index>=jsExt.name.length) return;
|
||||
const path=pathArray?jsExt.path[index]:jsExt.path,name=nameArray?jsExt.name[index]:jsExt.name,jsExtLoaded=()=>{
|
||||
loadJSExt(jsExt,pathArray,nameArray,index+1);
|
||||
if(pathArray&&index>=jsExt.path.length||fileArray&&index>=jsExt.file.length||onloadArray&&index>=jsExt.onload.length||onerrorArray&&index>=jsExt.onerror.length) return;
|
||||
const path=pathArray?jsExt.path[index]:jsExt.path,file=fileArray?jsExt.file[index]:jsExt.file,onload=onloadArray?jsExt.onload[index]:jsExt.onload,onerror=onerrorArray?jsExt.onerror[index]:jsExt.onerror,jsExtOnLoad=()=>{
|
||||
if(typeof onload=='function') onload();
|
||||
loadJSExt(jsExt,pathArray,fileArray,onloadArray,onerrorArray,index+1);
|
||||
packLoaded();
|
||||
},jsExtOnError=()=>{
|
||||
if(typeof onerror=='function') onerror();
|
||||
loadJSExt(jsExt,pathArray,fileArray,onloadArray,onerrorArray,index+1);
|
||||
packLoaded();
|
||||
};
|
||||
lib.init.js(path,name,jsExtLoaded,jsExtLoaded);
|
||||
lib.init.js(path,file,jsExtOnLoad,jsExtOnError);
|
||||
};
|
||||
_status.jsExt.forEach(value=>loadJSExt(value,Array.isArray(value.path),Array.isArray(value.name)));
|
||||
_status.jsExt.forEach(value=>loadJSExt(value,Array.isArray(value.path),Array.isArray(value.file),Array.isArray(value.onload),Array.isArray(value.onerror)));
|
||||
// if(lib.device!='ios'&&lib.config.enable_pressure) lib.init.js(lib.assetURL+'game','pressure');
|
||||
};
|
||||
|
||||
|
@ -8389,13 +8440,13 @@
|
|||
});
|
||||
});
|
||||
};
|
||||
game.getFileList=function(dir,callback){
|
||||
game.getFileList=(dir,success,failure)=>{
|
||||
var files=[],folders=[];
|
||||
window.resolveLocalFileSystemURL(lib.assetURL+dir,function(entry){
|
||||
window.resolveLocalFileSystemURL(lib.assetURL+dir,entry=>{
|
||||
var dirReader=entry.createReader();
|
||||
var entries=[];
|
||||
var readEntries=function(){
|
||||
dirReader.readEntries(function(results){
|
||||
var readEntries=()=>{
|
||||
dirReader.readEntries(results=>{
|
||||
if(!results.length){
|
||||
entries.sort();
|
||||
for(var i=0;i<entries.length;i++){
|
||||
|
@ -8406,16 +8457,16 @@
|
|||
files.push(entries[i].name);
|
||||
}
|
||||
}
|
||||
callback(folders,files);
|
||||
success(folders,files);
|
||||
}
|
||||
else{
|
||||
entries=entries.concat(Array.from(results));
|
||||
readEntries();
|
||||
}
|
||||
});
|
||||
},failure);
|
||||
};
|
||||
readEntries();
|
||||
});
|
||||
},failure);
|
||||
};
|
||||
game.ensureDirectory=function(list,callback,file){
|
||||
var directorylist;
|
||||
|
@ -8577,21 +8628,39 @@
|
|||
game.removeFile=function(filename,callback){
|
||||
lib.node.fs.unlink(__dirname+'/'+filename,callback||function(){});
|
||||
};
|
||||
game.getFileList=function(dir,callback){
|
||||
game.getFileList=(dir,success,failure)=>{
|
||||
var files=[],folders=[];
|
||||
dir=__dirname+'/'+dir;
|
||||
lib.node.fs.readdir(dir,function(err,filelist){
|
||||
for(var i=0;i<filelist.length;i++){
|
||||
if(filelist[i][0]!='.'&&filelist[i][0]!='_'){
|
||||
if(lib.node.fs.statSync(dir+'/'+filelist[i]).isDirectory()){
|
||||
folders.push(filelist[i]);
|
||||
}
|
||||
else{
|
||||
files.push(filelist[i]);
|
||||
if(typeof failure=="undefined"){
|
||||
failure=err=>{
|
||||
throw err;
|
||||
};
|
||||
}
|
||||
else if(failure == null){
|
||||
failure=()=>{};
|
||||
}
|
||||
lib.node.fs.access(dir,lib.node.fs.constants.F_OK|lib.node.fs.constants.R_OK,err=>{
|
||||
if(err) {
|
||||
failure(err);
|
||||
return;
|
||||
}
|
||||
lib.node.fs.readdir(dir,(err,filelist)=>{
|
||||
if(err){
|
||||
failure(err);
|
||||
return;
|
||||
}
|
||||
for(var i=0;i<filelist.length;i++){
|
||||
if(filelist[i][0]!='.'&&filelist[i][0]!='_'){
|
||||
if(lib.node.fs.statSync(dir+'/'+filelist[i]).isDirectory()){
|
||||
folders.push(filelist[i]);
|
||||
}
|
||||
else{
|
||||
files.push(filelist[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
callback(folders,files);
|
||||
success(folders,files);
|
||||
});
|
||||
});
|
||||
};
|
||||
game.ensureDirectory=function(list,callback,file){
|
||||
|
@ -8791,11 +8860,14 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
onload:function(){
|
||||
//lib.onload支持传入GeneratorFunction以解决异步函数的问题 by诗笺
|
||||
onload:genAsync(function*(){
|
||||
const libOnload=lib.onload;
|
||||
delete lib.onload;
|
||||
while(libOnload.length){
|
||||
libOnload.shift()();
|
||||
while(Array.isArray(libOnload)&&libOnload.length){
|
||||
const fun=libOnload.shift();
|
||||
const result=fun();
|
||||
yield (fun instanceof GeneratorFunction)?genAwait(result):result;
|
||||
}
|
||||
ui.updated();
|
||||
game.documentZoom=game.deviceZoom;
|
||||
|
@ -9128,7 +9200,7 @@
|
|||
};
|
||||
}
|
||||
else{
|
||||
lib[j][k]=character[i][j][k];
|
||||
Object.defineProperty(lib[j],k,Object.getOwnPropertyDescriptor(character[i][j],k));
|
||||
}
|
||||
if(j=='card'&&lib[j][k].derivation){
|
||||
if(!lib.cardPack.mode_derivation){
|
||||
|
@ -9398,7 +9470,7 @@
|
|||
try{
|
||||
_status.extension=lib.extensions[i][0];
|
||||
_status.evaluatingExtension=lib.extensions[i][3];
|
||||
lib.extensions[i][1](lib.extensions[i][2],lib.extensions[i][4]);
|
||||
if (typeof lib.extensions[i][1]=="function") lib.extensions[i][1](lib.extensions[i][2],lib.extensions[i][4]);
|
||||
if(lib.extensions[i][4]){
|
||||
if(lib.extensions[i][4].character){
|
||||
for(var j in lib.extensions[i][4].character.character){
|
||||
|
@ -9554,7 +9626,14 @@
|
|||
}
|
||||
localStorage.removeItem(lib.configprefix+'directstart');
|
||||
delete lib.init.init;
|
||||
},
|
||||
const libOnload2=lib.onload2;
|
||||
delete lib.onload2;
|
||||
while(Array.isArray(libOnload2)&&libOnload2.length){
|
||||
const fun=libOnload2.shift();
|
||||
const result=fun();
|
||||
yield (fun instanceof GeneratorFunction)?genAwait(result):result;
|
||||
}
|
||||
}),
|
||||
startOnline:function(){
|
||||
'step 0'
|
||||
event._resultid=null;
|
||||
|
@ -9664,11 +9743,13 @@
|
|||
//在扩展的precontent中调用,用于加载扩展必需的JS文件。
|
||||
//If any of the parameters is an Array, corresponding files will be loaded in order
|
||||
//如果任意参数为数组,则按顺序加载加载相应的文件
|
||||
jsForExtension:(path,name)=>{
|
||||
jsForExtension:(path,file,onload,onerror)=>{
|
||||
if(!_status.jsExt) _status.jsExt=[];
|
||||
_status.jsExt.add({
|
||||
path:path,
|
||||
name:name
|
||||
file:file,
|
||||
onload:onload,
|
||||
onerror:onerror
|
||||
});
|
||||
},
|
||||
js:(path,file,onload,onerror)=>{
|
||||
|
@ -9897,7 +9978,7 @@
|
|||
parsex:function(func){
|
||||
//Remove all comments
|
||||
//移除所有注释
|
||||
var str=func.toString().replace(/((?:(?:^[ \t]*)?(?:\/\*[^*]*\*+(?:[^\/*][^*]*\*+)*\/(?:[ \t]*\r?\n(?=[ \t]*(?:\r?\n|\/\*|\/\/)))?|\/\/(?:[^\\]|\\(?:\r?\n)?)*?(?:\r?\n(?=[ \t]*(?:\r?\n|\/\*|\/\/))|(?=\r?\n))))+)|("(?:\\[\S\s]|[^"\\])*"|'(?:\\[\S\s]|[^'\\])*'|(?:\r?\n|[\S\s])[^\/"'\\\s]*)/mg,'$2').trim();
|
||||
var str=func.toString().replace(/((?:(?:^[ \t]*)?(?:\/\*[^*]*\*+(?:[^\/*][^*]*\*+)*\/(?:[ \t]*\r?\n(?=[ \t]*(?:\r?\n|\/\*|\/\/)))?|\/\/(?:[^\\]|\\(?:\r?\n)?)*?(?:\r?\n(?=[ \t]*(?:\r?\n|\/\*|\/\/))|(?=\r?\n))))+)|("(?:\\[\s\S]|[^"\\])*"|'(?:\\[\s\S]|[^'\\])*'|(?:\r?\n|[\s\S])[^\/"'\\\s]*)/mg,'$2').trim();
|
||||
//获取第一个 { 后的所有字符
|
||||
str=str.slice(str.indexOf('{')+1);
|
||||
//func中要写步骤的话,必须要写step 0
|
||||
|
@ -10879,6 +10960,69 @@
|
|||
emptyEvent:function(){
|
||||
event.trigger(event.name);
|
||||
},
|
||||
//Execute the delay card effect
|
||||
//执行延时锦囊牌效果
|
||||
executeDelayCardEffect:()=>{
|
||||
'step 0'
|
||||
target.$phaseJudge(card);
|
||||
event.cancelled=false;
|
||||
event.trigger('executeDelayCardEffect');
|
||||
event.cardName=card.viewAs||card.name;
|
||||
target.popup(event.cardName,'thunder');
|
||||
if(!lib.card[event.cardName].effect){
|
||||
game.delay();
|
||||
event.finish();
|
||||
}
|
||||
else if(!lib.card[event.cardName].judge){
|
||||
game.delay();
|
||||
event.nojudge=true;
|
||||
}
|
||||
'step 1'
|
||||
if(!event.cancelled&&!event.nojudge) player.judge(card);
|
||||
'step 2'
|
||||
if(event.excluded) delete event.excluded;
|
||||
else{
|
||||
const cardName=event.cardName;
|
||||
if(event.cancelled&&!event.direct){
|
||||
const cardCancel=lib.card[cardName].cancel;
|
||||
if(cardCancel){
|
||||
const next=game.createEvent(`${cardName}Cancel`);
|
||||
next.setContent(cardCancel);
|
||||
next.cards=[card];
|
||||
if(!card.viewAs){
|
||||
const autoViewAs=next.card=get.autoViewAs(card);
|
||||
autoViewAs.expired=card.expired;
|
||||
}
|
||||
else{
|
||||
const autoViewAs=next.card=get.autoViewAs({
|
||||
name:cardName
|
||||
},next.cards);
|
||||
autoViewAs.expired=card.expired;
|
||||
}
|
||||
next.player=player;
|
||||
}
|
||||
}
|
||||
else{
|
||||
const next=game.createEvent(cardName);
|
||||
next.setContent(lib.card[cardName].effect);
|
||||
next._result=result;
|
||||
next.cards=[card];
|
||||
if(!card.viewAs){
|
||||
const autoViewAs=next.card=get.autoViewAs(card);
|
||||
autoViewAs.expired=card.expired;
|
||||
}
|
||||
else{
|
||||
const autoViewAs=next.card=get.autoViewAs({
|
||||
name:cardName
|
||||
},next.cards);
|
||||
autoViewAs.expired=card.expired;
|
||||
}
|
||||
next.player=player;
|
||||
}
|
||||
}
|
||||
ui.clear();
|
||||
card.delete();
|
||||
},
|
||||
//Gift
|
||||
//赠予
|
||||
gift:()=>{
|
||||
|
@ -10889,7 +11033,10 @@
|
|||
event.card=cards[num];
|
||||
event.trigger('gift');
|
||||
}
|
||||
else event.finish();
|
||||
else{
|
||||
game.delayx();
|
||||
event.finish();
|
||||
}
|
||||
'step 2'
|
||||
if(event.deniedGifts.includes(card)){
|
||||
game.log(target,'拒绝了',player,'赠予的',card);
|
||||
|
@ -18238,10 +18385,19 @@
|
|||
_status.dying.remove(player);
|
||||
|
||||
if(lib.config.background_speak){
|
||||
if(lib.character[player.name]&&lib.character[player.name][4].contains('die_audio')){
|
||||
if(lib.character[player.name]&&lib.character[player.name][4].some(tag=>/^die:.+$/.test(tag))){
|
||||
const tag=lib.character[player.name][4].find(tag=>/^die:.+$/.test(tag));
|
||||
const reg=new RegExp("^ext:(.+)?/");
|
||||
const match=tag.match(/^die:(.+)$/);
|
||||
if(match){
|
||||
let path=match[1];
|
||||
if(reg.test(path)) path=path.replace(reg,(_o,p)=>`../extension/${p}/`);
|
||||
game.playAudio(path);
|
||||
}
|
||||
}
|
||||
else if(lib.character[player.name]&&lib.character[player.name][4].contains('die_audio')){
|
||||
game.playAudio('die',player.name);
|
||||
}
|
||||
// else if(true){
|
||||
else{
|
||||
game.playAudio('die',player.name,function(){
|
||||
game.playAudio('die',player.name.slice(player.name.indexOf('_')+1));
|
||||
|
@ -18639,6 +18795,25 @@
|
|||
},
|
||||
player:{
|
||||
//新函数
|
||||
//Execute the delay card effect
|
||||
//执行延时锦囊牌效果
|
||||
executeDelayCardEffect:function(card,target){
|
||||
const executeDelayCardEffect=game.createEvent('executeDelayCardEffect');
|
||||
executeDelayCardEffect.player=this;
|
||||
executeDelayCardEffect.target=target||this;
|
||||
if(typeof card=='string'){
|
||||
const virtualCard=executeDelayCardEffect.card=ui.create.card();
|
||||
virtualCard._destroy=true;
|
||||
virtualCard.expired=true;
|
||||
const info=lib.card[card];
|
||||
virtualCard.init(['','',card,info&&info.cardnature]);
|
||||
}
|
||||
else if(get.itemtype(card)=='card') executeDelayCardEffect.card=card;
|
||||
else _status.event.next.remove(executeDelayCardEffect);
|
||||
executeDelayCardEffect.setContent('executeDelayCardEffect');
|
||||
executeDelayCardEffect._args=Array.from(arguments);
|
||||
return executeDelayCardEffect;
|
||||
},
|
||||
//Check if the card does not count toward hand limit
|
||||
//检测此牌是否不计入手牌上限
|
||||
canIgnoreHandcard:function(card){
|
||||
|
@ -23871,7 +24046,7 @@
|
|||
var bar=ui.create.div(this.node.timer);
|
||||
ui.refresh(bar);
|
||||
bar.style.transitionDuration=(time/1000)+'s';
|
||||
bar.style.width=0;
|
||||
bar.style.transform='scale(0,1)';
|
||||
},
|
||||
hideTimer:function(){
|
||||
if(_status.connectMode&&!game.online&&this.playerid){
|
||||
|
@ -27793,21 +27968,21 @@
|
|||
return this._tempCache[key1][key2];
|
||||
},
|
||||
cancel:function(arg1,arg2,notrigger){
|
||||
this.untrigger.call(this,arguments);
|
||||
this.untrigger(arg1,arg2);
|
||||
this.finish();
|
||||
if(notrigger!='notrigger'){
|
||||
this.trigger(this.name+'Cancelled');
|
||||
if(this.player&&lib.phaseName.contains(this.name)) this.player.getHistory('skipped').add(this.name)}
|
||||
},
|
||||
neutralize:function(event){
|
||||
this.untrigger.call(this,arguments);
|
||||
this.untrigger(true);
|
||||
this.finish();
|
||||
this._neutralized=true;
|
||||
this.trigger('eventNeutralized');
|
||||
this._neutralize_event=event||_status.event;
|
||||
},
|
||||
unneutralize:function(){
|
||||
this.untrigger.call(this,arguments);
|
||||
this.untrigger(true);
|
||||
delete this._neutralized;
|
||||
delete this.finished;
|
||||
if(this.type=='card'&&this.card&&this.name=='sha') this.directHit=true;
|
||||
|
@ -28355,6 +28530,7 @@
|
|||
}
|
||||
},
|
||||
untrigger:function(all,player){
|
||||
if(typeof all=='undefined') all=true;
|
||||
var evt=this._triggering;
|
||||
if(all){
|
||||
if(evt&&evt.map){
|
||||
|
@ -30534,7 +30710,9 @@
|
|||
if(trigger.getParent().notLink()) trigger.getParent().lianhuanable=true;
|
||||
}
|
||||
},
|
||||
//Deprecated skills
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
_chongzhu:{
|
||||
get filter(){
|
||||
return lib.skill._recasting.filter;
|
||||
|
@ -30560,44 +30738,6 @@
|
|||
set ai(ai){
|
||||
lib.skill._recasting.ai=ai;
|
||||
}
|
||||
},
|
||||
_yongjian_zengyu:{
|
||||
get filter(){
|
||||
return lib.skill._gifting.filter;
|
||||
},
|
||||
set filter(filter){
|
||||
lib.skill._gifting.filter=filter;
|
||||
},
|
||||
get filterCard(){
|
||||
return lib.skill._gifting.filterCard;
|
||||
},
|
||||
set filterCard(filterCard){
|
||||
lib.skill._gifting.filterCard=filterCard;
|
||||
},
|
||||
get filterTarget(){
|
||||
return lib.skill._gifting.filterTarget;
|
||||
},
|
||||
set filterTarget(filterTarget){
|
||||
lib.skill._gifting.filterTarget=filterTarget;
|
||||
},
|
||||
get check(){
|
||||
return lib.skill._gifting.check;
|
||||
},
|
||||
set check(check){
|
||||
lib.skill._gifting.check=check;
|
||||
},
|
||||
get content(){
|
||||
return lib.skill._gifting.content;
|
||||
},
|
||||
set content(content){
|
||||
lib.skill._gifting.content=content;
|
||||
},
|
||||
get ai(){
|
||||
return lib.skill._gifting.ai;
|
||||
},
|
||||
set ai(ai){
|
||||
lib.skill._gifting.ai=ai;
|
||||
}
|
||||
}
|
||||
},
|
||||
character:{},
|
||||
|
@ -32552,7 +32692,7 @@
|
|||
var audio=document.createElement('audio');
|
||||
audio.autoplay=true;
|
||||
audio.volume=lib.config.volumn_audio/8;
|
||||
if(str.indexOf('.mp3')!=-1||str.indexOf('.ogg')!=-1){
|
||||
if(str.split('/').pop().split('.').length>1){
|
||||
audio.src=lib.assetURL+'audio'+str;
|
||||
}
|
||||
else{
|
||||
|
@ -32584,60 +32724,56 @@
|
|||
game.broadcast(game.trySkillAudio,skill,player,directaudio);
|
||||
var info=get.info(skill);
|
||||
if(!info) return;
|
||||
if((!info.direct||directaudio)&&lib.config.background_speak&&
|
||||
(!lib.skill.global.contains(skill)||lib.skill[skill].forceaudio)){
|
||||
var audioname=skill;
|
||||
if(info.audioname2&&info.audioname2[player.name]){
|
||||
audioname=info.audioname2[player.name];
|
||||
info=lib.skill[audioname];
|
||||
}
|
||||
var audioinfo=info.audio;
|
||||
if(info.direct&&!directaudio) return;
|
||||
if(!lib.config.background_speak) return;
|
||||
if(lib.skill.global.contains(skill)&&!lib.skill[skill].forceaudio) return;
|
||||
var audioname=skill;
|
||||
var audioinfo=info.audio;
|
||||
var fixednum;
|
||||
if(info.audioname2&&info.audioname2[player.name]){
|
||||
audioname=info.audioname2[player.name];
|
||||
audioinfo=lib.skill[audioname].audio;
|
||||
}
|
||||
var history=[];
|
||||
while(true){//可以嵌套引用了
|
||||
if(history.contains(audioname)) break;
|
||||
history.push(audioname);
|
||||
if(typeof audioinfo=='string'&&lib.skill[audioinfo]){
|
||||
audioname=audioinfo;
|
||||
audioinfo=lib.skill[audioname].audio;
|
||||
continue;
|
||||
}
|
||||
if(typeof audioinfo=='string'){
|
||||
if(audioinfo.indexOf('ext:')==0){
|
||||
audioinfo=audioinfo.split(':');
|
||||
if(audioinfo.length==3){
|
||||
if(audioinfo[2]=='true'){
|
||||
game.playAudio('..','extension',audioinfo[1],audioname);
|
||||
}
|
||||
else{
|
||||
audioinfo[2]=parseInt(audioinfo[2]);
|
||||
if(audioinfo[2]){
|
||||
game.playAudio('..','extension',audioinfo[1],audioname+Math.ceil(audioinfo[2]*Math.random()));
|
||||
}
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if(Array.isArray(audioinfo)){
|
||||
if(Array.isArray(audioinfo)){
|
||||
audioname=audioinfo[0];
|
||||
audioinfo=audioinfo[1];
|
||||
if(!fixednum) fixednum=audioinfo[1];//数组会取第一个指定语音数
|
||||
audioinfo=lib.skill[audioname].audio;
|
||||
continue;
|
||||
}
|
||||
if(Array.isArray(info.audioname)&&player){
|
||||
if(info.audioname.contains(player.name)){
|
||||
audioname+='_'+player.name;
|
||||
}
|
||||
else if(info.audioname.contains(player.name1)){
|
||||
audioname+='_'+player.name1;
|
||||
}
|
||||
else if(info.audioname.contains(player.name2)){
|
||||
audioname+='_'+player.name2;
|
||||
}
|
||||
}
|
||||
if(typeof audioinfo=='number'){
|
||||
game.playAudio('skill',audioname+Math.ceil(audioinfo*Math.random()));
|
||||
}
|
||||
else if(audioinfo){
|
||||
game.playAudio('skill',audioname);
|
||||
}
|
||||
else if(true&&info.audio!==false){
|
||||
game.playSkillAudio(audioname);
|
||||
break;
|
||||
}
|
||||
if(Array.isArray(info.audioname)&&player){
|
||||
if(info.audioname.contains(player.name)) audioname+='_'+player.name;
|
||||
else if(info.audioname.contains(player.name1)) audioname+='_'+player.name1;
|
||||
else if(info.audioname.contains(player.name2)) audioname+='_'+player.name2;
|
||||
}
|
||||
if(typeof audioinfo=='string'){
|
||||
if(audioinfo.indexOf('ext:')!=0) return;
|
||||
audioinfo=audioinfo.split(':');
|
||||
if(audioinfo.length!=3) return;
|
||||
if(audioinfo[2]=='true') game.playAudio('..','extension',audioinfo[1],audioname);
|
||||
else{
|
||||
audioinfo[2]=parseInt(audioinfo[2]);
|
||||
if(fixednum) audioinfo[2]=Math.min(audioinfo[2],fixednum);
|
||||
if(!audioinfo[2]) return;
|
||||
game.playAudio('..','extension',audioinfo[1],audioname+Math.ceil(audioinfo[2]*Math.random()));
|
||||
}
|
||||
}
|
||||
else if(typeof audioinfo=='number'){
|
||||
if(fixednum) audioinfo=Math.min(audioinfo, fixednum);
|
||||
game.playAudio('skill',audioname+Math.ceil(audioinfo*Math.random()));
|
||||
}
|
||||
else if(audioinfo) game.playAudio('skill',audioname);
|
||||
else if(info.audio!==false) game.playSkillAudio(audioname);
|
||||
},
|
||||
playSkillAudio:function(name,index){
|
||||
if(_status.video&&arguments[1]!='video') return;
|
||||
|
@ -35154,7 +35290,7 @@
|
|||
linexy:function(path){
|
||||
const from=[path[0],path[1]],to=[path[2],path[3]];
|
||||
let total=typeof arguments[1]==='number'?arguments[1]:lib.config.duration*2,opacity=1,color=[255,255,255],dashed=false,drag=false;
|
||||
if(typeof arguments[1]=='object') Object.keys(arguments[1]).forEach(value=>{
|
||||
if(arguments[1]!=null&&typeof arguments[1]=='object') Object.keys(arguments[1]).forEach(value=>{
|
||||
switch(value){
|
||||
case 'opacity':
|
||||
opacity=arguments[1][value];
|
||||
|
@ -35329,7 +35465,8 @@
|
|||
else{
|
||||
imgsrc='ext:'+extname+'/'+name+'.jpg';
|
||||
}
|
||||
var character=[info.sex,info.group,info.hp,info.skills||[],[imgsrc]];
|
||||
const audiosrc='die:ext:'+extname+'/'+name+'.mp3';
|
||||
var character=[info.sex,info.group,info.hp,info.skills||[],[imgsrc,audiosrc]];
|
||||
if(info.tags){
|
||||
character[4]=character[4].concat(info.tags);
|
||||
}
|
||||
|
@ -35359,7 +35496,9 @@
|
|||
else{
|
||||
imgsrc='ext:'+extname+'/'+j+'.jpg';
|
||||
}
|
||||
pack[i][j][4].push(imgsrc);
|
||||
const audiosrc='die:ext:'+extname+'/'+name+'.mp3';
|
||||
pack[i][j][4].add(imgsrc);
|
||||
pack[i][j][4].add(audiosrc);
|
||||
if(pack[i][j][4].contains('boss')||
|
||||
pack[i][j][4].contains('hiddenboss')){
|
||||
lib.config.forbidai.add(j);
|
||||
|
@ -38547,10 +38686,9 @@
|
|||
lib[_status.dburgent?'ondb2':'ondb'].push(['deleteDB',Array.from(arguments)]);
|
||||
return;
|
||||
}
|
||||
const store=lib.db.transaction([type],'readwrite').objectStore(type);
|
||||
if(arguments.length!=1){
|
||||
if(arguments.length>1){
|
||||
lib.status.reload++;
|
||||
store.delete(id).onsuccess=function(){
|
||||
lib.db.transaction([type],'readwrite').objectStore(type).delete(id).onsuccess=function(){
|
||||
if(callback) callback.apply(this,arguments);
|
||||
game.reload2();
|
||||
};
|
||||
|
@ -38559,6 +38697,7 @@
|
|||
game.getDB(type,null,obj=>{
|
||||
const objKeys=Object.keys(obj);
|
||||
lib.status.reload+=objKeys.length;
|
||||
const store=lib.db.transaction([type],'readwrite').objectStore(type);
|
||||
objKeys.forEach(value=>store.delete(value).onsuccess=game.reload2);
|
||||
game.reload2();
|
||||
});
|
||||
|
@ -40180,7 +40319,7 @@
|
|||
var page=ui.create.div('');
|
||||
var node=ui.create.div('.menubutton.large',info.name,position,clickMode);
|
||||
node.mode=mode;
|
||||
node._initLink=function(){
|
||||
//node._initLink=function(){
|
||||
node.link=page;
|
||||
var map={};
|
||||
if(info.config){
|
||||
|
@ -40567,7 +40706,7 @@
|
|||
info.config.update(config,map);
|
||||
}
|
||||
}
|
||||
};
|
||||
//};
|
||||
return node;
|
||||
};
|
||||
|
||||
|
@ -42280,7 +42419,7 @@
|
|||
node.classList.add('smallfont');
|
||||
}
|
||||
node.mode=mode;
|
||||
node._initLink=function(){
|
||||
//node._initLink=function(){
|
||||
node.link=page;
|
||||
for(var i in lib.extensionMenu[mode]){
|
||||
if(i=='game') continue;
|
||||
|
@ -42315,7 +42454,7 @@
|
|||
}
|
||||
page.appendChild(cfgnode);
|
||||
}
|
||||
};
|
||||
//};
|
||||
return node;
|
||||
};
|
||||
for(var i in lib.extensionMenu){
|
||||
|
@ -42329,6 +42468,10 @@
|
|||
var page=ui.create.div('#create-extension');
|
||||
var node=ui.create.div('.menubutton.large','制作扩展',start.firstChild,clickMode);
|
||||
node.mode='create';
|
||||
game.editExtension=function(name){
|
||||
node._initLink();
|
||||
game.editExtension(name);
|
||||
};
|
||||
node._initLink=function(){
|
||||
node.link=page;
|
||||
var pageboard=ui.create.div(page);
|
||||
|
@ -48008,48 +48151,37 @@
|
|||
ui.shortcut.autobutton.dataset.position=2;
|
||||
ui.favmodelist=ui.create.div('.favmodelist',ui.shortcut);
|
||||
ui.favmodelist.update=function(){
|
||||
const favouriteMode=lib.config.favouriteMode;
|
||||
let removed=false;
|
||||
for(let index=0;index<favouriteMode.length;index++){
|
||||
if(typeof favouriteMode[index]=='string') continue;
|
||||
favouriteMode.splice(index--,1);
|
||||
if(!removed) removed=true;
|
||||
}
|
||||
if(removed) game.saveConfigValue('favouriteMode');
|
||||
this.innerHTML='';
|
||||
var num=Math.min(6,lib.config.favouriteMode.length);
|
||||
for(var i=0;i<num;i++){
|
||||
this.add(lib.config.favouriteMode[i],i);
|
||||
}
|
||||
var mode=get.mode();
|
||||
if(typeof get.config(mode+'_mode')=='string'){
|
||||
mode+='|'+get.config(mode+'_mode');
|
||||
}
|
||||
if(lib.config.favouriteMode.contains(mode)){
|
||||
ui.favmode.classList.add('glow');
|
||||
}
|
||||
else{
|
||||
ui.favmode.classList.remove('glow');
|
||||
}
|
||||
favouriteMode.slice(0,6).forEach((value,index)=>this.add(value,index));
|
||||
let mode=lib.config.mode;
|
||||
const config=get.config(`${mode}_mode`);
|
||||
if(typeof config=='string') mode+=`|${config}`;
|
||||
if(favouriteMode.contains(mode)) ui.favmode.classList.add('glow');
|
||||
else ui.favmode.classList.remove('glow');
|
||||
};
|
||||
ui.favmodelist.add=function(name,index){
|
||||
var info=name.split('|');
|
||||
var mode=info[0];
|
||||
var submode=info[1];
|
||||
var node=ui.create.div('.menubutton.large',this);
|
||||
var num=Math.min(6,lib.config.favouriteMode.length);
|
||||
node.dataset.type=num%2==0?'even':'odd';
|
||||
node.dataset.position=index;
|
||||
var str=lib.translate[name]||lib.translate[mode]||'';
|
||||
if(str.length==2){
|
||||
str+='模式';
|
||||
}
|
||||
const info=name.split('|'),mode=info[0],submode=info[1],node=ui.create.div('.menubutton.large',this),dataset=node.dataset;
|
||||
dataset.type=Math.min(6,lib.config.favouriteMode.length)%2==0?'even':'odd';
|
||||
dataset.position=index;
|
||||
let str=lib.translate[name]||lib.translate[mode]||'';
|
||||
if(str.length==2) str+='模式';
|
||||
node.innerHTML=str;
|
||||
node.listen(function(){
|
||||
node.listen(()=>{
|
||||
game.saveConfig('mode',mode);
|
||||
if(submode){
|
||||
game.saveConfig(mode+'_mode',submode,mode);
|
||||
}
|
||||
if(submode) game.saveConfig(`${mode}_mode`,submode,mode);
|
||||
game.reload();
|
||||
});
|
||||
};
|
||||
ui.favmode=ui.create.system('收藏',function(){
|
||||
var mode=get.mode();
|
||||
if(typeof _status.mode=='string'){
|
||||
mode+='|'+_status.mode;
|
||||
}
|
||||
const mode=typeof _status.mode=='string'?`${lib.config.mode}|${_status.mode}`:lib.config.mode;
|
||||
if(this.classList.contains('glow')){
|
||||
this.classList.remove('glow');
|
||||
lib.config.favouriteMode.remove(mode);
|
||||
|
@ -53060,6 +53192,12 @@
|
|||
},
|
||||
};
|
||||
const get={
|
||||
//Get the card name length
|
||||
//获取此牌的字数
|
||||
cardNameLength:card=>{
|
||||
const actualCardName=lib.actualCardName,name=get.translation(get.name(card));
|
||||
return (actualCardName.has(name)?actualCardName.get(name):name).length;
|
||||
},
|
||||
//Yingbian
|
||||
//应变
|
||||
//Get the Yingbian conditions (of the card)
|
||||
|
@ -53748,19 +53886,15 @@
|
|||
if(lib.characterIntro[name]) return lib.characterIntro[name];
|
||||
return '暂无武将介绍';
|
||||
},
|
||||
bordergroup:function(info){
|
||||
bordergroup:(info,raw)=>{
|
||||
if(!Array.isArray(info)){
|
||||
info=lib.character[info];
|
||||
if(!info) return '';
|
||||
}
|
||||
if(Array.isArray(info[4])){
|
||||
for(let str of info[4]){
|
||||
if(typeof str=='string'&&str.indexOf('border:')==0){
|
||||
return str.slice(7);
|
||||
}
|
||||
}
|
||||
if(Array.isArray(info[4])) for(const str of info[4]){
|
||||
if(typeof str=='string'&&str.indexOf('border:')==0) return str.slice(7);
|
||||
}
|
||||
return info[1];
|
||||
return raw?'':info[1]||'';
|
||||
},
|
||||
groupnature:function(group,method){
|
||||
var nature=lib.groupnature[group];
|
||||
|
@ -54152,14 +54286,7 @@
|
|||
}
|
||||
return str;
|
||||
},
|
||||
mode:function(){
|
||||
if(_status.connectMode){
|
||||
return lib.configOL.mode;
|
||||
}
|
||||
else{
|
||||
return lib.config.mode;
|
||||
}
|
||||
},
|
||||
mode:()=>lib[_status.connectMode?'configOL':'config'].mode,
|
||||
idDialog:function(id){
|
||||
for(var i=0;i<ui.dialogs.length;i++){
|
||||
if(ui.dialogs[i].videoId==id){
|
||||
|
@ -54352,7 +54479,7 @@
|
|||
threaten=info.ai.threaten(player,player);
|
||||
}
|
||||
}
|
||||
if(type.indexOf('in')!=-1){
|
||||
if(type&&type.indexOf('in')!=-1){
|
||||
if(info.enable=='phaseUse') num+=0.5;
|
||||
if(info.trigger&&info.trigger.player){
|
||||
var list=Array.isArray(info.trigger.player)?info.trigger.player:[info.trigger.player];
|
||||
|
@ -54381,7 +54508,7 @@
|
|||
num+=Math.sqrt(threaten)-1;
|
||||
}
|
||||
}
|
||||
if(type.indexOf('out')!=-1){
|
||||
if(type&&type.indexOf('out')!=-1){
|
||||
if(threaten<1){
|
||||
num*=1/Math.sqrt(threaten);
|
||||
}
|
||||
|
|
|
@ -1,92 +1,88 @@
|
|||
window.noname_update={
|
||||
version:'1.9.126',
|
||||
update:'1.9.125.1',
|
||||
version:'1.9.126.1',
|
||||
update:'1.9.126',
|
||||
changeLog:[
|
||||
'整合@Tipx-L @mengxinzxz @kuangthree @shijian的Pull Request',
|
||||
'将游戏字体从ttf改为woff2格式(需要重新下载)',
|
||||
'“应变”机制重写',
|
||||
'新增lib.init.jsForExtension,用于扩展按顺序提前加载js文件',
|
||||
'增加checkHistory函数,增加懒加载机制,其他性能优化',
|
||||
'段颎、董婉、裴元绍',
|
||||
'整合@shijian @Tipx-L @Rintim @mengxinzxz @2832899707的Pull Request',
|
||||
'族钟毓',
|
||||
'bug修复',
|
||||
],
|
||||
files:[
|
||||
//'LICENSE',
|
||||
'card/extra.js',
|
||||
//'card/gujian.js',
|
||||
'card/guozhan.js',
|
||||
//'card/guozhan.js',
|
||||
//'card/gwent.js',
|
||||
'card/hearth.js',
|
||||
//'card/hearth.js',
|
||||
//'card/huanlekapai.js',
|
||||
'card/mtg.js',
|
||||
'card/sp.js',
|
||||
'card/standard.js',
|
||||
'card/swd.js',
|
||||
'card/yunchou.js',
|
||||
'card/yingbian.js',
|
||||
//'card/mtg.js',
|
||||
//'card/sp.js',
|
||||
//'card/standard.js',
|
||||
//'card/swd.js',
|
||||
//'card/yunchou.js',
|
||||
//'card/yingbian.js',
|
||||
'card/yongjian.js',
|
||||
'card/zhenfa.js',
|
||||
//'card/zhenfa.js',
|
||||
//'card/zhulu.js',
|
||||
'character/clan.js',
|
||||
'character/collab.js',
|
||||
//'character/collab.js',
|
||||
'character/ddd.js',
|
||||
'character/diy.js',
|
||||
'character/extra.js',
|
||||
//'character/diy.js',
|
||||
//'character/extra.js',
|
||||
//'character/gujian.js',
|
||||
//'character/gwent.js',
|
||||
'character/hearth.js',
|
||||
//'character/hearth.js',
|
||||
'character/huicui.js',
|
||||
'character/jsrg.js',
|
||||
'character/mobile.js',
|
||||
//'character/mtg.js',
|
||||
'character/offline.js',
|
||||
'character/old.js',
|
||||
//'character/offline.js',
|
||||
//'character/old.js',
|
||||
//'character/ow.js',
|
||||
//'character/rank.js',
|
||||
//'character/refresh.js',
|
||||
'character/refresh.js',
|
||||
'character/sb.js',
|
||||
'character/shenhua.js',
|
||||
'character/shiji.js',
|
||||
//'character/shiji.js',
|
||||
'character/sp.js',
|
||||
'character/sp2.js',
|
||||
//'character/sp2.js',
|
||||
//'character/standard.js',
|
||||
'character/tw.js',
|
||||
//'character/tw.js',
|
||||
//'character/swd.js',
|
||||
//'character/xiake.js',
|
||||
'character/xianding.js',
|
||||
//'character/xianding.js',
|
||||
//'character/xianjian.js',
|
||||
//'character/xinghuoliaoyuan.js',
|
||||
'character/yijiang.js',
|
||||
//'character/yingbian.js',
|
||||
//'character/yxs.js',
|
||||
//'extension/boss/extension.js',
|
||||
'font/suits.woff2',
|
||||
'layout/default/layout.css',
|
||||
//'font/suits.woff2',
|
||||
//'layout/default/layout.css',
|
||||
//'layout/default/menu.css',
|
||||
//'layout/long2/layout.css',
|
||||
//'layout/mobile/equip.css',
|
||||
'layout/mobile/layout.css',
|
||||
'layout/newlayout/global.css',
|
||||
//'layout/mobile/layout.css',
|
||||
//'layout/newlayout/global.css',
|
||||
//'layout/nova/layout.css',
|
||||
'mode/boss.js',
|
||||
'mode/brawl.js',
|
||||
'mode/chess.js',
|
||||
//'mode/boss.js',
|
||||
//'mode/brawl.js',
|
||||
//'mode/chess.js',
|
||||
//'mode/connect.js',
|
||||
'mode/doudizhu.js',
|
||||
//'mode/doudizhu.js',
|
||||
'mode/guozhan.js',
|
||||
'mode/identity.js',
|
||||
'mode/single.js',
|
||||
'mode/stone.js',
|
||||
//'mode/single.js',
|
||||
//'mode/stone.js',
|
||||
//'mode/tafang.js',
|
||||
'mode/versus.js',
|
||||
//'mode/versus.js',
|
||||
'game/game.js',
|
||||
//'game/keyWords.js',
|
||||
//'game/NoSleep.js',
|
||||
//'game/config.js',
|
||||
'game/package.js',
|
||||
'game/config.js',
|
||||
//'game/package.js',
|
||||
//'game/pinyinjs.js',
|
||||
//'game/asset.js',
|
||||
'game/source.js',
|
||||
//'game/source.js',
|
||||
//'theme/simple/style.css',
|
||||
//'theme/style/hp/custom.css',
|
||||
//'theme/style/hp/emotion.css',
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 50 KiB |
|
@ -4589,6 +4589,8 @@ div[data-decoration="bronze"]::after{
|
|||
.timerbar>div:last-child {
|
||||
background: linear-gradient(#FFDA47, #CE0404);
|
||||
transition-timing-function: linear;
|
||||
float: left;
|
||||
transform-origin: left;
|
||||
}
|
||||
/*.timerbar>div:last-child{background: linear-gradient(#FFFFFF,#F0F0F0);}
|
||||
.timerbar[data-color="red"]>div:last-child{background: linear-gradient(#FF0000, #CE0404)}
|
||||
|
|
|
@ -7971,6 +7971,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
audio:['weidi',2]
|
||||
},
|
||||
gzyongsi:{
|
||||
audio:'yongsi1',
|
||||
group:['gzyongsi_eff1','gzyongsi_eff2','gzyongsi_eff3'],
|
||||
preHidden:['gzyongsi_eff3'],
|
||||
ai:{
|
||||
|
@ -8002,7 +8003,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
})
|
||||
},
|
||||
content:function(){trigger.num++},
|
||||
audio:['yongsi',2]
|
||||
audio:['yongsi1',2],
|
||||
},
|
||||
eff2:{
|
||||
sub:true,
|
||||
|
@ -8022,7 +8023,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
content:function(){
|
||||
player.chooseUseTarget('玉玺(庸肆):选择知己知彼的目标',{name:'zhibi'});
|
||||
},
|
||||
audio:['yongsi',2]
|
||||
audio:['yongsi1',2],
|
||||
},
|
||||
eff3:{
|
||||
sub:true,
|
||||
|
@ -13303,20 +13304,25 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
var source=event.targets2.shift();
|
||||
event.source=source;
|
||||
event.targets3=[];
|
||||
event.targets4=[source];
|
||||
//event.targets4=[source];
|
||||
if(!_status.yexinjia_list) _status.yexinjia_list=['夏','商','周','秦','汉','隋','唐','宋','辽','金','元','明'];
|
||||
source.chooseControl(_status.yexinjia_list).set('prompt','请选择自己所属的野心家势力的标识').set('ai',()=>(_status.yexinjia_list?_status.yexinjia_list.randomGet():0));
|
||||
'step 4'
|
||||
var text,source=event.source;;
|
||||
var text,source=event.source;
|
||||
if(result.control){
|
||||
text=result.control;
|
||||
_status.yexinjia_list.remove(result.control);
|
||||
}
|
||||
else text=_status.yexinjia_list.randomRemove();
|
||||
lib.group.push(text);
|
||||
lib.translate[text+'2']=text;
|
||||
lib.groupnature[text]='kami';
|
||||
event.text=text;
|
||||
game.broadcastAll(function(player,text){
|
||||
player.setIdentity(text,'ye');
|
||||
player.identity=text;
|
||||
player.setIdentity(text,'kami');
|
||||
},source,text);
|
||||
source.changeGroup(text);
|
||||
source.removeMark('yexinjia_mark',1);
|
||||
var targets=game.filterPlayer(function(current){
|
||||
return current.identity!='ye'&¤t!=source&&!get.is.jun(current)&&!event.targets2.contains(current)&&!current.getStorage('yexinjia_friend').length;
|
||||
|
@ -13328,15 +13334,16 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
var target=targets.shift();
|
||||
event.target=target;
|
||||
source.line(target,'green');
|
||||
target.chooseBool('是否响应'+get.translation(source)+'发起的【拉拢人心】?','将势力改为'+event.text+(['辽','金'].contains(event.text)?'':'朝')).set('choice',Math.random()<=0.98);//反骨[doge]
|
||||
target.chooseBool('是否响应'+get.translation(source)+'发起的【拉拢人心】?','将势力改为'+event.text).set('choice',Math.random()<=0.98);//反骨[doge]
|
||||
'step 6'
|
||||
if(result.bool){
|
||||
target.chat('加入');
|
||||
event.targets4.push(target);
|
||||
game.broadcastAll(function(player,target,text){
|
||||
player.identity='ye';
|
||||
player.setIdentity(text,'ye');
|
||||
},target,event.source,event.text);
|
||||
//event.targets4.push(target);
|
||||
game.broadcastAll(function(player,text){
|
||||
player.identity=text;
|
||||
player.setIdentity(text,'kami');
|
||||
},target,event.text);
|
||||
target.changeGroup(event.text);
|
||||
}
|
||||
else{
|
||||
target.chat('拒绝');
|
||||
|
@ -13344,11 +13351,13 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
game.delay(1.5);
|
||||
if(targets.length) event.goto(5);
|
||||
/*
|
||||
else if(event.targets4.length){
|
||||
for(var i of event.targets4){
|
||||
i.markAuto('yexinjia_friend',event.targets4.filter(j=>j!=i));
|
||||
}
|
||||
}
|
||||
*/
|
||||
'step 7'
|
||||
if(event.targets3.length){
|
||||
for(var i of event.targets3){
|
||||
|
@ -13364,7 +13373,12 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
return game.hasPlayer(target=>{
|
||||
return !target.isFriendOf(current);
|
||||
});
|
||||
})) game.checkResult();
|
||||
})){
|
||||
game.broadcastAll(function(id){
|
||||
game.winner_id=id;
|
||||
},event.source.playerid);
|
||||
game.checkResult();
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
|
|
@ -134,34 +134,28 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
step4();
|
||||
}
|
||||
};
|
||||
var step4=function(){
|
||||
var step4=lib.genAsync(function*(){
|
||||
clear();
|
||||
ui.window.classList.add('noclick_important');
|
||||
ui.click.configMenu();
|
||||
ui.control.classList.add('noclick_click_important');
|
||||
ui.control.style.top='calc(100% - 105px)';
|
||||
ui.create.control('在菜单中,可以进行各项设置',function(){
|
||||
ui.click.menuTab('选项');
|
||||
ui.controls[0].replace('如果你感到游戏较卡,可以开启流畅模式',function(){
|
||||
ui.controls[0].replace('在技能一栏中,可以设置自动发动或双将禁配的技能',function(){
|
||||
ui.click.menuTab('武将');
|
||||
ui.controls[0].replace('在武将或卡牌一栏中,单击武将/卡牌可以将其禁用',function(){
|
||||
ui.click.menuTab('战局');
|
||||
ui.controls[0].replace('在战局中可以输入游戏命令,或者管理录像',function(){
|
||||
ui.click.menuTab('帮助');
|
||||
ui.controls[0].replace('在帮助中,可以检查更新和下载素材',function(){
|
||||
ui.click.configMenu();
|
||||
ui.window.classList.remove('noclick_important');
|
||||
ui.control.classList.remove('noclick_click_important');
|
||||
ui.control.style.top='';
|
||||
step5();
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
})
|
||||
};
|
||||
yield new Promise(resolve => ui.create.control('在菜单中,可以进行各项设置',resolve));
|
||||
ui.click.menuTab('选项');
|
||||
yield new Promise(resolve => ui.controls[0].replace('如果你感到游戏较卡,可以开启流畅模式',resolve));
|
||||
yield new Promise(resolve => ui.controls[0].replace('在技能一栏中,可以设置自动发动或双将禁配的技能',resolve));
|
||||
ui.click.menuTab('武将');
|
||||
yield new Promise(resolve => ui.controls[0].replace('在武将或卡牌一栏中,单击武将/卡牌可以将其禁用',resolve));
|
||||
ui.click.menuTab('战局');
|
||||
yield new Promise(resolve => ui.controls[0].replace('在战局中可以输入游戏命令,或者管理录像',resolve));
|
||||
ui.click.menuTab('帮助');
|
||||
yield new Promise(resolve => ui.controls[0].replace('在帮助中,可以检查更新和下载素材',resolve));
|
||||
ui.click.configMenu();
|
||||
ui.window.classList.remove('noclick_important');
|
||||
ui.control.classList.remove('noclick_click_important');
|
||||
ui.control.style.top='';
|
||||
step5();
|
||||
});
|
||||
var step5=function(){
|
||||
clear();
|
||||
ui.create.dialog('如果还有其它问题,欢迎来到百度无名杀吧进行交流');
|
||||
|
|
Loading…
Reference in New Issue