noname/character/mobile.js

1298 lines
41 KiB
JavaScript
Raw Normal View History

2019-07-17 08:25:58 +00:00
'use strict';
game.import('character',function(lib,game,ui,get,ai,_status){
return {
name:'mobile',
connectBanned:['miheng'],
connect:true,
2019-08-23 15:03:21 +00:00
characterSort:{
mobile:{
2019-12-25 05:21:37 +00:00
mobile_default:["miheng","taoqian","liuzan","lingcao","sunru","lifeng","zhuling","liuye","zhaotongzhaoguang","majun","simazhao","wangyuanji","pangdegong","shenpei","hujinding"],
2019-11-23 12:41:07 +00:00
mobile_others:["re_jikang","old_bulianshi","old_yuanshu","re_wangyun","re_baosanniang"],
2019-08-23 15:03:21 +00:00
},
},
2019-07-17 08:25:58 +00:00
character:{
re_jikang:["male","wei",3,["new_qingxian","new_juexiang"]],
old_bulianshi:['female','wu',3,['anxu','zhuiyi']],
miheng:['male','qun',3,['kuangcai','shejian']],
taoqian:['male','qun',3,['zhaohuo','yixiang','yirang']],
liuzan:['male','wu',4,['fenyin']],lingcao:['male','wu',4,['dujin']],
sunru:['female','wu',3,['yingjian','shixin']],
lifeng:['male','shu',3,['tunchu','shuliang']],
2019-08-30 15:02:50 +00:00
zhuling:['male','wei',4,['xinzhanyi']],
2019-07-17 08:25:58 +00:00
liuye:['male','wei',3,['polu','choulve']],
zhaotongzhaoguang:["male","shu",4,["yizan_use","xinfu_longyuan"],[]],
majun:["male","wei",3,["xinfu_jingxie1","xinfu_qiaosi"],[]],
simazhao:["male","wei",3,["xinfu_daigong","xinfu_zhaoxin"],[]],
wangyuanji:["female","wei",3,["xinfu_qianchong","xinfu_shangjian"],[]],
pangdegong:["male","qun",3,["xinfu_pingcai","xinfu_pdgyingshi"],[]],
2019-08-24 15:41:12 +00:00
old_yuanshu:['male','qun',4,['xinyongsi','yjixi']],
2019-08-30 15:02:50 +00:00
shenpei:["male","qun","2/3",["shouye","liezhi"],[]],
2019-10-09 14:31:43 +00:00
re_wangyun:['male','qun',3,['relianji','remoucheng']],
2019-11-23 12:41:07 +00:00
re_baosanniang:['female','shu',3,['meiyong','rexushen','rezhennan']],
2019-12-25 05:21:37 +00:00
hujinding:['female','shu','2/6',['renshi','wuyuan','huaizi']],
2019-08-30 15:02:50 +00:00
},
characterIntro:{
shenpei:'审配204年字正南魏郡阴安今河北清丰北人。为人正直 袁绍领冀州,审配被委以腹心之任,并总幕府。河北平定,袁绍以审配、逢纪统军事,审配恃其强盛,力主与曹操决战。曾率领弓弩手大破曹军于官渡。官渡战败,审配二子被俘,反因此受谮见疑,幸得逢纪力保。袁绍病死,审配等矫诏立袁尚为嗣,导致兄弟相争,被曹操各个击破。曹操围邺,审配死守数月,终城破被擒,拒不投降,慷慨受死。',
2019-12-25 05:21:37 +00:00
hujinding:'胡金定,女,传说中关羽之妻。关索之母,配偶关羽,出处《花关索传》和元代《三国志评话》民间传说人物。',
2019-08-30 15:02:50 +00:00
},
card:{
pss_paper:{
type:'pss',
2019-08-31 05:48:22 +00:00
fullskin:true,
2019-08-30 15:02:50 +00:00
derivation:'shenpei',
},
pss_scissor:{
type:'pss',
2019-08-31 05:48:22 +00:00
fullskin:true,
2019-08-30 15:02:50 +00:00
derivation:'shenpei',
},
pss_stone:{
type:'pss',
2019-08-31 05:48:22 +00:00
fullskin:true,
derivation:'shenpei',
},
db_atk1:{
type:'db_atk',
fullimage:true,
derivation:'shenpei',
},
db_atk2:{
type:'db_atk',
fullimage:true,
derivation:'shenpei',
},
db_def1:{
type:'db_def',
fullimage:true,
derivation:'shenpei',
},
db_def2:{
type:'db_def',
fullimage:true,
2019-08-30 15:02:50 +00:00
derivation:'shenpei',
},
2019-07-17 08:25:58 +00:00
},
2019-08-24 15:41:12 +00:00
characterFilter:{},
2019-08-30 15:02:50 +00:00
skill:{
2019-12-25 05:21:37 +00:00
renshi:{
audio:2,
trigger:{player:'damageBegin4'},
forced:true,
filter:function(event,player){
return player.isDamaged()&&event.getParent().name=='sha';
},
content:function(){
'step 0'
trigger.cancel();
var cards=trigger.cards.filterInD();
if(cards.length) player.gain(cards,'gain2');
'step 1'
player.loseMaxHp();
},
},
wuyuan:{
audio:2,
enable:'phaseUse',
usable:1,
filter:function(event,player){
return player.countCards('h','sha')>0;
},
filterCard:{name:'sha'},
filterTarget:lib.filter.notMe,
check:function(card){
var player=_status.event.player;
if(get.color(card)=='red'&&game.hasPlayer(function(current){
return current!=player&&current.isDamaged()&&get.attitude(player,current)>2;
})) return 2;
return 1;
},
prepare:'give',
discard:false,
content:function(){
'step 0'
target.gain(cards,player);
player.recover();
'step 1'
var num=1;
if(get.color(cards[0])=='black') num++;
target.draw(num);
if(num==1) target.recover();
},
ai:{
order:1,
result:{
player:function(player,target){
if(player.isDamaged()) return 1;
return 0;
},
target:function(player,target){
if(ui.selected.cards.length){
var num=2;
if(target.hasSkillTag('nogain')) num=0;
if(get.color(ui.selected.cards[0])=='red') return num+2
else return num+1;
}
return 1;
},
},
},
},
huaizi:{
mod:{
maxHandcard:function(player,num){
return num+player.getDamagedHp();
},
},
audio:2,
trigger:{player:'phaseDiscardBegin'},
forced:true,
firstDo:true,
filter:function(event,player){
return player.isDamaged()&&player.countCards('h')>player.hp;
},
content:function(){},
},
refangquan:{
audio:2,
trigger:{player:'phaseUseBefore'},
filter:function(event,player){
return player.countCards('h')>0&&!player.hasSkill('fangquan3');
},
direct:true,
content:function(){
"step 0"
var fang=player.hp>=2&&player.countCards('h')<=player.hp+1;
player.chooseBool(get.prompt2('refangquan')).set('ai',function(){
if(!_status.event.fang) return false;
return game.hasPlayer(function(target){
if(target.hasJudge('lebu')||target==player) return false;
if(get.attitude(player,target)>4){
return (get.threaten(target)/Math.sqrt(target.hp+1)/Math.sqrt(target.countCards('h')+1)>0);
}
return false;
});
}).set('fang',fang);
"step 1"
if(result.bool){
player.logSkill('refangquan');
trigger.cancel();
player.addSkill('fangquan2');
player.addTempSkill('refangquan2');
//player.storage.fangquan=result.targets[0];
}
}
},
refangquan2:{
mod:{
maxHandcard:function(player,num){
return num+player.getDamagedHp();
},
},
},
rehunzi:{
inherit:'hunzi',
filter:function(event,player){
return player.hp<=2&&!player.storage.rehunzi;
},
},
rezhijian:{
inherit:'zhijian',
group:['rezhijian_use'],
subfrequent:['use'],
subSkill:{
use:{
audio:'rezhijian',
trigger:{player:'useCard'},
frequent:true,
filter:function(event,player){
return get.type(event.card)=='equip';
},
prompt:'是否发动【直谏】摸一张牌?',
content:function(){
player.draw('nodelay');
},
},
},
},
2019-11-23 12:41:07 +00:00
rexushen:{
derivation:['new_rewusheng','xindangxian'],
audio:'xinfu_xushen',
limited:true,
enable:'phaseUse',
filter:function(event,player){
return game.hasPlayer(function(current){
return current.sex=='male';
})
},
skillAnimation:true,
animationColor:'fire',
content:function(){
player.addSkill('rexushen2');
player.awakenSkill('rexushen');
player.loseHp(game.countPlayer(function(current){
return current.sex=='male';
}));
},
2019-11-26 05:15:06 +00:00
ai:{
order:10,
result:{
player:function(player){
if(player.hp!=game.countPlayer(function(current){
return current.sex=='male';
})) return 0;
return game.hasPlayer(function(current){
return get.attitude(player,current)>4&&current.countCards('h','tao')
})?1:0;
},
},
},
2019-11-23 12:41:07 +00:00
},
rexushen2:{
charlotte:true,
subSkill:{
count:{
trigger:{
player:"recoverBegin",
},
forced:true,
silent:true,
popup:false,
filter:function (event,player){
if(!event.source) return false;
if(!player.isDying()) return false;
var evt=event.getParent('dying').getParent(2);
return evt.name=='rexushen'&&evt.player==player;
},
content:function (){
trigger.rexushen=true;
},
sub:true,
},
},
group:["rexushen2_count"],
trigger:{
player:"recoverAfter",
},
filter:function (event,player){
if(player.isDying()) return false;
return event.rexushen==true;
},
direct:true,
silent:true,
popup:false,
content:function (){
'step 0'
player.removeSkill('rexushen2');
player.chooseBool('是否令'+get.translation(trigger.source)+'获得技能〖武圣〗和〖当先〗').ai=function(){
return get.attitude(player,trigger.source)>0;
};
'step 1'
if(result.bool){
player.line(trigger.source,'fire');
trigger.source.addSkillLog('new_rewusheng');
trigger.source.addSkillLog('xindangxian');
}
},
},
rezhennan:{
audio:'xinfu_zhennan',
trigger:{target:'useCardToTargeted'},
filter:function(event,player){
return event.player!=player&&event.targets&&event.targets.length&&event.targets.length>event.player.hp;
},
direct:true,
content:function(){
'step 0'
var next=player.chooseToDiscard(get.prompt('rezhennan',trigger.player),'弃置一张牌并对其造成1点伤害','he');
next.set('logSkill',['rezhennan',trigger.player]);
next.set('ai',function(card){
var player=_status.event.player;
var target=_status.event.getTrigger().player;
if(get.damageEffect(target,player,player)>0) return 7-get.value(card);
return -1;
});
'step 1'
if(result.bool) trigger.player.damage();
},
},
meiyong:{
inherit:'xinfu_wuniang',
audio:'xinfu_wuniang',
content:function (){
'step 0'
player.chooseTarget(get.prompt('meiyong'),'获得一名其他角色的一张牌,然后摸一张牌。',function(card,player,target){
if(player==target) return false;
return target.countGainableCards(player,'he')>0;
}).set('ai',function(target){
return 10-get.attitude(_status.event.player,target);
});
'step 1'
if(result.bool){
var target=result.targets[0];
event.target=target;
player.logSkill('xinfu_wuniang',target);
player.gainPlayerCard(target,'he',true);
}
else event.finish();
'step 2'
target.draw();
},
},
retuntian:{
audio:'tuntian',
audioname:['gz_dengai'],
trigger:{player:'loseEnd'},
frequent:true,
filter:function(event,player){
if(player==_status.currentPhase) return false;
for(var i=0;i<event.cards.length;i++){
if(event.cards[i].original&&event.cards[i].original!='j') return true;
}
return false;
},
content:function(){
player.judge(function(card){
return 1;
}).callback=lib.skill.retuntian.callback;
},
callback:function(){
'step 0'
if(event.judgeResult.suit=='heart'){
player.gain(card,'gain2');
event.finish();
}
else if(get.mode()=='guozhan'){
player.chooseBool('是否将'+get.translation(card)+'作为【田】置于武将牌上?').ai=function(){
return true;
};
}
else event.directbool=true;
'step 1'
if(!result.bool&&!event.directbool){
2019-12-16 04:54:06 +00:00
//game.cardsDiscard(card);
2019-11-23 12:41:07 +00:00
return;
};
event.node=event.judgeResult.node;
//event.trigger("addCardToStorage");
//event.card.fix();
player.storage.tuntian.push(event.card);
//event.card.goto(ui.special);
game.cardsGotoSpecial(card);
event.node.moveDelete(player);
game.broadcast(function(cardid,player){
var node=lib.cardOL[cardid];
if(node){
node.moveDelete(player);
}
},event.node.cardid,player);
game.addVideo('gain2',player,get.cardsInfo([event.node]));
player.markSkill('tuntian');
game.addVideo('storage',player,['tuntian',get.cardsInfo(player.storage.tuntian),'cards']);
},
init:function(player){
if(!player.storage.tuntian) player.storage.tuntian=[];
},
group:'tuntian_dist',
locked:false,
ai:{
effect:{
target:function(){
return lib.skill.tuntian.ai.effect.target.apply(this,arguments);
}
},
threaten:function(player,target){
if(target.countCards('h')==0) return 2;
return 0.5;
},
nodiscard:true,
nolose:true
}
},
retiaoxin:{
audio:'tiaoxin',
audioname:['sp_jiangwei','xiahouba'],
enable:'phaseUse',
usable:1,
filterTarget:function(card,player,target){
return target!=player&&target.countCards('he');
},
content:function(){
"step 0"
target.chooseToUse({name:'sha'},'挑衅:对'+get.translation(player)+'使用一张杀,或令其弃置你的一张牌').set('targetRequired',true).set('complexSelect',true).set('filterTarget',function(card,player,target){
if(target!=_status.event.sourcex&&!ui.selected.targets.contains(_status.event.sourcex)) return false;
return lib.filter.filterTarget.apply(this,arguments);
}).set('sourcex',player);
"step 1"
if(result.bool==false&&target.countCards('he')>0){
player.discardPlayerCard(target,'he',true);
}
else{
event.finish();
}
},
ai:{
order:4,
expose:0.2,
result:{
target:-1,
player:function(player,target){
if(!target.canUse('sha',player)) return 0;
if(target.countCards('h')==0) return 0;
if(target.countCards('h')==1) return -0.1;
if(player.hp<=2) return -2;
if(player.countCards('h','shan')==0) return -1;
return -0.5;
}
},
threaten:1.1
}
},
rebeige:{
audio:'beige',
trigger:{global:'damageEnd'},
filter:function(event,player){
return (event.card&&event.card.name=='sha'&&event.source&&
event.player.classList.contains('dead')==false&&player.countCards('he'));
},
direct:true,
checkx:function(event,player){
var att1=get.attitude(player,event.player);
var att2=get.attitude(player,event.source);
return att1>0&&att2<=0;
},
content:function(){
"step 0"
var next=player.chooseToDiscard('he',get.prompt2('rebeige',trigger.player));
var check=lib.skill.beige.checkx(trigger,player);
next.set('ai',function(card){
if(_status.event.goon) return 8-get.value(card);
return 0;
});
next.set('logSkill','beige');
next.set('goon',check);
"step 1"
if(result.bool){
trigger.player.judge();
}
else{
event.finish();
}
"step 2"
switch(get.suit(result.card)){
case 'heart':trigger.player.recover(trigger.num);break;
case 'diamond':trigger.player.draw(3);break;
case 'club':trigger.source.chooseToDiscard('he',2,true);break;
case 'spade':trigger.source.turnOver();break;
}
},
ai:{
expose:0.3
}
},
2019-10-19 11:18:56 +00:00
rexingshang:{
audio:'xingshang',
trigger:{global:'die'},
filter:function(event,player){
return player.isDamaged()||event.player.countCards('he')>0;
},
direct:true,
content:function(){
"step 0"
var choice=[];
if(player.isDamaged()) choice.push('回复体力');
if(trigger.player.countCards('he')) choice.push('获得牌');
choice.push('cancel2');
player.chooseControl(choice).set('prompt',get.prompt2('rexingshang')).set('ai',function(){
if(choice.length==2) return 0;
if(get.value(trigger.player.getCards('he'))>8) return 1;
return 0;
});
"step 1"
if(result.control!='cancel2'){
2019-12-12 05:00:00 +00:00
player.logSkill(event.name,trigger.player);
2019-10-19 11:18:56 +00:00
if(result.control=='获得牌'){
event.togain=trigger.player.getCards('he');
player.gain(event.togain,trigger.player,'giveAuto');
}
else player.recover();
}
},
},
refangzhu:{
audio:"fangzhu",
trigger:{
player:"damageEnd",
},
direct:true,
content:function (){
"step 0"
player.chooseTarget(get.prompt2('refangzhu'),function(card,player,target){
return player!=target
}).ai=function(target){
if(target.hasSkillTag('noturn')) return 0;
var player=_status.event.player;
if(get.attitude(_status.event.player,target)==0) return 0;
if(get.attitude(_status.event.player,target)>0){
if(target.classList.contains('turnedover')) return 1000-target.countCards('h');
if(player.getDamagedHp()<3) return -1;
return 100-target.countCards('h');
}
else{
if(target.classList.contains('turnedover')) return -1;
if(player.getDamagedHp()>=3) return -1;
return 1+target.countCards('h');
}
}
"step 1"
if(result.bool){
player.logSkill('refangzhu',result.targets);
event.target=result.targets[0]
event.target.chooseToDiscard('he',player.getDamagedHp()).set('ai',function(card){
var player=_status.event.player;
if(player.isTurnedOver()||_status.event.getTrigger().player.getDamagedHp()>2) return -1;
return (player.hp*player.hp)-get.value(card);
}).set('prompt','弃置'+get.cnNumber(player.getDamagedHp())+'张手牌并失去一点体力;或选择不弃置,将武将牌翻面并摸'+get.cnNumber(player.getDamagedHp())+'张牌。');
}
else event.finish();
"step 2"
if(result.bool){
event.target.loseHp();
}
else{
event.target.draw(player.getDamagedHp());
event.target.turnOver();
}
},
ai:{
maixie:true,
"maixie_hp":true,
effect:{
target:function (card,player,target){
if(get.tag(card,'damage')){
if(player.hasSkillTag('jueqing',false,target)) return [1,-2];
if(target.hp<=1) return;
if(!target.hasFriend()) return;
var hastarget=false;
var turnfriend=false;
var players=game.filterPlayer();
for(var i=0;i<players.length;i++){
if(get.attitude(target,players[i])<0&&!players[i].isTurnedOver()){
hastarget=true;
}
if(get.attitude(target,players[i])>0&&players[i].isTurnedOver()){
hastarget=true;
turnfriend=true;
}
}
if(get.attitude(player,target)>0&&!hastarget) return;
if(turnfriend||target.hp==target.maxHp) return [0.5,1];
if(target.hp>1) return [1,0.5];
}
},
},
},
},
repolu:{
audio:2,
trigger:{
source:'dieAfter',
player:'die',
},
forceDie:true,
filter:function(event,player,name){
return name=='die'||player.isAlive();
},
direct:true,
content:function(){
'step 0'
if(!player.storage.repolu) player.storage.repolu=0;
event.num=player.storage.repolu+1;
player.chooseTarget([1,Infinity],get.prompt('repolu'),'令任意名角色摸'+get.cnNumber(event.num)+'张牌').set('forceDie',true).ai=function(target){
return get.attitude(_status.event.player,target);
};
'step 1'
if(result.bool){
player.storage.repolu++;
result.targets.sortBySeat();
player.logSkill('repolu',result.targets);
game.asyncDraw(result.targets,num);
}
else event.finish();
'step 2'
game.delay();
},
},
rejiuchi:{
group:['jiuchi'],
trigger:{source:'damage'},
forced:true,
popup:false,
locked:false,
audio:'jiuchi',
filter:function(event,player){
return event.card&&event.card.name=='sha'&&event.getParent(2).jiu==true&&!player.hasSkill('rejiuchi_air');
},
content:function(){
player.logSkill('jiuchi');
player.addTempSkill('rejiuchi_air');
},
subSkill:{
air:{
sub:true,
init:function(player,skill){
player.disableSkill(skill,'benghuai');
},
onremove:function(player,skill){
player.enableSkill(skill);
},
},
},
},
2019-10-09 14:31:43 +00:00
relianji:{
audio:2,
enable:'phaseUse',
usable:1,
filter:function(event,player){
return game.players.length>1;
},
filterTarget:lib.filter.notMe,
targetprompt:['打人','被打'],
selectTarget:2,
multitarget:true,
content:function(){
'step 0'
game.delay(0.5);
if(targets[0].isDisabled(1)) event.goto(2);
'step 1'
var target=targets[0];
var equip1=get.cardPile2(function(card){
return get.subtype(card)=='equip1';
});
if(!equip1){
player.popup('连计失败');
game.log('牌堆中无装备');
event.finish();
return;
}
2019-10-19 11:18:56 +00:00
if(equip1.name=='qinggang'&&!lib.inpile.contains('qibaodao')){
equip1.remove();
equip1=game.createCard('qibaodao',equip1.suit,equip1.number);
}
2019-10-09 14:31:43 +00:00
target.$draw(equip1);
2019-10-10 10:13:01 +00:00
target.chooseUseTarget(equip1,'noanimate','nopopup',true);
2019-10-09 14:31:43 +00:00
'step 2'
2019-10-19 11:18:56 +00:00
game.updateRoundNumber();
2019-10-10 10:13:01 +00:00
var list=['nanman','wanjian','huogong','juedou','sha'];
var list2=game.players.slice(0);
list2.remove(player);
for(var i=0;i<list.length;i++){
2019-10-19 11:18:56 +00:00
if(!targets[0].canUse(list[i],targets[1],false)) list.splice(i--,1);
2019-10-10 10:13:01 +00:00
}
if(!list.length) return;
var name=list.randomGet();
if(name=='nanman'||name=='wanjian'){
for(var i=0;i<list2.length;i++){
2019-10-19 11:18:56 +00:00
if(!targets[0].canUse(name,list2[i],false)) list2.splice(i--,1);
2019-10-10 10:13:01 +00:00
}
}
else list2=targets[1];
targets[0].useCard({name:name},list2,'noai');
2019-10-09 14:31:43 +00:00
game.delay(0.5);
},
ai:{
order:8,
result:{
target:function(player,target){
if(ui.selected.targets.length==0){
return 1;
}
else{
return -1;
}
}
},
expose:0.4,
threaten:3,
},
group:'relianji_count',
subSkill:{
count:{
sub:true,
forced:true,
popup:false,
silent:true,
trigger:{global:'damageEnd'},
filter:function(event,player){
var evt=event.getParent(3);
return evt&&evt.name=='relianji'&&evt.player==player;
},
content:function(){
if(!player.storage.relianji) player.storage.relianji=0;
player.storage.relianji++;
if(player.storage.relianji>2){
event.trigger('remoucheng_awaken');
}
},
},
},
},
remoucheng:{
derivation:'rejingong',
trigger:{
player:'remoucheng_awaken'
},
forced:true,
juexingji:true,
skillAnimation:true,
animationColor:'thunder',
content:function(){
player.awakenSkill('remoucheng');
player.removeSkill('relianji');
player.addSkill('rejingong');
player.gainMaxHp();
player.recover();
},
},
rejingong:{
enable:'phaseUse',
delay:0,
usable:1,
content:function(){
'step 0'
2019-10-10 10:13:01 +00:00
var list=get.inpile('trick').randomGets(2);
2019-10-09 14:31:43 +00:00
if(Math.random()<0.5){
list.push('wy_meirenji');
}
else{
list.push('wy_xiaolicangdao');
}
for(var i=0;i<list.length;i++){
list[i]=['锦囊','',list[i]];
}
player.chooseButton(['矜功',[list,'vcard']]).set('filterButton',function(button,player){
return game.hasPlayer(function(current){
return player.canUse(button.link[2],current,true,false);
});
}).set('ai',function(button){
var player=_status.event.player;
var name=button.link[2];
if(game.hasPlayer(function(current){
return player.canUse(name,current)&&get.effect(current,{name:name},player,player)>0;
})){
if(name=='wy_meirenji'||name=='wy_xiaolicangdao') return Math.random()+0.5;
return Math.random();
}
return 0;
});
'step 1'
if(result.bool){
player.chooseUseTarget(result.links[0][2],true);
player.addTempSkill('jingong2');
}
},
ai:{
order:2,
result:{
player:function(player){
if((player.hp<=2||player.needsToDiscard())&&!player.getStat('damage')) return 0;
return 1;
}
}
}
},
2019-08-30 15:02:50 +00:00
relieren:{
audio:'lieren',
audioname:['boss_lvbu3'],
2019-11-22 05:19:45 +00:00
trigger:{player:'useCardToTargeted'},
2019-08-30 15:02:50 +00:00
filter:function(event,player){
2019-11-22 05:19:45 +00:00
return event.card.name=='sha'&&player.canCompare(event.target);
2019-08-30 15:02:50 +00:00
},
check:function(event,player){
return get.attitude(player,event.target)<0;
},
2019-11-22 05:19:45 +00:00
//priority:5,
2019-08-30 15:02:50 +00:00
content:function(){
"step 0"
player.chooseToCompare(trigger.target);
"step 1"
2019-09-25 14:52:38 +00:00
if(result.bool){
if(trigger.target.countGainableCards(player,'he')) player.gainPlayerCard(trigger.target,true,'he');
2019-08-30 15:02:50 +00:00
}
else{
var card1=result.player;
var card2=result.target;
if(get.position(card1)=='d') trigger.target.gain(card1,'gain2');
if(get.position(card2)=='d') player.gain(card2,'gain2');
}
}
},
rezaiqi:{
init:function(player,skill){
player.storage[skill]=0;
},
audio:'zaiqi',
direct:true,
filter:function(event,player){
return player.storage.rezaiqi>0;
},
trigger:{
2019-08-31 05:48:22 +00:00
player:'phaseDiscardEnd'
2019-08-30 15:02:50 +00:00
},
content:function(){
'step 0'
player.chooseTarget([1,player.storage.rezaiqi],get.prompt2('rezaiqi')).ai=function(target){
return get.attitude(_status.event.player,target);
};
'step 1'
if(result.bool){
var targets=result.targets;
targets.sortBySeat();
player.line(targets,'fire');
player.logSkill('rezaiqi',targets);
event.targets=targets;
}
else event.finish();
'step 2'
event.current=targets.shift();
if(player.isHealthy()) event._result={index:0};
else event.current.chooseControl().set('choiceList',[
'摸一张牌',
'令'+get.translation(player)+'回复一点体力',
]).set('ai',function(){
if(get.attitude(event.current,player)>0) return 1;
return 0;
});
'step 3'
if(result.index==1){
event.current.line(player);
player.recover();
}
else event.current.draw();
game.delay();
if(targets.length) event.goto(2);
},
group:'rezaiqi_count',
},
rezaiqi_count:{
trigger:{
global:["loseEnd","cardsDiscardEnd"],
player:'phaseAfter',
},
silent:true,
forced:true,
popup:false,
filter:function (event,player,name){
if(name=='phaseAfter') return true;
if(_status.currentPhase!=player) return false;
var evt=event.getParent();
if(evt&&evt.name=='useCard'&&evt.card&&['equip','delay'].contains(get.type(evt.card))) return false;
var cards=event.cards;
for(var i=0;i<cards.length;i++){
2019-12-16 04:54:06 +00:00
if(get.color(cards[i])=='red'&&get.position(cards[i],true)=='d') return true;
2019-08-30 15:02:50 +00:00
}
return false;
},
content:function(){
if(event.triggername=='phaseAfter') player.storage.rezaiqi=0;
else{
var cards=trigger.cards;
for(var i=0;i<cards.length;i++){
2019-12-16 04:54:06 +00:00
if(get.color(cards[i])=='red'&&get.position(cards[i],true)=='d') player.storage.rezaiqi++;
2019-08-30 15:02:50 +00:00
}
}
},
},
shouye:{
2019-08-31 05:48:22 +00:00
audio:2,
2019-08-30 15:02:50 +00:00
group:'shouye_after',
trigger:{global:"useCard"},
filter:function(event,player){
return event.player!=player&&event.targets&&
event.targets[0]==player&&event.targets.length==1;
},
check:function(event,player){
return get.effect(player,event.card,event.player,player)<0;
},
usable:1,
logTarget:'player',
content:function(){
'step 0'
player.line(trigger.player,'green');
2019-08-31 05:48:22 +00:00
player.chooseToDuiben(trigger.player);
2019-08-30 15:02:50 +00:00
'step 1'
2019-08-31 05:48:22 +00:00
if(result.bool){
2019-08-30 15:02:50 +00:00
trigger.excluded.add(player);
trigger.shouyeer=player;
}
},
subSkill:{
after:{
sub:true,
trigger:{global:'useCardAfter'},
forced:true,
silent:true,
popup:false,
filter:function(event,player){
if(event.shouyeer!=player) return false;
if(event.cards){
for(var i=0;i<event.cards.length;i++){
if(event.cards[i].isInPile()) return true;
}
}
return false;
},
content:function(){
var list=[];
for(var i=0;i<trigger.cards.length;i++){
if(trigger.cards[i].isInPile()){
list.push(trigger.cards[i]);
}
}
player.gain(list,'gain2');
},
},
},
},
liezhi:{
2019-08-31 05:48:22 +00:00
audio:2,
2019-08-30 15:02:50 +00:00
group:'liezhi_damage',
2019-11-22 05:19:45 +00:00
trigger:{player:'phaseZhunbeiBegin'},
2019-08-30 15:02:50 +00:00
direct:true,
filter:function(event,player){
return !player.hasSkill('liezhi_disable');
},
content:function(){
'step 0'
player.chooseTarget(get.prompt('liezhi'),'弃置至多两名角色区域内的各一张牌',[1,2],function(card,player,target){
return target!=player&&target.countDiscardableCards(player,'hej')>0;
}).ai=function(target){
var player=_status.event.player;
2019-12-12 05:02:34 +00:00
return get.effect(target,{name:'guohe'},player,player);
2019-08-30 15:02:50 +00:00
};
'step 1'
if(result.bool){
result.targets.sortBySeat();
event.targets=result.targets;
player.line(result.targets,'green');
player.logSkill('liezhi',result.targets);
}
else event.finish();
'step 2'
event.current=targets.shift();
player.discardPlayerCard(event.current,'hej',true)
if(targets.length) event.redo();
},
subSkill:{
disable:{
sub:true,
trigger:{player:'phaseAfter'},
forced:true,
silent:true,
popup:false,
charlotte:true,
2019-09-25 14:52:38 +00:00
//filter:function(event){return !event.liezhi},
2019-08-30 15:02:50 +00:00
content:function(){player.removeSkill('liezhi_disable')},
},
damage:{
trigger:{player:'damage'},
forced:true,
silent:true,
popup:false,
2019-09-25 14:52:38 +00:00
content:function(){player.addSkill('liezhi_disable')}
2019-08-30 15:02:50 +00:00
},
},
},
xinzhanyi:{
audio:'zhanyi',
enable:'phaseUse',
usable:1,
filterCard:true,
position:'he',
check:function(card){
var player=_status.event.player;
if(player.hp<3) return 0;
var type=get.type(card,'trick');
if(type=='trick'){
return 6-get.value(card);
}
else if(type=='equip'){
if(player.hasSha()&&game.hasPlayer(function(current){
return (player.canUse('sha',current)&&
get.attitude(player,current)<0&&
get.effect(current,{name:'sha'},player,player)>0)
})){
return 6-get.value(card);
}
}
return 0;
},
content:function(){
player.loseHp();
switch(get.type(cards[0],'trick')){
case 'basic':player.addTempSkill('xinzhanyi_basic');break;
case 'equip':player.addTempSkill('xinzhanyi_equip');break;
case 'trick':player.addTempSkill('xinzhanyi_trick');player.draw(3);break;
}
},
ai:{
order:9.1,
result:{
player:1
}
}
},
xinzhanyi_basic1:{
trigger:{player:"useCard"},
filter:function(event,player){
return event.skill=='xinzhanyi_basic_backup'&&!player.storage.xinzhanyi_basic1;
},
forced:true,
silent:true,
popup:false,
content:function(){
trigger.xinzhanyi=true;
player.storage.xinzhanyi_basic1=true;
},
},
xinzhanyi_basic2:{
trigger:{source:['damageBegin','recoverBegin']},
forced:true,
silent:true,
popup:false,
filter:function(event){
return event.getParent(2).xinzhanyi==true;
},
content:function(){
trigger.num++
},
},
xinzhanyi_basic:{
group:['xinzhanyi_basic1','xinzhanyi_basic2'],
2019-10-24 04:55:01 +00:00
onremove:function(p,s){
delete p.storage[s+1];
},
2019-08-30 15:02:50 +00:00
enable:"chooseToUse",
filter:function (event,player){
if(event.filterCard({name:'sha'},player,event)||
event.filterCard({name:'jiu'},player,event)||
event.filterCard({name:'tao'},player,event)){
return player.hasCard(function(card){
return get.type(card)=='basic';
},'h');
}
return false;
},
chooseButton:{
dialog:function (event,player){
var list=[];
if(event.filterCard({name:'sha'},player,event)){
list.push(['基本','','sha']);
list.push(['基本','','sha','fire']);
list.push(['基本','','sha','thunder']);
}
if(event.filterCard({name:'tao'},player,event)){
list.push(['基本','','tao']);
}
if(event.filterCard({name:'jiu'},player,event)){
list.push(['基本','','jiu']);
}
return ui.create.dialog('战意',[list,'vcard'],'hidden');
},
check:function (button){
var player=_status.event.player;
var card={name:button.link[2],nature:button.link[3]};
if(game.hasPlayer(function(current){
return player.canUse(card,current)&&get.effect(current,card,player,player)>0;
})){
switch(button.link[2]){
case 'tao':return 5;
case 'jiu':{
if(player.countCards('h',{type:'basic'})>=2) return 3;
};
case 'sha':
if(button.link[3]=='fire') return 2.95;
else if(button.link[3]=='thunder') return 2.92;
else return 2.9;
}
}
return 0;
},
backup:function (links,player){
return {
audio:'zhanyi',
filterCard:function(card,player,target){
return get.type(card)=='basic';
},
check:function(card,player,target){
return 9-get.value(card);
},
viewAs:{name:links[0][2],nature:links[0][3]},
position:'he',
popname:true,
}
},
prompt:function (links,player){
return '将一张基本牌当做'+get.translation(links[0][3]||'')+get.translation(links[0][2])+'使用';
},
},
ai:{
order:function (){
var player=_status.event.player;
var event=_status.event;
if(event.filterCard({name:'jiu'},player,event)&&get.effect(player,{name:'jiu'})>0&&player.countCards('h',{type:'basic'})>=2){
return 3.3;
}
return 3.1;
},
save:true,
respondSha:true,
skillTagFilter:function (player,tag,arg){
if(player.hasCard(function(card){
return get.type(card)=='basic';
},'he')){
if(tag=='respondSha'){
if(arg!='use') return false;
}
}
else{
return false;
}
},
result:{
player:1,
},
},
},
xinzhanyi_equip:{
audio:'zhanyi',
2019-10-24 04:55:01 +00:00
trigger:{player:'useCardToPlayered'},
2019-08-30 15:02:50 +00:00
forced:true,
filter:function(event,player){
2019-10-24 04:55:01 +00:00
return event.card.name=='sha'&&event.target.countCards('he')>0;
2019-08-30 15:02:50 +00:00
},
check:function(event,player){
return get.attitude(player,event.target)<0;
},
content:function(){
'step 0'
trigger.target.chooseToDiscard('he',true,2);
'step 1'
if(result.bool&&result.cards&&result.cards.length){
if(result.cards.length==1){
event._result={bool:true,links:result.cards.slice(0)};
}
else player.chooseButton(['选择获得其中的一张牌',result.cards.slice(0)],true).ai=function(button){
return get.value(button.link);
};
}
else event.finish();
'step 2'
if(result.links) player.gain(result.links,'gain2');
}
},
xinzhanyi_trick:{
mod:{
wuxieRespondable:function(){
return false;
}
}
},
},
2019-07-17 08:25:58 +00:00
translate:{
2019-09-22 15:02:29 +00:00
re_jikang:"手杀嵇康",
old_bulianshi:'手杀步练师',
2019-07-17 08:25:58 +00:00
old_caochun:'旧曹纯',
2019-08-30 15:02:50 +00:00
shenpei:'审配',
re_zhurong:'界祝融',
re_menghuo:'界孟获',
2019-10-09 14:31:43 +00:00
re_wangyun:'手杀王允',
2019-10-19 11:18:56 +00:00
re_dongzhuo:'界董卓',
re_sunjian:'界孙坚',
re_caopi:'界曹丕',
rejiuchi:'酒池',
2019-10-19 12:04:43 +00:00
rejiuchi_info:'你可以将一张黑桃手牌当做【酒】使用。锁定技,当你于回合内使用带有【酒】效果的【杀】造成伤害时,你令你的【崩坏】失效直到回合结束。',
2019-10-19 11:18:56 +00:00
repolu:'破虏',
2019-10-19 12:04:43 +00:00
repolu_info:'当你杀死一名角色/死亡时你可以令任意名角色摸X+1张牌。X为你此前发动过【破虏】的次数',
2019-10-19 11:18:56 +00:00
rexingshang:'行殇',
2019-10-19 12:04:43 +00:00
rexingshang_info:'当其他角色死亡后你可以选择一项回复1点体力或获得其所有牌。',
2019-10-19 11:18:56 +00:00
refangzhu:'放逐',
2019-10-19 12:04:43 +00:00
refangzhu_info:'当你受到伤害后你可以令一名其他角色选择一项摸X张牌并将武将牌翻面或弃置X张牌并失去1点体力。X为你已损失的体力值',
2019-10-09 14:31:43 +00:00
relianji:'连计',
relianji_info:'出牌阶段限一次你可以选择两名其他角色。第一名角色随机使用牌堆中的一张武器牌然后这名角色视为对另一名角色随机使用一张下列的牌名的牌【决斗】、【火攻】、【南蛮入侵】、【万箭齐发】或普【杀】。然后若此牌造成伤害你获得X枚“连计”标记X为此次扣减的体力值点数。',
remoucheng:'谋逞',
remoucheng_info:'觉醒技当一名角色造成伤害后若你拥有的“连计”标记数大于2你加1点体力上限回复1点体力失去“连计”获得“矜功”。',
rejingong:'矜功',
rejingong_info:'每回合可以用三个随机锦囊中的一个三个锦囊中有一个是专属锦囊本回合未造成伤害会失去1点体力。',
2019-08-23 15:03:21 +00:00
mobile_default:'常规',
mobile_others:'其他',
2019-08-30 15:02:50 +00:00
pss:'手势',
pss_paper:'布',
pss_scissor:'剪刀',
pss_stone:'石头',
pss_paper_info:'石头剪刀布时的一种手势。克制石头,但被剪刀克制。',
pss_scissor_info:'石头剪刀布时的一种手势。克制布,但被石头克制。',
pss_stone_info:'石头剪刀布时的一种手势。克制剪刀,但被布克制。',
2019-08-31 05:48:22 +00:00
db_atk:'进攻对策',
db_atk1:'全军出击',
db_atk2:'分兵围城',
db_def:'防御对策',
db_def1:'奇袭粮道',
db_def2:'开城诱敌',
2019-08-30 15:02:50 +00:00
shouye:'守邺',
2019-08-31 05:48:22 +00:00
shouye_info:'每回合限一次。当其他角色使用牌指定你为唯一目标时,你可以与其进行【对策】。若你赢,则此牌对你无效,且你于此牌结算完成后获得其对应的所有实体牌。',
2019-08-30 15:02:50 +00:00
liezhi:'烈直',
liezhi_info:'准备阶段,你可以依次弃置至多两名角色区域内的各一张牌。若你受到过伤害,则〖烈直〗于你的下个回合无效。',
relieren:'烈刃',
2019-11-22 05:19:45 +00:00
relieren_info:'当你使用【杀】指定目标后,你可以和目标角色进行拼点。若你赢,你获得其一张牌。若你没赢,你获得对方的拼点牌,其获得你的拼点牌。',
2019-08-30 15:02:50 +00:00
rezaiqi:'再起',
2019-08-31 05:48:22 +00:00
rezaiqi_info:'弃牌阶段结束时你可以令至多X名角色选择一项1.摸一张牌2.令你回复1点体力X为本回合进入弃牌堆的红色牌数',
2019-08-30 15:02:50 +00:00
xinzhanyi:'战意',
xinzhanyi_info:'出牌阶段限一次你可以弃置一张牌并失去1点体力然后根据你弃置的牌获得以下效果直到回合结束基本牌你可以将一张基本牌当作杀、酒或桃使用且你本回合第一次以此法使用的牌的回复值/伤害值+1锦囊牌摸三张牌且你使用的牌不能被【无懈可击】响应装备牌你使用【杀】指定目标角色后其弃置两张牌然后你获得其中的一张。',
xinzhanyi_basic_backup:'战意',
xinzhanyi_basic:'战意',
xinzhanyi_equip:'战意',
2019-11-23 12:41:07 +00:00
re_dengai:'界邓艾',
re_jiangwei:'界姜维',
re_caiwenji:'界蔡文姬',
re_baosanniang:'手杀鲍三娘',
retuntian:'屯田',
retiaoxin:'挑衅',
rebeige:'悲歌',
2019-11-23 13:59:11 +00:00
retuntian_info:'当你于回合外失去牌时,你可以进行一次判定。若判定结果为♥,你获得此判定牌。否则你将此牌置于你的武将牌上,称之为【田】。锁定技,你计算与其他角色的距离时-XX为你武将牌上【田】的数目',
2019-11-23 12:41:07 +00:00
retiaoxin_info:'出牌阶段限一次,你可以指定一名有牌的其他角色,该角色需对你使用一张【杀】,否则你弃置其一张牌。',
rebeige_info:'当有角色受到【杀】造成的伤害后你可以弃一张牌并令其进行一次判定若判定结果为♥该角色回复X点体力(X为伤害点数);♦︎该角色摸三张牌;♣伤害来源弃两张牌;♠伤害来源将其武将牌翻面',
2019-11-26 05:15:06 +00:00
meiyong:'姝勇',
2019-11-23 12:41:07 +00:00
meiyong_info:'当你使用或打出【杀】时,你可以获得一名其他角色的一张牌,然后其摸一张牌。',
rexushen:'许身',
rexushen_info:'限定技出牌阶段你可以失去X点体力X为场上男性角色的数量。若你以此法进入了濒死状态则当你因一名角色而脱离此濒死状态后你可以令其获得技能〖武圣〗和〖当先〗。',
rezhennan:'镇南',
rezhennan_info:'当你成为其他角色使用的牌的目标后若此牌的目标数大于该角色的体力值则你可以弃置一张牌并对其造成1点伤害。',
2019-12-25 05:21:37 +00:00
hujinding:'胡金定',
re_liushan:'界刘禅',
re_sunben:'界孙策',
re_zhangzhang:'界张昭张纮',
rehunzi:'魂姿',
rehunzi_info:'觉醒技准备阶段若你的体力值不大于2你减1点体力上限并获得技能〖英姿〗和〖英魂〗。',
zhijian_info:'出牌阶段,你可以将手牌中的一张装备牌置于一名其他角色装备区里(不得替换原装备),然后摸一张牌。当你使用装备牌时,你可以摸一张牌。',
refangquan:'放权',
refangquan_info:'你可跳过你的出牌阶段,若如此做,你本回合的手牌上限+XX为你已损失的体力值且回合结束时你可以弃置一张手牌并令一名其他角色进行一个额外的回合。',
huaizi:'怀子',
huaizi_info:'锁定技,你的手牌上限+XX为你已损失的体力值',
renshi:'仁释',
renshi_info:'锁定技当你受到【杀】的伤害时若你已受伤则你防止此伤害并获得此【杀】对应的所有实体牌然后减1点体力上限。',
wuyuan:'武缘',
wuyuan_info:'出牌阶段限一次你可将一张【杀】交给一名其他角色然后你回复1点体力。若此【杀】为红色其摸一张牌并回复1点体力黑色其摸两张牌。',
2019-07-17 08:25:58 +00:00
}
};
});