|
@ -942,10 +942,12 @@ character.ow={
|
|||
"step 0"
|
||||
player.storage.shanxian_h=player.get('h');
|
||||
player.storage.shanxian_e=player.get('e');
|
||||
player.storage.shanxian_n=2;
|
||||
player.syncStorage('shanxian_e');
|
||||
player.line(trigger.player,'green');
|
||||
player.phase();
|
||||
player.storage.shanxian=trigger.player;
|
||||
player.removeSkill('shanxian2');
|
||||
"step 1"
|
||||
if(!player.isTurnedOver()){
|
||||
player.turnOver();
|
||||
|
@ -966,18 +968,28 @@ character.ow={
|
|||
}
|
||||
}
|
||||
},
|
||||
shanxian2:{
|
||||
trigger:{player:['gainBegin','loseBegin']},
|
||||
forced:true,
|
||||
popup:false,
|
||||
content:function(){
|
||||
player.removeSkill('shanxian2');
|
||||
}
|
||||
},
|
||||
shanhui:{
|
||||
unique:true,
|
||||
trigger:{player:'damageEnd'},
|
||||
trigger:{player:'damageEnd',source:'damageEnd'},
|
||||
filter:function(event,player){
|
||||
return player.storage.shanxian_h&&player.storage.shanxian_e;
|
||||
return player.storage.shanxian_h&&player.storage.shanxian_e&&
|
||||
player.storage.shanxian_n>0&&!player.hasSkill('shanxian2');
|
||||
},
|
||||
check:function(event,player){
|
||||
var n1=player.num('he');
|
||||
var n2=player.storage.shanxian_h.length+player.storage.shanxian_e.length;
|
||||
if(n1<n2) return true;
|
||||
if(player.hp==player.maxHp) return false;
|
||||
if(n1==n2+1) return true;
|
||||
if(n2==n2+2&&player.hp<=1) return true;
|
||||
if(n1<n2) return true;
|
||||
return false;
|
||||
},
|
||||
video:function(player){
|
||||
|
@ -1012,8 +1024,15 @@ character.ow={
|
|||
if(cards.length>player.storage.shanxian_h.length+player.storage.shanxian_e.length){
|
||||
player.recover();
|
||||
}
|
||||
delete player.storage.shanxian_h;
|
||||
delete player.storage.shanxian_e;
|
||||
player.storage.shanxian_n--;
|
||||
if(player.storage.shanxian_n<=0){
|
||||
delete player.storage.shanxian_h;
|
||||
delete player.storage.shanxian_e;
|
||||
delete player.storage.shanxian_n;
|
||||
}
|
||||
else{
|
||||
player.addSkill('shanxian2');
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -1062,7 +1081,7 @@ character.ow={
|
|||
shanxian:'闪现',
|
||||
shanxian_info:'在一名其他角色的回合开始前,若你的武将牌正面朝上,你可以进行一个额外回合,并在回合结束后将武将牌翻至背面。若如此做,你对其使用卡牌无视距离直到回合结束。',
|
||||
shanhui:'闪回',
|
||||
shanhui_info:'每当你受到一次伤害,你可以将你的牌重置为上次发动闪现前的状态,若你的牌数因此而减少,你回复一点体力',
|
||||
shanhui_info:'每当你造成或受到一次伤害,你可以将你的牌重置为上次发动闪现前的状态,若你的牌数因此而减少,你回复一点体力。每个状态最多可重现两次',
|
||||
ow_liekong:'猎空',
|
||||
ow_sishen:'死神',
|
||||
ow_tianshi:'天使',
|
||||
|
|
|
@ -268,7 +268,13 @@ character.sp={
|
|||
audio:2,
|
||||
trigger:{player:'damageEnd'},
|
||||
filter:function(event,player){
|
||||
return event.source&&event.source.num('h')!=player.num('h');
|
||||
if(!event.source) return false;
|
||||
var nh1=player.num('h');
|
||||
var nh2=event.source.num('h');
|
||||
if(nh1==nh2) return false;
|
||||
if(nh2<nh2&&nh1>=5) return false;
|
||||
if(nh2>nh2&&event.source.isDead()) return false;
|
||||
return true;
|
||||
},
|
||||
direct:true,
|
||||
content:function(){
|
||||
|
@ -293,7 +299,7 @@ character.sp={
|
|||
}
|
||||
else{
|
||||
event.draw=true;
|
||||
event.num=num2-num1;
|
||||
event.num=Math.min(num2,5)-num1;
|
||||
player.chooseBool('是否发动【贲育】?');
|
||||
}
|
||||
"step 1"
|
||||
|
@ -778,6 +784,7 @@ character.sp={
|
|||
var trigger=_status.event.getTrigger();
|
||||
if(ai.get.attitude(player,trigger.player)<0){
|
||||
var he=trigger.player.num('he');
|
||||
if(he<2) return '出杀';
|
||||
if(player.maxHp-player.hp>=2&&he<=3){
|
||||
return '弃牌';
|
||||
}
|
||||
|
@ -787,7 +794,7 @@ character.sp={
|
|||
if(player.maxHp-player.hp>3){
|
||||
return '弃牌';
|
||||
}
|
||||
return
|
||||
return '出杀';
|
||||
}
|
||||
return '出杀';
|
||||
}).set('prompt','弃置'+get.translation(trigger.player)+get.cnNumber(player.maxHp-player.hp)+'张牌,或对任意一名角色使用一张杀');
|
||||
|
|
|
@ -504,7 +504,7 @@ character.yxs={
|
|||
return !player.storage.heqin;
|
||||
},
|
||||
filterTarget:function(card,player,target){
|
||||
return target.sex=='male';
|
||||
return target.sex=='male'&&target!=player;
|
||||
},
|
||||
content:function(){
|
||||
player.addSkill('heqin2');
|
||||
|
|
21
game/game.js
|
@ -3262,10 +3262,10 @@
|
|||
if(!lib.config.gameRecord){
|
||||
lib.config.gameRecord={};
|
||||
}
|
||||
// if(lib.config.debug){
|
||||
// mode.pack.story='剧情';
|
||||
// mode.pack.realtime='即时';
|
||||
// }
|
||||
if(lib.config.debug){
|
||||
mode.pack.story='剧情';
|
||||
mode.pack.realtime='即时';
|
||||
}
|
||||
for(i in mode.pack){
|
||||
if(lib.config.hiddenModePack.indexOf(i)==-1){
|
||||
lib.config.all.mode.push(i);
|
||||
|
@ -13194,6 +13194,19 @@
|
|||
var game={
|
||||
online:false,
|
||||
onlineID:null,
|
||||
createBackground:function(src,blur){
|
||||
var current=document.body.querySelector('.background.upper');
|
||||
if(current){
|
||||
current.delete();
|
||||
}
|
||||
var node=ui.create.div('.background.blurbg',document.body);
|
||||
node.setBackgroundImage(src);
|
||||
node.style.backgroundSize='cover';
|
||||
if(blur){
|
||||
node.classList.add('paused')
|
||||
}
|
||||
return node;
|
||||
},
|
||||
checkFileList:function(updates,proceed){
|
||||
var n=updates.length;
|
||||
for(var i=0;i<updates.length;i++){
|
||||
|
|
|
@ -6,7 +6,10 @@ window.noname_update={
|
|||
files:{
|
||||
global:[
|
||||
'character/sp.js',
|
||||
'character/yxs.js',
|
||||
'character/ow.js',
|
||||
'game/game.js',
|
||||
'layout/default/layout.css',
|
||||
],
|
||||
'1.8.15.2':[]
|
||||
}
|
||||
|
|
After Width: | Height: | Size: 97 KiB |
After Width: | Height: | Size: 122 KiB |
After Width: | Height: | Size: 105 KiB |
After Width: | Height: | Size: 77 KiB |
After Width: | Height: | Size: 122 KiB |
After Width: | Height: | Size: 112 KiB |
After Width: | Height: | Size: 145 KiB |
After Width: | Height: | Size: 157 KiB |
After Width: | Height: | Size: 126 KiB |
After Width: | Height: | Size: 141 KiB |
After Width: | Height: | Size: 147 KiB |
|
@ -443,6 +443,7 @@ body>.background.paused{
|
|||
-webkit-filter:blur(3px);
|
||||
}
|
||||
body>.background{z-index:-5}
|
||||
body>.background.upper{z-index:-4}
|
||||
.popup{padding: 5px;}
|
||||
.removing,.hidden{opacity: 0 !important;}
|
||||
#system>div>div.hidden{opacity:0.5 !important;}
|
||||
|
@ -452,6 +453,11 @@ body>.background{z-index:-5}
|
|||
filter:blur(3px);
|
||||
-webkit-filter:blur(3px)
|
||||
}
|
||||
.blurbg{
|
||||
filter:blur(3px) !important;
|
||||
-webkit-filter:blur(3px) !important;
|
||||
transform: scale(1.2);
|
||||
}
|
||||
.blur{
|
||||
filter:blur(3px) !important;
|
||||
-webkit-filter:blur(3px) !important;
|
||||
|
|
|
@ -0,0 +1,84 @@
|
|||
#storyscene{
|
||||
height: 500px;
|
||||
top:calc(50% - 250px);
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
overflow-x: scroll;
|
||||
overflow-y: hidden;
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
}
|
||||
#storyscene.lockscroll{
|
||||
overflow-x: hidden;
|
||||
}
|
||||
#storyscene>.player.scene{
|
||||
width: 350px;
|
||||
height: 420px;
|
||||
position: relative;
|
||||
left: 0;
|
||||
top:40px;
|
||||
margin-left: -40px;
|
||||
margin-right: -40px;
|
||||
z-index: 1;
|
||||
border-radius: 16px !important;
|
||||
overflow: hidden;
|
||||
}
|
||||
#storyscene>.player.scene.flipped{
|
||||
z-index: 2;
|
||||
border-radius: 12px !important;
|
||||
}
|
||||
#storyscene>.player.scene.flipped>div:not(.menu){
|
||||
display: none;
|
||||
}
|
||||
#storyscene>.player.scene:not(.flipped)>.menu{
|
||||
display: none;
|
||||
}
|
||||
#storyscene>.player.scene:first-child{
|
||||
margin-left: 50px;
|
||||
}
|
||||
#storyscene>.player.scene:last-child{
|
||||
margin-right: 50px;
|
||||
}
|
||||
#storyscene>.player.scene>.name{
|
||||
font-size: 48px;
|
||||
right: 25px;
|
||||
left: auto;
|
||||
top: auto;
|
||||
bottom: 28px;
|
||||
transform: rotateY(-180deg);
|
||||
border-radius: 16px !important;
|
||||
}
|
||||
#storyscene>.player.scene>.menu{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
box-shadow: none;
|
||||
}
|
||||
#storyscene>.player.scene>.avatar{
|
||||
width: calc(100% - 26px);
|
||||
height: calc(100% - 26px);
|
||||
left: 13px;
|
||||
top: 13px;
|
||||
transform: rotateY(-180deg);
|
||||
}
|
||||
#storyscene>.player.scene.startscene{
|
||||
-webkit-animation: scene_start 0.5s;
|
||||
}
|
||||
|
||||
@-webkit-keyframes scene_start{
|
||||
from{
|
||||
opacity: 0;
|
||||
transform:scale(0.5);
|
||||
margin-left: -175px;
|
||||
margin-right: -175px;
|
||||
}
|
||||
to{
|
||||
opacity: 1;
|
||||
transform: scale(1);
|
||||
margin-left: 16px;
|
||||
margin-right: 16px;
|
||||
}
|
||||
}
|
152
mode/story.js
|
@ -6,6 +6,32 @@ mode.story={
|
|||
'step 1'
|
||||
game.loadScene();
|
||||
},
|
||||
story:{
|
||||
version:1,
|
||||
scene:{
|
||||
taoyuanxiang:{
|
||||
name:'桃源乡',
|
||||
},
|
||||
yingxiongting:{
|
||||
name:'英雄亭',
|
||||
},
|
||||
nanyang:{
|
||||
name:'南阳',
|
||||
},
|
||||
xujiacun:{
|
||||
name:'许家村',
|
||||
},
|
||||
huanghedukou:{
|
||||
name:'黄河渡口'
|
||||
},
|
||||
xinye:{
|
||||
name:'新野'
|
||||
},
|
||||
changsha:{
|
||||
name:'长沙'
|
||||
}
|
||||
}
|
||||
},
|
||||
game:{
|
||||
minskin:true,
|
||||
singleHandcard:true,
|
||||
|
@ -268,6 +294,129 @@ mode.story={
|
|||
var next=game.createEvent('loadScene');
|
||||
next.content=function(){
|
||||
'step 0'
|
||||
lib.init.css('layout/mode','story');
|
||||
game.delay();
|
||||
'step 1'
|
||||
var sceneNode=ui.create.div('#storyscene',ui.window);
|
||||
// sceneNode.addEventListener('mousewheel',function(e){
|
||||
// if(this.wheeling) return;
|
||||
// var current=this.querySelector('.flipped');
|
||||
// if(current){
|
||||
// if(e.wheelDelta>0){
|
||||
// if(current.nextSibling){
|
||||
// this.wheeling=true;
|
||||
// setTimeout(function(){
|
||||
// sceneNode.wheeling=false;
|
||||
// },500);
|
||||
// clickScene.call(current.nextSibling);
|
||||
// e.preventDefault();
|
||||
// e.stopPropagation();
|
||||
// }
|
||||
// }
|
||||
// else{
|
||||
// if(current.previousSibling){
|
||||
// this.wheeling=true;
|
||||
// setTimeout(function(){
|
||||
// sceneNode.wheeling=false;
|
||||
// },500);
|
||||
// clickScene.call(current.previousSibling);
|
||||
// e.preventDefault();
|
||||
// e.stopPropagation();
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
var clickScene=function(e){
|
||||
if(this._clicking) return;
|
||||
if(this.classList.contains('flipped')){
|
||||
e.stopPropagation();
|
||||
return;
|
||||
}
|
||||
var current=document.querySelector('.player.flipped.scene');
|
||||
if(current){
|
||||
restoreScene(current,true);
|
||||
}
|
||||
sceneNode.classList.add('lockscroll');
|
||||
_status.clicked=true;
|
||||
var node=this;
|
||||
node._clicking=true;
|
||||
setTimeout(function(){
|
||||
node._clicking=false;
|
||||
},700);
|
||||
sceneNode.dx=ui.window.offsetWidth/2-(-sceneNode.scrollLeft+this.offsetLeft+this.offsetWidth/2);
|
||||
if(!sceneNode.interval){
|
||||
sceneNode.interval=setInterval(function(){
|
||||
var dx=sceneNode.dx;
|
||||
if(Math.abs(dx)<=2){
|
||||
sceneNode.scrollLeft+=dx;
|
||||
clearInterval(sceneNode.interval);
|
||||
delete sceneNode.interval;
|
||||
}
|
||||
else{
|
||||
var ddx=dx/Math.sqrt(Math.abs(dx))*1.5;
|
||||
sceneNode.scrollLeft-=ddx;
|
||||
sceneNode.dx-=ddx;
|
||||
}
|
||||
},16);
|
||||
}
|
||||
node.style.transition='all ease-in 0.2s';
|
||||
node.style.transform='perspective(1600px) rotateY(-90deg) scale(0.75)';
|
||||
var onEnd=function(){
|
||||
node.removeEventListener('webkitTransitionEnd',onEnd);
|
||||
node.classList.add('flipped');
|
||||
sceneNode.classList.add('lockscroll');
|
||||
node.style.transition='all ease-out 0.4s';
|
||||
node.style.transform='perspective(1600px) rotateY(0) scale(1)'
|
||||
};
|
||||
node.addEventListener('webkitTransitionEnd',onEnd);
|
||||
}
|
||||
var restoreScene=function(node,forced){
|
||||
if(node._clicking&&!forced) return;
|
||||
if(node.transformInterval){
|
||||
clearInterval(node.transformInterval);
|
||||
delete node.transformInterval;
|
||||
}
|
||||
node._clicking=true;
|
||||
setTimeout(function(){
|
||||
node._clicking=false;
|
||||
},700);
|
||||
node.style.transition='all ease-in 0.2s';
|
||||
node.style.transform='perspective(1600px) rotateY(-90deg) scale(0.75)';
|
||||
var onEnd=function(){
|
||||
node.removeEventListener('webkitTransitionEnd',onEnd);
|
||||
node.classList.remove('flipped');
|
||||
if(!sceneNode.querySelector('.flipped')){
|
||||
sceneNode.classList.remove('lockscroll');
|
||||
}
|
||||
node.style.transition='all ease-out 0.4s';
|
||||
node.style.transform='perspective(1600px) rotateY(-180deg) scale(0.7)'
|
||||
};
|
||||
node.addEventListener('webkitTransitionEnd',onEnd);
|
||||
}
|
||||
var createScene=function(name){
|
||||
var scene=lib.story.scene[name];
|
||||
var node=ui.create.div('.player.scene',clickScene).animate('start');
|
||||
node.style.transform='perspective(1600px) rotateY(-180deg) scale(0.7)';
|
||||
node.name=name;
|
||||
ui.create.div('.avatar',node).setBackground('mode/story/scene_'+name);
|
||||
ui.create.div('.name',node,get.verticalStr(scene.name)).dataset.nature='soilm';
|
||||
node.content=ui.create.div('.menu',node);
|
||||
sceneNode.appendChild(node);
|
||||
}
|
||||
event.custom.add.window=function(){
|
||||
var current=document.querySelector('.player.flipped.scene');
|
||||
if(current){
|
||||
restoreScene(current);
|
||||
}
|
||||
}
|
||||
var count=0;
|
||||
for(var i in lib.story.scene){
|
||||
setTimeout((function(i){
|
||||
return function(){
|
||||
createScene(i);
|
||||
}
|
||||
}(i)),0*(count++));
|
||||
}
|
||||
game.pause();
|
||||
}
|
||||
}
|
||||
|
@ -343,9 +492,6 @@ mode.story={
|
|||
},
|
||||
},
|
||||
posmap:{},
|
||||
story:{
|
||||
version:1
|
||||
},
|
||||
translate:{
|
||||
friend:'友',
|
||||
friend2:'友',
|
||||
|
|