This commit is contained in:
libccy 2017-07-13 10:23:11 +08:00
parent 798fbe90a7
commit ab47ebad77
10 changed files with 67 additions and 66 deletions

View File

@ -850,7 +850,8 @@ game.import('card',function(lib,game,ui,get,ai,_status){
global:'g_shihuifen', global:'g_shihuifen',
content:function(){ content:function(){
'step 0' 'step 0'
_status.currentPhase.chooseToRespond({name:'shan'},'石灰粉<br><div style="height:10px;display:block"></div><div class="text">打出一张闪,否则本回合无法对其他角色使用卡牌'); var next=_status.currentPhase.chooseToRespond({name:'shan'});
next.set('prompt2','否则本回合无法对其他角色使用卡牌');
'step 1' 'step 1'
if(!result.bool){ if(!result.bool){
_status.currentPhase.addTempSkill('shihuifen','phaseUseAfter'); _status.currentPhase.addTempSkill('shihuifen','phaseUseAfter');

View File

@ -72,6 +72,10 @@ game.import('card',function(lib,game,ui,get,ai,_status){
filterTarget:function(card,player,target){return player!=target}, filterTarget:function(card,player,target){return player!=target},
content:function(){ content:function(){
"step 0" "step 0"
if(typeof event.shanRequired!='number'||!event.shanRequired||event.shanRequired<0){
event.shanRequired=1;
}
"step 1"
if(event.skipShan){ if(event.skipShan){
event._result={bool:true}; event._result={bool:true};
} }
@ -80,26 +84,38 @@ game.import('card',function(lib,game,ui,get,ai,_status){
} }
else{ else{
var next=target.chooseToRespond({name:'shan'}); var next=target.chooseToRespond({name:'shan'});
if(event.shanRequired>1){
next.set('prompt2','(共需打出张'+event.shanRequired+'闪)');
}
next.set('ai',function(card){ next.set('ai',function(card){
var target=_status.event.player; var target=_status.event.player;
var evt=_status.event.getParent(); var evt=_status.event.getParent();
if(target.countCards('h','shan')<_status.event.shanRequired){
return -1
}
if(target.hasSkillTag('useShan')){ if(target.hasSkillTag('useShan')){
return 11-get.value(card); return 11-get.value(card);
} }
if(get.damageEffect(target,evt.player,target,evt.card.nature)>=0) return -1; if(get.damageEffect(target,evt.player,target,evt.card.nature)>=0) return -1;
return 11-get.value(card); return 11-get.value(card);
}); }).set('shanRequired',event.shanRequired);
next.autochoose=lib.filter.autoRespondShan; next.autochoose=lib.filter.autoRespondShan;
} }
"step 1" "step 2"
if(result.bool==false){ if(result.bool==false){
event.trigger('shaHit'); event.trigger('shaHit');
} }
else{ else{
event.trigger('shaMiss'); event.shanRequired--;
event.responded=result; if(event.shanRequired>0){
event.goto(1);
}
else{
event.trigger('shaMiss');
event.responded=result;
}
} }
"step 2" "step 3"
if(result.bool==false&&!event.unhurt){ if(result.bool==false&&!event.unhurt){
target.damage(get.nature(event.card)); target.damage(get.nature(event.card));
event.result={bool:true} event.result={bool:true}

View File

@ -4646,7 +4646,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
}) })
"step 1" "step 1"
if(result.bool){ if(result.bool){
trigger.target.chooseToRespond({name:'shan'}).autochoose=lib.filter.autoRespondShan; trigger.target.chooseToRespond({name:'shan'},'萨登荆环:请额外打出一张闪响应杀').autochoose=lib.filter.autoRespondShan;
} }
else{ else{
event.finish(); event.finish();

View File

@ -7864,7 +7864,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
aoshu_info:'出牌阶段限一次,你可以将一张黑桃牌当作无中生有使用', aoshu_info:'出牌阶段限一次,你可以将一张黑桃牌当作无中生有使用',
qianhou:'千喉', qianhou:'千喉',
qianhou_info:'锁定技准备阶段你视为使用一张随机普通锦囊牌随机指定目标若目标只有1人且不是你你可以将一张手牌转化为此锦囊', qianhou_info:'锁定技准备阶段你视为使用一张随机普通锦囊牌随机指定目标若目标只有1人且不是你你可以弃置一张手牌并获得此锦囊',
fengxing:'风行', fengxing:'风行',
fengxing_info:'每当你于回合外首次失去牌,你可以弃置一张牌并摸两张牌', fengxing_info:'每当你于回合外首次失去牌,你可以弃置一张牌并摸两张牌',
xinci:'心刺', xinci:'心刺',

View File

@ -2577,20 +2577,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
priority:-1, priority:-1,
content:function(){ content:function(){
"step 0" if(typeof trigger.shanRequired=='number'){
var next=trigger.target.chooseToRespond({name:'shan'}); trigger.shanRequired++;
next.autochoose=lib.filter.autoRespondShan; }
next.ai=function(card){ else{
if(trigger.target.countCards('h','shan')>1){ trigger.shanRequired=2;
return get.unuseful2(card); }
}
return -1;
};
"step 1"
if(result.bool==false){
trigger.untrigger();
trigger.directHit=true;
}
} }
}, },
benghuai:{ benghuai:{

View File

@ -1540,19 +1540,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
priority:-1, priority:-1,
content:function(){ content:function(){
"step 0" if(typeof trigger.shanRequired=='number'){
var next=trigger.target.chooseToRespond({name:'shan'}); trigger.shanRequired++;
next.autochoose=lib.filter.autoRespondShan; }
next.set('ai',function(card){ else{
if(_status.event.player.countCards('h','shan')>1){ trigger.shanRequired=2;
return get.unuseful2(card);
}
return -1;
});
"step 1"
if(result.bool==false){
trigger.untrigger();
trigger.directHit=true;
} }
} }
}, },
@ -1566,7 +1558,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
priority:-1, priority:-1,
content:function(){ content:function(){
"step 0" "step 0"
var next=trigger.turn.chooseToRespond({name:'sha'}); var next=trigger.turn.chooseToRespond({name:'sha'},'请打出一张杀响应决斗');
next.set('prompt2','共需打出2张杀');
next.autochoose=lib.filter.autoRespondSha; next.autochoose=lib.filter.autoRespondSha;
next.set('ai',function(card){ next.set('ai',function(card){
var player=_status.event.player; var player=_status.event.player;
@ -1757,7 +1750,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
jieyin_info:'出牌阶段你可以弃置两张牌并选择1名已经受伤的男性角色你与其各回复一点体力每阶段限一次', jieyin_info:'出牌阶段你可以弃置两张牌并选择1名已经受伤的男性角色你与其各回复一点体力每阶段限一次',
qingnang_info:'出牌阶段,你可以弃置一张手牌令一名角色回复一点体力,每阶段限一次', qingnang_info:'出牌阶段,你可以弃置一张手牌令一名角色回复一点体力,每阶段限一次',
jijiu_info:'回合外,你可以将一张红色牌当[桃]使用', jijiu_info:'回合外,你可以将一张红色牌当[桃]使用',
wushuang_info:'锁定技,你使用的[杀]或[决斗]需要两张[闪]或[杀]响应', wushuang_info:'锁定技,你使用的【杀】或【决斗】需要两张【闪】或【杀】响应',
lijian_info:'出牌阶段,你可以弃一张牌,视为一名男性角色对另一名男性角色使用一张[决斗],每阶段限一次', lijian_info:'出牌阶段,你可以弃一张牌,视为一名男性角色对另一名男性角色使用一张[决斗],每阶段限一次',
biyue_info:'结束阶段,你可以摸一张牌', biyue_info:'结束阶段,你可以摸一张牌',
}, },

View File

@ -5237,7 +5237,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
} }
"step 3" "step 3"
if(event.num){ if(event.num){
trigger.target.chooseToRespond({name:'shan'}).ai=get.unuseful2; var next=trigger.target.chooseToRespond({name:'shan'},'请打出一张闪响应燎原');
next.ai=get.unuseful2;
if(event.num>1) next.set('prompt2','共需额外打出'+event.num+'张闪');
} }
else{ else{
event.finish(); event.finish();

View File

@ -2235,19 +2235,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
priority:-1, priority:-1,
content:function(){ content:function(){
"step 0" if(typeof trigger.num=='number'){
var next=trigger.target.chooseToRespond({name:'shan'}); trigger.shanRequired++;
next.autochoose=lib.filter.autoRespondShan; }
next.ai=function(card){ else{
if(trigger.target.countCards('h','shan')>1){ trigger.shanRequired=2;
return get.unuseful2(card);
}
return -1;
};
"step 1"
if(result.bool==false){
trigger.untrigger();
trigger.directHit=true;
} }
} }
}, },
@ -2260,7 +2252,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
priority:-1, priority:-1,
content:function(){ content:function(){
"step 0" "step 0"
var next=trigger.turn.chooseToRespond({name:'sha'}); var next=trigger.turn.chooseToRespond({name:'sha'},'请打出一张杀响应决斗');
next.set('prompt2','共需打出2张杀');
next.autochoose=lib.filter.autoRespondSha; next.autochoose=lib.filter.autoRespondSha;
next.ai=function(card){ next.ai=function(card){
if(get.attitude(trigger.turn,player)<0&&trigger.turn.countCards('h','sha')>1){ if(get.attitude(trigger.turn,player)<0&&trigger.turn.countCards('h','sha')>1){

View File

@ -9431,6 +9431,9 @@
} }
else{ else{
event.dialog=ui.create.dialog(event.prompt); event.dialog=ui.create.dialog(event.prompt);
if(event.prompt2){
event.dialog.addText(event.prompt2);
}
} }
} }
else if(event.prompt=='function'){ else if(event.prompt=='function'){
@ -9608,6 +9611,7 @@
if(event.isMine()){ if(event.isMine()){
game.pause(); game.pause();
if(event.dialog) event.dialog=ui.create.dialog(event.dialog); if(event.dialog) event.dialog=ui.create.dialog(event.dialog);
if(event.prompt2) event.dialog.addText(event.prompt2);
} }
else if(event.isOnline()){ else if(event.isOnline()){
event.send(); event.send();
@ -13965,6 +13969,12 @@
else{ else{
str+='牌'; str+='牌';
} }
if(_status.event.getParent().name=='useCard'){
var cardname=_status.event.name;
if(lib.card[cardname]&&lib.translate[cardname]){
str+='响应'+lib.translate[cardname];
}
}
next.dialog=str; next.dialog=str;
} }
} }
@ -19915,7 +19925,8 @@
return; return;
} }
event.acted.push(player); event.acted.push(player);
var str=get.translation(trigger.player.name)+'濒死,是否帮助?<br><div class="text center" style="margin-top:10px">当前体力:'+trigger.player.hp+'</div>'; var str=get.translation(trigger.player.name)+'濒死,是否帮助?';
var str2='当前体力:'+trigger.player.hp;
if(lib.config.tao_enemy&&event.dying.side!=player.side&&lib.config.mode!='identity'&&lib.config.mode!='guozhan'&&!event.dying.hasSkillTag('revertsave')){ if(lib.config.tao_enemy&&event.dying.side!=player.side&&lib.config.mode!='identity'&&lib.config.mode!='guozhan'&&!event.dying.hasSkillTag('revertsave')){
event._result={bool:false} event._result={bool:false}
} }
@ -19935,6 +19946,7 @@
}, },
filterTarget:trigger.player, filterTarget:trigger.player,
prompt:str, prompt:str,
prompt2:str2,
ai1:function(card){ ai1:function(card){
if(typeof card=='string'){ if(typeof card=='string'){
var info=get.info(card); var info=get.info(card);

View File

@ -1033,19 +1033,11 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
forced:true, forced:true,
logTarget:'target', logTarget:'target',
content:function(){ content:function(){
"step 0" if(typeof trigger.shanRequired=='number'){
var next=trigger.target.chooseToRespond({name:'shan'}); trigger.shanRequired++;
next.autochoose=lib.filter.autoRespondShan; }
next.set('ai',function(card){ else{
if(_status.event.player.countCards('h','shan')>1){ trigger.shanRequired=2;
return get.unuseful2(card);
}
return -1;
});
"step 1"
if(result.bool==false){
trigger.untrigger();
trigger.directHit=true;
} }
} }
}, },