族钟会+bug修复

This commit is contained in:
mengxinzxz 2023-08-13 22:23:37 +08:00 committed by GitHub
parent 1cccdb18b6
commit 100dc13053
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 105 additions and 7 deletions

View File

@ -18,6 +18,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
clan_zhongyan:['female','jin',3,['clanguangu','clanxiaoyong','clanbaozu'],['clan:颍川钟氏']], clan_zhongyan:['female','jin',3,['clanguangu','clanxiaoyong','clanbaozu'],['clan:颍川钟氏']],
clan_wangyun:['male','qun',3,['clanjiexuan','clanmingjie','clanzhongliu'],['clan:太原王氏']], clan_wangyun:['male','qun',3,['clanjiexuan','clanmingjie','clanzhongliu'],['clan:太原王氏']],
clan_wanghun:['male','jin',3,['clanfuxun','clanchenya','clanzhongliu'],['clan:太原王氏']], clan_wanghun:['male','jin',3,['clanfuxun','clanchenya','clanzhongliu'],['clan:太原王氏']],
clan_zhonghui:['male','wei','3/4',['clanyuzhi','clanxieshu','clanbaozu'],['clan:颍川钟氏']],
}, },
characterSort:{ characterSort:{
clan:{ clan:{
@ -25,10 +26,102 @@ game.import('character',function(lib,game,ui,get,ai,_status){
clan_xun:['clan_xunshu','clan_xunchen','clan_xuncai','clan_xuncan'], clan_xun:['clan_xunshu','clan_xunchen','clan_xuncai','clan_xuncan'],
clan_han:['clan_hanshao','clan_hanrong'], clan_han:['clan_hanshao','clan_hanrong'],
clan_wang:['clan_wangling','clan_wangyun','clan_wanghun'], clan_wang:['clan_wangling','clan_wangyun','clan_wanghun'],
clan_zhong:['clan_zhongyan'], clan_zhong:['clan_zhongyan','clan_zhonghui'],
}, },
}, },
skill:{ skill:{
//族钟会
clanyuzhi:{
mod:{
aiOrder:function(player,card,num){
if(card.name=='tao') return num/114514;
},
},
audio:2,
trigger:{global:'roundStart'},
direct:true,
locked:true,
content:function(){
'step 0'
var num1=0,num2=0,num3=0,bool=true;
var history=player.actionHistory;
for(var i=history.length-2;i>=0;i--){
for(var evt of history[i].gain){
if(evt.getParent().name=='draw'&&evt.getParent(2).name=='clanyuzhi'){
if(bool) num1+=evt.cards.length;
else num2+=evt.cards.length;
}
}
if(bool) num3+=history[i].useCard.length;
if(history[i].isRound){
if(bool) bool=false;
else break;
}
}
event.num1=num1;
if(num1>0&&(num2>0&&num1>num2)||num1>num3){
player.logSkill('clanyuzhi');
if(num2>0&&num1>num2) game.log(player,'的野心已开始膨胀','#y('+num1+'张>'+num2+'张)');
if(num1>num3) game.log(player,'的行动未达到野心','#y('+num3+'张<'+num1+'张)');
if(player.hasSkill('clanbaozu',null,false,false)) player.chooseBool('迂志:是否失去〖保族〗?','若选择“否”则你失去1点体力').set('choice',player.awakenedSkills.contains('clanbaozu'));
else event._result={bool:false};
}
else event.goto(2);
'step 1'
if(result.bool){
player.removeSkill('clanbaozu');
player.popup('保族');
game.log(player,'失去了技能','#g【保族】');
}
else player.loseHp();
'step 2'
if(!player.countCards('h')) event.finish();
'step 3'
player.chooseCard('迂志:请展示一张手牌','摸此牌牌名字数的牌。下一轮开始时若本轮你使用的牌数或上一轮你以此法摸的牌数小于此牌牌名字数则你失去1点体力。',true,function(card,player){
var num=lib.skill.dcweidang.getLength(card);
return typeof num=='number'&&num>0;
}).set('ai',function(card){
if(_status.event.dying&&_status.event.num>0&&lib.skill.dcweidang.getLength(card)>_status.event.num) return 1/lib.skill.dcweidang.getLength(card);//怂
return lib.skill.dcweidang.getLength(card);//勇
}).set('dying',player.hp+player.countCards('hs',{name:['tao','jiu']})<1).set('num',event.num);
'step 4'
if(result.bool){
player.logSkill('clanyuzhi');
player.showCards(result.cards,get.translation(player)+'发动了【迂志】');
player.draw(lib.skill.dcweidang.getLength(result.cards[0]));
}
},
ai:{
threaten:3,
nokeep:true,
},
},
clanxieshu:{
audio:2,
trigger:{player:'damageEnd',source:'damageSource'},
filter:function(event,player){
if(!event.card) return false;
var num=lib.skill.dcweidang.getLength(event.card);
return typeof num=='number'&&num>0&&player.countCards('he');
},
direct:true,
content:function(){
'step 0'
var num=lib.skill.dcweidang.getLength(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){
var player=_status.event.player;
var num=_status.event.num;
var num2=player.getDamagedHp();
if(num>num2) return 7-get.value(card);
if(num==num2) return lib.skill.zhiheng.check(card);
return 0;
}).set('num',num).logSkill='clanxieshu';
'step 1'
if(result.bool&&player.getDamagedHp()>0) player.draw(player.getDamagedHp());
},
ai:{threaten:3},
},
//族王浑 //族王浑
clanfuxun:{ clanfuxun:{
audio:2, audio:2,
@ -644,16 +737,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
clanbaozu:{ clanbaozu:{
audio:2, audio:2,
audioname:['clan_zhongyan'], audioname:['clan_zhongyan','clan_zhonghui'],
trigger:{ trigger:{global:'dying'},
gloabl:'dying',
},
clanSkill:true, clanSkill:true,
limited:true, limited:true,
skillAnimation:true, skillAnimation:true,
animationColor:'water', animationColor:'water',
filter:function(event,player){ filter:function(event,player){
return event.player.hasClan('颍川钟氏')&&event.player.hp<=0&&!event.player.isLinked(); return (event.player==player||event.player.hasClan('颍川钟氏'))&&event.player.hp<=0&&!event.player.isLinked();
}, },
logTarget:'player', logTarget:'player',
check:function(event,player){ check:function(event,player){
@ -672,9 +763,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
content:function(){ content:function(){
'step 0' 'step 0'
player.awakenSkill('clanbaozu');
'step 1'
trigger.player.link(true); trigger.player.link(true);
trigger.player.recover(); trigger.player.recover();
} },
}, },
//族王凌 //族王凌
clanbolong:{ clanbolong:{
@ -2281,6 +2374,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
clanfuxun_info:'出牌阶段限一次。你可以获得或交给一名其他角色一张手牌,然后若其手牌数与你相等且于此阶段仅以此法获得或失去过牌,你可以将一张牌当任意基本牌使用。', clanfuxun_info:'出牌阶段限一次。你可以获得或交给一名其他角色一张手牌,然后若其手牌数与你相等且于此阶段仅以此法获得或失去过牌,你可以将一张牌当任意基本牌使用。',
clanchenya:'沉雅', clanchenya:'沉雅',
clanchenya_info:'当一名角色发动“出牌阶段限一次”的技能后你可以令其重铸任意张牌名字数为X的牌X为其手牌数。', clanchenya_info:'当一名角色发动“出牌阶段限一次”的技能后你可以令其重铸任意张牌名字数为X的牌X为其手牌数。',
clan_zhonghui:'族钟会',
clanyuzhi:'迂志',
clanyuzhi_info:'锁定技。新的一轮开始时你依次执行以下项①若你上一轮使用的牌数或你上上轮因〖迂志〗摸的牌数小于你上轮因〖迂志〗摸的牌数你失去1点体力或失去〖保族〗。②你展示一张手牌然后摸X张牌X为此牌牌名字数。',
clanxieshu:'挟术',
clanxieshu_info:'当你使用牌造成伤害后或受到来自牌造成的伤害后你可以弃置Y张牌并摸你已损失体力值张牌Y为此牌牌名字数。',
clan_wu:'陈留·吴氏', clan_wu:'陈留·吴氏',
clan_xun:'颍川·荀氏', clan_xun:'颍川·荀氏',