This commit is contained in:
libccy 2017-05-10 14:40:14 +08:00
parent f445b3f2d6
commit 431dbb20d7
3 changed files with 105 additions and 21 deletions

View File

@ -1005,23 +1005,29 @@ game.import('card',function(lib,game,ui,get,ai,_status){
}, },
result:{ result:{
target:function(player,target){ target:function(player,target){
var es=target.getCards('e'); var att=get.attitude(player,target);
var nh=target.countCards('h'); var nh=target.countCards('h');
var noe=(es.length==0||target.hasSkillTag('noe')); if(att>0){
var noe2=(es.length==1&&es[0].name=='baiyin'&&target.hp<target.maxHp); var js=target.getCards('j');
var noh=(nh==0||target.hasSkillTag('noh')); if(js.length){
if(noh&&noe) return 0; var jj=js[0].viewAs?{name:js[0].viewAs}:js[0];
if(noh&&noe2) return 0.01; if(jj.name=='guohe'||js.length>1||get.effect(target,jj,target,player)<0){
if(get.attitude(player,target)<=0) return (target.countCards('he'))?-1.5:1.5; return 2;
var js=target.getCards('j'); }
if(js.length){ }
var jj=js[0].viewAs?{name:js[0].viewAs}:js[0]; if(target.getEquip('baiyin')&&target.isDamaged()&&
if(jj.name=='guohe') return 3; ai.get.recoverEffect(target,player,player)>0){
if(js.length==1&&get.effect(target,jj,target,player)>=0){ if(target.hp==1&&!target.hujia) return 1.6;
return -1.5; if(target.hp==2) return 0.01;
return 0;
} }
return 2;
} }
var es=target.getCards('e');
var noe=(es.length==0||target.hasSkillTag('noe'));
var noe2=(es.length==1&&es[0].name=='baiyin'&&target.isDamaged());
var noh=(nh==0||target.hasSkillTag('noh'));
if(noh&&(noe||noe2)) return 0;
if(att<=0&&!target.countCards('he')) return 1.5;
return -1.5; return -1.5;
}, },
}, },

View File

