修复_status.event.filterCard传参无hasGaintag方法bug
This commit is contained in:
parent
1ba3b092bf
commit
d2761c31fd
|
@ -241,7 +241,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
var nh=player.countCards('h');
|
||||
if(nh<=player.hp&&nh<=4&&_status.event.name=='chooseToUse'){
|
||||
if(typeof _status.event.filterCard=='function'&&
|
||||
_status.event.filterCard({name:'huogong'},player,_status.event)){
|
||||
_status.event.filterCard(new lib.element.VCard({name:'huogong'}),player,_status.event)){
|
||||
return -10;
|
||||
}
|
||||
if(_status.event.skill){
|
||||
|
@ -268,7 +268,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
if(target==player){
|
||||
if(typeof _status.event.filterCard=='function'&&
|
||||
_status.event.filterCard({name:'huogong'},player,_status.event)){
|
||||
_status.event.filterCard(new lib.element.VCard({name:'huogong'}),player,_status.event)){
|
||||
return -1.15;
|
||||
}
|
||||
if(_status.event.skill){
|
||||
|
|
|
@ -730,7 +730,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
player:function(player,target){
|
||||
if(player.countCards('h')<=Math.min(5,Math.max(2,player.hp))&&_status.event.name=='chooseToUse'){
|
||||
if(typeof _status.event.filterCard=='function'&&
|
||||
_status.event.filterCard({name:'bingpotong'})){
|
||||
_status.event.filterCard(new lib.element.VCard({name:'bingpotong'}))){
|
||||
return -10;
|
||||
}
|
||||
if(_status.event.skill){
|
||||
|
|
|
@ -255,7 +255,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
var nh=player.countCards('h');
|
||||
if(nh<=player.hp&&nh<=4&&_status.event.name=='chooseToUse'){
|
||||
if(typeof _status.event.filterCard=='function'&&
|
||||
_status.event.filterCard({name:'shandianjian'})){
|
||||
_status.event.filterCard(new lib.element.VCard({name:'shandianjian'}))){
|
||||
return -10;
|
||||
}
|
||||
if(_status.event.skill){
|
||||
|
@ -271,7 +271,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
if(player.countCards('h')<=1) return 0;
|
||||
if(target==player){
|
||||
if(typeof _status.event.filterCard=='function'&&
|
||||
_status.event.filterCard({name:'shandianjian'})){
|
||||
_status.event.filterCard(new lib.element.VCard({name:'shandianjian'}))){
|
||||
return -1.5;
|
||||
}
|
||||
if(_status.event.skill){
|
||||
|
|
|
@ -126,4 +126,7 @@ export class VCard {
|
|||
if (nature == 'linked') return natures.some(n => lib.linked.includes(n));
|
||||
return get.is.sameNature(natures, nature);
|
||||
}
|
||||
hasGaintag(tag) {
|
||||
return this.gaintag && this.gaintag.includes(tag);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue