This commit is contained in:
libccy 2016-09-23 23:23:19 +08:00
parent 29f82da379
commit 677cb6c1a2
3 changed files with 218 additions and 101 deletions

View File

@ -1,9 +1,114 @@
play.boss={ play.boss={
init:function(){ init:function(){
console.log(1); if(get.mode()!='boss'){
// if(get.mode()!='boss'){ lib.characterPack.mode_extension_boss={
// lib.init.js(lib.assetURL+'mode',boss,packLoaded,packLoaded); boss_zhangchunhua:['female','wei',4,['jueqing','wuxin','shangshix'],['boss','bossallowed'],'wei'],
// } boss_zhenji:['female','wei',4,['tashui','lingbo','jiaoxia','fanghua'],['boss','bossallowed'],'wei'],
// boss_liubei:['male','shu',5,['lingfeng'],['boss','bossallowed'],'qun'],
// boss_zhugeliang:['male','shu',4,[],['boss','bossallowed'],'qun'],
boss_huangyueying:['female','shu',4,['boss_gongshen','boss_jizhi','qicai','boss_guiyin'],['boss','bossallowed'],'wei'],
boss_pangtong:['male','shu',4,['boss_tianyu','qiwu','niepan','boss_yuhuo'],['boss','bossallowed'],'zhu'],
boss_zhaoyun:['male','shu',1,['boss_juejing','longhun','zhanjiang'],['boss','bossallowed'],'qun'],
boss_zhouyu:['male','wu',6,['huoshen','boss_honglian','boss_xianyin'],['boss','bossallowed'],'zhu'],
boss_zhuoguiquxie:['male','qun',0,['boss_bianshen'],['boss','bossallowed'],'shu'],
boss_nianshou:['male','qun',Infinity,['boss_nianrui','boss_qixiang','boss_damagecount'],['boss'],'shu'],
boss_nianshou_heti:['male','qun',12,['boss_nianrui','boss_mengtai','boss_nbianshen','boss_nbianshenx'],['boss','bossallowed'],'shu'],
boss_nianshou_jingjue:['male','qun',12,['boss_nianrui','boss_mengtai','boss_jingjue','boss_nbianshen'],['hiddenboss','bossallowed'],'shu'],
boss_nianshou_renxing:['male','qun',12,['boss_nianrui','boss_mengtai','boss_renxing','boss_nbianshen'],['hiddenboss','bossallowed'],'shu'],
boss_nianshou_ruizhi:['male','qun',12,['boss_nianrui','boss_mengtai','boss_ruizhi','boss_nbianshen'],['hiddenboss','bossallowed'],'shu'],
boss_nianshou_baonu:['male','qun',12,['boss_nianrui','boss_mengtai','boss_nbaonu','boss_shouyi','boss_nbianshen'],['hiddenboss','bossallowed'],'shu'],
boss_baiwuchang:['male','qun',9,['boss_baolian','boss_qiangzheng','boss_zuijiu','juece','boss_bianshen4'],['hiddenboss','bossallowed']],
boss_heiwuchang:['male','qun',9,['boss_guiji','boss_taiping','boss_suoming','boss_xixing','boss_bianshen4'],['hiddenboss','bossallowed']],
boss_luocha:['male','qun',12,['boss_modao','boss_yushou','yizhong','boss_moyany'],['hiddenboss','bossallowed']],
boss_yecha:['male','qun',11,['boss_modao','boss_mojian','bazhen','boss_danshu'],['hiddenboss','bossallowed']],
boss_niutou:['male','qun',7,['boss_baolian','niepan','boss_manjia','boss_xiaoshou','boss_bianshen3'],['hiddenboss','bossallowed']],
boss_mamian:['male','qun',6,['boss_guiji','fankui','boss_lianyu','juece','boss_bianshen3'],['hiddenboss','bossallowed']],
boss_chi:['male','qun',5,['boss_guimei','boss_didong','boss_shanbeng','boss_bianshen2'],['hiddenboss','bossallowed']],
boss_mo:['female','qun',5,['boss_guimei','enyuan','boss_beiming','boss_bianshen2'],['hiddenboss','bossallowed']],
boss_wang:['male','qun',5,['boss_guimei','boss_luolei','huilei','boss_bianshen2'],['hiddenboss','bossallowed']],
boss_liang:['female','qun',5,['boss_guimei','boss_guihuo','boss_minbao','boss_bianshen2'],['hiddenboss','bossallowed']],
boss_lvbu1:['male','qun',8,['mashu','wushuang','boss_baonu'],['boss','bossallowed'],'wei'],
boss_lvbu2:['male','qun',4,['mashu','wushuang','swd_xiuluo','shenwei','shenji'],['hiddenboss','bossallowed'],'qun'],
boss_caiwenji:['female','qun',4,['beige','boss_hujia','boss_guihan'],['boss','bossallowed'],'wei'],
boss_zhangjiao:['male','qun',8,['boss_leiji','tiandao','jidian'],['boss','bossallowed'],'shu'],
boss_zuoci:['male','qun',0,['huanhua'],['boss','bossallowed'],'shu'],
// boss_yuji:['male','qun',8,[],['boss','bossallowed'],'nei'],
boss_diaochan:['female','qun',4,['fengwu','yunshen','lianji','boss_wange','yuehun'],['boss','bossallowed'],'qun'],
boss_huatuo:['male','qun',6,['chulao','mazui','boss_shengshou','guizhen','wuqin'],['boss','bossallowed'],'wu'],
boss_dongzhuo:['male','qun',20,['jiuchi','boss_qiangzheng','boss_baolin'],['boss','bossallowed'],'shu'],
// boss_shuijing:['male','qun',8,[],['boss','bossallowed'],'wei'],
};
for(var i in lib.characterPack.mode_extension_boss){
lib.characterPack.mode_extension_boss[i][4].push('mode:boss');
lib.character[i]=lib.characterPack.mode_extension_boss[i];
if(!lib.config.boss_enableai_playpackconfig){
lib.config.forbidai.push(i);
}
}
var list={
boss_chi:'魑',
boss_mo:'魅',
boss_wang:'魍',
boss_liang:'魉',
boss_niutou:'牛头',
boss_mamian:'马面',
boss_baiwuchang:'白无常',
boss_heiwuchang:'黑无常',
boss_luocha:'罗刹',
boss_yecha:'夜叉',
boss_nianshou:'年兽',
boss_nianshou_heti:'合体年兽',
boss_nianshou_jingjue:'警觉年兽',
boss_nianshou_renxing:'任性年兽',
boss_nianshou_baonu:'暴怒年兽',
boss_nianshou_ruizhi:'睿智年兽',
boss_shuijing:'水镜先生',
boss_huangyueying:'奇智女杰',
boss_zhangchunhua:'冷血皇后',
boss_satan:'堕落天使',
boss_dongzhuo:'乱世魔王',
boss_lvbu1:'最强神话',
boss_lvbu2:'暴怒战神',
boss_zhouyu:'赤壁火神',
boss_pangtong:'涅盘凤雏',
boss_zhugeliang:'祭风卧龙',
boss_zhangjiao:'天公将军',
boss_zuoci:'迷之仙人',
boss_yuji:'琅琊道士',
boss_liubei:'蜀汉烈帝',
boss_caiwenji:'异乡孤女',
boss_huatuo:'药坛圣手',
boss_luxun:'蹁跹君子',
boss_zhenji:'洛水仙子',
boss_diaochan:'绝代妖姬',
boss_zhaoyun:'高达一号',
boss_zhuoguiquxie:'捉鬼驱邪',
mode_extension_boss_character_config:'挑战模式'
};
for(var i in list){
lib.translate[i]=list[i];
}
}
},
arenaReady:function(){
if(get.mode()!='boss'){
window.mode={};
lib.init.js(lib.assetURL+'mode','boss',function(){
for(var i in mode.boss.translate){
lib.translate[i]=lib.translate[i]||mode.boss.translate[i];
}
for(var i in mode.boss.skill){
lib.skill[i]=mode.boss.skill[i];
game.finishSkill(i);
}
});
}
}, },
help:{ help:{
'挑战武将':'<ul><li>在非挑战模式中使用挑战武将' '挑战武将':'<ul><li>在非挑战模式中使用挑战武将'

View File

@ -1724,6 +1724,10 @@
name:'在非挑战模式中使用挑战武将', name:'在非挑战模式中使用挑战武将',
clear:true, clear:true,
}, },
enableai:{
name:'AI可选',
init:false
},
hide:{ hide:{
name:'隐藏此扩展', name:'隐藏此扩展',
clear:true, clear:true,
@ -4803,7 +4807,7 @@
var sha=0,shan=0,tao=0,jiu=0,wuxie=0,heisha=0,hongsha=0; var sha=0,shan=0,tao=0,jiu=0,wuxie=0,heisha=0,hongsha=0;
var num={1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0}; var num={1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0};
for(var i in lib.card){ for(var i in lib.card){
if(typeof lib.card[i]=='object'){ if(get.objtype(lib.card[i])=='object'&&lib.translate[i+'_info']){
switch(lib.card[i].type){ switch(lib.card[i].type){
case 'basic':a++;break; case 'basic':a++;break;
case 'trick':b++;break; case 'trick':b++;break;
@ -4866,8 +4870,7 @@
} }
} }
} }
console.log(a+b+c+d); console.log((a+b+c+d)+'/'+(aa+bb+cc+dd));
console.log(aa+bb+cc+dd);
}()); }());
}, },
id:function(){ id:function(){
@ -19602,6 +19605,80 @@
players[i].$draw(num2); players[i].$draw(num2);
} }
}, },
finishSkill:function(i){
var j;
var mode=get.mode();
if(lib.translate[i+'_info_'+mode]){
lib.translate[i+'_info']=lib.translate[i+'_info_'+mode];
}
if(lib.skill[i].forbid&&lib.skill[i].forbid.contains(mode)){
lib.skill[i]={};
if(lib.translate[i+'_info']){
lib.translate[i+'_info']='此模式下不可用';
}
return;
}
if(lib.skill[i].mode&&lib.skill[i].mode.contains(mode)==false){
lib.skill[i]={};
if(lib.translate[i+'_info']){
lib.translate[i+'_info']='此模式下不可用';
}
return;
}
if(lib.skill[i].viewAs){
if(typeof lib.skill[i].viewAs=='string'){
lib.skill[i].viewAs={name:lib.skill[i].viewAs};
}
if(lib.skill[i].ai==undefined) lib.skill[i].ai={};
var skill=lib.skill[i].ai;
if(!lib.card[lib.skill[i].viewAs.name]){
lib.skill[i]={};
lib.translate[i+'_info']='技能不可用';
return;
}
var card=lib.card[lib.skill[i].viewAs.name].ai;
for(j in card){
if(skill[j]==undefined) skill[j]=card[j];
else if(typeof skill[j]=='object'){
for(var k in card[j]){
if(skill[j][k]==undefined) skill[j][k]=card[j][k];
}
}
}
}
if(lib.skill[i].inherit){
var skill=lib.skill[lib.skill[i].inherit];
for(j in skill){
if(lib.skill[i][j]==undefined) lib.skill[i][j]=skill[j];
}
if(lib.translate[i+'_info']==undefined){
lib.translate[i+'_info']=lib.translate[lib.skill[i].inherit+'_info'];
}
}
if(lib.skill[i].subSkill){
for(var j in lib.skill[i].subSkill){
lib.skill[i+'_'+j]=lib.skill[i].subSkill[j];
if(lib.skill[i].subSkill[j].name){
lib.translate[i+'_'+j]=lib.skill[i].subSkill[j].name;
}
else{
lib.translate[i+'_'+j]=lib.translate[i];
}
if(lib.skill[i].subSkill[j].description){
lib.translate[i+'_'+j+'_info']=lib.skill[i].subSkill[j].description;
}
if(lib.skill[i].subSkill[j].marktext){
lib.translate[i+'_'+j+'_bg']=lib.skill[i].subSkill[j].marktext;
}
}
}
if(lib.skill[i].marktext){
lib.translate[i+'_bg']=lib.skill[i].marktext;
}
if(i[0]=='_'){
game.addGlobalSkill(i);
}
},
finishCards:function(){ finishCards:function(){
_status.cardsFinished=true; _status.cardsFinished=true;
var i,j,k; var i,j,k;
@ -19665,76 +19742,7 @@
} }
} }
for(i in lib.skill){ for(i in lib.skill){
if(lib.translate[i+'_info_'+mode]){ game.finishSkill(i);
lib.translate[i+'_info']=lib.translate[i+'_info_'+mode];
}
if(lib.skill[i].forbid&&lib.skill[i].forbid.contains(mode)){
lib.skill[i]={};
if(lib.translate[i+'_info']){
lib.translate[i+'_info']='此模式下不可用';
}
continue;
}
if(lib.skill[i].mode&&lib.skill[i].mode.contains(mode)==false){
lib.skill[i]={};
if(lib.translate[i+'_info']){
lib.translate[i+'_info']='此模式下不可用';
}
continue;
}
if(lib.skill[i].viewAs){
if(typeof lib.skill[i].viewAs=='string'){
lib.skill[i].viewAs={name:lib.skill[i].viewAs};
}
if(lib.skill[i].ai==undefined) lib.skill[i].ai={};
var skill=lib.skill[i].ai;
if(!lib.card[lib.skill[i].viewAs.name]){
lib.skill[i]={};
lib.translate[i+'_info']='技能不可用';
continue;
}
var card=lib.card[lib.skill[i].viewAs.name].ai;
for(j in card){
if(skill[j]==undefined) skill[j]=card[j];
else if(typeof skill[j]=='object'){
for(var k in card[j]){
if(skill[j][k]==undefined) skill[j][k]=card[j][k];
}
}
}
}
if(lib.skill[i].inherit){
var skill=lib.skill[lib.skill[i].inherit];
for(j in skill){
if(lib.skill[i][j]==undefined) lib.skill[i][j]=skill[j];
}
if(lib.translate[i+'_info']==undefined){
lib.translate[i+'_info']=lib.translate[lib.skill[i].inherit+'_info'];
}
}
if(lib.skill[i].subSkill){
for(var j in lib.skill[i].subSkill){
lib.skill[i+'_'+j]=lib.skill[i].subSkill[j];
if(lib.skill[i].subSkill[j].name){
lib.translate[i+'_'+j]=lib.skill[i].subSkill[j].name;
}
else{
lib.translate[i+'_'+j]=lib.translate[i];
}
if(lib.skill[i].subSkill[j].description){
lib.translate[i+'_'+j+'_info']=lib.skill[i].subSkill[j].description;
}
if(lib.skill[i].subSkill[j].marktext){
lib.translate[i+'_'+j+'_bg']=lib.skill[i].subSkill[j].marktext;
}
}
}
if(lib.skill[i].marktext){
lib.translate[i+'_bg']=lib.skill[i].marktext;
}
if(i[0]=='_'){
game.addGlobalSkill(i);
}
} }
}, },
checkMod:function(){ checkMod:function(){
@ -33296,7 +33304,7 @@
var mode=get.mode(); var mode=get.mode();
if(type=='character'){ if(type=='character'){
if(lib.characterPack['mode_'+mode]&&lib.characterPack['mode_'+mode][name]){ if(lib.characterPack['mode_'+mode]&&lib.characterPack['mode_'+mode][name]){
modeimage=true; modeimage=mode;
} }
else if(lib.character[name]){ else if(lib.character[name]){
nameinfo=lib.character[name]; nameinfo=lib.character[name];
@ -33310,6 +33318,9 @@
else if(nameinfo[4][i].indexOf('db:')==0){ else if(nameinfo[4][i].indexOf('db:')==0){
dbimage=nameinfo[4][i];break; dbimage=nameinfo[4][i];break;
} }
else if(nameinfo[4][i].indexOf('mode:')==0){
modeimage=nameinfo[4][i].slice(5);break;
}
} }
} }
if(extimage){ if(extimage){
@ -33320,7 +33331,7 @@
return this; return this;
} }
else if(modeimage){ else if(modeimage){
src='image/mode/'+get.mode()+'/character/'+name+ext; src='image/mode/'+modeimage+'/character/'+name+ext;
} }
else if(type=='character'&&lib.customCharacters.contains(name)){ else if(type=='character'&&lib.customCharacters.contains(name)){
src=""; src="";

View File

@ -2802,6 +2802,7 @@ mode.boss={
translate:{ translate:{
zhu:'神', zhu:'神',
cai:'盟', cai:'盟',
boss_chi:'魑', boss_chi:'魑',
boss_mo:'魅', boss_mo:'魅',
boss_wang:'魍', boss_wang:'魍',
@ -2812,6 +2813,7 @@ mode.boss={
boss_heiwuchang:'黑无常', boss_heiwuchang:'黑无常',
boss_luocha:'罗刹', boss_luocha:'罗刹',
boss_yecha:'夜叉', boss_yecha:'夜叉',
boss_zhuoguiquxie:'捉鬼驱邪',
boss_nianshou:'年兽', boss_nianshou:'年兽',
boss_nianshou_heti:'合体年兽', boss_nianshou_heti:'合体年兽',
@ -2820,6 +2822,27 @@ mode.boss={
boss_nianshou_baonu:'暴怒年兽', boss_nianshou_baonu:'暴怒年兽',
boss_nianshou_ruizhi:'睿智年兽', boss_nianshou_ruizhi:'睿智年兽',
boss_shuijing:'水镜先生',
boss_huangyueying:'奇智女杰',
boss_zhangchunhua:'冷血皇后',
boss_satan:'堕落天使',
boss_dongzhuo:'乱世魔王',
boss_lvbu1:'最强神话',
boss_lvbu2:'暴怒战神',
boss_zhouyu:'赤壁火神',
boss_pangtong:'涅盘凤雏',
boss_zhugeliang:'祭风卧龙',
boss_zhangjiao:'天公将军',
boss_zuoci:'迷之仙人',
boss_yuji:'琅琊道士',
boss_liubei:'蜀汉烈帝',
boss_caiwenji:'异乡孤女',
boss_huatuo:'药坛圣手',
boss_luxun:'蹁跹君子',
boss_zhenji:'洛水仙子',
boss_diaochan:'绝代妖姬',
boss_zhaoyun:'高达一号',
jiaoxia:'皎霞', jiaoxia:'皎霞',
jiaoxia_info:'每当你成为红色牌的目标,你可以摸一张牌', jiaoxia_info:'每当你成为红色牌的目标,你可以摸一张牌',
lingbo:'凌波', lingbo:'凌波',
@ -2910,7 +2933,6 @@ mode.boss={
boss_shanbeng:'山崩', boss_shanbeng:'山崩',
boss_shanbeng_info:'锁定技,当你死亡时,你令所有其他角色弃置其装备区内的所有牌', boss_shanbeng_info:'锁定技,当你死亡时,你令所有其他角色弃置其装备区内的所有牌',
boss_zhuoguiquxie:'捉鬼驱邪',
boss_bianshen:'出场', boss_bianshen:'出场',
boss_bianshen_info:'游戏开始时,你随机变身为魑、魅、魍、魉中的一个', boss_bianshen_info:'游戏开始时,你随机变身为魑、魅、魍、魉中的一个',
boss_bianshen2:'后援', boss_bianshen2:'后援',
@ -2997,27 +3019,6 @@ mode.boss={
shenji:'神戟', shenji:'神戟',
shenji_info:'你使用的杀或决斗可指定至多3名角色为目标', shenji_info:'你使用的杀或决斗可指定至多3名角色为目标',
boss_shuijing:'水镜先生',
boss_huangyueying:'奇智女杰',
boss_zhangchunhua:'冷血皇后',
boss_satan:'堕落天使',
boss_dongzhuo:'乱世魔王',
boss_lvbu1:'最强神话',
boss_lvbu2:'暴怒战神',
boss_zhouyu:'赤壁火神',
boss_pangtong:'涅盘凤雏',
boss_zhugeliang:'祭风卧龙',
boss_zhangjiao:'天公将军',
boss_zuoci:'迷之仙人',
boss_yuji:'琅琊道士',
boss_liubei:'蜀汉烈帝',
boss_caiwenji:'异乡孤女',
boss_huatuo:'药坛圣手',
boss_luxun:'蹁跹君子',
boss_zhenji:'洛水仙子',
boss_diaochan:'绝代妖姬',
boss_zhaoyun:'高达一号',
mode_boss_character_config:'挑战武将', mode_boss_character_config:'挑战武将',
}, },
ai:{ ai:{