This commit is contained in:
parent
1173ea8525
commit
954e686348
|
@ -1544,8 +1544,11 @@ character.ow={
|
|||
effect:{
|
||||
target:function(card,player,target){
|
||||
if(!target.hasFriend()) return;
|
||||
if(get.tag(card,'damage')==1&&target.hp==2&&target.num('he')&&!target.isTurnedOver()&&
|
||||
_status.currentPhase!=target&&get.distance(_status.currentPhase,target,'absolute')<=3) return [0.5,1];
|
||||
if(get.tag(card,'damage')==1&&target.hp==2&&target.num('he')&&
|
||||
!target.isTurnedOver()&&_status.currentPhase!=target){
|
||||
if(get.distance(_status.currentPhase,target,'absolute')<=2) return [0.5,1];
|
||||
return 0.8;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -456,7 +456,7 @@ character.standard={
|
|||
skillTagFilter:function(player){
|
||||
if(!player.num('h',{color:'black'})) return false;
|
||||
},
|
||||
result:{
|
||||
effect:{
|
||||
target:function(card,player,target,current){
|
||||
if(get.tag(card,'respondShan')&¤t<0) return 0.6
|
||||
}
|
||||
|
|
|
@ -1441,7 +1441,7 @@ character.yijiang={
|
|||
skillTagFilter:function(player){
|
||||
if(!player.num('h',{color:'red'})) return false;
|
||||
},
|
||||
result:{
|
||||
effect:{
|
||||
target:function(card,player,target,current){
|
||||
if(get.tag(card,'respondShan')&¤t<0) return 0.8
|
||||
}
|
||||
|
@ -2686,27 +2686,16 @@ character.yijiang={
|
|||
if(player.storage.zhanjue>=2) return false;
|
||||
return true;
|
||||
},
|
||||
prepare:function(cards,player,targets){
|
||||
player.$throw(cards);
|
||||
player.line(targets);
|
||||
},
|
||||
discard:false,
|
||||
filterTarget:function(card,player,target){
|
||||
return player.canUse('juedou',target);
|
||||
},
|
||||
content:function(){
|
||||
targets.sort(lib.sort.seat);
|
||||
player.useCard({name:'juedou'},cards,targets,'zhanjue').animate=false;
|
||||
},
|
||||
group:['zhanjue2','zhanjue3'],
|
||||
viewAs:{name:'juedou'},
|
||||
group:['zhanjue2','zhanjue3','zhanjue4'],
|
||||
ai:{
|
||||
order:1,
|
||||
result:{
|
||||
target:function(player,target){
|
||||
if(player.num('h')>3) return 0;
|
||||
if(target.num('h','sha')) return 0;
|
||||
if(player.num('h')>=3||target.num('h')>=3) return 0;
|
||||
if(player.num('h','tao')) return 0;
|
||||
return ai.get.effect(target,{name:'juedou'},player,target);
|
||||
if(target.num('h','sha')>1) return 0;
|
||||
return -1.5;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2730,9 +2719,25 @@ character.yijiang={
|
|||
return event.parent.skill=='zhanjue';
|
||||
},
|
||||
content:function(){
|
||||
if(player==trigger.source){
|
||||
if(trigger.player.isAlive()){
|
||||
game.asyncDraw([player,trigger.player]);
|
||||
player.storage.zhanjue2=trigger.player;
|
||||
}
|
||||
},
|
||||
zhanjue4:{
|
||||
audio:false,
|
||||
trigger:{player:'juedouAfter'},
|
||||
forced:true,
|
||||
popup:false,
|
||||
filter:function(event,player){
|
||||
return event.skill=='zhanjue';
|
||||
},
|
||||
content:function(){
|
||||
if(player.storage.zhanjue2==player){
|
||||
player.draw(2);
|
||||
player.storage.zhanjue+=2;
|
||||
}
|
||||
else if(player.storage.zhanjue2){
|
||||
if(player.storage.zhanjue2.isAlive()){
|
||||
game.asyncDraw([player,player.storage.zhanjue2]);
|
||||
}
|
||||
else{
|
||||
player.draw();
|
||||
|
@ -2740,9 +2745,10 @@ character.yijiang={
|
|||
player.storage.zhanjue++;
|
||||
}
|
||||
else{
|
||||
player.draw(2);
|
||||
player.storage.zhanjue+=2;
|
||||
player.draw();
|
||||
player.storage.zhanjue++;
|
||||
}
|
||||
delete player.storage.zhanjue2;
|
||||
}
|
||||
},
|
||||
qinwang:{
|
||||
|
|
|
@ -661,7 +661,7 @@ character.yxs={
|
|||
if(!player.num('h')) return false;
|
||||
if(player.num('e')) return false;
|
||||
},
|
||||
result:{
|
||||
effect:{
|
||||
target:function(card,player,target,current){
|
||||
if(get.tag(card,'respondShan')&¤t<0&&!target.num('e')) return 0.6
|
||||
}
|
||||
|
|
33
game/game.js
33
game/game.js
|
@ -32973,7 +32973,7 @@
|
|||
if(!from||!to) return 0;
|
||||
var att=ai.get.rawAttitude.apply(this,arguments);
|
||||
if(from.isMad()) return -att;
|
||||
if(to.isMad()) return 0;
|
||||
if(to.isMad()&&att>0) return 0;
|
||||
return att;
|
||||
},
|
||||
useful:function(card){
|
||||
|
@ -33072,21 +33072,38 @@
|
|||
}
|
||||
return order;
|
||||
},
|
||||
result:function(item){
|
||||
result:function(item,skill){
|
||||
var result;
|
||||
if(get.info(item).ai) result=get.info(item).ai.result;
|
||||
if(result==undefined) return {};
|
||||
if(typeof(result)=='function') return result(item);
|
||||
var info=get.info(item);
|
||||
if(info.ai) result=info.ai.result;
|
||||
if(typeof(result)=='function') result=result(item);
|
||||
if(!result) result={};
|
||||
if(skill){
|
||||
var info2=get.info(skill);
|
||||
if(info2.ai){
|
||||
info2=info2.ai.result;
|
||||
for(var i in info2){
|
||||
result[i]=info2[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
},
|
||||
effect:function(target,card,player,player2){
|
||||
var event=_status.event;
|
||||
var eventskill=null;
|
||||
if(player==undefined) player=_status.event.player;
|
||||
if(typeof card!='string'&&(typeof card!='object'||!card.name)){
|
||||
if(event.skill&&get.info(event.skill).viewAs==undefined) card=_status.event.skill;
|
||||
else card=get.card();
|
||||
var skillinfo=get.info(event.skill);
|
||||
if(event.skill&&skillinfo.viewAs==undefined) card=_status.event.skill;
|
||||
else{
|
||||
card=get.card();
|
||||
if(skillinfo&&card===skillinfo.viewAs){
|
||||
eventskill=event.skill;
|
||||
}
|
||||
var result=ai.get.result(card);
|
||||
}
|
||||
}
|
||||
var result=ai.get.result(card,eventskill);
|
||||
var result1=result.player,result2=result.target;
|
||||
if(typeof result1=='function') result1=result1(player,target,card);
|
||||
if(typeof result2=='function') result2=result2(player,target,card);
|
||||
|
|
|
@ -40,6 +40,9 @@ window.noname_update={
|
|||
// 'character/sp.js',
|
||||
// 'character/swd.js',
|
||||
// 'character/rank.js',
|
||||
// 'character/standard.js',
|
||||
// 'character/yijiang.js',
|
||||
// 'character/yxs.js',
|
||||
// 'card/swd.js',
|
||||
// 'card/hearth.js',
|
||||
// 'mode/boss.js',
|
||||
|
@ -48,3 +51,4 @@ window.noname_update={
|
|||
// 'mode/identity.js',
|
||||
// 'mode/stone.js',
|
||||
// 'mode/versus.js',
|
||||
// 'game/game.js',
|
||||
|
|
Loading…
Reference in New Issue