添加欢乐成双四号位添加【飞扬】技能的开关

This commit is contained in:
mengxinzxz 2023-12-02 10:17:41 +08:00
parent 07734d1f7c
commit df70ec723e
3 changed files with 69 additions and 7 deletions

View File

@ -703,6 +703,38 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
},
skill:{
//OL飞扬
olfeiyang:{
trigger:{player:'phaseZhunbeiBegin'},
filter:function(event,player){
return player.countCards('he',card=>{
if(_status.connectMode&&get.position(card)=='h') return true;
return lib.filter.cardDiscardable(card,player);
})>=3&&player.countCards('j');
},
direct:true,
//limited:true,
//skillAnimation:true,
//animationColor:'orange',
content:function(){
'step 0'
player.chooseToDiscard(get.prompt2('olfeiyang'),'he',3).set('ai',function(card){
var player=_status.event.player;
if(player.hasCard(function(card){
return get.effect(player,{
name:card.viewAs||card.name,
cards:[card],
},player,player)<0;
},'j')) return 6-get.value(card);
return 0;
}).set('logSkill','olfeiyang');
'step 1'
if(result.bool){
//player.awakenSkill('olfeiyang');
player.discardPlayerCard(player,'j',true);
}
},
},
//李婉
ollianju:{
audio:2,
@ -8165,7 +8197,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if(evt.type=='phase'){
if(button.link[2]=='jiu'){
if(player.getUseValue({name:'jiu'})<=0) return 0;
if(player.countCards('hs',name=>get.name(card)=='sha')) return player.getUseValue({name:'jiu'});
var cards=player.getCards('hs',cardx=>get.value(cardx)<8);
cards.sort((a,b)=>get.value(a)-get.value(b));
if(cards.some(cardx=>get.name(cardx)=='sha'&&!cards.slice(0,2).includes(cardx))) return player.getUseValue({name:'jiu'});
return 0;
}
return player.getUseValue(card)/4;
@ -8185,9 +8219,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
position:'hs',
complexCard:true,
check:(card)=>{
return 8-get.value(card);
},
check:(card)=>8-get.value(card),
popname:true,
viewAs:{
name:links[0][2],
@ -8217,6 +8249,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
names.forEach(card=>{
if(player.getUseValue(card)>0){
var temp=get.order(card);
if(card.name=='jiu'){
var cards=player.getCards('hs',cardx=>get.value(cardx)<8);
cards.sort((a,b)=>get.value(a)-get.value(b));
if(!cards.some(cardx=>get.name(cardx)=='sha'&&!cards.slice(0,2).includes(cardx))) temp=0;
}
if(temp>max) max=temp;
}
});
@ -26641,6 +26678,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
oldhuxiao_info:'锁定技,当你使用的【杀】被【闪】抵消后,你令此【杀】不计入使用次数。',
oldwuji:'武继',
oldwuji_info:'觉醒技结束阶段若你本回合造成了3点或更多伤害你加1点体力上限并回复1点体力并失去技能〖虎啸〗。',
olfeiyang:'飞扬',
//olfeiyang_info:'限定技。准备阶段,你可以弃置两张牌,然后弃置判定区的一张牌。',
olfeiyang_info:'准备阶段,你可以弃置三张牌,然后弃置判定区的一张牌。',
sp_tianji:'天极·皇室宗亲',

View File

@ -6267,6 +6267,12 @@ new Promise(resolve=>{
frequent:true,
intro:'最后行动的角色起始手牌数+1'
},
connect_olfeiyang_four:{
name:'四号位获得【飞扬】',
init:true,
frequent:true,
intro:'最后行动的角色获得技能【飞扬】(准备阶段,你可以弃置三张牌,然后弃置判定区的一张牌)',
},
connect_choice_num:{
name:'侯选武将数',
init:'20',
@ -6370,12 +6376,14 @@ new Promise(resolve=>{
}
if(config.versus_mode=='two'){
map.replace_handcard_two.show();
map.olfeiyang_four.show();
map.replace_character_two.show();
map.two_assign.show();
map.two_phaseswap.show();
}
else{
map.replace_handcard_two.hide();
map.olfeiyang_four.hide();
map.replace_character_two.hide();
map.two_assign.hide();
map.two_phaseswap.hide();
@ -6550,6 +6558,12 @@ new Promise(resolve=>{
frequent:true,
intro:'最后行动的角色起始手牌+1'
},
olfeiyang_four:{
name:'四号位获得【飞扬】',
init:true,
frequent:true,
intro:'最后行动的角色获得技能【飞扬】(准备阶段,你可以弃置三张牌,然后弃置判定区的一张牌)',
},
replace_character_two:{
name:'替补模式',
init:false,

View File

@ -583,8 +583,9 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
uiintro.add('<div class="text chat">侯选人数:'+lib.configOL.choice_num+'人');
uiintro.add('<div class="text chat">替补人数:'+lib.configOL.replace_number+'人');
}
else if(lib.configOL.versus_mode=='2v2'||lib.configOL.versus_mode=='3v3'){
uiintro.add('<div class="text chat">四号位换牌:'+(lib.configOL.replace_handcard?'开启':'关闭'));
if(lib.configOL.versus_mode=='2v2'||lib.configOL.versus_mode=='3v3'){
uiintro.add('<div class="text chat">四号位保护:'+(lib.configOL.replace_handcard?'开启':'关闭'));
if(lib.configOL.versus_mode=='2v2') uiintro.add('<div class="text chat">四号位【飞扬】:'+(lib.configOL.olfeiyang_four?'开启':'关闭'));
}
var last=uiintro.add('<div class="text chat">出牌时限:'+lib.configOL.choose_timeout+'秒');
// uiintro.add('<div class="text chat">屏蔽弱将:'+(lib.configOL.ban_weak?'开启':'关闭'));
@ -1427,7 +1428,10 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
setTimeout(function(){
ui.arena.classList.remove('choose-character');
},500);
if(lib.configOL.olfeiyang_four){
var target=_status.firstAct.previous;
if(target.isIn()) target.addSkill('olfeiyang');
}
game.addGlobalSkill('versus_viewHandcard');
if(get.config('two_phaseswap')){
game.addGlobalSkill('autoswap');
@ -3384,6 +3388,10 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
setTimeout(function(){
ui.arena.classList.remove('choose-character');
},500);
if(get.config('olfeiyang_four')){
var target=_status.firstAct.previous;
if(target.isIn()) target.addSkill('olfeiyang');
}
game.addGlobalSkill('versus_viewHandcard');
});
},