This commit is contained in:
parent
179e58dad5
commit
3f66e72793
|
@ -11,6 +11,7 @@ card.extra={
|
|||
},
|
||||
usable:1,
|
||||
selectTarget:-1,
|
||||
modTarget:true,
|
||||
filterTarget:function(card,player,target){
|
||||
return target==player;
|
||||
},
|
||||
|
@ -22,20 +23,22 @@ card.extra={
|
|||
}
|
||||
}
|
||||
else{
|
||||
game.broadcastAll(function(target,card){
|
||||
game.broadcastAll(function(target,card,gain2){
|
||||
target.addSkill('jiu');
|
||||
if(!target.node.jiu&&lib.config.jiu_effect){
|
||||
target.node.jiu=ui.create.div('.playerjiu',target.node.avatar);
|
||||
target.node.jiu2=ui.create.div('.playerjiu',target.node.avatar2);
|
||||
}
|
||||
if(card.clone&&(card.clone.parentNode==target.parentNode||card.clone.parentNode==ui.arena)){
|
||||
if(gain2&&card.clone&&(card.clone.parentNode==target.parentNode||card.clone.parentNode==ui.arena)){
|
||||
card.clone.moveDelete(target);
|
||||
}
|
||||
},target,card);
|
||||
},target,card,target==targets[0]);
|
||||
if(target==targets[0]){
|
||||
if(card.clone&&(card.clone.parentNode==target.parentNode||card.clone.parentNode==ui.arena)){
|
||||
game.addVideo('gain2',target,get.cardsInfo([card]));
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
ai:{
|
||||
basic:{
|
||||
|
|
|
@ -14,6 +14,7 @@ card.guozhan={
|
|||
if(player.identity=='ye') return true;
|
||||
return player.identity!=target.identity;
|
||||
},
|
||||
multitarget:true,
|
||||
content:function(){
|
||||
game.asyncDraw([target,player],[1,get.mode()=='guozhan'?3:1]);
|
||||
},
|
||||
|
|
|
@ -319,6 +319,7 @@ card.hearth={
|
|||
return player==target;
|
||||
},
|
||||
selectTarget:-1,
|
||||
modTarget:true,
|
||||
content:function(){
|
||||
target.changeHujia();
|
||||
target.draw();
|
||||
|
@ -441,6 +442,7 @@ card.hearth={
|
|||
type:'basic',
|
||||
enable:true,
|
||||
selectTarget:-1,
|
||||
modTarget:true,
|
||||
filterTarget:function(card,player,target){return player==target},
|
||||
content:function(){
|
||||
target.gainMaxHp();
|
||||
|
|
|
@ -206,6 +206,9 @@ card.standard={
|
|||
filterTarget:function(card,player,target){
|
||||
return target==player&&target.hp<target.maxHp;
|
||||
},
|
||||
modTarget:function(card,player,target){
|
||||
return target.hp<target.maxHp;
|
||||
},
|
||||
content:function(){
|
||||
target.recover();
|
||||
},
|
||||
|
@ -726,6 +729,7 @@ card.standard={
|
|||
filterTarget:function(card,player,target){
|
||||
return target==player;
|
||||
},
|
||||
modTarget:true,
|
||||
content:function(){
|
||||
target.draw(2);
|
||||
},
|
||||
|
|
|
@ -252,6 +252,7 @@ card.swd={
|
|||
},
|
||||
usable:1,
|
||||
selectTarget:-1,
|
||||
modTarget:true,
|
||||
filterTarget:function(card,player,target){
|
||||
return target==player;
|
||||
},
|
||||
|
@ -260,7 +261,7 @@ card.swd={
|
|||
if(target==_status.dying) target.recover();
|
||||
else{
|
||||
target.addTempSkill('tianxianjiu',['phaseAfter','shaAfter']);
|
||||
if(card.clone&&(card.clone.parentNode==player.parentNode||card.clone.parentNode==ui.arena)){
|
||||
if(target==targets[0]&&card.clone&&(card.clone.parentNode==player.parentNode||card.clone.parentNode==ui.arena)){
|
||||
card.clone.moveDelete(target);
|
||||
game.addVideo('gain2',target,get.cardsInfo([card]));
|
||||
}
|
||||
|
|
170
character/sp.js
170
character/sp.js
|
@ -58,7 +58,7 @@ character.sp={
|
|||
|
||||
guansuo:['male','shu',4,['zhengnan','xiefang']],
|
||||
tadun:['male','qun',4,['luanzhan']],
|
||||
// yanbaihu:['male','qun',4,['zhidao','jili']],
|
||||
yanbaihu:['male','qun',4,['zhidao','jili']],
|
||||
},
|
||||
perfectPair:{
|
||||
zhugejin:['zhugeke'],
|
||||
|
@ -79,6 +79,172 @@ character.sp={
|
|||
cuiyan:['caocao'],
|
||||
},
|
||||
skill:{
|
||||
jili:{
|
||||
trigger:{global:'useCard'},
|
||||
forced:true,
|
||||
filter:function(event,player){
|
||||
if(get.color(event.card)!='red') return false;
|
||||
if(!event.targets) return false;
|
||||
if(event.player==player) return false;
|
||||
if(event.targets.contains(player)) return false;
|
||||
var type=get.type(event.card);
|
||||
if(type!='basic'&&type!='trick') return false;
|
||||
if(lib.filter.targetEnabled2(event.card,event.player,player)){
|
||||
for(var i=0;i<event.targets.length;i++){
|
||||
if(get.distance(event.targets[i],player)<=1) return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
},
|
||||
content:function(){
|
||||
'step 0'
|
||||
game.delay(0.5);
|
||||
'step 1'
|
||||
trigger.targets.add(player);
|
||||
trigger.player.line(player,'green');
|
||||
}
|
||||
},
|
||||
zhidao:{
|
||||
trigger:{source:'damageEnd'},
|
||||
filter:function(event,player){
|
||||
return _status.currentPhase==player&&event.player.isAlive()&&
|
||||
event.player.num('hej')>0&&event.player!=player&&!player.skills.contains('zhidao2');
|
||||
},
|
||||
forced:true,
|
||||
content:function(){
|
||||
var num=0;
|
||||
if(trigger.player.num('h')) num++;
|
||||
if(trigger.player.num('e')) num++;
|
||||
if(trigger.player.num('j')) num++;
|
||||
if(num){
|
||||
player.gainPlayerCard(trigger.player,num,'hej',true).set('filterButton',function(button){
|
||||
for(var i=0;i<ui.selected.buttons.length;i++){
|
||||
if(get.position(button.link)==get.position(ui.selected.buttons[i].link)) return false;
|
||||
}
|
||||
return true;
|
||||
});
|
||||
}
|
||||
player.addTempSkill('zhidao2','phaseAfter');
|
||||
}
|
||||
},
|
||||
zhidao2:{
|
||||
mod:{
|
||||
playerEnabled:function(card,player,target){
|
||||
if(player!=target) return false;
|
||||
}
|
||||
}
|
||||
},
|
||||
luanzhan:{
|
||||
mod:{
|
||||
selectTarget:function(card,player,range){
|
||||
if(!player.storage.luanzhan) return;
|
||||
if(range[1]==-1) return;
|
||||
if(card.name=='sha') range[1]+=player.storage.luanzhan;
|
||||
if(get.color(card)=='black'&&get.type(card)=='trick'){
|
||||
var info=get.info(card);
|
||||
if(info.multitarget) return false;
|
||||
range[1]+=player.storage.luanzhan;
|
||||
}
|
||||
},
|
||||
},
|
||||
trigger:{source:'damageEnd'},
|
||||
forced:true,
|
||||
popup:false,
|
||||
silent:true,
|
||||
mark:true,
|
||||
intro:{
|
||||
content:function(storage){
|
||||
return '可以额外指定'+storage+'个目标';
|
||||
}
|
||||
},
|
||||
init:function(player){
|
||||
player.storage.luanzhan=0;
|
||||
},
|
||||
content:function(){
|
||||
if(typeof player.storage.luanzhan=='number'){
|
||||
player.storage.luanzhan+=trigger.num;
|
||||
}
|
||||
else{
|
||||
player.storage.luanzhan=trigger.num;
|
||||
}
|
||||
player.markSkill('luanzhan');
|
||||
},
|
||||
group:'luanzhan_cancel',
|
||||
subSkill:{
|
||||
cancel:{
|
||||
trigger:{player:'useCard'},
|
||||
forced:true,
|
||||
filter:function(event,player){
|
||||
if(!player.storage.luanzhan) return false;
|
||||
var check=false;
|
||||
var card=event.card;
|
||||
if(card.name=='sha'){
|
||||
check=true;
|
||||
}
|
||||
else if(get.color(card)=='black'&&get.type(card)=='trick'){
|
||||
var info=get.info(card);
|
||||
if(!info.multitarget){
|
||||
check=true;
|
||||
if(info.selectTarget==-1){
|
||||
check=false;
|
||||
}
|
||||
else if(Array.isArray(info.selectTarget)&&info.selectTarget[1]==-1){
|
||||
check=false;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(check&&event.targets&&event.targets.length<player.storage.luanzhan){
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
content:function(){
|
||||
player.storage.luanzhan=0;
|
||||
player.markSkill('luanzhan');
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
zhengnan:{
|
||||
trigger:{global:'dieAfter'},
|
||||
frequent:true,
|
||||
content:function(){
|
||||
'step 0'
|
||||
player.draw(3);
|
||||
var list=[];
|
||||
if(!player.hasSkill('wusheng')){
|
||||
list.push('wusheng');
|
||||
}
|
||||
if(!player.hasSkill('dangxian')){
|
||||
list.push('dangxian');
|
||||
}
|
||||
if(!player.hasSkill('zhiman')){
|
||||
list.push('zhiman');
|
||||
}
|
||||
if(list.length){
|
||||
player.chooseControl(list).set('prompt','选择获得一项技能');
|
||||
}
|
||||
'step 1'
|
||||
player.addSkill(result.control);
|
||||
player.popup(result.control);
|
||||
game.log(player,'获得技能','【'+get.translation(result.control)+'】');
|
||||
},
|
||||
ai:{
|
||||
threaten:1.4
|
||||
}
|
||||
},
|
||||
xiefang:{
|
||||
mod:{
|
||||
globalFrom:function(from,to,distance){
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
if(game.players[i].sex=='female'){
|
||||
distance--;
|
||||
}
|
||||
}
|
||||
return distance;
|
||||
}
|
||||
}
|
||||
},
|
||||
qizhi:{
|
||||
trigger:{player:'useCard'},
|
||||
direct:true,
|
||||
|
@ -5546,7 +5712,7 @@ character.sp={
|
|||
yanbaihu:'严白虎',
|
||||
|
||||
zhidao:'雉盗',
|
||||
zhidao_info:'锁定技,当你于出牌阶段内第一次对区域里有牌的其他角色造成伤害后,你获得其手牌、装备区和判定区里的各一张牌,然后直到回合结束,其他角色不能被选择为你使用牌的目标',
|
||||
zhidao_info:'锁定技,当你于你的回合内第一次对区域里有牌的其他角色造成伤害后,你获得其手牌、装备区和判定区里的各一张牌,然后直到回合结束,其他角色不能被选择为你使用牌的目标',
|
||||
jili:'寄篱',
|
||||
jili_info:'锁定技,当一名其他角色成为红色基本牌或红色非延时类锦囊牌的目标时,若其与你的距离为1且你既不是此牌的使用者也不是目标,你也成为此牌的目标',
|
||||
luanzhan:'乱战',
|
||||
|
|
|
@ -66,8 +66,8 @@ character.yijiang={
|
|||
xin_yujin:['male','wei',4,['jieyue']],
|
||||
xin_liru:['male','qun',3,['xinjuece','xinmieji','xinfencheng']],
|
||||
|
||||
// guohuanghou:['female','wei',3,['jiaozhao','danxin']],
|
||||
// liuyu:['male','qun',2,['zhige','zongzuo']],
|
||||
guohuanghou:['female','wei',3,['jiaozhao','danxin']],
|
||||
liuyu:['male','qun',2,['zhige','zongzuo']],
|
||||
liyan:['male','shu',3,['duliang','fulin']],
|
||||
sundeng:['male','wu',4,['kuangbi']],
|
||||
},
|
||||
|
@ -88,6 +88,283 @@ character.yijiang={
|
|||
guanping:['guanyu'],
|
||||
},
|
||||
skill:{
|
||||
jiaozhao:{
|
||||
enable:'phaseUse',
|
||||
usable:1,
|
||||
check:function(card){
|
||||
return 8-ai.get.value(card);
|
||||
},
|
||||
filterCard:true,
|
||||
discard:false,
|
||||
lose:false,
|
||||
content:function(){
|
||||
'step 0'
|
||||
player.showCards(cards);
|
||||
'step 1'
|
||||
if(player.storage.jiaozhao2){
|
||||
event.target=player;
|
||||
}
|
||||
else{
|
||||
var targets=game.players.slice(0);
|
||||
targets.remove(player);
|
||||
targets.sort(function(a,b){
|
||||
return Math.max(1,get.distance(player,a))-Math.max(1,get.distance(player,b));
|
||||
});
|
||||
var distance=Math.max(1,get.distance(player,targets[0]));
|
||||
for(var i=1;i<targets.length;i++){
|
||||
if(Math.max(1,get.distance(player,targets[i]))>distance){
|
||||
targets.splice(i);break;
|
||||
}
|
||||
}
|
||||
player.chooseTarget(true,function(card,player,target){
|
||||
return _status.event.targets.contains(target);
|
||||
}).set('ai',function(target){
|
||||
return ai.get.attitude(_status.event.player,target);
|
||||
}).set('targets',targets);
|
||||
}
|
||||
'step 2'
|
||||
if(!event.target){
|
||||
event.target=result.targets[0];
|
||||
player.line(result.targets,'green');
|
||||
}
|
||||
if(!event.target){
|
||||
event.finish();
|
||||
return;
|
||||
}
|
||||
var list=['sha','shan','tao','jiu'];
|
||||
if(player.storage.jiaozhao1){
|
||||
list=list.concat(['taoyuan','wugu','juedou','huogong','jiedao','tiesuo','guohe','shunshou','wuzhong','wanjian','nanman']);
|
||||
}
|
||||
for(var i=0;i<list.length;i++){
|
||||
if(i<=4){
|
||||
list[i]=['基本','',list[i]];
|
||||
}
|
||||
else{
|
||||
list[i]=['锦囊','',list[i]];
|
||||
}
|
||||
}
|
||||
var att=ai.get.attitude(event.target,player);
|
||||
event.target.chooseButton(['矫诏',[list,'vcard']],true).set('ai',function(button){
|
||||
if(att<=0){
|
||||
return button.link=='shan'?1:0;
|
||||
}
|
||||
else{
|
||||
if(!_status.event.trick){
|
||||
return button.link=='sha'?1:0;
|
||||
}
|
||||
var player=_status.event.player;
|
||||
var recover=0,lose=1;
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
if(!game.players[i].isOut()&&game.players[i]!=player){
|
||||
if(game.players[i].hp<game.players[i].maxHp){
|
||||
if(ai.get.attitude(player,game.players[i])>0){
|
||||
if(game.players[i].hp<2){
|
||||
lose--;
|
||||
recover+=0.5;
|
||||
}
|
||||
lose--;
|
||||
recover++;
|
||||
}
|
||||
else if(ai.get.attitude(player,game.players[i])<0){
|
||||
if(game.players[i].hp<2){
|
||||
lose++;
|
||||
recover-=0.5;
|
||||
}
|
||||
lose++;
|
||||
recover--;
|
||||
}
|
||||
}
|
||||
else{
|
||||
if(ai.get.attitude(player,game.players[i])>0){
|
||||
lose--;
|
||||
}
|
||||
else if(ai.get.attitude(player,game.players[i])<0){
|
||||
lose++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(lose>recover&&lose>0) return (button.link[2]=='nanman')?1:-1;
|
||||
if(lose<recover&&recover>0) return (button.link[2]=='taoyuan')?1:-1;
|
||||
return (button.link[2]=='shunshou')?1:-1;
|
||||
}
|
||||
}).set('att',att).set('trick',player.storage.jiaozhao1);
|
||||
'step 3'
|
||||
event.target.showCards(game.createCard(result.links[0]),get.translation(event.target)+'声明了'+get.translation(result.links[0][2]));
|
||||
player.storage.jiaozhao=cards[0];
|
||||
player.storage.jiaozhao_card=result.links[0][2];
|
||||
game.broadcastAll(function(name){
|
||||
lib.skill.jiaozhao2.viewAs={name:name};
|
||||
},result.links[0][2]);
|
||||
},
|
||||
ai:{
|
||||
order:9,
|
||||
result:{
|
||||
player:1
|
||||
}
|
||||
},
|
||||
intro:{
|
||||
content:function(storage,player){
|
||||
if(player.storage.jiaozhao2){
|
||||
return '出牌阶段限一次,你可以展示一张手牌,然后你声明一张基本牌或非延时类锦囊牌的牌名。在此出牌阶段内,你可以将此手牌当声明的牌使用且你不能被选择为目标';
|
||||
}
|
||||
else{
|
||||
return '出牌阶段限一次,你可以展示一张手牌,然后选择距离最近的一名其他角色,该角色声明一张基本牌或非延时类锦囊牌的牌名。在此出牌阶段内,你可以将此手牌当声明的牌使用且你不能被选择为目标';
|
||||
}
|
||||
}
|
||||
},
|
||||
group:['jiaozhao2','jiaozhao3']
|
||||
},
|
||||
jiaozhao2:{
|
||||
enable:'phaseUse',
|
||||
filter:function(event,player){
|
||||
if(!player.storage.jiaozhao) return false;
|
||||
var name=player.storage.jiaozhao_card;
|
||||
if(name=='tao'||name=='shan'||name=='wuzhong'||name=='jiu') return false;
|
||||
return player.get('h').contains(player.storage.jiaozhao);
|
||||
},
|
||||
filterCard:function(card,player){
|
||||
return card==player.storage.jiaozhao;
|
||||
},
|
||||
selectCard:-1,
|
||||
popname:true,
|
||||
filterTarget:function(card,player,target){
|
||||
if(player==target) return false;
|
||||
return lib.filter.filterTarget({name:player.storage.jiaozhao_card},player,target);
|
||||
},
|
||||
},
|
||||
jiaozhao3:{
|
||||
trigger:{player:'phaseEnd'},
|
||||
forced:true,
|
||||
popup:false,
|
||||
content:function(){
|
||||
delete player.storage.jiaozhao;
|
||||
delete player.storage.jiaozhao2;
|
||||
}
|
||||
},
|
||||
danxin:{
|
||||
trigger:{player:'damageEnd'},
|
||||
frequent:true,
|
||||
content:function(){
|
||||
'step 0'
|
||||
if(player.storage.jiaozhao1&&player.storage.jiaozhao2){
|
||||
player.draw();
|
||||
event.finish();
|
||||
}
|
||||
else{
|
||||
var list=['draw_card','更改描述'];
|
||||
var prompt;
|
||||
if(player.storage.jiaozhao1){
|
||||
prompt='摸一张牌或更改矫诏的描述<br><br><div class="text">更改描述:将“选择距离最近的一名其他角色,该角色”改为“你”';
|
||||
}
|
||||
else{
|
||||
prompt='摸一张牌或更改矫诏的描述<br><br><div class="text">更改描述:将“基本牌”改为“基本牌或非延时类锦囊牌”';
|
||||
}
|
||||
player.chooseControl(list,function(){
|
||||
if(!_status.event.player.hasSkill('jiaozhao')) return 'draw_card';
|
||||
return '更改描述';
|
||||
}).set('prompt',prompt);
|
||||
}
|
||||
'step 1'
|
||||
if(result.control=='draw_card'){
|
||||
player.draw();
|
||||
}
|
||||
else{
|
||||
game.log(player,'更改了','【矫诏】','的描述');
|
||||
player.popup('更改描述');
|
||||
player.markSkill('jiaozhao');
|
||||
if(player.storage.jiaozhao1){
|
||||
player.storage.jiaozhao2=true;
|
||||
}
|
||||
else{
|
||||
player.storage.jiaozhao1=true;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
zongzuo:{
|
||||
trigger:{global:'phaseBefore'},
|
||||
forced:true,
|
||||
priority:10,
|
||||
filter:function(event,player){
|
||||
return !player.storage.zongzuo;
|
||||
},
|
||||
content:function(){
|
||||
'step 0'
|
||||
player.storage.zongzuo=true;
|
||||
var list=['wei','shu','wu','qun'],num=0;
|
||||
for(var i=0;i<game.players.length&&list.length;i++){
|
||||
if(list.contains(game.players[i].group)){
|
||||
list.remove(game.players[i].group);
|
||||
num++;
|
||||
}
|
||||
}
|
||||
player.gainMaxHp(num);
|
||||
event.num=num;
|
||||
'step 1'
|
||||
player.hp+=event.num;
|
||||
player.update();
|
||||
},
|
||||
group:'zongzuo_lose',
|
||||
subSkill:{
|
||||
lose:{
|
||||
trigger:{global:'dieAfter'},
|
||||
forced:true,
|
||||
filter:function(event,player){
|
||||
var list=['wei','shu','wu','qun'];
|
||||
if(!list.contains(event.player.group)) return false;
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
if(game.players[i].group==event.player.group){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
},
|
||||
content:function(){
|
||||
player.loseMaxHp();
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
zhige:{
|
||||
enable:'phaseUse',
|
||||
usable:1,
|
||||
filter:function(event,player){
|
||||
return player.num('h')>player.hp;
|
||||
},
|
||||
filterTarget:function(card,player,target){
|
||||
return get.distance(target,player,'attack')<=1&&target.num('e')>0;
|
||||
},
|
||||
content:function(){
|
||||
'step 0'
|
||||
target.chooseToUse({name:'sha'},player,-1,'止戈:使用一张杀,或将其装备区里的一张牌交给'+get.translation(player));
|
||||
'step 1'
|
||||
if(!result.bool&&target.num('e')){
|
||||
target.chooseCard('e',true,'将其装备区里的一张牌交给'+get.translation(player));
|
||||
}
|
||||
else{
|
||||
event.finish();
|
||||
}
|
||||
'step 2'
|
||||
if(result.bool&&result.cards&&result.cards.length){
|
||||
player.gain(result.cards);
|
||||
target.$give(result.cards,player);
|
||||
}
|
||||
},
|
||||
ai:{
|
||||
order:5,
|
||||
result:{
|
||||
target:-1,
|
||||
player:function(player,target){
|
||||
if(target.num('h')==0) return 0;
|
||||
if(target.num('h')==1) return -0.1;
|
||||
if(player.hp<=2) return -2;
|
||||
if(player.num('h','shan')==0) return -1;
|
||||
return -0.5;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
kuangbi:{
|
||||
enable:'phaseUse',
|
||||
usable:1,
|
||||
|
@ -6272,7 +6549,8 @@ character.yijiang={
|
|||
liyan:'李严',
|
||||
|
||||
jiaozhao:'矫诏',
|
||||
jiaozhao_info:'出牌阶段限一次,你可以展示一张手牌,然后选择距离最近的一名其他角色,该角色声明一张基本牌的牌名。直到回合结束,你可以将此手牌当声明的牌使用且你不能被选择为目标',
|
||||
jiaozhao2:'矫诏',
|
||||
jiaozhao_info:'出牌阶段限一次,你可以展示一张手牌,然后选择距离最近的一名其他角色,该角色声明一张基本牌的牌名。在此出牌阶段内,你可以将此手牌当声明的牌使用且你不能被选择为目标',
|
||||
danxin:'殚心',
|
||||
danxin_info:'当你受到伤害后,你可以摸一张牌,或对“矫诏”的描述依次执行下列一项修改:1.将“基本牌”改为“基本牌或非延时类锦囊牌”;2.将“选择距离最近的一名其他角色,该角色”改为“你”',
|
||||
duliang:'督粮',
|
||||
|
|
35
game/game.js
35
game/game.js
|
@ -3828,6 +3828,8 @@
|
|||
if(pilecfg){
|
||||
lib.config.bannedpile=pilecfg[0]||{};
|
||||
lib.config.addedpile=pilecfg[1]||{};
|
||||
lib.config.bannedpile=JSON.parse(JSON.stringify(lib.config.bannedpile));
|
||||
lib.config.addedpile=JSON.parse(JSON.stringify(lib.config.addedpile));
|
||||
}
|
||||
}
|
||||
else{
|
||||
|
@ -5759,7 +5761,7 @@
|
|||
}
|
||||
event.dialog.close();
|
||||
"step 2"
|
||||
if(game.online){
|
||||
if(game.online||!event.result.bool){
|
||||
event.finish();
|
||||
}
|
||||
"step 3"
|
||||
|
@ -11790,6 +11792,14 @@
|
|||
if(typeof filter=='boolean') return filter;
|
||||
if(typeof filter=='function') return filter(card,player,target);
|
||||
},
|
||||
targetEnabled2:function(card,player,target){
|
||||
if(lib.filter.targetEnabled(card,player,target)) return true;
|
||||
if(card==undefined) return false;
|
||||
var filter=get.info(card).modTarget;
|
||||
if(typeof filter=='boolean') return filter;
|
||||
if(typeof filter=='function') return filter(card,player,target);
|
||||
return false;
|
||||
},
|
||||
targetInRange:function(card,player,target){
|
||||
var mod=game.checkMod(card,player,target,'unchanged','targetInRange',player.get('s'));
|
||||
var extra=0;
|
||||
|
@ -16814,11 +16824,11 @@
|
|||
}
|
||||
}
|
||||
|
||||
var pilecfg=lib.config.customcardpile[get.config('cardpilename')];
|
||||
if(pilecfg){
|
||||
lib.config.bannedpile=pilecfg[0]||{};
|
||||
lib.config.addedpile=pilecfg[1]||{};
|
||||
}
|
||||
// var pilecfg=lib.config.customcardpile[get.config('cardpilename')];
|
||||
// if(pilecfg){
|
||||
// lib.config.bannedpile=pilecfg[0]||{};
|
||||
// lib.config.addedpile=pilecfg[1]||{};
|
||||
// }
|
||||
|
||||
try{
|
||||
lib.storage=JSON.parse(localStorage.getItem(lib.configprefix+lib.config.mode));
|
||||
|
@ -19996,7 +20006,10 @@
|
|||
var toggleCardPile=function(bool){
|
||||
var name=this._link.config._name;
|
||||
var number=this._link.config._number;
|
||||
if(!bool){
|
||||
if(!lib.config.bannedpile[name]){
|
||||
lib.config.bannedpile[name]=[];
|
||||
}
|
||||
if(bool){
|
||||
lib.config.bannedpile[name].remove(number);
|
||||
}
|
||||
else{
|
||||
|
@ -20291,8 +20304,8 @@
|
|||
that.innerHTML='使用默认牌堆';
|
||||
},1000);
|
||||
game.saveConfig('cardpilename',null,true);
|
||||
game.saveConfig('bannedpile');
|
||||
game.saveConfig('addedpile');
|
||||
game.saveConfig('bannedpile',{});
|
||||
game.saveConfig('addedpile',{});
|
||||
updatePileConfig();
|
||||
},page);
|
||||
var exportCardPile;
|
||||
|
@ -20326,8 +20339,8 @@
|
|||
lib.config.customcardpile[name]=[lib.config.bannedpile,lib.config.addedpile];
|
||||
game.saveConfig('cardpilename',name,true);
|
||||
game.saveConfig('customcardpile',lib.config.customcardpile);
|
||||
game.saveConfig('bannedpile');
|
||||
game.saveConfig('addedpile');
|
||||
game.saveConfig('bannedpile',{});
|
||||
game.saveConfig('addedpile',{});
|
||||
createPileNode(name);
|
||||
updatePileConfig();
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue