From 3e737bc1607e837fe5291a030eebc27b1be6de29 Mon Sep 17 00:00:00 2001 From: libccy Date: Wed, 6 May 2015 22:43:26 +0800 Subject: [PATCH] x --- character/yijiang.js | 3 +++ mode/stone.js | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+) diff --git a/character/yijiang.js b/character/yijiang.js index 421e065fa..ffb116e4d 100644 --- a/character/yijiang.js +++ b/character/yijiang.js @@ -2664,6 +2664,9 @@ character.yijiang={ yuce:{ trigger:{player:'damageAfter'}, direct:true, + filter:function(event,player){ + return player.num('h')>0; + }, content:function(){ "step 0" player.chooseToDiscard('是否发动御策?').ai=function(card){ diff --git a/mode/stone.js b/mode/stone.js index bdfbecc8c..9f3efeaf5 100644 --- a/mode/stone.js +++ b/mode/stone.js @@ -97,6 +97,7 @@ mode.stone={ var dead=this; if(game.me.isDead()){ if(!_status.mylist.length){ + _status.friendCount.innerHTML='我方兵力:'+get.cnNumber(0); game.over(false); } else{ @@ -123,12 +124,14 @@ mode.stone={ game.arrangePlayers(); player.draw(2+game.enemy.countFellow(),false); game.resume(); + game.updateStatusCount(); },lib.config.duration); } } else if(game.enemy.isDead()){ if(!_status.enemylist.length){ + _status.enemyCount.innerHTML='敌方兵力:'+get.cnNumber(0); game.over(true); } else{ @@ -154,6 +157,7 @@ mode.stone={ game.arrangePlayers(); player.draw(2+game.me.countFellow(),false); game.resume(); + game.updateStatusCount(); },lib.config.duration); } } @@ -176,6 +180,10 @@ mode.stone={ game:{ reserveDead:true, layoutFixed:true, + updateStatusCount:function(){ + _status.friendCount.innerHTML='我方兵力:'+get.cnNumber(1+_status.mylist.length/(_status.double_character?2:1),true); + _status.enemyCount.innerHTML='敌方兵力:'+get.cnNumber(1+_status.enemylist.length/(_status.double_character?2:1),true); + }, stoneLoop:function(player){ var next=game.createEvent('phaseLoop'); next.player=player; @@ -284,6 +292,36 @@ mode.stone={ game.enemy=game.me.next; game.chooseCharacter(); "step 2" + _status.friendCount=ui.create.system('',null,true); + _status.enemyCount=ui.create.system('',null,true); + game.updateStatusCount(); + lib.setPopped(_status.friendCount,function(){ + var uiintro=ui.create.dialog('hidden'); + + if(_status.deadfriend.length){ + uiintro.add('已阵亡'); + uiintro.add([_status.deadfriend,'player']); + } + + uiintro.add('未上场'); + if(_status.mylist.length){ + uiintro.add([_status.mylist,'character']); + } + else{ + uiintro.add('(无)') + } + + return uiintro; + }); + lib.setPopped(_status.enemyCount,function(){ + if(_status.deadenemy.length){ + var uiintro=ui.create.dialog('hidden'); + uiintro.add('已阵亡'); + uiintro.add([_status.deadenemy,'player']); + return uiintro; + } + }); + game.me.side=Math.random()<0.5; game.enemy.side=!game.me.side; game.gameDraw(game.me,2);