1.8.2.9
This commit is contained in:
parent
459098ab87
commit
d7a52b8c80
|
@ -128,16 +128,21 @@ card.refresh={
|
|||
direct:true,
|
||||
content:function(){
|
||||
"step 0"
|
||||
var dialog=ui.create.dialog('木牛流马',player.get('e','5').cards);
|
||||
player.chooseButton(dialog).filterButton=function(button){
|
||||
return trigger.filterCard(button.link);
|
||||
};
|
||||
player.chooseButton(['木牛流马',player.get('e','5').cards]).set('filterButton',function(button){
|
||||
var evt=_status.event.getParent()._trigger;
|
||||
if(evt&&evt.filterCard){
|
||||
return evt.filterCard(button.link,_status.event.player);
|
||||
}
|
||||
return true;
|
||||
});
|
||||
"step 1"
|
||||
if(result.bool){
|
||||
trigger.untrigger();
|
||||
trigger.responded=true;
|
||||
trigger.result={bool:true,card:result.buttons[0].link};
|
||||
player.get('e','5').cards.remove(result.buttons[0].link);
|
||||
trigger.result={bool:true,card:result.links[0]};
|
||||
var muniu=player.get('e','5');
|
||||
muniu.cards.remove(result.links[0]);
|
||||
lib.skill.muniu_skill.sync(muniu);
|
||||
}
|
||||
},
|
||||
ai:{
|
||||
|
@ -148,7 +153,6 @@ card.refresh={
|
|||
},
|
||||
muniu_skill4:{
|
||||
enable:'chooseToUse',
|
||||
direct:true,
|
||||
filter:function(event,player){
|
||||
var muniu=player.get('e','5');
|
||||
if(!muniu.cards) return false;
|
||||
|
@ -158,12 +162,18 @@ card.refresh={
|
|||
}
|
||||
return false;
|
||||
},
|
||||
delay:0,
|
||||
content:function(){
|
||||
"step 0"
|
||||
var dialog=ui.create.dialog('木牛流马',player.get('e','5').cards);
|
||||
var trigger=event.parent.parent;
|
||||
player.chooseButton(dialog,function(button){
|
||||
chooseButton:{
|
||||
dialog:function(event,player){
|
||||
return ui.create.dialog('木牛流马',player.get('e','5').cards,'hidden');
|
||||
},
|
||||
filter:function(button,player){
|
||||
var evt=_status.event.getParent();
|
||||
if(evt&&evt.filterCard){
|
||||
return evt.filterCard(button.link,player,_status.event.getParent());
|
||||
}
|
||||
return true;
|
||||
},
|
||||
check:function(button){
|
||||
var player=_status.event.player;
|
||||
if(get.select(get.info(button.link).selectTarget)[1]==-1){
|
||||
if(get.type(button.link)=='delay') return -1;
|
||||
|
@ -182,28 +192,29 @@ card.refresh={
|
|||
return -1;
|
||||
}
|
||||
return 1;
|
||||
}).filterButton=function(button){
|
||||
return trigger.filterCard(button.link,player,trigger);
|
||||
};
|
||||
player.addTempSkill('muniu_skill8',['useCardAfter','phaseAfter']);
|
||||
"step 1"
|
||||
if(result.bool){
|
||||
lib.skill.muniu_skill5.viewAs=result.buttons[0].link;
|
||||
event.parent.parent.backup('muniu_skill5');
|
||||
event.parent.parent.step=0;
|
||||
if(event.isMine()){
|
||||
event.parent.parent.openskilldialog='选择'+get.translation(result.buttons[0].link)+'的目标';
|
||||
},
|
||||
backup:function(links,player){
|
||||
return {
|
||||
filterCard:function(){return false},
|
||||
selectCard:-1,
|
||||
viewAs:links[0],
|
||||
onuse:function(result,player){
|
||||
var muniu=player.get('e','5');
|
||||
if(muniu&&muniu.cards){
|
||||
muniu.cards.remove(result.card);
|
||||
lib.skill.muniu_skill.sync(muniu);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else{
|
||||
event.parent.parent.step=0;
|
||||
},
|
||||
prompt:function(links,player){
|
||||
return '选择'+get.translation(links)+'的目标';
|
||||
}
|
||||
},
|
||||
ai:{
|
||||
order:4,
|
||||
result:{
|
||||
player:function(player){
|
||||
if(player.skills.contains('muniu_skill8')) return 0;
|
||||
if(_status.dying) return ai.get.attitude(player,_status.dying);
|
||||
return 1;
|
||||
}
|
||||
|
@ -212,12 +223,7 @@ card.refresh={
|
|||
value:-1
|
||||
}
|
||||
},
|
||||
muniu_skill5:{
|
||||
filterCard:function(){return false},
|
||||
selectCard:-1
|
||||
},
|
||||
muniu_skill6:{},
|
||||
muniu_skill8:{},
|
||||
muniu_skill7:{
|
||||
filter:function(){return false},
|
||||
hiddenCard:function(player,name){
|
||||
|
@ -273,8 +279,8 @@ card.refresh={
|
|||
muniu_skill2:'流马',
|
||||
muniu_skill3:'流马',
|
||||
muniu_skill4:'流马',
|
||||
muniu_skill5:'流马',
|
||||
muniu_skill6:'流马',
|
||||
muniu_skill4_backup:'流马',
|
||||
muniu_info:'出牌阶段限一次,你可以将一张手牌扣置于你装备区里的【木牛流马】下,若如此做,你可以将此装备移动到一名其他角色的装备区里;你可以将此装备牌下的牌如手牌般使用或打出。',
|
||||
muniu_skill_info:'出牌阶段限一次,你可以将一张手牌扣置于你装备区里的【木牛流马】下,若如此做,你可以将此装备移动到一名其他角色的装备区里;你可以将此装备牌下的牌如手牌般使用或打出。',
|
||||
},
|
||||
|
|
|
@ -1383,6 +1383,12 @@ card.standard={
|
|||
event.state=true;
|
||||
event.card=trigger.card;
|
||||
event._global_waiting=true;
|
||||
event.filterCard=function(card,player){
|
||||
if(card.name!='wuxie') return false;
|
||||
var mod=game.checkMod(card,player,'unchanged','cardEnabled',player.get('s'));
|
||||
if(mod!='unchanged') return mod;
|
||||
return true;
|
||||
};
|
||||
event.send=function(player,state,isJudge,card,source,target,targets,id){
|
||||
state=state?1:-1;
|
||||
var str='';
|
||||
|
|
|
@ -2749,7 +2749,6 @@ character.shenhua={
|
|||
player.storage.buqu.push(event.card);
|
||||
game.addVideo('storage',player,['buqu',get.cardsInfo(player.storage.buqu),'cards']);
|
||||
player.showCards(player.storage.buqu,'不屈')
|
||||
game.log(player,'的不屈牌为',player.storage.buqu);
|
||||
player.markSkill('buqu');
|
||||
"step 1"
|
||||
for(var i=0;i<player.storage.buqu.length-1;i++){
|
||||
|
|
|
@ -2214,7 +2214,7 @@ character.sp={
|
|||
},
|
||||
content:function(){
|
||||
player.storage.mozhi.add(trigger.card);
|
||||
player.markSkill('mozhi');
|
||||
if(player.get('s').contains('mozhi')) player.markSkill('mozhi');
|
||||
}
|
||||
},
|
||||
chenqing2:{},
|
||||
|
|
122
game/game.js
122
game/game.js
|
@ -3768,14 +3768,14 @@
|
|||
game.saveConfig('mode',this.link);
|
||||
splash.delete();
|
||||
delete window.inSplash;
|
||||
var scriptnode=lib.init.js(lib.assetURL+'mode',lib.config.mode);
|
||||
if(scriptnode){
|
||||
scriptnode.onload=proceed;
|
||||
}
|
||||
else{
|
||||
proceed();
|
||||
}
|
||||
lib.init.js(lib.assetURL+'mode',lib.config.mode,proceed);
|
||||
}
|
||||
var downNode=function(){
|
||||
this.classList.add('glow');
|
||||
}
|
||||
var upNode=function(){
|
||||
this.classList.remove('glow');
|
||||
}
|
||||
var splash=ui.create.div('#splash',document.body);
|
||||
for(var i=0;i<lib.config.all.mode.length;i++){
|
||||
var node=ui.create.div(splash,'.hidden',clickNode);
|
||||
|
@ -3787,6 +3787,16 @@
|
|||
else{
|
||||
ui.create.div(node,'.avatar').setBackgroundDB(lib.mode[lib.config.all.mode[i]].splash);
|
||||
}
|
||||
if(lib.config.touchscreen){
|
||||
node.addEventListener('touchstart',downNode);
|
||||
node.addEventListener('touchend',upNode);
|
||||
node.addEventListener('mouseleave',upNode);
|
||||
}
|
||||
else{
|
||||
node.addEventListener('mousedown',downNode);
|
||||
node.addEventListener('mouseup',upNode);
|
||||
node.addEventListener('mouseleave',upNode);
|
||||
}
|
||||
ui.refresh(node);
|
||||
setTimeout((function(node){
|
||||
return function(){
|
||||
|
@ -4246,6 +4256,10 @@
|
|||
var skill=event.skill;
|
||||
ui.click.cancel();
|
||||
event.aiexclude.add(skill);
|
||||
var info=get.info(skill);
|
||||
if(info.aiexclude){
|
||||
event.aiexclude.add(info.aiexclude);
|
||||
}
|
||||
}
|
||||
else{
|
||||
get.card().aiexclude();
|
||||
|
@ -4271,21 +4285,55 @@
|
|||
}
|
||||
}
|
||||
"step 2"
|
||||
if(event.result){
|
||||
if(event.result.skill){
|
||||
var info=get.info(event.result.skill);
|
||||
if(info&&info.chooseButton){
|
||||
if(event.dialog&&typeof event.dialog=='object') event.dialog.close();
|
||||
var dialog=info.chooseButton.dialog(event,player);
|
||||
var next=player.chooseButton(dialog);
|
||||
next.set('ai',info.chooseButton.check||function(){return 0;});
|
||||
next.set('filterButton',info.chooseButton.filter||function(){return true;});
|
||||
event.buttoned=event.result.skill;
|
||||
}
|
||||
}
|
||||
}
|
||||
"step 3"
|
||||
if(event.buttoned){
|
||||
if(result.bool){
|
||||
var info=get.info(event.buttoned).chooseButton;
|
||||
lib.skill[event.buttoned+'_backup']=info.backup(result.links,player);
|
||||
lib.skill[event.buttoned+'_backup'].aiexclude=event.buttoned;
|
||||
if(game.online){
|
||||
event._sendskill=[event.buttoned+'_backup',lib.skill[event.buttoned+'_backup']];
|
||||
}
|
||||
event.backup(event.buttoned+'_backup');
|
||||
if(info.prompt){
|
||||
event.openskilldialog=info.prompt(result.links,player);
|
||||
}
|
||||
}
|
||||
else{
|
||||
event.aiexclude.add(event.buttoned);
|
||||
}
|
||||
event.goto(0);
|
||||
delete event.buttoned;
|
||||
}
|
||||
"step 4"
|
||||
delete _status.noclearcountdown;
|
||||
if(event.skillDialog&&get.objtype(event.skillDialog)=='div'){
|
||||
event.skillDialog.close();
|
||||
}
|
||||
if(event.onresult){
|
||||
event.onresult(event.result);
|
||||
}
|
||||
if(event.result.bool&&!game.online&&!event.nouse){
|
||||
player.useResult(event.result,event);
|
||||
}
|
||||
else if(event._sendskill){
|
||||
event.result._sendskill=event._sendskill;
|
||||
}
|
||||
if(event.dialog&&typeof event.dialog=='object') event.dialog.close();
|
||||
if(!_status.noclearcountdown){
|
||||
game.stopCountChoose();
|
||||
}
|
||||
"step 3"
|
||||
"step 5"
|
||||
if(event._result&&event.result){
|
||||
event.result.result=event._result;
|
||||
}
|
||||
|
@ -5420,6 +5468,9 @@
|
|||
next.preResult=event.preResult;
|
||||
}
|
||||
"step 5"
|
||||
if(event._result){
|
||||
event.result=event._result;
|
||||
}
|
||||
delete player.using;
|
||||
if(document.getElementsByClassName('thrown').length){
|
||||
if(event.delayx!==false) game.delayx();
|
||||
|
@ -5435,9 +5486,6 @@
|
|||
ui.tempnowuxie.close();
|
||||
delete ui.tempnowuxie;
|
||||
}
|
||||
if(event._result){
|
||||
event.result=event._result;
|
||||
}
|
||||
},
|
||||
useSkill:function(){
|
||||
"step 0"
|
||||
|
@ -7698,8 +7746,20 @@
|
|||
},
|
||||
useResult:function(result,event){
|
||||
event=event||_status.event;
|
||||
if(result.skill&&get.info(result.skill).direct){
|
||||
_status.noclearcountdown=true;
|
||||
if(result._sendskill){
|
||||
lib.skill[result._sendskill[0]]=result._sendskill[1];
|
||||
}
|
||||
if(event.onresult){
|
||||
event.onresult(result);
|
||||
}
|
||||
if(result.skill){
|
||||
var info=get.info(result.skill);
|
||||
if(info.onuse){
|
||||
info.onuse(result,this);
|
||||
}
|
||||
if(info.direct){
|
||||
_status.noclearcountdown=true;
|
||||
}
|
||||
}
|
||||
if(event.logSkill){
|
||||
if(typeof event.logSkill=='string'){
|
||||
|
@ -10234,6 +10294,7 @@
|
|||
var skills={
|
||||
global:lib.skill.global
|
||||
};
|
||||
var skillinfo={};
|
||||
for(var i in lib.playerOL){
|
||||
skills[i]={
|
||||
skills:lib.playerOL[i].skills,
|
||||
|
@ -10243,7 +10304,12 @@
|
|||
storage:lib.playerOL[i].storage,
|
||||
}
|
||||
}
|
||||
this.player.send(function(name,args,set,event,stat,skills){
|
||||
for(var i in lib.skill){
|
||||
if(lib.skill[i].chooseButton&&lib.skill[i].enable){
|
||||
skillinfo[i]=lib.skill[i].chooseButton;
|
||||
}
|
||||
}
|
||||
this.player.send(function(name,args,set,event,stat,skills,skillinfo){
|
||||
for(var i in skills){
|
||||
if(i=='global'){
|
||||
lib.skill.global=skills[i];
|
||||
|
@ -10254,6 +10320,12 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
for(var i in skillinfo){
|
||||
if(!lib.skill[i]){
|
||||
lib.skill[i]={};
|
||||
}
|
||||
lib.skill[i].chooseButton=skillinfo[i];
|
||||
}
|
||||
game.me.stat=[stat];
|
||||
var next=game.me[name].apply(game.me,args);
|
||||
for(var i=0;i<set.length;i++){
|
||||
|
@ -10263,7 +10335,7 @@
|
|||
game.resume();
|
||||
},this.name,this._args||[],this._set,
|
||||
get.stringifiedResult(this.parent,3),
|
||||
this.player.getStat(),skills);
|
||||
this.player.getStat(),skills,skillinfo);
|
||||
this.player.wait();
|
||||
game.pause();
|
||||
},
|
||||
|
@ -11531,7 +11603,7 @@
|
|||
game.createEvent('game',false).content=lib.init.startOnline;
|
||||
game.loop();
|
||||
game.send('reinited');
|
||||
if(!observe&&game.me&&game.me.isDead){
|
||||
if(!observe&&game.me&&game.me.isDead()){
|
||||
ui.exit=ui.create.control('退出联机',function(){
|
||||
game.saveConfig('reconnect_info');
|
||||
game.reload();
|
||||
|
@ -14812,7 +14884,7 @@
|
|||
if(info.filter&&info.filter(event,player)==false) enable=false;
|
||||
if(info.viewAs&&event.filterCard&&!event.filterCard(info.viewAs,player)) enable=false;
|
||||
if(info.viewAs&&info.viewAsFilter&&info.viewAsFilter(player)==false) enable=false;
|
||||
if(event.aiexclude.contains(skills2[i])) enable=false;
|
||||
if(!event.isMine()&&event.aiexclude.contains(skills2[i])) enable=false;
|
||||
if(info.usable&&get.skillCount(skills2[i])>=info.usable) enable=false;
|
||||
}
|
||||
if(enable){
|
||||
|
@ -23110,6 +23182,9 @@
|
|||
},
|
||||
funcInfoOL:function(func){
|
||||
if(typeof func=='function'){
|
||||
if(func._filter_args){
|
||||
return '_noname_func:'+JSON.stringify(get.stringifiedResult(func._filter_args,3));
|
||||
}
|
||||
return '_noname_func:'+func.toString();
|
||||
}
|
||||
return '';
|
||||
|
@ -23122,6 +23197,9 @@
|
|||
catch(e){
|
||||
return function(){};
|
||||
}
|
||||
if(Array.isArray(func)){
|
||||
func=get.filter.apply(this,get.parsedResult(func));
|
||||
}
|
||||
return func;
|
||||
},
|
||||
stringifiedResult:function(item,level){
|
||||
|
@ -23683,7 +23761,7 @@
|
|||
filter:function(filter,i){
|
||||
if(typeof filter=='function') return filter;
|
||||
if(i==undefined) i=0;
|
||||
return function(){
|
||||
var result=function(){
|
||||
if(filter==arguments[i]) return true;
|
||||
for(var j in filter){
|
||||
if(filter.hasOwnProperty(j)){
|
||||
|
@ -23742,6 +23820,8 @@
|
|||
}
|
||||
return true;
|
||||
}
|
||||
result._filter_args=[filter,i];
|
||||
return result;
|
||||
},
|
||||
cardCount:function(card,player){
|
||||
var num;
|
||||
|
|
|
@ -2,7 +2,6 @@ window.noname_update={
|
|||
version:'1.8.2.9',
|
||||
changeLog:[
|
||||
'联机死亡后可退出',
|
||||
'修复双击换肤',
|
||||
'修复不能出酒的bug'
|
||||
'bug修复:换肤、濒死出酒、无懈、自定义模式、木马'
|
||||
]
|
||||
}
|
||||
|
|
|
@ -62,6 +62,9 @@ table{table-layout: fixed;}
|
|||
position: relative;
|
||||
transition: all 0.5s;
|
||||
}
|
||||
#splash>div:hover{
|
||||
transform: scale(1.02);
|
||||
}
|
||||
#splash>div.hidden{
|
||||
transform: translateY(-200px);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue