commit
e37fce54ae
31
card/mtg.js
31
card/mtg.js
|
@ -484,36 +484,31 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
||||||
},
|
},
|
||||||
mtg_yixialan_skill:{
|
mtg_yixialan_skill:{
|
||||||
enable:'phaseUse',
|
enable:'phaseUse',
|
||||||
filter:function(event,player){
|
filter:(event,player)=>player.hasCard(card=>lib.skill.mtg_yixialan_skill.filterCard(card,player),'h'),
|
||||||
return player.countCards('h',{type:'basic'})>0;
|
filterCard:(card,player)=>get.type(card)=='basic'&&player.canRecast(card),
|
||||||
},
|
|
||||||
filterCard:{type:'basic'},
|
|
||||||
prepare:function(cards,player){
|
|
||||||
player.$throw(cards,1000);
|
|
||||||
},
|
|
||||||
discard:false,
|
discard:false,
|
||||||
delay:0.5,
|
lose:false,
|
||||||
check:function(card){
|
check:function(card){
|
||||||
return 7-get.value(card);
|
return 7-get.value(card);
|
||||||
},
|
},
|
||||||
usable:1,
|
usable:1,
|
||||||
content:function(){
|
content:function(){
|
||||||
var card=get.cardPile(function(card){
|
player.recast(cards,null,(player,cards)=>{
|
||||||
return get.type(card,'trick')=='trick'
|
const cardsToGain=[];
|
||||||
|
for(let repetition=0;repetition<cards.length;repetition++){
|
||||||
|
const card=get.cardPile(card=>get.type(card,'trick')=='trick');
|
||||||
|
if(card) cardsToGain.push(card);
|
||||||
|
}
|
||||||
|
if(cardsToGain.length) player.gain(cardsToGain,'draw');
|
||||||
|
if(cards.length-cardsToGain.length) player.draw(cards.length-cardsToGain.length).log=false;
|
||||||
});
|
});
|
||||||
if(card){
|
|
||||||
player.gain(card,'draw');
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
player.draw();
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
ai:{
|
ai:{
|
||||||
mapValue:2,
|
mapValue:2,
|
||||||
order:1,
|
order:1,
|
||||||
result:{
|
result:{
|
||||||
player:1,
|
player:1
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mtg_shuimomuxue_skill:{
|
mtg_shuimomuxue_skill:{
|
||||||
|
|
|
@ -450,7 +450,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
||||||
},
|
},
|
||||||
content:function(){
|
content:function(){
|
||||||
'step 0'
|
'step 0'
|
||||||
player.chooseCard('h','是否发动【太公阴符】重铸一张手牌?').set('ai',function(card){
|
player.chooseCard('h','是否发动【太公阴符】重铸一张手牌?',lib.filter.cardRecastable).set('ai',function(card){
|
||||||
return 5-get.value(card);
|
return 5-get.value(card);
|
||||||
});
|
});
|
||||||
'step 1'
|
'step 1'
|
||||||
|
|
|
@ -244,22 +244,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
content:function(){
|
content:function(){
|
||||||
'step 0'
|
'step 0'
|
||||||
var num=trigger.player.countCards('h');
|
var num=trigger.player.countCards('h');
|
||||||
trigger.player.chooseCard('是否重铸任意张牌名字数为'+num+'的牌?',[1,Infinity],'he',(card,player,target)=>{
|
trigger.player.chooseCard('是否重铸任意张牌名字数为'+num+'的牌?',[1,Infinity],'he',(card,player)=>_status.event.cards.contains(card)&&player.canRecast(card)).set('ai',card=>{
|
||||||
if(!_status.event.cards.contains(card)) return false;
|
|
||||||
var mod=game.checkMod(card,player,'unchanged','cardChongzhuable',player);
|
|
||||||
return mod=='unchanged';
|
|
||||||
}).set('ai',card=>{
|
|
||||||
var val=get.value(card);
|
var val=get.value(card);
|
||||||
return 6-val;
|
return 6-val;
|
||||||
}).set('cards',trigger.player.getCards('he',card=>{
|
}).set('cards',trigger.player.getCards('he',card=>{
|
||||||
return lib.skill.dcweidang.getLength(card)==num;
|
return lib.skill.dcweidang.getLength(card)==num;
|
||||||
}));
|
}));
|
||||||
'step 1'
|
'step 1'
|
||||||
if(result.bool){
|
if(result.bool) trigger.player.recast(result.cards);
|
||||||
var cards=result.cards;
|
|
||||||
trigger.player.loseToDiscardpile(cards);
|
|
||||||
trigger.player.draw(cards.length);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//族王允
|
//族王允
|
||||||
|
@ -910,18 +902,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
subSkill:{
|
subSkill:{
|
||||||
global:{
|
global:{
|
||||||
enable:'phaseUse',
|
enable:'phaseUse',
|
||||||
filter:function(event,player){
|
filter:(event,player)=>game.hasPlayer(current=>lib.skill.clanlianzhu_global.filterTarget(null,player,current)),
|
||||||
return game.hasPlayer(current=>lib.skill.clanlianzhu_global.filterTarget(null,player,current));
|
filterCard:(card,player)=>game.hasPlayer(current=>current.hasSkill('clanlianzhu')&&!current.hasSkill('clanlianzhu_targeted')&&!current.storage.clanlianzhu)&&player.canRecast(card),
|
||||||
},
|
|
||||||
filterCard:function(card,player){
|
|
||||||
if(!game.hasPlayer(current=>{
|
|
||||||
if(!current.hasSkill('clanlianzhu')||current.hasSkill('clanlianzhu_targeted')) return false;
|
|
||||||
return !current.storage.clanlianzhu;
|
|
||||||
})) return false;
|
|
||||||
var mod=game.checkMod(card,player,'unchanged','cardChongzhuable',player);
|
|
||||||
if(mod!='unchanged') return mod;
|
|
||||||
return true;
|
|
||||||
},
|
|
||||||
selectCard:[0,1],
|
selectCard:[0,1],
|
||||||
check:function(card){
|
check:function(card){
|
||||||
return 5-get.value(card);
|
return 5-get.value(card);
|
||||||
|
@ -968,10 +950,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
bocchi.sortBySeat();
|
bocchi.sortBySeat();
|
||||||
kita.sortBySeat();
|
kita.sortBySeat();
|
||||||
var str='';
|
var str='';
|
||||||
var getn=function(target){
|
|
||||||
if(player==target) return '自己';
|
|
||||||
return get.translation(target);
|
|
||||||
}
|
|
||||||
if(bocchi.length){
|
if(bocchi.length){
|
||||||
str+='重铸一张牌,然后令';
|
str+='重铸一张牌,然后令';
|
||||||
bocchi.forEach((current,i)=>{
|
bocchi.forEach((current,i)=>{
|
||||||
|
@ -998,19 +976,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
if(target.storage.clanlianzhu) event.goto(4);
|
if(target.storage.clanlianzhu) event.goto(4);
|
||||||
target.changeZhuanhuanji('clanlianzhu');
|
target.changeZhuanhuanji('clanlianzhu');
|
||||||
'step 1'
|
'step 1'
|
||||||
player.loseToDiscardpile(cards);
|
player.recast(cards);
|
||||||
player.draw(cards.length);
|
|
||||||
'step 2'
|
'step 2'
|
||||||
if(!target.countCards('he')&&!_status.connectMode) event._result={bool:false};
|
if(!target.countCards('he')&&!_status.connectMode) event._result={bool:false};
|
||||||
else target.chooseCard('he','联诛:是否重铸一张牌?',(card,player)=>{
|
else target.chooseCard('he','联诛:是否重铸一张牌?',lib.filter.cardRecastable);
|
||||||
var mod=game.checkMod(card,player,'unchanged','cardChongzhuable',player);
|
|
||||||
if(mod!='unchanged') return mod;
|
|
||||||
return true;
|
|
||||||
});
|
|
||||||
'step 3'
|
'step 3'
|
||||||
if(result.bool){
|
if(result.bool){
|
||||||
target.loseToDiscardpile(result.cards);
|
target.recast(result.cards);
|
||||||
target.draw(result.cards.length);
|
|
||||||
if(get.color(cards[0])!=get.color(result.cards[0])) lib.skill.chenliuwushi.change(target,-1);
|
if(get.color(cards[0])!=get.color(result.cards[0])) lib.skill.chenliuwushi.change(target,-1);
|
||||||
}
|
}
|
||||||
event.finish();
|
event.finish();
|
||||||
|
@ -1955,25 +1927,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
}
|
}
|
||||||
if(player.actionHistory[i].isRound) break;
|
if(player.actionHistory[i].isRound) break;
|
||||||
}
|
}
|
||||||
return event.targets&&event.targets.length==1&&(!event.targets[0].isLinked()||
|
return event.targets&&event.targets.length==1&&!event.targets[0].isLinked()||
|
||||||
player.getCards('h',card=>get.suit(card)==get.suit(event.card)).filter(card=>{
|
player.hasCard(card=>get.suit(card)==get.suit(event.card)&&player.canRecast(card),'h');
|
||||||
var mod=game.checkMod(card,player,'unchanged','cardChongzhuable',player);
|
|
||||||
if(mod!='unchanged') return true;
|
|
||||||
return false;
|
|
||||||
}).length==0);
|
|
||||||
},
|
},
|
||||||
content:function(){
|
content:function(){
|
||||||
'step 0'
|
|
||||||
if(trigger.targets&&trigger.targets.length==1){
|
if(trigger.targets&&trigger.targets.length==1){
|
||||||
trigger.targets[0].link(true);
|
trigger.targets[0].link(true);
|
||||||
}
|
}
|
||||||
var cards=player.getCards('h',card=>get.suit(card)==get.suit(trigger.card));
|
var cards=player.getCards('h',card=>get.suit(card)==get.suit(trigger.card)&&player.canRecast(card));
|
||||||
if(cards.length>0){
|
if(cards.length>0) player.recast(cards);
|
||||||
player.loseToDiscardpile(cards);
|
|
||||||
player.draw(cards.length);
|
|
||||||
}
|
|
||||||
'step 1'
|
|
||||||
player.draw();
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
clanhuanyin:{
|
clanhuanyin:{
|
||||||
|
|
|
@ -117,8 +117,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
target.useCard(result.targets,card,event.links);
|
target.useCard(result.targets,card,event.links);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
game.cardsDiscard(event.links);
|
target.recast(event.links,(player,cards)=>game.cardsDiscard(cards));
|
||||||
target.draw(event.links.length);
|
|
||||||
}
|
}
|
||||||
'step 4'
|
'step 4'
|
||||||
for(var card of cards){
|
for(var card of cards){
|
||||||
|
|
|
@ -4919,34 +4919,25 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
audio:2,
|
audio:2,
|
||||||
enable:"phaseUse",
|
enable:"phaseUse",
|
||||||
position:'he',
|
position:'he',
|
||||||
filter:function(event,player){
|
filter:(event,player)=>player.hasCard(card=>lib.skill.chihaya_huairou.filterCard(card,player),lib.skill.chihaya_huairou.position),
|
||||||
return player.countCards('he',{type:'equip'})>0;
|
filterCard:(card,player)=>get.type(card)=='equip'&&player.canRecast(card),
|
||||||
},
|
|
||||||
filterCard:function(card){
|
|
||||||
return get.type(card)=='equip';
|
|
||||||
},
|
|
||||||
check:function(card){
|
check:function(card){
|
||||||
if(!_status.event.player.hasEquipableSlot(get.subtype(card))) return 5;
|
if(!_status.event.player.hasEquipableSlot(get.subtype(card))) return 5;
|
||||||
return 3-get.value(card);
|
return 3-get.value(card);
|
||||||
},
|
},
|
||||||
content:function(){
|
content:function(){
|
||||||
player.draw();
|
player.recast(cards);
|
||||||
},
|
},
|
||||||
discard:false,
|
discard:false,
|
||||||
visible:true,
|
lose:false,
|
||||||
loseTo:'discardPile',
|
delay:false,
|
||||||
prompt:"将一张装备牌置入弃牌堆并摸一张牌",
|
prompt:"将一张装备牌置入弃牌堆并摸一张牌",
|
||||||
delay:0.5,
|
|
||||||
prepare:function(cards,player){
|
|
||||||
player.$throw(cards,1000);
|
|
||||||
game.log(player,'将',cards,'置入了弃牌堆');
|
|
||||||
},
|
|
||||||
ai:{
|
ai:{
|
||||||
order:10,
|
order:10,
|
||||||
result:{
|
result:{
|
||||||
player:1,
|
player:1
|
||||||
},
|
}
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
chihaya_youfeng:{
|
chihaya_youfeng:{
|
||||||
enable:'chooseToUse',
|
enable:'chooseToUse',
|
||||||
|
@ -6035,12 +6026,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
trigger:{player:'phaseDiscardBegin'},
|
trigger:{player:'phaseDiscardBegin'},
|
||||||
forced:true,
|
forced:true,
|
||||||
filter:function(event,player){
|
filter:function(event,player){
|
||||||
return (player.isDamaged()||player.countCards('h')-player.hp>1);
|
return (player.getDamagedHp()>1||player.countCards('h')-player.getHp()>1);
|
||||||
},
|
},
|
||||||
content:function(){
|
content:function(){
|
||||||
var num=0;
|
var num=0;
|
||||||
if(player.isDamaged()) num++;
|
if(player.getDamagedHp()>1) num++;
|
||||||
if(player.countCards('h')-player.hp>1) num++;
|
if(player.countCards('h')-player.getHp()>1) num++;
|
||||||
player.addMark('kotori_qunxin_temp',num,false);
|
player.addMark('kotori_qunxin_temp',num,false);
|
||||||
player.addTempSkill('kotori_qunxin_temp','phaseDiscardEnd');
|
player.addTempSkill('kotori_qunxin_temp','phaseDiscardEnd');
|
||||||
},
|
},
|
||||||
|
@ -16588,11 +16579,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
},
|
},
|
||||||
diyjuntun:{
|
diyjuntun:{
|
||||||
enable:'phaseUse',
|
enable:'phaseUse',
|
||||||
filter:function(event,player){
|
filter:(event,player)=>player.hasCard(card=>lib.skill.diyjuntun.filterCard(card,player),'he'),
|
||||||
return player.countCards('he',{type:'equip'})>0;
|
|
||||||
},
|
|
||||||
position:'he',
|
position:'he',
|
||||||
filterCard:{type:'equip'},
|
filterCard:(card,player)=>get.type(card)=='equip'&&player.canRecast(card),
|
||||||
check:function(card){
|
check:function(card){
|
||||||
var player=_status.event.player;
|
var player=_status.event.player;
|
||||||
var he=player.getCards('he');
|
var he=player.getCards('he');
|
||||||
|
@ -16609,23 +16598,19 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
return 0;
|
return 0;
|
||||||
},
|
},
|
||||||
content:function(){
|
content:function(){
|
||||||
player.draw();
|
player.recast(cards);
|
||||||
},
|
},
|
||||||
discard:false,
|
discard:false,
|
||||||
|
lose:false,
|
||||||
|
delay:false,
|
||||||
prompt:'将一张装备牌置入弃牌堆并摸一张牌',
|
prompt:'将一张装备牌置入弃牌堆并摸一张牌',
|
||||||
delay:0.5,
|
|
||||||
loseTo:'discardPile',
|
|
||||||
prepare:function(cards,player){
|
|
||||||
player.$throw(cards,1000);
|
|
||||||
game.log(player,'将',cards,'置入了弃牌堆');
|
|
||||||
},
|
|
||||||
ai:{
|
ai:{
|
||||||
basic:{
|
basic:{
|
||||||
order:8.5
|
order:8.5
|
||||||
},
|
},
|
||||||
result:{
|
result:{
|
||||||
player:1,
|
player:1
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
choudu:{
|
choudu:{
|
||||||
|
|
|
@ -484,12 +484,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
},
|
},
|
||||||
content:function(){
|
content:function(){
|
||||||
'step 0'
|
'step 0'
|
||||||
var hs=player.getCards('h');
|
player.recast(player.getCards('h',lib.filter.cardRecastable));
|
||||||
event.num=hs.length;
|
|
||||||
player.lose(hs,ui.discardPile);
|
|
||||||
'step 1'
|
'step 1'
|
||||||
player.draw(event.num,'nodelay');
|
|
||||||
'step 2'
|
|
||||||
var targets=player.getEnemies();
|
var targets=player.getEnemies();
|
||||||
if(targets.length){
|
if(targets.length){
|
||||||
player.useCard({name:'sha'},targets.randomGet(),false);
|
player.useCard({name:'sha'},targets.randomGet(),false);
|
||||||
|
@ -1376,29 +1372,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
yangfan:{
|
yangfan:{
|
||||||
trigger:{player:'useCard'},
|
trigger:{player:'useCard'},
|
||||||
forced:true,
|
forced:true,
|
||||||
filter:function(event,player){
|
filter:(event,player)=>get.type(event.card)!='equip'&&player.hasCard(card=>get.color(card)==get.color(trigger.card)&&player.canRecast(card),'h'),
|
||||||
return get.type(event.card)!='equip'&&player.countCards('h',{color:get.color(event.card)})>0;
|
|
||||||
},
|
|
||||||
content:function(){
|
content:function(){
|
||||||
'step 0'
|
'step 0'
|
||||||
var cards=player.getCards('h',{suit:get.suit(trigger.card)});
|
let cards=player.getCards('h',card=>get.suit(card)==get.suit(trigger.card)&&player.canRecast(card));
|
||||||
if(!cards.length){
|
if(!cards.length) cards=player.getCards('h',card=>get.color(card)==get.color(trigger.card)&&player.canRecast(card));
|
||||||
cards=player.getCards('h',{color:get.color(trigger.card)});
|
|
||||||
}
|
|
||||||
if(!cards.length){
|
if(!cards.length){
|
||||||
event.finish();
|
event.finish();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
event.chosen=cards.randomGet();
|
player.recast(cards.randomGet());
|
||||||
game.delay(0.5)
|
|
||||||
'step 1'
|
|
||||||
var card=event.chosen;
|
|
||||||
player.lose(card,ui.discardPile);
|
|
||||||
player.$throw(card,1000);
|
|
||||||
game.delay(0.5);
|
|
||||||
game.log(player,'重铸了',card);
|
|
||||||
'step 2'
|
|
||||||
player.draw().log=false;
|
|
||||||
},
|
},
|
||||||
ai:{
|
ai:{
|
||||||
pretao:true
|
pretao:true
|
||||||
|
|
|
@ -8466,11 +8466,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
filterTarget:true,
|
filterTarget:true,
|
||||||
content:function(){
|
content:function(){
|
||||||
'step 0'
|
'step 0'
|
||||||
target.chooseCard('h',true,'重铸一张手牌');
|
target.chooseCard('h',true,'重铸一张手牌',lib.filter.cardRecastable);
|
||||||
'step 1'
|
'step 1'
|
||||||
if(result.bool&&result.cards.length){
|
if(result.bool&&result.cards.length){
|
||||||
target.$throw(result.cards);
|
target.recast(result.cards,null,(player,cards)=>{
|
||||||
target.lose(result.cards,ui.discardPile);
|
|
||||||
var type=get.type(result.cards[0],'trick');
|
var type=get.type(result.cards[0],'trick');
|
||||||
var name=result.cards[0].name;
|
var name=result.cards[0].name;
|
||||||
var card2=get.cardPile(function(card){
|
var card2=get.cardPile(function(card){
|
||||||
|
@ -8485,8 +8484,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
target.gain(card2,'draw');
|
target.gain(card2,'draw');
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
target.draw();
|
target.draw().log=false;
|
||||||
}
|
}
|
||||||
|
});
|
||||||
var clone=game.createCard(card);
|
var clone=game.createCard(card);
|
||||||
player.gain(clone,'gain2');
|
player.gain(clone,'gain2');
|
||||||
clone.classList.add('glow');
|
clone.classList.add('glow');
|
||||||
|
|
|
@ -571,10 +571,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
},
|
},
|
||||||
content:function(){
|
content:function(){
|
||||||
'step 0'
|
'step 0'
|
||||||
player.chooseCard(get.prompt2('dcjini'),[1,player.maxHp-player.countMark('dcjini_counted')],(card,player,target)=>{
|
player.chooseCard(get.prompt2('dcjini'),[1,player.maxHp-player.countMark('dcjini_counted')],lib.filter.cardRecastable).set('ai',card=>{
|
||||||
var mod=game.checkMod(card,player,'unchanged','cardChongzhuable',player);
|
|
||||||
return mod=='unchanged';
|
|
||||||
}).set('ai',card=>{
|
|
||||||
return 6-get.value(card);
|
return 6-get.value(card);
|
||||||
});
|
});
|
||||||
'step 1'
|
'step 1'
|
||||||
|
@ -583,8 +580,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
player.logSkill('dcjini');
|
player.logSkill('dcjini');
|
||||||
player.addTempSkill('dcjini_counted');
|
player.addTempSkill('dcjini_counted');
|
||||||
player.addMark('dcjini_counted',cards.length,false);
|
player.addMark('dcjini_counted',cards.length,false);
|
||||||
player.loseToDiscardpile(cards);
|
player.recast(cards);
|
||||||
player.draw(cards.length);
|
|
||||||
}
|
}
|
||||||
else event.finish();
|
else event.finish();
|
||||||
'step 2'
|
'step 2'
|
||||||
|
@ -2557,10 +2553,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
content:function(){
|
content:function(){
|
||||||
'step 0'
|
'step 0'
|
||||||
var str=',若重铸的牌中没有'+get.translation(get.type2(trigger.card))+'牌,你于'+get.translation(trigger.cards)+'进入弃牌堆后获得之';
|
var str=',若重铸的牌中没有'+get.translation(get.type2(trigger.card))+'牌,你于'+get.translation(trigger.cards)+'进入弃牌堆后获得之';
|
||||||
player.chooseCard(get.prompt('dcqianzheng'),'重铸两张牌'+(trigger.cards.length?str:'')+'。',2,'he',(card,player,target)=>{
|
player.chooseCard(get.prompt('dcqianzheng'),'重铸两张牌'+(trigger.cards.length?str:'')+'。',2,'he',lib.filter.cardRecastable).set('ai',card=>{
|
||||||
var mod=game.checkMod(card,player,'unchanged','cardChongzhuable',player);
|
|
||||||
return mod=='unchanged';
|
|
||||||
}).set('ai',card=>{
|
|
||||||
var val=get.value(card);
|
var val=get.value(card);
|
||||||
if(get.type2(card)==_status.event.type) val+=0.5;
|
if(get.type2(card)==_status.event.type) val+=0.5;
|
||||||
return 6-val;
|
return 6-val;
|
||||||
|
@ -2569,8 +2562,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
if(result.bool){
|
if(result.bool){
|
||||||
var cards=result.cards;
|
var cards=result.cards;
|
||||||
player.logSkill('dcqianzheng');
|
player.logSkill('dcqianzheng');
|
||||||
player.loseToDiscardpile(cards);
|
player.recast(cards);
|
||||||
player.draw(cards.length);
|
|
||||||
if(cards.every(card=>get.type2(card)!=get.type2(trigger.card))){
|
if(cards.every(card=>get.type2(card)!=get.type2(trigger.card))){
|
||||||
trigger.getParent().dcqianzheng=true;
|
trigger.getParent().dcqianzheng=true;
|
||||||
player.addTempSkill('dcqianzheng_gain');
|
player.addTempSkill('dcqianzheng_gain');
|
||||||
|
@ -3809,21 +3801,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
content:function(){
|
content:function(){
|
||||||
'step 0'
|
'step 0'
|
||||||
player.choosePlayerCard(target,'he',true).set('filterButton',function(button){
|
player.choosePlayerCard(target,'he',true).set('filterButton',function(button){
|
||||||
var player=_status.event.player,card=button.link;
|
var card=button.link,owner=get.owner(card);
|
||||||
if(get.owner(card)==player){
|
return !owner||owner.canRecast(card,_status.event.player);
|
||||||
var mod=game.checkMod(card,player,'unchanged','cardChongzhuable',player);
|
|
||||||
if(mod!='unchanged') return mod;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}).set('ai',function(card){
|
}).set('ai',function(card){
|
||||||
if(get.attitude(_status.event.player,_status.event.getParent().target)>=0) return -get.buttonValue(card);
|
if(get.attitude(_status.event.player,_status.event.getParent().target)>=0) return -get.buttonValue(card);
|
||||||
return get.buttonValue(card);
|
return get.buttonValue(card);
|
||||||
});
|
});
|
||||||
'step 1'
|
'step 1'
|
||||||
if(result.bool){
|
if(result.bool) target.recast(result.links);
|
||||||
target.loseToDiscardpile(result.links);
|
|
||||||
target.draw();
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
ai:{
|
ai:{
|
||||||
expose:0.1,
|
expose:0.1,
|
||||||
|
@ -6874,9 +6859,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
'step 6'
|
'step 6'
|
||||||
if(event.goon1&&event.goon2){
|
if(event.goon1&&event.goon2){
|
||||||
if(player.countMark('chenjian')<2) player.addMark('chenjian',1,false);
|
if(player.countMark('chenjian')<2) player.addMark('chenjian',1,false);
|
||||||
var cards=player.getCards('h');
|
player.recast(player.getCards('h',lib.filter.cardRecastable));
|
||||||
player.loseToDiscardpile(cards);
|
|
||||||
player.draw(cards.length);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
marktext:'见',
|
marktext:'见',
|
||||||
|
|
|
@ -11886,9 +11886,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
result:{
|
result:{
|
||||||
player:function(player){
|
player:function(player){
|
||||||
return 10;
|
return 10;
|
||||||
},
|
}
|
||||||
},
|
}
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
"xinfu_qiaosi":{
|
"xinfu_qiaosi":{
|
||||||
enable:"phaseUse",
|
enable:"phaseUse",
|
||||||
|
|
|
@ -574,19 +574,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
}
|
}
|
||||||
'step 6'
|
'step 6'
|
||||||
if(event.h&&event.hp&&event.e){
|
if(event.h&&event.hp&&event.e){
|
||||||
player.chooseCard('安国:是否重铸任意张牌?',[1,Infinity],(card,player)=>{
|
player.chooseCard('安国:是否重铸任意张牌?',[1,Infinity],lib.filter.cardRecastable,'he').set('ai',card=>{
|
||||||
var mod=game.checkMod(card,player,'unchanged','cardChongzhuable',player);
|
|
||||||
if(mod!='unchanged') return mod;
|
|
||||||
return true;
|
|
||||||
},'he').set('ai',card=>{
|
|
||||||
return 6-get.value(card);
|
return 6-get.value(card);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else event.finish();
|
else event.finish();
|
||||||
'step 7'
|
'step 7'
|
||||||
if(result.bool){
|
if(result.bool){
|
||||||
player.loseToDiscardpile(result.cards);
|
player.recast(result.cards);
|
||||||
player.draw(result.cards.length);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
ai:{
|
ai:{
|
||||||
|
@ -4042,27 +4037,22 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
audio:2,
|
audio:2,
|
||||||
enable:'phaseUse',
|
enable:'phaseUse',
|
||||||
filter:function(event,player){
|
filter:function(event,player){
|
||||||
return player.countCards('h','sha')>0;
|
return player.hasCard(card=>lib.skill.reyanyu.filterCard(card,player),'h');
|
||||||
},
|
|
||||||
filterCard:{name:'sha'},
|
|
||||||
prepare:function(cards,player){
|
|
||||||
player.$throw(cards,1000);
|
|
||||||
game.log(player,'将',cards,'置入了弃牌堆');
|
|
||||||
},
|
},
|
||||||
|
filterCard:(card,player)=>get.name(card)=='sha'&&player.canRecast(card),
|
||||||
discard:false,
|
discard:false,
|
||||||
loseTo:'discardPile',
|
lose:false,
|
||||||
visible:true,
|
delay:false,
|
||||||
delay:0.5,
|
|
||||||
content:function(){
|
content:function(){
|
||||||
player.draw();
|
player.recast(cards);
|
||||||
},
|
},
|
||||||
ai:{
|
ai:{
|
||||||
basic:{
|
basic:{
|
||||||
order:1
|
order:1
|
||||||
},
|
},
|
||||||
result:{
|
result:{
|
||||||
player:1,
|
player:1
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
group:'reyanyu2'
|
group:'reyanyu2'
|
||||||
},
|
},
|
||||||
|
@ -8878,7 +8868,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
enable:'chooseToUse',
|
enable:'chooseToUse',
|
||||||
mark:true,
|
mark:true,
|
||||||
skillAnimation:true,
|
skillAnimation:true,
|
||||||
animationStr:'涅盘',
|
|
||||||
limited:true,
|
limited:true,
|
||||||
animationColor:'orange',
|
animationColor:'orange',
|
||||||
init:function(player){
|
init:function(player){
|
||||||
|
|
|
@ -932,15 +932,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
audio:2,
|
audio:2,
|
||||||
enable:'phaseUse',
|
enable:'phaseUse',
|
||||||
filterCard:{suit:'club'},
|
filterCard:{suit:'club'},
|
||||||
filter:function(event,player){
|
filter:(event,player)=>player.hasCard(card=>lib.skill.sblianhuan.filterCard(card,player),lib.skill.sblianhuan.position),
|
||||||
return player.countCards('hes',{suit:'club'});
|
|
||||||
},
|
|
||||||
filterTarget:function(card,player,target){
|
filterTarget:function(card,player,target){
|
||||||
if(player.hasSkill('sblianhuan_blocker')) return false;
|
if(player.hasSkill('sblianhuan_blocker')) return false;
|
||||||
if(!ui.selected.cards.length) return false;
|
if(!ui.selected.cards.length) return false;
|
||||||
card=get.autoViewAs({name:'tiesuo'},[ui.selected.cards[0]]);
|
card=get.autoViewAs({name:'tiesuo'},[ui.selected.cards[0]]);
|
||||||
return player.canUse(card,target);
|
return player.canUse(card,target);
|
||||||
},
|
},
|
||||||
|
filterCard:(card,player)=>get.suit(card)=='club'&&(!player.hasSkill('sblianhuan_blocker')||player.canRecast(card)),
|
||||||
selectCard:1,
|
selectCard:1,
|
||||||
position:'hs',
|
position:'hs',
|
||||||
derivation:'sblianhuan_lv2',
|
derivation:'sblianhuan_lv2',
|
||||||
|
@ -1094,7 +1093,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
enable:'chooseToUse',
|
enable:'chooseToUse',
|
||||||
mark:true,
|
mark:true,
|
||||||
skillAnimation:true,
|
skillAnimation:true,
|
||||||
//animationStr:'涅盘',
|
|
||||||
limited:true,
|
limited:true,
|
||||||
animationColor:'orange',
|
animationColor:'orange',
|
||||||
filter:function(event,player){
|
filter:function(event,player){
|
||||||
|
|
|
@ -1103,34 +1103,25 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
audio:2,
|
audio:2,
|
||||||
enable:"phaseUse",
|
enable:"phaseUse",
|
||||||
position:'he',
|
position:'he',
|
||||||
filter:function(event,player){
|
filter:(event,player)=>player.hasCard(card=>lib.skill.drlt_huairou.filterCard(card,player),lib.skill.drlt_huairou.position),
|
||||||
return player.countCards('he',{type:'equip'})>0;
|
filterCard:(card,player)=>get.type(card)=='equip'&&player.canRecast(card),
|
||||||
},
|
|
||||||
filterCard:function(card){
|
|
||||||
return get.type(card)=='equip';
|
|
||||||
},
|
|
||||||
check:function(card){
|
check:function(card){
|
||||||
if(!_status.event.player.canEquip(card)) return 5;
|
if(!_status.event.player.canEquip(card)) return 5;
|
||||||
return 3-get.value(card);
|
return 3-get.value(card);
|
||||||
},
|
},
|
||||||
content:function(){
|
content:function(){
|
||||||
player.draw();
|
player.recast(cards);
|
||||||
},
|
},
|
||||||
discard:false,
|
discard:false,
|
||||||
visible:true,
|
lose:false,
|
||||||
loseTo:'discardPile',
|
delay:false,
|
||||||
prompt:"将一张装备牌置入弃牌堆并摸一张牌",
|
prompt:"将一张装备牌置入弃牌堆并摸一张牌",
|
||||||
delay:0.5,
|
|
||||||
prepare:function(cards,player){
|
|
||||||
player.$throw(cards,1000);
|
|
||||||
game.log(player,'将',cards,'置入了弃牌堆');
|
|
||||||
},
|
|
||||||
ai:{
|
ai:{
|
||||||
order:10,
|
order:10,
|
||||||
result:{
|
result:{
|
||||||
player:1,
|
player:1
|
||||||
},
|
}
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
"drlt_yongsi":{
|
"drlt_yongsi":{
|
||||||
audio:2,
|
audio:2,
|
||||||
|
@ -4227,7 +4218,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
dialog.buttons[i].node.group.remove();
|
dialog.buttons[i].node.group.remove();
|
||||||
dialog.buttons[i].node.hp.remove();
|
dialog.buttons[i].node.hp.remove();
|
||||||
dialog.buttons[i].node.intro.remove();
|
dialog.buttons[i].node.intro.remove();
|
||||||
dialog.buttons[i].node.name.innerHTML='未<br>知';
|
dialog.buttons[i].node.name.innerHTML=get.verticalStr('未知');
|
||||||
dialog.buttons[i].node.name.dataset.nature='';
|
dialog.buttons[i].node.name.dataset.nature='';
|
||||||
dialog.buttons[i].style.background='';
|
dialog.buttons[i].style.background='';
|
||||||
dialog.buttons[i]._nointro=true;
|
dialog.buttons[i]._nointro=true;
|
||||||
|
@ -5495,34 +5486,25 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
audio:2,
|
audio:2,
|
||||||
popup:'lianhuan',
|
popup:'lianhuan',
|
||||||
enable:'phaseUse',
|
enable:'phaseUse',
|
||||||
filter:function(event,player){
|
filter:(event,player)=>player.hasCard(card=>lib.skill.lianhuan2.filterCard(card,player),'h'),
|
||||||
return player.countCards('h',{suit:'club'})>0;
|
filterCard:(card,player)=>get.suit(card)=='club'&&player.canRecast(card),
|
||||||
},
|
|
||||||
filterCard:function(card){
|
|
||||||
return get.suit(card)=='club';
|
|
||||||
},
|
|
||||||
check:function(card){
|
check:function(card){
|
||||||
return 5-get.useful(card);
|
return 5-get.useful(card);
|
||||||
},
|
},
|
||||||
content:function(){
|
content:function(){
|
||||||
player.draw();
|
player.recast(cards);
|
||||||
},
|
},
|
||||||
discard:false,
|
discard:false,
|
||||||
visible:true,
|
lose:false,
|
||||||
loseTo:'discardPile',
|
delay:false,
|
||||||
prompt:'将一张梅花牌置入弃牌堆并摸一张牌',
|
prompt:'将一张梅花牌置入弃牌堆并摸一张牌',
|
||||||
delay:0.5,
|
|
||||||
prepare:function(cards,player){
|
|
||||||
player.$throw(cards,1000);
|
|
||||||
game.log(player,'将',cards,'置入了弃牌堆');
|
|
||||||
},
|
|
||||||
ai:{
|
ai:{
|
||||||
basic:{
|
basic:{
|
||||||
order:1
|
order:1
|
||||||
},
|
},
|
||||||
result:{
|
result:{
|
||||||
player:1,
|
player:1
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
niepan:{
|
niepan:{
|
||||||
|
@ -5533,7 +5515,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
mark:true,
|
mark:true,
|
||||||
limited:true,
|
limited:true,
|
||||||
skillAnimation:true,
|
skillAnimation:true,
|
||||||
//animationStr:'涅盘',
|
|
||||||
animationColor:'fire',
|
animationColor:'fire',
|
||||||
init:function(player){
|
init:function(player){
|
||||||
player.storage.niepan=false;
|
player.storage.niepan=false;
|
||||||
|
@ -5592,7 +5573,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
enable:'chooseToUse',
|
enable:'chooseToUse',
|
||||||
mark:true,
|
mark:true,
|
||||||
skillAnimation:true,
|
skillAnimation:true,
|
||||||
//animationStr:'涅盘',
|
|
||||||
limited:true,
|
limited:true,
|
||||||
animationColor:'orange',
|
animationColor:'orange',
|
||||||
init:function(player){
|
init:function(player){
|
||||||
|
@ -8008,7 +7988,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
huoji_info:'出牌阶段,你可以将你的任意一张红色手牌当作【火攻】使用。',
|
huoji_info:'出牌阶段,你可以将你的任意一张红色手牌当作【火攻】使用。',
|
||||||
bazhen_info:'锁定技,若你的防具栏内没有牌且没有被废除,则你视为装备着【八卦阵】。',
|
bazhen_info:'锁定技,若你的防具栏内没有牌且没有被废除,则你视为装备着【八卦阵】。',
|
||||||
kanpo_info:'你可以将你的任意一张黑色手牌当做【无懈可击】使用。',
|
kanpo_info:'你可以将你的任意一张黑色手牌当做【无懈可击】使用。',
|
||||||
lianhuan_info:'出牌阶段,你可以将一张梅花手牌当做【铁索连环】使用或重铸。',
|
lianhuan_info:'出牌阶段,你可以将一张♣手牌当做【铁索连环】使用或重铸。',
|
||||||
niepan_info:'限定技,出牌阶段或当你处于濒死状态时,你可以弃置你区域内的所有牌并复原你的武将牌,然后摸三张牌并将体力回复至3点。',
|
niepan_info:'限定技,出牌阶段或当你处于濒死状态时,你可以弃置你区域内的所有牌并复原你的武将牌,然后摸三张牌并将体力回复至3点。',
|
||||||
oldniepan_info:'限定技,当你处于濒死状态时,你可以弃置你区域内的所有牌并复原你的武将牌,然后摸三张牌并将体力回复至3点。',
|
oldniepan_info:'限定技,当你处于濒死状态时,你可以弃置你区域内的所有牌并复原你的武将牌,然后摸三张牌并将体力回复至3点。',
|
||||||
quhu_info:'出牌阶段限一次,你可以与一名体力值大于你的角色拼点,若你赢,则该角色对其攻击范围内另一名由你指定的角色造成1点伤害。若你没赢,该角色对你造成一点伤害。',
|
quhu_info:'出牌阶段限一次,你可以与一名体力值大于你的角色拼点,若你赢,则该角色对其攻击范围内另一名由你指定的角色造成1点伤害。若你没赢,该角色对你造成一点伤害。',
|
||||||
|
|
|
@ -130,9 +130,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
content:function(){
|
content:function(){
|
||||||
'step 0'
|
'step 0'
|
||||||
player.chooseTarget(get.prompt('tongduo'),'令一名角色重铸一张牌',function(card,player,target){
|
player.chooseTarget(get.prompt('tongduo'),'令一名角色重铸一张牌',function(card,player,target){
|
||||||
return target.countCards('he')>0;
|
return target.hasCard(lib.filter.cardRecastable,'he');
|
||||||
}).set('ai',function(target){
|
}).set('ai',function(target){
|
||||||
return get.attitude(_status.event.player,target)*Math.min(3,Math.floor(target.countCards('h')/2));
|
return get.attitude(_status.event.player,target)*Math.min(3,Math.floor(target.countCards('h',lib.filter.cardRecastable)/2));
|
||||||
});
|
});
|
||||||
'step 1'
|
'step 1'
|
||||||
if(result.bool){
|
if(result.bool){
|
||||||
|
@ -142,11 +142,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
}
|
}
|
||||||
else event.finish();
|
else event.finish();
|
||||||
'step 2'
|
'step 2'
|
||||||
if(target.countCards('he')==0) event.finish();
|
if(!target.hasCard(lib.filter.cardRecastable,'he')) event.finish();
|
||||||
else target.chooseCard('he',true,'请重铸一张牌');
|
else target.chooseCard('he',true,'请重铸一张牌',lib.filter.cardRecastable);
|
||||||
'step 3'
|
'step 3'
|
||||||
target.loseToDiscardpile(result.cards);
|
target.recast(result.cards);
|
||||||
target.draw();
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
//朱儁
|
//朱儁
|
||||||
|
|
|
@ -2340,14 +2340,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
else event.goto(6);
|
else event.goto(6);
|
||||||
'step 3'
|
'step 3'
|
||||||
if(result.bool){
|
if(result.bool){
|
||||||
var hs=target.getCards('h',card=>{
|
var hs=target.getCards('h',lib.filter.cardRecastable);
|
||||||
var mod=game.checkMod(card,player,'unchanged','cardChongzhuable',player);
|
|
||||||
if(mod!='unchanged') return mod;
|
|
||||||
return true;
|
|
||||||
});
|
|
||||||
if(hs.length){
|
if(hs.length){
|
||||||
target.loseToDiscardpile(hs);
|
target.recast(hs);
|
||||||
target.draw(hs.length);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
event.goto(6);
|
event.goto(6);
|
||||||
|
@ -2355,13 +2350,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
if(result.bool){
|
if(result.bool){
|
||||||
var hs=target.getCards('h',card=>{
|
var hs=target.getCards('h',card=>{
|
||||||
if(!card.hasGaintag('olhuiyun_tag')) return false;
|
if(!card.hasGaintag('olhuiyun_tag')) return false;
|
||||||
var mod=game.checkMod(card,player,'unchanged','cardChongzhuable',player);
|
return target.canRecast(card);
|
||||||
if(mod!='unchanged') return mod;
|
|
||||||
return true;
|
|
||||||
});
|
});
|
||||||
if(hs.length){
|
if(hs.length){
|
||||||
target.loseToDiscardpile(hs);
|
target.recast(hs);
|
||||||
target.draw(hs.length);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
event.goto(6);
|
event.goto(6);
|
||||||
|
@ -3106,16 +3098,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
'step 1'
|
'step 1'
|
||||||
var type=get.type2(cards[0]);
|
var type=get.type2(cards[0]);
|
||||||
target.chooseCard(get.translation(player)+'对你发动了【剑合】','请重铸'+get.cnNumber(cards.length)+'张'+get.translation(type)+'牌,或点“取消”受到1点雷电伤害',cards.length,'he',(card,player)=>{
|
target.chooseCard(get.translation(player)+'对你发动了【剑合】','请重铸'+get.cnNumber(cards.length)+'张'+get.translation(type)+'牌,或点“取消”受到1点雷电伤害',cards.length,'he',(card,player)=>{
|
||||||
return get.type2(card)==_status.event.type;
|
return get.type2(card)==_status.event.type&&player.canRecast(card);
|
||||||
}).set('ai',card=>{
|
}).set('ai',card=>{
|
||||||
if(_status.event.goon) return (get.type(card)=='equip'?15:7)-get.value(card);
|
if(_status.event.goon) return (get.type(card)=='equip'?15:7)-get.value(card);
|
||||||
return 0;
|
return 0;
|
||||||
}).set('type',type).set('goon',get.damageEffect(target,player,target,'thunder')<0);
|
}).set('type',type).set('goon',get.damageEffect(target,player,target,'thunder')<0);
|
||||||
'step 2'
|
'step 2'
|
||||||
if(result.bool){
|
if(result.bool){
|
||||||
var cards=result.cards;
|
target.recast(result.cards);
|
||||||
target.loseToDiscardpile(cards);
|
|
||||||
target.draw(cards.length);
|
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
target.damage(player,'thunder');
|
target.damage(player,'thunder');
|
||||||
|
@ -3738,16 +3728,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
},
|
},
|
||||||
content:function(){
|
content:function(){
|
||||||
'step 0'
|
'step 0'
|
||||||
target.chooseCard('he',true,'铸币:请重铸一张牌',(card,player,target)=>{
|
target.chooseCard('he',true,'铸币:请重铸一张牌',lib.filter.cardRecastable);
|
||||||
var mod=game.checkMod(card,player,'unchanged','cardChongzhuable',player);
|
|
||||||
if(mod!='unchanged') return mod;
|
|
||||||
return true;
|
|
||||||
});
|
|
||||||
'step 1'
|
'step 1'
|
||||||
if(result.bool){
|
if(result.bool){
|
||||||
var cards=result.cards;
|
target.recast(result.cards,null,player=>player.draw().set('log',false).gaintag=['olzhubi_tag']);
|
||||||
target.loseToDiscardpile(cards);
|
|
||||||
target.draw().gaintag=['olzhubi_tag'];
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
ai:{
|
ai:{
|
||||||
|
@ -4281,7 +4265,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
}
|
}
|
||||||
if(!player.countCards('h')||player.hasSkill('olhuanshi_mark',null,null,false)) event.finish();
|
if(!player.countCards('h')||player.hasSkill('olhuanshi_mark',null,null,false)) event.finish();
|
||||||
'step 3'
|
'step 3'
|
||||||
player.chooseCard('是否重铸任意张手牌?','操作提示:选择要重铸的牌并点击“确定”',[1,player.countCards('h')]).set('ai',function(card){
|
player.chooseCard('是否重铸任意张手牌?','操作提示:选择要重铸的牌并点击“确定”',[1,player.countCards('h')],lib.filter.cardRecastable).set('ai',function(card){
|
||||||
var player=_status.event.player,cards=ui.selected.cards;
|
var player=_status.event.player,cards=ui.selected.cards;
|
||||||
if(!player.hasSkill('olmingzhe')) return 5-get.value(card);
|
if(!player.hasSkill('olmingzhe')) return 5-get.value(card);
|
||||||
for(var i of cards){
|
for(var i of cards){
|
||||||
|
@ -4292,8 +4276,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
'step 4'
|
'step 4'
|
||||||
if(result.bool){
|
if(result.bool){
|
||||||
player.addTempSkill('olhuanshi_mark');
|
player.addTempSkill('olhuanshi_mark');
|
||||||
player.loseToDiscardpile(result.cards);
|
player.recast(result.cards);
|
||||||
player.draw(result.cards.length);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
ai:{
|
ai:{
|
||||||
|
@ -6016,9 +5999,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
target.chooseToDiscard('he',true);
|
target.chooseToDiscard('he',true);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
var cards=target.getCards('e');
|
target.recast(target.getCards('e',lib.filter.cardRecastable));
|
||||||
target.loseToDiscardpile(cards);
|
|
||||||
target.draw(cards.length)
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -22179,33 +22160,28 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
return current.hasSkill('xinfu_jianjie');
|
return current.hasSkill('xinfu_jianjie');
|
||||||
})) return false;
|
})) return false;
|
||||||
if((player.getStat().skill.smh_lianhuan||0)+(player.getStat().skill.smh_lianhuan1||0)>=3) return false;
|
if((player.getStat().skill.smh_lianhuan||0)+(player.getStat().skill.smh_lianhuan1||0)>=3) return false;
|
||||||
return player.countCards('h',{suit:'club'})>0;
|
return player.hasCard(card=>lib.skill.smh_lianhuan1.filterCard(card,player),'h');
|
||||||
},
|
},
|
||||||
filterCard:function (card){
|
filterCard:(card,player)=>get.suit(card)=='club'&&player.canRecast(card),
|
||||||
return get.suit(card)=='club';
|
check:function(card){
|
||||||
},
|
|
||||||
check:function (card){
|
|
||||||
return -1;
|
return -1;
|
||||||
},
|
},
|
||||||
content:function (){
|
content:function(){
|
||||||
player.draw();
|
player.recast(cards);
|
||||||
},
|
},
|
||||||
discard:false,
|
discard:false,
|
||||||
loseTo:'discardPile',
|
lose:false,
|
||||||
|
delay:false,
|
||||||
prompt:"将一张梅花牌置入弃牌堆并摸一张牌",
|
prompt:"将一张梅花牌置入弃牌堆并摸一张牌",
|
||||||
delay:0.5,
|
|
||||||
prepare:function (cards,player){
|
|
||||||
player.$throw(cards,1000);
|
|
||||||
},
|
|
||||||
ai:{
|
ai:{
|
||||||
basic:{
|
basic:{
|
||||||
order:1,
|
order:1,
|
||||||
},
|
},
|
||||||
result:{
|
result:{
|
||||||
player:1,
|
player:1
|
||||||
|
}
|
||||||
},
|
},
|
||||||
},
|
forced:true
|
||||||
forced:true,
|
|
||||||
},
|
},
|
||||||
"smh_yeyan":{
|
"smh_yeyan":{
|
||||||
unique:true,
|
unique:true,
|
||||||
|
|
|
@ -9216,16 +9216,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
forced:true,
|
forced:true,
|
||||||
charlotte:true,
|
charlotte:true,
|
||||||
filter:function(event,player){
|
filter:function(event,player){
|
||||||
return player.getCards('h',function(card){
|
return player.hasCard(card=>card.hasGaintag('xinfu_bijing')&&player.canRecast(card),'h');
|
||||||
return card.hasGaintag('xinfu_bijing');
|
|
||||||
}).length>0;
|
|
||||||
},
|
},
|
||||||
content:function(){
|
content:function(){
|
||||||
var cards=player.getCards('h',function(card){
|
player.recast(player.getCards('h',card=>card.hasGaintag('xinfu_bijing')&&player.canRecast(card)));
|
||||||
return card.hasGaintag('xinfu_bijing');
|
|
||||||
});
|
|
||||||
player.loseToDiscardpile(cards);
|
|
||||||
player.draw(cards.length);
|
|
||||||
},
|
},
|
||||||
sub:true,
|
sub:true,
|
||||||
},
|
},
|
||||||
|
|
|
@ -1282,16 +1282,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
group:'twqingtao_jieshu',
|
group:'twqingtao_jieshu',
|
||||||
content:function(){
|
content:function(){
|
||||||
'step 0'
|
'step 0'
|
||||||
player.chooseCard(get.prompt2('twqingtao'),'he').set('ai',function(card){
|
player.chooseCard(get.prompt2('twqingtao'),'he',lib.filter.cardRecastable).set('ai',function(card){
|
||||||
if(card.name=='jiu'||get.type(card)!='basic') return 10-get.value(card);
|
if(card.name=='jiu'||get.type(card)!='basic') return 10-get.value(card);
|
||||||
return 6-get.value(card);
|
return 6-get.value(card);
|
||||||
});
|
});
|
||||||
'step 1'
|
'step 1'
|
||||||
if(result.bool){
|
if(result.bool){
|
||||||
player.logSkill('twqingtao');
|
player.logSkill('twqingtao');
|
||||||
player.loseToDiscardpile(result.cards);
|
player.recast(result.cards);
|
||||||
player.draw();
|
if(get.name(result.cards[0])=='jiu'||get.type(result.cards[0],false,player)!='basic') player.draw();
|
||||||
if(result.cards[0].name=='jiu'||get.type(result.cards[0],false,player)!='basic') player.draw();
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
subSkill:{
|
subSkill:{
|
||||||
|
@ -11174,14 +11173,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
content:function(){
|
content:function(){
|
||||||
'step 0'
|
'step 0'
|
||||||
if(!event.isMine()&&!event.isOnline()) game.delayx();
|
if(!event.isMine()&&!event.isOnline()) game.delayx();
|
||||||
player.chooseCard('是否发动【革制】重铸一张牌?').set('ai',function(card){
|
player.chooseCard('是否发动【革制】重铸一张牌?',lib.filter.cardRecastable).set('ai',function(card){
|
||||||
return 5.5-get.value(card);
|
return 5.5-get.value(card);
|
||||||
});
|
});
|
||||||
'step 1'
|
'step 1'
|
||||||
if(result.bool){
|
if(result.bool){
|
||||||
player.logSkill('twgezhi');
|
player.logSkill('twgezhi');
|
||||||
player.loseToDiscardpile(result.cards);
|
player.recast(result.cards);
|
||||||
player.draw();
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
group:'twgezhi_buff',
|
group:'twgezhi_buff',
|
||||||
|
|
|
@ -34,12 +34,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
enable:'phaseUse',
|
enable:'phaseUse',
|
||||||
position:'e',
|
position:'e',
|
||||||
filter:function(event,player){
|
filter:function(event,player){
|
||||||
return player.countCards('e')>0;
|
return player.hasCard(card=>lib.skill.rouquan.filterCard(card,player),lib.skill.rouquan.position);
|
||||||
},
|
},
|
||||||
filterCard:true,
|
filterCard:lib.filter.cardRecastable,
|
||||||
prompt:'将要重铸的牌置入弃牌堆并摸一张牌',
|
prompt:'将要重铸的牌置入弃牌堆并摸一张牌',
|
||||||
discard:false,
|
discard:false,
|
||||||
delay:0.5,
|
lose:false,
|
||||||
|
delay:false,
|
||||||
check:function(card,player){
|
check:function(card,player){
|
||||||
var val=get.equipValue(card);
|
var val=get.equipValue(card);
|
||||||
var player=_status.event.player;
|
var player=_status.event.player;
|
||||||
|
@ -51,16 +52,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
},
|
},
|
||||||
prepare:function(cards,player){
|
|
||||||
player.$throw(cards,1000);
|
|
||||||
},
|
|
||||||
content:function(){
|
content:function(){
|
||||||
"step 0"
|
player.recast(cards);
|
||||||
player.draw();
|
|
||||||
"step 1"
|
|
||||||
for(var i=0;i<cards.length;i++){
|
|
||||||
cards[i].discard();
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
ai:{
|
ai:{
|
||||||
order:9.5,
|
order:9.5,
|
||||||
|
|
|
@ -1684,27 +1684,19 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
audio:2,
|
audio:2,
|
||||||
enable:'phaseUse',
|
enable:'phaseUse',
|
||||||
usable:1,
|
usable:1,
|
||||||
filterCard:function(card,player,target){
|
filterCard:lib.filter.cardRecastable,
|
||||||
var mod=game.checkMod(card,player,'unchanged','cardChongzhuable',player);
|
|
||||||
return mod=='unchanged';
|
|
||||||
},
|
|
||||||
selectCard:function(){
|
selectCard:function(){
|
||||||
return Math.ceil(_status.event.player.countCards('h')/2);
|
return Math.ceil(_status.event.player.countCards('h')/2);
|
||||||
},
|
},
|
||||||
check:function(card){
|
check:function(card){
|
||||||
return 6.5-get.value(card);
|
return 6.5-get.value(card);
|
||||||
},
|
},
|
||||||
prepare:function(cards,player){
|
|
||||||
player.$throw(cards,1000);
|
|
||||||
game.log(player,'将',cards,'置入了弃牌堆');
|
|
||||||
},
|
|
||||||
discard:false,
|
discard:false,
|
||||||
loseTo:'discardPile',
|
lose:false,
|
||||||
visible:true,
|
delay:false,
|
||||||
delay:0.5,
|
|
||||||
content:function(){
|
content:function(){
|
||||||
'step 0'
|
'step 0'
|
||||||
player.draw(cards.length);
|
player.recast(cards);
|
||||||
'step 1'
|
'step 1'
|
||||||
player.addTempSkill('dcctjiuxian_help');
|
player.addTempSkill('dcctjiuxian_help');
|
||||||
player.chooseUseTarget({
|
player.chooseUseTarget({
|
||||||
|
@ -1715,7 +1707,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
},
|
},
|
||||||
ai:{
|
ai:{
|
||||||
order:5.5,
|
order:5.5,
|
||||||
result:{player:1},
|
result:{player:1}
|
||||||
},
|
},
|
||||||
subSkill:{
|
subSkill:{
|
||||||
help:{
|
help:{
|
||||||
|
|
|
@ -9174,27 +9174,22 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
audio:2,
|
audio:2,
|
||||||
enable:'phaseUse',
|
enable:'phaseUse',
|
||||||
filter:function(event,player){
|
filter:function(event,player){
|
||||||
return player.countCards('h','sha')>0;
|
return player.hasCard(card=>lib.skill.yanyu.filterCard(card,player),'h');
|
||||||
},
|
|
||||||
filterCard:{name:'sha'},
|
|
||||||
prepare:function(cards,player){
|
|
||||||
player.$throw(cards,1000);
|
|
||||||
game.log(player,'将',cards,'置入了弃牌堆');
|
|
||||||
},
|
},
|
||||||
|
filterCard:(card,player)=>get.name(card)=='sha'&&player.canRecast(card),
|
||||||
discard:false,
|
discard:false,
|
||||||
loseTo:'discardPile',
|
lose:false,
|
||||||
visible:true,
|
delay:false,
|
||||||
delay:0.5,
|
|
||||||
content:function(){
|
content:function(){
|
||||||
player.draw();
|
player.recast(cards);
|
||||||
},
|
},
|
||||||
ai:{
|
ai:{
|
||||||
basic:{
|
basic:{
|
||||||
order:1
|
order:1
|
||||||
},
|
},
|
||||||
result:{
|
result:{
|
||||||
player:1,
|
player:1
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
group:'yanyu2'
|
group:'yanyu2'
|
||||||
},
|
},
|
||||||
|
|
|
@ -682,17 +682,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
position:'he',
|
position:'he',
|
||||||
content:function(){
|
content:function(){
|
||||||
'step 0'
|
'step 0'
|
||||||
player.loseToDiscardpile(cards);
|
player.recast(cards);
|
||||||
player.draw();
|
|
||||||
'step 1'
|
'step 1'
|
||||||
if(target.countCards('he')>0){
|
if(target.countCards('he')>0){
|
||||||
target.chooseCard('he',true,'请重铸一张牌');
|
target.chooseCard('he',true,'请重铸一张牌',lib.filter.cardRecastable);
|
||||||
}
|
}
|
||||||
else event.finish();
|
else event.finish();
|
||||||
'step 2'
|
'step 2'
|
||||||
if(result.bool){
|
if(result.bool){
|
||||||
target.loseToDiscardpile(result.cards);
|
target.recast(result.cards);
|
||||||
target.draw();
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
ai:{
|
ai:{
|
||||||
|
|
339
game/game.js
339
game/game.js
|
@ -10698,6 +10698,17 @@
|
||||||
emptyEvent:function(){
|
emptyEvent:function(){
|
||||||
event.trigger(event.name);
|
event.trigger(event.name);
|
||||||
},
|
},
|
||||||
|
//Recast
|
||||||
|
//重铸
|
||||||
|
recast:()=>{
|
||||||
|
'step 0'
|
||||||
|
game.log(player,'重铸了',cards);
|
||||||
|
if(typeof event.recastingLose=='function') event.recastingLose(player,cards);
|
||||||
|
'step 1'
|
||||||
|
event.trigger('recast');
|
||||||
|
'step 2'
|
||||||
|
if(typeof event.recastingGain=='function') event.recastingGain(player,cards);
|
||||||
|
},
|
||||||
//装备栏相关
|
//装备栏相关
|
||||||
disableEquip:function(){
|
disableEquip:function(){
|
||||||
'step 0'
|
'step 0'
|
||||||
|
@ -10879,7 +10890,7 @@
|
||||||
var next=game.createEvent('replaceEquip');
|
var next=game.createEvent('replaceEquip');
|
||||||
next.player=player;
|
next.player=player;
|
||||||
next.card=card;
|
next.card=card;
|
||||||
next.setContent(info.replaceEquip||'replaceEquip')
|
next.setContent(info.replaceEquip||'replaceEquip');
|
||||||
"step 4"
|
"step 4"
|
||||||
var info=get.info(card,false);
|
var info=get.info(card,false);
|
||||||
if(get.itemtype(result)=='cards'){
|
if(get.itemtype(result)=='cards'){
|
||||||
|
@ -16739,7 +16750,7 @@
|
||||||
},
|
},
|
||||||
loseToDiscardpile:function(){
|
loseToDiscardpile:function(){
|
||||||
"step 0"
|
"step 0"
|
||||||
game.log(player,'将',cards,'置入了弃牌堆');
|
if(event.log!=false) game.log(player,'将',cards,'置入了弃牌堆');
|
||||||
event.done=player.lose(cards,event.position,'visible');
|
event.done=player.lose(cards,event.position,'visible');
|
||||||
event.done.type='loseToDiscardpile';
|
event.done.type='loseToDiscardpile';
|
||||||
"step 1"
|
"step 1"
|
||||||
|
@ -17178,7 +17189,7 @@
|
||||||
}
|
}
|
||||||
if(event.animate=='draw'){
|
if(event.animate=='draw'){
|
||||||
player.$draw(cards.length);
|
player.$draw(cards.length);
|
||||||
game.log(player,'将',get.cnNumber(cards.length),'张牌置于了武将牌上');
|
if(event.log) game.log(player,'将',get.cnNumber(cards.length),'张牌置于了武将牌上');
|
||||||
game.pause();
|
game.pause();
|
||||||
setTimeout(function(){
|
setTimeout(function(){
|
||||||
player.$addToExpansion(cards,null,event.gaintag);
|
player.$addToExpansion(cards,null,event.gaintag);
|
||||||
|
@ -17212,8 +17223,8 @@
|
||||||
if(event.animate=='give'){
|
if(event.animate=='give'){
|
||||||
for(var i in evtmap){
|
for(var i in evtmap){
|
||||||
var source=(_status.connectMode?lib.playerOL:game.playerMap)[i];
|
var source=(_status.connectMode?lib.playerOL:game.playerMap)[i];
|
||||||
source.$give(evtmap[i][0],player);
|
source.$give(evtmap[i][0],player,false);
|
||||||
game.log(player,'将',get.cnNumber(evtmap[i][0]),'置于了武将牌上');
|
if(event.log) game.log(player,'将',evtmap[i][0],'置于了武将牌上');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
@ -17221,11 +17232,11 @@
|
||||||
var source=(_status.connectMode?lib.playerOL:game.playerMap)[i];
|
var source=(_status.connectMode?lib.playerOL:game.playerMap)[i];
|
||||||
if(evtmap[i][1].length){
|
if(evtmap[i][1].length){
|
||||||
source.$giveAuto(evtmap[i][1],player,false);
|
source.$giveAuto(evtmap[i][1],player,false);
|
||||||
game.log(player,'将',get.cnNumber(evtmap[i][1].length),'张牌置于了武将牌上');
|
if(event.log) game.log(player,'将',get.cnNumber(evtmap[i][1].length),'张牌置于了武将牌上');
|
||||||
}
|
}
|
||||||
if(evtmap[i][2].length){
|
if(evtmap[i][2].length){
|
||||||
source.$give(evtmap[i][2],player,false);
|
source.$give(evtmap[i][2],player,false);
|
||||||
game.log(player,'将',get.cnNumber(evtmap[i][2]),'置于了武将牌上');
|
if(event.log) game.log(player,'将',evtmap[i][2],'置于了武将牌上');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -17250,9 +17261,6 @@
|
||||||
for(var i of event.gaintag) player.markSkill(i);
|
for(var i of event.gaintag) player.markSkill(i);
|
||||||
event.finish();
|
event.finish();
|
||||||
}
|
}
|
||||||
if(event.log){
|
|
||||||
game.log(player,'将',cards,'置于了武将牌上');
|
|
||||||
}
|
|
||||||
"step 4"
|
"step 4"
|
||||||
game.delayx();
|
game.delayx();
|
||||||
if(event.updatePile) game.updateRoundNumber();
|
if(event.updatePile) game.updateRoundNumber();
|
||||||
|
@ -18240,6 +18248,31 @@
|
||||||
},
|
},
|
||||||
player:{
|
player:{
|
||||||
//新函数
|
//新函数
|
||||||
|
//Recast
|
||||||
|
//重铸
|
||||||
|
recast:function(cards,recastingLose,recastingGain){
|
||||||
|
const recast=game.createEvent('recast');
|
||||||
|
recast.player=this;
|
||||||
|
if(get.itemtype(cards)=='card') recast.cards=[cards];
|
||||||
|
else if(get.itemtype(cards)=='cards'&&cards.length) recast.cards=cards;
|
||||||
|
else _status.event.next.remove(recast);
|
||||||
|
if(typeof recastingLose!='function') recastingLose=(player,cards)=>player.loseToDiscardpile(cards).log=false;
|
||||||
|
recast.recastingLose=recastingLose;
|
||||||
|
if(typeof recastingGain!='function') recastingGain=(player,cards)=>player.draw(cards.length).log=false;
|
||||||
|
recast.recastingGain=recastingGain;
|
||||||
|
recast.setContent('recast');
|
||||||
|
recast._args=Array.from(arguments);
|
||||||
|
return recast;
|
||||||
|
},
|
||||||
|
//Check if the player can recast the card
|
||||||
|
//检查角色是否能重铸此牌
|
||||||
|
canRecast:function(card,source,strict){
|
||||||
|
const cardRecastable=lib.filter.cardRecastable(card,this,source,strict);
|
||||||
|
if(cardRecastable!='unchanged') return cardRecastable;
|
||||||
|
if(get.position(card)!='h') return false;
|
||||||
|
const info=get.info(card);
|
||||||
|
return typeof info.chongzhu=='function'?info.chongzhu(event,player):info.chongzhu;
|
||||||
|
},
|
||||||
//装备栏相关
|
//装备栏相关
|
||||||
//判断一名角色的某个区域是否被废除
|
//判断一名角色的某个区域是否被废除
|
||||||
//type为要判断的区域 若为空 则判断玩家是否有任意一个被废除的区域
|
//type为要判断的区域 若为空 则判断玩家是否有任意一个被废除的区域
|
||||||
|
@ -19047,11 +19080,15 @@
|
||||||
inRangeOf:function(source){
|
inRangeOf:function(source){
|
||||||
return source.inRange(this);
|
return source.inRange(this);
|
||||||
},
|
},
|
||||||
getHp:function(){
|
//Get the player's HP not less than 0. Set “raw” to true to get the player's raw HP instead.
|
||||||
return Math.max(0,this.hp);
|
//获取角色的体力值。设置“raw”为true以获取角色的体力。
|
||||||
|
getHp:function(raw){
|
||||||
|
return raw?this.hp:Math.max(0,this.hp);
|
||||||
},
|
},
|
||||||
getDamagedHp:function(){
|
//Set “raw” to true to get the player's raw damaged HP instead.
|
||||||
return this.maxHp-this.getHp();
|
//设置“raw”为true以获取角色已损失的体力。
|
||||||
|
getDamagedHp:function(raw){
|
||||||
|
return this.maxHp-this.getHp(raw);
|
||||||
},
|
},
|
||||||
changeGroup:function(group,log,broadcast){
|
changeGroup:function(group,log,broadcast){
|
||||||
var next=game.createEvent('changeGroup');
|
var next=game.createEvent('changeGroup');
|
||||||
|
@ -24832,109 +24869,61 @@
|
||||||
return this.hp<this.maxHp&&!this.storage.nohp;
|
return this.hp<this.maxHp&&!this.storage.nohp;
|
||||||
},
|
},
|
||||||
isHealthy:function(){
|
isHealthy:function(){
|
||||||
return this.hp==this.maxHp||this.storage.nohp;
|
return this.hp>=this.maxHp||this.storage.nohp;
|
||||||
},
|
},
|
||||||
isMaxHp:function(equal){
|
isMaxHp:function(only,raw){
|
||||||
for(var i=0;i<game.players.length;i++){
|
return game.players.every(value=>{
|
||||||
if(game.players[i].isOut()||game.players[i]==this) continue;
|
if(value.isOut()||value==this) return true;
|
||||||
if(equal){
|
return only?value.getHp(raw)<this.getHp(raw):value.getHp(raw)<=this.getHp(raw);
|
||||||
if(game.players[i].hp>=this.hp) return false;
|
});
|
||||||
}
|
|
||||||
else{
|
|
||||||
if(game.players[i].hp>this.hp) return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
},
|
},
|
||||||
isMinHp:function(equal){
|
isMinHp:function(only,raw){
|
||||||
for(var i=0;i<game.players.length;i++){
|
return game.players.every(value=>{
|
||||||
if(game.players[i].isOut()||game.players[i]==this) continue;
|
if(value.isOut()||value==this) return true;
|
||||||
if(equal){
|
return only?value.getHp(raw)>this.getHp(raw):value.getHp(raw)>=this.getHp(raw);
|
||||||
if(game.players[i].hp<=this.hp) return false;
|
});
|
||||||
}
|
|
||||||
else{
|
|
||||||
if(game.players[i].hp<this.hp) return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
},
|
},
|
||||||
isMaxCard:function(equal){
|
isMaxCard:function(only){
|
||||||
var nh=this.countCards('he');
|
const numberOfCards=this.countCards('he');
|
||||||
for(var i=0;i<game.players.length;i++){
|
return game.players.every(value=>{
|
||||||
if(game.players[i].isOut()||game.players[i]==this) continue;
|
if(value.isOut()||value==this) return true;
|
||||||
if(equal){
|
return only?value.countCards('he')<numberOfCards:value.countCards('he')<=numberOfCards;
|
||||||
if(game.players[i].countCards('he')>=nh) return false;
|
});
|
||||||
}
|
|
||||||
else{
|
|
||||||
if(game.players[i].countCards('he')>nh) return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
},
|
},
|
||||||
isMinCard:function(equal){
|
isMinCard:function(only){
|
||||||
var nh=this.countCards('he');
|
const numberOfCards=this.countCards('he');
|
||||||
for(var i=0;i<game.players.length;i++){
|
return game.players.every(value=>{
|
||||||
if(game.players[i].isOut()||game.players[i]==this) continue;
|
if(value.isOut()||value==this) return true;
|
||||||
if(equal){
|
return only?value.countCards('he')>numberOfCards:value.countCards('he')>=numberOfCards;
|
||||||
if(game.players[i].countCards('he')<=nh) return false;
|
});
|
||||||
}
|
|
||||||
else{
|
|
||||||
if(game.players[i].countCards('he')<nh) return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
},
|
},
|
||||||
isMaxHandcard:function(equal){
|
isMaxHandcard:function(only){
|
||||||
var nh=this.countCards('h');
|
const numberOfHandCards=this.countCards('h');
|
||||||
for(var i=0;i<game.players.length;i++){
|
return game.players.every(value=>{
|
||||||
if(game.players[i].isOut()||game.players[i]==this) continue;
|
if(value.isOut()||value==this) return true;
|
||||||
if(equal){
|
return only?value.countCards('h')<numberOfHandCards:value.countCards('h')<=numberOfHandCards;
|
||||||
if(game.players[i].countCards('h')>=nh) return false;
|
});
|
||||||
}
|
|
||||||
else{
|
|
||||||
if(game.players[i].countCards('h')>nh) return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
},
|
},
|
||||||
isMinHandcard:function(equal){
|
isMinHandcard:function(only){
|
||||||
var nh=this.countCards('h');
|
const numberOfHandCards=this.countCards('h');
|
||||||
for(var i=0;i<game.players.length;i++){
|
return game.players.every(value=>{
|
||||||
if(game.players[i].isOut()||game.players[i]==this) continue;
|
if(value.isOut()||value==this) return true;
|
||||||
if(equal){
|
return only?value.countCards('h')>numberOfHandCards:value.countCards('h')>=numberOfHandCards;
|
||||||
if(game.players[i].countCards('h')<=nh) return false;
|
});
|
||||||
}
|
|
||||||
else{
|
|
||||||
if(game.players[i].countCards('h')<nh) return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
},
|
},
|
||||||
isMaxEquip:function(equal){
|
isMaxEquip:function(only){
|
||||||
var nh=this.countCards('e');
|
const numberOfEquipAreaCards=this.countCards('e');
|
||||||
for(var i=0;i<game.players.length;i++){
|
return game.players.every(value=>{
|
||||||
if(game.players[i].isOut()||game.players[i]==this) continue;
|
if(value.isOut()||value==this) return true;
|
||||||
if(equal){
|
return only?value.countCards('e')<numberOfEquipAreaCards:value.countCards('e')<=numberOfEquipAreaCards;
|
||||||
if(game.players[i].countCards('e')>=nh) return false;
|
});
|
||||||
}
|
|
||||||
else{
|
|
||||||
if(game.players[i].countCards('e')>nh) return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
},
|
},
|
||||||
isMinEquip:function(equal){
|
isMinEquip:function(only){
|
||||||
var nh=this.countCards('e');
|
const numberOfEquipAreaCards=this.countCards('e');
|
||||||
for(var i=0;i<game.players.length;i++){
|
return game.players.every(value=>{
|
||||||
if(game.players[i].isOut()||game.players[i]==this) continue;
|
if(value.isOut()||value==this) return true;
|
||||||
if(equal){
|
return only?value.countCards('e')>numberOfEquipAreaCards:value.countCards('e')>=numberOfEquipAreaCards;
|
||||||
if(game.players[i].countCards('e')<=nh) return false;
|
});
|
||||||
}
|
|
||||||
else{
|
|
||||||
if(game.players[i].countCards('e')<nh) return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
},
|
},
|
||||||
isLinked:function(){
|
isLinked:function(){
|
||||||
if(get.is.linked2(this)){
|
if(get.is.linked2(this)){
|
||||||
|
@ -28312,6 +28301,12 @@
|
||||||
all:function(){
|
all:function(){
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
|
//Check if the card is recastable
|
||||||
|
//检查此牌是否可重铸
|
||||||
|
cardRecastable:(card,player,source,raw)=>{
|
||||||
|
if(typeof player=='undefined') player=get.owner(card);
|
||||||
|
return game.checkMod(card,player,source,!raw||'unchanged','cardRecastable',player);
|
||||||
|
},
|
||||||
//装备栏相关
|
//装备栏相关
|
||||||
canBeReplaced:function(card,player){
|
canBeReplaced:function(card,player){
|
||||||
var mod=game.checkMod(card,player,'unchanged','canBeReplaced',player);
|
var mod=game.checkMod(card,player,'unchanged','canBeReplaced',player);
|
||||||
|
@ -29933,78 +29928,47 @@
|
||||||
logv:false,
|
logv:false,
|
||||||
visible:true,
|
visible:true,
|
||||||
prompt:'将要重铸的牌置入弃牌堆并摸一张牌',
|
prompt:'将要重铸的牌置入弃牌堆并摸一张牌',
|
||||||
filter:function(event,player){
|
filter:(event,player)=>player.hasCard(card=>lib.skill._chongzhu.filterCard(card,player),'he'),
|
||||||
return player.hasCard(function(card){
|
position:'he',
|
||||||
return lib.skill._chongzhu.filterCard(card,player);
|
filterCard:(card,player)=>player.canRecast(card,null,true),
|
||||||
});
|
|
||||||
},
|
|
||||||
filterCard:function(card,player){
|
|
||||||
var mod=game.checkMod(card,player,'unchanged','cardChongzhuable',player);
|
|
||||||
if(mod!='unchanged') return mod;
|
|
||||||
var info=get.info(card);
|
|
||||||
if(typeof info.chongzhu=='function'){
|
|
||||||
return info.chongzhu(event,player);
|
|
||||||
}
|
|
||||||
return info.chongzhu;
|
|
||||||
},
|
|
||||||
prepare:function(cards,player){
|
|
||||||
player.$throw(cards,1000);
|
|
||||||
game.log(player,'将',cards,'置入了弃牌堆');
|
|
||||||
},
|
|
||||||
check:function(card){
|
|
||||||
// if(get.type(card)=='stonecharacter'&&_status.event.player.countCards('h',{type:'stonecharacter'})<=1){
|
|
||||||
// return 0;
|
|
||||||
// }
|
|
||||||
return 1;
|
|
||||||
},
|
|
||||||
discard:false,
|
discard:false,
|
||||||
loseTo:'discardPile',
|
lose:false,
|
||||||
delay:0.5,
|
delay:false,
|
||||||
content:function(){
|
content:function(){
|
||||||
"step 0"
|
player.recast(cards,null,(player,cards)=>{
|
||||||
if(lib.config.mode=='stone'&&_status.mode=='deck'&&
|
let numberOfCardsToDraw=cards.length;
|
||||||
!player.isMin()&&get.type(cards[0]).indexOf('stone')==0){
|
cards.forEach(value=>{
|
||||||
var list=get.stonecard(1,player.career);
|
if(lib.config.mode=='stone'&&_status.mode=='deck'&&!player.isMin()&&get.type(value).indexOf('stone')==0){
|
||||||
if(list.length){
|
const stonecard=get.stonecard(1,player.career);
|
||||||
player.gain(game.createCard(list.randomGet()),'draw');
|
numberOfCardsToDraw--;
|
||||||
|
if(stonecard.length) player.gain(game.createCard(stonecard.randomGet()),'draw');
|
||||||
|
else player.draw({
|
||||||
|
drawDeck:1
|
||||||
|
}).log=false;
|
||||||
}
|
}
|
||||||
else{
|
else if(get.subtype(value)=='spell_gold'){
|
||||||
player.draw({drawDeck:1})
|
const libCard=get.libCard(info=>info.subtype=='spell_silver');
|
||||||
|
if(!libCard.length) return;
|
||||||
|
numberOfCardsToDraw--;
|
||||||
|
player.gain(game.createCard(libCard.randomGet()),'draw');
|
||||||
}
|
}
|
||||||
|
else if(get.subtype(value)=='spell_silver'){
|
||||||
|
const libCard=get.libCard(info=>info.subtype=='spell_bronze');
|
||||||
|
if(!libCard.length) return;
|
||||||
|
numberOfCardsToDraw--;
|
||||||
|
player.gain(game.createCard(libCard.randomGet()),'draw');
|
||||||
}
|
}
|
||||||
else if(get.subtype(cards[0])=='spell_gold'){
|
|
||||||
var list=get.libCard(function(info){
|
|
||||||
return info.subtype=='spell_silver';
|
|
||||||
});
|
});
|
||||||
if(list.length){
|
if(numberOfCardsToDraw) player.draw(numberOfCardsToDraw).log=false;
|
||||||
player.gain(game.createCard(list.randomGet()),'draw');
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
player.draw();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if(get.subtype(cards[0])=='spell_silver'){
|
|
||||||
var list=get.libCard(function(info){
|
|
||||||
return info.subtype=='spell_bronze';
|
|
||||||
});
|
});
|
||||||
if(list.length){
|
|
||||||
player.gain(game.createCard(list.randomGet()),'draw');
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
player.draw();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
player.draw();
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
ai:{
|
ai:{
|
||||||
basic:{
|
basic:{
|
||||||
order:6
|
order:6
|
||||||
},
|
},
|
||||||
result:{
|
result:{
|
||||||
player:1,
|
player:1
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
_lianhuan:{
|
_lianhuan:{
|
||||||
|
@ -38691,36 +38655,15 @@
|
||||||
}
|
}
|
||||||
return num;
|
return num;
|
||||||
},
|
},
|
||||||
filterPlayer:function(func,list,includeOut){
|
filterPlayer:(func,list,includeOut)=>{
|
||||||
if(!Array.isArray(list)){
|
if(!Array.isArray(list)) list=[];
|
||||||
list=[];
|
if(typeof func!='function') func=lib.filter.all;
|
||||||
}
|
return list.addArray(game.players.filter(value=>(includeOut||!value.isOut())&&func(value)));
|
||||||
if(typeof func!='function'){
|
|
||||||
func=lib.filter.all;
|
|
||||||
}
|
|
||||||
for(var i=0;i<game.players.length;i++){
|
|
||||||
if(!includeOut&&game.players[i].isOut()) continue;
|
|
||||||
if(func(game.players[i])){
|
|
||||||
list.add(game.players[i]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return list;
|
|
||||||
},
|
},
|
||||||
filterPlayer2:function(func,list,includeOut){
|
filterPlayer2:(func,list,includeOut)=>{
|
||||||
if(!Array.isArray(list)){
|
if(!Array.isArray(list)) list=[];
|
||||||
list=[];
|
if(typeof func!='function') func=lib.filter.all;
|
||||||
}
|
return list.addArray(game.players.concat(game.dead).filter(value=>(includeOut||!value.isOut())&&func(value)));
|
||||||
if(typeof func!='function'){
|
|
||||||
func=lib.filter.all;
|
|
||||||
}
|
|
||||||
var players=game.players.slice(0).concat(game.dead);
|
|
||||||
for(var i=0;i<players.length;i++){
|
|
||||||
if(!includeOut&&players[i].isOut()) continue;
|
|
||||||
if(func(players[i])){
|
|
||||||
list.add(players[i]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return list;
|
|
||||||
},
|
},
|
||||||
findPlayer:function(func,includeOut){
|
findPlayer:function(func,includeOut){
|
||||||
for(var i=0;i<game.players.length;i++){
|
for(var i=0;i<game.players.length;i++){
|
||||||
|
@ -48264,7 +48207,7 @@
|
||||||
node.node={
|
node.node={
|
||||||
avatar:ui.create.div('.avatar',node,ui.click.avatar).hide(),
|
avatar:ui.create.div('.avatar',node,ui.click.avatar).hide(),
|
||||||
avatar2:ui.create.div('.avatar2',node,ui.click.avatar2).hide(),
|
avatar2:ui.create.div('.avatar2',node,ui.click.avatar2).hide(),
|
||||||
turnedover:ui.create.div('.turned','<div>翻<br>面<div>',node),
|
turnedover:ui.create.div('.turned','<div>'+get.verticalStr('翻面')+'<div>',node),
|
||||||
framebg:ui.create.div('.framebg',node),
|
framebg:ui.create.div('.framebg',node),
|
||||||
intro:ui.create.div('.intro',node),
|
intro:ui.create.div('.intro',node),
|
||||||
identity:ui.create.div('.identity',node),
|
identity:ui.create.div('.identity',node),
|
||||||
|
|
|
@ -2239,9 +2239,8 @@ div:not(.handcards)>.card>.info>span,
|
||||||
text-shadow: none;
|
text-shadow: none;
|
||||||
}
|
}
|
||||||
.player>.turned>div{
|
.player>.turned>div{
|
||||||
top:calc(50% - 50px);
|
top: calc(50% - 50px);
|
||||||
width: 100%;
|
left: calc(50% - 25px);
|
||||||
left: 0;
|
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
writing-mode: vertical-rl;
|
writing-mode: vertical-rl;
|
||||||
-webkit-writing-mode: vertical-rl;
|
-webkit-writing-mode: vertical-rl;
|
||||||
|
|
|
@ -6457,7 +6457,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
cardEnabled2:function(card){
|
cardEnabled2:function(card){
|
||||||
if(get.position(card)=='h') return false;
|
if(get.position(card)=='h') return false;
|
||||||
},
|
},
|
||||||
cardChongzhuable:function(card){
|
cardRecastable:function(card){
|
||||||
if(get.position(card)=='h') return false;
|
if(get.position(card)=='h') return false;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -144,6 +144,7 @@ html{
|
||||||
}
|
}
|
||||||
|
|
||||||
.player .marks>div:first-child>div{
|
.player .marks>div:first-child>div{
|
||||||
|
filter: invert(0.8) sepia(1);
|
||||||
-webkit-filter: invert(0.8) sepia(1);
|
-webkit-filter: invert(0.8) sepia(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -201,6 +202,7 @@ html{
|
||||||
transition-property: transform;
|
transition-property: transform;
|
||||||
transition-duration: 0s;
|
transition-duration: 0s;
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
|
filter: blur(3px);
|
||||||
-webkit-filter: blur(3px);
|
-webkit-filter: blur(3px);
|
||||||
}
|
}
|
||||||
.popup-container>.prompt-container>div>div{
|
.popup-container>.prompt-container>div>div{
|
||||||
|
|
Loading…
Reference in New Issue