Merge pull request #429 from libccy/PR-Branch

v1.10.2.1
This commit is contained in:
Spmario233 2023-09-30 02:15:41 +08:00 committed by GitHub
commit b5a16af388
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
32 changed files with 481 additions and 324 deletions

BIN
audio/die/dc_xujing.mp3 Normal file

Binary file not shown.

BIN
audio/die/wu_luxun.mp3 Normal file

Binary file not shown.

BIN
audio/die/yue_zhoufei.mp3 Normal file

Binary file not shown.

BIN
audio/skill/dccaixia1.mp3 Normal file

Binary file not shown.

BIN
audio/skill/dccaixia2.mp3 Normal file

Binary file not shown.

BIN
audio/skill/dclingkong1.mp3 Normal file

Binary file not shown.

BIN
audio/skill/dclingkong2.mp3 Normal file

Binary file not shown.

BIN
audio/skill/dcruxian1.mp3 Normal file

Binary file not shown.

BIN
audio/skill/dcruxian2.mp3 Normal file

Binary file not shown.

BIN
audio/skill/dcshangyu1.mp3 Normal file

Binary file not shown.

BIN
audio/skill/dcshangyu2.mp3 Normal file

Binary file not shown.

BIN
audio/skill/dcxianshu1.mp3 Normal file

Binary file not shown.

BIN
audio/skill/dcxianshu2.mp3 Normal file

Binary file not shown.

BIN
audio/skill/dcxiongmu1.mp3 Normal file

Binary file not shown.

BIN
audio/skill/dcxiongmu2.mp3 Normal file

Binary file not shown.

BIN
audio/skill/dczhangcai1.mp3 Normal file

Binary file not shown.

BIN
audio/skill/dczhangcai2.mp3 Normal file

Binary file not shown.

View File

@ -381,7 +381,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
trigger:{player:'equipAfter'},
forced:true,
equipSkill:true,
filter:(event,player)=>event.card.name=='tianjitu'&&player.hasCard(card=>card!=event.card),
filter:(event,player)=>event.card.name=='tianjitu'&&player.hasCard(card=>card!=event.card,'he'),
content:()=>{
player.chooseToDiscard(true,card=>card!=_status.event.getTrigger().card,'he');
},

View File

