Video Contents

This commit is contained in:
Spmario233 2023-08-15 19:56:10 +08:00
parent 80527caeec
commit 3e30794286
2 changed files with 67 additions and 5 deletions

View File

@ -116,11 +116,27 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player.chooseButton([ player.chooseButton([
'挈挟:选择至多'+get.cnNumber(num)+'张武将置入武器栏', '挈挟:选择至多'+get.cnNumber(num)+'张武将置入武器栏',
[list,'character'], [list,'character'],
],[1,num],true) ],[1,num],true).set('ai',function(button){
var name=button.link;
var info=lib.character[name];
var skills=info[3].filter(function(skill){
var info=get.skillInfoTranslation(skill);
if(!info.includes('【杀】')) return false;
var list=get.skillCategoriesOf(skill);
list.remove('锁定技');
return list.length==0;
});
var eff=0.2;
for(var i of skills){
eff+=get.skillRank(i,'in');
}
return eff;
})
} }
'step 1' 'step 1'
if(result.bool){ if(result.bool){
var list=result.links; var list=result.links;
game.addVideo('skill',player,['qiexie',[list]])
game.broadcastAll(function(list){ game.broadcastAll(function(list){
for(var name of list) lib.skill.qiexie.createCard(name); for(var name of list) lib.skill.qiexie.createCard(name);
},list); },list);
@ -135,7 +151,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){
for(var card of cards) player.equip(card); for(var card of cards) player.equip(card);
} }
}, },
video:function(player,info){
for(var name of info[0]){
lib.skill.qiexie.createCard(name);
}
},
createCard:function(name){ createCard:function(name){
if(!_status.postReconnect.qiexie) _status.postReconnect.qiexie=[
function(list){
for(var name of list) lib.skill.qiexie.createCard(name);
},[]
];
_status.postReconnect.qiexie[1].add(name)
if(!lib.card['qiexie_'+name]){ if(!lib.card['qiexie_'+name]){
if(lib.translate[name+'_ab']) lib.translate['qiexie_'+name]=lib.translate[name+'_ab']; if(lib.translate[name+'_ab']) lib.translate['qiexie_'+name]=lib.translate[name+'_ab'];
else lib.translate['qiexie_'+name]=lib.translate[name]; else lib.translate['qiexie_'+name]=lib.translate[name];
@ -242,11 +269,21 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return !game.hasPlayer(current=>(current!=target&&player.inRange(current)&&get.distance(player,current)>distance)); return !game.hasPlayer(current=>(current!=target&&player.inRange(current)&&get.distance(player,current)>distance));
}, },
position:'he', position:'he',
check:card=>6-get.value(card),
content:function(){ content:function(){
player.addTempSkill('cuijue_used','phaseUseAfter'); player.addTempSkill('cuijue_used','phaseUseAfter');
player.markAuto('cuijue_used',[target]); player.markAuto('cuijue_used',[target]);
target.damage('nocard'); target.damage('nocard');
}, },
ai:{
order:2,
result:{
target:-1.5
},
tag:{
damage:1
}
},
subSkill:{ subSkill:{
used:{ used:{
onremove:true, onremove:true,

View File

@ -61,6 +61,7 @@
}, },
renku:[], renku:[],
prehidden_skills:[], prehidden_skills:[],
postReconnect:{},
}; };
var lib={ var lib={
configprefix:'noname_0.9_', configprefix:'noname_0.9_',
@ -18475,6 +18476,7 @@
if(!map){ if(!map){
map=(player.expandedSlots||{}); map=(player.expandedSlots||{});
} }
game.addVideo('$syncExpand',player,get.copy(map))
game.broadcast(function(player,map){ game.broadcast(function(player,map){
player.expandedSlots=map; player.expandedSlots=map;
player.$syncExpand(map); player.$syncExpand(map);
@ -18488,6 +18490,7 @@
if(!map){ if(!map){
map=(player.disabledSlots||{}); map=(player.disabledSlots||{});
} }
game.addVideo('$syncDisable',player,get.copy(map))
game.broadcast(function(player,map){ game.broadcast(function(player,map){
player.disabledSlots=map; player.disabledSlots=map;
player.$syncDisable(map); player.$syncDisable(map);
@ -19128,8 +19131,9 @@
}, },
$disableJudge:function(){ $disableJudge:function(){
var player=this; var player=this;
var card=game.createCard('disable_judge','',''); game.addVideo('$disableJudge',player);
player.storage._disableJudge=true; player.storage._disableJudge=true;
var card=game.createCard('disable_judge','','');
card.fix(); card.fix();
card.classList.add('feichu'); card.classList.add('feichu');
card.style.transform=''; card.style.transform='';
@ -19139,6 +19143,7 @@
}, },
$enableJudge:function(){ $enableJudge:function(){
var player=this; var player=this;
game.addVideo('$enableJudge',player);
player.storage._disableJudge=false; player.storage._disableJudge=false;
for(var i=0;i<player.node.judges.childNodes.length;i++){ for(var i=0;i<player.node.judges.childNodes.length;i++){
if(player.node.judges.childNodes[i].name=='disable_judge'){ if(player.node.judges.childNodes[i].name=='disable_judge'){
@ -30091,7 +30096,7 @@
game.broadcast(function(player){ game.broadcast(function(player){
player.setNickname(); player.setNickname();
},player); },player);
this.send('reinit',lib.configOL,get.arenaState(),game.getState?game.getState():{},game.ip,null,_status.onreconnect,_status.cardtag); this.send('reinit',lib.configOL,get.arenaState(),game.getState?game.getState():{},game.ip,null,_status.onreconnect,_status.cardtag,_status.postReconnect);
} }
else if(version!=lib.versionOL){ else if(version!=lib.versionOL){
this.send('denied','version'); this.send('denied','version');
@ -30722,7 +30727,7 @@
} }
} }
}, },
reinit:function(config,state,state2,ip,observe,onreconnect,cardtag){ reinit:function(config,state,state2,ip,observe,onreconnect,cardtag,postReconnect){
ui.auto.show(); ui.auto.show();
ui.pause.show(); ui.pause.show();
game.clearConnect(); game.clearConnect();
@ -30810,7 +30815,6 @@
mode.onreinit(); mode.onreinit();
} }
_status.cardtag=get.parsedResult(cardtag); _status.cardtag=get.parsedResult(cardtag);
state=get.parsedResult(state);
game.players=[]; game.players=[];
game.dead=[]; game.dead=[];
for(var i in lib.characterPack){ for(var i in lib.characterPack){
@ -30838,6 +30842,13 @@
ui.arena.classList.add('observe'); ui.arena.classList.add('observe');
} }
} }
postReconnect=get.parsedResult(postReconnect);
for(var i in postReconnect){
if(Array.isArray(postReconnect[i])){
postReconnect[i].shift().apply(this,postReconnect[i]);
}
}
state=get.parsedResult(state);
ui.arena.setNumber(state.number); ui.arena.setNumber(state.number);
_status.mode=state.mode; _status.mode=state.mode;
_status.renku=state.renku; _status.renku=state.renku;
@ -32620,6 +32631,20 @@
} }
} }
}, },
$syncDisable:function(player,map){
player.disabledSlots=map;
player.$syncDisable(map)
},
$syncExpand:function(player,map){
player.expandedSlots=map;
player.$syncExpand(map)
},
$disableJudge:function(player,map){
player.$disableJudge()
},
$enableJudge:function(player,map){
player.$enableJudge()
},
jiuNode:function(player,bool){ jiuNode:function(player,bool){
//Powered by 升麻 //Powered by 升麻
if(bool){ if(bool){