v1.9.95.9

This commit is contained in:
Spmario233 2019-12-05 23:15:43 +08:00 committed by GitHub
parent fe66f8e9a0
commit ceee9f888e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 13853 additions and 13682 deletions

View File

@ -1508,7 +1508,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
},
nsfuhuo2:{
trigger:{player:'respondAfter'},
trigger:{player:['respondAfter','useCardAfter']},
forced:true,
priority:10,
mark:'card',
@ -1655,9 +1655,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if(Math.abs(targets[0].hp-targets[1].hp)==1){
player.loseHp();
}
//else{
//player.die();
//}
else{
player.die();
}
},
ai:{
order:10,
@ -3738,7 +3738,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
enable:"phaseUse",
usable:1,
filterTarget:function (card,player,target){
return target!=player&&!target.hasSkill('liangji_1');
return target!=player;
},
content:function (){
'step 0'
@ -5299,7 +5299,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
nsjianning:'奸佞',
nsjianning_info:'出牌阶段限一次,如果你的身份为内奸,你可以与一名手牌数比你少的角色交换手牌,并对其造成一点伤害',
nschangshi:'常仕',
nschangshi_info:'出牌阶段限一次如果你的身份为反贼你可以指定两名其他角色互换体力如果两名角色体力之差等于1你失去一点体力',
nschangshi_info:'出牌阶段限一次如果你的身份为反贼你可以指定两名其他角色互换体力如果两名角色体力之差等于1你失去一点体力,否则你立即死亡',
nsbaquan:'霸权',
nsbaquan_info:'回合结束时,你可以弃置所有手牌,并获得相应点数的护甲,你的新一回合开始时清除所有护甲',
nsbugua:'卜卦',
@ -5382,7 +5382,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
yiesheng:'回雪',
yiesheng_info:'出牌阶段,你可以弃置任意数量的黑色手牌,然后摸等量的牌。',
liangji:'环计',
liangji_info:'出牌阶段限一次,你可以选择一名武将牌上没以此法获得牌的其他角色并将一张手牌置于其武将牌上。目标角色于摸牌阶段开始时,获得此牌。若其为男性角色,则获得技能【无双】,若其为女性角色,则获得技能【离间】,直到回合结束。',
liangji_info:'出牌阶段限一次,你可以选择一名其他角色并将一张手牌置于其武将牌上。目标角色于摸牌阶段开始时,获得此牌。若其为男性角色,则获得技能【无双】,若其为女性角色,则获得技能【离间】,直到回合结束。',
chengmou:'逞谋',
chengmou_info:'摸牌阶段开始时,若你有“功”牌,你获得之并跳过摸牌阶段,若你所获得的“功”牌多于两张,你须失去一点体力。',
jugong:'居功',

View File

@ -1111,18 +1111,50 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
content:function(){
"step 0"
player.gain(get.cards(7))._triggered=null;
player.storage.qixing=game.cardsGotoSpecial(get.cards(7)).cards;
player.markSkill('qixing');
game.addVideo('storage',player,['qixing',get.cardsInfo(player.storage.qixing),'cards']);
"step 1"
if(player==game.me){
game.addVideo('delay',null);
}
player.chooseCard('选择七张牌作为星',7,true).ai=function(card){
return get.value(card);
player.chooseCard('选择任意张手牌与“星”交换',[1,Math.min(player.countCards('h'),player.storage.qixing.length)]).set('promptx',[player.storage.qixing]).ai=function(card){
var val=get.value(card);
if(val<0) return 10;
if(player.skipList.contains('phaseUse')){
return val;
}
return -val;
};
"step 2"
player.lose(result.cards,ui.special,'toStorage');
player.storage.qixing=result.cards;
game.addVideo('storage',player,['qixing',get.cardsInfo(player.storage.qixing),'cards']);
if(result.bool){
player.logSkill('qixing');
player.lose(result.cards,ui.special,'toStorage');
player.storage.qixing=player.storage.qixing.concat(result.cards);
player.syncStorage('qixing');
event.num=result.cards.length;
}
else{
event.finish();
}
"step 3"
player.chooseCardButton(player.storage.qixing,'选择'+event.num+'张牌作为手牌',event.num,true).ai=function(button){
var val=get.value(button.link);
if(val<0) return -10;
if(player.skipList.contains('phaseUse')){
return -val;
}
return val;
}
if(player==game.me&&!event.isMine()){
game.delay(0.5);
}
"step 4"
player.gain(result.links,'fromStorage');
for(var i=0;i<result.links.length;i++){
player.storage.qixing.remove(result.links[i]);
}
player.syncStorage('qixing');
if(player==game.me&&_status.auto){
game.delay(0.5);
}
},
mark:true,
intro:{
@ -1532,7 +1564,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
audio:true,
enable:['chooseToUse','chooseToRespond'],
prompt:function(){
return '将'+get.cnNumber(Math.max(1,_status.event.player.hp))+'张梅花牌当作闪打出';
return '将'+get.cnNumber(Math.max(1,_status.event.player.hp))+'张梅花牌当作闪使用或打出';
},
position:'he',
check:function(card,event){
@ -1686,7 +1718,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
audio:'longhun4',
enable:['chooseToUse','chooseToRespond'],
prompt:function(){
return '将至多两张梅花牌当作闪打出';
return '将至多两张梅花牌当作闪使用或打出';
},
position:'he',
check:function(card,event){
@ -2594,7 +2626,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
qixing_bg:'星',
qixing2:'七星',
qixing3:'七星',
qixing_info:'游戏开始共发你11张牌选4张作为手牌其余的面朝下置于一旁移出游戏称之为“星”。每当你于摸牌阶段摸牌后可用任意数量的手牌等量交换这些“星”。',
qixing_info:'游戏开始时,你将牌堆顶的七张牌置于你的武将牌上,称之为“星”。然后/摸牌阶段结束后,你可用任意数量的手牌等量交换这些“星”。',
dawu:'大雾',
dawu2_bg:'雾',
dawu2:'大雾',

View File

@ -6996,7 +6996,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
},
qiaodong:{
enable:['chooseToRespond'],
enable:['chooseToUse','chooseToRespond'],
filterCard:{type:'equip'},
filter:function(event,player){
return player.countCards('he',{type:'equip'})>0;

View File

@ -55,7 +55,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
old_zhuhuan:['male','wu',4,['youdi']],
old_zhuzhi:['male','wu',4,['anguo']],
old_machao:['male','qun',4,['zhuiji','cihuai']],
old_machao:['male','qun',4,['zhuiji','oldcihuai']],
old_zhugezhan:["male","shu",3,["old_zuilun","old_fuyin"]],
zhangliang:["male","qun",4,["old_jijun","old_fangtong"]],
old_guanzhang:['male','shu',4,['old_fuhun']],
@ -142,7 +142,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return '将一张手牌当'+get.translation(links[0][2])+'使用';
},
},
ai:{save:true},
ai:{save:true,respondShan:true},
},
"old_guhuo_guess":{
audio:'guhuo_guess',
@ -164,7 +164,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
trigger.line=false;
event.prompt=get.translation(player)+'声明了'+get.translation(trigger.card.name)+',是否质疑?';
event.guessers=game.filterPlayer(function(current){
return current!=player;
return current!=player&&current.hp>0;
});
event.guessers.sort(lib.sort.seat);
event.ally=[];
@ -517,7 +517,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
trigger:{player:'chooseToRespondBegin'},
filter:function(event,player){
if(event.responded) return false;
if(!event.filterCard({name:'shan'},player,event)&&!!event.filterCard({name:'sha'},player,event)) return false;
if(!event.filterCard({name:'shan'},player,event)&&!event.filterCard({name:'sha'},player,event)) return false;
if(player.hasSkill('zhenshan2')) return false;
var nh=player.countCards('h');
return game.hasPlayer(function(current){
@ -562,7 +562,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
return event.filterCard({name:'sha'},player,event)||
event.filterCard({name:'jiu'},player,event)||
event.filterCard({name:'tao'},player,event);
event.filterCard({name:'tao'},player,event)||
event.filterCard({name:'shan'},player,event);
},
chooseButton:{
dialog:function(event,player){
@ -578,6 +579,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if(event.filterCard({name:'jiu'},player,event)){
list.push(['基本','','jiu']);
}
if(event.filterCard({name:'shan'},player,event)){
list.push(['基本','','shan']);
}
return ui.create.dialog('振赡',[list,'vcard'],'hidden');
},
check:function(button){
@ -592,7 +596,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
else if(card.nature=='fire') return 2.92;
else return 2.9;
}
else if(card.name=='tao'){
else if(card.name=='tao'||card.name=='shan'){
return 4;
}
}
@ -639,7 +643,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
}
else{
if(event.filterCard({name:'tao'},player,event)){
if(event.filterCard({name:'tao'},player,event)||event.filterCard({name:'shan'},player,event)){
return 4;
}
if(event.filterCard({name:'sha'},player,event)){

View File

@ -41,7 +41,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
skill:{
reqingguo:{
audio:'qingguo',
enable:['chooseToRespond'],
enable:['chooseToRespond','chooseToUse'],
filterCard:function(card){
return get.color(card)=='black';
},
@ -813,21 +813,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
mark:true,
mod:{
cardEnabled:function (){
return false;
},
cardUsable:function (){
return false;
},
cardRespondable:function (){
return false;
},
cardSavable:function (){
return false;
cardEnabled2:function (card){
if(get.position(card)=='h') return false;
},
},
intro:{
content:"不能使用或打出牌",
content:"不能使用或打出手牌",
},
},
"new_repaoxiao":{

View File

@ -200,7 +200,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if(num>player.countCards('h')) num=player.countCards('h');
player.chooseCard('h',[1,num],'请选择需要替换“荣”的手牌').set('ai',function(card){
return 5-get.value(card);
}).set('promptx',[player.storage.drlt_zhengrong]);
});
'step 1'
if(result.bool){
event.cards=result.cards;
@ -763,16 +763,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
'drlt_xiongluan2':{
mod:{
cardEnabled:function(card,player){
if(get.position(card)=='h') return false;
},
cardUsable:function(card,player){
if(get.position(card)=='h') return false;
},
cardRespondable:function(card,player){
if(get.position(card)=='h') return false;
},
cardSavable:function(card,player){
cardEnabled2:function(card,player){
if(get.position(card)=='h') return false;
},
},
@ -1486,7 +1477,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
'step 1'
if(result.bool){
player.storage.nzry_chenglve1=result.cards;
player.syncStorage('nzry_chenglve1');
player.addTempSkill('nzry_chenglve1',{player:'phaseAfter'});
};
},
@ -1543,21 +1533,21 @@ game.import('character',function(lib,game,ui,get,ai,_status){
audio:2,
prompt2:"当你使用牌指定目标时,若此牌与你本回合使用的牌类型均不同(包括装备牌),则你可以将此牌置于牌堆顶,然后摸一张牌",
trigger:{
player:['useCardAfter','respondAfter'],
target:'useCardToTargeted',
player:['useCard','useCardAfter'],
},
filter:function (event,player,name){
if(name=='useCardToTargeted'&&(event.player!=player||get.type(event.card)!='equip')) return false;
if(name=='useCard'&&!['equip','delay'].contains(get.type(event.card))) return false;
if(name=='useCardAfter'&&['equip','delay'].contains(get.type(event.card))) return false;
return ((event.name=='respond'&&event.card.name=='shan'&&event.parent.parent.name=='sha')||event.name=='useCardToTargeted'||event.name=='useCard')&&event.cards.length>0&&player.storage.nzry_shicai!=undefined&&!player.storage.nzry_shicai.contains(get.type(event.card,'trick'));
return event.cards.filterInD().length>0&&player.storage.nzry_shicai!=undefined&&!player.storage.nzry_shicai.contains(get.type(event.card,'trick'));
},
check:function (event,player){
if(get.type(event.card)=='equip'){
return get.equipResult(player,player,event.card.name)<=0;
}
return true;
return event.card.name!='lebu'&&event.card.name!='bingliang';
},
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])=='d'){
@ -1568,8 +1558,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
};
game.updateRoundNumber();
player.draw();
if(event.triggername=='useCardToTargeted'){
trigger.getParent().excluded.push(player);
"step 1"
if(event.triggername=='useCard'&&['equip','delay'].contains(get.type(trigger.card))){
trigger.cancel();
game.broadcastAll(ui.clear);
}
},
},
@ -1834,7 +1826,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
'2':{
audio:2,
trigger:{
player:'damageEnd',
player:'damageAfter',
},
filter:function (event,player){
return player.countCards('he')>0&&event.source&&event.source!=player&&player.storage.nzry_shenshi==true;
@ -5353,7 +5345,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
releiji:{
audio:2,
audioname:['boss_qinglong'],
trigger:{player:'respond'},
trigger:{player:['useCard','respond']},
filter:function(event,player){
return event.card.name=='shan';
},
@ -6163,7 +6155,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
leiji:{
audio:2,
trigger:{player:'respond'},
trigger:{player:['useCard','respond']},
filter:function(event,player){
return event.card.name=='shan';
},

File diff suppressed because it is too large Load Diff

View File

@ -95,7 +95,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
audioname:['re_caocao'],
unique:true,
zhuSkill:true,
trigger:{player:'chooseToRespondBegin'},
trigger:{player:['chooseToRespondBegin','chooseToUse']},
filter:function(event,player){
if(event.responded) return false;
if(player.storage.hujiaing) return false;
@ -457,7 +457,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player.judge(function(card){
if(get.color(card)=='black') return 1.5;
return -1.5;
},ui.special);
});
"step 1"
if(result.judge>0){
event.cards.push(result.card);
@ -470,13 +470,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
else{
for(var i=0;i<event.cards.length;i++){
if(get.position(event.cards[i])!='s'){
if(get.position(event.cards[i])!='d'){
event.cards.splice(i,1);i--;
}
}
player.gain(event.cards);
if(event.cards.length){
player.$draw(event.cards);
player.gain(event.cards,'gain2');
}
event.finish();
}
@ -485,9 +484,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
event.goto(0);
}
else{
player.gain(event.cards);
if(event.cards.length){
player.$draw(event.cards);
player.gain(event.cards,'gain2');
}
}
}
@ -555,7 +553,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
qingguo:{
audio:2,
enable:['chooseToRespond'],
enable:['chooseToRespond','chooseToUse'],
filterCard:function(card){
return get.color(card)=='black';
},
@ -563,7 +561,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
viewAsFilter:function(player){
if(!player.countCards('h',{color:'black'})) return false;
},
prompt:'将一张黑色手牌当闪打出',
prompt:'将一张黑色手牌当闪使用或打出',
check:function(){return 1},
ai:{
respondShan:true,
@ -1378,10 +1376,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
shan:{
audio:'longdan_sha',
audioname:['re_zhaoyun'],
enable:['chooseToRespond'],
enable:['chooseToRespond','chooseToUse'],
filterCard:{name:'sha'},
viewAs:{name:'shan'},
prompt:'将一张杀当闪打出',
prompt:'将一张杀当闪使用或打出',
check:function(){return 1},
viewAsFilter:function(player){
if(!player.countCards('h','sha')) return false;

View File

@ -1357,7 +1357,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
},
shan:{
trigger:{player:'chooseToRespondBegin'},
trigger:{player:['chooseToRespondBegin','chooseToUseBegin']},
filter:function(event,player){
if(!player.isLinked()) return false;
if(event.responded) return false;
@ -1690,7 +1690,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
},
hyunshen:{
trigger:{player:'respond'},
trigger:{player:['respond','useCard']},
filter:function(event,player){
return event.card.name=='shan';
},
@ -1743,7 +1743,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
hlingbo:{
audio:['lingbo',2],
trigger:{player:'respond'},
trigger:{player:['respond','useCard']},
filter:function(event,player){
return event.card.name=='shan';
},
@ -2374,7 +2374,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if(num==0) return false;
return num%2==1;
},
prompt:'将一张手牌当作闪打出',
prompt:'将一张手牌当作闪使用或打出',
check:function(card){return 6-get.value(card)}
},
yaotong3:{
@ -6426,7 +6426,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
},
shengong:{
trigger:{player:'chooseToRespondBegin'},
trigger:{player:['chooseToRespondBegin']},
filter:function(event,player){
if(event.responded) return false;
if(!player.countCards('he')) return false;
@ -6714,7 +6714,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
filterCard:{color:'red'},
viewAs:{name:'shan'},
position:'he',
prompt:'将一张红色牌当闪打出',
prompt:'将一张红色牌当闪使用或打出',
check:function(card){return 6-get.value(card)}
},
duoren:{

View File

@ -2360,7 +2360,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
},
zhangmu:{
trigger:{player:'chooseToRespondBegin'},
trigger:{player:['chooseToRespondBegin','chooseToUseBegin']},
filter:function(event,player){
if(event.responded) return false;
if(!event.filterCard({name:'shan'})) return false;
@ -2756,7 +2756,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
},
feixu:{
trigger:{global:'respond'},
trigger:{global:['useCard','respond']},
filter:function(event,player){
return event.card&&event.card.name=='shan';
},

View File

@ -454,10 +454,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
event.directindex=result.index;
}
if(event.directindex==1){
target.chooseUseTarget({name:'sha'},cards,true)
target.chooseUseTarget({name:'sha'},cards,true,false)
}
else{
target.chooseUseTarget(card,true);
target.chooseUseTarget(card,true,false,'nodistance');
}
},
ai:{
@ -1124,8 +1124,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
if(event.num>1) player.draw(2);
if(event.num>2){
player.addTempSkill('lingren_jianxiong',{player:'phaseBefore'});
player.addTempSkill('lingren_xingshang',{player:'phaseBefore'});
player.addTempSkill('lingren_jianxiong',{player:'phaseBegin'});
player.addTempSkill('lingren_xingshang',{player:'phaseBegin'});
}
},
ai:{
@ -2303,7 +2303,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
filter:function (event,player){
if(player.storage.xinfu_yanyu2>=3) return false;
var evt=event.getParent();
if(evt&&evt.name=='useCard') return false;
if(evt&&(evt.name=='useCard'||evt.name=='respond')) return false;
var type=player.storage.xinfu_yanyu;
var cards=event.cards;
for(var i=0;i<cards.length;i++){
@ -3854,7 +3854,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
filter:function (event,player){
if(player.hasSkill('guhuo_phase'))return false;
if(!player.countCards('h')) return false;
var list=['sha','tao','jiu','taoyuan','wugu','juedou','huogong','jiedao','tiesuo','guohe','shunshou','wuzhong','wanjian','nanman'];
var list=['sha','shan','tao','jiu','taoyuan','wugu','juedou','huogong','jiedao','tiesuo','guohe','shunshou','wuzhong','wanjian','nanman'];
if(get.mode()=='guozhan'){
list=list.concat(['xietianzi','shuiyanqijunx','lulitongxin','lianjunshengyan','chiling','diaohulishan','yuanjiao','huoshaolianying']);
}
@ -3897,7 +3897,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return '将一张手牌做当'+get.translation(links[0][2])+'使用';
},
},
ai:{save:true},
ai:{
save:true,
respondShan:true,
skillTagFilter:function(player){
if(player.hasSkill('guhuo_phase')) return false;
},
},
},
"guhuo_guess":{
audio:2,
@ -4674,7 +4680,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
"yizan_respond_shan":{
complexCard:true,
audio:2,
enable:["chooseToRespond"],
enable:["chooseToUse","chooseToRespond"],
filterCard:function (card,player,target){
if(player.storage.yizan) return get.type(card)=='basic';
else if(ui.selected.cards.length){
@ -4703,7 +4709,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
prompt:function (){
var player=_status.event.player;
var str=!player.storage.yizan?'两张牌(其中至少应有一张基本牌)':'一张基本牌';
return '将'+str+'当做闪打出';
return '将'+str+'当做闪使用或打出';
},
check:function (card){
if(!ui.selected.cards.length&&get.type(card)=='basic') return 6;
@ -4758,7 +4764,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
silent:true,
popup:false,
trigger:{
player:["respond","useCard"],
player:["respond","useCard1"],
},
filter:function (event,player){
if(event.skill!='yizan_respond_sha'&&event.skill!='yizan_respond_shan'&&event.skill!='yizan_use_backup') return false;
@ -5273,29 +5279,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
},
"rw_bagua_skill":{
equipSkill:true,
inherit:"bagua_skill",
trigger:{
player:"chooseToRespondBegin",
},
filter:function (event,player){
if(player.hasSkillTag('unequip2')) return false;
if(event.responded) return false;
if(!event.filterCard({name:'shan'})) return false;
if(!lib.filter.cardRespondable({name:'shan'},player,event)) return false;
var evt=event.getParent();
if(evt.player&&evt.player.hasSkillTag('unequip',false,{
name:evt.card?evt.card.name:null,
target:player,
card:evt.card
})) return false;
return true;
},
audio:"bagua_skill",
check:function (event,player){
if(get.damageEffect(player,event.player,player)>=0) return false;
return true;
},
content:function (){
"step 0"
player.judge('rewrite_bagua',function(card){return (get.suit(card)!='spade')?1.5:-0.5});
@ -5306,19 +5291,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
trigger.result={bool:true,card:{name:'shan'}}
}
},
ai:{
effect:{
target:function (card,player,target,effect){
if(player.getEquip('qinggang')&&card.name=='sha'||target.hasSkillTag('unequip2')) return;
if(player.hasSkillTag('unequip',false,{
name:card?card.name:null,
target:player,
card:card
})) return;
if(get.tag(card,'respondShan')) return 0.5;
},
},
},
},
"rw_baiyin_skill":{
equipSkill:true,
@ -5346,7 +5318,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
"rw_lanyinjia":{
equipSkill:true,
inherit:"lanyinjia",
enable:["chooseToRespond"],
enable:["chooseToRespond","chooseToUse"],
filterCard:true,
viewAs:{
name:"shan",
@ -5354,7 +5326,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
viewAsFilter:function (player){
if(!player.countCards('h')) return false;
},
prompt:"将一张手牌当闪打出",
prompt:"将一张手牌当闪使用或打出",
check:function (card){
return 6-get.value(card);
},

View File

@ -585,8 +585,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
else{
player.chooseTarget('是否对'+get.translation(target)+'或其攻击范围内的一名角色造成1点伤害',function(card,player,target){
return target==event.target||get.distance(event.target,target,'attack')<=1;
}).ai=function(target){
return target==_status.event.targetx||get.distance(_status.event.targetx,target,'attack')<=1;
}).set('targetx',event.target).ai=function(target){
var player=_status.event.player;
return get.damageEffect(target,player,player)
};
@ -756,7 +756,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
content:function(){
"step 0"
targets[0].chooseCard('交给'+get.translation(player)+'一张【杀】或武器牌,否则视为对'+get.translation(targets[1])+'使用一张【杀】','he',function(card){
return card.name=='sha'||get.subtype(card)=='equip1';
return get.name(card)=='sha'||get.subtype(card)=='equip1';
}).ai=function(card){
var player=_status.event.player;
var target=_status.event.getParent('xinzhige').targets[1];
@ -1008,12 +1008,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
xintaoluan4:{
audio:'taoluan',
prompt:'将一张牌当做闪使用',
enable:'chooseToRespond',
enable:'chooseToUse',
filter:function(event,player){
if(event.parent.name!='sha') return false;
return !player.storage.xintaoluan.contains('shan')&&!player.hasSkill('xintaoluan3')&&!_status.dying.length;
},
onrespond:function(result,player){
onuse:function(result,player){
player.storage.xintaoluan.add('shan');
},
filterCard:true,
@ -1072,7 +1071,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
},
xintaoluan6:{
trigger:{player:'phaseAfter'},
trigger:{global:'phaseAfter'},
silent:true,
content:function(){
player.storage.xintaoluan=[];
@ -2456,7 +2455,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
return 10-val;
}
}).set('four',four).set('suits2',suits2).set('nofour',nofour);
}).set('four',four).set('suits2',suits2).set('nofour',nofour).set('promptx',[player.storage.bizhuan]);
event.four=four;
event.nofour=nofour;
"step 1"
@ -3113,15 +3112,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
prompt2+='名'+get.translation(trigger.card)+'的目标'
player.chooseTarget([1,player.storage.fumian_red],get.prompt('fumian'),function(card,player,target){
var trigger=_status.event.getTrigger();
var player=_status.event.player;
if(trigger.targets.contains(target)) return false;
return lib.filter.targetEnabled2(trigger.card,player,target);
if(_status.event.targets.contains(target)) return false;
return lib.filter.targetEnabled2(_status.event.card,player,target);
}).set('prompt2',prompt2).set('ai',function(target){
var trigger=_status.event.getTrigger();
var player=_status.event.player;
return get.effect(target,trigger.card,player,player);
});
}).set('targets',trigger.targets).set('card',trigger.card);
'step 1'
if(result.bool){
if(!event.isMine()) game.delayx();
@ -3681,12 +3679,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
taoluan3:{},
taoluan4:{
prompt:'将一张牌当做闪使用',
enable:'chooseToRespond',
enable:'chooseToUse',
filter:function(event,player){
if(event.parent.name!='sha') return false;
return !player.storage.taoluan.contains('shan')&&!player.hasSkill('taoluan3')&&!_status.dying.length;
},
onrespond:function(result,player){
onuse:function(result,player){
player.storage.taoluan.add('shan');
},
filterCard:true,
@ -4525,7 +4522,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
event.tothrow.push(cards[i]);
}
}
game.cardsDiscard(event.tothrow);
while(event.tothrow.length){
ui.cardPile.insertBefore(event.tothrow.pop(),ui.cardPile.firstChild);
}
}
else{
target.addSkill('duliang2');
@ -4538,6 +4537,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
target.gain(event.cards2,'draw');
game.log(target,'获得了'+get.cnNumber(event.cards2.length)+'张牌');
}
game.updateRoundNumber();
},
ai:{
order:4,
@ -4857,7 +4857,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
group:['jieyue3','jieyue4']
},
jieyue3:{
enable:['chooseToRespond'],
enable:['chooseToRespond','chooseToUse'],
filterCard:function(card){
return get.color(card)=='red';
},
@ -4866,7 +4866,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if(!player.countCards('h',{color:'red'})) return false;
},
audio:true,
prompt:'将一张红色手牌当闪打出',
prompt:'将一张红色手牌当闪使用或打出',
check:function(){return 1},
ai:{
respondShan:true,
@ -5482,14 +5482,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){
var cards=trigger.responded.cards;
event.cards=cards;
player.chooseTarget('忠勇:将'+get.translation(trigger.responded.cards)+'交给一名角色',function(card,player,target){
return target!=_status.event.getTrigger().target;
return target!=_status.event.source;
}).set('ai',function(target){
var att=get.attitude(_status.event.player,target);
if(target.countCards('h','shan')&&target.countCards('h')>=2){
att/=1.5;
}
return att;
});
}).set('source',trigger.target);
"step 1"
if(result.bool){
player.logSkill('zhongyong',result.targets);
@ -5502,19 +5502,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
event.finish();
}
"step 2"
if(player.hasSkill('jiu')){
game.broadcastAll(function(player){
player.removeSkill('jiu');
},player);
event.jiu=true;
}
player.chooseToUse('是否对'+get.translation(trigger.target)+'再使用一张杀?',
{name:'sha'},trigger.target,-1);
"step 3"
if(result.bool);
else if(event.jiu){
player.addSkill('jiu');
}
}
},
xinzhongyong:{
@ -5531,10 +5520,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
event.cards2=trigger.responded.cards.slice(0);
}
player.chooseTarget(get.prompt2('zhongyong'),function(card,player,target){
return target!=_status.event.getTrigger().target&&target!=player;
return target!=_status.event.source&&target!=player;
}).set('ai',function(target){
return get.attitude(_status.event.player,target);
});
}).set('source',trigger.target);
"step 1"
if(result.bool){
event.target=result.targets[0];
@ -5699,12 +5688,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
shifei:{
audio:2,
trigger:{player:'chooseToRespondBegin'},
trigger:{player:['chooseToRespondBegin','chooseToUseBegin']},
filter:function(event,player){
if(!_status.currentPhase) return false;
if(event.responded) return false;
if(!event.filterCard({name:'shan'})) return false;
if(!lib.filter.cardRespondable({name:'shan'},player,event)) return false;
if(event.name!='chooseToUse'&&!lib.filter.cardRespondable({name:'shan'},player,event)) return false;
return true;
},
check:function(event,player){
@ -6234,8 +6223,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
filterCard:true,
selectCard:-1,
filter:function(event,player){
if(!player.countCards('h')) return false;
if(player.storage.zhanjue>=2) return false;
var hs=player.getCards('h');
if(!hs.length) return false;
for(var i=0;i<hs.length;i++){
var mod2=game.checkMod(hs[i],player,'unchanged','cardEnabled2',player);
if(mod2===false) return false;
}
return true;
},
viewAs:{name:'juedou'},
@ -6427,8 +6421,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
else if(event.current.group=='shu'){
var next=event.current.chooseToRespond('是否替'+get.translation(player)+'对'+get.translation(target)+'使用一张杀',
function(card){
var evt=_status.event.getParent();
return evt.player.canUse(card,evt.target)&&card.name=='sha';
var evt=_status.event.source;
return card.name=='sha'||evt.source.canUse(card,evt.target);
});
next.set('ai',function(card){
var event=_status.event;
@ -6488,10 +6482,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
content:function(){
'step 0'
player.chooseTarget(get.prompt('zuoding'),'令一名目标角色摸一张牌',function(card,player,target){
return _status.event.getTrigger().targets.contains(target);
return _status.event.targets.contains(target);
}).set('ai',function(target){
return get.attitude(_status.event.player,target);
});
}).set('targets',trigger.targets);
'step 1'
if(result.bool){
player.logSkill('zuoding',result.targets);
@ -6513,59 +6507,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
huomo:{
audio:2,
trigger:{player:'chooseToRespondBegin'},
filter:function(event,player){
if(event.responded) return false;
if(!event.filterCard({name:'shan'})) return false;
if(!lib.filter.cardRespondable({name:'shan'},player,event)) return false;
if(player.storage.huomo&&player.storage.huomo.shan) return false;
if(event.parent.name!='sha') return false;
var hs=player.getCards('he',{color:'black'});
for(var i=0;i<hs.length;i++){
if(get.type(hs[i])!='basic'){
break;
}
}
if(i==hs.length) return false;
return true;
},
direct:true,
content:function(){
"step 0"
player.chooseCard(get.prompt2('huomo'),'he',function(card){
return get.type(card)!='basic'&&get.color(card)=='black';
}).set('ai',function(card){
if(!_status.event.player.countCards('h','shan')){
return 8-get.value(card);
}
return 6-get.value(card);
});
"step 1"
if(result.bool){
trigger.untrigger();
trigger.responded=true;
trigger.result={bool:true,card:{name:'shan'}}
player.lose(result.cards,ui.special);
player.$throw(result.cards);
event.card=result.cards[0];
player.logSkill('huomo');
if(!player.storage.huomo) player.storage.huomo={};
player.storage.huomo.shan=true;
}
else{
event.finish();
}
'step 2'
if(player==game.me&&event.card){
game.delay();
}
'step 3'
if(event.card){
event.card.fix();
ui.cardPile.insertBefore(event.card,ui.cardPile.firstChild);
game.updateRoundNumber();
}
},
group:['huomo_count','huomo_count2','huomo_use']
},
huomo2:{},
@ -6573,18 +6514,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){
init:function(player){
player.storage.huomo={};
},
trigger:{global:'phaseZhunbeiBegin'},
trigger:{global:'phaseBefore'},
silent:true,
content:function(){
player.storage.huomo={};
}
},
huomo_count2:{
trigger:{player:['useCard','respond']},
trigger:{player:['useCard']},
silent:true,
filter:function(event){
if(get.type(event.card)!='basic') return false;
return event.name=='useCard'||(event.card.name=='shan'&&event.getParent(2).name=='sha');
return get.type(event.card)=='basic';
},
content:function(){
if(!player.storage.huomo) player.storage.huomo={};
@ -6597,6 +6537,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if(!player.storage.huomo) player.storage.huomo={};
if((!player.storage.huomo.sha&&event.filterCard({name:'sha'},player,event))||
(!player.storage.huomo.jiu&&event.filterCard({name:'jiu'},player,event))||
(!player.storage.huomo.shan&&event.filterCard({name:'shan'},player,event))||
(!player.storage.huomo.tao&&event.filterCard({name:'tao'},player,event))){
return player.hasCard(function(card){
return get.color(card)=='black'&&get.type(card)!='basic';
@ -6615,6 +6556,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if(!player.storage.huomo.tao&&event.filterCard({name:'tao'},player,event)){
list.push(['基本','','tao']);
}
if(!player.storage.huomo.shan&&event.filterCard({name:'shan'},player,event)){
list.push(['基本','','shan']);
}
if(!player.storage.huomo.jiu&&event.filterCard({name:'jiu'},player,event)){
list.push(['基本','','jiu']);
}
@ -6629,6 +6573,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
switch(button.link[2]){
case 'tao':return 5;
case 'jiu':return 3.01;
case 'shan':return 3.01;
case 'sha':
if(button.link[3]=='fire') return 2.95;
else if(button.link[3]=='fire') return 2.92;
@ -6819,6 +6764,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
unique:true,
limited:true,
mark:null,
content:function(){
'step 0'
player.storage.xingshuai=true;
@ -6953,6 +6899,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
trigger:{global:'phaseAfter'},
forced:true,
popup:false,
charlotte:true,
content:function(){
if(lib.config.glow_phase){
if(_status.currentPhase){
@ -7338,7 +7285,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
},
mieji:{
trigger:{player:'useCard'},
trigger:{player:'useCard2'},
direct:true,
audio:2,
filter:function(event,player){
@ -7348,13 +7295,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
content:function(){
"step 0"
player.chooseTarget(get.prompt('mieji'),'为'+get.translation(trigger.card)+'增加一个额外目标',function(card,player,target){
var trigger=_status.event.getTrigger();
var trigger=_status.event;
return lib.filter.filterTarget(trigger.card,player,target)&&target!=trigger.targets[0];
}).set('autodelay',true).set('ai',function(target){
var trigger=_status.event.getTrigger();
var player=_status.event.player;
return get.effect(target,trigger.card,player,player);
});
}).set('targets',trigger.targets).set('card',trigger.card);
"step 1"
if(result.bool){
trigger.targets.push(result.targets[0]);
@ -7579,18 +7526,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
delete player.storage.qianxi2;
},
mod:{
cardEnabled:function(card,player){
cardEnabled2:function(card,player){
if(get.color(card)==player.storage.qianxi2) return false;
},
cardUsable:function(card,player){
if(get.color(card)==player.storage.qianxi2) return false;
},
cardRespondable:function(card,player){
if(get.color(card)==player.storage.qianxi2) return false;
},
cardSavable:function(card,player){
if(get.color(card)==player.storage.qianxi2) return false;
}
},
intro:{
content:function(color){
@ -7715,14 +7653,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
if(goon){
player.chooseTarget('巧说:是否额外指定一名'+get.translation(trigger.card)+'的目标?',function(card,player,target){
var trigger=_status.event.getTrigger();
var trigger=_status.event;
if(trigger.targets.contains(target)) return false;
return lib.filter.targetEnabled2(trigger.card,_status.event.player,target);
}).set('ai',function(target){
var trigger=_status.event.getTrigger();
var player=_status.event.player;
return get.effect(target,trigger.card,player,player);
});
}).set('targets',trigger.targets).set('card',trigger.card);
}
else{
if(!info.multitarget&&trigger.targets&&trigger.targets.length>1){
@ -7745,11 +7683,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
event.finish();
'step 3'
player.chooseTarget('巧说:是否减少一名'+get.translation(trigger.card)+'的目标?',function(card,player,target){
return _status.event.getTrigger().targets.contains(target);
return _status.event.targets.contains(target);
}).set('ai',function(target){
var trigger=_status.event.getTrigger();
return -get.effect(target,trigger.card,trigger.player,_status.event.player);
});
}).set('targets',trigger.targets);
'step 4'
if(result.bool){
event.targets=result.targets;
@ -7969,8 +7907,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
},
dingpin:{
group:['dingpin3','dingpin4'],
enable:'phaseUse',
usable:3,
//usable:3,
audio:2,
filter:function(event,player){
return player.countCards('h')>0;
@ -7978,12 +7917,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){
filterTarget:function(card,player,target){
return target.hp<target.maxHp&&!target.tempSkills.dingpin2;
},
filterCard:true,
filterCard:function(card,player){
return !player.storage.dingpin.contains(get.type(card,'trick'));
},
check:function(card){
return 6-get.value(card);
},
content:function(){
"step 0"
player.storage.dingpin.push(get.type(cards[0],'trick'));
target.judge(function(card){
return get.color(card)=='black'?1:-1;
});
@ -8008,6 +7950,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
},
dingpin2:{},
dingpin3:{
trigger:{player:'useCard'},
silent:true,
content:function(){player.storage.dingpin.add(get.type(trigger.card,'trick'))},
},
dingpin4:{
trigger:{player:'phaseUseBefore'},
silent:true,
content:function(){player.storage.dingpin=[]},
},
faen:{
audio:2,
trigger:{global:['turnOverAfter','linkAfter']},
@ -8073,13 +8025,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
"step 0"
player.chooseTarget(get.prompt2('chanhui'),function(card,player,target){
if(player==target) return false;
var trigger=_status.event.getTrigger();
var trigger=_status.event;
return player.canUse(trigger.card,target)&&trigger.targets.contains(target)==false;
}).set('ai',function(target){
var trigger=_status.event.getTrigger();
var player=_status.event.player;
return get.effect(target,trigger.card,player,player)+0.01;
});
}).set('targets',trigger.targets).set('card',trigger.card);
"step 1"
if(result.bool){
game.delay(0,200);
@ -8442,12 +8394,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
content:function(){
"step 0"
player.chooseTarget(get.prompt2('oldqiuyuan'),function(card,player,target){
return target!=player&&!_status.event.getTrigger().targets.contains(target)&&_status.event.getTrigger().player.canUse('sha',target,false)&&target.countCards('h');
return target!=player&&!_status.event.targets.contains(target)&&_status.event.playerx.canUse('sha',target,false)&&target.countCards('h');
}).set('ai',function(target){
var trigger=_status.event.getTrigger();
var player=_status.event.player;
return get.effect(target,trigger.card,trigger.player,player)+0.1;
});
}).set('targets',trigger.targets).set('playerx',trigger.player);
"step 1"
if(result.bool){
var target=result.targets[0];
@ -8483,12 +8435,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
content:function(){
"step 0"
player.chooseTarget(get.prompt2('qiuyuan'),function(card,player,target){
return target!=player&&!_status.event.getTrigger().targets.contains(target)&&_status.event.getTrigger().player.canUse('sha',target,false);
return target!=player&&!_status.event.targets.contains(target)&&_status.event.playerx.canUse('sha',target,false);
}).set('ai',function(target){
var trigger=_status.event.getTrigger();
var player=_status.event.player;
return get.effect(target,trigger.card,trigger.player,player)+0.1;
});
}).set('targets',trigger.targets).set('playerx',trigger.player);
"step 1"
if(result.bool){
var target=result.targets[0];
@ -9621,7 +9573,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
usable:1,
audio:'qice_backup',
filter:function(event,player){
return player.countCards('h')>0
var hs=player.getCards('h');
if(!hs.length) return false;
for(var i=0;i<hs.length;i++){
var mod2=game.checkMod(hs[i],player,'unchanged','cardEnabled2',player);
if(mod2===false) return false;
}
return true;
},
chooseButton:{
dialog:function(player){
@ -10857,11 +10815,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
content:function(){
"step 0"
var next=player.chooseCardButton(get.prompt('zpaiyi'),player.storage.zyexin);
next.filterButton=function(button){
next.set('filterButton',function(button){
var type=get.type(button.link);
if(type=='delay'||type=='equip') return true;
return false;
};
});
next.ai=function(button){
return get.value(button.link);
}
@ -11265,7 +11223,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
xiantu3:'献图',
xiantu_info:'一名其他角色的出牌阶段开始时你可以摸两张牌然后交给其两张牌。若如此做此阶段结束时若该角色未于此阶段内杀死过角色则你失去1点体力。',
dingpin:'定品',
dingpin_info:'出牌阶段限三次你可以弃置一张手牌然后令一名已受伤的角色进行一次判定若结果为黑色该角色摸X张牌(X为该角色已损失的体力值),然后你本回合不能再对其发动〖定品〗;若结果为红色,将你的武将牌翻面。',
dingpin_info:'出牌阶段你可以弃置一张手牌然后令一名已受伤的角色进行一次判定若结果为黑色该角色摸X张牌(X为该角色已损失的体力值),然后你本回合不能再对其发动〖定品〗;若结果为红色,将你的武将牌翻面。(你不能弃置本回合已弃置或使用过的类型的牌)',
faen:'法恩',
faen_info:'当一名角色翻至正面或横置后,你可以令其摸一张牌。',
jyzongshi:'纵适',

View File

@ -521,7 +521,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
},
taiji:{
trigger:{player:'respond'},
trigger:{player:['useCard','respond']},
filter:function(event,player){
return event.card.name=='shan'&&player.hasSha();
},
@ -1414,14 +1414,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
},
jimin:{
enable:['chooseToRespond'],
enable:['chooseToRespond','chooseToUse'],
filterCard:true,
viewAs:{name:'shan'},
viewAsFilter:function(player){
if(!player.countCards('h')) return false;
if(player.countCards('e')) return false;
},
prompt:'将一张手牌当闪打出',
prompt:'将一张手牌当闪使用或打出',
check:function(){return 1},
ai:{
respondShan:true,
@ -1646,7 +1646,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
},
tuqiang:{
trigger:{player:'respond'},
trigger:{player:['respond','useCard']},
filter:function(event,player){
return event.card&&event.card.name=='shan';
},