This commit is contained in:
libccy 2016-03-30 15:31:51 +08:00
parent ee3d2ba5df
commit 8282638a3c
14 changed files with 721 additions and 742 deletions

BIN
audio/skill/reyingzi_sunce1.mp3 Normal file → Executable file

Binary file not shown.

View File

@ -144,6 +144,7 @@ character.hearth={
}
'step 1'
if(result.control){
game.stopCountChoose();
var link=result.control;
player.addSkill(link);
player.skills.remove(link);
@ -2904,6 +2905,7 @@ character.hearth={
event.finish();
}
'step 1'
game.stopCountChoose();
if(result.buttons.length==1){
player.addSkill(result.buttons[0].name);
}

View File

@ -1357,7 +1357,7 @@ character.refresh={
reqianxun_info:'每当一张延时类锦囊牌或其他角色使用的非延时类锦囊牌生效时,若你是此牌的唯一目标,你可以将所有手牌置于你的武将牌上,若如此做,此回合结束时,你获得你武将牌上的所有牌。',
relianying_info:'当你失去最后的手牌时你可以令至多X名角色各摸一张牌X为你此次失去的手牌数。',
reyingzi_info:'锁定技,摸牌阶段摸牌时,你额外摸一张牌;你的手牌上限不会因体力值的减少而减少。',
refanjian_info:'出牌阶段限一次,你可以展示一张手牌并将此牌交给一名其他角色。然后该角色选择一项:展示其手牌并弃置所有与此牌花色相同的牌,或去一点体力。',
refanjian_info:'出牌阶段限一次,你可以展示一张手牌并将此牌交给一名其他角色。然后该角色选择一项:展示其手牌并弃置所有与此牌花色相同的牌,或去一点体力。',
qingjian_info:'每当你于摸牌阶段外获得牌时,你可以将其中任意牌以任意顺序交给其他角色,每回合最多发动四次',
qinxue_info:'觉醒技准备阶段开始时若你的手牌数比体力值多3人数不少于7时改为2或更多你须减一点体力上限并获得技能【攻心】',
retuxi_info:'摸牌阶段摸牌时,你可以少摸任意张牌,然后选择等量的手牌数大于或等于你的其他角色,获得这些角色的各一张手牌。',

View File

@ -607,6 +607,7 @@ character.shenhua={
}
"step 2"
if(result.bool&&result.targets&&result.targets.length){
game.stopCountChoose();
var card=event.card;
player.storage.tuntian.remove(card);
game.addVideo('storage',player,['tuntian',get.cardsInfo(player.storage.tuntian),'cards']);

View File

@ -694,12 +694,54 @@ character.standard={
if(player.isUnderControl()){
game.modeSwapPlayer(player);
}
var cards=get.cards(Math.min(5,game.players.length));
event.switchToAuto=function(){
_status.imchoosing=false;
if(event.dialog) event.dialog.close();
if(event.control) event.control.close();
var top=[];
var judges=player.node.judges.childNodes;
var stopped=false;
if(!player.num('h','wuxie')){
for(var i=0;i<judges.length;i++){
var judge=get.judge(judges[i]);
cards.sort(function(a,b){
return judge(b)-judge(a);
});
if(judge(cards[0])<0){
stopped=true;break;
}
else{
top.unshift(cards.shift());
}
}
}
var bottom;
if(!stopped){
cards.sort(function(a,b){
return ai.get.value(b,player)-ai.get.value(a,player);
});
while(cards.length){
if(ai.get.value(cards[0],player)<=5) break;
top.unshift(cards.shift());
}
}
bottom=cards;
for(var i=0;i<top.length;i++){
ui.cardPile.insertBefore(top[i],ui.cardPile.firstChild);
}
for(i=0;i<bottom.length;i++){
ui.cardPile.appendChild(bottom[i]);
}
player.popup(get.cnNumber(top.length)+'上'+get.cnNumber(bottom.length)+'下');
game.log(player,'将'+get.cnNumber(top.length)+'张牌置于牌堆顶');
game.delay(2);
};
if(event.isMine()){
ui.auto.hide();
event.top=[];
event.bottom=[];
event.status=true;
event.dialog=ui.create.dialog('按顺序选择置于牌堆顶的牌(先选择的在上)',get.cards(Math.min(5,game.players.length)));
event.dialog=ui.create.dialog('按顺序选择置于牌堆顶的牌(先选择的在上)',cards);
event.control=ui.create.control('ok','pileTop','pileBottom',function(link){
var event=_status.event;
if(link=='ok'){
@ -718,8 +760,8 @@ character.standard={
event.dialog.close();
event.control.close();
game.log(player,'将'+get.cnNumber(event.top.length)+'张牌置于牌堆顶');
ui.auto.show();
game.resume();
_status.imchoosing=false;
}
else if(link=='pileTop'){
event.status=true;
@ -761,46 +803,10 @@ character.standard={
}
}
game.pause();
game.countChoose();
}
else{
var cards=get.cards(Math.min(5,game.players.length));
var top=[];
var judges=player.node.judges.childNodes;
var stopped=false;
if(!player.num('h','wuxie')){
for(var i=0;i<judges.length;i++){
var judge=get.judge(judges[i]);
cards.sort(function(a,b){
return judge(b)-judge(a);
});
if(judge(cards[0])<0){
stopped=true;break;
}
else{
top.unshift(cards.shift());
}
}
}
var bottom;
if(!stopped){
cards.sort(function(a,b){
return ai.get.value(b,player)-ai.get.value(a,player);
});
while(cards.length){
if(ai.get.value(cards[0],player)<=5) break;
top.unshift(cards.shift());
}
}
bottom=cards;
for(var i=0;i<top.length;i++){
ui.cardPile.insertBefore(top[i],ui.cardPile.firstChild);
}
for(i=0;i<bottom.length;i++){
ui.cardPile.appendChild(bottom[i]);
}
player.popup(get.cnNumber(top.length)+'上'+get.cnNumber(bottom.length)+'下');
game.log(player,'将'+get.cnNumber(top.length)+'张牌置于牌堆顶');
game.delay(2);
event.switchToAuto();
}
},
ai:{

View File

@ -2831,7 +2831,7 @@ character.yijiang={
forceunique:true,
trigger:{global:'phaseUseBegin'},
filter:function(event,player){
return event.player!=player&&player.num('h')>0;
return event.player!=player;
},
prompt:function(event,player){
return '是否对'+get.translation(event.player)+'发动【献图】?'
@ -2893,17 +2893,28 @@ character.yijiang={
},
qiangzhi:{
audio:2,
enable:'phaseUse',
usable:1,
trigger:{player:'phaseUseBegin'},
direct:true,
filterTarget:function(card,player,target){
return target!=player&&target.num('h')>0;
},
content:function(){
var card=target.get('h').randomGet();
player.showCards(card);
player.storage.qiangzhi=get.type(card,'trick');
game.addVideo('storage',player,['qiangzhi',player.storage.qiangzhi]);
player.markSkill('qiangzhi');
'step 0'
player.chooseTarget('是否发动【强识】?',function(card,player,target){
return target!=player&&target.num('h')>0;
}).ai=function(){
return Math.random();
}
'step 1'
if(result.bool){
var target=result.targets[0];
player.logSkill('qiangzhi',target);
var card=target.get('h').randomGet();
player.showCards(card);
player.storage.qiangzhi=get.type(card,'trick');
game.addVideo('storage',player,['qiangzhi',player.storage.qiangzhi]);
player.markSkill('qiangzhi');
}
},
intro:{
content:function(type){

View File

@ -228,6 +228,7 @@ window.config={
show_volumn:true,
show_cardpile:true,
only_fullskin:true,
show_connect:true,
show_wuxie:false,
show_wuxie_self:true,
show_stat:true,

File diff suppressed because it is too large Load Diff

View File

@ -1,30 +0,0 @@
'use strict';
{
let WebSocketServer=require('ws').Server;
let wss=new WebSocketServer({port:8080});
wss.on('connection',function(ws){
ws.on('message',function(messagestr){
let message;
try{
message=JSON.parse(messagestr);
if(!Array.isArray(message)||
typeof server.message[message[0]]!=='function'){
throw('err');
}
}
catch(e){
console.log('invalid message: '+messagestr);
return;
}
server.message[message.shift()].apply(ws.player,message);
});
ws.on('close',function(){
if(server.status.gaming){
ws.player.closed=true;
}
else{
server.players.delete(ws.player.id);
}
});
});
}

View File

@ -1,9 +1,11 @@
window.noname_update={
version:'1.8.1.4',
version:'1.8.1.5',
changeLog:[
'自由选将改进',
'命令输入改进',
'修复不能导入模式的bug',
'主题并入素材'
'主题并入素材',
'按钮位置选项',
'录像兼容性改进'
]
}

View File

@ -164,7 +164,7 @@ table{table-layout: fixed;}
pointer-events: none;
position: absolute;
}
#arena.playerfocus>div:not(.playerfocus):not(#chess-container):not(.removing){
#arena.playerfocus>div:not(#timer):not(.playerfocus):not(#chess-container):not(.removing){
opacity: 0.3 !important;
}
#arena.playerfocus #chess>div:not(.playerfocus):not(.removing){
@ -1316,6 +1316,75 @@ span[data-color="unknownm"]{
left:calc(100% - 11px);
}
#arena>.skillbar{
width: 65px;
height: 65px;
border-radius: 100%;
font-size: 55px;
font-family: 'huangcao';
top:calc(50% - 110px);
line-height: 65px;
text-align: center;
}
#arena>.skillbar.left{
left:0;
right: auto;
}
#arena>.skillbar.right{
right:0;
left:auto;
}
#arena>.skillbar>div{
border-radius: 100%;
width: 55px;
height: 55px;
position: absolute;
margin: 0;
padding: 0;
left: 5px;
top: 5px;
overflow: hidden;
}
#arena>.skillbar>.skillbarshadow{
box-shadow: 0px 0px 8px #222 inset;
z-index: 1;
}
#arena>.skillbar>.skillbarfill>div{
box-shadow: 0px 0px 10px #555 inset,rgba(0, 0, 0, 0.05) 0 0 0 1px;
width: 200%;
height: 200%;
position: absolute;
margin: 0;
padding: 0;
background-color: rgba(63, 119, 173,1);
left: -50%;
top: 100%;
}
#arena>.skillbar.full>.skillbarfill>div{
box-shadow: none;
background-color: red;
}
#arena>.skillbar.full{
/*transform: scale(1.1);*/
/*box-shadow: rgba(0, 0, 0, 0.1) 0 0 0 1px, rgba(0, 0, 0, 0.45) 0 3px 10px;
-webkit-animation:skillbarglow 3s infinite;*/
}
#arena>.skillbar>.skillbartext{
font-family: 'xinwei';
font-size: 35px;
width: 100%;
text-align: center;
height: 35px;
line-height: 40px;
overflow: visible;
margin: 0;
padding: 0;
left: 0;
top: 15px;
z-index: 2;
opacity: 0;
}
.firetext{
color: rgb(255,119,63);
}

View File

@ -282,7 +282,8 @@
}
.popup-container>.menu{
position:absolute;
overflow:hidden;
overflow:scroll;
max-height: 400px;
}
.popup-container>.menu>div{
padding-top:5px;

View File

@ -277,74 +277,7 @@
display: none !important;
}
#arena>.skillbar{
width: 65px;
height: 65px;
border-radius: 100%;
font-size: 55px;
font-family: 'huangcao';
top:calc(50% - 110px);
line-height: 65px;
text-align: center;
}
#arena>.skillbar.left{
left:0;
right: auto;
}
#arena>.skillbar.right{
right:0;
left:auto;
}
#arena>.skillbar>div{
border-radius: 100%;
width: 55px;
height: 55px;
position: absolute;
margin: 0;
padding: 0;
left: 5px;
top: 5px;
overflow: hidden;
}
#arena>.skillbar>.skillbarshadow{
box-shadow: 0px 0px 8px #222 inset;
z-index: 1;
}
#arena>.skillbar>.skillbarfill>div{
box-shadow: 0px 0px 10px #555 inset,rgba(0, 0, 0, 0.05) 0 0 0 1px;
width: 200%;
height: 200%;
position: absolute;
margin: 0;
padding: 0;
background-color: rgba(63, 119, 173,1);
left: -50%;
top: 100%;
}
#arena>.skillbar.full>.skillbarfill>div{
box-shadow: none;
background-color: red;
}
#arena>.skillbar.full{
/*transform: scale(1.1);*/
/*box-shadow: rgba(0, 0, 0, 0.1) 0 0 0 1px, rgba(0, 0, 0, 0.45) 0 3px 10px;
-webkit-animation:skillbarglow 3s infinite;*/
}
#arena>.skillbar>.skillbartext{
font-family: 'xinwei';
font-size: 35px;
width: 100%;
text-align: center;
height: 35px;
line-height: 40px;
overflow: visible;
margin: 0;
padding: 0;
left: 0;
top: 15px;
z-index: 2;
opacity: 0;
}
/*#arena>.skillbar>.skillbartext:hover{
opacity: 1;
}*/

View File

@ -6,6 +6,17 @@ mode.identity={
ui.arena.classList.add('only_dialog');
}
_status.mode=get.config('identity_mode');
if(lib.config.connectMode){
game.createServer();
for(var i in lib.mode.identity.config){
if(lib.mode.identity.config[i].connect){
lib.configOL[i]=get.config(i);
}
}
lib.configOL.number=lib.configOL.player_number;
lib.configOL.characterPack='standard';
lib.configOL.cardPack='standard';
}
"step 1"
var playback=localStorage.getItem(lib.configprefix+'playback');
if(playback){
@ -139,7 +150,12 @@ mode.identity={
_status.auto=true;
ui.auto.classList.add('glow');
}
game.chooseCharacter();
if(_status.connectMode){
game.waitForStart();
}
else{
game.chooseCharacter();
}
"step 4"
if(ui.coin){
_status.coinCoeff=get.coinCoeff([game.me.name]);