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

View File

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

View File

@ -803,7 +803,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
alter:true,
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',
ai:{

View File

@ -5420,7 +5420,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return false;
},
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:{

View File

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