commit
1d845e574b
|
@ -469,14 +469,13 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
||||||
return 2;
|
return 2;
|
||||||
},
|
},
|
||||||
target_use:(player,target,card)=>{
|
target_use:(player,target,card)=>{
|
||||||
if(player===_status.currentPhase&&player.hasSkillTag('nokeep',true,{
|
if(!player.isPhaseUsing()||player.hasSkillTag('nokeep',true,{
|
||||||
card:card,
|
card:card,
|
||||||
target:target
|
target:target
|
||||||
},true)) return 2;
|
},true)) return 2;
|
||||||
let mode = get.mode(),
|
let mode = get.mode(),
|
||||||
taos = player.getCards('hs',i=>get.name(i)==='tao'&&lib.filter.cardEnabled(i,target,'forceEnable'));
|
taos = player.getCards('hs',i=>get.name(i)==='tao'&&lib.filter.cardEnabled(i,target,'forceEnable'));
|
||||||
if(target.hp>0){
|
if(target.hp>0){
|
||||||
if(!player.isPhaseUsing()) return 0;
|
|
||||||
let min = 7.2-4*player.hp/player.maxHp,
|
let min = 7.2-4*player.hp/player.maxHp,
|
||||||
nd = player.needsToDiscard(0,(i,player)=>{
|
nd = player.needsToDiscard(0,(i,player)=>{
|
||||||
return !player.canIgnoreHandcard(i)&&(taos.includes(i)||get.value(i)>=min);
|
return !player.canIgnoreHandcard(i)&&(taos.includes(i)||get.value(i)>=min);
|
||||||
|
|
|
@ -6689,7 +6689,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
var next=get.copy(lib.skill.kud_qiaoshou_backupx);
|
var next=get.copy(lib.skill.kud_qiaoshou_backupx);
|
||||||
next.cardname=links[0][2];
|
next.cardname=links[0][2];
|
||||||
return next;
|
return next;
|
||||||
},
|
},
|
||||||
prompt(links){
|
prompt(links){
|
||||||
return '将一张手牌置于武将牌上,然后视为装备'+get.translation(links[0][2]);
|
return '将一张手牌置于武将牌上,然后视为装备'+get.translation(links[0][2]);
|
||||||
},
|
},
|
||||||
|
|
|
@ -9946,11 +9946,19 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
intro:{content:'不能使用手牌'},
|
intro:{content:'不能使用手牌'},
|
||||||
charlotte:true,
|
charlotte:true,
|
||||||
mod:{
|
mod:{
|
||||||
cardEnabled:function(card){
|
cardEnabled:function(card,player){
|
||||||
if(get.position(card)=='h') return false;
|
let hs=player.getCards('h'),cards=[card];
|
||||||
|
if(Array.isArray(card.cards)) cards.addArray(card.cards);
|
||||||
|
for(let i of cards){
|
||||||
|
if(hs.includes(i)) return false;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
cardSavable:function(card){
|
cardSavable:function(card,player){
|
||||||
if(get.position(card)=='h') return false;
|
let hs=player.getCards('h'),cards=[card];
|
||||||
|
if(Array.isArray(card.cards)) cards.addArray(card.cards);
|
||||||
|
for(let i of cards){
|
||||||
|
if(hs.includes(i)) return false;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -1365,7 +1365,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
player:["useCardAfter","respond"],
|
player:["useCardAfter","respond"],
|
||||||
},
|
},
|
||||||
filter:function (event,player){
|
filter:function (event,player){
|
||||||
if(get.itemtype(event.cards)!='cards') return false;
|
if(get.itemtype(event.cards)!=='cards'||!game.hasPlayer(current=>{
|
||||||
|
if(current===player) return false;
|
||||||
|
return current.getHp()>player.getHp()||current.countCards('h')>player.countCards('h');
|
||||||
|
})) return false;
|
||||||
for(var i=0;i<event.cards.length;i++){
|
for(var i=0;i<event.cards.length;i++){
|
||||||
if(event.cards[i].isInPile()){
|
if(event.cards[i].isInPile()){
|
||||||
return true;
|
return true;
|
||||||
|
@ -1373,35 +1376,29 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
direct:true,
|
async cost(event, trigger, player){
|
||||||
content:function (){
|
event.result = await player.chooseTarget(get.prompt2('xinfu_xunxian'),(card,player,target)=>{
|
||||||
'step 0'
|
if(target===player) return false;
|
||||||
player.chooseTarget(get.prompt2('xinfu_xunxian'),function(card,player,target){
|
return target.getHp()>player.getHp()||target.countCards('h')>player.countCards('h');
|
||||||
if(target==player) return false;
|
}).set('ai',(target)=>{
|
||||||
return target.countCards('h')>player.countCards('h')||Math.max(0,target.hp)>Math.max(0,player.hp);
|
|
||||||
}).set('ai',function(target){
|
|
||||||
let att=get.attitude(_status.event.player,target),name=_status.event.cards[0].name;
|
let att=get.attitude(_status.event.player,target),name=_status.event.cards[0].name;
|
||||||
if(att<3) return 0;
|
if(att<3) return 0;
|
||||||
if(target.hasJudge('lebu')) att/=5;
|
if(target.hasJudge('lebu')) att/=5;
|
||||||
if(name==='sha'&&target.hasSha()) att/=5;
|
if(name==='sha'&&target.hasSha()) att/=5;
|
||||||
if(name==='wuxie'&&target.needsToDiscard(_status.event.cards)) att/=5;
|
if(name==='wuxie'&&target.needsToDiscard(_status.event.cards)) att/=5;
|
||||||
return att/(1+get.distance(player,target,'absolute'));
|
return att/(1+get.distance(player,target,'absolute'));
|
||||||
}).set('cards',trigger.cards);
|
}).set('cards',trigger.cards).forResult();
|
||||||
'step 1'
|
},
|
||||||
if(result.bool){
|
async content(event, trigger, player){
|
||||||
var list=[];
|
let list=[];
|
||||||
for(var i=0;i<trigger.cards.length;i++){
|
for(let i=0;i<trigger.cards.length;i++){
|
||||||
if(trigger.cards[i].isInPile()){
|
if(trigger.cards[i].isInPile()){
|
||||||
list.push(trigger.cards[i]);
|
list.push(trigger.cards[i]);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
player.logSkill('xinfu_xunxian',result.targets[0]);
|
|
||||||
result.targets[0].gain(list,'gain2').giver=player;
|
|
||||||
}
|
}
|
||||||
},
|
if(get.mode()!=='identity'||player.identity!=='nei') player.addExpose(0.2);
|
||||||
ai:{
|
event.targets[0].gain(list,'gain2').giver=player;
|
||||||
expose:0.3,
|
}
|
||||||
},
|
|
||||||
},
|
},
|
||||||
"xinfu_kannan":{
|
"xinfu_kannan":{
|
||||||
audio:2,
|
audio:2,
|
||||||
|
|
Loading…
Reference in New Issue