This commit is contained in:
libccy 2017-04-15 07:35:56 +08:00
parent d28e352d93
commit 388474f1c7
45 changed files with 376 additions and 315 deletions

View File

@ -1,4 +1,6 @@
card.extra={
'use strict';
game.import('card',{
name:'extra',
connect:true,
card:{
jiu:{
@ -57,7 +59,7 @@ card.extra={
if(i==0) return 7.3;
return 3;
},
value:function(card,player){
value:function(card,player,i){
if(player.hp>1){
if(i==0) return 5;
return 1;
@ -600,4 +602,4 @@ card.extra={
["spade",10,"bingliang"],
["club",4,"bingliang"],
],
}
});

View File

@ -1,5 +1,6 @@
'use strict';
card.gujian={
game.import('card',{
name:'gujian',
card:{
luyugeng:{
fullskin:true,
@ -1685,4 +1686,4 @@ card.gujian={
['club',3,'liufengsan'],
]
};
});

View File

@ -1,5 +1,6 @@
'use strict';
card.guozhan={
game.import('card',{
name:'guozhan',
connect:true,
card:{
feilongduofeng:{
@ -1184,4 +1185,4 @@ card.guozhan={
['diamond',4,'xietianzi'],
['club',1,'yuxi'],
],
}
});

View File

@ -1,5 +1,6 @@
'use strict';
card.hearth={
game.import('card',{
name:'hearth',
card:{
linghunzhihuo:{
fullskin:true,
@ -714,4 +715,4 @@ card.hearth={
['diamond',2,'jihuocard'],
['diamond',1,'linghunzhihuo'],
],
}
});

View File

@ -1,5 +1,6 @@
'use strict';
card.sp={
game.import('card',{
name:'sp',
connect:true,
card:{
jinchan:{
@ -977,4 +978,4 @@ card.sp={
["spade",2,'lanyinjia'],
["club",2,'lanyinjia'],
],
}
});

View File

@ -1,5 +1,6 @@
'use strict';
card.standard={
game.import('card',{
name:'standard',
connect:true,
card:{
damage:{
@ -218,8 +219,8 @@ card.standard={
if(player.hasSkillTag('pretao')) return 5;
return 2;
},
useful:[8,6.5],
value:[8,6.5],
useful:[8,6.5,5,4],
value:[8,6.5,5,4],
},
result:{
target:function(player,target){
@ -2010,4 +2011,4 @@ card.standard={
["heart",12,'shandian','thunder'],
["diamond",12,'wuxie'],
],
}
});

View File

@ -1,4 +1,6 @@
card.swd={
'use strict';
game.import('card',{
name:'swd',
card:{
dujian:{
fullskin:true,
@ -1594,7 +1596,7 @@ card.swd={
if(i==0) return 7.3;
return 3;
},
value:function(card,player){
value:function(card,player,i){
if(player.hp>1){
if(i==0) return 5;
return 1;
@ -5177,4 +5179,4 @@ card.swd={
// ['club',11,'dujian','poison'],
// ['club',12,'dujian','poison'],
],
}
});

View File

@ -1,4 +1,6 @@
card.yunchou={
'use strict';
game.import('card',{
name:'yunchou',
card:{
diaobingqianjiang:{
fullskin:true,
@ -1154,4 +1156,4 @@ card.yunchou={
['club',2,'youdishenru'],
['spade',9,'youdishenru'],
],
}
});

View File

@ -1,4 +1,6 @@
card.zhenfa={
'use strict';
game.import('card',{
name:'zhenfa',
card:{
pozhenjue:{
type:'zhenfa',
@ -214,9 +216,7 @@ card.zhenfa={
multitarget:true,
selectTarget:-1,
content:function(){
lib.temp=targets[0];
targets.sort(lib.sort.seat);
lib.temp={};
targets.sortBySeat();
for(var i=1;i<targets.length;i++){
game.swapSeat(targets[i],targets[i-1].next,false);
}
@ -439,4 +439,4 @@ card.zhenfa={
// ["spade",13,'pozhenjue'],
//["heart",13,'pozhenjue'],
],
}
});

View File

@ -1,4 +1,6 @@
character.diy={
'use strict';
game.import('character',{
name:'diy',
character:{
// diy_caocao:['male','wei',4,['xicai','diyjianxiong','hujia']],
// diy_hanlong:['male','wei',4,['siji','ciqiu']],
@ -927,7 +929,7 @@ character.diy={
"step 0"
player.draw(2);
"step 1"
next=player.discardPlayerCard(player,'hej',2,true);
var next=player.discardPlayerCard(player,'hej',2,true);
next.ai=function(button){
if(get.position(button.link)=='j') return 10;
return -get.value(button.link);
@ -1391,4 +1393,4 @@ character.diy={
xicai_info:'你可以立即获得对你造成伤害的牌',
diyjianxiong_info:'锁定技,在身份局中,在你回合内死亡的角色均视为反贼,国战中,在你回合内死亡的角色若与你势力相同则随机改为另一个势力',
},
}
});

View File

@ -1,4 +1,6 @@
character.extra={
'use strict';
game.import('character',{
name:'extra',
character:{
shen_guanyu:['male','shen',6,['wuhun','wushen'],['shu']],
shen_zhaoyun:['male','shen',2,['juejing','longhun'],['shu']],
@ -1226,4 +1228,4 @@ character.extra={
wuqian:'无前',
wuqian_info:'出牌阶段,你可以弃置两枚暴怒标记并获得技能【无双】直到回合结束',
},
}
});

View File

@ -1,4 +1,6 @@
character.gujian={
'use strict';
game.import('character',{
name:'gujian',
character:{
gjqt_bailitusu:['male','shu',4,['xuelu','fanshi','shahun']],
gjqt_fengqingxue:['female','wu',3,['qinglan','yuehua','swd_wuxie']],
@ -1656,4 +1658,4 @@ character.gujian={
yuling_info:'锁定技你没有摸牌和弃牌阶段你的手牌数始终为5你在一个出牌阶段最多使用X+2张牌X为你的体力上限',
yuling_info_alter:'锁定技你没有摸牌和弃牌阶段你的手牌数始终为5你在一个出牌阶段最多使用X+1张牌X为你的体力上限',
},
}
});

View File

@ -1,4 +1,6 @@
character.gwent={
'use strict';
game.import('character',{
name:'gwent',
character:{
gw_huoge:['male','qun',3,['quanzhang']],
gw_aisinie:['female','wu',3,['huihun']],
@ -911,4 +913,4 @@ character.gwent={
quanzhang_backup:'权杖',
quanzhang_info:'出牌阶段限一次你可以观看牌堆顶的6张牌并选择一张使用',
}
}
});

View File

@ -1,5 +1,6 @@
'use strict';
character.hearth={
game.import('character',{
name:'hearth',
character:{
hs_jaina:['female','wei',3,['huopu','aoshu','bingjia']],
hs_lrexxar:['male','shu',4,['yushou']],
@ -6582,4 +6583,4 @@ character.hearth={
wlianji:'连击',
wlianji_info:'结束阶段,若你本回合使用的卡牌数大于你当前的体力值,你可以摸两张牌',
},
}
});

View File

@ -1,5 +1,6 @@
'use strict';
character.jiange={
game.import('character',{
name:'jiange',
character:{
jg_pangtong:['male','shu',3,['qiwu','tianyu']],
jg_huangyueying:['female','shu',3,['zhinang','jingmiao']],
@ -576,4 +577,4 @@ character.jiange={
jingfan_info:'回合内,每当你使用一张卡牌,你的进攻距离+1出牌阶段结束时你可以将手牌数补至X并指定至多X名角色令其进攻距离+1直到其下一回合结束X为你回合内使用的卡牌数',
},
}
});

View File

@ -1,4 +1,6 @@
character.old={
'use strict';
game.import('character',{
name:'old',
character:{
zhangjiao:['male','qun',3,['leiji','guidao','huangtian'],['zhu']],
masu:['male','shu',3,['xinzhan','huilei']],
@ -370,4 +372,4 @@ character.old={
oldxuanfeng:'旋风',
oldxuanfeng_info:'每当你失去一次装备区里的牌时你可以执行下列两项中的一项1.视为对任意一名其他角色使用一张【杀】此【杀】不计入每回合的使用限制2.对与你距离1以内的一名其他角色造成一点伤害',
}
}
});

View File

@ -1,5 +1,6 @@
'use strict';
character.ow={
game.import('character',{
name:'ow',
character:{
ow_liekong:['female','shu',3,['shanxian','shanhui']],
ow_sishen:['male','shu',3,['xiandan','yihun','shouge']],
@ -3530,4 +3531,4 @@ character.ow={
ow_heiying:'黑影',
ow_orisa:'奥丽莎',
}
};
});

View File

@ -1,4 +1,4 @@
window.characterRank={
window.noname_character_rank={
s:[
'swd_muyun',
'swd_zhaoyun',

View File

@ -1,5 +1,6 @@
'use strict';
character.refresh={
game.import('character',{
name:'refresh',
connect:true,
character:{
re_caocao:['male','wei',4,['hujia','rejianxiong'],['zhu']],
@ -1570,4 +1571,4 @@ character.refresh={
reluoyi_info:'你可以跳过摸牌阶段,然后展示牌堆顶的三张牌,获得其中的基本牌、武器牌和【决斗】,若如此做,直到你的下回合开始,你为伤害来源的【杀】或【决斗】造成的伤害+1。',
reganglie_info:'每当你受到1点伤害后可进行一次判定若结果为红色你对伤害来源造成1点伤害若结果为黑色你弃置其一张牌。'
},
}
});

View File

@ -1,5 +1,6 @@
'use strict';
character.shenhua={
game.import('character',{
name:'shenhua',
connect:true,
character:{
xiahouyuan:['male','wei',4,['xinshensu']],
@ -4361,4 +4362,4 @@ character.shenhua={
fenji_info:'每当一名角色的手牌于回合外被弃置时你可以失去1点体力然后该角色摸两张牌。',
},
}
});

View File

@ -1,5 +1,6 @@
'use strict';
character.sp={
game.import('character',{
name:'sp',
connect:true,
character:{
yangxiu:['male','wei',3,['jilei','danlao']],
@ -8783,4 +8784,4 @@ character.sp={
yicong_info:'锁定技只要你的体力值大于2点你的进攻距离+1只要你的体力值为2点或更低你的防御距离+1',
baobian_info:'锁定技若你的体力值为3或更少你视为拥有技能“挑衅”若你的体力值为2或更少你视为拥有技能“咆哮”若你的体力值为1你视为拥有技能“神速”。',
},
}
});

View File

@ -1,5 +1,6 @@
'use strict';
character.standard={
game.import('character',{
name:'standard',
connect:true,
character:{
caocao:['male','wei',4,['hujia','jianxiong'],['zhu']],
@ -1759,4 +1760,4 @@ character.standard={
lijian_info:'出牌阶段,你可以弃一张牌,视为一名男性角色对另一名男性角色使用一张[决斗],每阶段限一次',
biyue_info:'结束阶段,你可以摸一张牌',
},
}
});

View File

@ -1,5 +1,6 @@
'use strict';
character.swd={
game.import('character',{
name:'swd',
character:{
swd_huzhongxian:['male','wu',3,['daofa','xielv','hujing']],
@ -9766,4 +9767,4 @@ character.swd={
zaowu_old_info:'出牌阶段,你可以弃置三张不同类型的牌,创造任意两张牌并获得之',
xielv_info:'弃牌阶段结束后,若你的所有手牌(至少两张)颜色均相同,你可以展示所有手牌,然后回复一点体力并弃置场上的所有判定牌',
},
}
});

View File

@ -1,5 +1,6 @@
'use strict';
character.xiake={
game.import('character',{
name:'xiake',
character:{
// xk_dongfangweiming:['male','shu',4,[]],
xk_guyuexuan:['male','qun',4,['rouquan','gzhenji']],
@ -118,4 +119,4 @@ character.xiake={
zitong:'通悟',
zitong_info:'当你于自己的回合内使用第三张牌时,你可以将一张传送门置于你的手牌',
},
}
});

View File

@ -1,5 +1,6 @@
'use strict';
character.xianjian={
game.import('character',{
name:'xianjian',
character:{
pal_lixiaoyao:['male','qun',4,['tianjian','yufeng']],
pal_zhaoliner:['female','wei',3,['huimeng','tianshe']],
@ -2611,4 +2612,4 @@ character.xianjian={
tianshe2:'天蛇',
tianshe_info:'锁定技,你防止即将受到的属性伤害,每当你造成一次属性伤害,你回复一点体力',
},
}
});

View File

@ -1,5 +1,6 @@
'use strict';
character.yijiang={
game.import('character',{
name:'yijiang',
connect:true,
character:{
caozhang:['male','wei',4,['jiangchi']],
@ -7717,4 +7718,4 @@ character.yijiang={
zhichi2_info:'智迟已发动',
pojun_info:'你每使用【杀】造成一次伤害可令受到该伤害的角色多摸X张牌X为该角色当前的体力值(X最多为5),然后该角色将其武将牌翻面。',
},
}
});

View File

@ -1,5 +1,6 @@
'use strict';
character.yxs={
game.import('character',{
name:'yxs',
character:{
yxs_wuzetian:['female','wu',4,['nvquan','qiandu','weiyi']],
yxs_caocao:['male','wei',4,['zhulu','xieling']],
@ -2989,4 +2990,4 @@ character.yxs={
juma:'拒马',
juma_info:'你与其他角色的距离始终视为1。',
},
};
});

View File

@ -1,4 +1,6 @@
character.zhuogui={
'use strict';
game.import('character',{
name:'zhuogui',
character:{
nianshou:['male','shu',4,['nianrui','qixiang']],
mamian:['male','qun',4,['lianyu','guiji']],
@ -336,4 +338,4 @@ character.zhuogui={
xixing:'吸星',
xixing_info:'出牌阶段限一次,你可以弃置三张不同类别的牌,对一名其他角色造成一点伤害,然后回复一点体力',
},
}
});

View File

@ -1,4 +1,6 @@
play.boss={
'use strict';
game.import('play',{
name:'boss',
init:function(){
if(get.mode()=='tafang') return;
if(get.mode()!='boss'){
@ -220,4 +222,4 @@ play.boss={
help:{
'挑战武将':'<ul><li>在非挑战模式中使用挑战武将'
},
}
});

View File

@ -1,4 +1,6 @@
play.cardpile={
'use strict';
game.import('play',{
name:'cardpile',
arenaReady:function(){
var data={
total:160,
@ -93,4 +95,4 @@ play.cardpile={
help:{
'牌堆补充':'<ul><li>将杀闪等牌在牌堆中的比例维持在与军争牌堆相同,防止开启扩展包后重要的牌被过多地稀释'
},
}
});

View File

@ -1,5 +1,6 @@
'use strict';
play.coin={
game.import('play',{
name:'coin',
init:function(){
if(lib.config.mode!='chess'||get.config('chess_mode')!='leader'){
_status.coin=0;
@ -1369,4 +1370,4 @@ play.coin={
'<li>修改金币:<br>game.changCoin'+
'<li>默认下雪:<br>game.haveFun.alwaysSnow'
}
}
});

View File

@ -1,4 +1,6 @@
play.wuxing={
'use strict';
game.import('play',{
name:'wuxing',
arenaReady:function(){
if(_status.connectMode) return;
lib.card.list.splice(Math.floor(lib.card.list.length*Math.random()),0,['spade',5,'wuxingpan']);
@ -71,61 +73,61 @@ play.wuxing={
case 'wood':
if(player.countCards('he')){
game.log(player,'被'+get.translation(trigger.card.wunature)+'属性的卡牌克制');
player.chooseToDiscard('你被金属性卡牌克制,需弃置一张牌',true,'he').ai=get.disvalue;player.popup('金克木')};return;
player.chooseToDiscard('你被金属性卡牌克制,需弃置一张牌',true,'he').ai=get.disvalue;player.popup('金克木')}return;
case 'water':
game.log(player,'得到'+get.translation(trigger.card.wunature)+'属性卡牌的加成');
player.draw();player.popup('金生水');
return;
default:return;
}
return;
case 'wood':
switch(player.wunature){
case 'soil':
if(player.countCards('he')){
game.log(player,'被'+get.translation(trigger.card.wunature)+'属性的卡牌克制');
player.chooseToDiscard('你被木属性卡牌克制,需弃置一张牌',true,'he').ai=get.disvalue;player.popup('木克土')};return;
player.chooseToDiscard('你被木属性卡牌克制,需弃置一张牌',true,'he').ai=get.disvalue;player.popup('木克土')}return;
case 'fire':
game.log(player,'得到'+get.translation(trigger.card.wunature)+'属性卡牌的加成');
player.draw();player.popup('木生火');
return;
default:return;
}
return;
case 'water':
switch(player.wunature){
case 'fire':
if(player.countCards('he')){
game.log(player,'被'+get.translation(trigger.card.wunature)+'属性的卡牌克制');
player.chooseToDiscard('你被水属性卡牌克制,需弃置一张牌',true,'he').ai=get.disvalue;player.popup('水克火')};return;
player.chooseToDiscard('你被水属性卡牌克制,需弃置一张牌',true,'he').ai=get.disvalue;player.popup('水克火')}return;
case 'wood':
game.log(player,'得到'+get.translation(trigger.card.wunature)+'属性卡牌的加成');
player.draw();player.popup('水生木');
return;
default:return;
}
return;
case 'fire':
switch(player.wunature){
case 'metal':
if(player.countCards('he')){
game.log(player,'被'+get.translation(trigger.card.wunature)+'属性的卡牌克制');
player.chooseToDiscard('你被火属性卡牌克制,需弃置一张牌',true,'he').ai=get.disvalue;player.popup('火克金')};return;
player.chooseToDiscard('你被火属性卡牌克制,需弃置一张牌',true,'he').ai=get.disvalue;player.popup('火克金')}return;
case 'soil':
game.log(player,'得到'+get.translation(trigger.card.wunature)+'属性卡牌的加成');
player.draw();player.popup('火生土');
return;
default:return;
}
return;
case 'soil':
switch(player.wunature){
case 'water':
if(player.countCards('he')){
game.log(player,'被'+get.translation(trigger.card.wunature)+'属性的卡牌克制');
player.chooseToDiscard('你被土属性卡牌克制,需弃置一张牌',true,'he').ai=get.disvalue;player.popup('土克水')};return;
player.chooseToDiscard('你被土属性卡牌克制,需弃置一张牌',true,'he').ai=get.disvalue;player.popup('土克水')}return;
case 'metal':
game.log(player,'得到'+get.translation(trigger.card.wunature)+'属性卡牌的加成');
player.draw();player.popup('土生金');
return;
default:return;
}
return;
}
},
ai:{
@ -134,34 +136,34 @@ play.wuxing={
switch(card.wunature){
case 'metal':
switch(target.wunature){
case 'wood':if(current!=0) return [1,-0.3];
case 'water':if(current!=0) return [1,0.3];
default:return;
case 'wood':if(current!=0) return [1,-0.3];return;
case 'water':if(current!=0) return [1,0.3];return;
}
return;
case 'wood':
switch(target.wunature){
case 'soil':if(current!=0) return [1,-0.3];
case 'fire':if(current!=0) return [1,0.3];
default:return;
case 'soil':if(current!=0) return [1,-0.3];return;
case 'fire':if(current!=0) return [1,0.3];return;
}
return;
case 'water':
switch(target.wunature){
case 'fire':if(current!=0) return [1,-0.3];
case 'wood':if(current!=0) return [1,0.3];
default:return;
case 'fire':if(current!=0) return [1,-0.3];return;
case 'wood':if(current!=0) return [1,0.3];return;
}
return;
case 'fire':
switch(target.wunature){
case 'metal':if(current!=0) return [1,-0.3];
case 'soil':if(current!=0) return [1,0.3];
default:return;
case 'metal':if(current!=0) return [1,-0.3];return;
case 'soil':if(current!=0) return [1,0.3];return;
}
return;
case 'soil':
switch(target.wunature){
case 'water':if(current!=0) return [1,-0.3];
case 'metal':if(current!=0) return [1,0.3];
default:return;
case 'water':if(current!=0) return [1,-0.3];return;
case 'metal':if(current!=0) return [1,0.3];return;
}
return;
}
}
}
@ -222,4 +224,4 @@ play.wuxing={
'须弃置一张牌<li>当一名角色成为相生的卡牌的目标时,须摸一张牌'+
'<li>金克木,金生水;<br>木克土,木生火;<br>水克火,水生木;<br>火克金,火生土;<br>土克水,土生金'
}
}
});

View File

@ -232,11 +232,3 @@ window.config={
// ['jiushi','kuiwei'],
]
};
window.mode={};
window.card={};
window.character={};
window.play={};
window.background={};
window.music={};
window.font={};
window.theme={};

View File

@ -46,6 +46,7 @@
cardType:{},
hook:{globaltrigger:{},globalskill:{}},
hookmap:{},
imported:{},
layoutfixed:['chess','tafang','stone'],
characterDialogGroup:{
'收藏':function(name,capt){
@ -6207,6 +6208,7 @@
lib.config=window.config;
lib.configOL={};
delete window.config;
var config2;
var proceed=function(config2){
@ -6255,30 +6257,32 @@
if(window.isNonameServer){
lib.config.mode='connect';
}
for(i in character.pack){
var pack=window.noname_package;
delete window.noname_package;
for(i in pack.character){
if(lib.config.hiddenCharacterPack.indexOf(i)==-1){
lib.config.all.characters.push(i);
lib.translate[i+'_character_config']=character.pack[i];
lib.translate[i+'_character_config']=pack.character[i];
}
}
for(i in card.pack){
for(i in pack.card){
if(lib.config.hiddenCardPack.indexOf(i)==-1){
lib.config.all.cards.push(i);
lib.translate[i+'_card_config']=card.pack[i];
lib.translate[i+'_card_config']=pack.card[i];
}
}
for(i in play.pack){
for(i in pack.play){
lib.config.all.plays.push(i);
lib.translate[i+'_play_config']=play.pack[i];
lib.translate[i+'_play_config']=pack.play[i];
}
if(!lib.config.gameRecord){
lib.config.gameRecord={};
}
for(i in mode.pack){
for(i in pack.mode){
if(lib.config.hiddenModePack.indexOf(i)==-1){
lib.config.all.mode.push(i);
lib.translate[i]=mode.pack[i];
lib.translate[i]=pack.mode[i];
if(!lib.config.gameRecord[i]){
lib.config.gameRecord[i]={data:{}};
}
@ -6291,10 +6295,10 @@
lib.config.gameRecord.identity={data:{}};
}
}
if(background&&background.pack){
for(i in background.pack){
if(pack.background){
for(i in pack.background){
if(lib.config.hiddenBackgroundPack.contains(i)) continue;
lib.configMenu.appearence.config.image_background.item[i]=background.pack[i];
lib.configMenu.appearence.config.image_background.item[i]=pack.background[i];
}
for(var i=0;i<lib.config.customBackgroundPack.length;i++){
var link=lib.config.customBackgroundPack[i];
@ -6302,44 +6306,36 @@
}
lib.configMenu.appearence.config.image_background.item.default='默认';
}
if(music&&music.pack){
if(pack.music){
if(lib.device||typeof window.require=='function'){
lib.configMenu.audio.config.background_music.item.music_custom='自定';
}
lib.config.all.background_music=['music_default'];
for(i in music.pack){
for(i in pack.music){
lib.config.all.background_music.push(i);
lib.configMenu.audio.config.background_music.item[i]=music.pack[i];
lib.configMenu.audio.config.background_music.item[i]=pack.music[i];
}
lib.configMenu.audio.config.background_music.item.music_random='随机';
lib.configMenu.audio.config.background_music.item.music_off='关闭';
}
if(theme&&theme.pack){
for(i in theme.pack){
lib.configMenu.appearence.config.theme.item[i]=theme.pack[i];
if(pack.theme){
for(i in pack.theme){
lib.configMenu.appearence.config.theme.item[i]=pack.theme[i];
}
}
if(font&&font.pack){
if(pack.font){
ui.css.fontsheet=lib.init.sheet();
for(i in font.pack){
lib.configMenu.appearence.config.name_font.item[i]=font.pack[i];
lib.configMenu.appearence.config.identity_font.item[i]=font.pack[i];
lib.configMenu.appearence.config.cardtext_font.item[i]=font.pack[i];
lib.configMenu.appearence.config.global_font.item[i]=font.pack[i];
for(i in pack.font){
lib.configMenu.appearence.config.name_font.item[i]=pack.font[i];
lib.configMenu.appearence.config.identity_font.item[i]=pack.font[i];
lib.configMenu.appearence.config.cardtext_font.item[i]=pack.font[i];
lib.configMenu.appearence.config.global_font.item[i]=pack.font[i];
ui.css.fontsheet.sheet.insertRule("@font-face {font-family: '"+i+"';src: url('"+lib.assetURL+"font/"+i+".ttf');}",0);
}
lib.configMenu.appearence.config.cardtext_font.item.default='默认';
lib.configMenu.appearence.config.global_font.item.default='默认';
}
delete character.pack;
delete card.pack;
delete play.pack;
delete mode.pack;
delete window.background;
delete window.music;
delete window.font;
var ua=navigator.userAgent.toLowerCase();
if('ontouchstart' in document){
@ -6475,17 +6471,18 @@
lib.init.background();
}
delete _status.htmlbg;
window.game=game;
var styleToLoad=6;
var styleLoaded=function(){
styleToLoad--;
if(styleToLoad==0){
if(extensionlist.length){
window.game=game;
var extToLoad=extensionlist.length;
var extLoaded=function(){
extToLoad--;
if(extToLoad==0){
delete window.game;
loadPack();
}
}
@ -6495,7 +6492,6 @@
game.removeExtension(i);
extToLoad--;
if(extToLoad==0){
delete window.game;
loadPack();
}
}
@ -6921,6 +6917,11 @@
}
var proceed=function(){
var mode=lib.imported.mode;
var card=lib.imported.card;
var character=lib.imported.character;
var play=lib.imported.play;
delete window.game;
var i,j,k;
for(i in mode[lib.config.mode].element){
if(!lib.element[i]) lib.element[i]=[];
@ -6975,8 +6976,8 @@
lib.config.banned=lib.config[lib.config.mode+'_banned']||[];
lib.config.bannedcards=lib.config[lib.config.mode+'_bannedcards']||[];
lib.rank=window.characterRank;
delete window.characterRank;
lib.rank=window.noname_character_rank;
delete window.noname_character_rank;
for(i in mode[lib.config.mode]){
if(i=='element') continue;
if(i=='game') continue;
@ -7258,11 +7259,9 @@
lib.cheat.i();
}
lib.config.sort_card=get.sortCard(lib.config.sort);
delete window.config;
delete window.mode;
delete window.card;
delete window.character;
delete window.play;
delete lib.imported.character;
delete lib.imported.card;
delete lib.imported.mode;
for(var i in lib.init){
if(i.indexOf('setMode_')==0){
delete lib.init[i];
@ -7333,7 +7332,7 @@
});
}
}
if(!mode[lib.config.mode]){
if(!lib.imported.mode[lib.config.mode]){
window.inSplash=true;
clearTimeout(window.resetGameTimeout);
delete window.resetGameTimeout;
@ -8669,12 +8668,11 @@
},
loadMode:function(){
'step 0'
window.mode={};
lib.init.js(lib.assetURL+'mode',event.mode,game.resume);
game.pause();
'step 1'
event.result=window.mode[event.mode];
delete window.mode;
event.result=lib.imported.mode[event.mode];
delete lib.imported.mode[event.mode];
},
forceOver:function(){
'step 0'
@ -9476,6 +9474,9 @@
if(_status.event.custom.add.card){
_status.event.custom.add.card();
}
for(var i=0;i<ui.selected.cards.length;i++){
ui.selected.cards[i].updateTransform(true);
}
});
}
if(Array.isArray(event.dialog)){
@ -17846,6 +17847,9 @@
this.cardid=get.id();
lib.cardOL[this.cardid]=this;
}
if(!_status.connectMode&&!_status.video){
this.cardid=get.id();
}
return this;
},
updateTransform:function(bool,delay){
@ -20773,70 +20777,83 @@
}
}
},
import:function(type,obj){
import:function(type,content){
if(type=='extension'){
lib.extensionMenu['extension_'+obj.name]={
enable:{
name:'开启',
init:true
}
};
for(var i in obj.config){
lib.extensionMenu['extension_'+obj.name][i]=obj.config[i];
game.loadExtension(content);
}
else{
if(!lib.imported[type]){
lib.imported[type]={};
}
for(var i in obj.help){
lib.help[i]=obj.help[i];
if(content.name){
lib.imported[type][content.name]=content;
delete content.name;
}
if(obj.editable!==false){
lib.extensionMenu['extension_'+obj.name].edit={
name:'编辑此扩展',
clear:true,
onclick:function(){
game.editExtension(obj.name);
}
}
}
},
loadExtension:function(obj){
lib.extensionMenu['extension_'+obj.name]={
enable:{
name:'开启',
init:true
}
lib.extensionMenu['extension_'+obj.name].delete={
name:'删除此扩展',
};
for(var i in obj.config){
lib.extensionMenu['extension_'+obj.name][i]=obj.config[i];
}
for(var i in obj.help){
lib.help[i]=obj.help[i];
}
if(obj.editable!==false){
lib.extensionMenu['extension_'+obj.name].edit={
name:'编辑此扩展',
clear:true,
onclick:function(){
if(this.innerHTML=='<span>确认删除</span>'){
var prefix='extension_'+obj.name;
var page=this.parentNode;
var start=page.parentNode.previousSibling;
page.remove();
if(start){
for(var i=0;i<start.childElementCount;i++){
if(start.childNodes[i].link==page){
var active=false;
if(start.childNodes[i].classList.contains('active')){
active=true;
}
start.childNodes[i].remove();
if(active){
start.firstChild.classList.add('active');
start.nextSibling.appendChild(start.firstChild.link);
}
break;
game.editExtension(obj.name);
}
}
}
lib.extensionMenu['extension_'+obj.name].delete={
name:'删除此扩展',
clear:true,
onclick:function(){
if(this.innerHTML=='<span>确认删除</span>'){
var prefix='extension_'+obj.name;
var page=this.parentNode;
var start=page.parentNode.previousSibling;
page.remove();
if(start){
for(var i=0;i<start.childElementCount;i++){
if(start.childNodes[i].link==page){
var active=false;
if(start.childNodes[i].classList.contains('active')){
active=true;
}
start.childNodes[i].remove();
if(active){
start.firstChild.classList.add('active');
start.nextSibling.appendChild(start.firstChild.link);
}
break;
}
}
game.removeExtension(obj.name);
if(obj.onremove){
obj.onremove();
}
}
else{
this.innerHTML='<span>确认删除</span>';
var that=this;
setTimeout(function(){
that.innerHTML='<span>删除此扩展</span>';
},1000);
}
game.removeExtension(obj.name);
if(obj.onremove){
obj.onremove();
}
}
else{
this.innerHTML='<span>确认删除</span>';
var that=this;
setTimeout(function(){
that.innerHTML='<span>删除此扩展</span>';
},1000);
}
}
}
if(type=='extension'&&!_status.importingExtension){
if(!_status.importingExtension){
if(obj&&lib.config['extension_'+obj.name+'_enable']){
lib.init.eval(obj);
var cfg={};
@ -24734,12 +24751,11 @@
return players[0];
},
loadModeAsync:function(name,callback){
window.mode={};
var script=lib.init.js(lib.assetURL+'mode',name,function(){
script.remove();
var mode=window.mode;
delete window.mode;
callback(mode[name]);
var content=lib.imported.mode[name];
delete lib.imported.mode[name];
callback(content);
});
},
switchMode:function(name,configx){
@ -24753,11 +24769,9 @@
}
}
}
window.mode={};
var script=lib.init.js(lib.assetURL+'mode',name,function(){
script.remove();
var mode=window.mode;
delete window.mode;
var mode=lib.imported.mode;
_status.sourcemode=lib.config.mode;
lib.config.mode=name;
@ -24900,8 +24914,9 @@
}
game.createEvent('game',false).setContent(mode[lib.config.mode].start);
delete lib.imported.mode[name];
if(!game.db){
if(!lib.db){
try{
lib.storage=JSON.parse(localStorage.getItem(lib.configprefix+lib.config.mode));
if(typeof lib.storage!='object') throw('err');
@ -39921,7 +39936,6 @@
else lib.tempSortSeat=sort;
players.sort(lib.sort.seat);
delete lib.tempSortSeat;
lib.temp={};
}
}
if(dead) players=players.concat(game.dead);
@ -41284,10 +41298,11 @@
useful:function(card){
if(get.position(card)=='j') return -1;
if(get.position(card)=='e') return get.equipValue(card);
if(!lib.temp) lib.temp={};
if(lib.temp[card.name]==undefined) lib.temp[card.name]=[card];
else lib.temp[card.name].add(card);
var i=lib.temp[card.name].find(card);
var i=0;
if(_status.event.player){
i=_status.event.player.getCards('h',card.name).indexOf(card);
if(i<0) i=0;
}
var aii=get.info(card).ai;
var useful;
if(aii&&aii.useful) useful=aii.useful;
@ -41319,17 +41334,21 @@
else if(aii&&aii.basic) value=aii.basic.value;
if(value==undefined) return 0;
if(player==undefined||get.itemtype(player)!='player') player=_status.event.player;
if(typeof value=='function') return value(card,player);
var geti=function(){
var num=0,i;
var cards=player.getCards('h',card.name);
if(cards.contains(card)){
return cards.indexOf(card);
}
return cards.length;
};
if(typeof value=='function'){
return value(card,player,geti());
}
if(typeof value=='number') return value;
if(get.objtype(value)=='array'){
if(method=='raw') return value[0];
var num=0,i;
var cards=player.getCards('h');
for(i=0;i<cards.length;i++){
if(cards[i].name==card.name&&
cards[i]!=card&&
cards[i].classList.contains('selected')==false) num++;
}
var num=geti();
if(num<value.length) return value[num];
return value[value.length-1];
}
@ -41628,7 +41647,6 @@
}
return (j>0);
}
lib.temp={};
buttons=get.selectableButtons();
if(buttons.length==0){
return ok;
@ -41683,7 +41701,6 @@
}
return (j>0);
}
lib.temp={};
cards=get.selectableCards();
if(!_status.event.player._noSkill){
cards=cards.concat(get.skills());
@ -41753,7 +41770,6 @@
else if(range[1]==0){
return check()>0
}
lib.temp={};
targets=get.selectableTargets();
if(targets.length==0){
return ok;

View File

@ -1,71 +1,73 @@
character.pack={
standard:'标准',
shenhua:'神话再临',
refresh:'界限突破',
yijiang:'一将成名',
sp:'SP',
extra:'神将',
old:'怀旧',
diy:'DIY',
yxs:'英雄杀',
hearth:'炉石传说',
ow:'守望先锋',
swd:'轩辕剑',
gujian:'古剑奇谭',
xianjian:'仙剑',
gwent:'昆特牌',
window.noname_package={
character:{
standard:'标准',
shenhua:'神话再临',
refresh:'界限突破',
yijiang:'一将成名',
sp:'SP',
extra:'神将',
old:'怀旧',
diy:'DIY',
yxs:'英雄杀',
hearth:'炉石传说',
ow:'守望先锋',
swd:'轩辕剑',
gujian:'古剑奇谭',
xianjian:'仙剑',
gwent:'昆特牌',
},
card:{
standard:'标准',
extra:'军争',
sp:'SP',
guozhan:'国战',
zhenfa:'阵法',
yunchou:'运筹帷幄',
swd:'轩辕剑',
gujian:'古剑奇谭',
hearth:'炉石传说',
},
play:{
boss:'剑阁挑战',
cardpile:'牌堆补充',
wuxing:'五行生克',
coin:'富甲天下',
},
mode:{
identity:'身份',
guozhan:'国战',
versus:'对决',
connect:'联机',
boss:'挑战',
chess:'战棋',
tafang:'塔防',
stone:'炉石',
brawl:'乱斗',
},
background:{
ol_bg:'龙纹',
zhulin_bg:'竹林',
shengshi_bg:'盛世',
taoyuan_bg:'桃园',
zhanhuo_bg:'战火',
huangtian_bg:'黄天',
september_bg:'九月',
yinxiang_bg:'印象',
},
music:{
music_diaochan:'貂蝉',
music_shezhan:'舌战',
music_danji:'单骑',
},
font:{
xiaozhuan:'小篆',
xinwei:'新魏',
huangcao:'黄草',
lishu:'隶书',
},
theme:{
woodden:'木纹',
music:'音乐',
simple:'简约',
}
};
card.pack={
standard:'标准',
extra:'军争',
sp:'SP',
guozhan:'国战',
zhenfa:'阵法',
yunchou:'运筹帷幄',
swd:'轩辕剑',
gujian:'古剑奇谭',
hearth:'炉石传说',
};
play.pack={
boss:'剑阁挑战',
cardpile:'牌堆补充',
wuxing:'五行生克',
coin:'富甲天下',
};
mode.pack={
identity:'身份',
guozhan:'国战',
versus:'对决',
connect:'联机',
boss:'挑战',
chess:'战棋',
tafang:'塔防',
stone:'炉石',
brawl:'乱斗',
};
background.pack={
ol_bg:'龙纹',
zhulin_bg:'竹林',
shengshi_bg:'盛世',
taoyuan_bg:'桃园',
zhanhuo_bg:'战火',
huangtian_bg:'黄天',
september_bg:'九月',
yinxiang_bg:'印象',
};
music.pack={
music_diaochan:'貂蝉',
music_shezhan:'舌战',
music_danji:'单骑',
};
font.pack={
xiaozhuan:'小篆',
xinwei:'新魏',
huangcao:'黄草',
lishu:'隶书',
};
theme.pack={
woodden:'木纹',
music:'音乐',
simple:'简约',
}

View File

@ -1,5 +1,6 @@
'use strict';
mode.boss={
game.import('mode',{
name:'boss',
start:function(){
"step 0"
var playback=localStorage.getItem(lib.configprefix+'playback');
@ -4187,4 +4188,4 @@ mode.boss={
return (from.side===to.side?6:-6);
}
}
}
});

View File

@ -1,5 +1,6 @@
'use strict';
mode.brawl={
game.import('mode',{
name:'brawl',
game:{
syncMenu:true,
},
@ -2235,4 +2236,4 @@ mode.brawl={
}
}
},
};
});

View File

@ -1,5 +1,6 @@
'use strict';
mode.chess={
game.import('mode',{
name:'chess',
canvasUpdates2:[],
hiddenCharacters:[],
start:function(){
@ -2054,7 +2055,6 @@ mode.chess={
lib.rank.rarity.common.push(lib.rank.all[i]);
}
}
delete window.characterRank;
ui.control.style.transition='all 0s';
if(get.is.phoneLayout()){
@ -6020,4 +6020,4 @@ mode.chess={
'竞技场:<br>随机选择9名武将每次派出1~3名武将参战。战斗中阵亡的武将不能再次上场。<br><br>战斗后武将进入疲劳状态,若立即再次出场则初始体力值-1。<br><br>战斗中本方武将行动时可召唤后援,令一名未出场的已方武将加入战斗。后援武将在战斗结束后无论存活与否均不能再次出场<br><br>当取得12场胜利或所有武将全部阵亡后结束并根据胜场数获得随机奖励<li>'+
'修改金钱:<br>game.changeMoney<br>修改招募令:<br>game.changeDust</ul>'
},
}
});

View File

@ -1,5 +1,6 @@
'use strict';
mode.connect={
game.import('mode',{
name:'connect',
start:function(){
var directstartmode=lib.config.directstartmode;
ui.create.menu(true);
@ -138,4 +139,4 @@ mode.connect={
};
setTimeout(lib.init.onfree,1000);
}
};
});

View File

@ -1,5 +1,6 @@
'use strict';
mode.guozhan={
game.import('mode',{
name:'guozhan',
startBefore:function(){
var playback=localStorage.getItem(lib.configprefix+'playback');
for(var i in lib.characterPack.mode_guozhan){
@ -3625,4 +3626,4 @@ mode.guozhan={
return Math.min(0,Math.random()-0.5)+difficulty;
},
}
}
});

View File

@ -1,5 +1,6 @@
'use strict';
mode.identity={
game.import('mode',{
name:'identity',
start:function(){
"step 0"
if(!lib.config.new_tutorial){
@ -1940,4 +1941,4 @@ mode.identity={
'首先由亮出身份的忠臣玩家随机获得六张武将牌,挑选一名角色,并将选好的武将牌展示给其他玩家。之后其余每名玩家随机获得三张武将牌,各自从其中挑选一张同时亮出<li>'+
'亮出身份牌的忠臣增加1点体力上限。角色濒死和死亡的结算及胜利条件与普通身份局相同。',
}
}
});

View File

@ -1,9 +1,10 @@
'use strict';
mode.realtime={
game.import('mode',{
name:'realtime',
start:function(){
},
game:{
}
};
});

View File

@ -1,5 +1,6 @@
'use strict';
mode.stone={
game.import('mode',{
name:'stone',
start:function(){
"step 0"
lib.init.css(lib.assetURL+'layout/mode/','stone');
@ -10208,4 +10209,4 @@ mode.stone={
'<li>嘲讽:若一方阵营中有嘲讽角色,则同阵营的无嘲讽角色不以能成为杀目标'+
'<li>行动顺序为先主将后随从。主将或随从死亡后立即移出游戏主将死亡后替补登场替补登场时摸3+X张牌X为对方存活的随从数无替补时游戏结束'
}
}
});

View File

@ -1,5 +1,6 @@
'use strict';
mode.tafang={
game.import('mode',{
name:'tafang',
canvasUpdates2:[],
start:function(){
"step 0"
@ -1232,4 +1233,4 @@ mode.tafang={
'战场上最多出现3个相同的机关每个机关在置入战场3轮后消失。战场上最多招募5名友方角色。<li>'+
'敌方角色到达底部出口时游戏失败,已方角色到达底部出口,将被移出游戏',
},
}
});

View File

@ -1,5 +1,6 @@
'use strict';
mode.versus={
game.import('mode',{
name:'versus',
init:function(){
if(get.config('versus_mode')=='jiange'){
lib.characterPack.mode_versus={
@ -4804,4 +4805,4 @@ mode.versus={
'8号位游戏开始时额外摸一张牌7、8号位可在游戏开始时置换一次手牌<li>'+
'杀死对方忠臣摸2+x张牌x为对方含刚被杀的忠臣与己方的存活人数之差主公杀死己方忠臣须弃置所有牌',
}
}
});