This commit is contained in:
libccy 2017-02-24 14:58:31 +08:00
parent 372d9f4cc1
commit 0ef7dafe60
4 changed files with 57 additions and 4 deletions

View File

@ -1463,11 +1463,12 @@ character.shenhua={
trigger:{player:'dieBegin'},
forced:true,
filter:function(event){
return event.source!=undefined;
return event.source&&event.source.isIn();
},
content:function(){
trigger.source.clearSkills();
},
logTarget:'source',
ai:{
threaten:function(player,target){
if(target.hp==1) return 0.2;

View File

@ -36653,10 +36653,10 @@
td.innerHTML=get.numStr(node.getAttackRange());
tr.appendChild(td);
td=document.createElement('td');
if(node==game.me||!game.me){
if(node==game.me||!game.me||!game.me.isIn()){
td.innerHTML='-';
}
else if(game.me){
else{
td.innerHTML=get.numStr(Math.max(1,game.me.distanceTo(node)));
}
tr.appendChild(td);

View File

@ -1614,6 +1614,10 @@ div:not(.handcards)>.card>.info>span,
.player>.avatar2.hidden {
pointer-events: none !important;
}
.player>.avatar.disabled{
-webkit-filter: grayscale(1);
opacity: 0.8;
}
.player>.avatar>.action:not(.freecolor) {
text-shadow: black 0 0 1px, rgba(10, 155, 67, 1) 0 0 5px, rgba(10, 155, 67, 1) 0 0 10px;
}

View File

@ -1227,11 +1227,13 @@ mode.guozhan={
case 1:player.classList.add('unseen2');break;
}
for(var i=0;i<skills.length;i++){
if(!player.skills.contains(skills[i])) continue;
player.hiddenSkills.add(skills[i]);
player.skills.remove(skills[i]);
}
},this,this.name,this.sex,num,skills);
for(var i=0;i<skills.length;i++){
if(!this.skills.contains(skills[i])) continue;
this.hiddenSkills.add(skills[i]);
var info=get.info(skills[i]);
if(info.ondisable&&info.onremove){
@ -1242,6 +1244,12 @@ mode.guozhan={
this.checkConflict();
},
showCharacter:function(num,log){
if(num==0&&!this.classList.contains('unseen')){
return;
}
if(num==1&&!this.classList.contains('unseen2')){
return;
}
if(!this.classList.contains('unseen')&&!this.classList.contains('unseen2')){
return;
}
@ -1462,7 +1470,47 @@ mode.guozhan={
},
skill:{
gzduanchang:{
audio:'duanchang',
trigger:{player:'dieBegin'},
forced:true,
silent:true,
filter:function(event,player){
return event.source&&event.source.isIn()&&event.source!=player;
},
content:function(){
'step 0'
player.chooseControl('主将','副将',function(){
return Math.random()<0.5?'主将':'副将';
}).set('prompt','令'+get.translation(trigger.source)+'失去一张武将牌的所有技能');
'step 1'
var skills;
if(result.control=='主将'){
trigger.source.showCharacter(0);
trigger.source.node.avatar.classList.add('disabled');
skills=lib.character[trigger.source.name];
game.log(trigger.source,'失去了主将技能');
}
else{
trigger.source.showCharacter(1);
trigger.source.node.avatar2.classList.add('disabled');
skills=lib.character[trigger.source.name2];
game.log(trigger.source,'失去了副将技能');
}
trigger.source.disableSkill('gzduanchang',skills);
},
logTarget:'source',
ai:{
threaten:function(player,target){
if(target.hp==1) return 0.2;
return 1.5;
},
effect:{
target:function(card,player,target,current){
if(!target.hasFriend()) return;
if(target.hp<=1&&get.tag(card,'damage')) return [1,0,0,-2];
}
}
}
},
gzweimu:{
audio:'weimu',