commit
afbca5886f
|
@ -678,7 +678,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
if(event.zhuzhanresult){
|
||||
var target=event.zhuzhanresult;
|
||||
target.line(player,'green');
|
||||
target.discard(event.zhuzhanresult2.cards);
|
||||
target.discard(event.zhuzhanresult2.cards).discarder=target;
|
||||
target.popup('助战','wood');
|
||||
game.log(target,'响应了',player,'发起的助战');
|
||||
target.addExpose(0.2);
|
||||
|
|
|
@ -176,7 +176,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
target:function(player,target){
|
||||
var cards=target.getCards('e'),js=target.getCards('j');
|
||||
var val=get.value(cards,target);
|
||||
for(var card of js) val-=get.effect(target,card.viewAs?{name:card.viewAs}:card,target,target)
|
||||
for(var card of js) val-=get.effect(target,card.viewAs?{name:card.viewAs}:card,target,player);
|
||||
return -val;
|
||||
},
|
||||
},
|
||||
|
@ -422,6 +422,12 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
filterCard:true,
|
||||
position:'h',
|
||||
filterTarget:lib.filter.notMe,
|
||||
check:function(card){
|
||||
var player=_status.event.player;
|
||||
var val=5;
|
||||
if(player.needsToDiscard()) val=15;
|
||||
return val-get.value(card);
|
||||
},
|
||||
discard:false,
|
||||
lose:false,
|
||||
delay:false,
|
||||
|
@ -429,6 +435,17 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
content:function(){
|
||||
player.give(cards,target);
|
||||
},
|
||||
ai:{
|
||||
expose:0.1,
|
||||
order:1,
|
||||
result:{
|
||||
target:function(player,target){
|
||||
if(!ui.selected.cards.length) return 0;
|
||||
if(get.value(ui.selected.cards[0],false,'raw')<0) return -1;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
qixingbaodao:{
|
||||
trigger:{player:'equipAfter'},
|
||||
|
|
|
@ -1533,7 +1533,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
},
|
||||
characterReplace:{
|
||||
wuban:['clan_wuban','wuban'],
|
||||
wuban:['dc_wuban','clan_wuban','wuban'],
|
||||
},
|
||||
characterIntro:{
|
||||
xunshu:'荀淑(83年~149年),字季和,为郎陵侯相,颍川颍阴人(今河南省许昌市)人。汉和帝至汉桓帝时人物,以品行高洁著称。有子八人,号八龙。年轻时有高尚的德行,学问渊博,不喜欢雕章琢句,徒在文字上用功,不注重实际的学识。因此,常常被俗儒看不起。但州里却称他有知人之明。安帝时,征召任为郎中,后来再升当涂长。离职还乡里。他的孙子荀彧是曹操部下著名的谋士。',
|
||||
|
|
|
@ -624,6 +624,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
player.gain(cards,'gain2');
|
||||
}
|
||||
},
|
||||
ai:{
|
||||
combo:'yizhao',
|
||||
}
|
||||
},
|
||||
sanshou:{
|
||||
|
@ -2275,7 +2278,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(event.zhuzhanresult){
|
||||
var target=event.zhuzhanresult;
|
||||
target.line(player,'green');
|
||||
target.discard(event.zhuzhanresult2.cards);
|
||||
target.discard(event.zhuzhanresult2.cards).discarder=target;
|
||||
target.draw(2);
|
||||
target.popup('助战','wood');
|
||||
game.log(target,'响应了',player,'发起的助战');
|
||||
|
|
|
@ -15511,7 +15511,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
content:function(){
|
||||
player.loseHp();
|
||||
switch(get.type(cards[0],'trick',cards[0].original=='h'?player:false)){
|
||||
case 'basic':player.addTempSkill('xinzhanyi_basic');break;
|
||||
case 'basic':player.addTempSkill('xinzhanyi_basic');player.addMark('xinzhanyi_basic1',1,false);break;
|
||||
case 'equip':player.addTempSkill('xinzhanyi_equip');break;
|
||||
case 'trick':player.addTempSkill('xinzhanyi_trick');player.draw(3);break;
|
||||
}
|
||||
|
@ -15526,15 +15526,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
xinzhanyi_basic1:{
|
||||
trigger:{player:"useCard"},
|
||||
filter:function(event,player){
|
||||
return event.skill=='xinzhanyi_basic_backup'&&!player.storage.xinzhanyi_basic1;
|
||||
return get.type(event.card,false)=='basic'&&player.hasMark('xinzhanyi_basic1');
|
||||
},
|
||||
forced:true,
|
||||
silent:true,
|
||||
popup:false,
|
||||
content:function(){
|
||||
if(!trigger.baseDamage) trigger.baseDamage=1;
|
||||
trigger.baseDamage++;
|
||||
player.storage.xinzhanyi_basic1=true;
|
||||
var num=player.countMark('xinzhanyi_basic1');
|
||||
trigger.baseDamage+=num;
|
||||
player.removeMark('xinzhanyi_basic1',num,false);
|
||||
game.log(trigger.card,'的伤害值/回复值','#y+'+num);
|
||||
},
|
||||
},
|
||||
xinzhanyi_basic:{
|
||||
|
@ -15543,31 +15545,29 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
delete p.storage[s+1];
|
||||
},
|
||||
hiddenCard:function(player,name){
|
||||
return ['sha','tao','jiu'].contains(name)&&player.countCards('h',{type:'basic'})>0;
|
||||
return get.type(name)=='basic'&&player.countCards('h',{type:'basic'})>0;
|
||||
},
|
||||
enable:"chooseToUse",
|
||||
filter:function(event,player){
|
||||
if(event.filterCard({name:'sha'},player,event)||
|
||||
event.filterCard({name:'jiu'},player,event)||
|
||||
event.filterCard({name:'tao'},player,event)){
|
||||
return player.hasCard(function(card){
|
||||
return get.type(card)=='basic';
|
||||
},'hs');
|
||||
if(!player.hasCard(function(card){
|
||||
return get.type(card)=='basic';
|
||||
},'hs')) return false;
|
||||
for(var name of lib.inpile){
|
||||
if(get.type(name)!='basic') continue;
|
||||
if(event.filterCard({name:name},player,event)) return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
chooseButton:{
|
||||
dialog:function(event,player){
|
||||
var list=[];
|
||||
if(event.filterCard({name:'sha'},player,event)){
|
||||
list.push(['基本','','sha']);
|
||||
for(var j of lib.inpile_nature) list.push(['基本','','sha',j]);
|
||||
}
|
||||
if(event.filterCard({name:'tao'},player,event)){
|
||||
list.push(['基本','','tao']);
|
||||
}
|
||||
if(event.filterCard({name:'jiu'},player,event)){
|
||||
list.push(['基本','','jiu']);
|
||||
for(var name of lib.inpile){
|
||||
if(get.type(name)!='basic') continue;
|
||||
if(event.filterCard({name:name},player,event)) list.push(['基本','',name]);
|
||||
if(name!='sha') continue;
|
||||
for(var j of lib.inpile_nature){
|
||||
if(event.filterCard({name:name,nature:j},player,event)) list.push(['基本','','sha',j]);
|
||||
}
|
||||
}
|
||||
return ui.create.dialog('战意',[list,'vcard'],'hidden');
|
||||
},
|
||||
|
@ -17924,7 +17924,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
sunshao:['sp_sunshao','sunshao'],
|
||||
xunchen:['re_xunchen','xunchen','tw_xunchen','sp_xunchen'],
|
||||
xinpi:['xinpi','sp_xinpi'],
|
||||
duyu:['duyu','sp_duyu'],
|
||||
duyu:['duyu','dc_duyu','sp_duyu','pk_sp_duyu'],
|
||||
zhangwen:['sp_zhangwen','zhangwen'],
|
||||
ol_bianfuren:['ol_bianfuren','tw_bianfuren','sp_bianfuren'],
|
||||
wangshuang:['wangshuang','sp_wangshuang'],
|
||||
|
@ -17946,7 +17946,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
yangbiao:['yangbiao','dc_yangbiao','jsrg_yangbiao'],
|
||||
qiaozhou:['yj_qiaozhou','qiaozhou'],
|
||||
sunhanhua:['dc_qiaozhou','sunhanhua'],
|
||||
duyu:['duyu','sp_duyu','pk_sp_duyu'],
|
||||
kongrong:['sp_kongrong','jsrg_kongrong','kongrong'],
|
||||
mifuren:['dc_mifuren','sp_mifuren'],
|
||||
},
|
||||
|
|
|
@ -178,9 +178,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
content:function(){
|
||||
'step 0'
|
||||
var go=false,d1=true;
|
||||
var go=false,d1=false;
|
||||
if(get.attitude(player,trigger.player)>0){
|
||||
if(trigger.player.hasSkill('jueqing')||trigger.player.hasSkill('gangzhi')) d1=false
|
||||
d1=true;
|
||||
if(trigger.player.hasSkill('jueqing')||trigger.player.hasSkill('gangzhi')) d1=false;
|
||||
for(var target of trigger.targets){
|
||||
if(!target.mayHaveShan()||trigger.player.hasSkillTag('directHit_ai',true,{
|
||||
target:target,
|
||||
|
|
|
@ -925,6 +925,7 @@ window.noname_character_rank={
|
|||
'vtb_xiaojiu',
|
||||
'ol_zhangzhang',
|
||||
'ol_mengda',
|
||||
'dc_wuban',
|
||||
],
|
||||
b:[
|
||||
'diy_feishi',
|
||||
|
@ -1214,6 +1215,7 @@ window.noname_character_rank={
|
|||
'vtb_xiaoshan',
|
||||
'vtb_xiaotao',
|
||||
'zhangchu',
|
||||
'dc_duyu',
|
||||
],
|
||||
bm:[
|
||||
'diy_xizhenxihong',
|
||||
|
|
|
@ -188,6 +188,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
player.draw();
|
||||
},
|
||||
discard:false,
|
||||
lose:false,
|
||||
prepare:function(cards,player,targets){
|
||||
player.$give(cards,targets[0],false);
|
||||
},
|
||||
|
|
|
@ -773,7 +773,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
ai:{
|
||||
effect:{
|
||||
player:function(card,player,target){
|
||||
if(player!=target&&target&&target.group=='qun') return [1,0.2];
|
||||
if(player!=target&&target&&target.group=='qun'&&card.name!='tao') return [1,0.1];
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
@ -3987,6 +3987,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
player.draw();
|
||||
},
|
||||
discard:false,
|
||||
lose:false,
|
||||
prepare:function(cards,player,targets){
|
||||
player.$give(cards,targets[0],false);
|
||||
},
|
||||
|
|
|
@ -763,10 +763,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
'将势力改为任意一个势力'
|
||||
].map((text,ind)=>{
|
||||
var hint='';
|
||||
if(list.contains(ind+1)){
|
||||
if(list2.contains(ind+1)){
|
||||
return text;
|
||||
}
|
||||
else{
|
||||
else if(!list.contains(ind+1)){
|
||||
hint+='已被执行过且';
|
||||
}
|
||||
if(ind==1&&nochai&&!list2.contains(ind+1)) hint+='无有手牌角色且';
|
||||
|
@ -841,7 +841,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
},
|
||||
选项三:function(){
|
||||
player.chooseUseTarget('sha',true,false).set('logSkill','olgoude');
|
||||
player.chooseUseTarget('sha',true,false).set('logSkill','olgoude').set('prompt','苟得:选择【杀】的目标');
|
||||
},
|
||||
选项四:function(){
|
||||
'step 0'
|
||||
|
@ -9994,6 +9994,24 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}).length>0;
|
||||
},
|
||||
logTarget:'player',
|
||||
check:function(event,player){
|
||||
var list=event.player.getStockSkills('仲村由理','天下第一').filter(function(skill){
|
||||
var info=get.info(skill);
|
||||
return info&&!info.juexingji&&!info.hiddenSkill&&!info.zhuSkill&&!info.charlotte&&!info.limited&&!info.dutySkill;
|
||||
});
|
||||
var negSkill=list.some(function(skill){
|
||||
return get.skillRank(skill,'inout')<=0;
|
||||
});
|
||||
var att=get.sgnAttitude(event.player,player);
|
||||
if(!player.storage.retuogu){
|
||||
if(negSkill&&att<0) return false;
|
||||
return true;
|
||||
}
|
||||
list.sort(function(a,b){
|
||||
return att*(get.skillRank(b,'inout')-get.skillRank(a,'inout'));
|
||||
})[0];
|
||||
return get.skillRank(list[0],'inout')>=get.skillRank(player.storage.retuogu,'inout');
|
||||
},
|
||||
content:function(){
|
||||
'step 0'
|
||||
var list=trigger.player.getStockSkills('仲村由理','天下第一').filter(function(skill){
|
||||
|
@ -10002,7 +10020,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
});
|
||||
if(list.length==1) event._result={control:list[0]};
|
||||
else trigger.player.chooseControl(list).set('prompt','选择令'+get.translation(player)+'获得一个技能').set('forceDie',true).set('ai',function(){
|
||||
return list.randomGet();
|
||||
var att=get.sgnAttitude(_status.event.getTrigger().player,player);
|
||||
if(att==0) return list.randomGet();
|
||||
var listx=list.map(function(skill){
|
||||
return [skill,get.skillRank(skill,'inout')];
|
||||
}).sort(function(a,b){
|
||||
return att*(b[1]-a[1]);
|
||||
}).slice(0,2);
|
||||
var listx2=[0];
|
||||
if(Math.abs(listx[0][1]-listx[1][1])<=0.5&&Math.sign(listx[0][1])==Math.sign(listx[1][1])) listx2.push(1);
|
||||
return listx[listx2.randomGet()][0];
|
||||
});
|
||||
'step 1'
|
||||
if(player.storage.retuogu) player.removeSkill(player.storage.retuogu);
|
||||
|
|
313
character/sp2.js
313
character/sp2.js
|
@ -4,6 +4,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
name:'sp2',
|
||||
connect:true,
|
||||
character:{
|
||||
dc_wuban:['male','shu',4,['dcyouzhan'],['clan:陈留吴氏','unseen']],
|
||||
dc_duyu:['male','wei',3,['dcjianguo','dcdyqingshi'],['unseen']],
|
||||
ganfurenmifuren:['female','shu',3,['dcchanjuan','dcxunbie']],
|
||||
dc_ganfuren:['female','shu',3,['dcshushen','dcshenzhi']],
|
||||
dc_mifuren:['female','shu',3,['dcguixiu','dccunsi']],
|
||||
|
@ -252,7 +254,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
sp_jianghu:['guanning','huzhao','dc_huangchengyan','mengjie'],
|
||||
sp_zongheng:['huaxin','luyusheng','re_xunchen','re_miheng','fengxi','re_dengzhi','dc_yanghu','zongyu'],
|
||||
sp_taiping:['guanhai','liupi','peiyuanshao','zhangchu','zhangkai'],
|
||||
sp_yanhan:['dc_liuba','dc_huangquan','furongfuqian','xianglang','dc_huojun','gaoxiang'],
|
||||
sp_yanhan:['dc_liuba','dc_huangquan','furongfuqian','xianglang','dc_huojun','gaoxiang','dc_wuban'],
|
||||
sp_jishi:['dc_jiben','zhenghun','dc_sunhanhua','liuchongluojun'],
|
||||
sp_raoting:['dc_huanghao','dc_sunziliufang','dc_sunchen'],
|
||||
sp_yijun:['gongsundu','mengyou'],
|
||||
|
@ -262,7 +264,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
sp_zhongyuan:['re_hucheer','re_zoushi','caoanmin','re_dongcheng'],
|
||||
sp_zhengyin:['yue_caiwenji'],
|
||||
sp_xiaohu:['haomeng','yanfuren','yanrou','dc_zhuling'],
|
||||
sp2_huben:['wangshuang','wenyang','re_liuzan','dc_huangzu','wulan','leitong','chentai'],
|
||||
sp2_huben:['wangshuang','wenyang','re_liuzan','dc_huangzu','wulan','leitong','chentai','dc_duyu'],
|
||||
sp2_shengun:["puyuan","guanlu","gexuan",'wufan','re_zhangbao','dukui','zhaozhi','zhujianping','dc_zhouxuān','zerong'],
|
||||
sp2_bizhe:['dc_luotong','dc_wangchang','chengbing','dc_yangbiao','ruanji'],
|
||||
sp2_huangjia:['caomao','liubian','dc_liuyu','quanhuijie','dingshangwan','yuanji','xielingyu','sunyu','ganfurenmifuren','dc_ganfuren','dc_mifuren'],
|
||||
|
@ -278,6 +280,246 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
},
|
||||
skill:{
|
||||
//吴班
|
||||
dcyouzhan:{
|
||||
audio:2,
|
||||
trigger:{
|
||||
global:['loseAfter','equipAfter','addJudgeAfter','gainAfter','loseAsyncAfter','addToExpansionAfter'],
|
||||
},
|
||||
forced:true,
|
||||
filter:function(event,player){
|
||||
if(player!=_status.currentPhase) return false;
|
||||
return game.hasPlayer(current=>{
|
||||
if(current==player) return false;
|
||||
var evt=event.getl(current);
|
||||
return evt&&evt.cards2.length;
|
||||
});
|
||||
},
|
||||
content:function(){
|
||||
'step 0'
|
||||
var targets=game.filterPlayer(current=>{
|
||||
if(current==player) return false;
|
||||
var evt=trigger.getl(current);
|
||||
return evt&&evt.cards2.length;
|
||||
});
|
||||
event.targets=targets;
|
||||
player.logSkill('dcyouzhan',targets);
|
||||
'step 1'
|
||||
var target=targets.shift();
|
||||
player.draw();
|
||||
target.addTempSkill('dcyouzhan_effect');
|
||||
target.addMark('dcyouzhan_effect',1,false);
|
||||
target.addTempSkill('dcyouzhan_draw');
|
||||
if(targets.length){
|
||||
event.redo();
|
||||
}
|
||||
},
|
||||
subSkill:{
|
||||
effect:{
|
||||
trigger:{
|
||||
player:'damageBegin3',
|
||||
},
|
||||
filter:function(event,player){
|
||||
return player.hasMark('dcyouzhan_effect');
|
||||
},
|
||||
forced:true,
|
||||
charlotte:true,
|
||||
onremove:true,
|
||||
content:function(){
|
||||
'step 0'
|
||||
trigger.num+=player.countMark('dcyouzhan_effect');
|
||||
player.removeSkill('dcyouzhan_effect');
|
||||
},
|
||||
mark:true,
|
||||
intro:{
|
||||
content:'本回合下一次受到的伤害+#',
|
||||
},
|
||||
ai:{
|
||||
damageBonus:true,
|
||||
effect:{
|
||||
target:function(card,player,target){
|
||||
if(get.tag(card,'damage')) return 1+0.5*target.countMark('dcyouzhan_effect');
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
draw:{
|
||||
trigger:{
|
||||
global:'phaseJieshuBegin',
|
||||
},
|
||||
forced:true,
|
||||
charlotte:true,
|
||||
filter:function(event,player){
|
||||
return !player.getHistory('damage').length;
|
||||
},
|
||||
content:function(){
|
||||
player.draw(player.getHistory('lose').length);
|
||||
},
|
||||
},
|
||||
}
|
||||
},
|
||||
//杜预
|
||||
dcjianguo:{
|
||||
audio:2,
|
||||
enable:'phaseUse',
|
||||
usable:1,
|
||||
chooseButton:{
|
||||
dialog:function(event,player){
|
||||
var dialog=ui.create.dialog('谏国:请选择一项','hidden');
|
||||
dialog.add([[
|
||||
['discard','令一名角色摸一张牌,然后弃置一半手牌'],
|
||||
['draw','令一名角色弃置一张牌,然后摸等同于手牌数一半的牌']
|
||||
],'textbutton']);
|
||||
return dialog;
|
||||
},
|
||||
check:function(button){
|
||||
var player=_status.event.player;
|
||||
if(button.link=='discard'){
|
||||
var discard=Math.max.apply(Math,game.filterPlayer(current=>{
|
||||
return lib.skill.dcjianguo_discard.filterTarget(null,player,current);
|
||||
}).map(current=>{
|
||||
return get.effect(current,'dcjianguo_discard',player,player);
|
||||
}));
|
||||
return discard;
|
||||
}
|
||||
if(button.link=='draw'){
|
||||
var draw=Math.max.apply(Math,game.filterPlayer(current=>{
|
||||
return lib.skill.dcjianguo_draw.filterTarget(null,player,current);
|
||||
}).map(current=>{
|
||||
return get.effect(current,'dcjianguo_draw',player,player);
|
||||
}));
|
||||
return draw;
|
||||
}
|
||||
return 0;
|
||||
},
|
||||
backup:function(links){
|
||||
return get.copy(lib.skill['dcjianguo_'+links[0]]);
|
||||
},
|
||||
prompt:function(links){
|
||||
if(links[0]=='discard') return '令一名角色摸一张牌,然后弃置一半手牌';
|
||||
return '令一名角色弃置一张牌,然后摸等同于手牌数一半的牌';
|
||||
},
|
||||
},
|
||||
ai:{
|
||||
order:10,
|
||||
threaten:2.8,
|
||||
result:{
|
||||
//想让杜预两个技能自我联动写起来太累了,开摆
|
||||
player:1,
|
||||
},
|
||||
},
|
||||
subSkill:{
|
||||
backup:{audio:'dcjianguo'},
|
||||
discard:{
|
||||
audio:'dcjianguo',
|
||||
filterTarget:()=>true,
|
||||
filterCard:()=>false,
|
||||
selectCard:-1,
|
||||
charlotte:true,
|
||||
content:function(){
|
||||
'step 0'
|
||||
target.draw();
|
||||
game.delayex();
|
||||
'step 1'
|
||||
var num=Math.floor(target.countCards('h')/2);
|
||||
if(num>0) target.chooseToDiscard(num,true,'谏国:请弃置'+get.cnNumber(num)+'张手牌');
|
||||
},
|
||||
ai:{
|
||||
result:{
|
||||
target:function(player,target){
|
||||
return 1.1-Math.ceil(target.countCards('h')/2);
|
||||
},
|
||||
},
|
||||
tag:{
|
||||
gain:1,
|
||||
loseCard:2,
|
||||
},
|
||||
},
|
||||
},
|
||||
draw:{
|
||||
audio:'dcjianguo',
|
||||
filterTarget:function(card,player,target){
|
||||
return target.countCards('he');
|
||||
},
|
||||
filterCard:()=>false,
|
||||
selectCard:-1,
|
||||
charlotte:true,
|
||||
content:function(){
|
||||
'step 0'
|
||||
target.chooseToDiscard('he',true,'谏国:请弃置一张牌');
|
||||
'step 1'
|
||||
var num=Math.floor(target.countCards('h')/2);
|
||||
if(num>0) target.draw(num);
|
||||
},
|
||||
ai:{
|
||||
result:{
|
||||
target:function(player,target){
|
||||
var fix=0;
|
||||
var num=target.countCards('h');
|
||||
if(player==target&&num%2==1&&num>=5) fix+=1;
|
||||
return Math.floor(num/2-0.5)+fix;
|
||||
},
|
||||
},
|
||||
tag:{
|
||||
loseCard:1,
|
||||
gain:2,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
dcdyqingshi:{
|
||||
audio:2,
|
||||
trigger:{
|
||||
player:'useCardToPlayered',
|
||||
},
|
||||
filter:function(event,player){
|
||||
if(player!=_status.currentPhase) return false;
|
||||
if(!event.isFirstTarget) return false;
|
||||
if(event.card.name!='sha'&&get.type(event.card,false)!='trick') return false;
|
||||
if(player.countCards('h')!=player.getHistory('useCard').indexOf(event.getParent())+1) return false;
|
||||
return event.targets.some(target=>{
|
||||
return target!=player&&target.isIn();
|
||||
});
|
||||
},
|
||||
direct:true,
|
||||
content:function(){
|
||||
'step 0'
|
||||
var targets=trigger.targets.filter(target=>{
|
||||
return target!=player&&target.isIn();
|
||||
});
|
||||
player.chooseTarget(get.prompt('dcdyqingshi'),'对一名不为你的目标角色造成1点伤害',(card,player,target)=>{
|
||||
return _status.event.targets.contains(target);
|
||||
}).set('ai',target=>{
|
||||
var player=_status.event.player;
|
||||
return get.damageEffect(target,player,player);
|
||||
}).set('targets',targets);
|
||||
'step 1'
|
||||
if(result.bool){
|
||||
var target=result.targets[0];
|
||||
player.logSkill('dcdyqingshi',target);
|
||||
target.damage();
|
||||
}
|
||||
},
|
||||
mod:{
|
||||
aiOrder:function(player,card,num){
|
||||
if(_status.currentPhase!=player) return;
|
||||
var cardsh=[];
|
||||
if(Array.isArray(card.cards)){
|
||||
cardsh.addArray(card.cards.filter(card=>{
|
||||
return get.position(card)=='h';
|
||||
}));
|
||||
}
|
||||
var del=player.countCards('h')-cardsh.length-player.getHistory('useCard').length-1;
|
||||
if(del<0) return;
|
||||
if(del>0){
|
||||
if(card.name=='sha'||get.type(card,false)!='trick') return num/3;
|
||||
return num+1;
|
||||
}
|
||||
return num+15;
|
||||
},
|
||||
},
|
||||
},
|
||||
//甘糜
|
||||
dcchanjuan:{
|
||||
audio:2,
|
||||
|
@ -415,7 +657,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
rec:{
|
||||
audio:'guixiu',
|
||||
trigger:{
|
||||
player:'logSkillAfter',
|
||||
player:'logSkill',
|
||||
},
|
||||
forced:true,
|
||||
filter:function(event,player){
|
||||
|
@ -1113,6 +1355,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
discard:false,
|
||||
lose:false,
|
||||
delay:false,
|
||||
skillAnimation:true,
|
||||
animationColor:'metal',
|
||||
check:function(card){
|
||||
if(get.type(card)!='basic'&&get.type(card)!='trick') return 0;
|
||||
return get.value(card)-7.5;
|
||||
|
@ -3155,6 +3399,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
filterTarget:function(card,player,target){
|
||||
return player!=target&&!player.getStorage('dcmoyu_clear').contains(target)&&target.countGainableCards(player,'hej');
|
||||
},
|
||||
global:'dcmoyu_ai',
|
||||
content:function(){
|
||||
'step 0'
|
||||
player.addTempSkill('dcmoyu_clear');
|
||||
|
@ -3184,10 +3429,31 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
charlotte:true,
|
||||
onremove:true,
|
||||
},
|
||||
ban:{charlotte:true}
|
||||
ban:{charlotte:true},
|
||||
ai:{
|
||||
ai:{
|
||||
effect:{
|
||||
target:function(card,player,target,current){
|
||||
if(get.type(card)=='delay'&¤t<0){
|
||||
var currentx=_status.currentPhase;
|
||||
if(!currentx||!currentx.isIn()) return;
|
||||
var list=game.filterPlayer(current=>{
|
||||
if(current==target) return true;
|
||||
if(!current.hasSkill('dcmoyu')) return false;
|
||||
if(current.hasJudge('lebu')) return false;
|
||||
return get.attitude(current,target)>0;
|
||||
});
|
||||
list.sortBySeat(currentx);
|
||||
if(list.indexOf(target)!=0) return 'zerotarget';
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
},
|
||||
ai:{
|
||||
order:9,
|
||||
threaten:2.4,
|
||||
result:{
|
||||
target:function(player,target){
|
||||
var eff=get.effect(target,{name:'shunshou'},player,player);
|
||||
|
@ -3222,7 +3488,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
target.chooseToDiscard('集众:弃置三张手牌,或点击“取消”获得“信众”标记',3);
|
||||
}
|
||||
'step 2'
|
||||
target.addMark('dcjizhong',1);
|
||||
if(!result.bool){
|
||||
target.addMark('dcjizhong',1);
|
||||
}
|
||||
},
|
||||
marktext:'信',
|
||||
intro:{
|
||||
|
@ -6912,7 +7180,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
player.logSkill('dcwumei',target);
|
||||
player.addTempSkill('dcwumei_used','roundStart');
|
||||
target.insertPhase();
|
||||
target.addTempSkill('dcwumei_wake');
|
||||
target.addTempSkill('dcwumei_wake','phaseAfter');
|
||||
var targets=game.filterPlayer();
|
||||
if(!target.storage.dcwumei_wake) target.storage.dcwumei_wake=[[],[]];
|
||||
for(var targetx of targets){
|
||||
|
@ -18169,7 +18437,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
return false;
|
||||
},
|
||||
usable:1,
|
||||
check:()=>false,
|
||||
check:function(event,player){
|
||||
var hs=player.getCards('h'),cards=event.cards.filter(function(i){
|
||||
return (hs.contains(i)&&get.color(i,player)=='red'&&lib.filter.cardDiscardable(i,player,'difa'));
|
||||
});
|
||||
var value=get.value(hs,player);
|
||||
return Array.from(ui.cardPile.childNodes).some(function(card){
|
||||
return get.type2(card,false)=='trick'&&get.value(card,player)>value;
|
||||
});
|
||||
},
|
||||
content:function(){
|
||||
'step 0'
|
||||
var hs=player.getCards('h'),cards=trigger.cards.filter(function(i){
|
||||
|
@ -18185,7 +18461,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
return get.type2(i,false)=='trick';
|
||||
});
|
||||
if(!list.length) event.finish();
|
||||
else player.chooseButton(['选择获得一种锦囊牌',[list.map((i)=>['锦囊','',i]),'vcard']],true);
|
||||
else player.chooseButton(['选择获得一种锦囊牌',[list.map((i)=>['锦囊','',i]),'vcard']],true).set('ai',function(button){
|
||||
var card={name:button.link[2]};
|
||||
if(!_status.event.list.contains(card.name)) return 0;
|
||||
return _status.event.player.getUseValue(card);
|
||||
}).set('list',Array.from(ui.cardPile.childNodes).filter(function(card){
|
||||
return get.type2(card,false)=='trick';
|
||||
}).map(function(card){
|
||||
return card.name;
|
||||
}).reduce(function(list,name){
|
||||
if(!list.contains(name)) list.add(name);
|
||||
return list;
|
||||
},[]));
|
||||
'step 2'
|
||||
var card=get.cardPile(function(i){
|
||||
return i.name==result.links[0][2]&&!event.cards.contains(i);
|
||||
|
@ -30855,7 +31142,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
zhangchu:'张楚',
|
||||
dcjizhong:'集众',
|
||||
dcjizhong_info:'出牌阶段限一次。你可以令一名其他角色摸两张牌,然后其选择一项:1.若其没有“信众”标记,其获得“信众”标记;2.弃置三张手牌。',
|
||||
dcrihui:'日慧',
|
||||
dcrihui:'日彗',
|
||||
dcrihui_info:'每回合限一次。当你使用普通锦囊牌或黑色基本牌结算结束后,若此牌的目标数为1且目标不为你,且其:没有“信众”,则所有有“信众”的角色依次视为对其使用一张与此牌牌名和属性相同的牌;有“信众”,则你可以获得其区域里的一张牌。',
|
||||
dcguangshi:'光噬',
|
||||
dcguangshi_info:'锁定技。准备阶段,若所有其他角色均有“信众”,你失去1点体力并摸两张牌。',
|
||||
|
@ -30999,6 +31286,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
dcshushen_info:'当你回复1点体力后,你可以选择一名其他角色并选择一项:1.令其回复1点体力;2.你与其各摸一张牌。',
|
||||
dcshenzhi:'神智',
|
||||
dcshenzhi_info:'准备阶段,若你的手牌数大于体力值,你可以弃置一张手牌,然后回复1点体力。',
|
||||
dc_wuban:'吴班',
|
||||
dcyouzhan:'诱战',
|
||||
dcyouzhan_info:'锁定技。当其他角色于你的回合内失去牌后,你摸一张牌,且其获得如下效果:1.其于此回合下一次受到的伤害+1;2.结束阶段,若其于此回合未受到过伤害,其摸X张牌(X为其此回合失去过牌的次数)。',
|
||||
dc_duyu:'杜预',
|
||||
dcjianguo:'谏国',
|
||||
dcjianguo_info:'出牌阶段限一次。你可以选择一名角色并选择一项:1.令其摸一张牌,然后其弃置一半的手牌;2.令其弃置一张牌,然后其摸等同于手牌数一半的牌(均向下取整)。',
|
||||
dcdyqingshi:'倾势',
|
||||
dcdyqingshi_info:'当你于回合内使用【杀】或普通锦囊牌指定第一个目标后,若目标角色包括其他角色且此牌为你本回合使用的第X张牌,你可以对其中一名不为你的目标角色造成1点伤害(X为你的手牌数)。',
|
||||
|
||||
sp_whlw:"文和乱武",
|
||||
sp_zlzy:"逐鹿中原",
|
||||
|
|
|
@ -2170,6 +2170,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
var num=0,numx=target.countCards('h',{name:'sha'}),targetx=target;
|
||||
for(var i=0; i<numx; i++){
|
||||
targetx=targetx.next;
|
||||
if(targetx==player) targetx=targetx.next;
|
||||
}
|
||||
var att1=get.attitude(player,target),att2=get.attitude(player,targetx);
|
||||
if(att1>0&&att2<0) num=0.25;
|
||||
|
|
|
@ -4091,7 +4091,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
'step 0'
|
||||
var list=lib.inpile.filter(function(i){
|
||||
if(player.storage.shouxi.contains(i)) return false;
|
||||
var type=get.type(i);
|
||||
var type=get.type2(i);
|
||||
if(type=='basic'||type=='trick') return true;
|
||||
return false;
|
||||
});
|
||||
|
@ -4108,6 +4108,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
event.vcard=result.links;
|
||||
event.cardname=name;
|
||||
player.storage.shouxi.add(name);
|
||||
player.popup(name);
|
||||
game.log(player,'声明了','#y'+get.translation(name));
|
||||
}
|
||||
else{
|
||||
event.finish();
|
||||
|
|
63
game/game.js
63
game/game.js
|
@ -10634,6 +10634,7 @@
|
|||
},
|
||||
changeGroup:function(){
|
||||
'step 0'
|
||||
event.originGroup=player.group;
|
||||
if(!event.group) event.group=player.group;
|
||||
var group=event.group;
|
||||
player.getHistory('custom').push(event);
|
||||
|
@ -11608,7 +11609,7 @@
|
|||
if(subtype=='equip6'&&['equip3','equip4'].contains(event.pos)) return true;
|
||||
return false;
|
||||
});
|
||||
if(cards.length) player.discard(cards).delay=false;
|
||||
if(cards.length) player.loseToDiscardpile(cards).delay=false;
|
||||
game.log(player,'废除了',get.translation(event.pos),'栏');
|
||||
player.$disableEquip(event.pos);
|
||||
}
|
||||
|
@ -16299,6 +16300,7 @@
|
|||
game.log(player,'弃置了',cards);
|
||||
event.done=player.lose(cards,event.position,'visible');
|
||||
event.done.type='discard';
|
||||
if(event.discarder) event.done.discarder=event.discarder;
|
||||
"step 1"
|
||||
event.trigger('discard');
|
||||
},
|
||||
|
@ -23751,7 +23753,7 @@
|
|||
this.addSkill(skill,checkConflict,true,true);
|
||||
|
||||
if(!expire){
|
||||
expire='phaseAfter';
|
||||
expire=['phaseAfter','phaseBefore'];
|
||||
}
|
||||
this.tempSkills[skill]=expire;
|
||||
|
||||
|
@ -29144,6 +29146,19 @@
|
|||
content:function(){
|
||||
player.removeSkill('counttrigger');
|
||||
delete player.storage.counttrigger;
|
||||
},
|
||||
group:'counttrigger_2',
|
||||
subSkill:{
|
||||
2:{
|
||||
trigger:{global:'phaseBefore'},
|
||||
silent:true,
|
||||
charlotte:true,
|
||||
priority:100,
|
||||
content:function(){
|
||||
player.removeSkill('counttrigger');
|
||||
delete player.storage.counttrigger;
|
||||
},
|
||||
}
|
||||
}
|
||||
},
|
||||
_recovercheck:{
|
||||
|
@ -47732,10 +47747,10 @@
|
|||
for(var i of game.connectPlayers){
|
||||
if(!i.nickname&&!i.classList.contains('unselectable2')) num++;
|
||||
}
|
||||
// if(num>=lib.configOL.number-1){
|
||||
// alert('至少要有两名玩家才能开始游戏!');
|
||||
// return;
|
||||
// }
|
||||
if(num>=lib.configOL.number-1){
|
||||
alert('至少要有两名玩家才能开始游戏!');
|
||||
return;
|
||||
}
|
||||
game.resume();
|
||||
}
|
||||
button.delete();
|
||||
|
@ -53370,17 +53385,23 @@
|
|||
threaten=info.ai.threaten(player,player);
|
||||
}
|
||||
}
|
||||
if(type=='in'){
|
||||
if(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];
|
||||
var add=false;
|
||||
for(var i of list){
|
||||
for(var j of lib.phaseName){
|
||||
if(i.indexOf[j]==0){
|
||||
num+=0.5;
|
||||
add=true;
|
||||
break;
|
||||
if(i.indexOf('phase')==0){
|
||||
num+=0.5;
|
||||
add=true;
|
||||
}
|
||||
else{
|
||||
for(var j of lib.phaseName){
|
||||
if(i.indexOf[j]==0){
|
||||
num+=0.5;
|
||||
add=true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(add) break;
|
||||
|
@ -53393,12 +53414,22 @@
|
|||
num+=Math.sqrt(threaten)-1;
|
||||
}
|
||||
}
|
||||
else if(type=='out'){
|
||||
if(type.indexOf('out')!=-1){
|
||||
if(threaten<1){
|
||||
num=1/Math.sqrt(threaten);
|
||||
num*=1/Math.sqrt(threaten);
|
||||
}
|
||||
if(info.trigger){
|
||||
if(info.trigger.global){
|
||||
var list=Array.isArray(info.trigger.global)?info.trigger.global:[info.trigger.global];
|
||||
num+=Math.min(3,list.length)/10;
|
||||
for(var i of list){
|
||||
if(i.indexOf('lose')==0||i.indexOf('use')==0) num+=0.3;
|
||||
if(i.indexOf('cardsDiscard')==0) num+=0.4;
|
||||
}
|
||||
}
|
||||
if(info.trigger.target||(typeof info.trigger.player=='string'&&
|
||||
(info.trigger.player.indexOf('damage')==0||info.trigger.player.indexOf('lose')==0))) num+=0.1;
|
||||
}
|
||||
if(info.trigger&&(info.trigger.global||info.trigger.target||(typeof info.trigger.player=='string'&&
|
||||
(info.trigger.player.indexOf('damage')==0||info.trigger.player.indexOf('lose')==0)))) num+=0.1;
|
||||
if(info.ai){
|
||||
if(info.ai.maixie||info.ai.maixie_hp||info.ai.maixie_defend){
|
||||
num+=0.5;
|
||||
|
|
|
@ -4093,7 +4093,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
}
|
||||
}
|
||||
if(info.linked) target.classList.add('linked');
|
||||
if(info.linked) target.classList.add('linked'+(get.is.linked2(target)?'2':''));
|
||||
if(info.turnedover) target.classList.add('turnedover');
|
||||
if(info.position<_status.firstAct.brawlinfo.position) _status.firstAct=target;
|
||||
var hs=[];
|
||||
|
|
|
@ -362,6 +362,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
return Math.random();
|
||||
}).set('dialog',event.videoId);
|
||||
"step 5"
|
||||
game.broadcastAll('closeDialog',event.videoId);
|
||||
game.me.next.init(result.links[0]);
|
||||
_status.characterlist.remove(result.links[0]);
|
||||
game.addRecentCharacter(result.links[0]);
|
||||
|
|
Loading…
Reference in New Issue