This commit is contained in:
libccy 2017-02-06 14:56:22 +08:00
parent 22bd6dda98
commit 3adc7d8f89
11 changed files with 453 additions and 138 deletions

View File

@ -119,15 +119,99 @@ card.gujian={
fullskin:true, fullskin:true,
type:'equip', type:'equip',
subtype:'equip2', subtype:'equip2',
skills:['mutoumianju_skill']
}, },
yuheng:{ yuheng:{
fullskin:true, fullskin:true,
type:'equip', type:'equip',
subtype:'equip5', subtype:'equip5',
nopower:true,
nomod:true,
skills:['yuheng_skill'],
ai:{
equipValue:function(card,player){
if(player.hp>=4) return 5;
if(player.hp>=3) return 4;
if(player.hp>=2) return 2;
return 1;
}
}
},
yuheng_plus:{
fullskin:true,
type:'equip',
subtype:'equip5',
nopower:true,
nomod:true,
epic:true,
cardimage:'yuheng',
skills:['yuheng_plus_skill'],
ai:{
equipValue:function(card,player){
if(player.hp>=4) return 7;
if(player.hp>=3) return 6;
if(player.hp>=2) return 2.5;
return 1;
}
}
},
yuheng_pro:{
fullskin:true,
type:'equip',
subtype:'equip5',
nopower:true,
nomod:true,
legend:true,
cardimage:'yuheng',
skills:['yuheng_pro_skill'],
ai:{
equipValue:function(card,player){
if(player.hp>=4) return 7.5;
if(player.hp>=3) return 6;
if(player.hp>=2) return 2.5;
return 1;
}
}
}, },
shujinsan:{ shujinsan:{
fullskin:true, fullskin:true,
type:'basic', type:'basic',
enable:true,
filterTarget:function(card,player,target){
return target.num('he')>0;
},
content:function(){
'step 0'
target.chooseToDiscard('he',[1,target.num('he')],'弃置任意张牌并摸等量的牌').ai=function(card){
return 6-ai.get.value(card);
}
'step 1'
if(result.bool){
target.draw(result.cards.length);
}
},
ai:{
order:1.5,
value:[4,1],
result:{
target:function(player,target){
if(target==player){
var cards=player.get('he');
var num=-1;
for(var i=0;i<cards.length;i++){
if(ai.get.value(cards[i])<6) num++;
}
if(player.needsToDiscard()&&num<1){
num=1;
}
return Math.max(0,num);
}
else{
return target.num('he')/2;
}
}
}
}
}, },
ziyangdan:{ ziyangdan:{
fullskin:true, fullskin:true,
@ -315,9 +399,32 @@ card.gujian={
fullskin:true, fullskin:true,
}, },
shihuifen:{ shihuifen:{
type:'jiguan', type:'trick',
enable:true,
fullskin:true, fullskin:true,
filterTarget:true,
content:function(){
'step 0'
_status.currentPhase.chooseToRespond({name:'shan'});
'step 1'
if(!result.bool){
_status.currentPhase.addTempSkill('shihuifen','phaseUseAfter');
}
},
ai:{
order:1,
value:[5,1],
useful:[5,1],
tag:{
respond:1,
respondShan:1,
},
result:{
target:function(player,target){
if(target.num('h')>=3||target.needsToDiscard()) return -1.5;
return 0;
}
}
}
}, },
jinlianzhu:{ jinlianzhu:{
type:'jiguan', type:'jiguan',
@ -325,15 +432,206 @@ card.gujian={
fullskin:true, fullskin:true,
}, },
}, },
skill:{}, skill:{
mutoumianju_skill:{
enable:'chooseToUse',
filterCard:true,
viewAs:{name:'sha'},
viewAsFilter:function(player){
if(!player.num('h')) return false;
},
prompt:'将一张手牌当杀使用',
check:function(card){return 5-ai.get.value(card)},
ai:{
order:3.1,
skillTagFilter:function(player,tag,arg){
if(arg!='use') return false;
if(!player.num('h')) return false;
},
},
},
yuheng_skill:{
enable:'phaseUse',
usable:1,
filterTarget:function(card,player,target){
return target!=player&&target.num('h')>0;
},
content:function(){
'step 0'
player.loseHp();
'step 1'
var hs=target.get('h');
if(hs.length){
var card=hs.randomGet();
player.gain(card,target);
target.$give(card,player);
if(get.suit(card)=='spade'){
event.bool=true;
}
}
'step 2'
if(event.bool){
target.loseHp();
}
var card=player.getEquip('yuheng');
if(card){
if(typeof card.storage.yuheng!='number'){
card.storage.yuheng=1;
}
else{
card.storage.yuheng++;
}
if(card.storage.yuheng>=3){
card.init([card.suit,card.number,'yuheng_plus',card.nature]);
player.addTempSkill('yuheng_plus_temp','phaseAfter');
}
}
},
ai:{
order:6,
result:{
target:function(player,target){
if(ai.get.attitude(player,target)>=0) return 0;
var nh=target.num('h');
var num=-1/Math.sqrt(1+nh);
if(player.hp>=4) return num;
if(player.hp>=3&&nh<=2) return num;
if(player.hp>=2&&target.hp==1&&nh<=2) return num;
return 0;
}
}
}
},
yuheng_plus_temp:{},
yuheng_plus_skill:{
enable:'phaseUse',
usable:1,
filter:function(event,player){
return !player.hasSkill('yuheng_plus_temp');
},
filterTarget:function(card,player,target){
return target!=player&&target.num('h')>0;
},
content:function(){
'step 0'
player.loseHp();
'step 1'
var hs=target.get('h');
if(hs.length){
var card=hs.randomGet();
player.gain(card,target);
target.$give(card,player);
if(get.color(card)=='black'){
event.bool=true;
}
}
'step 2'
if(event.bool){
target.loseHp();
}
var card=player.getEquip('yuheng_plus');
if(card){
if(typeof card.storage.yuheng!='number'){
card.storage.yuheng=1;
}
else{
card.storage.yuheng++;
}
if(card.storage.yuheng>=7){
card.init([card.suit,card.number,'yuheng_pro',card.nature]);
}
}
},
ai:{
order:6,
result:{
target:function(player,target){
if(ai.get.attitude(player,target)>=0) return 0;
var nh=target.num('h');
var num=-1/Math.sqrt(1+nh);
if(player.hp>=4) return num;
if(player.hp>=3&&nh<=2) return num;
if(player.hp>=2&&target.hp==1&&nh<=2) return num;
return 0;
}
}
}
},
yuheng_pro_skill:{
enable:'phaseUse',
filterTarget:function(card,player,target){
return target!=player&&target.num('h')>0;
},
content:function(){
'step 0'
player.loseHp();
'step 1'
var hs=target.get('h');
if(hs.length){
var card=hs.randomGet();
player.gain(card,target);
target.$give(card,player);
if(get.color(card)=='black'){
event.bool=true;
}
}
'step 2'
if(event.bool){
target.loseHp();
}
},
ai:{
order:6,
result:{
target:function(player,target){
if(ai.get.attitude(player,target)>=0) return 0;
var nh=target.num('h');
var num=-1/Math.sqrt(1+nh);
if(player.hp>=4) return num;
if(player.hp>=3&&nh<=2) return num;
if(player.hp>=2&&target.hp==1&&nh<=2) return num;
return 0;
}
}
}
},
shihuifen:{
mark:true,
intro:{
content:'使用卡牌无法指定其他角色为目标'
},
mod:{
playerEnabled:function(card,player,target){
if(player!=target) return false;
}
}
},
_shihuifen:{
trigger:{global:'phaseUseBegin'},
direct:true,
filter:function(event,player){
if(event.player==player) return false;
if(!lib.filter.targetEnabled({name:'shihuifen'},player,event.player)) return false;
return player.hasCard('shihuifen');
},
content:function(){
player.chooseToUse(get.prompt('shihuifen',trigger.player).replace(/发动/,'使用'),function(card,player){
if(card.name!='shihuifen') return false;
var mod=game.checkMod(card,player,'unchanged','cardEnabled',player.get('s'));
if(mod!='unchanged') return mod;
return true;
},trigger.player,-1).targetRequired=true;
}
},
},
cardType:{ cardType:{
food:0.3 food:0.3
}, },
translate:{ translate:{
// jinlianzhu:'金莲珠', // jinlianzhu:'金莲珠',
// jinlianzhu_info:'金莲珠', // jinlianzhu_info:'金莲珠',
// shihuifen:'石灰粉', shihuifen:'石灰粉',
// shihuifen_info:'石灰粉', shihuifen_info:'在一名其他角色的出牌阶段开始时对其使用,目标需打出一张闪,否则此阶段使用卡牌无法指定其他角色为目标',
// liufengsan:'流风散', // liufengsan:'流风散',
// liufengsan_info:'流风散', // liufengsan_info:'流风散',
// liutouge:'六骰格', // liutouge:'六骰格',
@ -362,12 +660,24 @@ card.gujian={
// yunvyuanshen_info:'玉女元参', // yunvyuanshen_info:'玉女元参',
// ziyangdan:'紫阳丹', // ziyangdan:'紫阳丹',
// ziyangdan_info:'紫阳丹', // ziyangdan_info:'紫阳丹',
// yuheng:'玉衡', yuheng:'玉衡',
// yuheng_info:'结束阶段,若场你的体力值不是全场最少,你失去一点体力并令玉衡获得一点力量;准备阶段,玉衡每有一点力量,你便可以获得一名其他角色的一张牌', yuheng_plus:'玉衡',
// shujinsan:'舒筋散', yuheng_pro:'玉衡',
// shujinsan_info:'对任意角色使用,目标可弃置任意张牌,并摸等量的牌', yuheng_skill:'玉衡',
// mutoumianju:'木头面具', yuheng_plus_skill:'玉衡',
// mutoumianju_info:'装备后视为拥有技能龙胆', yuheng_pro_skill:'玉衡',
yuheng_info:'出牌阶段限一次,你可以失去一点体力,然后获得一名其他角色的一张手牌并展示,若为黑桃牌,该角色也失去一点体力(此牌不可被其它牌强化;此牌在本局游戏中第三次和第七次发动效果后,分别获得一次强化)',
yuheng_plus_info:'由普通玉衡强化得到,将玉衡技能描述中的“黑桃牌”改为”黑色牌',
yuheng_pro_info:'由普通玉衡二次强化得到,将玉横技能描述中的“黑桃牌”改为”黑色牌,并去掉使用次数限制',
yuheng_skill_info:'出牌阶段限一次,你可以失去一点体力,然后获得一名其他角色的手牌并展示,若为黑桃牌,该角色也失去一点体力',
yuheng_plus_skill_info:'出牌阶段限一次,你可以失去一点体力,然后获得一名其他角色的手牌并展示,若为黑色牌,该角色也失去一点体力',
yuheng_pro_skill_info:'出牌阶段,你可以失去一点体力,然后获得一名其他角色的手牌并展示,若为黑色牌,该角色也失去一点体力',
shujinsan:'舒筋散',
shujinsan_info:'对任意角色使用,目标可弃置任意张牌,并摸等量的牌',
mutoumianju:'木头面具',
mutoumianju_info:'你可以将一张手牌当作杀使用',
mutoumianju_skill:'木杀',
mutoumianju_skill_info:'你可以将一张手牌当作杀使用',
// heilonglinpian:'黑龙鳞片', // heilonglinpian:'黑龙鳞片',
// heilonglinpian_info:'对自己使用,获得一点护甲,直到下一回合开始,计算其他角色与你的距离时始终+1', // heilonglinpian_info:'对自己使用,获得一点护甲,直到下一回合开始,计算其他角色与你的距离时始终+1',
@ -405,5 +715,15 @@ card.gujian={
['spade',3,'bingpotong','poison'], ['spade',3,'bingpotong','poison'],
['club',11,'bingpotong','poison'], ['club',11,'bingpotong','poison'],
['club',12,'bingpotong','poison'], ['club',12,'bingpotong','poison'],
['club',5,'shihuifen'],
['club',1,'shihuifen'],
['spade',13,'shihuifen'],
['spade',7,'yuheng'],
['club',4,'mutoumianju'],
['diamond',6,'shujinsan'],
['spade',2,'shujinsan'],
] ]
}; };

