This commit is contained in:
libccy 2017-02-06 17:27:53 +08:00
parent a35f683961
commit b9163fba65
8 changed files with 56 additions and 9 deletions

View File

@ -294,7 +294,7 @@ card.swd={
if(targets.length){
targets.sort(lib.sort.seat);
if(info.selectTarget==-1){
target.useCard(card,targets);
target.useCard(card,targets,'noai');
}
else{
var num=info.selectTarget;
@ -4583,7 +4583,7 @@ card.swd={
trigger.finish();
},
intro:{
content:'已积攒'+storage+'点力量'
content:'已积攒#点力量'
},
group:['xujin2']
},

View File

@ -646,7 +646,8 @@ character.hearth={
}
targets.push(target);
}
player.useCard(game.createCard({name:name,suit:get.suit(card),number:card.number}),targets);
player.useCard(game.createCard({name:name,suit:get.suit(card),number:card.number}),targets,'noai');
player.addExpose(0.2);
event.redo();
}
},

View File

@ -6734,7 +6734,7 @@
}
if(!_status.connectMode&&lib.config.wuxie_self&&event.getParent().state){
var tw=event.getTrigger().parent;
if(tw.player.isUnderControl(true)&&tw.targets&&tw.targets.length==1){
if(tw.player.isUnderControl(true)&&tw.targets&&tw.targets.length==1&&!tw.noai){
event.result={
bool:false
}
@ -11102,7 +11102,6 @@
var next=game.createEvent('useCard');
next.player=this;
next.num=0;
var noai=false;
for(var i=0;i<arguments.length;i++){
if(get.itemtype(arguments[i])=='cards'){
next.cards=arguments[i];
@ -11121,7 +11120,7 @@
}
else if(typeof arguments[i]=='string'){
if(arguments[i]=='noai'){
noai=true;
next.noai=true;
}
else{
next.skill=arguments[i];
@ -11160,7 +11159,7 @@
this.ai.tempIgnore.add(next.targets[i]);
}
}
if(typeof this.logAi=='function'&&!noai){
if(typeof this.logAi=='function'&&!next.noai){
var postAi=get.info(next.card).postAi;
if(postAi&&postAi(next.targets)){
next.postAi=true;
@ -15373,6 +15372,30 @@
autoRespondShan:function(){
return !this.player.hasShan();
},
wuxieSwap:function(event){
if(event.type=='wuxie'){
if(ui.wuxie&&ui.wuxie.classList.contains('glow')){
return true;
}
if(ui.tempnowuxie&&ui.tempnowuxie.classList.contains('glow')&&event.state>0){
var triggerevent=event.getTrigger();
if(triggerevent){
if(ui.tempnowuxie._origin==triggerevent.parent.id){
return true;
}
}
else if(ui.tempnowuxie._origin==_status.event.id2){
return true;
}
}
if(!_status.connectMode&&lib.config.wuxie_self&&event.getParent().state){
var tw=event.getTrigger().parent;
if(tw.player.isUnderControl(true)&&tw.targets&&tw.targets.length==1&&!tw.noai){
return true;
}
}
}
}
},
sort:{
character:function(a,b){

View File

@ -92,6 +92,12 @@
height:calc(100% - 370px);
bottom:170px;
}
#arena.choose-character>.dialog .placeholder+.placeholder{
display: none;
}
#arena.choose-character>.dialog .placeholder{
margin-bottom: 0;
}
#arena.choose-character>.dialog{
height:calc(100% - 280px);
bottom:80px;

View File

@ -3573,6 +3573,7 @@ mode.boss={
filter:function(event,player){
if(!get.config('single_control')) return false;
if(event.autochoose&&event.autochoose()) return false;
if(lib.filter.wuxieSwap(event)) return false;
return player.isUnderControl();
},
content:function(){

View File

@ -4910,6 +4910,7 @@ mode.chess={
filter:function(event,player){
if(event.autochoose&&event.autochoose()) return false;
if(lib.config.mode=='chess'&&_status.mode=='combat'&&!get.config('single_control')) return false;
if(lib.filter.wuxieSwap(event)) return false;
return player.isUnderControl();
},
content:function(){

View File

@ -637,6 +637,7 @@ mode.identity={
_status.tempNoButton=false;
},500);
if(game.zhu.name){
_status.event.parent.fixedseat=get.distance(game.me,game.zhu,'absolute');
game.zhu.uninit();
delete game.zhu.isZhu;
delete game.zhu.identityShown;
@ -651,7 +652,12 @@ mode.identity={
}
var link=this.link;
if(link=='random'){
link=['zhu','zhong','nei','fan'].randomGet();
if(event.zhongmode){
link=['zhu','zhong','nei','fan','mingzhong'].randomGet();
}
else{
link=['zhu','zhong','nei','fan'].randomGet();
}
for(var i=0;i<this.parentNode.childElementCount;i++){
if(this.parentNode.childNodes[i].link==link){
this.parentNode.childNodes[i].classList.add('thundertext');
@ -681,7 +687,7 @@ mode.identity={
_status.event=_status.event.parent;
_status.event.step=0;
_status.event.identity=link;
if(link!='zhu'){
if(link!=(event.zhongmode?'mingzhong':'zhu')){
seats.previousSibling.style.display='';
seats.style.display='';
}
@ -756,6 +762,14 @@ mode.identity={
if(event.identity){
identityList.remove(event.identity);
identityList.unshift(event.identity);
if(event.fixedseat){
var zhuIdentity=(_status.mode=='zhong')?'mingzhong':'zhu';
if(zhuIdentity!=event.identity){
identityList.remove(zhuIdentity);
identityList.splice(event.fixedseat,0,zhuIdentity);
}
delete event.fixedseat;
}
delete event.identity;
}
else if(_status.mode!='zhong'&&(!_status.brawl||!_status.brawl.identityShown)){

View File

@ -3587,6 +3587,7 @@ mode.versus={
popup:false,
filter:function(event,player){
if(event.autochoose&&event.autochoose()) return false;
if(lib.filter.wuxieSwap(event)) return false;
return !_status.auto&&player!=game.me&&player.side==game.me.side;
},
content:function(){