autophase
This commit is contained in:
parent
dfbd65b274
commit
73d6637c05
|
@ -763,9 +763,6 @@ character.gujian={
|
||||||
},
|
},
|
||||||
fumo:{
|
fumo:{
|
||||||
trigger:{player:'damageAfter'},
|
trigger:{player:'damageAfter'},
|
||||||
check:function(event,player){
|
|
||||||
return event.source&&ai.get.attitude(player,event.source)<0;
|
|
||||||
},
|
|
||||||
filter:function(event,player){
|
filter:function(event,player){
|
||||||
return event.source&&event.source.isAlive()&&player.countCards('h',{color:'red'})>1||player.countCards('h',{color:'black'})>1;
|
return event.source&&event.source.isAlive()&&player.countCards('h',{color:'red'})>1||player.countCards('h',{color:'black'})>1;
|
||||||
},
|
},
|
||||||
|
@ -773,6 +770,7 @@ character.gujian={
|
||||||
content:function(){
|
content:function(){
|
||||||
"step 0"
|
"step 0"
|
||||||
var next=player.chooseToDiscard(get.prompt('fumo',trigger.source),2,function(card){
|
var next=player.chooseToDiscard(get.prompt('fumo',trigger.source),2,function(card){
|
||||||
|
if(ai.get.damageEffect(trigger.source,player,player,'thunder')<=0) return 0;
|
||||||
if(ui.selected.cards.length){
|
if(ui.selected.cards.length){
|
||||||
return get.color(card)==get.color(ui.selected.cards[0]);
|
return get.color(card)==get.color(ui.selected.cards[0]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -855,14 +855,14 @@ character.refresh={
|
||||||
content:function(){
|
content:function(){
|
||||||
"step 0"
|
"step 0"
|
||||||
if(get.itemtype(trigger.cards)=='cards'&&get.position(trigger.cards[0])=='d'){
|
if(get.itemtype(trigger.cards)=='cards'&&get.position(trigger.cards[0])=='d'){
|
||||||
player.chooseControl('rejianxiong_mopai','rejianxiong_napai','cancel2').ai=function(){
|
player.chooseControl('rejianxiong_mopai','rejianxiong_napai','cancel2').set('prompt',get.prompt('rejianxiong')).ai=function(){
|
||||||
var trigger=_status.event.getTrigger();
|
var trigger=_status.event.getTrigger();
|
||||||
if(trigger.cards.length==1&&trigger.cards[0].name=='sha') return 0;
|
if(trigger.cards.length==1&&trigger.cards[0].name=='sha') return 0;
|
||||||
return 1;
|
return 1;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
player.chooseControl('rejianxiong_mopai','cancel2');
|
player.chooseControl('rejianxiong_mopai','cancel2').set('prompt',get.prompt('rejianxiong'));
|
||||||
}
|
}
|
||||||
"step 1"
|
"step 1"
|
||||||
if(result.control=='rejianxiong_napai'){
|
if(result.control=='rejianxiong_napai'){
|
||||||
|
|
|
@ -85,9 +85,6 @@ character.shenhua={
|
||||||
filter:function(event){
|
filter:function(event){
|
||||||
return event.target.countCards('he')>0;
|
return event.target.countCards('he')>0;
|
||||||
},
|
},
|
||||||
check:function(event,player){
|
|
||||||
return ai.get.attitude(player,event.target)<=0;
|
|
||||||
},
|
|
||||||
direct:true,
|
direct:true,
|
||||||
content:function(){
|
content:function(){
|
||||||
'step 0'
|
'step 0'
|
||||||
|
@ -97,7 +94,7 @@ character.shenhua={
|
||||||
return 1;
|
return 1;
|
||||||
}).set('logSkill',['jianchu',trigger.target]).set('att',ai.get.attitude(player,trigger.target)<=0);
|
}).set('logSkill',['jianchu',trigger.target]).set('att',ai.get.attitude(player,trigger.target)<=0);
|
||||||
'step 1'
|
'step 1'
|
||||||
if(result.links.length){
|
if(result.bool&&result.links&&result.links.length){
|
||||||
if(get.type(result.links[0])=='equip'){
|
if(get.type(result.links[0])=='equip'){
|
||||||
trigger.directHit=true;
|
trigger.directHit=true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -709,10 +709,6 @@ character.xianjian={
|
||||||
return player.countCards('h','shan')>0;
|
return player.countCards('h','shan')>0;
|
||||||
},
|
},
|
||||||
direct:true,
|
direct:true,
|
||||||
check:function(event,player){
|
|
||||||
if(ai.get.damageEffect(player,event.player,player)>=0) return false;
|
|
||||||
return true;
|
|
||||||
},
|
|
||||||
usable:1,
|
usable:1,
|
||||||
content:function(){
|
content:function(){
|
||||||
"step 0"
|
"step 0"
|
||||||
|
@ -1905,9 +1901,6 @@ character.xianjian={
|
||||||
},
|
},
|
||||||
poyun:{
|
poyun:{
|
||||||
trigger:{source:'damageEnd'},
|
trigger:{source:'damageEnd'},
|
||||||
check:function(event,player){
|
|
||||||
return ai.get.attitude(player,event.player)<0&&event.player.countCards('he')>1;
|
|
||||||
},
|
|
||||||
alter:true,
|
alter:true,
|
||||||
filter:function(event,player){
|
filter:function(event,player){
|
||||||
return player.storage.xuanning>0&&event.player.countCards('he')>0;
|
return player.storage.xuanning>0&&event.player.countCards('he')>0;
|
||||||
|
|
|
@ -1553,9 +1553,6 @@ character.yxs={
|
||||||
filter:function(event,player){
|
filter:function(event,player){
|
||||||
return event.player.hp<=0&&(player.countCards('h','jiu')>0||player.countCards('h',{color:'black'})>=2)&&player!=event.player;
|
return event.player.hp<=0&&(player.countCards('h','jiu')>0||player.countCards('h',{color:'black'})>=2)&&player!=event.player;
|
||||||
},
|
},
|
||||||
check:function(event,player){
|
|
||||||
return ai.get.attitude(player,event.player)<0;
|
|
||||||
},
|
|
||||||
direct:true,
|
direct:true,
|
||||||
content:function(){
|
content:function(){
|
||||||
'step 0'
|
'step 0'
|
||||||
|
|
28
game/game.js
28
game/game.js
|
@ -4362,6 +4362,12 @@
|
||||||
// frequent:true,
|
// frequent:true,
|
||||||
restart:true,
|
restart:true,
|
||||||
},
|
},
|
||||||
|
four_phaseswap:{
|
||||||
|
name:'代替队友回合内行动',
|
||||||
|
init:false,
|
||||||
|
// frequent:true,
|
||||||
|
restart:true,
|
||||||
|
},
|
||||||
free_choose:{
|
free_choose:{
|
||||||
name:'自由选将',
|
name:'自由选将',
|
||||||
init:true,
|
init:true,
|
||||||
|
@ -8394,7 +8400,7 @@
|
||||||
else if(checkFrequent(info)&&!lib.config.autoskilllist.contains(event.skill)){
|
else if(checkFrequent(info)&&!lib.config.autoskilllist.contains(event.skill)){
|
||||||
event._result={bool:true};
|
event._result={bool:true};
|
||||||
}
|
}
|
||||||
else if(info.direct&&player==game.me&&!_status.auto){
|
else if(info.direct){
|
||||||
event._result={bool:true};
|
event._result={bool:true};
|
||||||
}
|
}
|
||||||
else if(info.direct&&player.isOnline()){
|
else if(info.direct&&player.isOnline()){
|
||||||
|
@ -18451,6 +18457,26 @@
|
||||||
game.modeSwapPlayer(player);
|
game.modeSwapPlayer(player);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
autophase:{
|
||||||
|
trigger:{player:['phaseBegin','chooseToUseBegin','chooseToRespondBegin','chooseToDiscardBegin','chooseToCompareBegin',
|
||||||
|
'chooseButtonBegin','chooseCardBegin','chooseTargetBegin','chooseCardTargetBegin','chooseControlBegin',
|
||||||
|
'chooseBoolBegin','choosePlayerCardBegin','discardPlayerCardBegin','gainPlayerCardBegin']},
|
||||||
|
forced:true,
|
||||||
|
priority:100,
|
||||||
|
popup:false,
|
||||||
|
filter:function(event,player){
|
||||||
|
if(_status.currentPhase!=player) return false;
|
||||||
|
if(player==game.me) return false;
|
||||||
|
if(event.autochoose&&event.autochoose()) return false;
|
||||||
|
if(lib.filter.wuxieSwap(event)) return false;
|
||||||
|
if(_status.auto) return false;
|
||||||
|
if(!player.isFriendOf(game.me)) return false;
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
content:function(){
|
||||||
|
game.swapPlayer(player);
|
||||||
|
},
|
||||||
|
},
|
||||||
fengyin:{
|
fengyin:{
|
||||||
init:function(player,skill){
|
init:function(player,skill){
|
||||||
var skills=player.getSkills(true,false);
|
var skills=player.getSkills(true,false);
|
||||||
|
|
|
@ -12,8 +12,8 @@ window.noname_update={
|
||||||
// 'game/asset.js',
|
// 'game/asset.js',
|
||||||
// 'card/*',
|
// 'card/*',
|
||||||
// 'card/sp.js',
|
// 'card/sp.js',
|
||||||
// 'character/*',
|
'character/*',
|
||||||
// 'character/shenhua.js',
|
// 'character/refresh.js',
|
||||||
// 'mode/boss.js',
|
// 'mode/boss.js',
|
||||||
'mode/versus.js',
|
'mode/versus.js',
|
||||||
'mode/guozhan.js',
|
'mode/guozhan.js',
|
||||||
|
|
|
@ -1001,8 +1001,16 @@ mode.versus={
|
||||||
}
|
}
|
||||||
event.list.randomSort();
|
event.list.randomSort();
|
||||||
event.list2=list2;
|
event.list2=list2;
|
||||||
event.current=_status.firstAct.next;
|
|
||||||
event.four_assign=get.config('four_assign');
|
event.four_assign=get.config('four_assign');
|
||||||
|
if(get.config('four_phaseswap')){
|
||||||
|
game.addGlobalSkill('autophase');
|
||||||
|
}
|
||||||
|
if(!event.four_assign){
|
||||||
|
event.current=_status.firstAct;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
event.current=_status.firstAct.next;
|
||||||
|
}
|
||||||
event.flipassign=true;
|
event.flipassign=true;
|
||||||
if(_status.firstAct.side){
|
if(_status.firstAct.side){
|
||||||
for(var i=0;i<game.players.length;i++){
|
for(var i=0;i<game.players.length;i++){
|
||||||
|
|
Loading…
Reference in New Issue