Add files via upload

This commit is contained in:
Spmario233 2020-02-23 13:45:11 +08:00 committed by GitHub
parent c09fa22d75
commit a31e10409c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
31 changed files with 2005 additions and 969 deletions

View File

@ -965,8 +965,15 @@ game.import('card',function(lib,game,ui,get,ai,_status){
}, },
content:function(){ content:function(){
trigger.card.nature='fire'; trigger.card.nature='fire';
player.addSkill('zhuque_skill2'); if(get.itemtype(trigger.card)=='card'){
player.storage.zhuque_skill=trigger.card; var next=game.createEvent('zhuque_clear');
next.card=trigger.card;
event.next.remove(next);
trigger.after.push(next);
next.setContent(function(){
delete card.nature;
});
}
} }
}, },
zhuque_skill2:{ zhuque_skill2:{

View File

@ -42,7 +42,6 @@ game.import('card',function(lib,game,ui,get,ai,_status){
fullskin:true, fullskin:true,
type:'equip', type:'equip',
subtype:'equip2', subtype:'equip2',
cardimage:'suolianjia',
skills:['minguangkai_cancel','minguangkai_link'], skills:['minguangkai_cancel','minguangkai_link'],
ai:{ ai:{
basic:{ basic:{
@ -708,7 +707,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
target:function(player,target){ target:function(player,target){
var hs=target.getCards('h'); var hs=target.getCards('h');
if(hs.length<=1){ if(hs.length<=1){
if(target==player&&hs[0].name=='yiyi'){ if(target==player&&(hs.length==0||hs[0].name=='yiyi')){
return 0; return 0;
} }
return 0.3; return 0.3;

View File

@ -96,6 +96,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
type:'land', type:'land',
fullborder:'wood', fullborder:'wood',
enable:function(card,player){ enable:function(card,player){
if(!lib.cardPack.mode_derivation||!lib.cardPack.mode_derivation.length) return false;
return !player.hasSkill('land_used'); return !player.hasSkill('land_used');
}, },
notarget:true, notarget:true,
@ -574,7 +575,9 @@ game.import('card',function(lib,game,ui,get,ai,_status){
}, },
mtg_linzhongjianta_skill:{ mtg_linzhongjianta_skill:{
enable:'chooseToUse', enable:'chooseToUse',
filterCard:true, filterCard:function(card){
return get.type(card)=='basic';
},
usable:1, usable:1,
viewAs:{name:'sha'}, viewAs:{name:'sha'},
viewAsFilter:function(player){ viewAsFilter:function(player){

View File

@ -1891,7 +1891,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
}, },
content:function(){ content:function(){
"step 0" "step 0"
event.bagua_skill=true; trigger.bagua_skill=true;
player.judge('bagua',function(card){return (get.color(card)=='red')?1.5:-0.5}); player.judge('bagua',function(card){return (get.color(card)=='red')?1.5:-0.5});
"step 1" "step 1"
if(result.judge>0){ if(result.judge>0){
@ -2196,7 +2196,8 @@ game.import('card',function(lib,game,ui,get,ai,_status){
if(event.wuxieresult){ if(event.wuxieresult){
var next=event.wuxieresult.useResult(event.wuxieresult2); var next=event.wuxieresult.useResult(event.wuxieresult2);
if(event.triggername!='phaseJudge'){ if(event.triggername!='phaseJudge'){
next.respondTo=[trigger.player,trigger.card]; if(event.stateplayer&&event.statecard) next.respondTo=[event.stateplayer,event.statecard];
else next.respondTo=[trigger.player,trigger.card];
} }
} }
'step 9' 'step 9'
@ -2204,7 +2205,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
if(result.wuxied){ if(result.wuxied){
event.nowuxie=result.nowuxie; event.nowuxie=result.nowuxie;
event.directHit=result.directHit; event.directHit=result.directHit;
if(!event.stateplayer&&event.wuxieresult)event.stateplayer=event.wuxieresult; event.stateplayer=event.wuxieresult;
if(event.wuxieresult2&&event.wuxieresult2.used){ if(event.wuxieresult2&&event.wuxieresult2.used){
event.statecard=event.wuxieresult2.used; event.statecard=event.wuxieresult2.used;
} }
@ -2212,8 +2213,9 @@ game.import('card',function(lib,game,ui,get,ai,_status){
event.statecard=true; event.statecard=true;
} }
event.state=!event.state; event.state=!event.state;
event.goto(1);
} }
event.goto(1); else event.settle();
} }
else if(event.list.length){ else if(event.list.length){
event.goto(2); event.goto(2);

View File

@ -628,7 +628,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
jilue:{ jilue:{
unique:true, unique:true,
group:['jilue_guicai','jilue_fangzhu','jilue_wansha','jilue_zhiheng','jilue_jizhi','rezhiheng_draw','jilue_jizhi_clear'] group:['jilue_guicai','jilue_fangzhu','jilue_wansha','jilue_zhiheng','jilue_jizhi','jilue_jizhi_clear']
}, },
jilue_guicai:{ jilue_guicai:{
audio:true, audio:true,
@ -740,7 +740,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return player.hasMark('renjie'); return player.hasMark('renjie');
}, },
position:'he', position:'he',
filterCard:true, filterCard:lib.filter.cardDiscardable,
discard:false,
lose:false,
delay:0,
selectCard:[1,Infinity], selectCard:[1,Infinity],
prompt:'弃置一枚“忍”,然后弃置任意张牌并摸等量的牌。若弃置了所有的手牌,则可以多摸一张牌。', prompt:'弃置一枚“忍”,然后弃置任意张牌并摸等量的牌。若弃置了所有的手牌,则可以多摸一张牌。',
check:function(card){ check:function(card){
@ -755,7 +758,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){
content:function(){ content:function(){
'step 0' 'step 0'
player.removeMark('renjie',1); player.removeMark('renjie',1);
event.num=player.hasSkill('rezhiheng_delay')?1:0; player.discard(cards);
event.num=1;
var hs=player.getCards('h');
if(!hs.length) event.num=0;
for(var i=0;i<hs.length;i++){
if(!cards.contains(hs[i])){
event.num=0;break;
}
}
'step 1' 'step 1'
player.draw(event.num+cards.length); player.draw(event.num+cards.length);
}, },

View File

@ -7,7 +7,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
characterSort:{ characterSort:{
mobile:{ mobile:{
mobile_default:["miheng","taoqian","liuzan","lingcao","sunru","lifeng","zhuling","liuye","zhaotongzhaoguang","majun","simazhao","wangyuanji","pangdegong","shenpei","hujinding"], mobile_default:["miheng","taoqian","liuzan","lingcao","sunru","lifeng","zhuling","liuye","zhaotongzhaoguang","majun","simazhao","wangyuanji","pangdegong","shenpei","hujinding"],
mobile_others:["re_jikang","old_bulianshi","old_yuanshu","re_wangyun","re_baosanniang","re_weiwenzhugezhi","re_zhanggong","re_xugong"], mobile_others:["re_jikang","old_bulianshi","old_yuanshu","re_wangyun","re_baosanniang","re_weiwenzhugezhi","re_zhanggong","re_xugong","old_yuanshao","old_liushan"],
mobile_sunben:["re_sunben"],
}, },
}, },
character:{ character:{
@ -37,6 +38,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
re_zhanggong:['male','wei',3,['reqianxin','xinfu_zhenxing']], re_zhanggong:['male','wei',3,['reqianxin','xinfu_zhenxing']],
re_xugong:['male','wu',3,['rebiaozhao','yechou']], re_xugong:['male','wu',3,['rebiaozhao','yechou']],
re_weiwenzhugezhi:['male','wu',4,['refuhai']], re_weiwenzhugezhi:['male','wu',4,['refuhai']],
old_yuanshao:['male','qun',4,['reluanji','xueyi'],['zhu']],
old_liushan:['male','shu',3,['xiangle','refangquan','ruoyu'],['zhu']],
re_sunben:['male','wu',4,['jiang','rehunzi','zhiba'],['zhu']],
}, },
characterIntro:{ characterIntro:{
shenpei:'审配204年字正南魏郡阴安今河北清丰北人。为人正直 袁绍领冀州,审配被委以腹心之任,并总幕府。河北平定,袁绍以审配、逢纪统军事,审配恃其强盛,力主与曹操决战。曾率领弓弩手大破曹军于官渡。官渡战败,审配二子被俘,反因此受谮见疑,幸得逢纪力保。袁绍病死,审配等矫诏立袁尚为嗣,导致兄弟相争,被曹操各个击破。曹操围邺,审配死守数月,终城破被擒,拒不投降,慷慨受死。', shenpei:'审配204年字正南魏郡阴安今河北清丰北人。为人正直 袁绍领冀州,审配被委以腹心之任,并总幕府。河北平定,袁绍以审配、逢纪统军事,审配恃其强盛,力主与曹操决战。曾率领弓弩手大破曹军于官渡。官渡战败,审配二子被俘,反因此受谮见疑,幸得逢纪力保。袁绍病死,审配等矫诏立袁尚为嗣,导致兄弟相争,被曹操各个击破。曹操围邺,审配死守数月,终城破被擒,拒不投降,慷慨受死。',
@ -114,7 +119,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
var str=get.translation(player)+'正在表演...<br>'; var str=get.translation(player)+'正在表演...<br>';
for(var i=1;i<7;i++){ for(var i=1;i<7;i++){
str+=get.translation('qiaosi_c'+i); str+=get.translation('qiaosi_c'+i);
if(i%3!=0) str+=' '; if(i%3!=0) str+='  ';
if(i==3) str+='<br>'; if(i==3) str+='<br>';
} }
ui.create.dialog(str,'forcebutton').videoId=id; ui.create.dialog(str,'forcebutton').videoId=id;
@ -624,7 +629,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
direct:true, direct:true,
content:function(){ content:function(){
"step 0" "step 0"
var fang=player.hp>=2&&player.countCards('h')<=player.hp+1; var fang=player.countMark('fangquan2')==0&&player.hp>=2&&player.countCards('h')<=player.hp+1;
player.chooseBool(get.prompt2('refangquan')).set('ai',function(){ player.chooseBool(get.prompt2('refangquan')).set('ai',function(){
if(!_status.event.fang) return false; if(!_status.event.fang) return false;
return game.hasPlayer(function(target){ return game.hasPlayer(function(target){
@ -639,7 +644,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if(result.bool){ if(result.bool){
player.logSkill('refangquan'); player.logSkill('refangquan');
trigger.cancel(); trigger.cancel();
player.addSkill('fangquan2'); player.addTempSkill('fangquan2','phaseAfter');
player.addMark('fangquan2',1,false);
player.addTempSkill('refangquan2'); player.addTempSkill('refangquan2');
//player.storage.fangquan=result.targets[0]; //player.storage.fangquan=result.targets[0];
} }
@ -807,7 +813,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if(result.bool){ if(result.bool){
var target=result.targets[0]; var target=result.targets[0];
event.target=target; event.target=target;
player.logSkill('xinfu_wuniang',target); player.logSkill('meiyong',target);
player.gainPlayerCard(target,'he',true); player.gainPlayerCard(target,'he',true);
} }
else event.finish(); else event.finish();
@ -1679,6 +1685,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
}, },
translate:{ translate:{
old_liushan:'手杀刘禅',
old_yuanshao:'手杀袁绍',
re_jikang:"手杀嵇康", re_jikang:"手杀嵇康",
old_bulianshi:'手杀步练师', old_bulianshi:'手杀步练师',
old_caochun:'旧曹纯', old_caochun:'旧曹纯',
@ -1756,7 +1764,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
hujinding:'胡金定', hujinding:'胡金定',
re_liushan:'界刘禅', re_liushan:'界刘禅',
re_sunben:'界孙', re_sunben:'界孙',
re_zhangzhang:'界张昭张纮', re_zhangzhang:'界张昭张纮',
rehunzi:'魂姿', rehunzi:'魂姿',
rehunzi_info:'觉醒技准备阶段若你的体力值不大于2你减1点体力上限并获得技能〖英姿〗和〖英魂〗。', rehunzi_info:'觉醒技准备阶段若你的体力值不大于2你减1点体力上限并获得技能〖英姿〗和〖英魂〗。',
@ -1799,6 +1807,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
//伊吹 风子 //伊吹 风子
qiaosi_c6:'<img src="'+lib.assetURL+'image/card/qiaosi_card6.png" width="60" height="60"> ', qiaosi_c6:'<img src="'+lib.assetURL+'image/card/qiaosi_card6.png" width="60" height="60"> ',
//仲村 ゆり //仲村 ゆり
mobile_sunben:'那个男人',
//孙笨
} }
}; };
}); });

View File

@ -4,7 +4,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
name:'old', name:'old',
characterSort:{ characterSort:{
old:{ old:{
old_shenhua:["yuji","zhangjiao","old_zhugezhan"], old_shenhua:["yuji","zhangjiao","old_zhugezhan","old_guanqiujian"],
old_refresh:["old_zhangfei","old_huatuo"], old_refresh:["old_zhangfei","old_huatuo"],
old_yijiang1:["masu","xushu","fazheng","yujin","xin_yujin","old_xusheng","old_lingtong","ol_yujin"], old_yijiang1:["masu","xushu","fazheng","yujin","xin_yujin","old_xusheng","old_lingtong","ol_yujin"],
old_yijiang2:["old_madai","old_zhonghui","old_wangyi","old_guanzhang","ol_liaohua"], old_yijiang2:["old_madai","old_zhonghui","old_wangyi","old_guanzhang","ol_liaohua"],
@ -12,11 +12,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
old_yijiang4:["old_caozhen","old_chenqun","old_zhuhuan","ol_wuyi"], old_yijiang4:["old_caozhen","old_chenqun","old_zhuhuan","ol_wuyi"],
old_yijiang5:["old_caoxiu","old_quancong","old_zhuzhi"], old_yijiang5:["old_caoxiu","old_quancong","old_zhuzhi"],
old_yijiang67:["ol_xinxianying","ol_zhangrang","ol_liuyu"], old_yijiang67:["ol_xinxianying","ol_zhangrang","ol_liuyu"],
old_sp:["old_lingju","old_maliang","old_machao","zhangliang","jsp_caoren","ol_guansuo","old_zhangxingcai"], old_sp:["old_lingju","old_maliang","old_machao","zhangliang","jsp_caoren","ol_guansuo","old_zhangxingcai","old_huangfusong"],
old_mobile:["old_caochun","old_majun"], old_mobile:["old_caochun","old_majun"],
}, },
}, },
character:{ character:{
old_huangfusong:['male','qun',4,['fenyue']],
old_majun:["male","wei",3,["xinfu_jingxie1","xinfu_qiaosi"],[]], old_majun:["male","wei",3,["xinfu_jingxie1","xinfu_qiaosi"],[]],
old_zhangxingcai:['female','shu',3,['oldshenxian','qiangwu']], old_zhangxingcai:['female','shu',3,['oldshenxian','qiangwu']],
old_fuhuanghou:['female','qun',3,['oldzhuikong','oldqiuyuan']], old_fuhuanghou:['female','qun',3,['oldzhuikong','oldqiuyuan']],
@ -64,6 +65,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
ol_guohuai:['male','wei',4,['jingce']], ol_guohuai:['male','wei',4,['jingce']],
ol_wuyi:['male','shu',4,['benxi']], ol_wuyi:['male','shu',4,['benxi']],
ol_liuyu:['male','qun',2,['zongzuo','zhige']], ol_liuyu:['male','qun',2,['zongzuo','zhige']],
old_guanqiujian:["male","wei",4,["drlt_zhenrong","drlt_hongju"],[]],
}, },
characterFilter:{ characterFilter:{
old_lingju:function(mode){ old_lingju:function(mode){
@ -882,6 +884,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
ol_liuyu:'OL刘虞', ol_liuyu:'OL刘虞',
old_fuhuanghou:'旧伏皇后', old_fuhuanghou:'旧伏皇后',
old_caochong:'旧曹冲', old_caochong:'旧曹冲',
old_guanqiujian:'旧毌丘俭',
old_huangfusong:'旧皇甫嵩',
old_fuhun:'父魂', old_fuhun:'父魂',
old_fuhun_info:'摸牌阶段开始时,你可以放弃摸牌,改为从牌堆顶亮出两张牌并获得之,若亮出的牌颜色不同,你获得技能“武圣”、“咆哮”,直到回合结束。', old_fuhun_info:'摸牌阶段开始时,你可以放弃摸牌,改为从牌堆顶亮出两张牌并获得之,若亮出的牌颜色不同,你获得技能“武圣”、“咆哮”,直到回合结束。',

View File

@ -8,7 +8,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
refresh_feng:['caoren','re_xiahouyuan','re_huangzhong','re_weiyan','re_xiaoqiao','zhoutai','re_zhangjiao','xin_yuji'], refresh_feng:['caoren','re_xiahouyuan','re_huangzhong','re_weiyan','re_xiaoqiao','zhoutai','re_zhangjiao','xin_yuji'],
refresh_huo:["re_sp_zhugeliang","re_xunyu","re_dianwei","re_yanwen","re_pangtong","xin_yuanshao","re_pangde"], refresh_huo:["re_sp_zhugeliang","re_xunyu","re_dianwei","re_yanwen","re_pangtong","xin_yuanshao","re_pangde"],
refresh_lin:['re_zhurong','re_menghuo','re_dongzhuo','re_sunjian','re_caopi','re_xuhuang'], refresh_lin:['re_zhurong','re_menghuo','re_dongzhuo','re_sunjian','re_caopi','re_xuhuang'],
refresh_shan:['re_dengai','re_jiangwei','re_caiwenji','re_sunben','re_liushan','re_zhangzhang','re_zuoci'], refresh_shan:['re_dengai','re_jiangwei','re_caiwenji','re_liushan','re_zhangzhang','re_zuoci','re_sunce'],
}, },
}, },
connect:true, connect:true,
@ -60,7 +60,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
re_dianwei:["male","wei",4,["reqiangxi"],[]], re_dianwei:["male","wei",4,["reqiangxi"],[]],
re_yanwen:["male","qun",4,["reshuangxiong"],[]], re_yanwen:["male","qun",4,["reshuangxiong"],[]],
re_pangtong:['male','shu',3,['xinlianhuan','niepan'],[]], re_pangtong:['male','shu',3,['xinlianhuan','niepan'],[]],
xin_yuanshao:['male','qun',4,['reluanji','xueyi'],['zhu']], xin_yuanshao:['male','qun',4,['olluanji','olxueyi'],['zhu']],
re_zhurong:['female','shu',4,['juxiang','relieren']], re_zhurong:['female','shu',4,['juxiang','relieren']],
re_menghuo:['male','shu',4,['huoshou','rezaiqi']], re_menghuo:['male','shu',4,['huoshou','rezaiqi']],
re_dongzhuo:['male','qun',8,['rejiuchi','roulin','benghuai','baonue'],['zhu']], re_dongzhuo:['male','qun',8,['rejiuchi','roulin','benghuai','baonue'],['zhu']],
@ -69,9 +69,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
re_dengai:['male','wei',4,['retuntian','zaoxian']], re_dengai:['male','wei',4,['retuntian','zaoxian']],
re_jiangwei:['male','shu',4,['retiaoxin','zhiji']], re_jiangwei:['male','shu',4,['retiaoxin','zhiji']],
re_caiwenji:['female','qun',3,['rebeige','duanchang']], re_caiwenji:['female','qun',3,['rebeige','duanchang']],
re_liushan:['male','shu',3,['xiangle','refangquan','ruoyu'],['zhu']], re_liushan:['male','shu',3,['xiangle','olfangquan','olruoyu'],['zhu']],
re_sunben:['male','wu',4,['jiang','rehunzi','zhiba'],['zhu']],
re_zhangzhang:['male','wu',3,['rezhijian','guzheng']], re_zhangzhang:['male','wu',3,['rezhijian','guzheng']],
re_sunce:['male','wu',4,['jiang','olhunzi','olzhiba'],['zhu']],
}, },
characterIntro:{ characterIntro:{
re_gongsunzan:'群雄之一。出身贵族,因母地位卑贱,只当了郡中小吏。他貌美,声音洪亮,机智善辩。后随卢植于缑氏山中读书,粗通经传。', re_gongsunzan:'群雄之一。出身贵族,因母地位卑贱,只当了郡中小吏。他貌美,声音洪亮,机智善辩。后随卢植于缑氏山中读书,粗通经传。',
@ -87,6 +88,370 @@ game.import('character',function(lib,game,ui,get,ai,_status){
sunben:['zhouyu','taishici','daqiao'], sunben:['zhouyu','taishici','daqiao'],
}, },
skill:{ skill:{
sishu:{
trigger:{player:'phaseUseBegin'},
direct:true,
content:function(){
'step 0'
player.chooseTarget(get.prompt2('sishu')).ai=function(target){
var att=get.attitude(_status.event.player,target);
if(target.countMark('sishu2')%2==1) return -att;
return att;
}
'step 1'
if(result.bool){
var target=result.targets[0];
player.logSkill('sishu',target)
target.addSkill('sishu2');
target.addMark('sishu2',1,false);
}
},
},
sishu2:{
charlotte:true,
marktext:'思',
intro:{
name:'思蜀',
content:'本局游戏内计算【乐不思蜀】的效果时反转#次',
},
mod:{
judge:function(player,result){
if(_status.event.card&&_status.event.card.name=='lebu'&&player.countMark('sishu2')%2==1){
if(result.bool==false){
result.bool=true;
}
else{
result.bool=false;
}
}
}
},
},
olruoyu:{
skillAnimation:true,
animationColor:'fire',
audio:2,
unique:true,
juexingji:true,
zhuSkill:true,
keepSkill:true,
derivation:['jijiang','sishu'],
trigger:{player:'phaseZhunbeiBegin'},
forced:true,
filter:function(event,player){
if(!player.hasZhuSkill('olruoyu')) return false;
if(player.storage.olruoyu) return false;
return player.isMinHp();
},
content:function(){
'step 0'
player.storage.olruoyu=true;
player.gainMaxHp();
'step 1'
player.recover();
game.log(player,'获得了技能','#g【思蜀】','和','#g【激将】');
player.addSkill('sishu');
if(player.hasSkill('olruoyu')){
player.addSkill('jijiang');
}
else{
player.addAdditionalSkill('olruoyu','jijiang');
}
if(!player.isZhu){
player.storage.zhuSkill_olruoyu=['jijiang'];
}
else{
event.trigger('zhuUpdate');
}
player.awakenSkill('olruoyu');
}
},
olfangquan:{
audio:'refangquan',
trigger:{player:'phaseUseBefore'},
filter:function(event,player){
return player.countCards('h')>0&&!player.hasSkill('olfangquan3');
},
direct:true,
content:function(){
"step 0"
var fang=player.countMark('olfangquan2')==0&&player.hp>=2&&player.countCards('h')<=player.hp+1;
player.chooseBool(get.prompt2('olfangquan')).set('ai',function(){
if(!_status.event.fang) return false;
return game.hasPlayer(function(target){
if(target.hasJudge('lebu')||target==player) return false;
if(get.attitude(player,target)>4){
return (get.threaten(target)/Math.sqrt(target.hp+1)/Math.sqrt(target.countCards('h')+1)>0);
}
return false;
});
}).set('fang',fang);
"step 1"
if(result.bool){
player.logSkill('olfangquan');
trigger.cancel();
player.addSkill('olfangquan2');
player.addMark('olfangquan2',1,false);
}
}
},
olfangquan2:{
trigger:{player:'phaseDiscardBegin'},
forced:true,
popup:false,
audio:false,
onremove:true,
content:function(){
"step 0"
event.count=player.countMark(event.name);
"step 1"
event.count--;
player.chooseToDiscard('是否弃置一张牌并令一名其他角色进行一个额外回合?').set('logSkill','olfangquan').ai=function(card){
return 20-get.value(card);
};
"step 2"
if(result.bool){
player.chooseTarget(true,'请选择进行额外回合的目标角色',lib.filter.notMe).ai=function(target){
if(target.hasJudge('lebu')) return -1;
if(get.attitude(player,target)>4){
return get.threaten(target)/Math.sqrt(target.hp+1)/Math.sqrt(target.countCards('h')+1);
}
return -1;
};
}
else event.finish();
"step 3"
var target=result.targets[0];
player.line(target,'fire');
target.markSkillCharacter('olfangquan',player,'放权','进行一个额外回合');
target.insertPhase();
target.addSkill('olfangquan3');
if(event.count>0) event.goto(1);
}
},
olfangquan3:{
trigger:{player:['phaseAfter','phaseCancelled']},
forced:true,
popup:false,
audio:false,
content:function(){
player.unmarkSkill('olfangquan');
player.removeSkill('olfangquan3');
}
},
olluanji:{
inherit:'luanji',
audio:'luanji',
line:false,
group:'olluanji_remove',
check:function(card){
return 7-get.value(card);
},
},
olluanji_remove:{
trigger:{player:'useCard2'},
direct:true,
filter:function(event,player){
return event.card.name=='wanjian'&&event.targets.length>0;
},
line:false,
content:function(){
'step 0'
player.chooseTarget(get.prompt('olluanji'),'为'+get.translation(trigger.card)+'减少一个目标',function(card,player,target){
return _status.event.targets.contains(target)
}).set('targets',trigger.targets).set('ai',function(target){
var player=_status.event.player;
return -get.effect(target,_status.event.getTrigger().card,player,player)
});
'step 1'
if(result.bool){
player.logSkill('olluanji',result.targets);
trigger.targets.remove(result.targets[0]);
}
},
},
olxueyi:{
audio:'xueyi',
trigger:{global:'phaseBefore'},
forced:true,
zhuSkill:true,
unique:true,
filter:function(event,player){
return !player.storage.olxueyi_inited&&player.hasZhuSkill('olxueyi');
},
content:function(){
player.storage.olxueyi_inited=true;
var num=game.countPlayer(function(current){
return current.group=='qun';
})
if(num) player.addMark('olxueyi',num)
},
marktext:'裔',
intro:{
name2:'裔',
content:'mark',
},
mod:{
maxHandcard:function(player,num){
if(player.hasZhuSkill('olxueyi')) return num+2*player.countMark('olxueyi');
},
},
group:'olxueyi_draw',
},
olxueyi_draw:{
audio:'xueyi',
trigger:{player:'phaseBegin'},
prompt2:'弃置一枚「裔」标记,然后摸一张牌',
check:function(event,player){
return !player.hasJudge('lebu')&&player.getUseValue('wanjian')>0;
},
filter:function(event,player){
return player.hasZhuSkill('olxueyi')&&player.hasMark('olxueyi');
},
content:function(){
player.removeMark('olxueyi',1);
player.draw();
},
},
olhunzi:{
audio:'hunzi',
inherit:'hunzi',
content:function(){
player.loseMaxHp();
player.recover();
player.addSkill('reyingzi');
player.addSkill('gzyinghun');
game.log(player,'获得了技能','#g【英姿】','和','#g【英魂】');
player.awakenSkill(event.name);
player.storage[event.name]=true;
}
},
olzhiba:{
audio:'zhiba',
unique:true,
zhuSkill:true,
global:'olzhiba2',
},
olzhiba2:{
ai:{
order:1,
result:{
target:function(player,target){
if(player.hasZhuSkill('olzhiba')&&!player.hasSkill('olzhiba3')&&target.group=='wu'){
if(player.countCards('h',function(card){
var val=get.value(card);
if(val<0) return true;
if(val<=5){
return card.number>=12;
}
if(val<=6){
return card.number>=13;
}
return false;
})>0) return -1;
return 0;
}
else{
if(player.countCards('h','du')&&get.attitude(player,target)<0) return -1;
if(player.countCards('h')<=player.hp) return 0;
var maxnum=0;
var cards2=target.getCards('h');
for(var i=0;i<cards2.length;i++){
if(cards2[i].number>maxnum){
maxnum=cards2[i].number;
}
}
if(maxnum>10) maxnum=10;
if(maxnum<5&&cards2.length>1) maxnum=5;
var cards=player.getCards('h');
for(var i=0;i<cards.length;i++){
if(cards[i].number<maxnum) return 1;
}
return 0;
}
},
},
},
enable:'phaseUse',
usable:1,
prompt:'请选择〖制霸〗的目标',
filter:function(event,player){
if(player.hasZhuSkill('olzhiba')&&!player.hasSkill('olzhiba3')&&game.hasPlayer(function(current){
return current!=player&&current.group=='wu'&&player.canCompare(current);
})) return true;
return (player.group=='wu'&&game.hasPlayer(function(current){
return current!=player&&current.hasZhuSkill('olzhiba',player)&&!current.hasSkill('olzhiba3')&&player.canCompare(current);
}));
},
filterTarget:function(card,player,target){
if(player.hasZhuSkill('olzhiba')&&!player.hasSkill('olzhiba3')&&target.group=='wu'&&player.canCompare(target)) return true;
return player.group=='wu'&&target.hasZhuSkill('olzhiba',player)&&!target.hasSkill('olzhiba3')&&player.canCompare(target);
},
prepare:function(cards,player,targets){
if(player.hasZhuSkill('olzhiba')) player.logSkill('olzhiba')
if(targets[0].hasZhuSkill('olzhiba',player)) targets[0].logSkill('olzhiba');
},
direct:true,
contentBefore:function(){
'step 0'
var list=[];
if(player.hasZhuSkill('olzhiba')&&targets[0].group=='wu'&&!player.hasSkill('olzhiba3')) list.push(player);
if(player.group=='wu'&&targets[0].hasZhuSkill('olzhiba')&&!targets[0].hasSkill('olzhiba3')) list.push(targets[0]);
if(list.length==1){
event.target=list[0];
event.goto(2);
}
else player.chooseTarget(true,'请选择获得所有拼点牌的角色',function(card,player,target){
return _status.event.list.contains(target);
}).set('list',list);
'step 1'
event.target=result.targets[0];
'step 2'
target.addTempSkill('olzhiba3','phaseUseEnd')
if(target==targets[0]){
target.chooseBool('是否接受来自'+get.translation(player)+'的拼点请求?').set('choice',(get.attitude(target,player)>0||target.countCards('h',function(card){
var val=get.value(card);
if(val<0) return true;
if(val<=5){
return card.number>=12;
}
if(val<=6){
return card.number>=13;
}
return false;
})>0)).set('ai',function(){return _status.event.choice});
}
else event._result={bool:true};
'step 3'
if(result.bool) event.getParent().zhiba_target=target;
else{
game.log(target,'拒绝了',player,'的拼点请求');
target.chat('拒绝');
}
},
content:function(){
'step 0'
event.source=event.getParent().zhiba_target;
if(!event.source){
event.finish();
}
'step 1'
player.chooseToCompare(target).set('small',target==source&&get.attitude(player,target)>0);
'step 2'
if(player==source&&result.bool||target==source&&!result.bool){
event.cards=[result.player,result.target].filterInD('d');
if(!event.cards.length) event.finish();
else source.chooseControl('ok','cancel2').set('dialog',['是否获得拼点牌?',event.cards]).set('ai',function(){
if(get.value(event.cards,source,'raw')<=0) return false;
return true;
});
}
else event.finish();
'step 3'
if(result.control!='cancel2') source.gain(event.cards,'gain2','log');
},
},
olzhiba3:{},
rehuashen:{ rehuashen:{
//mode:['identity','single','doudizhu'], //mode:['identity','single','doudizhu'],
audio:2, audio:2,
@ -235,7 +600,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player:['phaseBegin','phaseEnd','rehuashen'], player:['phaseBegin','phaseEnd','rehuashen'],
}, },
filter:function(event,player,name){ filter:function(event,player,name){
if(name=='phaseBegin'&&game.phaseNumber==1) return false; //if(name=='phaseBegin'&&game.phaseNumber==1) return false;
return player.storage.rehuashen&&player.storage.rehuashen.character.length>0; return player.storage.rehuashen&&player.storage.rehuashen.character.length>0;
}, },
addHuashen:function(player){ addHuashen:function(player){
@ -250,7 +615,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
list.remove(current.name); list.remove(current.name);
list.remove(current.name1); list.remove(current.name1);
list.remove(current.name2); list.remove(current.name2);
if(current.storage.rehuashen&&current.storage.rehuashen.character) list.removeArray(current.rehuashen.character) if(current.storage.rehuashen&&current.storage.rehuashen.character) list.removeArray(current.storage.rehuashen.character)
}); });
_status.characterlist=list; _status.characterlist=list;
} }
@ -2312,7 +2677,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
enable:'phaseUse', enable:'phaseUse',
usable:1, usable:1,
position:'he', position:'he',
filterCard:true, filterCard:lib.filter.cardDiscardable,
discard:false,
lose:false,
delay:0,
selectCard:[1,Infinity], selectCard:[1,Infinity],
check:function(card){ check:function(card){
var player=_status.event.player; var player=_status.event.player;
@ -2325,11 +2693,19 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
content:function(){ content:function(){
'step 0' 'step 0'
event.num=player.hasSkill('rezhiheng_delay')?1:0; player.discard(cards);
event.num=1;
var hs=player.getCards('h');
if(!hs.length) event.num=0;
for(var i=0;i<hs.length;i++){
if(!cards.contains(hs[i])){
event.num=0;break;
}
}
'step 1' 'step 1'
player.draw(event.num+cards.length); player.draw(event.num+cards.length);
}, },
group:'rezhiheng_draw', //group:'rezhiheng_draw',
subSkill:{ subSkill:{
draw:{ draw:{
trigger:{player:'loseEnd'}, trigger:{player:'loseEnd'},
@ -3981,7 +4357,25 @@ game.import('character',function(lib,game,ui,get,ai,_status){
re_pangtong:"界庞统", re_pangtong:"界庞统",
xin_yuanshao:"界袁绍", xin_yuanshao:"界袁绍",
re_zhangjiao:'界张角', re_zhangjiao:'界张角',
re_sunce:'界孙策',
olfangquan:'放权',
olfangquan_info:'出牌阶段开始前,你可以跳过此阶段。若如此做,弃牌阶段开始时,你可以弃置一张手牌,令一名其他角色进行一个额外回合。',
olruoyu:'若愚',
olruoyu_info:'主公技觉醒技准备阶段若你的体力值为全场最少则你加1点体力上限并回复1点体力然后获得技能〖思蜀〗和〖激将〗。',
sishu:'思蜀',
sishu_info:'出牌阶段开始时,你可以选择一名角色。该角色本回合内【乐不思蜀】的判定效果反转。',
olluanji:'乱击',
olluanji_info:'你可以将两张花色相同的手牌当做【万箭齐发】使用。当你使用【万箭齐发】选择目标后,你可以为此牌减少一个目标。',
olluanji_remove:'乱击',
olxueyi:'血裔',
olxueyi_info:'锁定技游戏开始时你获得X个“裔”标记。回合开始时你可以移去一个“裔”标记然后摸一张牌。你每有一个“裔”标记手牌上限便+2。X为场上群势力角色的数目',
olxueyi_draw:'血裔',
olhunzi:'魂姿',
olhunzi_info:'觉醒技准备阶段若你的体力上限为1你减1点体力上限并回复1点体力然后获得技能〖英姿〗和〖英魂〗。',
olzhiba:'制霸',
olzhiba_info:'主公技,其他吴势力的角色的出牌阶段限一次,其可以与你拼点(你可拒绝此拼点)。若其没赢,你可以获得两张拼点牌。你的出牌阶段限一次,你可以和一名吴势力角色拼点,若你赢,你获得两张拼点牌。',
olzhiba2:'制霸',
xinleiji:'雷击', xinleiji:'雷击',
xinguidao:'鬼道', xinguidao:'鬼道',
xinleiji_info:'①当你使用或打出【闪】或【闪电】时,你可以进行判定。<br>②当你不因〖暴虐〗或〖助祭〗而进行的判定的判定牌生效后若结果为黑桃你可对一名其他角色造成2点雷电伤害梅花你回复1点体力并可对一名其他其他角色造成1点雷电伤害。', xinleiji_info:'①当你使用或打出【闪】或【闪电】时,你可以进行判定。<br>②当你不因〖暴虐〗或〖助祭〗而进行的判定的判定牌生效后若结果为黑桃你可对一名其他角色造成2点雷电伤害梅花你回复1点体力并可对一名其他其他角色造成1点雷电伤害。',

View File

@ -62,7 +62,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
"yl_luzhi":["male","qun",3,["nzry_mingren","nzry_zhenliang"],["die_audio"]], "yl_luzhi":["male","qun",3,["nzry_mingren","nzry_zhenliang"],["die_audio"]],
"kuailiangkuaiyue":["male","wei",3,["nzry_jianxiang","nzry_shenshi"],[]], "kuailiangkuaiyue":["male","wei",3,["nzry_jianxiang","nzry_shenshi"],[]],
"guanqiujian":["male","wei",4,["drlt_zhenrong","drlt_hongju"],[]], guanqiujian:['male','wei',4,['zhengrong','hongju']],
"haozhao":["male","wei",4,["drlt_zhenggu"],[]], "haozhao":["male","wei",4,["drlt_zhenggu"],[]],
"zhugezhan":["male","shu",3,["xinfu_zuilun","xinfu_fuyin"],[]], "zhugezhan":["male","shu",3,["xinfu_zuilun","xinfu_fuyin"],[]],
"lukang":["male","wu",4,["drlt_qianjie","drlt_jueyan","drlt_poshi"],[]], "lukang":["male","wu",4,["drlt_qianjie","drlt_jueyan","drlt_poshi"],[]],
@ -140,6 +140,183 @@ game.import('character',function(lib,game,ui,get,ai,_status){
"chendao":"陈到,字叔至,生卒年不详,豫州汝南(今河南驻马店平舆县)人。三国时期蜀汉将领,刘备帐下白毦兵统领,名位常亚于赵云,以忠勇著称。蜀汉建兴年间,任征西将军、永安都督,封亭侯。在任期间去世。", "chendao":"陈到,字叔至,生卒年不详,豫州汝南(今河南驻马店平舆县)人。三国时期蜀汉将领,刘备帐下白毦兵统领,名位常亚于赵云,以忠勇著称。蜀汉建兴年间,任征西将军、永安都督,封亭侯。在任期间去世。",
}, },
skill:{ skill:{
//新毌丘俭
zhengrong:{
trigger:{player:'useCardToPlayered'},
direct:true,
audio:'drlt_zhenrong',
filter:function(event,player){
if(!event.isFirstTarget) return false;
if(!['basic','trick'].contains(get.type(event.card))) return false;
if(get.tag(event.card,'damage')) return game.hasPlayer(function(current){
return event.targets.contains(current)&&current.countCards('h')>=player.countCards('h')&&current.countCards('he')>0;
});
return false;
},
content:function(){
'step 0'
player.chooseTarget(get.prompt('zhengrong'),'将一名手牌数不小于你的目标角色的一张牌置于你的武将牌上,成为「荣」',function(card,player,target){
return _status.event.targets.contains(target)&&target.countCards('h')>=player.countCards('h')&&target.countCards('he')>0;
}).set('ai',function(target){
return (1-get.attitude(_status.event.player,target))/target.countCards('he');
}).set('targets',trigger.targets);
'step 1'
if(result.bool){
var target=result.targets[0];
event.target=result.targets[0];
player.logSkill('zhengrong',target);
player.choosePlayerCard(target,'he').ai=get.buttonValue;
}
else event.finish();
'step 2'
if(result.bool){
var card=result.links[0];
game.log(player,'选择了',card);
target.$give(card,player,false);
target.lose(card,ui.special,'toStorage');
if(!player.storage.zhengrong) player.storage.zhengrong=[];
player.storage.zhengrong.push(card);
player.markSkill('zhengrong');
}
},
marktext:'荣',
intro:{
content:'cards',
onunmark:'throw',
},
},
hongju:{
trigger:{player:'phaseZhunbeiBegin'},
audio:'drlt_hongju',
forced:true,
unique:true,
juexingji:true,
skillAnimation:true,
animationColor:'thunder',
derivation:'qingce',
filter:function(event,player){
return player.storage.zhengrong&&player.storage.zhengrong.length>=3;
},
content:function(){
'step 0'
player.awakenSkill('hongju');
if(player.countCards('h')==0) event.goto(2);
else{
var dialog=['请选择要交换的手牌和「荣」,或点「取消」','<div class="text center">「征荣」牌</div>',player.storage.zhengrong,'<div class="text center">手牌区</div>',player.getCards('h')];
var next=player.chooseButton(dialog);
next.set('filterButton',function(button){
var ss=_status.event.player.storage.zhengrong;
var hs=_status.event.player.getCards('h');
var sn=0;
var hn=0;
var ub=ui.selected.buttons;
for(var i=0;i<ub.length;i++){
if(ss.contains(ub[i].link)) sn++;
else hn++;
}
return !(sn>=hs.length&&ss.contains(button.link)||hn>=ss.length&&hs.contains(button.link));
});
next.set('selectButton',function(){
if(ui.selected.buttons.length==0) return 2;
var ss=_status.event.player.storage.zhengrong;
var hs=_status.event.player.getCards('h');
var sn=0;
var hn=0;
var ub=ui.selected.buttons;
for(var i=0;i<ub.length;i++){
if(ss.contains(ub[i].link)) sn++;
else hn++;
}
if(sn!=hn) return 2*Math.max(sn,hn);
else{
if(sn==ss.length||hn==hs.length||sn==hs.length||hn==ss.length) return ub.length;
return [ub.length,ub.length+1];
}
});
next.set('ai',function(){return -1});
}
'step 1'
if(result.bool){
var gains=[];
var pushs=[];
for(var i=0;i<result.links.length;i++){
var card=result.links[i];
if(player.storage.zhengrong.contains(card)) gains.push(card);
else pushs.push(card);
}
player.lose(pushs,ui.special,'toStorage');
game.log(player,'将',pushs,'放在了武将牌上');
player.gain(gains,'gain2','log','fromStorage');
player.storage.zhengrong.addArray(pushs);
player.storage.zhengrong.removeArray(gains);
player.markSkill('zhengrong');
}
'step 2'
player.addSkill('qingce');
game.log(player,'获得了技能','#g【清侧】');
player.loseMaxHp();
},
},
qingce:{
enable:'phaseUse',
audio:'drlt_qingce',
filter:function(event,player){
return player.storage.zhengrong&&player.storage.zhengrong.length>0;
},
chooseButton:{
dialog:function(event,player){
return ui.create.dialog('请选择要获得的「荣」',player.storage.zhengrong,'hidden');
},
backup:function(links,player){
return {
card:links[0],
delay:0,
audio:'drlt_zhengrong',
content:lib.skill.qingce.contentx,
}
}
},
contentx:function(){
'step 0'
var card=lib.skill.qingce_backup.card;
player.gain(card,'gain2','log','fromStorage');
player.storage.zhengrong.remove(card);
player[player.storage.zhengrong.length>0?'markSkill':'unmarkSkill']('zhengrong');
'step 1'
if(player.countCards('h')>0) player.chooseToDiscard('h',true);
else event.finish();
'step 2'
var targets=game.filterPlayer(function(current){
return result&&result.bool&&current.countCards('ej')>0;
})
if(!targets.length){event.finish();return}
player.chooseTarget(true,'请选择一名目标角色,弃置其装备区或判定区内的一张牌',function(card,player,target){
return _status.event.targets.contains(target);
}).set('targets',targets).set('ai',function(target){
var att=get.attitude(_status.event.player,target);
if(target.countCards('j')>0&&att>0) return 2*att;
return target.countCards('e')>0?-att:0;
});
'step 3'
if(result.bool){
player.line(result.targets[0],'thunder');
player.discardPlayerCard('ej',true,result.targets[0]);
}
},
ai:{
order:8,
result:{
player:function(player){
if(game.hasPlayer(function(current){
var att=get.attitude(player,current);
if((att>0&&current.countCards('j')>0)||(att<0&&current.countCards('e')>0)) return true;
return false;
})) return 1;
return 0;
},
},
},
},
//阴雷 //阴雷
"drlt_zhenrong":{ "drlt_zhenrong":{
init:function (player,skill){ init:function (player,skill){
@ -246,7 +423,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return player.storage.drlt_zhenrong&&player.storage.drlt_zhenrong.length>0; return player.storage.drlt_zhenrong&&player.storage.drlt_zhenrong.length>0;
}, },
filterTarget:function(card,player,target){ filterTarget:function(card,player,target){
return target.countCards('hej')>0; return target.countDiscardableCards(player,'ej')>0;
}, },
content:function(){ content:function(){
'step 0' 'step 0'
@ -261,7 +438,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}; };
player.syncStorage('drlt_zhenrong'); player.syncStorage('drlt_zhenrong');
player.$throw(cards); player.$throw(cards);
player.discardPlayerCard(target,'hej',1); player.discardPlayerCard(target,'ej',1,true);
}; };
}, },
ai:{ ai:{
@ -842,7 +1019,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){
"drlt_wanglie":{ "drlt_wanglie":{
mod:{ mod:{
targetInRange:function (card,player,target,now){ targetInRange:function (card,player,target,now){
if(!player.countUsed()) return true; if(game.online){
if(!player.countUsed()) return true;
}
else{
var evt=_status.event.getParent('phaseUse');
if(evt&&evt.name=='phaseUse'&&player.getHistory('useCard',function(evt2){
return evt2.getParent('phaseUse')==evt
}).length==0) return true;
}
}, },
}, },
audio:2, audio:2,
@ -850,7 +1035,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player:"useCard", player:"useCard",
}, },
filter:function (event,player){ filter:function (event,player){
return _status.currentPhase==player; return player.isPhaseUsing()&&(event.card.name=='sha'||get.type(event.card)=='trick');
}, },
check:function(trigger,player){ check:function(trigger,player){
if(player.countCards('h')<=player.hp+1&&((get.type(trigger.card)=='trick'&&game.countPlayer(function(current){return get.attitude(current,player)<=0&&current.countCards('h',{name:'wuxie'})})>0)||trigger.card.name=='sha')) return true; if(player.countCards('h')<=player.hp+1&&((get.type(trigger.card)=='trick'&&game.countPlayer(function(current){return get.attitude(current,player)<=0&&current.countCards('h',{name:'wuxie'})})>0)||trigger.card.name=='sha')) return true;
@ -1374,9 +1559,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
forced:true, forced:true,
filter:function (event,player){ filter:function (event,player){
return player.getHistory('useCard',function(evt){ return (player.getHistory('useCard',function(evt){
return evt.getParent('phaseUse')==event; return evt.getParent('phaseUse')==event;
})<game.countPlayer(function(current){return get.distance(current,player,'attack')>1})&&game.hasPlayer(function(target){ }).length<game.countPlayer(function(current){return get.distance(current,player,'attack')>1}))&&game.hasPlayer(function(target){
return get.distance(target,player,'attack')>1&&target.countDiscardableCards(player,'he'); return get.distance(target,player,'attack')>1&&target.countDiscardableCards(player,'he');
}); });
}, },
@ -1524,11 +1709,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){
ai:{ ai:{
reverseOrder:true, reverseOrder:true,
skillTagFilter:function(player){ skillTagFilter:function(player){
if(player.getHistory('useCard').length) return false; if(player.getHistory('useCard',function(evt){
return get.type(evt.card)=='equip';
}).length>0) return false;
}, },
effect:{ effect:{
target:function(card,player,target){ target:function(card,player,target){
if(get.type(card)=='equip'&&(!player.getHistory('useCard').length)&&get.equipResult(player,target,card.name)<=0) return [1,3]; if(get.type(card)=='equip'&&!player.getHistory('useCard',function(evt){
return get.type(evt.card)=='equip'
}).length==0) return [1,3];
}, },
}, },
threaten:2.4, threaten:2.4,
@ -1556,26 +1745,38 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
check:function (event,player){ check:function (event,player){
if(get.type(event.card)=='equip'){ if(get.type(event.card)=='equip'){
return get.equipResult(player,player,event.card.name)<=0; if(get.subtype(event.card)=='equip6') return true;
if(get.equipResult(player,event.target,event.card.name)<=0) return true;
var eff1=player.getUseValue(event.card);
var subtype=get.subtype(event.card);
return player.countCards('h',function(card){
return get.subtype(card)==subtype&&player.getUseValue(card)>=eff1;
})>0;
} }
return true; return true;
}, },
content:function(){ content:function(){
"step 0" "step 0"
//player.storage.nzry_shicai.push(get.type(trigger.card,'trick')); event.cards=trigger.cards.filterInD();
for(var i=0;i<trigger.cards.length;i++){ if(event.cards.length>1){
if(get.position(trigger.cards[i],true)=='o'){ player.chooseButton(true,event.cards.length,['按顺序将卡牌置于牌堆顶(先选择的在上)',event.cards]).set('ai',function(button){
trigger.cards[i].fix(); var value=get.value(button.link);
ui.cardPile.insertBefore(trigger.cards[i],ui.cardPile.firstChild); if(_status.event.reverse) return value;
game.log(player,'将',trigger.cards[i],'置于牌堆顶'); return -value;
}).set('reverse',((_status.currentPhase&&_status.currentPhase.next)?get.attitude(player,_status.currentPhase.next)>0:false))
}
"step 1"
if(result.bool&&result.links&&result.links.length) cards=result.links.slice(0);
while(cards.length){
var card=cards.pop();
if(get.position(card,true)=='o'){
card.fix();
ui.cardPile.insertBefore(card,ui.cardPile.firstChild);
game.log(player,'将',card,'置于牌堆顶');
} }
}; }
game.updateRoundNumber(); game.updateRoundNumber();
player.draw(); player.draw();
"step 1"
if(event.triggername=='useCardToTargeted'){
trigger.getParent().excluded.push(player);
}
}, },
}, },
"nzry_cunmu":{ "nzry_cunmu":{
@ -1697,13 +1898,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
content:function(){ content:function(){
'step 0' 'step 0'
player.chooseCard('请选择发动【贞良】的牌',Math.max(Math.abs(target.hp-player.hp),1),'he',{color:get.color(player.storage.nzry_mingren[0])},true).set('ai',function(card){ player.chooseToDiscard('请选择发动【贞良】的牌',Math.max(Math.abs(target.hp-player.hp),1),'he',{color:get.color(player.storage.nzry_mingren[0])},true).set('ai',function(card){
return 6-get.value(card); return 6-get.value(card);
}); });
'step 1' 'step 1'
if(result.bool){ if(result.bool){
player.storage.nzry_zhenliang=true; player.storage.nzry_zhenliang=true;
player.discard(result.cards);
target.damage('nocard'); target.damage('nocard');
}; };
}, },
@ -1889,7 +2089,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
xinjushou:{ xinjushou:{
audio:'jushou', audio:2,
trigger:{player:'phaseJieshuBegin'}, trigger:{player:'phaseJieshuBegin'},
content:function(){ content:function(){
'step 0' 'step 0'
@ -1921,7 +2121,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
}, },
xinjiewei:{ xinjiewei:{
audio:'yanzheng', audio:2,
enable:'chooseToUse', enable:'chooseToUse',
filterCard:true, filterCard:true,
position:'e', position:'e',
@ -2477,7 +2677,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
tiaoxin:{ tiaoxin:{
audio:2, audio:2,
audioname:['sp_jiangwei','xiahouba','re_jiangwei'], audioname:['sp_jiangwei','xiahouba','re_jiangwei','gz_jiangwei'],
enable:'phaseUse', enable:'phaseUse',
usable:1, usable:1,
filterTarget:function(card,player,target){ filterTarget:function(card,player,target){
@ -2595,7 +2795,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
direct:true, direct:true,
content:function(){ content:function(){
"step 0" "step 0"
var fang=player.hp>=2&&player.countCards('h')<=player.hp+1; var fang=player.countMark('fangquan2')==0&&player.hp>=2&&player.countCards('h')<=player.hp+1;
player.chooseBool(get.prompt2('fangquan')).set('ai',function(){ player.chooseBool(get.prompt2('fangquan')).set('ai',function(){
if(!_status.event.fang) return false; if(!_status.event.fang) return false;
return game.hasPlayer(function(target){ return game.hasPlayer(function(target){
@ -2611,6 +2811,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player.logSkill('fangquan'); player.logSkill('fangquan');
trigger.cancel(); trigger.cancel();
player.addSkill('fangquan2'); player.addSkill('fangquan2');
player.addMark('fangquan2',1,false);
//player.storage.fangquan=result.targets[0]; //player.storage.fangquan=result.targets[0];
} }
} }
@ -2621,12 +2822,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){
popup:false, popup:false,
audio:false, audio:false,
//priority:-50, //priority:-50,
onremove:true,
content:function(){ content:function(){
"step 0" "step 0"
event.count=player.countMark(event.name);
"step 1"
event.count--;
player.chooseToDiscard('是否弃置一张牌并令一名其他角色进行一个额外回合?').set('logSkill',player.name=='re_liushan'?'refangquan':'fangquan').ai=function(card){ player.chooseToDiscard('是否弃置一张牌并令一名其他角色进行一个额外回合?').set('logSkill',player.name=='re_liushan'?'refangquan':'fangquan').ai=function(card){
return 20-get.value(card); return 20-get.value(card);
}; };
"step 1" "step 2"
if(result.bool){ if(result.bool){
player.chooseTarget(true,'请选择进行额外回合的目标角色',lib.filter.notMe).ai=function(target){ player.chooseTarget(true,'请选择进行额外回合的目标角色',lib.filter.notMe).ai=function(target){
if(target.hasJudge('lebu')) return -1; if(target.hasJudge('lebu')) return -1;
@ -2637,14 +2842,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}; };
} }
else event.finish(); else event.finish();
"step 2" "step 3"
var target=result.targets[0]; var target=result.targets[0];
player.line(target,'fire'); player.line(target,'fire');
target.markSkillCharacter('fangquan',player,'放权','进行一个额外回合'); target.markSkillCharacter('fangquan',player,'放权','进行一个额外回合');
target.insertPhase(); target.insertPhase();
target.addSkill('fangquan3'); target.addSkill('fangquan3');
player.removeSkill('fangquan2'); if(event.count>0) event.goto(1);
//delete player.storage.fangquan;
} }
}, },
fangquan3:{ fangquan3:{
@ -3008,7 +3212,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
jixi:{ jixi:{
audio:2, audio:2,
audioname:['re_dengai'], audioname:['re_dengai','gz_dengai'],
enable:'phaseUse', enable:'phaseUse',
filter:function(event,player){ filter:function(event,player){
return player.storage.tuntian.length>0; return player.storage.tuntian.length>0;
@ -3536,7 +3740,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
audio:2, audio:2,
trigger:{player:['phaseBegin','phaseEnd','huashenStart']}, trigger:{player:['phaseBegin','phaseEnd','huashenStart']},
filter:function(event,player,name){ filter:function(event,player,name){
if(name=='phaseBegin'&&game.phaseNumber==1) return false; //if(name=='phaseBegin'&&game.phaseNumber==1) return false;
return true; return true;
}, },
//priority:50, //priority:50,
@ -4328,7 +4532,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
gzyinghun:{ gzyinghun:{
audio:'yinghun', audio:'yinghun',
audioname:['sunce','re_sunben'], audioname:['re_sunjian','sunce','re_sunben'],
trigger:{player:'phaseZhunbeiBegin'}, trigger:{player:'phaseZhunbeiBegin'},
filter:function(event,player){ filter:function(event,player){
return player.getDamagedHp()>0; return player.getDamagedHp()>0;
@ -6020,7 +6224,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
} }
}, },
gzbuqu:{ gzbuqu:{
audio:'buqu', audio:2,
trigger:{player:'changeHp'}, trigger:{player:'changeHp'},
filter:function(event,player){ filter:function(event,player){
return player.hp<=0&&event.num<0; return player.hp<=0&&event.num<0;
@ -6573,7 +6777,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){
"drlt_hongju":"鸿举", "drlt_hongju":"鸿举",
"drlt_hongju_info":"觉醒技准备阶段若“荣”的数量大于或等于3且场上有角色死亡则你可以用任意张手牌替换等量的“荣”然后扣减一点体力上限并获得技能“清侧”", "drlt_hongju_info":"觉醒技准备阶段若“荣”的数量大于或等于3且场上有角色死亡则你可以用任意张手牌替换等量的“荣”然后扣减一点体力上限并获得技能“清侧”",
"drlt_qingce":"清侧", "drlt_qingce":"清侧",
"drlt_qingce_info":"出牌阶段,你可以移去一张“荣”,然后弃置一名角色区域内的一张牌", "drlt_qingce_info":"出牌阶段,你可以移去一张“荣”,然后弃置一名角色装备区或判定区内的一张牌。",
zhengrong:'征荣',
hongju:'鸿举',
qingce:'清侧',
qingce_backup:'清侧',
zhengrong_info:'当你使用带有「伤害」标签的基本牌或锦囊牌指定目标后,你可以将一名手牌数不小于你的目标角色的一张牌置于你的武将牌上,称为「荣」。',
hongju_info:'觉醒技准备阶段若你武将牌上「荣」的数量不小于3则你触发此技能。你可以用任意数量的手牌交换等量的「荣」。你减1点体力上限并获得技能〖清侧〗。',
qingce_info:'出牌阶段,你可以获得一张「荣」并弃置一张手牌,然后弃置场上的一张牌。',
jianchu:'鞬出', jianchu:'鞬出',
jianchu_info:'当你使用【杀】指定一名角色为目标后,你可以弃置其一张牌,若以此法弃置的牌为装备牌,此【杀】不可被【闪】响应,若不为装备牌,该角色获得此【杀】', jianchu_info:'当你使用【杀】指定一名角色为目标后,你可以弃置其一张牌,若以此法弃置的牌为装备牌,此【杀】不可被【闪】响应,若不为装备牌,该角色获得此【杀】',

View File

@ -22,6 +22,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
}, },
character:{ character:{
huangfusong:['male','qun',4,['xinfenyue']],
yuantanyuanshang:['male','qun',4,['neifa']], yuantanyuanshang:['male','qun',4,['neifa']],
huaman:['female','shu',3,['hmmanyi','mansi','souying','zhanyuan']], huaman:['female','shu',3,['hmmanyi','mansi','souying','zhanyuan']],
xujing:['male','shu',3,['yuxu','xjshijian']], xujing:['male','shu',3,['yuxu','xjshijian']],
@ -141,7 +142,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
chendong:['male','wu',4,['duanxie','fenming']], chendong:['male','wu',4,['duanxie','fenming']],
sp_dongzhuo:['male','qun',5,['hengzheng']], sp_dongzhuo:['male','qun',5,['hengzheng']],
jiangfei:['male','shu',3,['shengxi','shoucheng']], jiangfei:['male','shu',3,['shengxi','shoucheng']],
jiangqing:['male','wu',4,['shangyi']], jiangqing:['male','wu',4,['shangyi','zniaoxiang']],
hetaihou:['female','qun',3,['zhendu','qiluan']], hetaihou:['female','qun',3,['zhendu','qiluan']],
kongrong:['male','qun',3,['lirang','mingshi']], kongrong:['male','qun',3,['lirang','mingshi']],
dingfeng:['male','wu',4,['fenxun','duanbing']], dingfeng:['male','wu',4,['fenxun','duanbing']],
@ -157,9 +158,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
zhangren:['male','qun',4,['chuanxin','zfengshi']], zhangren:['male','qun',4,['chuanxin','zfengshi']],
zoushi:['female','qun',3,['zhuoshui','zqingcheng']], zoushi:['female','qun',3,['zhuoshui','zqingcheng']],
huangfusong:['male','qun',4,['fenyue']],
wangyun:['male','qun',4,['wylianji','moucheng']], wangyun:['male','qun',4,['wylianji','moucheng']],
sunqian:['male','shu',3,['qianya','shuimeng']], sunqian:['male','shu',3,['qianya','shuimeng']],
xizhicai:['male','wei',3,['tiandu','xianfu','chouce']], xizhicai:['male','wei',3,['tiandu','xianfu','chouce']],
@ -741,7 +739,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
intro:{ intro:{
name:'内伐 - 非基本牌', name:'内伐 - 非基本牌',
content:'本回合内不能使用基本牌,且使用普通锦囊牌选择目标时可以多选择#个目标,且使用装备牌时摸X张牌X为手牌中不能使用的牌且最多为5。' content:'本回合内不能使用基本牌,且使用普通锦囊牌选择目标时可以多选择#个目标,且本回合的出牌阶段内前两次使用装备牌时摸X张牌X为手牌中不能使用的牌且最多为5。'
}, },
filter:function(event,player){ filter:function(event,player){
if(get.type(event.card)!='trick') return false; if(get.type(event.card)!='trick') return false;
@ -789,7 +787,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
trigger:{player:'useCard'}, trigger:{player:'useCard'},
forced:true, forced:true,
filter:function(event,player){ filter:function(event,player){
return get.type(event.card)=='equip'&&player.countMark('neifa_nobasic')*Math.min(5,player.countCards('h',function(cardx){ return get.type(event.card)=='equip'&&player.getHistory('useCard',function(evt){
return get.type(evt.card)=='equip'&&evt.isPhaseUsing();
}).indexOf(event)<2&&player.countMark('neifa_nobasic')*Math.min(5,player.countCards('h',function(cardx){
return !lib.filter.cardEnabled(cardx,player); return !lib.filter.cardEnabled(cardx,player);
}))>0; }))>0;
}, },
@ -1365,10 +1365,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return event.card.name=='sha'&&event.targets.length==1&&get.color(event.card)=='black'; return event.card.name=='sha'&&event.targets.length==1&&get.color(event.card)=='black';
}, },
check:function(event,player){ check:function(event,player){
return get.attitude(player,event.player)<=0; return get.attitude(player,event.target)<=0;
}, },
content:function(){ content:function(){
trigger.target.gain(trigger.cards.filterInD(),'gain2'); trigger.target.gain(trigger.cards.filterInD(),'gain2','log');
trigger.target.loseHp(); trigger.target.loseHp();
}, },
ai:{jueqing:true}, ai:{jueqing:true},
@ -4182,54 +4182,39 @@ game.import('character',function(lib,game,ui,get,ai,_status){
locked:true, locked:true,
subSkill:{ subSkill:{
discard:{ discard:{
trigger:{player:'gainAfter'},
audio:"zishu",
forced:true,
filter:function(event,player){
return _status.currentPhase!=player;
},
content:function(){
if(!player.storage.zishu){
player.storage.zishu=[];
}
player.storage.zishu.addArray(trigger.cards);
}
},
discard2:{
trigger:{global:'phaseEnd'}, trigger:{global:'phaseEnd'},
audio:"zishu", audio:"zishu",
forced:true, forced:true,
filter:function(event,player){ filter:function(event,player){
if(_status.currentPhase!=player&&player.storage.zishu){ if(_status.currentPhase!=player){
var he=player.getCards('he'); var he=player.getCards('he');
for(var i=0;i<player.storage.zishu.length;i++){ var bool=false;
if(he.contains(player.storage.zishu[i])){ player.getHistory('gain',function(evt){
return true; if(!bool&&evt&&evt.cards){
} for(var i=0;i<evt.cards.length;i++){
} if(he.contains(evt.cards[i])) bool=true;break;
return false; }
}
});
return bool;
} }
return false;
}, },
content:function(){ content:function(){
var he=player.getCards('he'); var he=player.getCards('h');
var list=[]; var list=[];
for(var i=0;i<player.storage.zishu.length;i++){ player.getHistory('gain',function(evt){
if(he.contains(player.storage.zishu[i])){ if(evt&&evt.cards){
list.push(player.storage.zishu[i]) for(var i=0;i<evt.cards.length;i++){
if(he.contains(evt.cards[i])) list.add(evt.cards[i]);
}
} }
} });
player.$throw(list); player.$throw(list);
player.lose(list,ui.discardPile,'visible'); player.lose(list,ui.discardPile,'visible');
game.log(player,'将',list,'置入弃牌堆'); game.log(player,'将',list,'置入弃牌堆');
} }
}, },
discard3:{
trigger:{global:'phaseZhunbeiBegin'},
silent:true,
content:function(){
delete player.storage.zishu;
}
},
draw:{ draw:{
trigger:{player:'gainAfter'}, trigger:{player:'gainAfter'},
audio:"zishu", audio:"zishu",
@ -4247,26 +4232,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){
threaten:1.2, threaten:1.2,
nogain:1 nogain:1
}, },
group:['zishu_draw','zishu_discard','zishu_discard2','zishu_discard3'] group:['zishu_draw','zishu_discard',]
}, },
yingyuan:{ yingyuan:{
audio:2, audio:2,
trigger:{player:'useCardAfter'}, trigger:{player:'useCardAfter'},
direct:true, direct:true,
onremove:function(player,skill){
delete player.storage[skill];
},
filter:function(event,player){ filter:function(event,player){
if(_status.currentPhase!=player) return false; if(_status.currentPhase!=player) return false;
if(player.storage.yingyuan&&player.storage.yingyuan.contains(event.card.name)){ if(player.getHistory('custom',function(evt){
return false; return evt.yingyuan_name==event.card.name;
} }).length>0) return false;
if(event.cards){ return event.cards.filterInD().length>0
for(var i=0;i<event.cards.length;i++){
if(event.cards[i].isInPile()) return true;
}
}
return false;
}, },
content:function(){ content:function(){
'step 0' 'step 0'
@ -4286,28 +4263,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}).set('sha',trigger.cards[0].name=='sha').set('wuxie',trigger.cards[0].name=='wuxie'); }).set('sha',trigger.cards[0].name=='sha').set('wuxie',trigger.cards[0].name=='wuxie');
'step 1' 'step 1'
if(result.bool){ if(result.bool){
var list=[]; var list=trigger.cards.filterInD();
for(var i=0;i<trigger.cards.length;i++){
if(trigger.cards[i].isInPile()){
list.push(trigger.cards[i]);
}
}
player.logSkill('yingyuan',result.targets[0]); player.logSkill('yingyuan',result.targets[0]);
result.targets[0].gain(list,'gain2'); result.targets[0].gain(list,'gain2');
if(!player.storage.yingyuan){ player.getHistory('custom').push({yingyuan_name:trigger.card.name});
player.storage.yingyuan=[];
}
player.storage.yingyuan.push(trigger.card.name);
}
},
group:'yingyuan_clear',
subSkill:{
clear:{
trigger:{player:'phaseEnd'},
silent:true,
content:function(){
delete player.storage.yingyuan;
}
} }
}, },
ai:{ ai:{
@ -5330,6 +5289,57 @@ game.import('character',function(lib,game,ui,get,ai,_status){
} }
}, },
}, },
xinfenyue:{
enable:'phaseUse',
filter:function(event,player){
var num=game.players.length-player.getFriends(true).length;
if((player.getStat().skill.xinfenyue||0)>=num) return false;
return player.countCards('h')>0;
},
filterTarget:function(event,player,target){
return player.canCompare(target);
},
content:function(){
'step 0'
player.chooseToCompare(target);
'step 1'
if(!result.bool) event.finish();
event.num=result.num1;
'step 2'
if(num<=5&&target.countGainableCards(player,'he')>0) player.gainPlayerCard(target,'he',true);
'step 3'
if(num<=9){
var card=get.cardPile2(function(x){
return x.name=='sha';
});
if(card) player.gain(card,'gain2');
}
'step 4'
if(num<=13){
var card={name:'sha',nature:'thunder'};
if(player.canUse(card,target)) player.useCard(card,target,false);
}
},
ai:{
order:4,
result:{
target:function(player,target){
var sort=function(a,b){
return b.number-a.number;
};
var ps=player.getCards('h').sort(sort);
var ts=target.getCards('h').sort(sort);
if(ps[0].number>ts[0].number){
var effect=get.effect(target,{name:'sha',nature:'thunder'},player,player)
if(ps[0].number<6&&target.countCards('he')>1) effect-=2;
if(ps[0].number<10) effect-=1;
return effect;
}
return ps.length>=ts.length?-0.5:0;
},
},
},
},
fenyue:{ fenyue:{
enable:'phaseUse', enable:'phaseUse',
filter:function(event,player){ filter:function(event,player){
@ -6332,18 +6342,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){
filter:function(event,player){ filter:function(event,player){
if(event.card.name!='sha') return false; if(event.card.name!='sha') return false;
return game.hasPlayer(function(current){ return game.hasPlayer(function(current){
return !event.targets.contains(current)&&get.distance(player,current)<=1&&player.canUse('sha',current); return !event.targets.contains(current)&&get.distance(player,current)<=1&&player.canUse(event.card,current);
}); });
}, },
direct:true, direct:true,
content:function(){ content:function(){
'step 0' 'step 0'
player.chooseTarget(get.prompt('duanbing'),'为'+get.translation(trigger.card)+'增加一个目标',function(card,player,target){ player.chooseTarget(get.prompt('duanbing'),'为'+get.translation(trigger.card)+'增加一个目标',function(card,player,target){
return !_status.event.sourcex.contains(target)&&get.distance(player,target)<=1&&player.canUse('sha',target); return !_status.event.sourcex.contains(target)&&get.distance(player,target)<=1&&player.canUse(_status.event.card,target);
}).set('sourcex',trigger.targets).set('ai',function(target){ }).set('sourcex',trigger.targets).set('ai',function(target){
var player=_status.event.player; var player=_status.event.player;
return get.effect(target,{name:'sha'},player,player); return get.effect(target,_status.event.card,player,player);
}); }).set('card',trigger.card);
'step 1' 'step 1'
if(result.bool){ if(result.bool){
if(!event.isMine()&&!_status.connectMode) game.delayx(); if(!event.isMine()&&!_status.connectMode) game.delayx();
@ -6362,13 +6372,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if(card.name=='sha'){ if(card.name=='sha'){
if(player._duanbingtmp) return; if(player._duanbingtmp) return;
player._duanbingtmp=true; player._duanbingtmp=true;
if(get.effect(target,{name:'sha'},player,player)<=0){ if(get.effect(target,card,player,player)<=0){
delete player._duanbingtmp; delete player._duanbingtmp;
return; return;
} }
if(game.hasPlayer(function(current){ if(game.hasPlayer(function(current){
return current!=target&&get.distance(player,current)<=1&& return current!=target&&get.distance(player,current)<=1&&
player.canUse('sha',current)&&get.effect(current,{name:'sha'},player,player)>0; player.canUse(card,current)&&get.effect(current,card,player,player)>0;
})){ })){
delete player._duanbingtmp; delete player._duanbingtmp;
return [1,1]; return [1,1];
@ -6801,11 +6811,19 @@ game.import('character',function(lib,game,ui,get,ai,_status){
} }
}, },
shanjia:{ shanjia:{
audio:2, sync:function(player){
init:function(player){ if(game.online) return;
player.storage.shanjia=0; var history=player.actionHistory;
var num=0;
for(var i=0;i<history.length;i++){
for(var j=0;j<history[i].useCard.length;j++){
if(get.type(history[i].useCard[j].card)=='equip') num++;
}
}
player.storage.shanjia=num;
if(num>0) player.markSkill('shanjia');
}, },
mark:true, audio:2,
intro:{ intro:{
content:function(storage){ content:function(storage){
if(storage==0) return '未使用过装备牌'; if(storage==0) return '未使用过装备牌';
@ -6816,13 +6834,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){
trigger:{player:'phaseUseBegin'}, trigger:{player:'phaseUseBegin'},
frequent:true, frequent:true,
filter:function(event,player){ filter:function(event,player){
lib.skill.shanjia.sync(player);
return player.storage.shanjia>0; return player.storage.shanjia>0;
}, },
content:function(){ content:function(){
'step 0' 'step 0'
player.draw(player.storage.shanjia); lib.skill.shanjia.sync(player);
player.draw(Math.min(7,player.storage.shanjia));
'step 1' 'step 1'
player.chooseToDiscard('he',player.storage.shanjia,true); player.chooseToDiscard('he',Math.min(7,player.storage.shanjia),true);
'step 2' 'step 2'
var useCard=false; var useCard=false;
if(result.bool&&result.cards){ if(result.bool&&result.cards){
@ -6848,11 +6868,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
trigger:{player:'useCard'}, trigger:{player:'useCard'},
silent:true, silent:true,
filter:function(event,player){ filter:function(event,player){
return get.type(event.card)=='equip'&&player.storage.shanjia<7; return get.type(event.card)=='equip';
}, },
content:function(){ content:function(){
player.storage.shanjia++; lib.skill.shanjia.sync(player);
player.updateMarks();
} }
}, },
zhanyi:{ zhanyi:{
@ -7499,7 +7518,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
mod:{ mod:{
targetEnabled:function(card,player,target){ targetEnabled:function(card,player,target){
if(get.type(card)=='delay'&&player!=target){ if(get.type(card)=='delay'){
return false; return false;
} }
}, },
@ -8237,7 +8256,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
direct:true, direct:true,
filter:function(event,player){ filter:function(event,player){
if(!event.targets) return false; if(!event.targets) return false;
if(event.getParent().triggeredTargets3.length>1) return false; if(!event.isFirstTarget) return false;
if(_status.currentPhase!=player) return false; if(_status.currentPhase!=player) return false;
var type=get.type(event.card,'trick'); var type=get.type(event.card,'trick');
if(type!='basic'&&type!='trick') return false; if(type!='basic'&&type!='trick') return false;
@ -8249,7 +8268,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
content:function(){ content:function(){
'step 0' 'step 0'
player.chooseTarget(get.prompt('qizhi'),'弃置一名角色的一张牌,然后其摸一张牌',function(card,player,target){ player.chooseTarget(get.prompt('qizhi'),'弃置一名角色的一张牌,然后其摸一张牌',function(card,player,target){
return !_status.event.getTrigger().targets.contains(target)&&target.countCards('he')>0; return !_status.event.targets.contains(target)&&target.countCards('he')>0;
}).set('ai',function(target){ }).set('ai',function(target){
var player=_status.event.player; var player=_status.event.player;
if(target==player) return 2; if(target==player) return 2;
@ -8257,10 +8276,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return 1 return 1
} }
return 0.5; return 0.5;
}); }).set('targets',trigger.targets);
'step 1' 'step 1'
if(result.bool){ if(result.bool){
player.storage.qizhi++; player.getHistory('custom').push({qizhi:true});
if(!event.isMine()&&!_status.connectMode) game.delay(); if(!event.isMine()&&!_status.connectMode) game.delay();
player.logSkill('qizhi',result.targets); player.logSkill('qizhi',result.targets);
player.discardPlayerCard(result.targets[0],true,'he'); player.discardPlayerCard(result.targets[0],true,'he');
@ -8272,35 +8291,28 @@ game.import('character',function(lib,game,ui,get,ai,_status){
'step 2' 'step 2'
event.target.draw(); event.target.draw();
}, },
group:'qizhi2'
},
qizhi2:{
trigger:{player:'phaseZhunbeiBegin'},
silent:true,
content:function(){
player.storage.qizhi=0;
}
}, },
jinqu:{ jinqu:{
audio:2, audio:2,
trigger:{player:'phaseJieshuBegin'}, trigger:{player:'phaseJieshuBegin'},
check:function(event,player){ check:function(event,player){
return player.storage.qizhi>=player.countCards('h'); return player.getHistory('custom',function(evt){
return evt.qizhi==true;
}).length>=player.countCards('h');
}, },
prompt:function(event,player){ prompt:function(event,player){
if(typeof player.storage.qizhi!='number'){ var num=player.getHistory('custom',function(evt){
'进趋:是否摸两张牌并将手牌弃置至'+get.cnNumber(0)+'张?'; return evt.qizhi==true;
} }).length;
return '进趋:是否摸两张牌并将手牌弃置至'+get.cnNumber(player.storage.qizhi)+'张?'; return '进趋:是否摸两张牌并将手牌弃置至'+get.cnNumber(num)+'张?';
}, },
content:function(){ content:function(){
'step 0' 'step 0'
player.draw(2); player.draw(2);
'step 1' 'step 1'
if(typeof player.storage.qizhi!='number'){ var dh=player.countCards('h')-player.getHistory('custom',function(evt){
player.storage.qizhi=0; return evt.qizhi==true;
} }).length;
var dh=player.countCards('h')-player.storage.qizhi;
if(dh>0){ if(dh>0){
player.chooseToDiscard(dh,true); player.chooseToDiscard(dh,true);
} }
@ -9638,7 +9650,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
} }
}, },
}, },
init:function(player){ init:function(player,skill){
if(!player.storage[skill]) player.storage.fentian=[]; if(!player.storage[skill]) player.storage.fentian=[];
}, },
content:function(){ content:function(){
@ -10553,14 +10565,23 @@ game.import('character',function(lib,game,ui,get,ai,_status){
event.forceDie=true; event.forceDie=true;
player.respond(result.links,'midao','highlight','noOrdering'); player.respond(result.links,'midao','highlight','noOrdering');
result.cards=result.links; result.cards=result.links;
var card=result.cards[0];
event.card=card;
player.storage.yishe.remove(card);
if(player.storage.yishe.length==0){
player.unmarkSkill('yishe');
if(player.hasSkill('yishe')){
player.logSkill('yishe');
player.recover();
}
}
else player.markSkill('yishe');
} }
else{ else{
event.finish(); event.finish();
} }
"step 2" "step 2"
if(result.bool){ if(result.bool){
var card=result.cards[0];
player.storage.yishe.remove(card);
if(trigger.player.judging[0].clone){ if(trigger.player.judging[0].clone){
trigger.player.judging[0].clone.classList.remove('thrownhighlight'); trigger.player.judging[0].clone.classList.remove('thrownhighlight');
game.broadcast(function(card){ game.broadcast(function(card){
@ -10752,14 +10773,32 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
}, },
fulu:{ fulu:{
enable:'chooseToUse', trigger:{player:'useCard1'},
filterCard:function(card){ filter:function(event,player){
return card.name=='sha'&&!card.nature; if(event.card.name=='sha'&&!event.card.nature) return true;
}, },
viewAs:{name:'sha',nature:'thunder'}, audio:true,
ai:{ check:function(event,player){
order:function(){ var eff=0;
return get.order({name:'sha'})+0.1; for(var i=0;i<event.targets.length;i++){
var target=event.targets[i];
var eff1=get.damageEffect(target,player,player);
var eff2=get.damageEffect(target,player,player,'thunder');
eff+=eff2;
eff-=eff1;
}
return eff>=0;
},
content:function(){
trigger.card.nature='thunder';
if(get.itemtype(trigger.card)=='card'){
var next=game.createEvent('fulu_clear');
next.card=trigger.card;
event.next.remove(next);
trigger.after.push(next);
next.setContent(function(){
delete card.nature;
});
} }
} }
}, },
@ -12149,6 +12188,27 @@ game.import('character',function(lib,game,ui,get,ai,_status){
qiluan2:{ qiluan2:{
audio:2, audio:2,
}, },
zniaoxiang:{
audio:2,
trigger:{player:'useCardToPlayered'},
forced:true,
filter:function(event,player){
return event.card.name=='sha'&&!event.getParent().directHit.contains(event.target);
},
//priority:-1,
logTarget:'target',
content:function(){
var id=trigger.target.playerid;
var map=trigger.getParent().customArgs;
if(!map[id]) map[id]={};
if(typeof map[id].shanRequired=='number'){
map[id].shanRequired++;
}
else{
map[id].shanRequired=2;
}
}
},
shangyi:{ shangyi:{
audio:2, audio:2,
enable:'phaseUse', enable:'phaseUse',
@ -14193,8 +14253,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
huaman:'花鬘', huaman:'花鬘',
yuantanyuanshang:'袁谭袁尚', yuantanyuanshang:'袁谭袁尚',
xinfenyue:'奋钺',
xinfenyue_info:'出牌阶段限X次X为与你不同阵营的存活角色数你可以与一名其他角色拼点若你赢根据你拼点牌的点数依次执行以下效果不大于5你获得其一张牌不大于9你获得牌堆里的一张【杀】; 不大于K视为你对其使用一张雷【杀】。',
neifa:'内伐', neifa:'内伐',
neifa_info:'出牌阶段开始时,你可以摸一张牌,然后弃置一张牌。若弃置的牌是基本牌,本回合你不能使用锦囊和装备牌,且【杀】的使用次数+X且目标+1若弃置的不是基本牌本回合你不能使用基本牌且普通锦囊牌的目标+1使用装备牌时摸X张牌X为手牌中不能使用的牌且最多为5。', neifa_info:'出牌阶段开始时,你可以摸一张牌,然后弃置一张牌。若弃置的牌是基本牌,本回合你不能使用锦囊和装备牌,且【杀】的使用次数+X且目标+1若弃置的不是基本牌本回合你不能使用基本牌且普通锦囊牌的目标+1前两次使用装备牌时摸X张牌X为手牌中不能使用的牌且最多为5。',
neifa_use:'内伐', neifa_use:'内伐',
hmmanyi:'蛮裔', hmmanyi:'蛮裔',
hmmanyi_info:'锁定技,【南蛮入侵】对你无效。', hmmanyi_info:'锁定技,【南蛮入侵】对你无效。',
@ -14525,7 +14587,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
juesi:'决死', juesi:'决死',
juesi_info:'出牌阶段,你可以弃置一张【杀】并选择攻击范围内的一名有牌的其他角色,该角色弃置一张牌,然后若弃置的牌不是【杀】且你的体力值不大于该角色,你视为对其使用【决斗】。', juesi_info:'出牌阶段,你可以弃置一张【杀】并选择攻击范围内的一名有牌的其他角色,该角色弃置一张牌,然后若弃置的牌不是【杀】且你的体力值不大于该角色,你视为对其使用【决斗】。',
zhenlue:'缜略', zhenlue:'缜略',
zhenlue_info:'锁定技,你使用的普通锦囊牌不能被【无懈可击】响应;你不能成为其他角色的延时锦囊牌的目标。', zhenlue_info:'锁定技,你使用的普通锦囊牌不能被【无懈可击】响应;你不能成为延时锦囊牌的目标。',
jianshu:'间书', jianshu:'间书',
jianshu_info:'限定技,出牌阶段,你可以将一张黑色手牌交给一名其他角色,并选择另一名其他角色,然后令这两名角色拼点。赢的角色弃置两张牌,没赢的角色失去一点体力。', jianshu_info:'限定技,出牌阶段,你可以将一张黑色手牌交给一名其他角色,并选择另一名其他角色,然后令这两名角色拼点。赢的角色弃置两张牌,没赢的角色失去一点体力。',
yongdi:'拥嫡', yongdi:'拥嫡',
@ -14722,6 +14784,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
shengxi:'生息', shengxi:'生息',
shoucheng:'守成', shoucheng:'守成',
shangyi:'尚义', shangyi:'尚义',
zniaoxiang:'鸟翔',
zhendu:'鸩毒', zhendu:'鸩毒',
qiluan:'戚乱', qiluan:'戚乱',
qiluan2:'戚乱', qiluan2:'戚乱',
@ -14770,7 +14833,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
yawang_info:'锁定技摸牌阶段开始时你改为摸X张牌然后你于本回合的出牌阶段内至多使用X张牌X为与你体力值相等的角色数', yawang_info:'锁定技摸牌阶段开始时你改为摸X张牌然后你于本回合的出牌阶段内至多使用X张牌X为与你体力值相等的角色数',
fenyin_info:'你的回合内,当你使用牌时,若此牌与你于此回合内使用的上一张牌的颜色不同,则你可以摸一张牌。', fenyin_info:'你的回合内,当你使用牌时,若此牌与你于此回合内使用的上一张牌的颜色不同,则你可以摸一张牌。',
fuji_info:'当一名角色造成雷属性伤害时,你可以令其进行判定,若结果为黑色,此伤害+1若结果为红色该角色获得判定牌。', fuji_info:'当一名角色造成雷属性伤害时,你可以令其进行判定,若结果为黑色,此伤害+1若结果为红色该角色获得判定牌。',
fulu_info:'你可以将【杀】当做雷【杀】使用。', fulu_info:'当你声明使用普通【杀】时,你可以将此【杀】改为雷【杀】。',
jilei_info:'当你受到有来源的伤害后,你可以声明一种牌的类别。若如此做,你令伤害来源不能使用、打出或弃置此类别的手牌,直到其下个回合开始。', jilei_info:'当你受到有来源的伤害后,你可以声明一种牌的类别。若如此做,你令伤害来源不能使用、打出或弃置此类别的手牌,直到其下个回合开始。',
danlao:'啖酪', danlao:'啖酪',
danlao_info:'当你成为一张指定了多个目标的【杀】或普通锦囊牌的目标时,你可以摸一张牌,令此牌对你无效。', danlao_info:'当你成为一张指定了多个目标的【杀】或普通锦囊牌的目标时,你可以摸一张牌,令此牌对你无效。',
@ -14832,6 +14895,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
qiluan_info_guozhan:'一名角色的回合结束时,若你于回合内杀死过角色,则你可以摸三张牌。', qiluan_info_guozhan:'一名角色的回合结束时,若你于回合内杀死过角色,则你可以摸三张牌。',
zhendu_info:'其他角色的出牌阶段开始时,你可以弃置一张手牌,视为该角色使用了一张【酒】。若如此做,你对其造成一点伤害。', zhendu_info:'其他角色的出牌阶段开始时,你可以弃置一张手牌,视为该角色使用了一张【酒】。若如此做,你对其造成一点伤害。',
shangyi_info:'出牌阶段限一次,你可以观看一名其他角色的手牌,然后弃置其中的一张黑色牌。', shangyi_info:'出牌阶段限一次,你可以观看一名其他角色的手牌,然后弃置其中的一张黑色牌。',
zniaoxiang_info:'锁定技,当你使用【杀】指定目标后,你令目标角色响应此【杀】所需要使用的【闪】的数目+1。',
shoucheng_info:'当一名其他角色于其回合外失去手牌时,若其没有手牌,则你可令该角色摸一张牌。', shoucheng_info:'当一名其他角色于其回合外失去手牌时,若其没有手牌,则你可令该角色摸一张牌。',
shengxi_info:'弃牌阶段开始时,若你本回合内未造成过伤害,则你可以摸两张牌。', shengxi_info:'弃牌阶段开始时,若你本回合内未造成过伤害,则你可以摸两张牌。',
hengzheng_info:'摸牌阶段开始时若你的体力值为1或你没有手牌则你可以放弃摸牌改为获得每名其他角色区域内的一张牌。', hengzheng_info:'摸牌阶段开始时若你的体力值为1或你没有手牌则你可以放弃摸牌改为获得每名其他角色区域内的一张牌。',

View File

@ -1750,7 +1750,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
qixi:{ qixi:{
audio:2, audio:2,
audioname:['ganning','re_ganning'], audioname:['re_ganning'],
enable:'chooseToUse', enable:'chooseToUse',
filterCard:function(card){ filterCard:function(card){
return get.color(card)=='black'; return get.color(card)=='black';
@ -1783,7 +1783,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
} }
}, },
kurou:{ kurou:{
audio:4, audio:2,
enable:'phaseUse', enable:'phaseUse',
prompt:'失去一点体力并摸两张牌', prompt:'失去一点体力并摸两张牌',
content:function(){ content:function(){
@ -1973,6 +1973,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if(card.name=='shunshou'||card.name=='lebu') return false; if(card.name=='shunshou'||card.name=='lebu') return false;
} }
}, },
audio:2,
}, },
lianying:{ lianying:{
audio:2, audio:2,

View File

@ -248,7 +248,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
}, },
twxiaolian:{ twxiaolian:{
inherit:'twtijin', audio:2,
trigger:{global:'useCard'},
logTarget:'player',
filter:function(event,player){ filter:function(event,player){
return event.card&&event.card.name=='sha'&&event.player!=player&& return event.card&&event.card.name=='sha'&&event.player!=player&&
event.targets.length==1&&event.targets[0]!=player; event.targets.length==1&&event.targets[0]!=player;

View File

@ -3133,9 +3133,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
filter:function (event,player,name){ filter:function (event,player,name){
if(!event.source) return false; if(!event.source) return false;
var range=event.source.getAttackRange(); var range=event.source.getAttackRange();
if(range==3) return false; if(name=='damageBegin3') return range>3;
if(range<3) return name='damageBegin4'&&event.num>1; return event.num>1&&range<3;
return name='damageBegin3';
}, },
//priority:-9.5, //priority:-9.5,
content:function (){ content:function (){
@ -3669,8 +3668,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
viewAs:{name:'lebu'}, viewAs:{name:'lebu'},
//prepare:"throw", //prepare:"throw",
position:"he", position:"he",
filterCard:{ filterCard:function(card,player,event){
suit:"diamond", return get.suit(card)=='diamond'&&player.canAddJudge({name:'lebu',cards:[card]});
}, },
selectTarget:-1, selectTarget:-1,
filterTarget:function (card,player,target){ filterTarget:function (card,player,target){

View File

@ -1547,40 +1547,44 @@ game.import('character',function(lib,game,ui,get,ai,_status){
audio:'anguo', audio:'anguo',
enable:'phaseUse', enable:'phaseUse',
usable:1, usable:1,
filterTarget:function(card,player,target){ filterTarget:lib.filter.notMe,
if(player==target) return false;
if(player.isMinHandcard()||target.isMinHandcard()) return true;
if(player.isMinEquip()||target.isMinEquip()) return true;
if((player.isMinHp()&&player.isDamaged())||(target.isMinHp()&&target.isDamaged())) return true;
return false;
},
content:function(){ content:function(){
'step 0' 'step 0'
if(target.isMinHandcard()){ if(target.isMinHandcard()){
target.draw(); target.draw();
event.h=true; event.h=true;
} }
'step 1'
if(target.isMinHp()&&target.isDamaged()){ if(target.isMinHp()&&target.isDamaged()){
target.recover(); target.recover();
event.hp=true; event.hp=true;
} }
event.equip=get.cardPile(function(card){ 'step 2'
return get.type(card)=='equip'&&!target.isDisabled(get.subtype(card)); var equip=get.cardPile(function(card){
return get.type(card)=='equip'&&target.hasUseTarget(card);
}); });
if(target.isMinEquip()&&event.equip){ if(target.isMinEquip()&&equip){
target.chooseUseTarget(event.equip,'noanimate','nopopup',true); target.chooseUseTarget(equip,'noanimate','nopopup',true);
event.e=true; event.e=true;
} }
'step 1' 'step 3'
game.updateRoundNumber();
if(!event.h&&player.isMinHandcard()){ if(!event.h&&player.isMinHandcard()){
player.draw(); player.draw();
} }
'step 4'
if(!event.hp&&player.isMinHp()&&player.isDamaged()){ if(!event.hp&&player.isMinHp()&&player.isDamaged()){
player.recover(); player.recover();
} }
if(!event.e&&player.isMinEquip()&&event.equip){ 'step 5'
player.chooseUseTarget(event.equip,'noanimate','nopopup',true); if(!event.e&&player.isMinEquip()){
var equip=get.cardPile(function(card){
return get.type(card)=='equip'&&target.hasUseTarget(card);
});
if(equip) player.chooseUseTarget(equip,'noanimate','nopopup',true);
} }
'step 6'
game.updateRoundNumber();
}, },
ai:{ ai:{
threaten:1.6, threaten:1.6,
@ -2304,7 +2308,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
bizhuan:{ bizhuan:{
audio:2, audio:2,
trigger:{player:'useCardAfter',target:'useCardToTargeted'}, trigger:{player:'useCard',target:'useCardToTargeted'},
filter:function(event,player){ filter:function(event,player){
if(event.name!='useCard'&&event.player==event.target) return false; if(event.name!='useCard'&&event.player==event.target) return false;
if(player.storage.bizhuan.length>=4) return false; if(player.storage.bizhuan.length>=4) return false;
@ -2326,13 +2330,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
frequent:true, frequent:true,
content:function(){ content:function(){
var card=get.cards()[0]; var card=game.cardsGotoSpecial(get.cards()).cards[0];
ui.special.appendChild(card);
player.$draw(card); player.$draw(card);
game.delay(); game.delay();
player.storage.bizhuan.push(card); player.storage.bizhuan.push(card);
player.markSkill('bizhuan'); player.markSkill('bizhuan');
event.trigger("addCardToStorage");
}, },
mod:{ mod:{
maxHandcard:function(player,num){ maxHandcard:function(player,num){
@ -2344,7 +2346,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
trigger:{player:'phaseDrawAfter'}, trigger:{player:'phaseDrawAfter'},
direct:true, direct:true,
filter:function(event,player){ filter:function(event,player){
return player.storage.bizhuan&&player.storage.bizhuan.length&&event.num>0; return player.storage.bizhuan&&player.storage.bizhuan.length;
}, },
locked:false, locked:false,
content:function(){ content:function(){
@ -4960,34 +4962,61 @@ game.import('character',function(lib,game,ui,get,ai,_status){
} }
}, },
lihuo:{ lihuo:{
enable:'phaseUse', trigger:{player:'useCard1'},
usable:1,
filterCard:function(card){
return card.name=='sha'&&!card.nature;
},
filter:function(event,player){ filter:function(event,player){
return player.countCards('h','sha')>0 if(event.card.name=='sha'&&!event.card.nature) return true;
return false;
}, },
viewAs:{name:'sha',nature:'fire'}, audio:2,
mod:{ check:function(event,player){
selectTarget:function(card,player,range){ return false;
if(card.name=='sha'&&card.nature=='fire'&&range[1]!=-1){ },
range[1]++; content:function(){
} trigger.card.nature='fire';
}, var next=game.createEvent('lihuo_clear');
next.player=player;
next.card=trigger.card;
event.next.remove(next);
next.forceDie=true;
trigger.after.push(next);
next.setContent(function(){
if(player.isAlive()&&player.getHistory('sourceDamage',function(evt){
return evt.getParent(2)==event.parent;
}).length>0) player.loseHp();
delete card.nature;
});
}, },
group:'lihuo2' group:'lihuo2'
}, },
lihuo2:{ lihuo2:{
trigger:{source:'damageSource'}, trigger:{player:'useCard2'},
forced:true,
popup:false,
filter:function(event,player){ filter:function(event,player){
return event.parent.skill=='lihuo'; if(event.card.name!='sha'||get.nature(event.card)!='fire') return false;
return game.hasPlayer(function(current){
return !event.targets.contains(current)&&player.canUse(event.card,current);
});
}, },
direct:true,
content:function(){ content:function(){
player.addSkill('lihuo3'); 'step 0'
} player.chooseTarget(get.prompt('lihuo'),'为'+get.translation(trigger.card)+'增加一个目标',function(card,player,target){
return !_status.event.sourcex.contains(target)&&player.canUse(_status.event.card,target);
}).set('sourcex',trigger.targets).set('card',trigger.card).set('ai',function(target){
var player=_status.event.player;
return get.effect(target,_status.event.card,player,player);
});
'step 1'
if(result.bool){
if(!event.isMine()&&!_status.connectMode) game.delayx();
event.target=result.targets[0];
}
else{
event.finish();
}
'step 2'
player.logSkill('lihuo',event.target);
trigger.targets.push(event.target);
},
}, },
lihuo3:{ lihuo3:{
trigger:{player:'useCardAfter'}, trigger:{player:'useCardAfter'},
@ -5301,21 +5330,22 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
sidi:{ sidi:{
audio:2, audio:2,
trigger:{global:'respondEnd'}, trigger:{global:'useCard'},
filter:function(event,player){ filter:function(event,player){
if(event.parent.parent.name!='sha') return false; if(event.card.name!='shan') return false;
if(event.player==player) return true; if(event.player==player) return true;
return _status.currentPhase==player; return _status.currentPhase==player;
}, },
frequent:true, frequent:true,
init:function(player){ init:function(player){
player.storage.sidi=[]; if(!player.storage.sidi) player.storage.sidi=[];
}, },
intro:{ intro:{
content:'cards' content:'cards',
onunmark:'throw',
}, },
content:function(){ content:function(){
var card=get.cards()[0]; var card=game.cardsGotoSpecial(get.cards()).cards[0];
game.log(player,'将',card,'置于武将牌上'); game.log(player,'将',card,'置于武将牌上');
player.$gain2(card); player.$gain2(card);
player.storage.sidi.add(card); player.storage.sidi.add(card);
@ -5327,8 +5357,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
sidi2:{ sidi2:{
trigger:{global:'phaseUseBegin'}, trigger:{global:'phaseUseBegin'},
filter:function(event,player){ filter:function(event,player){
if(event.player==player) return false; if(event.player==player||event.player.isDead()) return false;
if(!player.storage.sidi.length) return false; if(!player.storage.sidi||!player.storage.sidi.length) return false;
return true; return true;
}, },
check:function(event,player){ check:function(event,player){
@ -5358,13 +5388,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){
default:return true; default:return true;
} }
}, },
logTarget:'player',
content:function(){ content:function(){
'step 0' 'step 0'
if(player.storage.sidi.length==1){ if(player.storage.sidi.length==1){
event.directbutton=player.storage.sidi[0]; event.directbutton=player.storage.sidi[0];
} }
else{ else{
player.chooseCardButton('弃置武将牌上的一张牌',player.storage.sidi,true); player.chooseCardButton('弃置一张“司敌”牌',player.storage.sidi,true);
} }
'step 1' 'step 1'
var button; var button;
@ -5376,10 +5407,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
} }
if(button){ if(button){
player.$throw([button]); player.$throw([button]);
player.line(trigger.player,'green');
game.log(player,'将',button,'置于弃牌堆'); game.log(player,'将',button,'置于弃牌堆');
button.discard(); game.cardsDiscard(button);
trigger.player.addTempSkill('sidi3'); trigger.player.addTempSkill('sidi3');
trigger.player.addMark('sidi3',1,false);
player.storage.sidi.remove(button); player.storage.sidi.remove(button);
player.syncStorage('sidi'); player.syncStorage('sidi');
if(player.storage.sidi.length==0){ if(player.storage.sidi.length==0){
@ -5395,9 +5426,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
sidi3:{ sidi3:{
mod:{ mod:{
cardUsable:function(card,player,num){ cardUsable:function(card,player,num){
if(card.name=='sha') return num-1; if(card.name=='sha') return num-player.countMark('sidi3');
} }
} },
onremove:true,
}, },
zhongyong:{ zhongyong:{
trigger:{player:'shaMiss'}, trigger:{player:'shaMiss'},
@ -11037,9 +11069,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
chunlao2:'醇醪', chunlao2:'醇醪',
chunlao_info:'结束阶段开始时,若你没有“醇”,你可以将至少一张【杀】置于你的武将牌上,称为“醇”。当一名角色处于濒死状态时,你可以移去一张“醇”,视为该角色使用一张【酒】', chunlao_info:'结束阶段开始时,若你没有“醇”,你可以将至少一张【杀】置于你的武将牌上,称为“醇”。当一名角色处于濒死状态时,你可以移去一张“醇”,视为该角色使用一张【酒】',
lihuo:'疠火', lihuo:'疠火',
lihuo_info:'你可以将一张普通【杀】当作火属性的【杀】使用。若以此法使用的【杀】造成了伤害则此【杀】结算后你失去1点体力你使用火【杀】指定目标后,可以额外指定一个目标', lihuo_info:'当你声明使用普通【杀】时,你可以将此【杀】改为火【杀】。若以此法使用的【杀】造成了伤害则此【杀】结算后你失去1点体力你使用火【杀】选择目标后,可以额外指定一个目标。',
shenduan:'慎断', shenduan:'慎断',
shenduan_info:'当你的黑色基本牌因弃置而进入弃牌堆时,你可以将之视为【兵粮寸断】置于一名其他角色的判定区里。', shenduan_info:'当你的黑色基本牌因弃置而进入弃牌堆后,你可以将其当做【兵粮寸断】使用(无距离限制)。',
yonglve:'勇略', yonglve:'勇略',
yonglve_info:'一名其他角色的判定阶段开始时,若其在你攻击范围内,则你可以弃置其判定区里的一张牌,视为对该角色使用一张【杀】。若此【杀】未造成伤害,你摸一张牌。', yonglve_info:'一名其他角色的判定阶段开始时,若其在你攻击范围内,则你可以弃置其判定区里的一张牌,视为对该角色使用一张【杀】。若此【杀】未造成伤害,你摸一张牌。',
benxi:'奔袭', benxi:'奔袭',

File diff suppressed because it is too large Load Diff

View File

@ -20,6 +20,7 @@
dying:[], dying:[],
globalHistory:[{ globalHistory:[{
cardMove:[], cardMove:[],
custom:[],
}], }],
}; };
var lib={ var lib={
@ -1336,7 +1337,7 @@
// music:'音乐', // music:'音乐',
official:'原版', official:'原版',
// new:'新版', // new:'新版',
// feicheng:'废城', feicheng:'废城',
liusha:'流沙', liusha:'流沙',
ol:'手杀', ol:'手杀',
custom:'自定', custom:'自定',
@ -4147,6 +4148,12 @@
frequent:true, frequent:true,
restart:true, restart:true,
}, },
connect_change_card:{
name:'启用手气卡',
init:false,
frequent:true,
restart:true,
},
connect_special_identity:{ connect_special_identity:{
name:'特殊身份', name:'特殊身份',
init:false, init:false,
@ -4633,6 +4640,12 @@
restart:true, restart:true,
intro:'若开启此选项,玩家的第一个回合开始时,若其主武将牌有对应的君主武将牌,则其可以将此武将牌替换为对应的君主武将牌,然后重新调整体力上限。若玩家的体力上限因此增大,则玩家回复等量的体力。' intro:'若开启此选项,玩家的第一个回合开始时,若其主武将牌有对应的君主武将牌,则其可以将此武将牌替换为对应的君主武将牌,然后重新调整体力上限。若玩家的体力上限因此增大,则玩家回复等量的体力。'
}, },
connect_change_card:{
name:'启用手气卡',
init:false,
frequent:true,
restart:true,
},
// connect_ban_weak:{ // connect_ban_weak:{
// name:'屏蔽弱将', // name:'屏蔽弱将',
// init:false, // init:false,
@ -4940,10 +4953,10 @@
frequent:true frequent:true
}, },
connect_replace_handcard:{ connect_replace_handcard:{
name:'末位可换牌', name:'四号位保护',
init:true, init:true,
frequent:true, frequent:true,
intro:'最后行动的角色可在开局时重铸一次手牌' intro:'最后行动的角色起始手牌数+1'
}, },
connect_choice_num:{ connect_choice_num:{
name:'侯选武将数', name:'侯选武将数',
@ -5210,10 +5223,10 @@
frequent:true, frequent:true,
}, },
replace_handcard_two:{ replace_handcard_two:{
name:'末位可换牌', name:'四号位保护',
init:true, init:true,
frequent:true, frequent:true,
intro:'最后行动的角色可在开局时重铸一次手牌' intro:'最后行动的角色起始手牌+1'
}, },
replace_character_two:{ replace_character_two:{
name:'替补模式', name:'替补模式',
@ -5406,6 +5419,12 @@
frequent:true, frequent:true,
restart:true, restart:true,
}, },
connect_change_card:{
name:'启用手气卡',
init:false,
frequent:true,
restart:true,
},
}, },
config:{ config:{
update:function(config,map){ update:function(config,map){
@ -10129,9 +10148,10 @@
player.ai.tempIgnore=[]; player.ai.tempIgnore=[];
_status.globalHistory.push({ _status.globalHistory.push({
cardMove:[], cardMove:[],
custom:[],
}); });
game.countPlayer2(function(current){ game.countPlayer2(function(current){
current.actionHistory.push({useCard:[],respond:[],skipped:[],lose:[],gain:[],sourceDamage:[],damage:[]}); current.actionHistory.push({useCard:[],respond:[],skipped:[],lose:[],gain:[],sourceDamage:[],damage:[],custom:[]});
current.stat.push({card:{},skill:{}}); current.stat.push({card:{},skill:{}});
}); });
if(ui.land&&ui.land.player==player){ if(ui.land&&ui.land.player==player){
@ -10322,10 +10342,10 @@
} }
}, },
addJudgeCard:function(){ addJudgeCard:function(){
target.addJudge(card,cards); if(lib.filter.judge(card,player,target)&&cards.length&&get.position(cards[0],true)=='o') target.addJudge(card,cards);
}, },
equipCard:function(){ equipCard:function(){
target.equip(cards[0]); if(cards.length&&get.position(cards[0],true)=='o') target.equip(cards[0]);
}, },
gameDraw:function(){ gameDraw:function(){
"step 0" "step 0"
@ -10538,11 +10558,11 @@
} }
event.filter2=function(info2){ event.filter2=function(info2){
var info=lib.skill[info2[0]]; var info=lib.skill[info2[0]];
if(!lib.translate[info2[0]]||info2[0].indexOf('_')==0||info.popup===false||info.silent) return false; if(!lib.translate[info2[0]]||info.popup===false||info.silent) return false;
return true; return true;
} }
event.filter3=function(info,info2){ event.filter3=function(info,info2){
return event.filter2(info2)&&event.filter1(info2)&&info2[1]==info[1]&&info[2]==info2[2]&&info[1].hasSkill(info2[0],true); return event.filter2(info2)&&event.filter1(info2)&&info2[1]==info[1]&&info[2]==info2[2]&&(lib.skill.global.contains(info2[0])||info[1].hasSkill(info2[0],true));
} }
'step 1' 'step 1'
if(event.list.length){ if(event.list.length){
@ -11013,6 +11033,7 @@
if(result&&result.bool){ if(result&&result.bool){
var hs=player.getCards('h') var hs=player.getCards('h')
game.broadcastAll(function(player,hs){ game.broadcastAll(function(player,hs){
game.addVideo('lose',player,[get.cardsInfo(hs),[],[]]);
for(var i=0;i<hs.length;i++){ for(var i=0;i<hs.length;i++){
hs[i].discard(false); hs[i].discard(false);
} }
@ -13469,7 +13490,7 @@
} }
},event.id); },event.id);
}; };
if(get.type(card)!='equip'){ if(true){
var str=''; var str='';
if(targets.length){ if(targets.length){
str+='对<span class="bluetext">'+(targets[0]==player?'自己':get.translation(targets[0])); str+='对<span class="bluetext">'+(targets[0]==player?'自己':get.translation(targets[0]));
@ -13529,6 +13550,18 @@
} }
return null; return null;
} }
var info=get.info(card,false);
if(!info.nodelay&&event.animate!=false){
if(event.delayx!==false){
if(event.waitingForTransition){
_status.waitingForTransition=event.waitingForTransition;
game.pause();
}
else{
game.delayx();
}
}
}
"step 4" "step 4"
if(!event.triggeredTargets1) event.triggeredTargets1=[]; if(!event.triggeredTargets1) event.triggeredTargets1=[];
var target=event.getTriggerTarget(targets,event.triggeredTargets1); var target=event.getTriggerTarget(targets,event.triggeredTargets1);
@ -13685,19 +13718,8 @@
next.target.animate('target'); next.target.animate('target');
} }
} }
if(!info.nodelay&&(event.animate!=false||num>0)){ if(!info.nodelay&&num>0){
if(num==0){ if(event.targetDelay!==false){
if(event.delayx!==false){
if(event.waitingForTransition){
_status.waitingForTransition=event.waitingForTransition;
game.pause();
}
else{
game.delayx();
}
}
}
else if(event.targetDelay!==false){
game.delayx(0.5); game.delayx(0.5);
} }
} }
@ -14766,6 +14788,10 @@
if(_status.roundStart==player){ if(_status.roundStart==player){
_status.roundStart=player.next||player.getNext()||game.players[0]; _status.roundStart=player.next||player.getNext()||game.players[0];
} }
if(ui.land&&ui.land.player==player){
game.addVideo('destroyLand');
ui.land.destroy();
}
var unseen=false; var unseen=false;
if(player.classList.contains('unseen')){ if(player.classList.contains('unseen')){
player.classList.remove('unseen'); player.classList.remove('unseen');
@ -22914,58 +22940,61 @@
}, },
addTrigger:function(skill,player){ addTrigger:function(skill,player){
if(!player) return; if(!player) return;
var evt=this.getParent('arrangeTrigger'); var evt=this;
if(!evt||evt.name!='arrangeTrigger'||!evt.map) return; while(true){
if(typeof skill=='string') skill=[skill]; var evt=evt.getParent('arrangeTrigger');
game.expandSkills(skill); if(!evt||evt.name!='arrangeTrigger'||!evt.map) return;
var filter=function(content){ if(typeof skill=='string') skill=[skill];
if(typeof content=='string') return content==triggername; game.expandSkills(skill);
return content.contains(triggername); var filter=function(content){
}; if(typeof content=='string') return content==triggername;
var trigger=evt._trigger; return content.contains(triggername);
var triggername=evt.triggername; };
var map=false; var trigger=evt._trigger;
if(evt.doing&&evt.doing.player==player) map=evt.doing; var triggername=evt.triggername;
else{ var map=false;
for(var i=0;i<evt.map.length;i++){ if(evt.doing&&evt.doing.player==player) map=evt.doing;
if(evt.map[i].player==player){map=evt.map[i];break;} else{
} for(var i=0;i<evt.map.length;i++){
} if(evt.map[i].player==player){map=evt.map[i];break;}
if(!map) return; }
var func=function(skillx){ }
var info=lib.skill[skillx]; if(!map) return;
var bool=false; var func=function(skillx){
for(var i in info.trigger){ var info=lib.skill[skillx];
if(i!='global'&&trigger[i]!=player) continue; var bool=false;
if(filter(info.trigger[i])){bool=true;break} for(var i in info.trigger){
} if(i!='global'&&trigger[i]!=player) continue;
if(!bool) return; if(filter(info.trigger[i])){bool=true;break}
var priority=0; }
if(info.priority){ if(!bool) return;
priority=info.priority*100; var priority=0;
} if(info.priority){
if(!lib.translate[skillx]||skillx.indexOf('_')==0||info.popup===false||info.silent){ priority=info.priority*100;
priority++; }
} if(info.silent){
if(info.equipSkill) num-=25; priority++;
if(info.cardSkill) num-=50; }
if(info.ruleSkill) num-=75; if(info.equipSkill) num-=25;
var toadd=[skillx,player,priority]; if(info.cardSkill) num-=50;
if(map.list2){ if(info.ruleSkill) num-=75;
for(var i=0;i<map.list2.length;i++){ var toadd=[skillx,player,priority];
if(map.list2[i][0]==toadd[0]&&map.list2[i][1]==toadd[1]) return; if(map.list2){
} for(var i=0;i<map.list2.length;i++){
}; if(map.list2[i][0]==toadd[0]&&map.list2[i][1]==toadd[1]) return;
for(var i=0;i<map.list.length;i++){ }
if(map.list[i][0]==toadd[0]&&map.list[i][1]==toadd[1]) return; };
} for(var i=0;i<map.list.length;i++){
map.list.add(toadd); if(map.list[i][0]==toadd[0]&&map.list[i][1]==toadd[1]) return;
map.list.sort(function(a,b){ }
return b[2]-a[2]; map.list.add(toadd);
}); map.list.sort(function(a,b){
} return b[2]-a[2];
for(var j=0;j<skill.length;j++){ });
func(skill[j]); }
for(var j=0;j<skill.length;j++){
func(skill[j]);
}
} }
}, },
trigger:function(name){ trigger:function(name){
@ -23013,7 +23042,7 @@
if(info.priority){ if(info.priority){
num=info.priority*100; num=info.priority*100;
} }
if(!lib.translate[skill]||skill.indexOf('_')==0||info.popup===false||info.silent){ if(info.silent){
num++; num++;
} }
if(info.equipSkill) num-=30; if(info.equipSkill) num-=30;
@ -23666,7 +23695,7 @@
event=event||_status.event; event=event||_status.event;
if(event.name!='chooseToRespond') return true; if(event.name!='chooseToRespond') return true;
var source=event.getParent().player; var source=event.getParent().player;
if(source!=player){ if(source&&source!=player){
if(source.hasSkillTag('norespond',false,[card,player,event],true)){ if(source.hasSkillTag('norespond',false,[card,player,event],true)){
return false; return false;
} }
@ -38408,6 +38437,12 @@
},linknode).link=list[i].forum; },linknode).link=list[i].forum;
} }
} }
else if(list[i].forum){
var linknode=ui.create.div('.text',node);
ui.create.node('span.hrefnode','参与讨论',function(){
game.open(this.link);
},linknode).link=list[i].forum;
}
download.listen(downloadExtension); download.listen(downloadExtension);
if(lib.config.extensions.contains(list[i].name)){ if(lib.config.extensions.contains(list[i].name)){
download.classList.remove('active'); download.classList.remove('active');
@ -42083,7 +42118,7 @@
node.damagepopups=[]; node.damagepopups=[];
node.judging=[]; node.judging=[];
node.stat=[{card:{},skill:{}}]; node.stat=[{card:{},skill:{}}];
node.actionHistory=[{useCard:[],respond:[],skipped:[],lose:[],gain:[],sourceDamage:[],damage:[]}]; node.actionHistory=[{useCard:[],respond:[],skipped:[],lose:[],gain:[],sourceDamage:[],damage:[],custom:[]}];
node.tempSkills={}; node.tempSkills={};
node.storage={}; node.storage={};
node.marks={}; node.marks={};
@ -47797,13 +47832,15 @@
}, },
suit:function(card){ suit:function(card){
if(get.itemtype(card)=='cards'){ if(get.itemtype(card)=='cards'){
var suit=get.suit(card[0]) if(card.length==1) return get.suit(card[0]);
for(var i=1;i<card.length;i++){ return 'none';
if(get.suit(card[i])!=suit) return 'none'; //var suit=get.suit(card[0])
} //for(var i=1;i<card.length;i++){
return suit; // if(get.suit(card[i])!=suit) return 'none';
//}
//return suit;
} }
else if(get.itemtype(card.cards)=='cards'&&card.name!='muniu'){ else if(get.itemtype(card.cards)=='cards'&&!lib.suit.contains(card.suit)){
return get.suit(card.cards); return get.suit(card.cards);
} }
else{ else{

View File

@ -1,8 +1,8 @@
window.noname_update={ window.noname_update={
version:'1.9.97.9', version:'1.9.98',
update:'1.9.97.8.2', update:'1.9.97.9',
changeLog:[ changeLog:[
'家族之争', '新界孙策,界刘禅,界袁绍,新皇甫嵩,新毌丘俭',
'BUG修复', 'BUG修复',
], ],
files:[ files:[
@ -11,10 +11,11 @@ window.noname_update={
//'card/sp.js', //'card/sp.js',
'card/standard.js', 'card/standard.js',
//'card/swd.js', //'card/swd.js',
//'card/guozhan.js', 'card/mtg.js',
'card/guozhan.js',
//'card/gwent.js', //'card/gwent.js',
//'character/diy.js', //'character/diy.js',
//'character/extra.js', 'character/extra.js',
//'character/hearth.js', //'character/hearth.js',
//'character/gujian.js', //'character/gujian.js',
//'character/gwent.js', //'character/gwent.js',
@ -24,23 +25,25 @@ window.noname_update={
'character/refresh.js', 'character/refresh.js',
'character/shenhua.js', 'character/shenhua.js',
'character/sp.js', 'character/sp.js',
//'character/tw.js', 'character/tw.js',
'character/standard.js', 'character/standard.js',
'character/swd.js', //'character/swd.js',
//'character/xianjian.js', //'character/xianjian.js',
'character/xinghuoliaoyuan.js', 'character/xinghuoliaoyuan.js',
'character/yijiang.js', 'character/yijiang.js',
//'character/yxs.js', //'character/yxs.js',
//'extension/boss/extension.js', //'extension/boss/extension.js',
//'layout/default/layout.css', //'layout/default/layout.css',
//'mode/identity.js', 'mode/identity.js',
//'mode/doudizhu.js', 'mode/doudizhu.js',
//'mode/guozhan.js', 'mode/guozhan.js',
'mode/chess.js',
'mode/tafang.js',
//'mode/single.js', //'mode/single.js',
//'mode/stone.js', //'mode/stone.js',
'mode/brawl.js', 'mode/brawl.js',
//'mode/versus.js', 'mode/versus.js',
//'mode/boss.js', 'mode/boss.js',
'game/game.js', 'game/game.js',
//'game/NoSleep.js', //'game/NoSleep.js',
//'game/config.js', //'game/config.js',

BIN
image/card/mingguangkai.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 209 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 187 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 278 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 149 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 209 KiB

View File

@ -2810,7 +2810,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
}, },
}, },
forced:true, forced:true,
trigger:{player:'phaseBefore'}, trigger:{player:'phaseBegin'},
content:function(){ content:function(){
'step 0' 'step 0'
event.num1=3; event.num1=3;
@ -2818,7 +2818,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
event.togain=[]; event.togain=[];
while(event.togain.length<event.num2){ while(event.togain.length<event.num2){
var card=get.cardPile(function(card){ var card=get.cardPile(function(card){
return get.color(card)=='red'; return !event.togain.contains(card)&&get.color(card)=='red';
}); });
if(card) event.togain.push(card); if(card) event.togain.push(card);
else break; else break;
@ -8496,7 +8496,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
tinqin:'听琴', tinqin:'听琴',
boss_guihan:'归汉', boss_guihan:'归汉',
boss_guihan_info:'限定技濒死阶段你可以将体力回复至体力上限摸4张牌令所有敌人的技能恢复并获得技能【听琴】、【蕙质】', boss_guihan_info:'限定技濒死阶段你可以将体力回复至体力上限摸4张牌令所有敌人的技能恢复失去技能【悲歌】和【胡笳】,并获得技能【听琴】、【蕙质】',
boss_huixin:'蕙质', boss_huixin:'蕙质',
boss_huixin_info:'每当你于回合外失去牌,可以进行一次判定,若为黑色,当前回合角色失去一点体力,否则你回复一点体力并摸一张牌', boss_huixin_info:'每当你于回合外失去牌,可以进行一次判定,若为黑色,当前回合角色失去一点体力,否则你回复一点体力并摸一张牌',
boss_hujia:'胡笳', boss_hujia:'胡笳',

View File

@ -611,6 +611,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
player.changeLingli(-1); player.changeLingli(-1);
player.draw(); player.draw();
}, },
delay:0,
ai:{ ai:{
order:10, order:10,
result:{ result:{

View File

@ -6,6 +6,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
hiddenCharacters:[], hiddenCharacters:[],
start:function(){ start:function(){
"step 0" "step 0"
_status.gameDrawed=true;
_status.mode=get.config('chess_mode'); _status.mode=get.config('chess_mode');
if(lib.config.player_border=='normal'&&(lib.config.layout=='long'||lib.config.layout=='long2')){ if(lib.config.player_border=='normal'&&(lib.config.layout=='long'||lib.config.layout=='long2')){
ui.arena.classList.add('lslim_player'); ui.arena.classList.add('lslim_player');

View File

@ -78,6 +78,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
game.addVideo('init',null,info); game.addVideo('init',null,info);
game.gameDraw(game.zhu||_status.firstAct||game.me); game.gameDraw(game.zhu||_status.firstAct||game.me);
if(_status.connectMode&&lib.configOL.change_card) game.replaceHandcards(game.players.slice(0));
game.phaseLoop(game.zhu||_status.firstAct||game.me); game.phaseLoop(game.zhu||_status.firstAct||game.me);
}, },
game:{ game:{
@ -805,7 +806,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
}, },
}, },
_bahu:{ _bahu:{
trigger:{player:'phaseBegin'}, trigger:{player:'phaseZhunbeiBegin'},
forced:true, forced:true,
filter:function(event,player){ filter:function(event,player){
return player==game.zhu; return player==game.zhu;

View File

@ -177,6 +177,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
game.players[i].ai.shown=0; game.players[i].ai.shown=0;
} }
} }
if(_status.connectMode&&lib.configOL.change_card) game.replaceHandcards(game.players.slice(0));
game.phaseLoop(event.playerx); game.phaseLoop(event.playerx);
}, },
card:{ card:{
@ -565,7 +566,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
complexCard:true, complexCard:true,
check:function(){return 1}, check:function(){return 1},
popname:true, popname:true,
audio:"huashen", audio:"huashen1",
viewAs:{ viewAs:{
name:name, name:name,
nature:nature, nature:nature,
@ -1820,7 +1821,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
}, },
"new_jushou":{ "new_jushou":{
audio:"jushou", audio:"xinjushou",
trigger:{ trigger:{
player:"phaseJieshuBegin", player:"phaseJieshuBegin",
}, },
@ -2313,7 +2314,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
subSkill:{ subSkill:{
shanafter:{ shanafter:{
sub:true, sub:true,
audio:"reyajiao", audio:"longdan_sha",
trigger:{ trigger:{
player:"useCard", player:"useCard",
}, },
@ -2338,7 +2339,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
}, },
shamiss:{ shamiss:{
sub:true, sub:true,
audio:"reyajiao", audio:"longdan_sha",
trigger:{ trigger:{
player:"shaMiss", player:"shaMiss",
}, },
@ -2364,9 +2365,8 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
trigger:{ trigger:{
player:["useCard","respond"], player:["useCard","respond"],
}, },
//priority:2, audio:"longdan_sha",
forced:true, forced:true,
popup:false,
filter:function (event,player){ filter:function (event,player){
if(!get.zhu(player,'shouyue')) return false; if(!get.zhu(player,'shouyue')) return false;
return event.skill=='new_longdan_sha'||event.skill=='new_longdan_shan'; return event.skill=='new_longdan_sha'||event.skill=='new_longdan_shan';
@ -2408,7 +2408,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
sub:true, sub:true,
}, },
shan:{ shan:{
audio:"longdan_shan", audio:"longdan_sha",
enable:['chooseToRespond','chooseToUse'], enable:['chooseToRespond','chooseToUse'],
filterCard:{ filterCard:{
name:"sha", name:"sha",
@ -5199,7 +5199,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
}, },
gzjixi:{ gzjixi:{
inherit:'jixi', inherit:'jixi',
audio:2, audio:'jixi',
mainSkill:true, mainSkill:true,
init:function(player){ init:function(player){
if(player.checkMainSkill('gzjixi')){ if(player.checkMainSkill('gzjixi')){
@ -5246,7 +5246,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
} }
}, },
huyuan:{ huyuan:{
audio:'yuanhu', audio:2,
trigger:{player:'phaseJieshuBegin'}, trigger:{player:'phaseJieshuBegin'},
direct:true, direct:true,
filter:function(event,player){ filter:function(event,player){
@ -5278,8 +5278,8 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
target.equip(result.cards[0]); target.equip(result.cards[0]);
if(target!=player){ if(target!=player){
player.$give(result.cards,target,false); player.$give(result.cards,target,false);
game.delay(2);
} }
game.delay(2);
player.chooseTarget('弃置一名角色的一张牌',function(card,player,target){ player.chooseTarget('弃置一名角色的一张牌',function(card,player,target){
var source=_status.event.source; var source=_status.event.source;
return get.distance(source,target)<=1&&source!=target&&target.countCards('he'); return get.distance(source,target)<=1&&source!=target&&target.countCards('he');
@ -5320,7 +5320,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
inherit:'kanpo', inherit:'kanpo',
zhenfa:'inline', zhenfa:'inline',
viewAsFilter:function(player){ viewAsFilter:function(player){
return _status.currentPhase.inline(player)&&!player.hasSkill('kanpo')&&player.countCards('h',{color:'black'})>0; return _status.currentPhase&&_status.currentPhase.inline(player)&&!player.hasSkill('kanpo')&&player.countCards('h',{color:'black'})>0;
}, },
}, },
yizhi:{ yizhi:{
@ -5383,6 +5383,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
}, },
niaoxiang:{ niaoxiang:{
zhenfa:'siege', zhenfa:'siege',
audio:'zniaoxiang',
global:'niaoxiang_sha' global:'niaoxiang_sha'
}, },
niaoxiang_sha:{ niaoxiang_sha:{
@ -5395,6 +5396,8 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
}); });
}, },
forced:true, forced:true,
audio:'zniaoxiang',
forceaudio:true,
logTarget:'target', logTarget:'target',
content:function(){ content:function(){
var id=trigger.target.playerid; var id=trigger.target.playerid;
@ -5415,6 +5418,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
}, },
fengshi_sha:{ fengshi_sha:{
audio:'zfengshi', audio:'zfengshi',
forceaudio:true,
trigger:{player:'useCardToPlayered'}, trigger:{player:'useCardToPlayered'},
filter:function(event,player){ filter:function(event,player){
if(event.card.name!='sha'||game.countPlayer()<4) return false; if(event.card.name!='sha'||game.countPlayer()<4) return false;
@ -5762,7 +5766,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
} }
}, },
gzqianxun:{ gzqianxun:{
audio:'reqianxun', audio:'qianxun',
trigger:{target:'useCardToTarget',player:'addJudgeBefore'}, trigger:{target:'useCardToTarget',player:'addJudgeBefore'},
forced:true, forced:true,
priority:15, priority:15,
@ -7156,7 +7160,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
hmkyuanyu:"远域", hmkyuanyu:"远域",
"hmkyuanyu_info":"锁定技,当你受到伤害时,若伤害来源与你的座次不相邻,防止此伤害。", "hmkyuanyu_info":"锁定技,当你受到伤害时,若伤害来源与你的座次不相邻,防止此伤害。",
hmkguishu:"鬼术", hmkguishu:"鬼术",
"hmkguishu_info":"出牌阶段,你可以将一张黑桃手牌当作【知己知彼】或【远交近攻】使用。若你本回合内已经发动过了“鬼术”,则你必须选择与上次不同的选项。", "hmkguishu_info":"出牌阶段,你可以将一张黑桃手牌当作【知己知彼】或【远交近攻】使用。若你本局游戏内已经发动过了〖鬼术〗,则你必须选择与上次不同的选项。",
"_mingzhisuodingji":"亮将", "_mingzhisuodingji":"亮将",
"_mingzhisuodingji_info":"出牌阶段,你可以明置拥有“锁定技”的武将牌。", "_mingzhisuodingji_info":"出牌阶段,你可以明置拥有“锁定技”的武将牌。",
@ -7499,7 +7503,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
prompt+=',令'+get.translation(target)+str+'选择是否执行'; prompt+=',令'+get.translation(target)+str+'选择是否执行';
} }
player.chooseButton([prompt,[list,'vcard']],true).set('ai',function(button){ player.chooseButton([prompt,[list,'vcard']],true).set('ai',function(button){
return get.junlingEffect(player,button.link[2],target,[],player); return get.junlingEffect(_status.event.player,button.link[2],_status.event.getParent().target,[],_status.event.player);
}); });
'step 1' 'step 1'
event.result={ event.result={
@ -8316,63 +8320,63 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
return 0; return 0;
}, },
junlingEffect:function(source,junling,performer,targets,viewer){ junlingEffect:function(source,junling,performer,targets,viewer){
var att1=get.attitude(viewer,source),att2=get.attitude(viewer,performer); var att1=get.attitude(viewer,source),att2=get.attitude(viewer,performer);
var eff1=0,eff2=0; var eff1=0,eff2=0;
switch(junling){ switch(junling){
case 'junling1': case 'junling1':
if(!targets.length&&game.countPlayer(function(current){return get.damageEffect(viewer,current,viewer)>0})) eff1=2; if(!targets.length&&game.countPlayer(function(current){return get.damageEffect(viewer,current,viewer)>0})) eff1=2;
else{ else{
if(get.damageEffect(targets[0],performer,source)>=0) eff1=2; if(get.damageEffect(targets[0],performer,source)>=0) eff1=2;
else eff1=-2; else eff1=-2;
if(get.damageEffect(targets[0],source,performer)>=0) eff2=2; if(get.damageEffect(targets[0],source,performer)>=0) eff2=2;
else eff2=-2; else eff2=-2;
} }
break; break;
case 'junling2': case 'junling2':
if(performer.countCards('he')){eff1=1;eff2=0;} if(performer.countCards('he')){eff1=1;eff2=0;}
else{eff1=2;eff2=-1;} else{eff1=2;eff2=-1;}
break; break;
case 'junling3': case 'junling3':
if(performer.hp==1&&!performer.countCards(function(card){return get.tag(card,save)})&&!player.hasSkillTag('save',true)) eff2=-5; if(performer.hp==1&&!performer.hasSkillTag('save',true)) eff2=-5;
else{ else{
if(performer==viewer){ if(performer==viewer){
if(performer.hasSkillTag('maihp',true)) eff2=3; if(performer.hasSkillTag('maihp',true)) eff2=3;
else eff2=-2; else eff2=-2;
}
else{
if(performer.hasSkillTag('maihp',false)) eff2=3;
else eff2=-2;
}
}
break;
case 'junling4':eff1=0;eff2=-2;break;
case 'junling5':
var td=performer.isTurnedOver();
if(td){
if(performer==viewer){
if(_status.currentPhase==performer&&performer.hasSkill('jushou')) eff2=-3;
else eff2=3;
}
else eff2=3;
}
else{
if(performer==viewer){
if(performer.hasSkillTag('noturn',true)) eff2=0;
else eff2=-3;
}
else{
if(performer.hasSkillTag('noturn',false)) eff2=0;
else eff2=-3;
}
}
break;
case 'junling6':
if(performer.countCards('h')>1) eff2+=1-performer.countCards('h');
if(performer.countCards('e')>1) eff2+=1-performer.countCards('e');
break;
} }
return Math.sign(att1)*eff1+Math.sign(att2)*eff2; else{
}, if(performer.hasSkillTag('maihp',false)) eff2=3;
else eff2=-2;
}
}
break;
case 'junling4':eff1=0;eff2=-2;break;
case 'junling5':
var td=performer.isTurnedOver();
if(td){
if(performer==viewer){
if(_status.currentPhase==performer&&performer.hasSkill('jushou')) eff2=-3;
else eff2=3;
}
else eff2=3;
}
else{
if(performer==viewer){
if(performer.hasSkillTag('noturn',true)) eff2=0;
else eff2=-3;
}
else{
if(performer.hasSkillTag('noturn',false)) eff2=0;
else eff2=-3;
}
}
break;
case 'junling6':
if(performer.countCards('h')>1) eff2+=1-performer.countCards('h');
if(performer.countCards('e')>1) eff2+=1-performer.countCards('e');
break;
}
return Math.sign(att1)*eff1+Math.sign(att2)*eff2;
},
realAttitude:function(from,toidentity,difficulty){ realAttitude:function(from,toidentity,difficulty){
if(from.identity==toidentity&&toidentity!='ye'){ if(from.identity==toidentity&&toidentity!='ye'){
return 4+difficulty; return 4+difficulty;

View File

@ -295,8 +295,9 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
_status.videoInited=true; _status.videoInited=true;
game.addVideo('init',null,info); game.addVideo('init',null,info);
"step 6" "step 6"
game.gameDraw(_status.firstAct2||game.zhong||game.zhu||_status.firstAct||game.me); game.gameDraw(_status.firstAct2||game.zhong||game.zhu||_status.firstAct||game.me);
if(_status.connectMode&&lib.configOL.change_card) game.replaceHandcards(game.players.slice(0));
"step 7"
game.phaseLoop(_status.firstAct2||game.zhong||game.zhu||_status.firstAct||game.me); game.phaseLoop(_status.firstAct2||game.zhong||game.zhu||_status.firstAct||game.me);
}, },
game:{ game:{
@ -625,13 +626,13 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
list.remove('shen'); list.remove('shen');
if(list.length) player.group=function(){ if(list.length) player.group=function(){
if(_status.mode!='zhong'&&game.zhu&&game.zhu.group){ if(_status.mode!='zhong'&&game.zhu&&game.zhu.group){
if(['re_zhangjiao','liubei','re_liubei','caocao','re_caocao','sunquan','re_sunquan','zhangjiao','sp_zhangjiao','caopi','re_caopi','liuchen','caorui','sunliang','sunxiu','sunce','re_sunben'].contains(game.zhu.name)) return game.zhu.group; if(['re_zhangjiao','liubei','re_liubei','caocao','re_caocao','sunquan','re_sunquan','zhangjiao','sp_zhangjiao','caopi','re_caopi','liuchen','caorui','sunliang','sunxiu','sunce','re_sunben','old_liushan','old_yuanshao'].contains(game.zhu.name)) return game.zhu.group;
if(game.zhu.name=='sunhao'&&player.identity=='zhong') return 'wu'; if(game.zhu.name=='sunhao'&&player.identity=='zhong') return 'wu';
if(game.zhu.name=='yl_yuanshu'){ if(game.zhu.name=='yl_yuanshu'){
if(player.identity=='zhong') list.remove('qun'); if(player.identity=='zhong') list.remove('qun');
else return 'qun'; else return 'qun';
} }
if(['sunhao','xin_yuanshao','re_yuanshao'].contains(game.zhu.name)){ if(['sunhao','xin_yuanshao','re_yuanshao','re_sunce'].contains(game.zhu.name)){
if(player.identity!='zhong') list.remove(game.zhu.group); if(player.identity!='zhong') list.remove(game.zhu.group);
else return game.zhu.group; else return game.zhu.group;
} }

View File

@ -5,6 +5,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
canvasUpdates2:[], canvasUpdates2:[],
start:function(){ start:function(){
"step 0" "step 0"
_status.gameDrawed=true;
lib.init.css(lib.assetURL+'layout/mode','chess'); lib.init.css(lib.assetURL+'layout/mode','chess');
lib.init.css(lib.assetURL+'layout/mode','tafang'); lib.init.css(lib.assetURL+'layout/mode','tafang');
game.loadMode('chess'); game.loadMode('chess');

View File

@ -307,10 +307,12 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
if(firstChoose.next.side==firstChoose.side){ if(firstChoose.next.side==firstChoose.side){
firstChoose=firstChoose.next; firstChoose=firstChoose.next;
} }
game.gameDraw(firstChoose); game.gameDraw(firstChoose,function(player){
if(lib.configOL.replace_handcard){ if(lib.configOL.replace_handcard&&player==firstChoose.previousSeat){
game.replaceHandcards(firstChoose.previous); return 5;
} }
return 4;
});
game.phaseLoop(firstChoose); game.phaseLoop(firstChoose);
} }
else if(_status.mode=='4v4'){ else if(_status.mode=='4v4'){
@ -330,10 +332,12 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
_status.first_less=true; _status.first_less=true;
_status.first_less_forced=true; _status.first_less_forced=true;
var firstChoose=_status.firstAct; var firstChoose=_status.firstAct;
game.gameDraw(firstChoose); game.gameDraw(firstChoose,function(player){
if(get.config('replace_handcard_two')){ if(player==_status.firstAct.previousSeat&&get.config('replace_handcard_two')){
game.replaceHandcards(firstChoose.previous); return 5;
} }
return 4;
});
game.phaseLoop(firstChoose); game.phaseLoop(firstChoose);
} }
else if(_status.mode=='endless'){ else if(_status.mode=='endless'){
@ -5792,6 +5796,179 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
} }
return this; return this;
}, },
dieAfter2:function(source){
if(_status.connectMode){
if(_status.mode=='1v1'||_status.mode=='3v3') return;
else if(_status.mode=='2v2'){
var friend;
for(var i=0;i<game.players.length;i++){
if(game.players[i].side==this.side){
friend=game.players[i];break;
}
}
if(friend){
var next=game.createEvent('versusDraw');
next.setContent(function(){
'step 0'
player.chooseBool('是否摸一张牌?');
'step 1'
if(result.bool){
player.draw();
}
});
next.player=friend;
}
}
else if(_status.mode=='4v4'){
if(this.identity=='zhu') return;
else{
if(source){
if(source.side==this.side){
if(source.identity=='zhu'){
source.discard(source.getCards('he'));
}
}
else{
var num1=0,num2=1;
for(var i=0;i<game.players.length;i++){
if(game.players[i].side==source.side){
num1++;
}
else{
num2++;
}
}
source.draw(2+Math.max(0,num2-num1));
}
}
}
return;
}
}
else{
if(_status.mode=='four'){
if(this.identity=='zhu') return;
else{
if(source){
if(source.side==this.side){
if(source.identity=='zhu'){
source.discard(source.getCards('he'));
}
}
else{
var num1=0,num2=1;
for(var i=0;i<game.players.length;i++){
if(game.players[i].side==source.side){
num1++;
}
else{
num2++;
}
}
source.draw(2+Math.max(0,num2-num1));
}
}
}
return;
}
else if(_status.mode=='two'){
var friend;
for(var i=0;i<game.players.length;i++){
if(game.players[i].side==this.side){
friend=game.players[i];break;
}
}
if(_status.replacetwo){
if(this.replacetwo){
if(source){
if(source.side==this.side){
var he=source.getCards('he');
if(he.length){
source.discard(he);
}
}
else{
source.draw(3);
}
}
}
else if(friend&&friend.replacetwo){
if(source){
if(source.side==this.side){
var he=source.getCards('he');
if(he.length){
source.discard(he);
}
}
else{
source.draw(3);
}
}
}
}
else{
if(friend){
var next=game.createEvent('versusDraw');
next.setContent(function(){
'step 0'
player.chooseBool('是否摸一张牌?');
'step 1'
if(result.bool){
player.draw();
}
});
next.player=friend;
}
}
return;
}
else if(_status.mode=='siguo') return;
else if(_status.mode=='jiange') return;
else if(_status.mode=='three'){
if(this.identity=='zhu') return;
else{
game.friend.remove(this);
game.enemy.remove(this);
if(source){
source.draw(2);
}
}
return;
}
var list=(this.side==game.me.side)?_status.friend:_status.enemy;
if((list.length==0&&lib.storage.noreplace_end)||
(lib.storage.zhu&&lib.storage.main_zhu&&this.identity=='zhu'&&game.players.length>2)){
return;
}
else if(game.friend.length==1&&this==game.friend[0]&&_status.friend.length==0){
return;
}
else if(game.enemy.length==1&&this==game.enemy[0]&&_status.enemy.length==0){
return;
}
else{
if(source){
if(source.side!=this.side){
if(lib.storage.versus_reward){
source.draw(lib.storage.versus_reward);
}
}
else{
if(lib.storage.versus_punish=='弃牌'){
source.discard(source.getCards('he'));
}
else if(lib.storage.versus_punish=='摸牌'&&lib.storage.versus_reward){
source.draw(lib.storage.versus_reward);
}
}
}
else{
game.delay();
}
}
}
},
dieAfter:function(source){ dieAfter:function(source){
if(_status.connectMode){ if(_status.connectMode){
if(_status.mode=='1v1'||_status.mode=='3v3'){ if(_status.mode=='1v1'||_status.mode=='3v3'){
@ -5829,19 +6006,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
friend=game.players[i];break; friend=game.players[i];break;
} }
} }
if(friend){ if(!friend){
var next=game.createEvent('versusDraw');
next.setContent(function(){
'step 0'
player.chooseBool('是否摸一张牌?');
'step 1'
if(result.bool){
player.draw();
}
});
next.player=friend;
}
else{
game.over(this.side!=game.me.side); game.over(this.side!=game.me.side);
} }
} }
@ -5850,25 +6015,6 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
game.over(this.side!=game.me.side); game.over(this.side!=game.me.side);
} }
else{ else{
if(source){
if(source.side==this.side){
if(source.identity=='zhu'){
source.discard(source.getCards('he'));
}
}
else{
var num1=0,num2=1;
for(var i=0;i<game.players.length;i++){
if(game.players[i].side==source.side){
num1++;
}
else{
num2++;
}
}
source.draw(2+Math.max(0,num2-num1));
}
}
var side1=[],side2=[]; var side1=[],side2=[];
for(var i=0;i<game.players.length;i++){ for(var i=0;i<game.players.length;i++){
if(game.players[i].side){ if(game.players[i].side){
@ -5894,25 +6040,6 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
game.over(this.side!=game.me.side); game.over(this.side!=game.me.side);
} }
else{ else{
if(source){
if(source.side==this.side){
if(source.identity=='zhu'){
source.discard(source.getCards('he'));
}
}
else{
var num1=0,num2=1;
for(var i=0;i<game.players.length;i++){
if(game.players[i].side==source.side){
num1++;
}
else{
num2++;
}
}
source.draw(2+Math.max(0,num2-num1));
}
}
var side1=[],side2=[]; var side1=[],side2=[];
for(var i=0;i<game.players.length;i++){ for(var i=0;i<game.players.length;i++){
if(game.players[i].side){ if(game.players[i].side){
@ -5944,32 +6071,10 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
} }
if(_status.replacetwo){ if(_status.replacetwo){
if(this.replacetwo){ if(this.replacetwo){
if(source){
if(source.side==this.side){
var he=source.getCards('he');
if(he.length){
source.discard(he);
}
}
else{
source.draw(3);
}
}
game.replacePlayerTwo(this,this.replacetwo); game.replacePlayerTwo(this,this.replacetwo);
delete this.replacetwo; delete this.replacetwo;
} }
else if(friend&&friend.replacetwo){ else if(friend&&friend.replacetwo){
if(source){
if(source.side==this.side){
var he=source.getCards('he');
if(he.length){
source.discard(he);
}
}
else{
source.draw(3);
}
}
game.replacePlayerTwo(this,friend.replacetwo); game.replacePlayerTwo(this,friend.replacetwo);
delete friend.replacetwo; delete friend.replacetwo;
} }
@ -5978,19 +6083,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
} }
} }
else{ else{
if(friend){ if(!friend){
var next=game.createEvent('versusDraw');
next.setContent(function(){
'step 0'
player.chooseBool('是否摸一张牌?');
'step 1'
if(result.bool){
player.draw();
}
});
next.player=friend;
}
else{
game.over(this.side!=game.me.side); game.over(this.side!=game.me.side);
} }
} }
@ -6080,9 +6173,6 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
} }
game.friend.remove(this); game.friend.remove(this);
game.enemy.remove(this); game.enemy.remove(this);
if(source){
source.draw(2);
}
} }
return; return;
} }
@ -6112,24 +6202,6 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
game.over(true); game.over(true);
} }
else{ else{
if(source){
if(source.side!=this.side){
if(lib.storage.versus_reward){
source.draw(lib.storage.versus_reward);
}
}
else{
if(lib.storage.versus_punish=='弃牌'){
source.discard(source.getCards('he'));
}
else if(lib.storage.versus_punish=='摸牌'&&lib.storage.versus_reward){
source.draw(lib.storage.versus_reward);
}
}
}
else{
game.delay();
}
game.replacePlayer(this); game.replacePlayer(this);
} }
} }