Merge branch 'libccy:PR-Branch' into PR-Branch
This commit is contained in:
commit
4daf9f7c16
|
@ -1185,7 +1185,10 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
||||||
}))+'的【诏书】上';
|
}))+'的【诏书】上';
|
||||||
},
|
},
|
||||||
content:function(){
|
content:function(){
|
||||||
|
'step 0'
|
||||||
target.addToExpansion(cards,player,'give').gaintag.add('zhaoshu_cards');
|
target.addToExpansion(cards,player,'give').gaintag.add('zhaoshu_cards');
|
||||||
|
'step 1'
|
||||||
|
target.markSkill('zhaoshu_skill');
|
||||||
},
|
},
|
||||||
ai:{
|
ai:{
|
||||||
order:1,
|
order:1,
|
||||||
|
|
275
card/standard.js
275
card/standard.js
|
@ -1241,7 +1241,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
||||||
},
|
},
|
||||||
filterTarget:function(card,player,target){
|
filterTarget:function(card,player,target){
|
||||||
if(player==target) return false;
|
if(player==target) return false;
|
||||||
return target.countGainableCards(player,get.is.single()?'he':'hej')>0;
|
return target.hasCard(card=>lib.filter.canBeGained(card,target,player),get.is.single()?'he':'hej');
|
||||||
},
|
},
|
||||||
content:function(){
|
content:function(){
|
||||||
var position=get.is.single()?'he':'hej';
|
var position=get.is.single()?'he':'hej';
|
||||||
|
@ -1262,27 +1262,47 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
||||||
},
|
},
|
||||||
result:{
|
result:{
|
||||||
target:function(player,target){
|
target:function(player,target){
|
||||||
if(get.attitude(player,target)<=0) return (target.countCards('he',function(card){
|
const hs=target.getGainableCards(player,'h');
|
||||||
return get.value(card,target)>0&&card!=target.getEquip('jinhe');
|
const es=target.getGainableCards(player,'e');
|
||||||
})>0)?-1.5:1.5;
|
const js=target.getGainableCards(player,'j');
|
||||||
return (target.countCards('ej',function(card){
|
|
||||||
if(get.position(card)=='e') return get.value(card,target)<=0;
|
if(get.attitude(player,target)<=0){
|
||||||
var cardj=card.viewAs?{name:card.viewAs}:card;
|
if(hs.length>0) return -1.5;
|
||||||
return get.effect(target,cardj,target,player)<0;
|
return (es.some(card=>{
|
||||||
})>0)?1.5:-1.5;
|
return get.value(card,target)>0&&card!=target.getEquip('jinhe');
|
||||||
},
|
})||js.some(card=>{
|
||||||
player:function(player,target){
|
|
||||||
if(get.attitude(player,target)<0&&!target.countCards('he',function(card){
|
|
||||||
return get.value(card,target)>0&&card!=target.getEquip('jinhe');
|
|
||||||
})){
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
if(get.attitude(player,target)>1){
|
|
||||||
return (target.countCards('ej',function(card){
|
|
||||||
if(get.position(card)=='e') return get.value(card,target)<=0;
|
|
||||||
var cardj=card.viewAs?{name:card.viewAs}:card;
|
var cardj=card.viewAs?{name:card.viewAs}:card;
|
||||||
return get.effect(target,cardj,target,player)<0;
|
return get.effect(target,cardj,target,player)<0;
|
||||||
})>0)?1.5:-1.5;
|
}))?-1.5:1.5;
|
||||||
|
}
|
||||||
|
return (es.some(card=>{
|
||||||
|
return get.value(card,target)<=0;
|
||||||
|
})||js.some(card=>{
|
||||||
|
var cardj=card.viewAs?{name:card.viewAs}:card;
|
||||||
|
return get.effect(target,cardj,target,player)<0;
|
||||||
|
}))?1.5:-1.5;
|
||||||
|
},
|
||||||
|
player:function(player,target){
|
||||||
|
const hs=target.getGainableCards(player,'h');
|
||||||
|
const es=target.getGainableCards(player,'e');
|
||||||
|
const js=target.getGainableCards(player,'j');
|
||||||
|
|
||||||
|
const att=get.attitude(player,target);
|
||||||
|
if(att<0){
|
||||||
|
if(!hs.length&&!es.some(card=>{
|
||||||
|
return get.value(card,target)>0&&card!=target.getEquip('jinhe');
|
||||||
|
})&&!js.some(card=>{
|
||||||
|
var cardj=card.viewAs?{name:card.viewAs}:card;
|
||||||
|
return get.effect(target,cardj,target,player)<0;
|
||||||
|
})) return 0;
|
||||||
|
}
|
||||||
|
else if(att>1){
|
||||||
|
return (es.some(card=>{
|
||||||
|
return get.value(card,target)<=0;
|
||||||
|
})||js.some(card=>{
|
||||||
|
var cardj=card.viewAs?{name:card.viewAs}:card;
|
||||||
|
return get.effect(target,cardj,target,player)<0;
|
||||||
|
}))?1.5:0;
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -1301,28 +1321,52 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
||||||
value:9
|
value:9
|
||||||
},
|
},
|
||||||
result:{
|
result:{
|
||||||
target:function(player,target){
|
target:function(player,target,card){
|
||||||
if(get.attitude(player,target)<=0) return (target.countCards('he',function(card){
|
let position='hej';
|
||||||
return get.value(card,target)>0&&card!=target.getEquip('jinhe');
|
if(card&&card.position) position=card.position;
|
||||||
})>0)?-1.5:1.5;
|
const hs=position.includes('h')?target.getGainableCards(player,'h'):[];
|
||||||
return (target.countCards('ej',function(card){
|
const es=position.includes('e')?target.getGainableCards(player,'e'):[];
|
||||||
if(get.position(card)=='e') return get.value(card,target)<=0;
|
const js=position.includes('j')?target.getGainableCards(player,'j'):[];
|
||||||
var cardj=card.viewAs?{name:card.viewAs}:card;
|
|
||||||
return get.effect(target,cardj,target,player)<0;
|
if(get.attitude(player,target)<=0){
|
||||||
})>0)?1.5:-1.5;
|
if(hs.length>0) return -1.5;
|
||||||
},
|
return (es.some(card=>{
|
||||||
player:function(player,target){
|
return get.value(card,target)>0&&card!=target.getEquip('jinhe');
|
||||||
if(get.attitude(player,target)<0&&!target.countCards('he',function(card){
|
})||js.some(card=>{
|
||||||
return get.value(card,target)>0&&card!=target.getEquip('jinhe');
|
|
||||||
})){
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
if(get.attitude(player,target)>1){
|
|
||||||
return (target.countCards('ej',function(card){
|
|
||||||
if(get.position(card)=='e') return get.value(card,target)<=0;
|
|
||||||
var cardj=card.viewAs?{name:card.viewAs}:card;
|
var cardj=card.viewAs?{name:card.viewAs}:card;
|
||||||
return get.effect(target,cardj,target,player)<0;
|
return get.effect(target,cardj,target,player)<0;
|
||||||
})>0)?1.5:-1.5;
|
}))?-1.5:1.5;
|
||||||
|
}
|
||||||
|
return (es.some(card=>{
|
||||||
|
return get.value(card,target)<=0;
|
||||||
|
})||js.some(card=>{
|
||||||
|
var cardj=card.viewAs?{name:card.viewAs}:card;
|
||||||
|
return get.effect(target,cardj,target,player)<0;
|
||||||
|
}))?1.5:-1.5;
|
||||||
|
},
|
||||||
|
player:function(player,target,card){
|
||||||
|
let position='hej';
|
||||||
|
if(card&&card.position) position=card.position;
|
||||||
|
const hs=position.includes('h')?target.getGainableCards(player,'h'):[];
|
||||||
|
const es=position.includes('e')?target.getGainableCards(player,'e'):[];
|
||||||
|
const js=position.includes('j')?target.getGainableCards(player,'j'):[];
|
||||||
|
|
||||||
|
const att=get.attitude(player,target);
|
||||||
|
if(att<0){
|
||||||
|
if(!hs.length&&!es.some(card=>{
|
||||||
|
return get.value(card,target)>0&&card!=target.getEquip('jinhe');
|
||||||
|
})&&!js.some(card=>{
|
||||||
|
var cardj=card.viewAs?{name:card.viewAs}:card;
|
||||||
|
return get.effect(target,cardj,target,player)<0;
|
||||||
|
})) return 0;
|
||||||
|
}
|
||||||
|
else if(att>1){
|
||||||
|
return (es.some(card=>{
|
||||||
|
return get.value(card,target)<=0;
|
||||||
|
})||js.some(card=>{
|
||||||
|
var cardj=card.viewAs?{name:card.viewAs}:card;
|
||||||
|
return get.effect(target,cardj,target,player)<0;
|
||||||
|
}))?1.5:0;
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -1341,28 +1385,17 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
||||||
value:9
|
value:9
|
||||||
},
|
},
|
||||||
result:{
|
result:{
|
||||||
target:function(player,target){
|
target:function(player,target,card,isLink){
|
||||||
if(get.attitude(player,target)<=0) return (target.countCards('he',function(card){
|
return lib.card.shunshou_copy.ai.result.target(player,target,{
|
||||||
return get.value(card,target)>0&&card!=target.getEquip('jinhe');
|
name:'shunshou_copy',
|
||||||
})>0)?-1.5:1.5;
|
position:'he',
|
||||||
return (target.countCards('e',function(card){
|
},isLink)
|
||||||
return get.value(card,target)<=0;
|
|
||||||
})>0)?1.5:-1.5;
|
|
||||||
},
|
},
|
||||||
player:function(player,target){
|
player:function(player,target,card,isLink){
|
||||||
if(get.attitude(player,target)<0&&!target.countCards('he',function(card){
|
return lib.card.shunshou_copy.ai.result.player(player,target,{
|
||||||
return get.value(card,target)>0&&card!=target.getEquip('jinhe');
|
name:'shunshou_copy',
|
||||||
})){
|
position:'he',
|
||||||
return 0;
|
},isLink)
|
||||||
}
|
|
||||||
if(get.attitude(player,target)>1){
|
|
||||||
return (target.countCards('ej',function(card){
|
|
||||||
if(get.position(card)=='e') return get.value(card,target)<=0;
|
|
||||||
var cardj=card.viewAs?{name:card.viewAs}:card;
|
|
||||||
return get.effect(target,cardj,target,player)<0;
|
|
||||||
})>0)?1.5:-1.5;
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
tag:{
|
tag:{
|
||||||
|
@ -1382,7 +1415,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
||||||
},
|
},
|
||||||
filterTarget:function(card,player,target){
|
filterTarget:function(card,player,target){
|
||||||
if(player==target) return false;
|
if(player==target) return false;
|
||||||
return target.countDiscardableCards(player,get.is.single()?'he':'hej');
|
return target.hasCard(card=>lib.filter.canBeDiscarded(card,target,player),get.is.single()?'he':'hej');
|
||||||
},
|
},
|
||||||
defaultYingbianEffect:'add',
|
defaultYingbianEffect:'add',
|
||||||
content:function(){
|
content:function(){
|
||||||
|
@ -1420,30 +1453,38 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
||||||
},
|
},
|
||||||
result:{
|
result:{
|
||||||
target:function(player,target){
|
target:function(player,target){
|
||||||
var att=get.attitude(player,target);
|
const att=get.attitude(player,target);
|
||||||
var nh=target.countCards('h');
|
const hs=target.getDiscardableCards(player,'h');
|
||||||
|
const es=target.getDiscardableCards(player,'e');
|
||||||
|
const js=target.getDiscardableCards(player,'j');
|
||||||
|
if(!hs.length&&!es.length&&!js.length) return 0;
|
||||||
if(att>0){
|
if(att>0){
|
||||||
if(target.countCards('j',function(card){
|
if(js.some(card=>{
|
||||||
var cardj=card.viewAs?{name:card.viewAs}:card;
|
const cardj=card.viewAs?{name:card.viewAs}:card;
|
||||||
return get.effect(target,cardj,target,player)<0;
|
return get.effect(target,cardj,target,player)<0;
|
||||||
})>0) return 3;
|
})) return 3;
|
||||||
if(target.getEquip('baiyin')&&target.isDamaged()&&
|
if(target.isDamaged()&&es.some(card=>card.name=='baiyin')&&
|
||||||
get.recoverEffect(target,player,player)>0){
|
get.recoverEffect(target,player,player)>0){
|
||||||
if(target.hp==1&&!target.hujia) return 1.6;
|
if(target.hp==1&&!target.hujia) return 1.6;
|
||||||
}
|
}
|
||||||
if(target.countCards('e',function(card){
|
if(es.some(card=>{
|
||||||
if(get.position(card)=='e') return get.value(card,target)<0;
|
return get.value(card,target)<0;
|
||||||
})>0) return 1;
|
})) return 1;
|
||||||
|
return -1.5;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
const noh=(hs.length==0||target.hasSkillTag('noh'));
|
||||||
|
const noe=(es.length==0||target.hasSkillTag('noe'));
|
||||||
|
const noe2=(noe||!es.some(card=>{
|
||||||
|
return get.value(card,target)>0;
|
||||||
|
}));
|
||||||
|
const noj=(js.length==0||!js.some(card=>{
|
||||||
|
const cardj=card.viewAs?{name:card.viewAs}:card;
|
||||||
|
return get.effect(target,cardj,target,player)<0;
|
||||||
|
}))
|
||||||
|
if(noh&&noe2&&noj) return 1.5;
|
||||||
|
return -1.5;
|
||||||
}
|
}
|
||||||
var es=target.getCards('e');
|
|
||||||
var noe=(es.length==0||target.hasSkillTag('noe'));
|
|
||||||
var noe2=(es.filter(function(esx){
|
|
||||||
return get.value(esx,target)>0;
|
|
||||||
}).length==0);
|
|
||||||
var noh=(nh==0||target.hasSkillTag('noh'));
|
|
||||||
if(noh&&(noe||noe2)) return 0;
|
|
||||||
if(att<=0&&!target.countCards('he')) return 1.5;
|
|
||||||
return -1.5;
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
tag:{
|
tag:{
|
||||||
|
@ -1460,31 +1501,41 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
||||||
value:5,
|
value:5,
|
||||||
},
|
},
|
||||||
result:{
|
result:{
|
||||||
target:function(player,target){
|
target:function(player,target,card){
|
||||||
var att=get.attitude(player,target);
|
let position='hej';
|
||||||
var nh=target.countCards('h');
|
if(card&&card.position) position=card.position;
|
||||||
|
const att=get.attitude(player,target);
|
||||||
|
const hs=position.includes('h')?target.getDiscardableCards(player,'h'):[];
|
||||||
|
const es=position.includes('e')?target.getDiscardableCards(player,'e'):[];
|
||||||
|
const js=position.includes('j')?target.getDiscardableCards(player,'j'):[];
|
||||||
|
if(!hs.length&&!es.length&&!js.length) return 0;
|
||||||
if(att>0){
|
if(att>0){
|
||||||
if(target.countCards('j',function(card){
|
if(js.some(card=>{
|
||||||
var cardj=card.viewAs?{name:card.viewAs}:card;
|
const cardj=card.viewAs?{name:card.viewAs}:card;
|
||||||
return get.effect(target,cardj,target,player)<0;
|
return get.effect(target,cardj,target,player)<0;
|
||||||
})>0) return 3;
|
})) return 3;
|
||||||
if(target.getEquip('baiyin')&&target.isDamaged()&&
|
if(target.isDamaged()&&es.some(card=>card.name=='baiyin')&&
|
||||||
get.recoverEffect(target,player,player)>0){
|
get.recoverEffect(target,player,player)>0){
|
||||||
if(target.hp==1&&!target.hujia) return 1.6;
|
if(target.hp==1&&!target.hujia) return 1.6;
|
||||||
}
|
}
|
||||||
if(target.countCards('e',function(card){
|
if(es.some(card=>{
|
||||||
if(get.position(card)=='e') return get.value(card,target)<0;
|
return get.value(card,target)<0;
|
||||||
})>0) return 1;
|
})) return 1;
|
||||||
|
return -1.5;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
const noh=(hs.length==0||target.hasSkillTag('noh'));
|
||||||
|
const noe=(es.length==0||target.hasSkillTag('noe'));
|
||||||
|
const noe2=(noe||!es.some(card=>{
|
||||||
|
return get.value(card,target)>0;
|
||||||
|
}));
|
||||||
|
const noj=(js.length==0||!js.some(card=>{
|
||||||
|
const cardj=card.viewAs?{name:card.viewAs}:card;
|
||||||
|
return get.effect(target,cardj,target,player)<0;
|
||||||
|
}))
|
||||||
|
if(noh&&noe2&&noj) return 1.5;
|
||||||
|
return -1.5;
|
||||||
}
|
}
|
||||||
var es=target.getCards('e');
|
|
||||||
var noe=(es.length==0||target.hasSkillTag('noe'));
|
|
||||||
var noe2=(es.filter(function(esx){
|
|
||||||
return get.value(esx,target)>0;
|
|
||||||
}).length==0);
|
|
||||||
var noh=(nh==0||target.hasSkillTag('noh'));
|
|
||||||
if(noh&&(noe||noe2)) return 0;
|
|
||||||
if(att<=0&&!target.countCards('he')) return 1.5;
|
|
||||||
return -1.5;
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
tag:{
|
tag:{
|
||||||
|
@ -1501,27 +1552,11 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
||||||
value:5,
|
value:5,
|
||||||
},
|
},
|
||||||
result:{
|
result:{
|
||||||
target:function(player,target){
|
target:function(player,target,card,isLink){
|
||||||
var att=get.attitude(player,target);
|
return lib.card.guohe_copy.ai.result.target(player,target,{
|
||||||
var nh=target.countCards('h');
|
name:'guohe_copy',
|
||||||
if(att>0){
|
position:'he',
|
||||||
if(target.getEquip('baiyin')&&target.isDamaged()&&
|
},isLink)
|
||||||
get.recoverEffect(target,player,player)>0){
|
|
||||||
if(target.hp==1&&!target.hujia) return 1.6;
|
|
||||||
}
|
|
||||||
if(target.countCards('e',function(card){
|
|
||||||
if(get.position(card)=='e') return get.value(card,target)<0;
|
|
||||||
})>0) return 1;
|
|
||||||
}
|
|
||||||
var es=target.getCards('e');
|
|
||||||
var noe=(es.length==0||target.hasSkillTag('noe'));
|
|
||||||
var noe2=(es.filter(function(esx){
|
|
||||||
return get.value(esx,target)>0;
|
|
||||||
}).length==0);
|
|
||||||
var noh=(nh==0||target.hasSkillTag('noh'));
|
|
||||||
if(noh&&(noe||noe2)) return 0;
|
|
||||||
if(att<=0&&!target.countCards('he')) return 1.5;
|
|
||||||
return -1.5;
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
tag:{
|
tag:{
|
||||||
|
|
|
@ -44507,7 +44507,7 @@
|
||||||
game.saveConfig('hiddenCardPack',lib.config.hiddenCardPack);
|
game.saveConfig('hiddenCardPack',lib.config.hiddenCardPack);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if(!mode.startsWith('mode_')&lib.cardPile[mode]){
|
if(!mode.startsWith('mode_')&&lib.cardPile[mode]){
|
||||||
var cardpileNodes=[];
|
var cardpileNodes=[];
|
||||||
var cardpileexpanded=false;
|
var cardpileexpanded=false;
|
||||||
if(!lib.config.bannedpile[mode]){
|
if(!lib.config.bannedpile[mode]){
|
||||||
|
|
|
@ -12135,14 +12135,19 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
prompt:get.prompt2('gzhuyuan'),
|
prompt:get.prompt2('gzhuyuan'),
|
||||||
complexSelect:true,
|
complexSelect:true,
|
||||||
ai1:function(card){
|
ai1:function(card){
|
||||||
|
if(!_status.event.goon) return false;
|
||||||
var player=_status.event.player;
|
var player=_status.event.player;
|
||||||
if(get.type(card)!='equip') return 0;
|
if(get.type(card)!='equip') return 0;
|
||||||
return 6-get.value(card);
|
return 7.5-get.value(card);
|
||||||
},
|
},
|
||||||
ai2:function(target){
|
ai2:function(target){
|
||||||
|
if(!_status.event.goon) return false;
|
||||||
var player=_status.event.player,card=ui.selected.cards[0];
|
var player=_status.event.player,card=ui.selected.cards[0];
|
||||||
return get.effect(target,card,player,player);
|
return get.effect(target,card,player,player);
|
||||||
},
|
},
|
||||||
|
goon:game.hasPlayer(function(current){
|
||||||
|
return get.effect(current,{name:'guohe_copy',position:'ej'},player,player)>0;
|
||||||
|
})
|
||||||
}).setHiddenSkill('gzhuyuan');
|
}).setHiddenSkill('gzhuyuan');
|
||||||
'step 1'
|
'step 1'
|
||||||
if(result.bool){
|
if(result.bool){
|
||||||
|
@ -12169,7 +12174,10 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
return target.hasCard(function(card){
|
return target.hasCard(function(card){
|
||||||
return lib.filter.canBeDiscarded(card,player,target);
|
return lib.filter.canBeDiscarded(card,player,target);
|
||||||
},'ej');
|
},'ej');
|
||||||
});
|
}).set('ai',function(target){
|
||||||
|
const player=_status.event.player;
|
||||||
|
return get.effect(target,{name:'guohe_copy',position:'ej'},player,player);
|
||||||
|
})
|
||||||
}
|
}
|
||||||
else event.finish();
|
else event.finish();
|
||||||
'step 3'
|
'step 3'
|
||||||
|
|
Loading…
Reference in New Issue