noname/card/extra.js

600 lines
15 KiB
JavaScript
Raw Normal View History

2015-04-29 03:25:17 +00:00
card.extra={
2016-04-12 07:49:02 +00:00
connect:true,
2015-04-29 03:25:17 +00:00
card:{
jiu:{
2015-04-29 14:08:51 +00:00
audio:true,
2015-04-29 03:25:17 +00:00
fullskin:true,
type:"basic",
enable:true,
2016-06-25 06:30:34 +00:00
lianheng:true,
2016-08-28 00:30:25 +00:00
logv:false,
2015-04-29 03:25:17 +00:00
savable:function(card,player,dying){
return dying==player;
},
usable:1,
selectTarget:-1,
2016-05-11 15:50:00 +00:00
modTarget:true,
2015-04-29 03:25:17 +00:00
filterTarget:function(card,player,target){
return target==player;
},
content:function(){
2016-09-20 15:26:59 +00:00
if(target==_status.event.getParent(2).dying||target==_status.dying){
2015-11-24 15:44:21 +00:00
target.recover();
if(_status.currentPhase==target){
target.getStat().card.jiu--;
}
}
2015-04-29 03:25:17 +00:00
else{
2016-05-11 15:50:00 +00:00
game.broadcastAll(function(target,card,gain2){
2016-04-04 11:20:05 +00:00
target.addSkill('jiu');
if(!target.node.jiu&&lib.config.jiu_effect){
target.node.jiu=ui.create.div('.playerjiu',target.node.avatar);
target.node.jiu2=ui.create.div('.playerjiu',target.node.avatar2);
}
2016-05-11 15:50:00 +00:00
if(gain2&&card.clone&&(card.clone.parentNode==target.parentNode||card.clone.parentNode==ui.arena)){
2016-04-04 11:20:05 +00:00
card.clone.moveDelete(target);
}
2016-05-11 15:50:00 +00:00
},target,card,target==targets[0]);
if(target==targets[0]){
if(card.clone&&(card.clone.parentNode==target.parentNode||card.clone.parentNode==ui.arena)){
game.addVideo('gain2',target,get.cardsInfo([card]));
}
2015-04-29 03:25:17 +00:00
}
}
},
ai:{
basic:{
2015-11-06 10:05:08 +00:00
useful:function(card,i){
if(_status.event.player.hp>1){
if(i==0) return 5;
return 1;
}
if(i==0) return 7.3;
return 3;
},
value:function(card,player){
if(player.hp>1){
if(i==0) return 5;
return 1;
}
if(i==0) return 7.3;
return 3;
},
2015-04-29 03:25:17 +00:00
},
order:function(){
return lib.card.sha.ai.order+0.2;
},
result:{
target:function(player,target){
2016-04-04 11:20:05 +00:00
if(target&&target.hp<=0) return 2;
2015-12-15 05:13:47 +00:00
if(lib.config.mode=='stone'&&!player.isMin()){
2016-05-31 02:24:21 +00:00
if(player.getActCount()+1>=player.actcount) return 0;
2015-12-15 05:13:47 +00:00
}
2015-12-31 02:35:28 +00:00
var shas=player.get('h','sha');
if(shas.length>1){
2015-09-10 13:56:57 +00:00
if(player.num('e','zhuge')) return 0;
2016-08-12 08:26:31 +00:00
if(player.hasSkill('paoxiao')) return 0;
if(player.hasSkill('fengnu')) return 0;
2015-12-06 15:23:47 +00:00
if(!player.getStat().card.sha){
2016-08-12 08:26:31 +00:00
if(player.hasSkill('tanlin3')) return 0;
if(player.hasSkill('zhaxiang2')) return 0;
2015-12-06 15:23:47 +00:00
}
2015-09-10 13:56:57 +00:00
}
2015-12-08 13:54:44 +00:00
var card;
2015-04-29 03:25:17 +00:00
if(shas.length){
for(var i=0;i<shas.length;i++){
if(lib.filter.filterCard(shas[i],target)){
2015-12-08 13:54:44 +00:00
card=shas[i];break;
2015-04-29 03:25:17 +00:00
}
}
}
2015-12-08 13:54:44 +00:00
if(card){
2015-04-29 03:25:17 +00:00
for(var i=0;i<game.players.length;i++){
if(ai.get.attitude(target,game.players[i])<0&&
2015-12-06 15:23:47 +00:00
target.canUse(card,game.players[i],true,true)&&
!game.players[i].num('e','baiyin')){
2015-04-29 03:25:17 +00:00
if(ai.get.effect(game.players[i],card,target)>0) return 1;
}
}
}
return 0;
},
},
tag:{
save:1
}
}
},
huogong:{
2015-04-29 14:08:51 +00:00
audio:true,
2015-04-29 03:25:17 +00:00
fullskin:true,
type:'trick',
enable:true,
filterTarget:function(card,player,target){
2015-05-08 08:07:38 +00:00
if(player!=game.me&&player.num('h')<2) return false;
2015-04-29 03:25:17 +00:00
return target.num('h')>0;
},
content:function(){
"step 0"
if(target.get('h').length==0){
event.finish();
return;
}
2015-05-09 05:36:58 +00:00
var rand=Math.random()<0.5;
target.chooseCard(true).ai=function(card){
if(rand) return Math.random();
return ai.get.value(card);
};
2015-04-29 03:25:17 +00:00
"step 1"
2016-04-04 11:20:05 +00:00
event.dialog=ui.create.dialog(get.translation(target)+'展示的手牌',result.cards);
2015-11-04 01:59:00 +00:00
event.videoId=lib.status.videoId++;
2016-04-04 11:20:05 +00:00
game.broadcast('createDialog',event.videoId,get.translation(target)+'展示的手牌',result.cards);
game.addVideo('cardDialog',null,[get.translation(target)+'展示的手牌',get.cardsInfo(result.cards),event.videoId]);
2015-04-29 03:25:17 +00:00
event.card2=result.cards[0];
2015-12-08 13:54:44 +00:00
game.log(target,'展示了',event.card2);
2016-04-04 11:20:05 +00:00
player.chooseToDiscard({suit:get.suit(event.card2)},function(card){
var evt=_status.event.getParent();
if(ai.get.damageEffect(evt.target,evt.player,evt.player,'fire')>0){
return 7-ai.get.value(card,evt.player);
2015-04-29 03:25:17 +00:00
}
return -1;
}).prompt=false;
game.delay(2);
"step 2"
if(result.bool){
target.damage('fire');
}
else{
target.addTempSkill('huogong2','phaseBegin');
}
event.dialog.close();
2016-04-04 11:20:05 +00:00
game.addVideo('cardDialog',null,event.videoId);
game.broadcast('closeDialog',event.videoId);
2015-04-29 03:25:17 +00:00
},
ai:{
basic:{
order:4,
value:[3,1],
useful:1,
},
2015-11-16 01:59:54 +00:00
wuxie:function(target,card,player,current,state){
if(ai.get.attitude(current,player)>=0&&state>0) return false;
},
2015-04-29 03:25:17 +00:00
result:{
player:function(player){
var nh=player.num('h');
2015-11-12 01:12:03 +00:00
if(nh<=player.hp&&nh<=4&&_status.event.name=='chooseToUse'){
2015-12-08 13:54:44 +00:00
if(typeof _status.event.filterCard=='function'&&
2015-09-10 09:35:58 +00:00
_status.event.filterCard({name:'huogong'})){
2015-05-05 09:23:31 +00:00
return -10;
}
if(_status.event.skill){
var viewAs=get.info(_status.event.skill).viewAs;
if(viewAs=='huogong') return -10;
if(viewAs&&viewAs.name=='huogong') return -10;
}
2015-05-03 15:17:15 +00:00
}
return 0;
2015-04-29 03:25:17 +00:00
},
target:function(player,target){
2016-08-12 08:26:31 +00:00
if(target.hasSkill('huogong2')||target.num('h')==0) return 0;
2015-11-12 01:12:03 +00:00
if(player.num('h')<=1) return 0;
2015-06-27 16:21:25 +00:00
if(target==player){
2015-12-08 13:54:44 +00:00
if(typeof _status.event.filterCard=='function'&&
2015-09-10 09:35:58 +00:00
_status.event.filterCard({name:'huogong'})){
2015-06-27 16:21:25 +00:00
return -1.5;
}
if(_status.event.skill){
var viewAs=get.info(_status.event.skill).viewAs;
if(viewAs=='huogong') return -1.5;
if(viewAs&&viewAs.name=='huogong') return -1.5;
}
return 0;
}
2015-04-29 03:25:17 +00:00
return -1.5;
}
},
tag:{
damage:1,
fireDamage:1,
natureDamage:1,
}
}
},
tiesuo:{
2015-04-29 14:08:51 +00:00
audio:true,
2015-04-29 03:25:17 +00:00
fullskin:true,
type:'trick',
enable:true,
filterTarget:true,
selectTarget:[1,2],
content:function(){
target.link();
},
chongzhu:true,
ai:{
wuxie:function(){
if(Math.random()<0.5) return 0;
},
2015-04-29 03:25:17 +00:00
basic:{
useful:4,
value:4,
order:7
},
result:{
target:function(player,target){
2016-07-20 03:17:01 +00:00
if(target.isLinked()) return 1;
2015-04-29 03:25:17 +00:00
if(ai.get.attitude(player,target)>=0) return -1;
2016-08-28 00:30:25 +00:00
// if(player.isMin()) return -1;
2015-06-10 09:10:24 +00:00
if(ui.selected.targets.length) return -1;
2015-04-29 03:25:17 +00:00
for(var i=0;i<game.players.length;i++){
if(ai.get.attitude(player,game.players[i])<=-1&&
2015-04-29 03:25:17 +00:00
game.players[i]!=target&&!game.players[i].isLinked()){
return -1;
}
}
return 0;
}
},
tag:{
multitarget:1,
multineg:1,
}
}
},
bingliang:{
2015-04-29 14:08:51 +00:00
audio:true,
2015-04-29 03:25:17 +00:00
fullskin:true,
type:'delay',
range:{global:1},
filterTarget:function(card,player,target){
return (lib.filter.judge(card,player,target)&&player!=target);
},
judge:function(card){
if(get.suit(card)=='club') return 0;
return -3;
},
effect:function(){
if(result.bool==false){
player.skip('phaseDraw');
}
},
ai:{
basic:{
order:1,
useful:1,
value:4,
},
result:{
target:function(player,target){
return -1-target.get('h').length;
}
},
tag:{
skip:'phaseDraw'
}
}
},
hualiu:{
fullskin:true,
type:'equip',
subtype:'equip3',
distance:{globalTo:1},
},
zhuque:{
fullskin:true,
type:'equip',
subtype:'equip1',
distance:{attackFrom:-3},
ai:{
basic:{
equipValue:2
}
},
skills:['zhuque_skill']
},
guding:{
fullskin:true,
type:'equip',
subtype:'equip1',
distance:{attackFrom:-1},
ai:{
basic:{
equipValue:2
}
},
skills:['guding_skill']
},
tengjia:{
fullskin:true,
type:'equip',
subtype:'equip2',
ai:{
basic:{
equipValue:function(card,player){
2015-11-06 10:05:08 +00:00
if(player.hasSkillTag('maixie')&&player.hp>1) return 0;
2016-08-08 03:11:14 +00:00
if(player.hasSkillTag('noDirectDamage')) return 10;
2015-11-06 10:05:08 +00:00
if(ai.get.damageEffect(player,player,player,'fire')>=0) return 10;
2015-04-29 03:25:17 +00:00
var num=3;
for(var i=0;i<game.players.length;i++){
if(ai.get.attitude(game.players[i],player)<0) num--;
}
if(player.hp==1) num+=4;
if(player.hp==2) num+=1;
if(player.hp==3) num--;
if(player.hp>3) num-=4;
return num;
}
},
},
skills:['tengjia1','tengjia2']
},
baiyin:{
fullskin:true,
type:'equip',
subtype:'equip2',
onLose:function(){
player.recover();
},
filterLose:function(card,player){
return player.hp<player.maxHp;
},
skills:['baiyin_skill'],
tag:{
recover:1,
},
ai:{
order:9.5,
basic:{
equipValue:function(card,player){
if(player.hp==player.maxHp) return 5;
if(player.num('h','baiyin')) return 6;
return 0;
}
}
}
},
},
skill:{
huogong2:{},
jiu:{
trigger:{source:'damageBegin'},
filter:function(event){
return (event.card&&(event.card.name=='sha')&&event.parent.name!='_lianhuan'&&event.parent.name!='_lianhuan2');
},
forced:true,
content:function(){
trigger.num++;
},
2016-08-28 00:30:25 +00:00
temp:true,
2015-04-29 03:25:17 +00:00
group:'jiu2'
},
jiu2:{
2015-11-21 13:23:23 +00:00
trigger:{player:'useCardAfter',global:'phaseAfter'},
2015-11-06 10:05:08 +00:00
priority:2,
2015-04-29 03:25:17 +00:00
filter:function(event){
2015-11-21 13:23:23 +00:00
if(event.name=='useCard') return (event.card&&(event.card.name=='sha'));
return true;
2015-04-29 03:25:17 +00:00
},
forced:true,
popup:false,
2015-11-25 12:34:54 +00:00
audio:false,
2015-04-29 03:25:17 +00:00
content:function(){
2016-04-04 11:20:05 +00:00
game.broadcastAll(function(player){
player.removeSkill('jiu');
if(player.node.jiu){
player.node.jiu.delete();
player.node.jiu2.delete();
delete player.node.jiu;
delete player.node.jiu2;
}
},player);
2015-04-29 03:25:17 +00:00
},
},
guding_skill:{
2015-05-14 09:23:45 +00:00
audio:true,
2015-04-29 03:25:17 +00:00
trigger:{source:'damageBegin'},
filter:function(event){
2015-11-29 11:46:51 +00:00
if(event.parent.name=='_lianhuan'||event.parent.name=='_lianhuan2') return false;
2015-04-29 03:25:17 +00:00
if(event.card&&event.card.name=='sha'){
if(event.player.get('h').length==0) return true;
}
return false;
},
forced:true,
content:function(){
trigger.num++;
},
ai:{
effect:{
target:function(card,player,target,current){
if(card.name=='sha'&&target.get('h').length==0) return [1,-2];
}
}
}
},
tengjia1:{
trigger:{target:'useCardToBefore'},
forced:true,
priority:6,
2015-05-14 09:23:45 +00:00
audio:true,
2015-04-29 03:25:17 +00:00
filter:function(event,player){
if(event.player.num('s','unequip')) return false;
if(event.card.name=='nanman') return true;
if(event.card.name=='wanjian') return true;
if(event.card.name=='sha'&&!event.card.nature) return true;
},
content:function(){
trigger.untrigger();
trigger.finish();
},
ai:{
effect:{
target:function(card,player,target,current){
if(player.num('s','unequip')) return;
2015-11-06 10:05:08 +00:00
if(card.name=='nanman'||card.name=='wanjian') return 'zerotarget';
2015-04-29 03:25:17 +00:00
if(card.name=='sha'){
var equip1=player.get('e','1');
if(equip1&&equip1.name=='zhuque') return 2;
if(equip1&&equip1.name=='qinggang') return 1;
2015-11-06 10:05:08 +00:00
if(!card.nature) return 'zerotarget';
2015-04-29 03:25:17 +00:00
}
}
}
}
},
tengjia2:{
trigger:{player:'damageBegin'},
filter:function(event){
if(event.nature=='fire') return true;
},
2015-05-14 09:23:45 +00:00
audio:true,
2015-04-29 03:25:17 +00:00
forced:true,
content:function(){
trigger.num++;
},
ai:{
effect:{
target:function(card,player,target,current){
if(card.name=='sha'){
2016-08-12 08:26:31 +00:00
if(card.nature=='fire'||player.hasSkill('zhuque_skill')) return 2;
2015-04-29 03:25:17 +00:00
}
if(get.tag(card,'fireDamage')&&current<0) return 2;
}
}
}
},
baiyin_skill:{
trigger:{player:'damageBegin'},
forced:true,
2015-11-01 07:54:42 +00:00
audio:true,
2015-04-29 03:25:17 +00:00
filter:function(event,player){
if(event.num<=1) return false;
if(event.parent.player.num('s','unequip')) return false;
return true;
},
priority:-10,
content:function(){
trigger.num=1;
}
},
zhuque_skill:{
trigger:{player:'useCardToBefore'},
priority:7,
filter:function(event,player){
if(event.card.name=='sha'&&!event.card.nature) return true;
},
2015-05-14 09:23:45 +00:00
audio:true,
2015-04-29 03:25:17 +00:00
check:function(event,player){
var att=ai.get.attitude(player,event.target);
if(event.target.hasSkillTag('nofire')){
return att>0;
}
return att<=0;
},
content:function(){
trigger.card.nature='fire';
player.addSkill('zhuque_skill2');
player.storage.zhuque_skill=trigger.card;
}
},
zhuque_skill2:{
trigger:{player:'useCardAfter'},
forced:true,
popup:false,
content:function(){
delete player.storage.zhuque_skill.nature;
}
},
huogon2:{},
},
translate:{
jiu:'酒',
2016-09-13 15:52:46 +00:00
jiu_info:'出牌阶段,对自己使用,令自己的下一张使用的【杀】造成的伤害+1每回合限使用1次濒死阶段对自己使用回复1点体力',
2015-04-29 03:25:17 +00:00
huogong:'火攻',
tiesuo:'铁锁连环',
2016-09-01 10:36:59 +00:00
tiesuo_info:'出牌阶段使用选择1至2个角色分别横置或重置这些角色',
2015-04-29 03:25:17 +00:00
huogong_bg:'攻',
2015-09-16 07:31:41 +00:00
huogong_info:'目标角色展示一张手牌然后若你能弃掉一张与所展示牌相同花色的手牌则火攻对该角色造成1点火焰伤害。',
2015-04-29 03:25:17 +00:00
tiesuo_bg:'锁',
bingliang:'兵粮寸断',
hualiu:'骅骝',
zhuque:'朱雀羽扇',
bingliang_bg:'粮',
bingliang_info:'目标角色判定阶段进行判定:若判定结果不为梅花,则跳过该角色的摸牌阶段。',
hualiu_bg:'+马',
2016-02-04 06:55:02 +00:00
hualiu_info:'其他角色与你的距离+1',
2015-04-29 03:25:17 +00:00
zhuque_bg:'扇',
zhuque_skill:'朱雀羽扇',
zhuque_info:'你可以将一张普通【杀】当具火焰伤害的【杀】使用。',
guding:'古锭刀',
guding_info:'锁定技,当你使用【杀】对目标角色造成伤害时,若其没有手牌,此伤害+1。',
guding_skill:'古锭刀',
tengjia:'藤甲',
tengjia_info:'锁定技,【南蛮入侵】、【万箭齐发】和普通【杀】对你无效。你每次受到火焰伤害时,该伤害+1。',
tengjia1:'藤甲',
tengjia2:'藤甲',
baiyin:'白银狮子',
baiyin_info:'锁定技你每次受到伤害时最多承受1点伤害防止多余的伤害当你失去装备区里的【白银狮子】时你回复1点体力。',
baiyin_skill:'白银狮子',
_baiyin:'白银狮子',
},
list:[
["heart",4,"sha","fire"],
["heart",7,"sha","fire"],
["heart",10,"sha","fire"],
["diamond",4,"sha","fire"],
["diamond",5,"sha","fire"],
["spade",4,"sha","thunder"],
["spade",5,"sha","thunder"],
["spade",6,"sha","thunder"],
["spade",7,"sha","thunder"],
["spade",8,"sha","thunder"],
["club",5,"sha","thunder"],
["club",6,"sha","thunder"],
["club",7,"sha","thunder"],
["club",8,"sha","thunder"],
["heart",8,"shan"],
["heart",9,"shan"],
["heart",11,"shan"],
["heart",12,"shan"],
["diamond",6,"shan"],
["diamond",7,"shan"],
["diamond",8,"shan"],
["diamond",10,"shan"],
["diamond",11,"shan"],
["heart",5,"tao"],
["heart",6,"tao"],
["diamond",2,"tao"],
["diamond",3,"tao"],
["diamond",9,"jiu"],
["spade",3,"jiu"],
["spade",9,"jiu"],
["club",3,"jiu"],
["club",9,"jiu"],
["diamond",13,"hualiu"],
["club",1,"baiyin"],
["spade",2,"tengjia",'fire'],
["club",2,"tengjia",'fire'],
2015-09-16 02:45:45 +00:00
["spade",1,"guding"],
2015-09-16 07:31:41 +00:00
["diamond",1,"zhuque",'fire'],
2015-04-29 03:25:17 +00:00
["heart",2,"huogong","fire"],
["heart",3,"huogong","fire"],
["diamond",12,"huogong","fire"],
["spade",11,"tiesuo"],
["spade",12,"tiesuo"],
["club",10,"tiesuo"],
["club",11,"tiesuo"],
["club",12,"tiesuo"],
["club",13,"tiesuo"],
["heart",13,"wuxie"],
["heart",13,"wuxie"],
["spade",13,"wuxie"],
["spade",10,"bingliang"],
["club",4,"bingliang"],
],
}