Merge pull request #367 from Tipx-L/PR-Branch

Introduction.
This commit is contained in:
Spmario233 2023-09-21 18:43:24 +08:00 committed by GitHub
commit acef15385e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
16 changed files with 1284 additions and 741 deletions

View File

@ -68,7 +68,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
content:function(){
if(typeof event.baseDamage!='number') event.baseDamage=1;
if(target.isDying()||event.getParent(2).type=='dying'){
target.recover(event.baseDamage);
target.recover();
if(_status.currentPhase==target){
target.getStat().card.jiu--;
}
@ -210,7 +210,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
game.delay(2);
"step 2"
if(result.bool){
target.damage('fire',event.baseDamage||1);
target.damage('fire');
}
else{
target.addTempSkill('huogong2');

View File

@ -462,13 +462,13 @@ game.import('card',function(lib,game,ui,get,ai,_status){
target.discard(target.getCards('e',function(card){
return lib.filter.cardDiscardable(card,target,'shuiyanqijunx');
}));
target.damage('thunder',event.baseDamage||1);
target.damage('thunder');
event.finish();
}
else if(!target.countCards('e',function(card){
return lib.filter.cardDiscardable(card,target,'shuiyanqijunx');
})){
var next=target.damage(event.baseDamage||1);
var next=target.damage();
if(!get.is.single()) next.nature='thunder';
event.finish();
return;
@ -489,7 +489,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
}));
}
else{
var next=target.damage(event.baseDamage||1);
var next=target.damage();
if(!get.is.single()) next.nature='thunder'
}
event.finish();
@ -861,7 +861,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
selectTarget:-1,
modTarget:true,
content:function(){
target.damage('fire',event.baseDamage||1);
target.damage('fire');
},
ai:{
order:5,

View File

@ -171,7 +171,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
}
"step 3"
if((!result||!result.bool||!result.result||result.result!='shaned')&&!event.unhurt){
target.damage(get.nature(event.card),event.baseDamage+event.extraDamage);
target.damage(get.nature(event.card));
event.result={bool:true}
event.trigger('shaDamage');
}
@ -193,7 +193,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
});
"step 5"
if((!result||!result.bool)&&!event.unhurt){
target.damage(get.nature(event.card),event.baseDamage+event.extraDamage);
target.damage(get.nature(event.card));
event.result={bool:true}
event.trigger('shaDamage');
event.finish();
@ -203,7 +203,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
}
"step 6"
if((!result||!result.bool)&&!event.unhurt){
target.damage(get.nature(event.card),event.baseDamage+event.extraDamage);
target.damage(get.nature(event.card));
event.result={bool:true}
event.trigger('shaDamage');
event.finish();
@ -388,7 +388,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
return target.hp<target.maxHp;
},
content:function(){
target.recover(event.baseDamage||1);
target.recover();
},
ai:{
basic:{
@ -846,7 +846,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
return target.isHealthy();
},
content:function(){
target.recover(event.baseDamage||1);
target.recover();
},
ai:{
basic:{
@ -895,7 +895,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
}
"step 1"
if(result.bool==false){
target.damage(event.baseDamage,event.customSource||player);
target.damage();
}
},
ai:{
@ -970,7 +970,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
}
"step 1"
if(result.bool==false){
target.damage(event.baseDamage);
target.damage();
}
},
ai:{
@ -1147,10 +1147,10 @@ game.import('card',function(lib,game,ui,get,ai,_status){
}
else{
if(event.turn==target){
target.damage(event.baseDamage+event.extraDamage);
target.damage();
}
else{
player.damage(target,event.baseDamage+event.extraDamage);
player.damage(target);
}
}
}

View File

@ -154,7 +154,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
'step 1'
if(result.bool){
target.showCards(result.cards);
if(get.suit(card)!=get.suit(result.cards[0])) target.damage(event.baseDamage||1);
if(get.suit(card)!=get.suit(result.cards[0])) target.damage();
}
},
ai:{

View File

@ -30,7 +30,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
},
content:function(){
'step 0'
target.recover(event.baseDamage||1);
target.recover();
'step 1'
if(target.hasCard(function(card){
return _status.connectMode||get.name(card,target)=='du';
@ -56,6 +56,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
content:function(){
'step 0'
if(typeof event.baseDamage!='number') event.baseDamage=1;
if(typeof event.extraDamage!='number') event.extraDamage=0;
if(!target.countCards('h')||!player.isIn()) event.finish();
else player.choosePlayerCard(target,'h',true);
'step 1'
@ -64,8 +65,8 @@ game.import('card',function(lib,game,ui,get,ai,_status){
var str=get.translation(player);
player.showCards(event.show_card);
target.chooseControl().set('choiceList',[
'令'+str+'获得'+get.translation(event.show_card),
'受到'+str+'造成的'+event.baseDamage+'点伤害',
`${str}获得${get.translation(event.show_card)}`,
`受到${str}造成的${event.baseDamage+event.extraDamage}点伤害`,
]).set('ai',function(){
var evt=_status.event.getParent(),player=evt.target,source=evt.player,card=evt.show_card;
if(get.damageEffect(player,source,player)>0) return 1;

View File

@ -19199,7 +19199,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
雾岛佳乃:['Kirishima','Kano'],
苍井绘梨花:['Aoi','Erika'],
藏里见:['Kura','Satomi'],
喵呜·喵呼:['Myau','Mya-fu'],
'喵呜·喵呼':['Myau','Mya-fu'],
喵呜喵呼:['Myau','Mya-fu'],
伊吹风子:['Ibuki','Fuuko'],
久岛鸥:['Kushima','Kamome'],

View File

@ -1080,7 +1080,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
game.delay(2);
"step 2"
if(result.bool){
target.damage('fire',event.baseDamage||1);
target.damage('fire');
}
else{
target.addTempSkill('huogong2');

View File

@ -192,9 +192,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
xizhicai:['male','wei',3,['tiandu','xianfu','chouce']],
quyi:['male','qun',4,['fuqi','jiaozi']],
luzhi:['male','wei',3,['qingzhong','weijing']],
//kaisa:["male","western",4,["zhengfu"]],
luzhi:['male','wei',3,['qingzhong','weijing']]
},
characterIntro:{
caoxi:'曹羲249年字昭叔。曹真之子曹爽之弟。为人有学识明律法。司马懿曾组织朝议改革九品中正制废除九品而留中正曹羲认为此举并无区别最终都是决定于人的人治。曹爽掌权后受封中领军掌握禁兵封安乡侯。曹爽及诸兄弟轻视司马懿恣意妄为经常外出狩猎曹羲屡次劝谏不被采纳。249年司马懿发动高平陵政变被夷三族。',
@ -12922,47 +12920,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
},
},
//英文版特典武将凯撒
zhengfu:{
trigger:{
player:"useCardToPlayered",
},
check:function (event,player){
return get.attitude(player,event.target)<0;
},
filter:function(event,player){
return event.card.name=='sha';
},
logTarget:"target",
line:false,
content:function (){
'step 0'
player.line(trigger.target,{color:[220, 90, 139]});
player.chooseControl(['basic','trick','equip']).set('ai',function(){
var player=_status.event.target;
if(!player.countCards('h','sha')&&player.countCards('h','shan')) return 'trick';
return 'basic';
}).set('prompt','请选择一种牌的类别').set('target',trigger.target);
'step 1'
trigger.target.chooseCard('he','交给'+get.translation(player)+'一张'+get.translation(result.control)+'牌,否则此【杀】不可被闪避。',function(card){
return get.type(card,'trick')==result.control;
}).set('ai',function(card){
var num=_status.event.num;
if(num==0) return 0;
if(card.name=='shan') return num>1?2:0;
return 8-get.value(card);
}).set('num',trigger.target.countCards('h','shan'))
'step 2'
if(result.bool){
var cards=result.cards;
trigger.target.give(cards,player);
}
else{
trigger.getParent().directHit.add(trigger.target);
game.delay();
}
},
},
//变权移植
wanwei:{
trigger:{target:['rewriteGainResult','rewriteDiscardResult']},
@ -24157,7 +24114,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
lvfan:'吕范',
liqueguosi:'李傕郭汜',
cuimao:'崔琰毛玠',
kaisa:"凯撒",
caoying:"曹婴",
@ -24227,8 +24183,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
"zhenwei_three_info":"锁定技,敌方角色至己方其他角色的距离+1。",
"huanshi_three":"缓释",
"huanshi_three_info":"一名友方角色的判定牌生效前,你可打出一张牌代替之。",
zhengfu:"征服",
"zhengfu_info":"当你使用【杀】指定目标时,你可以选择一种牌的类别,然后除非目标角色交给你一种该类别的牌,否则其不能闪避此【杀】。",
yizan:"翊赞",
yizan_info:"你可以将两张牌(其中至少一张是基本牌)当任意基本牌牌使用",
@ -25157,6 +25111,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
sp_guozhan2:"国战移植",
sp_others:"其他",
sp_waitforsort:'等待分包',
},
}
};
});

View File

@ -10523,5 +10523,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
sp_danqi:'千里单骑',
sp_decade:'其他新服武将',
},
pinyins:{
卑弥呼:['Himiko']
}
};
});

