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,
type:'equip',
subtype:'equip2',
skills:['mutoumianju_skill']
},
yuheng:{
fullskin:true,
type:'equip',
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:{
fullskin:true,
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:{
fullskin:true,
@ -315,9 +399,32 @@ card.gujian={
fullskin:true,
},
shihuifen:{
type:'jiguan',
enable:true,
type:'trick',
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:{
type:'jiguan',
@ -325,15 +432,206 @@ card.gujian={
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:{
food:0.3
},
translate:{
// jinlianzhu:'金莲珠',
// jinlianzhu_info:'金莲珠',
// shihuifen:'石灰粉',
// shihuifen_info:'石灰粉',
shihuifen:'石灰粉',
shihuifen_info:'在一名其他角色的出牌阶段开始时对其使用,目标需打出一张闪,否则此阶段使用卡牌无法指定其他角色为目标',
// liufengsan:'流风散',
// liufengsan_info:'流风散',
// liutouge:'六骰格',
@ -362,12 +660,24 @@ card.gujian={
// yunvyuanshen_info:'玉女元参',
// ziyangdan:'紫阳丹',
// ziyangdan_info:'紫阳丹',
// yuheng:'玉衡',
// yuheng_info:'结束阶段,若场你的体力值不是全场最少,你失去一点体力并令玉衡获得一点力量;准备阶段,玉衡每有一点力量,你便可以获得一名其他角色的一张牌',
// shujinsan:'舒筋散',
// shujinsan_info:'对任意角色使用,目标可弃置任意张牌,并摸等量的牌',
// mutoumianju:'木头面具',
// mutoumianju_info:'装备后视为拥有技能龙胆',
yuheng:'玉衡',
yuheng_plus:'玉衡',
yuheng_pro:'玉衡',
yuheng_skill:'玉衡',
yuheng_plus_skill:'玉衡',
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_info:'对自己使用,获得一点护甲,直到下一回合开始,计算其他角色与你的距离时始终+1',
@ -405,5 +715,15 @@ card.gujian={
['spade',3,'bingpotong','poison'],
['club',11,'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,
type:"equip",
subtype:"equip2",
nomod:true,
skills:['huxinjing'],
ai:{
basic:{
@ -756,8 +755,8 @@ card.guozhan={
forced:true,
popup:false,
content:function(){
var card=player.get('e','2');
if(card&&card.name.indexOf('huxinjing')==0){
var card=player.getEquip('huxinjing');
if(card){
player.discard(card);
}
}

View File

@ -24,6 +24,17 @@ card.sp={
},
onLose:function(){
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,
loseDelay:false,
@ -523,41 +534,6 @@ card.sp={
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:{
trigger:{player:['useCardAfter','respondAfter','discardAfter']},
popup:false,

View File

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

View File

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

View File

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

View File

@ -1073,7 +1073,7 @@ character.refresh={
}).set('ai',function(card){
var num=_status.event.num;
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);
}).set('num',num).set('suit',suit);
"step 2"

View File

@ -816,7 +816,8 @@ character.swd={
check:function(card){return 5-ai.get.value(card)},
ai:{
order:3.1,
skillTagFilter:function(player){
skillTagFilter:function(player,tag,arg){
if(arg!='use') 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].epic=true;
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+'_info']=lib.translate[trigger.card.name+'_info'];
}

View File

@ -5560,6 +5560,12 @@
},
o:function(){
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(){
if(lib.config.layout!='mobile') lib.init.layout('mobile');
@ -5626,7 +5632,7 @@
if(card){
console.log(card);
ui.discardPile.appendChild(card);
target.clearEquipTrigger(card);
target.removeEquipTrigger(card);
}
target.$equip(cards[i]);
}
@ -5827,6 +5833,13 @@
},
gx:function(name,target){
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 suit=null;
var suits=['club','spade','diamond','heart'];
@ -5854,11 +5867,7 @@
name='sha';
nature='thunder';
}
var card=game.createCard(name,suit,null,nature);
target.node.handcards1.appendChild(card);
game.check();
target.update();
ui.updatehl();
return game.createCard(name,suit,null,nature);
},
ge:function(target){
if(target){
@ -5922,32 +5931,26 @@
cheat.g('juedou');
},
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.maxHp++;
game.zhu.hp++;
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:{
'default':"默认",
@ -8956,12 +8959,9 @@
"step 1"
if(num<cards.length){
if(cards[num].original=='e'){
event.loseEquip=true;
player.removeEquipTrigger(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))){
event.goto(2);
return;
@ -8971,6 +8971,9 @@
event.redo();
}
else{
if(event.loseEquip){
player.addEquipTrigger();
}
event.finish();
}
"step 2"
@ -9237,7 +9240,7 @@
for(var i in player.tempSkills){
player.removeSkill(i);
}
player.clearEquipTrigger();
player.removeEquipTrigger();
// for(var i in lib.skill.globalmap){
// if(lib.skill.globalmap[i].contains(player)){
// lib.skill.globalmap[i].remove(player);
@ -12315,7 +12318,23 @@
}
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){
var info=get.info(card);
if(info.skills){
@ -12327,12 +12346,7 @@
else{
var es=this.get('e');
for(var i=0;i<es.length;i++){
var info=get.info(es[i]);
if(info.skills){
for(var j=0;j<info.skills.length;j++){
this.removeSkillTrigger(info.skills[j]);
}
}
this.removeEquipTrigger(es[i]);
}
}
},
@ -12868,8 +12882,8 @@
}
else{
if(this.num(position,name)) return true;
var mn=this.get('e','5');
if(mn&&mn.name.indexOf('muniu')==0&&mn.cards&&mn.cards.length){
var mn=this.getEquip('muniu');
if(mn&&mn.cards&&mn.cards.length){
for(var i=0;i<mn.cards.length;i++){
if(mn.cards[i].name==name) return true;
}
@ -12877,6 +12891,17 @@
}
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){
var judges=this.node.judges.childNodes;
for(var i=0;i<judges.length;i++){
@ -14366,8 +14391,13 @@
aiexclude:function(){
_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){
this.fixed=true;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 51 KiB