This commit is contained in:
Spmario233 2019-08-03 21:29:18 +08:00 committed by GitHub
parent 1b798620e3
commit c511282408
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 220 additions and 247 deletions

View File

@ -746,7 +746,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
if(!muniu.cards) return false;
lib.skill.muniu_skill.sync(muniu);
for(var i=0;i<muniu.cards.length;i++){
if(event.filterCard(muniu.cards[i],player,event)) return true;
if(event.filterCard(muniu.cards[i],player,event)&&lib.filter.cardRespondable(muniu.cards[i],player,event)) return true;
}
return false;
},
@ -756,7 +756,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
player.chooseButton(['木牛流马',player.getEquip(5).cards]).set('filterButton',function(button){
var evt=_status.event.getTrigger();
if(evt&&evt.filterCard){
return evt.filterCard(button.link,_status.event.player,evt);
return evt.filterCard(button.link,_status.event.player,evt)&&lib.filter.cardRespondable(button.link,_status.event.player,evt);
}
return true;
}).set('ai',function(button){

View File

@ -49,7 +49,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
audio:"qiangxi",
enable:"phaseUse",
filterCard:function (card){
return get.type(card)=='equip';
return get.subtype(card)=='equip1';
},
selectCard:function (){
return [0,1];
@ -293,9 +293,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
cards2.push(result.links[i]);
cards.remove(result.links[i]);
}
for(var i=0;i<cards.length;i++){
cards[i].discard();
}
game.cardsDiscard(cards);
event.card2=cards2[0];
}
var time=1000-(get.utc()-event.time);
@ -604,20 +602,20 @@ game.import('character',function(lib,game,ui,get,ai,_status){
};
"step 1"
if(result.bool){
var cards2=[];
for(var i=0;i<cards.length;i++){
if(get.type(cards[i])!='basic'&&cards[i].name!='juedou'&&
(get.type(cards[i])!='equip'||get.subtype(cards[i])!='equip1')){
cards[i].discard();
cards2.push(cards[i]);
cards.splice(i--,1);
}
}
player.gain(cards,'gain2');
game.cardsDiscard(cards2);
player.addTempSkill('reluoyi2',{player:'phaseBefore'});
trigger.cancel();
}
else for(var i=0;i<cards.length;i++){
cards[i].discard();
}
else game.cardsDiscard(cards);
},
},
"new_rewusheng":{
@ -1783,7 +1781,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},trigger.player.judging[0]);
game.addVideo('deletenode',player,get.cardsInfo([trigger.player.judging[0].clone]));
}
trigger.player.judging[0].discard();
game.cardsDiscard(trigger.player.judging[0]);
trigger.player.judging[0]=result.cards[0];
if(!get.owner(result.cards[0],'judge')){
trigger.position.appendChild(result.cards[0]);

View File

@ -540,8 +540,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return !player.storage.drlt_poshi&&((player.storage.disableEquip!=undefined&&player.storage.disableEquip.length==5)||player.hp==1);
},
content:function(){
"step 0"
player.storage.drlt_poshi=true;
player.loseMaxHp();
"step 1"
var num=player.maxHp-player.countCards('h');
if(num>0) player.draw(num);
player.removeSkill('drlt_jueyan');
@ -2862,7 +2864,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
event.node=result.node;
}
else{
if(bool2) result.card.discard();
if(bool2) game.cardsDiscard(result.card);
event.finish();
}
"step 2"
@ -3183,7 +3185,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
group:["guzheng_count"],
subSkill:{
count:{
trigger:{global:'discardAfter'},
trigger:{global:['discardAfter','cardsDiscardAfter']},
forced:true,
silent:true,
popup:false,
@ -3784,13 +3786,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player.showCards(event.cards);
"step 1"
var num=0;
var cards2=[];
for(var i=0;i<event.cards.length;i++){
if(get.suit(event.cards[i])=='heart'){
num++;
event.cards[i].discard();
cards2.push(event.cards[i]);
event.cards.splice(i--,1);
}
}
game.cardsDiscard(cards2);
if(num){
player.recover(num);
}
@ -3876,36 +3880,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){
trigger:{global:'die'},
priority:5,
filter:function(event){
if(!event.playerCards||!event.playerCards.length) return false;
for(var i=0;i<event.playerCards.length;i++){
if(!get.owner(event.playerCards[i])||get.owner(event.playerCards[i])==event.player) return true;
}
return false;
},
check:function(event){
for(var i=0;i<event.playerCards.length;i++){
if(event.playerCards[i].name=='du') return false;
}
return true;
return event.player.countCards('he')>0;
},
content:function(){
"step 0"
event.togain=[];
event.shown=[];
for(var i=0;i<trigger.playerCards.length;i++){
if(!get.owner(trigger.playerCards[i])||get.owner(trigger.playerCards[i])==trigger.player){
event.togain.push(trigger.playerCards[i]);
if(trigger.es.contains(trigger.playerCards[i])) event.shown.push(trigger.playerCards[i]);
}
}
event.togain=trigger.player.getCards('he');
event.shown=trigger.player.getCards('e');
var num=event.togain.length-event.shown.length;
player.gain(event.togain);
trigger.player.$give(event.togain.length-event.shown.length,player);
if(num) trigger.player.$give(num,player);
if(event.shown.length) trigger.player.$give(event.shown,player);
game.delay();
"step 1"
for(var i=0;i<event.togain.length;i++){
trigger.cards.remove(event.togain[i]);
}
},
},
fangzhu:{
@ -5713,7 +5698,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
event.target.damage(trigger.source,'nocard').type='retianxiang';
event.target.addSkill('retianxiang2');
if(get.position(event.card)=='s'){
event.card.discard();
game.cardsDiscard(event.card);
}
}
}
@ -5743,7 +5728,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
onremove:function(player){
var card=player.storage.retianxiang3;
if(get.position(card)=='s'){
card.discard();
game.cardsDiscard(card);
}
delete player.storage.retianxiang3;
}
@ -6085,9 +6070,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
onunmark:function(storage,player){
if(storage&&storage.length){
player.$throw(storage);
for(var i=0;i<storage.length;i++){
storage[i].discard();
}
game.cardsDiscard(storage);
delete player.storage.buqu;
}
}
@ -6464,7 +6447,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
"drlt_jueyan":"决堰",
"drlt_jueyan_info":"出牌阶段限一次,你可以废除一个装备栏,然后执行对应一项:武器栏,本回合内你可以多使用三张【杀】;防具栏,摸三张牌,本回合手牌上限+32个坐骑栏本回合你使用的牌无距离限制宝物栏本回合获得技能集智",
"drlt_poshi":"破势",
"drlt_poshi_info":"觉醒技准备阶段开始时若你的装备栏均已被废除或体力值为1则你扣减一点体力上限失去技能“决堰”并获得技能“怀柔”",
"drlt_poshi_info":"觉醒技准备阶段开始时若你的装备栏均已被废除或体力值为1则你扣减一点体力上限将手牌摸至体力上限,失去技能“决堰”并获得技能“怀柔”",
"drlt_huairou":"怀柔",
"drlt_huairou_info":"出牌阶段,你可以重铸装备牌",
"drlt_zhenggu":"镇骨",

