This commit is contained in:
parent
79be76e569
commit
3b5be746aa
143
character/sp.js
143
character/sp.js
|
@ -18,7 +18,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
sp_zhongdan:["cuiyan","huangfusong"],
|
||||
sp_guozhan2:["sp_dongzhuo","liqueguosi","zhangren"],
|
||||
sp_others:["hanba","caiyang"],
|
||||
sp_waitforsort:['ol_luyusheng','ol_pengyang','ol_tw_zhangji','ol_dingshangwan','ol_liwan','ol_liuyan'],
|
||||
sp_waitforsort:['ol_luyusheng','ol_pengyang','ol_tw_zhangji','ol_dingshangwan','ol_liwan','ol_liuyan','caoyu'],
|
||||
},
|
||||
},
|
||||
characterFilter:{
|
||||
|
@ -30,6 +30,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
},
|
||||
character:{
|
||||
caoyu:['male','wei',3,['olgongjie','olxiangxv','olxiangzuo']],
|
||||
ol_liwan:['female','wei',3,['ollianju','olsilv']],
|
||||
ol_dingshangwan:['female','wei',3,['olfudao','olfengyan']],
|
||||
zhangyan:['male','qun',4,['olsuji','ollangdao']],
|
||||
|
@ -201,6 +202,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
luzhi:['male','wei',3,['qingzhong','weijing']]
|
||||
},
|
||||
characterIntro:{
|
||||
caoyu:'曹宇(?-278年),字彭祖,沛国谯县(今安徽亳州)人。三国时期魏国宗室,魏武帝曹操与环夫人之子,邓哀王曹冲同母兄弟。太和六年,封为燕王。魏明帝病危,欲以大将军辅政,不果。其子常道乡公曹奂,是魏国末代皇帝,史称魏元帝。晋朝建立后,降封燕公。咸宁四年(278年),曹宇去世。',
|
||||
zhangyan:'张燕,本姓褚,生卒年不详,常山真定(今河北正定南)人,东汉末年黑山军首领。张燕剽捍,敏捷过人,军中称为“飞燕”。官渡之战时投降曹操,被任命为平北将军,封安国亭侯。死后其子张方袭爵。',
|
||||
lushi:'卢氏,五斗米教主张衡妻,张鲁母,擅长驻颜之术,常年令自己保持少女的容颜。常拜访刘焉,与其交好。',
|
||||
lvboshe:'吕伯奢,东汉成皋(今河南荥阳)人,曹操父亲曹嵩的故友。曹操与陈宫在逃离董卓避祸,返回乡里的途中借宿于吕伯奢家,未伤其人,有贼八人欲捉曹操,曹操杀之,明罗贯中在历史小说《三国演义》中将这段历史进行了丑化加工,也成为小说中曹操名言“宁教我负天下人,休教天下人负我”的出处。',
|
||||
|
@ -703,6 +705,113 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
},
|
||||
skill:{
|
||||
//曹宇
|
||||
olgongjie:{
|
||||
audio:2,
|
||||
trigger:{global:'phaseBegin'},
|
||||
filter(event,player){
|
||||
if(!player.countCards('he')) return false;
|
||||
return !game.hasPlayer(current=>{
|
||||
var history=current.actionHistory;
|
||||
for(var num=history.length-1;num>=0;num--){
|
||||
if(history[num].isRound) break;
|
||||
if(history[num].isSkipped) continue;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
},
|
||||
direct:true,
|
||||
async content(event,trigger,player){
|
||||
var num=player.countCards('he'),draws=[];
|
||||
var {result:{bool,targets}}=await player.chooseTarget(get.prompt2('olgongjie'),[1,num],lib.filter.notMe).set('ai',target=>get.attitude(_status.event.player,target));
|
||||
if(!bool) return;
|
||||
targets=targets.sortBySeat();
|
||||
player.logSkill('gongjie',targets);
|
||||
for(var target of targets){
|
||||
var {result:{bool,cards}}=await target.gainPlayerCard(player,true,'he');
|
||||
if(bool) draws.add(get.suit(cards[0],player));
|
||||
}
|
||||
player.draw(draws.length);
|
||||
},
|
||||
},
|
||||
olxiangxv:{
|
||||
audio:2,
|
||||
trigger:{
|
||||
player:'loseAfter',
|
||||
global:['gainAfter','equipAfter','addJudgeAfter','gainAfter','loseAsyncAfter','addToExpansionAfter'],
|
||||
},
|
||||
filter(event,player){
|
||||
if(!_status.currentPhase||!_status.currentPhase.isIn()) return false;
|
||||
if(!player.isMinHandcard()) return false;
|
||||
var evt=event.getl(player);
|
||||
if(evt&&evt.player==player&&evt.hs&&evt.hs.length>0) return true;
|
||||
if(event.getg) return game.hasPlayer(current=>{
|
||||
var cards=event.getg(current);
|
||||
if(!cards.length) return false;
|
||||
return current.countCards('h')>=player.countCards('h')&¤t.countCards('h')-cards.length<player.countCards('h');
|
||||
});
|
||||
return false;
|
||||
},
|
||||
check(event,player){
|
||||
var target=_status.currentPhase;
|
||||
var cards=target.getCards('h');
|
||||
if(target.isPhaseUsing()){
|
||||
var cardx=cards.filter(card=>get.name(card)=='sha');
|
||||
cardx.sort((a,b)=>target.getUseValue(b)-target.getUseValue(a));
|
||||
cardx=cardx.slice(Math.min(cardx.length,target.getCardUsable('sha')),cardx.length);
|
||||
cards.removeArray(cardx);
|
||||
}
|
||||
return cards.length-player.countCards('h')>0;
|
||||
},
|
||||
logTarget:()=>_status.currentPhase,
|
||||
async content(event,trigger,player){
|
||||
player.tempBanSkill('olxiangxv',null,false);
|
||||
player.when({global:'phaseEnd'}).then(()=>{
|
||||
if(target&&target.isIn()){
|
||||
var num=target.countCards('h')!=player.countCards('h');
|
||||
if(num){
|
||||
if(num>0){
|
||||
if(player.countCards('h')<5) player.draw(Math.min(5-player.countCards('h'),num));
|
||||
}
|
||||
else player.chooseToDiscard(-num,'h',true);
|
||||
}
|
||||
}
|
||||
}).vars({target:_status.currentPhase});
|
||||
},
|
||||
},
|
||||
olxiangzuo:{
|
||||
audio:2,
|
||||
trigger:{player:'dying'},
|
||||
filter(event,player){
|
||||
if(!_status.currentPhase||!_status.currentPhase.isIn()) return false;
|
||||
return player.countCards('he');
|
||||
},
|
||||
direct:true,
|
||||
async content(event,trigger,player){
|
||||
var target=_status.currentPhase,num=player.countCards('he');
|
||||
var {result:{bool,cards}}=await player.chooseToGive(get.prompt2('olxiangzuo',target),[1,num],'he').set('ai',card=>{
|
||||
var player=_status.event.player,target=_status.event.target;
|
||||
if(player.getHistory('useSkill',evt=>{
|
||||
return (evt.skill=='olgongjie'||evt.skill=='olxiangxv')&&evt.targets.includes(target);
|
||||
}).length){
|
||||
if(get.attitude(player,target)>0) return 1;
|
||||
if(player.canSaveCard(card,player)) return 0;
|
||||
if(ui.selected.cards.length+player.hp==player.maxHp) return 0;
|
||||
return 20-get.value(card);
|
||||
}
|
||||
else{
|
||||
if(get.attitude(player,target)>0&&!player.countCards('he',cardx=>player.canSaveCard(cardx,player))) return 1;
|
||||
return 0;
|
||||
}
|
||||
}).set('target',target).set('complexCard',true).set('logSkill',['olxiangzuo',target]);
|
||||
if(!bool) return;
|
||||
player.awakenSkill('olxiangzuo');
|
||||
if(player.getHistory('useSkill',evt=>{
|
||||
return (evt.skill=='olgongjie'||evt.skill=='olxiangxv')&&evt.targets.includes(target);
|
||||
}).length) player.recover(cards.length);
|
||||
},
|
||||
},
|
||||
//OL飞扬
|
||||
olfeiyang:{
|
||||
trigger:{player:'phaseZhunbeiBegin'},
|
||||
|
@ -877,12 +986,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
var num=player.countCards('h');
|
||||
if(num>0){
|
||||
player.chooseCardTarget({
|
||||
prompt:'抚悼:将至多三手张牌交给一名其他角色',
|
||||
prompt:'抚悼:将至多三张手张牌交给一名其他角色',
|
||||
selectCard:[1,3],
|
||||
filterCard:true,
|
||||
filterTarget:lib.filter.notMe,
|
||||
position:'h',
|
||||
forced:true,
|
||||
ai1:function(card){
|
||||
if(card.name=='du') return 10;
|
||||
else if(ui.selected.cards.length&&ui.selected.cards[0].name=='du') return 0;
|
||||
|
@ -952,22 +1060,20 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
content:function(){
|
||||
'step 0'
|
||||
var target=lib.skill.olfengyan.logTarget(trigger,player);
|
||||
if(trigger.name=='damage'){
|
||||
event.target=target;
|
||||
var str=get.translation(target);event.target=target;
|
||||
player.chooseControl().set('choiceList',[
|
||||
'摸一张牌,然后交给'+str+'一张牌',
|
||||
'令'+str+'摸一张牌,然后'+str+'弃置两张牌',
|
||||
]).set('ai',()=>_status.event.att>0?0:1).set('att',get.attitude(player,target));
|
||||
'step 1'
|
||||
if(result.index==0){
|
||||
player.draw();
|
||||
player.chooseToGive(target,'he',true);
|
||||
}
|
||||
else{
|
||||
target.draw();
|
||||
target.chooseToDiscard(2,'he',true);
|
||||
event.finish();
|
||||
}
|
||||
'step 1'
|
||||
var num=player.countCards('he');
|
||||
if(!num) event.finish();
|
||||
else if(num==1) event._result={bool:true,cards:player.getCards('he')};
|
||||
else player.chooseCard('he',true,'交给'+get.translation(target)+'一张牌');
|
||||
'step 2'
|
||||
if(result.bool) target.gain(result.cards,player,'giveAuto');
|
||||
},
|
||||
},
|
||||
//张燕
|
||||
|
@ -26690,9 +26796,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
ol_dingshangwan:'OL丁尚涴',
|
||||
ol_dingshangwan_prefix:'OL',
|
||||
olfudao:'抚悼',
|
||||
olfudao_info:'①游戏开始时,你摸三张牌并将至多三张手牌交给一名其他角色,然后弃置任意张手牌并记录你的手牌数。②一名角色的回合结束时,若其手牌数和你发动〖抚悼①〗记录的数值相同,则你可以与其各摸一张牌。',
|
||||
olfudao_info:'①游戏开始时,你摸三张牌,然后可以将至多三张手牌交给一名其他角色,然后可以弃置任意张手牌,最后记录你的手牌数。②一名角色的回合结束时,若其手牌数和你发动〖抚悼①〗记录的数值相同,则你可以与其各摸一张牌。',
|
||||
olfengyan:'讽言',
|
||||
olfengyan_info:'锁定技。①当你受到其他角色造成的伤害后,你摸一张牌,然后交给其一张牌。②当你响应其他角色使用的牌时,其摸一张牌,然后弃置两张牌。',
|
||||
olfengyan_info:'锁定技。当你受到其他角色造成的伤害后或响应其他角色使用的牌时,你选择一项:①摸一张牌,然后交给其一张牌。②令其摸一张牌,然后其弃置两张牌。',
|
||||
ol_liwan:'OL李婉',
|
||||
ol_liwan_prefix:'OL',
|
||||
ollianju:'联句',
|
||||
|
@ -26708,6 +26814,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
olfeiyang:'飞扬',
|
||||
//olfeiyang_info:'限定技。准备阶段,你可以弃置两张牌,然后弃置判定区的一张牌。',
|
||||
olfeiyang_info:'准备阶段,你可以弃置三张牌,然后弃置判定区的一张牌。',
|
||||
caoyu:'曹宇',
|
||||
olgongjie:'恭节',
|
||||
olgongjie_info:'每轮的首个回合开始时,你可以令任意名角色获得你的一张牌,然后你摸X张牌(X为你本次失去的花色数)。',
|
||||
olxiangxv:'相胥',
|
||||
olxiangxv_info:'当你的手牌数变为全场最少时,你可以获得以下效果:本回合结束时,将手牌数调整至与当前回合角色手牌数相同(至多摸至五张)。',
|
||||
olxiangzuo:'襄胙',
|
||||
olxiangzuo_info:'限定技,当你进入濒死状态时,你可以交给当前回合角色任意张牌,若如此做,若你本回合已对其发动过〖恭节〗或〖相胥〗,你回复等量的体力。',
|
||||
|
||||
sp_tianji:'天极·皇室宗亲',
|
||||
sp_sibi:'四弼·辅国文曲',
|
||||
|
|
Loading…
Reference in New Issue