fix: fix format

This commit is contained in:
S-N-O-R-L-A-X 2023-10-08 14:52:35 +08:00
parent 124e0656cd
commit a0b8799fa1
1 changed files with 124 additions and 124 deletions

View File

@ -4546,130 +4546,130 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
//唐姬 //唐姬
kangge:{ kangge:{
audio:2, audio:2,
trigger:{player:'phaseBegin'}, trigger:{player:'phaseBegin'},
direct:true, direct:true,
filter:function(event,player){ filter:function(event,player){
return player.phaseNumber==1&&!player.storage.kangge&&game.hasPlayer(current=>current!=player); return player.phaseNumber==1&&!player.storage.kangge&&game.hasPlayer(current=>current!=player);
}, },
content:function(){ content:function(){
'step 0' 'step 0'
player.chooseTarget('请选择【抗歌】的目标','其于回合外摸牌后你摸等量的牌其进入濒死状态时你可令其回复体力至1点其死亡后你弃置所有牌并失去1点体力',lib.filter.notMe,true).set('ai',function(target){ player.chooseTarget('请选择【抗歌】的目标','其于回合外摸牌后你摸等量的牌其进入濒死状态时你可令其回复体力至1点其死亡后你弃置所有牌并失去1点体力',lib.filter.notMe,true).set('ai',function(target){
return get.attitude(_status.event.player,target)>0; return get.attitude(_status.event.player,target)>0;
}); });
'step 1' 'step 1'
if(result.bool){ if(result.bool){
var target=result.targets[0]; var target=result.targets[0];
player.logSkill('kangge',target); player.logSkill('kangge',target);
player.addSkill('kangge_clear'); player.addSkill('kangge_clear');
player.storage.kangge=target; player.storage.kangge=target;
player.markSkill('kangge'); player.markSkill('kangge');
game.delayx(); game.delayx();
} }
}, },
intro:{content:'已指定$为目标'}, intro:{content:'已指定$为目标'},
group:['kangge_draw','kangge_dying','kangge_die'], group:['kangge_draw','kangge_dying','kangge_die'],
subSkill:{ subSkill:{
draw:{ draw:{
audio:'kangge', audio:'kangge',
trigger:{ trigger:{
global:['gainAfter','loseAsyncAfter'], global:['gainAfter','loseAsyncAfter'],
}, },
forced:true, forced:true,
filter:function(event,player){ filter:function(event,player){
if(player.countMark('kangge_draw')>=3) return false; if(player.countMark('kangge_draw')>=3) return false;
var target=player.storage.kangge; var target=player.storage.kangge;
return target&&target!=_status.currentPhase&&event.getg(target).length>0; return target&&target!=_status.currentPhase&&event.getg(target).length>0;
}, },
logTarget:'player', logTarget:'player',
content:function(){ content:function(){
var num=Math.min(3-player.countMark('kangge_draw'),trigger.getg(player.storage.kangge).length); var num=Math.min(3-player.countMark('kangge_draw'),trigger.getg(player.storage.kangge).length);
player.addMark('kangge_draw',num,false); player.addMark('kangge_draw',num,false);
player.draw(num); player.draw(num);
}, },
}, },
clear:{ clear:{
trigger:{global:'phaseBeginStart'}, trigger:{global:'phaseBeginStart'},
forced:true, forced:true,
firstDo:true, firstDo:true,
popup:false, popup:false,
charlotte:true, charlotte:true,
filter:function(event,player){ filter:function(event,player){
return player.countMark('kangge_draw')>0; return player.countMark('kangge_draw')>0;
}, },
content:function(){ content:function(){
player.removeMark('kangge_draw',player.countMark('kangge_draw'),false); player.removeMark('kangge_draw',player.countMark('kangge_draw'),false);
}, },
}, },
dying:{ dying:{
audio:'kangge', audio:'kangge',
trigger:{global:'dying'}, trigger:{global:'dying'},
logTarget:'player', logTarget:'player',
filter:function(event,player){ filter:function(event,player){
return event.player==player.storage.kangge&&event.player.hp<1&&!player.hasSkill('kangge_temp'); return event.player==player.storage.kangge&&event.player.hp<1&&!player.hasSkill('kangge_temp');
}, },
check:function(event,player){ check:function(event,player){
return get.attitude(player,event.player)>0; return get.attitude(player,event.player)>0;
}, },
prompt2:'令其将体力值回复至1点', prompt2:'令其将体力值回复至1点',
content:function(){ content:function(){
trigger.player.recover(1-trigger.player.hp); trigger.player.recover(1-trigger.player.hp);
player.addTempSkill('kangge_temp','roundStart'); player.addTempSkill('kangge_temp','roundStart');
}, },
}, },
temp:{}, temp:{},
die:{ die:{
audio:'kangge', audio:'kangge',
trigger:{global:'dieAfter'}, trigger:{global:'dieAfter'},
filter:function(event,player){ filter:function(event,player){
return event.player==player.storage.kangge; return event.player==player.storage.kangge;
}, },
forced:true, forced:true,
content:function(){ content:function(){
var cards=player.getCards('he'); var cards=player.getCards('he');
if(cards.length) player.discard(cards); if(cards.length) player.discard(cards);
player.loseHp(); player.loseHp();
}, },
}, },
}, },
ai:{ ai:{
threaten:2, threaten:2,
}, },
}, },
jielie:{ jielie:{
audio:2, audio:2,
trigger:{player:'damageBegin4'}, trigger:{player:'damageBegin4'},
direct:true, direct:true,
filter:function(event,player){ filter:function(event,player){
return ((!event.source)||(event.source!=player&&event.source!=player.storage.kangge))&&player.storage.kangge&&player.storage.kangge.isIn(); return ((!event.source)||(event.source!=player&&event.source!=player.storage.kangge))&&player.storage.kangge&&player.storage.kangge.isIn();
}, },
content:function(){ content:function(){
'step 0' 'step 0'
player.chooseControl(lib.suit.slice(0),'cancel2').set('prompt',get.prompt('jielie')).set('prompt2','防止伤害并改为失去等量体力,且令'+get.translation(player.storage.kangge)+'从弃牌堆中获得等量的花色牌').set('ai',function(){ player.chooseControl(lib.suit.slice(0),'cancel2').set('prompt',get.prompt('jielie')).set('prompt2','防止伤害并改为失去等量体力,且令'+get.translation(player.storage.kangge)+'从弃牌堆中获得等量的花色牌').set('ai',function(){
var player=_status.event.player; var player=_status.event.player;
if(get.attitude(player,player.storage.kangge)<=0) return 'cancel2'; if(get.attitude(player,player.storage.kangge)<=0) return 'cancel2';
return lib.suit.randomGet(); return lib.suit.randomGet();
}); });
'step 1' 'step 1'
if(result.control!='cancel2'){ if(result.control!='cancel2'){
event.suit=result.control; event.suit=result.control;
player.logSkill('jielie',player.storage.kangge); player.logSkill('jielie',player.storage.kangge);
trigger.cancel(); trigger.cancel();
player.loseHp(trigger.num); player.loseHp(trigger.num);
} }
else event.finish(); else event.finish();
'step 2' 'step 2'
var cards=[]; var cards=[];
while(cards.length<trigger.num){ while(cards.length<trigger.num){
var card=get.discardPile(function(card){ var card=get.discardPile(function(card){
return get.suit(card,false)==event.suit&&!cards.contains(card) return get.suit(card,false)==event.suit&&!cards.contains(card)
}); });
if(card) cards.push(card); if(card) cards.push(card);
else break; else break;
} }
if(cards.length) player.storage.kangge.gain(cards,'gain2'); if(cards.length) player.storage.kangge.gain(cards,'gain2');
}, },
}, },
//张横 //张横
dangzai:{ dangzai:{
trigger:{player:'phaseUseBegin'}, trigger:{player:'phaseUseBegin'},