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(){
trigger.card.nature='fire';
player.addSkill('zhuque_skill2');
player.storage.zhuque_skill=trigger.card;
if(get.itemtype(trigger.card)=='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:{

View File

@ -42,7 +42,6 @@ game.import('card',function(lib,game,ui,get,ai,_status){
fullskin:true,
type:'equip',
subtype:'equip2',
cardimage:'suolianjia',
skills:['minguangkai_cancel','minguangkai_link'],
ai:{
basic:{
@ -708,7 +707,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
target:function(player,target){
var hs=target.getCards('h');
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.3;

View File

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

View File

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

View File

@ -628,7 +628,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
jilue:{
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:{
audio:true,
@ -740,7 +740,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return player.hasMark('renjie');
},
position:'he',
filterCard:true,
filterCard:lib.filter.cardDiscardable,
discard:false,
lose:false,
delay:0,
selectCard:[1,Infinity],
prompt:'弃置一枚“忍”,然后弃置任意张牌并摸等量的牌。若弃置了所有的手牌,则可以多摸一张牌。',
check:function(card){
@ -755,7 +758,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){
content:function(){
'step 0'
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'
player.draw(event.num+cards.length);
},

View File

@ -7,7 +7,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
characterSort:{
mobile:{
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:{
@ -37,6 +38,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
re_zhanggong:['male','wei',3,['reqianxin','xinfu_zhenxing']],
re_xugong:['male','wu',3,['rebiaozhao','yechou']],
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:{
shenpei:'审配204年字正南魏郡阴安今河北清丰北人。为人正直 袁绍领冀州,审配被委以腹心之任,并总幕府。河北平定,袁绍以审配、逢纪统军事,审配恃其强盛,力主与曹操决战。曾率领弓弩手大破曹军于官渡。官渡战败,审配二子被俘,反因此受谮见疑,幸得逢纪力保。袁绍病死,审配等矫诏立袁尚为嗣,导致兄弟相争,被曹操各个击破。曹操围邺,审配死守数月,终城破被擒,拒不投降,慷慨受死。',
@ -114,7 +119,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
var str=get.translation(player)+'正在表演...<br>';
for(var i=1;i<7;i++){
str+=get.translation('qiaosi_c'+i);
if(i%3!=0) str+=' ';
if(i%3!=0) str+='  ';
if(i==3) str+='<br>';
}
ui.create.dialog(str,'forcebutton').videoId=id;
@ -624,7 +629,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
direct:true,
content:function(){
"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(){
if(!_status.event.fang) return false;
return game.hasPlayer(function(target){
@ -639,7 +644,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if(result.bool){
player.logSkill('refangquan');
trigger.cancel();
player.addSkill('fangquan2');
player.addTempSkill('fangquan2','phaseAfter');
player.addMark('fangquan2',1,false);
player.addTempSkill('refangquan2');
//player.storage.fangquan=result.targets[0];
}
@ -807,7 +813,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if(result.bool){
var target=result.targets[0];
event.target=target;
player.logSkill('xinfu_wuniang',target);
player.logSkill('meiyong',target);
player.gainPlayerCard(target,'he',true);
}
else event.finish();
@ -1679,6 +1685,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
},
translate:{
old_liushan:'手杀刘禅',
old_yuanshao:'手杀袁绍',
re_jikang:"手杀嵇康",
old_bulianshi:'手杀步练师',
old_caochun:'旧曹纯',
@ -1756,7 +1764,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
hujinding:'胡金定',
re_liushan:'界刘禅',
re_sunben:'界孙',
re_sunben:'界孙',
re_zhangzhang:'界张昭张纮',
rehunzi:'魂姿',
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"> ',
//仲村 ゆり
mobile_sunben:'那个男人',
//孙笨
}
};
});

View File

@ -4,7 +4,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
name:'old',
characterSort:{
old:{
old_shenhua:["yuji","zhangjiao","old_zhugezhan"],
old_shenhua:["yuji","zhangjiao","old_zhugezhan","old_guanqiujian"],
old_refresh:["old_zhangfei","old_huatuo"],
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"],
@ -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_yijiang5:["old_caoxiu","old_quancong","old_zhuzhi"],
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"],
},
},
character:{
old_huangfusong:['male','qun',4,['fenyue']],
old_majun:["male","wei",3,["xinfu_jingxie1","xinfu_qiaosi"],[]],
old_zhangxingcai:['female','shu',3,['oldshenxian','qiangwu']],
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_wuyi:['male','shu',4,['benxi']],
ol_liuyu:['male','qun',2,['zongzuo','zhige']],
old_guanqiujian:["male","wei",4,["drlt_zhenrong","drlt_hongju"],[]],
},
characterFilter:{
old_lingju:function(mode){
@ -882,6 +884,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
ol_liuyu:'OL刘虞',
old_fuhuanghou:'旧伏皇后',
old_caochong:'旧曹冲',
old_guanqiujian:'旧毌丘俭',
old_huangfusong:'旧皇甫嵩',
old_fuhun:'父魂',
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_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_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,
@ -60,7 +60,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
re_dianwei:["male","wei",4,["reqiangxi"],[]],
re_yanwen:["male","qun",4,["reshuangxiong"],[]],
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_menghuo:['male','shu',4,['huoshou','rezaiqi']],
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_jiangwei:['male','shu',4,['retiaoxin','zhiji']],
re_caiwenji:['female','qun',3,['rebeige','duanchang']],
re_liushan:['male','shu',3,['xiangle','refangquan','ruoyu'],['zhu']],
re_sunben:['male','wu',4,['jiang','rehunzi','zhiba'],['zhu']],
re_liushan:['male','shu',3,['xiangle','olfangquan','olruoyu'],['zhu']],
re_zhangzhang:['male','wu',3,['rezhijian','guzheng']],
re_sunce:['male','wu',4,['jiang','olhunzi','olzhiba'],['zhu']],
},
characterIntro:{
re_gongsunzan:'群雄之一。出身贵族,因母地位卑贱,只当了郡中小吏。他貌美,声音洪亮,机智善辩。后随卢植于缑氏山中读书,粗通经传。',
@ -87,6 +88,370 @@ game.import('character',function(lib,game,ui,get,ai,_status){
sunben:['zhouyu','taishici','daqiao'],
},
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:{
//mode:['identity','single','doudizhu'],
audio:2,
@ -235,7 +600,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player:['phaseBegin','phaseEnd','rehuashen'],
},
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;
},
addHuashen:function(player){
@ -250,7 +615,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
list.remove(current.name);
list.remove(current.name1);
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;
}
@ -2312,7 +2677,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
enable:'phaseUse',
usable:1,
position:'he',
filterCard:true,
filterCard:lib.filter.cardDiscardable,
discard:false,
lose:false,
delay:0,
selectCard:[1,Infinity],
check:function(card){
var player=_status.event.player;
@ -2325,11 +2693,19 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
content:function(){
'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'
player.draw(event.num+cards.length);
},
group:'rezhiheng_draw',
//group:'rezhiheng_draw',
subSkill:{
draw:{
trigger:{player:'loseEnd'},
@ -3981,7 +4357,25 @@ game.import('character',function(lib,game,ui,get,ai,_status){
re_pangtong:"界庞统",
xin_yuanshao:"界袁绍",
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:'雷击',
xinguidao:'鬼道',
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"]],
"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"],[]],
"zhugezhan":["male","shu",3,["xinfu_zuilun","xinfu_fuyin"],[]],
"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":"陈到,字叔至,生卒年不详,豫州汝南(今河南驻马店平舆县)人。三国时期蜀汉将领,刘备帐下白毦兵统领,名位常亚于赵云,以忠勇著称。蜀汉建兴年间,任征西将军、永安都督,封亭侯。在任期间去世。",
},
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":{
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;
},
filterTarget:function(card,player,target){
return target.countCards('hej')>0;
return target.countDiscardableCards(player,'ej')>0;
},
content:function(){
'step 0'
@ -261,7 +438,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
};
player.syncStorage('drlt_zhenrong');
player.$throw(cards);
player.discardPlayerCard(target,'hej',1);
player.discardPlayerCard(target,'ej',1,true);
};
},
ai:{
@ -842,7 +1019,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){
"drlt_wanglie":{
mod:{
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,
@ -850,7 +1035,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player:"useCard",
},
filter:function (event,player){
return _status.currentPhase==player;
return player.isPhaseUsing()&&(event.card.name=='sha'||get.type(event.card)=='trick');
},
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;
@ -1374,9 +1559,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
forced:true,
filter:function (event,player){
return player.getHistory('useCard',function(evt){
return (player.getHistory('useCard',function(evt){
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');
});
},
@ -1524,11 +1709,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){
ai:{
reverseOrder:true,
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:{
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,
@ -1554,28 +1743,40 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
return false;
},
check:function (event,player){
check:function (event,player){
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;
},
content:function(){
"step 0"
//player.storage.nzry_shicai.push(get.type(trigger.card,'trick'));
for(var i=0;i<trigger.cards.length;i++){
if(get.position(trigger.cards[i],true)=='o'){
trigger.cards[i].fix();
ui.cardPile.insertBefore(trigger.cards[i],ui.cardPile.firstChild);
game.log(player,'将',trigger.cards[i],'置于牌堆顶');
event.cards=trigger.cards.filterInD();
if(event.cards.length>1){
player.chooseButton(true,event.cards.length,['按顺序将卡牌置于牌堆顶(先选择的在上)',event.cards]).set('ai',function(button){
var value=get.value(button.link);
if(_status.event.reverse) return value;
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();
player.draw();
"step 1"
if(event.triggername=='useCardToTargeted'){
trigger.getParent().excluded.push(player);
}
},
},
"nzry_cunmu":{
@ -1697,13 +1898,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
content:function(){
'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);
});
'step 1'
if(result.bool){
player.storage.nzry_zhenliang=true;
player.discard(result.cards);
target.damage('nocard');
};
},
@ -1889,7 +2089,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
xinjushou:{
audio:'jushou',
audio:2,
trigger:{player:'phaseJieshuBegin'},
content:function(){
'step 0'
@ -1921,7 +2121,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
},
xinjiewei:{
audio:'yanzheng',
audio:2,
enable:'chooseToUse',
filterCard:true,
position:'e',
@ -2477,7 +2677,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
tiaoxin:{
audio:2,
audioname:['sp_jiangwei','xiahouba','re_jiangwei'],
audioname:['sp_jiangwei','xiahouba','re_jiangwei','gz_jiangwei'],
enable:'phaseUse',
usable:1,
filterTarget:function(card,player,target){
@ -2595,7 +2795,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
direct:true,
content:function(){
"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(){
if(!_status.event.fang) return false;
return game.hasPlayer(function(target){
@ -2611,6 +2811,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player.logSkill('fangquan');
trigger.cancel();
player.addSkill('fangquan2');
player.addMark('fangquan2',1,false);
//player.storage.fangquan=result.targets[0];
}
}
@ -2621,12 +2822,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){
popup:false,
audio:false,
//priority:-50,
onremove:true,
content:function(){
"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){
return 20-get.value(card);
};
"step 1"
"step 2"
if(result.bool){
player.chooseTarget(true,'请选择进行额外回合的目标角色',lib.filter.notMe).ai=function(target){
if(target.hasJudge('lebu')) return -1;
@ -2637,14 +2842,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
};
}
else event.finish();
"step 2"
"step 3"
var target=result.targets[0];
player.line(target,'fire');
target.markSkillCharacter('fangquan',player,'放权','进行一个额外回合');
target.insertPhase();
target.addSkill('fangquan3');
player.removeSkill('fangquan2');
//delete player.storage.fangquan;
if(event.count>0) event.goto(1);
}
},
fangquan3:{
@ -3008,7 +3212,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
jixi:{
audio:2,
audioname:['re_dengai'],
audioname:['re_dengai','gz_dengai'],
enable:'phaseUse',
filter:function(event,player){
return player.storage.tuntian.length>0;
@ -3536,7 +3740,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
audio:2,
trigger:{player:['phaseBegin','phaseEnd','huashenStart']},
filter:function(event,player,name){
if(name=='phaseBegin'&&game.phaseNumber==1) return false;
//if(name=='phaseBegin'&&game.phaseNumber==1) return false;
return true;
},
//priority:50,
@ -4328,7 +4532,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
gzyinghun:{
audio:'yinghun',
audioname:['sunce','re_sunben'],
audioname:['re_sunjian','sunce','re_sunben'],
trigger:{player:'phaseZhunbeiBegin'},
filter:function(event,player){
return player.getDamagedHp()>0;
@ -6020,7 +6224,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
},
gzbuqu:{
audio:'buqu',
audio:2,
trigger:{player:'changeHp'},
filter:function(event,player){
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_info":"觉醒技准备阶段若“荣”的数量大于或等于3且场上有角色死亡则你可以用任意张手牌替换等量的“荣”然后扣减一点体力上限并获得技能“清侧”",
"drlt_qingce":"清侧",
"drlt_qingce_info":"出牌阶段,你可以移去一张“荣”,然后弃置一名角色区域内的一张牌",
"drlt_qingce_info":"出牌阶段,你可以移去一张“荣”,然后弃置一名角色装备区或判定区内的一张牌。",
zhengrong:'征荣',
hongju:'鸿举',
qingce:'清侧',
qingce_backup:'清侧',
zhengrong_info:'当你使用带有「伤害」标签的基本牌或锦囊牌指定目标后,你可以将一名手牌数不小于你的目标角色的一张牌置于你的武将牌上,称为「荣」。',
hongju_info:'觉醒技准备阶段若你武将牌上「荣」的数量不小于3则你触发此技能。你可以用任意数量的手牌交换等量的「荣」。你减1点体力上限并获得技能〖清侧〗。',
qingce_info:'出牌阶段,你可以获得一张「荣」并弃置一张手牌,然后弃置场上的一张牌。',
jianchu:'鞬出',
jianchu_info:'当你使用【杀】指定一名角色为目标后,你可以弃置其一张牌,若以此法弃置的牌为装备牌,此【杀】不可被【闪】响应,若不为装备牌,该角色获得此【杀】',

View File

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

View File

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

View File

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

View File

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

View File

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

File diff suppressed because it is too large Load Diff

View File

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

View File

@ -1,8 +1,8 @@
window.noname_update={
version:'1.9.97.9',
update:'1.9.97.8.2',
version:'1.9.98',
update:'1.9.97.9',
changeLog:[
'家族之争',
'新界孙策,界刘禅,界袁绍,新皇甫嵩,新毌丘俭',
'BUG修复',
],
files:[
@ -11,10 +11,11 @@ window.noname_update={
//'card/sp.js',
'card/standard.js',
//'card/swd.js',
//'card/guozhan.js',
'card/mtg.js',
'card/guozhan.js',
//'card/gwent.js',
//'character/diy.js',
//'character/extra.js',
'character/extra.js',
//'character/hearth.js',
//'character/gujian.js',
//'character/gwent.js',
@ -24,23 +25,25 @@ window.noname_update={
'character/refresh.js',
'character/shenhua.js',
'character/sp.js',
//'character/tw.js',
'character/tw.js',
'character/standard.js',
'character/swd.js',
//'character/swd.js',
//'character/xianjian.js',
'character/xinghuoliaoyuan.js',
'character/yijiang.js',
//'character/yxs.js',
//'extension/boss/extension.js',
//'layout/default/layout.css',
//'mode/identity.js',
//'mode/doudizhu.js',
//'mode/guozhan.js',
'mode/identity.js',
'mode/doudizhu.js',
'mode/guozhan.js',
'mode/chess.js',
'mode/tafang.js',
//'mode/single.js',
//'mode/stone.js',
'mode/brawl.js',
//'mode/versus.js',
//'mode/boss.js',
'mode/versus.js',
'mode/boss.js',
'game/game.js',
//'game/NoSleep.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,
trigger:{player:'phaseBefore'},
trigger:{player:'phaseBegin'},
content:function(){
'step 0'
event.num1=3;
@ -2818,7 +2818,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
event.togain=[];
while(event.togain.length<event.num2){
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);
else break;
@ -8496,7 +8496,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
tinqin:'听琴',
boss_guihan:'归汉',
boss_guihan_info:'限定技濒死阶段你可以将体力回复至体力上限摸4张牌令所有敌人的技能恢复并获得技能【听琴】、【蕙质】',
boss_guihan_info:'限定技濒死阶段你可以将体力回复至体力上限摸4张牌令所有敌人的技能恢复失去技能【悲歌】和【胡笳】,并获得技能【听琴】、【蕙质】',
boss_huixin:'蕙质',
boss_huixin_info:'每当你于回合外失去牌,可以进行一次判定,若为黑色,当前回合角色失去一点体力,否则你回复一点体力并摸一张牌',
boss_hujia:'胡笳',

View File

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

View File

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

View File

@ -295,8 +295,9 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
_status.videoInited=true;
game.addVideo('init',null,info);
"step 6"
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:{
@ -625,13 +626,13 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
list.remove('shen');
if(list.length) player.group=function(){
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=='yl_yuanshu'){
if(player.identity=='zhong') list.remove('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);
else return game.zhu.group;
}

View File

@ -5,6 +5,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
canvasUpdates2:[],
start:function(){
"step 0"
_status.gameDrawed=true;
lib.init.css(lib.assetURL+'layout/mode','chess');
lib.init.css(lib.assetURL+'layout/mode','tafang');
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){
firstChoose=firstChoose.next;
}
game.gameDraw(firstChoose);
if(lib.configOL.replace_handcard){
game.replaceHandcards(firstChoose.previous);
}
game.gameDraw(firstChoose,function(player){
if(lib.configOL.replace_handcard&&player==firstChoose.previousSeat){
return 5;
}
return 4;
});
game.phaseLoop(firstChoose);
}
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_forced=true;
var firstChoose=_status.firstAct;
game.gameDraw(firstChoose);
if(get.config('replace_handcard_two')){
game.replaceHandcards(firstChoose.previous);
}
game.gameDraw(firstChoose,function(player){
if(player==_status.firstAct.previousSeat&&get.config('replace_handcard_two')){
return 5;
}
return 4;
});
game.phaseLoop(firstChoose);
}
else if(_status.mode=='endless'){
@ -5792,6 +5796,179 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
}
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){
if(_status.connectMode){
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;
}
}
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(!friend){
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);
}
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=[];
for(var i=0;i<game.players.length;i++){
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);
}
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=[];
for(var i=0;i<game.players.length;i++){
if(game.players[i].side){
@ -5944,32 +6071,10 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
}
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);
}
}
game.replacePlayerTwo(this,this.replacetwo);
delete this.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);
delete friend.replacetwo;
}
@ -5978,19 +6083,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
}
}
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;
}
else{
if(!friend){
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.enemy.remove(this);
if(source){
source.draw(2);
}
}
return;
}
@ -6112,24 +6202,6 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
game.over(true);
}
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);
}
}