View File

@ -13962,6 +13962,47 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
},
},
//英文版特典武将凯撒
zhengfu:{
trigger:{
player:"useCardToPlayered",
},
check:function (event,player){
return get.attitude(player,event.target)<0;
},
filter:function(event,player){
return event.card.name=='sha';
},
logTarget:"target",
line:false,
content:function(){
'step 0'
player.line(trigger.target,{color:[220, 90, 139]});
player.chooseControl(['basic','trick','equip']).set('ai',function(){
var player=_status.event.target;
if(!player.countCards('h','sha')&&player.countCards('h','shan')) return 'trick';
return 'basic';
}).set('prompt','请选择一种牌的类别').set('target',trigger.target);
'step 1'
trigger.target.chooseCard('he','交给'+get.translation(player)+'一张'+get.translation(result.control)+'牌,否则此【杀】不可被闪避。',function(card){
return get.type(card,'trick')==_status.event.getParent().result.control;
}).set('ai',function(card){
var num=_status.event.num;
if(num==0) return 0;
if(card.name=='shan') return num>1?2:0;
return 8-get.value(card);
}).set('num',trigger.target.countCards('h','shan'))
'step 2'
if(result.bool){
var cards=result.cards;
trigger.target.give(cards,player);
}
else{
trigger.getParent().directHit.add(trigger.target);
game.delay();
}
}
}
},
perfectPair:{
tw_liufuren:['yuanshao'],
@ -14533,6 +14574,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
twquanqian_info:'昂扬技。出牌阶段限一次你可以将至多四张花色各不相同的手牌交给一名其他角色然后若你交出的牌数大于1则你从牌堆中获得一张装备牌然后选择一项①将手牌数摸至与其相同②观看其手牌并获得其一种花色的所有牌。<br>激昂:你弃置六张手牌。',
twrouke:'柔克',
twrouke_info:'锁定技。当你于摸牌阶段外得到超过一张牌时,你摸一张牌。',
kaisa:"凯撒",
zhengfu:"征服",
zhengfu_info:"当你使用【杀】指定目标时,你可以选择一种牌的类别,然后除非目标角色交给你一种该类别的牌,否则其不能闪避此【杀】。",
tw_mobile:'海外服·稀有专属',
tw_yunchouzhi:'运筹帷幄·智',
@ -14546,6 +14590,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
tw_mobile2:'海外服·异构',
tw_yijiang:'一将成名TW',
tw_english:'英文版',
},
pinyins:{
凯撒:['Caesar'],
难升米:['Nashime']
}
};
});