View File

@ -833,7 +833,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},trigger.player.judging[0]);
game.addVideo('deletenode',player,get.cardsInfo([trigger.player.judging[0].clone]));
}
trigger.player.judging[0].discard();
game.cardsDiscard(trigger.player.judging[0]);
trigger.player.judging[0]=result.cards[0];
if(!get.owner(result.cards[0],'judge')){
trigger.position.appendChild(result.cards[0]);
@ -1470,10 +1470,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
'step 3'
if(result.links){
player.$throw(result.links);
for(var i=0;i<result.links.length;i++){
player.storage.new_xingwu.remove(result.links[i]);
result.links[i].discard();
}
player.storage.new_xingwu=[];
game.cardsDiscard(result.links);
player.syncStorage();
if(!player.storage.new_xingwu.length) player.unmarkSkill('new_xingwu');
player.chooseTarget(function(card,player,target){
@ -1592,7 +1590,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
event.target.damage(trigger.source).type='retianxiang';
event.target.addSkill('retianxiang2');
if(get.position(event.card)=='s'){
event.card.discard();
game.cardsDiscard(event.card);
}
}
}
@ -2631,7 +2629,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
subSkill:{
count:{
trigger:{player:'useCard'},
trigger:{player:'useCardAfter'},
silent:true,
filter:function(event,player){
if(event.targets){
@ -5637,10 +5635,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
'step 1'
event.basic=[];
event.nonbasic=[];
event.todis=[];
for(var i=0;i<event.cards.length;i++){
if(get.type(event.cards[i])=='basic'){
if(event.cards[i].name=='tao'){
event.cards[i].discard();
event.todis.push(event.cards[i]);
}
else{
event.basic.push(event.cards[i]);
@ -5651,6 +5650,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
event.nonbasic.push(event.cards[i]);
}
}
game.cardsDiscard(event.todis);
var num=event.nonbasic.length;
if(num==0){
if(event.basic.length==0){
@ -5706,9 +5706,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player.storage.zhaolie.gain(event.basic,'gain2','log');
}
else{
for(var i=0;i<event.basic.length;i++){
event.basic[i].discard();
}
game.cardsDiscard(event.basic);
}
delete player.storage.zhaolie;
}
@ -5967,9 +5965,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player.addTempSkill('tuifeng3');
player.$throw(player.storage.tuifeng.slice(0),1000);
player.storage.tuifeng3=player.storage.tuifeng.length;
while(player.storage.tuifeng.length){
player.storage.tuifeng.shift().discard();
}
game.cardsDiscard(player.storage.tuifeng);
player.storage.tuifeng=[];
player.unmarkSkill('tuifeng')
}
},
@ -6180,13 +6177,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
chat:['粗鄙之语','天地不容','谄谀之臣','皓首匹夫,苍髯老贼','二臣贼子','断脊之犬','我从未见过有如此厚顔无耻之人!'],
callback:function(){
'step 0'
if(event.num1>event.num2){
target.chooseToDiscard('he','弃置一张牌,或令'+get.translation(player)+'摸一张牌').set('ai',function(card){
if(_status.event.goon) return 6-get.value(card);
return 0;
}).set('goon',get.attitude(target,player)<0);
}
else{
if(event.num1<=event.num2){
target.chat(lib.skill.gushe.chat[player.storage.gushe]);
game.delay();
player.storage.gushe++;
@ -6194,15 +6185,26 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if(player.storage.gushe>=7){
player.die();
}
else{
player.chooseToDiscard('弃置一张牌,或摸一张牌').set('ai',function(){return -1;});
//event.finish();
}
}
'step 1'
if(event.num1>=event.num2){
target.chooseToDiscard('he','弃置一张牌,或令'+get.translation(player)+'摸一张牌').set('ai',function(card){
if(_status.event.goon) return 6-get.value(card);
return 0;
}).set('goon',get.attitude(target,player)<0);
}
else event.goto(3);
'step 2'
if(!result.bool){
player.draw();
}
'step 3'
if(event.num1<=event.num2){
player.chooseToDiscard('弃置一张牌,或摸一张牌').set('ai',function(){return -1;});
}
else event.finish();
'step 4'
if(!result.bool) player.draw();
},
ai:{
order:7,
@ -6437,7 +6439,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
var index=player.storage.shefu2.indexOf(trigger.card.name);
if(index!=-1){
var card=player.storage.shefu[index];
card.discard();
game.cardsDiscard(card);
player.$throw(card);
player.storage.shefu.splice(index,1);
player.storage.shefu2.splice(index,1);
@ -6925,15 +6927,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
'step 2'
var gained=[];
var tothrow=[];
for(var i=0;i<event.cards.length;i++){
if(get.type(event.cards[i],'trick')=='trick'){
gained.push(event.cards[i]);
}
else{
event.cards[i].discard();
tothrow.push(event.cards[i]);
}
}
player.gain(gained,'gain2');
game.cardsDiscard(tothrow);
},
ai:{
threaten:1.5
@ -7346,8 +7350,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
var cards=event.cards||result.links;
for(var i=0;i<cards.length;i++){
player.storage.yinling.remove(cards[i]);
cards[i].discard();
}
game.cardsDiscard(cards);
player.$throw(cards);
player.syncStorage('yinling');
if(player.storage.yinling.length==0){
@ -7793,9 +7797,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
content:'cards',
onunmark:function(storage,player){
if(storage&&storage.length){
for(var i=0;i<storage.length;i++){
storage[i].discard();
}
game.cardsDiscard(storage);
player.$throw(storage);
delete player.storage.yinbing;
}
@ -7828,7 +7830,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
'step 1'
var card=result.links[0];
player.storage.yinbing.remove(card);
card.discard();
game.cardsDiscard(card);
player.$throw(card);
game.log(player,'将',card,'置入弃牌堆');
player.syncStorage('yinbing');
@ -7885,9 +7887,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player.$throw(player.storage.yinbing,1000);
var num=player.maxHp-player.countCards('h');
if(num>0) player.draw(num);
while(player.storage.yinbing.length){
player.storage.yinbing.shift().discard();
}
game.cardsDiscard(player.storage.yinbing);
player.storage.yinbing=[];
player.syncStorage('yinbing');
player.unmarkSkill('yinbing');
}
@ -8146,8 +8147,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player.$throw(result.links);
for(var i=0;i<result.links.length;i++){
player.storage.fentian.remove(result.links[i]);
result.links[i].discard();
}
game.cardsDiscard(player.storage.fentian);
player.syncStorage('fentian');
target.loseHp();
}
@ -8286,7 +8287,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player.logSkill('shuliang',trigger.player);
player.storage.tunchu.remove(result.links[0]);
player.$throw(result.links);
result.links[0].discard();
game.cardsDiscard(result.links);
player.syncStorage('tunchu');
if(player.storage.tunchu.length==0){
player.unmarkSkill('tunchu');
@ -9136,7 +9137,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
trigger.source.judge(ui.special);
"step 1"
if(result.color=='black'){
result.card.discard();
game.cardsDiscard(result.card);
trigger.num++;
}
else{
@ -9428,34 +9429,39 @@ game.import('character',function(lib,game,ui,get,ai,_status){
audio:'manjuan',
forced:true,
priority:15,
trigger:{player:'gainEnd'},
trigger:{player:'gainBefore'},
filter:function(event,player){
return event.type!='xinmanjuan';
},
content:function(){
"step 0"
event.cards=trigger.cards.slice(0);
player.discard(event.cards);
if(_status.currentPhase!=player) event.finish();
if(trigger.delay==false) game.delay();
"step 1"
trigger.cancel();
event.cards=trigger.cards.slice(0);
game.cardsDiscard(event.cards);
player.$throw(event.cards,1000);
game.log(player,'将',event.cards,'置入了弃牌堆')
if(_status.currentPhase!=player) event.finish();
"step 2"
event.card=event.cards.shift();
event.togain=[];
var number=get.number(event.card);
for(var i=0;i<ui.discardPile.childNodes.length;i++){
var current=ui.discardPile.childNodes[i];
if(current!=event.card&&get.number(current)==number) event.togain.push(current);
if((!trigger.cards.contains(current))&&get.number(current)==number) event.togain.push(current);
}
if(!event.togain.length) event.goto(4);
"step 2"
"step 3"
player.chooseButton(['是否获得其中的一张牌?',event.togain]).ai=function(button){
return get.value(button.link);
};
"step 3"
"step 4"
if(result.bool){
player.gain(result.links[0],'gain2').type='xinmanjuan';
}
"step 4"
if(event.cards.length) event.goto(1);
"step 5"
if(event.cards.length) event.goto(2);
},
ai:{
threaten:4.2,
@ -9534,15 +9540,24 @@ game.import('character',function(lib,game,ui,get,ai,_status){
content:function(){
"step 0"
player.storage.zuixiang=get.cards(3);
event.trigger('addCardToStorage');
player.showCards(player.storage.zuixiang);
player.markSkill('zuixiang');
player.syncStorage('zuixiang');
"step 1"
var cards=player.storage.zuixiang;
if(cards[0].number==cards[1].number||
cards[0].number==cards[2].number||
cards[2].number==cards[1].number){
player.gain(player.storage.zuixiang,'draw2');
var bool=false;
for(var i=0;i<cards.length;i++){
for(var j=i+1;j<cards.length;j++){
if(cards[i].number==cards[j].number){
bool=true;
break;
}
}
if(bool) break;
}
if(bool){
player.gain(player.storage.zuixiang,'draw2').type='xinmanjuan';
player.storage.zuixiang=[];
player.awakenSkill('zuixiang');
delete player.storage.zuixiang2;
@ -9604,20 +9619,26 @@ game.import('character',function(lib,game,ui,get,ai,_status){
event.finish();
}
else{
for(var i=0;i<player.storage.zuixiang.length;i++){
player.storage.zuixiang[i].discard();
}
player.storage.zuixiang=get.cards(3);
player.storage.zuixiang.addArray(get.cards(3));
event.trigger('addCardToStorage');
player.showCards(player.storage.zuixiang);
player.markSkill('zuixiang');
player.syncStorage('zuixiang');
}
"step 1"
var cards=player.storage.zuixiang;
if(cards[0].number==cards[1].number||
cards[0].number==cards[2].number||
cards[2].number==cards[1].number){
player.gain(player.storage.zuixiang,'draw2');
var bool=false;
for(var i=0;i<cards.length;i++){
for(var j=i+1;j<cards.length;j++){
if(cards[i].number==cards[j].number){
bool=true;
break;
}
}
if(bool) break;
}
if(bool){
player.gain(player.storage.zuixiang,'draw2').type='xinmanjuan';
player.storage.zuixiang=[];
player.awakenSkill('zuixiang');
delete player.storage.zuixiang2;
@ -10203,9 +10224,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}).set('enemy',get.value(event.togive[0])<0);
}
else{
for(var i=0;i<event.cards.length;i++){
event.cards[i].discard();
}
game.cardsDiscard(event.cards);
event.finish();
}
"step 3"
@ -10219,9 +10238,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
event.goto(1);
}
else{
for(var i=0;i<event.cards.length;i++){
event.cards[i].discard();
}
game.cardsDiscard(event.cards);
event.finish();
}
},
@ -11331,9 +11348,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
var cards=[];
if(ui.cardPile.childNodes.length<2){
var discardcards=get.cards(2);
for(var i=0;i<discardcards.length;i++){
discardcards[i].discard();
}
game.cardsDiscard(discardcards);
}
for(var i=0;i<2;i++){
cards.push(ui.cardPile.childNodes[i]);
@ -11370,9 +11385,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
var cards=[];
if(ui.cardPile.childNodes.length<2){
var discardcards=get.cards(2);
for(var i=0;i<discardcards.length;i++){
discardcards[i].discard();
}
game.cardsDiscard(discardcards);
}
for(var i=0;i<2;i++){
cards.push(ui.cardPile.childNodes[i]);
@ -11533,7 +11546,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},trigger.player.judging[0]);
game.addVideo('deletenode',player,get.cardsInfo([trigger.player.judging[0].clone]));
}
trigger.player.judging[0].discard();
game.cardsDiscard(trigger.player.judging[0]);
trigger.player.judging[0]=event.card;
if(!get.owner(event.card,'judge')){
trigger.position.appendChild(event.card);
@ -11647,7 +11660,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
audioname:['re_gongsunzan'],
forced:true,
filter:function(event,player){
return get.sgn(player.hp-2)!=get.sgn(player.hp-2-event.num);
return get.sgn(player.hp-2.5)!=get.sgn(player.hp-2.5-event.num);
},
content:function (){},
mod:{
@ -11752,7 +11765,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player.gain(player.storage.bifa[0],'draw2','log','fromStorage');
}
else{
player.storage.bifa[0].discard();
game.cardsDiscard(player.storage.bifa[0]);
game.log(player.storage.bifa[0],'进入弃牌堆');
player.$throw(player.storage.bifa[0],1000);
player.loseHp();
@ -12756,7 +12769,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
kuangfu:'狂斧',
kuangfu_info:'每当你使用杀造成伤害,可以将对方的一张装备牌移到你的装备区或弃置之。',
xintan:'心惔',
xintan_info:'出牌阶段限一次,你可以移去两张“焚”并选择一名角色,该角色失去一点体',
xintan_info:'出牌阶段限一次,你可以移去两张“焚”并选择一名角色,该角色失去一点体',
fentian:'焚天',
fentian_info:'锁定技,结束阶段开始时,若你的手牌数少于体力值,你须选择一名攻击范围内的角色,将其一张牌置于你的武将牌上,称为“焚”。锁定技,你的攻击范围+XX为“焚”的数量',
zhiri:'炙日',
@ -12947,8 +12960,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
taichen_info:'出牌阶段限一次,你可以自减一点体力,视为对一名角色使用一张杀(不计入回合内出杀限制)',
manjuan_info:'其他角色的卡牌因弃置而进入弃牌堆后,你可以弃置一张花色与之不同的牌,然后获得之',
xinmanjuan:'漫卷',
xinmanjuan_info:'每当你将获得任何一张牌,将之置于弃牌堆。若此情况处于你的回合中,你可依次将与该牌点数相同的一张牌从弃牌堆置于你手上。',
zuixiang_info:'限定技,准备阶段开始时,你可以展示牌库顶的3张牌并置于你的武将牌上你不可使用或打出与该些牌同类的牌,所有同类牌对你无效。之后每个你的准备阶段,你须重复展示一次,直至些牌中任意两张点数相同时,将你武将牌上的全部牌置于你的手上。',
xinmanjuan_info:'锁定技,当你不因【漫卷】或【醉乡】而获得牌时,你将此牌置入弃牌堆。然后若此时处于你的回合内,则你可以从弃牌堆中选择获得一张与此牌点数相同的其他牌。',
zuixiang_info:'限定技,准备阶段开始时,你可以展示牌堆顶的3张牌并置于你的武将牌上。你不可使用或打出与该些牌同类的牌,所有同类牌对你无效。之后每个你的准备阶段,你须重复展示一次,直至些牌中任意两张点数相同时,将你武将牌上的全部牌置于你的手上。',
naman_info:'你可以获得其他角色打出的杀',
xiemu_info:'每当你成为其他角色的黑色牌的目标,可以弃置一张杀并摸两张牌',
spmengjin_info:'每当你使用一张杀,可以弃置目标一张牌',

View File

@ -227,7 +227,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},trigger.player.judging[0]);
game.addVideo('deletenode',player,get.cardsInfo([trigger.player.judging[0].clone]));
}
trigger.player.judging[0].discard();
game.cardsDiscard(trigger.player.judging[0]);
trigger.player.judging[0]=result.cards[0];
if(!get.owner(result.cards[0],'judge')){
trigger.position.appendChild(result.cards[0]);

View File

@ -1235,31 +1235,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){
trigger:{global:'die'},
priority:5,
filter:function(event){
if(!event.playerCards||!event.playerCards.length) return false;
for(var i=0;i<event.playerCards.length;i++){
if(!get.owner(event.playerCards[i])||get.owner(event.playerCards[i])==event.player) return true;
}
return false;
},
check:function(event){
for(var i=0;i<event.playerCards.length;i++){
if(event.playerCards[i].name=='du') return false;
}
return true;
return event.player.countCards('he')>0;
},
content:function(){
"step 0"
event.togain=[];
for(var i=0;i<trigger.playerCards.length;i++){
if(!get.owner(trigger.playerCards[i])||get.owner(trigger.playerCards[i])==trigger.player) event.togain.push(trigger.playerCards[i]);
}
event.togain=trigger.player.getCards('he');
event.shown=trigger.player.getCards('e');
var num=event.togain.length-event.shown.length;
player.gain(event.togain);
trigger.player.$give(event.togain.length,player);
if(num) trigger.player.$give(num,player);
if(event.shown.length) trigger.player.$give(event.shown,player);
game.delay();
"step 1"
for(var i=0;i<event.togain.length;i++){
trigger.cards.remove(event.togain[i]);
}
},
},
"xinfu_fujian":{
@ -2443,7 +2429,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
delete player.storage.xinfu_yanyu2;
},
trigger:{
global:"loseEnd",
global:["loseEnd","cardsDiscardEnd"],
},
direct:true,
filter:function (event,player){
@ -2956,9 +2942,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if(event.gains.length) player.gain(event.gains,'gain2');
if(event.discards.length){
player.$throw(event.discards);
for(var i=0;i<event.discards.length;i++){
event.discards[i].discard();
}
game.cardsDiscard(event.discards);
}
}
},
@ -3371,7 +3355,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if(result.bool){
player.$throw(result.links);
var card=result.links[0];
card.discard();
game.cardsDiscard(card);
player.storage.xinfu_zengdao2.remove(card);
player.syncStorage('xinfu_zengdao2');
player.updateMarks('xinfu_zengdao2');

View File

@ -855,7 +855,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player.chooseToCompare(trigger.player);
'step 1'
if(result.bool){
trigger.skipShan=true;
trigger.cancel();
}
}
}
@ -872,10 +872,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
audio:2,
trigger:{player:'chooseCardBegin'},
check:function(event,player){
return player.hasCard(function(card){
return !player.hasCard(function(card){
var val=get.value(card);
return val<0||(val<=4&&card.number>=11);
});
},'h');
},
filter:function(event){
return event.type=='compare'&&!event.directresult;
@ -1648,9 +1648,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
}
if(event.togain.length){
for(var i=0;i<dialog.buttons.length;i++){
event.togain[i].discard();
}
game.cardsDiscard(event.togain);
}
game.broadcast(function(id){
var dialog=get.idDialog(id);
@ -3416,15 +3414,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){
var cards=get.cards(2);
target.viewCards('督粮',cards);
event.cards2=[];
event.tothrow=[];
for(var i=0;i<cards.length;i++){
if(get.type(cards[i])=='basic'){
ui.special.appendChild(cards[i]);
event.cards2.push(cards[i]);
}
else{
cards[i].discard();
event.tothrow.push(cards[i]);
}
}
game.cardsDiscard(event.tothrow);
}
else{
target.addSkill('duliang2');
@ -3590,43 +3590,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
'step 1'
ui.cardPile.insertBefore(cards[0],ui.cardPile.firstChild);
game.updateRoundNumber();
var n1=target.getCards('he',function(card){
if(!lib.filter.cardDiscardable(card,player)) return false;
return get.type(card,'trick')=='trick';
});
var n2=target.getCards('he',function(card){
if(!lib.filter.cardDiscardable(card,player)) return false;
return get.type(card,'trick')!='trick';
});
if(n1.length>1||n2.length>2||(n1.length==1&&n2.length==2)){
target.chooseToDiscard('弃置一张锦囊牌,或两张非锦囊牌',true,'he',function(card,player){
if(!lib.filter.cardDiscardable(card,player)) return false;
if(!_status.event.nontrick){
return get.type(card,'trick')=='trick';
}
if(ui.selected.cards.length){
return get.type(card,'trick')!='trick';
}
return true;
}).set('ai',function(card){
if(get.type(card,'trick')=='trick'){
return 8-get.value(card);
}
return -get.value(card);
}).set('selectCard',function(){
if(ui.selected.cards.length==1&&get.type(ui.selected.cards[0],'trick')=='trick'){
return 1;
}
return 2;
}).set('nontrick',n2.length>=2).set('complexCard',true);
}
else{
if(n1.length){
target.discard(n1);
}
else if(n2.length){
target.discard(n2);
}
'step 2'
target.chooseToDiscard(true).prompt='请弃置一张锦囊牌,或依次弃置两张非锦囊牌。';
'step 3'
if((!result.cards||get.type(result.cards[0],'trick')!='trick')&&target.countCards('he',{type:['trick','delay']})){
target.chooseToDiscard(true,function(card){
return get.type(card,'trick')!='trick';
}).prompt='请弃置第二张非锦囊牌';
}
},
ai:{
@ -4019,7 +3989,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player.logSkill('chunlao');
player.$throw(result.links);
player.storage.chunlao.remove(result.links[0]);
result.links[0].discard();
game.cardsDiscard(result.links[0]);
player.syncStorage('chunlao');
target.useCard({name:'jiu'},target);
if(!player.storage.chunlao.length){
@ -5989,7 +5959,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
content:function(){
player.$throw(player.storage.xinpojun2,1000);
for(var i=0;i<player.storage.xinpojun2.length;i++){
player.storage.xinpojun2[i].discard();
game.cardsDiscard(player.storage.xinpojun2);
}
game.log(player,'弃置了',player.storage.xinpojun2);
delete player.storage.xinpojun2;
@ -6030,9 +6000,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
"step 0"
player.draw();
"step 1"
for(var i=0;i<cards.length;i++){
cards[i].discard();
}
game.cardsDiscard(cards);
},
ai:{
basic:{
@ -7091,7 +7059,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player.chooseCardButton(player.storage.quanji,true);
"step 1"
var card=result.links[0];
card.discard();
game.cardsDiscard(card);
player.$throw(card);
player.storage.quanji.remove(card);
if(!player.storage.quanji.length){
@ -9072,9 +9040,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
cards2.push(result.links[i]);
cards.remove(result.links[i]);
}
for(var i=0;i<cards.length;i++){
cards[i].discard();
}
game.cardsDiscard(cards);
event.cards2=cards2;
}
else{
@ -9241,9 +9207,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
content:'cards',
onunmark:function(storage,player){
if(storage&&storage.length){
for(var i=0;i<storage.length;i++){
storage[i].discard();
}
game.cardsDiscard(storage);
player.$throw(storage);
player.storage.xiansi.length=0;
}
@ -9327,9 +9291,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
event.target.$throw(links);
game.log(event.target,'被移去了',links);
for(var i=0;i<links.length;i++){
links[i].discard();
}
game.cardsDiscard(links);
player.useCard({name:'sha'},event.target);
}
},

View File

@ -2824,7 +2824,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
enable:'phaseUse',
usable:1,
filterTarget:function(card,player,target){
return player!=target&&target.hasCard(function(card){
return target.hasCard(function(card){
return !get.info(card).unique;
},'e');
},

View File

@ -9302,6 +9302,11 @@
},
element:{
content:{
cardsDiscard:function(){
for(var i=0;i<cards.length;i++){
cards[i].discard();
}
},
chooseToEnable:function(){
'step 0'
var list=[];
@ -10946,12 +10951,13 @@
};
"step 2"
var cards=[];
player.lose(result[0].cards);
player.lose(result[0].cards,ui.special);
for(var i=1;i<result.length;i++){
event.list[i].lose(result[i].cards);
event.list[i].lose(result[i].cards,ui.special);
cards.push(result[i].cards[0]);
}
event.cardlist=cards;
event.cards=cards;
event.card1=result[0].cards[0];
event.num1=event.card1.number;
event.iwhile=0;
@ -10976,7 +10982,7 @@
game.delay(0,1500);
}
else{
event.finish();
event.goto(7);
}
"step 4"
event.result.num1[event.iwhile]=event.num1;
@ -11025,6 +11031,13 @@
game.broadcastAll(ui.clear);
event.iwhile++;
event.goto(3);
"step 7"
event.cards.add(event.card1);
var cards2=[];
for(var i=0;i<event.cards.length;i++){
if(!get.owner(event.cards[i])) cards2.push(event.cards[i]);
}
game.cardsDiscard(cards2);
},
chooseToCompare:function(){
"step 0"
@ -11097,8 +11110,8 @@
event.addToAI=true;
}
}
player.lose(event.card1);
target.lose(event.card2);
player.lose(event.card1,ui.special);
target.lose(event.card2,ui.special);
"step 5"
game.broadcast(function(){
ui.arena.classList.add('thrownhighlight');
@ -11169,6 +11182,11 @@
else if(event.preserve=='lose'){
event.preserve=!event.result.bool;
}
"step 8"
var cards=[];
if(!get.owner(event.card1)) cards.push(event.card1);
if(!get.owner(event.card2)) cards.push(event.card2);
game.cardsDiscard(cards);
},
chooseSkill:function(){
'step 0'
@ -13885,10 +13903,6 @@
else{
game.log(player,'阵亡')
}
event.cards=player.getCards('hej');
event.playerCards=player.getCards('he');
event.es=player.getCards('e');
event.hs=player.getCards('h');
if(!game.reserveDead){
for(var mark in player.marks){
@ -13986,14 +14000,14 @@
if(player.dieAfter) player.dieAfter(source);
event.trigger('die');
"step 1"
if(event.cards.length){
player.$throw(event.cards,1000);
game.log(player,'弃置了',event.cards,event.logvid);
for(var i=0;i<event.cards.length;i++){
event.cards[i].discard();
if(player.isDead()){
event.cards=player.getCards('hej');
if(event.cards.length){
player.$throw(event.cards,1000);
game.log(player,'弃置了',event.cards,event.logvid);
game.cardsDiscard(event.cards);
}
}
if(typeof _status.coin=='number'&&source&&!_status.auto){
if(source==game.me||source.isUnderControl()){
_status.coin+=10;
@ -14066,7 +14080,7 @@
"step 4"
if(player.isMin() || player.countCards('e',{subtype:get.subtype(card)})){
event.finish();
card.discard();
game.cardsDiscard(card);
delete player.equiping;
return;
}
@ -14129,7 +14143,7 @@
delete cards[0]._transform;
var viewAs=typeof card=='string'?card:card.name;
if(!lib.card[viewAs]||!lib.card[viewAs].effect){
cards[0].discard();
game.cardsDiscard(cards[0]);
}
else{
cards[0].style.transform='';
@ -14250,7 +14264,10 @@
game.addVideo('judge2',null,event.videoId);
ui.arena.classList.remove('thrownhighlight');
game.log(player,'的判定结果为',event.result.card);
if(!get.owner(event.result.card)) event.position.appendChild(event.result.card);
if(!get.owner(event.result.card)){
if(event.position==ui.discardPile) game.cardsDiscard(event.result.card);
else event.position.appendChild(event.result.card);
}
},
turnOver:function(){
game.log(player,'翻面');
@ -14770,7 +14787,7 @@
},
uninit:function(){
for(var i=1;i<6;i++){
this.enableEquip(i);
if(this.isDisabled(i)) this.enableEquip(i);
}
this.node.avatar.hide();
@ -17600,7 +17617,7 @@
target=target.next;
}
if(target==this){
card.discard();
game.cardsDiscard(card);
}
else{
if(card.name!=name){
@ -18054,9 +18071,7 @@
if(info.intro.onunmark=='throw'){
if(get.itemtype(this.storage[name])=='cards'){
this.$throw(this.storage[name]);
while(this.storage[name].length){
this.storage[name].shift().discard();
}
game.cardsDiscard(this.storage[name]);
}
}
else if(typeof info.intro.onunmark=='function'){
@ -18747,9 +18762,7 @@
this.$throw(cards);
}
if(this.onremove=='discard'||this.onremove=='lose'){
for(var i=0;i<cards.length;i++){
cards[i].discard();
}
game.cardsDiscard(cards);
delete this.storage[skill];
}
}
@ -23191,9 +23204,7 @@
player.draw();
}
"step 1"
for(var i=0;i<cards.length;i++){
cards[i].discard();
}
game.cardsDiscard(cards);
},
ai:{
basic:{
@ -24235,6 +24246,14 @@
},
};
var game={
cardsDiscard:function(cards){
var type=get.itemtype(cards);
if(type!='cards'&&type!='card') return {};
var next=game.createEvent('cardsDiscard');
next.cards=type=='cards'?cards:[cards];
next.setContent('cardsDiscard');
return next;
},
online:false,
onlineID:null,
onlineKey:null,

View File

@ -1,22 +1,20 @@
window.noname_update={
version:'1.9.90.5',
update:'1.9.90.4',
version:'1.9.91',
update:'1.9.90.5',
changeLog:[
'SP庞统技能还原',
'添加cardsDiscard的新时机',
'BUG修复',
],
files:[
'card/guozhan.js',
'card/standard.js',
'character/extra.js',
'card/sp.js',
'character/refresh.js',
'character/shenhua.js',
'character/sp.js',
'character/standard.js',
'character/xinghuoliaoyuan.js',
'mode/boss.js',
'mode/guozhan.js',
'game/config.js',
'character/yijiang.js',
'character/yxs.js',
'mode/versus.js',
'game/game.js',
]
};

View File

@ -5467,6 +5467,12 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
content:{
replacePlayer:function(){
"step 0"
var cards=source.getCards('hej');
if(cards.length){
source.$throw(cards,1000);
game.cardsDiscard(cards);
}
"step 1"
var list=(source.side==game.me.side)?_status.friend:_status.enemy;
if(list.length==0){
// if(game.friend.contains(source)){
@ -5509,7 +5515,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
else{
event.character=list[Math.floor(Math.random()*list.length)];
}
"step 1"
"step 2"
game.uncheck();
_status.friend.remove(event.character);
_status.enemy.remove(event.character);
@ -5539,13 +5545,18 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
game.onSwapControl();
}
game.triggerEnter(source);
"step 2"
"step 3"
// if(_status.currentPhase==source){
// source.skip('phase');
// }
},
replacePlayerTwo:function(){
'step 0'
var cards=source.getCards('hej');
if(cards.length){
source.$throw(cards,1000);
game.cardsDiscard(cards);
}
game.delay();
'step 1'
source.revive(null,false);
@ -5574,6 +5585,11 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
},
replacePlayerOL:function(){
'step 0'
var cards=source.getCards('hej');
if(cards.length){
source.$throw(cards,1000);
game.cardsDiscard(cards);
}
game.delay();
'step 1'
if(event.source.side==game.me.side){