1.5.0
This commit is contained in:
parent
a923fe2026
commit
558fce2609
|
@ -1,2 +1,7 @@
|
||||||
1.4.2
|
1.4.2
|
||||||
富含bug的录像功能
|
录像功能
|
||||||
|
AI改进
|
||||||
|
Bug修复
|
||||||
|
触屏设备提示
|
||||||
|
出牌样式改进
|
||||||
|
界面调整
|
||||||
|
|
|
@ -81,7 +81,7 @@ card.ex={
|
||||||
var equip1=player.get('e','1');
|
var equip1=player.get('e','1');
|
||||||
if(equip1&&equip1.name=='qinggang') return 1;
|
if(equip1&&equip1.name=='qinggang') return 1;
|
||||||
if(player.num('s','unequip')) return;
|
if(player.num('s','unequip')) return;
|
||||||
if(card.name=='sha'&&get.color(card)=='black') return 0;
|
if(card.name=='sha'&&get.color(card)=='black') return 'zerotarget';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,8 +25,22 @@ card.extra={
|
||||||
},
|
},
|
||||||
ai:{
|
ai:{
|
||||||
basic:{
|
basic:{
|
||||||
useful:[5,1],
|
useful:function(card,i){
|
||||||
value:[5,1],
|
if(_status.event.player.hp>1){
|
||||||
|
if(i==0) return 5;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
if(i==0) return 7.3;
|
||||||
|
return 3;
|
||||||
|
},
|
||||||
|
value:function(card,player){
|
||||||
|
if(player.hp>1){
|
||||||
|
if(i==0) return 5;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
if(i==0) return 7.3;
|
||||||
|
return 3;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
order:function(){
|
order:function(){
|
||||||
return lib.card.sha.ai.order+0.2;
|
return lib.card.sha.ai.order+0.2;
|
||||||
|
@ -269,6 +283,8 @@ card.extra={
|
||||||
ai:{
|
ai:{
|
||||||
basic:{
|
basic:{
|
||||||
equipValue:function(card,player){
|
equipValue:function(card,player){
|
||||||
|
if(player.hasSkillTag('maixie')&&player.hp>1) return 0;
|
||||||
|
if(ai.get.damageEffect(player,player,player,'fire')>=0) return 10;
|
||||||
var num=3;
|
var num=3;
|
||||||
for(var i=0;i<game.players.length;i++){
|
for(var i=0;i<game.players.length;i++){
|
||||||
if(ai.get.attitude(game.players[i],player)<0) num--;
|
if(ai.get.attitude(game.players[i],player)<0) num--;
|
||||||
|
@ -323,7 +339,8 @@ card.extra={
|
||||||
group:'jiu2'
|
group:'jiu2'
|
||||||
},
|
},
|
||||||
jiu2:{
|
jiu2:{
|
||||||
trigger:{player:'useCardAfter'},
|
trigger:{player:['useCardAfter','shaMiss']},
|
||||||
|
priority:2,
|
||||||
filter:function(event){
|
filter:function(event){
|
||||||
return (event.card&&(event.card.name=='sha'));
|
return (event.card&&(event.card.name=='sha'));
|
||||||
},
|
},
|
||||||
|
@ -373,12 +390,12 @@ card.extra={
|
||||||
effect:{
|
effect:{
|
||||||
target:function(card,player,target,current){
|
target:function(card,player,target,current){
|
||||||
if(player.num('s','unequip')) return;
|
if(player.num('s','unequip')) return;
|
||||||
if(card.name=='nanman'||card.name=='wanjian') return 0;
|
if(card.name=='nanman'||card.name=='wanjian') return 'zerotarget';
|
||||||
if(card.name=='sha'){
|
if(card.name=='sha'){
|
||||||
var equip1=player.get('e','1');
|
var equip1=player.get('e','1');
|
||||||
if(equip1&&equip1.name=='zhuque') return 2;
|
if(equip1&&equip1.name=='zhuque') return 2;
|
||||||
if(equip1&&equip1.name=='qinggang') return 1;
|
if(equip1&&equip1.name=='qinggang') return 1;
|
||||||
if(!card.nature) return 0;
|
if(!card.nature) return 'zerotarget';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -557,6 +557,8 @@ card.hearth={
|
||||||
if(target.hasSkillTag('maixie')&&target.hp>1&&ui.selected.cards.length){
|
if(target.hasSkillTag('maixie')&&target.hp>1&&ui.selected.cards.length){
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
if(player.get('s').contains('xinwuyan')) return 0;
|
||||||
|
if(target.get('s').contains('xinwuyan')) return 0;
|
||||||
if(card.name=='tao') return 0;
|
if(card.name=='tao') return 0;
|
||||||
if(target.hp==1&&card.name=='jiu') return 0;
|
if(target.hp==1&&card.name=='jiu') return 0;
|
||||||
if(get.type(card)!='basic'){
|
if(get.type(card)!='basic'){
|
||||||
|
|
|
@ -272,6 +272,9 @@ card.qimou={
|
||||||
return -0.5;
|
return -0.5;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
wuxie:function(){
|
||||||
|
return 0;
|
||||||
|
},
|
||||||
useful:3,
|
useful:3,
|
||||||
value:7
|
value:7
|
||||||
}
|
}
|
||||||
|
|
|
@ -71,7 +71,7 @@ card.shenbing={
|
||||||
nothunder:true,
|
nothunder:true,
|
||||||
effect:{
|
effect:{
|
||||||
target:function(card,player,target,current){
|
target:function(card,player,target,current){
|
||||||
if(get.tag(card,'natureDamage')) return 0;
|
if(get.tag(card,'natureDamage')) return 'zerotarget';
|
||||||
if(card.name=='tiesuo'){
|
if(card.name=='tiesuo'){
|
||||||
return [0,0];
|
return [0,0];
|
||||||
}
|
}
|
||||||
|
|
|
@ -521,6 +521,7 @@ card.shenqi={
|
||||||
order:7,
|
order:7,
|
||||||
result:{
|
result:{
|
||||||
target:function(player,target){
|
target:function(player,target){
|
||||||
|
if(player.num('h')<=1) return 0;
|
||||||
if(ai.get.attitude(player,target)>=0) return 0;
|
if(ai.get.attitude(player,target)>=0) return 0;
|
||||||
for(var i=0;i<game.players.length;i++){
|
for(var i=0;i<game.players.length;i++){
|
||||||
if(player!=game.players[i]&&
|
if(player!=game.players[i]&&
|
||||||
|
|
|
@ -78,6 +78,12 @@ card.standard={
|
||||||
else{
|
else{
|
||||||
var next=target.chooseToRespond({name:'shan'});
|
var next=target.chooseToRespond({name:'shan'});
|
||||||
next.ai=function(){
|
next.ai=function(){
|
||||||
|
var sks=target.get('s');
|
||||||
|
if(sks.contains('leiji')||
|
||||||
|
sks.contains('diyleiji')||
|
||||||
|
sks.contains('lingbo')){
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
if(ai.get.damageEffect(target,player,target,card.nature)>=0) return -1;
|
if(ai.get.damageEffect(target,player,target,card.nature)>=0) return -1;
|
||||||
return 1;
|
return 1;
|
||||||
};
|
};
|
||||||
|
@ -191,9 +197,12 @@ card.standard={
|
||||||
},
|
},
|
||||||
ai:{
|
ai:{
|
||||||
basic:{
|
basic:{
|
||||||
order:2,
|
order:function(card,player){
|
||||||
useful:[8,5],
|
if(player.hasSkillTag('pretao')) return 5;
|
||||||
value:[8,5],
|
return 2;
|
||||||
|
},
|
||||||
|
useful:[8,6],
|
||||||
|
value:[8,6],
|
||||||
},
|
},
|
||||||
result:{
|
result:{
|
||||||
target:function(player,target){
|
target:function(player,target){
|
||||||
|
@ -217,7 +226,7 @@ card.standard={
|
||||||
}
|
}
|
||||||
if(target.hp<0&&target!=player&&target.identity!='zhu') return 0;
|
if(target.hp<0&&target!=player&&target.identity!='zhu') return 0;
|
||||||
var att=ai.get.attitude(player,target);
|
var att=ai.get.attitude(player,target);
|
||||||
if(att<3&&att>=0) return 0;
|
if(att<3&&att>=0&&player!=target) return 0;
|
||||||
var tri=_status.event.parent._trigger;
|
var tri=_status.event.parent._trigger;
|
||||||
if(lib.config.mode=='identity'&&player.identity=='fan'&&target.identity=='fan'){
|
if(lib.config.mode=='identity'&&player.identity=='fan'&&target.identity=='fan'){
|
||||||
if(tri&&tri.name=='dying'&&tri.source&&tri.source.identity=='fan'&&tri.source!=target){
|
if(tri&&tri.name=='dying'&&tri.source&&tri.source.identity=='fan'&&tri.source!=target){
|
||||||
|
@ -542,6 +551,8 @@ card.standard={
|
||||||
var next=target.chooseToRespond({name:'sha'});
|
var next=target.chooseToRespond({name:'sha'});
|
||||||
next.ai=function(card){
|
next.ai=function(card){
|
||||||
if(ai.get.damageEffect(target,player,target)>=0) return 0;
|
if(ai.get.damageEffect(target,player,target)>=0) return 0;
|
||||||
|
if(player.get('s').contains('xinwuyan')) return 0;
|
||||||
|
if(target.get('s').contains('xinwuyan')) return 0;
|
||||||
return 1;
|
return 1;
|
||||||
};
|
};
|
||||||
next.autochoose=lib.filter.autoRespondSha;
|
next.autochoose=lib.filter.autoRespondSha;
|
||||||
|
@ -593,6 +604,8 @@ card.standard={
|
||||||
var next=target.chooseToRespond({name:'shan'});
|
var next=target.chooseToRespond({name:'shan'});
|
||||||
next.ai=function(card){
|
next.ai=function(card){
|
||||||
if(ai.get.damageEffect(target,player,target)>=0) return 0;
|
if(ai.get.damageEffect(target,player,target)>=0) return 0;
|
||||||
|
if(player.get('s').contains('xinwuyan')) return 0;
|
||||||
|
if(target.get('s').contains('xinwuyan')) return 0;
|
||||||
return 1;
|
return 1;
|
||||||
};
|
};
|
||||||
next.autochoose=lib.filter.autoRespondShan;
|
next.autochoose=lib.filter.autoRespondShan;
|
||||||
|
@ -676,6 +689,8 @@ card.standard={
|
||||||
else{
|
else{
|
||||||
var next=event.turn.chooseToRespond({name:'sha'});
|
var next=event.turn.chooseToRespond({name:'sha'});
|
||||||
next.ai=function(card){
|
next.ai=function(card){
|
||||||
|
if(player.get('s').contains('xinwuyan')) return 0;
|
||||||
|
if(target.get('s').contains('xinwuyan')) return 0;
|
||||||
if(event.turn==target){
|
if(event.turn==target){
|
||||||
if(ai.get.attitude(target,player)<0){
|
if(ai.get.attitude(target,player)<0){
|
||||||
return ai.get.unuseful2(card)
|
return ai.get.unuseful2(card)
|
||||||
|
@ -783,7 +798,24 @@ card.standard={
|
||||||
}
|
}
|
||||||
return -1.5;
|
return -1.5;
|
||||||
},
|
},
|
||||||
player:1
|
player:function(player,target){
|
||||||
|
if(ai.get.attitude(player,target)<0&&!target.num('he')){
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
if(ai.get.attitude(player,target)>1){
|
||||||
|
var js=target.get('j');
|
||||||
|
if(js.length){
|
||||||
|
var jj=js[0].viewAs?{name:js[0].viewAs}:js[0];
|
||||||
|
if(jj.name=='shunshou') return 1;
|
||||||
|
if(js.length==1&&ai.get.effect(target,jj,target,player)>=0){
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
tag:{
|
tag:{
|
||||||
loseCard:1,
|
loseCard:1,
|
||||||
|
@ -1119,7 +1151,7 @@ card.standard={
|
||||||
if(player.skills.contains('jiu')||
|
if(player.skills.contains('jiu')||
|
||||||
player.skills.contains('tianxianjiu')||
|
player.skills.contains('tianxianjiu')||
|
||||||
trigger.target.hp==1){
|
trigger.target.hp==1){
|
||||||
return 7-ai.get.value(card)
|
return 8-ai.get.value(card)
|
||||||
}
|
}
|
||||||
return 5-ai.get.value(card)
|
return 5-ai.get.value(card)
|
||||||
}
|
}
|
||||||
|
@ -1157,7 +1189,14 @@ card.standard={
|
||||||
audio:true,
|
audio:true,
|
||||||
content:function(){
|
content:function(){
|
||||||
"step 0"
|
"step 0"
|
||||||
player.chooseButton(ui.create.dialog('选择要弃置的马',trigger.target.get('e',{subtype:['equip3','equip4']})));
|
var att=(ai.get.attitude(player,trigger.target)<=0);
|
||||||
|
player.chooseButton(ui.create.dialog('选择要弃置的马',
|
||||||
|
trigger.target.get('e',{subtype:['equip3','equip4']}))).ai=function(button){
|
||||||
|
if(att){
|
||||||
|
return ai.get.buttonValue(button);
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
};
|
||||||
"step 1"
|
"step 1"
|
||||||
if(result.bool){
|
if(result.bool){
|
||||||
player.logSkill('qilin_skill');
|
player.logSkill('qilin_skill');
|
||||||
|
@ -1272,6 +1311,13 @@ card.standard={
|
||||||
var aiii=info.ai.wuxie(trigger.target,trigger.card,trigger.player,_status.event.player,state);
|
var aiii=info.ai.wuxie(trigger.target,trigger.card,trigger.player,_status.event.player,state);
|
||||||
if(typeof aiii=='number') return aiii;
|
if(typeof aiii=='number') return aiii;
|
||||||
}
|
}
|
||||||
|
if(info.multitarget){
|
||||||
|
var eff=0;
|
||||||
|
for(var i=0;i<trigger.targets.length;i++){
|
||||||
|
eff+=ai.get.effect(trigger.targets[i],trigger.card,trigger.player,_status.event.player)
|
||||||
|
}
|
||||||
|
return -eff*state;
|
||||||
|
}
|
||||||
if(Math.abs(ai.get.attitude(_status.event.player,trigger.target))<3) return 0;
|
if(Math.abs(ai.get.attitude(_status.event.player,trigger.target))<3) return 0;
|
||||||
return -ai.get.effect(trigger.target,trigger.card,trigger.player,_status.event.player)*state;
|
return -ai.get.effect(trigger.target,trigger.card,trigger.player,_status.event.player)*state;
|
||||||
},
|
},
|
||||||
|
|
|
@ -406,6 +406,8 @@ card.swd={
|
||||||
var next=target.chooseToRespond({name:'sha'});
|
var next=target.chooseToRespond({name:'sha'});
|
||||||
next.ai=function(card){
|
next.ai=function(card){
|
||||||
if(ai.get.damageEffect(target,player,target,'thunder')>=0) return 0;
|
if(ai.get.damageEffect(target,player,target,'thunder')>=0) return 0;
|
||||||
|
if(player.get('s').contains('xinwuyan')) return 0;
|
||||||
|
if(target.get('s').contains('xinwuyan')) return 0;
|
||||||
return 1;
|
return 1;
|
||||||
};
|
};
|
||||||
next.autochoose=lib.filter.autoRespondSha;
|
next.autochoose=lib.filter.autoRespondSha;
|
||||||
|
@ -459,6 +461,8 @@ card.swd={
|
||||||
var next=target.chooseToRespond({name:'shan'});
|
var next=target.chooseToRespond({name:'shan'});
|
||||||
next.ai=function(card){
|
next.ai=function(card){
|
||||||
if(ai.get.damageEffect(target,player,target,'fire')>=0) return 0;
|
if(ai.get.damageEffect(target,player,target,'fire')>=0) return 0;
|
||||||
|
if(player.get('s').contains('xinwuyan')) return 0;
|
||||||
|
if(target.get('s').contains('xinwuyan')) return 0;
|
||||||
return 1;
|
return 1;
|
||||||
};
|
};
|
||||||
next.autochoose=lib.filter.autoRespondShan;
|
next.autochoose=lib.filter.autoRespondShan;
|
||||||
|
|
|
@ -246,6 +246,8 @@ card.yibao={
|
||||||
target.chooseToDiscard('he',[1,2]).ai=function(card){
|
target.chooseToDiscard('he',[1,2]).ai=function(card){
|
||||||
if(target.hasSkillTag('nofire')) return 0;
|
if(target.hasSkillTag('nofire')) return 0;
|
||||||
if(ai.get.damageEffect(target,player,target,'fire')>=0) return 0;
|
if(ai.get.damageEffect(target,player,target,'fire')>=0) return 0;
|
||||||
|
if(player.get('s').contains('xinwuyan')) return 0;
|
||||||
|
if(target.get('s').contains('xinwuyan')) return 0;
|
||||||
if(target.hasSkillTag('maixie')&&target.hp>1&&ui.selected.cards.length){
|
if(target.hasSkillTag('maixie')&&target.hp>1&&ui.selected.cards.length){
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -311,6 +313,8 @@ card.yibao={
|
||||||
};
|
};
|
||||||
"step 2"
|
"step 2"
|
||||||
event.card2=result.cards[0];
|
event.card2=result.cards[0];
|
||||||
|
ui.arena.classList.add('thrownhighlight');
|
||||||
|
game.addVideo('thrownhighlight1');
|
||||||
player.$compare(event.card1,target,event.card2);
|
player.$compare(event.card1,target,event.card2);
|
||||||
game.delay(4);
|
game.delay(4);
|
||||||
"step 3"
|
"step 3"
|
||||||
|
@ -333,6 +337,8 @@ card.yibao={
|
||||||
target.$gain2(event.card2);
|
target.$gain2(event.card2);
|
||||||
target.addTempSkill('dujian2','phaseBegin');
|
target.addTempSkill('dujian2','phaseBegin');
|
||||||
}
|
}
|
||||||
|
ui.arena.classList.remove('thrownhighlight');
|
||||||
|
game.addVideo('thrownhighlight2');
|
||||||
},
|
},
|
||||||
ai:{
|
ai:{
|
||||||
basic:{
|
basic:{
|
||||||
|
|
|
@ -235,7 +235,7 @@ character.extra={
|
||||||
};
|
};
|
||||||
"step 1"
|
"step 1"
|
||||||
if(result.bool){
|
if(result.bool){
|
||||||
player.respond(result.cards);
|
player.respond(result.cards,'highlight');
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
event.finish();
|
event.finish();
|
||||||
|
|
|
@ -953,6 +953,10 @@ character.hearth={
|
||||||
"step 0"
|
"step 0"
|
||||||
ui.discardPile.appendChild(player.storage.mdzhoufu2);
|
ui.discardPile.appendChild(player.storage.mdzhoufu2);
|
||||||
player.$throw(player.storage.mdzhoufu2);
|
player.$throw(player.storage.mdzhoufu2);
|
||||||
|
if(player.storage.mdzhoufu2.clone){
|
||||||
|
player.storage.mdzhoufu2.clone.classList.add('thrownhighlight');
|
||||||
|
game.addVideo('highlightnode',player,get.cardInfo(player.storage.mdzhoufu2));
|
||||||
|
}
|
||||||
if(player.storage.mdzhoufu3.isAlive()){
|
if(player.storage.mdzhoufu3.isAlive()){
|
||||||
// player.storage.mdzhoufu3.draw();
|
// player.storage.mdzhoufu3.draw();
|
||||||
player.storage.mdzhoufu3.gain(player.judging,'gain2');
|
player.storage.mdzhoufu3.gain(player.judging,'gain2');
|
||||||
|
|
|
@ -478,6 +478,7 @@ character.mountain={
|
||||||
ai:{
|
ai:{
|
||||||
effect:{
|
effect:{
|
||||||
target:function(card,player,target,current){
|
target:function(card,player,target,current){
|
||||||
|
if(!target.hasFriend()) return;
|
||||||
if(get.tag(card,'loseCard')&&_status.currentPhase!=target&&target.num('he')){
|
if(get.tag(card,'loseCard')&&_status.currentPhase!=target&&target.num('he')){
|
||||||
return [0.5,Math.max(2,target.num('h'))];
|
return [0.5,Math.max(2,target.num('h'))];
|
||||||
}
|
}
|
||||||
|
|
|
@ -111,7 +111,7 @@ character.refresh={
|
||||||
};
|
};
|
||||||
"step 1"
|
"step 1"
|
||||||
if(result.bool){
|
if(result.bool){
|
||||||
player.respond(result.cards);
|
player.respond(result.cards,'highlight');
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
event.finish();
|
event.finish();
|
||||||
|
@ -125,6 +125,8 @@ character.refresh={
|
||||||
}
|
}
|
||||||
ui.discardPile.appendChild(trigger.player.judging);
|
ui.discardPile.appendChild(trigger.player.judging);
|
||||||
trigger.player.judging=result.cards[0];
|
trigger.player.judging=result.cards[0];
|
||||||
|
trigger.position.appendChild(result.cards[0]);
|
||||||
|
game.log(get.translation(trigger.player)+'的判定牌改为'+get.translation(result.cards[0]));
|
||||||
game.delay(2);
|
game.delay(2);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -518,7 +520,9 @@ character.refresh={
|
||||||
content:function(){
|
content:function(){
|
||||||
"step 0"
|
"step 0"
|
||||||
event.card=get.cards()[0];
|
event.card=get.cards()[0];
|
||||||
event.node=event.card.copy('thrown','center',ui.arena).animate('start');
|
event.node=event.card.copy('thrown','center','thrownhighlight',ui.arena).animate('start');
|
||||||
|
ui.arena.classList.add('thrownhighlight');
|
||||||
|
game.addVideo('thrownhighlight1');
|
||||||
game.addVideo('centernode',null,get.cardInfo(event.card));
|
game.addVideo('centernode',null,get.cardInfo(event.card));
|
||||||
if(get.type(event.card,'trick')==get.type(trigger.card,'trick')){
|
if(get.type(event.card,'trick')==get.type(trigger.card,'trick')){
|
||||||
player.chooseTarget('选择获得此牌的角色').ai=function(target){
|
player.chooseTarget('选择获得此牌的角色').ai=function(target){
|
||||||
|
@ -558,6 +562,8 @@ character.refresh={
|
||||||
game.addVideo('deletenode',player,[get.cardInfo(event.node)]);
|
game.addVideo('deletenode',player,[get.cardInfo(event.node)]);
|
||||||
}
|
}
|
||||||
event.node.delete();
|
event.node.delete();
|
||||||
|
game.addVideo('thrownhighlight2');
|
||||||
|
ui.arena.classList.remove('thrownhighlight');
|
||||||
},
|
},
|
||||||
ai:{
|
ai:{
|
||||||
effect:{
|
effect:{
|
||||||
|
|
|
@ -2006,7 +2006,7 @@ character.sp={
|
||||||
"step 1"
|
"step 1"
|
||||||
if(result.bool){
|
if(result.bool){
|
||||||
event.card=result.buttons[0].link;
|
event.card=result.buttons[0].link;
|
||||||
player.respond(event.card);
|
player.respond(event.card,'highlight');
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
event.finish();
|
event.finish();
|
||||||
|
|
|
@ -161,7 +161,7 @@ character.standard={
|
||||||
};
|
};
|
||||||
"step 1"
|
"step 1"
|
||||||
if(result.bool){
|
if(result.bool){
|
||||||
player.respond(result.cards);
|
player.respond(result.cards,'highlight');
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
event.finish();
|
event.finish();
|
||||||
|
@ -349,6 +349,7 @@ character.standard={
|
||||||
target:function(card,player,target){
|
target:function(card,player,target){
|
||||||
if(get.tag(card,'damage')){
|
if(get.tag(card,'damage')){
|
||||||
if(player.skills.contains('jueqing')) return [1,-2];
|
if(player.skills.contains('jueqing')) return [1,-2];
|
||||||
|
if(!target.hasFriend()) return;
|
||||||
if(target.hp>=4) return [1,get.tag(card,'damage')*2];
|
if(target.hp>=4) return [1,get.tag(card,'damage')*2];
|
||||||
if(target.hp==3) return [1,get.tag(card,'damage')*1.5];
|
if(target.hp==3) return [1,get.tag(card,'damage')*1.5];
|
||||||
if(target.hp==2) return [1,get.tag(card,'damage')*0.5];
|
if(target.hp==2) return [1,get.tag(card,'damage')*0.5];
|
||||||
|
@ -434,6 +435,15 @@ character.standard={
|
||||||
if(ui.selected.cards.length){
|
if(ui.selected.cards.length){
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
for(var i=0;i<game.players.length;i++){
|
||||||
|
if(game.players[i].get('s').contains('haoshi')&&
|
||||||
|
!game.players[i].isTurnedOver()&&
|
||||||
|
!game.players[i].num('j','lebu')&&
|
||||||
|
ai.get.attitude(player,game.players[i])>=3&&
|
||||||
|
ai.get.attitude(game.players[i],player)>=3){
|
||||||
|
return 11-ai.get.value(card);
|
||||||
|
}
|
||||||
|
}
|
||||||
if(player.num('h')>player.hp) return 10-ai.get.value(card);
|
if(player.num('h')>player.hp) return 10-ai.get.value(card);
|
||||||
if(player.num('h')>2) return 6-ai.get.value(card);
|
if(player.num('h')>2) return 6-ai.get.value(card);
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -455,13 +465,19 @@ character.standard={
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
ai:{
|
ai:{
|
||||||
order:10,
|
order:function(skill,player){
|
||||||
|
if(player.hp<player.maxHp&&player.storage.rende<2&&player.num('h')>1){
|
||||||
|
return 10;
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
|
},
|
||||||
result:{
|
result:{
|
||||||
target:function(player,target){
|
target:function(player,target){
|
||||||
|
if(target.num('j','lebu')) return 0;
|
||||||
var nh=target.num('h');
|
var nh=target.num('h');
|
||||||
var np=player.num('h');
|
var np=player.num('h');
|
||||||
if(player.hp==player.maxHp||player.storage.rende<0||player.num('h')<=1){
|
if(player.hp==player.maxHp||player.storage.rende<0||player.num('h')<=1){
|
||||||
if(nh>=np-1&&np<=player.hp) return 0;
|
if(nh>=np-1&&np<=player.hp&&!target.get('s').contains('haoshi')) return 0;
|
||||||
}
|
}
|
||||||
return Math.max(1,5-nh);
|
return Math.max(1,5-nh);
|
||||||
}
|
}
|
||||||
|
@ -553,6 +569,11 @@ character.standard={
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
filterTarget:function(card,player,target){
|
filterTarget:function(card,player,target){
|
||||||
|
if(_status.event._backup&&
|
||||||
|
typeof _status.event._backup.filterTarget=='function'&&
|
||||||
|
!_status.event._backup.filterTarget({name:'sha'},player,target)){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
return player.canUse({name:'sha'},target);
|
return player.canUse({name:'sha'},target);
|
||||||
},
|
},
|
||||||
content:function(){
|
content:function(){
|
||||||
|
@ -560,6 +581,7 @@ character.standard={
|
||||||
if(event.current==undefined) event.current=player.next;
|
if(event.current==undefined) event.current=player.next;
|
||||||
if(event.current==player){
|
if(event.current==player){
|
||||||
player.addTempSkill('jijiang3','phaseAfter');
|
player.addTempSkill('jijiang3','phaseAfter');
|
||||||
|
event.parent.parent.step=0;
|
||||||
event.finish();
|
event.finish();
|
||||||
}
|
}
|
||||||
else if(event.current.group=='shu'){
|
else if(event.current.group=='shu'){
|
||||||
|
|
|
@ -706,6 +706,7 @@ character.swd={
|
||||||
if(ai.get.effect(trigger.target,{name:'sha'},player,player)>0){
|
if(ai.get.effect(trigger.target,{name:'sha'},player,player)>0){
|
||||||
return 7-ai.get.value(card);
|
return 7-ai.get.value(card);
|
||||||
}
|
}
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
"step 1"
|
"step 1"
|
||||||
if(result.bool){
|
if(result.bool){
|
||||||
|
@ -3028,7 +3029,7 @@ character.swd={
|
||||||
};
|
};
|
||||||
"step 1"
|
"step 1"
|
||||||
if(result.bool){
|
if(result.bool){
|
||||||
player.respond(result.cards);
|
player.respond(result.cards,'highlight');
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
event.finish();
|
event.finish();
|
||||||
|
@ -6112,7 +6113,7 @@ character.swd={
|
||||||
order:1,
|
order:1,
|
||||||
result:{
|
result:{
|
||||||
target:function(player,target){
|
target:function(player,target){
|
||||||
var eff=ai.get.damageEffect(target,player);
|
var eff=ai.get.damageEffect(target,player,target,'fire');
|
||||||
if(eff>=0) return eff+1;
|
if(eff>=0) return eff+1;
|
||||||
var judges=target.get('j');
|
var judges=target.get('j');
|
||||||
if(!judges.length) return 0;
|
if(!judges.length) return 0;
|
||||||
|
@ -6248,6 +6249,10 @@ character.swd={
|
||||||
event.card=result.buttons[0].link;
|
event.card=result.buttons[0].link;
|
||||||
if(get.owner(event.card)) get.owner(event.card).discard(event.card);
|
if(get.owner(event.card)) get.owner(event.card).discard(event.card);
|
||||||
else trigger.player.$throw(event.card,1000);
|
else trigger.player.$throw(event.card,1000);
|
||||||
|
if(event.card.clone){
|
||||||
|
event.card.clone.classList.add('thrownhighlight');
|
||||||
|
game.addVideo('highlightnode',player,get.cardInfo(event.card));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
"step 2"
|
"step 2"
|
||||||
if(event.card){
|
if(event.card){
|
||||||
|
@ -6463,7 +6468,8 @@ character.swd={
|
||||||
},
|
},
|
||||||
threaten:function(player,target){
|
threaten:function(player,target){
|
||||||
if(target.hp<target.maxHp-1) return 1.5;
|
if(target.hp<target.maxHp-1) return 1.5;
|
||||||
}
|
},
|
||||||
|
pretao:true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
guxing3:{
|
guxing3:{
|
||||||
|
|
|
@ -355,7 +355,7 @@ character.wind={
|
||||||
};
|
};
|
||||||
"step 1"
|
"step 1"
|
||||||
if(result.bool){
|
if(result.bool){
|
||||||
player.respond(result.cards);
|
player.respond(result.cards,'highlight');
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
event.finish();
|
event.finish();
|
||||||
|
|
|
@ -141,7 +141,7 @@ character.woods={
|
||||||
event.player.num('h')&&player.num('h'));
|
event.player.num('h')&&player.num('h'));
|
||||||
},
|
},
|
||||||
check:function(event,player){
|
check:function(event,player){
|
||||||
return ai.get.attitude(player,event.player)<=0;
|
return ai.get.attitude(player,event.player)<0&&player.num('h')>1;
|
||||||
},
|
},
|
||||||
priority:5,
|
priority:5,
|
||||||
content:function(){
|
content:function(){
|
||||||
|
|
|
@ -1719,38 +1719,37 @@ character.yijiang={
|
||||||
ai:{
|
ai:{
|
||||||
effect:{
|
effect:{
|
||||||
target:function(card,player,target,current){
|
target:function(card,player,target,current){
|
||||||
if(get.type(card)=='trick'&&player!=target) return [0,0,0,0];
|
if(get.type(card)=='trick'&&player!=target) return 'zeroplayertarget';
|
||||||
},
|
},
|
||||||
player:function(card,player,target,current){
|
player:function(card,player,target,current){
|
||||||
if(get.type(card)=='trick'&&player!=target) return [0,0,0,0];
|
if(get.type(card)=='trick'&&player!=target) return 'zeroplayertarget';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
xinwuyan:{
|
xinwuyan:{
|
||||||
audio:2,
|
audio:2,
|
||||||
trigger:{target:'useCardToBefore',player:'useCardToBefore'},
|
trigger:{source:'damageBefore',player:'damageBefore'},
|
||||||
forced:true,
|
forced:true,
|
||||||
priority:15,
|
priority:15,
|
||||||
filter:function(event,player){
|
filter:function(event,player){
|
||||||
if(event.player==player&&event.target==player) return false;
|
return get.type(event.card,'trick')=='trick';
|
||||||
return (get.type(event.card,'trick')=='trick'&&get.tag(event.card,'damage'));
|
|
||||||
},
|
|
||||||
check:function(event,player){
|
|
||||||
return ai.get.effect(event.target,event.card,event.player,player)<0;
|
|
||||||
},
|
},
|
||||||
content:function(){
|
content:function(){
|
||||||
game.log(get.translation(player)+'发动了无言,'+get.translation(trigger.card)+'对'+get.translation(trigger.target)+'失效')
|
|
||||||
trigger.untrigger();
|
trigger.untrigger();
|
||||||
trigger.finish();
|
trigger.finish();
|
||||||
},
|
},
|
||||||
ai:{
|
ai:{
|
||||||
effect:{
|
effect:{
|
||||||
target:function(card,player,target,current){
|
target:function(card,player,target,current){
|
||||||
if(get.type(card)=='trick'&&player!=target&&get.tag(card,'damage')) return [0,0,0,0];
|
if(get.type(card)=='trick'&&get.tag(card,'damage')){
|
||||||
|
return 'zeroplayertarget';
|
||||||
|
}
|
||||||
},
|
},
|
||||||
player:function(card,player,target,current){
|
player:function(card,player,target,current){
|
||||||
if(get.type(card)=='trick'&&player!=target&&get.tag(card,'damage')) return [0,0,0,0];
|
if(get.type(card)=='trick'&&get.tag(card,'damage')){
|
||||||
|
return 'zeroplayertarget';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1895,7 +1894,7 @@ character.yijiang={
|
||||||
effect:{
|
effect:{
|
||||||
target:function(card,player,target){
|
target:function(card,player,target){
|
||||||
if(target.get('e','2')) return;
|
if(target.get('e','2')) return;
|
||||||
if(card.name=='sha'&&get.color(card)=='black') return 0;
|
if(card.name=='sha'&&get.color(card)=='black') return 'zerotarget';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -207,10 +207,12 @@ window.config={
|
||||||
background_music:'music_default',
|
background_music:'music_default',
|
||||||
background_audio:true,
|
background_audio:true,
|
||||||
background_speak:true,
|
background_speak:true,
|
||||||
|
glow_phase:true,
|
||||||
|
|
||||||
|
|
||||||
theme:'woodden',
|
theme:'woodden',
|
||||||
layout:'mobile',
|
layout:'mobile',
|
||||||
|
card_style:'default',
|
||||||
|
|
||||||
image_character:'default',
|
image_character:'default',
|
||||||
image_background:'default',
|
image_background:'default',
|
||||||
|
|
416
game/game.js
416
game/game.js
|
@ -222,6 +222,7 @@
|
||||||
setTimeout(function(){
|
setTimeout(function(){
|
||||||
layout.remove();
|
layout.remove();
|
||||||
ui.arena.show();
|
ui.arena.show();
|
||||||
|
game.me.update();
|
||||||
setTimeout(function(){
|
setTimeout(function(){
|
||||||
ui.updatex();
|
ui.updatex();
|
||||||
},500);
|
},500);
|
||||||
|
@ -329,7 +330,6 @@
|
||||||
image_background_filter:{
|
image_background_filter:{
|
||||||
name:'背景特效',
|
name:'背景特效',
|
||||||
init:'default',
|
init:'default',
|
||||||
unfrequent:true,
|
|
||||||
item:{
|
item:{
|
||||||
default:'无',
|
default:'无',
|
||||||
blur:'模糊',
|
blur:'模糊',
|
||||||
|
@ -346,6 +346,23 @@
|
||||||
ui.click.sidebar.image_background(lib.config.image_background);
|
ui.click.sidebar.image_background(lib.config.image_background);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
card_style:{
|
||||||
|
name:'卡牌样式',
|
||||||
|
init:'mobile',
|
||||||
|
item:{
|
||||||
|
default:'默认',
|
||||||
|
wood:'木纹',
|
||||||
|
music:'音乐',
|
||||||
|
simple:'原版'
|
||||||
|
},
|
||||||
|
onclick:function(layout){
|
||||||
|
game.saveConfig('card_style',layout);
|
||||||
|
var style=ui.css.card_style;
|
||||||
|
ui.css.card_style=lib.init.css('theme/cardstyle',lib.config.card_style);
|
||||||
|
style.remove();
|
||||||
|
},
|
||||||
|
unfrequent:true,
|
||||||
|
},
|
||||||
auto_popped_config:{
|
auto_popped_config:{
|
||||||
name:'自动弹出选项',
|
name:'自动弹出选项',
|
||||||
init:true,
|
init:true,
|
||||||
|
@ -387,6 +404,22 @@
|
||||||
init:false,
|
init:false,
|
||||||
unfrequent:true,
|
unfrequent:true,
|
||||||
},
|
},
|
||||||
|
glow_phase:{
|
||||||
|
name:'当前回合角色高亮',
|
||||||
|
init:false,
|
||||||
|
unfrequent:true,
|
||||||
|
onclick:function(bool){
|
||||||
|
game.saveConfig('glow_phase',bool);
|
||||||
|
if(_status.currentPhase){
|
||||||
|
if(lib.config.glow_phase){
|
||||||
|
_status.currentPhase.classList.add('glow_phase');
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
_status.currentPhase.classList.remove('glow_phase');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
show_name:{
|
show_name:{
|
||||||
name:'显示武将名',
|
name:'显示武将名',
|
||||||
init:false,
|
init:false,
|
||||||
|
@ -405,6 +438,24 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
// savevideo:{
|
||||||
|
// name:'显示保存录像',
|
||||||
|
// init:true,
|
||||||
|
// onclick:function(bool){
|
||||||
|
// game.saveConfig('savevideo',bool);
|
||||||
|
// if(!lib.db) return;
|
||||||
|
// if(lib.config.savevideo){
|
||||||
|
// if(!ui.savevideo&&_status.over){
|
||||||
|
// ui.savevideo=ui.create.control('保存录像',game.saveVideo);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// else if(ui.savevideo){
|
||||||
|
// ui.savevideo.close();
|
||||||
|
// delete ui.savevideo;
|
||||||
|
// }
|
||||||
|
// },
|
||||||
|
// unfrequent:true,
|
||||||
|
// },
|
||||||
show_replay:{
|
show_replay:{
|
||||||
name:'显示重来按钮',
|
name:'显示重来按钮',
|
||||||
init:false,
|
init:false,
|
||||||
|
@ -514,7 +565,8 @@
|
||||||
else if(ui.css.fold){
|
else if(ui.css.fold){
|
||||||
ui.css.fold.remove();
|
ui.css.fold.remove();
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
unfrequent:true,
|
||||||
},
|
},
|
||||||
blur_ui:{
|
blur_ui:{
|
||||||
name:'模糊效果',
|
name:'模糊效果',
|
||||||
|
@ -720,6 +772,14 @@
|
||||||
identity:{
|
identity:{
|
||||||
name:'身份',
|
name:'身份',
|
||||||
config:{
|
config:{
|
||||||
|
update:function(config,map){
|
||||||
|
if(config.player_number=='8'){
|
||||||
|
map.double_nei.show();
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
map.double_nei.hide();
|
||||||
|
}
|
||||||
|
},
|
||||||
player_number:{
|
player_number:{
|
||||||
name:'游戏人数',
|
name:'游戏人数',
|
||||||
init:'8',
|
init:'8',
|
||||||
|
@ -735,6 +795,12 @@
|
||||||
frequent:true,
|
frequent:true,
|
||||||
restart:true,
|
restart:true,
|
||||||
},
|
},
|
||||||
|
double_nei:{
|
||||||
|
name:'双内奸',
|
||||||
|
init:false,
|
||||||
|
frequent:true,
|
||||||
|
restart:true,
|
||||||
|
},
|
||||||
double_character:{
|
double_character:{
|
||||||
name:'双将模式',
|
name:'双将模式',
|
||||||
init:false,
|
init:false,
|
||||||
|
@ -854,22 +920,22 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
swap:{
|
// swap:{
|
||||||
name:'死亡后显示换人',
|
// name:'死亡后显示换人',
|
||||||
init:true,
|
// init:true,
|
||||||
onclick:function(bool){
|
// onclick:function(bool){
|
||||||
game.saveConfig('swap',bool,this._link.config.mode);
|
// game.saveConfig('swap',bool,this._link.config.mode);
|
||||||
if(get.config('swap')){
|
// if(get.config('swap')){
|
||||||
if(!ui.swap&&game.me.isDead()){
|
// if(!ui.swap&&game.me.isDead()){
|
||||||
ui.swap=ui.create.control('换人',ui.click.dieswap);
|
// ui.swap=ui.create.control('换人',ui.click.dieswap);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
else if(ui.swap){
|
// else if(ui.swap){
|
||||||
ui.swap.close();
|
// ui.swap.close();
|
||||||
delete ui.swap;
|
// delete ui.swap;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
},
|
// },
|
||||||
revive:{
|
revive:{
|
||||||
name:'死亡后显示复活',
|
name:'死亡后显示复活',
|
||||||
init:false,
|
init:false,
|
||||||
|
@ -1018,22 +1084,22 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
swap:{
|
// swap:{
|
||||||
name:'死亡后显示换人',
|
// name:'死亡后显示换人',
|
||||||
init:true,
|
// init:true,
|
||||||
onclick:function(bool){
|
// onclick:function(bool){
|
||||||
game.saveConfig('swap',bool,this._link.config.mode);
|
// game.saveConfig('swap',bool,this._link.config.mode);
|
||||||
if(get.config('swap')){
|
// if(get.config('swap')){
|
||||||
if(!ui.swap&&game.me.isDead()){
|
// if(!ui.swap&&game.me.isDead()){
|
||||||
ui.swap=ui.create.control('换人',ui.click.dieswap);
|
// ui.swap=ui.create.control('换人',ui.click.dieswap);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
else if(ui.swap){
|
// else if(ui.swap){
|
||||||
ui.swap.close();
|
// ui.swap.close();
|
||||||
delete ui.swap;
|
// delete ui.swap;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
},
|
// },
|
||||||
revive:{
|
revive:{
|
||||||
name:'死亡后显示复活',
|
name:'死亡后显示复活',
|
||||||
init:false,
|
init:false,
|
||||||
|
@ -1486,6 +1552,12 @@
|
||||||
getUTC:function(date){
|
getUTC:function(date){
|
||||||
return date.getTime();
|
return date.getTime();
|
||||||
},
|
},
|
||||||
|
saveVideo:function(){
|
||||||
|
if(_status.videoToSave){
|
||||||
|
game.export(lib.init.encode(JSON.stringify(_status.videoToSave)),
|
||||||
|
'无名杀 - 录像 - '+_status.videoToSave.name[0]+' - '+_status.videoToSave.name[1]);
|
||||||
|
}
|
||||||
|
},
|
||||||
init:{
|
init:{
|
||||||
init:function(){
|
init:function(){
|
||||||
lib.config={};
|
lib.config={};
|
||||||
|
@ -1570,9 +1642,26 @@
|
||||||
if(lib.config.threed_card) ui.css.threed=lib.init.css('layout/default','fold2');
|
if(lib.config.threed_card) ui.css.threed=lib.init.css('layout/default','fold2');
|
||||||
if(lib.config.blur_ui) ui.css.blur_ui=lib.init.css('layout/default','blur');
|
if(lib.config.blur_ui) ui.css.blur_ui=lib.init.css('layout/default','blur');
|
||||||
ui.css.theme=lib.init.css('theme/'+lib.config.theme,'style');
|
ui.css.theme=lib.init.css('theme/'+lib.config.theme,'style');
|
||||||
|
ui.css.card_style=lib.init.css('theme/cardstyle',lib.config.card_style);
|
||||||
|
|
||||||
lib.config.duration=500;
|
lib.config.duration=500;
|
||||||
|
|
||||||
|
var ua=navigator.userAgent.toLowerCase();
|
||||||
|
if(ua.indexOf('iphone')!=-1||ua.indexOf('ipad')!=-1||ua.indexOf('android')!=-1){
|
||||||
|
if(!lib.config.totouched&&!lib.config.touchscreen){
|
||||||
|
var totouch=window.confirm('您似乎在使用触屏设备,是否切换到触屏模式?');
|
||||||
|
game.saveConfig('totouched',true);
|
||||||
|
if(totouch){
|
||||||
|
game.saveConfig('touchscreen',true);
|
||||||
|
game.reload();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(ua.indexOf('macintosh')!=-1&&!lib.config.toscrolled){
|
||||||
|
game.saveConfig('toscrolled',true);
|
||||||
|
game.saveConfig('mousewheel',false);
|
||||||
|
}
|
||||||
|
|
||||||
if(window.indexedDB){
|
if(window.indexedDB){
|
||||||
var request = window.indexedDB.open(lib.configprefix+'data', 1);
|
var request = window.indexedDB.open(lib.configprefix+'data', 1);
|
||||||
request.onupgradeneeded=function(e){
|
request.onupgradeneeded=function(e){
|
||||||
|
@ -2038,6 +2127,8 @@
|
||||||
player.lose(event.card1);
|
player.lose(event.card1);
|
||||||
target.lose(event.card2);
|
target.lose(event.card2);
|
||||||
"step 3"
|
"step 3"
|
||||||
|
ui.arena.classList.add('thrownhighlight');
|
||||||
|
game.addVideo('thrownhighlight1');
|
||||||
player.$compare(event.card1,target,event.card2);
|
player.$compare(event.card1,target,event.card2);
|
||||||
// player.$throw(event.card1);
|
// player.$throw(event.card1);
|
||||||
// target.$throw(event.card2);
|
// target.$throw(event.card2);
|
||||||
|
@ -2087,6 +2178,8 @@
|
||||||
if(typeof event.target.ai.shown=='number'&&event.target.ai.shown<=0.85&&event.addToAI){
|
if(typeof event.target.ai.shown=='number'&&event.target.ai.shown<=0.85&&event.addToAI){
|
||||||
event.target.ai.shown+=0.1;
|
event.target.ai.shown+=0.1;
|
||||||
}
|
}
|
||||||
|
ui.arena.classList.remove('thrownhighlight');
|
||||||
|
game.addVideo('thrownhighlight2');
|
||||||
if(event.clear!==false) ui.clear();
|
if(event.clear!==false) ui.clear();
|
||||||
event.dialog.close();
|
event.dialog.close();
|
||||||
},
|
},
|
||||||
|
@ -2609,6 +2702,9 @@
|
||||||
player.$throw(cards);
|
player.$throw(cards);
|
||||||
}
|
}
|
||||||
event.trigger('useCard');
|
event.trigger('useCard');
|
||||||
|
// if(event.card.name=='sha'&&lib.config.animation){
|
||||||
|
// player.$sha(event.card.nature);
|
||||||
|
// }
|
||||||
if(get.type(card)!='equip'){
|
if(get.type(card)!='equip'){
|
||||||
var str=get.translation(player);
|
var str=get.translation(player);
|
||||||
if(targets.length){
|
if(targets.length){
|
||||||
|
@ -2922,6 +3018,10 @@
|
||||||
for(var i=0;i<cards.length;i++){
|
for(var i=0;i<cards.length;i++){
|
||||||
player.lose(cards[i]);
|
player.lose(cards[i]);
|
||||||
if(event.animate!=false) player.$throw(cards[i]);
|
if(event.animate!=false) player.$throw(cards[i]);
|
||||||
|
if(event.highlight){
|
||||||
|
cards[i].clone.classList.add('thrownhighlight');
|
||||||
|
game.addVideo('highlightnode',player,get.cardInfo(cards[i]));
|
||||||
|
}
|
||||||
var name='';
|
var name='';
|
||||||
if(event.skill) name=get.translation(event.skill)+':';
|
if(event.skill) name=get.translation(event.skill)+':';
|
||||||
if(event.card) name+=get.translation(event.card.name);
|
if(event.card) name+=get.translation(event.card.name);
|
||||||
|
@ -3337,9 +3437,9 @@
|
||||||
}
|
}
|
||||||
if(player==game.me&&!_status.over&&!game.controlOver){
|
if(player==game.me&&!_status.over&&!game.controlOver){
|
||||||
ui.control.show();
|
ui.control.show();
|
||||||
if(get.config('swap')&&lib.config.mode_choice.contains('swap')){
|
// if(get.config('swap')&&lib.config.mode_choice.contains('swap')){
|
||||||
ui.swap=ui.create.control('换人',ui.click.dieswap);
|
// ui.swap=ui.create.control('换人',ui.click.dieswap);
|
||||||
}
|
// }
|
||||||
if(get.config('revive')&&lib.config.mode_choice.contains('revive')){
|
if(get.config('revive')&&lib.config.mode_choice.contains('revive')){
|
||||||
ui.revive=ui.create.control('revive',ui.click.dierevive);
|
ui.revive=ui.create.control('revive',ui.click.dierevive);
|
||||||
}
|
}
|
||||||
|
@ -3348,9 +3448,9 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(player==game.me&&!game.modeSwapPlayer){
|
if(player==game.me&&!game.modeSwapPlayer){
|
||||||
_status.auto=false;
|
// _status.auto=false;
|
||||||
if(ui.auto){
|
if(ui.auto){
|
||||||
ui.auto.classList.remove('glow');
|
// ui.auto.classList.remove('glow');
|
||||||
ui.auto.hide();
|
ui.auto.hide();
|
||||||
}
|
}
|
||||||
if(ui.wuxie) ui.wuxie.hide();
|
if(ui.wuxie) ui.wuxie.hide();
|
||||||
|
@ -3364,7 +3464,7 @@
|
||||||
if(get.owner(card)) get.owner(card).lose(card,ui.special);
|
if(get.owner(card)) get.owner(card).lose(card,ui.special);
|
||||||
|
|
||||||
if(card.clone){
|
if(card.clone){
|
||||||
card.clone.moveTo(player,Math.random()<0.8?'flip':'rotate').delete();
|
card.clone.moveTo(player).delete();
|
||||||
game.addVideo('gain2',player,get.cardsInfo([card.clone]));
|
game.addVideo('gain2',player,get.cardsInfo([card.clone]));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3432,7 +3532,14 @@
|
||||||
event.videoId=lib.status.videoId++;
|
event.videoId=lib.status.videoId++;
|
||||||
player.judging=get.cards()[0];
|
player.judging=get.cards()[0];
|
||||||
game.addVideo('judge1',player,[get.cardInfo(player.judging),judgestr,event.videoId]);
|
game.addVideo('judge1',player,[get.cardInfo(player.judging),judgestr,event.videoId]);
|
||||||
event.node=player.judging.copy('thrown','center',ui.arena).animate('start');
|
if(lib.config.mode=='chess'){
|
||||||
|
event.node=player.judging.copy('thrown','center',ui.arena).animate('start');
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
event.node=player.$throwordered(player.judging.copy(),true);
|
||||||
|
}
|
||||||
|
event.node.classList.add('thrownhighlight');
|
||||||
|
ui.arena.classList.add('thrownhighlight');
|
||||||
event.dialog=ui.create.dialog(judgestr);
|
event.dialog=ui.create.dialog(judgestr);
|
||||||
event.dialog.classList.add('center');
|
event.dialog.classList.add('center');
|
||||||
game.log(get.translation(player)+'进行'+event.judgestr+'判定,亮出的判定牌为'+get.translation(player.judging));
|
game.log(get.translation(player)+'进行'+event.judgestr+'判定,亮出的判定牌为'+get.translation(player.judging));
|
||||||
|
@ -3459,6 +3566,7 @@
|
||||||
if(event.clearArena!=false) ui.clear();
|
if(event.clearArena!=false) ui.clear();
|
||||||
event.dialog.close();
|
event.dialog.close();
|
||||||
game.addVideo('judge2',null,event.videoId);
|
game.addVideo('judge2',null,event.videoId);
|
||||||
|
ui.arena.classList.remove('thrownhighlight');
|
||||||
game.log(get.translation(player)+'的判定结果为'+get.translation(event.result.card));
|
game.log(get.translation(player)+'的判定结果为'+get.translation(event.result.card));
|
||||||
if(!get.owner(event.result.card)) event.position.appendChild(event.result.card);
|
if(!get.owner(event.result.card)) event.position.appendChild(event.result.card);
|
||||||
},
|
},
|
||||||
|
@ -4688,6 +4796,7 @@
|
||||||
next.card=arguments[i];
|
next.card=arguments[i];
|
||||||
}
|
}
|
||||||
else if(typeof arguments[i]=='boolean') next.animate=arguments[i];
|
else if(typeof arguments[i]=='boolean') next.animate=arguments[i];
|
||||||
|
else if(arguments[i]=='highlight') next.highlight=true;
|
||||||
else if(typeof arguments[i]=='string') next.skill=arguments[i];
|
else if(typeof arguments[i]=='string') next.skill=arguments[i];
|
||||||
}
|
}
|
||||||
if(next.cards==undefined){
|
if(next.cards==undefined){
|
||||||
|
@ -5552,6 +5661,7 @@
|
||||||
'calc(50% - 114px)','calc(50% - 52px)'
|
'calc(50% - 114px)','calc(50% - 52px)'
|
||||||
);
|
);
|
||||||
node1.classList.add('infohidden');
|
node1.classList.add('infohidden');
|
||||||
|
node1.classList.add('thrownhighlight');
|
||||||
node1.style.transform='perspective(600px) rotateY(180deg) translateX(0)';
|
node1.style.transform='perspective(600px) rotateY(180deg) translateX(0)';
|
||||||
setTimeout(function(){
|
setTimeout(function(){
|
||||||
setTimeout(function(){
|
setTimeout(function(){
|
||||||
|
@ -5572,6 +5682,7 @@
|
||||||
'calc(50% + 10px)','calc(50% - 52px)'
|
'calc(50% + 10px)','calc(50% - 52px)'
|
||||||
);
|
);
|
||||||
node2.classList.add('infohidden');
|
node2.classList.add('infohidden');
|
||||||
|
node2.classList.add('thrownhighlight');
|
||||||
node2.style.transform='perspective(600px) rotateY(180deg) translateX(0)';
|
node2.style.transform='perspective(600px) rotateY(180deg) translateX(0)';
|
||||||
setTimeout(function(){
|
setTimeout(function(){
|
||||||
node2.style.transition='all ease-in 0.3s';
|
node2.style.transition='all ease-in 0.3s';
|
||||||
|
@ -5607,16 +5718,96 @@
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
if(card==undefined||card.length==0) return;
|
if(card==undefined||card.length==0) return;
|
||||||
var node=this.$throwxy(card,
|
if(false){
|
||||||
'calc(50% - 52px '+((Math.random()-0.5<0)?'+':'-')+' '+Math.random()*100+'px)',
|
var node=this.$throwxy(card,
|
||||||
'calc(50% - 52px '+((Math.random()-0.5<0)?'+':'-')+' '+Math.random()*80+'px)',true
|
'calc(50% - 52px '+((Math.random()-0.5<0)?'+':'-')+' '+Math.random()*100+'px)',
|
||||||
);
|
'calc(50% - 52px '+((Math.random()-0.5<0)?'+':'-')+' '+Math.random()*80+'px)',true
|
||||||
|
);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
var node=this.$throwordered(card.copy('thrown'));
|
||||||
|
}
|
||||||
if(time!=undefined){
|
if(time!=undefined){
|
||||||
node.fixed=true;
|
node.fixed=true;
|
||||||
setTimeout(function(){node.delete()},time);
|
setTimeout(function(){node.delete()},time);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
$throwordered:function(node,nosource){
|
||||||
|
if(nosource){
|
||||||
|
node.style.transform='scale(0)';
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
node.dataset.position=this.dataset.position;
|
||||||
|
}
|
||||||
|
node.classList.add('thrown');
|
||||||
|
node.hide();
|
||||||
|
node.style.transitionProperty='left,top,opacity,transform';
|
||||||
|
ui.arena.appendChild(node);
|
||||||
|
ui.refresh(node);
|
||||||
|
if(nosource){
|
||||||
|
node.style.transform='';
|
||||||
|
}
|
||||||
|
node.show();
|
||||||
|
for(var i=0;i<ui.thrown.length;i++){
|
||||||
|
if(ui.thrown[i].parentNode!=ui.arena||
|
||||||
|
ui.thrown[i].classList.contains('removing')){
|
||||||
|
ui.thrown.splice(i--,1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ui.thrown.push(node);
|
||||||
|
var uithrowns=ui.thrown.slice(0);
|
||||||
|
var row=0;
|
||||||
|
var tops;
|
||||||
|
switch(Math.floor((ui.thrown.length-1)/4)){
|
||||||
|
case 0:
|
||||||
|
tops=['calc(50% - 52px)'];
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
tops=['calc(50% - 109px)','calc(50% + 5px)'];
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
tops=['calc(50% - 166px)','calc(50% - 52px)','calc(50% + 62px)'];
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
tops=['calc(50% - 223px)','calc(50% - 109px)',
|
||||||
|
'calc(50% + 5px)','calc(50% + 119px)'];
|
||||||
|
}
|
||||||
|
while(uithrowns.length){
|
||||||
|
var throwns=uithrowns.splice(0,Math.min(uithrowns.length,4));
|
||||||
|
switch(throwns.length){
|
||||||
|
case 1:
|
||||||
|
throwns[0].style.left='calc(50% - 52px)';
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
throwns[0].style.left='calc(50% - 109px)';
|
||||||
|
throwns[1].style.left='calc(50% + 5px)';
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
throwns[0].style.left='calc(50% - 166px)';
|
||||||
|
throwns[1].style.left='calc(50% - 52px)';
|
||||||
|
throwns[2].style.left='calc(50% + 62px)';
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
throwns[0].style.left='calc(50% - 223px)';
|
||||||
|
throwns[1].style.left='calc(50% - 109px)';
|
||||||
|
throwns[2].style.left='calc(50% + 5px)';
|
||||||
|
throwns[3].style.left='calc(50% + 119px)';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
var top;
|
||||||
|
if(tops.length){
|
||||||
|
top=tops.shift();
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
top='calc(50% - 52px)';
|
||||||
|
}
|
||||||
|
for(var i=0;i<throwns.length;i++){
|
||||||
|
throwns[i].style.top=top;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return node;
|
||||||
|
},
|
||||||
$throwxy:function(card,left,top,transform){
|
$throwxy:function(card,left,top,transform){
|
||||||
var node=card.copy('thrown');
|
var node=card.copy('thrown');
|
||||||
node.dataset.position=this.dataset.position;
|
node.dataset.position=this.dataset.position;
|
||||||
|
@ -5696,16 +5887,17 @@
|
||||||
}
|
}
|
||||||
node.dataset.position=this.dataset.position;
|
node.dataset.position=this.dataset.position;
|
||||||
node.fixed=true;
|
node.fixed=true;
|
||||||
node.hide();
|
this.$throwordered(node);
|
||||||
node.style.transitionProperty='left,top,opacity';
|
// node.hide();
|
||||||
|
// node.style.transitionProperty='left,top,opacity';
|
||||||
node.style.transform='rotate('+(Math.random()*16-8)+'deg)';
|
//
|
||||||
|
// node.style.transform='rotate('+(Math.random()*16-8)+'deg)';
|
||||||
ui.arena.appendChild(node);
|
//
|
||||||
ui.refresh(node);
|
// ui.arena.appendChild(node);
|
||||||
node.show();
|
// ui.refresh(node);
|
||||||
node.style.left='calc(50% - 52px '+((Math.random()-0.5<0)?'+':'-')+' '+Math.random()*100+'px)';
|
// node.show();
|
||||||
node.style.top='calc(50% - 52px '+((Math.random()-0.5<0)?'+':'-')+' '+Math.random()*80+'px)';
|
// node.style.left='calc(50% - 52px '+((Math.random()-0.5<0)?'+':'-')+' '+Math.random()*100+'px)';
|
||||||
|
// node.style.top='calc(50% - 52px '+((Math.random()-0.5<0)?'+':'-')+' '+Math.random()*80+'px)';
|
||||||
|
|
||||||
setTimeout(function(){
|
setTimeout(function(){
|
||||||
node.removeAttribute('style');
|
node.removeAttribute('style');
|
||||||
|
@ -5927,6 +6119,20 @@
|
||||||
game.animate.flame(left+this.offsetWidth/2,
|
game.animate.flame(left+this.offsetWidth/2,
|
||||||
top+this.offsetHeight-30,700,'recover');
|
top+this.offsetHeight-30,700,'recover');
|
||||||
},
|
},
|
||||||
|
$sha:function(nature){
|
||||||
|
if(this._shaing){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this._shaing=true;
|
||||||
|
var player=this;
|
||||||
|
setTimeout(function(){
|
||||||
|
player._shaing=false;
|
||||||
|
},1000);
|
||||||
|
var node=ui.create.div('.cardeffect',this);
|
||||||
|
node.innerHTML='殺';
|
||||||
|
node.dataset.nature=nature||'black';
|
||||||
|
return node;
|
||||||
|
},
|
||||||
$damagepop:function(num,nature){
|
$damagepop:function(num,nature){
|
||||||
if(typeof num=='number'){
|
if(typeof num=='number'){
|
||||||
game.addVideo('damagepop',this,[num,nature]);
|
game.addVideo('damagepop',this,[num,nature]);
|
||||||
|
@ -6040,8 +6246,8 @@
|
||||||
},
|
},
|
||||||
$phaseJudge:function(card){
|
$phaseJudge:function(card){
|
||||||
game.addVideo('phaseJudge',this,get.cardInfo(card));
|
game.addVideo('phaseJudge',this,get.cardInfo(card));
|
||||||
var clone=card.copy('thrown',ui.arena).animate('judgestart');
|
|
||||||
var player=this;
|
var player=this;
|
||||||
|
var clone=card.copy('thrown','thrownhighlight',ui.arena).animate('judgestart');
|
||||||
clone.style.opacity=0.6;
|
clone.style.opacity=0.6;
|
||||||
clone.style.left='calc(50% - 52px '+((Math.random()-0.5<0)?'+':'-')+' '+Math.random()*50+'px)';
|
clone.style.left='calc(50% - 52px '+((Math.random()-0.5<0)?'+':'-')+' '+Math.random()*50+'px)';
|
||||||
clone.style.top='calc(50% - 52px '+((Math.random()-0.5<0)?'+':'-')+' '+Math.random()*40+'px)';
|
clone.style.top='calc(50% - 52px '+((Math.random()-0.5<0)?'+':'-')+' '+Math.random()*40+'px)';
|
||||||
|
@ -6783,6 +6989,13 @@
|
||||||
popup:false,
|
popup:false,
|
||||||
content:function(){
|
content:function(){
|
||||||
player.popup('_phasebegin');
|
player.popup('_phasebegin');
|
||||||
|
if(lib.config.glow_phase){
|
||||||
|
if(_status.currentPhase){
|
||||||
|
_status.currentPhase.classList.remove('glow_phase');
|
||||||
|
}
|
||||||
|
player.classList.add('glow_phase');
|
||||||
|
}
|
||||||
|
game.addVideo('phaseChange',player);
|
||||||
_status.currentPhase=player;
|
_status.currentPhase=player;
|
||||||
game.log();
|
game.log();
|
||||||
game.log(get.translation(player)+'的回合开始');
|
game.log(get.translation(player)+'的回合开始');
|
||||||
|
@ -7242,13 +7455,13 @@
|
||||||
game.players[i].init(players[i].name,players[i].name2);
|
game.players[i].init(players[i].name,players[i].name2);
|
||||||
game.players[i].setIdentity(players[i].identity);
|
game.players[i].setIdentity(players[i].identity);
|
||||||
game.players[i].dataset.position=players[i].position;
|
game.players[i].dataset.position=players[i].position;
|
||||||
ui.create.div('.action',game.players[i].node.avatar).innerHTML='行动';
|
game.players[i].node.action.innerHTML='行动';
|
||||||
}
|
}
|
||||||
else if(lib.config.mode=='versus'){
|
else if(lib.config.mode=='versus'){
|
||||||
game.players[i].init(players[i].name,players[i].name2);
|
game.players[i].init(players[i].name,players[i].name2);
|
||||||
game.players[i].node.identity.firstChild.innerHTML=players[i].identity;
|
game.players[i].node.identity.firstChild.innerHTML=players[i].identity;
|
||||||
game.players[i].node.identity.dataset.color=players[i].color;
|
game.players[i].node.identity.dataset.color=players[i].color;
|
||||||
ui.create.div('.action',game.players[i].node.avatar).innerHTML='行动';
|
game.players[i].node.action.innerHTML='行动';
|
||||||
}
|
}
|
||||||
else if(lib.config.mode=='guozhan'){
|
else if(lib.config.mode=='guozhan'){
|
||||||
game.players[i].name=players[i].name;
|
game.players[i].name=players[i].name;
|
||||||
|
@ -7293,6 +7506,20 @@
|
||||||
ui.updateh(true);
|
ui.updateh(true);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
phaseChange:function(player){
|
||||||
|
if(player){
|
||||||
|
var glowing=document.querySelector('.glow_phase');
|
||||||
|
if(glowing){
|
||||||
|
glowing.classList.remove('glow_phase');
|
||||||
|
}
|
||||||
|
if(lib.config.glow_phase){
|
||||||
|
player.classList.add('glow_phase');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
console.log(player);
|
||||||
|
}
|
||||||
|
},
|
||||||
chessSwap:function(content){
|
chessSwap:function(content){
|
||||||
var me=game.playerMap[content[0]];
|
var me=game.playerMap[content[0]];
|
||||||
var player=game.playerMap[content[1]];
|
var player=game.playerMap[content[1]];
|
||||||
|
@ -7333,6 +7560,12 @@
|
||||||
console.log(player);
|
console.log(player);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
thrownhighlight1:function(){
|
||||||
|
ui.arena.classList.add('thrownhighlight');
|
||||||
|
},
|
||||||
|
thrownhighlight2:function(){
|
||||||
|
ui.arena.classList.remove('thrownhighlight');
|
||||||
|
},
|
||||||
chessFocus:function(player){
|
chessFocus:function(player){
|
||||||
if(player){
|
if(player){
|
||||||
player.chessFocus();
|
player.chessFocus();
|
||||||
|
@ -7559,21 +7792,46 @@
|
||||||
console.log(player,cards);
|
console.log(player,cards);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
highlightnode:function(player,card){
|
||||||
|
if(card){
|
||||||
|
var nodeList=document.querySelectorAll('#arena>.card,#chess>.card');
|
||||||
|
var nodes=[];
|
||||||
|
for(var i=0;i<nodeList.length;i++){
|
||||||
|
nodes.push(nodeList[i]);
|
||||||
|
}
|
||||||
|
for(var j=nodes.length-1;j>=0;j--){
|
||||||
|
if(card[2]==nodes[j].name&&card[0]==nodes[j].suit&&card[1]==nodes[j].number){
|
||||||
|
nodes[j].classList.add('thrownhighlight');
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
console.log(player,cards);
|
||||||
|
}
|
||||||
|
},
|
||||||
uiClear:function(){
|
uiClear:function(){
|
||||||
ui.clear();
|
ui.clear();
|
||||||
},
|
},
|
||||||
judge1:function(player,content){
|
judge1:function(player,content){
|
||||||
if(player&&content){
|
if(player&&content){
|
||||||
var judging=get.infoCard(content[0]);
|
var judging=get.infoCard(content[0]);
|
||||||
judging.copy('thrown','center',ui.arena).animate('start');
|
if(lib.config.mode=='chess'){
|
||||||
|
judging.copy('thrown','center','thrownhighlight',ui.arena).animate('start');
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
player.$throwordered(judging.copy('thrownhighlight'),true);
|
||||||
|
}
|
||||||
|
|
||||||
ui.create.dialog(content[1]).videoId=content[2];
|
ui.create.dialog(content[1]).videoId=content[2];
|
||||||
|
ui.arena.classList.add('thrownhighlight');
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
console.log(player);
|
console.log(player);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
centernode:function(content){
|
centernode:function(content){
|
||||||
get.infoCard(content).copy('thrown','center',ui.arena).animate('start');
|
get.infoCard(content).copy('thrown','center','thrownhighlight',ui.arena).animate('start');
|
||||||
},
|
},
|
||||||
judge2:function(videoId){
|
judge2:function(videoId){
|
||||||
for(var i=0;i<ui.dialogs.length;i++){
|
for(var i=0;i<ui.dialogs.length;i++){
|
||||||
|
@ -7581,6 +7839,7 @@
|
||||||
ui.dialogs[i].close();
|
ui.dialogs[i].close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
ui.arena.classList.remove('thrownhighlight');
|
||||||
},
|
},
|
||||||
unmarkname:function(player,name){
|
unmarkname:function(player,name){
|
||||||
if(player&&player.unmark){
|
if(player&&player.unmark){
|
||||||
|
@ -8643,10 +8902,11 @@
|
||||||
};
|
};
|
||||||
lib.videos.unshift(newvid);
|
lib.videos.unshift(newvid);
|
||||||
store.put(newvid);
|
store.put(newvid);
|
||||||
|
lib.createVideoNode(newvid,true);
|
||||||
}
|
}
|
||||||
_status.auto=false;
|
// _status.auto=false;
|
||||||
if(ui.auto){
|
if(ui.auto){
|
||||||
ui.auto.classList.remove('glow');
|
// ui.auto.classList.remove('glow');
|
||||||
ui.auto.hide();
|
ui.auto.hide();
|
||||||
}
|
}
|
||||||
if(ui.wuxie) ui.wuxie.hide();
|
if(ui.wuxie) ui.wuxie.hide();
|
||||||
|
@ -8657,6 +8917,9 @@
|
||||||
if(game.controlOver){
|
if(game.controlOver){
|
||||||
game.controlOver();return;
|
game.controlOver();return;
|
||||||
}
|
}
|
||||||
|
// if(!ui.savevideo&&lib.db&&lib.config.savevideo){
|
||||||
|
// ui.savevideo=ui.create.control('保存录像',game.saveVideo);
|
||||||
|
// }
|
||||||
if(!ui.restart){
|
if(!ui.restart){
|
||||||
ui.restart=ui.create.control('restart',game.reload);
|
ui.restart=ui.create.control('restart',game.reload);
|
||||||
}
|
}
|
||||||
|
@ -9321,7 +9584,9 @@
|
||||||
if(card.ai==undefined) card.ai={basic:{}};
|
if(card.ai==undefined) card.ai={basic:{}};
|
||||||
if(card.ai.basic==undefined) card.ai.basic={};
|
if(card.ai.basic==undefined) card.ai.basic={};
|
||||||
if(card.ai.result==undefined) card.ai.result={target:1.5};
|
if(card.ai.result==undefined) card.ai.result={target:1.5};
|
||||||
if(card.ai.basic.order==undefined) card.ai.basic.order=8;
|
if(card.ai.basic.order==undefined) card.ai.basic.order=function(card,player){
|
||||||
|
return 8+ai.get.equipValue(card,player)/20;
|
||||||
|
};
|
||||||
if(card.ai.basic.useful==undefined) card.ai.basic.useful=2;
|
if(card.ai.basic.useful==undefined) card.ai.basic.useful=2;
|
||||||
if(card.subtype=='equip3'){
|
if(card.subtype=='equip3'){
|
||||||
if(card.ai.basic.equipValue==undefined) card.ai.basic.equipValue=6;
|
if(card.ai.basic.equipValue==undefined) card.ai.basic.equipValue=6;
|
||||||
|
@ -9675,6 +9940,7 @@
|
||||||
};
|
};
|
||||||
var ui={
|
var ui={
|
||||||
updates:[],
|
updates:[],
|
||||||
|
thrown:[],
|
||||||
refresh:function(node){
|
refresh:function(node){
|
||||||
void window.getComputedStyle(node, null).getPropertyValue("opacity");
|
void window.getComputedStyle(node, null).getPropertyValue("opacity");
|
||||||
},
|
},
|
||||||
|
@ -11146,6 +11412,7 @@
|
||||||
if(game.onresume2){
|
if(game.onresume2){
|
||||||
game.onresume2();
|
game.onresume2();
|
||||||
}
|
}
|
||||||
|
ui.arena.classList.remove('menupaused');
|
||||||
};
|
};
|
||||||
var clickMenuItem=function(){
|
var clickMenuItem=function(){
|
||||||
var node=this.parentNode._link;
|
var node=this.parentNode._link;
|
||||||
|
@ -11248,6 +11515,7 @@
|
||||||
for(var i=0;i<menuUpdates.length;i++){
|
for(var i=0;i<menuUpdates.length;i++){
|
||||||
menuUpdates[i]();
|
menuUpdates[i]();
|
||||||
}
|
}
|
||||||
|
ui.arena.classList.add('menupaused');
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
clickContainer.call(menuContainer);
|
clickContainer.call(menuContainer);
|
||||||
|
@ -11420,6 +11688,7 @@
|
||||||
game.saveConfig('autoskilllist',list);
|
game.saveConfig('autoskilllist',list);
|
||||||
};
|
};
|
||||||
for(var i in lib.skill){
|
for(var i in lib.skill){
|
||||||
|
if(!lib.skilllist.contains(i)) continue;
|
||||||
if(lib.skill[i].frequent&&lib.translate[i]){
|
if(lib.skill[i].frequent&&lib.translate[i]){
|
||||||
lib.configMenu.skill.config[i]={
|
lib.configMenu.skill.config[i]={
|
||||||
name:lib.translate[i],
|
name:lib.translate[i],
|
||||||
|
@ -11446,12 +11715,18 @@
|
||||||
game.saveConfig('forbidlist',[]);
|
game.saveConfig('forbidlist',[]);
|
||||||
}
|
}
|
||||||
for(var i=0;i<forbid.length;i++){
|
for(var i=0;i<forbid.length;i++){
|
||||||
|
var skip=false;
|
||||||
var str='';
|
var str='';
|
||||||
var str2='';
|
var str2='';
|
||||||
for(var j=0;j<forbid[i].length;j++){
|
for(var j=0;j<forbid[i].length;j++){
|
||||||
|
if(!lib.skilllist.contains(forbid[i][j])){
|
||||||
|
skip=true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
str+=get.translation(forbid[i][j])+'+';
|
str+=get.translation(forbid[i][j])+'+';
|
||||||
str2+=forbid[i][j]+'+';
|
str2+=forbid[i][j]+'+';
|
||||||
}
|
}
|
||||||
|
if(skip) continue;
|
||||||
lib.config.forbidmap[str2]=forbid[i];
|
lib.config.forbidmap[str2]=forbid[i];
|
||||||
str=str.slice(0,str.length-1);
|
str=str.slice(0,str.length-1);
|
||||||
str2=str2.slice(0,str2.length-1);
|
str2=str2.slice(0,str2.length-1);
|
||||||
|
@ -11509,6 +11784,7 @@
|
||||||
}
|
}
|
||||||
banskillexpanded=!banskillexpanded;
|
banskillexpanded=!banskillexpanded;
|
||||||
});
|
});
|
||||||
|
page.style.paddingBottom='10px';
|
||||||
}
|
}
|
||||||
for(var j in info.config){
|
for(var j in info.config){
|
||||||
if(j==='update'){
|
if(j==='update'){
|
||||||
|
@ -12161,6 +12437,7 @@
|
||||||
for(var i=0;i<lib.videos.length;i++){
|
for(var i=0;i<lib.videos.length;i++){
|
||||||
createNode(lib.videos[i]);
|
createNode(lib.videos[i]);
|
||||||
}
|
}
|
||||||
|
lib.createVideoNode=createNode;
|
||||||
var importVideoNode=ui.create.div('.config.switcher',
|
var importVideoNode=ui.create.div('.config.switcher',
|
||||||
'<span class="underlinenode slim">导入录像...</span>',function(){
|
'<span class="underlinenode slim">导入录像...</span>',function(){
|
||||||
this.nextSibling.classList.toggle('hidden');
|
this.nextSibling.classList.toggle('hidden');
|
||||||
|
@ -12475,6 +12752,7 @@
|
||||||
handcards1:ui.create.div('#handcards1'),
|
handcards1:ui.create.div('#handcards1'),
|
||||||
handcards2:ui.create.div('#handcards2'),
|
handcards2:ui.create.div('#handcards2'),
|
||||||
};
|
};
|
||||||
|
node.node.action=ui.create.div('.action',node.node.avatar);
|
||||||
|
|
||||||
node.skipList=[];
|
node.skipList=[];
|
||||||
node.skills=[];
|
node.skills=[];
|
||||||
|
@ -15727,6 +16005,10 @@
|
||||||
else if(temp1=='zerotarget'){
|
else if(temp1=='zerotarget'){
|
||||||
zerotarget=true;
|
zerotarget=true;
|
||||||
}
|
}
|
||||||
|
else if(temp1=='zeroplayertarget'){
|
||||||
|
zeroplayer=true;
|
||||||
|
zerotarget=true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(target){
|
if(target){
|
||||||
var skills2=target.get('s').concat(lib.skill.global);
|
var skills2=target.get('s').concat(lib.skill.global);
|
||||||
|
@ -15761,6 +16043,10 @@
|
||||||
else if(temp2=='zerotarget'){
|
else if(temp2=='zerotarget'){
|
||||||
zerotarget=true;
|
zerotarget=true;
|
||||||
}
|
}
|
||||||
|
else if(temp2=='zeroplayertarget'){
|
||||||
|
zeroplayer=true;
|
||||||
|
zerotarget=true;
|
||||||
|
}
|
||||||
if(typeof temp3=='function'&&temp3(player,target)!=undefined){
|
if(typeof temp3=='function'&&temp3(player,target)!=undefined){
|
||||||
threaten*=temp3(player,target);
|
threaten*=temp3(player,target);
|
||||||
}
|
}
|
||||||
|
@ -16438,6 +16724,7 @@
|
||||||
lib[i][j]=lib.init.eval(mode[lib.config.mode][i][j]);
|
lib[i][j]=lib.init.eval(mode[lib.config.mode][i][j]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
lib.skilllist=[];
|
||||||
lib.characterPack={};
|
lib.characterPack={};
|
||||||
for(i in character){
|
for(i in character){
|
||||||
if(character[i].character){
|
if(character[i].character){
|
||||||
|
@ -16475,6 +16762,9 @@
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
for(var l=0;l<character[i][j][k][3].length;l++){
|
||||||
|
lib.skilllist.add(character[i][j][k][3][l]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(j=='translate'&&k==i){
|
if(j=='translate'&&k==i){
|
||||||
lib[j][k+'_character_config']=character[i][j][k];
|
lib[j][k+'_character_config']=character[i][j][k];
|
||||||
|
|
|
@ -284,6 +284,19 @@ margin-bottom: 5px;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
transform:scale(0.7);
|
transform:scale(0.7);
|
||||||
}
|
}
|
||||||
|
.player>.cardeffect{
|
||||||
|
font-family: 'huangcao';
|
||||||
|
font-size:108px;
|
||||||
|
width: 100%;
|
||||||
|
text-align: center;
|
||||||
|
top:calc(50% - 54px);
|
||||||
|
left:0;
|
||||||
|
animation:cardeffect 1s;
|
||||||
|
-webkit-animation:cardeffect 1s;
|
||||||
|
|
||||||
|
animation-fill-mode: forwards;
|
||||||
|
-webkit-animation-fill-mode: forwards;
|
||||||
|
}
|
||||||
.player>.damage.damageadded{
|
.player>.damage.damageadded{
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
transform:scale(1);
|
transform:scale(1);
|
||||||
|
@ -294,7 +307,7 @@ margin-bottom: 5px;
|
||||||
.player.linked>.damage.damageadded{
|
.player.linked>.damage.damageadded{
|
||||||
transform:scale(1) rotate(90deg);
|
transform:scale(1) rotate(90deg);
|
||||||
}
|
}
|
||||||
.avatar{width: 96px;height: 96px;left: 12px;top: 12px;overflow: hidden;}
|
.avatar{width: 100px;height: 100px;left: 10px;top: 10px;overflow: hidden;}
|
||||||
.avatar2{width: 42px;height: 42px;top: 70px;left: 70px;overflow: hidden;}
|
.avatar2{width: 42px;height: 42px;top: 70px;left: 70px;overflow: hidden;}
|
||||||
.equips{width: 96px;height: 96px;right: 14px;top:12px;}
|
.equips{width: 96px;height: 96px;right: 14px;top:12px;}
|
||||||
.equips>div{width: 42px;height: 42px;margin: 0;position: absolute;}
|
.equips>div{width: 42px;height: 42px;margin: 0;position: absolute;}
|
||||||
|
@ -509,6 +522,10 @@ margin-bottom: 5px;
|
||||||
-webkit-animation-fill-mode: forwards;
|
-webkit-animation-fill-mode: forwards;
|
||||||
}
|
}
|
||||||
.card.thrown{position: absolute;opacity: 1;margin:0}
|
.card.thrown{position: absolute;opacity: 1;margin:0}
|
||||||
|
#arena.thrownhighlight>.card.thrown:not(.thrownhighlight){
|
||||||
|
opacity: 0.5;
|
||||||
|
transform:scale(0.95);
|
||||||
|
}
|
||||||
.card.start{
|
.card.start{
|
||||||
animation: card_start 0.5s;
|
animation: card_start 0.5s;
|
||||||
-webkit-animation: card_start 0.5s;
|
-webkit-animation: card_start 0.5s;
|
||||||
|
@ -736,7 +753,8 @@ div[data-nature='soilm']{
|
||||||
text-shadow: rgba(128, 59, 2,1) 0 0 2px,rgba(128, 59, 2,1) 0 0 5px,rgba(128, 59, 2,1) 0 0 5px,
|
text-shadow: rgba(128, 59, 2,1) 0 0 2px,rgba(128, 59, 2,1) 0 0 5px,rgba(128, 59, 2,1) 0 0 5px,
|
||||||
rgba(128, 59, 2,1) 0 0 5px,black 0 0 1px;
|
rgba(128, 59, 2,1) 0 0 5px,black 0 0 1px;
|
||||||
}
|
}
|
||||||
.player .identity[data-color="unknownx"]{
|
.player .identity[data-color="unknownx"],
|
||||||
|
div[data-nature='black']{
|
||||||
text-shadow: rgba(0,0,0,0.5) 0 0 2px,rgba(0,0,0,0.5) 0 0 5px,rgba(0,0,0,0.5) 0 0 10px,
|
text-shadow: rgba(0,0,0,0.5) 0 0 2px,rgba(0,0,0,0.5) 0 0 5px,rgba(0,0,0,0.5) 0 0 10px,
|
||||||
rgba(0,0,0,0.5) 0 0 10px,rgba(0,0,0,0.5) 0 0 20px,rgba(0,0,0,0.5) 0 0 20px,black 0 0 1px;
|
rgba(0,0,0,0.5) 0 0 10px,rgba(0,0,0,0.5) 0 0 20px,rgba(0,0,0,0.5) 0 0 20px,black 0 0 1px;
|
||||||
}
|
}
|
||||||
|
@ -877,10 +895,17 @@ div[data-color="unknownm"]{
|
||||||
.glow{
|
.glow{
|
||||||
box-shadow: rgba(0, 0, 0, 0.3) 0 0 0 1px, rgba(0, 133, 255, 0.8) 0 0 15px !important;
|
box-shadow: rgba(0, 0, 0, 0.3) 0 0 0 1px, rgba(0, 133, 255, 0.8) 0 0 15px !important;
|
||||||
}
|
}
|
||||||
.glow2{
|
.glow2:not(.player.glow_phase)>.avatar{
|
||||||
/*-webkit-animation:control_glow 4s infinite;*/
|
/*-webkit-animation:control_glow 4s infinite;*/
|
||||||
box-shadow: rgba(0, 0, 0, 0.3) 0 0 0 1px, rgba(10, 155, 67, 1) 0 0 15px, rgba(10, 155, 67, 1) 0 0 15px !important;
|
box-shadow: rgba(0, 0, 0, 0.3) 0 0 0 1px, rgba(10, 155, 67, 1) 0 0 15px, rgba(10, 155, 67, 1) 0 0 15px !important;
|
||||||
}
|
}
|
||||||
|
.player:not(.glow_phase)>.avatar.glow2{
|
||||||
|
box-shadow: rgba(0, 0, 0, 0.3) 0 0 0 1px, rgba(10, 155, 67, 1) 0 0 5px, rgba(10, 155, 67, 1) 0 0 5px, rgba(10, 155, 67, 1) 0 0 10px, rgba(10, 155, 67, 1) 0 0 10px !important
|
||||||
|
}
|
||||||
|
.player:not(.selectable):not(.selected).glow_phase{
|
||||||
|
box-shadow: rgba(0, 0, 0, 0.3) 0 0 0 1px, rgb(235, 239, 59) 0 0 15px, rgb(199, 64, 64) 0 0 15px !important;
|
||||||
|
/*box-shadow: rgba(0, 0, 0, 0.3) 0 0 0 1px, rgba(10, 155, 67, 1) 0 0 15px, rgba(10, 155, 67, 1) 0 0 15px !important;*/
|
||||||
|
}
|
||||||
|
|
||||||
.control.blue{
|
.control.blue{
|
||||||
background-image: linear-gradient(rgba(47,101,150,1), rgba(43, 90, 132,1));
|
background-image: linear-gradient(rgba(47,101,150,1), rgba(43, 90, 132,1));
|
||||||
|
@ -902,6 +927,14 @@ div[data-color="unknownm"]{
|
||||||
}
|
}
|
||||||
|
|
||||||
/*--------动画--------*/
|
/*--------动画--------*/
|
||||||
|
@keyframes cardeffect{
|
||||||
|
0%{opacity: 0;transform: scale(0.8)}
|
||||||
|
2%{opacity: 1;transform: scale(1)}
|
||||||
|
50%{opacity: 1;transform: scale(1)}
|
||||||
|
100%{opacity: 0;transform: scale(0.8)}
|
||||||
|
/*from{box-shadow: rgba(0, 0, 0, 0.3) 0 0 0 1px, rgba(10, 155, 67, 1) 0 0 15px, rgba(10, 155, 67, 1) 0 0 15px !important;}
|
||||||
|
to{box-shadow: rgba(0, 0, 0, 0.2) 0 0 0 1px, rgba(0, 0, 0, 0.45) 0 3px 10px !important}*/
|
||||||
|
}
|
||||||
@keyframes control_glow{
|
@keyframes control_glow{
|
||||||
0%{box-shadow: rgba(0, 0, 0, 0.2) 0 0 0 1px, rgba(0, 0, 0, 0.45) 0 3px 10px}
|
0%{box-shadow: rgba(0, 0, 0, 0.2) 0 0 0 1px, rgba(0, 0, 0, 0.45) 0 3px 10px}
|
||||||
30%{box-shadow: rgba(0, 0, 0, 0.3) 0 0 0 1px, rgba(10, 155, 67, 1) 0 0 15px, rgba(10, 155, 67, 1) 0 0 15px}
|
30%{box-shadow: rgba(0, 0, 0, 0.3) 0 0 0 1px, rgba(10, 155, 67, 1) 0 0 15px, rgba(10, 155, 67, 1) 0 0 15px}
|
||||||
|
|
|
@ -412,9 +412,9 @@
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
}
|
}
|
||||||
.videonode.menubutton>.videoavatar2{
|
.videonode.menubutton>.videoavatar2{
|
||||||
width: 24px;
|
width: 20px;
|
||||||
height: 24px;
|
height: 20px;
|
||||||
top:43px;
|
top:47px;
|
||||||
left:3px;
|
left:3px;
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
border-radius: 100%;
|
border-radius: 100%;
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
top:auto;
|
top:auto;
|
||||||
right:auto;
|
right:auto;
|
||||||
bottom:18px;
|
bottom:18px;
|
||||||
left:12px;
|
left:10px;
|
||||||
text-align:left;
|
text-align:left;
|
||||||
}
|
}
|
||||||
.player:not([data-position='0']).minskin .equips,
|
.player:not([data-position='0']).minskin .equips,
|
||||||
|
@ -120,7 +120,7 @@
|
||||||
|
|
||||||
.player:not([data-position='0']).linked .equips,
|
.player:not([data-position='0']).linked .equips,
|
||||||
#arena.chess .player.linked .equips{
|
#arena.chess .player.linked .equips{
|
||||||
transform:rotate(90deg) translate(-150px,-6px);
|
transform:rotate(90deg) translate(-152px,-6px);
|
||||||
transform-origin:bottom left;
|
transform-origin:bottom left;
|
||||||
}
|
}
|
||||||
.player:not([data-position='0']).minskin.linked .equips,
|
.player:not([data-position='0']).minskin.linked .equips,
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
top:auto;
|
top:auto;
|
||||||
right:auto;
|
right:auto;
|
||||||
bottom:18px;
|
bottom:18px;
|
||||||
left:12px;
|
left:10px;
|
||||||
text-align:left;
|
text-align:left;
|
||||||
}
|
}
|
||||||
.player.minskin .equips{
|
.player.minskin .equips{
|
||||||
|
@ -100,7 +100,7 @@
|
||||||
|
|
||||||
|
|
||||||
.player.linked .equips{
|
.player.linked .equips{
|
||||||
transform:rotate(90deg) translate(-150px,-6px);
|
transform:rotate(90deg) translate(-152px,-6px);
|
||||||
transform-origin:bottom left;
|
transform-origin:bottom left;
|
||||||
}
|
}
|
||||||
.player.minskin.linked .equips{
|
.player.minskin.linked .equips{
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
height:180px;
|
height:180px;
|
||||||
}
|
}
|
||||||
.player .avatar{
|
.player .avatar{
|
||||||
width:126px;
|
width:130px;
|
||||||
height:156px;
|
height:160px;
|
||||||
}
|
}
|
||||||
.player.minskin{
|
.player.minskin{
|
||||||
width:120px;
|
width:120px;
|
||||||
|
@ -12,14 +12,14 @@
|
||||||
/*zoom:0.9;*/
|
/*zoom:0.9;*/
|
||||||
}
|
}
|
||||||
.player.minskin .avatar{
|
.player.minskin .avatar{
|
||||||
height:96px;
|
height:100px;
|
||||||
width:96px;
|
width:100px;
|
||||||
}
|
}
|
||||||
.player.minskin .hp{
|
.player.minskin .hp{
|
||||||
left:86px;
|
left:88px;
|
||||||
}
|
}
|
||||||
.player.minskin .hp.text{
|
.player.minskin .hp.text{
|
||||||
left:86px;
|
left:88px;
|
||||||
}
|
}
|
||||||
.player.minskin .hp.longlong{
|
.player.minskin .hp.longlong{
|
||||||
left:74px;
|
left:74px;
|
||||||
|
@ -48,17 +48,17 @@
|
||||||
}
|
}
|
||||||
.player.fullskin2 .avatar,
|
.player.fullskin2 .avatar,
|
||||||
.player.fullskin2 .avatar2{
|
.player.fullskin2 .avatar2{
|
||||||
width:63px;
|
width:65px;
|
||||||
background-position:50%;
|
background-position:50%;
|
||||||
}
|
}
|
||||||
.player.fullskin2 .avatar{
|
.player.fullskin2 .avatar{
|
||||||
border-radius:8px 0 0 8px;
|
border-radius:8px 0 0 8px;
|
||||||
}
|
}
|
||||||
.player.fullskin2 .avatar2{
|
.player.fullskin2 .avatar2{
|
||||||
top:12px;
|
top:10px;
|
||||||
left:auto;
|
left:auto;
|
||||||
right:12px;
|
right:10px;
|
||||||
height:156px;
|
height:160px;
|
||||||
z-index:1;
|
z-index:1;
|
||||||
border-radius:0 8px 8px 0;
|
border-radius:0 8px 8px 0;
|
||||||
}
|
}
|
||||||
|
@ -117,9 +117,9 @@
|
||||||
width:18px;
|
width:18px;
|
||||||
line-height: 16px;
|
line-height: 16px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
bottom: 20px;
|
bottom: 18px;
|
||||||
top: auto;
|
top: auto;
|
||||||
left: 116px;
|
left: 118px;
|
||||||
z-index:3;
|
z-index:3;
|
||||||
transform:rotate(180deg);
|
transform:rotate(180deg);
|
||||||
}
|
}
|
||||||
|
@ -132,7 +132,7 @@
|
||||||
}
|
}
|
||||||
.player .hp.long{
|
.player .hp.long{
|
||||||
bottom:12px;
|
bottom:12px;
|
||||||
max-height:156px;
|
max-height:160px;
|
||||||
}
|
}
|
||||||
.player .hp.longlong{
|
.player .hp.longlong{
|
||||||
width:30px;
|
width:30px;
|
||||||
|
@ -153,7 +153,7 @@
|
||||||
.player .count{
|
.player .count{
|
||||||
top:auto;
|
top:auto;
|
||||||
bottom:30px;
|
bottom:30px;
|
||||||
left:-2px;
|
left:-3px;
|
||||||
padding:2px;
|
padding:2px;
|
||||||
line-height:20px;
|
line-height:20px;
|
||||||
width:10px;
|
width:10px;
|
||||||
|
|
|
@ -290,7 +290,7 @@ mode.boss={
|
||||||
|
|
||||||
game.arrangePlayers();
|
game.arrangePlayers();
|
||||||
for(var i=0;i<game.players.length;i++){
|
for(var i=0;i<game.players.length;i++){
|
||||||
ui.create.div('.action',game.players[i].node.avatar).innerHTML='行动';
|
game.players[i].node.action.innerHTML='行动';
|
||||||
}
|
}
|
||||||
|
|
||||||
var players=get.players(lib.sort.position);
|
var players=get.players(lib.sort.position);
|
||||||
|
|
|
@ -2086,6 +2086,12 @@ mode.chess={
|
||||||
!this.classList.contains('selected')) return;
|
!this.classList.contains('selected')) return;
|
||||||
_status.chessclicked=true;
|
_status.chessclicked=true;
|
||||||
this.classList.toggle('selected');
|
this.classList.toggle('selected');
|
||||||
|
if(this.classList.contains('selected')){
|
||||||
|
this.style.transform='scale(0.85)';
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
this.style.transform='scale(0.8)';
|
||||||
|
}
|
||||||
if(document.querySelectorAll('.player.selected').length>=3){
|
if(document.querySelectorAll('.player.selected').length>=3){
|
||||||
for(var i=0;i<event.arenachoicenodes.length;i++){
|
for(var i=0;i<event.arenachoicenodes.length;i++){
|
||||||
if(!event.arenachoicenodes[i].classList.contains('dead')){
|
if(!event.arenachoicenodes[i].classList.contains('dead')){
|
||||||
|
@ -2289,7 +2295,7 @@ mode.chess={
|
||||||
else{
|
else{
|
||||||
nodes[i].style.opacity=1;
|
nodes[i].style.opacity=1;
|
||||||
if(game.data.arena.acted.contains(nodes[i].name)){
|
if(game.data.arena.acted.contains(nodes[i].name)){
|
||||||
var acted=ui.create.div('.action',nodes[i].node.avatar);
|
var acted=nodes[i].node.action;
|
||||||
acted.style.opacity=1;
|
acted.style.opacity=1;
|
||||||
acted.innerHTML='疲劳';
|
acted.innerHTML='疲劳';
|
||||||
acted.dataset.nature='soilm';
|
acted.dataset.nature='soilm';
|
||||||
|
@ -2585,6 +2591,7 @@ mode.chess={
|
||||||
event.arenaback.style.opacity=1;
|
event.arenaback.style.opacity=1;
|
||||||
event.arenagiveup.replace('放弃',giveup);
|
event.arenagiveup.replace('放弃',giveup);
|
||||||
for(var i=0;i<nodes.length;i++){
|
for(var i=0;i<nodes.length;i++){
|
||||||
|
nodes[i].style.transform='scale(0.8)';
|
||||||
nodes[i].classList.remove('selected');
|
nodes[i].classList.remove('selected');
|
||||||
nodes[i].classList.remove('unselectable');
|
nodes[i].classList.remove('unselectable');
|
||||||
}
|
}
|
||||||
|
|
|
@ -254,6 +254,10 @@ mode.identity={
|
||||||
var list2=[];
|
var list2=[];
|
||||||
var list3=[];
|
var list3=[];
|
||||||
var identityList=lib.config.mode_config.identity.identity[game.players.length-2].slice(0);
|
var identityList=lib.config.mode_config.identity.identity[game.players.length-2].slice(0);
|
||||||
|
if(get.config('player_number')=='8'&&get.config('double_nei')){
|
||||||
|
identityList.remove('fan');
|
||||||
|
identityList.push('nei');
|
||||||
|
}
|
||||||
var addSetting=function(dialog){
|
var addSetting=function(dialog){
|
||||||
dialog.add('选择身份');
|
dialog.add('选择身份');
|
||||||
var table=document.createElement('table');
|
var table=document.createElement('table');
|
||||||
|
@ -612,11 +616,19 @@ mode.identity={
|
||||||
return ai.get.realAttitude(from,to)+difficulty*1.5;
|
return ai.get.realAttitude(from,to)+difficulty*1.5;
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
if(from.identity=='zhong'&&to.ai.shown==0&&from.ai.tempIgnore&&
|
||||||
|
!from.ai.tempIgnore.contains(to)){
|
||||||
|
for(var i=0;i<game.players.length;i++){
|
||||||
|
if(game.players[i].ai.shown==0&&game.players[i].identity=='fan'){
|
||||||
|
return -0.1+difficulty*1.5;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
return ai.get.realAttitude(from,to)*to.ai.shown+difficulty*1.5;
|
return ai.get.realAttitude(from,to)*to.ai.shown+difficulty*1.5;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
realAttitude:function(from,to){
|
realAttitude:function(from,to){
|
||||||
if(_status.currentPhase==from&&from.ai.tempIgnore&&from.ai.tempIgnore.contains(to)) return 0;
|
// if(_status.currentPhase==from&&from.ai.tempIgnore&&from.ai.tempIgnore.contains(to)) return 0;
|
||||||
var situation=ai.get.situation();
|
var situation=ai.get.situation();
|
||||||
var identity=from.spy||from.identity;
|
var identity=from.spy||from.identity;
|
||||||
var identity2=to.identity;
|
var identity2=to.identity;
|
||||||
|
@ -628,6 +640,7 @@ mode.identity={
|
||||||
case 'zhong': return 6;
|
case 'zhong': return 6;
|
||||||
case 'nei':
|
case 'nei':
|
||||||
if(game.players.length==2) return -10;
|
if(game.players.length==2) return -10;
|
||||||
|
if(get.population('fan')==0) return -0.5;
|
||||||
if(situation>1) return 0;
|
if(situation>1) return 0;
|
||||||
return Math.min(3,get.population('fan'));
|
return Math.min(3,get.population('fan'));
|
||||||
case 'fan': return -4;
|
case 'fan': return -4;
|
||||||
|
@ -667,7 +680,8 @@ mode.identity={
|
||||||
if(get.population('fan')==0) num=-5;
|
if(get.population('fan')==0) num=-5;
|
||||||
else if(situation<=0) num=0;
|
else if(situation<=0) num=0;
|
||||||
else if(game.zhu&&game.zhu.hp<2) num=0;
|
else if(game.zhu&&game.zhu.hp<2) num=0;
|
||||||
else if(game.zhu&&game.zhu.hp==2) num=-0.5
|
else if(game.zhu&&game.zhu.hp==2) num=-1;
|
||||||
|
else if(game.zhu&&game.zhu.hp<=2&&situation>1) num=-1;
|
||||||
else num=-2;
|
else num=-2;
|
||||||
if(strategy==2) num--;
|
if(strategy==2) num--;
|
||||||
if(strategy==3) num++;
|
if(strategy==3) num++;
|
||||||
|
@ -675,13 +689,14 @@ mode.identity={
|
||||||
case 'nei':
|
case 'nei':
|
||||||
if(from==to) return 10;
|
if(from==to) return 10;
|
||||||
if(from.ai.friend.contains(to)) return 5;
|
if(from.ai.friend.contains(to)) return 5;
|
||||||
|
if(get.population('fan')+get.population('zhong')>0) return 0;
|
||||||
return -1;
|
return -1;
|
||||||
case 'fan':
|
case 'fan':
|
||||||
if(strategy==5) return Math.max(-1,situation);
|
if(strategy==5) return Math.max(-1,situation);
|
||||||
if(strategy==6) return Math.min(0,situation);
|
if(strategy==6) return Math.min(0,situation);
|
||||||
if((game.zhu&&game.zhu.hp<=2&&situation<=0)||situation<-1) num=-3;
|
if((game.zhu&&game.zhu.hp<=2&&situation<0)||situation<-1) num=-3;
|
||||||
else if(situation<0||get.population('zhong')==0) num=-2;
|
else if(situation<0||get.population('zhong')==0) num=-2;
|
||||||
else if((game.zhu&&game.zhu.hp>4&&situation>0)||situation>1) num=1;
|
else if((game.zhu&&game.zhu.hp>=4&&situation>0)||situation>1) num=1;
|
||||||
else num=0;
|
else num=0;
|
||||||
if(strategy==2) num++;
|
if(strategy==2) num++;
|
||||||
if(strategy==3) num--;
|
if(strategy==3) num--;
|
||||||
|
@ -708,10 +723,11 @@ mode.identity={
|
||||||
var zhuzhong=0,total=0,zhu,fan=0;
|
var zhuzhong=0,total=0,zhu,fan=0;
|
||||||
for(i=0;i<game.players.length;i++){
|
for(i=0;i<game.players.length;i++){
|
||||||
player=game.players[i];
|
player=game.players[i];
|
||||||
j=player.get('h').length+player.get('e').length*1.5+player.hp*2;
|
var php=player.hp;
|
||||||
if(player.skills.contains('benghuai')){
|
if(player.skills.contains('benghuai')&&php>4){
|
||||||
j-=player.hp/1.5;
|
php=4;
|
||||||
}
|
}
|
||||||
|
j=player.get('h').length+player.get('e').length*1.5+php*2;
|
||||||
if(player.identity=='zhu'){
|
if(player.identity=='zhu'){
|
||||||
zhuzhong+=j*1.2+5;
|
zhuzhong+=j*1.2+5;
|
||||||
total+=j*1.2+5;
|
total+=j*1.2+5;
|
||||||
|
|
|
@ -1208,8 +1208,8 @@ mode.stone={
|
||||||
if(es.length){
|
if(es.length){
|
||||||
player.getLeader().line(enemy);
|
player.getLeader().line(enemy);
|
||||||
game.delay();
|
game.delay();
|
||||||
enemy.gain(es,'gain2');
|
enemy.discard(es.randomGet());
|
||||||
game.log(get.translation(event.enemy)+'将'+get.translation(es)+'收入手牌')
|
// game.log(get.translation(event.enemy)+'将'+get.translation(es)+'收入手牌')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -1450,7 +1450,7 @@ mode.stone={
|
||||||
stone_shujiang_info:'你出场时,已方主将可视为对一名敌方角色使用一张杀',
|
stone_shujiang_info:'你出场时,已方主将可视为对一名敌方角色使用一张杀',
|
||||||
|
|
||||||
stone_wubing:'吴兵',
|
stone_wubing:'吴兵',
|
||||||
stone_wubing_info:'你出场时,敌方主将将装备区内的所有牌收入手牌',
|
stone_wubing_info:'你出场时,敌方主将随机弃置一张装备牌',
|
||||||
stone_wuguan:'吴官',
|
stone_wuguan:'吴官',
|
||||||
stone_wuguan_info:'你出场时,已方主将本回合手牌上限+2',
|
stone_wuguan_info:'你出场时,已方主将本回合手牌上限+2',
|
||||||
stone_wujiang:'吴将',
|
stone_wujiang:'吴将',
|
||||||
|
|
|
@ -365,7 +365,7 @@ mode.versus={
|
||||||
var num=lib.storage.number;
|
var num=lib.storage.number;
|
||||||
ui.create.players(num*2);
|
ui.create.players(num*2);
|
||||||
for(var i=0;i<game.players.length;i++){
|
for(var i=0;i<game.players.length;i++){
|
||||||
ui.create.div('.action',game.players[i].node.avatar).innerHTML='行动';
|
game.players[i].node.action.innerHTML='行动';
|
||||||
}
|
}
|
||||||
if(lib.storage.single_control&&lib.storage.control_all&&game.players.length>=4){
|
if(lib.storage.single_control&&lib.storage.control_all&&game.players.length>=4){
|
||||||
ui.arena.dataset.number=parseInt(ui.arena.dataset.number)+1;
|
ui.arena.dataset.number=parseInt(ui.arena.dataset.number)+1;
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
.card:not(*:empty){
|
||||||
|
color:rgb(77, 60, 51);
|
||||||
|
text-shadow:none;
|
||||||
|
background: url('../music/wood3.png');
|
||||||
|
background-size:auto;
|
||||||
|
}
|
|
@ -0,0 +1,9 @@
|
||||||
|
.card:not(*:empty){
|
||||||
|
color:rgb(77, 60, 51);
|
||||||
|
text-shadow:none;
|
||||||
|
background: url('../simple/card.png');
|
||||||
|
background-size:cover;
|
||||||
|
}
|
||||||
|
#arena:not(.chess) .player[data-position='0']>.equips>.equip5 {
|
||||||
|
border-radius: 8px;
|
||||||
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
.card:not(*:empty){
|
||||||
|
color:rgb(77, 60, 51);
|
||||||
|
text-shadow:none;
|
||||||
|
background: url('../woodden/wood.jpg');
|
||||||
|
background-size:auto;
|
||||||
|
}
|
|
@ -15,17 +15,19 @@ body{
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
#system>div>div,#mebg,.control,.player,.card,.avatar,.avatar2,.button,#window>.dialog.popped,
|
#system>div>div,#mebg,.control,.player,.card,.avatar,.avatar2,.button,#window>.dialog.popped,
|
||||||
.player.unseen .equips:not(*:empty),
|
.player.unseen .equips:not(*:empty),.menu,.menubutton,
|
||||||
#arena.mobile:not(.chess) .player[data-position='0'] .equips{
|
#arena.mobile:not(.chess) .player[data-position='0'] .equips{
|
||||||
box-shadow: rgba(0, 0, 0, 0.4) 0 0 0 1px, rgba(0, 0, 0, 0.2) 0 3px 10px;
|
box-shadow: rgba(0, 0, 0, 0.4) 0 0 0 1px, rgba(0, 0, 0, 0.2) 0 3px 10px;
|
||||||
background-image: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4));
|
background-image: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4));
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
}
|
}
|
||||||
.menu{
|
.menubutton{
|
||||||
box-shadow: rgba(0, 0, 0, 0.2) 0 0 0 1px, rgba(0, 0, 0, 0.2) 0 3px 10px;
|
border-radius: 4px;
|
||||||
background-image: linear-gradient(#4b4b4b, #464646);
|
|
||||||
border-radius: 8px;
|
|
||||||
}
|
}
|
||||||
|
/*.player{
|
||||||
|
background-image: url('card.png');
|
||||||
|
background-size: cover;
|
||||||
|
}*/
|
||||||
#window>.dialog.popped{
|
#window>.dialog.popped{
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
}
|
}
|
||||||
|
@ -45,6 +47,11 @@ body{
|
||||||
#me>div>.card,#arena>.card:not(*:empty){
|
#me>div>.card,#arena>.card:not(*:empty){
|
||||||
box-shadow: rgba(0, 0, 0, 0.2) 0 0 0 1px, rgba(0, 0, 0, 0.45) 0 3px 10px;
|
box-shadow: rgba(0, 0, 0, 0.2) 0 0 0 1px, rgba(0, 0, 0, 0.45) 0 3px 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.menupaused{
|
||||||
|
opacity: 0.3;
|
||||||
|
}
|
||||||
|
|
||||||
.fire{
|
.fire{
|
||||||
color: rgb(255,119,63);
|
color: rgb(255,119,63);
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 126 KiB |
Loading…
Reference in New Issue