This commit is contained in:
parent
288da46773
commit
781fe04f5a
|
@ -2223,16 +2223,16 @@ character.hearth={
|
||||||
forced:true,
|
forced:true,
|
||||||
content:function(){
|
content:function(){
|
||||||
'step 0'
|
'step 0'
|
||||||
var players=get.players();
|
var players=game.filterPlayer();
|
||||||
var list=[];
|
var list=[];
|
||||||
for(var i in lib.card){
|
for(var i in lib.card){
|
||||||
if(!lib.translate[i+'_info']) continue;
|
if(!lib.translate[i+'_info']) continue;
|
||||||
if(lib.card[i].mode&&lib.card[i].mode.contains(lib.config.mode)==false) continue;
|
if(lib.card[i].mode&&lib.card[i].mode.contains(lib.config.mode)==false) continue;
|
||||||
if(lib.card[i].type=='trick') list.push(i);
|
if(lib.card[i].type=='trick') list.push(i);
|
||||||
}
|
}
|
||||||
for(var i=0;i<game.players.length;i++){
|
for(var i=0;i<players.length;i++){
|
||||||
game.players[i].gain(game.createCard(list.randomGet()));
|
players[i].gain(game.createCard(list.randomGet()));
|
||||||
game.players[i].$draw();
|
players[i].$draw();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -3060,10 +3060,11 @@ character.hearth={
|
||||||
threaten:1.8,
|
threaten:1.8,
|
||||||
order:function(name,player){
|
order:function(name,player){
|
||||||
var max=true,num=0;
|
var max=true,num=0;
|
||||||
for(var i=0;i<game.players.length;i++){
|
var players=game.filterPlayer();
|
||||||
if(game.players[i]==player) continue;
|
for(var i=0;i<players.length;i++){
|
||||||
var att=ai.get.attitude(player,game.players[i]);
|
if(players[i]==player) continue;
|
||||||
var dh=player.num('h')-game.players[i].num('h');
|
var att=ai.get.attitude(player,players[i]);
|
||||||
|
var dh=player.num('h')-players[i].num('h');
|
||||||
if(att*dh>num){
|
if(att*dh>num){
|
||||||
if(att>0){
|
if(att>0){
|
||||||
max=true;
|
max=true;
|
||||||
|
@ -3368,13 +3369,11 @@ character.hearth={
|
||||||
filter:function(event,player){
|
filter:function(event,player){
|
||||||
var nh=player.num('h');
|
var nh=player.num('h');
|
||||||
var nm=1;
|
var nm=1;
|
||||||
for(var i=0;i<game.players.length;i++){
|
return game.hasPlayer(function(current){
|
||||||
var target=game.players[i];
|
if(current!=player&&Math.abs(current.num('h')-nh)<=nm){
|
||||||
if(target!=player&&Math.abs(target.num('h')-nh)<=nm){
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
return false;
|
|
||||||
},
|
},
|
||||||
content:function(){
|
content:function(){
|
||||||
'step 0'
|
'step 0'
|
||||||
|
@ -3708,12 +3707,9 @@ character.hearth={
|
||||||
trigger:{player:'phaseEnd'},
|
trigger:{player:'phaseEnd'},
|
||||||
direct:true,
|
direct:true,
|
||||||
filter:function(event,player){
|
filter:function(event,player){
|
||||||
for(var i=0;i<game.players.length;i++){
|
return game.hasPlayer(function(current){
|
||||||
if(game.players[i]!=player&&game.players[i].num('h')){
|
return current!=player&¤t.num('h');
|
||||||
return true;
|
});
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
},
|
},
|
||||||
content:function(){
|
content:function(){
|
||||||
'step 0'
|
'step 0'
|
||||||
|
@ -3986,12 +3982,9 @@ character.hearth={
|
||||||
trigger:{player:'phaseBegin'},
|
trigger:{player:'phaseBegin'},
|
||||||
filter:function(event,player){
|
filter:function(event,player){
|
||||||
if(!player.num('h',{suit:'spade'})) return false;
|
if(!player.num('h',{suit:'spade'})) return false;
|
||||||
for(var i=0;i<game.players.length;i++){
|
return !game.hasPlayer(function(current){
|
||||||
if(game.players[i].num('j','shandian')){
|
return current.hasJudge('shandian');
|
||||||
return false;
|
});
|
||||||
}
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
},
|
},
|
||||||
forced:true,
|
forced:true,
|
||||||
check:function(){
|
check:function(){
|
||||||
|
@ -4162,12 +4155,9 @@ character.hearth={
|
||||||
usable:1,
|
usable:1,
|
||||||
filter:function(event,player){
|
filter:function(event,player){
|
||||||
if(event.responded) return false;
|
if(event.responded) return false;
|
||||||
for(var i=0;i<game.players.length;i++){
|
return game.hasPlayer(function(current){
|
||||||
if(game.players[i]!=player&&game.players[i].num('h')){
|
return current!=player&¤t.num('h');
|
||||||
return true;
|
});
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
},
|
},
|
||||||
content:function(){
|
content:function(){
|
||||||
"step 0"
|
"step 0"
|
||||||
|
@ -4429,12 +4419,9 @@ character.hearth={
|
||||||
effect_old:{
|
effect_old:{
|
||||||
target:function(card,player,target){
|
target:function(card,player,target){
|
||||||
if(get.tag(card,'respondShan')){
|
if(get.tag(card,'respondShan')){
|
||||||
var hastarget=false;
|
var hastarget=game.hasPlayer(function(current){
|
||||||
for(var i=0;i<game.players.length;i++){
|
return ai.get.attitude(player,current)<0;
|
||||||
if(ai.get.attitude(target,game.players[i])<0){
|
});
|
||||||
hastarget=true;break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
var ns=target.num('h','shan');
|
var ns=target.num('h','shan');
|
||||||
var nh=target.num('h');
|
var nh=target.num('h');
|
||||||
if(ns>1){
|
if(ns>1){
|
||||||
|
@ -4806,12 +4793,9 @@ character.hearth={
|
||||||
trigger:{player:'phaseEnd'},
|
trigger:{player:'phaseEnd'},
|
||||||
direct:true,
|
direct:true,
|
||||||
filter:function(event,player){
|
filter:function(event,player){
|
||||||
for(var i=0;i<game.players.length;i++){
|
return game.hasPlayer(function(current){
|
||||||
if(game.players[i]!=player&&game.players[i].hp<game.players[i].maxHp){
|
return current!=player&¤t.isDamaged();
|
||||||
return true;
|
});
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
},
|
},
|
||||||
content:function(){
|
content:function(){
|
||||||
'step 0'
|
'step 0'
|
||||||
|
|
Loading…
Reference in New Issue