This commit is contained in:
libccy 2017-04-15 08:25:50 +08:00
parent 388474f1c7
commit c99e2e7862
42 changed files with 104467 additions and 104119 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

1874
card/sp.js

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,442 +1,450 @@
'use strict';
game.import('card',{
name:'zhenfa',
card:{
pozhenjue:{
type:'zhenfa',
chongzhu:true,
enable:true,
filterTarget:true,
selectTarget:-1,
multitarget:true,
content:function(){
var n=targets.length;
while(n--){
game.swapSeat(targets.randomGet(),targets.randomGet());
}
},
mode:['guozhan'],
ai:{
order:8,
result:{
player:1,
game.import('card',function(){
var game=window.game;
var ui=window.ui;
var get=window.get;
var ai=window.ai;
var lib=window.lib;
var _status=window._status;
return {
name:'zhenfa',
card:{
pozhenjue:{
type:'zhenfa',
chongzhu:true,
enable:true,
filterTarget:true,
selectTarget:-1,
multitarget:true,
content:function(){
var n=targets.length;
while(n--){
game.swapSeat(targets.randomGet(),targets.randomGet());
}
},
}
},
changshezhen:{
type:'zhenfa',
chongzhu:true,
enable:function(card,player){
if(player.inline()) return true;
if(player.identity=='unknown'||player.identity=='ye') return false;
return game.hasPlayer(function(current){
return current!=player&&current.isFriendOf(player);
});
},
filterTarget:function(card,player,target){
if(player.inline()) return player.inline(target);
if(!player.getNext()) return false;
var list=game.filterPlayer(function(current){
return current!=player&&current.isFriendOf(player);
});
list.sort(function(a,b){
return get.distance(player,a,'absolute')-get.distance(player,b,'absolute');
});
return target==list[0];
},
selectTarget:-1,
multitarget:true,
multiline:true,
content:function(){
if(targets.length==1){
game.swapSeat(targets[0],game.me.getNext(),true,true);
mode:['guozhan'],
ai:{
order:8,
result:{
player:1,
},
}
else{
},
changshezhen:{
type:'zhenfa',
chongzhu:true,
enable:function(card,player){
if(player.inline()) return true;
if(player.identity=='unknown'||player.identity=='ye') return false;
return game.hasPlayer(function(current){
return current!=player&&current.isFriendOf(player);
});
},
filterTarget:function(card,player,target){
if(player.inline()) return player.inline(target);
if(!player.getNext()) return false;
var list=game.filterPlayer(function(current){
return current!=player&&current.isFriendOf(player);
});
list.sort(function(a,b){
return get.distance(player,a,'absolute')-get.distance(player,b,'absolute');
});
return target==list[0];
},
selectTarget:-1,
multitarget:true,
multiline:true,
content:function(){
if(targets.length==1){
game.swapSeat(targets[0],game.me.getNext(),true,true);
}
else{
game.asyncDraw(targets);
}
},
mode:['guozhan'],
ai:{
order:6.5,
result:{
target:1,
},
tag:{
draw:1
}
}
},
tianfuzhen:{
type:'zhenfa',
chongzhu:true,
enable:function(){
return game.hasPlayer(function(current){
return current.isMajor();
});
},
filterTarget:function(card,player,target){
return target.isMajor()&&target.countCards('he')>0;
},
selectTarget:-1,
content:function(){
target.chooseToDiscard('he',true);
},
mode:['guozhan'],
ai:{
order:7,
result:{
target:-1,
},
tag:{
discard:1
}
}
},
dizaizhen:{
type:'zhenfa',
chongzhu:true,
enable:function(){
return game.hasPlayer(function(current){
return current.isNotMajor();
});
},
multitarget:true,
multiline:true,
filterTarget:function(card,player,target){
return target.isNotMajor();
},
selectTarget:-1,
content:function(){
game.asyncDraw(targets);
}
},
mode:['guozhan'],
ai:{
order:6.5,
result:{
target:1,
},
tag:{
draw:1
}
}
},
tianfuzhen:{
type:'zhenfa',
chongzhu:true,
enable:function(){
return game.hasPlayer(function(current){
return current.isMajor();
});
},
filterTarget:function(card,player,target){
return target.isMajor()&&target.countCards('he')>0;
},
selectTarget:-1,
content:function(){
target.chooseToDiscard('he',true);
},
mode:['guozhan'],
ai:{
order:7,
result:{
target:-1,
},
tag:{
discard:1
}
}
},
dizaizhen:{
type:'zhenfa',
chongzhu:true,
enable:function(){
return game.hasPlayer(function(current){
return current.isNotMajor();
});
},
multitarget:true,
multiline:true,
filterTarget:function(card,player,target){
return target.isNotMajor();
},
selectTarget:-1,
content:function(){
game.asyncDraw(targets);
},
mode:['guozhan'],
ai:{
order:7,
result:{
target:1,
},
tag:{
draw:1
}
}
},
fengyangzhen:{
type:'zhenfa',
chongzhu:true,
enable:true,
filterTarget:function(card,player,target){
return target.sieged();
},
selectTarget:-1,
content:function(){
target.addTempSkill('feiying',{player:'damageAfter'});
target.popup('feiying');
game.log(target,'获得了技能','【飞影】');
},
mode:['guozhan'],
ai:{
order:7,
result:{
target:2,
},
}
},
yunchuizhen:{
type:'zhenfa',
chongzhu:true,
enable:true,
filterTarget:function(card,player,target){
return target.siege();
},
selectTarget:-1,
content:function(){
target.addTempSkill('wushuang',{source:'damageAfter'});
target.popup('wushuang');
game.log(target,'获得了技能','【无双】');
},
mode:['guozhan'],
ai:{
order:7,
result:{
target:2,
},
}
},
qixingzhen:{
type:'zhenfa',
chongzhu:true,
enable:function(card,player){
return player.siege()||player.sieged();
},
filterTarget:function(card,player,target){
return target==player;
},
selectTarget:-1,
content:function(){
'step 0'
event.targets=game.filterPlayer(function(current){
return current.siege(player);
});
'step 1'
if(event.targets.length){
var current=event.targets.shift();
player.line(current,'green');
player.discardPlayerCard(current,true);
event.redo();
}
'step 2'
var list=game.filterPlayer(function(current){
return current.sieged(player);
});
if(list.length){
player.useCard({name:'sha'},list,false);
}
},
mode:['guozhan'],
ai:{
order:7,
result:{
target:1,
},
}
},
shepanzhen:{
type:'zhenfa',
chongzhu:true,
enable:function(card,player){
if(player.identity=='unknown'||player.identity=='ye') return false;
if(get.population(player.identity)<=1) return false;
return game.hasPlayer(function(current){
return current!=player&&current.identity==player.identity&&!player.inline(current);
});
},
filterTarget:function(card,player,target){
return target.identity==player.identity;
},
multitarget:true,
selectTarget:-1,
content:function(){
targets.sortBySeat();
for(var i=1;i<targets.length;i++){
game.swapSeat(targets[i],targets[i-1].next,false);
}
game.log(get.translation(player.identity)+'势力角色摆成了蛇蟠阵')
},
mode:['guozhan'],
ai:{
order:7,
result:{
target:1,
},
}
},
longfeizhen:{
type:'zhenfa',
chongzhu:true,
enable:function(card,player){
return player.next.siege(player);
},
filterTarget:function(card,player,target){
if(target.getCards('he').length==0) return false;
return target==player.next||target==player.previous;
},
selectTarget:-1,
content:function(){
"step 0"
player.choosePlayerCard(target,'he',true);
"step 1"
target.discard(result.buttons[0].link);
"step 2"
if(target==targets[targets.length-1]){
player.draw();
}
},
mode:['guozhan'],
ai:{
order:10,
result:{
target:-1,
player:1
},
}
},
huyizhen:{
type:'zhenfa',
chongzhu:true,
enable:function(card,player){
return player.siege(player.next)||player.siege(player.previous);
},
filterTarget:function(card,player,target){
return player.siege(target);
},
selectTarget:-1,
content:function(){
"step 0"
player.chooseCard('将一张非基本牌当作杀对'+get.translation(target)+'使用','he',function(card){
return get.type(card)!='basic';
}).ai=function(card){
if(get.effect(target,{name:'sha'},player,player)>0){
return 6-get.value(card);
mode:['guozhan'],
ai:{
order:7,
result:{
target:1,
},
tag:{
draw:1
}
return 0;
};
"step 1"
if(result.bool){
player.useCard({name:'sha'},result.cards,target,false);
}
"step 2"
if(target==player.next) event.player2=player.next.next;
else event.player2=player.previous.previous;
event.player2.chooseCard('将一张非基本牌当作杀对'+get.translation(target)+'使用','he',function(card){
return get.type(card)!='basic';
}).ai=function(card){
if(get.effect(target,{name:'sha'},event.player2,event.player2)>0){
return 6-get.value(card);
},
fengyangzhen:{
type:'zhenfa',
chongzhu:true,
enable:true,
filterTarget:function(card,player,target){
return target.sieged();
},
selectTarget:-1,
content:function(){
target.addTempSkill('feiying',{player:'damageAfter'});
target.popup('feiying');
game.log(target,'获得了技能','【飞影】');
},
mode:['guozhan'],
ai:{
order:7,
result:{
target:2,
},
}
},
yunchuizhen:{
type:'zhenfa',
chongzhu:true,
enable:true,
filterTarget:function(card,player,target){
return target.siege();
},
selectTarget:-1,
content:function(){
target.addTempSkill('wushuang',{source:'damageAfter'});
target.popup('wushuang');
game.log(target,'获得了技能','【无双】');
},
mode:['guozhan'],
ai:{
order:7,
result:{
target:2,
},
}
},
qixingzhen:{
type:'zhenfa',
chongzhu:true,
enable:function(card,player){
return player.siege()||player.sieged();
},
filterTarget:function(card,player,target){
return target==player;
},
selectTarget:-1,
content:function(){
'step 0'
event.targets=game.filterPlayer(function(current){
return current.siege(player);
});
'step 1'
if(event.targets.length){
var current=event.targets.shift();
player.line(current,'green');
player.discardPlayerCard(current,true);
event.redo();
}
return 0;
};
"step 3"
if(result.bool){
event.player2.useCard({name:'sha'},result.cards,target,false);
'step 2'
var list=game.filterPlayer(function(current){
return current.sieged(player);
});
if(list.length){
player.useCard({name:'sha'},list,false);
}
},
mode:['guozhan'],
ai:{
order:7,
result:{
target:1,
},
}
},
mode:['guozhan'],
ai:{
order:7,
result:{
target:-2,
shepanzhen:{
type:'zhenfa',
chongzhu:true,
enable:function(card,player){
if(player.identity=='unknown'||player.identity=='ye') return false;
if(get.population(player.identity)<=1) return false;
return game.hasPlayer(function(current){
return current!=player&&current.identity==player.identity&&!player.inline(current);
});
},
}
filterTarget:function(card,player,target){
return target.identity==player.identity;
},
multitarget:true,
selectTarget:-1,
content:function(){
targets.sortBySeat();
for(var i=1;i<targets.length;i++){
game.swapSeat(targets[i],targets[i-1].next,false);
}
game.log(get.translation(player.identity)+'势力角色摆成了蛇蟠阵')
},
mode:['guozhan'],
ai:{
order:7,
result:{
target:1,
},
}
},
longfeizhen:{
type:'zhenfa',
chongzhu:true,
enable:function(card,player){
return player.next.siege(player);
},
filterTarget:function(card,player,target){
if(target.getCards('he').length==0) return false;
return target==player.next||target==player.previous;
},
selectTarget:-1,
content:function(){
"step 0"
player.choosePlayerCard(target,'he',true);
"step 1"
target.discard(result.buttons[0].link);
"step 2"
if(target==targets[targets.length-1]){
player.draw();
}
},
mode:['guozhan'],
ai:{
order:10,
result:{
target:-1,
player:1
},
}
},
huyizhen:{
type:'zhenfa',
chongzhu:true,
enable:function(card,player){
return player.siege(player.next)||player.siege(player.previous);
},
filterTarget:function(card,player,target){
return player.siege(target);
},
selectTarget:-1,
content:function(){
"step 0"
player.chooseCard('将一张非基本牌当作杀对'+get.translation(target)+'使用','he',function(card){
return get.type(card)!='basic';
}).ai=function(card){
if(get.effect(target,{name:'sha'},player,player)>0){
return 6-get.value(card);
}
return 0;
};
"step 1"
if(result.bool){
player.useCard({name:'sha'},result.cards,target,false);
}
"step 2"
if(target==player.next) event.player2=player.next.next;
else event.player2=player.previous.previous;
event.player2.chooseCard('将一张非基本牌当作杀对'+get.translation(target)+'使用','he',function(card){
return get.type(card)!='basic';
}).ai=function(card){
if(get.effect(target,{name:'sha'},event.player2,event.player2)>0){
return 6-get.value(card);
}
return 0;
};
"step 3"
if(result.bool){
event.player2.useCard({name:'sha'},result.cards,target,false);
}
},
mode:['guozhan'],
ai:{
order:7,
result:{
target:-2,
},
}
},
niaoxiangzhen:{
type:'zhenfa',
chongzhu:true,
enable:true,
filterTarget:function(card,player,target){
if(player.identity==target.identity) return false;
if(target.identity=='unknown'||target.identity=='ye') return false;
return target.identity==target.next.identity||target.identity==target.previous.identity
},
selectTarget:-1,
content:function(){
"step 0"
var next=target.chooseToRespond({name:'shan'});
next.ai=function(card){
if(get.damageEffect(target,player,target)>=0) return 0;
return 1;
};
next.autochoose=lib.filter.autoRespondShan;
"step 1"
if(result.bool==false){
target.damage();
}
},
ai:{
basic:{
order:9,
useful:1
},
result:{
target:-1.5,
},
tag:{
respond:1,
respondShan:1,
damage:1,
}
},
mode:['guozhan'],
},
},
niaoxiangzhen:{
type:'zhenfa',
chongzhu:true,
enable:true,
filterTarget:function(card,player,target){
if(player.identity==target.identity) return false;
if(target.identity=='unknown'||target.identity=='ye') return false;
return target.identity==target.next.identity||target.identity==target.previous.identity
},
selectTarget:-1,
content:function(){
"step 0"
var next=target.chooseToRespond({name:'shan'});
next.ai=function(card){
if(get.damageEffect(target,player,target)>=0) return 0;
return 1;
};
next.autochoose=lib.filter.autoRespondShan;
"step 1"
if(result.bool==false){
target.damage();
}
},
ai:{
basic:{
order:9,
useful:1
},
result:{
target:-1.5,
},
tag:{
respond:1,
respondShan:1,
damage:1,
}
},
mode:['guozhan'],
skill:{
},
},
skill:{
translate:{
zhenfa:'阵法',
changshezhen:'长蛇阵',
pozhenjue:'破阵决',
tianfuzhen:'天覆阵',
dizaizhen:'地载阵',
fengyangzhen:'风扬阵',
yunchuizhen:'云垂阵',
qixingzhen:'七星阵',
shepanzhen:'蛇蟠阵',
shepanzhen_bg:'列',
yunchuizhen_bg:'垂',
longfeizhen:'龙飞阵',
huyizhen:'虎翼阵',
niaoxiangzhen:'鸟翔阵',
niaoxiangzhen_info:'令所有非你阵营的队列的角色今次打出一张闪,或者受到一点伤害',
qixingzhen_info:'弃置所有围攻你的角色各一张牌,然后视为对所有你围攻的角色使用一张不计入出杀次数的杀',
// longfeizhen_info:'弃置围攻你的角色各一张牌,然后摸一张牌',
// qixingzhen_info:'令我方所有角色进入围攻状态',
// shepanzhen_info:'令我方所有角色进入队列状态',
// yunchuizhen_info:'令所有围攻角色获得技能【无双】,直到其首次造成伤害',
// fengyangzhen_info:'令所有被围攻角色获得技能【飞影】,直到其首次受到伤害',
dizaizhen_info:'所有小势力角色摸一张牌',
changshezhen_info:'若你处于队列中,与你同一队列的所有角色摸一张牌,否则将与你逆时针距离最近的同势力角色移至你下家',
// pozhenjue_info:'将所有角色的顺序随机重排',
tianfuzhen_info:'所有大势力角色弃置一张牌'
},
list:[
["diamond",1,'changshezhen'],
["club",1,'changshezhen'],
// ["spade",1,'changshezhen'],
// ["heart",1,'changshezhen'],
},
translate:{
zhenfa:'阵法',
changshezhen:'长蛇阵',
pozhenjue:'破阵决',
tianfuzhen:'天覆阵',
dizaizhen:'地载阵',
fengyangzhen:'风扬阵',
yunchuizhen:'云垂阵',
qixingzhen:'七星阵',
shepanzhen:'蛇蟠阵',
shepanzhen_bg:'列',
yunchuizhen_bg:'垂',
longfeizhen:'龙飞阵',
huyizhen:'虎翼阵',
niaoxiangzhen:'鸟翔阵',
niaoxiangzhen_info:'令所有非你阵营的队列的角色今次打出一张闪,或者受到一点伤害',
qixingzhen_info:'弃置所有围攻你的角色各一张牌,然后视为对所有你围攻的角色使用一张不计入出杀次数的杀',
// longfeizhen_info:'弃置围攻你的角色各一张牌,然后摸一张牌',
// qixingzhen_info:'令我方所有角色进入围攻状态',
// shepanzhen_info:'令我方所有角色进入队列状态',
// yunchuizhen_info:'令所有围攻角色获得技能【无双】,直到其首次造成伤害',
// fengyangzhen_info:'令所有被围攻角色获得技能【飞影】,直到其首次受到伤害',
dizaizhen_info:'所有小势力角色摸一张牌',
changshezhen_info:'若你处于队列中,与你同一队列的所有角色摸一张牌,否则将与你逆时针距离最近的同势力角色移至你下家',
// pozhenjue_info:'将所有角色的顺序随机重排',
tianfuzhen_info:'所有大势力角色弃置一张牌'
},
list:[
["diamond",1,'changshezhen'],
["club",1,'changshezhen'],
// ["spade",1,'changshezhen'],
// ["heart",1,'changshezhen'],
["diamond",2,'tianfuzhen'],
// ["club",2,'tianfuzhen'],
["spade",2,'tianfuzhen'],
["heart",2,'tianfuzhen'],
["diamond",2,'tianfuzhen'],
// ["club",2,'tianfuzhen'],
["spade",2,'tianfuzhen'],
["heart",2,'tianfuzhen'],
["diamond",3,'dizaizhen'],
// ["club",3,'dizaizhen'],
["spade",3,'dizaizhen'],
["heart",3,'dizaizhen'],
["diamond",3,'dizaizhen'],
// ["club",3,'dizaizhen'],
["spade",3,'dizaizhen'],
["heart",3,'dizaizhen'],
// ["diamond",4,'fengyangzhen'],
// ["club",4,'fengyangzhen'],
// ["spade",4,'fengyangzhen'],
// ["heart",4,'fengyangzhen'],
// ["diamond",4,'fengyangzhen'],
// ["club",4,'fengyangzhen'],
// ["spade",4,'fengyangzhen'],
// ["heart",4,'fengyangzhen'],
// ["diamond",5,'zhonghuangzhen'],
// ["club",5,'zhonghuangzhen'],
// ["spade",5,'zhonghuangzhen'],
// ["heart",5,'zhonghuangzhen'],
// ["diamond",5,'zhonghuangzhen'],
// ["club",5,'zhonghuangzhen'],
// ["spade",5,'zhonghuangzhen'],
// ["heart",5,'zhonghuangzhen'],
// ["diamond",6,'huyizhen'],
// ["club",6,'huyizhen'],
// ["spade",6,'huyizhen'],
// ["heart",6,'huyizhen'],
// ["diamond",6,'huyizhen'],
// ["club",6,'huyizhen'],
// ["spade",6,'huyizhen'],
// ["heart",6,'huyizhen'],
["diamond",7,'qixingzhen'],
["club",7,'qixingzhen'],
["spade",7,'qixingzhen'],
// ["heart",7,'qixingzhen'],
["diamond",7,'qixingzhen'],
["club",7,'qixingzhen'],
["spade",7,'qixingzhen'],
// ["heart",7,'qixingzhen'],
// ["diamond",8,'shepanzhen'],
// ["club",8,'shepanzhen'],
// ["spade",8,'shepanzhen'],
// ["heart",8,'shepanzhen'],
// ["diamond",8,'shepanzhen'],
// ["club",8,'shepanzhen'],
// ["spade",8,'shepanzhen'],
// ["heart",8,'shepanzhen'],
// ["diamond",9,'longfeizhen'],
// ["club",9,'longfeizhen'],
// ["spade",9,'longfeizhen'],
// ["heart",9,'longfeizhen'],
// ["diamond",9,'longfeizhen'],
// ["club",9,'longfeizhen'],
// ["spade",9,'longfeizhen'],
// ["heart",9,'longfeizhen'],
["diamond",11,'niaoxiangzhen'],
// ["club",11,'niaoxiangzhen'],
["spade",11,'niaoxiangzhen'],
["heart",11,'niaoxiangzhen'],
["diamond",11,'niaoxiangzhen'],
// ["club",11,'niaoxiangzhen'],
["spade",11,'niaoxiangzhen'],
["heart",11,'niaoxiangzhen'],
// ["diamond",12,'yunchuizhen'],
// ["club",12,'yunchuizhen'],
// ["spade",12,'yunchuizhen'],
// ["heart",12,'yunchuizhen'],
// ["diamond",12,'yunchuizhen'],
// ["club",12,'yunchuizhen'],
// ["spade",12,'yunchuizhen'],
// ["heart",12,'yunchuizhen'],
// ["diamond",13,'pozhenjue'],
// ["club",13,'pozhenjue'],
// ["spade",13,'pozhenjue'],
//["heart",13,'pozhenjue'],
],
// ["diamond",13,'pozhenjue'],
// ["club",13,'pozhenjue'],
// ["spade",13,'pozhenjue'],
//["heart",13,'pozhenjue'],
],
};
});

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,375 +1,383 @@
'use strict';
game.import('character',{
name:'old',
character:{
zhangjiao:['male','qun',3,['leiji','guidao','huangtian'],['zhu']],
masu:['male','shu',3,['xinzhan','huilei']],
xushu:['male','shu',3,['wuyan','jujian']],
fazheng:['male','shu',3,['enyuan','xuanhuo']],
liru:['male','qun',3,['juece','mieji','fencheng']],
yujin:['male','wei',4,['yizhong']],
lusu:['male','wu',3,['haoshi','dimeng']],
yuanshao:['male','qun',4,['luanji','xueyi'],['zhu']],
old_zhonghui:['male','wei',3,['zzhenggong','zquanji','zbaijiang']],
old_xusheng:['male','wu',4,['pojun']],
old_zhuran:['male','wu',4,['olddanshou']],
old_lingtong:['male','wu',4,['oldxuanfeng']],
old_madai:['male','shu',4,['mashu','oldqianxi']],
old_caoxiu:['male','wei',4,['taoxi']],
old_huaxiong:['male','qun',6,['shiyong']],
old_wangyi:['female','wei',3,['oldzhenlie','oldmiji']],
old_caozhen:['male','wei',4,['sidi']],
old_quancong:['male','wu',4,['zhenshan']],
old_yuanshu:['male','qun',4,['yongsi','weidi']],
},
skill:{
zhenshan:{
trigger:{player:'chooseToRespondBegin'},
filter:function(event,player){
if(event.responded) return false;
if(!event.filterCard({name:'shan'},player,event)&&!!event.filterCard({name:'sha'},player,event)) return false;
if(player.hasSkill('zhenshan2')) return false;
var nh=player.countCards('h');
return game.hasPlayer(function(current){
return current!=player&&current.countCards('h')<nh;
});
game.import('character',function(){
var game=window.game;
var ui=window.ui;
var get=window.get;
var ai=window.ai;
var lib=window.lib;
var _status=window._status;
return {
name:'old',
character:{
zhangjiao:['male','qun',3,['leiji','guidao','huangtian'],['zhu']],
masu:['male','shu',3,['xinzhan','huilei']],
xushu:['male','shu',3,['wuyan','jujian']],
fazheng:['male','shu',3,['enyuan','xuanhuo']],
liru:['male','qun',3,['juece','mieji','fencheng']],
yujin:['male','wei',4,['yizhong']],
lusu:['male','wu',3,['haoshi','dimeng']],
yuanshao:['male','qun',4,['luanji','xueyi'],['zhu']],
old_zhonghui:['male','wei',3,['zzhenggong','zquanji','zbaijiang']],
old_xusheng:['male','wu',4,['pojun']],
old_zhuran:['male','wu',4,['olddanshou']],
old_lingtong:['male','wu',4,['oldxuanfeng']],
old_madai:['male','shu',4,['mashu','oldqianxi']],
old_caoxiu:['male','wei',4,['taoxi']],
old_huaxiong:['male','qun',6,['shiyong']],
old_wangyi:['female','wei',3,['oldzhenlie','oldmiji']],
old_caozhen:['male','wei',4,['sidi']],
old_quancong:['male','wu',4,['zhenshan']],
old_yuanshu:['male','qun',4,['yongsi','weidi']],
},
skill:{
zhenshan:{
trigger:{player:'chooseToRespondBegin'},
filter:function(event,player){
if(event.responded) return false;
if(!event.filterCard({name:'shan'},player,event)&&!!event.filterCard({name:'sha'},player,event)) return false;
if(player.hasSkill('zhenshan2')) return false;
var nh=player.countCards('h');
return game.hasPlayer(function(current){
return current!=player&&current.countCards('h')<nh;
});
},
direct:true,
content:function(){
"step 0"
player.chooseTarget(get.prompt('zhenshan'),function(card,player,target){
return target.countCards('h')<player.countCards('h');
}).set('ai',function(target){
return get.attitude(player,target)
});
"step 1"
if(result.bool){
trigger.untrigger();
trigger.responded=true;
if(trigger.filterCard({name:'shan'})){
trigger.result={bool:true,card:{name:'shan'}}
}
else{
trigger.result={bool:true,card:{name:'sha'}}
}
player.logSkill('zhenshan',result.targets);
player.addTempSkill('zhenshan2','phaseAfter');
player.swapHandcards(result.targets[0]);
}
},
group:'zhenshan_use'
},
direct:true,
content:function(){
"step 0"
player.chooseTarget(get.prompt('zhenshan'),function(card,player,target){
return target.countCards('h')<player.countCards('h');
}).set('ai',function(target){
return get.attitude(player,target)
});
"step 1"
if(result.bool){
trigger.untrigger();
trigger.responded=true;
if(trigger.filterCard({name:'shan'})){
trigger.result={bool:true,card:{name:'shan'}}
}
else{
trigger.result={bool:true,card:{name:'sha'}}
}
player.logSkill('zhenshan',result.targets);
player.addTempSkill('zhenshan2','phaseAfter');
player.swapHandcards(result.targets[0]);
zhenshan2:{},
zhenshan_use:{
enable:'chooseToUse',
filter:function(event,player){
if(player.hasSkill('zhenshan2')) return false;
var nh=player.countCards('h');
if(!game.hasPlayer(function(current){
return current!=player&&current.countCards('h')<nh;
})){
return false;
}
return event.filterCard({name:'sha'},player,event)||
event.filterCard({name:'jiu'},player,event)||
event.filterCard({name:'tao'},player,event);
},
chooseButton:{
dialog:function(event,player){
var list=[];
if(event.filterCard({name:'sha'},player,event)){
list.push(['基本','','sha']);
list.push(['基本','','sha','fire']);
list.push(['基本','','sha','thunder']);
}
if(event.filterCard({name:'tao'},player,event)){
list.push(['基本','','tao']);
}
if(event.filterCard({name:'jiu'},player,event)){
list.push(['基本','','jiu']);
}
return ui.create.dialog('振赡',[list,'vcard'],'hidden');
},
check:function(button){
var player=_status.event.player;
var card={name:button.link[2],nature:button.link[3]};
if(card.name=='jiu') return 0;
if(game.hasPlayer(function(current){
return player.canUse(card,current)&&get.effect(current,card,player,player)>0;
})){
if(card.name=='sha'){
if(card.nature=='fire') return 2.95;
else if(card.nature=='fire') return 2.92;
else return 2.9;
}
else if(card.name=='tao'){
return 4;
}
}
return 0;
},
backup:function(links,player){
return {
filterCard:function(){return false},
viewAs:{name:links[0][2],nature:links[0][3]},
selectCard:-1,
popname:true,
log:false,
precontent:function(){
'step 0'
player.chooseTarget('选择交换手牌的目标',function(card,player,target){
return target.countCards('h')<player.countCards('h')
},true).ai=function(target){
return get.attitude(player,target);
}
player.addTempSkill('zhenshan2','phaseAfter');
'step 1'
if(result.bool){
player.logSkill('zhenshan',result.targets);
player.swapHandcards(result.targets[0]);
}
},
}
},
prompt:function(links,player){
return '选择'+get.translation(links[0][3]||'')+get.translation(links[0][2])+'的目标';
}
},
ai:{
order:function(){
var player=_status.event.player;
var event=_status.event;
var nh=player.countCards('h');
if(game.hasPlayer(function(current){
return get.attitude(player,current)>0&&current.countCards('h')<nh;
})){
if(event.type=='dying'){
if(event.filterCard({name:'tao'},player,event)){
return 0.5;
}
}
else{
if(event.filterCard({name:'tao'},player,event)){
return 4;
}
if(event.filterCard({name:'sha'},player,event)){
return 2.9;
}
}
}
return 0;
},
save:true,
respondSha:true,
skillTagFilter:function(player,tag,arg){
if(player.hasSkill('zhenshan2')) return false;
var nh=player.countCards('h');
return game.hasPlayer(function(current){
return current!=player&&current.countCards('h')<nh;
});
},
result:{
player:1
}
}
},
group:'zhenshan_use'
},
zhenshan2:{},
zhenshan_use:{
enable:'chooseToUse',
filter:function(event,player){
if(player.hasSkill('zhenshan2')) return false;
var nh=player.countCards('h');
if(!game.hasPlayer(function(current){
return current!=player&&current.countCards('h')<nh;
})){
return false;
}
return event.filterCard({name:'sha'},player,event)||
event.filterCard({name:'jiu'},player,event)||
event.filterCard({name:'tao'},player,event);
oldzhenlie:{
audio:'zhenlie',
trigger:{player:'judge'},
check:function(event,player){
return event.judge(player.judging[0])<0;
},
content:function(){
var card=get.cards()[0];
player.$throw(card);
card.clone.classList.add('thrownhighlight');
if(trigger.player.judging[0].clone){
trigger.player.judging[0].clone.classList.remove('thrownhighlight');
game.addVideo('deletenode',player,get.cardsInfo([trigger.player.judging[0].clone]));
}
ui.discardPile.appendChild(trigger.player.judging[0]);
trigger.player.judging[0]=card;
trigger.position.appendChild(card);
game.log(trigger.player,'的判定牌改为',card);
game.delay(2);
},
},
chooseButton:{
dialog:function(event,player){
var list=[];
if(event.filterCard({name:'sha'},player,event)){
list.push(['基本','','sha']);
list.push(['基本','','sha','fire']);
list.push(['基本','','sha','thunder']);
}
if(event.filterCard({name:'tao'},player,event)){
list.push(['基本','','tao']);
}
if(event.filterCard({name:'jiu'},player,event)){
list.push(['基本','','jiu']);
}
return ui.create.dialog('振赡',[list,'vcard'],'hidden');
oldmiji:{
trigger:{player:['phaseBegin','phaseEnd']},
filter:function(event,player){
return player.isDamaged();
},
content:function(){
'step 0'
player.judge(function(card){
return get.color(card)=='black'?1:-1;
});
'step 1'
if(result.bool&&player.maxHp>player.hp){
var cards=get.cards(player.maxHp-player.hp);
event.cards=cards;
var dialog=ui.create.dialog('选择获得卡牌的目标',cards,'hidden');
dialog.classList.add('noselect');
player.chooseTarget(true,dialog).ai=function(target){
return get.attitude(player,target)/Math.sqrt(1+target.countCards('h'));
}
}
else{
event.finish();
}
'step 2'
player.line(result.targets);
result.targets[0].gain(event.cards,'draw');
},
ai:{
effect:{
target:function(card,player,target){
if(get.tag(card,'recover')&&target.hp==target.maxHp-1) return [0,0];
if(target.hasFriend()){
if((get.tag(card,'damage')==1||get.tag(card,'loseHp'))&&target.hp==target.maxHp) return [0,1];
}
}
},
threaten:function(player,target){
if(target.hp==1) return 3;
if(target.hp==2) return 2;
return 1;
},
}
},
shiyong:{
audio:2,
trigger:{player:'damageEnd'},
forced:true,
check:function(){
return false;
},
filter:function(event,player){
return event.card&&event.card.name=='sha'&&(get.color(event.card)=='red'||event.player.hasSkill('jiu'));
},
content:function(){
player.loseMaxHp();
}
},
oldqianxi:{
trigger:{source:'damageBefore'},
check:function(event,player){
var att=get.attitude(player,event.player);
if(event.player.hp==event.player.maxHp) return att<0;
if(event.player.hp==event.player.maxHp-1&&
(event.player.maxHp<=3||event.player.hasSkillTag('maixie'))) return att<0;
return att>0;
},
filter:function(event,player){
return event.card&&event.card.name=='sha'&&get.distance(player,event.player)<=1;
},
logTarget:'player',
content:function(){
'step 0'
player.judge(function(card){
return get.suit(card)!='heart'?1:-1;
});
'step 1'
if(result.bool){
trigger.untrigger();
trigger.finish();
trigger.player.loseMaxHp(true);
}
}
},
oldxuanfeng:{
audio:'xuanfeng',
trigger:{player:'loseEnd'},
direct:true,
filter:function(event,player){
for(var i=0;i<event.cards.length;i++){
if(event.cards[i].original=='e') return true;
}
return false;
},
check:function(button){
var player=_status.event.player;
var card={name:button.link[2],nature:button.link[3]};
if(card.name=='jiu') return 0;
if(game.hasPlayer(function(current){
return player.canUse(card,current)&&get.effect(current,card,player,player)>0;
})){
if(card.name=='sha'){
if(card.nature=='fire') return 2.95;
else if(card.nature=='fire') return 2.92;
else return 2.9;
}
else if(card.name=='tao'){
return 4;
}
content:function(){
"step 0"
player.chooseTarget(get.prompt('xuanfeng'),function(card,player,target){
if(target==player) return false;
return get.distance(player,target)<=1||player.canUse('sha',target,false);
}).set('ai',function(target){
if(get.distance(player,target)<=1){
return get.damageEffect(target,player,player)*2;
}
else{
return get.effect(target,{name:'sha'},player,player);
}
});
"step 1"
if(result.bool){
player.logSkill('xuanfeng',result.targets);
var target=result.targets[0];
var distance=get.distance(player,target);
if(distance<=1&&player.canUse('sha',target,false)){
player.chooseControl('出杀','造成伤害').ai=function(){
return '造成伤害';
}
event.target=target;
}
else if(distance<=1){
target.damage();
event.finish();
}
else{
player.useCard({name:'sha'},target,false).animate=false;
game.delay();
event.finish();
}
}
return 0;
},
backup:function(links,player){
return {
filterCard:function(){return false},
viewAs:{name:links[0][2],nature:links[0][3]},
selectCard:-1,
popname:true,
log:false,
precontent:function(){
'step 0'
player.chooseTarget('选择交换手牌的目标',function(card,player,target){
return target.countCards('h')<player.countCards('h')
},true).ai=function(target){
return get.attitude(player,target);
}
player.addTempSkill('zhenshan2','phaseAfter');
'step 1'
if(result.bool){
player.logSkill('zhenshan',result.targets);
player.swapHandcards(result.targets[0]);
}
},
else{
event.finish();
}
"step 2"
var target=event.target;
if(result.control=='出杀'){
player.useCard({name:'sha'},target,false).animate=false;
game.delay();
}
else{
target.damage();
}
},
prompt:function(links,player){
return '选择'+get.translation(links[0][3]||'')+get.translation(links[0][2])+'的目标';
ai:{
effect:{
target:function(card,player,target,current){
if(get.type(card)=='equip') return [1,3];
}
},
noe:true
}
},
ai:{
order:function(){
var player=_status.event.player;
var event=_status.event;
var nh=player.countCards('h');
if(game.hasPlayer(function(current){
return get.attitude(player,current)>0&&current.countCards('h')<nh;
})){
if(event.type=='dying'){
if(event.filterCard({name:'tao'},player,event)){
return 0.5;
}
}
else{
if(event.filterCard({name:'tao'},player,event)){
return 4;
}
if(event.filterCard({name:'sha'},player,event)){
return 2.9;
}
}
}
return 0;
},
save:true,
respondSha:true,
skillTagFilter:function(player,tag,arg){
if(player.hasSkill('zhenshan2')) return false;
var nh=player.countCards('h');
return game.hasPlayer(function(current){
return current!=player&&current.countCards('h')<nh;
});
},
result:{
player:1
}
}
},
oldzhenlie:{
audio:'zhenlie',
trigger:{player:'judge'},
check:function(event,player){
return event.judge(player.judging[0])<0;
},
content:function(){
var card=get.cards()[0];
player.$throw(card);
card.clone.classList.add('thrownhighlight');
if(trigger.player.judging[0].clone){
trigger.player.judging[0].clone.classList.remove('thrownhighlight');
game.addVideo('deletenode',player,get.cardsInfo([trigger.player.judging[0].clone]));
}
ui.discardPile.appendChild(trigger.player.judging[0]);
trigger.player.judging[0]=card;
trigger.position.appendChild(card);
game.log(trigger.player,'的判定牌改为',card);
game.delay(2);
},
},
oldmiji:{
trigger:{player:['phaseBegin','phaseEnd']},
filter:function(event,player){
return player.isDamaged();
},
content:function(){
'step 0'
player.judge(function(card){
return get.color(card)=='black'?1:-1;
});
'step 1'
if(result.bool&&player.maxHp>player.hp){
var cards=get.cards(player.maxHp-player.hp);
event.cards=cards;
var dialog=ui.create.dialog('选择获得卡牌的目标',cards,'hidden');
dialog.classList.add('noselect');
player.chooseTarget(true,dialog).ai=function(target){
return get.attitude(player,target)/Math.sqrt(1+target.countCards('h'));
}
}
else{
event.finish();
}
'step 2'
player.line(result.targets);
result.targets[0].gain(event.cards,'draw');
},
ai:{
effect:{
target:function(card,player,target){
if(get.tag(card,'recover')&&target.hp==target.maxHp-1) return [0,0];
if(target.hasFriend()){
if((get.tag(card,'damage')==1||get.tag(card,'loseHp'))&&target.hp==target.maxHp) return [0,1];
}
}
},
threaten:function(player,target){
if(target.hp==1) return 3;
if(target.hp==2) return 2;
return 1;
},
}
},
shiyong:{
audio:2,
trigger:{player:'damageEnd'},
forced:true,
check:function(){
return false;
},
filter:function(event,player){
return event.card&&event.card.name=='sha'&&(get.color(event.card)=='red'||event.player.hasSkill('jiu'));
},
content:function(){
player.loseMaxHp();
}
},
oldqianxi:{
trigger:{source:'damageBefore'},
check:function(event,player){
var att=get.attitude(player,event.player);
if(event.player.hp==event.player.maxHp) return att<0;
if(event.player.hp==event.player.maxHp-1&&
(event.player.maxHp<=3||event.player.hasSkillTag('maixie'))) return att<0;
return att>0;
},
filter:function(event,player){
return event.card&&event.card.name=='sha'&&get.distance(player,event.player)<=1;
},
logTarget:'player',
content:function(){
'step 0'
player.judge(function(card){
return get.suit(card)!='heart'?1:-1;
});
'step 1'
if(result.bool){
trigger.untrigger();
trigger.finish();
trigger.player.loseMaxHp(true);
}
}
},
oldxuanfeng:{
audio:'xuanfeng',
trigger:{player:'loseEnd'},
direct:true,
filter:function(event,player){
for(var i=0;i<event.cards.length;i++){
if(event.cards[i].original=='e') return true;
}
return false;
},
content:function(){
"step 0"
player.chooseTarget(get.prompt('xuanfeng'),function(card,player,target){
if(target==player) return false;
return get.distance(player,target)<=1||player.canUse('sha',target,false);
}).set('ai',function(target){
if(get.distance(player,target)<=1){
return get.damageEffect(target,player,player)*2;
}
else{
return get.effect(target,{name:'sha'},player,player);
}
});
"step 1"
if(result.bool){
player.logSkill('xuanfeng',result.targets);
var target=result.targets[0];
var distance=get.distance(player,target);
if(distance<=1&&player.canUse('sha',target,false)){
player.chooseControl('出杀','造成伤害').ai=function(){
return '造成伤害';
}
event.target=target;
}
else if(distance<=1){
target.damage();
event.finish();
}
else{
player.useCard({name:'sha'},target,false).animate=false;
game.delay();
event.finish();
}
}
else{
event.finish();
}
"step 2"
var target=event.target;
if(result.control=='出杀'){
player.useCard({name:'sha'},target,false).animate=false;
game.delay();
}
else{
target.damage();
}
},
ai:{
effect:{
target:function(card,player,target,current){
if(get.type(card)=='equip') return [1,3];
}
},
noe:true
}
},
},
translate:{
old_yuanshu:'旧袁术',
old_xusheng:'旧徐盛',
old_lingtong:'旧凌统',
old_zhuran:'旧朱然',
old_madai:'旧马岱',
old_caoxiu:'旧曹休',
old_huaxiong:'旧华雄',
old_wangyi:'旧王异',
old_caozhen:'旧曹真',
old_quancong:'旧全琮',
},
translate:{
old_yuanshu:'旧袁术',
old_xusheng:'旧徐盛',
old_lingtong:'旧凌统',
old_zhuran:'旧朱然',
old_madai:'旧马岱',
old_caoxiu:'旧曹休',
old_huaxiong:'旧华雄',
old_wangyi:'旧王异',
old_caozhen:'旧曹真',
old_quancong:'旧全琮',
zhenshan:'振赡',
zhenshan_use:'振赡',
zhenshan_use_backup:'振赡',
zhenshan_info:'每名角色的回合限一次,每当你需要使用或打出一张基本牌时,你可以与一名手牌数少于你的角色交换手牌。若如此做,视为你使用或打出了此牌',
zhenshan_use_info:'每名角色的回合限一次,每当你需要使用或打出一张基本牌时,你可以与一名手牌数少于你的角色交换手牌。若如此做,视为你使用或打出了此牌',
oldzhenlie:'贞烈',
oldzhenlie_info:'在你的判定牌生效前,你可以亮出牌堆顶的一张牌代替之',
oldmiji:'秘计',
oldmiji_info:'准备/结束阶段开始时若你已受伤你可以判定若判定结果为黑色你观看牌堆顶的X张牌X为你已损失的体力值然后将这些牌交给一名角色',
shiyong:'恃勇',
shiyong_info:'锁定技当你受到一次红色【杀】或【酒】【杀】造成的伤害后须减1点体力上限',
oldqianxi:'潜袭',
oldqianxi_info:'当你使用【杀】对距离为1的目标角色造成伤害时你可以进行一次判定若判定结果不为红桃你防止此伤害令其减1点体力上限',
oldxuanfeng:'旋风',
oldxuanfeng_info:'每当你失去一次装备区里的牌时你可以执行下列两项中的一项1.视为对任意一名其他角色使用一张【杀】此【杀】不计入每回合的使用限制2.对与你距离1以内的一名其他角色造成一点伤害',
}
zhenshan:'振赡',
zhenshan_use:'振赡',
zhenshan_use_backup:'振赡',
zhenshan_info:'每名角色的回合限一次,每当你需要使用或打出一张基本牌时,你可以与一名手牌数少于你的角色交换手牌。若如此做,视为你使用或打出了此牌',
zhenshan_use_info:'每名角色的回合限一次,每当你需要使用或打出一张基本牌时,你可以与一名手牌数少于你的角色交换手牌。若如此做,视为你使用或打出了此牌',
oldzhenlie:'贞烈',
oldzhenlie_info:'在你的判定牌生效前,你可以亮出牌堆顶的一张牌代替之',
oldmiji:'秘计',
oldmiji_info:'准备/结束阶段开始时若你已受伤你可以判定若判定结果为黑色你观看牌堆顶的X张牌X为你已损失的体力值然后将这些牌交给一名角色',
shiyong:'恃勇',
shiyong_info:'锁定技当你受到一次红色【杀】或【酒】【杀】造成的伤害后须减1点体力上限',
oldqianxi:'潜袭',
oldqianxi_info:'当你使用【杀】对距离为1的目标角色造成伤害时你可以进行一次判定若判定结果不为红桃你防止此伤害令其减1点体力上限',
oldxuanfeng:'旋风',
oldxuanfeng_info:'每当你失去一次装备区里的牌时你可以执行下列两项中的一项1.视为对任意一名其他角色使用一张【杀】此【杀】不计入每回合的使用限制2.对与你距离1以内的一名其他角色造成一点伤害',
}
};
});

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,122 +1,130 @@
'use strict';
game.import('character',{
name:'xiake',
character:{
// xk_dongfangweiming:['male','shu',4,[]],
xk_guyuexuan:['male','qun',4,['rouquan','gzhenji']],
xk_jinji:['male','shu',4,['zhongzhan','lianpo']],
// xk_shenxiangyun:['female','wei',3,['zhenjiu']],
xk_fujianhan:['male','qun',4,['zuijian','zitong']],
},
skill:{
zhongzhan:{
trigger:{source:'damageBegin'},
logTarget:'player',
check:function(event,player){
if(get.damageEffect(event.player,player,player)>0&&
get.attitude(player,event.player)<0){
return player.hp>event.player.hp&&player.hp>=2;
}
return false;
},
content:function(){
player.loseHp();
trigger.num++;
}
},
rouquan:{
mod:{
selectTarget:function(card,player,range){
if(card.name=='sha'&&!player.getEquip(1)&&range[1]!=-1) range[1]=Infinity;
}
},
enable:'phaseUse',
position:'e',
filter:function(event,player){
return player.countCards('e')>0;
},
filterCard:true,
prompt:'将要重铸的牌置入弃牌堆并摸一张牌',
discard:false,
delay:0.5,
check:function(card,player){
var val=get.equipValue(card);
var player=_status.event.player;
var cards=player.getCards('h',{subtype:get.subtype(card)});
for(var i=0;i<cards.length;i++){
if(get.equipValue(cards[i])>=val){
return 1;
}
}
return 0;
},
prepare:function(cards,player){
player.$throw(cards,1000);
},
content:function(){
"step 0"
player.draw();
"step 1"
for(var i=0;i<cards.length;i++){
ui.discardPile.appendChild(cards[i]);
}
},
ai:{
order:9.5,
result:{
player:1
}
}
},
gzhenji:{
trigger:{source:'damageEnd'},
frequent:true,
filter:function(event,player){
return _status.currentPhase==player&&event.card&&event.card.name=='sha';
},
content:function(){
player.draw();
player.addTempSkill('gzhenji3','phaseAfter');
}
},
gzhenji3:{
mod:{
cardUsable:function(card,player,num){
if(card.name=='sha') return num+1;
}
},
},
zitong:{
trigger:{player:'useCard'},
frequent:true,
filter:function(event,player){
return _status.currentPhase==player&&get.cardCount(true,player)==3;
},
content:function(){
var card=get.cardPile('chuansongmen');
if(!card){
card=game.createCard('chuansongmen');
}
player.gain(card,'gain2');
},
ai:{
threaten:1.2
}
}
},
translate:{
xk_dongfangweiming:'东方未明',
xk_guyuexuan:'谷月轩',
xk_jinji:'荆棘',
xk_shenxiangyun:'沈湘芸',
xk_fujianhan:'傅剑寒',
zhongzhan:'重斩',
zhongzhan_info:'每当你即将造成伤害,你可流失一点体力令伤害+1',
gzhenji:'震击',
gzhenji_info:'你使用杀造成伤害后,可以摸一张牌,并且本回合内可以额外使用一张杀',
rouquan:'柔拳',
rouquan_info:'你可以重铸装备区内的牌;当你没有武器牌时,你的杀可以指定任意个目标',
zitong:'通悟',
zitong_info:'当你于自己的回合内使用第三张牌时,你可以将一张传送门置于你的手牌',
},
game.import('character',function(){
var game=window.game;
var ui=window.ui;
var get=window.get;
var ai=window.ai;
var lib=window.lib;
var _status=window._status;
return {
name:'xiake',
character:{
// xk_dongfangweiming:['male','shu',4,[]],
xk_guyuexuan:['male','qun',4,['rouquan','gzhenji']],
xk_jinji:['male','shu',4,['zhongzhan','lianpo']],
// xk_shenxiangyun:['female','wei',3,['zhenjiu']],
xk_fujianhan:['male','qun',4,['zuijian','zitong']],
},
skill:{
zhongzhan:{
trigger:{source:'damageBegin'},
logTarget:'player',
check:function(event,player){
if(get.damageEffect(event.player,player,player)>0&&
get.attitude(player,event.player)<0){
return player.hp>event.player.hp&&player.hp>=2;
}
return false;
},
content:function(){
player.loseHp();
trigger.num++;
}
},
rouquan:{
mod:{
selectTarget:function(card,player,range){
if(card.name=='sha'&&!player.getEquip(1)&&range[1]!=-1) range[1]=Infinity;
}
},
enable:'phaseUse',
position:'e',
filter:function(event,player){
return player.countCards('e')>0;
},
filterCard:true,
prompt:'将要重铸的牌置入弃牌堆并摸一张牌',
discard:false,
delay:0.5,
check:function(card,player){
var val=get.equipValue(card);
var player=_status.event.player;
var cards=player.getCards('h',{subtype:get.subtype(card)});
for(var i=0;i<cards.length;i++){
if(get.equipValue(cards[i])>=val){
return 1;
}
}
return 0;
},
prepare:function(cards,player){
player.$throw(cards,1000);
},
content:function(){
"step 0"
player.draw();
"step 1"
for(var i=0;i<cards.length;i++){
ui.discardPile.appendChild(cards[i]);
}
},
ai:{
order:9.5,
result:{
player:1
}
}
},
gzhenji:{
trigger:{source:'damageEnd'},
frequent:true,
filter:function(event,player){
return _status.currentPhase==player&&event.card&&event.card.name=='sha';
},
content:function(){
player.draw();
player.addTempSkill('gzhenji3','phaseAfter');
}
},
gzhenji3:{
mod:{
cardUsable:function(card,player,num){
if(card.name=='sha') return num+1;
}
},
},
zitong:{
trigger:{player:'useCard'},
frequent:true,
filter:function(event,player){
return _status.currentPhase==player&&get.cardCount(true,player)==3;
},
content:function(){
var card=get.cardPile('chuansongmen');
if(!card){
card=game.createCard('chuansongmen');
}
player.gain(card,'gain2');
},
ai:{
threaten:1.2
}
}
},
translate:{
xk_dongfangweiming:'东方未明',
xk_guyuexuan:'谷月轩',
xk_jinji:'荆棘',
xk_shenxiangyun:'沈湘芸',
xk_fujianhan:'傅剑寒',
zhongzhan:'重斩',
zhongzhan_info:'每当你即将造成伤害,你可流失一点体力令伤害+1',
gzhenji:'震击',
gzhenji_info:'你使用杀造成伤害后,可以摸一张牌,并且本回合内可以额外使用一张杀',
rouquan:'柔拳',
rouquan_info:'你可以重铸装备区内的牌;当你没有武器牌时,你的杀可以指定任意个目标',
zitong:'通悟',
zitong_info:'当你于自己的回合内使用第三张牌时,你可以将一张传送门置于你的手牌',
},
};
});

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,341 +1,349 @@
'use strict';
game.import('character',{
name:'zhuogui',
character:{
nianshou:['male','shu',4,['nianrui','qixiang']],
mamian:['male','qun',4,['lianyu','guiji']],
niutou:['male','shu',4,['manjia','xiaoshou']],
baiwuchang:['male','qun',3,['qiangzheng','moukui']],
heiwuchang:['male','qun',3,['suoling','xixing']],
},
skill:{
qixiang:{
group:['qixiang1','qixiang2'],
ai:{
effect:{
target:function(card,player,target,current){
if(card.name=='lebu'&&card.name=='bingliang') return 0.8;
}
}
}
},
qixiang1:{
trigger:{player:'judge'},
forced:true,
filter:function(event,player){
if(event.card){
if(event.card.viewAs){
return event.card.viewAs=='lebu';
}
else{
return event.card.name=='lebu';
}
}
},
content:function(){
player.addTempSkill('qixiang3','phaseJudgeAfter');
}
},
qixiang2:{
trigger:{player:'judge'},
forced:true,
filter:function(event,player){
if(event.card){
if(event.card.viewAs){
return event.card.viewAs=='bingliang';
}
else{
return event.card.name=='bingliang';
}
}
},
content:function(){
player.addTempSkill('qixiang4','phaseJudgeAfter');
}
},
qixiang3:{
mod:{
suit:function(card,suit){
if(suit=='diamond') return 'heart';
}
}
},
qixiang4:{
mod:{
suit:function(card,suit){
if(suit=='spade') return 'club';
}
}
},
nianrui:{
trigger:{player:['phaseBegin','phaseEnd']},
content:function(){
"step 0"
player.judge(function(card){
return get.color(card)=='red'?1:0;
});
"step 1"
if(result.bool){
player.draw();
}
}
},
lianyu:{
enable:'phaseUse',
usable:1,
filterCard:{color:'red'},
check:function(card){return 6-get.value(card)},
filterTarget:true,
selectTarget:-1,
line:'fire',
content:function(){
target.damage('fire');
},
ai:{
result:{
player:function(card,player,target){
var eff=0;
for(var i=0;i<game.players.length;i++){
if(!game.players[i].isOut()){
eff+=get.damageEffect(game.players[i],player,player,'fire');
}
}
return eff;
game.import('character',function(){
var game=window.game;
var ui=window.ui;
var get=window.get;
var ai=window.ai;
var lib=window.lib;
var _status=window._status;
return {
name:'zhuogui',
character:{
nianshou:['male','shu',4,['nianrui','qixiang']],
mamian:['male','qun',4,['lianyu','guiji']],
niutou:['male','shu',4,['manjia','xiaoshou']],
baiwuchang:['male','qun',3,['qiangzheng','moukui']],
heiwuchang:['male','qun',3,['suoling','xixing']],
},
skill:{
qixiang:{
group:['qixiang1','qixiang2'],
ai:{
effect:{
target:function(card,player,target,current){
if(card.name=='lebu'&&card.name=='bingliang') return 0.8;
}
}
}
},
qixiang1:{
trigger:{player:'judge'},
forced:true,
filter:function(event,player){
if(event.card){
if(event.card.viewAs){
return event.card.viewAs=='lebu';
}
else{
return event.card.name=='lebu';
}
}
},
expose:0.1
}
},
manjia:{
group:['manjia1','manjia2']
},
manjia1:{
trigger:{target:'useCardToBefore'},
forced:true,
priority:6,
filter:function(event,player){
if(player.getEquip(2)) return false;
return lib.skill.tengjia1.filter(event,player);
content:function(){
player.addTempSkill('qixiang3','phaseJudgeAfter');
}
},
content:function(){
trigger.untrigger();
trigger.finish();
qixiang2:{
trigger:{player:'judge'},
forced:true,
filter:function(event,player){
if(event.card){
if(event.card.viewAs){
return event.card.viewAs=='bingliang';
}
else{
return event.card.name=='bingliang';
}
}
},
content:function(){
player.addTempSkill('qixiang4','phaseJudgeAfter');
}
},
ai:{
effect:{
target:function(card,player,target,current){
if(target.getEquip(2)) return;
return lib.skill.tengjia1.ai.effect.target.apply(this,arguments);
qixiang3:{
mod:{
suit:function(card,suit){
if(suit=='diamond') return 'heart';
}
}
}
},
manjia2:{
trigger:{player:'damageBegin'},
filter:function(event,player){
if(player.getEquip(2)) return false;
if(event.nature=='fire') return true;
},
forced:true,
check:function(){
return false;
},
content:function(){
trigger.num++;
},
ai:{
effect:{
target:function(card,player,target,current){
if(target.getEquip(2)) return;
return lib.skill.tengjia2.ai.effect.target.apply(this,arguments);
qixiang4:{
mod:{
suit:function(card,suit){
if(suit=='spade') return 'club';
}
}
}
},
xiaoshou:{
trigger:{player:'phaseEnd'},
filter:function(event,player){
var players=game.players.slice(0);
players.sort(function(a,b){
return b.hp-a.hp;
});
return players[0].hp>players[1].hp&&players[0]!=player;
},
check:function(event,player){
var players=game.players.slice(0);
players.sort(function(a,b){
return b.hp-a.hp;
});
return get.damageEffect(players[0],player,player,'fire')>0;
},
prompt:function(){
var players=game.players.slice(0);
players.sort(function(a,b){
return b.hp-a.hp;
});
return '枭首:是否对'+get.translation(players[0])+'造成一点火焰伤害?';
},
content:function(){
var players=game.players.slice(0);
players.sort(function(a,b){
return b.hp-a.hp;
});
if(players[0].hp>players[1].hp&&players[0]!=player){
players[0].damage('fire');
player.line(players[0],'fire');
}
},
ai:{
expose:0.2
}
},
guiji:{
trigger:{player:'phaseJudgeBegin'},
forced:true,
content:function(){
player.discard(player.getCards('j').randomGet());
},
filter:function(event ,player){
return player.countCards('j')>0;
},
ai:{
effect:{
target:function(card,player,target,current){
if(get.type(card)=='delay'&&target.countCards('j')==0) return 0.1;
}
}
}
},
qiangzheng:{
audio:2,
trigger:{player:'phaseEnd'},
direct:true,
forced:true,
filter:function(event,player){
for(var i=0;i<game.players.length;i++){
if(game.players[i]!=player&&game.players[i].countCards('h')) return true;
}
return false;
},
content:function(){
"step 0"
player.chooseTarget('获得一名角色的一张手牌',true,function(card,player,target){
return player!=target&&target.countCards('h')>0;
}).ai=function(target){
return -get.attitude(player,target);
};
"step 1"
if(result.targets&&result.targets.length){
player.logSkill('qiangzheng',result.targets);
player.gain(result.targets[0].getCards('h').randomGet(),result.targets[0]);
result.targets[0].$give(1,player);
game.delay();
}
},
ai:{
threaten:1.7
}
},
suoling:{
trigger:{player:'phaseEnd'},
forced:true,
filter:function(event,player){
if(player.isLinked()) return true;
for(var i=0;i<game.players.length;i++){
if(game.players[i]!=player&&!game.players[i].isLinked()){
return true;
}
}
return false;
},
content:function(){
"step 0"
event.targets=game.players.slice(0);
event.targets.remove(player);
event.targets.sort(lib.sort.seat);
if(player.isLinked()) player.link();
"step 1"
if(event.targets.length){
var target=event.targets.shift();
if(!target.isLinked()){
target.link();
}
event.redo();
}
}
},
xixing:{
enable:'phaseUse',
usable:1,
filterCard:function(card){
var type=get.type(card);
for(var i=0;i<ui.selected.cards.length;i++){
if(get.type(ui.selected.cards[i])==type) return false;
}
return true;
},
complexCard:true,
selectCard:3,
position:'he',
filterTarget:function(card,player,target){
return player!=target;
},
check:function(card){
if(_status.event.player.hp==_status.event.player.maxHp){
return 5-get.value(card);
}
return 10-get.value(card);
},
content:function(){
"step 0"
target.damage();
"step 1"
player.recover();
},
ai:{
order:9.5,
result:{
target:function(player,target){
return get.damageEffect(target,player);
}
},
expose:0.2
}
}
},
translate:{
nianshou:'年兽',
nianrui:'年瑞',
qixiang:'祺祥',
qixiang1:'祺祥',
qixiang2:'祺祥',
nianrui_info:'准备阶段和结束阶段,你可以进行一次判定,若结果为红色则摸一张牌',
qixiang_info:'乐不思蜀判定时,你的方块判定牌视为红桃;兵粮寸断判定时,你的黑桃判定牌视为草花',
},
nianrui:{
trigger:{player:['phaseBegin','phaseEnd']},
content:function(){
"step 0"
player.judge(function(card){
return get.color(card)=='red'?1:0;
});
"step 1"
if(result.bool){
player.draw();
}
}
},
lianyu:{
enable:'phaseUse',
usable:1,
filterCard:{color:'red'},
check:function(card){return 6-get.value(card)},
filterTarget:true,
selectTarget:-1,
line:'fire',
content:function(){
target.damage('fire');
},
ai:{
result:{
player:function(card,player,target){
var eff=0;
for(var i=0;i<game.players.length;i++){
if(!game.players[i].isOut()){
eff+=get.damageEffect(game.players[i],player,player,'fire');
}
}
return eff;
}
},
expose:0.1
}
},
manjia:{
group:['manjia1','manjia2']
},
manjia1:{
trigger:{target:'useCardToBefore'},
forced:true,
priority:6,
filter:function(event,player){
if(player.getEquip(2)) return false;
return lib.skill.tengjia1.filter(event,player);
},
content:function(){
trigger.untrigger();
trigger.finish();
},
ai:{
effect:{
target:function(card,player,target,current){
if(target.getEquip(2)) return;
return lib.skill.tengjia1.ai.effect.target.apply(this,arguments);
}
}
}
},
manjia2:{
trigger:{player:'damageBegin'},
filter:function(event,player){
if(player.getEquip(2)) return false;
if(event.nature=='fire') return true;
},
forced:true,
check:function(){
return false;
},
content:function(){
trigger.num++;
},
ai:{
effect:{
target:function(card,player,target,current){
if(target.getEquip(2)) return;
return lib.skill.tengjia2.ai.effect.target.apply(this,arguments);
}
}
}
},
xiaoshou:{
trigger:{player:'phaseEnd'},
filter:function(event,player){
var players=game.players.slice(0);
players.sort(function(a,b){
return b.hp-a.hp;
});
return players[0].hp>players[1].hp&&players[0]!=player;
},
check:function(event,player){
var players=game.players.slice(0);
players.sort(function(a,b){
return b.hp-a.hp;
});
return get.damageEffect(players[0],player,player,'fire')>0;
},
prompt:function(){
var players=game.players.slice(0);
players.sort(function(a,b){
return b.hp-a.hp;
});
return '枭首:是否对'+get.translation(players[0])+'造成一点火焰伤害?';
},
content:function(){
var players=game.players.slice(0);
players.sort(function(a,b){
return b.hp-a.hp;
});
if(players[0].hp>players[1].hp&&players[0]!=player){
players[0].damage('fire');
player.line(players[0],'fire');
}
},
ai:{
expose:0.2
}
},
guiji:{
trigger:{player:'phaseJudgeBegin'},
forced:true,
content:function(){
player.discard(player.getCards('j').randomGet());
},
filter:function(event ,player){
return player.countCards('j')>0;
},
ai:{
effect:{
target:function(card,player,target,current){
if(get.type(card)=='delay'&&target.countCards('j')==0) return 0.1;
}
}
}
},
qiangzheng:{
audio:2,
trigger:{player:'phaseEnd'},
direct:true,
forced:true,
filter:function(event,player){
for(var i=0;i<game.players.length;i++){
if(game.players[i]!=player&&game.players[i].countCards('h')) return true;
}
return false;
},
content:function(){
"step 0"
player.chooseTarget('获得一名角色的一张手牌',true,function(card,player,target){
return player!=target&&target.countCards('h')>0;
}).ai=function(target){
return -get.attitude(player,target);
};
"step 1"
if(result.targets&&result.targets.length){
player.logSkill('qiangzheng',result.targets);
player.gain(result.targets[0].getCards('h').randomGet(),result.targets[0]);
result.targets[0].$give(1,player);
game.delay();
}
},
ai:{
threaten:1.7
}
},
suoling:{
trigger:{player:'phaseEnd'},
forced:true,
filter:function(event,player){
if(player.isLinked()) return true;
for(var i=0;i<game.players.length;i++){
if(game.players[i]!=player&&!game.players[i].isLinked()){
return true;
}
}
return false;
},
content:function(){
"step 0"
event.targets=game.players.slice(0);
event.targets.remove(player);
event.targets.sort(lib.sort.seat);
if(player.isLinked()) player.link();
"step 1"
if(event.targets.length){
var target=event.targets.shift();
if(!target.isLinked()){
target.link();
}
event.redo();
}
}
},
xixing:{
enable:'phaseUse',
usable:1,
filterCard:function(card){
var type=get.type(card);
for(var i=0;i<ui.selected.cards.length;i++){
if(get.type(ui.selected.cards[i])==type) return false;
}
return true;
},
complexCard:true,
selectCard:3,
position:'he',
filterTarget:function(card,player,target){
return player!=target;
},
check:function(card){
if(_status.event.player.hp==_status.event.player.maxHp){
return 5-get.value(card);
}
return 10-get.value(card);
},
content:function(){
"step 0"
target.damage();
"step 1"
player.recover();
},
ai:{
order:9.5,
result:{
target:function(player,target){
return get.damageEffect(target,player);
}
},
expose:0.2
}
}
},
translate:{
nianshou:'年兽',
nianrui:'年瑞',
qixiang:'祺祥',
qixiang1:'祺祥',
qixiang2:'祺祥',
nianrui_info:'准备阶段和结束阶段,你可以进行一次判定,若结果为红色则摸一张牌',
qixiang_info:'乐不思蜀判定时,你的方块判定牌视为红桃;兵粮寸断判定时,你的黑桃判定牌视为草花',
mamian:'马面',
lianyu:'炼狱',
lianyu_info:'出牌阶段限一次,你可以弃置一张红色手牌令场上所有角色受到一点火焰伤害',
mamian:'马面',
lianyu:'炼狱',
lianyu_info:'出牌阶段限一次,你可以弃置一张红色手牌令场上所有角色受到一点火焰伤害',
niutou:'牛头',
manjia:'蛮甲',
manjia1:'蛮甲',
manjia2:'蛮甲',
manjia_info:'锁定技,若你的装备区内没有防具牌,则你视为装备了[藤甲]',
xiaoshou:'枭首',
xiaoshou_info:'结束阶段,若场上体力值最多的角色只有一个,你可以对其造成一点火焰伤害',
guiji:'诡计',
guiji_info:'锁定技,准备阶段结束时,若你的判定区内有牌,你随机弃置其中一张牌',
niutou:'牛头',
manjia:'蛮甲',
manjia1:'蛮甲',
manjia2:'蛮甲',
manjia_info:'锁定技,若你的装备区内没有防具牌,则你视为装备了[藤甲]',
xiaoshou:'枭首',
xiaoshou_info:'结束阶段,若场上体力值最多的角色只有一个,你可以对其造成一点火焰伤害',
guiji:'诡计',
guiji_info:'锁定技,准备阶段结束时,若你的判定区内有牌,你随机弃置其中一张牌',
baiwuchang:'白无常',
qiangzheng:'强征',
qiangzheng_info:'锁定技,结束阶段,你获得一名其他角色的一张手牌',
zuijiu:'醉酒',
zuijiu_info:'锁定技,你的黑杀造成的伤害+1造成伤害后须弃置一张手牌',
baiwuchang:'白无常',
qiangzheng:'强征',
qiangzheng_info:'锁定技,结束阶段,你获得一名其他角色的一张手牌',
zuijiu:'醉酒',
zuijiu_info:'锁定技,你的黑杀造成的伤害+1造成伤害后须弃置一张手牌',
heiwuchang:'黑无常',
suoling:'索令',
suoling_info:'锁定技,结束阶段,你解除横置状态,除你之外的所有角色进入横置状态',
xixing:'吸星',
xixing_info:'出牌阶段限一次,你可以弃置三张不同类别的牌,对一名其他角色造成一点伤害,然后回复一点体力',
},
heiwuchang:'黑无常',
suoling:'索令',
suoling_info:'锁定技,结束阶段,你解除横置状态,除你之外的所有角色进入横置状态',
xixing:'吸星',
xixing_info:'出牌阶段限一次,你可以弃置三张不同类别的牌,对一名其他角色造成一点伤害,然后回复一点体力',
},
};
});

View File

@ -1,225 +1,233 @@
'use strict';
game.import('play',{
name:'boss',
init:function(){
if(get.mode()=='tafang') return;
if(get.mode()!='boss'){
lib.characterPack.mode_extension_boss={
boss_zhuque:['female','shen',4,['boss_shenyi','boss_fentian'],['shu','hiddenboss','bossallowed']],
boss_huoshenzhurong:['male','shen',5,['boss_shenyi','boss_xingxia'],['shu','hiddenboss','bossallowed']],
boss_yanling:['male','shen',4,['boss_huihuo','boss_furan'],['shu','hiddenboss','bossallowed']],
boss_yandi:['male','shen',6,['boss_shenyi','boss_shenen','boss_chiyi'],['shu','hiddenboss','bossallowed']],
game.import('play',function(){
var game=window.game;
var ui=window.ui;
var get=window.get;
var ai=window.ai;
var lib=window.lib;
var _status=window._status;
return {
name:'boss',
init:function(){
if(get.mode()=='tafang') return;
if(get.mode()!='boss'){
lib.characterPack.mode_extension_boss={
boss_zhuque:['female','shen',4,['boss_shenyi','boss_fentian'],['shu','hiddenboss','bossallowed']],
boss_huoshenzhurong:['male','shen',5,['boss_shenyi','boss_xingxia'],['shu','hiddenboss','bossallowed']],
boss_yanling:['male','shen',4,['boss_huihuo','boss_furan'],['shu','hiddenboss','bossallowed']],
boss_yandi:['male','shen',6,['boss_shenyi','boss_shenen','boss_chiyi'],['shu','hiddenboss','bossallowed']],
boss_qinglong:['male','shen',4,['boss_shenyi','releiji'],['wu','hiddenboss','bossallowed']],
boss_mushengoumang:['male','shen',5,['boss_shenyi','boss_buchun'],['wu','hiddenboss','bossallowed']],
boss_shujing:['female','shen',2,['boss_cuidu','boss_zhongdu'],['wu','hiddenboss','bossallowed']],
boss_taihao:['male','shen',6,['boss_shenyi','boss_shenen','boss_qingyi'],['wu','hiddenboss','bossallowed']],
boss_qinglong:['male','shen',4,['boss_shenyi','releiji'],['wu','hiddenboss','bossallowed']],
boss_mushengoumang:['male','shen',5,['boss_shenyi','boss_buchun'],['wu','hiddenboss','bossallowed']],
boss_shujing:['female','shen',2,['boss_cuidu','boss_zhongdu'],['wu','hiddenboss','bossallowed']],
boss_taihao:['male','shen',6,['boss_shenyi','boss_shenen','boss_qingyi'],['wu','hiddenboss','bossallowed']],
boss_nianshou_heti:['male','shen',12,['boss_nianrui','boss_mengtai','boss_nbianshen','boss_nbianshenx'],['shu','boss','bossallowed'],'shu'],
boss_nianshou_jingjue:['male','shen',12,['boss_nianrui','boss_mengtai','boss_jingjue','boss_nbianshen'],['shu','hiddenboss','bossallowed'],'shu'],
boss_nianshou_renxing:['male','shen',12,['boss_nianrui','boss_mengtai','boss_renxing','boss_nbianshen'],['shu','hiddenboss','bossallowed'],'shu'],
boss_nianshou_ruizhi:['male','shen',12,['boss_nianrui','boss_mengtai','boss_ruizhi','boss_nbianshen'],['shu','hiddenboss','bossallowed'],'shu'],
boss_nianshou_baonu:['male','shen',12,['boss_nianrui','boss_mengtai','boss_nbaonu','boss_shouyi','boss_nbianshen'],['shu','hiddenboss','bossallowed'],'shu'],
boss_baiwuchang:['male','shen',9,['boss_baolian','boss_qiangzheng','boss_zuijiu','juece','boss_bianshen4'],['shu','hiddenboss','bossallowed']],
boss_heiwuchang:['male','shen',9,['boss_guiji','boss_taiping','boss_suoming','boss_xixing','boss_bianshen4'],['shu','hiddenboss','bossallowed']],
boss_luocha:['male','shen',12,['boss_modao','boss_yushou','yizhong','boss_moyany'],['shu','hiddenboss','bossallowed']],
boss_yecha:['male','shen',11,['boss_modao','boss_mojian','bazhen','boss_danshu'],['shu','hiddenboss','bossallowed']],
boss_niutou:['male','shen',7,['boss_baolian','niepan','boss_manjia','boss_xiaoshou','boss_bianshen3'],['shu','hiddenboss','bossallowed']],
boss_mamian:['male','shen',6,['boss_guiji','fankui','boss_lianyu','juece','boss_bianshen3'],['shu','hiddenboss','bossallowed']],
boss_chi:['male','shen',5,['boss_guimei','boss_didong','boss_shanbeng','boss_bianshen2'],['shu','hiddenboss','bossallowed']],
boss_mo:['female','shen',5,['boss_guimei','enyuan','boss_beiming','boss_bianshen2'],['shu','hiddenboss','bossallowed']],
boss_wang:['male','shen',5,['boss_guimei','boss_luolei','huilei','boss_bianshen2'],['shu','hiddenboss','bossallowed']],
boss_liang:['female','shen',5,['boss_guimei','boss_guihuo','boss_minbao','boss_bianshen2'],['shu','hiddenboss','bossallowed']],
boss_nianshou_heti:['male','shen',12,['boss_nianrui','boss_mengtai','boss_nbianshen','boss_nbianshenx'],['shu','boss','bossallowed'],'shu'],
boss_nianshou_jingjue:['male','shen',12,['boss_nianrui','boss_mengtai','boss_jingjue','boss_nbianshen'],['shu','hiddenboss','bossallowed'],'shu'],
boss_nianshou_renxing:['male','shen',12,['boss_nianrui','boss_mengtai','boss_renxing','boss_nbianshen'],['shu','hiddenboss','bossallowed'],'shu'],
boss_nianshou_ruizhi:['male','shen',12,['boss_nianrui','boss_mengtai','boss_ruizhi','boss_nbianshen'],['shu','hiddenboss','bossallowed'],'shu'],
boss_nianshou_baonu:['male','shen',12,['boss_nianrui','boss_mengtai','boss_nbaonu','boss_shouyi','boss_nbianshen'],['shu','hiddenboss','bossallowed'],'shu'],
boss_baiwuchang:['male','shen',9,['boss_baolian','boss_qiangzheng','boss_zuijiu','juece','boss_bianshen4'],['shu','hiddenboss','bossallowed']],
boss_heiwuchang:['male','shen',9,['boss_guiji','boss_taiping','boss_suoming','boss_xixing','boss_bianshen4'],['shu','hiddenboss','bossallowed']],
boss_luocha:['male','shen',12,['boss_modao','boss_yushou','yizhong','boss_moyany'],['shu','hiddenboss','bossallowed']],
boss_yecha:['male','shen',11,['boss_modao','boss_mojian','bazhen','boss_danshu'],['shu','hiddenboss','bossallowed']],
boss_niutou:['male','shen',7,['boss_baolian','niepan','boss_manjia','boss_xiaoshou','boss_bianshen3'],['shu','hiddenboss','bossallowed']],
boss_mamian:['male','shen',6,['boss_guiji','fankui','boss_lianyu','juece','boss_bianshen3'],['shu','hiddenboss','bossallowed']],
boss_chi:['male','shen',5,['boss_guimei','boss_didong','boss_shanbeng','boss_bianshen2'],['shu','hiddenboss','bossallowed']],
boss_mo:['female','shen',5,['boss_guimei','enyuan','boss_beiming','boss_bianshen2'],['shu','hiddenboss','bossallowed']],
boss_wang:['male','shen',5,['boss_guimei','boss_luolei','huilei','boss_bianshen2'],['shu','hiddenboss','bossallowed']],
boss_liang:['female','shen',5,['boss_guimei','boss_guihuo','boss_minbao','boss_bianshen2'],['shu','hiddenboss','bossallowed']],
boss_lvbu1:['male','shen',8,['mashu','wushuang','boss_baonu'],['qun','boss','bossallowed'],'wei'],
boss_lvbu2:['male','shen',4,['mashu','wushuang','xiuluo','shenwei','shenji'],['qun','hiddenboss','bossallowed'],'qun'],
boss_lvbu3:['male','shen',4,['wushuang','shenqu','jiwu'],['qun','hiddenboss','bossallowed'],'qun'],
boss_lvbu1:['male','shen',8,['mashu','wushuang','boss_baonu'],['qun','boss','bossallowed'],'wei'],
boss_lvbu2:['male','shen',4,['mashu','wushuang','xiuluo','shenwei','shenji'],['qun','hiddenboss','bossallowed'],'qun'],
boss_lvbu3:['male','shen',4,['wushuang','shenqu','jiwu'],['qun','hiddenboss','bossallowed'],'qun'],
boss_caocao:['male','shen',12,['boss_guixin','xiongcai'],['wei','boss','bossallowed'],'wei'],
boss_guojia:['male','shen',4,['tiandu','boss_guimou','boss_yuance','boss_qizuo'],['wei','boss','bossallowed'],'zhu'],
boss_zhangchunhua:['female','shen',4,['jueqing','boss_wuxin','shangshix'],['wei','boss','bossallowed'],'wei'],
boss_zhenji:['female','shen',4,['tashui','lingbo','jiaoxia','fanghua'],['wei','boss','bossallowed'],'wei'],
boss_caocao:['male','shen',12,['boss_guixin','xiongcai'],['wei','boss','bossallowed'],'wei'],
boss_guojia:['male','shen',4,['tiandu','boss_guimou','boss_yuance','boss_qizuo'],['wei','boss','bossallowed'],'zhu'],
boss_zhangchunhua:['female','shen',4,['jueqing','boss_wuxin','shangshix'],['wei','boss','bossallowed'],'wei'],
boss_zhenji:['female','shen',4,['tashui','lingbo','jiaoxia','fanghua'],['wei','boss','bossallowed'],'wei'],
boss_liubei:['male','shen',12,['xiaoxiong','boss_zhangwu'],['shu','boss','bossallowed'],'qun'],
boss_zhugeliang:['male','shen',Infinity,['xiangxing','yueyin','fengqi','gaiming'],['shu','boss','bossallowed'],'qun'],
boss_huangyueying:['female','shen',4,['boss_gongshen','boss_jizhi','qicai','boss_guiyin'],['shu','boss','bossallowed'],'wei'],
boss_pangtong:['male','shen',4,['boss_tianyu','qiwu','niepan','boss_yuhuo'],['shu','boss','bossallowed'],'zhu'],
boss_zhaoyun:['male','shen',1,['boss_juejing','longhun','zhanjiang'],['shu','boss','bossallowed'],'qun'],
boss_liubei:['male','shen',12,['xiaoxiong','boss_zhangwu'],['shu','boss','bossallowed'],'qun'],
boss_zhugeliang:['male','shen',Infinity,['xiangxing','yueyin','fengqi','gaiming'],['shu','boss','bossallowed'],'qun'],
boss_huangyueying:['female','shen',4,['boss_gongshen','boss_jizhi','qicai','boss_guiyin'],['shu','boss','bossallowed'],'wei'],
boss_pangtong:['male','shen',4,['boss_tianyu','qiwu','niepan','boss_yuhuo'],['shu','boss','bossallowed'],'zhu'],
boss_zhaoyun:['male','shen',1,['boss_juejing','longhun','zhanjiang'],['shu','boss','bossallowed'],'qun'],
boss_zhouyu:['male','shen',6,['huoshen','boss_honglian','boss_xianyin'],['wu','boss','bossallowed'],'zhu'],
boss_zhouyu:['male','shen',6,['huoshen','boss_honglian','boss_xianyin'],['wu','boss','bossallowed'],'zhu'],
boss_caiwenji:['female','shen',4,['beige','boss_hujia','boss_guihan'],['qun','boss','bossallowed'],'wei'],
boss_zhangjiao:['male','shen',8,['boss_leiji','tiandao','jidian'],['qun','boss','bossallowed'],'shu'],
boss_zuoci:['male','shen',0,['huanhua'],['qun','boss','bossallowed'],'shu'],
boss_caiwenji:['female','shen',4,['beige','boss_hujia','boss_guihan'],['qun','boss','bossallowed'],'wei'],
boss_zhangjiao:['male','shen',8,['boss_leiji','tiandao','jidian'],['qun','boss','bossallowed'],'shu'],
boss_zuoci:['male','shen',0,['huanhua'],['qun','boss','bossallowed'],'shu'],
boss_diaochan:['female','shen',4,['fengwu','yunshen','lianji','boss_wange','yuehun'],['qun','boss','bossallowed'],'qun'],
boss_huatuo:['male','shen',6,['chulao','mazui','boss_shengshou','guizhen','wuqin'],['qun','boss','bossallowed'],'wu'],
boss_dongzhuo:['male','shen',20,['jiuchi','boss_qiangzheng','boss_baolin'],['qun','boss','bossallowed'],'shu'],
};
for(var i in lib.characterPack.mode_extension_boss){
lib.characterPack.mode_extension_boss[i][4].push('mode:boss');
lib.character[i]=lib.characterPack.mode_extension_boss[i];
if(!lib.config.boss_enableai_playpackconfig){
lib.config.forbidai.push(i);
}
}
var list2={
boss_liedixuande:['male','shu',5,['boss_lingfeng','boss_jizhen'],['jiangeboss','hiddenboss','bossallowed'],'shu'],
boss_gongshenyueying:['male','shu',4,['boss_gongshenjg','boss_jingmiao','boss_zhinang'],['jiangeboss','hiddenboss','bossallowed'],'shu'],
boss_tianhoukongming:['male','shu',4,['boss_biantian','bazhen'],['jiangeboss','hiddenboss','bossallowed'],'shu'],
boss_yuhuoshiyuan:['male','shu',4,['boss_yuhuojg','boss_qiwu','boss_tianyujg'],['jiangeboss','hiddenboss','bossallowed'],'shu'],
boss_qiaokuijunyi:['male','wei',4,['boss_huodi','boss_jueji'],['jiangeboss','hiddenboss','bossallowed'],'wei'],
boss_jiarenzidan:['male','wei',5,['boss_chiying','boss_jingfan'],['jiangeboss','hiddenboss','bossallowed'],'wei'],
boss_duanyuzhongda:['male','wei',5,['boss_fanshi','boss_xuanlei','boss_skonghun'],['jiangeboss','hiddenboss','bossallowed'],'wei'],
boss_juechenmiaocai:['male','wei',4,['boss_chuanyun','boss_leili','boss_fengxing'],['jiangeboss','hiddenboss','bossallowed'],'wei'],
boss_jileibaihu:['male','shu',4,['boss_jiguan','boss_zhenwei','boss_benlei'],['jiangemech','hiddenboss','bossallowed'],'shu'],
boss_yunpingqinglong:['male','shu',4,['boss_jiguan','boss_mojianjg'],['jiangemech','hiddenboss','bossallowed'],'shu'],
boss_lingjiaxuanwu:['male','shu',5,['boss_jiguan','yizhong','boss_lingyu'],['jiangemech','hiddenboss','bossallowed'],'shu'],
boss_chiyuzhuque:['male','shu',5,['boss_jiguan','boss_yuhuojg','boss_tianyun'],['jiangemech','hiddenboss','bossallowed'],'shu'],
boss_fudibian:['male','wei',4,['boss_jiguan','boss_didongjg'],['jiangemech','hiddenboss','bossallowed'],'wei'],
boss_tuntianchiwen:['male','wei',5,['boss_jiguan','boss_tanshi','boss_tunshi'],['jiangemech','hiddenboss','bossallowed'],'wei'],
boss_shihuosuanni:['male','wei',3,['boss_jiguan','boss_lianyujg'],['jiangemech','hiddenboss','bossallowed'],'wei'],
boss_lieshiyazi:['male','wei',4,['boss_jiguan','boss_nailuo'],['jiangemech','hiddenboss','bossallowed'],'wei'],
}
if(get.mode()!='versus'){
lib.characterPack.mode_extension_jiange=list2;
for(var i in list2){
lib.characterPack.mode_extension_jiange[i]=list2[i];
lib.characterPack.mode_extension_jiange[i][4].push('mode:versus');
lib.character[i]=list2[i];
boss_diaochan:['female','shen',4,['fengwu','yunshen','lianji','boss_wange','yuehun'],['qun','boss','bossallowed'],'qun'],
boss_huatuo:['male','shen',6,['chulao','mazui','boss_shengshou','guizhen','wuqin'],['qun','boss','bossallowed'],'wu'],
boss_dongzhuo:['male','shen',20,['jiuchi','boss_qiangzheng','boss_baolin'],['qun','boss','bossallowed'],'shu'],
};
for(var i in lib.characterPack.mode_extension_boss){
lib.characterPack.mode_extension_boss[i][4].push('mode:boss');
lib.character[i]=lib.characterPack.mode_extension_boss[i];
if(!lib.config.boss_enableai_playpackconfig){
lib.config.forbidai.push(i);
}
}
lib.characterIntro.boss_liedixuande=lib.characterIntro.liubei;
lib.characterIntro.boss_gongshenyueying=lib.characterIntro.huangyueying;
lib.characterIntro.boss_tianhoukongming=lib.characterIntro.shen_zhugeliang;
lib.characterIntro.boss_yuhuoshiyuan=lib.characterIntro.pangtong;
lib.characterIntro.boss_qiaokuijunyi=lib.characterIntro.zhanghe;
lib.characterIntro.boss_jiarenzidan=lib.characterIntro.caozhen;
lib.characterIntro.boss_duanyuzhongda=lib.characterIntro.simayi;
lib.characterIntro.boss_juechenmiaocai=lib.characterIntro.xiahouyuan;
}
else if(_status.mode!='jiange'){
for(var i in list2){
lib.character[i]=list2[i];
if(!lib.config.boss_enableai_playpackconfig){
lib.config.forbidai.push(i);
}
var list2={
boss_liedixuande:['male','shu',5,['boss_lingfeng','boss_jizhen'],['jiangeboss','hiddenboss','bossallowed'],'shu'],
boss_gongshenyueying:['male','shu',4,['boss_gongshenjg','boss_jingmiao','boss_zhinang'],['jiangeboss','hiddenboss','bossallowed'],'shu'],
boss_tianhoukongming:['male','shu',4,['boss_biantian','bazhen'],['jiangeboss','hiddenboss','bossallowed'],'shu'],
boss_yuhuoshiyuan:['male','shu',4,['boss_yuhuojg','boss_qiwu','boss_tianyujg'],['jiangeboss','hiddenboss','bossallowed'],'shu'],
boss_qiaokuijunyi:['male','wei',4,['boss_huodi','boss_jueji'],['jiangeboss','hiddenboss','bossallowed'],'wei'],
boss_jiarenzidan:['male','wei',5,['boss_chiying','boss_jingfan'],['jiangeboss','hiddenboss','bossallowed'],'wei'],
boss_duanyuzhongda:['male','wei',5,['boss_fanshi','boss_xuanlei','boss_skonghun'],['jiangeboss','hiddenboss','bossallowed'],'wei'],
boss_juechenmiaocai:['male','wei',4,['boss_chuanyun','boss_leili','boss_fengxing'],['jiangeboss','hiddenboss','bossallowed'],'wei'],
boss_jileibaihu:['male','shu',4,['boss_jiguan','boss_zhenwei','boss_benlei'],['jiangemech','hiddenboss','bossallowed'],'shu'],
boss_yunpingqinglong:['male','shu',4,['boss_jiguan','boss_mojianjg'],['jiangemech','hiddenboss','bossallowed'],'shu'],
boss_lingjiaxuanwu:['male','shu',5,['boss_jiguan','yizhong','boss_lingyu'],['jiangemech','hiddenboss','bossallowed'],'shu'],
boss_chiyuzhuque:['male','shu',5,['boss_jiguan','boss_yuhuojg','boss_tianyun'],['jiangemech','hiddenboss','bossallowed'],'shu'],
boss_fudibian:['male','wei',4,['boss_jiguan','boss_didongjg'],['jiangemech','hiddenboss','bossallowed'],'wei'],
boss_tuntianchiwen:['male','wei',5,['boss_jiguan','boss_tanshi','boss_tunshi'],['jiangemech','hiddenboss','bossallowed'],'wei'],
boss_shihuosuanni:['male','wei',3,['boss_jiguan','boss_lianyujg'],['jiangemech','hiddenboss','bossallowed'],'wei'],
boss_lieshiyazi:['male','wei',4,['boss_jiguan','boss_nailuo'],['jiangemech','hiddenboss','bossallowed'],'wei'],
}
}
var list={
boss_chi:'魑',
boss_mo:'魅',
boss_wang:'魍',
boss_liang:'魉',
boss_niutou:'牛头',
boss_mamian:'马面',
boss_baiwuchang:'白无常',
boss_heiwuchang:'黑无常',
boss_luocha:'罗刹',
boss_yecha:'夜叉',
boss_nianshou:'年兽',
boss_nianshou_heti:'合体',
boss_nianshou_jingjue:'警觉年兽',
boss_nianshou_renxing:'任性年兽',
boss_nianshou_baonu:'暴怒年兽',
boss_nianshou_ruizhi:'睿智年兽',
boss_shuijing:'水镜先生',
boss_huangyueying:'奇智女杰',
boss_zhangchunhua:'冷血皇后',
boss_satan:'堕落天使',
boss_dongzhuo:'乱世魔王',
boss_lvbu1:'最强神话',
boss_lvbu2:'暴怒战神',
boss_lvbu3:'神鬼无前',
boss_zhouyu:'赤壁火神',
boss_pangtong:'涅盘凤雏',
boss_zhugeliang:'祭风卧龙',
boss_zhangjiao:'天公将军',
boss_zuoci:'迷之仙人',
boss_yuji:'琅琊道士',
boss_liubei:'蜀汉烈帝',
boss_caiwenji:'异乡孤女',
boss_huatuo:'药坛圣手',
boss_luxun:'蹁跹君子',
boss_zhenji:'洛水仙子',
boss_diaochan:'绝代妖姬',
boss_zhaoyun:'高达一号',
boss_zhuoguiquxie:'捉鬼驱邪',
boss_caocao:'魏武大帝',
boss_guojia:'世之奇士',
boss_liedixuande:'烈帝玄德',
boss_gongshenyueying:'工神月英',
boss_tianhoukongming:'天侯孔明',
boss_yuhuoshiyuan:'浴火士元',
boss_qiaokuijunyi:'巧魁儁乂',
boss_jiarenzidan:'佳人子丹',
boss_duanyuzhongda:'断狱仲达',
boss_juechenmiaocai:'绝尘妙才',
boss_jileibaihu:'机雷白虎',
boss_yunpingqinglong:'云屏青龙',
boss_lingjiaxuanwu:'灵甲玄武',
boss_chiyuzhuque:'炽羽朱雀',
boss_fudibian:'缚地狴犴',
boss_tuntianchiwen:'吞天螭吻',
boss_shihuosuanni:'食火狻猊',
boss_lieshiyazi:'裂石睚眦',
mode_extension_boss_character_config:'挑战武将',
mode_extension_jiange_character_config:'剑阁武将',
};
for(var i in list){
lib.translate[i]=lib.translate[i]||list[i];
}
}
},
arenaReady:function(){
if(get.mode()=='tafang') return;
var loadversus=function(){
if(get.mode()!='versus'){
window.mode={};
lib.init.js(lib.assetURL+'mode','versus',function(){
for(var i in mode.versus.translate){
lib.translate[i]=lib.translate[i]||mode.versus.translate[i];
}
for(var i in mode.versus.skill){
if(lib.skill[i]) console.log(i);
if(i!='versus_ladder'){
lib.skill[i]=lib.init.eval(mode.versus.skill[i]);
game.finishSkill(i);
if(get.mode()!='versus'){
lib.characterPack.mode_extension_jiange=list2;
for(var i in list2){
lib.characterPack.mode_extension_jiange[i]=list2[i];
lib.characterPack.mode_extension_jiange[i][4].push('mode:versus');
lib.character[i]=list2[i];
if(!lib.config.boss_enableai_playpackconfig){
lib.config.forbidai.push(i);
}
}
lib.characterIntro.boss_liedixuande=lib.characterIntro.liubei;
lib.characterIntro.boss_gongshenyueying=lib.characterIntro.huangyueying;
lib.characterIntro.boss_tianhoukongming=lib.characterIntro.shen_zhugeliang;
lib.characterIntro.boss_yuhuoshiyuan=lib.characterIntro.pangtong;
lib.characterIntro.boss_qiaokuijunyi=lib.characterIntro.zhanghe;
lib.characterIntro.boss_jiarenzidan=lib.characterIntro.caozhen;
lib.characterIntro.boss_duanyuzhongda=lib.characterIntro.simayi;
lib.characterIntro.boss_juechenmiaocai=lib.characterIntro.xiahouyuan;
}
else if(_status.mode!='jiange'){
for(var i in list2){
lib.character[i]=list2[i];
if(!lib.config.boss_enableai_playpackconfig){
lib.config.forbidai.push(i);
}
}
}
var list={
boss_chi:'魑',
boss_mo:'魅',
boss_wang:'魍',
boss_liang:'魉',
boss_niutou:'牛头',
boss_mamian:'马面',
boss_baiwuchang:'白无常',
boss_heiwuchang:'黑无常',
boss_luocha:'罗刹',
boss_yecha:'夜叉',
boss_nianshou:'年兽',
boss_nianshou_heti:'合体',
boss_nianshou_jingjue:'警觉年兽',
boss_nianshou_renxing:'任性年兽',
boss_nianshou_baonu:'暴怒年兽',
boss_nianshou_ruizhi:'睿智年兽',
boss_shuijing:'水镜先生',
boss_huangyueying:'奇智女杰',
boss_zhangchunhua:'冷血皇后',
boss_satan:'堕落天使',
boss_dongzhuo:'乱世魔王',
boss_lvbu1:'最强神话',
boss_lvbu2:'暴怒战神',
boss_lvbu3:'神鬼无前',
boss_zhouyu:'赤壁火神',
boss_pangtong:'涅盘凤雏',
boss_zhugeliang:'祭风卧龙',
boss_zhangjiao:'天公将军',
boss_zuoci:'迷之仙人',
boss_yuji:'琅琊道士',
boss_liubei:'蜀汉烈帝',
boss_caiwenji:'异乡孤女',
boss_huatuo:'药坛圣手',
boss_luxun:'蹁跹君子',
boss_zhenji:'洛水仙子',
boss_diaochan:'绝代妖姬',
boss_zhaoyun:'高达一号',
boss_zhuoguiquxie:'捉鬼驱邪',
boss_caocao:'魏武大帝',
boss_guojia:'世之奇士',
boss_liedixuande:'烈帝玄德',
boss_gongshenyueying:'工神月英',
boss_tianhoukongming:'天侯孔明',
boss_yuhuoshiyuan:'浴火士元',
boss_qiaokuijunyi:'巧魁儁乂',
boss_jiarenzidan:'佳人子丹',
boss_duanyuzhongda:'断狱仲达',
boss_juechenmiaocai:'绝尘妙才',
boss_jileibaihu:'机雷白虎',
boss_yunpingqinglong:'云屏青龙',
boss_lingjiaxuanwu:'灵甲玄武',
boss_chiyuzhuque:'炽羽朱雀',
boss_fudibian:'缚地狴犴',
boss_tuntianchiwen:'吞天螭吻',
boss_shihuosuanni:'食火狻猊',
boss_lieshiyazi:'裂石睚眦',
mode_extension_boss_character_config:'挑战武将',
mode_extension_jiange_character_config:'剑阁武将',
};
for(var i in list){
lib.translate[i]=lib.translate[i]||list[i];
}
}
},
arenaReady:function(){
if(get.mode()=='tafang') return;
var loadversus=function(){
if(get.mode()!='versus'){
window.mode={};
lib.init.js(lib.assetURL+'mode','versus',function(){
for(var i in mode.versus.translate){
lib.translate[i]=lib.translate[i]||mode.versus.translate[i];
}
for(var i in mode.versus.skill){
if(lib.skill[i]) console.log(i);
if(i!='versus_ladder'){
lib.skill[i]=lib.init.eval(mode.versus.skill[i]);
game.finishSkill(i);
}
}
delete window.mode;
});
}
};
if(get.mode()!='boss'){
window.mode={};
lib.init.js(lib.assetURL+'mode','boss',function(){
for(var i in mode.boss.translate){
lib.translate[i]=lib.translate[i]||mode.boss.translate[i];
}
for(var i in mode.boss.skill){
if(lib.skill[i]) console.log(i);
lib.skill[i]=lib.init.eval(mode.boss.skill[i]);
game.finishSkill(i);
}
delete window.mode;
loadversus();
});
}
};
if(get.mode()!='boss'){
window.mode={};
lib.init.js(lib.assetURL+'mode','boss',function(){
for(var i in mode.boss.translate){
lib.translate[i]=lib.translate[i]||mode.boss.translate[i];
}
for(var i in mode.boss.skill){
if(lib.skill[i]) console.log(i);
lib.skill[i]=lib.init.eval(mode.boss.skill[i]);
game.finishSkill(i);
}
delete window.mode;
else{
loadversus();
});
}
else{
loadversus();
}
},
help:{
'挑战武将':'<ul><li>在非挑战模式中使用挑战武将'
},
}
},
help:{
'挑战武将':'<ul><li>在非挑战模式中使用挑战武将'
},
};
});

View File

@ -1,98 +1,106 @@
'use strict';
game.import('play',{
name:'cardpile',
arenaReady:function(){
var data={
total:160,
sha:{
diamond:6,
club:14,
heart:3,
spade:7,
},
huosha:{
diamond:2,
heart:3
},
leisha:{
spade:5,
club:4
},
shan:{
heart:6,
diamond:18
},
jiu:{
diamond:1,
spade:2,
club:2
},
tao:{
heart:9,
diamond:3,
},
wanjian:{
heart:1,
},
nanman:{
spade:2,
club:1,
},
guohe:{
spade:3,
club:2,
heart:1
},
shunshou:{
spade:3,
diamond:2
},
wuxie:{
heart:2,
diamond:1,
spade:2,
club:2
},
tiesuo:{
spade:2,
club:4
}
}
var rand=function(){
return Math.ceil(Math.random()*13);
};
var getn=function(i,j){
return Math.round(data[i][j]*parseFloat(lib.config['cardpile_'+i+'_playpackconfig']));
};
var num=0;
for(var i in data){
for(var j in data[i]){
num+=getn(i,j);
}
}
var dn=num*(lib.card.list.length-data.total)/(data.total-num);
if(dn>1000) dn=1000;
if(dn>0){
var p=0;
for(var i in data){
for(var j in data[i]){
var n=Math.round(dn*getn(i,j)/num);
while(n--){
if(i=='huosha'){
lib.card.list.push([j,rand(),'sha','fire']);
}
else if(i=='leisha'){
lib.card.list.push([j,rand(),'sha','thunder']);
}
else{
lib.card.list.push([j,rand(),i]);
}
}
}
}
}
},
help:{
'牌堆补充':'<ul><li>将杀闪等牌在牌堆中的比例维持在与军争牌堆相同,防止开启扩展包后重要的牌被过多地稀释'
},
game.import('play',function(){
var game=window.game;
var ui=window.ui;
var get=window.get;
var ai=window.ai;
var lib=window.lib;
var _status=window._status;
return {
name:'cardpile',
arenaReady:function(){
var data={
total:160,
sha:{
diamond:6,
club:14,
heart:3,
spade:7,
},
huosha:{
diamond:2,
heart:3
},
leisha:{
spade:5,
club:4
},
shan:{
heart:6,
diamond:18
},
jiu:{
diamond:1,
spade:2,
club:2
},
tao:{
heart:9,
diamond:3,
},
wanjian:{
heart:1,
},
nanman:{
spade:2,
club:1,
},
guohe:{
spade:3,
club:2,
heart:1
},
shunshou:{
spade:3,
diamond:2
},
wuxie:{
heart:2,
diamond:1,
spade:2,
club:2
},
tiesuo:{
spade:2,
club:4
}
}
var rand=function(){
return Math.ceil(Math.random()*13);
};
var getn=function(i,j){
return Math.round(data[i][j]*parseFloat(lib.config['cardpile_'+i+'_playpackconfig']));
};
var num=0;
for(var i in data){
for(var j in data[i]){
num+=getn(i,j);
}
}
var dn=num*(lib.card.list.length-data.total)/(data.total-num);
if(dn>1000) dn=1000;
if(dn>0){
var p=0;
for(var i in data){
for(var j in data[i]){
var n=Math.round(dn*getn(i,j)/num);
while(n--){
if(i=='huosha'){
lib.card.list.push([j,rand(),'sha','fire']);
}
else if(i=='leisha'){
lib.card.list.push([j,rand(),'sha','thunder']);
}
else{
lib.card.list.push([j,rand(),i]);
}
}
}
}
}
},
help:{
'牌堆补充':'<ul><li>将杀闪等牌在牌堆中的比例维持在与军争牌堆相同,防止开启扩展包后重要的牌被过多地稀释'
},
};
});

File diff suppressed because it is too large Load Diff

View File

@ -1,227 +1,235 @@
'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']);
if(!_status.video){
lib.video.push({
type:'play',
name:'wuxing'
});
}
},
video:function(){
for(var i in this.translate){
lib.translate[i]=this.translate[i];
}
for(var i in this.card){
lib.card[i]=this.card[i];
}
for(var i in this.skill){
lib.skill[i]=this.skill[i];
}
},
element:{
player:{
init:function(player){
if(player.node.wuxing){
player.node.wuxing.remove();
}
if(_status.video||_status.connectMode) return;
var node=ui.create.div('.wunature',player);
var list=['metal','wood','water','fire','soil'];
var nature=list.randomGet();
player.wunature=nature;
node.dataset.nature=nature;
node.innerHTML=get.translation(nature);
player.node.wuxing=node;
game.import('play',function(){
var game=window.game;
var ui=window.ui;
var get=window.get;
var ai=window.ai;
var lib=window.lib;
var _status=window._status;
return {
name:'wuxing',
arenaReady:function(){
if(_status.connectMode) return;
lib.card.list.splice(Math.floor(lib.card.list.length*Math.random()),0,['spade',5,'wuxingpan']);
if(!_status.video){
lib.video.push({
type:'play',
name:'wuxing'
});
}
},
card:{
init:function(card){
if(_status.video||_status.connectMode) return;
if(card.name=='wuxingpan') return;
if(card.wunature) return;
if(Math.random()>(parseFloat(lib.config.wuxing_num_playpackconfig)||0)) return;
var node=ui.create.div('.wunature',card);
var list=['metal','wood','water','fire','soil'];
var nature=list.randomGet();
card.wunature=nature;
node.dataset.nature=nature;
node.innerHTML=get.translation(nature);
card.node.wuxing=node;
if(!card.suit||!card.number){
card.node.wuxing.style.display='none';
video:function(){
for(var i in this.translate){
lib.translate[i]=this.translate[i];
}
for(var i in this.card){
lib.card[i]=this.card[i];
}
for(var i in this.skill){
lib.skill[i]=this.skill[i];
}
},
element:{
player:{
init:function(player){
if(player.node.wuxing){
player.node.wuxing.remove();
}
if(_status.video||_status.connectMode) return;
var node=ui.create.div('.wunature',player);
var list=['metal','wood','water','fire','soil'];
var nature=list.randomGet();
player.wunature=nature;
node.dataset.nature=nature;
node.innerHTML=get.translation(nature);
player.node.wuxing=node;
}
},
card:{
init:function(card){
if(_status.video||_status.connectMode) return;
if(card.name=='wuxingpan') return;
if(card.wunature) return;
if(Math.random()>(parseFloat(lib.config.wuxing_num_playpackconfig)||0)) return;
var node=ui.create.div('.wunature',card);
var list=['metal','wood','water','fire','soil'];
var nature=list.randomGet();
card.wunature=nature;
node.dataset.nature=nature;
node.innerHTML=get.translation(nature);
card.node.wuxing=node;
if(!card.suit||!card.number){
card.node.wuxing.style.display='none';
}
}
}
}
},
skill:{
_shengke:{
trigger:{target:'useCardToBegin'},
forced:true,
popup:false,
filter:function(event,player){
if(_status.connectMode) return false;
return event.card.wunature&&player.wunature;
},
content:function(){
switch(trigger.card.wunature){
case 'metal':
switch(player.wunature){
case 'wood':
if(player.countCards('he')){
game.log(player,'被'+get.translation(trigger.card.wunature)+'属性的卡牌克制');
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;
}
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;
case 'fire':
game.log(player,'得到'+get.translation(trigger.card.wunature)+'属性卡牌的加成');
player.draw();player.popup('木生火');
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;
case 'wood':
game.log(player,'得到'+get.translation(trigger.card.wunature)+'属性卡牌的加成');
player.draw();player.popup('水生木');
return;
}
return;
case 'fire':
switch(player.wunature){
},
skill:{
_shengke:{
trigger:{target:'useCardToBegin'},
forced:true,
popup:false,
filter:function(event,player){
if(_status.connectMode) return false;
return event.card.wunature&&player.wunature;
},
content:function(){
switch(trigger.card.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;
case 'soil':
game.log(player,'得到'+get.translation(trigger.card.wunature)+'属性卡牌的加成');
player.draw();player.popup('火生土');
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;
case 'metal':
game.log(player,'得到'+get.translation(trigger.card.wunature)+'属性卡牌的加成');
player.draw();player.popup('土生金');
return;
}
return;
}
},
ai:{
effect:{
target:function(card,player,target,current){
switch(card.wunature){
case 'metal':
switch(target.wunature){
case 'wood':if(current!=0) return [1,-0.3];return;
case 'water':if(current!=0) return [1,0.3];return;
}
return;
switch(player.wunature){
case 'wood':
switch(target.wunature){
case 'soil':if(current!=0) return [1,-0.3];return;
case 'fire':if(current!=0) return [1,0.3];return;
}
return;
if(player.countCards('he')){
game.log(player,'被'+get.translation(trigger.card.wunature)+'属性的卡牌克制');
player.chooseToDiscard('你被金属性卡牌克制,需弃置一张牌',true,'he').ai=get.disvalue;player.popup('金克木')}return;
case 'water':
switch(target.wunature){
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];return;
case 'soil':if(current!=0) return [1,0.3];return;
}
return;
game.log(player,'得到'+get.translation(trigger.card.wunature)+'属性卡牌的加成');
player.draw();player.popup('金生水');
return;
}
return;
case 'wood':
switch(player.wunature){
case 'soil':
switch(target.wunature){
case 'water':if(current!=0) return [1,-0.3];return;
case 'metal':if(current!=0) return [1,0.3];return;
if(player.countCards('he')){
game.log(player,'被'+get.translation(trigger.card.wunature)+'属性的卡牌克制');
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;
}
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;
case 'wood':
game.log(player,'得到'+get.translation(trigger.card.wunature)+'属性卡牌的加成');
player.draw();player.popup('水生木');
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;
case 'soil':
game.log(player,'得到'+get.translation(trigger.card.wunature)+'属性卡牌的加成');
player.draw();player.popup('火生土');
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;
case 'metal':
game.log(player,'得到'+get.translation(trigger.card.wunature)+'属性卡牌的加成');
player.draw();player.popup('土生金');
return;
}
return;
}
},
ai:{
effect:{
target:function(card,player,target,current){
switch(card.wunature){
case 'metal':
switch(target.wunature){
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];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];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];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];return;
case 'metal':if(current!=0) return [1,0.3];return;
}
return;
}
return;
}
}
}
},
wuxingpan_skill:{
enable:'phaseUse',
usable:1,
filterCard:true,
lose:false,
prompt:'选择一张手牌永久改变其五行属性',
content:function(){
"step 0"
player.chooseControl('metal','wood','water','fire','soil');
"step 1"
var card=cards[0];
if(!card.node.wuxing){
card.node.wuxing=ui.create.div('.wunature',card);
}
card.wunature=result.control;
card.node.wuxing.dataset.nature=result.control;
card.node.wuxing.innerHTML=get.translation(result.control);
}
}
},
wuxingpan_skill:{
enable:'phaseUse',
usable:1,
filterCard:true,
lose:false,
prompt:'选择一张手牌永久改变其五行属性',
content:function(){
"step 0"
player.chooseControl('metal','wood','water','fire','soil');
"step 1"
var card=cards[0];
if(!card.node.wuxing){
card.node.wuxing=ui.create.div('.wunature',card);
}
card.wunature=result.control;
card.node.wuxing.dataset.nature=result.control;
card.node.wuxing.innerHTML=get.translation(result.control);
card:{
wuxingpan:{
type:'equip',
subtype:'equip5',
skills:['wuxingpan_skill'],
fullskin:true
}
},
translate:{
metal:'金',
wood:'木',
water:'水',
soil:'土',
goldColor:'rgb(236,236,130)',
woodColor:'rgb(149,202,147)',
waterColor:'rgb(150,88,201)',
fireColor:'rgb(236,132,106)',
soilColor:'rgb(201,159,98)',
goldColor2:'rgba(236,236,57,0.3)',
woodColor2:'rgba(33,155,10,0.3)',
waterColor2:'rgba(29,156,255,0.3)',
fireColor2:'rgba(255,51,0,0.3)',
soilColor2:'rgba(163,98,0,0.3)',
wuxingpan:'五行盘',
wuxingpan_skill:'五行',
wuxingpan_skill_info:'出牌阶段限一次,你可以永久改变一张手牌的五行属性',
wuxingpan_info:'出牌阶段限一次,你可以永久改变一张手牌的五行属性',
},
help:{
'五行生克':'<ul><li>每名角色在游戏开始时随机获得一个属性<li>牌堆中三分之一的牌会随机获得一个属性<li>当一名成为相克属性卡牌的目标时,'+
'须弃置一张牌<li>当一名角色成为相生的卡牌的目标时,须摸一张牌'+
'<li>金克木,金生水;<br>木克土,木生火;<br>水克火,水生木;<br>火克金,火生土;<br>土克水,土生金'
}
},
card:{
wuxingpan:{
type:'equip',
subtype:'equip5',
skills:['wuxingpan_skill'],
fullskin:true
}
},
translate:{
metal:'金',
wood:'木',
water:'水',
soil:'土',
goldColor:'rgb(236,236,130)',
woodColor:'rgb(149,202,147)',
waterColor:'rgb(150,88,201)',
fireColor:'rgb(236,132,106)',
soilColor:'rgb(201,159,98)',
goldColor2:'rgba(236,236,57,0.3)',
woodColor2:'rgba(33,155,10,0.3)',
waterColor2:'rgba(29,156,255,0.3)',
fireColor2:'rgba(255,51,0,0.3)',
soilColor2:'rgba(163,98,0,0.3)',
wuxingpan:'五行盘',
wuxingpan_skill:'五行',
wuxingpan_skill_info:'出牌阶段限一次,你可以永久改变一张手牌的五行属性',
wuxingpan_info:'出牌阶段限一次,你可以永久改变一张手牌的五行属性',
},
help:{
'五行生克':'<ul><li>每名角色在游戏开始时随机获得一个属性<li>牌堆中三分之一的牌会随机获得一个属性<li>当一名成为相克属性卡牌的目标时,'+
'须弃置一张牌<li>当一名角色成为相生的卡牌的目标时,须摸一张牌'+
'<li>金克木,金生水;<br>木克土,木生火;<br>水克火,水生木;<br>火克金,火生土;<br>土克水,土生金'
}
};
});

View File

@ -6474,6 +6474,11 @@
window.game=game;
window.lib=lib;
window.ui=ui;
window.ai=ai;
window.get=get;
window._status=_status;
var styleToLoad=6;
var styleLoaded=function(){
styleToLoad--;
@ -6922,16 +6927,21 @@
var character=lib.imported.character;
var play=lib.imported.play;
delete window.game;
delete window.ui;
delete window.get;
delete window.ai;
delete window.lib;
delete window._status;
var i,j,k;
for(i in mode[lib.config.mode].element){
if(!lib.element[i]) lib.element[i]=[];
for(j in mode[lib.config.mode].element[i]){
if(j=='init'){
if(!lib.element[i].inits) lib.element[i].inits=[];
lib.element[i].inits.push(lib.init.eval(mode[lib.config.mode].element[i][j]));
lib.element[i].inits.push(mode[lib.config.mode].element[i][j]);
}
else{
lib.element[i][j]=lib.init.eval(mode[lib.config.mode].element[i][j]);
lib.element[i][j]=mode[lib.config.mode].element[i][j];
}
}
}
@ -6939,32 +6949,32 @@
if(typeof mode[lib.config.mode].ai[i]=='object'){
if(ai[i]==undefined) ai[i]={};
for(j in mode[lib.config.mode].ai[i]){
ai[i][j]=lib.init.eval(mode[lib.config.mode].ai[i][j]);
ai[i][j]=mode[lib.config.mode].ai[i][j];
}
}
else{
ai[i]=lib.init.eval(mode[lib.config.mode].ai[i]);
ai[i]=mode[lib.config.mode].ai[i];
}
}
for(i in mode[lib.config.mode].ui){
if(typeof mode[lib.config.mode].ui[i]=='object'){
if(ui[i]==undefined) ui[i]={};
for(j in mode[lib.config.mode].ui[i]){
ui[i][j]=lib.init.eval(mode[lib.config.mode].ui[i][j]);
ui[i][j]=mode[lib.config.mode].ui[i][j];
}
}
else{
ui[i]=lib.init.eval(mode[lib.config.mode].ui[i]);
ui[i]=mode[lib.config.mode].ui[i];
}
}
for(i in mode[lib.config.mode].game){
game[i]=lib.init.eval(mode[lib.config.mode].game[i]);
game[i]=mode[lib.config.mode].game[i];
}
for(i in mode[lib.config.mode].get){
get[i]=lib.init.eval(mode[lib.config.mode].get[i]);
get[i]=mode[lib.config.mode].get[i];
}
lib.init.start=mode[lib.config.mode].start;
lib.init.startBefore=lib.init.eval(mode[lib.config.mode].startBefore);
lib.init.startBefore=mode[lib.config.mode].startBefore;
if(game.onwash){
lib.onwash.push(game.onwash);
delete game.onwash;
@ -6990,11 +7000,11 @@
if(i=='startBefore') continue;
if(lib[i]==undefined) lib[i]=(get.objtype(mode[lib.config.mode][i])=='array')?[]:{};
for(j in mode[lib.config.mode][i]){
lib[i][j]=lib.init.eval(mode[lib.config.mode][i][j]);
lib[i][j]=mode[lib.config.mode][i][j];
}
}
if(typeof mode[lib.config.mode].init=='function'){
(lib.init.eval(mode[lib.config.mode].init))();
mode[lib.config.mode].init();
}
var connectCharacterPack=[];
@ -7037,7 +7047,7 @@
}
else{
if(lib[j][k]==undefined){
lib[j][k]=lib.init.eval(character[i][j][k]);
lib[j][k]=character[i][j][k];
if(j=='card'&&lib[j][k].derivation){
if(!lib.cardPack.mode_derivation){
lib.cardPack.mode_derivation=[k];
@ -7100,7 +7110,7 @@
if(lib.config.cards.contains(i)){
var pile;
if(typeof card[i][j]=='function'){
pile=lib.init.eval(card[i][j])();
pile=card[i][j]();
}
else{
pile=card[i][j];
@ -7131,7 +7141,7 @@
lib[j][k+'_card_config']=card[i][j][k];
}
else{
if(lib[j][k]==undefined) lib[j][k]=lib.init.eval(card[i][j][k]);
if(lib[j][k]==undefined) lib[j][k]=card[i][j][k];
else console.log('dublicate '+j+' in card '+i+':\n'+k+'\n'+lib[j][k]+'\n'+card[i][j][k]);
if(j=='card'&&lib[j][k].derivation){
if(!lib.cardPack.mode_derivation){
@ -7169,10 +7179,10 @@
for(k in play[i].element[j]){
if(k=='init'){
if(!lib.element[j].inits) lib.element[j].inits=[];
lib.element[j].inits.push(lib.init.eval(play[i].element[j][k]));
lib.element[j].inits.push(play[i].element[j][k]);
}
else{
lib.element[j][k]=lib.init.eval(play[i].element[j][k]);
lib.element[j][k]=play[i].element[j][k];
}
}
}
@ -7180,18 +7190,18 @@
if(typeof play[i].ui[j]=='object'){
if(ui[j]==undefined) ui[j]={};
for(k in play[i].ui[j]){
ui[j][k]=lib.init.eval(play[i].ui[j][k]);
ui[j][k]=play[i].ui[j][k];
}
}
else{
ui[j]=lib.init.eval(play[i].ui[j]);
ui[j]=play[i].ui[j];
}
}
for(j in play[i].game){
game[j]=lib.init.eval(play[i].game[j]);
game[j]=play[i].game[j];
}
for(j in play[i].get){
get[j]=lib.init.eval(play[i].get[j]);
get[j]=play[i].get[j];
}
for(j in play[i]){
if(j=='mode'||j=='forbid'||j=='init'||j=='element'||
@ -7204,11 +7214,11 @@
if(lib[j][k]!=undefined){
console.log('dublicate '+j+' in play '+i+':\n'+k+'\n'+': '+lib[j][k]+'\n'+play[i][j][k]);
}
lib[j][k]=lib.init.eval(play[i][j][k]);
lib[j][k]=play[i][j][k];
}
}
}
if(typeof play[i].init=='function') (lib.init.eval(play[i].init))();
if(typeof play[i].init=='function') play[i].init();
if(typeof play[i].arenaReady=='function') lib.arenaReady.push(play[i].arenaReady);
}
}
@ -8668,9 +8678,12 @@
},
loadMode:function(){
'step 0'
event.removegame=window.game!=game;
if(event.removegame) window.game=game;
lib.init.js(lib.assetURL+'mode',event.mode,game.resume);
game.pause();
'step 1'
if(event.removegame) delete window.game;
event.result=lib.imported.mode[event.mode];
delete lib.imported.mode[event.mode];
},
@ -20785,9 +20798,10 @@
if(!lib.imported[type]){
lib.imported[type]={};
}
if(content.name){
lib.imported[type][content.name]=content;
delete content.name;
var content2=content();
if(content2.name){
lib.imported[type][content2.name]=content2;
delete content2.name;
}
}
},
@ -24751,7 +24765,10 @@
return players[0];
},
loadModeAsync:function(name,callback){
var removegame=window.game!=game;
if(removegame) window.game=game;
var script=lib.init.js(lib.assetURL+'mode',name,function(){
if(removegame) delete window.game;
script.remove();
var content=lib.imported.mode[name];
delete lib.imported.mode[name];
@ -24769,7 +24786,10 @@
}
}
}
var removegame=window.game!=game;
if(removegame) window.game=game;
var script=lib.init.js(lib.assetURL+'mode',name,function(){
if(removegame) delete window.game;
script.remove();
var mode=lib.imported.mode;
_status.sourcemode=lib.config.mode;

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,142 +1,150 @@
'use strict';
game.import('mode',{
name:'connect',
start:function(){
var directstartmode=lib.config.directstartmode;
ui.create.menu(true);
var createNode=function(){
if(event.created) return;
if(directstartmode&&lib.node){
ui.exitroom=ui.create.system('退出房间',function(){
game.saveConfig('directstartmode');
game.reload();
},true);
game.switchMode(directstartmode);
return;
}
if(lib.node&&window.require){
ui.startServer=ui.create.system('启动服务器',function(e){
e.stopPropagation();
ui.click.connectMenu();
},true);
}
game.import('mode',function(){
var game=window.game;
var ui=window.ui;
var get=window.get;
var ai=window.ai;
var lib=window.lib;
var _status=window._status;
return {
name:'connect',
start:function(){
var directstartmode=lib.config.directstartmode;
ui.create.menu(true);
var createNode=function(){
if(event.created) return;
if(directstartmode&&lib.node){
ui.exitroom=ui.create.system('退出房间',function(){
game.saveConfig('directstartmode');
game.reload();
},true);
game.switchMode(directstartmode);
return;
}
if(lib.node&&window.require){
ui.startServer=ui.create.system('启动服务器',function(e){
e.stopPropagation();
ui.click.connectMenu();
},true);
}
event.created=true;
var node=ui.create.div('.shadowed');
node.style.width='400px';
node.style.height='30px';
node.style.lineHeight='30px';
node.style.fontFamily='xinwei';
node.style.fontSize='30px';
node.style.padding='10px';
node.style.left='calc(50% - 210px)';
node.style.top='calc(50% - 20px)';
node.style.whiteSpace='nowrap';
node.innerHTML=lib.config.last_ip||lib.hallURL;
node.contentEditable=true;
node.style.webkitUserSelect='text';
node.style.textAlign='center';
event.created=true;
var node=ui.create.div('.shadowed');
node.style.width='400px';
node.style.height='30px';
node.style.lineHeight='30px';
node.style.fontFamily='xinwei';
node.style.fontSize='30px';
node.style.padding='10px';
node.style.left='calc(50% - 210px)';
node.style.top='calc(50% - 20px)';
node.style.whiteSpace='nowrap';
node.innerHTML=lib.config.last_ip||lib.hallURL;
node.contentEditable=true;
node.style.webkitUserSelect='text';
node.style.textAlign='center';
var connect=function(e){
clearTimeout(event.timeout);
if(e) e.preventDefault();
game.saveConfig('last_ip',node.innerHTML);
game.connect(node.innerHTML);
};
node.addEventListener('keydown',function(e){
if(e.keyCode==13){
connect(e);
}
});
ui.window.appendChild(node);
ui.ipnode=node;
var connect=function(e){
clearTimeout(event.timeout);
if(e) e.preventDefault();
game.saveConfig('last_ip',node.innerHTML);
game.connect(node.innerHTML);
};
node.addEventListener('keydown',function(e){
if(e.keyCode==13){
connect(e);
}
});
ui.window.appendChild(node);
ui.ipnode=node;
var text=ui.create.div();
text.style.width='400px';
text.style.height='30px';
text.style.lineHeight='30px';
text.style.fontFamily='xinwei';
text.style.fontSize='30px';
text.style.padding='10px';
text.style.left='calc(50% - 200px)';
text.style.top='calc(50% - 80px)';
text.innerHTML='输入联机地址';
text.style.textAlign='center';
ui.window.appendChild(text);
ui.iptext=text;
var text=ui.create.div();
text.style.width='400px';
text.style.height='30px';
text.style.lineHeight='30px';
text.style.fontFamily='xinwei';
text.style.fontSize='30px';
text.style.padding='10px';
text.style.left='calc(50% - 200px)';
text.style.top='calc(50% - 80px)';
text.innerHTML='输入联机地址';
text.style.textAlign='center';
ui.window.appendChild(text);
ui.iptext=text;
var button=ui.create.div('.menubutton.highlight.large.pointerdiv','连接',connect);
button.style.width='70px';
button.style.left='calc(50% - 35px)';
button.style.top='calc(50% + 60px)';
ui.window.appendChild(button);
ui.ipbutton=button;
var button=ui.create.div('.menubutton.highlight.large.pointerdiv','连接',connect);
button.style.width='70px';
button.style.left='calc(50% - 35px)';
button.style.top='calc(50% + 60px)';
ui.window.appendChild(button);
ui.ipbutton=button;
ui.hall_button=ui.create.system('联机大厅',function(){
node.innerHTML=get.config('hall_ip')||lib.hallURL;
connect();
},true);
if(!get.config('hall_button')){
ui.hall_button.style.display='none';
}
ui.recentIP=ui.create.system('最近连接',null,true);
var clickLink=function(){
node.innerHTML=this.innerHTML;
connect();
};
lib.setPopped(ui.recentIP,function(){
if(!lib.config.recentIP.length) return;
var uiintro=ui.create.dialog('hidden');
uiintro.listen(function(e){
e.stopPropagation();
});
var list=ui.create.div('.caption');
for(var i=0;i<lib.config.recentIP.length;i++){
ui.create.div('.text.textlink',list,clickLink).innerHTML=get.trimip(lib.config.recentIP[i]);
}
uiintro.add(list);
var clear=uiintro.add('<div class="text center">清除</div>');
clear.style.paddingTop=0;
clear.style.paddingBottom='3px';
clear.listen(function(){
lib.config.recentIP.length=0;
game.saveConfig('recentIP',[]);
uiintro.delete();
});
return uiintro;
},220);
lib.init.onfree();
}
if(window.isNonameServer){
game.connect(window.isNonameServerIp||'localhost');
}
else if(lib.config.reconnect_info){
var info=lib.config.reconnect_info;
game.onlineID=info[1];
game.roomId=info[2];
var n=5;
var connect=function(){
game.connect(info[0],function(success){
if(!success&&n--){
createNode();
event.timeout=setTimeout(connect,1000);
}
});
};
event.timeout=setTimeout(connect,500);
_status.createNodeTimeout=setTimeout(createNode,2000);
}
else{
createNode();
}
_status.connectDenied=createNode;
for(var i in lib.element.event){
event.parent[i]=lib.element.event[i];
}
event.parent.custom={
add:{},
replace:{}
};
setTimeout(lib.init.onfree,1000);
}
ui.hall_button=ui.create.system('联机大厅',function(){
node.innerHTML=get.config('hall_ip')||lib.hallURL;
connect();
},true);
if(!get.config('hall_button')){
ui.hall_button.style.display='none';
}
ui.recentIP=ui.create.system('最近连接',null,true);
var clickLink=function(){
node.innerHTML=this.innerHTML;
connect();
};
lib.setPopped(ui.recentIP,function(){
if(!lib.config.recentIP.length) return;
var uiintro=ui.create.dialog('hidden');
uiintro.listen(function(e){
e.stopPropagation();
});
var list=ui.create.div('.caption');
for(var i=0;i<lib.config.recentIP.length;i++){
ui.create.div('.text.textlink',list,clickLink).innerHTML=get.trimip(lib.config.recentIP[i]);
}
uiintro.add(list);
var clear=uiintro.add('<div class="text center">清除</div>');
clear.style.paddingTop=0;
clear.style.paddingBottom='3px';
clear.listen(function(){
lib.config.recentIP.length=0;
game.saveConfig('recentIP',[]);
uiintro.delete();
});
return uiintro;
},220);
lib.init.onfree();
}
if(window.isNonameServer){
game.connect(window.isNonameServerIp||'localhost');
}
else if(lib.config.reconnect_info){
var info=lib.config.reconnect_info;
game.onlineID=info[1];
game.roomId=info[2];
var n=5;
var connect=function(){
game.connect(info[0],function(success){
if(!success&&n--){
createNode();
event.timeout=setTimeout(connect,1000);
}
});
};
event.timeout=setTimeout(connect,500);
_status.createNodeTimeout=setTimeout(createNode,2000);
}
else{
createNode();
}
_status.connectDenied=createNode;
for(var i in lib.element.event){
event.parent[i]=lib.element.event[i];
}
event.parent.custom={
add:{},
replace:{}
};
setTimeout(lib.init.onfree,1000);
}
};
});

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,10 +1,18 @@
'use strict';
game.import('mode',{
name:'realtime',
start:function(){
game.import('mode',function(){
var game=window.game;
var ui=window.ui;
var get=window.get;
var ai=window.ai;
var lib=window.lib;
var _status=window._status;
return {
name:'realtime',
start:function(){
},
game:{
},
game:{
}
}
};
});

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff