This commit is contained in:
libccy 2017-02-25 15:36:56 +08:00
parent a8a7b861ad
commit 76901377f0
3 changed files with 22 additions and 25 deletions

View File

@ -6366,9 +6366,9 @@ character.swd={
// var target=trigger.targets[0]; // var target=trigger.targets[0];
// var names=[]; // var names=[];
// var list=[]; // var list=[];
// if(target.name&&!target.classList.contains('unseen')) names.add(target.name); // if(target.name&&!target.isUnseen(0)) names.add(target.name);
// if(target.name1&&!target.classList.contains('unseen')) names.add(target.name1); // if(target.name1&&!target.isUnseen(0)) names.add(target.name1);
// if(target.name2&&!target.classList.contains('unseen2')) names.add(target.name2); // if(target.name2&&!target.isUnseen(1)) names.add(target.name2);
// var pss=player.get('s'); // var pss=player.get('s');
// for(var i=0;i<names.length;i++){ // for(var i=0;i<names.length;i++){
// var info=lib.character[names[i]]; // var info=lib.character[names[i]];
@ -6491,16 +6491,14 @@ character.swd={
filterCard:function(card){ filterCard:function(card){
return get.type(card,'trick')=='trick'; return get.type(card,'trick')=='trick';
}, },
// discard:false,
// prepare:'give',
filter:function(event,player){ filter:function(event,player){
return player.num('h',{type:['trick','delay']})>0; return player.num('h',{type:['trick','delay']})>0;
}, },
filterTarget:function(card,player,target){ filterTarget:function(card,player,target){
var names=[]; var names=[];
if(target.name&&!target.classList.contains('unseen')) names.add(target.name); if(target.name&&!target.isUnseen(0)) names.add(target.name);
if(target.name1&&!target.classList.contains('unseen')) names.add(target.name1); if(target.name1&&!target.isUnseen(0)) names.add(target.name1);
if(target.name2&&!target.classList.contains('unseen2')) names.add(target.name2); if(target.name2&&!target.isUnseen(1)) names.add(target.name2);
var pss=player.get('s'); var pss=player.get('s');
for(var i=0;i<names.length;i++){ for(var i=0;i<names.length;i++){
var info=lib.character[names[i]]; var info=lib.character[names[i]];
@ -6520,9 +6518,9 @@ character.swd={
createDialog:function(player,target,onlylist){ createDialog:function(player,target,onlylist){
var names=[]; var names=[];
var list=[]; var list=[];
if(target.name&&!target.classList.contains('unseen')) names.add(target.name); if(target.name&&!target.isUnseen(0)) names.add(target.name);
if(target.name1&&!target.classList.contains('unseen')) names.add(target.name1); if(target.name1&&!target.isUnseen(0)) names.add(target.name1);
if(target.name2&&!target.classList.contains('unseen2')) names.add(target.name2); if(target.name2&&!target.isUnseen(1)) names.add(target.name2);
var pss=player.get('s'); var pss=player.get('s');
for(var i=0;i<names.length;i++){ for(var i=0;i<names.length;i++){
var info=lib.character[names[i]]; var info=lib.character[names[i]];
@ -6644,9 +6642,9 @@ character.swd={
var target=result.targets[0]; var target=result.targets[0];
var names=[]; var names=[];
var list=[]; var list=[];
if(target.name&&!target.classList.contains('unseen')) names.add(target.name); if(target.name&&!target.isUnseen(0)) names.add(target.name);
if(target.name1&&!target.classList.contains('unseen')) names.add(target.name1); if(target.name1&&!target.isUnseen(0)) names.add(target.name1);
if(target.name2&&!target.classList.contains('unseen2')) names.add(target.name2); if(target.name2&&!target.isUnseen(1)) names.add(target.name2);
var pss=player.get('s'); var pss=player.get('s');
for(var i=0;i<names.length;i++){ for(var i=0;i<names.length;i++){
var info=lib.character[names[i]]; var info=lib.character[names[i]];

View File

@ -6449,7 +6449,7 @@
numx=num(player); numx=num(player);
} }
player.directgain(get.cards(numx)); player.directgain(get.cards(numx));
if(player.singleHp===true&&lib.config.mode!='guozhan'){ if(player.singleHp===true&&get.mode()!='guozhan'){
player.doubleDraw(); player.doubleDraw();
} }
player=player.next; player=player.next;
@ -9626,6 +9626,7 @@
else{ else{
player.singleHp=true; player.singleHp=true;
player.maxHp-=(num+1)/2; player.maxHp-=(num+1)/2;
event.changed=true;
} }
} }
else{ else{
@ -9641,8 +9642,7 @@
player.die(); player.die();
} }
"step 2" "step 2"
if(!event.forced&&player.singleHp===true&& if(!event.forced&&event.changed&&!player.isUnseen(2)){
!player.classList.contains('unseen')&&!player.classList.contains('unseen2')){
player.doubleDraw(); player.doubleDraw();
} }
}, },
@ -9658,6 +9658,7 @@
else{ else{
player.singleHp=true; player.singleHp=true;
player.maxHp+=(num-1)/2; player.maxHp+=(num-1)/2;
event.changed=true;
} }
} }
else{ else{
@ -9669,7 +9670,7 @@
} }
player.update(); player.update();
"step 1" "step 1"
if(player.singleHp===true&&!player.classList.contains('unseen')&&!player.classList.contains('unseen2')){ if(!event.forced&&event.changed&&!player.isUnseen(2)){
player.doubleDraw(); player.doubleDraw();
} }
}, },
@ -10274,7 +10275,7 @@
var info2=lib.character[to]; var info2=lib.character[to];
if(this.name2==from){ if(this.name2==from){
this.name2=to; this.name2=to;
if(this.classList.contains('unseen')&&!this.classList.contains('unseen2')){ if(this.isUnseen(0)&&!this.isUnseen(1)){
this.sex=info2[0]; this.sex=info2[0];
this.name=to; this.name=to;
} }
@ -10311,6 +10312,9 @@
else{ else{
this.maxHp+=(num-1)/2; this.maxHp+=(num-1)/2;
this.singleHp=true; this.singleHp=true;
if(!game.online){
this.doubleDraw();
}
} }
} }
else{ else{
@ -10333,11 +10337,6 @@
avatar2:this.name2==to avatar2:this.name2==to
}); });
this.update(); this.update();
if(!game.online){
if(this.singleHp===true&&!this.classList.contains('unseen')&&!this.classList.contains('unseen2')){
this.doubleDraw();
}
}
}, },
uninit:function(){ uninit:function(){
this.node.avatar.hide(); this.node.avatar.hide();

View File

@ -1870,7 +1870,7 @@ mode.guozhan={
} }
game.tryResult(); game.tryResult();
}, },
isUnseen:function(){ isUnseen:function(num){
switch(num){ switch(num){
case 0:return this.classList.contains('unseen'); case 0:return this.classList.contains('unseen');
case 1:return this.classList.contains('unseen2'); case 1:return this.classList.contains('unseen2');