This commit is contained in:
libccy 2016-07-03 00:16:11 +08:00
parent 01d2e3892c
commit 288dd191ec
4 changed files with 150 additions and 27 deletions

View File

@ -955,26 +955,123 @@ card.yunchou={
}, },
}, },
skill:{ skill:{
mujiaren:{}, hslingjian_xuanfengzhiren_equip1:{},
hslingjian_xuanfengzhiren_equip2:{},
hslingjian_xuanfengzhiren_equip3:{},
hslingjian_xuanfengzhiren_equip4:{},
hslingjian_xuanfengzhiren_equip5:{},
hslingjian_zhongxinghujia_equip1:{},
hslingjian_zhongxinghujia_equip2:{},
hslingjian_zhongxinghujia_equip3:{},
hslingjian_zhongxinghujia_equip4:{},
hslingjian_zhongxinghujia_equip5:{},
hslingjian_jinjilengdong_equip1:{},
hslingjian_jinjilengdong_equip2:{},
hslingjian_jinjilengdong_equip3:{},
hslingjian_jinjilengdong_equip4:{},
hslingjian_jinjilengdong_equip5:{},
hslingjian_yinmilichang_equip1:{},
hslingjian_yinmilichang_equip2:{},
hslingjian_yinmilichang_equip3:{},
hslingjian_yinmilichang_equip4:{},
hslingjian_yinmilichang_equip5:{},
hslingjian_xingtigaizao_equip1:{},
hslingjian_xingtigaizao_equip2:{},
hslingjian_xingtigaizao_equip3:{},
hslingjian_xingtigaizao_equip4:{},
hslingjian_xingtigaizao_equip5:{},
hslingjian_shengxiuhaojiao_equip1:{},
hslingjian_shengxiuhaojiao_equip2:{},
hslingjian_shengxiuhaojiao_equip3:{},
hslingjian_shengxiuhaojiao_equip4:{},
hslingjian_shengxiuhaojiao_equip5:{},
hslingjian_shijianhuisu_equip1:{},
hslingjian_shijianhuisu_equip2:{},
hslingjian_shijianhuisu_equip3:{},
hslingjian_shijianhuisu_equip4:{},
hslingjian_shijianhuisu_equip5:{},
mujiaren_skill:{},
_lingjianduanzao:{ _lingjianduanzao:{
enable:'phaseUse', enable:'phaseUse',
check:function(card){ check:function(card){
return 1+ai.get.value(card); return 1+ai.get.value(card);
}, },
lose:true, filterCard:function(card){
discard:false, var type=get.type(card);
process:function(cards){ if(!ui.selected.cards.length){
return type=='equip'&&lib.inpile.contains(card.name);
}
return type=='hslingjian';
},
process:function(cards){
if(cards.length==3){
cards.sort(function(a,b){
if(a.name<b.name) return 1;
return -1;
});
}
var equip;
for(var i=0;i<cards.length;i++){
if(get.type(cards[i])=='equip'){
equip=cards[i];
cards.splice(i--,1);
}
}
var name=equip.name;
for(var i=0;i<cards.length;i++){
name+=cards[i].name.slice(10);
}
if(lib.card[name]) return name;
lib.card[name]={};
for(var i in lib.card[equip.name]){
lib.card[name][i]=lib.card[equip.name][i];
}
lib.card[name].cardimage=equip.name;
if(cards.length==2){
lib.card[name].legend=true;
}
else{
lib.card[name].epic=true;
}
lib.card[name].skills=lib.card[name].skills.slice(0);
lib.card[name].filterTarget=true;
lib.card[name].selectTarget=1;
lib.card[name].range={global:1};
lib.card[name].vanish=true;
var str;
if(cards.length==2){
str=lib.translate[cards[0].name+'_duanzao2']+lib.translate[cards[1].name+'_duanzao2'];
}
else{
str=lib.translate[cards[0].name+'_duanzao'];
}
var str2=lib.translate[equip.name];
if(str2.length>2){
str2=str2.slice(0,2);
}
lib.translate[name]=str+str2;
str2=lib.translate[equip.name+'_info']||'';
if(str2[str2.length-1]=='.'||str2[str2.length-1]=='。'){
str2=str2.slice(0,str2.length-1);
}
for(var i=0;i<cards.length;i++){
var name2=cards[i].name+'_'+get.subtype(equip);
lib.card[name].skills.add(name2);
str2+=''+lib.translate[name2+'_info'];
}
lib.translate[name+'_info']=str2;
return name;
},
selectCard:function(){
if(_status.event.player.hasSkill('mujiaren_skill')) return [2,3];
return 2;
}, },
selectCard:2,
filter:function(event,player){ filter:function(event,player){
return player.num('h',{type:'equip'})&&player.num('h',{type:'hslingjian'}); return player.num('h',{type:'equip'})&&player.num('h',{type:'hslingjian'});
}, },
prepare:function(cards,player){
player.$throw(cards);
},
content:function(){ content:function(){
var name=lib.skill._lingjianduanzao.process(cards);
game.me.gain(game.createCard(name),'gain2');
}, },
ai:{ ai:{
result:{ result:{
@ -1165,7 +1262,7 @@ card.yunchou={
hslingjian_zhongxinghujia_equip3_info:'当你的装备区内有防具牌时,你的防御距离+1', hslingjian_zhongxinghujia_equip3_info:'当你的装备区内有防具牌时,你的防御距离+1',
hslingjian_zhongxinghujia_equip4_info:'当你的装备区内有防具牌时,你的进攻距离+1', hslingjian_zhongxinghujia_equip4_info:'当你的装备区内有防具牌时,你的进攻距离+1',
hslingjian_zhongxinghujia_equip5_info:'出牌阶段限一次,你可以弃置两张牌,然后令一名角色随机装备一件防具', hslingjian_zhongxinghujia_equip5_info:'出牌阶段限一次,你可以弃置两张牌,然后令一名角色随机装备一件防具',
hslingjian_jinjilengdong_duanzao:'冻', hslingjian_jinjilengdong_duanzao:'冻',
hslingjian_jinjilengdong_duanzao2:'冰', hslingjian_jinjilengdong_duanzao2:'冰',
hslingjian_jinjilengdong_equip1_info:'每当你用杀造成一次伤害,若受伤害角色武将牌正面朝上,你可以令其摸两张牌并翻面', hslingjian_jinjilengdong_equip1_info:'每当你用杀造成一次伤害,若受伤害角色武将牌正面朝上,你可以令其摸两张牌并翻面',
hslingjian_jinjilengdong_equip2_info:'每当你受到杀造成的伤害,若伤害来源武将牌正面朝上,你可以令其摸两张牌并翻面', hslingjian_jinjilengdong_equip2_info:'每当你受到杀造成的伤害,若伤害来源武将牌正面朝上,你可以令其摸两张牌并翻面',
@ -1173,7 +1270,7 @@ card.yunchou={
hslingjian_jinjilengdong_equip4_info:'你的武将牌背面朝上时进攻距离+2', hslingjian_jinjilengdong_equip4_info:'你的武将牌背面朝上时进攻距离+2',
hslingjian_jinjilengdong_equip5_info:'回合结束后,若你的武将牌正面朝上,你可以与一名武将牌正面朝上的其他角色同时翻面,然后各摸两张牌', hslingjian_jinjilengdong_equip5_info:'回合结束后,若你的武将牌正面朝上,你可以与一名武将牌正面朝上的其他角色同时翻面,然后各摸两张牌',
hslingjian_yinmilichang_duanzao:'隐秘', hslingjian_yinmilichang_duanzao:'隐秘',
hslingjian_yinmilichang_duanzao2:'隐', hslingjian_yinmilichang_duanzao2:'隐',
hslingjian_yinmilichang_equip1_info:'每当你用杀造成一次伤害,你获得潜行直到下一回合开始', hslingjian_yinmilichang_equip1_info:'每当你用杀造成一次伤害,你获得潜行直到下一回合开始',
hslingjian_yinmilichang_equip2_info:'每当你受到杀造成的伤害,你本回合内获得潜行', hslingjian_yinmilichang_equip2_info:'每当你受到杀造成的伤害,你本回合内获得潜行',
hslingjian_yinmilichang_equip3_info:'当你的体力值为1时你的防御距离+1', hslingjian_yinmilichang_equip3_info:'当你的体力值为1时你的防御距离+1',
@ -1207,7 +1304,9 @@ card.yunchou={
lingjiandai:'零件袋', lingjiandai:'零件袋',
lingjiandai_info:'出牌阶段对距离1以内的一名角色使用目标获得3张随机零件', lingjiandai_info:'出牌阶段对距离1以内的一名角色使用目标获得3张随机零件',
mujiaren:'木甲人', mujiaren:'木甲人',
mujiaren_info:'出牌阶段对距离1以内的一名角色使用在本局游戏中目标可以二次煅造装备', mujiaren_skill:'木甲人',
mujiaren_skill_info:'你在煅造装备时可以额外加入一个零件',
mujiaren_info:'出牌阶段对距离1以内的一名角色使用在本局游戏中目标在煅造装备时可以额外加入一个零件',
hslingjian:'零件', hslingjian:'零件',
hslingjian_xuanfengzhiren:'旋风之刃', hslingjian_xuanfengzhiren:'旋风之刃',
hslingjian_xuanfengzhiren_info:'随机弃置一名角色的一张牌', hslingjian_xuanfengzhiren_info:'随机弃置一名角色的一张牌',

View File

@ -53,7 +53,7 @@ character.sp={
sp_daqiao:['female','wu',3,['yanxiao','anxian']], sp_daqiao:['female','wu',3,['yanxiao','anxian']],
sp_ganning:['male','wu',4,['yinling','junwei']], sp_ganning:['male','wu',4,['yinling','junwei']],
sp_xiahoudun:['male','wei',4,['fenyong','xuehen']], sp_xiahoudun:['male','wei',4,['fenyong','xuehen']],
sp_lvmeng:['male','wu',4,['tanhu','mouduan']], sp_lvmeng:['male','wu',3,['tanhu','mouduan']],
wangji:['male','wei',3,['qizhi','jinqu']], wangji:['male','wei',3,['qizhi','jinqu']],
guansuo:['male','shu',4,['zhengnan','xiefang']], guansuo:['male','shu',4,['zhengnan','xiefang']],

View File

@ -3939,6 +3939,14 @@
else{ else{
if(lib[j][k]==undefined) lib[j][k]=lib.init.eval(card[i][j][k]); if(lib[j][k]==undefined) lib[j][k]=lib.init.eval(card[i][j][k]);
else alert('dublicate '+j+' in card '+i+':\n'+k+'\n'+lib[j][k]+'\n'+card[i][j][k]); else alert('dublicate '+j+' in card '+i+':\n'+k+'\n'+lib[j][k]+'\n'+card[i][j][k]);
if(j=='card'&&lib[j][k].derivation){
if(!lib.cardPack.mode_derivation){
lib.cardPack.mode_derivation=[k];
}
else{
lib.cardPack.mode_derivation.push(k);
}
}
} }
} }
} }
@ -11106,11 +11114,20 @@
card[3]='thunder'; card[3]='thunder';
} }
} }
var bg=card[2];
if(!lib.card[card[2]]){ if(!lib.card[card[2]]){
lib.card[card[2]]={}; lib.card[card[2]]={};
} }
var img=lib.card[card[2]].image; if(lib.card[card[2]].epic){
this.classList.add('epic');
}
else if(lib.card[card[2]].legend){
this.classList.add('legend');
}
var bg=card[2];
if(lib.card[card[2]].cardimage){
bg=lib.card[card[2]].cardimage;
}
var img=lib.card[bg].image;
if(img){ if(img){
if(img.indexOf('db:')==0){ if(img.indexOf('db:')==0){
img=img.slice(3); img=img.slice(3);
@ -11119,7 +11136,7 @@
img=null; img=null;
} }
} }
if(!lib.config.hide_card_image&&lib.card[card[2]].fullskin){ if(!lib.config.hide_card_image&&lib.card[bg].fullskin){
this.classList.add('fullskin'); this.classList.add('fullskin');
if(img){ if(img){
if(img.indexOf('ext:')==0){ if(img.indexOf('ext:')==0){
@ -11130,14 +11147,14 @@
} }
} }
else{ else{
this.node.image.setBackgroundImage('image/card/'+card[2]+'.png'); this.node.image.setBackgroundImage('image/card/'+bg+'.png');
} }
} }
else if(lib.card[card[2]].image=='background'){ else if(lib.card[bg].image=='background'){
if(card[3]) this.node.background.setBackground(bg+'_'+card[3],'card'); if(card[3]) this.node.background.setBackground(bg+'_'+card[3],'card');
else this.node.background.setBackground(bg,'card'); else this.node.background.setBackground(bg,'card');
} }
else if(lib.card[card[2]].fullimage){ else if(lib.card[bg].fullimage){
if(img){ if(img){
if(img.indexOf('ext:')==0){ if(img.indexOf('ext:')==0){
this.setBackgroundImage(img.replace(/ext:/,'extension/')); this.setBackgroundImage(img.replace(/ext:/,'extension/'));
@ -11151,11 +11168,11 @@
this.setBackground('card/'+bg); this.setBackground('card/'+bg);
} }
} }
else if(lib.card[card[2]].image=='card'){ else if(lib.card[bg].image=='card'){
if(card[3]) this.setBackground(bg+'_'+card[3],'card'); if(card[3]) this.setBackground(bg+'_'+card[3],'card');
else this.setBackground(bg,'card'); else this.setBackground(bg,'card');
} }
else if(typeof lib.card[card[2]].image=='string'&&!lib.card[card[2]].fullskin){ else if(typeof lib.card[bg].image=='string'&&!lib.card[bg].fullskin){
if(img){ if(img){
if(img.indexOf('ext:')==0){ if(img.indexOf('ext:')==0){
this.setBackgroundImage(img.replace(/ext:/,'extension/')); this.setBackgroundImage(img.replace(/ext:/,'extension/'));
@ -11166,7 +11183,7 @@
} }
} }
else{ else{
this.setBackground(lib.card[card[2]].image); this.setBackground(lib.card[bg].image);
} }
} }
else{ else{
@ -17906,6 +17923,14 @@
} }
var equipValue=info.ai.equipValue||info.ai.basic.equipValue; var equipValue=info.ai.equipValue||info.ai.basic.equipValue;
if(typeof equipValue=='function') return equipValue(card,player)-value; if(typeof equipValue=='function') return equipValue(card,player)-value;
if(card.classList){
if(card.classList.contains('epic')){
equipValue++;
}
else if(card.classList.contains('legend')){
equipValue+=2;
}
}
return equipValue-value; return equipValue-value;
} }
card.ai.result.target=function(player,target){ card.ai.result.target=function(player,target){
@ -17915,8 +17940,7 @@
var value2=0; var value2=0;
if(target[get.subtype(card)]&&target[get.subtype(card)]!=card) if(target[get.subtype(card)]&&target[get.subtype(card)]!=card)
value2=ai.get.value(target[get.subtype(card)],target); value2=ai.get.value(target[get.subtype(card)],target);
if(value1>value2) return 1; return value1-value2;
return -1;
}; };
} }
else if(card.type=='delay'){ else if(card.type=='delay'){

View File

@ -157,10 +157,10 @@ html{
color:rgb(77, 60, 51); color:rgb(77, 60, 51);
text-shadow:none; text-shadow:none;
} }
.card.fullskin.epic>.name2{ #arena.mobile:not(.chess) .player[data-position='0'] .card.fullskin.epic>.name2{
color: rgba(0, 66, 165, 1); color: rgba(0, 66, 165, 1);
} }
.card.fullskin.legend>.name2{ #arena.mobile:not(.chess) .player[data-position='0'] .card.fullskin.legend>.name2{
color: rgba(106, 27, 154, 1); color: rgba(106, 27, 154, 1);
/*color: rgb(117,186,0);*/ /*color: rgb(117,186,0);*/
} }