View File

@ -11558,7 +11558,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
zhouyi:'周夷,游卡桌游旗下产品《三国杀》自行杜撰的人物。设定为周瑜的妹妹,和周瑜一同征战。',
caojinyu:'金乡公主,本姓曹氏,名字不详,沛国谯县(今安徽省亳州市)人。魏武帝曹操的女儿,母为杜夫人。适婚的时候,嫁给曹操的养子何晏。高平陵之变,何晏作为大将军曹爽的党羽,遭到太傅司马懿处死。在何晏母亲尹夫人苦苦哀求下,何晏的儿子得以保全。',
wufan:'吴范226年字文则会稽上虞今浙江绍兴上虞区人。三国时期孙吴官员擅长术数。与刘惇、赵达、严武、曹不兴、皇象、宋寿和郑妪合称“吴中八绝”。吴范以推算天象节气和观察气候闻名于郡中。孙权起于东南他委身事奉每推算灾祥多应验遂显名。孙权委以骑都尉领太史令。初孙权为将军时他曾说江南有王气。及孙权立为吴王论功行封欲以为都亭侯但因不愿将其术要诀告知孙权为权所怨恨被除名。黄武中病死。',
caomao:'曹髦241年11月15日260年6月2日[1]字彦士沛国谯县今安徽省亳州市魏文帝曹丕之孙东海王曹霖之子曹魏第四位皇帝254年11月1日260年6月2日。正始二年241年生于东海王宫自幼聪明好学才慧早成正始五年244年封为高贵乡公嘉平六年254年大将军司马师废除齐王曹芳后拥立为帝年号正元曹髦文才武略崇拜少康不满司马氏专权秉政甘露五年260年亲自讨伐司马昭为太子舍人成济所弑年仅十九岁以王礼葬于洛阳西北。曹髦擅长诗文创制了九言诗传世文章有《伤魂赋并序》《颜子论》等。爱好儒学亲赴太学论道著有《春秋左氏传音》失传。精通绘画一说为中国第一位成为画家的皇帝唐张彦远《历代名画记》目曹髦为中品。',
caomao:'曹髦241年11月15日260年6月2日字彦士沛国谯县今安徽省亳州市魏文帝曹丕之孙东海王曹霖之子曹魏第四位皇帝254年11月1日260年6月2日。正始二年241年生于东海王宫自幼聪明好学才慧早成正始五年244年封为高贵乡公嘉平六年254年大将军司马师废除齐王曹芳后拥立为帝年号正元曹髦文才武略崇拜少康不满司马氏专权秉政甘露五年260年亲自讨伐司马昭为太子舍人成济所弑年仅十九岁以王礼葬于洛阳西北。曹髦擅长诗文创制了九言诗传世文章有《伤魂赋并序》《颜子论》等。爱好儒学亲赴太学论道著有《春秋左氏传音》失传。精通绘画一说为中国第一位成为画家的皇帝唐张彦远《历代名画记》目曹髦为中品。',
laiyinger:'来莺儿,是个传说中的人物,正史及古代典籍并无记载。相传来莺儿是东汉歌妓,建安年间洛阳名妓,后爱上曹操的侍卫王图,王图因延误军机而押赴刑场,当时来莺儿奋不顾身以己命换王图一死。新编古装潮剧《曹营恋歌》,秦腔《雀台歌女》讲述了歌女来莺儿与情人王图及曹操三人之间催人泪下的故事。',
caohua:'曹华东汉末年人物曹操之女为汉献帝妃嫔。建安十八年213年曹操进为魏公把曹宪、曹节、曹华三个女儿一齐都送给汉献帝刘协做了妃子皆封为夫人聘以束帛五万匹年龄尚小者在魏公国待年长而聘。',
zhaoang:'赵昂,字伟章(一作伟璋),天水冀人。汉末时曹操部下。初为羌道令,建安中转参军事徒居州治冀城。建安十八年,马超围冀城多天,城中饥困,凉州刺史韦康不愿百姓再受苦而打算投降,赵昂进劝但不为所纳。后马超背信弃义杀韦康并劫其子赵月为人质,把他送至南郑。欲以此要迫使赵昂为己所用。后与梁宽、赵衢、庞恭、杨阜等结谋为康报仇,并举兵讨伐马超。马超兵败遂弃城,投奔张鲁。得张鲁之援后马超于建安十九年复寇,赵昂与妻子王异坚守祁山三十天至夏侯渊的救兵解围,其子赵月终为马超斩杀。自冀城之难,至于祁山,赵昂出九奇策。',

