This commit is contained in:
parent
a8a7b861ad
commit
76901377f0
|
@ -6366,9 +6366,9 @@ character.swd={
|
|||
// var target=trigger.targets[0];
|
||||
// var names=[];
|
||||
// var list=[];
|
||||
// if(target.name&&!target.classList.contains('unseen')) names.add(target.name);
|
||||
// if(target.name1&&!target.classList.contains('unseen')) names.add(target.name1);
|
||||
// if(target.name2&&!target.classList.contains('unseen2')) names.add(target.name2);
|
||||
// if(target.name&&!target.isUnseen(0)) names.add(target.name);
|
||||
// if(target.name1&&!target.isUnseen(0)) names.add(target.name1);
|
||||
// if(target.name2&&!target.isUnseen(1)) names.add(target.name2);
|
||||
// var pss=player.get('s');
|
||||
// for(var i=0;i<names.length;i++){
|
||||
// var info=lib.character[names[i]];
|
||||
|
@ -6491,16 +6491,14 @@ character.swd={
|
|||
filterCard:function(card){
|
||||
return get.type(card,'trick')=='trick';
|
||||
},
|
||||
// discard:false,
|
||||
// prepare:'give',
|
||||
filter:function(event,player){
|
||||
return player.num('h',{type:['trick','delay']})>0;
|
||||
},
|
||||
filterTarget:function(card,player,target){
|
||||
var names=[];
|
||||
if(target.name&&!target.classList.contains('unseen')) names.add(target.name);
|
||||
if(target.name1&&!target.classList.contains('unseen')) names.add(target.name1);
|
||||
if(target.name2&&!target.classList.contains('unseen2')) names.add(target.name2);
|
||||
if(target.name&&!target.isUnseen(0)) names.add(target.name);
|
||||
if(target.name1&&!target.isUnseen(0)) names.add(target.name1);
|
||||
if(target.name2&&!target.isUnseen(1)) names.add(target.name2);
|
||||
var pss=player.get('s');
|
||||
for(var i=0;i<names.length;i++){
|
||||
var info=lib.character[names[i]];
|
||||
|
@ -6520,9 +6518,9 @@ character.swd={
|
|||
createDialog:function(player,target,onlylist){
|
||||
var names=[];
|
||||
var list=[];
|
||||
if(target.name&&!target.classList.contains('unseen')) names.add(target.name);
|
||||
if(target.name1&&!target.classList.contains('unseen')) names.add(target.name1);
|
||||
if(target.name2&&!target.classList.contains('unseen2')) names.add(target.name2);
|
||||
if(target.name&&!target.isUnseen(0)) names.add(target.name);
|
||||
if(target.name1&&!target.isUnseen(0)) names.add(target.name1);
|
||||
if(target.name2&&!target.isUnseen(1)) names.add(target.name2);
|
||||
var pss=player.get('s');
|
||||
for(var i=0;i<names.length;i++){
|
||||
var info=lib.character[names[i]];
|
||||
|
@ -6644,9 +6642,9 @@ character.swd={
|
|||
var target=result.targets[0];
|
||||
var names=[];
|
||||
var list=[];
|
||||
if(target.name&&!target.classList.contains('unseen')) names.add(target.name);
|
||||
if(target.name1&&!target.classList.contains('unseen')) names.add(target.name1);
|
||||
if(target.name2&&!target.classList.contains('unseen2')) names.add(target.name2);
|
||||
if(target.name&&!target.isUnseen(0)) names.add(target.name);
|
||||
if(target.name1&&!target.isUnseen(0)) names.add(target.name1);
|
||||
if(target.name2&&!target.isUnseen(1)) names.add(target.name2);
|
||||
var pss=player.get('s');
|
||||
for(var i=0;i<names.length;i++){
|
||||
var info=lib.character[names[i]];
|
||||
|
|
19
game/game.js
19
game/game.js
|
@ -6449,7 +6449,7 @@
|
|||
numx=num(player);
|
||||
}
|
||||
player.directgain(get.cards(numx));
|
||||
if(player.singleHp===true&&lib.config.mode!='guozhan'){
|
||||
if(player.singleHp===true&&get.mode()!='guozhan'){
|
||||
player.doubleDraw();
|
||||
}
|
||||
player=player.next;
|
||||
|
@ -9626,6 +9626,7 @@
|
|||
else{
|
||||
player.singleHp=true;
|
||||
player.maxHp-=(num+1)/2;
|
||||
event.changed=true;
|
||||
}
|
||||
}
|
||||
else{
|
||||
|
@ -9641,8 +9642,7 @@
|
|||
player.die();
|
||||
}
|
||||
"step 2"
|
||||
if(!event.forced&&player.singleHp===true&&
|
||||
!player.classList.contains('unseen')&&!player.classList.contains('unseen2')){
|
||||
if(!event.forced&&event.changed&&!player.isUnseen(2)){
|
||||
player.doubleDraw();
|
||||
}
|
||||
},
|
||||
|
@ -9658,6 +9658,7 @@
|
|||
else{
|
||||
player.singleHp=true;
|
||||
player.maxHp+=(num-1)/2;
|
||||
event.changed=true;
|
||||
}
|
||||
}
|
||||
else{
|
||||
|
@ -9669,7 +9670,7 @@
|
|||
}
|
||||
player.update();
|
||||
"step 1"
|
||||
if(player.singleHp===true&&!player.classList.contains('unseen')&&!player.classList.contains('unseen2')){
|
||||
if(!event.forced&&event.changed&&!player.isUnseen(2)){
|
||||
player.doubleDraw();
|
||||
}
|
||||
},
|
||||
|
@ -10274,7 +10275,7 @@
|
|||
var info2=lib.character[to];
|
||||
if(this.name2==from){
|
||||
this.name2=to;
|
||||
if(this.classList.contains('unseen')&&!this.classList.contains('unseen2')){
|
||||
if(this.isUnseen(0)&&!this.isUnseen(1)){
|
||||
this.sex=info2[0];
|
||||
this.name=to;
|
||||
}
|
||||
|
@ -10311,6 +10312,9 @@
|
|||
else{
|
||||
this.maxHp+=(num-1)/2;
|
||||
this.singleHp=true;
|
||||
if(!game.online){
|
||||
this.doubleDraw();
|
||||
}
|
||||
}
|
||||
}
|
||||
else{
|
||||
|
@ -10333,11 +10337,6 @@
|
|||
avatar2:this.name2==to
|
||||
});
|
||||
this.update();
|
||||
if(!game.online){
|
||||
if(this.singleHp===true&&!this.classList.contains('unseen')&&!this.classList.contains('unseen2')){
|
||||
this.doubleDraw();
|
||||
}
|
||||
}
|
||||
},
|
||||
uninit:function(){
|
||||
this.node.avatar.hide();
|
||||
|
|
|
@ -1870,7 +1870,7 @@ mode.guozhan={
|
|||
}
|
||||
game.tryResult();
|
||||
},
|
||||
isUnseen:function(){
|
||||
isUnseen:function(num){
|
||||
switch(num){
|
||||
case 0:return this.classList.contains('unseen');
|
||||
case 1:return this.classList.contains('unseen2');
|
||||
|
|
Loading…
Reference in New Issue