This commit is contained in:
libccy 2017-05-27 18:54:17 +08:00
parent 1823f41e16
commit ee2495c30b
3 changed files with 50 additions and 17 deletions

View File

@ -270,7 +270,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
useful:[6,1], useful:[6,1],
result:{ result:{
player:function(player){ player:function(player){
return game.countPlayer(function(current){ return 1+game.countPlayer(function(current){
if(current!=player&&current.isMaxHandcard()){ if(current!=player&&current.isMaxHandcard()){
return -get.sgn(get.attitude(player,current)); return -get.sgn(get.attitude(player,current));
} }

View File

@ -6940,8 +6940,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
init:function(player){ init:function(player){
player.storage.xiansi=[]; player.storage.xiansi=[];
}, },
unique:true,
forceunique:true,
content:function(){ content:function(){
"step 0" "step 0"
player.chooseTarget(get.prompt('xiansi'),[1,2],function(card,player,target){ player.chooseTarget(get.prompt('xiansi'),[1,2],function(card,player,target){
@ -7006,23 +7004,56 @@ game.import('character',function(lib,game,ui,get,ai,_status){
} }
return false; return false;
}, },
direct:true,
delay:0,
content:function(){ content:function(){
"step 0" "step 0"
event.target=game.findPlayer(function(current){ var targets=game.filterPlayer(function(current){
return current.storage.xiansi; if(current.storage.xiansi){
}); return current.storage.xiansi.length>1&&player.canUse('sha',current,true,true);
}
return false;
});
if(targets.length==1){
event.target=targets[0];
event.goto(2);
}
else if(targets.length>0){
player.chooseTarget(true,'选择陷嗣的目标',function(card,player,target){
return _status.event.list.contains(target);
}).set('list',targets).set('ai',function(target){
var player=_status.event.player;
return get.effect(target,{name:'sha'},player,player);
});
}
else{
event.finish();
}
"step 1"
if(result.bool&&result.targets.length){
event.target=result.targets[0];
}
else{
event.finish();
}
"step 2"
if(event.target){ if(event.target){
player.chooseCardButton(2,event.target.storage.xiansi).set('ai',function(){ if(event.target.storage.xiansi.length==2){
return 1; event.directresult=event.target.storage.xiansi.slice(0);
}); }
else{
player.chooseCardButton('移去两张“逆”',2,event.target.storage.xiansi,true);
}
} }
else{ else{
event.finish(); event.finish();
} }
"step 1" "step 3"
if(result.bool){ if(event.directresult||result.bool){
for(var i=0;i<result.links.length;i++){ player.logSkill('xiansi2');
event.target.storage.xiansi.remove(result.links[i]); var links=event.directresult||result.links;
for(var i=0;i<links.length;i++){
event.target.storage.xiansi.remove(links[i]);
} }
event.target.syncStorage('xiansi'); event.target.syncStorage('xiansi');
if(!event.target.storage.xiansi.length){ if(!event.target.storage.xiansi.length){
@ -7031,9 +7062,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
else{ else{
event.target.markSkill('xiansi'); event.target.markSkill('xiansi');
} }
event.target.$throw(result.links); event.target.$throw(links);
for(var i=0;i<result.links.length;i++){ game.log(event.target,'被移去了',links);
ui.discardPile.appendChild(result.links[i]); for(var i=0;i<links.length;i++){
ui.discardPile.appendChild(links[i]);
} }
player.useCard({name:'sha'},event.target); player.useCard({name:'sha'},event.target);
} }

View File

@ -16,6 +16,7 @@ window.noname_update={
'card/gwent.js', 'card/gwent.js',
// 'character/*', // 'character/*',
'character/sp.js', 'character/sp.js',
'character/yijiang.js',
// 'mode/boss.js', // 'mode/boss.js',
'mode/guozhan.js', 'mode/guozhan.js',
'mode/versus.js', 'mode/versus.js',