@ -2115,7 +2115,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
lianjin:{ lianjin:{
enable:'phaseUse', enable:'phaseUse',
usable:2, usable:1,
filterCard:function(card){ filterCard:function(card){
return get.type(card)!='hsyaoshui'; return get.type(card)!='hsyaoshui';
}, },
@ -2269,6 +2269,34 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
threaten:1.4 threaten:1.4
}, },
group:'lianjin_discard',
subSkill:{
discard:{
trigger:{player:'discardAfter'},
forced:true,
filter:function(event){
for(var i=0;i<event.cards.length;i++){
if(get.type(event.cards[i])=='hsyaoshui') return true;
}
return false;
},
content:function(){
var list=[],cards=[];
for(var i=0;i<trigger.cards.length;i++){
if(get.type(trigger.cards[i])=='hsyaoshui'){
list.push(trigger.cards[i]);
}
}
for(var i=0;i<list.length;i++){
var names=get.info(list[i]).names;
if(names){
cards.push(game.createCard(names.randomGet()));
}
}
player.gain(cards,'draw2','log');
}
}
}
}, },
shouji:{ shouji:{
group:['shouji_begin','shouji_miss'], group:['shouji_begin','shouji_miss'],
@ -7658,7 +7686,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
qingzun_info:'本局对战中,每当你使用一张青玉牌,你的手牌上限+1当你累计使用两张青玉牌后你可以于准备阶段摸一张牌当你累计使用六张青玉牌后你可以于结束阶段摸一张牌', qingzun_info:'本局对战中,每当你使用一张青玉牌,你的手牌上限+1当你累计使用两张青玉牌后你可以于准备阶段摸一张牌当你累计使用六张青玉牌后你可以于结束阶段摸一张牌',
qingzun_info_alter:'本局对战中,每当你使用一张青玉牌,你的手牌上限+1当你累计使用三张青玉牌后你可以于准备阶段摸一张牌当你累计使用九张青玉牌后你可以于结束阶段摸一张牌', qingzun_info_alter:'本局对战中,每当你使用一张青玉牌,你的手牌上限+1当你累计使用三张青玉牌后你可以于准备阶段摸一张牌当你累计使用九张青玉牌后你可以于结束阶段摸一张牌',
lianjin:'炼金', lianjin:'炼金',
lianjin_info:'出牌阶段限次,你可以将一张手牌永久转化为一张由三张随机牌组成的药水', lianjin_info:'出牌阶段限次,你可以将一张手牌永久转化为一张由三张随机牌组成的药水;当你因弃置而失去药水牌时,你随机获得药水的组成卡牌之一',
shouji:'收集', shouji:'收集',
shouji_info:'每当你使用一张杀,你可以获得一张目标随机手牌的复制;每当你的杀被闪避,你可以获得一张目标随机非特殊装备牌的复制;每回合限各限一次', shouji_info:'每当你使用一张杀,你可以获得一张目标随机手牌的复制;每当你的杀被闪避,你可以获得一张目标随机非特殊装备牌的复制;每回合限各限一次',
guimou:'鬼谋', guimou:'鬼谋',

View File

@ -352,6 +352,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
if(player.identityShown) return; if(player.identityShown) return;
if(player==game.me) return; if(player==game.me) return;
if(_status.mode=='zhong'){ if(_status.mode=='zhong'){
if(player.fanfixed) return;
if(game.zhu&&game.zhu.isZhu){ if(game.zhu&&game.zhu.isZhu){
return { return {
fan:'反', fan:'反',
@ -1864,14 +1865,41 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
trigger:{player:'phaseBegin'}, trigger:{player:'phaseBegin'},
direct:true, direct:true,
unique:true, unique:true,
filter:function(event,player){
return game.hasPlayer(function(current){
return current.countCards('ej');
});
},
forceunique:true, forceunique:true,
content:function(){ content:function(){
'step 0' 'step 0'
player.chooseTarget(get.prompt('dongcha'),function(card,player,target){ player.chooseTarget(get.prompt('dongcha'),function(card,player,target){
return target.countCards('hej')>0; return target.countCards('ej')>0;
}).set('ai',function(target){ }).set('ai',function(target){
var player=_status.event.player; var player=_status.event.player;
return get.attitude(player,target)*lib.card.guohe.ai.result.target(player,target); var att=get.attitude(player,target);
if(att>0){
var js=target.getCards('j');
if(js.length){
var jj=js[0].viewAs?{name:js[0].viewAs}:js[0];
if(jj.name=='guohe'||js.length>1||get.effect(target,jj,target,player)<0){
return 2*att;
}
}
if(target.getEquip('baiyin')&&target.isDamaged()&&
ai.get.recoverEffect(target,player,player)>0){
if(target.hp==1&&!target.hujia) return 1.6*att;
if(target.hp==2) return 0.01*att;
return 0;
}
}
var es=target.getCards('e');
var noe=target.hasSkillTag('noe');
var noe2=(es.length==1&&es[0].name=='baiyin'&&target.isDamaged());
if(noe||noe2) return 0;
if(att<=0&&!es.length) return 1.5*att;
return -1.5*att;
}); });
'step 1' 'step 1'
if(result.bool){ if(result.bool){
@ -1885,10 +1913,10 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
} }
'step 2' 'step 2'
if(event.target){ if(event.target){
player.discardPlayerCard('hej',true,event.target); player.discardPlayerCard('ej',true,event.target);
} }
}, },
group:'dongcha_begin', group:['dongcha_begin','dongcha_log'],
subSkill:{ subSkill:{
begin:{ begin:{
trigger:{global:'gameStart'}, trigger:{global:'gameStart'},
@ -1903,7 +1931,29 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
} }
var target=list.randomGet(); var target=list.randomGet();
player.storage.dongcha=target; player.storage.dongcha=target;
player.chooseControl('ok').set('dialog',[get.translation(target)+'是反贼',[[target.name],'character']]); if(!_status.connectMode){
if(player==game.me){
target.setIdentity('fan');
target.node.identity.classList.remove('guessing');
target.fanfixed=true;
player.line(target,'green');
player.popup('dongcha');
}
}
else{
player.chooseControl('ok').set('dialog',[get.translation(target)+'是反贼',[[target.name],'character']]);
}
}
},
log:{
trigger:{player:'useCard'},
forced:true,
popup:false,
filter:function(event,player){
return event.targets.length==1&&event.targets[0]==player.storage.dongcha&&event.targets[0].ai.shown<0.95;
},
content:function(){
trigger.targets[0].addExpose(0.2);
} }
} }
} }