Yuuki & Kyouko
This commit is contained in:
parent
0e16df9aeb
commit
5ebaccf55c
|
@ -465,6 +465,15 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
event.finish();
|
||||
},
|
||||
ai:{
|
||||
canLink:function(player,target,card){
|
||||
if(player.hasSkill('jueqing')||target.hasSkill('gangzhi')||target.hasSkill('gangzhi')) return false;
|
||||
var es=target.countCards('e');
|
||||
if(!es) return true;
|
||||
if(target.hp>=3&&es>=2){
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
order:6,
|
||||
value:4,
|
||||
useful:2,
|
||||
|
@ -486,8 +495,13 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
return 0;
|
||||
},
|
||||
result:{
|
||||
target:function(player,target){
|
||||
return -1-target.countCards('e');
|
||||
target:function(player,target,card,isLink){
|
||||
if(isLink) return -1.5;
|
||||
var es=target.getCards('e');
|
||||
if(!es.length) return -1.5;
|
||||
var val=0;
|
||||
for(var i of es) val+=get.value(i,target);
|
||||
return -Math.min(1.5,val/5);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
388
character/diy.js
388
character/diy.js
|
@ -75,6 +75,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
key_misuzu:['female','key',3,['misuzu_hengzhou','misuzu_nongyin','misuzu_zhongxing']],
|
||||
key_kamome:['female','key',3,['kamome_yangfan','kamome_huanmeng','kamome_jieban']],
|
||||
key_nao:['female','key',3,['nao_duyin','nao_wanxin','nao_shouqing']],
|
||||
key_yuuki:['female','key',3,['yuuki_yicha']],
|
||||
key_kyouko:['female','key',3,['kyouko_rongzhu','kyouko_gongmian']],
|
||||
|
||||
ns_huangchengyan:['male','shu',3,['nslongyue','nszhenyin']],
|
||||
ns_sunchensunjun:['male','wu',5,['nsxianhai','nsxingchu']],
|
||||
|
@ -184,7 +186,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
diy:{
|
||||
diy_yijiang:["key_kud","key_misuzu","key_kamome","key_nao",
|
||||
"ns_huangchengyan","ns_sunchensunjun","ns_yuanxi","ns_caoshuang"],
|
||||
diy_yijiang2:[
|
||||
diy_yijiang2:["key_yuuki","key_kyouko",
|
||||
"ns_chentai","ns_huangwudie","ns_sunyi","ns_zhangning","ns_yanghu"],
|
||||
diy_tieba:["ns_zuoci","ns_lvzhi","ns_wangyun","ns_nanhua","ns_nanhua_left","ns_nanhua_right","ns_huamulan","ns_huangzu","ns_jinke","ns_yanliang","ns_wenchou","ns_caocao","ns_caocaosp","ns_zhugeliang","ns_wangyue","ns_yuji","ns_xinxianying","ns_guanlu","ns_simazhao","ns_sunjian","ns_duangui","ns_zhangbao","ns_masu","ns_zhangxiu","ns_lvmeng","ns_shenpei","ns_yujisp","ns_yangyi","ns_liuzhang","ns_xinnanhua","ns_luyusheng"],
|
||||
diy_fakenews:["diy_wenyang","ns_zhangwei","ns_caimao","ns_chengpu"],
|
||||
|
@ -276,6 +278,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
key_misuzu:'#b长发及腰黑长直',
|
||||
key_kamome:'#b仿生纱',
|
||||
key_nao:'#b潮鸣',
|
||||
key_yuuki:'#b4399司命',
|
||||
key_kyouko:'#g阿阿啊687',
|
||||
|
||||
ns_huangchengyan:'#g竹邀月',
|
||||
ns_sunchensunjun:'#gVenusjeu',
|
||||
|
@ -447,6 +451,378 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
key_lucia:['key_shizuru'],
|
||||
},
|
||||
skill:{
|
||||
kyouko_rongzhu:{
|
||||
trigger:{global:'gainEnd'},
|
||||
filter:function(event,player){
|
||||
if(player==event.player||event.getParent().name=='kyouko_rongzhu') return false;
|
||||
var evt=event.getl(player);
|
||||
return evt&&evt.cards2&&evt.cards2.length>0;
|
||||
},
|
||||
logTarget:'player',
|
||||
check:function(event,player){
|
||||
return get.attitude(player,event.player)>0;
|
||||
},
|
||||
content:function(){
|
||||
'step 0'
|
||||
player.draw();
|
||||
'step 1'
|
||||
var target=trigger.player;
|
||||
if(player.countCards('he')>0&&target.isIn()){
|
||||
player.chooseCard('he',true,'将一张牌交给'+get.translation(target));
|
||||
}
|
||||
else event.finish();
|
||||
'step 2'
|
||||
if(result.bool){
|
||||
trigger.player.gain(result.cards,player,'giveAuto');
|
||||
var target=_status.currentPhase;
|
||||
var name;
|
||||
if(target==player){
|
||||
name='kyouko_rongzhu_me';
|
||||
player.addTempSkill(name);
|
||||
player.addMark(name,1,false);
|
||||
}
|
||||
else if(target==trigger.player){
|
||||
name='kyouko_rongzhu_notme';
|
||||
player.addTempSkill(name);
|
||||
player.addMark(name,1,false);
|
||||
}
|
||||
}
|
||||
},
|
||||
subSkill:{
|
||||
me:{
|
||||
mod:{
|
||||
maxHandcard:function(player,num){
|
||||
return num+player.countMark('kyouko_rongzhu_me');
|
||||
},
|
||||
},
|
||||
intro:{content:'手牌上限+#'},
|
||||
onremove:true,
|
||||
},
|
||||
notme:{
|
||||
mod:{
|
||||
cardUsable:function(card,player,num){
|
||||
if(card.name=='sha') return num+player.countMark('kyouko_rongzhu_notme');
|
||||
},
|
||||
},
|
||||
intro:{content:'使用杀的次数上限+#'},
|
||||
onremove:true,
|
||||
},
|
||||
},
|
||||
},
|
||||
kyouko_gongmian:{
|
||||
enable:'phaseUse',
|
||||
prompt:'出牌阶段,你可以选择一名未以此法选择过的角色,若其手牌:大于你,你获得其一张牌,然后交给其一张牌;小于你,其交给你一张牌,然后你交给其一张牌;等于你,你与其各摸一张牌。',
|
||||
filter:function(event,player){
|
||||
return game.hasPlayer(function(current){
|
||||
return current!=player&&lib.skill.kyouko_gongmian.filterTarget(null,player,current);
|
||||
});
|
||||
},
|
||||
filterTarget:function(card,kyouko,hina){
|
||||
if(kyouko==hina||kyouko.getStorage('kyouko_gongmian').contains(hina)) return false;
|
||||
var hs=hina.countCards('he');
|
||||
if(hs==0) return kyouko.countCards('h')==0;
|
||||
return true;
|
||||
},
|
||||
content:function(){
|
||||
'step 0'
|
||||
player.markAuto('kyouko_gongmian',targets);
|
||||
var hs=player.countCards('h'),ts=target.countCards('h');
|
||||
player.getHistory('custom').push({kyouko_gongmian:true});
|
||||
if(hs>ts){
|
||||
event.utype=1;
|
||||
target.chooseCard('he',true,'交给'+get.translation(player)+'一张牌');
|
||||
}
|
||||
else if(hs==ts){
|
||||
game.asyncDraw([player,target]);
|
||||
event.utype=2;
|
||||
}
|
||||
else{
|
||||
event.utype=3;
|
||||
player.gainPlayerCard(target,true,'he');
|
||||
}
|
||||
'step 1'
|
||||
if(event.utype==2){
|
||||
game.delayx();
|
||||
event.finish();
|
||||
}
|
||||
else if(!result.bool) event.finish();
|
||||
else if(event.utype==1) player.gain(result.cards,target,'giveAuto');
|
||||
'step 2'
|
||||
if(player.countCards('he')>0){
|
||||
player.chooseCard('he',true,'交给'+get.translation(target)+'一张牌');
|
||||
}
|
||||
else event.finish();
|
||||
'step 3'
|
||||
if(result.bool) target.gain(result.cards,player,'giveAuto');
|
||||
},
|
||||
intro:{
|
||||
content:'已与$共勉',
|
||||
},
|
||||
group:['kyouko_gongmian_use','kyouko_gongmian_discard'],
|
||||
ai:{
|
||||
order:6,
|
||||
result:{
|
||||
target:function(player,target){
|
||||
if(player.getHistory('custom',function(evt){
|
||||
return evt.kyouko_gongmian==true;
|
||||
}).length) return 0;
|
||||
return 1;
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
kyouko_gongmian_use:{
|
||||
trigger:{player:'phaseUseEnd'},
|
||||
direct:true,
|
||||
filter:function(event,player){
|
||||
return player.getHistory('custom',function(evt){
|
||||
return evt.kyouko_gongmian==true;
|
||||
}).length>0&&game.hasPlayer(function(current){
|
||||
return current!=player&¤t.countGainableCards(player,'hej')>0;
|
||||
});
|
||||
},
|
||||
content:function(){
|
||||
'step 0'
|
||||
event.num=player.getHistory('custom',function(evt){
|
||||
return evt.kyouko_gongmian==true;
|
||||
}).length;
|
||||
player.chooseTarget(get.prompt('kyouko_gongmian'),'获得一名其他角色的至多'+get.cnNumber(event.num)+'张牌,然后交给其等量的牌',function(card,player,target){
|
||||
return target!=player&&target.countGainableCards(player,'hej')>0;
|
||||
}).set('ai',function(target){
|
||||
var player=_status.event.player,att=get.attitude(player,target);
|
||||
if(att>0) return att;
|
||||
var he=player.getCards('he');
|
||||
if(target.countCards('he',function(card){
|
||||
return get.value(card,target)>7;
|
||||
})&&he.length>0) return -att+5-Math.min.apply(Math,he.map(function(card){
|
||||
return get.value(card,player);
|
||||
}));
|
||||
return 0;
|
||||
});
|
||||
'step 1'
|
||||
if(result.bool){
|
||||
var target=result.targets[0];
|
||||
event.target=target;
|
||||
player.logSkill('kyouko_gongmian',target);
|
||||
player.gainPlayerCard(target,'hej',true,[1,num]);
|
||||
}
|
||||
else event.finish();
|
||||
'step 2'
|
||||
if(target.isIn()&&result.bool&&result.cards&&result.cards.length&&player.countCards('he')>0){
|
||||
var num=result.cards.length,hs=player.getCards('he');
|
||||
if(hs.length<=num) event._result={bool:true,cards:hs};
|
||||
else player.chooseCard('he',true,num,'交给'+get.translation(target)+get.cnNumber(num)+'张牌');
|
||||
}
|
||||
else event.finish();
|
||||
'step 3'
|
||||
if(result.bool&&result.cards&&result.cards.length){
|
||||
target.gain(result.cards,player,'giveAuto')
|
||||
}
|
||||
},
|
||||
},
|
||||
kyouko_gongmian_discard:{
|
||||
trigger:{player:'phaseDiscardBegin'},
|
||||
direct:true,
|
||||
filter:function(event,player){
|
||||
var hs=player.countCards('h');
|
||||
return hs>0&&player.getHistory('custom',function(evt){
|
||||
return evt.kyouko_gongmian==true;
|
||||
}).length>=player.hp&&game.hasPlayer(function(current){
|
||||
return current!=player&¤t.countCards('h')<hs;
|
||||
});
|
||||
},
|
||||
content:function(){
|
||||
'step 0'
|
||||
player.chooseTarget(get.prompt('kyouko_gongmian'),'获得一名其他角色的所有手牌,然后将一半的牌交给该角色(向上取整)',function(card,player,target){
|
||||
return target!=player&&target.countCards('h')<player.countCards('h');
|
||||
});
|
||||
'step 1'
|
||||
if(result.bool){
|
||||
var target=result.targets[0];
|
||||
event.target=target;
|
||||
player.logSkill('kyouko_gongmian',target);
|
||||
var hs=target.getCards('h');
|
||||
if(hs.length>0) player.gain(hs,target,'giveAuto','bySelf');
|
||||
}
|
||||
else event.finish();
|
||||
'step 2'
|
||||
if(target.isIn()&&player.countCards('h')>0){
|
||||
var hs=player.getCards('h'),num=Math.ceil(hs.length/2);
|
||||
if(hs.length<=num) event._result={bool:true,cards:hs};
|
||||
else player.chooseCard('he',true,num,'交给'+get.translation(target)+get.cnNumber(num)+'张牌');
|
||||
}
|
||||
else event.finish();
|
||||
'step 3'
|
||||
if(result.bool&&result.cards&&result.cards.length){
|
||||
target.gain(result.cards,player,'giveAuto')
|
||||
}
|
||||
},
|
||||
},
|
||||
yuuki_yicha:{
|
||||
trigger:{player:'phaseUseBegin'},
|
||||
frequent:true,
|
||||
createDialog:function(id){
|
||||
var dialog=ui.create.dialog('hidden');
|
||||
(dialog.textPrompt=dialog.add('异插')).style.textAlign='center';
|
||||
dialog.cards=[];
|
||||
dialog.rawButtons=[];
|
||||
dialog.videoId=id;
|
||||
var cards=[];
|
||||
for(var i=0;i<3;i++){
|
||||
var card=ui.create.card(null,null,true);
|
||||
card.pos=i;
|
||||
card.pos_x=i;
|
||||
card.pos_y=0;
|
||||
cards.push(card);
|
||||
dialog.rawButtons.push(card);
|
||||
}
|
||||
dialog.add(cards);
|
||||
cards=[];
|
||||
for(var i=0;i<3;i++){
|
||||
var card=ui.create.card(null,null,true);
|
||||
card.pos=i+3;
|
||||
card.pos_x=i;
|
||||
card.pos_y=1;
|
||||
cards.push(card);
|
||||
dialog.rawButtons.push(card);
|
||||
}
|
||||
dialog.add(cards);
|
||||
for(var i of dialog.buttons){
|
||||
i.pos_x=i.link.pos_x;
|
||||
i.pos_y=i.link.pos_y;
|
||||
i.link=i.link.pos;
|
||||
}
|
||||
dialog.open();
|
||||
},
|
||||
addCard:function(card,id,pos){
|
||||
var dialog=get.idDialog(id);
|
||||
if(!dialog) return;
|
||||
for(var i=0;i<dialog.buttons.length;i++){
|
||||
var button=dialog.buttons[i];
|
||||
if(button.link==pos){
|
||||
var card2=ui.create.button(card,'card');
|
||||
card2.pos=button.link;
|
||||
card2.pos_x=button.pos_x;
|
||||
card2.pos_y=button.pos_y;
|
||||
card2.classList.add('noclick');
|
||||
button.parentNode.insertBefore(card2,button);
|
||||
dialog.cards.push(card2);
|
||||
button.remove();
|
||||
dialog.buttons.splice(i,1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
},
|
||||
changePrompt:function(str,id){
|
||||
var dialog=get.idDialog(id);
|
||||
if(!dialog) return;
|
||||
dialog.textPrompt.innerHTML=str;
|
||||
},
|
||||
content:function(){
|
||||
'step 0'
|
||||
var next=game.createEvent('cardsGotoOrdering');
|
||||
next.cards=[];
|
||||
next.setContent('cardsGotoOrdering');
|
||||
event.videoId=lib.status.videoId++;
|
||||
event.forceDie=true;
|
||||
event.cards=[];
|
||||
event.positions=[0,1,2,3,4,5];
|
||||
game.broadcastAll(function(id){
|
||||
lib.skill.yuuki_yicha.createDialog(id);
|
||||
},event.videoId);
|
||||
player.judge().set('callback',function(){
|
||||
event.getParent().orderingCards.remove(event.judgeResult.card);
|
||||
event.getParent(2).orderingCards.add(event.judgeResult.card);
|
||||
});
|
||||
'step 1'
|
||||
if(get.position(result.card,true)=='o'){
|
||||
var pos=event.positions.randomRemove();
|
||||
game.broadcastAll(function(card,id,player,pos){
|
||||
lib.skill.yuuki_yicha.addCard(card,id,pos);
|
||||
lib.skill.yuuki_yicha.changePrompt(get.translation(player)+'放置了'+get.translation(card),id);
|
||||
},result.card,event.videoId,player,pos);
|
||||
cards.push(result.card);
|
||||
game.delay(2);
|
||||
}
|
||||
player.judge().set('callback',function(){
|
||||
event.getParent().orderingCards.remove(event.judgeResult.card);
|
||||
event.getParent(2).orderingCards.add(event.judgeResult.card);
|
||||
});
|
||||
'step 2'
|
||||
if(get.position(result.card,true)=='o'){
|
||||
var pos=event.positions.randomRemove();
|
||||
game.broadcastAll(function(card,id,player,pos){
|
||||
lib.skill.yuuki_yicha.addCard(card,id,pos);
|
||||
lib.skill.yuuki_yicha.changePrompt(get.translation(player)+'放置了'+get.translation(card),id);
|
||||
},result.card,event.videoId,player,pos);
|
||||
cards.push(result.card);
|
||||
game.delay(2);
|
||||
}
|
||||
if(cards.length) event.count=4;
|
||||
else{
|
||||
game.broadcastAll('closeDialog',event.videoId);
|
||||
event.finish();
|
||||
}
|
||||
'step 3'
|
||||
event.count--;
|
||||
player.judge().set('callback',function(){
|
||||
event.getParent().orderingCards.remove(event.judgeResult.card);
|
||||
event.getParent(2).orderingCards.add(event.judgeResult.card);
|
||||
});
|
||||
'step 4'
|
||||
var card=result.card;
|
||||
event.card=card;
|
||||
var str='请选择一个位置放置'+get.translation(card);
|
||||
if(player==game.me||player.isUnderControl()){
|
||||
lib.skill.yuuki_yicha.changePrompt(str,event.videoId);
|
||||
}
|
||||
else if(player.isOnline()){
|
||||
player.send(function(str,id){
|
||||
lib.skill.yuuki_yicha.changePrompt(str,event.videoId);
|
||||
},str,id);
|
||||
}
|
||||
player.chooseButton().set('dialog',event.videoId).set('filterButton',function(button){
|
||||
var posx=button.pos_x,posy=button.pos_y;
|
||||
var list=[],cards=ui.dialog.cards;
|
||||
for(var i of cards){
|
||||
if(i.pos_x==posx&&Math.abs(i.pos_y-posy)==1) list.push(i.link);
|
||||
if(i.pos_y==posy&&Math.abs(i.pos_x-posx)==1) list.push(i.link);
|
||||
}
|
||||
if(list.length>0){
|
||||
var color=get.color(list[0],false);
|
||||
if(list.length>1){
|
||||
for(var i=1;i<list.length;i++){
|
||||
if(get.color(list[i])!=color) return false;
|
||||
}
|
||||
}
|
||||
return get.color(_status.event.card,false)!=color;
|
||||
}
|
||||
return false;
|
||||
}).set('card',card);
|
||||
'step 5'
|
||||
if(result.bool){
|
||||
cards.push(card);
|
||||
event.positions.remove(result.links[0]);
|
||||
game.broadcastAll(function(card,id,pos,player){
|
||||
lib.skill.yuuki_yicha.addCard(card,id,pos);
|
||||
lib.skill.yuuki_yicha.changePrompt(get.translation(player)+'放置了'+get.translation(card),id);
|
||||
},card,event.videoId,result.links[0],player);
|
||||
game.delay(2);
|
||||
}
|
||||
if(event.count>0) event.goto(3);
|
||||
'step 6'
|
||||
game.broadcastAll('closeDialog',event.videoId);
|
||||
player.chooseTarget('令一名角色获得'+get.translation(cards),true).set('ai',function(target){
|
||||
return get.attitude(_status.event.player,target);
|
||||
});
|
||||
'step 7'
|
||||
if(result.bool&&result.targets&&result.targets.length){
|
||||
var target=result.targets[0];
|
||||
player.line(target,'green');
|
||||
target.gain(cards,'gain2');
|
||||
}
|
||||
},
|
||||
},
|
||||
kotomi_qinji:{
|
||||
trigger:{player:'phaseUseBegin'},
|
||||
filter:function(event,player){
|
||||
|
@ -14425,6 +14801,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
nao_shouqing2:'守情',
|
||||
nao_shouqing3:'守情',
|
||||
nao_shouqing_info:'其他角色的出牌阶段内可以对你使用【桃】。若如此做,其摸一张牌且本局游戏内的手牌上限+1。',
|
||||
key_yuuki:'冰室忧希',
|
||||
yuuki_yicha:'异插',
|
||||
yuuki_yicha_info:'出牌阶段开始时,你可依次进行两次判定并将判定牌依次置入两行三列方阵的两个随机位置中。然后你依次进行四次判定,每次可将当前判定牌置入空方格,且须与相邻方格的牌颜色均不同。若如此做,你令一名角色获得方阵内的所有牌。',
|
||||
key_kyouko:'伊座并杏子',
|
||||
kyouko_rongzhu:'容助',
|
||||
kyouko_rongzhu_info:'其他角色不因此技能而获得你的牌后,你可摸一张牌,然后交给其一张牌。若其是当前回合角色,则其本回合使用【杀】的次数上限+1;若你是当前回合角色,则你本回合的手牌上限+1。',
|
||||
kyouko_gongmian:'共勉',
|
||||
kyouko_gongmian_use:'共勉',
|
||||
kyouko_gongmian_exchange:'共勉',
|
||||
kyouko_gongmian_info:'①出牌阶段,你可以选择一名未以此法选择过的角色,若其手牌:大于你,你获得其一张牌,然后交给其一张牌;小于你,其交给你一张牌,然后你交给其一张牌;等于你,你与其各摸一张牌。②出牌阶段结束时,你可以获得一名其他角色区域内的至多X张牌,然后交给其等量的牌。③弃牌阶段开始时,若X不小于你的体力值,你可以获得一名手牌数少于你的角色的所有手牌,然后将手牌数的一半(向上取整)交给该角色。(X为你本回合内发动过〖共勉①〗的次数)',
|
||||
|
||||
noname:"小无",
|
||||
noname_zhuyuan:"祝愿",
|
||||
|
|
|
@ -1431,13 +1431,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
if(num%5==0){
|
||||
var card=get.cardPile2(function(card){
|
||||
return card.name=='tao'||card.name=='jiu';
|
||||
return ['tao','jiu','zong','xionghuangjiu'].contains(card.name);
|
||||
});
|
||||
if(card) cards.push(card);
|
||||
}
|
||||
if(num%8==0){
|
||||
var card=get.cardPile2(function(card){
|
||||
return card.name=='juedou'||card.name=='wuzhong';
|
||||
return ['juedou','wuzhong','zengbin','sadouchengbing','dongzhuxianji','tongzhougongji'].contains(card.name);
|
||||
});
|
||||
if(card) cards.push(card);
|
||||
}
|
||||
|
@ -8544,7 +8544,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
re_handang:'手杀韩当',
|
||||
luotong:'骆统',
|
||||
qinzheng:'勤政',
|
||||
qinzheng_info:'锁定技,当你使用或打出牌时,若你本局游戏内使用或打出过的牌数和:为3的倍数,你从牌堆中获得一张【杀】或【闪】;为5的倍数,你从牌堆中获得一张【桃】或【酒】;为8的倍数,你从牌堆中获得一张【决斗】或【无中生有】。',
|
||||
qinzheng_info:'锁定技,当你使用或打出牌时,若你本局游戏内使用或打出过的牌数和:为3的倍数,你从牌堆中获得一张【杀】或【闪】;为5的倍数,你从牌堆中获得一张【桃】或【酒】;为8的倍数,你从牌堆中获得一张【决斗】或【无中生有】(可获得对应的衍生替换牌)。',
|
||||
sp_duyu:'SP杜预',
|
||||
spwuku:'武库',
|
||||
spwuku_info:'锁定技,当有角色使用装备牌时,若你的“武库”数小于3,则你获得一个“武库”。',
|
||||
|
|
|
@ -101,6 +101,7 @@ window.noname_character_rank={
|
|||
'key_shiina',
|
||||
'key_kud',
|
||||
'key_yukito',
|
||||
'key_yuuki',
|
||||
],
|
||||
a:[
|
||||
'diy_zaozhirenjun',
|
||||
|
@ -672,6 +673,7 @@ window.noname_character_rank={
|
|||
'wujing',
|
||||
'nanhualaoxian',
|
||||
'ns_sunyi',
|
||||
'key_kyouko',
|
||||
],
|
||||
b:[
|
||||
'diy_feishi',
|
||||
|
@ -999,6 +1001,7 @@ window.noname_character_rank={
|
|||
'sp_jiben',
|
||||
'sp_fuwan',
|
||||
're_chengpu',
|
||||
're_niujin',
|
||||
],
|
||||
c:[
|
||||
'xiahoudun',
|
||||
|
@ -1371,6 +1374,8 @@ window.noname_character_rank={
|
|||
'key_chihaya',
|
||||
'key_yukito',
|
||||
'key_kotomi',
|
||||
'key_yuuki',
|
||||
'key_kyouko',
|
||||
'kaisa',
|
||||
],
|
||||
rare:[
|
||||
|
|
|
@ -208,6 +208,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
audio:2,
|
||||
trigger:{global:['turnOverAfter','linkAfter']},
|
||||
logTarget:'player',
|
||||
check:function(event,player){
|
||||
return get.attitude(player,event.player)>0;
|
||||
},
|
||||
content:function(){
|
||||
trigger.player.draw();
|
||||
},
|
||||
|
|
|
@ -2070,7 +2070,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
enable:'phaseUse',
|
||||
usable:1,
|
||||
filter:function(event,player){
|
||||
return player.countCards('h')>0&&player.storage.nzry_shenshi!=true;
|
||||
return player.countCards('he')>0&&player.storage.nzry_shenshi!=true;
|
||||
},
|
||||
discard:false,
|
||||
line:true,
|
||||
|
|
|
@ -12,7 +12,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
sp_sticker:['sp_gongsunzan','sp_simazhao','sp_wangyuanji','sp_xinxianying','sp_liuxie'],
|
||||
sp_guozhan:["zangba","shamoke","ganfuren","yuejin","hetaihou","dingfeng","panfeng","jianggan"],
|
||||
sp_guozhan2:["mateng","tianfeng","chendong","sp_dongzhuo","jiangfei","jiangqing","kongrong","liqueguosi","lvfan","cuimao","jiling","zhangren","zoushi","huaxin","luyusheng","zongyu"],
|
||||
sp_single:["niujin"],
|
||||
//sp_single:["niujin"],
|
||||
sp_others:["hanba","caiyang"],
|
||||
},
|
||||
},
|
||||
|
@ -45,7 +45,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
yuantanyuanshang:['male','qun',4,['neifa']],
|
||||
xujing:['male','shu',3,['yuxu','xjshijian']],
|
||||
|
||||
niujin:['male','wei',4,['cuorui','liewei']],
|
||||
//niujin:['male','wei',4,['cuorui','liewei']],
|
||||
jianggan:["male","wei",3,["weicheng","daoshu"]],
|
||||
|
||||
caoying:["female","wei",4,["xinfu_lingren","xinfu_fujian"],[]],
|
||||
|
@ -3169,7 +3169,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
trigger:{global:'phaseJieshuBegin'},
|
||||
filter:function(event,player){
|
||||
return event.player!=player&&(event.player.hp>player.hp||event.player.getHistory('useCard',function(card){
|
||||
return card.name=='sha';
|
||||
return card.card.name=='sha';
|
||||
}).length>0);
|
||||
},
|
||||
direct:true,
|
||||
|
@ -9497,7 +9497,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
result:{
|
||||
target:function(player,target){
|
||||
if(target.countCards('j',function(card){
|
||||
return get.value(target,{
|
||||
return get.effect(target,{
|
||||
name:card.viewAs||card.name,
|
||||
cards:[card],
|
||||
},target,target)<0;
|
||||
|
@ -9511,14 +9511,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
trigger:{player:'phaseJudgeBegin'},
|
||||
forced:true,
|
||||
filter:function(event,player){
|
||||
return player.countCards('j')>0;
|
||||
return player.countCards('j')>0&&player.hasJudge('yanxiao_card');
|
||||
},
|
||||
content:function(){
|
||||
player.gain(player.getCards('j'),'gain2');
|
||||
},
|
||||
ai:{
|
||||
effect:{
|
||||
target:function(card){
|
||||
target:function(card,player,target){
|
||||
if(get.type(card)=='delay'&&target.hasJudge('yanxiao_card')) return [0,0,0,0.1];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
name:'sp2',
|
||||
connect:true,
|
||||
character:{
|
||||
re_niujin:['male','wei',4,['recuorui','reliewei']],
|
||||
zhangmiao:['male','qun',4,['mouni','zongfan']],
|
||||
liangxing:['male','qun',4,['lulve','lxzhuixi'],['unseen']],
|
||||
ruanyu:['male','wei',3,['xingzuo','miaoxian']],
|
||||
|
@ -96,7 +97,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
sp_huangjin:['liuhong','zhujun','re_hejin','re_hansui','liubian'],
|
||||
sp_fadong:['ol_dingyuan','wangrong','re_quyi','hanfu'],
|
||||
sp_xuzhou:['re_taoqian','caosong'],
|
||||
sp_decade:['wulan','leitong','huaman','wangshuang','wenyang','re_liuzan','re_sunluyu','caobuxing','ol_yujin','re_maliang','xin_baosanniang','re_xinxianying','dongxie','guozhao','fanyufeng','zhaozhong','ruanyu','liangxing','zhangmiao'],
|
||||
sp_decade:['wulan','leitong','huaman','wangshuang','wenyang','re_liuzan','re_sunluyu','caobuxing','ol_yujin','re_maliang','xin_baosanniang','re_xinxianying','dongxie','guozhao','fanyufeng','zhaozhong','ruanyu','liangxing','zhangmiao','re_niujin'],
|
||||
sp_mini:["mini_sunquan","mini_zuoci","mini_jiangwei","mini_diaochan","mini_zhangchunhua"],
|
||||
sp_luanwu:["ns_lijue","ns_zhangji","ns_fanchou"],
|
||||
sp_yongjian:["ns_chendao","yj_caoang"],
|
||||
|
@ -104,6 +105,51 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
},
|
||||
skill:{
|
||||
//牛金
|
||||
recuorui:{
|
||||
audio:'cuorui',
|
||||
trigger:{player:'phaseBegin'},
|
||||
skillAnimation:true,
|
||||
animationColor:'thunder',
|
||||
filter:function(event,player){
|
||||
return player.phaseNumber==1&&player.hp>0&&game.hasPlayer(function(current){
|
||||
return current!=player&¤t.countGainableCards(player,'h')>0;
|
||||
})
|
||||
},
|
||||
direct:true,
|
||||
content:function(){
|
||||
'step 0'
|
||||
player.chooseTarget([1,player.hp],get.prompt('recuorui'),'获得至多'+get.cnNumber(player.hp)+'名角色的各一张手牌',function(card,player,current){
|
||||
return current!=player&¤t.countGainableCards(player,'h')>0;
|
||||
}).set('ai',function(target){
|
||||
var att=get.attitude(_status.event.player,target);
|
||||
if(target.hasSkill('tuntian')) return att/10;
|
||||
return 1-att;
|
||||
});
|
||||
'step 1'
|
||||
if(result.bool){
|
||||
var targets=result.targets;
|
||||
player.logSkill('recuorui',targets);
|
||||
targets.sortBySeat();
|
||||
player.gainMultiple(targets);
|
||||
}
|
||||
},
|
||||
},
|
||||
reliewei:{
|
||||
audio:'liewei',
|
||||
trigger:{global:'dying'},
|
||||
frequent:true,
|
||||
filter:function(event,player){
|
||||
var evt=event.getParent();
|
||||
return evt&&evt.name=='damage'&&evt.source==player&&player.getHistory('custom',function(evt){
|
||||
return evt&&evt.reliewei==true;
|
||||
}).length<player.hp;
|
||||
},
|
||||
content:function(){
|
||||
player.getHistory('custom').push({reliewei:true});
|
||||
player.draw();
|
||||
},
|
||||
},
|
||||
//张邈
|
||||
mouni:{
|
||||
trigger:{player:'phaseZhunbeiBegin'},
|
||||
|
@ -368,7 +414,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
'step 0'
|
||||
player.chooseTarget(function(card,player,target){
|
||||
return target.countCards('h')>0;
|
||||
},'兴作:是否令一他角色将其手牌与牌堆底的三张牌替换?').set('ai',function(target){
|
||||
},'兴作:是否令一名角色将其手牌与牌堆底的三张牌替换?').set('ai',function(target){
|
||||
var player=_status.event.player,att=get.attitude(player,target),hs=target.getCards('h'),num=hs.length;
|
||||
var getv=function(list,target){
|
||||
var num=0;
|
||||
|
@ -8954,6 +9000,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
zongfan_info:'觉醒技,结束阶段,若你本回合内因〖谋逆〗使用过【杀】且未跳过本回合的出牌阶段,则你将任意张牌交给一名其他角色,然后加X点体力上限并回复X点体力(X为你以此法给出的牌数)。最后失去〖谋逆〗并获得〖战孤〗。',
|
||||
zhangu:'战孤',
|
||||
zhangu_info:'锁定技,准备阶段,若你的体力上限大于1且没有手牌/装备区内没有牌,则你减1点体力上限,然后从牌堆中获得三张类型不同的牌。',
|
||||
re_niujin:'牛金',
|
||||
recuorui:'摧锐',
|
||||
recuorui_info:'你的第一个回合开始时,你可以依次获得至多X名角色的各一张手牌(X为你的体力值)。',
|
||||
reliewei:'裂围',
|
||||
reliewei_info:'每回合限X次(X为你的体力值),当有其他角色因你造成伤害而进入濒死状态时,你可以摸一张牌。',
|
||||
|
||||
sp_whlw:"文和乱武",
|
||||
sp_zlzy:"逐鹿中原",
|
||||
|
|
|
@ -1810,6 +1810,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
},
|
||||
},
|
||||
g_hidden_ai:{
|
||||
charlotte:true,
|
||||
ai:{
|
||||
threaten:function(player,target){
|
||||
if(get.mode()!='guozhan'&&target.isUnseen(2)) return 0.0001;
|
||||
return 1;
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
card:{
|
||||
cheliji_sichengliangyu:{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
window.noname_asset_list=[
|
||||
'v1.9.110.7',
|
||||
'v1.9.110.7.1',
|
||||
'audio/background/aozhan_chaoming.mp3',
|
||||
'audio/background/aozhan_online.mp3',
|
||||
'audio/background/aozhan_rewrite.mp3',
|
||||
|
@ -4061,6 +4061,10 @@ window.noname_asset_list=[
|
|||
'image/character/ns_zhangning.jpg',
|
||||
'image/character/ns_yanghu.jpg',
|
||||
'image/character/re_chenqun.jpg',
|
||||
'image/character/gz_miheng.jpg',
|
||||
'image/character/key_kyouko.jpg',
|
||||
'image/character/key_yuuki.jpg',
|
||||
'image/character/re_niujin.jpg',
|
||||
|
||||
'image/character/baiwuchang.jpg',
|
||||
'image/character/baosanniang.jpg',
|
||||
|
|
|
@ -1,4 +1,9 @@
|
|||
window.config={
|
||||
extension_sources:{
|
||||
Coding:'https://nakamurayuri.coding.net/p/noname-extension/d/noname-extension/git/raw/master/',
|
||||
GitHub:'https://raw.githubusercontent.com/libccy/noname-extension/master/',
|
||||
},
|
||||
extension_source:'Coding',
|
||||
forbidai:['ns_liuzhang','yuji','re_yuji'],
|
||||
forbidai_user:[],
|
||||
forbidall:[],
|
||||
|
|
117
game/game.js
117
game/game.js
|
@ -538,6 +538,100 @@
|
|||
lib.updateURL=lib.updateURLS[item]||lib.updateURLS.coding;
|
||||
},
|
||||
},
|
||||
extension_source:{
|
||||
name:'获取扩展地址',
|
||||
init:'Coding',
|
||||
unfrequent:true,
|
||||
item:{},
|
||||
intro:function(){
|
||||
return '获取在线扩展时的地址。当前地址:<br>'+lib.config.extension_sources[lib.config.extension_source];
|
||||
},
|
||||
onclick:function(item){
|
||||
game.saveConfig('extension_source',item);
|
||||
},
|
||||
},
|
||||
extension_create:{
|
||||
name:'添加获取扩展地址',
|
||||
clear:true,
|
||||
unfrequent:true,
|
||||
onclick:function(){
|
||||
game.prompt('请输入地址名称',function(str){
|
||||
if(str){
|
||||
var map=lib.config.extension_sources;
|
||||
game.prompt('请输入'+str+'的地址',function(str2){
|
||||
if(str2){
|
||||
delete map[str];
|
||||
map[str]=str2;
|
||||
game.saveConfig('extension_sources',map);
|
||||
game.saveConfig('extension_source',str);
|
||||
var nodexx=ui.extension_source;
|
||||
nodexx.updateInner();
|
||||
var nodeyy=nodexx._link.menu;
|
||||
var nodezz=nodexx._link.config;
|
||||
for(var i=0;i<nodeyy.childElementCount;i++){
|
||||
if(nodeyy.childNodes[i]._link==str){
|
||||
nodeyy.childNodes[i].remove();
|
||||
break;
|
||||
}
|
||||
}
|
||||
var textMenu=ui.create.div('',str,nodeyy,function(){
|
||||
var node=this.parentNode._link;
|
||||
var config=node._link.config;
|
||||
node._link.current=this.link;
|
||||
var tmpName=node.lastChild.innerHTML;
|
||||
node.lastChild.innerHTML=config.item[this._link];
|
||||
if(config.onclick){
|
||||
if(config.onclick.call(node,this._link,this)===false){
|
||||
node.lastChild.innerHTML=tmpName;
|
||||
}
|
||||
}
|
||||
if(config.update){
|
||||
config.update();
|
||||
}
|
||||
});
|
||||
textMenu._link=str;
|
||||
nodezz.item[name]=str;
|
||||
alert('已添加扩展地址:'+str);
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
extension_delete:{
|
||||
name:'删除当前扩展地址',
|
||||
clear:true,
|
||||
unfrequent:true,
|
||||
onclick:function(){
|
||||
var bool=false,map=lib.config.extension_sources;
|
||||
for(var i in map){
|
||||
if(i!=lib.config.extension_source){
|
||||
bool=true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!bool){
|
||||
alert('不能删除最后一个扩展地址!');
|
||||
return;
|
||||
}
|
||||
var name=lib.config.extension_source;
|
||||
game.saveConfig('extension_source',i);
|
||||
delete map[name];
|
||||
game.saveConfig('extension_sources',map);
|
||||
var nodexx=ui.extension_source;
|
||||
nodexx.updateInner();
|
||||
var nodeyy=nodexx._link.menu;
|
||||
var nodezz=nodexx._link.config;
|
||||
for(var i=0;i<nodeyy.childElementCount;i++){
|
||||
if(nodeyy.childNodes[i]._link==name){
|
||||
nodeyy.childNodes[i].remove();
|
||||
break;
|
||||
}
|
||||
}
|
||||
delete nodezz.item[name];
|
||||
alert('已删除扩展地址:'+name);
|
||||
},
|
||||
},
|
||||
update:function(config,map){
|
||||
if('ontouchstart' in document){
|
||||
map.touchscreen.show();
|
||||
|
@ -7473,6 +7567,11 @@
|
|||
lib.configMenu.appearence.config.theme.item[i]=pack.theme[i];
|
||||
}
|
||||
}
|
||||
if(lib.config.extension_sources){
|
||||
for(i in lib.config.extension_sources){
|
||||
lib.configMenu.general.config.extension_source.item[i]=i;
|
||||
}
|
||||
}
|
||||
|
||||
if(pack.font){
|
||||
ui.css.fontsheet=lib.init.sheet();
|
||||
|
@ -16829,6 +16928,7 @@
|
|||
this.sex='male';
|
||||
//this.group='unknown';
|
||||
this.storage.nohp=true;
|
||||
skills.add('g_hidden_ai');
|
||||
}
|
||||
if(character2&&lib.character[character2]){
|
||||
var info2=lib.character[character2];
|
||||
|
@ -16885,8 +16985,9 @@
|
|||
this.hiddenSkills.addArray(info2[3]);
|
||||
this.classList.add(_status.video?'unseen2_v':'unseen2');
|
||||
this.storage.nohp=true;
|
||||
skills.add('g_hidden_ai');
|
||||
}
|
||||
else skills=skills.concat(info2[3]);
|
||||
else skills.addArray(info2[3]);
|
||||
|
||||
this.node.name2.innerHTML=get.slimName(character2);
|
||||
}
|
||||
|
@ -25886,6 +25987,7 @@
|
|||
},
|
||||
content:function(){
|
||||
player.showCharacter(2);
|
||||
player.removeSkill('g_hidden_ai');
|
||||
},
|
||||
},
|
||||
_kamisha:{
|
||||
|
@ -35608,7 +35710,7 @@
|
|||
else{
|
||||
node.classList.add('switcher');
|
||||
node.listen(clickSwitcher);
|
||||
ui.create.div('',config.item[config.init],node);
|
||||
node._link.choosing=ui.create.div('',config.item[config.init],node);
|
||||
node._link.menu=ui.create.div('.menu');
|
||||
if(config.visualMenu){
|
||||
node._link.menu.classList.add('visual');
|
||||
|
@ -36585,6 +36687,12 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
else if(j=='extension_source'){
|
||||
ui.extension_source=cfgnode;
|
||||
cfgnode.updateInner=function(){
|
||||
this._link.choosing.innerHTML=lib.config.extension_source;
|
||||
}
|
||||
}
|
||||
map[j]=cfgnode;
|
||||
if(!cfg.unfrequent){
|
||||
if(cfg.type=='autoskill'){
|
||||
|
@ -40487,7 +40595,10 @@
|
|||
importExtension.style.textAlign='left';
|
||||
ui.create.div('','<input type="file" accept="application/zip" style="width:153px"><button>确定</button>',importExtension);
|
||||
|
||||
var extensionURL=lib.updateURL.replace(/noname/g,'noname-extension')+'/master/';
|
||||
var extensionURL;
|
||||
var source=lib.config.extension_sources,index=lib.config.extension_source;
|
||||
if(source&&source[index]) extensionURL=source[index];
|
||||
else extensionURL=lib.updateURL.replace(/noname/g,'noname-extension')+'/master/';
|
||||
|
||||
var reloadnode=ui.create.div('.config.toggle.pointerdiv','重新启动',page,game.reload);
|
||||
reloadnode.style.display='none';
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
window.noname_update={
|
||||
version:'1.9.110.7',
|
||||
update:'1.9.110.6.1',
|
||||
version:'1.9.110.7.1',
|
||||
update:'1.9.110.7',
|
||||
changeLog:[
|
||||
'界陈群',
|
||||
'国战势力锦囊',
|
||||
'冰室忧希、伊座并杏子',
|
||||
'自定义在线扩展源',
|
||||
'牛金',
|
||||
'bug修复',
|
||||
],
|
||||
files:[
|
||||
|
@ -32,7 +33,7 @@ window.noname_update={
|
|||
//'character/ow.js',
|
||||
'character/rank.js',
|
||||
'character/refresh.js',
|
||||
//'character/shenhua.js',
|
||||
'character/shenhua.js',
|
||||
'character/sp.js',
|
||||
'character/sp2.js',
|
||||
//'character/tw.js',
|
||||
|
@ -41,7 +42,7 @@ window.noname_update={
|
|||
//'character/xianjian.js',
|
||||
//'character/xinghuoliaoyuan.js',
|
||||
'character/yingbian.js',
|
||||
'character/yijiang.js',
|
||||
//'character/yijiang.js',
|
||||
//'character/yxs.js',
|
||||
//'extension/boss/extension.js',
|
||||
//'layout/default/layout.css',
|
||||
|
@ -60,7 +61,7 @@ window.noname_update={
|
|||
'game/game.js',
|
||||
//'game/keyWords.js',
|
||||
//'game/NoSleep.js',
|
||||
//'game/config.js',
|
||||
'game/config.js',
|
||||
//'game/package.js',
|
||||
//'game/asset.js',
|
||||
//'game/source.js',
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 131 KiB |
Binary file not shown.
After Width: | Height: | Size: 172 KiB |
Binary file not shown.
After Width: | Height: | Size: 126 KiB |
Binary file not shown.
After Width: | Height: | Size: 136 KiB |
|
@ -490,7 +490,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
gz_huaxin:['male','wei',3,['wanggui','xibing']],
|
||||
gz_luyusheng:['female','wu',3,['zhente','zhiwei']],
|
||||
gz_zongyu:['male','shu',3,['zyqiao','chengshang']],
|
||||
gz_miheng:['male','qun',3,['gzkuangcai','gzshejian']],
|
||||
gz_miheng:['male','qun',3,['gzkuangcai','gzshejian'],['gzskin']],
|
||||
|
||||
gz_cuimao:['male','wei',3,['gzzhengbi','gzfengying'],[]],
|
||||
gz_yujin:['male','wei',4,['gzjieyue'],['gzskin']],
|
||||
|
@ -883,10 +883,11 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
zhenfa:'inline',
|
||||
trigger:{player:'phaseJieshuBegin'},
|
||||
filter:function(event,player){
|
||||
var bool=player.hasSkill('fengyang');
|
||||
return game.hasPlayer(function(current){
|
||||
return current!=player&¤t.inline(player);
|
||||
})&&game.hasPlayer(function(current){
|
||||
return current.inline(player)&¤t.countCards('e')>0;
|
||||
return (current==player||bool)&¤t.inline(player)&¤t.countCards('e')>0;
|
||||
});
|
||||
},
|
||||
direct:true,
|
||||
|
@ -897,7 +898,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
}).sortBySeat();
|
||||
'step 1'
|
||||
var target=event.list.shift();
|
||||
if(target.countCards('e')){
|
||||
if((target==player||player.hasSkill('fengyang'))&&target.countCards('e')){
|
||||
event.target=target;
|
||||
target.chooseToDiscard('e',get.prompt('fengyang'),'弃置装备区内的一张牌并摸两张牌').set('ai',function(card){
|
||||
return 5.5-get.value(card);
|
||||
|
|
Loading…
Reference in New Issue