Merge pull request #1116 from mengxinzxz/PR-Branch

bugfix
This commit is contained in:
Spmario233 2024-03-21 23:03:17 +08:00 committed by GitHub
commit 2a13df6099
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 37 additions and 21 deletions

View File

@ -447,17 +447,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){
'step 2'
if(!player.countCards('h')) event.finish();
'step 3'
player.chooseCard('迂志:请展示一张手牌','摸此牌牌名字数的牌。下一轮开始时若本轮你使用的牌数或上一轮你以此法摸的牌数小于此牌牌名字数则你失去1点体力。',true,function(card,player){
player.chooseToDiscard('迂志:请弃置一张手牌','摸此牌牌名字数的牌。下一轮开始时若本轮你使用的牌数或上一轮你以此法摸的牌数小于此牌牌名字数则你失去1点体力。',true,function(card,player){
var num=get.cardNameLength(card);
return typeof num=='number'&&num>0;
}).set('ai',function(card){
}).set('logSkill','clanyuzhi').set('ai',function(card){
if(_status.event.dying&&_status.event.num>0&&get.cardNameLength(card)>_status.event.num) return 1/get.cardNameLength(card);//怂
return get.cardNameLength(card);//勇
}).set('dying',player.hp+player.countCards('hs',{name:['tao','jiu']})<1).set('num',event.num1);
'step 4'
if(result.bool){
player.logSkill('clanyuzhi');
player.showCards(result.cards,get.translation(player)+'发动了【迂志】');
player.draw(get.cardNameLength(result.cards[0]));
player.storage.clanyuzhi=get.cardNameLength(result.cards[0]);
player.markSkill('clanyuzhi');
@ -474,7 +472,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
audio:2,
trigger:{player:'damageEnd',source:'damageSource'},
filter(event,player){
if(!event.card) return false;
if(!event.card||player.isLinked()) return false;
if(game.getGlobalHistory('everything',evt=>{
if(evt.name!='damage'||!evt.card) return false;
return evt.player==player||(evt.source&&evt.source==player);
}).indexOf(event)!=0) return false;
var num=get.cardNameLength(event.card);
return typeof num=='number'&&num>0&&player.countCards('he')>0;
},
@ -483,7 +485,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
'step 0'
var num=get.cardNameLength(trigger.card),str='';
if(player.getDamagedHp()>0) str+=('并摸'+get.cnNumber(player.getDamagedHp())+'张牌');
player.chooseToDiscard(get.prompt('clanxieshu'),'弃置'+get.cnNumber(num)+'张牌'+str,'he',num).set('ai',function(card){
player.chooseToDiscard(get.prompt('clanxieshu'),'横置武将牌,弃置'+get.cnNumber(num)+'张牌'+str,'he',num).set('ai',function(card){
var player=_status.event.player;
var num=_status.event.num;
var num2=player.getDamagedHp();
@ -492,7 +494,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return 0;
}).set('num',num).logSkill='clanxieshu';
'step 1'
if(result.bool&&player.getDamagedHp()>0) player.draw(player.getDamagedHp());
if(result.bool){
player.link(true);
if(player.getDamagedHp()>0) player.draw(player.getDamagedHp());
}
},
ai:{threaten:3},
},
@ -2733,9 +2738,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
clanchenya_info:'当一名角色发动“出牌阶段限一次”的技能后你可以令其重铸任意张牌名字数为X的牌X为其手牌数。',
clan_zhonghui:'族钟会',
clanyuzhi:'迂志',
clanyuzhi_info:'锁定技。新的一轮开始时你依次执行以下项①若你上一轮使用的牌数或你上上轮因〖迂志〗摸的牌数小于你上轮因〖迂志〗摸的牌数你失去1点体力或失去〖保族〗。②你展示一张手牌然后摸X张牌X为此牌牌名字数。',
clanyuzhi_info:'锁定技。新的一轮开始时你依次执行以下项①若你上一轮使用的牌数或你上上轮因〖迂志〗摸的牌数小于你上轮因〖迂志〗摸的牌数你失去1点体力或失去〖保族〗。②你弃置一张手牌然后摸X张牌X为此牌牌名字数。',
clanxieshu:'挟术',
clanxieshu_info:'当你使用牌造成伤害后,或受到来自牌造成的伤害后,你可以弃置Y张牌并摸你已损失体力值张牌Y为此牌牌名字数。',
clanxieshu_info:'当你每回合首次因牌造成或受到伤害后,你可以横置武将牌,然后弃置Y张牌并摸你已损失体力值张牌Y为此牌牌名字数。',
clan_zhongyu:'族钟毓',
clanjiejian:'捷谏',
clanjiejian_info:'当你于一回合使用第X张牌指定第一个目标后若此牌不为装备牌则你可以令一名目标角色摸X张牌。X为此牌牌名字数',

View File

@ -459,7 +459,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
delete player.storage.mbxuetu_used;
});
}
player.markAuto('mbxuetu_used', storage);
player.markAuto('mbxuetu_used',[status===0?storage:(!event.cards.length)]);
if (status === 0 && !storage || status === 1 && event.cards.length) {
await target.recover();
}
@ -743,8 +743,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){
filter:function(event,player,name){
if(name=='damageSource'&&player.getHistory('sourceDamage').indexOf(event)!=0) return false;
return game.hasPlayer(target=>{
if(name=='damageEnd') return get.distance(player,target)>2;
return get.distance(player,target)<=2;
if(get.mode()!='doudizhu'){
if(name=='damageEnd'&&get.distance(player,target)<=2) return false;
if(name=='damageSource'&&get.distance(player,target)>2) return false;
}
const zhoufa=player.storage.zhoulin_zhoufa;
if(!zhoufa) return true;
if(zhoufa=='豹'||zhoufa=='兔') return true;
if(zhoufa=='鹰') return target.countCards('he');
return target.countDiscardableCards(player,'e');
});
},
direct:true,
@ -756,10 +763,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
'你随机弃置其装备区的一张牌',
'令其摸一张牌',
][['豹','鹰','熊','兔'].indexOf(zhoufa)]:'令其随机执行一个效果';
const {result:{bool,targets}}=await player.chooseTarget(get.prompt('shoufa'),'选择一名距离'+(event.triggername=='damageEnd'?'':'不')+'大于2的角色'+str,(card,player,target)=>{
const nodoudizhu=(get.mode()=='doudizhu'?'':('距离'+(event.triggername=='damageEnd'?'':'不')+'大于2的'));
const {result:{bool,targets}}=await player.chooseTarget(get.prompt('shoufa'),'选择一名'+nodoudizhu+'角色,'+str,(card,player,target)=>{
const name=_status.event.triggername;
if(name=='damageEnd'&&get.distance(player,target)<=2) return false;
if(name=='damageSource'&&get.distance(player,target)>2) return false;
if(get.mode()!='doudizhu'){
if(name=='damageEnd'&&get.distance(player,target)<=2) return false;
if(name=='damageSource'&&get.distance(player,target)>2) return false;
}
const zhoufa=player.storage.zhoulin_zhoufa;
if(!zhoufa) return true;
if(zhoufa=='豹'||zhoufa=='兔') return true;
@ -15848,8 +15858,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
shoufa:function(player){
const zhoufa=player.storage.zhoulin_zhoufa;
if(!zhoufa) return '当你受到伤害后/于一回合首次造成伤害后,你可以选择一名与你距离大于/不大于2的角色令其随机执行以下一项令其受到1点无来源伤害你随机获得其一张牌你随机弃置其装备区的一张牌令其摸一张牌。';
let str='当你受到伤害后/于一回合首次造成伤害后,你可以选择一名与你距离大于/不大于2的角色';
const nodoudizhu=(get.mode()=='doudizhu'?'':'与你距离大于/不大于2的');
if(!zhoufa) return '当你受到伤害后/于一回合首次造成伤害后,你可以选择一名'+nodoudizhu+'角色令其随机执行以下一项令其受到1点无来源伤害你随机获得其一张牌你随机弃置其装备区的一张牌令其摸一张牌。';
let str='当你受到伤害后/于一回合首次造成伤害后,你可以选择一名'+nodoudizhu+'角色,';
str+=[
'令其受到1点无来源伤害',
'你随机获得其一张牌',
@ -16742,6 +16753,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
muludawang:'木鹿大王',
shoufa:'兽法',
shoufa_info:'当你受到伤害后/于一回合首次造成伤害后,你可以选择一名与你距离大于/不大于2的角色令其随机执行以下一项令其受到1点无来源伤害你随机获得其一张牌你随机弃置其装备区的一张牌令其摸一张牌。',
shoufa_info_doudizhu:'当你受到伤害后/于一回合首次造成伤害后你可以选择一名角色令其随机执行以下一项令其受到1点无来源伤害你随机获得其一张牌你随机弃置其装备区的一张牌令其摸一张牌。',
yuxiang:'御象',
yuxiang_info:'锁定技,若你有护甲值,则:①你计算与其他角色的距离-1其他角色计算与你的距离+1②当你受到火焰伤害时此伤害+1。',
zhoulin:'咒鳞',

View File

@ -1396,7 +1396,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
charlotte:true,
trigger:{global:'damageSource'},
filter:function(event,player){
if(event.getParent().type!='card') return false;
if(!event.source||event.getParent().type!='card') return false;
if(event.source.isHealthy()||event.card.name!='sha') return false;
return event.getParent(4).name=='dcsbmengmou'&&event.getParent(4).player==player;
},
@ -7968,8 +7968,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
audio:2,
getZhuanhuanji:function(player,bool){
var skills=player.getSkills(null,false,false).filter(function(i){
const list=get.skillCategoriesOf(i);
return !list.includes('Charlotte')&&list.includes('转换技');
return get.is.zhuanhuanji(i,player);
});
if(!bool) return skills;
if(!skills.length) return 'none';
@ -7981,7 +7980,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
getState:function(player,skill){
var info=get.info(skill),zhuanhuan=info.zhuanhuanji;
if(zhuanhuan=='number') return (player.countMark(skill)%2==1);
if(zhuanhuan&&zhuanhuan=='number') return (player.countMark(skill)%2==1);
return Boolean(player.storage[skill]);
},
trigger:{