This commit is contained in:
libccy 2016-03-12 20:06:13 +08:00
parent 50bfaea615
commit 9770c51d3c
4 changed files with 111 additions and 59 deletions

View File

@ -75,9 +75,8 @@ card.mingzhong={
fullskin:true, fullskin:true,
enable:true, enable:true,
type:'trick', type:'trick',
filterTarget:function(card,player,target){ range:{global:1},
return get.distance(player,target)<=1; filterTarget:true,
},
content:function(){ content:function(){
'step 0' 'step 0'
target.draw(3); target.draw(3);
@ -111,6 +110,76 @@ card.mingzhong={
fullskin:true, fullskin:true,
enable:true, enable:true,
type:'delay', type:'delay',
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.addTempSkill('caomu_skill','phaseAfter');
}
},
ai:{
basic:{
order:1,
useful:1,
value:4.5,
},
result:{
player:function(player,target){
var num=0;
for(var i=0;i<game.players.length;i++){
if(get.distance(target,game.players[i])<=1&&game.players[i]!=target){
var att=ai.get.attitude(player,game.players[i]);
if(att>3){
num+=1.1;
}
else if(att>0){
num++;
}
else if(att<-3){
num-=1.1;
}
else if(att<0){
num--;
}
}
}
return num;
},
target:-1
},
}
}
},
skill:{
caomu_skill:{
unique:true,
trigger:{player:'phaseDrawBegin'},
forced:true,
popup:false,
silent:true,
content:function(){
trigger.num--;
},
group:'caomu_skill2'
},
caomu_skill2:{
trigger:{player:'phaseDrawAfter'},
forced:true,
popup:false,
silent:true,
content:function(){
var targets=game.filterPlayer(function(current){
return get.distance(player,current)<=1&&player!=current;
});
if(targets.length){
game.asyncDraw(targets);
}
}
} }
}, },
translate:{ translate:{

View File

@ -37,6 +37,7 @@ character.hearth={
hs_nozdormu:['male','qun',5,['shixu']], hs_nozdormu:['male','qun',5,['shixu']],
hs_sapphiron:['male','wei',4,['bingdong','stuxi']], hs_sapphiron:['male','wei',4,['bingdong','stuxi']],
hs_kchromaggus:['male','wei',4,['fenlie']], hs_kchromaggus:['male','wei',4,['fenlie']],
hs_kesuen:['male','wei',3,['fenlie']],
hs_zhishigushu:['male','shu',4,['jiaohui']], hs_zhishigushu:['male','shu',4,['jiaohui']],
hs_zhanzhenggushu:['male','wei',6,['biri']], hs_zhanzhenggushu:['male','wei',6,['biri']],

View File

@ -2373,7 +2373,7 @@
}, },
chess_obstacle:{ chess_obstacle:{
name:'随机路障', name:'随机路障',
init:'0.333', init:'0',
item:{ item:{
'0':'关闭', '0':'关闭',
'0.2':'少量', '0.2':'少量',
@ -2386,6 +2386,10 @@
name:'击退效果', name:'击退效果',
init:true, init:true,
}, },
show_range:{
name:'显示卡牌范围',
init:true,
},
show_distance:{ show_distance:{
name:'显示距离', name:'显示距离',
init:true, init:true,
@ -7053,11 +7057,11 @@
}, },
popup:function(name,className){ popup:function(name,className){
var name2=get.translation(name); var name2=get.translation(name);
if(true){
if(!name2) return; if(!name2) return;
this.$damagepop(name2,className||'water',true); this.$damagepop(name2,className||'water',true);
return; },
} popup_old:function(name,className){
var name2=get.translation(name);
var node=ui.create.div('.popup',this.parentNode); var node=ui.create.div('.popup',this.parentNode);
if(!name2){ if(!name2){
node.remove(); node.remove();
@ -7697,18 +7701,7 @@
else{ else{
var node; var node;
if(card==undefined||card.length==0) return; if(card==undefined||card.length==0) return;
if(false){
var left=-52+(Math.random()<0.5?1:-1)*Math.random()*100;
var top=-52+(Math.random()<0.5?1:-1)*Math.random()*80;
node=this.$throwxy2(card,
'calc(50% '+(left>0?'+':'-')+' '+Math.abs(left)+'px)',
'calc(50% '+(top>0?'+':'-')+' '+Math.abs(top)+'px)'
);
}
else{
node=this.$throwordered(card.copy('thrown')); node=this.$throwordered(card.copy('thrown'));
}
if(time!=undefined){ if(time!=undefined){
node.fixed=true; node.fixed=true;
setTimeout(function(){node.delete()},time); setTimeout(function(){node.delete()},time);
@ -8491,23 +8484,7 @@
$phaseJudge:function(card){ $phaseJudge:function(card){
game.addVideo('phaseJudge',this,get.cardInfo(card)); game.addVideo('phaseJudge',this,get.cardInfo(card));
var player=this; var player=this;
var clone; var clone=player.$throw(card);
// var clone=card.copy('thrown','thrownhighlight',ui.arena);
if(true){
clone=player.$throw(card);
}
else{
clone=card.copy('thrown','thrownhighlight',ui.arena).animate('judgestart');
clone.style.opacity=0.6;
clone.style.left='calc(50% - 52px '+((Math.random()-0.5<0)?'+':'-')+' '+Math.random()*50+'px)';
clone.style.top='calc(50% - 52px '+((Math.random()-0.5<0)?'+':'-')+' '+Math.random()*40+'px)';
game.linexy([
clone.offsetLeft+clone.offsetWidth/2,
clone.offsetTop+clone.offsetHeight/2,
player.offsetLeft+player.offsetWidth/2,
player.offsetTop+player.offsetHeight/2
],{opacity:0.5,dashed:true});
}
if(lib.config.low_performance&&card&&card.clone){ if(lib.config.low_performance&&card&&card.clone){
var waitingForTransition=get.time(); var waitingForTransition=get.time();
_status.waitingForTransition=waitingForTransition; _status.waitingForTransition=waitingForTransition;
@ -12368,9 +12345,8 @@
return ok; return ok;
}, },
uncheck:function(){ uncheck:function(){
// ui.roundmenu.show();
var i,j; var i,j;
if(false){ if(true){
if(lib.config.mode=='chess'){ if(lib.config.mode=='chess'){
var shadows=ui.chessContainer.getElementsByClassName('playergrid temp'); var shadows=ui.chessContainer.getElementsByClassName('playergrid temp');
while(shadows.length){ while(shadows.length){
@ -13322,6 +13298,15 @@
} }
return false; return false;
}, },
filterPlayer:function(func){
var list=[];
for(var i=0;i<game.players.length;i++){
if(func(game.players[i])){
list.push(game.players[i]);
}
}
return list;
},
players:[], players:[],
dead:[], dead:[],
imported:[], imported:[],
@ -17713,7 +17698,7 @@
if(notbefore){ if(notbefore){
_status.lastdragchange.push(item); _status.lastdragchange.push(item);
item._lastdragchange=[exx,eyy]; item._lastdragchange=[exx,eyy];
if(false){ if(lib.falseitem){
var from=[_status.mousedragging.clientX-ui.arena.offsetLeft,_status.mousedragging.clientY-ui.arena.offsetTop]; var from=[_status.mousedragging.clientX-ui.arena.offsetLeft,_status.mousedragging.clientY-ui.arena.offsetTop];
var to=[exx,eyy]; var to=[exx,eyy];
var node=ui.create.div('.linexy.hidden'); var node=ui.create.div('.linexy.hidden');
@ -18565,18 +18550,16 @@
if(!notoggle){ if(!notoggle){
this.classList.toggle('selected'); this.classList.toggle('selected');
} }
if(false){ if(lib.config.mode=='chess'&&get.config('show_range')&&!_status.event.skill&&this.classList.contains('selected')&&
if(lib.config.mode=='chess'&&!_status.event.skill&&this.classList.contains('selected')&&
_status.event.isMine()&&_status.event.name=='chooseToUse'){ _status.event.isMine()&&_status.event.name=='chooseToUse'){
var player=_status.event.player; var player=_status.event.player;
var range=get.info(this).range; var range=get.info(this).range;
if(range){ if(range){
if(typeof range.attack==='number'){ if(typeof range.attack==='number'){
player.createRangeShadow(get.attackRange(player)+range.attack-1); player.createRangeShadow(Math.min(8,get.attackRange(player)+range.attack-1));
} }
else if(typeof range.global==='number'){ else if(typeof range.global==='number'){
player.createRangeShadow(get.globalFrom(player)+range.global); player.createRangeShadow(Math.min(8,get.globalFrom(player)+range.global));
}
} }
} }
} }
@ -20797,7 +20780,6 @@
} }
return false; return false;
} }
break;
} }
default:{ default:{
if(typeof type=='string'){ if(typeof type=='string'){
@ -20889,7 +20871,7 @@
lib.translate[(js[i].viewAs||js[i].name)+'_info']+'</div></div>'; lib.translate[(js[i].viewAs||js[i].name)+'_info']+'</div></div>';
uiintro.add(translation); uiintro.add(translation);
} }
if(false){ if(lib.falseitem){
uiintro.add(ui.create.div('.placeholder')); uiintro.add(ui.create.div('.placeholder'));
var table,tr,td; var table,tr,td;
table=document.createElement('table'); table=document.createElement('table');

Binary file not shown.

After

Width:  |  Height:  |  Size: 263 KiB