This commit is contained in:
libccy 2017-03-27 16:53:55 +08:00
parent ab713a8101
commit 6073f072f0
1 changed files with 3 additions and 4 deletions

View File

@ -13920,7 +13920,7 @@
var delayed=false; var delayed=false;
for(var i=0;i<targets.length;i++){ for(var i=0;i<targets.length;i++){
var current=targets[i]; var current=targets[i];
var card=current.get(position||'h').randomGet(); var card=current.getCards(position).randomGet();
if(!card) continue; if(!card) continue;
if(current==game.me||current.isOnline()){ if(current==game.me||current.isOnline()){
this.gain(card,current); this.gain(card,current);
@ -15713,15 +15713,14 @@
return false; return false;
}, },
hasCard:function(name,position){ hasCard:function(name,position){
position=position||'h';
if(typeof name=='function'){ if(typeof name=='function'){
var hs=this.get(position); var hs=this.getCards(position);
for(var i=0;i<hs.length;i++){ for(var i=0;i<hs.length;i++){
if(name(hs[i])) return true; if(name(hs[i])) return true;
} }
} }
else{ else{
if(this.num(position,name)) return true; if(this.countCards(position,name)) return true;
var mn=this.getEquip('muniu'); var mn=this.getEquip('muniu');
if(mn&&mn.cards&&mn.cards.length){ if(mn&&mn.cards&&mn.cards.length){
for(var i=0;i<mn.cards.length;i++){ for(var i=0;i<mn.cards.length;i++){