Merge branch 'libccy:PR-Branch' into PR-Branch
This commit is contained in:
commit
86078f74aa
|
@ -1806,24 +1806,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
return player.getHistory('lose').length;
|
return player.getHistory('lose').length;
|
||||||
},
|
},
|
||||||
frequent:true,
|
frequent:true,
|
||||||
async content(event,trigger,player){
|
content(){
|
||||||
player.judge().set('callback',()=>{
|
'step 0'
|
||||||
const red=[],black=[];
|
player.judge();
|
||||||
|
'step 1'
|
||||||
|
let num = 0;
|
||||||
game.getGlobalHistory('cardMove',evt=>{
|
game.getGlobalHistory('cardMove',evt=>{
|
||||||
if(evt.name!='cardsDiscard'){
|
if(evt.name!='cardsDiscard'){
|
||||||
if(evt.name!='lose'||evt.position!=ui.discardPile) return false;
|
if(evt.name!='lose'||evt.position!=ui.discardPile) return false;
|
||||||
}
|
}
|
||||||
const cards=evt.cards.filter(card=>get.position(card,true)=='d');
|
num += (evt.cards.filter(i=>get.color(i,false) == result.color).length);
|
||||||
red.addArray(cards.filter(i=>get.color(i,false)=='red'));
|
|
||||||
black.addArray(cards.filter(i=>get.color(i,false)=='black'));
|
|
||||||
});
|
});
|
||||||
if(event.judgeResult.color=='red'&&red.length){
|
if (num > 0) player.draw(num);
|
||||||
player.draw(red.length);
|
|
||||||
}
|
|
||||||
else if(event.judgeResult.color=='black'&&black.length){
|
|
||||||
player.draw(black.length);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
jsrgzunwei:{
|
jsrgzunwei:{
|
||||||
|
|
|
@ -5491,6 +5491,7 @@ export class Game extends Uninstantable {
|
||||||
else {
|
else {
|
||||||
next.parent = event;
|
next.parent = event;
|
||||||
_status.event = next;
|
_status.event = next;
|
||||||
|
game.getGlobalHistory('everything').push(next);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
Loading…
Reference in New Issue