commit
21425e6948
|
@ -3304,14 +3304,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
dddduanbing:{
|
||||
enable:'phaseUse',
|
||||
filter:function(event,player){
|
||||
return player.canAddJudge('bingliang')&&player.hasCard((card)=>lib.skill['dddduanbing'].filterCard(card,player),'h');
|
||||
return player.canAddJudge('bingliang')&&player.hasCard((card)=>lib.skill['dddduanbing'].filterCard(card,player),'he');
|
||||
},
|
||||
filterCard:function(card,player){
|
||||
if(get.color(card)!='black'||get.type2(card)=='trick') return false;
|
||||
return player.canAddJudge(get.autoViewAs({name:'bingliang'},[card]));
|
||||
},
|
||||
check:function(card){
|
||||
return 6-get.value(card);
|
||||
return 8.2-get.value(card);
|
||||
},
|
||||
discard:false,
|
||||
lose:false,
|
||||
|
|
|
@ -6398,6 +6398,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
trigger.directHit.push(trigger.target);
|
||||
}
|
||||
},
|
||||
ai:{
|
||||
effect:{
|
||||
player:function(card,player,target){
|
||||
if(player!==target&&get.itemtype(target)==='player'&&(card.name==='sha'||get.type(card,false)==='trick')&&
|
||||
target.countCards('he')&&!target.hasSkillTag('noh')) return [1,0,1,-1];
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
|
@ -944,6 +944,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
content:function(){
|
||||
trigger.cancel();
|
||||
},
|
||||
ai:{
|
||||
effect:{
|
||||
target:function(card,player,target){
|
||||
if(card.name==='sha'&&!game.hasNature(card)&&target.hasEmptySlot(2)) return 'zeroplayertarget';
|
||||
if(get.subtype(card)=='equip2'&&target.isEmpty(2)) return [0.6,-0.8];
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
//战役篇蒋钦
|
||||
|
|
|
@ -3804,6 +3804,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
audio:2,
|
||||
preHidden:true,
|
||||
audioname:['sp_lvmeng','re_sunben','re_sunce'],
|
||||
mod:{
|
||||
aiOrder:function(player,card,num){
|
||||
if(get.color(card)==='red'&&get.name(card)==='sha') return get.order({name: 'sha'})+0.15;
|
||||
}
|
||||
},
|
||||
trigger:{
|
||||
player:'useCardToPlayered',
|
||||
target:'useCardToTargeted',
|
||||
|
@ -3812,6 +3817,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(!(event.card.name=='juedou'||(event.card.name=='sha'&&get.color(event.card)=='red'))) return false;
|
||||
return player==event.target||event.getParent().triggeredTargets3.length==1;
|
||||
},
|
||||
locked:false,
|
||||
frequent:true,
|
||||
content:function(){
|
||||
player.draw();
|
||||
|
@ -4872,9 +4878,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
preHidden:true,
|
||||
check:function(event,player){
|
||||
if(player.countCards('h')<=1) return true;
|
||||
return game.hasPlayer(function(current){
|
||||
return current!=player&¤t.isMinHandcard()&&get.attitude(player,current)>0;
|
||||
return (player.countCards('h')+2+event.num)<=5||game.hasPlayer(function(target){
|
||||
return player!==target&&!game.hasPlayer(function(current){
|
||||
return current!==player&¤t!==target&¤t.countCards('h')<target.countCards('h');
|
||||
})&&get.attitude(player,target)>0;
|
||||
});
|
||||
},
|
||||
content:function(){
|
||||
|
@ -6276,30 +6283,33 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
useShan:true,
|
||||
effect:{
|
||||
target:function(card,player,target,current){
|
||||
if(get.tag(card,'respondShan')){
|
||||
var hastarget=game.hasPlayer(function(current){
|
||||
return get.attitude(target,current)<0;
|
||||
});
|
||||
var be=target.countCards('e',{color:'black'});
|
||||
if(target.countCards('h','shan')&&be){
|
||||
if(!target.hasSkill('guidao')) return 0;
|
||||
return [0,hastarget?target.countCards('he')/2:0];
|
||||
if(get.tag(card,'respondShan')&&!player.hasSkillTag('directHit_ai',true,{
|
||||
target: target,
|
||||
card: card
|
||||
},true)){
|
||||
let club=0,spade=0;
|
||||
if(game.hasPlayer(function(current){
|
||||
return get.attitude(target,current)<0&&get.damageEffect(current,target,target,'thunder')>0;
|
||||
})){
|
||||
club=2;
|
||||
spade=4;
|
||||
}
|
||||
if(target.countCards('h','shan')&&target.countCards('h')>2){
|
||||
if(!target.hasSkill('guidao')) return 0;
|
||||
return [0,hastarget?target.countCards('h')/4:0];
|
||||
if(!target.isHealthy()) club+=2;
|
||||
if(!club&&!spade) return 1;
|
||||
if(!target.mayHaveShan(player)) return 1-0.1*Math.min(5,target.countCards('hs'));
|
||||
if(!target.hasSkillTag('rejudge')) return [1,(club+spade)/4];
|
||||
let pos=player.hasSkillTag('viewHandcard',null,target,true)?'hes':'e',better=club>spade?'club':'spade',max=0;
|
||||
target.hasCard(function(cardx){
|
||||
if(get.suit(cardx)===better){
|
||||
max=2;
|
||||
return true;
|
||||
}
|
||||
if(target.countCards('h')>3||(be&&target.countCards('h')>=2)){
|
||||
return [0,0];
|
||||
}
|
||||
if(target.countCards('h')==0){
|
||||
return [1.5,0];
|
||||
}
|
||||
if(target.countCards('h')==1&&!be){
|
||||
return [1.2,0];
|
||||
}
|
||||
if(!target.hasSkill('guidao')) return [1,0.05];
|
||||
return [1,Math.min(0.5,(target.countCards('h')+be)/4)];
|
||||
if(spade&&get.color(cardx)==='black') max=1;
|
||||
},pos);
|
||||
if(max===2) return [1,Math.max(club,spade)];
|
||||
if(max===1) return [1,Math.min(club,spade)];
|
||||
if(pos==='e') return [1,Math.min(Math.max(1,target.countCards('hs'))*(club+spade)/4,Math.max(club,spade))];
|
||||
return [1,(club+spade)/4];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -7259,17 +7269,20 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
useShan:true,
|
||||
effect:{
|
||||
target:function(card,player,target,current){
|
||||
if(get.tag(card,'respondShan')){
|
||||
var hastarget=game.hasPlayer(function(current){
|
||||
return get.attitude(target,current)<0;
|
||||
});
|
||||
if(target.countCards('h','shan')&&target.countCards('e',{suit:'spade'})){
|
||||
return [0,hastarget?target.countCards('he')/2:0];
|
||||
}
|
||||
if(target.countCards('h','shan')){
|
||||
return [1,hastarget?target.countCards('he')/2:0];
|
||||
}
|
||||
return [1,target.countCards('h')/4];
|
||||
if(get.tag(card,'respondShan')&&!player.hasSkillTag('directHit_ai',true,{
|
||||
target: target,
|
||||
card: card
|
||||
},true)&&game.hasPlayer(function(current){
|
||||
return get.attitude(target,current)<0&&get.damageEffect(current,target,target,'thunder')>0;
|
||||
})){
|
||||
if(!target.mayHaveShan(player)) return 1-0.1*Math.min(5,target.countCards('hs'));
|
||||
if(!target.hasSkillTag('rejudge')) return [1,1];
|
||||
let pos=player.hasSkillTag('viewHandcard',null,target,true)?'hes':'e';
|
||||
if(target.hasCard(function(cardx){
|
||||
return get.suit(cardx)==='spade';
|
||||
},pos)) return [1,4];
|
||||
if(pos==='e') return [1,Math.min(4,1+0.75*Math.max(1,target.countCards('hs')))];
|
||||
return [1,1];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10553,6 +10553,22 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
content:function(){
|
||||
player.draw(2+get.sgn(trigger.player.hp-player.hp));
|
||||
},
|
||||
ai:{
|
||||
effect:{
|
||||
target:function(card,player,target){
|
||||
if(get.itemtype(player)!=='player'||player===target) return 1;
|
||||
let num=1,ds=2+get.sgn(player.hp-target.hp);
|
||||
if(player===_status.currentPhase&&_status.currentPhase.group==='qun'&&target.hasZhuSkill('yuwei',player)) num=2;
|
||||
if(target.getHistory('gain',function(evt){
|
||||
return evt.getParent(2).name==='shiyuan'&&evt.cards.length===ds;
|
||||
}).length>=num) return 1;
|
||||
let name=get.name(card);
|
||||
if(get.tag(card,'lose')||name==='huogong'||name==='juedou'||name==='tiesuo') return [1,ds];
|
||||
if(!target.hasFriend()) return 1;
|
||||
return [1,0.8*ds];
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
dushi:{
|
||||
audio:2,
|
||||
|
|
|
@ -10583,6 +10583,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
content:function(){
|
||||
"step 0"
|
||||
if(get.mode()!=='identity'||player.identity!=='nei') player.addExpose(0.2);
|
||||
player.draw(2);
|
||||
"step 1"
|
||||
player.chooseCard(2,'he',true,'交给'+get.translation(trigger.player)+'两张牌').set('ai',function(card){
|
||||
|
@ -10597,8 +10598,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
trigger.player.storage.xiantu4.push(player);
|
||||
},
|
||||
ai:{
|
||||
threaten:1.1,
|
||||
expose:0.3
|
||||
threaten:1.1
|
||||
}
|
||||
},
|
||||
xiantu1:{audio:true},
|
||||
|
|
|
@ -2592,10 +2592,21 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
return player!=event.player&&event.num<event.player.hp;
|
||||
},
|
||||
check:function(event,player){
|
||||
if(get.attitude(player,event.player)>-2) return false;
|
||||
if(player.hp>2) return true;
|
||||
if(player.hp==2&&event.player.hp<3) return false;
|
||||
return player.hp>1;
|
||||
if(event.player.hasSkillTag('nodamage')) return false;
|
||||
let tj = player.countCards('hs', function (card) {
|
||||
return get.name(card) === 'tao' || get.name(card) === 'jiu';
|
||||
}),
|
||||
att = get.attitude(_status.event.player, event.player),
|
||||
eff = get.damageEffect(event.player, player, _status.event.player, event.nature),
|
||||
fd = event.player.hasSkillTag('filterDamage', null, {
|
||||
player: player,
|
||||
card: event.card
|
||||
}),
|
||||
hp = player.hp + tj;
|
||||
if(player.storage.tairan2) hp -= player.storage.tairan2;
|
||||
if(eff <= 0 || fd || att >= -2 || Math.abs(hp) <= 1) return false;
|
||||
if(hp > 2 || event.player.isLinked() && event.nature && eff > 0) return true;
|
||||
return !event.player.countCards('hs') || event.player.hp > 2 * event.num && !event.player.hasSkillTag('maixie');
|
||||
},
|
||||
logTarget:'player',
|
||||
content:function(){
|
||||
|
@ -2604,6 +2615,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
trigger.yimie_num=trigger.player.hp-trigger.num;
|
||||
trigger.num=trigger.player.hp;
|
||||
},
|
||||
ai:{
|
||||
damageBonus:true,
|
||||
skillTagFilter:function(player,tag,arg){
|
||||
return arg && arg.target && arg.target.hp > 1 && player.hp > 1 && get.attitude(player, arg.target) < -2;
|
||||
}
|
||||
}
|
||||
},
|
||||
yimie2:{
|
||||
trigger:{player:'damageEnd'},
|
||||
|
|
Loading…
Reference in New Issue