This commit is contained in:
libccy 2015-11-30 21:08:29 +08:00
parent d8fa5c6544
commit 96eebff808
62 changed files with 799 additions and 178 deletions

View File

@ -1,2 +0,0 @@
1.6.1.1
改进触屏操作

BIN
audio/die/re_caocao.mp3 Normal file

Binary file not shown.

BIN
audio/die/re_simayi.mp3 Normal file

Binary file not shown.

View File

@ -120,7 +120,7 @@ card.extra={
return get.suit(card)==get.suit(_status.event.parent.card2); return get.suit(card)==get.suit(_status.event.parent.card2);
},function(card){ },function(card){
if(ai.get.damageEffect(target,player,player,'fire')>0){ if(ai.get.damageEffect(target,player,player,'fire')>0){
return 6-ai.get.value(card,_status.event.player); return 7-ai.get.value(card,_status.event.player);
} }
return -1; return -1;
}).prompt=false; }).prompt=false;
@ -500,7 +500,6 @@ card.extra={
_lianhuan2:'连环', _lianhuan2:'连环',
bingliang:'兵粮寸断', bingliang:'兵粮寸断',
hualiu:'骅骝', hualiu:'骅骝',
hualiu_info:'其他角色与你的距离+1。',
zhuque:'朱雀羽扇', zhuque:'朱雀羽扇',
bingliang_bg:'粮', bingliang_bg:'粮',
bingliang_info:'目标角色判定阶段进行判定:若判定结果不为梅花,则跳过该角色的摸牌阶段。', bingliang_info:'目标角色判定阶段进行判定:若判定结果不为梅花,则跳过该角色的摸牌阶段。',

View File

@ -527,7 +527,7 @@ card.standard={
ai:{ ai:{
basic:{ basic:{
order:9, order:9,
useful:[5,1], useful:[3,1],
value:0 value:0
}, },
result:{ result:{
@ -962,6 +962,7 @@ card.standard={
if(target.hp<3) num--; if(target.hp<3) num--;
if(target.hp<2) num--; if(target.hp<2) num--;
if(target.hp<1) num--; if(target.hp<1) num--;
if(target.isTurnedOver()) num/=2;
return num; return num;
} }
}, },
@ -1524,13 +1525,14 @@ card.standard={
tao_info:'出牌阶段,对自己使用,回复一点体力。', tao_info:'出牌阶段,对自己使用,回复一点体力。',
bagua_info:'每当你需要使用或打出一张【闪】时,你可以进行一次判定,若判定结果为红色,视为你使用或打出了一张【闪】。', bagua_info:'每当你需要使用或打出一张【闪】时,你可以进行一次判定,若判定结果为红色,视为你使用或打出了一张【闪】。',
bagua_skill_info:'每当你需要使用或打出一张【闪】时,你可以进行一次判定,若判定结果为红色,视为你使用或打出了一张【闪】。', bagua_skill_info:'每当你需要使用或打出一张【闪】时,你可以进行一次判定,若判定结果为红色,视为你使用或打出了一张【闪】。',
jueying_info:'其他角色与你的距离+1。', jueying_info:'其他角色与你的距离+1',
dilu_info:'其他角色与你的距离+1。', dilu_info:'其他角色与你的距离+1',
zhuahuang_info:'其他角色与你的距离+1。', zhuahuang_info:'其他角色与你的距离+1',
chitu_info:'你与其他角色的距离-1。', hualiu_info:'其他角色与你的距离+1',
dawan_info:'你与其他角色的距离-1。', chitu_info:'你与其他角色的距离-1',
zixin_info:'你与其他角色的距离-1。', dawan_info:'你与其他角色的距离-1',
jingfanma_info:'你与其他角色的距离-1。', zixin_info:'你与其他角色的距离-1',
jingfanma_info:'你与其他角色的距离-1',
zhuge_skill_info:'你于出牌阶段内使用【杀】无次数限制。', zhuge_skill_info:'你于出牌阶段内使用【杀】无次数限制。',
zhuge_info:'你于出牌阶段内使用【杀】无次数限制。', zhuge_info:'你于出牌阶段内使用【杀】无次数限制。',
cixiong_skill_info:'每当你使用【杀】指定一名异性的目标角色后你可以令其选择一项1.弃置一张手牌2.令你摸一张牌。', cixiong_skill_info:'每当你使用【杀】指定一名异性的目标角色后你可以令其选择一项1.弃置一张手牌2.令你摸一张牌。',

View File

@ -24,7 +24,7 @@ character.hearth={
hs_bchillmaw:['male','wei',6,['hanshuang','bingshi']], hs_bchillmaw:['male','wei',6,['hanshuang','bingshi']],
hs_malorne:['male','wu',3,['enze','chongsheng']], hs_malorne:['male','wu',3,['enze','chongsheng']],
hs_malygos:['male','wei',4,['malymowang']], hs_malygos:['male','wei',4,['malymowang']],
hs_xuefashi:['male','wei',3,['liehun','xjumo']], hs_xuefashi:['male','wei',2,['liehun','xjumo']],
// hs_loatheb:['male','wei',2,[]], // hs_loatheb:['male','wei',2,[]],
// hs_trueheart:['male','wei',2,[]], // hs_trueheart:['male','wei',2,[]],
// hs_sainaliusi:['male','wei',2,[]], // hs_sainaliusi:['male','wei',2,[]],
@ -91,6 +91,7 @@ character.hearth={
xjumo:{ xjumo:{
mod:{ mod:{
maxHandcard:function(player,num){ maxHandcard:function(player,num){
if(player.hp<player.maxHp) return num+5;
return num+3; return num+3;
}, },
}, },
@ -2213,10 +2214,11 @@ character.hearth={
mengjing_mengjing:'梦境', mengjing_mengjing:'梦境',
mengjing_mengjing_info:'令一名角色将装备区内的所有牌收入手牌,并将一张乐不思蜀置于其判定区', mengjing_mengjing_info:'令一名角色将装备区内的所有牌收入手牌,并将一张乐不思蜀置于其判定区',
xjumo:'聚魔', xjumo:'聚魔',
xjumo_info:'锁定技,你的手牌上限+2', xjumo_info:'锁定技,你的手牌上限+3若你已受伤改为+5',
liehun:'裂魂', liehun:'裂魂',
liehun_info:'锁定技,回合结束阶段,你获得手牌中所有非基本牌的复制', liehun_info:'锁定技,回合结束阶段,你获得手牌中所有非基本牌的复制',
malymowang:'魔网', malymowang:'魔网',
malymowang2:'魔网',
malymowang_info:'锁定技,你的锦囊牌造成的伤害+1出牌阶段开始时你观看随机3张锦囊牌并将其中一张加入你的手牌', malymowang_info:'锁定技,你的锦囊牌造成的伤害+1出牌阶段开始时你观看随机3张锦囊牌并将其中一张加入你的手牌',
lingzhou:'灵咒', lingzhou:'灵咒',
lingzhou_info:'每当你使用一张锦囊牌,可令一名角色摸一张牌或回复一点体力', lingzhou_info:'每当你使用一张锦囊牌,可令一名角色摸一张牌或回复一点体力',

View File

@ -104,6 +104,16 @@ character.mountain={
target:function(card,player,target,current){ target:function(card,player,target,current){
if(card.name=='sha'){ if(card.name=='sha'){
if(player.num('h',{type:'basic'})<2) return 0; if(player.num('h',{type:'basic'})<2) return 0;
var bs=player.num('h',{type:'basic'});
if(bs.length<2) return 0;
if(bs.length<=3&&player.num('h','sha')<=1){
for(var i=0;i<bs.length;i++){
if(bs[i].name!='sha'&&ai.get.value(bs[i])<7){
return [1,0,1,-0.5];
}
}
return 0;
}
return [1,0,1,-0.5]; return [1,0,1,-0.5];
} }
} }

View File

@ -1107,6 +1107,7 @@ character.refresh={
trigger:{global:'useCard'}, trigger:{global:'useCard'},
priority:5, priority:5,
filter:function(event,player){ filter:function(event,player){
if(get.type(event.card)!='trick') return false;
if(get.info(event.card).multitarget) return false; if(get.info(event.card).multitarget) return false;
if(event.targets.length<2) return false; if(event.targets.length<2) return false;
if(player.storage.fenwei) return false; if(player.storage.fenwei) return false;

View File

@ -149,6 +149,15 @@ character.sp={
} }
} }
} }
if(att<0&&ui.selected.cards.length==3){
var suit=get.suit(card);
for(var i=0;i<ui.selected.cards.length;i++){
if(get.suit(ui.selected.cards[i])==suit){
return -ai.get.value(card);
}
}
return -10-ai.get.value(card);
}
return -ai.get.value(card); return -ai.get.value(card);
} }
'step 3' 'step 3'

View File

@ -4330,6 +4330,7 @@ character.swd={
}); });
next.logSkill=['huanhun',trigger.player]; next.logSkill=['huanhun',trigger.player];
next.ai=function(card){ next.ai=function(card){
if(card.name=='tao') return 0;
if(ai.get.attitude(player,trigger.player)>0){ if(ai.get.attitude(player,trigger.player)>0){
return 8-ai.get.value(card); return 8-ai.get.value(card);
} }

View File

@ -2368,6 +2368,7 @@ character.yijiang={
trigger:{source:'damageBefore'}, trigger:{source:'damageBefore'},
check:function(event,player){ check:function(event,player){
if(ai.get.damageEffect(event.player,player,player)<0) return true; if(ai.get.damageEffect(event.player,player,player)<0) return true;
if(ai.get.attitude(player,event.player)>0&&event.player.num('j')) return true;
var cards=event.player.get('e'); var cards=event.player.get('e');
for(var i=0;i<cards.length;i++){ for(var i=0;i<cards.length;i++){
if(ai.get.equipValue(cards[i])>=6) return true; if(ai.get.equipValue(cards[i])>=6) return true;
@ -3502,14 +3503,6 @@ character.yijiang={
miji:{ miji:{
audio:2, audio:2,
trigger:{player:'phaseEnd'}, trigger:{player:'phaseEnd'},
check:function(event,player){
for(var i=0;i<game.players.length;i++){
if(game.players[i]!=player&&ai.get.attitude(player,game.players[i])>0){
return true;
}
}
return false;
},
filter:function(event,player){ filter:function(event,player){
return player.hp<player.maxHp; return player.hp<player.maxHp;
}, },

View File

@ -95,7 +95,7 @@ character.zhuogui={
var eff=0; var eff=0;
for(var i=0;i<game.players.length;i++){ for(var i=0;i<game.players.length;i++){
if(!game.players[i].isOut()){ if(!game.players[i].isOut()){
num+=ai.get.damageEffect(game.players[i],player,player,'fire'); eff+=ai.get.damageEffect(game.players[i],player,player,'fire');
} }
} }
return eff; return eff;

View File

@ -244,6 +244,7 @@ window.config={
right_sidebar:false, right_sidebar:false,
button_press:true, button_press:true,
damage_shake:true, damage_shake:true,
slim_player:true,
modeconfig:false, modeconfig:false,
gameconfig:false, gameconfig:false,
@ -317,19 +318,19 @@ window.config={
['lingwu','jilve'], ['lingwu','jilve'],
['lingwu','yongsi'], ['lingwu','yongsi'],
['lingwu','shangshi'], ['lingwu','shangshi'],
['jizhi','zhiheng'], // ['jizhi','zhiheng'],
['xiaoji','zhiheng'], // ['xiaoji','zhiheng'],
['relianying','zhiheng'], // ['relianying','zhiheng'],
['lianying','rende'], ['lianying','rende'],
['lianying','yinguo'], ['lianying','yinguo'],
['lianying','sajin'], // ['lianying','sajin'],
['lianying','qingjian'], ['lianying','qingjian'],
['shangshi','rende'], ['shangshi','rende'],
['shangshi','yinguo'], ['shangshi','yinguo'],
['shangshi','qingjian'], ['shangshi','qingjian'],
['rende','relianying'], ['rende','relianying'],
['yinguo','relianying'], ['yinguo','relianying'],
['sajin','relianying'], // ['sajin','relianying'],
['shenxing','relianying'], ['shenxing','relianying'],
['qingjian','relianying'], ['qingjian','relianying'],
['rende','yuling'], ['rende','yuling'],
@ -342,11 +343,11 @@ window.config={
['reyiji','tuntian'], ['reyiji','tuntian'],
['tuntian','guidao'], ['tuntian','guidao'],
['tuntian','guicai'], ['tuntian','guicai'],
['jiang','chongzhen'], // ['jiang','chongzhen'],
['fenji','yuling'], ['fenji','yuling'],
['jiushi','guixin'], ['jiushi','guixin'],
['jiushi','jushou'], // ['jiushi','jushou'],
['jiushi','kuiwei'], // ['jiushi','kuiwei'],
] ]
}; };
window.mode={}; window.mode={};

View File

@ -16,6 +16,16 @@
dieClose:[] dieClose:[]
}; };
var lib={ var lib={
version:1.62,
changeLog:[
'改进触屏操作,增加上划/下划手势(可在选项-通用中设置)',
'音效菜单中增加音量选项',
'字体选项',
'修改标身份操作',
'装备距离提示',
'加入部分美化版素材(by @tanyuanjkl)',
'界面、bug修复'
],
configprefix:'noname_0.9_', configprefix:'noname_0.9_',
updates:[], updates:[],
canvasUpdates:[], canvasUpdates:[],
@ -71,7 +81,7 @@
unfrequent:true, unfrequent:true,
}, },
low_performance:{ low_performance:{
name:'低性能模式', name:'流畅模式',
init:false, init:false,
onclick:function(bool){ onclick:function(bool){
game.saveConfig('low_performance',bool); game.saveConfig('low_performance',bool);
@ -137,6 +147,8 @@
item:{ item:{
system:'显示按钮', system:'显示按钮',
menu:'打开菜单', menu:'打开菜单',
pause:'切换暂停',
auto:'切换托管'
} }
}, },
swipe_up:{ swipe_up:{
@ -240,6 +252,14 @@
map.right_info.hide(); map.right_info.hide();
map.right_click.hide(); map.right_click.hide();
map.swipe.show(); map.swipe.show();
if(config.swipe){
map.swipe_up.show();
map.swipe_down.show();
}
else{
map.swipe_up.hide();
map.swipe_down.hide();
}
} }
else{ else{
map.mousewheel.show(); map.mousewheel.show();
@ -255,6 +275,8 @@
map.hoveration.show(); map.hoveration.show();
} }
map.swipe.hide(); map.swipe.hide();
map.swipe_up.hide();
map.swipe_down.hide();
} }
} }
} }
@ -446,7 +468,7 @@
init:'default', init:'default',
item:{ item:{
default:'默认', default:'默认',
official:'原版' official:'勾玉',
}, },
onclick:function(layout){ onclick:function(layout){
game.saveConfig('hp_style',layout); game.saveConfig('hp_style',layout);
@ -485,6 +507,20 @@
} }
} }
}, },
slim_player:{
name:'窄边框',
init:true,
unfrequent:true,
onclick:function(bool){
game.saveConfig('slim_player',bool);
if(bool){
ui.arena.classList.add('slim_player');
}
else{
ui.arena.classList.remove('slim_player');
}
}
},
auto_popped_config:{ auto_popped_config:{
name:'自动弹出选项', name:'自动弹出选项',
init:true, init:true,
@ -583,8 +619,8 @@
item:{ item:{
system:'显示按钮', system:'显示按钮',
menu:'打开菜单', menu:'打开菜单',
pause:'切换暂停', // pause:'切换暂停',
auto:'切换托管' // auto:'切换托管'
} }
}, },
show_replay:{ show_replay:{
@ -751,6 +787,66 @@
name:'游戏特效', name:'游戏特效',
init:true, init:true,
}, },
name_font:{
name:'人名字体',
init:'xinwei',
unfrequent:true,
item:{
xinwei:'新魏',
huangcao:'黄草',
xiaozhuan:'小篆',
// default:'默认',
},
onclick:function(font){
game.saveConfig('name_font',font);
ui.arena.dataset.name_font=font;
}
},
identity_font:{
name:'身份字体',
init:'huangcao',
unfrequent:true,
item:{
xinwei:'新魏',
huangcao:'黄草',
xiaozhuan:'小篆',
// default:'默认',
},
onclick:function(font){
game.saveConfig('identity_font',font);
ui.arena.dataset.identity_font=font;
}
},
global_font:{
name:'界面字体',
init:'default',
unfrequent:true,
item:{
xinwei:'新魏',
huangcao:'黄草',
xiaozhuan:'小篆',
default:'默认',
},
onclick:function(font){
game.saveConfig('global_font',font);
ui.arena.dataset.global_font=font;
}
},
// font_size:{
// name:'字体大小',
// init:'16',
// unfrequent:true,
// item:{
// '14':'14px',
// '16':'16px',
// '18':'18px',
// '20':'20px',
// },
// onclick:function(font){
// game.saveConfig('font_size',font);
// ui.arena.dataset.font_size=font;
// }
// },
update:function(config,map){ update:function(config,map){
if(lib.config.image_background=='default'){ if(lib.config.image_background=='default'){
map.image_background_filter.hide(); map.image_background_filter.hide();
@ -799,6 +895,40 @@
background_ogg:{ background_ogg:{
name:'补全配音', name:'补全配音',
init:true init:true
},
volumn_audio:{
name:'音效音量',
init:8,
item:{
'1':'一',
'2':'二',
'3':'三',
'4':'四',
'5':'五',
'6':'六',
'7':'七',
'8':'八',
},
onclick:function(volume){
game.saveConfig('volumn_audio',parseInt(volume));
}
},
volumn_background:{
name:'音乐音量',
init:8,
item:{
'1':'一',
'2':'二',
'3':'三',
'4':'四',
'5':'五',
'6':'六',
'7':'七',
'8':'八',
},
onclick:function(volume){
game.saveConfig('volumn_background',parseInt(volume));
}
} }
} }
}, },
@ -2146,7 +2276,6 @@
var charlist=['standard','wind','fire','woods','mountain','guozhan','sp','yijiang','extra','refresh']; var charlist=['standard','wind','fire','woods','mountain','guozhan','sp','yijiang','extra','refresh'];
for(i in character.pack){ for(i in character.pack){
if(window.minnoname&&charlist.indexOf(i)==-1) continue;
lib.config.all.characters.push(i); lib.config.all.characters.push(i);
lib.translate[i+'_character_config']=character.pack[i]; lib.translate[i+'_character_config']=character.pack[i];
} }
@ -2449,6 +2578,10 @@
// if(!player.skipList.contains('phaseUse')) player.popup('出牌阶段'); // if(!player.skipList.contains('phaseUse')) player.popup('出牌阶段');
player.phaseUse(); player.phaseUse();
"step 3" "step 3"
if(ui.tempnowuxie){
ui.tempnowuxie.close();
delete ui.tempnowuxie;
}
player.phaseDiscard() player.phaseDiscard()
game.delayx(); game.delayx();
}, },
@ -2489,7 +2622,7 @@
}, },
phaseUse:function(){ phaseUse:function(){
"step 0"; "step 0";
player.chooseToUse().modCancel='结束'; player.chooseToUse();
"step 1" "step 1"
if(result.bool){ if(result.bool){
event.goto(0); event.goto(0);
@ -4046,6 +4179,7 @@
delete player.tempSkills[i]; delete player.tempSkills[i];
} }
player.classList.add('dead'); player.classList.add('dead');
player.classList.remove('linked');
player.classList.remove('turnedover'); player.classList.remove('turnedover');
player.classList.remove('out'); player.classList.remove('out');
player.node.count.innerHTML='0'; player.node.count.innerHTML='0';
@ -4321,6 +4455,15 @@
this.hp=this.maxHp; this.hp=this.maxHp;
this.node.count.classList.add('p2'); this.node.count.classList.add('p2');
skills=skills.concat(info2[3]); skills=skills.concat(info2[3]);
var name=get.translation(character2);
this.node.name2.innerHTML='';
if(!lib.config.show_name){
this.node.name2.style.display='none';
}
for(var i=0;i<name.length;i++){
this.node.name2.innerHTML+=name[i]+'<br/>';
}
} }
if(skill!=false){ if(skill!=false){
for(var i=0;i<skills.length;i++){ for(var i=0;i<skills.length;i++){
@ -7260,7 +7403,7 @@
var player=this; var player=this;
var clone; var clone;
// var clone=card.copy('thrown','thrownhighlight',ui.arena); // var clone=card.copy('thrown','thrownhighlight',ui.arena);
if(lib.config.low_performance){ if(true){
clone=player.$throw(card); clone=player.$throw(card);
} }
else{ else{
@ -7344,12 +7487,12 @@
for(var i=0;i<name.length;i++){ for(var i=0;i<name.length;i++){
this.node.name.innerHTML+=name[i]+'<br/>'; this.node.name.innerHTML+=name[i]+'<br/>';
} }
if(lib.card[card[2]].subtype=='equip3'){ // if(lib.card[card[2]].subtype=='equip3'){
this.node.name.innerHTML+='+'; // this.node.name.innerHTML+='+';
} // }
else if(lib.card[card[2]].subtype=='equip4'){ // else if(lib.card[card[2]].subtype=='equip4'){
this.node.name.innerHTML+='-'; // this.node.name.innerHTML+='-';
} // }
this.node.name2.innerHTML=get.translation(card[0])+card[1]+' '+name; this.node.name2.innerHTML=get.translation(card[0])+card[1]+' '+name;
this.suit=card[0]; this.suit=card[0];
this.number=card[1]; this.number=card[1];
@ -7366,6 +7509,25 @@
} }
} }
if(typeof lib.card[card[2]].init=='function') lib.card[card[2]].init(); if(typeof lib.card[card[2]].init=='function') lib.card[card[2]].init();
switch(get.subtype(this)){
case 'equip1':
var added=false;
if(lib.card[this.name]&&lib.card[this.name].distance){
var dist=lib.card[this.name].distance;
if(dist.attackFrom){
added=true;
this.node.range.innerHTML='范围: '+(-dist.attackFrom+1);
}
}
if(!added){
this.node.range.innerHTML='范围: 1';
}
break;
case 'equip3':this.node.range.innerHTML='防御: 1';break;
case 'equip4':this.node.range.innerHTML='进攻: 1';break;
}
return this; return this;
}, },
aiexclude:function(){ aiexclude:function(){
@ -7791,23 +7953,31 @@
ui.controls.remove(this); ui.controls.remove(this);
this.delete(); this.delete();
var that=this; // if(!this._nomove){
setTimeout(function(){ // var that=this;
var nc=true; // setTimeout(function(){
for(var i=0;i<ui.control.childNodes.length;i++){ // var nc=true;
if(!ui.control.childNodes[i].classList.contains('removing')){ // for(var i=0;i<ui.control.childNodes.length;i++){
nc=false;break; // if(!ui.control.childNodes[i].classList.contains('removing')){
} // nc=false;break;
} // }
if(!nc){ // }
that.style.transform='scale(0.8)'; // if(!nc){
} // that.style.transform='scale(0.8)';
ui.updatec(); // }
},100); // ui.updatec();
// },100);
// }
// else{
// ui.updatec();
// }
setTimeout(ui.updatec,100);
if(ui.confirm==this) delete ui.confirm; if(ui.confirm==this) delete ui.confirm;
if(ui.skills==this) delete ui.skills; if(ui.skills==this) delete ui.skills;
if(ui.skills2==this) delete ui.skills2;
if(ui.skills3==this) delete ui.skills3;
}, },
replace:function(){ replace:function(){
while(this.childNodes.length) this.firstChild.remove(); while(this.childNodes.length) this.firstChild.remove();
@ -8265,8 +8435,8 @@
linked:['fire','thunder'], linked:['fire','thunder'],
}; };
var game={ var game={
version:1.31,
playAudio:function(){ playAudio:function(){
if(_status.video&&arguments[1]!='video') return;
var str=''; var str='';
for(var i=0;i<arguments.length;i++){ for(var i=0;i<arguments.length;i++){
if(typeof arguments[i]==='string'||typeof arguments[i]=='number'){ if(typeof arguments[i]==='string'||typeof arguments[i]=='number'){
@ -8298,6 +8468,7 @@
ui.window.appendChild(audio); ui.window.appendChild(audio);
}, },
playSkillAudio:function(name){ playSkillAudio:function(name){
if(_status.video&&arguments[1]!='video') return;
if(_status.skillaudio.contains(name)) return; if(_status.skillaudio.contains(name)) return;
game.addVideo('playSkillAudio',null,name); game.addVideo('playSkillAudio',null,name);
_status.skillaudio.add(name); _status.skillaudio.add(name);
@ -8622,10 +8793,10 @@
} }
}, },
playAudio:function(str){ playAudio:function(str){
game.playAudio(str); game.playAudio(str,'video');
}, },
playSkillAudio:function(name){ playSkillAudio:function(name){
game.playSkillAudio(name); game.playSkillAudio(name,'video');
}, },
phaseChange:function(player){ phaseChange:function(player){
if(player){ if(player){
@ -10557,15 +10728,50 @@
skills.add(skills2[i]); skills.add(skills2[i]);
} }
} }
var globalskills=[];
for(var i=0;i<skills.length;i++){
if(lib.skill.global.contains(skills[i])){
globalskills.push(skills.splice(i--,1)[0]);
}
}
var equipskills=[];
var ownedskills=player.get('s',true,false);
for(var i=0;i<skills.length;i++){
if(!ownedskills.contains(skills[i])){
equipskills.push(skills.splice(i--,1)[0]);
}
}
if(equipskills.length){
ui.create.skills3(equipskills);
}
else if(ui.skills3){
ui.skills3.close();
}
if(skills.length){ if(skills.length){
ui.create.skills(skills); ui.create.skills(skills);
} }
else if(ui.skills){ else if(ui.skills){
ui.skills.close(); ui.skills.close();
} }
if(globalskills.length){
ui.create.skills2(globalskills);
}
else if(ui.skills2){
ui.skills2.close();
}
} }
else if(ui.skills){ else{
ui.skills.close() if(ui.skills){
ui.skills.close()
}
if(ui.skills2){
ui.skills2.close()
}
if(ui.skills3){
ui.skills3.close()
}
} }
_status.multitarget=false; _status.multitarget=false;
var skillinfo=get.info(_status.event.skill); var skillinfo=get.info(_status.event.skill);
@ -11064,9 +11270,35 @@
lib.storage[key]=value; lib.storage[key]=value;
} }
} }
config.version=game.version; config.version=lib.version;
localStorage.setItem(lib.configprefix+lib.config.mode,JSON.stringify(config)); localStorage.setItem(lib.configprefix+lib.config.mode,JSON.stringify(config));
}, },
showChangeLog:function(){
if(lib.version!=lib.config.version){
game.saveConfig('version',lib.version);
var ul=document.createElement('ul');
ul.style.textAlign='left';
for(var i=0;i<lib.changeLog.length;i++){
var li=document.createElement('li');
li.innerHTML=lib.changeLog[i];
ul.appendChild(li);
}
var dialog=ui.create.dialog(lib.version+'更新内容');
dialog.content.appendChild(ul);
var hidden=false;
if(!ui.auto.classList.contains('hidden')){
ui.auto.hide();
hidden=true;
}
game.pause();
var control=ui.create.control('确定',function(){
dialog.close();
control.close();
if(hidden) ui.auto.show();
game.resume();
});
}
},
updateSave:function(){ updateSave:function(){
if(_status.reloading) return; if(_status.reloading) return;
localStorage.setItem(lib.configprefix+lib.config.mode,JSON.stringify(lib.storage)); localStorage.setItem(lib.configprefix+lib.config.mode,JSON.stringify(lib.storage));
@ -11720,15 +11952,15 @@
}, },
control:function(){ control:function(){
var nc=(ui.control.childNodes.length==0); var nc=(ui.control.childNodes.length==0);
for(var i=0;i<ui.control.childNodes.length;i++){ // for(var i=0;i<ui.control.childNodes.length;i++){
if(ui.control.childNodes[i].classList.contains('removing')){ // if(ui.control.childNodes[i].classList.contains('removing')){
var that=ui.control.childNodes[i]; // var that=ui.control.childNodes[i];
var width=that.offsetWidth; // var width=that.offsetWidth;
that.style.marginLeft=(-width/2)+'px'; // that.style.marginLeft=(-width/2)+'px';
that.style.marginRight=(-width/2)+'px'; // that.style.marginRight=(-width/2)+'px';
that.style.transitionDuration=0.8*parseFloat(getComputedStyle(that).opacity)+'s'; // that.style.transitionDuration=0.8*parseFloat(getComputedStyle(that).opacity)+'s';
} // }
} // }
var i,controls; var i,controls;
var nozoom=false; var nozoom=false;
if(get.objtype(arguments[0])=='array') controls=arguments[0]; if(get.objtype(arguments[0])=='array') controls=arguments[0];
@ -11751,26 +11983,26 @@
} }
ui.controls.unshift(control); ui.controls.unshift(control);
if(nc){ if(nc){
ui.control.animate('nozoom',500); ui.control.animate('nozoom',100);
}
if(ui.control.classList.contains('nozoom')){
nozoom=true;
}
if(nozoom){
control.classList.add('nozoom');
} }
// if(ui.control.classList.contains('nozoom')){
// nozoom=true;
// }
// if(nozoom){
// control.classList.add('nozoom');
// }
if(control.childNodes.length){ if(control.childNodes.length){
if(nozoom){ // if(nozoom||true){
control.style.transition='opacity 0.5s'; control.style.transition='opacity 0.5s';
} // }
else{ // else{
control.style.transition=''; // control.style.transition='';
control.style.transform='scale(0.8)'; // control.style.transform='scale(0.8)';
} // }
ui.refresh(control); ui.refresh(control);
control.style.transform='translateX(-'+(control.offsetWidth/2)+'px)';
control.style.opacity=1; control.style.opacity=1;
ui.refresh(control); ui.refresh(control);
control.style.transform='';
control.style.transition=''; control.style.transition='';
} }
ui.updatec(); ui.updatec();
@ -11836,8 +12068,57 @@
ui.skills.style.display='none'; ui.skills.style.display='none';
} }
ui.skills.skills=skills; ui.skills.skills=skills;
ui.skills._nomove=true;
return ui.skills; return ui.skills;
}, },
skills2:function(skills){
var i,same;
if(ui.skills2){
if(ui.skills2.skills.length==skills.length&&ui.skills2.style.display!='none'){
same=true;
for(i=0;i<skills.length;i++){
if(ui.skills2.skills.contains(skills[i])==false){
same=false;
break;
}
}
}
if(same) return;
ui.skills2.close();
delete ui.skills2;
}
if(skills==undefined||skills.length==0) return;
ui.skills2=ui.create.control(skills.concat([ui.click.skill]));
if(!_status.event.isMine()){
ui.skills2.style.display='none';
}
ui.skills2.skills=skills;
return ui.skills2;
},
skills3:function(skills){
var i,same;
if(ui.skills3){
if(ui.skills3.skills.length==skills.length&&ui.skills3.style.display!='none'){
same=true;
for(i=0;i<skills.length;i++){
if(ui.skills3.skills.contains(skills[i])==false){
same=false;
break;
}
}
}
if(same) return;
ui.skills3.close();
delete ui.skills3;
}
if(skills==undefined||skills.length==0) return;
ui.skills3=ui.create.control(skills.concat([ui.click.skill]));
if(!_status.event.isMine()){
ui.skills3.style.display='none';
}
ui.skills3.skills=skills;
return ui.skills3;
},
arena:function(){ arena:function(){
var i,j; var i,j;
ui.window=ui.create.div('#window',document.body).animate('start'); ui.window=ui.create.div('#window',document.body).animate('start');
@ -11856,9 +12137,16 @@
if(lib.config.low_performance){ if(lib.config.low_performance){
ui.arena.classList.add('low_performance'); ui.arena.classList.add('low_performance');
} }
if(lib.config.slim_player){
ui.arena.classList.add('slim_player');
}
if(lib.config.layout=='default'&&lib.config.hp_style=='official'){ if(lib.config.layout=='default'&&lib.config.hp_style=='official'){
ui.arena.classList.add('hpimage'); ui.arena.classList.add('hpimage');
} }
ui.arena.dataset.name_font=lib.config.name_font||'xinwei';
ui.arena.dataset.identity_font=lib.config.identity_font||'huangcao';
ui.arena.dataset.global_font=lib.config.global_font||'default';
// ui.arena.dataset.font_size=lib.config.font_size||'16';
ui.arena.dataset.glow_phase=lib.config.glow_phase; ui.arena.dataset.glow_phase=lib.config.glow_phase;
ui.updatePhone(); ui.updatePhone();
ui.backgroundMusic=document.createElement('audio'); ui.backgroundMusic=document.createElement('audio');
@ -13451,6 +13739,10 @@
page.appendChild(cfgnode); page.appendChild(cfgnode);
} }
var banCharacter=function(){ var banCharacter=function(){
if(_status.clicked){
_status.clicked=false;
return;
}
if(mode.indexOf('mode_')==0){ if(mode.indexOf('mode_')==0){
return; return;
} }
@ -13587,6 +13879,10 @@
page.appendChild(cfgnode); page.appendChild(cfgnode);
} }
var banCard=function(){ var banCard=function(){
if(_status.clicked){
_status.clicked=false;
return;
}
if(mode.indexOf('mode_')==0){ if(mode.indexOf('mode_')==0){
return; return;
} }
@ -14476,6 +14772,7 @@
identity:ui.create.div('.identity',node), identity:ui.create.div('.identity',node),
hp:ui.create.div('.hp',node), hp:ui.create.div('.hp',node),
name:ui.create.div('.name',node), name:ui.create.div('.name',node),
name2:ui.create.div('.name.name2',node),
count:ui.create.div('.count',node).hide(), count:ui.create.div('.count',node).hide(),
equips:ui.create.div('.equips',node).hide(), equips:ui.create.div('.equips',node).hide(),
judges:ui.create.div('.judges',node), judges:ui.create.div('.judges',node),
@ -14576,6 +14873,7 @@
name2:ui.create.div('.name2',node), name2:ui.create.div('.name2',node),
background:ui.create.div('.background',node), background:ui.create.div('.background',node),
intro:ui.create.div('.intro',node), intro:ui.create.div('.intro',node),
range:ui.create.div('.range',node),
} }
for(var i in lib.element.card){ for(var i in lib.element.card){
node[i]=lib.element.card[i]; node[i]=lib.element.card[i];
@ -14613,6 +14911,51 @@
}, },
}, },
click:{ click:{
identity:function(){
if(_status.dragged) return;
_status.clicked=true;
if(!game.getIdentityList) return;
if(_status.clickingidentity){
for(var i=0;i<_status.clickingidentity[1].length;i++){
_status.clickingidentity[1][i].delete();
_status.clickingidentity[1][i].style.transform='';
}
if(_status.clickingidentity[0]==this.parentNode){
delete _status.clickingidentity;
return;
}
}
var list=game.getIdentityList(this.parentNode);
if(!list) return;
var nodes=[];
_status.clickingidentity=[this.parentNode,nodes];
var num=1;
for(var i in list){
if(this.firstChild.innerHTML!=list[i]){
var node=ui.create.div('.identity.hidden',this.parentNode,ui.click.identity2);
ui.create.div(node).innerHTML=list[i];
node.dataset.color=i;
ui.refresh(node);
node.show();
node.style.transform='translateY('+((num++)*30)+'px)';
nodes.push(node);
}
}
},
identity2:function(){
if(_status.clickingidentity){
_status.clicked=true;
var player=_status.clickingidentity[0];
var nodes=_status.clickingidentity[1];
player.node.identity.dataset.color=this.dataset.color;
player.node.identity.firstChild.innerHTML=this.firstChild.innerHTML;
for(var i=0;i<nodes.length;i++){
nodes[i].delete();
nodes[i].style.transform='';
}
delete _status.clickingidentity;
}
},
system:function(){ system:function(){
if(lib.config.layout!='phone') return; if(lib.config.layout!='phone') return;
_status.clicked=true; _status.clicked=true;
@ -15023,15 +15366,18 @@
} }
else if(_status._swipeorigin&&!_status.paused2){ else if(_status._swipeorigin&&!_status.paused2){
if(get.currentTime()-_status._swipeorigin.time<500){ if(get.currentTime()-_status._swipeorigin.time<500){
var dx=_status._swipeorigin.touches.clientX-_status._swipeorigin.clientX; var dx=_status._swipeorigin.touches.clientX-_status._swipeorigin.clientX;
var dy=_status._swipeorigin.touches.clientY-_status._swipeorigin.clientY; var dy=_status._swipeorigin.touches.clientY-_status._swipeorigin.clientY;
if(Math.abs(dx)<100){ if(Math.abs(dx)<100){
if(dy<-200){ if(dy<-200){
switch(lib.config.swipe_up){ switch(lib.config.swipe_up){
case 'system': case 'system':
if(ui.system2.classList.contains('shown')){ if(ui.system2.classList.contains('shown')||
ui.system1.classList.remove('shown'); lib.config.layout!='phone'){
ui.system2.classList.remove('shown'); game.pause2();
ui.click.configMenu();
ui.system1.classList.remove('shown');
ui.system2.classList.remove('shown');
} }
else{ else{
ui.system1.classList.add('shown'); ui.system1.classList.add('shown');
@ -15056,18 +15402,36 @@
} }
} }
else if(dy>200){ else if(dy>200){
if(lib.config.swipe_down=='menu'|| switch(lib.config.swipe_down){
ui.system2.classList.contains('shown')|| case 'system':
lib.config.layout!='phone'){ if(ui.system2.classList.contains('shown')||
game.pause2(); lib.config.layout!='phone'){
ui.click.configMenu(); game.pause2();
ui.system1.classList.remove('shown'); ui.click.configMenu();
ui.system2.classList.remove('shown'); ui.system1.classList.remove('shown');
} ui.system2.classList.remove('shown');
else{ }
ui.system1.classList.add('shown'); else{
ui.system2.classList.add('shown'); ui.system1.classList.add('shown');
} ui.system2.classList.add('shown');
}
break;
case 'menu':
game.pause2();
ui.click.configMenu();
ui.system1.classList.remove('shown');
ui.system2.classList.remove('shown');
break;
case 'pause':
ui.click.pause();
break;
case 'auto':
ui.click.auto();
if(!ui.system1.classList.contains('shown')){
ui.system1.classList.add('shown');
}
break;
}
} }
} }
@ -15463,6 +15827,9 @@
_status.clicked=false; _status.clicked=false;
} }
else{ else{
if(ui.controls.length){
ui.updatec();
}
if(_status.editing){ if(_status.editing){
if(_status.editing.innerHTML.length){ if(_status.editing.innerHTML.length){
_status.editing.link=_status.editing.innerHTML; _status.editing.link=_status.editing.innerHTML;
@ -15881,6 +16248,8 @@
event.restore(); event.restore();
} }
if(ui.skills) ui.skills.close(); if(ui.skills) ui.skills.close();
if(ui.skills2) ui.skills2.close();
if(ui.skills3) ui.skills3.close();
game.uncheck(); game.uncheck();
if(event.custom.add.confirm){ if(event.custom.add.confirm){
event.custom.add.confirm(true); event.custom.add.confirm(true);
@ -15912,6 +16281,8 @@
node.parentNode.close(); node.parentNode.close();
} }
if(ui.skills) ui.skills.close(); if(ui.skills) ui.skills.close();
if(ui.skills2) ui.skills2.close();
if(ui.skills3) ui.skills3.close();
game.uncheck(); game.uncheck();
if(event.custom.add.confirm){ if(event.custom.add.confirm){
event.custom.add.confirm(true); event.custom.add.confirm(true);
@ -16718,7 +17089,12 @@
} }
controls.push(ui.control.childNodes[i]); controls.push(ui.control.childNodes[i]);
if(i>0){ if(i>0){
width+=6; if(lib.config.layout=='phone'){
width+=12;
}
else{
width+=6;
}
} }
} }
if(!controls.length) return; if(!controls.length) return;
@ -16729,6 +17105,9 @@
var control=controls.shift(); var control=controls.shift();
var width=widths.shift(); var width=widths.shift();
offset+=width+6; offset+=width+6;
if(lib.config.layout=='phone'){
offset+=6;
}
control.style.transform='translateX('+offset+'px)'; control.style.transform='translateX('+offset+'px)';
} }
}, },
@ -17325,8 +17704,17 @@
return selectable; return selectable;
}, },
skills:function(){ skills:function(){
if(!ui.skills) return []; var skills=[];
return ui.skills.skills.slice(0); if(ui.skills){
skills=skills.concat(ui.skills.skills);
}
if(ui.skills2){
skills=skills.concat(ui.skills2.skills);
}
if(ui.skills3){
skills=skills.concat(ui.skills3.skills);
}
return skills;
}, },
selectableTargets:function(sort){ selectableTargets:function(sort){
var selectable=[]; var selectable=[];
@ -17904,6 +18292,19 @@
} }
} }
else if(lib.translate[name+'_info']){ else if(lib.translate[name+'_info']){
if(get.subtype(node)=='equip1'){
var added=false;
if(lib.card[node.name]&&lib.card[node.name].distance){
var dist=lib.card[node.name].distance;
if(dist.attackFrom){
added=true;
uiintro.add('<div class="text center">攻击范围:'+(-dist.attackFrom+1)+'</div>');
}
}
if(!added){
uiintro.add('<div class="text center">攻击范围1</div>');
}
}
if(lib.translate[name+'_info'].length<=100){ if(lib.translate[name+'_info'].length<=100){
uiintro.add('<div class="text center">'+lib.translate[name+'_info']+'</div>'); uiintro.add('<div class="text center">'+lib.translate[name+'_info']+'</div>');
} }
@ -19010,7 +19411,8 @@
if(!character[i][j][k][4]){ if(!character[i][j][k][4]){
character[i][j][k][4]=[]; character[i][j][k][4]=[];
} }
if(character[i][j][k][4].contains('boss')){ if(character[i][j][k][4].contains('boss')||
character[i][j][k][4].contains('hiddenboss')){
lib.config.forbidai.add(k); lib.config.forbidai.add(k);
} }
// if(lib.config.only_fullskin&&lib.isNewLayout()&&lib.config.mode!='chess'){ // if(lib.config.only_fullskin&&lib.isNewLayout()&&lib.config.mode!='chess'){

View File

@ -44,9 +44,11 @@ play.pack={
background.pack={ background.pack={
huangyueying_bg:'逐墨', huangyueying_bg:'逐墨',
zhulian_bg:'璧合', zhulian_bg:'璧合',
zhulin_bg:'竹林',
yijiang_bg:'一将',
shengshi_bg:'盛世',
september_bg:'九月', september_bg:'九月',
xueji_bg:'雪霁', xueji_bg:'雪霁',
yinxiang_bg:'印象', yinxiang_bg:'印象',
chunhui_bg:'春晖',
huangtian_bg:'黄天', huangtian_bg:'黄天',
}; };

Binary file not shown.

Before

Width:  |  Height:  |  Size: 462 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 324 KiB

BIN
image/background/shengshi_bg.jpg Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 228 KiB

BIN
image/background/yijiang_bg.jpg Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 797 KiB

BIN
image/background/zhulin_bg.jpg Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 389 KiB

BIN
image/character/bulianshi.jpg Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 111 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 34 KiB

BIN
image/character/caozhang.jpg Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 118 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 34 KiB

BIN
image/character/guanxingzhangbao.jpg Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

After

Width:  |  Height:  |  Size: 114 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

After

Width:  |  Height:  |  Size: 30 KiB

BIN
image/character/guojia.jpg Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 103 KiB

BIN
image/character/handang.jpg Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 112 KiB

BIN
image/character/jiangfei.jpg Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 124 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 38 KiB

BIN
image/character/re_zhangliao.jpg Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 117 KiB

BIN
image/character/sp_guanyu.jpg Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

BIN
image/character/sp_zhangjiao.jpg Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 104 KiB

BIN
image/character/sunshangxiang.jpg Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 21 KiB

BIN
image/character/zhugedan.jpg Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 100 KiB

BIN
image/skin/caoang/2.jpg Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 87 KiB

After

Width:  |  Height:  |  Size: 137 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 70 KiB

View File

@ -6,7 +6,6 @@
<link rel="apple-touch-icon" href="image/meta/icon.png"> <link rel="apple-touch-icon" href="image/meta/icon.png">
<link rel="apple-touch-startup-image" href="starts/image/meta/icon.png"> <link rel="apple-touch-startup-image" href="starts/image/meta/icon.png">
<title>无名杀</title> <title>无名杀</title>
<!-- <script>window.minnoname=true</script> -->
<script src="game/config.js"></script> <script src="game/config.js"></script>
<script src="game/package.js"></script> <script src="game/package.js"></script>
<script src="game/game.js"></script> <script src="game/game.js"></script>

View File

@ -22,6 +22,24 @@ table{table-layout: fixed;}
} }
#window.noclick_important *{pointer-events: none !important;} #window.noclick_important *{pointer-events: none !important;}
#window.noclick_important .noclick_click_important div{pointer-events: auto !important} #window.noclick_important .noclick_click_important div{pointer-events: auto !important}
#arena[data-global_font='xiaozhuan']{
font-family: 'xiaozhuan';
}
#arena[data-global_font='xinwei']{
font-family: 'xinwei';
}
/*#arena[data-font_size='14']{
font-size:14px;
}
#arena[data-font_size='16']{
font-size:16px;
}
#arena[data-font_size='18']{
font-size:18px;
}
#arena[data-font_size='20']{
font-size:20px;
}*/
#arena{width:90%;height: 90%;top: calc(5% + 10px);left: 5%;} #arena{width:90%;height: 90%;top: calc(5% + 10px);left: 5%;}
#arena.right:not(.noleft){left:240px;opacity: 0.6;} #arena.right:not(.noleft){left:240px;opacity: 0.6;}
#arena.left:not(.noleft){left:calc(10% - 240px);opacity: 0.6;} #arena.left:not(.noleft){left:calc(10% - 240px);opacity: 0.6;}
@ -210,6 +228,7 @@ body>.background{z-index:-2}
/*--------卡牌--------*/ /*--------卡牌--------*/
.card{width: 104px;height: 104px;margin-top:8px;margin-left:4px;margin-right: 4px;position: relative;overflow: hidden;} .card{width: 104px;height: 104px;margin-top:8px;margin-left:4px;margin-right: 4px;position: relative;overflow: hidden;}
.card>.info{right: 6px;top: 9px;white-space: nowrap;} .card>.info{right: 6px;top: 9px;white-space: nowrap;}
.card>.range{bottom: 5px;right: 5px;text-align: right;}
.card>.name{top:9px;left: 6px;text-align: center;} .card>.name{top:9px;left: 6px;text-align: center;}
.card>.name2{display:none;} .card>.name2{display:none;}
.card>.intro{top:85px;right: 0;} .card>.intro{top:85px;right: 0;}
@ -341,14 +360,21 @@ margin-bottom: 5px;
.content>.placeholder.slim{margin:1px;} .content>.placeholder.slim{margin:1px;}
.content>.placeholder.removing{margin-top: -13px;} .content>.placeholder.removing{margin-top: -13px;}
.content{display: block;width: 100%;} .content{display: block;width: 100%;}
.dialog:not(.popped) .content{
vertical-align: top;
}
.dialog:not(.popped) .content>.config{ .dialog:not(.popped) .content>.config{
width:200px; width:200px;
left:0; left:0;
margin-left: 20px; margin-left: 20px;
display:inline-block; display:inline-block;
} }
.dialog:not(.popped) .content>.config>.switcher{
position: absolute;
}
.dialog .content>.volumn{ .dialog .content>.volumn{
margin:0; margin:0;
font-family: 'xinwei';
} }
.dialog .content>.volumn>span{ .dialog .content>.volumn>span{
margin-left:2px; margin-left:2px;
@ -393,6 +419,7 @@ margin-bottom: 5px;
#control>div{ #control>div{
position: absolute; position: absolute;
left: 50%; left: 50%;
height: 24px;
} }
/*--------角色--------*/ /*--------角色--------*/
.player>.avatar>.action{ .player>.avatar>.action{
@ -429,7 +456,29 @@ margin-bottom: 5px;
filter:grayscale(1); filter:grayscale(1);
-webkit-filter:grayscale(1); -webkit-filter:grayscale(1);
} }
.player>.name{left: 16px;top:24px;font-family: 'xinwei';font-size:20px}
#arena[data-name_font='xiaozhuan'] .player>.name,
#arena[data-name_font='xiaozhuan'] .button.character>.name{
font-family: 'xiaozhuan';
}
#arena[data-name_font='xinwei'] .player>.name,
#arena[data-name_font='xinwei'] .button.character>.name{
font-family: 'xinwei';
}
#arena[data-name_font='huangcao'] .player>.name,
#arena[data-name_font='huangcao'] .button.character>.name{
font-family: 'huangcao','xinwei';
}
.player>.name{left: 16px;top:24px;font-size:20px;font-family: 'xinwei';}
.player>.name.name2{left:81px}
#arena.slim_player .player>.name{
left:13px;
top:21px;
}
#arena.slim_player .player>.name.name2{
left:78px
}
.button.character>.name{ .button.character>.name{
font-family: 'xinwei' font-family: 'xinwei'
} }
@ -558,7 +607,8 @@ margin-bottom: 5px;
.identity{left: 90px;top:5px;} .identity{left: 90px;top:5px;}
.identity{text-align: center;width: 22px;height: 22px;} .identity{text-align: center;width: 22px;height: 22px;}
.identity>div{position: relative;top: 2px;} .identity>div{position: relative;top: 2px;}
.unseen>.avatar,.unseen>.name,.unseen2>.avatar2{opacity: 0 !important;} .unseen>.avatar,.unseen>.name:not(.name2),
.unseen2>.avatar2,.unseen2>.name2{opacity: 0 !important;}
.player[data-position='0'].unseen>.avatar, .player[data-position='0'].unseen>.avatar,
.player[data-position='0'].unseen2>.avatar2, .player[data-position='0'].unseen2>.avatar2,
.player[data-position='0'].unseen>.name, .player[data-position='0'].unseen>.name,
@ -740,11 +790,13 @@ margin-bottom: 5px;
#arena.selecting:not(.video) .player[data-position='0'] .card:not(.selectable)>.name, #arena.selecting:not(.video) .player[data-position='0'] .card:not(.selectable)>.name,
#arena.selecting:not(.video) .player[data-position='0'] .card:not(.selectable)>.name2, #arena.selecting:not(.video) .player[data-position='0'] .card:not(.selectable)>.name2,
#arena.selecting:not(.video) .player[data-position='0'] .card:not(.selectable)>.info, #arena.selecting:not(.video) .player[data-position='0'] .card:not(.selectable)>.info,
#arena.selecting:not(.video) .player[data-position='0'] .card:not(.selectable)>.range,
#arena.selecting:not(.video) #me .card:not(.selectable)>.background, #arena.selecting:not(.video) #me .card:not(.selectable)>.background,
#arena.selecting:not(.video) #me .card:not(.selectable)>.image, #arena.selecting:not(.video) #me .card:not(.selectable)>.image,
#arena.selecting:not(.video) #me .card:not(.selectable)>.name, #arena.selecting:not(.video) #me .card:not(.selectable)>.name,
#arena.selecting:not(.video) #me .card:not(.selectable)>.name2, #arena.selecting:not(.video) #me .card:not(.selectable)>.name2,
#arena.selecting:not(.video) #me .card:not(.selectable)>.info, #arena.selecting:not(.video) #me .card:not(.selectable)>.info,
#arena.selecting:not(.video) #me .card:not(.selectable)>.range,
#arena.selecting:not(.video) #me .card:not(.selectable)>.addinfo, #arena.selecting:not(.video) #me .card:not(.selectable)>.addinfo,
#arena.selecting:not(.video) .dialog:not(.noselect) .button:not(.selectable):not(.noclick), #arena.selecting:not(.video) .dialog:not(.noselect) .button:not(.selectable):not(.noclick),
.dead,.likedead{opacity: 0.6;} .dead,.likedead{opacity: 0.6;}
@ -754,7 +806,12 @@ margin-bottom: 5px;
opacity:0.8 opacity:0.8
} }
.card.selectable>.background,.card.selectable>.name,.card.selectable>.name2,.card.selectable>.info,.button.selectable{opacity: 1;} .card.selectable>.background,
.card.selectable>.name,
.card.selectable>.name2,
.card.selectable>.info,
.card.selectable>.range,
.button.selectable{opacity: 1;}
.card{color: rgba(0,0,0,0.3);text-shadow:none;} .card{color: rgba(0,0,0,0.3);text-shadow:none;}
.fire{color: rgba(255,0,0,0.3);} .fire{color: rgba(255,0,0,0.3);}
.thunder{color: rgba(0,80,255,0.3);} .thunder{color: rgba(0,80,255,0.3);}
@ -862,6 +919,15 @@ div:hover>.intro{opacity: 1;}
display:inline-flex; display:inline-flex;
transition: all 0.2s; transition: all 0.2s;
} }
#arena[data-identity_font='xiaozhuan'] .player .identity>div{
font-family: 'xiaozhuan';
}
#arena[data-identity_font='xinwei'] .player .identity>div{
font-family: 'xinwei';
}
#arena[data-identity_font='huangcao'] .player .identity>div{
font-family: 'huangcao','xinwei';
}
.player .identity>div{ .player .identity>div{
margin: auto; margin: auto;
position: relative; position: relative;
@ -975,6 +1041,7 @@ div[data-color="unknownm"]{
color:rgb(74, 29, 1); color:rgb(74, 29, 1);
text-shadow: none; text-shadow: none;
text-align:center; text-align:center;
line-height: 18px;
} }
.card.fullskin.thunder>.name{ .card.fullskin.thunder>.name{
color:#152E63; color:#152E63;

View File

@ -8,6 +8,10 @@
left:10px; left:10px;
text-align:left; text-align:left;
} }
#arena.slim_player .player:not([data-position='0']) .equips,
#arena.chess.slim_player .player .equips{
left:7px;
}
.player:not([data-position='0']).minskin .equips, .player:not([data-position='0']).minskin .equips,
#arena.chess .player.minskin .equips{ #arena.chess .player.minskin .equips{
transform:scale(0.73); transform:scale(0.73);
@ -123,10 +127,18 @@
transform:rotate(90deg) translate(-152px,-6px); transform:rotate(90deg) translate(-152px,-6px);
transform-origin:bottom left; transform-origin:bottom left;
} }
#arena.slim_player .player:not([data-position='0']).linked .equips,
#arena.chess.slim_player .player.linked .equips{
transform:rotate(90deg) translate(-155px,-6px);
}
.player:not([data-position='0']).minskin.linked .equips, .player:not([data-position='0']).minskin.linked .equips,
#arena.chess .player.minskin.linked .equips{ #arena.chess .player.minskin.linked .equips{
transform:rotate(90deg) translate(-92px,-6px) scale(0.73); transform:rotate(90deg) translate(-92px,-6px) scale(0.73);
} }
#arena.slim_player .player:not([data-position='0']).minskin.linked .equips,
#arena.chess.slim_player .player.minskin.linked .equips{
transform:rotate(90deg) translate(-95px,-6px) scale(0.73);
}
.player:not([data-position='0']).linked div:not(.equips) .card, .player:not([data-position='0']).linked div:not(.equips) .card,
.player:not([data-position='0']).linked .identity, .player:not([data-position='0']).linked .identity,
#arena.chess .player.linked div:not(.equips) .card, #arena.chess .player.linked div:not(.equips) .card,

