Merge pull request #1114 from PZ157/PR-Branch

修复【逊贤】【崖柴】【桃】
This commit is contained in:
Spmario233 2024-03-20 21:41:03 +08:00 committed by GitHub
commit 1d845e574b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 36 additions and 32 deletions

View File

@ -469,14 +469,13 @@ game.import('card',function(lib,game,ui,get,ai,_status){
return 2;
},
target_use:(player,target,card)=>{
if(player===_status.currentPhase&&player.hasSkillTag('nokeep',true,{
if(!player.isPhaseUsing()||player.hasSkillTag('nokeep',true,{
card:card,
target:target
},true)) return 2;
let mode = get.mode(),
taos = player.getCards('hs',i=>get.name(i)==='tao'&&lib.filter.cardEnabled(i,target,'forceEnable'));
if(target.hp>0){
if(!player.isPhaseUsing()) return 0;
let min = 7.2-4*player.hp/player.maxHp,
nd = player.needsToDiscard(0,(i,player)=>{
return !player.canIgnoreHandcard(i)&&(taos.includes(i)||get.value(i)>=min);

View File

@ -3420,7 +3420,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return get.itemtype(player.storage.mia_qianmeng)=='card';
},
async cost(event, trigger, player){
event.result = await
event.result = await
player.chooseTarget(get.prompt('mia_qianmeng'),'令一名角色获得牌堆中所有点数为'+player.storage.mia_qianmeng.number+'的牌',lib.filter.notMe).forResult();
},
async content(event, trigger, player){
@ -6689,7 +6689,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
var next=get.copy(lib.skill.kud_qiaoshou_backupx);
next.cardname=links[0][2];
return next;
},
},
prompt(links){
return '将一张手牌置于武将牌上,然后视为装备'+get.translation(links[0][2]);
},
@ -9357,7 +9357,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if (result.bool) event.result = {
bool: true,
cards: result.links,
}
}
},
logTarget: 'player',
async content(event, trigger, player){

View File

@ -9946,11 +9946,19 @@ game.import('character',function(lib,game,ui,get,ai,_status){
intro:{content:'不能使用手牌'},
charlotte:true,
mod:{
cardEnabled:function(card){
if(get.position(card)=='h') return false;
cardEnabled:function(card,player){
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){
if(get.position(card)=='h') return false;
cardSavable:function(card,player){
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;
}
},
},
},

View File

@ -1365,7 +1365,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player:["useCardAfter","respond"],
},
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++){
if(event.cards[i].isInPile()){
return true;
@ -1373,35 +1376,29 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
return false;
},
direct:true,
content:function (){
'step 0'
player.chooseTarget(get.prompt2('xinfu_xunxian'),function(card,player,target){
if(target==player) return false;
return target.countCards('h')>player.countCards('h')||Math.max(0,target.hp)>Math.max(0,player.hp);
}).set('ai',function(target){
async cost(event, trigger, player){
event.result = await player.chooseTarget(get.prompt2('xinfu_xunxian'),(card,player,target)=>{
if(target===player) return false;
return target.getHp()>player.getHp()||target.countCards('h')>player.countCards('h');
}).set('ai',(target)=>{
let att=get.attitude(_status.event.player,target),name=_status.event.cards[0].name;
if(att<3) return 0;
if(target.hasJudge('lebu')) att/=5;
if(name==='sha'&&target.hasSha()) att/=5;
if(name==='wuxie'&&target.needsToDiscard(_status.event.cards)) att/=5;
return att/(1+get.distance(player,target,'absolute'));
}).set('cards',trigger.cards);
'step 1'
if(result.bool){
var list=[];
for(var i=0;i<trigger.cards.length;i++){
if(trigger.cards[i].isInPile()){
list.push(trigger.cards[i]);
}
}).set('cards',trigger.cards).forResult();
},
async content(event, trigger, player){
let list=[];
for(let i=0;i<trigger.cards.length;i++){
if(trigger.cards[i].isInPile()){
list.push(trigger.cards[i]);
}
player.logSkill('xinfu_xunxian',result.targets[0]);
result.targets[0].gain(list,'gain2').giver=player;
}
},
ai:{
expose:0.3,
},
if(get.mode()!=='identity'||player.identity!=='nei') player.addExpose(0.2);
event.targets[0].gain(list,'gain2').giver=player;
}
},
"xinfu_kannan":{
audio:2,
@ -1740,7 +1737,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
"xinfu_limu_info":"出牌阶段你可以将一张♦牌当做【乐不思蜀】对自己使用然后回复1点体力。只要你的判定区内有牌你对攻击范围内的其他角色使用牌便没有次数和距离限制。",
xinyingshi:'应势',
xinyingshi_info:'出牌阶段开始时,若场上所有角色的武将牌上均没有“酬”,则你可以将任意张牌置于一名角色的武将牌上,称为“酬”。若如此做:当有角色使用牌对有“酬”的角色造成伤害后,其可以获得一张“酬”,并获得牌堆中所有与“酬”花色点数均相同的牌;有“酬”的角色死亡时,你获得其所有“酬”。',
xinghuoliaoyuan_tianfu:'天府',
xinghuoliaoyuan_tianliang:'天梁',
xinghuoliaoyuan_tianji:'天机',