Merge pull request #679 from copcap/dev-dongzhao

修复一些bug
This commit is contained in:
Spmario233 2023-11-27 22:05:59 +08:00 committed by GitHub
commit 914e96b4e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 27 additions and 12 deletions

View File

@ -784,7 +784,10 @@ game.import('card',function(lib,game,ui,get,ai,_status){
name:card?card.name:null, name:card?card.name:null,
target:target, target:target,
card:card card:card
})) return false; })){
const cards=player.getEquips('yexingyi');
if(player.hasSkill('yexingyi_skill',null,false)||!card.cards||!cards.some(cardx=>card.cards.includes(cardx)||ui.selected.cards.includes(cardx))) return false;
}
}, },
}, },
}, },

View File

@ -308,7 +308,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
const choices=[]; const choices=[];
const choiceList=[ const choiceList=[
'令一名角色将手牌数摸或弃置至与其体力值相同', '令一名角色将手牌数摸或弃置至与其体力值相同',
'令一名角色将体力回复或失去至与其手牌数相同', '令一名角色将体力回复或失去至与其手牌数相同',
]; ];
if(!player.isTempBanned('dcxunjie_handcard')) choices.push('选项一'); if(!player.isTempBanned('dcxunjie_handcard')) choices.push('选项一');
else choiceList[0]='<span style="opacity:0.5">'+choiceList[0]+'(已被选择过)</span>'; else choiceList[0]='<span style="opacity:0.5">'+choiceList[0]+'(已被选择过)</span>';
@ -725,6 +725,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
replace:{window:function(){}} replace:{window:function(){}}
}); });
evt.goto(0); evt.goto(0);
if(target!=_status.currentPhase) player.tempBanSkill('dcshizong');
} }
else{ else{
target.chat('不放!'); target.chat('不放!');
@ -11350,7 +11351,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
dcliangxiu:'良秀', dcliangxiu:'良秀',
dcliangxiu_info:'出牌阶段,你可以弃置两张不同类型的牌,然后从两张与你弃置的牌类型均不同的牌中选择一张获得之(每阶段每种类型限一次)。', dcliangxiu_info:'出牌阶段,你可以弃置两张不同类型的牌,然后从两张与你弃置的牌类型均不同的牌中选择一张获得之(每阶段每种类型限一次)。',
dcxunjie:'殉节', dcxunjie:'殉节',
dcxunjie_info:'每轮每项限一次。一名角色的回合结束时若你本回合于摸牌阶段外得到过牌你可以选择一项1.令一名角色将手牌数摸或弃置至与其体力值相同2.令一名角色将体力回复或失去至与其手牌数相同。', dcxunjie_info:'每轮每项限一次。一名角色的回合结束时若你本回合于摸牌阶段外得到过牌你可以选择一项1.令一名角色将手牌数摸或弃置至与其体力值相同2.令一名角色将体力回复或失去至与其手牌数相同。',
dc_dongzhao:'董昭', dc_dongzhao:'董昭',
dcyijia:'移驾', dcyijia:'移驾',
dcyijia_info:'一名角色受到伤害后若你至其的距离不大于1你可以将场上一张装备牌移动至其对应装备栏替换原装备。若其因此脱离了一名角色的攻击范围你摸一张牌。', dcyijia_info:'一名角色受到伤害后若你至其的距离不大于1你可以将场上一张装备牌移动至其对应装备栏替换原装备。若其因此脱离了一名角色的攻击范围你摸一张牌。',

View File

@ -6961,8 +6961,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
event.count=trigger.num; event.count=trigger.num;
'step 1' 'step 1'
event.count--; event.count--;
if((player.hp+player.getExpansions('gzbuqu').length)>1){ var cards=player.getExpansions('gzbuqu'),count=cards.length;
player.chooseCardButton('不屈:移去一张“创”',true,player.getExpansions('gzbuqu')).set('ai',function(button){ if(count>0&&(player.hp+count)>1){
if(count==1) event._result={links:cards};
else player.chooseCardButton('不屈:移去一张“创”',true,cards).set('ai',function(button){
var buttons=get.selectableButtons(); var buttons=get.selectableButtons();
for(var i=0;i<buttons.length;i++){ for(var i=0;i<buttons.length;i++){
if(buttons[i]!=button&& if(buttons[i]!=button&&
@ -6974,6 +6976,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return 0; return 0;
}); });
} }
else event.finish();
'step 2' 'step 2'
var cards=result.links; var cards=result.links;
player.loseToDiscardpile(cards); player.loseToDiscardpile(cards);

View File

@ -4580,15 +4580,19 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
subSkill:{ subSkill:{
record:{ record:{
trigger:{player:'showCardsEnd'}, trigger:{global:'showCardsEnd'},
forced:true, forced:true,
charlotte:true, charlotte:true,
popup:false, popup:false,
firstDo:true, firstDo:true,
filter:function(event,player){
return event.cards.some(i=>get.owner(i)==player);
},
content:function(){ content:function(){
game.broadcastAll(function(cards){ game.broadcastAll(function(cards){
cards.forEach(card=>card.addGaintag('oldaili_tag')); cards.forEach(card=>card.addGaintag('oldaili_tag'));
},trigger.cards); },trigger.cards.filter(i=>get.owner(i)==player));
player.markSkill('oldaili');
} }
}, },
} }
@ -7374,7 +7378,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
storage:{cihuang:true}, storage:{cihuang:true},
}; };
event.card=card; event.card=card;
player.chooseCard('he','雌黄:将一张牌当'+get.translation(card)+'对'+get.translation(trigger.player)+'使用',function(card,player){ player.chooseCard('hes','雌黄:将一张牌当'+get.translation(card)+'对'+get.translation(trigger.player)+'使用',function(card,player){
return player.canUse(get.autoViewAs(_status.event.getParent().card,[card]),_status.event.target,false); return player.canUse(get.autoViewAs(_status.event.getParent().card,[card]),_status.event.target,false);
}).set('target',trigger.player).set('ai',function(card){ }).set('target',trigger.player).set('ai',function(card){
if(get.effect(_status.event.target,get.autoViewAs(_status.event.getParent().card,[card]),player)<=0) return false; if(get.effect(_status.event.target,get.autoViewAs(_status.event.getParent().card,[card]),player)<=0) return false;

View File

@ -1635,17 +1635,19 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if(targets.length){ if(targets.length){
choices.push('选项一'); choices.push('选项一');
choiceList[0]+=''+get.translation(targets)+''; choiceList[0]+=''+get.translation(targets)+'';
} else choiceList[0]='<span style="opacity:0.5; ">'+choiceList[0]+'</span>'; }
else choiceList[0]='<span style="opacity:0.5; ">'+choiceList[0]+'</span>';
if(targets2.length){ if(targets2.length){
choices.push('选项二'); choices.push('选项二');
choiceList[1]+=''+get.translation(targets2)+''; choiceList[1]+=''+get.translation(targets2)+'';
} else choiceList[1]='<span style="opacity:0.5; ">'+choiceList[1]+'</span>'; }
else choiceList[1]='<span style="opacity:0.5; ">'+choiceList[1]+'</span>';
if(!choices.length) event.finish(); if(!choices.length) event.finish();
else player.chooseControl(choices,'cancel2').set('prompt',get.prompt('dczuojian')).set('choiceList',choiceList).set('ai',()=>{ else player.chooseControl(choices,'cancel2').set('prompt',get.prompt('dczuojian')).set('choiceList',choiceList).set('ai',()=>{
var controls=_status.event.controls,choice=_status.event.choice; var controls=_status.event.controls,choice=_status.event.choice;
if(!controls.contains('选项一')||controls.contains('选项二')&&choice==1) return '选项二'; if(!controls.contains('选项一')||controls.contains('选项二')&&choice==1) return '选项二';
return '选项一'; return '选项一';
}).set('choice',eff<0&&eff2<0?'cancel2':(eff>eff2?0:1)); }).set('choice',eff<=0&&eff2<=0?'cancel2':(eff>-eff2?0:1));
'step 1' 'step 1'
if(result.control=='选项一'){ if(result.control=='选项一'){
player.logSkill('dczuojian',targets); player.logSkill('dczuojian',targets);

View File

@ -4047,7 +4047,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
content:function(){ content:function(){
'step 0' 'step 0'
player.recover(player.getDamagedHp()); player.recover(player.getDamagedHp(true));
player.drawTo(player.maxHp); player.drawTo(player.maxHp);
'step 1' 'step 1'
var check=0; var check=0;
@ -12126,6 +12126,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
check:function(event,player){ check:function(event,player){
return get.attitude(player,event.target)<=0; return get.attitude(player,event.target)<=0;
}, },
equipSkill:true,
logTarget:'target', logTarget:'target',
content:function(){ content:function(){
var num=player.getHistory('useSkill',function(evt){ var num=player.getHistory('useSkill',function(evt){
@ -12150,6 +12151,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
check:function(event,player){ check:function(event,player){
return get.attitude(player,event.target)<=0; return get.attitude(player,event.target)<=0;
}, },
equipSkill:true,
logTarget:'target', logTarget:'target',
content:function(){ content:function(){
'step 0' 'step 0'