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);
},function(card){
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;
}).prompt=false;
@ -500,7 +500,6 @@ card.extra={
_lianhuan2:'连环',
bingliang:'兵粮寸断',
hualiu:'骅骝',
hualiu_info:'其他角色与你的距离+1。',
zhuque:'朱雀羽扇',
bingliang_bg:'粮',
bingliang_info:'目标角色判定阶段进行判定:若判定结果不为梅花,则跳过该角色的摸牌阶段。',

View File

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

View File

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

View File

@ -104,6 +104,16 @@ character.mountain={
target:function(card,player,target,current){
if(card.name=='sha'){
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];
}
}

View File

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

View File

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

View File

@ -2368,6 +2368,7 @@ character.yijiang={
trigger:{source:'damageBefore'},
check:function(event,player){
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');
for(var i=0;i<cards.length;i++){
if(ai.get.equipValue(cards[i])>=6) return true;
@ -3502,14 +3503,6 @@ character.yijiang={
miji:{
audio:2,
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){
return player.hp<player.maxHp;
},

View File

@ -95,7 +95,7 @@ character.zhuogui={
var eff=0;
for(var i=0;i<game.players.length;i++){
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;

View File

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

View File

@ -16,6 +16,16 @@
dieClose:[]
};
var lib={
version:1.62,
changeLog:[
'改进触屏操作,增加上划/下划手势(可在选项-通用中设置)',
'音效菜单中增加音量选项',
'字体选项',
'修改标身份操作',
'装备距离提示',
'加入部分美化版素材(by @tanyuanjkl)',
'界面、bug修复'
],
configprefix:'noname_0.9_',
updates:[],
canvasUpdates:[],
@ -71,7 +81,7 @@
unfrequent:true,
},
low_performance:{
name:'低性能模式',
name:'流畅模式',
init:false,
onclick:function(bool){
game.saveConfig('low_performance',bool);
@ -137,6 +147,8 @@
item:{
system:'显示按钮',
menu:'打开菜单',
pause:'切换暂停',
auto:'切换托管'
}
},
swipe_up:{
@ -240,6 +252,14 @@
map.right_info.hide();
map.right_click.hide();
map.swipe.show();
if(config.swipe){
map.swipe_up.show();
map.swipe_down.show();
}
else{
map.swipe_up.hide();
map.swipe_down.hide();
}
}
else{
map.mousewheel.show();
@ -255,6 +275,8 @@
map.hoveration.show();
}
map.swipe.hide();
map.swipe_up.hide();
map.swipe_down.hide();
}
}
}
@ -446,7 +468,7 @@
init:'default',
item:{
default:'默认',
official:'原版'
official:'勾玉',
},
onclick:function(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:{
name:'自动弹出选项',
init:true,
@ -583,8 +619,8 @@
item:{
system:'显示按钮',
menu:'打开菜单',
pause:'切换暂停',
auto:'切换托管'
// pause:'切换暂停',
// auto:'切换托管'
}
},
show_replay:{
@ -751,6 +787,66 @@
name:'游戏特效',
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){
if(lib.config.image_background=='default'){
map.image_background_filter.hide();
@ -799,6 +895,40 @@
background_ogg:{
name:'补全配音',
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'];
for(i in character.pack){
if(window.minnoname&&charlist.indexOf(i)==-1) continue;
lib.config.all.characters.push(i);
lib.translate[i+'_character_config']=character.pack[i];
}
@ -2449,6 +2578,10 @@
// if(!player.skipList.contains('phaseUse')) player.popup('出牌阶段');
player.phaseUse();
"step 3"
if(ui.tempnowuxie){
ui.tempnowuxie.close();
delete ui.tempnowuxie;
}
player.phaseDiscard()
game.delayx();
},
@ -2489,7 +2622,7 @@
},
phaseUse:function(){
"step 0";
player.chooseToUse().modCancel='结束';
player.chooseToUse();
"step 1"
if(result.bool){
event.goto(0);
@ -4046,6 +4179,7 @@
delete player.tempSkills[i];
}
player.classList.add('dead');
player.classList.remove('linked');
player.classList.remove('turnedover');
player.classList.remove('out');
player.node.count.innerHTML='0';
@ -4321,6 +4455,15 @@
this.hp=this.maxHp;
this.node.count.classList.add('p2');
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){
for(var i=0;i<skills.length;i++){
@ -7260,7 +7403,7 @@
var player=this;
var clone;
// var clone=card.copy('thrown','thrownhighlight',ui.arena);
if(lib.config.low_performance){
if(true){
clone=player.$throw(card);
}
else{
@ -7344,12 +7487,12 @@
for(var i=0;i<name.length;i++){
this.node.name.innerHTML+=name[i]+'<br/>';
}
if(lib.card[card[2]].subtype=='equip3'){
this.node.name.innerHTML+='+';
}
else if(lib.card[card[2]].subtype=='equip4'){
this.node.name.innerHTML+='-';
}
// if(lib.card[card[2]].subtype=='equip3'){
// this.node.name.innerHTML+='+';
// }
// else if(lib.card[card[2]].subtype=='equip4'){
// this.node.name.innerHTML+='-';
// }
this.node.name2.innerHTML=get.translation(card[0])+card[1]+' '+name;
this.suit=card[0];
this.number=card[1];
@ -7366,6 +7509,25 @@
}
}
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;
},
aiexclude:function(){
@ -7791,23 +7953,31 @@
ui.controls.remove(this);
this.delete();
var that=this;
setTimeout(function(){
var nc=true;
for(var i=0;i<ui.control.childNodes.length;i++){
if(!ui.control.childNodes[i].classList.contains('removing')){
nc=false;break;
}
}
if(!nc){
that.style.transform='scale(0.8)';
}
ui.updatec();
},100);
// if(!this._nomove){
// var that=this;
// setTimeout(function(){
// var nc=true;
// for(var i=0;i<ui.control.childNodes.length;i++){
// if(!ui.control.childNodes[i].classList.contains('removing')){
// nc=false;break;
// }
// }
// if(!nc){
// that.style.transform='scale(0.8)';
// }
// ui.updatec();
// },100);
// }
// else{
// ui.updatec();
// }
setTimeout(ui.updatec,100);
if(ui.confirm==this) delete ui.confirm;
if(ui.skills==this) delete ui.skills;
if(ui.skills2==this) delete ui.skills2;
if(ui.skills3==this) delete ui.skills3;
},
replace:function(){
while(this.childNodes.length) this.firstChild.remove();
@ -8265,8 +8435,8 @@
linked:['fire','thunder'],
};
var game={
version:1.31,
playAudio:function(){
if(_status.video&&arguments[1]!='video') return;
var str='';
for(var i=0;i<arguments.length;i++){
if(typeof arguments[i]==='string'||typeof arguments[i]=='number'){
@ -8298,6 +8468,7 @@
ui.window.appendChild(audio);
},
playSkillAudio:function(name){
if(_status.video&&arguments[1]!='video') return;
if(_status.skillaudio.contains(name)) return;
game.addVideo('playSkillAudio',null,name);
_status.skillaudio.add(name);
@ -8622,10 +8793,10 @@
}
},
playAudio:function(str){
game.playAudio(str);
game.playAudio(str,'video');
},
playSkillAudio:function(name){
game.playSkillAudio(name);
game.playSkillAudio(name,'video');
},
phaseChange:function(player){
if(player){
@ -10557,16 +10728,51 @@
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){
ui.create.skills(skills);
}
else if(ui.skills){
ui.skills.close();
}
if(globalskills.length){
ui.create.skills2(globalskills);
}
else if(ui.skills){
else if(ui.skills2){
ui.skills2.close();
}
}
else{
if(ui.skills){
ui.skills.close()
}
if(ui.skills2){
ui.skills2.close()
}
if(ui.skills3){
ui.skills3.close()
}
}
_status.multitarget=false;
var skillinfo=get.info(_status.event.skill);
if(_status.event.name=='chooseToUse'){
@ -11064,9 +11270,35 @@
lib.storage[key]=value;
}
}
config.version=game.version;
config.version=lib.version;
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(){
if(_status.reloading) return;
localStorage.setItem(lib.configprefix+lib.config.mode,JSON.stringify(lib.storage));
@ -11720,15 +11952,15 @@
},
control:function(){
var nc=(ui.control.childNodes.length==0);
for(var i=0;i<ui.control.childNodes.length;i++){
if(ui.control.childNodes[i].classList.contains('removing')){
var that=ui.control.childNodes[i];
var width=that.offsetWidth;
that.style.marginLeft=(-width/2)+'px';
that.style.marginRight=(-width/2)+'px';
that.style.transitionDuration=0.8*parseFloat(getComputedStyle(that).opacity)+'s';
}
}
// for(var i=0;i<ui.control.childNodes.length;i++){
// if(ui.control.childNodes[i].classList.contains('removing')){
// var that=ui.control.childNodes[i];
// var width=that.offsetWidth;
// that.style.marginLeft=(-width/2)+'px';
// that.style.marginRight=(-width/2)+'px';
// that.style.transitionDuration=0.8*parseFloat(getComputedStyle(that).opacity)+'s';
// }
// }
var i,controls;
var nozoom=false;
if(get.objtype(arguments[0])=='array') controls=arguments[0];
@ -11751,26 +11983,26 @@
}
ui.controls.unshift(control);
if(nc){
ui.control.animate('nozoom',500);
}
if(ui.control.classList.contains('nozoom')){
nozoom=true;
}
if(nozoom){
control.classList.add('nozoom');
ui.control.animate('nozoom',100);
}
// if(ui.control.classList.contains('nozoom')){
// nozoom=true;
// }
// if(nozoom){
// control.classList.add('nozoom');
// }
if(control.childNodes.length){
if(nozoom){
// if(nozoom||true){
control.style.transition='opacity 0.5s';
}
else{
control.style.transition='';
control.style.transform='scale(0.8)';
}
// }
// else{
// control.style.transition='';
// control.style.transform='scale(0.8)';
// }
ui.refresh(control);
control.style.transform='translateX(-'+(control.offsetWidth/2)+'px)';
control.style.opacity=1;
ui.refresh(control);
control.style.transform='';
control.style.transition='';
}
ui.updatec();
@ -11836,8 +12068,57 @@
ui.skills.style.display='none';
}
ui.skills.skills=skills;
ui.skills._nomove=true;
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(){
var i,j;
ui.window=ui.create.div('#window',document.body).animate('start');
@ -11856,9 +12137,16 @@
if(lib.config.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'){
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.updatePhone();
ui.backgroundMusic=document.createElement('audio');
@ -13451,6 +13739,10 @@
page.appendChild(cfgnode);
}
var banCharacter=function(){
if(_status.clicked){
_status.clicked=false;
return;
}
if(mode.indexOf('mode_')==0){
return;
}
@ -13587,6 +13879,10 @@
page.appendChild(cfgnode);
}
var banCard=function(){
if(_status.clicked){
_status.clicked=false;
return;
}
if(mode.indexOf('mode_')==0){
return;
}
@ -14476,6 +14772,7 @@
identity:ui.create.div('.identity',node),
hp:ui.create.div('.hp',node),
name:ui.create.div('.name',node),
name2:ui.create.div('.name.name2',node),
count:ui.create.div('.count',node).hide(),
equips:ui.create.div('.equips',node).hide(),
judges:ui.create.div('.judges',node),
@ -14576,6 +14873,7 @@
name2:ui.create.div('.name2',node),
background:ui.create.div('.background',node),
intro:ui.create.div('.intro',node),
range:ui.create.div('.range',node),
}
for(var i in lib.element.card){
node[i]=lib.element.card[i];
@ -14613,6 +14911,51 @@
},
},
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(){
if(lib.config.layout!='phone') return;
_status.clicked=true;
@ -15029,7 +15372,10 @@
if(dy<-200){
switch(lib.config.swipe_up){
case 'system':
if(ui.system2.classList.contains('shown')){
if(ui.system2.classList.contains('shown')||
lib.config.layout!='phone'){
game.pause2();
ui.click.configMenu();
ui.system1.classList.remove('shown');
ui.system2.classList.remove('shown');
}
@ -15056,8 +15402,9 @@
}
}
else if(dy>200){
if(lib.config.swipe_down=='menu'||
ui.system2.classList.contains('shown')||
switch(lib.config.swipe_down){
case 'system':
if(ui.system2.classList.contains('shown')||
lib.config.layout!='phone'){
game.pause2();
ui.click.configMenu();
@ -15068,6 +15415,23 @@
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;
}
else{
if(ui.controls.length){
ui.updatec();
}
if(_status.editing){
if(_status.editing.innerHTML.length){
_status.editing.link=_status.editing.innerHTML;
@ -15881,6 +16248,8 @@
event.restore();
}
if(ui.skills) ui.skills.close();
if(ui.skills2) ui.skills2.close();
if(ui.skills3) ui.skills3.close();
game.uncheck();
if(event.custom.add.confirm){
event.custom.add.confirm(true);
@ -15912,6 +16281,8 @@
node.parentNode.close();
}
if(ui.skills) ui.skills.close();
if(ui.skills2) ui.skills2.close();
if(ui.skills3) ui.skills3.close();
game.uncheck();
if(event.custom.add.confirm){
event.custom.add.confirm(true);
@ -16718,9 +17089,14 @@
}
controls.push(ui.control.childNodes[i]);
if(i>0){
if(lib.config.layout=='phone'){
width+=12;
}
else{
width+=6;
}
}
}
if(!controls.length) return;
var offset=-length/2;
var control=controls.shift();
@ -16729,6 +17105,9 @@
var control=controls.shift();
var width=widths.shift();
offset+=width+6;
if(lib.config.layout=='phone'){
offset+=6;
}
control.style.transform='translateX('+offset+'px)';
}
},
@ -17325,8 +17704,17 @@
return selectable;
},
skills:function(){
if(!ui.skills) return [];
return ui.skills.skills.slice(0);
var skills=[];
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){
var selectable=[];
@ -17904,6 +18292,19 @@
}
}
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){
uiintro.add('<div class="text center">'+lib.translate[name+'_info']+'</div>');
}
@ -19010,7 +19411,8 @@
if(!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);
}
// if(lib.config.only_fullskin&&lib.isNewLayout()&&lib.config.mode!='chess'){

View File

@ -44,9 +44,11 @@ play.pack={
background.pack={
huangyueying_bg:'逐墨',
zhulian_bg:'璧合',
zhulin_bg:'竹林',
yijiang_bg:'一将',
shengshi_bg:'盛世',
september_bg:'九月',
xueji_bg:'雪霁',
yinxiang_bg:'印象',
chunhui_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-startup-image" href="starts/image/meta/icon.png">
<title>无名杀</title>
<!-- <script>window.minnoname=true</script> -->
<script src="game/config.js"></script>
<script src="game/package.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 .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.right:not(.noleft){left: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>.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>.name2{display:none;}
.card>.intro{top:85px;right: 0;}
@ -341,14 +360,21 @@ margin-bottom: 5px;
.content>.placeholder.slim{margin:1px;}
.content>.placeholder.removing{margin-top: -13px;}
.content{display: block;width: 100%;}
.dialog:not(.popped) .content{
vertical-align: top;
}
.dialog:not(.popped) .content>.config{
width:200px;
left:0;
margin-left: 20px;
display:inline-block;
}
.dialog:not(.popped) .content>.config>.switcher{
position: absolute;
}
.dialog .content>.volumn{
margin:0;
font-family: 'xinwei';
}
.dialog .content>.volumn>span{
margin-left:2px;
@ -393,6 +419,7 @@ margin-bottom: 5px;
#control>div{
position: absolute;
left: 50%;
height: 24px;
}
/*--------角色--------*/
.player>.avatar>.action{
@ -429,7 +456,29 @@ margin-bottom: 5px;
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{
font-family: 'xinwei'
}
@ -558,7 +607,8 @@ margin-bottom: 5px;
.identity{left: 90px;top:5px;}
.identity{text-align: center;width: 22px;height: 22px;}
.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'].unseen2>.avatar2,
.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)>.name2,
#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)>.image,
#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)>.info,
#arena.selecting:not(.video) #me .card:not(.selectable)>.range,
#arena.selecting:not(.video) #me .card:not(.selectable)>.addinfo,
#arena.selecting:not(.video) .dialog:not(.noselect) .button:not(.selectable):not(.noclick),
.dead,.likedead{opacity: 0.6;}
@ -754,7 +806,12 @@ margin-bottom: 5px;
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;}
.fire{color: rgba(255,0,0,0.3);}
.thunder{color: rgba(0,80,255,0.3);}
@ -862,6 +919,15 @@ div:hover>.intro{opacity: 1;}
display:inline-flex;
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{
margin: auto;
position: relative;
@ -975,6 +1041,7 @@ div[data-color="unknownm"]{
color:rgb(74, 29, 1);
text-shadow: none;
text-align:center;
line-height: 18px;
}
.card.fullskin.thunder>.name{
color:#152E63;

View File

@ -8,6 +8,10 @@
left:10px;
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,
#arena.chess .player.minskin .equips{
transform:scale(0.73);
@ -123,10 +127,18 @@
transform:rotate(90deg) translate(-152px,-6px);
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,
#arena.chess .player.minskin.linked .equips{
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 .identity,
#arena.chess .player.linked div:not(.equips) .card,

View File

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

View File

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

View File

@ -7,6 +7,9 @@
left:10px;
text-align:left;
}
#arena.slim_player .player .equips{
left: 7px;
}
.player.minskin .equips{
transform:scale(0.73);
transform-origin:bottom left;
@ -103,9 +106,15 @@
transform:rotate(90deg) translate(-152px,-6px);
transform-origin:bottom left;
}
#arena.slim_player .player.linked .equips{
transform:rotate(90deg) translate(-155px,-6px);
}
.player.minskin.linked .equips{
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 .identity{
transform:rotate(90deg);

View File

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

View File

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

View File

@ -1,6 +1,40 @@
'use strict';
mode.guozhan={
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(){
var str=get.translation(game.me.name1)+'/'+get.translation(game.me.name2);
var str2=get.cnNumber(parseInt(get.config('player_number')))+'人'+
@ -38,6 +72,7 @@ mode.guozhan={
else{
game.prepareArena();
game.delay();
game.showChangeLog();
}
"step 1"
if(lib.storage.test){
@ -354,20 +389,20 @@ mode.guozhan={
},
ui:{
click:{
identity:function(){
if(this.touched) {this.touched=false;return;}
_status.clicked=true;
if(this.parentNode.isUnseen()&&this.parentNode!=game.me){
switch(this.firstChild.innerHTML){
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='qun';break;
case '群':this.firstChild.innerHTML='野';this.dataset.color='ye';break;
case '野':this.firstChild.innerHTML='猜';this.dataset.color='unknown';break;
default:this.firstChild.innerHTML='魏';this.dataset.color='wei';break;
}
}
}
// identity:function(){
// if(this.touched) {this.touched=false;return;}
// _status.clicked=true;
// if(this.parentNode.isUnseen()&&this.parentNode!=game.me){
// switch(this.firstChild.innerHTML){
// 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='qun';break;
// case '群':this.firstChild.innerHTML='野';this.dataset.color='ye';break;
// case '野':this.firstChild.innerHTML='猜';this.dataset.color='unknown';break;
// default:this.firstChild.innerHTML='魏';this.dataset.color='wei';break;
// }
// }
// }
}
},
translate:{

View File

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

View File

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