This commit is contained in:
libccy 2017-05-14 15:05:00 +08:00
parent c8317483fe
commit 158ecc4535
6 changed files with 28 additions and 11 deletions

View File

@ -3,12 +3,6 @@ game.import('card',function(lib,game,ui,get,ai,_status){
return { return {
name:'gwent', name:'gwent',
card:{ card:{
gw_dudayuanshuai1:{
fullimage:true
},
gw_dudayuanshuai2:{
fullimage:true
},
gw_dieyi:{ gw_dieyi:{
fullskin:true fullskin:true
}, },

View File

@ -915,8 +915,8 @@ game.import('card',function(lib,game,ui,get,ai,_status){
for(var i=0;i<list.length;i++){ for(var i=0;i<list.length;i++){
list[i]=game.createCard(list[i]); list[i]=game.createCard(list[i]);
} }
target.gain(list,'gain2');
} }
target.gain(list,'gain2');
}, },
ai:{ ai:{
order:10, order:10,
@ -990,9 +990,14 @@ game.import('card',function(lib,game,ui,get,ai,_status){
event.finish(); event.finish();
return; return;
} }
if(!list.length&&!list2.length){
event.finish();
return;
}
var num=get.rand(es.length); var num=get.rand(es.length);
var card; var card;
target.removeEquipTrigger(); target.removeEquipTrigger();
var delayed=0;
for(var i=0;i<es.length;i++){ for(var i=0;i<es.length;i++){
if(i==num){ if(i==num){
card=game.createCard(list2.randomGet()); card=game.createCard(list2.randomGet());
@ -1000,6 +1005,10 @@ game.import('card',function(lib,game,ui,get,ai,_status){
else{ else{
card=game.createCard(list.randomGet()); card=game.createCard(list.randomGet());
} }
if(!card){
delayed++;
continue;
}
cards.push(card); cards.push(card);
time+=200; time+=200;
setTimeout((function(card,name,last){ setTimeout((function(card,name,last){
@ -1014,7 +1023,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
card.classList.remove('glow'); card.classList.remove('glow');
},500); },500);
} }
}(es[i],lib.skill._lingjianduanzao.process([card,es[i]]),i==es.length-1)),i*200); }(es[i],lib.skill._lingjianduanzao.process([card,es[i]]),i==es.length-1)),(i-delayed)*200);
} }
target.$gain2(cards); target.$gain2(cards);
game.pause(); game.pause();
@ -3927,8 +3936,8 @@ game.import('card',function(lib,game,ui,get,ai,_status){
for(var i=0;i<list.length;i++){ for(var i=0;i<list.length;i++){
list[i]=game.createCard(list[i]); list[i]=game.createCard(list[i]);
} }
player.gain(list,'gain2');
} }
player.gain(list,'gain2');
} }
}, },
_lingjianduanzao:{ _lingjianduanzao:{

View File

@ -3028,6 +3028,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
num=1; num=1;
} }
var list=get.typeCard('hslingjian'); var list=get.typeCard('hslingjian');
if(!list.length){
return;
}
var cards=[]; var cards=[];
while(num--){ while(num--){
cards.push(game.createCard(list.randomGet())); cards.push(game.createCard(list.randomGet()));

View File

@ -803,7 +803,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
alter:true, alter:true,
content:function(){ content:function(){
player.gain(game.createCard(get.typeCard('hslingjian').randomGet()),'gain2'); var list=get.typeCard('hslingjian');
if(!list.length){
return;
}
player.gain(game.createCard(list.randomGet()),'gain2');
}, },
group:'maoding2', group:'maoding2',
ai:{ ai:{

View File

@ -5420,7 +5420,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return false; return false;
}, },
content:function(){ content:function(){
player.gain(game.createCard(get.typeCard('hslingjian').randomGet()),'gain2'); var list=get.typeCard('hslingjian');
if(!list.length){
return;
}
player.gain(game.createCard(list.randomGet()),'gain2');
} }
}, },
meihuo:{ meihuo:{

View File

@ -40130,6 +40130,7 @@
var list=[]; var list=[];
for(var i in lib.card){ for(var i in lib.card){
if(typeof filter=='function'&&!filter(i)) continue; if(typeof filter=='function'&&!filter(i)) continue;
if(lib.config.bannedcards.contains(i)) continue;
if(!lib.translate[i+'_info']) continue; if(!lib.translate[i+'_info']) continue;
if((type.indexOf('equip')==0&&type.length==6)|| if((type.indexOf('equip')==0&&type.length==6)||
(type.indexOf('hslingjian')==0&&type.length==11)|| (type.indexOf('hslingjian')==0&&type.length==11)||
@ -40145,6 +40146,8 @@
libCard:function(filter){ libCard:function(filter){
var list=[]; var list=[];
for(var i in lib.card){ for(var i in lib.card){
if(lib.config.bannedcards.contains(i)) continue;
if(!lib.translate[i+'_info']) continue;
if(filter(lib.card[i],i)){ if(filter(lib.card[i],i)){
list.push(i); list.push(i);
} }