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