From d38b21594164aba8d4db7734ebfcfc15ecd12273 Mon Sep 17 00:00:00 2001 From: Spmario233 Date: Wed, 1 Jan 2020 22:39:16 +0800 Subject: [PATCH] v1.9.96.8 --- game/game.js | 111 +++++++++++++++++++++++++++++++++++-------------- game/update.js | 23 +++++----- 2 files changed, 91 insertions(+), 43 deletions(-) diff --git a/game/game.js b/game/game.js index 68cbd78da..55954db63 100644 --- a/game/game.js +++ b/game/game.js @@ -10047,6 +10047,9 @@ } player.ai.tempIgnore=[]; player.stat.push({card:{},skill:{}}); + game.countPlayer(function(current){ + current.actionHistory.push({useCard:[],respond:[],skipped:[]}); + }); if(ui.land&&ui.land.player==player){ game.addVideo('destroyLand'); ui.land.destroy(); @@ -11028,13 +11031,14 @@ }, phaseDraw:function(){ "step 0" + event.trigger("phaseDrawBegin1"); + "step 1" + event.trigger("phaseDrawBegin2"); + "step 2" if(game.modPhaseDraw){ game.modPhaseDraw(player,event.num); } else{ - if((get.config('first_less')||_status.connectMode||_status.first_less_forced)&&game.phaseNumber==1&&_status.first_less){ - event.num--; - } if(event.num>0){ var num=event.num; if(event.attachDraw){ @@ -11049,7 +11053,7 @@ } } } - "step 1" + "step 3" if(Array.isArray(result)){ event.cards=result; } @@ -13319,6 +13323,32 @@ event.directHit=[]; event.customArgs={default:{}}; event.baseDamage=get.info(card,false).baseDamage||1; + player.actionHistory[player.actionHistory.length-1].useCard.push(event); + if(event.addCount!=false){ + if(player.stat[player.stat.length-1].card[card.name]==undefined){ + player.stat[player.stat.length-1].card[card.name]=1; + } + else{ + player.stat[player.stat.length-1].card[card.name]++; + } + if(event.skill){ + if(player.stat[player.stat.length-1].skill[event.skill]==undefined){ + player.stat[player.stat.length-1].skill[event.skill]=1; + } + else{ + player.stat[player.stat.length-1].skill[event.skill]++; + } + var sourceSkill=get.info(event.skill).sourceSkill; + if(sourceSkill){ + if(player.stat[player.stat.length-1].skill[sourceSkill]==undefined){ + player.stat[player.stat.length-1].skill[sourceSkill]=1; + } + else{ + player.stat[player.stat.length-1].skill[sourceSkill]++; + } + } + } + } event.trigger('useCard1'); "step 1" event.trigger('useCard2'); @@ -13365,31 +13395,6 @@ game.logv(player,[card,cards],targets); } } - if(event.addCount!=false){ - if(player.stat[player.stat.length-1].card[card.name]==undefined){ - player.stat[player.stat.length-1].card[card.name]=1; - } - else{ - player.stat[player.stat.length-1].card[card.name]++; - } - if(event.skill){ - if(player.stat[player.stat.length-1].skill[event.skill]==undefined){ - player.stat[player.stat.length-1].skill[event.skill]=1; - } - else{ - player.stat[player.stat.length-1].skill[event.skill]++; - } - var sourceSkill=get.info(event.skill).sourceSkill; - if(sourceSkill){ - if(player.stat[player.stat.length-1].skill[sourceSkill]==undefined){ - player.stat[player.stat.length-1].skill[sourceSkill]=1; - } - else{ - player.stat[player.stat.length-1].skill[sourceSkill]++; - } - } - } - } "step 3" event.sortTarget=function(animate){ var info=get.info(card,false); @@ -13983,6 +13988,7 @@ else{ game.log(player,'打出了',card); } + player.actionHistory[player.actionHistory.length-1].respond.push(event); var cards2=cards.slice(0); if(cards2.length){ var next=player.lose(cards2,ui.ordering,'visible'); @@ -16195,7 +16201,17 @@ } return null; }, - countUsed:function(card){ + countUsed:function(card,type){ + if(type===true){ + var num=0; + var history=this.getHistory('useCard'); + for(var i=0;i