View File

@ -255,13 +255,22 @@
lib.groupnature[id]=id;
}
}
if(typeof config.image=='string') Object.defineProperty(lib.card,`group_${id}`,{
configurable:true,
enumerable:false,
writable:true,
value:{
fullskin:true,
image:config.image
}
});
}],
},
hookmap:{},
imported:{},
layoutfixed:['chess','tafang','stone'],
pinyins:{
metadata:{
_metadata:{
shengmu:['zh','ch','sh','b','p','m','f','d','t','l','n','g','k','h','j','q','x','r','z','c','s','y','w'],
special_shengmu:['j','q','x','y'],
feijiemu:{
@ -23783,10 +23792,10 @@
}
if(next.card==undefined&&!nocard) next.card=event.card;
if(next.cards==undefined&&!nocard) next.cards=event.cards;
if(next.source==undefined&&!nosource) next.source=event.player;
if(next.source==undefined&&!nosource) next.source=event.customSource||event.player;
if(next.source&&next.source.isDead()) delete next.source;
if(next.unreal==undefined) next.unreal=false;
if(next.num==undefined) next.num=1;
if(next.num==undefined) next.num=(event.baseDamage||1)+(event.extraDamage||0);
next.original_num=next.num;
next.change_history=[];
if(next.nature=='poison') delete next._triggered;
@ -23836,8 +23845,8 @@
}
if(next.card==undefined&&!nocard) next.card=event.card;
if(next.cards==undefined&&!nocard) next.cards=event.cards;
if(next.source==undefined&&!nosource) next.source=event.player;
if(next.num==undefined) next.num=1;
if(next.source==undefined&&!nosource) next.source=event.customSource||event.player;
if(next.num==undefined) next.num=(event.baseDamage||1)+(event.extraDamage||0);
if(next.num<=0) _status.event.next.remove(next);
next.setContent('recover');
return next;
@ -39655,28 +39664,30 @@
}
return node;
},
putDB:function(type,id,item,callback){
putDB:function(type,id,item,onsuccess,onerror){
if(!lib.db) return item;
if(lib.status.reload){
lib[_status.dburgent?'ondb2':'ondb'].push(['putDB',Array.from(arguments)]);
return;
}
lib.status.reload++;
lib.db.transaction([type],'readwrite').objectStore(type).put(item,id).onsuccess=function(){
if(callback){
const record=lib.db.transaction([type],'readwrite').objectStore(type).put(item,id);
record.onsuccess=function(){
if(onsuccess){
_status.dburgent=true;
callback.apply(this,arguments);
onsuccess.apply(this,arguments);
delete _status.dburgent;
}
game.reload2();
};
if(typeof onerror=='function') record.onerror=onerror;
},
getDB:function(type,id,callback){
getDB:function(type,id,onsuccess,onerror){
if(!lib.db){
if(callback) callback(null);
if(onsuccess) onsuccess(null);
return;
}
if(!callback) return;
if(!onsuccess) return;
if(lib.status.reload){
lib[_status.dburgent?'ondb2':'ondb'].push(['getDB',Array.from(arguments)]);
return;
@ -39684,31 +39695,34 @@
lib.status.reload++;
const store=lib.db.transaction([type],'readwrite').objectStore(type);
if(id){
store.get(id).onsuccess=e=>{
const record=store.get(id);
record.onsuccess=e=>{
_status.dburgent=true;
callback(e.target.result);
onsuccess(e.target.result);
delete _status.dburgent;
game.reload2();
};
if(typeof onerror=='function') record.onerror=onerror;
return;
}
const obj={};
store.openCursor().onsuccess=e=>{
const cursor=e.target.result;
if(cursor){
obj[cursor.key]=cursor.value;
cursor.continue();
const cursor=store.openCursor(),obj={};
cursor.onsuccess=e=>{
const result=e.target.result;
if(result){
obj[result.key]=result.value;
result.continue();
return;
}
_status.dburgent=true;
callback(obj);
onsuccess(obj);
delete _status.dburgent;
game.reload2();
}
};
if(typeof onerror=='function') cursor.onerror=onerror;
},
deleteDB:function(type,id,callback){
deleteDB:function(type,id,onsuccess,onerror){
if(!lib.db){
if(callback) callback(false);
if(onsuccess) onsuccess(false);
return;
}
if(lib.status.reload){
@ -39717,10 +39731,12 @@
}
if(arguments.length>1){
lib.status.reload++;
lib.db.transaction([type],'readwrite').objectStore(type).delete(id).onsuccess=function(){
if(callback) callback.apply(this,arguments);
const record=lib.db.transaction([type],'readwrite').objectStore(type).delete(id);
record.onsuccess=function(){
if(onsuccess) onsuccess.apply(this,arguments);
game.reload2();
};
if(typeof onerror=='function') record.onerror=onerror;
return;
}
game.getDB(type,null,obj=>{
@ -53231,21 +53247,86 @@
else if(lib.config.favouriteCharacter.contains(name)){
fav.classList.add('active');
}
var intro=ui.create.div('.characterintro',get.characterIntro(name),uiintro);
const intro=ui.create.div('.characterintro',uiintro);
if(lib.config.show_characternamepinyin){
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);
intro.innerHTML='<span style="font-weight:bold;margin-right:5px;line-height:2">'+charactername+'</span>'+'<span style="font-size:14px;font-family:SimHei,STHeiti,sans-serif">'+'['+characterpinyin+']'+'</span>'+' | '+charactersex+' | '+charactergroup+' | '+characterhp+'<br>'+characterintroinfo;
const span=document.createElement('span');
span.style.fontWeight='bold';
const nameInfo=get.character(name),characterName=nameInfo[4].includes('ruby')?lib.translate[name]:get.rawName(name);
span.textContent=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.textContent=lib.translate[`${name}_rt`]||get.pinyin(characterName).join(' ');
ruby.appendChild(rt);
const rightParenthesisRP=document.createElement('rp');
rightParenthesisRP.textContent='';
ruby.appendChild(rightParenthesisRP);
const tr=document.createElement('tr'),characterNameTD=document.createElement('td');
characterNameTD.appendChild(ruby);
tr.appendChild(characterNameTD);
const characterSexTD=document.createElement('td');
characterSexTD.textContent=get.translation(nameInfo[0]);
tr.appendChild(characterSexTD);
const characterGroupTD=document.createElement('td');
const characterGroups=get.is.double(name,true);
if(characterGroups) Promise.all(characterGroups.map(value=>new Promise((resolve,reject)=>{
const info=lib.card[`group_${value}`];
if(!info) resolve(`image/card/group_${value}.png`);
const image=info.image;
if(!image) resolve(`image/card/group_${value}.png`);
else if(image.indexOf('db:')==0) game.getDB('image',image.slice(3),src=>resolve(src),reject);
else if(image.indexOf('ext:')==0) resolve(image.replace(/ext:/,'extension/'));
else resolve(image);
}).then(element=>new Promise((resolve,reject)=>{
const image=new Image();
image.onload=()=>resolve(image);
image.onerror=reject;
image.src=element;
})))).then(value=>{
const documentFragment=document.createDocumentFragment();
value.forEach(documentFragment.appendChild,documentFragment);
characterGroupTD.appendChild(documentFragment);
}).catch(()=>characterGroupTD.textContent=characterGroups.reduce((previousValue,currentValue)=>previousValue?`${previousValue}/${get.translation(currentValue)}`:get.translation(currentValue),''));
else{
const characterGroup=nameInfo[1];
new Promise((resolve,reject)=>{
const info=lib.card[`group_${characterGroup}`];
if(!info) resolve(`image/card/group_${characterGroup}.png`);
const image=info.image;
if(!image) resolve(`image/card/group_${characterGroup}.png`);
else if(image.indexOf('db:')==0) game.getDB('image',image.slice(3),src=>resolve(src),reject);
else if(image.indexOf('ext:')==0) resolve(image.replace(/ext:/,'extension/'));
else resolve(image);
}).then(value=>new Promise((resolve,reject)=>{
const image=new Image();
image.onload=()=>resolve(image);
image.onerror=reject;
image.src=value;
})).then(value=>characterGroupTD.appendChild(value)).catch(()=>characterGroupTD.textContent=get.translation(characterGroup));
}
tr.appendChild(characterGroupTD);
const characterHPTD=document.createElement('td'),hpDiv=ui.create.div('.hp',characterHPTD),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.textContent=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.textContent=infoShield;
}
tr.appendChild(characterHPTD);
const table=document.createElement('table');
table.appendChild(tr);
intro.appendChild(table);
intro.appendChild(document.createElement('hr'));
}
var intro2=ui.create.div('.characterintro.intro2',uiintro);
intro.appendChild(new Text(get.characterIntro(name)));
const intro2=ui.create.div('.characterintro.intro2',uiintro);
var list=get.character(name,3)||[];
var skills=ui.create.div('.characterskill',uiintro);
if(lib.config.touchscreen){
@ -53258,38 +53339,75 @@
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&&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;
const skillNameSpan=document.createElement('span'),skillNameSpanStyle=skillNameSpan.style;
skillNameSpanStyle.fontWeight='bold';
const link=this.link,skillName=get.translation(link);
skillNameSpan.textContent=skillName;
if(lib.config.show_skillnamepinyin&&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.textContent=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(intro2);
div.style.marginRight='5px';
div.appendChild(ruby);
}
else{
skillNameSpanStyle.marginRight='5px';
intro2.appendChild(skillNameSpan);
}
intro2.appendChild(new Text(get.skillInfoTranslation(this.link)));
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&&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;
let derivation=info.derivation;
if(derivation){
if(typeof derivation=='string') derivation=[derivation];
derivation.forEach(value=>{
intro2.appendChild(document.createElement('br'));
intro2.appendChild(document.createElement('br'));
const derivationNameSpan=document.createElement('span'),derivationNameSpanStyle=derivationNameSpan.style;
derivationNameSpanStyle.fontWeight='bold';
const derivationName=get.translation(value);
derivationNameSpan.textContent=derivationName;
if(lib.config.show_skillnamepinyin&&derivationName.length<=5&&value.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.textContent=lib.translate[`${value}_rt`]||get.pinyin(derivationName).join(' ');
ruby.appendChild(rt);
const rightParenthesisRP=document.createElement('rp');
rightParenthesisRP.textContent='';
ruby.appendChild(rightParenthesisRP);
const div=ui.create.div(intro2);
div.style.marginRight='5px';
div.appendChild(ruby);
}
}
else{
derivationNameSpanStyle.marginRight='5px';
intro2.appendChild(derivationNameSpan);
}
intro2.appendChild(new Text(get.skillInfoTranslation(value)));
});
}
if(info.alter){
intro2.innerHTML+='<br><br><div class="hrefnode skillversion"></div>';
@ -54411,40 +54529,36 @@
return [];
},
//装备栏 END
pinyin:function(chinese,withtone){
const util=window.pinyinUtilx;
if(!window.pinyinUtilx) return [];
if(lib.pinyins&&lib.pinyins[chinese]){
const str=lib.pinyins[chinese];
if(withtone===false){
for(let i=0;i<str.length;i++){
str[i]=util.removeTone(str[i]);
}
}
return str;
pinyin:(chinese,withTone)=>{
const pinyinUtilx=window.pinyinUtilx;
if(!pinyinUtilx) return [];
const pinyins=lib.pinyins;
if(pinyins){
const pinyin=pinyins[chinese];
if(Array.isArray(pinyin)) return withTone===false?pinyin.map(pinyinUtilx.removeTone):pinyin.slice();
}
return util.getPinyin(chinese,null,withtone,true);
return pinyinUtilx.getPinyin(chinese,null,withTone,true);
},
yunmu:function(str){
//部分整体认读音节特化处理
const util=window.pinyinUtilx;
if(util&&lib.pinyins.metadata.zhengtirendu.contains(util.removeTone(str))){
if(util&&lib.pinyins._metadata.zhengtirendu.contains(util.removeTone(str))){
return '-'+str[str.length-1];
}
//排除声母
for(let i of lib.pinyins.metadata.shengmu){
for(let i of lib.pinyins._metadata.shengmu){
if(str.indexOf(i)==0){
str=str.slice(i.length);
if(str[0]=='u'&&lib.pinyins.metadata.special_shengmu.contains(i)) str='ü'+str.slice(1);
if(str[0]=='u'&&lib.pinyins._metadata.special_shengmu.contains(i)) str='ü'+str.slice(1);
break;
}
}
//排除介母
if(str.length>0){
for(let i in lib.pinyins.metadata.feijiemu){
for(let i in lib.pinyins._metadata.feijiemu){
if(str[0]==i){
let goon=false;
for(let j of lib.pinyins.metadata.feijiemu[i]){
for(let j of lib.pinyins._metadata.feijiemu[i]){
if(str.indexOf(j)==0) goon=true;
}
if(!goon) str=str.slice(1);
@ -54457,20 +54571,20 @@
yunjiao:function(str){
const util=window.pinyinUtilx;
if(util) str=util.removeTone(str)
if(lib.pinyins.metadata.zhengtirendu.contains(str)){
if(lib.pinyins._metadata.zhengtirendu.contains(str)){
str=('-'+str[str.length-1]);
}
else{
for(let i of lib.pinyins.metadata.shengmu){
for(let i of lib.pinyins._metadata.shengmu){
if(str.indexOf(i)==0){
str=str.slice(i.length);
if(str[0]=='u'&&lib.pinyins.metadata.special_shengmu.contains(i)) str='ü'+str.slice(1);
if(str[0]=='u'&&lib.pinyins._metadata.special_shengmu.contains(i)) str='ü'+str.slice(1);
break;
}
}
}
for(let i in lib.pinyins.metadata.yunjiao){
if(lib.pinyins.metadata.yunjiao[i].contains(str)) return i;
for(let i in lib.pinyins._metadata.yunjiao){
if(lib.pinyins._metadata.yunjiao[i].contains(str)) return i;
}
return null;
},

BIN
image/card/group_jin.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

BIN
image/card/group_shen.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

File diff suppressed because it is too large Load Diff