This commit is contained in:
libccy 2016-07-15 11:49:51 +08:00
parent c5e64ef1a0
commit a0f8a77ef2
4 changed files with 26 additions and 5 deletions

View File

@ -825,13 +825,23 @@ character.shenhua={
} }
}, },
check:function(event,player){ check:function(event,player){
if(ai.get.attitude(player,event.player)>0) return true; var du=false;
var num=0; var num=0;
for(var i=0;i<event.cards.length;i++){ for(var i=0;i<event.cards.length;i++){
if(get.position(event.cards[i])=='d'){ if(get.position(event.cards[i])=='d'){
num++; num++;
if(event.cards[i].name=='du'){
du=true;
} }
} }
}
if(ai.get.attitude(player,event.player)>0){
if(du&&num<=3){
return false;
}
return true;
}
if(du) return true;
return num>2; return num>2;
}, },
direct:true, direct:true,
@ -849,7 +859,13 @@ character.shenhua={
event.finish(); event.finish();
return; return;
} }
player.chooseCardButton(event.cards,'固政:选择令'+get.translation(trigger.player)+'收回的牌'); var check=lib.skill.guzheng.check(trigger,player);
player.chooseCardButton(event.cards,'固政:选择令'+get.translation(trigger.player)+'收回的牌').set('ai',function(button){
if(_status.event.check){
return 20-ai.get.value(button.link);
}
return 0;
}).set('check',check);
"step 2" "step 2"
if(result.bool){ if(result.bool){
player.logSkill('guzheng',trigger.player); player.logSkill('guzheng',trigger.player);

View File

@ -4567,6 +4567,9 @@ character.yijiang={
init:function(player){ init:function(player){
player.storage.quanji=[]; player.storage.quanji=[];
}, },
filter:function(event){
return event.num>0;
},
content:function(){ content:function(){
"step 0" "step 0"
player.draw(trigger.num); player.draw(trigger.num);

View File

@ -7032,13 +7032,13 @@
if(!_status.connectMode&&player==game.me&&!_status.over&&!game.controlOver){ if(!_status.connectMode&&player==game.me&&!_status.over&&!game.controlOver){
ui.control.show(); ui.control.show();
if(get.config('revive')&&lib.mode[lib.config.mode].config.revive){ if(get.config('revive')&&lib.mode[lib.config.mode].config.revive&&!ui.revive){
ui.revive=ui.create.control('revive',ui.click.dierevive); ui.revive=ui.create.control('revive',ui.click.dierevive);
} }
if(get.config('continue_game')&&lib.mode[lib.config.mode].config.continue_game){ if(get.config('continue_game')&&!ui.continue_game&&lib.mode[lib.config.mode].config.continue_game){
ui.continue_game=ui.create.control('再战',game.reloadCurrent); ui.continue_game=ui.create.control('再战',game.reloadCurrent);
} }
if(get.config('dierestart')&&lib.mode[lib.config.mode].config.dierestart){ if(get.config('dierestart')&&lib.mode[lib.config.mode].config.dierestart&&!ui.restart){
ui.restart=ui.create.control('restart',game.reload); ui.restart=ui.create.control('restart',game.reload);
} }
} }

View File

@ -8,6 +8,8 @@ window.noname_update={
'game/game.js', 'game/game.js',
'card/sp.js', 'card/sp.js',
'card/swd.js', 'card/swd.js',
'character/yijiang.js',
'character/shenhua.js',
'mode/connect.js', 'mode/connect.js',
'extension/coin/extension.js', 'extension/coin/extension.js',
'layout/phone/layout.css', 'layout/phone/layout.css',