View File

@ -284,7 +284,6 @@ card.guozhan={
fullskin:true, fullskin:true,
type:"equip", type:"equip",
subtype:"equip2", subtype:"equip2",
nomod:true,
skills:['huxinjing'], skills:['huxinjing'],
ai:{ ai:{
basic:{ basic:{
@ -756,8 +755,8 @@ card.guozhan={
forced:true, forced:true,
popup:false, popup:false,
content:function(){ content:function(){
var card=player.get('e','2'); var card=player.getEquip('huxinjing');
if(card&&card.name.indexOf('huxinjing')==0){ if(card){
player.discard(card); player.discard(card);
} }
} }

View File

@ -24,6 +24,17 @@ card.sp={
}, },
onLose:function(){ onLose:function(){
player.unmarkSkill('muniu_skill6'); player.unmarkSkill('muniu_skill6');
if(event.parent.type!='equip'&&card&&card.cards&&card.cards.length){
player.$throw(card.cards,1000);
player.popup('muniu');
game.log(card,'掉落了',card.cards);
while(card.cards.length){
var card2=card.cards.shift();
if(card2.parentNode.id=='special'){
ui.discardPile.appendChild(card2);
}
}
}
}, },
equipDelay:false, equipDelay:false,
loseDelay:false, loseDelay:false,
@ -523,41 +534,6 @@ card.sp={
return false; return false;
}, },
}, },
_muliu:{
trigger:{player:'loseEnd'},
forced:true,
popup:false,
filter:function(event,player){
if(event.type=='equip') return false;
for(var i=0;i<event.cards.length;i++){
if(event.cards[i].name.indexOf('muniu')==0&&event.cards[i].original=='e'){
return true;
}
}
return false;
},
content:function(){
for(var i=0;i<trigger.cards.length;i++){
if(trigger.cards[i].name.indexOf('muniu')==0&&trigger.cards[i].original=='e'){
var card=trigger.cards[i];
var card2;
if(card.cards&&card.cards.length){
player.$throw(card.cards,1000);
player.popup('muniu');
game.log('木牛流马掉落了',card.cards);
while(card.cards.length){
card2=card.cards.shift();
if(card2.parentNode.id=='special'){
ui.discardPile.appendChild(card2);
}
}
}
break;
}
}
}
},
_du:{ _du:{
trigger:{player:['useCardAfter','respondAfter','discardAfter']}, trigger:{player:['useCardAfter','respondAfter','discardAfter']},
popup:false, popup:false,

View File

@ -701,7 +701,6 @@ card.swd={
fullskin:true, fullskin:true,
type:'equip', type:'equip',
subtype:'equip5', subtype:'equip5',
nomod:true,
equipDelay:false, equipDelay:false,
loseDelay:false, loseDelay:false,
onEquip:function(){ onEquip:function(){
@ -1012,7 +1011,7 @@ card.swd={
enable:function(card,player){ enable:function(card,player){
var es=player.get('e'); var es=player.get('e');
for(var i=0;i<es.length;i++){ for(var i=0;i<es.length;i++){
if(lib.inpile.contains(es[i].name)) return true; if(lib.inpile.contains(es[i].name)&&!lib.card[es[i].name].nopower) return true;
} }
return false; return false;
}, },
@ -1026,6 +1025,7 @@ card.swd={
}, },
selectTarget:-1, selectTarget:-1,
content:function(){ content:function(){
'step 0'
var es=target.get('e'); var es=target.get('e');
var list=get.typeCard('hslingjian'); var list=get.typeCard('hslingjian');
var list2=get.typeCard('jiqi'); var list2=get.typeCard('jiqi');
@ -1048,14 +1048,14 @@ card.swd={
var cards=[]; var cards=[];
var time=0; var time=0;
for(var i=0;i<es.length;i++){ for(var i=0;i<es.length;i++){
if(!lib.inpile.contains(es[i].name)){ if(!lib.inpile.contains(es[i].name)||lib.card[es[i].name].nopower){
es.splice(i--,1); es.splice(i--,1);
} }
} }
var num=get.rand(es.length); var num=get.rand(es.length);
var card; var card;
target.removeEquipTrigger();
for(var i=0;i<es.length;i++){ for(var i=0;i<es.length;i++){
target.clearEquipTrigger(es[i]);
if(i==num){ if(i==num){
card=game.createCard(list2.randomGet()); card=game.createCard(list2.randomGet());
} }
@ -1064,27 +1064,24 @@ card.swd={
} }
cards.push(card); cards.push(card);
time+=200; time+=200;
setTimeout((function(card,name){ setTimeout((function(card,name,last){
return function(){ return function(){
ui.discardPile.appendChild(game.createCard(card)); ui.discardPile.appendChild(game.createCard(card));
card.init([card.suit,card.number,name,card.nature]); card.init([card.suit,card.number,name,card.nature]);
card.style.transform='scale(1.1)'; card.style.transform='scale(1.1)';
card.classList.add('glow'); card.classList.add('glow');
var info=get.info(card); if(last) game.resume();
if(info.skills){
for(var i=0;i<info.skills.length;i++){
target.addSkillTrigger(info.skills[i]);
}
}
setTimeout(function(){ setTimeout(function(){
card.style.transform=''; card.style.transform='';
card.classList.remove('glow'); card.classList.remove('glow');
},500); },500);
} }
}(es[i],lib.skill._lingjianduanzao.process([card,es[i]]))),i*200); }(es[i],lib.skill._lingjianduanzao.process([card,es[i]]),i==es.length-1)),i*200);
} }
target.$gain2(cards); target.$gain2(cards);
game.delay(0,time) game.pause();
'step 1'
target.addEquipTrigger();
}, },
ai:{ ai:{
value:7, value:7,
@ -1971,7 +1968,6 @@ card.swd={
fullskin:true, fullskin:true,
type:'equip', type:'equip',
subtype:'equip5', subtype:'equip5',
nomod:true,
skills:['yiluan'], skills:['yiluan'],
ai:{ ai:{
basic:{ basic:{
@ -2122,14 +2118,14 @@ card.swd={
mark:true, mark:true,
intro:{ intro:{
content:function(storage,player){ content:function(storage,player){
var card=player.get('e','5'); var card=player.getEquip('lianyaohu');
if(card&&card.storage.shouna&&card.storage.shouna.length){ if(card&&card.storage.shouna&&card.storage.shouna.length){
return '共有'+get.cnNumber(card.storage.shouna.length)+'张牌'; return '共有'+get.cnNumber(card.storage.shouna.length)+'张牌';
} }
return '共有〇张牌'; return '共有〇张牌';
}, },
mark:function(dialog,storage,player){ mark:function(dialog,storage,player){
var card=player.get('e','5'); var card=player.getEquip('lianyaohu');
if(card&&card.storage.shouna&&card.storage.shouna.length){ if(card&&card.storage.shouna&&card.storage.shouna.length){
dialog.addAuto(card.storage.shouna); dialog.addAuto(card.storage.shouna);
} }
@ -2138,7 +2134,7 @@ card.swd={
} }
}, },
markcount:function(storage,player){ markcount:function(storage,player){
var card=player.get('e','5'); var card=player.getEquip('lianyaohu');
if(card&&card.storage.shouna) return card.storage.shouna.length; if(card&&card.storage.shouna) return card.storage.shouna.length;
return 0; return 0;
} }
@ -2149,13 +2145,7 @@ card.swd={
direct:true, direct:true,
filter:function(event,player){ filter:function(event,player){
if(get.type(event.card)!='trick') return false; if(get.type(event.card)!='trick') return false;
if(player.num('h','shencaojie')) return true; if(player.hasCard('shencaojie')) return true;
var mn=player.get('e','5');
if(mn&&mn.name=='muniu'&&mn.cards&&mn.cards.length){
for(var i=0;i<mn.cards.length;i++){
if(mn.cards[i].name=='shencaojie') return true;
}
}
return false; return false;
}, },
content:function(){ content:function(){
@ -2187,15 +2177,8 @@ card.swd={
return false; return false;
} }
} }
if(player.num('h','shenmiguo')) return true; if(player.hasCard('shenmiguo')) return true;
if(player.num('h','yuchankan')) return true; if(player.hasCard('yuchankan')) return true;
var mn=player.get('e','5');
if(mn&&mn.name=='muniu'&&mn.cards&&mn.cards.length){
for(var i=0;i<mn.cards.length;i++){
if(mn.cards[i].name=='shenmiguo') return true;
if(mn.cards[i].name=='yuchankan') return true;
}
}
return false; return false;
}, },
content:function(){ content:function(){
@ -2750,7 +2733,7 @@ card.swd={
lianhua:{ lianhua:{
enable:'phaseUse', enable:'phaseUse',
filter:function(event,player){ filter:function(event,player){
var hu=player.get('e','5'); var hu=player.getEquip('lianyaohu');
if(hu&&hu.storage.shouna&&hu.storage.shouna.length>1){ if(hu&&hu.storage.shouna&&hu.storage.shouna.length>1){
return true; return true;
} }
@ -2760,7 +2743,7 @@ card.swd={
delay:false, delay:false,
content:function(){ content:function(){
"step 0" "step 0"
event.hu=player.get('e','5'); event.hu=player.getEquip('lianyaohu');
player.chooseCardButton('弃置两张壶中的牌,然后从牌堆中获得一张类别不同的牌',2,event.hu.storage.shouna).ai=function(){ player.chooseCardButton('弃置两张壶中的牌,然后从牌堆中获得一张类别不同的牌',2,event.hu.storage.shouna).ai=function(){
return 1; return 1;
} }
@ -2807,7 +2790,7 @@ card.swd={
}, },
content:function(){ content:function(){
var card=target.get('h').randomGet(); var card=target.get('h').randomGet();
var hu=player.get('e','5'); var hu=player.getEquip('lianyaohu');
if(card&&hu){ if(card&&hu){
if(!hu.storage.shouna){ if(!hu.storage.shouna){
hu.storage.shouna=[]; hu.storage.shouna=[];
@ -2848,7 +2831,7 @@ card.swd={
cards.splice(i,1);i--; cards.splice(i,1);i--;
} }
} }
var hu=player.get('e','5'); var hu=player.getEquip('lianyaohu');
if(cards.length&&hu){ if(cards.length&&hu){
if(!hu.storage.shouna){ if(!hu.storage.shouna){
hu.storage.shouna=[]; hu.storage.shouna=[];
@ -3049,7 +3032,7 @@ card.swd={
player.popup('收化成功'); player.popup('收化成功');
game.log(player,'将',target,'收化'); game.log(player,'将',target,'收化');
target.dataset.position=event.position; target.dataset.position=event.position;
var card=player.get('e','5'); var card=player.getEquip('lianyaohu');
if(!card.storage.shouhua) card.storage.shouhua=[]; if(!card.storage.shouhua) card.storage.shouhua=[];
card.storage.shouhua.push(target); card.storage.shouhua.push(target);
game.removePlayer(target); game.removePlayer(target);
@ -3287,14 +3270,14 @@ card.swd={
usable:1, usable:1,
filter:function(event,player){ filter:function(event,player){
if(player!=game.me) return false; if(player!=game.me) return false;
var card=player.get('e','5'); var card=player.getEquip('lianyaohu');
if(card.storage.shouhua&&card.storage.shouhua.length) return true; if(card.storage.shouhua&&card.storage.shouhua.length) return true;
return false; return false;
}, },
content:function(){ content:function(){
"step 0" "step 0"
var list=[]; var list=[];
var card=player.get('e','5'); var card=player.getEquip('lianyaohu');
for(var i=0;i<card.storage.shouhua.length;i++){ for(var i=0;i<card.storage.shouhua.length;i++){
list.push(card.storage.shouhua[i].name); list.push(card.storage.shouhua[i].name);
} }
@ -3388,7 +3371,7 @@ card.swd={
// target.draw(); // target.draw();
} }
else{ else{
var e5=player.get('e','5'); var e5=player.getEquip('sifeizhenmian');
if(e5){ if(e5){
player.discard(e5); player.discard(e5);
} }
@ -3961,7 +3944,10 @@ card.swd={
}, },
filterCard:function(card){ filterCard:function(card){
var type=get.type(card); var type=get.type(card);
if(type=='equip'&&!lib.inpile.contains(card.name)) return false; if(type=='equip'){
if(!lib.inpile.contains(card.name)) return false;
if(lib.card[card.name].nopower) return false;
}
if(ui.selected.cards.length){ if(ui.selected.cards.length){
var type2=get.type(ui.selected.cards[0]); var type2=get.type(ui.selected.cards[0]);
if(type2=='equip'){ if(type2=='equip'){
@ -3997,6 +3983,7 @@ card.swd={
lib.card[name]=get.copy(lib.card[equip.name]); lib.card[name]=get.copy(lib.card[equip.name]);
lib.card[name].cardimage=lib.card[name].cardimage||equip.name; lib.card[name].cardimage=lib.card[name].cardimage||equip.name;
lib.card[name].vanish=true; lib.card[name].vanish=true;
lib.card[name].source=[equip.name,cards[0].name];
if(type=='jiqi'){ if(type=='jiqi'){
lib.card[name].legend=true; lib.card[name].legend=true;
} }

View File

@ -455,6 +455,7 @@ character.gujian={
modTarget:true, modTarget:true,
content:lib.element.content.equipCard, content:lib.element.content.equipCard,
legend:true, legend:true,
source:[cards[0].name,cards[1].name],
onEquip:[], onEquip:[],
onLose:[], onLose:[],
skills:[], skills:[],

View File

@ -2930,7 +2930,7 @@ character.ow={
player.storage.shanxian_e[i]=game.createCard(player.storage.shanxian_e[i]); player.storage.shanxian_e[i]=game.createCard(player.storage.shanxian_e[i]);
} }
} }
player.clearEquipTrigger(); player.removeEquipTrigger();
var cards=player.get('he'); var cards=player.get('he');
for(var i=0;i<cards.length;i++){ for(var i=0;i<cards.length;i++){
ui.discardPile.appendChild(cards[i]); ui.discardPile.appendChild(cards[i]);

View File

@ -1073,7 +1073,7 @@ character.refresh={
}).set('ai',function(card){ }).set('ai',function(card){
var num=_status.event.num; var num=_status.event.num;
if(num==0) return 0; if(num==0) return 0;
if(card.name=='shan') return num>1; if(card.name=='shan') return num>1?2:0;
return 8-ai.get.value(card); return 8-ai.get.value(card);
}).set('num',num).set('suit',suit); }).set('num',num).set('suit',suit);
"step 2" "step 2"

View File

@ -816,7 +816,8 @@ character.swd={
check:function(card){return 5-ai.get.value(card)}, check:function(card){return 5-ai.get.value(card)},
ai:{ ai:{
order:3.1, order:3.1,
skillTagFilter:function(player){ skillTagFilter:function(player,tag,arg){
if(arg!='use') return false;
if(!player.num('he',{color:'red'})) return false; if(!player.num('he',{color:'red'})) return false;
}, },
}, },

View File

@ -519,6 +519,7 @@ character.xianjian={
lib.card[name].subtype=result.control; lib.card[name].subtype=result.control;
lib.card[name].epic=true; lib.card[name].epic=true;
lib.card[name].cardimage=trigger.card.name; lib.card[name].cardimage=trigger.card.name;
lib.card[name].source=[trigger.card.name];
lib.translate[name]=lib.translate[trigger.card.name]; lib.translate[name]=lib.translate[trigger.card.name];
lib.translate[name+'_info']=lib.translate[trigger.card.name+'_info']; lib.translate[name+'_info']=lib.translate[trigger.card.name+'_info'];
} }

View File

@ -5561,6 +5561,12 @@
o:function(){ o:function(){
ui.arena.classList.remove('observe'); ui.arena.classList.remove('observe');
}, },
pt:function(){
var list=Array.from(arguments);
while(list.length){
ui.cardPile.insertBefore(cheat.gn(list.pop()),ui.cardPile.firstChild);
}
},
q:function(){ q:function(){
if(lib.config.layout!='mobile') lib.init.layout('mobile'); if(lib.config.layout!='mobile') lib.init.layout('mobile');
if(arguments.length==0){ if(arguments.length==0){
@ -5626,7 +5632,7 @@
if(card){ if(card){
console.log(card); console.log(card);
ui.discardPile.appendChild(card); ui.discardPile.appendChild(card);
target.clearEquipTrigger(card); target.removeEquipTrigger(card);
} }
target.$equip(cards[i]); target.$equip(cards[i]);
} }
@ -5827,6 +5833,13 @@
}, },
gx:function(name,target){ gx:function(name,target){
target=target||game.me; target=target||game.me;
var card=cheat.gn(name);
target.node.handcards1.appendChild(card);
game.check();
target.update();
ui.updatehl();
},
gn:function(name){
var nature=null; var nature=null;
var suit=null; var suit=null;
var suits=['club','spade','diamond','heart']; var suits=['club','spade','diamond','heart'];
@ -5854,11 +5867,7 @@
name='sha'; name='sha';
nature='thunder'; nature='thunder';
} }
var card=game.createCard(name,suit,null,nature); return game.createCard(name,suit,null,nature);
target.node.handcards1.appendChild(card);
game.check();
target.update();
ui.updatehl();
}, },
ge:function(target){ ge:function(target){
if(target){ if(target){
@ -5922,32 +5931,26 @@
cheat.g('juedou'); cheat.g('juedou');
}, },
z:function(name){ z:function(name){
switch(name){
case 'cc':name='re_caocao';break;
case 'lb':name='re_liubei';break;
case 'sq':name='sunquan';break;
case 'dz':name='dongzhuo';break;
case 'ys':name='re_yuanshao';break;
case 'zj':name='sp_zhangjiao';break;
case 'ls':name='liushan';break;
case 'sc':name='sunce';break;
case 'cp':name='caopi';break;
case 'cr':name='caorui';break;
case 'sx':name='sunxiu';break;
case 'lc':name='liuchen';break;
case 'sh':name='sunhao';break;
}
game.zhu.init(name); game.zhu.init(name);
game.zhu.maxHp++; game.zhu.maxHp++;
game.zhu.hp++; game.zhu.hp++;
game.zhu.update(); game.zhu.update();
}, },
cp:function(){
cheat.z('caopi');
},
cc:function(){
cheat.z('re_caocao');
},
ls:function(){
cheat.z('liushan');
},
zj:function(){
cheat.z('sp_zhangjiao');
},
sc:function(){
cheat.z('sunce');
},
lc:function(){
cheat.z('liushan');
},
lb:function(){
cheat.z('re_liubei');
}
}, },
translate:{ translate:{
'default':"默认", 'default':"默认",
@ -8956,12 +8959,9 @@
"step 1" "step 1"
if(num<cards.length){ if(num<cards.length){
if(cards[num].original=='e'){ if(cards[num].original=='e'){
event.loseEquip=true;
player.removeEquipTrigger(cards[num]);
var info=get.info(cards[num]); var info=get.info(cards[num]);
if(info.skills){
for(var i=0;i<info.skills.length;i++){
player.removeSkillTrigger(info.skills[i]);
}
}
if(info.onLose&&(!info.filterLose||info.filterLose(cards[num],player))){ if(info.onLose&&(!info.filterLose||info.filterLose(cards[num],player))){
event.goto(2); event.goto(2);
return; return;
@ -8971,6 +8971,9 @@
event.redo(); event.redo();
} }
else{ else{
if(event.loseEquip){
player.addEquipTrigger();
}
event.finish(); event.finish();
} }
"step 2" "step 2"
@ -9237,7 +9240,7 @@
for(var i in player.tempSkills){ for(var i in player.tempSkills){
player.removeSkill(i); player.removeSkill(i);
} }
player.clearEquipTrigger(); player.removeEquipTrigger();
// for(var i in lib.skill.globalmap){ // for(var i in lib.skill.globalmap){
// if(lib.skill.globalmap[i].contains(player)){ // if(lib.skill.globalmap[i].contains(player)){
// lib.skill.globalmap[i].remove(player); // lib.skill.globalmap[i].remove(player);
@ -12315,7 +12318,23 @@
} }
return this; return this;
}, },
clearEquipTrigger:function(card){ addEquipTrigger:function(card){
if(card){
var info=get.info(card);
if(info.skills){
for(var j=0;j<info.skills.length;j++){
this.addSkillTrigger(info.skills[j]);
}
}
}
else{
var es=this.get('e');
for(var i=0;i<es.length;i++){
this.addEquipTrigger(es[i]);
}
}
},
removeEquipTrigger:function(card){
if(card){ if(card){
var info=get.info(card); var info=get.info(card);
if(info.skills){ if(info.skills){
@ -12327,12 +12346,7 @@
else{ else{
var es=this.get('e'); var es=this.get('e');
for(var i=0;i<es.length;i++){ for(var i=0;i<es.length;i++){
var info=get.info(es[i]); this.removeEquipTrigger(es[i]);
if(info.skills){
for(var j=0;j<info.skills.length;j++){
this.removeSkillTrigger(info.skills[j]);
}
}
} }
} }
}, },
@ -12868,8 +12882,8 @@
} }
else{ else{
if(this.num(position,name)) return true; if(this.num(position,name)) return true;
var mn=this.get('e','5'); var mn=this.getEquip('muniu');
if(mn&&mn.name.indexOf('muniu')==0&&mn.cards&&mn.cards.length){ if(mn&&mn.cards&&mn.cards.length){
for(var i=0;i<mn.cards.length;i++){ for(var i=0;i<mn.cards.length;i++){
if(mn.cards[i].name==name) return true; if(mn.cards[i].name==name) return true;
} }
@ -12877,6 +12891,17 @@
} }
return false; return false;
}, },
getEquip:function(name){
var es=this.get('e');
for(var i=0;i<es.length;i++){
if(es[i].name==name) return es[i];
var source=get.info(es[i]).source;
if(Array.isArray(source)&&source.contains(name)){
return es[i];
}
}
return null;
},
getJudge:function(name){ getJudge:function(name){
var judges=this.node.judges.childNodes; var judges=this.node.judges.childNodes;
for(var i=0;i<judges.length;i++){ for(var i=0;i<judges.length;i++){
@ -14366,8 +14391,13 @@
aiexclude:function(){ aiexclude:function(){
_status.event.aiexclude.add(this); _status.event.aiexclude.add(this);
}, },
getState:function(){ getSource:function(name){
if(this.name==name) return true;
var info=lib.card[this.name];
if(info&&Array.isArray(info.source)){
return info.source.contains(name);
}
return false;
}, },
moveDelete:function(player){ moveDelete:function(player){
this.fixed=true; this.fixed=true;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 51 KiB