This commit is contained in:
libccy 2017-02-09 09:29:32 +08:00
parent ade81d0d63
commit 70a48e6a6a
9 changed files with 42 additions and 97 deletions

View File

@ -3081,7 +3081,7 @@ character.ow={
shanxian:'闪现', shanxian:'闪现',
shanxian_info:'在一名其他角色的回合开始前,若你的武将牌正面朝上,你可以摸一张牌并进行一个额外回合,并在回合结束后将武将牌翻至背面。若如此做,你对其使用卡牌无视距离直到回合结束。', shanxian_info:'在一名其他角色的回合开始前,若你的武将牌正面朝上,你可以摸一张牌并进行一个额外回合,并在回合结束后将武将牌翻至背面。若如此做,你对其使用卡牌无视距离直到回合结束。',
shanhui:'闪回', shanhui:'闪回',
shanhui_info:'当你造成或受到一次伤害,你可以将你的牌重置为上次发动闪现时的状态,若你的牌数因此而减少,你回复一点体力', shanhui_info:'当你造成或受到伤害,你可以将你的牌重置为上次发动闪现时的状态,若你的牌数因此而减少,你回复一点体力',
ow_liekong:'猎空', ow_liekong:'猎空',
ow_sishen:'死神', ow_sishen:'死神',
ow_tianshi:'天使', ow_tianshi:'天使',

View File

@ -172,7 +172,7 @@ play.boss={
lib.translate[i]=lib.translate[i]||mode.versus.translate[i]; lib.translate[i]=lib.translate[i]||mode.versus.translate[i];
} }
for(var i in mode.versus.skill){ for(var i in mode.versus.skill){
if(i!='versus_swap'&&i!='versus_ladder'){ if(i!='versus_ladder'){
lib.skill[i]=lib.init.eval(mode.versus.skill[i]); lib.skill[i]=lib.init.eval(mode.versus.skill[i]);
game.finishSkill(i); game.finishSkill(i);
} }
@ -188,10 +188,8 @@ play.boss={
lib.translate[i]=lib.translate[i]||mode.boss.translate[i]; lib.translate[i]=lib.translate[i]||mode.boss.translate[i];
} }
for(var i in mode.boss.skill){ for(var i in mode.boss.skill){
if(i!='_bossswap'){ lib.skill[i]=lib.init.eval(mode.boss.skill[i]);
lib.skill[i]=lib.init.eval(mode.boss.skill[i]); game.finishSkill(i);
game.finishSkill(i);
}
} }
delete window.mode; delete window.mode;
loadversus(); loadversus();

View File

@ -133,7 +133,7 @@
init:true, init:true,
}, },
tao_enemy:{ tao_enemy:{
name:'不对敌使用桃', name:'不对敌使用桃',
init:false, init:false,
}, },
touchscreen:{ touchscreen:{
@ -6754,41 +6754,18 @@
} }
else if(event.isMine()){ else if(event.isMine()){
if(event.type=='wuxie'){ if(event.type=='wuxie'){
if(ui.wuxie&&ui.wuxie.classList.contains('glow')){ if(ui.tempnowuxie){
event.result={ var triggerevent=event.getTrigger();
if(triggerevent.targets&&triggerevent.num==triggerevent.targets.length-1){
ui.tempnowuxie.close();
}
}
if(lib.filter.wuxieSwap(event)){
event.result={
bool:false bool:false
} }
return; return;
} }
if(ui.tempnowuxie&&ui.tempnowuxie.classList.contains('glow')&&event.state>0){
var triggerevent=event.getTrigger();
if(triggerevent){
if(ui.tempnowuxie._origin==triggerevent.parent.id){
event.result={
bool:false
}
if(triggerevent.targets&&triggerevent.num==triggerevent.targets.length-1){
ui.tempnowuxie.close();
}
return;
}
}
else if(ui.tempnowuxie._origin==_status.event.id2){
event.result={
bool:false
}
return;
}
}
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){
event.result={
bool:false
}
return;
}
}
} }
var ok=game.check(); var ok=game.check();
if(!ok||!lib.config.auto_confirm){ if(!ok||!lib.config.auto_confirm){
@ -12844,8 +12821,7 @@
if(lib.config.mode=='versus'){ if(lib.config.mode=='versus'){
if(_status.mode=='three') return this.side==me.side; if(_status.mode=='three') return this.side==me.side;
if(_status.mode=='four'||_status.mode=='jiange'||_status.mode=='one') return false; if(_status.mode=='four'||_status.mode=='jiange'||_status.mode=='one') return false;
return ui.autoreplace&&ui.autoreplace.classList.contains('on')&& return lib.storage.single_control&&this.side==me.side;
this.side==me.side;
} }
else if(lib.config.mode=='boss'){ else if(lib.config.mode=='boss'){
return this.side==me.side&&get.config('single_control'); return this.side==me.side&&get.config('single_control');
@ -15620,6 +15596,23 @@
others:{}, others:{},
zhu:{}, zhu:{},
zhuSkill:{}, zhuSkill:{},
autoswap:{
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(event.autochoose&&event.autochoose()) return false;
if(lib.filter.wuxieSwap(event)) return false;
if(_status.auto||!player.isUnderControl()) return false;
return true;
},
content:function(){
game.modeSwapPlayer(player);
},
},
fengyin:{ fengyin:{
init:function(player,skill){ init:function(player,skill){
var skills=player.get('s',true,false); var skills=player.get('s',true,false);

View File

@ -130,6 +130,7 @@ mode.boss={
lib.translate.boss_pangtong='涅槃凤雏'; lib.translate.boss_pangtong='涅槃凤雏';
ui.create.cards(); ui.create.cards();
game.finishCards(); game.finishCards();
game.addGlobalSkill('autoswap');
ui.arena.setNumber(8); ui.arena.setNumber(8);
ui.control.style.transitionProperty='opacity'; ui.control.style.transitionProperty='opacity';
ui.control.classList.add('bosslist'); ui.control.classList.add('bosslist');
@ -3565,23 +3566,6 @@ mode.boss={
} }
} }
}, },
_bossswap:{
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(!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(){
game.modeSwapPlayer(player);
},
},
}, },
translate:{ translate:{
zhu:'神', zhu:'神',

View File

@ -42,6 +42,7 @@ mode.chess={
} }
ui.create.cards(); ui.create.cards();
game.finishCards(); game.finishCards();
game.addGlobalSkill('autoswap');
ui.chessContainer=ui.create.div('#chess-container',ui.arena); ui.chessContainer=ui.create.div('#chess-container',ui.arena);
lib.setScroll(ui.chessContainer); lib.setScroll(ui.chessContainer);
ui.chess=ui.create.div('#chess',ui.chessContainer); ui.chess=ui.create.div('#chess',ui.chessContainer);
@ -4902,23 +4903,6 @@ mode.chess={
} }
} }
}, },
_chessswap:{
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(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(){
game.modeSwapPlayer(player);
},
},
_chesscenter:{ _chesscenter:{
trigger:{player:['phaseBegin','useCardBegin','useSkillBegin','respondBegin','damageBegin','loseHpBegin'], trigger:{player:['phaseBegin','useCardBegin','useSkillBegin','respondBegin','damageBegin','loseHpBegin'],
target:'useCardToBegin'}, target:'useCardToBegin'},

View File

@ -391,7 +391,6 @@ mode.story={
game.isChessNeighbour=result.game.isChessNeighbour; game.isChessNeighbour=result.game.isChessNeighbour;
get.chessDistance=result.get.chessDistance; get.chessDistance=result.get.chessDistance;
lib.skill._chessmove=result.skill._chessmove; lib.skill._chessmove=result.skill._chessmove;
lib.skill._chessswap=result.skill._chessswap;
lib.skill._chesscenter=result.skill._chesscenter; lib.skill._chesscenter=result.skill._chesscenter;
lib.skill._phasequeue=result.skill._phasequeue; lib.skill._phasequeue=result.skill._phasequeue;
'step 2' 'step 2'

View File

@ -26,7 +26,7 @@ mode.tafang={
for(var i=0;i<toLoad.length;i++){ for(var i=0;i<toLoad.length;i++){
game[toLoad[i]]=lib.init.eval(result.game[toLoad[i]]); game[toLoad[i]]=lib.init.eval(result.game[toLoad[i]]);
} }
toLoad=['_attackmove','_phasequeue','_chessswap','_chessmove','_chesscenter']; toLoad=['_attackmove','_phasequeue','_chessmove','_chesscenter'];
for(var i=0;i<toLoad.length;i++){ for(var i=0;i<toLoad.length;i++){
lib.skill[toLoad[i]]=lib.init.eval(result.skill[toLoad[i]]); lib.skill[toLoad[i]]=lib.init.eval(result.skill[toLoad[i]]);
} }
@ -61,6 +61,7 @@ mode.tafang={
} }
ui.create.cards(); ui.create.cards();
game.finishCards(); game.finishCards();
game.addGlobalSkill('autoswap');
ui.chessContainer=ui.create.div('#chess-container',ui.arena); ui.chessContainer=ui.create.div('#chess-container',ui.arena);
lib.setScroll(ui.chessContainer); lib.setScroll(ui.chessContainer);
ui.chess=ui.create.div('#chess',ui.chessContainer); ui.chess=ui.create.div('#chess',ui.chessContainer);

View File

@ -295,7 +295,7 @@ mode.versus={
firstAct=game.friendZhu; firstAct=game.friendZhu;
} }
game.gameDraw(firstAct,4); game.gameDraw(firstAct,4);
game.addGlobalSkill('versus_swap'); game.addGlobalSkill('autoswap');
if(lib.config.show_handcardbutton){ if(lib.config.show_handcardbutton){
ui.versushs=ui.create.system('手牌',null,true); ui.versushs=ui.create.system('手牌',null,true);
lib.setPopped(ui.versushs,game.versusHoverHandcards,220); lib.setPopped(ui.versushs,game.versusHoverHandcards,220);
@ -343,8 +343,7 @@ mode.versus={
_status.first_less=true; _status.first_less=true;
_status.round=0; _status.round=0;
if(lib.storage.single_control){ if(lib.storage.single_control){
game.addGlobalSkill('versus_swap'); game.addGlobalSkill('autoswap');
if(game.players.length>2&&lib.config.show_handcardbutton){ if(game.players.length>2&&lib.config.show_handcardbutton){
ui.versushs=ui.create.system('手牌',null,true); ui.versushs=ui.create.system('手牌',null,true);
lib.setPopped(ui.versushs,game.versusHoverHandcards,220); lib.setPopped(ui.versushs,game.versusHoverHandcards,220);
@ -3888,22 +3887,6 @@ mode.versus={
threaten:2 threaten:2
} }
}, },
versus_swap:{
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(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(){
game.modeSwapPlayer(player);
},
},
versus_ladder:{ versus_ladder:{
trigger:{global:['damageEnd','recoverEnd','dieEnd','gainEnd','phaseDiscardEnd']}, trigger:{global:['damageEnd','recoverEnd','dieEnd','gainEnd','phaseDiscardEnd']},
forced:true, forced:true,

View File

@ -75,9 +75,12 @@ html{
.dialog.popped .yellowtext{ .dialog.popped .yellowtext{
color:#631515; color:#631515;
} }
.dialog.popped .greentext{ .dialog.popped .greentext,.control span.greentext{
color:#00312d; color:#00312d;
} }
.control span.firetext{
color:#631515;
}
.legendtext.legendauto{ .legendtext.legendauto{
color: rgba(106, 27, 154, 1); color: rgba(106, 27, 154, 1);
} }