@ -624,19 +624,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){
audio:2,
trigger:{player:'useCardAfter'},
filter:function(event,player){
if(event.skill=='dccuixin') return false;
if(event.targets.length==0) return false;
if(get.type(event.card,false)=='delay'||get.type(event.card,false)=='equip') return false;
if(!event._dccuixin||get.type(event.card,false)=='delay'||get.type(event.card,false)=='equip') return false;
var card={
name:event.card.name,
nature:event.card.nature,
isCard:true,
}
for(var target of event.targets){
var targetx;
if(target==player.getNext()) targetx=player.getPrevious();
else if(target==player.getPrevious()) targetx=player.getNext();
else continue;
},list=event._dccuixin;
for(var target of list){
var targetx=player[target]();
if(lib.filter.targetEnabled2(card,targetx,player)) return true;
}
return false;
@ -650,21 +645,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){
isCard:true,
};
event.card=card;
var list=trigger.targets.filter(target=>{
var targetx;
if(target==player.getNext()) targetx=player.getPrevious();
else if(target==player.getPrevious()) targetx=player.getNext();
else return false;
if(lib.filter.targetEnabled2(card,targetx,player)) return true;
}).map(target=>{
return target==player.getPrevious()?player.getNext():player.getPrevious();
var list=[];
trigger._dccuixin.forEach(target=>{
var targetx=player[target]();
if(lib.filter.targetEnabled2(card,targetx,player)) list.add(targetx);
});
if(list.length==1){
event.target=list[0];
player.chooseBool('摧心:是否视为对'+get.translation(list[0])+'使用'+get.translation(card)+'').set('goon',get.effect(list[0],card,player,player)>0).set('ai',()=>_status.event.goon);
player.chooseBool('摧心:是否视为对'+get.translation(list[0])+'使用'+get.translation(card)+'').set('goon',get.effect(list[0],card,player,player)>0).set('ai',()=>_status.event.goon);
}
else{
player.chooseTarget('摧心:是否视为对上家或下家使用'+get.translation(card)+'','操作提示:从上家或下家中选择一名角色作为使用目标',function(card,player,target){
player.chooseTarget('摧心:是否视为对上家或下家使用'+get.translation(card)+'','操作提示:从上家或下家中选择一名角色作为使用目标',function(card,player,target){
return (target==player.getNext()||target==player.getPrevious())&&lib.filter.targetEnabled2(_status.event.getParent().card,target,player);
}).set('ai',function(target){
var player=_status.event.player;
@ -677,6 +668,28 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player.useCard(card,target,false,'dccuixin');
}
},
group:'dccuixin_silent',
subSkill:{
silent:{
trigger:{player:'useCardToPlayered'},
silent:true,
forced:true,
popup:false,
firstDo:true,
charlotte:true,
filter:function(event,player){
if(!event.isFirstTarget||event.getParent().skill=='dccuixin') return false;
if(event.targets.length==0) return false;
return event.targets.includes(player.getNext())||event.targets.includes(player.getPrevious());
},
content:function(){
var list=[];
if(trigger.targets.includes(player.getNext())) list.push('getPrevious');
if(trigger.targets.includes(player.getPrevious())) list.push('getNext');
trigger.getParent()._dccuixin=list;
}
},
},
},
//海外神吕蒙
twshelie:{
@ -2828,7 +2841,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
tspowei:{
audio:3,
dutySkill:true,
locked:true,
derivation:'shenzhu',
group:['tspowei_init','tspowei_move','tspowei_achieve','tspowei_fail','tspowei_use','tspowei_remove'],
subSkill:{
@ -4813,7 +4825,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return 10*Math.sqrt(Math.max(0.01,get.threaten(target)))/(3.5-draw)+dis/(2*game.countPlayer());
}
else{
if(target.isTurnedOver()) return -att-draw;
if(target.isTurnedOver()) return att-draw;
if(draw>=5) return -1;
if(current&&target.getSeatNum()<=current.getSeatNum()) return -att+draw/3;
return (4.25-draw)*10*Math.sqrt(Math.max(0.01,get.threaten(target)))+2*game.countPlayer()/dis;
@ -7364,7 +7376,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
dcqijing:'奇径',
dcqijing_info:'觉醒技。一名角色的回合结束后若你的三个副区域标签均被激活则你减1点体力上限将座位移动至一名其他角色的上家之后获得〖摧心〗和一个额外回合。',
dccuixin:'摧心',
dccuixin_info:'当你不因此技能使用的基本牌或普通锦囊牌结算结束后,若此牌的目标包含你的上家或下家,则你可以视为对下家或上家再使用一张牌名和元素相同的牌。',
dccuixin_info:'当你不因此技能使用的基本牌或普通锦囊牌结算结束后,若此牌的目标于你使用此牌指定第一个目标时包含你的上家或下家,则你可以视为对下家或上家再使用一张牌名和元素相同的牌。',
shen_dianwei:'神典韦',
juanjia:'捐甲',
juanjia_info:'锁定技。游戏开始时,你废除一个防具栏,然后获得一个额外的武器栏。',

View File

@ -2619,15 +2619,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if(result.bool){
var cards=result.cards,targets=result.targets;
event.cards=cards;
var cardx=get.autoViewAs({name:'sha'},cards);
event.cardx=cardx;
player.useCard(cardx,cards,targets,false,'dcsaowei');
var next=player.useCard({name:'sha'},cards,targets,false,'dcsaowei');
player.when('useCardAfter')
.filter(event=>event==next)
.then(()=>{
if(player.hasHistory('sourceDamage',evt=>evt.card==trigger.card)){
var cards=trigger.cards.filterInD();
if(cards.length>0) player.gain(cards,'gain2');
}
})
}
else event.finish();
'step 2'
if(player.getHistory('sourceDamage',function(evt){
return evt.card==event.cardx;
}).length&&cards.filterInD().length) player.gain(cards.filterInD(),'gain2');
},
},
//向朗

View File

@ -711,6 +711,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},'hs');
},
groupSkill:true,
locked:false,
viewAs:{
name:'sha',
storage:{jsrgxianzhu:true},
@ -2367,7 +2368,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
direct:true,
content:function(){
'step 0'
player.chooseToDiscard(get.prompt('jsrgjuelie',trigger.target),'当你使用【杀】指定一名角色为目标后,你可以弃置任意张牌,然后弃置其等量的牌',[1,Infinity],'he').set('ai',card=>{
player.chooseToDiscard(get.prompt('jsrgjuelie',trigger.target),'当你使用【杀】指定一名角色为目标后,你可以弃置任意张牌,然后弃置其等量的牌,然后若你的手牌数或体力值最小,此【杀】对其的伤害基数+1。',[1,Infinity],'he').set('ai',card=>{
if(ui.selected.cards.length>=_status.event.max) return 0;
if(_status.event.goon) return 4.5-get.value(card);
return 0;

View File

@ -4700,7 +4700,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return 10*Math.sqrt(Math.max(0.01,get.threaten(target)))/(3.5-draw)+dis/(2*game.countPlayer());
}
else{
if(target.isTurnedOver()) return -att-draw;
if(target.isTurnedOver()) return att-draw;
if(draw>=5) return -1;
if(current&&target.getSeatNum()<=current.getSeatNum()) return -att+draw/3;
return (4.25-draw)*10*Math.sqrt(Math.max(0.01,get.threaten(target)))+2*game.countPlayer()/dis;

View File

@ -2229,8 +2229,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){
selectCard:-1,
log:false,
precontent:function(){
'step 0'
player.logSkill('dbzhuifeng');
player.loseHp();
event.forceDie=true;
'step 1'
//特殊处理
if(player.isDead()){
player.useResult(event.result,event.getParent())
}
},
ai:{
order:function(){

View File

@ -137,7 +137,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
var piles=['cardPile','discardPile'];
for(var pile of piles){
for(var i=0;i<ui[pile].childNodes.length;i++){
var card=ui.cardPile.childNodes[i];
var card=ui[pile].childNodes[i];
var number=get.number(card,false);
if(!list.contains(card)&&number==8){
list.push(card);
@ -153,7 +153,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
ai:{
effect:{
target:function(card,player,target){
if(player.hasSkillTag('jueqing')) return;
if(target.countCards('h')>=target.getHp()||player.hasSkillTag('jueqing')) return;
if(player._dcxiongmu_temp) return;
if(_status.event.getParent('useCard',true)||_status.event.getParent('_wuxie',true)) return;
if(get.tag(card,'damage')){
@ -200,7 +200,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
minus:{
trigger:{player:'damageBegin4'},
filter:function(event,player){
return game.getGlobalHistory('everything',evt=>{
return player.countCards('h')<player.hp&&game.getGlobalHistory('everything',evt=>{
return evt.name=='damage'&&evt.player==player;
},event).indexOf(event)==0;
},
@ -308,7 +308,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
'step 1'
if(get.owner(card)==player&&get.position(card)=='h'&&game.hasPlayer(current=>current!=player)){
player.chooseTarget(`赏誉:${get.translation(card)}交给一名角色`,lib.filter.notMe,true);
player.chooseTarget(`是否${get.translation(card)}交给一名其他角色`,lib.filter.notMe);
}
else event.finish();
'step 2'
@ -316,8 +316,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
var target=result.targets[0];
player.line(target);
player.give(card,target).gaintag.add('dcshangyu_tag');
player.addSkill('dcshangyu_effect');
}
player.addSkill('dcshangyu_effect');
},
subSkill:{
effect:{
@ -425,7 +425,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
direct:true,
content:function(){
'step 0'
var choices=Array.from({length:Math.min(5,game.countPlayer())}).map((_,i)=>get.cnNumber(i+1,true));
var choices=Array.from({length:Math.min(5,game.players.length+game.dead.length)}).map((_,i)=>get.cnNumber(i+1,true));
player.chooseControl(choices,'cancel2').set('prompt',get.prompt('dccaixia')).set('prompt2','你可以摸至多'+get.cnNumber(choices.length)+'张牌,但是你此后需要再使用等量的牌才可再发动本技能。').set('ai',()=>{
return _status.event.choice;
}).set('choice',function(){
@ -3799,7 +3799,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return 0;
}
var num=ui.selected.buttons.filter(i=>get.owner(i.link)==target).length;
return -(get.position(card)!='h'?get.value(card,target):(4.5+Math.random()-0.2*(num>2?1:0)))*get.attitude(player,target);
var val=get.buttonValue(button);
if(num>2) val/=Math.sqrt(num);
if(get.attitude(player,owner)>0) return -val;
return val;
//return -(get.position(card)!='h'?get.value(card,target):(4.5+Math.random()-0.2*(num>2?1:0)))*get.attitude(player,target);
});
'step 1'
if(result.bool){
@ -12652,9 +12656,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
dc_xujing:'许靖',
dcshangyu:'赏誉',
dcshangyu_tag:'赏誉',
dcshangyu_info:'锁定技。游戏开始时,你获得一张【杀】并记录之,然后将此牌交给一名角色,你获得如下效果1.当一名角色使用此牌造成伤害后你与其各摸一张牌2.当此牌进入弃牌堆后,你将此牌交给一名本回合未以此法得到过此牌的角色。',
dcshangyu_info:'锁定技。游戏开始时,你获得一张【杀】并记录之,并可以将此牌交给一名角色。然后你获得如下效果1.当一名角色使用此牌造成伤害后你与其各摸一张牌2.当此牌进入弃牌堆后,你将此牌交给一名本回合未以此法得到过此牌的角色。',
dccaixia:'才瑕',
dccaixia_info:'当你造成或受到伤害后若你没有“瑕”你可以摸至多X张牌并获得X枚“瑕”然后当你使用牌时移去1枚“瑕”X为场上角色数且至多为5。',
dccaixia_info:'当你造成或受到伤害后若你没有“瑕”你可以摸至多X张牌并获得X枚“瑕”然后当你使用牌时移去1枚“瑕”X为本局游戏总角色数且至多为5。',
wu_luxun:'武陆逊',
dcxiongmu:'雄幕',
dcxiongmu_tag:'雄幕',

View File

@ -484,12 +484,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}());
'step 1'
var guessedNum=result.index;
var type=get.type2(trigger.card,trigger.player);
player.chat('我猜'+get.cnNumber(guessedNum)+'张');
game.log(player,'猜测',trigger.player,'有',get.cnNumber(guessedNum)+'张'+get.translation(type)+'牌');
event.guessedNum=guessedNum;
game.delay();
'step 2'
var type=get.type2(trigger.card,trigger.player);
var count=trigger.player.countCards('h',card=>get.type2(card)==type);
var guessedNum=event.guessedNum;
if(count==guessedNum){

View File

@ -1,5 +1,5 @@
window.noname_asset_list=[
'v1.10.2',
'v1.10.2.1',
/*audio start*/
'audio/background/aozhan_chaoming.mp3',
'audio/background/aozhan_online.mp3',
@ -288,6 +288,7 @@ window.noname_asset_list=[
'audio/die/dc_wangchang.mp3',
'audio/die/dc_wangjun.mp3',
'audio/die/dc_wangyun.mp3',
'audio/die/dc_xujing.mp3',
'audio/die/dc_xushu.mp3',
'audio/die/dc_yangbiao.mp3',
'audio/die/dc_yanghu.mp3',
@ -1005,6 +1006,7 @@ window.noname_asset_list=[
'audio/die/wis_xuyou.mp3',
'audio/die/wis_zhangzhao.mp3',
'audio/die/wolongfengchu.mp3',
'audio/die/wu_luxun.mp3',
'audio/die/wu_zhugeliang.mp3',
'audio/die/wu_zhutiexiong.mp3',
'audio/die/wuanguo.mp3',
@ -1133,6 +1135,7 @@ window.noname_asset_list=[
'audio/die/yuantanyuanshang.mp3',
'audio/die/yuantanyuanxiyuanshang.mp3',
'audio/die/yue_caiwenji.mp3',
'audio/die/yue_zhoufei.mp3',
'audio/die/yuechen.mp3',
'audio/die/yuejin.mp3',
'audio/die/yuejiu.mp3',
@ -1751,6 +1754,8 @@ window.noname_asset_list=[
'audio/skill/dcbihuo2.mp3',
'audio/skill/dcbingji1.mp3',
'audio/skill/dcbingji2.mp3',
'audio/skill/dccaixia1.mp3',
'audio/skill/dccaixia2.mp3',
'audio/skill/dccaizhuang1.mp3',
'audio/skill/dccaizhuang2.mp3',
'audio/skill/dccansi1.mp3',
@ -1907,6 +1912,8 @@ window.noname_asset_list=[
'audio/skill/dcligong2.mp3',
'audio/skill/dclingfang1.mp3',
'audio/skill/dclingfang2.mp3',
'audio/skill/dclingkong1.mp3',
'audio/skill/dclingkong2.mp3',
'audio/skill/dclingyin1.mp3',
'audio/skill/dclingyin2.mp3',
'audio/skill/dclingyue1.mp3',
@ -1983,10 +1990,14 @@ window.noname_asset_list=[
'audio/skill/dcrihui2.mp3',
'audio/skill/dcruizhan1.mp3',
'audio/skill/dcruizhan2.mp3',
'audio/skill/dcruxian1.mp3',
'audio/skill/dcruxian2.mp3',
'audio/skill/dcruyi1.mp3',
'audio/skill/dcruyi2.mp3',
'audio/skill/dcsaowei1.mp3',
'audio/skill/dcsaowei2.mp3',
'audio/skill/dcshangyu1.mp3',
'audio/skill/dcshangyu2.mp3',
'audio/skill/dcshibei1.mp3',
'audio/skill/dcshibei2.mp3',
'audio/skill/dcshiji1.mp3',
@ -2061,6 +2072,8 @@ window.noname_asset_list=[
'audio/skill/dcxiangshu2.mp3',
'audio/skill/dcxianjin1.mp3',
'audio/skill/dcxianjin2.mp3',
'audio/skill/dcxianshu1.mp3',
'audio/skill/dcxianshu2.mp3',
'audio/skill/dcxianzhu1.mp3',
'audio/skill/dcxianzhu2.mp3',
'audio/skill/dcxiaojuan1.mp3',
@ -2071,6 +2084,8 @@ window.noname_asset_list=[
'audio/skill/dcxieshou2.mp3',
'audio/skill/dcxinyou1.mp3',
'audio/skill/dcxinyou2.mp3',
'audio/skill/dcxiongmu1.mp3',
'audio/skill/dcxiongmu2.mp3',
'audio/skill/dcxiuwen1.mp3',
'audio/skill/dcxiuwen2.mp3',
'audio/skill/dcxuewei1.mp3',
@ -2107,6 +2122,8 @@ window.noname_asset_list=[
'audio/skill/dcyuguan2.mp3',
'audio/skill/dczecai1.mp3',
'audio/skill/dczecai2.mp3',
'audio/skill/dczhangcai1.mp3',
'audio/skill/dczhangcai2.mp3',
'audio/skill/dczhanmeng1.mp3',
'audio/skill/dczhanmeng2.mp3',
'audio/skill/dczhanyi1.mp3',

View File

@ -3856,6 +3856,18 @@
}
}
},
show_sex:{
name:'显示角色性别',
intro:'在角色的右键菜单中显示角色性别',
init:true,
unfrequent:true
},
show_group:{
name:'显示角色势力',
intro:'在角色的右键菜单中显示角色势力',
init:true,
unfrequent:true
},
show_replay:{
name:'显示重来按钮',
init:false,
@ -4026,8 +4038,9 @@
unfrequent:true,
item:{
doNotShow:'不显示',
showPinyin:'显示拼音',
showCodeIdentifier:'显示代码ID'
showPinyin:'拼音(样式一)',
showCodeIdentifier:'代码ID(样式一)',
showPinyin2:'拼音(样式二)',
},
visualMenu:(node,link,name)=>{
node.classList.add('button','character');
@ -4039,7 +4052,7 @@
style.display='flex';
style.height='60px';
style.justifyContent='center';
style.width='150px';
style.width='200px';
const firstChild=node.firstChild;
firstChild.removeAttribute('class');
firstChild.style.position='initial';
@ -13766,13 +13779,11 @@
lib.onphase[i]();
}
player.phase();
event.player=player.next;
"step 2"
if(!game.players.contains(event.player.next)){
event.player=game.findNext(event.player.next);
}
else{
event.player=event.player.next;
}
event.goto(1);
},
loadPackage:function(){
@ -28952,29 +28963,37 @@
if(Array.isArray(card)){
if(card[2]=='huosha'){
card[2]='sha';
card[3]=['fire'];
card[3]='fire';
}
else if(card[2]=='leisha'){
card[2]='sha';
card[3]=['thunder'];
card[3]='thunder';
}
// else if(card[2]=='kamisha'){
// card[2]='sha';
// card[3]=['kami'];
// card[3]='kami';
// }
// else if(card[2]=='icesha'){
// card[2]='sha';
// card[3]=['ice'];
// card[3]='ice';
// }
else if(card[2]=='cisha'){
card[2]='sha';
card[3]=['stab'];
card[3]='stab';
}
else if(card[2].length>3){
let prefix=card[2].slice(0,card[2].lastIndexOf('sha'));
if(prefix.length+3==card[2].length){
if(lib.nature.has(prefix)){
if(prefix.length+3==card[2].length){
card[2]='sha';
card[3]=prefix;
}
}
if(card[2].indexOf('sha_')==0){
let suffix=card[2].slice(4);
let natureList=suffix.split('_');
card[2]='sha';
card[3]=[prefix];
card[3]=get.nature(natureList);
}
}
}
@ -40940,14 +40959,19 @@
}
//创建ul列表
const createMenu=function(pos,self,List,click){
if (self&&self.createMenu) return false;
if(!self||self==window) return;
const parent=self.parentNode;
if (parent){
for(let i=0;i<parent.childElementCount;i++){
const node=parent.childNodes[i];
node!=self&&node.createMenu&&closeMenu.call(node);
if(node!=self&&node.createMenu) closeMenu.call(node);
}
}
if(self.createMenu){
createList.add(self.createMenu);
ui.window.appendChild(self.createMenu);
return self.createMenu;
}
const editor=container.editor;
if(!editor) return false;
self.style.background='#08f';
@ -40959,7 +40983,8 @@
height:'20em',
width:pos.width*4/game.documentZoom+'px',
//'font-family':'shousha',
'font-size':20/game.documentZoom+'px',
'font-size':(lib.config.codeMirror_fontSize?lib.config.codeMirror_fontSize.slice(0,-2):16)/game.documentZoom+'px',
});
const theme=editor.options.theme;
lib.setScroll(ul);
@ -41003,7 +41028,7 @@
};
}
}
createList.push(ul);
createList.add(ul);
ui.window.appendChild(ul);
return ul;
};
@ -41013,7 +41038,8 @@
if(!ul) return false;
if(ul.parentNode) ul.parentNode.removeChild(ul);
this.style.background='';
delete this.createMenu;
//创建后不用删除了,除非以后要动态加载。
//delete this.createMenu;
createList.remove(ul);
return ul;
};
@ -41026,46 +41052,79 @@
});
const saveConfig=ui.create.div('.editbutton','保存',editorpage,saveInput);
const theme=ui.create.div('.editbutton','主题',editorpage,function(){
if(this&&this.createMenu){
if(!this||this==window) return;
if(this.createMenu&&this.createMenu.parentNode){
return closeMenu.call(this);
}
//主题列表
const list=['mdn-like','mbo'];
//正在使用的主题
const active=container.editor.options.theme;
//排个序
list.remove(active).splice(0,0,active);
//this
const self=this;
//元素位置
const pos=this.getBoundingClientRect();
//点击事件
const click=function(e){
const theme=this.innerHTML;
container.editor.setOption("theme",theme);
setTimeout(()=>container.editor.refresh(),0);
game.saveConfig('codeMirror_theme', theme);
closeMenu.call(self);
};
const ul=createMenu(pos,self,list,click);
this.createMenu=ul;
if(!this.createMenu){
//主题列表
const list=['mdn-like','mbo'];
//正在使用的主题
const active=container.editor.options.theme;
//排个序
list.remove(active).splice(0,0,active);
//元素位置
const pos=self.getBoundingClientRect();
//点击事件
const click=function(e){
const theme=this.innerHTML;
container.editor.setOption("theme",theme);
setTimeout(()=>container.editor.refresh(),0);
game.saveConfig('codeMirror_theme',theme);
closeMenu.call(self);
};
const ul=createMenu(pos,self,list,click);
self.createMenu=ul;
}else{
createMenu(null,self);
}
});
const edit=ui.create.div('.editbutton','编辑',editorpage,function(){
if(this&&this.createMenu){
if(!this||this==window) return;
if(this.createMenu&&this.createMenu.parentNode){
return closeMenu.call(this);
}
const self=this;
const pos=this.getBoundingClientRect();
const list=['撤销 Ctrl+Z', '恢复撤销 Ctrl+Y'];
const click=function(e){
const num=this.innerHTML.indexOf("Ctrl");
const inner=this.innerHTML.slice(num).replace("+", "-");
container.editor.execCommand(container.editor.options.extraKeys[inner]);
setTimeout(()=>container.editor.refresh(),0);
closeMenu.call(self);
};
const ul=createMenu(pos,self,list,click);
this.createMenu=ul;
if(!this.createMenu){
const pos=this.getBoundingClientRect();
const list=['撤销 Ctrl+Z', '恢复撤销 Ctrl+Y'];
const click=function(e){
const num=this.innerHTML.indexOf("Ctrl");
const inner=this.innerHTML.slice(num).replace("+", "-");
container.editor.execCommand(container.editor.options.extraKeys[inner]);
setTimeout(()=>container.editor.refresh(),0);
closeMenu.call(self);
};
const ul=createMenu(pos,self,list,click);
this.createMenu=ul;
}else{
createMenu(null,self);
}
});
const fontSize=ui.create.div('.editbutton','字号',editorpage,function(){
if(!this||this==window) return;
if(this.createMenu&&this.createMenu.parentNode){
return closeMenu.call(this);
}
const self=this;
if(!this.createMenu){
const pos=this.getBoundingClientRect();
const list=['16px','18px','20px','22px','24px','26px'];
const click=function(e){
const size=this.innerHTML;
container.style.fontSize=size.slice(0,-2)/game.documentZoom+'px';
Array.from(self.parentElement.children).map(v=>v.createMenu).filter(Boolean).forEach(v=>{v.style.fontSize=size.slice(0,-2)/game.documentZoom+'px'});
container.listenTransition(()=>container.editor.refresh());
game.saveConfig('codeMirror_fontSize',size);
closeMenu.call(self);
};
const ul=createMenu(pos,self,list,click);
this.createMenu=ul;
}else{
createMenu(null,self);
}
});
const editor=ui.create.div(editorpage);
return editor;
@ -46822,7 +46881,7 @@
}
var loading=ui.create.div('.loading.config.toggle','载入中...',page);
var loaded=function(list){
var loaded=function(){
var list=[];
var extension=window.extension;
for(var i in extension){
@ -46836,8 +46895,9 @@
var node=ui.create.div('.videonode.menubutton.extension.large',page,clickExtension);
ui.create.div('.caption',list[i].name,node);
ui.create.div('.text.author','作者:'+list[i].author+'<span>('+list[i].size+')</span>',node);
ui.create.div('.text','更新日期:'+list[i].date,node);
ui.create.div('.text',list[i].intro,node);
var download=ui.create.div('.menubutton.text.active','下载扩展',node.firstChild);
var download=ui.create.div('.menubutton.text.active','下载扩展',node.firstChild,{'zIndex':'5'});
if(game.download){
if(list[i].netdisk){
var linknode=ui.create.div('.text',node);
@ -46858,7 +46918,7 @@
},linknode).link=list[i].forum;
}
download.listen(downloadExtension);
if(lib.config.extensions.contains(list[i].name)){
if(lib.config.extensions.includes(list[i].name)){
download.classList.remove('active');
if(lib.extensionPack[list[i].name]&&lib.extensionPack[list[i].name].version==list[i].version){
download.classList.add('transparent2');
@ -46896,10 +46956,10 @@
window.extension={};
fetch(`${extensionURL}catalog.js`,{
referrerPolicy:'no-referrer'
}).then(value=>value.text()).then(eval).catch(reason=>{
}).then(value=>value.text()).then(eval).then(loaded).catch(reason=>{
console.log(reason);
delete window.extension;
loading.innerHTML='连接失败';
loading.innerHTML='连接失败:'+(reason instanceof Error?reason.message:String(reason));
});
};
if(_thisUpdate) node.update();
@ -47828,7 +47888,7 @@
var nodeturnover=ui.create.div('.menubutton','翻面',row1,clickrow1);
var noderevive=ui.create.div('.menubutton','复活',row1,clickrow1);
var nodereplace=ui.create.div('.menubutton','换人',row1,clickrow1);
if(lib.config.mode!='identity'&&lib.config.mode!='guozhan'&&lib.config.mode!='doudizhu'){
if(!game.canReplaceViewpoint||!game.canReplaceViewpoint()){
nodereplace.classList.add('unselectable');
}
@ -54097,61 +54157,135 @@
else if(lib.config.favouriteCharacter.contains(name)){
fav.classList.add('active');
}
const introduction=ui.create.div('.characterintro',uiintro),showCharacterNamePinyin=lib.config.show_characternamepinyin;
if(showCharacterNamePinyin!='doNotShow'){
const characterIntroTable=ui.create.div('.character-intro-table',introduction),span=document.createElement('span');
span.style.fontWeight='bold';
const nameInfo=get.character(name),exInfo=nameInfo[4],characterName=exInfo&&exInfo.includes('ruby')?lib.translate[name]:get.rawName(name);
span.innerHTML=characterName;
const ruby=document.createElement('ruby');
ruby.appendChild(span);
const leftParenthesisRP=document.createElement('rp');
leftParenthesisRP.textContent='';
ruby.appendChild(leftParenthesisRP);
const rt=document.createElement('rt');
rt.innerHTML=showCharacterNamePinyin=='showCodeIdentifier'?name:lib.translate[`${name}_rt`]||get.pinyin(characterName).join(' ');
ruby.appendChild(rt);
const rightParenthesisRP=document.createElement('rp');
rightParenthesisRP.textContent='';
ruby.appendChild(rightParenthesisRP);
characterIntroTable.appendChild(ruby);
const characterSexDiv=ui.create.div('.character-sex',characterIntroTable),exInfoSex=exInfo&&exInfo.find(value=>value.indexOf('sex:')==0),characterSex=exInfoSex?exInfoSex.split(':').pop():nameInfo[0];
new Promise((resolve,reject)=>{
const imageName=`sex_${characterSex}`,information=lib.card[imageName];
if(!information) resolve(`${lib.assetURL}image/card/${imageName}.png`);
const image=information.image;
if(!image) resolve(`${lib.assetURL}image/card/${imageName}.png`);
else if(image.indexOf('db:')==0) game.getDB('image',image.slice(3)).then(resolve,reject);
else if(image.indexOf('ext:')==0) resolve(`${lib.assetURL}${image.replace(/^ext:/,'extension/')}`);
else resolve(`${lib.assetURL}${image}`);
}).then(source=>new Promise((resolve,reject)=>{
const image=new Image();
image.onload=()=>resolve(image);
image.onerror=reject;
image.src=source;
})).then(image=>characterSexDiv.appendChild(image)).catch(()=>characterSexDiv.innerHTML=get.translation(characterSex));
const characterGroupDiv=ui.create.div('.character-group',characterIntroTable),characterGroups=get.is.double(name,true);
if(characterGroups) Promise.all(characterGroups.map(characterGroup=>new Promise((resolve,reject)=>{
const imageName=`group_${characterGroup}`,information=lib.card[imageName];
if(!information) resolve(`${lib.assetURL}image/card/${imageName}.png`);
const image=information.image;
if(!image) resolve(`${lib.assetURL}image/card/${imageName}.png`);
else if(image.indexOf('db:')==0) game.getDB('image',image.slice(3)).then(resolve,reject);
else if(image.indexOf('ext:')==0) resolve(`${lib.assetURL}${image.replace(/^ext:/,'extension/')}`);
else resolve(`${lib.assetURL}${image}`);
}).then(source=>new Promise((resolve,reject)=>{
const image=new Image();
image.onload=()=>resolve(image);
image.onerror=reject;
image.src=source;
})))).then(images=>{
let documentFragment=document.createDocumentFragment();
images.forEach(documentFragment.appendChild,documentFragment);
characterGroupDiv.appendChild(documentFragment);
}).catch(()=>characterGroupDiv.innerHTML=characterGroups.map(characterGroup=>get.translation(characterGroup)).join('/'));
else{
const characterGroup=nameInfo[1];
// 样式二
if(lib.config.show_characternamepinyin=='showPinyin2'||lib.config.show_skillnamepinyin=='showPinyin2'){
var intro=ui.create.div('.characterintro',get.characterIntro(name),uiintro);
if(lib.config.show_characternamepinyin=='showPinyin2'){
var charactername=get.rawName(name);
var characterpinyin=get.pinyin(charactername);
var nameinfo=get.character(name);
var charactersex=get.translation(nameinfo[0]);
const charactergroups=get.is.double(name,true);
let charactergroup;
if(charactergroups) charactergroup=charactergroups.map(i=>get.translation(i)).join('/')
else charactergroup=get.translation(nameinfo[1]);
var characterhp=nameinfo[2];
var characterintroinfo=get.characterIntro(name);
var spacemark=' | ';
if(charactername.length>3) spacemark='<span style="font-size:7px">'+' '+'</span>'+'|'+'<span style="font-size:7px">'+' '+'</span>';
intro.innerHTML='<span style="font-weight:bold;margin-right:5px">'+charactername+'</span>'+'<span style="font-size:14px;font-family:SimHei,STHeiti,sans-serif">'+'['+characterpinyin+']'+'</span>'+spacemark+charactersex+spacemark+charactergroup+spacemark+characterhp+'<span style="line-height:2"></span>'+'<br>'+characterintroinfo;
}
var intro2=ui.create.div('.characterintro.intro2',uiintro);
var list=get.character(name,3)||[];
var skills=ui.create.div('.characterskill',uiintro);
if(lib.config.touchscreen){
lib.setScroll(intro);
lib.setScroll(intro2);
lib.setScroll(skills);
}
if(lib.config.mousewheel){
skills.onmousewheel=ui.click.mousewheel;
}
var clickSkill=function(e){
while(intro2.firstChild){
intro2.removeChild(intro2.lastChild);
}
var current=this.parentNode.querySelector('.active');
if(current){
current.classList.remove('active');
}
this.classList.add('active');
var skillname=get.translation(this.link);
var skilltranslationinfo=get.skillInfoTranslation(this.link);
if(lib.config.show_skillnamepinyin=='showPinyin2'&&skillname!='阵亡'){
var skillpinyin=get.pinyin(skillname);
intro2.innerHTML='<span style="font-weight:bold;margin-right:5px">'+skillname+'</span>'+'<span style="font-size:14px;font-family:SimHei,STHeiti,sans-serif">'+'['+skillpinyin+']'+'</span>'+' '+skilltranslationinfo;
}else{
intro2.innerHTML='<span style="font-weight:bold;margin-right:5px">'+skillname+'</span>'+skilltranslationinfo;
}
var info=get.info(this.link);
var skill=this.link;
var playername=this.linkname;
var skillnode=this;
if(info.derivation){
var derivation=info.derivation;
if(typeof derivation=='string'){
derivation=[derivation];
}
for(var i=0;i<derivation.length;i++){
var derivationname=get.translation(derivation[i]);
var derivationtranslationinfo=get.skillInfoTranslation(derivation[i]);
if(lib.config.show_skillnamepinyin=='showPinyin2'&&derivationname.length<=5&&derivation[i].indexOf('_faq')==-1){
var derivationpinyin=get.pinyin(derivationname);
intro2.innerHTML+='<br><br><span style="font-weight:bold;margin-right:5px">'+derivationname+'</span>'+'<span style="font-size:14px;font-family:SimHei,STHeiti,sans-serif">'+'['+derivationpinyin+']'+'</span>'+' '+derivationtranslationinfo;
}else{
intro2.innerHTML+='<br><br><span style="font-weight:bold;margin-right:5px">'+derivationname+'</span>'+derivationtranslationinfo;
}
}
}
if(info.alter){
intro2.innerHTML+='<br><br><div class="hrefnode skillversion"></div>';
var skillversionnode=intro2.querySelector('.hrefnode.skillversion');
if(lib.config.vintageSkills.contains(skill)){
skillversionnode.innerHTML='切换至新版';
}
else{
skillversionnode.innerHTML='切换至旧版';
}
skillversionnode.listen(function(){
if(lib.config.vintageSkills.contains(skill)){
lib.config.vintageSkills.remove(skill);
lib.translate[skill+'_info']=lib.translate[skill+'_info_alter'];
}
else{
lib.config.vintageSkills.push(skill);
lib.translate[skill+'_info']=lib.translate[skill+'_info_origin'];
}
game.saveConfig('vintageSkills',lib.config.vintageSkills);
clickSkill.call(skillnode,'init');
});
}
if(e!=='init') game.trySkillAudio(this.link,playername);
}
}else{
// 样式一
const introduction=ui.create.div('.characterintro',uiintro),showCharacterNamePinyin=lib.config.show_characternamepinyin;
if(showCharacterNamePinyin!='doNotShow'){
const characterIntroTable=ui.create.div('.character-intro-table',introduction),span=document.createElement('span');
span.style.fontWeight='bold';
const nameInfo=get.character(name),exInfo=nameInfo[4],characterName=exInfo&&exInfo.includes('ruby')?lib.translate[name]:get.rawName(name);
span.innerHTML=characterName;
const ruby=document.createElement('ruby');
ruby.appendChild(span);
const leftParenthesisRP=document.createElement('rp');
leftParenthesisRP.textContent='';
ruby.appendChild(leftParenthesisRP);
const rt=document.createElement('rt');
rt.innerHTML=showCharacterNamePinyin=='showCodeIdentifier'?name:lib.translate[`${name}_rt`]||get.pinyin(characterName).join(' ');
ruby.appendChild(rt);
const rightParenthesisRP=document.createElement('rp');
rightParenthesisRP.textContent='';
ruby.appendChild(rightParenthesisRP);
characterIntroTable.appendChild(ruby);
const characterSexDiv=ui.create.div('.character-sex',characterIntroTable),exInfoSex=exInfo&&exInfo.find(value=>value.indexOf('sex:')==0),characterSex=exInfoSex?exInfoSex.split(':').pop():nameInfo[0];
new Promise((resolve,reject)=>{
const imageName=`sex_${characterSex}`,information=lib.card[imageName];
if(!information) resolve(`${lib.assetURL}image/card/${imageName}.png`);
const image=information.image;
if(!image) resolve(`${lib.assetURL}image/card/${imageName}.png`);
else if(image.indexOf('db:')==0) game.getDB('image',image.slice(3)).then(resolve,reject);
else if(image.indexOf('ext:')==0) resolve(`${lib.assetURL}${image.replace(/^ext:/,'extension/')}`);
else resolve(`${lib.assetURL}${image}`);
}).then(source=>new Promise((resolve,reject)=>{
const image=new Image();
image.onload=()=>resolve(image);
image.onerror=reject;
image.src=source;
})).then(image=>characterSexDiv.appendChild(image)).catch(()=>characterSexDiv.innerHTML=get.translation(characterSex));
const characterGroupDiv=ui.create.div('.character-group',characterIntroTable),characterGroups=get.is.double(name,true);
if(characterGroups) Promise.all(characterGroups.map(characterGroup=>new Promise((resolve,reject)=>{
const imageName=`group_${characterGroup}`,information=lib.card[imageName];
if(!information) resolve(`${lib.assetURL}image/card/${imageName}.png`);
const image=information.image;
@ -54164,136 +54298,158 @@
image.onload=()=>resolve(image);
image.onerror=reject;
image.src=source;
})).then(image=>characterGroupDiv.appendChild(image)).catch(()=>characterGroupDiv.innerHTML=get.translation(characterGroup));
})))).then(images=>{
let documentFragment=document.createDocumentFragment();
images.forEach(documentFragment.appendChild,documentFragment);
characterGroupDiv.appendChild(documentFragment);
}).catch(()=>characterGroupDiv.innerHTML=characterGroups.map(characterGroup=>get.translation(characterGroup)).join('/'));
else{
const characterGroup=nameInfo[1];
new Promise((resolve,reject)=>{
const imageName=`group_${characterGroup}`,information=lib.card[imageName];
if(!information) resolve(`${lib.assetURL}image/card/${imageName}.png`);
const image=information.image;
if(!image) resolve(`${lib.assetURL}image/card/${imageName}.png`);
else if(image.indexOf('db:')==0) game.getDB('image',image.slice(3)).then(resolve,reject);
else if(image.indexOf('ext:')==0) resolve(`${lib.assetURL}${image.replace(/^ext:/,'extension/')}`);
else resolve(`${lib.assetURL}${image}`);
}).then(source=>new Promise((resolve,reject)=>{
const image=new Image();
image.onload=()=>resolve(image);
image.onerror=reject;
image.src=source;
})).then(image=>characterGroupDiv.appendChild(image)).catch(()=>characterGroupDiv.innerHTML=get.translation(characterGroup));
}
const hpDiv=ui.create.div('.hp',characterIntroTable),nameInfoHP=nameInfo[2],infoHP=get.infoHp(nameInfoHP);
hpDiv.dataset.condition=infoHP<4?'mid':'high';
ui.create.div(hpDiv);
const hpTextDiv=ui.create.div('.text',hpDiv),infoMaxHP=get.infoMaxHp(nameInfoHP);
hpTextDiv.innerHTML=infoHP==infoMaxHP?`×${infoHP}`:`×${infoHP}/${infoMaxHP}`;
const infoShield=get.infoHujia(nameInfoHP);
if(infoShield){
ui.create.div('.shield',hpDiv);
const shieldTextDiv=ui.create.div('.text',hpDiv);
shieldTextDiv.innerHTML=`×${infoShield}`;
}
introduction.appendChild(document.createElement('hr'));
}
const hpDiv=ui.create.div('.hp',characterIntroTable),nameInfoHP=nameInfo[2],infoHP=get.infoHp(nameInfoHP);
hpDiv.dataset.condition=infoHP<4?'mid':'high';
ui.create.div(hpDiv);
const hpTextDiv=ui.create.div('.text',hpDiv),infoMaxHP=get.infoMaxHp(nameInfoHP);
hpTextDiv.innerHTML=infoHP==infoMaxHP?`×${infoHP}`:`×${infoHP}/${infoMaxHP}`;
const infoShield=get.infoHujia(nameInfoHP);
if(infoShield){
ui.create.div('.shield',hpDiv);
const shieldTextDiv=ui.create.div('.text',hpDiv);
shieldTextDiv.innerHTML=`×${infoShield}`;
const htmlParser=document.createElement('body');
htmlParser.innerHTML=get.characterIntro(name);
Array.from(htmlParser.childNodes).forEach(value=>introduction.appendChild(value));
const introduction2=ui.create.div('.characterintro.intro2',uiintro);
var list=get.character(name,3)||[];
var skills=ui.create.div('.characterskill',uiintro);
if(lib.config.touchscreen){
lib.setScroll(introduction);
lib.setScroll(introduction2);
lib.setScroll(skills);
}
introduction.appendChild(document.createElement('hr'));
}
const htmlParser=document.createElement('body');
htmlParser.innerHTML=get.characterIntro(name);
Array.from(htmlParser.childNodes).forEach(value=>introduction.appendChild(value));
const introduction2=ui.create.div('.characterintro.intro2',uiintro);
var list=get.character(name,3)||[];
var skills=ui.create.div('.characterskill',uiintro);
if(lib.config.touchscreen){
lib.setScroll(introduction);
lib.setScroll(introduction2);
lib.setScroll(skills);
}
if(lib.config.mousewheel){
skills.onmousewheel=ui.click.mousewheel;
}
var clickSkill=function(e){
while(introduction2.firstChild){
introduction2.removeChild(introduction2.lastChild);
if(lib.config.mousewheel){
skills.onmousewheel=ui.click.mousewheel;
}
var current=this.parentNode.querySelector('.active');
if(current){
current.classList.remove('active');
}
this.classList.add('active');
const skillNameSpan=document.createElement('span'),skillNameSpanStyle=skillNameSpan.style;
skillNameSpanStyle.fontWeight='bold';
const link=this.link,skillName=get.translation(link);
skillNameSpan.innerHTML=skillName;
const showSkillNamePinyin=lib.config.show_skillnamepinyin;
if(showSkillNamePinyin!='doNotShow'&&skillName!='阵亡'){
const ruby=document.createElement('ruby');
ruby.appendChild(skillNameSpan);
const leftParenthesisRP=document.createElement('rp');
leftParenthesisRP.textContent='';
ruby.appendChild(leftParenthesisRP);
const rt=document.createElement('rt');
rt.innerHTML=showSkillNamePinyin=='showCodeIdentifier'?link:lib.translate[`${link}_rt`]||get.pinyin(skillName).join(' ');
ruby.appendChild(rt);
const rightParenthesisRP=document.createElement('rp');
rightParenthesisRP.textContent='';
ruby.appendChild(rightParenthesisRP);
const div=ui.create.div(introduction2);
div.style.marginRight='5px';
div.appendChild(ruby);
}
else{
skillNameSpanStyle.marginRight='5px';
introduction2.appendChild(skillNameSpan);
}
htmlParser.innerHTML=get.skillInfoTranslation(this.link);
Array.from(htmlParser.childNodes).forEach(childNode=>introduction2.appendChild(childNode));
var info=get.info(this.link);
var skill=this.link;
var playername=this.linkname;
var skillnode=this;
let derivations=info.derivation;
if(derivations){
if(typeof derivations=='string') derivations=[derivations];
derivations.forEach(derivation=>{
introduction2.appendChild(document.createElement('br'));
introduction2.appendChild(document.createElement('br'));
const derivationNameSpan=document.createElement('span'),derivationNameSpanStyle=derivationNameSpan.style;
derivationNameSpanStyle.fontWeight='bold';
const derivationName=get.translation(derivation);
derivationNameSpan.innerHTML=derivationName;
if(showSkillNamePinyin!='doNotShow'&&derivationName.length<=5&&derivation.indexOf('_faq')==-1){
const ruby=document.createElement('ruby');
ruby.appendChild(derivationNameSpan);
const leftParenthesisRP=document.createElement('rp');
leftParenthesisRP.textContent='';
ruby.appendChild(leftParenthesisRP);
const rt=document.createElement('rt');
rt.innerHTML=showSkillNamePinyin=='showCodeIdentifier'?derivation:lib.translate[`${derivation}_rt`]||get.pinyin(derivationName).join(' ');
ruby.appendChild(rt);
const rightParenthesisRP=document.createElement('rp');
rightParenthesisRP.textContent='';
ruby.appendChild(rightParenthesisRP);
const div=ui.create.div(introduction2);
div.style.marginRight='5px';
div.appendChild(ruby);
}
else{
derivationNameSpanStyle.marginRight='5px';
introduction2.appendChild(derivationNameSpan);
}
htmlParser.innerHTML=get.skillInfoTranslation(derivation);
Array.from(htmlParser.childNodes).forEach(childNode=>introduction2.appendChild(childNode));
});
}
if(info.alter){
introduction2.appendChild(document.createElement('br'));
introduction2.appendChild(document.createElement('br'));
ui.create.div('.hrefnode.skillversion',introduction2);
var skillversionnode=introduction2.querySelector('.hrefnode.skillversion');
if(lib.config.vintageSkills.contains(skill)){
skillversionnode.innerHTML='切换至新版';
var clickSkill=function(e){
while(introduction2.firstChild){
introduction2.removeChild(introduction2.lastChild);
}
var current=this.parentNode.querySelector('.active');
if(current){
current.classList.remove('active');
}
this.classList.add('active');
const skillNameSpan=document.createElement('span'),skillNameSpanStyle=skillNameSpan.style;
skillNameSpanStyle.fontWeight='bold';
const link=this.link,skillName=get.translation(link);
skillNameSpan.innerHTML=skillName;
const showSkillNamePinyin=lib.config.show_skillnamepinyin;
if(showSkillNamePinyin!='doNotShow'&&skillName!='阵亡'){
const ruby=document.createElement('ruby');
ruby.appendChild(skillNameSpan);
const leftParenthesisRP=document.createElement('rp');
leftParenthesisRP.textContent='';
ruby.appendChild(leftParenthesisRP);
const rt=document.createElement('rt');
rt.innerHTML=showSkillNamePinyin=='showCodeIdentifier'?link:lib.translate[`${link}_rt`]||get.pinyin(skillName).join(' ');
ruby.appendChild(rt);
const rightParenthesisRP=document.createElement('rp');
rightParenthesisRP.textContent='';
ruby.appendChild(rightParenthesisRP);
const div=ui.create.div(introduction2);
div.style.marginRight='5px';
div.appendChild(ruby);
}
else{
skillversionnode.innerHTML='切换至旧版';
skillNameSpanStyle.marginRight='5px';
introduction2.appendChild(skillNameSpan);
}
skillversionnode.listen(function(){
htmlParser.innerHTML=get.skillInfoTranslation(this.link);
Array.from(htmlParser.childNodes).forEach(childNode=>introduction2.appendChild(childNode));
var info=get.info(this.link);
var skill=this.link;
var playername=this.linkname;
var skillnode=this;
let derivations=info.derivation;
if(derivations){
if(typeof derivations=='string') derivations=[derivations];
derivations.forEach(derivation=>{
introduction2.appendChild(document.createElement('br'));
introduction2.appendChild(document.createElement('br'));
const derivationNameSpan=document.createElement('span'),derivationNameSpanStyle=derivationNameSpan.style;
derivationNameSpanStyle.fontWeight='bold';
const derivationName=get.translation(derivation);
derivationNameSpan.innerHTML=derivationName;
if(showSkillNamePinyin!='doNotShow'&&derivationName.length<=5&&derivation.indexOf('_faq')==-1){
const ruby=document.createElement('ruby');
ruby.appendChild(derivationNameSpan);
const leftParenthesisRP=document.createElement('rp');
leftParenthesisRP.textContent='';
ruby.appendChild(leftParenthesisRP);
const rt=document.createElement('rt');
rt.innerHTML=showSkillNamePinyin=='showCodeIdentifier'?derivation:lib.translate[`${derivation}_rt`]||get.pinyin(derivationName).join(' ');
ruby.appendChild(rt);
const rightParenthesisRP=document.createElement('rp');
rightParenthesisRP.textContent='';
ruby.appendChild(rightParenthesisRP);
const div=ui.create.div(introduction2);
div.style.marginRight='5px';
div.appendChild(ruby);
}
else{
derivationNameSpanStyle.marginRight='5px';
introduction2.appendChild(derivationNameSpan);
}
htmlParser.innerHTML=get.skillInfoTranslation(derivation);
Array.from(htmlParser.childNodes).forEach(childNode=>introduction2.appendChild(childNode));
});
}
if(info.alter){
introduction2.appendChild(document.createElement('br'));
introduction2.appendChild(document.createElement('br'));
ui.create.div('.hrefnode.skillversion',introduction2);
var skillversionnode=introduction2.querySelector('.hrefnode.skillversion');
if(lib.config.vintageSkills.contains(skill)){
lib.config.vintageSkills.remove(skill);
lib.translate[skill+'_info']=lib.translate[skill+'_info_alter'];
skillversionnode.innerHTML='切换至新版';
}
else{
lib.config.vintageSkills.push(skill);
lib.translate[skill+'_info']=lib.translate[skill+'_info_origin'];
skillversionnode.innerHTML='切换至旧版';
}
game.saveConfig('vintageSkills',lib.config.vintageSkills);
clickSkill.call(skillnode,'init');
});
skillversionnode.listen(function(){
if(lib.config.vintageSkills.contains(skill)){
lib.config.vintageSkills.remove(skill);
lib.translate[skill+'_info']=lib.translate[skill+'_info_alter'];
}
else{
lib.config.vintageSkills.push(skill);
lib.translate[skill+'_info']=lib.translate[skill+'_info_origin'];
}
game.saveConfig('vintageSkills',lib.config.vintageSkills);
clickSkill.call(skillnode,'init');
});
}
if(e!=='init') game.trySkillAudio(this.link,playername);
}
if(e!=='init') game.trySkillAudio(this.link,playername);
}
var initskill=false;
for(var i=0;i<list.length;i++){
if(!get.info(list[i])||get.info(list[i]).nopop) continue;
@ -58198,9 +58354,9 @@
}
let capt=get.translation(node.name);
const characterInfo=get.character(node.name),sex=node.sex||characterInfo[0];
if(sex) capt+=`&nbsp;&nbsp;${sex=='none'?'无':get.translation(sex)}`;
if(sex&&lib.config.show_sex) capt+=`&nbsp;&nbsp;${sex=='none'?'无':get.translation(sex)}`;
const group=lib.group.includes(node.group)?node.group:characterInfo[1];
if(group) capt+=`&nbsp;&nbsp;${get.translation(group)}`;
if(group&&lib.config.show_group) capt+=`&nbsp;&nbsp;${get.translation(group)}`;
uiintro.add(capt);
if(lib.characterTitle[node.name]){
@ -58909,9 +59065,9 @@
let capt=get.translation(character);
if(characterInfo){
const infoSex=characterInfo[0];
if(infoSex) capt+=`&nbsp;&nbsp;${infoSex=='none'?'无':lib.translate[infoSex]}`;
if(infoSex&&lib.config.show_sex) capt+=`&nbsp;&nbsp;${infoSex=='none'?'无':lib.translate[infoSex]}`;
const infoGroup=characterInfo[1];
if(infoGroup){
if(infoGroup&&lib.config.show_group){
const group=get.is.double(character,true);
if(group) capt+=`&nbsp;&nbsp;${group.map(value=>get.translation(value)).join('/')}`;
else capt+=`&nbsp;&nbsp;${lib.translate[infoGroup]}`;

View File

@ -1,6 +1,6 @@
window.noname_update={
version:'1.10.2',
update:'1.10.1.0.1',
version:'1.10.2.1',
update:'1.10.2',
changeLog:[
'整合@rintim @mengxinzxz @lieren2023 @PZ157 @Tipx-L @kuangshen04 @nonameShijian @copcap的Pull Request',
'新武将界钟繇、武陆逊、界文聘、许靖、孟优、陈式、费曜、孙礼、夏侯楙、OL陆郁生、☆周不疑、',
@ -11,63 +11,18 @@ window.noname_update={
'其他技能修改与bug修复',
],
files:[
'card/extra.js',
'card/guozhan.js',
'card/standard.js',
'card/swd.js',
'card/yingbian.js',
'card/yongjian.js',
'character/clan.js',
'character/collab.js',
'character/ddd.js',
'character/diy.js',
'character/extra.js',
'character/huicui.js',
'character/jsrg.js',
'character/mobile.js',
'character/offline.js',
'character/old.js',
'character/ow.js',
'character/rank.js',
'character/refresh.js',
'character/sb.js',
'character/shenhua.js',
'character/shiji.js',
'character/sp.js',
'character/sp2.js',
'character/standard.js',
'character/swd.js',
'character/tw.js',
'character/xianding.js',
'character/xianjian.js',
'character/xinghuoliaoyuan.js',
'character/yijiang.js',
'character/yingbian.js',
'character/zhuogui.js',
'game/codemirror.js',
'game/config.js',
'game/game.js',
'game/source.js',
'game/pinyinjs.js',
'image/flappybird/BG.png',
'image/flappybird/botpipe.png',
'image/flappybird/gameclear.png',
'image/flappybird/gameover.png',
'image/flappybird/getready.png',
'image/flappybird/ground.png',
'image/flappybird/toppipe.png',
'image/flappybird/bird/b0.png',
'image/flappybird/bird/b1.png',
'image/flappybird/bird/b2.png',
'image/flappybird/ground/g0.png',
'image/flappybird/ground/g1.png',
'image/flappybird/tap/t0.png',
'image/flappybird/tap/t1.png',
'layout/default/codemirror.css',
'layout/default/layout.css',
'layout/default/menu.css',
'mode/boss.js',
'mode/doudizhu.js',
'mode/guozhan.js',
'mode/versus.js',
'mode/identity.js',
'mode/single.js',
]
};

View File

@ -154,6 +154,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
game.zhu.showGiveup();
},
game:{
canReplaceViewpoint:()=>true,
recommendDizhu:[
're_guojia','re_huanggai','re_lvbu','re_guanyu','re_sunquan','re_xusheng','re_wuyi','re_sunben',
'xuyou','zhangchunhua','caochong','zhangsong','zhongyao','wangyi',

View File

@ -13259,6 +13259,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
},
},
game:{
canReplaceViewpoint:()=>true,
showYexings:function(){
if(_status.showYexings) return;
_status.showYexings=true;

View File

@ -304,6 +304,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
game.phaseLoop(_status.firstAct2||game.zhong||game.zhu||_status.firstAct||game.me);
},
game:{
canReplaceViewpoint:()=>true,
getState:function(){
var state={};
for(var i in lib.playerOL){

View File

@ -250,6 +250,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
game.phaseLoop(game.zhu);
},
game:{
canReplaceViewpoint:()=>true,
addRecord:function(bool){
if(typeof bool=='boolean'){
var mode=_status.mode;