View File

@ -93,6 +93,9 @@
left:4px; left:4px;
top:10px; top:10px;
} }
#arena:not(.chess) .player[data-position='0']>.name.name2{
left:69px;
}
#arena:not(.chess) .player[data-position='0']>.identity{ #arena:not(.chess) .player[data-position='0']>.identity{
left: 106px; left: 106px;
top: -8px; top: -8px;
@ -108,9 +111,6 @@
left: 100px; left: 100px;
} }
#arena:not(.chess) .player[data-position='0']:not(.minskin)>.count{ #arena:not(.chess) .player[data-position='0']:not(.minskin)>.count{
z-index: 2;
text-align: right;
left: -4px;
bottom:10px; bottom:10px;
} }
#arena:not(.chess) .player[data-position='0']>.hp.actcount{ #arena:not(.chess) .player[data-position='0']>.hp.actcount{

View File

@ -29,3 +29,6 @@
#arena .player>.name{ #arena .player>.name{
top:36px; top:36px;
} }
#arena.slim_player .player>.name{
top:33px;
}

View File

@ -7,6 +7,9 @@
left:10px; left:10px;
text-align:left; text-align:left;
} }
#arena.slim_player .player .equips{
left: 7px;
}
.player.minskin .equips{ .player.minskin .equips{
transform:scale(0.73); transform:scale(0.73);
transform-origin:bottom left; transform-origin:bottom left;
@ -103,9 +106,15 @@
transform:rotate(90deg) translate(-152px,-6px); transform:rotate(90deg) translate(-152px,-6px);
transform-origin:bottom left; transform-origin:bottom left;
} }
#arena.slim_player .player.linked .equips{
transform:rotate(90deg) translate(-155px,-6px);
}
.player.minskin.linked .equips{ .player.minskin.linked .equips{
transform:rotate(90deg) translate(-92px,-6px) scale(0.73); transform:rotate(90deg) translate(-92px,-6px) scale(0.73);
} }
#arena.slim_player .player.minskin.linked .equips{
transform:rotate(90deg) translate(-95px,-6px) scale(0.73);
}
.player.linked div:not(.equips) .card, .player.linked div:not(.equips) .card,
.player.linked .identity{ .player.linked .identity{
transform:rotate(90deg); transform:rotate(90deg);

View File

@ -6,6 +6,12 @@
width:130px; width:130px;
height:160px; height:160px;
} }
#arena.slim_player .player:not(.minskin):not(.fakeme) .avatar{
width: 136px;
height: 166px;
left:7px;
top:7px;
}
.player.minskin{ .player.minskin{
width:120px; width:120px;
height:120px; height:120px;
@ -15,14 +21,19 @@
height:100px; height:100px;
width:100px; width:100px;
} }
.player.minskin .hp{ #arena.slim_player .player.minskin:not(.fakeme) .avatar:not(.fakeme){
left:88px; width: 106px;
height: 106px;
left:7px;
top:7px;
} }
.player.minskin .hp,
.player.minskin .hp.text{ .player.minskin .hp.text{
left:88px; left:88px;
} }
.player.minskin .hp.longlong{ #arena.slim_player .player.minskin .hp,
left:74px; #arena.slim_player .player.minskin .hp.text{
left:91px;
} }
.player .avatar2{ .player .avatar2{
width:52px; width:52px;
@ -49,11 +60,19 @@
text-align: left; text-align: left;
transform: none; transform: none;
} }
#arena.slim_player .player .actcount.hp{
left: 12px;
top: 15px;
}
.player.fullskin2 .avatar, .player.fullskin2 .avatar,
.player.fullskin2 .avatar2{ .player.fullskin2 .avatar2{
width:65px; width:65px;
background-position:50%; background-position:50%;
} }
#arena.slim_player .player.fullskin2:not(.minskin) .avatar,
#arena.slim_player .player.fullskin2:not(.minskin) .avatar2{
width: 68px;
}
.player.fullskin2 .avatar{ .player.fullskin2 .avatar{
border-radius:8px 0 0 8px; border-radius:8px 0 0 8px;
} }
@ -65,6 +84,11 @@
z-index:1; z-index:1;
border-radius:0 8px 8px 0; border-radius:0 8px 8px 0;
} }
#arena.slim_player .player.fullskin2:not(.minskin) .avatar2{
top:7px;
right:7px;
height: 166px;
}
.player .marks, .player .marks,
.player .judges{ .player .judges{
width:36px; width:36px;
@ -126,6 +150,10 @@
z-index:3; z-index:3;
transform:rotate(180deg); transform:rotate(180deg);
} }
#arena.slim_player .player .hp{
bottom: 15px;
left:121px;
}
.player .hp.text{ .player .hp.text{
font-family:'huangcao','xinwei'; font-family:'huangcao','xinwei';
font-size:22px; font-size:22px;
@ -133,17 +161,15 @@
transition:all 0s; transition:all 0s;
left:114px; left:114px;
} }
#arena.slim_player .player .hp.text{
left:117px;
}
.player .hp.long{ .player .hp.long{
bottom:12px; bottom:12px;
max-height:160px; max-height:160px;
} }
.player .hp.longlong{ #arena.slim_player .player .hp.long{
width:30px; bottom:9px
left:104px;
text-align:left;
}
.player .hp.longlong>div{
margin-left:3px;
} }
.player .hp.long>div:first-child{ .player .hp.long>div:first-child{
margin-top:7px; margin-top:7px;
@ -156,14 +182,14 @@
.player .count{ .player .count{
top:auto; top:auto;
bottom:30px; bottom:30px;
left:-3px; left:-1px;
padding:2px; padding:2px;
line-height:20px; line-height:20px;
width:10px; width:8px;
text-align:left; text-align:left;
border-radius:2px; border-radius:2px;
z-index:1; z-index:3;
border-radius:2px; border-radius:0 2px 2px 0;
box-shadow: rgba(0,0,0,0.2) 1px -1px 2px inset,rgba(255,255,255,0.15) -1px 1px 5px inset; box-shadow: rgba(0,0,0,0.2) 1px -1px 2px inset,rgba(255,255,255,0.15) -1px 1px 5px inset;
} }
.player .count.action{ .player .count.action{

View File

@ -34,10 +34,14 @@
#system{ #system{
z-index: 5; z-index: 5;
} }
#system>div{
transition-duration: 0.3s;
}
#system>div:not(.shown){ #system>div:not(.shown){
opacity: 0; /*opacity: 0;*/
width: 50%; /*width: 50%;
min-width: 50%; min-width: 50%;*/
transform: translateY(-80px); */
} }
#system>div.shown{ #system>div.shown{
min-width: 50%; min-width: 50%;

