Add files via upload
This commit is contained in:
parent
acac6c4273
commit
8df0176d6b
|
@ -1763,14 +1763,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}).set('judging',trigger.player.judging[0]);
|
||||
"step 1"
|
||||
if(result.bool){
|
||||
player.respond(result.cards,'highlight');
|
||||
player.respond(result.cards,'reguicai','highlight');
|
||||
}
|
||||
else{
|
||||
event.finish();
|
||||
}
|
||||
"step 2"
|
||||
if(result.bool){
|
||||
player.logSkill('reguicai');
|
||||
if(trigger.player.judging[0].clone){
|
||||
trigger.player.judging[0].clone.classList.remove('thrownhighlight');
|
||||
game.broadcast(function(card){
|
||||
|
|
|
@ -6198,14 +6198,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}).set('judging',trigger.player.judging[0]);
|
||||
"step 1"
|
||||
if(result.bool){
|
||||
player.respond(result.cards,'highlight');
|
||||
player.respond(result.cards,'highlight','guidao');
|
||||
}
|
||||
else{
|
||||
event.finish();
|
||||
}
|
||||
"step 2"
|
||||
if(result.bool){
|
||||
player.logSkill('guidao');
|
||||
player.$gain2(trigger.player.judging[0]);
|
||||
player.gain(trigger.player.judging[0]);
|
||||
trigger.player.judging[0]=result.cards[0];
|
||||
|
|
193
character/sp.js
193
character/sp.js
|
@ -12,15 +12,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
sp_zizouqi:["mangyachang","xugong","zhangchangpu"],
|
||||
sp_zhongdan:["cuiyan","huangfusong"],
|
||||
sp_star:["sp_xiahoushi","jsp_zhaoyun","huangjinleishi","sp_pangtong","sp_daqiao","sp_ganning","sp_xiahoudun","sp_lvmeng","sp_zhangfei","sp_liubei"],
|
||||
sp_guozhan:["shamoke","ganfuren","yuejin","hetaihou","dingfeng","panfeng"],
|
||||
sp_guozhan:["shamoke","ganfuren","yuejin","hetaihou","dingfeng","panfeng","jianggan"],
|
||||
sp_guozhan2:["mifuren","mateng","tianfeng","chendong","sp_dongzhuo","jiangfei","jiangqing","kongrong","bianfuren","liqueguosi","lvfan","cuimao","jiling","zangba","zhangren","zoushi"],
|
||||
sp_others:["kaisa","hanba"],
|
||||
sp_others:["hanba"],
|
||||
},
|
||||
},
|
||||
character:{
|
||||
mangyachang:["male","qun",4,["spjiedao"],[]],
|
||||
xugong:["male","wu",3,["biaozhao","yechou"],[]],
|
||||
zhangchangpu:["female","wei",3,["yanjiao","xingshen"],[]],
|
||||
jianggan:["male","wei",3,["weicheng","daoshu"]],
|
||||
lijue:["male","qun","4/6",["xinfu_langxi","xinfu_yisuan"],[]],
|
||||
zhangji:["male","qun",4,["xinfu_lveming","xinfu_tunjun"],[]],
|
||||
fanchou:["male","qun",4,["xinfu_xingluan"],[]],
|
||||
|
@ -150,9 +151,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
sp_liuqi:['male','qun',3,['spwenji','sptunjiang']],
|
||||
luzhi:['male','wei',3,['qingzhong','weijing']],
|
||||
|
||||
kaisa:["male","western",4,["zhengfu"]],
|
||||
//kaisa:["male","western",4,["zhengfu"]],
|
||||
},
|
||||
characterIntro:{
|
||||
jianggan:"蒋干,字子翼,汉末三国时期的人物,九江(治今安徽寿县)人。历史上的蒋干是当时的名士、辩论家。而罗贯中在历史小说《三国演义》中则将蒋干刻画成了被周瑜所愚弄的小丑形象。",
|
||||
zhangchangpu:"钟会的母亲。《母夫人张氏传》:夫人张氏,字昌蒲,太原兹氏人,太傅定陵成侯之命妇也。",
|
||||
xugong:"许贡是东汉末官吏。先后任吴郡都尉、太守,欲送密信给曹操,要曹操注意孙策,却被孙策发现而被杀。许贡生前招揽了一些门客,当中有三人不忘故主,千方百计想要手刃仇人。建安五年(公元200年),广陵太守陈登派人秘密联系孙策治下的山贼余党,企图颠覆孙策在江东的统治。孙策决定讨伐陈登,行军到丹徒时,许贡门客终于找到了机会。因为孙策有单骑出猎,在野外思考的习惯,三门客趁孙策轻装外出打猎时,放冷箭射中孙策面颊。这些门客后来在与孙策的搏斗中,被赶到的侍卫杀死。孙策此后因为伤口感染,并且俊美的容貌被毁,终于不治身亡,去世时年仅26岁。",
|
||||
mangyachang:"南蛮王孟获的部将,使一口截头大刀,骑一匹黄骠马。率军与蜀军交战,战败王平。后被平北将军马岱斩杀。只出现在《三国演义》里,正史中无此人。",
|
||||
|
@ -552,6 +554,73 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
},
|
||||
skill:{
|
||||
//蒋干
|
||||
weicheng:{
|
||||
audio:2,
|
||||
trigger:{global:'gainEnd'},
|
||||
forced:true,
|
||||
frequent:true,
|
||||
filter:function(event,player){
|
||||
if(event.source==player&&event.player!=player&&player.hp>player.countCards('h')){
|
||||
for(var i=0;i<event.cards.length;i++){
|
||||
if(event.cards[i].original=='h') return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
},
|
||||
content:function(){
|
||||
player.draw();
|
||||
},
|
||||
},
|
||||
daoshu:{
|
||||
audio:2,
|
||||
enable:'phaseUse',
|
||||
filterTarget:function(c,p,t){
|
||||
return t!=p&&t.countGainableCards(p,'h')>0;
|
||||
},
|
||||
filter:function(e,p){
|
||||
return !p.hasSkill('daoshu_used')
|
||||
},
|
||||
content:function(){
|
||||
'step 0'
|
||||
player.chooseControl(lib.suit).set('prompt','请选择一个花色').ai=function(){return lib.suit.randomGet()};
|
||||
'step 1'
|
||||
event.suit=result.control;
|
||||
player.popup(event.suit+2);
|
||||
game.log(player,'选择了',event.suit+2);
|
||||
player.gainPlayerCard(target,true,'h','visibleMove');
|
||||
'step 2'
|
||||
if(result.bool){
|
||||
var suit2=get.suit(result.cards[0]);
|
||||
if(suit2==event.suit){
|
||||
target.damage();
|
||||
event.finish();
|
||||
}
|
||||
else{
|
||||
player.addTempSkill('daoshu_used','phaseUseAfter');
|
||||
if(player.countCards('h',function(card){return get.suit(card)!=event.suit})==0){
|
||||
player.showHandcards();
|
||||
event.finish();
|
||||
}
|
||||
else player.chooseCard('h',true,function(card){
|
||||
return get.suit(card)!=event.suit
|
||||
},'交给'+get.translation(target)+'一张不为'+get.translation(event.suit)+'花色的牌');
|
||||
}
|
||||
}
|
||||
else event.finish();
|
||||
'step 3'
|
||||
player.give(result.cards,target,true);
|
||||
},
|
||||
ai:{
|
||||
order:1,
|
||||
result:{
|
||||
target:-1,
|
||||
},
|
||||
},
|
||||
subSkill:{
|
||||
used:{sub:true},
|
||||
},
|
||||
},
|
||||
//和沙摩柯一起上线的新服三将
|
||||
spjiedao:{
|
||||
audio:2,
|
||||
|
@ -1038,14 +1107,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}).set('judging',trigger.player.judging[0]);
|
||||
"step 1"
|
||||
if(result.bool){
|
||||
player.respond(result.cards,'highlight');
|
||||
player.respond(result.cards,'highlight','huanshi_three');
|
||||
}
|
||||
else{
|
||||
event.finish();
|
||||
}
|
||||
"step 2"
|
||||
if(result.bool){
|
||||
player.logSkill('huanshi_three');
|
||||
if(trigger.player.judging[0].clone){
|
||||
trigger.player.judging[0].clone.classList.remove('thrownhighlight');
|
||||
game.broadcast(function(card){
|
||||
|
@ -2145,6 +2213,49 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
}
|
||||
},
|
||||
bingzhao:{
|
||||
audio:2,
|
||||
unique:true,
|
||||
zhuSkill:true,
|
||||
forced:true,
|
||||
intro:{
|
||||
content:function(group){
|
||||
return '已选择了'+get.translation(group)+'势力'
|
||||
},
|
||||
},
|
||||
trigger:{global:['gameDrawAfter','zhuUpdate']},
|
||||
filter:function(event,player){
|
||||
return !player.storage.bingzhao&&player.hasZhuSkill('bingzhao');
|
||||
},
|
||||
content:function(){
|
||||
'step 0'
|
||||
var list=[];
|
||||
for(var i=0;i<lib.group.length;i++){
|
||||
if(lib.group[i]=='shen') continue;
|
||||
if(lib.group[i]=='western'&&!gamehasPlayer(function(current){
|
||||
return current.group=='western'
|
||||
})) continue;
|
||||
list.push(lib.group[i]);
|
||||
}
|
||||
player.chooseControl(list).set('prompt','秉诏:请选择一个势力').set('ai',function(){
|
||||
var listx=list.slice(0);
|
||||
list.sort(function(a,b){
|
||||
return game.countPlayer(function(current){
|
||||
return current.group==b;
|
||||
})-game.countPlayer(function(current){
|
||||
return current.group==a;
|
||||
});
|
||||
})
|
||||
return listx[0];
|
||||
});
|
||||
'step 1'
|
||||
var group=result.control;
|
||||
player.popup(get.translation(group)+'势力',get.groupnature(group,'raw'));
|
||||
game.log(player,'选择了','#y'+get.translation(group)+'势力');
|
||||
player.storage.bingzhao=group;
|
||||
player.markSkill('bingzhao');
|
||||
},
|
||||
},
|
||||
baijia:{
|
||||
audio:2,
|
||||
unique:true,
|
||||
|
@ -2190,7 +2301,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(info.type=='delay') return false;
|
||||
return game.hasPlayer(function(current){
|
||||
if(!current.hasSkill('zongkui_mark')) return false;
|
||||
return !event.targets.contains(current)&&lib.filter.filterTarget2(event.card,player,current);
|
||||
return !event.targets.contains(current)&&lib.filter.targetEnabled2(event.card,player,current);
|
||||
});
|
||||
},
|
||||
direct:true,
|
||||
|
@ -2253,9 +2364,24 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
return event.player!=player&&event.player.hasSkill('zongkui_mark');
|
||||
},
|
||||
content:function(){
|
||||
'step 0'
|
||||
player.draw();
|
||||
player.storage.guju++;
|
||||
player.markSkill('guju');
|
||||
'step 1'
|
||||
if(player.hasZhuSkill('bingzhao',trigger.player)&&trigger.player.group==player.storage.bingzhao){
|
||||
trigger.player.chooseBool(get.prompt2('bingzhao',player)).ai=function(){
|
||||
return get.attitude(trigger.player,player)>1;
|
||||
};
|
||||
}
|
||||
else event.finish();
|
||||
'step 2'
|
||||
if(result.bool){
|
||||
trigger.player.logSkill('bingzhao',player);
|
||||
player.draw();
|
||||
player.storage.guju++;
|
||||
player.markSkill('guju');
|
||||
}
|
||||
},
|
||||
ai:{
|
||||
combo:'zongkui'
|
||||
|
@ -2450,7 +2576,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
'step 0'
|
||||
var str='令一名其他角色交给你一张牌';
|
||||
if(player.storage.choulve){
|
||||
str+='若其如此做,视为你使用'+get.translation(player.storage.choulve);
|
||||
str+='若其如此做,视为你使用【'+get.translation(player.storage.choulve)+'】';
|
||||
}
|
||||
var goon=true;
|
||||
if(player.storage.choulve){
|
||||
|
@ -2474,7 +2600,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
player.logSkill('choulve',target);
|
||||
target.chooseCard('he','是否交给'+get.translation(player)+'一张牌?',
|
||||
player.storage.choulve?('若如此做,视为'+get.translation(player)+
|
||||
'使用'+get.translation(player.storage.choulve)):null).set('ai',function(card){
|
||||
'使用【'+get.translation(player.storage.choulve)+'】'):null).set('ai',function(card){
|
||||
if(_status.event.goon) return 7-get.value(card);
|
||||
return 0;
|
||||
}).set('goon',get.attitude(target,player)>1);
|
||||
|
@ -2487,9 +2613,40 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(result.bool){
|
||||
event.target.give(result.cards,player);
|
||||
if(player.storage.choulve){
|
||||
player.chooseUseTarget(player.storage.choulve);
|
||||
var card=player.storage.choulve;
|
||||
var select=get.select(get.info(card).selectTarget);
|
||||
var targets=game.filterPlayer();
|
||||
if(select[1]==-1){
|
||||
for(var i=0;i<targets.length;i++){
|
||||
if(!player.canUse(card,targets[i])){
|
||||
targets.splice(i--,1);
|
||||
}
|
||||
}
|
||||
if(targets.length){
|
||||
player.useCard(card,targets);
|
||||
}
|
||||
}
|
||||
else{
|
||||
player.chooseTarget(select,'选择【'+get.translation(card)+'】的目标',true,function(cardx,player,target){
|
||||
var card=_status.event.card;
|
||||
return _status.event.targets.contains(target)&&player.canUse(card,target);
|
||||
}).set('ai',function(target){
|
||||
var card=_status.event.card;
|
||||
var player=_status.event.player;
|
||||
return get.effect(target,card,player,player);
|
||||
}).set('targets',targets).set('card',card);
|
||||
}
|
||||
}
|
||||
else event.finish();
|
||||
}
|
||||
else event.finish();
|
||||
'step 3'
|
||||
if(result.bool){
|
||||
player.useCard(player.storage.choulve,result.targets);
|
||||
}
|
||||
else event.finish();
|
||||
'step 4'
|
||||
player.getStat().card[player.storage.choulve.name]--;
|
||||
},
|
||||
group:'choulve_damage',
|
||||
subSkill:{
|
||||
|
@ -2498,16 +2655,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
silent:true,
|
||||
content:function(){
|
||||
if(trigger.card&&get.info(trigger.card).enable&&get.type(trigger.card)!='delay'){
|
||||
if(trigger.cards&&trigger.cards.length==1&&trigger.cards[0]==trigger.card){
|
||||
player.storage.choulve=game.createCard(trigger.card);
|
||||
}
|
||||
else{
|
||||
player.storage.choulve={name:trigger.card.name};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
polu:{
|
||||
audio:2,
|
||||
|
@ -2521,7 +2673,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
player.useCard(game.createCard('ly_piliche','diamond',1),player);
|
||||
}
|
||||
else{
|
||||
player.draw();
|
||||
player.draw(trigger.num);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -11032,7 +11184,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
"step 1"
|
||||
if(result.bool){
|
||||
event.card=result.links[0];
|
||||
player.respond(event.card,'highlight');
|
||||
player.respond(event.card,'highlight').nopopup=true;
|
||||
}
|
||||
else{
|
||||
event.finish();
|
||||
|
@ -11987,6 +12139,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
mangyachang:"忙牙长",
|
||||
xugong:"许贡",
|
||||
zhangchangpu:"张昌蒲",
|
||||
jianggan:"蒋干",
|
||||
|
||||
spjiedao:"截刀",
|
||||
"spjiedao_info":"当你每回合第一次造成伤害时,你可令此伤害至多+X(X为你损失的体力值)。然后若受到此伤害的角色没有死亡,你弃置等同于此伤害加值的牌。",
|
||||
|
@ -12007,6 +12160,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
xingshen:"省身",
|
||||
"xingshen_info":"当你受到伤害后,你可以摸一张牌且下一次发动“严教”亮出的牌数+1。若你的手牌数为全场最少,则改为摸两张牌;若你的体力值为全场最少,则“严教”亮出的牌数改为+2(加值总数不能超过4)。",
|
||||
|
||||
weicheng:'伪诚',
|
||||
weicheng_info:'当其他角色获得你的手牌后,若你的手牌数小于体力值,你可以摸一张牌。',
|
||||
daoshu:'盗书',
|
||||
daoshu_info:'出牌阶段,你可以选择一个花色并获得一名其他角色的一张手牌。若此牌花色与你选择的相同,则你对其造成1点伤害。否则你须交给其一张与你选择的花色不同的手牌(没有则展示手牌),且本阶段内不能再发动【盗书】',
|
||||
|
||||
xinshanjia:"缮甲",
|
||||
"xinshanjia_info":"出牌阶段开始时,你可以摸三张牌,然后弃置3-X张牌(X为你本局游戏内失去过的装备区内的牌的数目且至多为3)。若你没有以此法弃置基本牌或锦囊牌,则你可以视为使用了一张不计入出牌阶段使用次数的【杀】。",
|
||||
"new_meibu":"魅步",
|
||||
|
@ -12548,6 +12706,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
yicong_info:'锁定技,只要你的体力值大于2点,你的进攻距离+1;只要你的体力值为2点或更低,你的防御距离+1',
|
||||
baobian_info:'锁定技,若你的体力值为3或更少,你视为拥有技能“挑衅”;若你的体力值为2或更少;你视为拥有技能“咆哮”;若你的体力值为1,你视为拥有技能“神速”。',
|
||||
|
||||
bingzhao:'秉诏',
|
||||
bingzhao_info:'主公技,游戏开始时,你选择一个其他势力,该势力有“傀”标记的角色受到伤害后,可令你因“骨疽”额外摸一张牌。',
|
||||
|
||||
sp_default:"常规",
|
||||
sp_whlw:"文和乱武",
|
||||
sp_zlzy:"逐鹿中原",
|
||||
|
|
|
@ -216,14 +216,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}).set('judging',trigger.player.judging[0]);
|
||||
"step 1"
|
||||
if(result.bool){
|
||||
player.respond(result.cards,'highlight');
|
||||
player.respond(result.cards,'guicai','highlight');
|
||||
}
|
||||
else{
|
||||
event.finish();
|
||||
}
|
||||
"step 2"
|
||||
if(result.bool){
|
||||
player.logSkill('guicai');
|
||||
if(trigger.player.judging[0].clone){
|
||||
trigger.player.judging[0].clone.classList.remove('thrownhighlight');
|
||||
game.broadcast(function(card){
|
||||
|
|
|
@ -0,0 +1,555 @@
|
|||
'use strict';
|
||||
game.import('character',function(lib,game,ui,get,ai,_status){
|
||||
return {
|
||||
name:'tw',
|
||||
connect:false,
|
||||
characterSort:{},
|
||||
character:{
|
||||
tw_beimihu:['female','qun',3,['zongkui','guju','baijia','bingzhao'],['zhu']],
|
||||
nashime:['male','qun',3,['chijie','waishi','renshe']],
|
||||
tw_xiahouba:['male','shu',4,['twyanqin','twbaobian']],
|
||||
tw_zumao:['male','wu',4,['twtijin']],
|
||||
tw_caoang:['male','wei',4,['twxiaolian']],
|
||||
tw_dingfeng:['male','wu',4,['twqijia','twzhulin']],
|
||||
tw_caohong:['male','wei',4,['twhuzhu','twliancai']],
|
||||
tw_maliang:['male','shu',3,['twrangyi','twbaimei']],
|
||||
kaisa:["male","western",4,["zhengfu"]],
|
||||
},
|
||||
characterIntro:{
|
||||
nashime:'难升米(なしめ,或なんしょうまい)是倭国大夫。景初二年六月,受女王卑弥呼之命,与都市牛利出使魏国,被魏国拜为率善中郎将。',
|
||||
},
|
||||
card:{
|
||||
},
|
||||
characterFilter:{},
|
||||
skill:{
|
||||
twrangyi:{
|
||||
audio:2,
|
||||
enable:'phaseUse',
|
||||
usable:1,
|
||||
filter:function(event,player){
|
||||
return player.countCards('h')>0;
|
||||
},
|
||||
filterTarget:lib.filter.notMe,
|
||||
delay:0,
|
||||
content:function(){
|
||||
'step 0'
|
||||
event.cards=player.getCards('h');
|
||||
player.give(event.cards,target,true);
|
||||
'step 1'
|
||||
target.chooseToUse({
|
||||
prompt:'请使用得到的一张牌,或者受到来自'+get.translation(player)+'的一点伤害',
|
||||
filterCard:function(card,player,event){
|
||||
if(!cards.contains(card)) return false;
|
||||
return lib.filter.filterCard(card,player,event);
|
||||
},
|
||||
});
|
||||
'step 2'
|
||||
if(result.bool){
|
||||
var hs=target.getCards('h');
|
||||
for(var i=0;i<cards.length;i++){
|
||||
if(!hs.contains(cards[i])) cards.splice(i--,1);
|
||||
}
|
||||
if(cards.length) target.give(cards,player,true);
|
||||
}
|
||||
else target.damage('nocard');
|
||||
},
|
||||
ai:{
|
||||
order:1,
|
||||
result:{
|
||||
target:function(player,target){
|
||||
var hs=player.getCards('h');
|
||||
for(var i=0;i<hs.length;i++){
|
||||
var hi=hs[i];
|
||||
if(hi.name=='tao'||game.hasPlayer(function(current){
|
||||
return target.canUse(hi,current)&&get.effect(current,hi,target,target);
|
||||
})) return 1;
|
||||
}
|
||||
return get.damageEffect(target,player,target);
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
twbaimei:{
|
||||
audio:2,
|
||||
trigger:{
|
||||
player:"damageBefore",
|
||||
},
|
||||
forced:true,
|
||||
priority:15,
|
||||
filter:function (event,player){
|
||||
if(player.countCards('h')) return false;
|
||||
if(event.nature) return true;
|
||||
return get.type(event.card,'trick')=='trick';
|
||||
},
|
||||
content:function (){
|
||||
trigger.cancel();
|
||||
},
|
||||
ai:{
|
||||
effect:{
|
||||
target:function (card,player,target,current){
|
||||
if(target.countCards('h')) return;
|
||||
if(get.tag(card,'natureDamage')) return 'zerotarget';
|
||||
if(get.type(card)=='trick'&&get.tag(card,'damage')){
|
||||
return 'zeroplayertarget';
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
twhuzhu:{
|
||||
audio:2,
|
||||
enable:'phaseUse',
|
||||
usable:1,
|
||||
filter:function(e,player){
|
||||
return player.countCards('e')>0;
|
||||
},
|
||||
filterTarget:function(card,player,target){
|
||||
return target!=player&&target.countCards('h')>0
|
||||
},
|
||||
content:function(){
|
||||
'step 0'
|
||||
target.chooseCard('交给'+get.translation(player)+'一张手牌','h',true);
|
||||
'step 1'
|
||||
target.give(result.cards,player);
|
||||
'step 2'
|
||||
if(player.countGainableCards(player,'e')) target.gainPlayerCard(player,'e',true);
|
||||
'step 3'
|
||||
if(target.isDamaged()&&target.hp<=player.hp){
|
||||
player.chooseBool('是否令'+get.translation(target)+'回复1点体力?').ai=function(){
|
||||
return get.recoverEffect(target,player,player);
|
||||
};
|
||||
}
|
||||
'step 4'
|
||||
if(result.bool) target.recover();
|
||||
},
|
||||
ai:{
|
||||
order:8,
|
||||
result:{
|
||||
target:function(player,target){
|
||||
var eff=(target.isDamaged()&&target.hp<=player.hp)?get.recoverEffect(target,player,player):0;
|
||||
if(eff<=0&&!player.countGainableCards(target,'e')) return -1;
|
||||
return eff;
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
twliancai:{
|
||||
audio:2,
|
||||
trigger:{player:['turnOverEnd','phaseEnd']},
|
||||
filter:function(card,player,target){
|
||||
return target=='phaseEnd'||player.countCards('h')<player.hp;
|
||||
},
|
||||
filterTarget:function(card,player,target){
|
||||
return target!=player&&target.countGainableCards(player,'e')>0;
|
||||
},
|
||||
check:function(card,player){
|
||||
if(card.name=='turnOve') return true;
|
||||
if(player.isTurnedOver()) return true;
|
||||
if(player.hp-player.countCards('h')>1) return true;
|
||||
return game.hasPlayer(function(current){
|
||||
return lib.skill.twliancai.filterTarget(null,player,current)&&lib.skill.twliancai.filterAI(current);
|
||||
});
|
||||
},
|
||||
filterAI:function(target){
|
||||
var player=_status.event.player;
|
||||
var att=get.attitude(player,target);
|
||||
if(target.isDamaged()&&target.countCards('e','baiyin')&&att>0) return 2*att;
|
||||
return -att;
|
||||
},
|
||||
prompt2:function(card,player,target){
|
||||
return card.name=='phase'?'将武将牌翻面,然后获得一名其他角色装备区内的一张牌':'将手牌摸至与体力值相同';
|
||||
},
|
||||
content:function(){
|
||||
'step 0'
|
||||
if(event.triggername=='phaseEnd') player.turnOver();
|
||||
else{
|
||||
player.draw(player.hp-player.countCards('h'));
|
||||
event.finish();
|
||||
}
|
||||
'step 1'
|
||||
player.chooseTarget('获得一名角色装备区内的一张牌',lib.skill.twliancai.filterTarget).ai=lib.skill.twliancai.filterAI;
|
||||
'step 2'
|
||||
if(result.bool){
|
||||
player.line(result.targets,'thunder');
|
||||
player.gainPlayerCard('e',true,result.targets[0]);
|
||||
}
|
||||
},
|
||||
},
|
||||
twqijia:{
|
||||
group:'twqijia_alka',
|
||||
audio:2,
|
||||
enable:'phaseUse',
|
||||
filter:function(event,player){
|
||||
return player.countCards('e',function(card){
|
||||
return !player.storage.twqijia.contains(get.subtype(card));
|
||||
});
|
||||
},
|
||||
filterTarget:function(card,player,target){
|
||||
return target!=player&&player.canUse({name:'sha'},target);
|
||||
},
|
||||
position:'e',
|
||||
filterCard:function(card,player){
|
||||
return !player.storage.twqijia.contains(get.subtype(card));
|
||||
},
|
||||
content:function(){
|
||||
'step 0'
|
||||
player.storage.twqijia.push(get.subtype(cards[0]));
|
||||
player.useCard({name:'sha'},target);
|
||||
'step 1'
|
||||
player.getStat().card.sha--;
|
||||
},
|
||||
subSkill:{
|
||||
alka:{
|
||||
sub:true,
|
||||
trigger:{player:['phaseUseBegin','phaseUseEnd']},
|
||||
silent:true,
|
||||
content:function(){
|
||||
player.storage.twqijia=[];
|
||||
player.storage.twzhulin=[];
|
||||
},
|
||||
},
|
||||
},
|
||||
check:function(card){
|
||||
return 7-get.value(card);
|
||||
},
|
||||
ai:{
|
||||
order:function(){
|
||||
return get.order({name:'sha'})-0.2;
|
||||
},
|
||||
result:{
|
||||
target:function(player,target){
|
||||
return get.effect(target,{name:'sha'},player,player);
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
twzhulin:{
|
||||
group:'twqijia_alka',
|
||||
locked:false,
|
||||
mod:{
|
||||
globalFrom:function(from,to,distance){
|
||||
if(from.storage.twzhulin&&from.storage.twzhulin.contains(to)) return -Infinity;
|
||||
}
|
||||
},
|
||||
enable:'phaseUse',
|
||||
filter:function(event,player){
|
||||
return player.countCards('h',lib.skill.twzhulin.filterCard)>0;
|
||||
},
|
||||
filterCard:function(card){
|
||||
return card.name=='tao'||card.name=='jiu';
|
||||
},
|
||||
filterTarget:lib.filter.notMe,
|
||||
content:function(){
|
||||
player.storage.twzhulin.add(target);
|
||||
player.markSkill('twzhulin');
|
||||
},
|
||||
intro:{
|
||||
content:function(content,player){
|
||||
return '至'+get.translation(content)+'的距离视为1';
|
||||
},
|
||||
},
|
||||
},
|
||||
twxiaolian:{
|
||||
inherit:'twtijin',
|
||||
filter:function(event,player){
|
||||
return event.card&&event.card.name=='sha'&&event.player!=player&&
|
||||
event.targets.length==1&&event.targets[0]!=player;
|
||||
},
|
||||
content:function(){
|
||||
trigger.twxiaolian=trigger.targets[0];
|
||||
trigger.targets=[player];
|
||||
},
|
||||
group:'twxiaolian_damage',
|
||||
subSkill:{
|
||||
distance:{
|
||||
sub:true,
|
||||
charlotte:true,
|
||||
init:function(player,skill){
|
||||
if(!player.storage[skill]) player.storage[skill]=[];
|
||||
},
|
||||
mark:true,
|
||||
marktext:'马',
|
||||
intro:{
|
||||
content:'cards',
|
||||
},
|
||||
mod:{
|
||||
globalTo:function(from,to,distance){
|
||||
if(from!=to) return distance+to.storage.twxiaolian_distance.length;
|
||||
},
|
||||
},
|
||||
},
|
||||
damage:{
|
||||
sub:true,
|
||||
trigger:{player:'damageEnd'},
|
||||
direct:true,
|
||||
filter:function(event,player){
|
||||
return event.getParent(2).twxiaolian!=undefined;
|
||||
},
|
||||
content:function(){
|
||||
'step 0'
|
||||
var target=trigger.getParent(2).twxiaolian;
|
||||
event.target=target;
|
||||
player.chooseCard('是否将一张牌当做【马】置于'+get.translation(target)+'的武将牌旁?','he').ai=function(target){
|
||||
if(get.attitude(_status.event.player,_status.event.getParent('twxiaolian_damage').target)>2) return 7-get.value(card);
|
||||
return 0;
|
||||
};
|
||||
'step 1'
|
||||
if(result.bool){
|
||||
player.logSkill('twxiaolian',target);
|
||||
player.lose(result.cards,ui.special,'toStorage');
|
||||
target.addSkill('twxiaolian_distance');
|
||||
target.storage.twxiaolian_distance.addArray(result.cards);
|
||||
target.markSkill('twxiaolian_distance');
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
twtijin:{
|
||||
audio:2,
|
||||
trigger:{global:'useCard'},
|
||||
filter:function(event,player){
|
||||
return event.card&&event.card.name=='sha'&&event.player!=player&&
|
||||
event.targets.length==1&&event.targets[0]!=player&&get.distance(event.player,player,'attack')<=1;
|
||||
},
|
||||
logTarget:'player',
|
||||
check:function(event,player){
|
||||
return get.effect(event.targets[0],{name:'sha'},event.player,player)<=get.effect(player,{name:'sha'},event.player,player);
|
||||
},
|
||||
content:function(){
|
||||
'step 0'
|
||||
trigger.targets=[player];
|
||||
var next=game.createEvent('twtijin_discard',null,trigger.getParent());
|
||||
next.player=player;
|
||||
next.target=trigger.player;
|
||||
next.setContent(function(){
|
||||
player.line(target,'green');
|
||||
player.discardPlayerCard(target,true,'he');
|
||||
});
|
||||
},
|
||||
},
|
||||
twyanqin:{
|
||||
forbid:['guozhan'],
|
||||
audio:2,
|
||||
trigger:{player:'phaseBegin'},
|
||||
direct:true,
|
||||
content:function(){
|
||||
'step 0'
|
||||
var list=[];
|
||||
if(player.group!='wei') list.push('wei2');
|
||||
if(player.group!='shu') list.push('shu2');
|
||||
list.push('cancel2');
|
||||
player.chooseControl(list).set('ai',function(){
|
||||
return list.randomGet();
|
||||
}).set('prompt',get.prompt2('twyanqin'));
|
||||
'step 1'
|
||||
if(result.control!='cancel2'){
|
||||
player.logSkill('twyanqin');
|
||||
var group=result.control.slice(0,3);
|
||||
player.group=group;
|
||||
player.node.name.dataset.nature=get.groupnature(group);
|
||||
game.log(player,'将势力变为了','#y'+get.translation(group+2));
|
||||
}
|
||||
},
|
||||
},
|
||||
twbaobian:{
|
||||
audio:2,
|
||||
trigger:{source:'damageBefore'},
|
||||
filter:function(event,player){
|
||||
var card=event.card;
|
||||
if(!card||(card.name!='sha'&&card.name!='juedou')) return false;
|
||||
return event.player.group==player.group||event.player.countCards('h')>event.player.hp
|
||||
},
|
||||
check:function(event,player){
|
||||
var att=get.attitude(player,event.player);
|
||||
if(event.player.group==player.group) return att>0;
|
||||
return att<0;
|
||||
},
|
||||
logTarget:'player',
|
||||
content:function(){
|
||||
var target=trigger.player;
|
||||
if(target.group==player.group){
|
||||
trigger.cancel();
|
||||
var num=target.maxHp-target.countCards('h');
|
||||
if(num) target.draw(num);
|
||||
}
|
||||
else{
|
||||
player.discardPlayerCard(target,'h',true,target.countCards('h')-target.hp)
|
||||
}
|
||||
},
|
||||
},
|
||||
renshe:{
|
||||
trigger:{player:'damageEnd'},
|
||||
direct:true,
|
||||
content:function(){
|
||||
'step 0'
|
||||
var choiceList=['令一名其他角色与你各摸一张牌','令自己下个出牌阶段可以多发动一次【外使】'];
|
||||
if(lib.skill.chijie.filter({},player)) choiceList.push('将自己的势力变更为场上存在的一个其他势力');
|
||||
player.chooseControl('cancel2').set('prompt',get.prompt('renshe')).set('choiceList',choiceList).set('ai',function(){
|
||||
if(game.hasPlayer(function(current){
|
||||
return get.attitude(player,current)>0||current.hasSkillTag('nogain');
|
||||
})) return 0;
|
||||
return 1;
|
||||
});
|
||||
'step 1'
|
||||
if(result.control=='cancel2') event.finish();
|
||||
else{
|
||||
event.index=result.index;
|
||||
player.logSkill('renshe');
|
||||
if(event.index==0){
|
||||
player.chooseTarget('请选择一名角色,与其各摸一张牌',lib.filter.notMe,true).ai=function(target){
|
||||
if(target.hasSkillTag('nogain')) return 0.1;
|
||||
return get.attitude(_status.event.player,target);
|
||||
};
|
||||
}
|
||||
else if(result.index==1){
|
||||
player.storage.waishi++;
|
||||
event.finish();
|
||||
}
|
||||
else{
|
||||
var next=game.createEvent('renshe_changeGroup');
|
||||
next.player=player;
|
||||
next.renshe=true;
|
||||
next.setContent(lib.skill.chijie.content);
|
||||
event.finish();
|
||||
}
|
||||
}
|
||||
'step 2'
|
||||
if(result.bool){
|
||||
player.line(result.targets[0],'green');
|
||||
game.asyncDraw([player,result.targets[0]]);
|
||||
game.delay();
|
||||
}
|
||||
},
|
||||
},
|
||||
waishi:{
|
||||
group:'waishi_afterstory',
|
||||
subSkill:{
|
||||
afterstory:{
|
||||
trigger:{player:'phaseUseEnd'},
|
||||
forced:true,
|
||||
silent:true,
|
||||
popup:false,
|
||||
content:function(){player.storage.waishi=1},
|
||||
},
|
||||
},
|
||||
init:function(player,skill){
|
||||
player.storage[skill]=1;
|
||||
},
|
||||
enable:'phaseUse',
|
||||
filter:function(event,player){
|
||||
return player.storage.waishi>0;
|
||||
},
|
||||
filterTarget:function(card,player,target){
|
||||
return target!=player&&target.countCards('h')>=ui.selected.cards.length;
|
||||
},
|
||||
filterCard:true,
|
||||
check:function(card){
|
||||
if(!game.hasPlayer(function(current){
|
||||
return current!=_status.event.player&¤t.countCards('h')>ui.selected.cards.length;
|
||||
})) return 0;
|
||||
return 6-get.value(card);
|
||||
},
|
||||
selectCard:function(){
|
||||
if(!ui.selected.targets.length) return [1,game.countGroup()];
|
||||
return [1,Math.min(ui.selected.targets[0].countCards('h'),game.countGroup())];
|
||||
},
|
||||
discard:false,
|
||||
lose:false,
|
||||
delay:0,
|
||||
content:function(){
|
||||
'step 0'
|
||||
player.storage.waishi--;
|
||||
player.lose(cards,ui.special);
|
||||
player.gainPlayerCard(target,true,'h',cards.length).chooseonly=true;
|
||||
'step 1'
|
||||
event.cards2=result.cards;
|
||||
target.lose(event.cards2,ui.special);
|
||||
'step 2'
|
||||
player.gain(event.cards2);
|
||||
target.gain(cards);
|
||||
player.$give(cards.length,target);
|
||||
target.$give(event.cards2.length,player);
|
||||
'step 3'
|
||||
game.delay(1.2);
|
||||
'step 4'
|
||||
if(target.countCards('h')>player.countCards('h')||player.group==target.group) player.draw();
|
||||
},
|
||||
ai:{
|
||||
result:{
|
||||
player:function(player,target){
|
||||
if(player.countCards('h')<target.countCards('h')||player.group==target.group) return 1;
|
||||
return 0.1;
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
chijie:{
|
||||
forbid:['guozhan'],
|
||||
trigger:{global:'gameDrawAfter'},
|
||||
direct:true,
|
||||
filter:function(event,player){
|
||||
return game.hasPlayer(function(current){
|
||||
return current.group!=player.group;
|
||||
});
|
||||
},
|
||||
content:function(){
|
||||
'step 0'
|
||||
var list=[];
|
||||
game.countPlayer(function(current){
|
||||
if(current.group!=player.group&¤t.group!='shen') list.add(current.group);
|
||||
});
|
||||
if(!event.renshe) list.push('cancel2');
|
||||
player.chooseControl(list).set('prompt',event.renshe?'请选择一个势力':get.prompt('chijie')).set('prompt2',event.renshe?'':'将自己的势力变更为场上存在的一个势力').set('',function(){
|
||||
return list.randomGet();
|
||||
});
|
||||
'step 1'
|
||||
if(result.control!='cancel2'){
|
||||
if(!event.renshe) player.logSkill('chijie');
|
||||
var group=result.control;
|
||||
player.group=group;
|
||||
player.node.name.dataset.nature=get.groupnature(group);
|
||||
game.log(player,'将势力变为了','#y'+get.translation(group));
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
translate:{
|
||||
tw_beimihu:'TW卑弥呼',
|
||||
nashime:'难升米',
|
||||
tw_xiahouba:'TW夏侯霸',
|
||||
tw_zumao:'TW祖茂',
|
||||
tw_caoang:'TW曹昂',
|
||||
tw_dingfeng:'TW丁奉',
|
||||
tw_caohong:'TW曹洪',
|
||||
tw_maliang:'TW马良',
|
||||
|
||||
twyanqin:'姻亲',
|
||||
twyanqin_info:'准备阶段,你可以将势力变更为魏或蜀。',
|
||||
twbaobian:'豹变',
|
||||
twbaobian_info:'当你使用【杀】或【决斗】造成伤害时,若目标角色的势力与你相同,则你可以防止此伤害,然后其将手牌数补充至与体力值相同。若不同且其手牌数大于体力值,则你可以将其手牌弃置至与其体力值相同。',
|
||||
twtijin:'替巾',
|
||||
twtijin_info:'当你攻击范围内的一名其他角色使用【杀】指定另一名其他角色为目标时,你可以将此【杀】的目标改为你。若如此做,此【杀】结算完成后,你弃置该角色的一张牌。',
|
||||
twxiaolian:'孝廉',
|
||||
twxiaolian_info:'当一名其他角色使用【杀】指定另一名其他角色为目标时,你可以将此【杀】的目标改为你。若如此做,当你受到此【杀】的伤害后,你可以将一张牌放在此【杀】原目标的武将牌旁,称之为“马”。锁定技,场上的一名角色每有一张“马”,其他角色计算与其的距离便+1。',
|
||||
twqijia:'弃甲',
|
||||
twqijia_info:'出牌阶段,你可以弃置一张装备区内的牌(每种类型的装备牌限一次),然后视为对攻击范围内的一名其他角色使用了一张【杀】。',
|
||||
twzhulin:'诛綝',
|
||||
twzhulin_info:'出牌阶段,你可以弃置一张【桃】或【酒】并选择一名其他角色。你与其的距离视为1直到此阶段结束。',
|
||||
twhuzhu:'护主',
|
||||
twhuzhu_info:'出牌阶段限一次,若你的装备区内有牌,则你可以令一名其他角色交给你一张手牌,然后获得你装备区内的一张牌。若其体力值不大于你,则你可以令其回复1点体力。',
|
||||
twliancai:'敛财',
|
||||
twliancai_info:'结束阶段,你可以将武将牌翻面,然后获得一名其他角色装备区内的一张牌。当你的武将牌翻面时,你可以将手牌补至与体力值相同。',
|
||||
twrangyi:'攘夷',
|
||||
twrangyi_info:'出牌阶段限一次,你可以将所有手牌交给一名其他角色,然后令其选择一项:1.使用其中的一张牌,然后将其余的牌交还给你。2.受到来自你的1点伤害。',
|
||||
twbaimei:'白眉',
|
||||
twbaimei_info:'锁定技,若你没有手牌,则防止你受到的所有属性伤害和锦囊牌造成的伤害。',
|
||||
chijie:'持节',
|
||||
chijie_info:' 游戏开始时,你可以选择一个现存势力,你的势力视为该势力。 ',
|
||||
waishi:'外使',
|
||||
waishi_info:' 出牌阶段限一次,你可以用至多X张牌交换一名其他角色等量的手牌(X为现存势力数),然后若其与你势力相同或手牌多于你,你摸一张牌。',
|
||||
renshe:'忍涉',
|
||||
renshe_info:'当你受到伤害后,你可以选择一项:将势力改为现存的另一个势力;或可以额外发动一次“外使”直到你的下个出牌阶段结束;或与另一名其他角色各摸一张牌。',
|
||||
}
|
||||
};
|
||||
});
|
|
@ -162,7 +162,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
else{
|
||||
var card=target.getCards('hej').randomGet();
|
||||
target.$giveAuto(card,player);
|
||||
player.gain(card);
|
||||
player.gain(card,target);
|
||||
}
|
||||
},
|
||||
ai:{
|
||||
|
@ -274,7 +274,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(result.index==0){
|
||||
var card=target.getCards('hej').randomGet();
|
||||
target.$giveAuto(card,player);
|
||||
player.gain(card);
|
||||
player.gain(card,target);
|
||||
target.addTempSkill('tanbei_effect2','phaseAfter');
|
||||
}
|
||||
else{
|
||||
|
@ -1322,7 +1322,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(card2) list.push(card2);
|
||||
if(list.length>0){
|
||||
trigger.player.$giveAuto(list,player);
|
||||
player.gain(list);
|
||||
player.gain(list,trigger.player);
|
||||
}
|
||||
game.delay();
|
||||
},
|
||||
|
@ -1882,8 +1882,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(player==target&&get.subtype(card)=='equip2'){
|
||||
if(get.equipValue(card)<=8) return 0;
|
||||
}
|
||||
if(target.getEquip(2)) return;
|
||||
if(target.storage.lose_pos_equip&&target.storage.lose_pos_equip.contains('equip2')) return;
|
||||
if(!target.isEmpty(2)) return;
|
||||
if(get.tag(card,'natureDamage')) return 'zerotarget';
|
||||
if(get.type(card)=='trick'&&get.tag(card,'damage')){
|
||||
return 'zeroplayertarget';
|
||||
|
@ -2782,7 +2781,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
"step 2"
|
||||
if(result.bool&&result.cards&&result.cards.length){
|
||||
event.current.$giveAuto(result.cards,player);
|
||||
player.gain(result.cards);
|
||||
player.gain(result.cards,event.current);
|
||||
}
|
||||
event.current=event.current.next;
|
||||
if(event.current!=player) event.goto(1);
|
||||
|
|
Loading…
Reference in New Issue