This commit is contained in:
libccy 2016-04-07 14:42:16 +08:00
parent 4085bedb6a
commit 01885ffad1
11 changed files with 54 additions and 84 deletions

View File

@ -1029,7 +1029,7 @@ character.boss={
"step 1"
var targets=[];
if(result.color=='red'){
game.playAudio('boss_biantianx2');
game.trySkillAudio('boss_biantianx2');
for(var i=0;i<game.players.length;i++){
if(!game.players[i].isFriendOf(player)){
game.players[i].addSkill('boss_biantian3');
@ -1040,7 +1040,7 @@ character.boss={
player.logSkill('kuangfeng',targets,'fire');
}
else if(result.suit=='spade'){
game.playAudio('boss_biantianx1');
game.trySkillAudio('boss_biantianx1');
for(var i=0;i<game.players.length;i++){
if(game.players[i].isFriendOf(player)){
game.players[i].addSkill('boss_biantian2');

View File

@ -295,7 +295,7 @@ character.shenhua={
ai2:function(target){
var evt=_status.event;
if(!evt.check) return 0;
return 1-ai.get.attitude(evt.player,evt.target);
return 1-ai.get.attitude(evt.player,target);
},
filterTarget:function(card,player,target){
return target.num('h')>0;

View File

@ -404,6 +404,7 @@ character.sp={
if(!player.num('he')) return false;
if(event.targets.length>1) return false;
if(!event.target) return false;
if(event.target.hp>=player.hp) return false;
var card=event.card;
if(card.name=='sha') return true;

View File

@ -1,13 +1,9 @@
window.config={
forbidai:['zuoci','caiwenji'],
forbidsingle:['menghuo','huanggai','machao','pangde','yanwen','xiahoudun','xuzhu','luxun',
'xuhuang','yujin','xiaoqiao','daqiao','zhangjiao','zhangbao'],
forbidall:['xiahouyuan','huangzhong','weiyan','dianwei','zhangjiao'],
forbidpack:{
refresh:['caocao','simayi','guanyu','zhangfei','zhaoyun','ganning','lvmeng','lvbu','gongsunzan']
},
forbidall:['xiahouyuan','huangzhong','weiyan','dianwei','zhangjiao',
'caocao','simayi','guanyu','zhangfei','zhaoyun','ganning','lvmeng','lvbu','gongsunzan'],
forbidversus:['swd_kangnalishi'],
forbidstone:['zhugedan','pal_xuanxiao','hs_malfurion','lusu','chenlin',
forbidstone:['zhugedan','pal_xuanxiao','hs_malfurion','lusu','chenlin','hs_siwangzhiyi',
'gjqt_bailitusu','yuanshao','swd_anka','swd_nicole','daqiao','re_daqiao',
'zhuran','huatuo','swd_tuwei','hs_guldan','wangyi','caoang','swd_guyue',
'swd_jiangziya','guojia','re_guojia','shen_caocao','swd_qiner','caopi','hs_yngvar',

View File

@ -2042,6 +2042,11 @@
},
restart:true,
},
ban_weak:{
name:'屏蔽强将',
init:false,
restart:true,
},
ban_strong:{
name:'屏蔽强将',
init:false,
@ -3594,11 +3599,6 @@
delete lib.cardPack.mode_derivation;
}
}
for(i in lib.config.forbidpack){
if(lib.config.characters.contains(i)){
lib.config.forbidall=lib.config.forbidall.concat(lib.config.forbidpack[i]);
}
}
var pilecfg=lib.config.customcardpile[get.config('cardpilename')];
if(pilecfg){
@ -3745,7 +3745,7 @@
else if(lib.config.mode=='connect'){
_status.connectMode=true;
}
if(lib.config.cheat&&(!_status.connectMode||lib.config.debug)){
if(lib.config.cheat&&!lib.storage.test&&(!_status.connectMode||lib.config.debug)){
cheat.i();
}
else{
@ -10900,6 +10900,33 @@
filterButton:function(button){
return true;
},
characterDisabled:function(i){
if(lib.character[i][4]&&lib.character[i][4].contains('forbidai')) return true;
if(lib.config.forbidai.contains(i)) return true;
if(lib.config.banned.contains(i)) return true;
var double_character=false;
if(lib.config.mode=='guozhan'){
double_character=true;
}
else if(get.config('double_character')&&(lib.config.mode=='identity'||lib.config.mode=='stone')){
double_character=true;
}
else if(get.config('double_character_jiange')&&(lib.config.mode=='versus'&&_status.mode=='jiange')){
double_character=true;
}
if(double_character&&lib.config.forbiddouble.contains(i)){
return true;
}
if(get.config('ban_weak')){
if(lib.config.forbidall.contains(i)) return true;
if(!double_character&&(lib.rank.c.contains(i)||lib.rank.d.contains(i))){
return true;
}
}
if(get.config('ban_strong')&&(lib.rank.s.contains(i)||lib.rank.ap.contains(i))){
return true;
}
},
cardEnabled:function(card,player,event){
if(player==undefined) player=_status.event.player;
var filter=get.info(card).enable;
@ -19742,6 +19769,7 @@
var g={};
var logs=[];
var logindex=-1;
var cheat=lib.cheat;
var runCommand=function(e){
if(text2.value){
logindex=-1;
@ -19753,9 +19781,7 @@
else{
try{
var result=eval(text2.value);
if(result!==undefined){
game.print(result);
}
game.print(result);
}
catch(e){
game.print(e);
@ -20161,6 +20187,9 @@
alert('当前版本已是最新');
}
},function(){
if(forcecheck===false){
return;
}
alert('连接失败');
button1.disabled=false;
button1.innerHTML='检查游戏更新';

View File

@ -520,13 +520,8 @@ mode.boss={
if(lib.character[i][4].contains('boss')) continue;
if(lib.character[i][4].contains('hiddenboss')) continue;
if(lib.character[i][4]&&lib.character[i][4].contains('forbidai')) continue;
if(lib.config.forbidai.contains(i)) continue;
if(lib.config.forbidall.contains(i)) continue;
if(lib.config.forbidboss.contains(i)) continue;
if(lib.config.banned.contains(i)) continue;
if(get.config('ban_weak')&&lib.config.forbidsingle.contains(i)) continue;
if(get.config('ban_weak')&&(lib.rank.c.contains(i)||lib.rank.d.contains(i))) continue;
if(get.config('ban_strong')&&(lib.rank.s.contains(i)||lib.rank.ap.contains(i))) continue;
if(lib.filter.characterDisabled(i)) continue;
list.push(i);
}
list.randomSort();

View File

@ -523,16 +523,10 @@ mode.chess={
for(i in lib.character){
if(i.indexOf('treasure_')==0) continue;
if(i.indexOf('chess_mech_')==0) continue;
if(lib.character[i][4]&&lib.character[i][4].contains('forbidai')) continue;
if(lib.character[i][4].contains('minskin')) continue;
if(lib.config.forbidai.contains(i)) continue;
if(lib.config.forbidall.contains(i)) continue;
if(lib.config.forbidchess.contains(i)) continue;
if(lib.config.banned.contains(i)) continue;
if(get.config('ban_weak')&&lib.config.forbidsingle.contains(i)) continue;
if(get.config('ban_weak')&&(lib.rank.c.contains(i)||lib.rank.d.contains(i))) continue;
if(get.config('ban_strong')&&(lib.rank.s.contains(i)||lib.rank.ap.contains(i))) continue;
if(lib.character[i][4].contains('boss')) continue;
if(lib.filter.characterDisabled(i)) continue;
list.push(i);
}
list.randomSort();
@ -3789,15 +3783,9 @@ mode.chess={
}
if(i.indexOf('treasure_')==0) continue;
if(i.indexOf('chess_mech_')==0) continue;
if(lib.character[i][4]&&lib.character[i][4].contains('forbidai')) continue;
if(lib.character[i][4].contains('minskin')) continue;
if(lib.config.forbidai.contains(i)) continue;
if(lib.config.forbidall.contains(i)) continue;
if(lib.config.banned.contains(i)) continue;
if(lib.config.forbidchess.contains(i)) continue;
if(get.config('ban_weak')&&lib.config.forbidsingle.contains(i)) continue;
if(get.config('ban_strong')&&(lib.rank.s.contains(i)||lib.rank.ap.contains(i))) continue;
if(lib.filter.characterDisabled(i)) continue;
list.push(i);
}
list.randomSort();

View File

@ -281,12 +281,7 @@ mode.guozhan={
event.list=[];
for(i in lib.character){
if(chosen.contains(i)) continue;
if(lib.character[i][4]&&lib.character[i][4].contains('forbidai')) continue;
if(lib.config.forbidai.contains(i)) continue;
if(lib.config.forbidall.contains(i)) continue;
if(lib.config.forbiddouble.contains(i)) continue;
if(lib.config.banned.contains(i)) continue;
if(get.config('ban_strong')&&(lib.rank.s.contains(i)||lib.rank.ap.contains(i))) continue;
if(lib.filter.characterDisabled(i)) continue;
if(lib.character[i][2]==3||lib.character[i][2]==4||lib.character[i][2]==5)
event.list.push(i);
}

View File

@ -736,14 +736,7 @@ mode.identity={
game.me.setIdentity();
for(i in lib.character){
if(chosen.contains(i)) continue;
if(lib.character[i][4]&&lib.character[i][4].contains('forbidai')) continue;
if(lib.config.forbidai.contains(i)) continue;
if(lib.config.forbidall.contains(i)) continue;
if(lib.config.banned.contains(i)) continue;
if(!get.config('double_character')&&get.config('ban_weak')&&
(lib.config.forbidsingle.contains(i)||lib.rank.c.contains(i)||lib.rank.d.contains(i))) continue;
if(get.config('ban_strong')&&(lib.rank.s.contains(i)||lib.rank.ap.contains(i))) continue;
if(get.config('double_character')&&lib.config.forbiddouble.contains(i)) continue;
if(lib.filter.characterDisabled(i)) continue;
event.list.push(i);
if(lib.character[i][4]&&lib.character[i][4].contains('zhu')){
list2.push(i);

View File

@ -1434,17 +1434,10 @@ mode.stone={
var list=[];
event.list=list;
for(i in lib.character){
if(lib.character[i][4]&&lib.character[i][4].contains('forbidai')) continue;
if(lib.character[i][4]&&lib.character[i][4].contains('minskin')) continue;
if(lib.character[i][4]&&lib.character[i][4].contains('stonehidden')) continue;
if(lib.config.forbidai.contains(i)) continue;
if(lib.config.forbidall.contains(i)) continue;
if(lib.config.forbidstone.contains(i)) continue;
if(lib.config.banned.contains(i)) continue;
if(!get.config('double_character')&&get.config('ban_weak')&&lib.config.forbidsingle.contains(i)) continue;
if(!get.config('double_character')&&get.config('ban_weak')&&(lib.rank.c.contains(i)||lib.rank.d.contains(i))) continue;
if(get.config('ban_strong')&&(lib.rank.s.contains(i)||lib.rank.ap.contains(i))) continue;
if(get.config('double_character')&&lib.config.forbiddouble.contains(i)) continue;
if(lib.filter.characterDisabled(i)) continue;
list.push(i);
}
list.randomSort();

View File

@ -322,14 +322,7 @@ mode.versus={
list[lib.character[i][1]+'mech'].push(i);continue;
}
}
if(lib.character[i][4]&&lib.character[i][4].contains('forbidai')) continue;
if(lib.config.forbidai.contains(i)) continue;
if(lib.config.forbidall.contains(i)) continue;
if(lib.config.banned.contains(i)) continue;
if(!get.config('double_character')&&get.config('ban_weak')&&
(lib.config.forbidsingle.contains(i)||lib.rank.c.contains(i)||lib.rank.d.contains(i))) continue;
if(get.config('ban_strong')&&(lib.rank.s.contains(i)||lib.rank.ap.contains(i))) continue;
if(get.config('double_character')&&lib.config.forbiddouble.contains(i)) continue;
if(lib.filter.characterDisabled(i)) continue;
if(lib.character[i][1]=='wei'){
list.weilist.push(i);
}
@ -517,14 +510,7 @@ mode.versus={
}
for(i in lib.character){
if(event.filterChoice(i)) continue;
if(lib.character[i][4]&&lib.character[i][4].contains('forbidai')) continue;
if(lib.config.forbidai.contains(i)) continue;
if(lib.config.forbidall.contains(i)) continue;
if(lib.config.banned.contains(i)) continue;
if(!get.config('double_character')&&get.config('ban_weak')&&
(lib.config.forbidsingle.contains(i)||lib.rank.c.contains(i)||lib.rank.d.contains(i))) continue;
if(get.config('ban_strong')&&(lib.rank.s.contains(i)||lib.rank.ap.contains(i))) continue;
if(get.config('double_character')&&lib.config.forbiddouble.contains(i)) continue;
if(lib.filter.characterDisabled(i)) continue;
event.list.push(i);
if(lib.character[i][4]&&lib.character[i][4].contains('zhu')){
list2.push(i);
@ -711,14 +697,8 @@ mode.versus={
_status.color=Math.random()<0.5;
var i,list=[];
for(i in lib.character){
if(lib.config.forbidai.contains(i)) continue;
if(lib.config.forbidversus.contains(i)) continue;
if(lib.config.banned.contains(i)) continue;
if(lib.character[i][4]&&lib.character[i][4].contains('forbidai')) continue;
if(get.config('ban_weak')&&lib.config.forbidsingle.contains(i)) continue;
if(get.config('ban_weak')&&lib.config.forbidall.contains(i)) continue;
if(get.config('ban_weak')&&(lib.rank.c.contains(i)||lib.rank.d.contains(i))) continue;
if(get.config('ban_strong')&&(lib.rank.s.contains(i)||lib.rank.ap.contains(i))) continue;
if(lib.filter.characterDisabled(i)) continue;
list.push(i);
}
var groupSort=function(name){