This commit is contained in:
libccy 2016-06-21 09:08:42 +08:00
parent 5954309986
commit 852eaebe8e
3 changed files with 52 additions and 31 deletions

View File

@ -27793,7 +27793,7 @@
} }
} }
if(lib.config.show_favourite&&lib.character[node.name]){ if(lib.config.show_favourite&&lib.character[node.name]&&get.mode()!='story'){
var addFavourite=ui.create.div('.text.center'); var addFavourite=ui.create.div('.text.center');
addFavourite.link=node.link; addFavourite.link=node.link;
if(lib.config.favouriteCharacter.contains(node.name)){ if(lib.config.favouriteCharacter.contains(node.name)){
@ -28053,7 +28053,7 @@
uiintro.add('<div><div class="skill">【'+translation+'】</div><div>'+lib.translate[skills[i]+'_info']+'</div></div>'); uiintro.add('<div><div class="skill">【'+translation+'】</div><div>'+lib.translate[skills[i]+'_info']+'</div></div>');
} }
} }
if((node.parentNode.classList.contains('menu-buttons')||lib.config.show_favourite)&&lib.character[node.link]){ if((node.parentNode.classList.contains('menu-buttons')||lib.config.show_favourite)&&lib.character[node.link]&&get.mode()!='story'){
var addFavourite=ui.create.div('.text.center'); var addFavourite=ui.create.div('.text.center');
addFavourite.link=node.link; addFavourite.link=node.link;
addFavourite.style.marginBottom='15px'; addFavourite.style.marginBottom='15px';

View File

@ -609,38 +609,52 @@ mode.identity={
delete game.zhu.isZhu; delete game.zhu.isZhu;
delete game.zhu.identityShown; delete game.zhu.identityShown;
} }
var current=this.parentNode.querySelector('.thundertext');
if(this.link!='zhu'&&game.me.identity!='zhu'){ if(current){
var current=this.parentNode.querySelector('.thundertext'); current.classList.remove('thundertext');
if(current){ }
current.classList.remove('thundertext'); current=seats.querySelector('.thundertext');
if(current){
current.classList.remove('thundertext');
}
var link=this.link;
if(link=='random'){
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');
}
} }
}
else{
this.classList.add('thundertext'); this.classList.add('thundertext');
event.list=event.list.concat(list); }
event.list.randomSort(); num=get.config('choice_'+link);
num=get.config('choice_'+this.link); _status.event.parent.swapnodialog=function(dialog,list){
list=event.list.splice(0,num);
var buttons=ui.create.div('.buttons'); var buttons=ui.create.div('.buttons');
var node=_status.event.dialog.buttons[0].parentNode; var node=dialog.buttons[0].parentNode;
_status.event.dialog.buttons=ui.create.buttons(list,'character',buttons); dialog.buttons=ui.create.buttons(list,'character',buttons);
_status.event.dialog.content.insertBefore(buttons,node); dialog.content.insertBefore(buttons,node);
buttons.animate('start'); buttons.animate('start');
node.remove(); node.remove();
game.uncheck(); game.uncheck();
game.check(); game.check();
_status.event.parent.swapnodialog=true; for(var i=0;i<seats.firstChild.childElementCount;i++){
} if(get.distance(game.zhu,game.me,'absolute')===seats.firstChild.childNodes[i].link){
else{ seats.firstChild.childNodes[i].classList.add('thundertext');
_status.event.parent.swapnodialog=false; }
dialog.close(); }
} }
_status.event=_status.event.parent; _status.event=_status.event.parent;
_status.event.step=0; _status.event.step=0;
if(this.link!='random'){ _status.event.identity=link;
_status.event.identity=this.link; if(link!='zhu'){
seats.previousSibling.style.display='';
seats.style.display='';
} }
else{ else{
delete _status.event.identity; seats.previousSibling.style.display='none';
seats.style.display='none';
} }
game.resume(); game.resume();
}); });
@ -755,7 +769,7 @@ mode.identity={
event.ai(game.zhu,event.list,list2) event.ai(game.zhu,event.list,list2)
event.list.remove(game.zhu.name); event.list.remove(game.zhu.name);
event.list.remove(game.zhu.name2); event.list.remove(game.zhu.name2);
list=event.list.splice(0,num); list=event.list.slice(0,num);
} }
else{ else{
if(event.zhongmode){ if(event.zhongmode){
@ -765,9 +779,12 @@ mode.identity={
list=list2.concat(list3.slice(0,num)); list=list2.concat(list3.slice(0,num));
} }
} }
delete event.swapnochoose;
var dialog; var dialog;
if(event.swapnodialog){ if(event.swapnodialog){
dialog=ui.dialog; dialog=ui.dialog;
event.swapnodialog(dialog,list);
delete event.swapnodialog;
} }
else{ else{
dialog=ui.create.dialog('选择角色','hidden',[list,'character']); dialog=ui.create.dialog('选择角色','hidden',[list,'character']);
@ -791,13 +808,12 @@ mode.identity={
game.changeCoin(-3); game.changeCoin(-3);
} }
if(game.zhu!=game.me){ if(game.zhu!=game.me){
event.list=event.list.concat(list);
event.list.randomSort(); event.list.randomSort();
list=event.list.splice(0,num); list=event.list.slice(0,num);
} }
else{ else{
list3.randomSort(); list3.randomSort();
list=list3.slice(0,num).concat(list2); list=list2.concat(list3.slice(0,num));
} }
var buttons=ui.create.div('.buttons'); var buttons=ui.create.div('.buttons');
var node=_status.event.dialog.buttons[0].parentNode; var node=_status.event.dialog.buttons[0].parentNode;

View File

@ -12,30 +12,35 @@ mode.story={
career:{ career:{
zhanshi:{ zhanshi:{
name:'战士', name:'战士',
intro:'擅长各种近战武器,有较高的输出和防御能力,技能学习门槛低,容易速成'
}, },
lieren:{ cike:{
name:'猎人', name:'刺客',
intro:'远程攻击职业,能较好地配合其他角色打击特定目标,克制低防御力的职业,速度和生存能力较高'
}, },
fashi:{ fashi:{
name:'法师', name:'法师',
intro:'法术攻击型职业,可对各位置的敌人造成大量伤害,但生存能力低,需要队友保护',
}, },
jisi:{ jisi:{
name:'祭司', name:'祭司',
intro:'擅长召唤术,可同时召唤出多个随从,具有很强的干扰能力,但比较惧怕范围攻击',
}, },
fangshi:{ fangshi:{
name:'方士', name:'方士',
intro:'法术辅助型职业,可有效提升队友的输出和生存能力',
}, },
moushi:{ moushi:{
name:'谋士', name:'谋士',
intro:'精通锦囊和阵法,技能效果强大但同时有较高的风险',
}, },
yisheng:{ yisheng:{
name:'医生', name:'医生',
}, intro:'治疗和辅助队友,敌方集火的首选目标',
xingzhe:{
name:'行者',
}, },
yanshi:{ yanshi:{
name:'偃师', name:'偃师',
intro:'全能型职业,可通过制造不同的偃甲达到各种效果,但制造和维护偃甲需要较多的资金支持',
} }
}, },
character:{ character:{