View File

@ -1,6 +1,40 @@
'use strict'; 'use strict';
mode.guozhan={ mode.guozhan={
game:{ game:{
getIdentityList:function(player){
if(!player.isUnseen()) return;
if(player==game.me) return;
var list={
wei:'魏',
shu:'蜀',
wu:'吴',
qun:'群',
ye:'野',
unknown:'猜'
}
var num=Math.floor((game.players.length+game.dead.length)/2);
var noye=true;
if(get.population('wei')>=num){
delete list.wei;
noye=false;
}
if(get.population('shu')>=num){
delete list.shu;
noye=false;
}
if(get.population('wu')>=num){
delete list.wu;
noye=false;
}
if(get.population('qun')>=num){
delete list.qun;
noye=false;
}
if(noye){
delete list.ye;
}
return list;
},
getVideoName:function(){ getVideoName:function(){
var str=get.translation(game.me.name1)+'/'+get.translation(game.me.name2); var str=get.translation(game.me.name1)+'/'+get.translation(game.me.name2);
var str2=get.cnNumber(parseInt(get.config('player_number')))+'人'+ var str2=get.cnNumber(parseInt(get.config('player_number')))+'人'+
@ -38,6 +72,7 @@ mode.guozhan={
else{ else{
game.prepareArena(); game.prepareArena();
game.delay(); game.delay();
game.showChangeLog();
} }
"step 1" "step 1"
if(lib.storage.test){ if(lib.storage.test){
@ -354,20 +389,20 @@ mode.guozhan={
}, },
ui:{ ui:{
click:{ click:{
identity:function(){ // identity:function(){
if(this.touched) {this.touched=false;return;} // if(this.touched) {this.touched=false;return;}
_status.clicked=true; // _status.clicked=true;
if(this.parentNode.isUnseen()&&this.parentNode!=game.me){ // if(this.parentNode.isUnseen()&&this.parentNode!=game.me){
switch(this.firstChild.innerHTML){ // switch(this.firstChild.innerHTML){
case '魏':this.firstChild.innerHTML='蜀';this.dataset.color='shu';break; // case '魏':this.firstChild.innerHTML='蜀';this.dataset.color='shu';break;
case '蜀':this.firstChild.innerHTML='吴';this.dataset.color='wu';break; // case '蜀':this.firstChild.innerHTML='吴';this.dataset.color='wu';break;
case '吴':this.firstChild.innerHTML='群';this.dataset.color='qun';break; // case '吴':this.firstChild.innerHTML='群';this.dataset.color='qun';break;
case '群':this.firstChild.innerHTML='野';this.dataset.color='ye';break; // case '群':this.firstChild.innerHTML='野';this.dataset.color='ye';break;
case '野':this.firstChild.innerHTML='猜';this.dataset.color='unknown';break; // case '野':this.firstChild.innerHTML='猜';this.dataset.color='unknown';break;
default:this.firstChild.innerHTML='魏';this.dataset.color='wei';break; // default:this.firstChild.innerHTML='魏';this.dataset.color='wei';break;
} // }
} // }
} // }
} }
}, },
translate:{ translate:{

View File

@ -1,6 +1,37 @@
'use strict'; 'use strict';
mode.identity={ mode.identity={
game:{ game:{
getIdentityList:function(player){
if(player.identityShown) return;
if(player==game.me) return;
if(get.config('identity_mode')=='zhong'){
if(game.zhu&&game.zhu.isZhu){
return {
fan:'反',
zhong:'忠',
nei:'内',
cai:'猜',
}
}
else{
return {
fan:'反',
zhong:'忠',
nei:'内',
zhu:'主',
cai:'猜',
}
}
}
else{
return {
fan:'反',
zhong:'忠',
nei:'内',
cai:'猜',
}
}
},
getVideoName:function(){ getVideoName:function(){
var str=get.translation(game.me.name); var str=get.translation(game.me.name);
if(game.me.name2){ if(game.me.name2){
@ -50,6 +81,7 @@ mode.identity={
} }
"step 1" "step 1"
if(!lib.config.new_tutorial){ if(!lib.config.new_tutorial){
game.saveConfig('version',lib.version);
var clear=function(){ var clear=function(){
ui.dialog.close(); ui.dialog.close();
while(ui.controls.length) ui.controls[0].close(); while(ui.controls.length) ui.controls[0].close();
@ -183,7 +215,7 @@ mode.identity={
ui.control.style.top='calc(100% - 105px)'; ui.control.style.top='calc(100% - 105px)';
ui.create.control('在菜单中,可以进行各项设置',function(){ ui.create.control('在菜单中,可以进行各项设置',function(){
ui.click.menuTab('选项'); ui.click.menuTab('选项');
ui.controls[0].replace('如果你感到游戏较卡,可以开启低性能模式',function(){ ui.controls[0].replace('如果你感到游戏较卡,可以开启流畅模式',function(){
ui.controls[0].replace('在技能一栏中,可以设置自动发动或双将禁配的技能',function(){ ui.controls[0].replace('在技能一栏中,可以设置自动发动或双将禁配的技能',function(){
ui.click.menuTab('武将'); ui.click.menuTab('武将');
ui.controls[0].replace('在武将或卡牌一栏中,单击武将/卡牌可以将其禁用',function(){ ui.controls[0].replace('在武将或卡牌一栏中,单击武将/卡牌可以将其禁用',function(){
@ -212,6 +244,9 @@ mode.identity={
game.pause(); game.pause();
step1(); step1();
} }
else{
game.showChangeLog();
}
"step 2" "step 2"
if(lib.storage.test){ if(lib.storage.test){
lib.config.game_speed='vfast'; lib.config.game_speed='vfast';
@ -308,9 +343,7 @@ mode.identity={
console.log('反贼胜利'); console.log('反贼胜利');
} }
} }
for(var i=0;i<game.players.length;i++){ game.showIdentity();
game.players[i].setIdentity(game.players[i].identity);
}
if(game.me.identity=='zhu'||game.me.identity=='zhong'){ if(game.me.identity=='zhu'||game.me.identity=='zhong'){
if(game.zhu.classList.contains('dead')){ if(game.zhu.classList.contains('dead')){
game.over(false); game.over(false);
@ -766,6 +799,9 @@ mode.identity={
game.delay(2); game.delay(2);
game.zhu.playerfocus(1000); game.zhu.playerfocus(1000);
} }
var node=ui.create.div('.damage',get.translation(this.identity+'2'),this);
ui.refresh(node);
node.style.opacity=1;
}, },
logAi:function(targets,card){ logAi:function(targets,card){
if(this.ai.shown==1) return; if(this.ai.shown==1) return;
@ -1001,29 +1037,29 @@ mode.identity={
}, },
ui:{ ui:{
click:{ click:{
identity:function(){ // identity:function(){
if(_status.dragged) return; // if(_status.dragged) return;
_status.clicked=true; // _status.clicked=true;
if(this.parentNode.identityShown) return; // if(this.parentNode.identityShown) return;
if(this.parentNode==game.me) return; // if(this.parentNode==game.me) return;
if(get.config('identity_mode')=='zhong'){ // if(get.config('identity_mode')=='zhong'){
switch(this.firstChild.innerHTML){ // switch(this.firstChild.innerHTML){
case '猜':this.firstChild.innerHTML='反';this.dataset.color='fan';break; // case '猜':this.firstChild.innerHTML='反';this.dataset.color='fan';break;
case '反':this.firstChild.innerHTML='忠';this.dataset.color='zhong';break; // case '反':this.firstChild.innerHTML='忠';this.dataset.color='zhong';break;
case '忠':this.firstChild.innerHTML='内';this.dataset.color='nei';break; // case '忠':this.firstChild.innerHTML='内';this.dataset.color='nei';break;
case '内':this.firstChild.innerHTML='主';this.dataset.color='zhu';break; // case '内':this.firstChild.innerHTML='主';this.dataset.color='zhu';break;
case '主':this.firstChild.innerHTML='猜';this.dataset.color='cai';break; // case '主':this.firstChild.innerHTML='猜';this.dataset.color='cai';break;
} // }
} // }
else{ // else{
switch(this.firstChild.innerHTML){ // switch(this.firstChild.innerHTML){
case '猜':this.firstChild.innerHTML='反';this.dataset.color='fan';break; // case '猜':this.firstChild.innerHTML='反';this.dataset.color='fan';break;
case '反':this.firstChild.innerHTML='忠';this.dataset.color='zhong';break; // case '反':this.firstChild.innerHTML='忠';this.dataset.color='zhong';break;
case '忠':this.firstChild.innerHTML='内';this.dataset.color='nei';break; // case '忠':this.firstChild.innerHTML='内';this.dataset.color='nei';break;
case '内':this.firstChild.innerHTML='猜';this.dataset.color='cai';break; // case '内':this.firstChild.innerHTML='猜';this.dataset.color='cai';break;
} // }
} // }
} // }
} }
}, },
config:['player_number','double_character','double_hp', config:['player_number','double_character','double_hp',

View File

@ -67,6 +67,12 @@ body{
); );
}*/ }*/
.card:empty{
background: url('../style/cardback/image/official.png');
background-size: cover;
}
.menupaused{ .menupaused{
opacity: 0.3; opacity: 0.3;
} }

View File

@ -92,6 +92,10 @@ html{
.card{ .card{
text-shadow:rgba(0,0,0,0.1) 0 0 1px; text-shadow:rgba(0,0,0,0.1) 0 0 1px;
} }
.card.equip3>.range,
.card.equip4>.range{
text-shadow: white 0 0 2px;
}
.card{ .card{
color:rgb(77, 60, 51); color:rgb(77, 60, 51);
text-shadow:none; text-shadow:none;