tmpsk
This commit is contained in:
parent
8099f0d5cc
commit
ce836d1401
|
@ -72,11 +72,11 @@ card.extra={
|
|||
var shas=player.get('h','sha');
|
||||
if(shas.length>1){
|
||||
if(player.num('e','zhuge')) return 0;
|
||||
if(player.skills.contains('paoxiao')) return 0;
|
||||
if(player.skills.contains('fengnu')) return 0;
|
||||
if(player.hasSkill('paoxiao')) return 0;
|
||||
if(player.hasSkill('fengnu')) return 0;
|
||||
if(!player.getStat().card.sha){
|
||||
if(player.skills.contains('tanlnin3')) return 0;
|
||||
if(player.skills.contains('zhaxiang2')) return 0;
|
||||
if(player.hasSkill('tanlin3')) return 0;
|
||||
if(player.hasSkill('zhaxiang2')) return 0;
|
||||
}
|
||||
}
|
||||
var card;
|
||||
|
@ -177,7 +177,7 @@ card.extra={
|
|||
return 0;
|
||||
},
|
||||
target:function(player,target){
|
||||
if(target.skills.contains('huogong2')||target.num('h')==0) return 0;
|
||||
if(target.hasSkill('huogong2')||target.num('h')==0) return 0;
|
||||
if(player.num('h')<=1) return 0;
|
||||
if(target==player){
|
||||
if(typeof _status.event.filterCard=='function'&&
|
||||
|
@ -456,7 +456,7 @@ card.extra={
|
|||
effect:{
|
||||
target:function(card,player,target,current){
|
||||
if(card.name=='sha'){
|
||||
if(card.nature=='fire'||player.skills.contains('zhuque_skill')) return 2;
|
||||
if(card.nature=='fire'||player.hasSkill('zhuque_skill')) return 2;
|
||||
}
|
||||
if(get.tag(card,'fireDamage')&¤t<0) return 2;
|
||||
}
|
||||
|
|
|
@ -355,7 +355,7 @@ card.guozhan={
|
|||
result:{
|
||||
target:function(player,target){
|
||||
if(target.hasSkillTag('nofire')||target.hasSkillTag('nodamage')) return 0;
|
||||
if(target.skills.contains('xuying')&&target.num('h')==0) return 0;
|
||||
if(target.hasSkill('xuying')&&target.num('h')==0) return 0;
|
||||
if(!target.isLinked()){
|
||||
return ai.get.damageEffect(target,player,target,'fire');
|
||||
}
|
||||
|
|
|
@ -224,7 +224,7 @@ card.hearth={
|
|||
return 0;
|
||||
},
|
||||
target:function(player,target){
|
||||
if(target.skills.contains('shandianjian2')||target.num('h')==0) return 0;
|
||||
if(target.hasSkill('shandianjian2')||target.num('h')==0) return 0;
|
||||
if(player.num('h')<=1) return 0;
|
||||
if(target==player){
|
||||
if(typeof _status.event.filterCard=='function'&&
|
||||
|
@ -496,7 +496,7 @@ card.hearth={
|
|||
result:{
|
||||
target:function(player,target){
|
||||
var nh=player.num('h')-target.num('h');
|
||||
if(!player.skills.contains('jizhi')){
|
||||
if(!player.hasSkill('jizhi')){
|
||||
nh--;
|
||||
}
|
||||
if(nh>0) return nh;
|
||||
|
@ -505,7 +505,7 @@ card.hearth={
|
|||
},
|
||||
player:function(player,target){
|
||||
var nh=target.num('h')-player.num('h');
|
||||
if(!player.skills.contains('jizhi')){
|
||||
if(!player.hasSkill('jizhi')){
|
||||
nh++;
|
||||
}
|
||||
if(nh>0) return nh;
|
||||
|
|
|
@ -470,7 +470,7 @@ card.sp={
|
|||
filter:function(event,player){
|
||||
for(var i=0;i<event.cards.length;i++){
|
||||
if(event.cards[i].name=='muniu'&&event.cards[i].original=='e'&&
|
||||
player.skills.contains('muniu_skill6')==false&&
|
||||
player.hasSkill('muniu_skill6')==false&&
|
||||
get.position(event.cards[i])==='d') return true;
|
||||
}
|
||||
return false;
|
||||
|
@ -478,7 +478,7 @@ card.sp={
|
|||
content:function(){
|
||||
for(var i=0;i<trigger.cards.length;i++){
|
||||
if(trigger.cards[i].name=='muniu'&&trigger.cards[i].original=='e'&&
|
||||
player.skills.contains('muniu_skill6')==false){
|
||||
player.hasSkill('muniu_skill6')==false){
|
||||
var card=trigger.cards[i];
|
||||
var card2;
|
||||
if(card.cards&&card.cards.length){
|
||||
|
|
|
@ -119,7 +119,7 @@ card.standard={
|
|||
order:3,
|
||||
result:{
|
||||
target:function(player,target){
|
||||
if(player.skills.contains('jiu')&&!target.num('e','baiyin')){
|
||||
if(player.hasSkill('jiu')&&!target.num('e','baiyin')){
|
||||
if(ai.get.attitude(player,target)>0){
|
||||
return -6;
|
||||
}
|
||||
|
@ -1259,8 +1259,8 @@ card.standard={
|
|||
}
|
||||
if(eff<=0) return ai.get.buttonValue(button);
|
||||
if(trigger.target.hp==1) return false;
|
||||
if(player.skills.contains('jiu')||player.skills.contains('tianxianjiu')||
|
||||
player.skills.contains('luoyi2')||player.skills.contains('reluoyi2')) return false;
|
||||
if(player.hasSkill('jiu')||player.hasSkill('tianxianjiu')||
|
||||
player.hasSkill('luoyi2')||player.hasSkill('reluoyi2')) return false;
|
||||
if(_status.event.dialog.buttons.length<2) return -1;
|
||||
var num=0;
|
||||
for(var i=0;i<_status.event.dialog.buttons.length;i++){
|
||||
|
@ -1348,7 +1348,7 @@ card.standard={
|
|||
},
|
||||
content:function(){
|
||||
"step 0"
|
||||
if(player.skills.contains('jiu')){
|
||||
if(player.hasSkill('jiu')){
|
||||
game.broadcastAll(function(player){
|
||||
player.removeSkill('jiu');
|
||||
if(player.node.jiu){
|
||||
|
@ -1406,8 +1406,8 @@ card.standard={
|
|||
next.set('ai',function(card){
|
||||
var evt=_status.event.getParent();
|
||||
if(ai.get.attitude(evt.player,evt._trigger.target)<0){
|
||||
if(evt.player.skills.contains('jiu')||
|
||||
evt.player.skills.contains('tianxianjiu')||
|
||||
if(evt.player.hasSkill('jiu')||
|
||||
evt.player.hasSkill('tianxianjiu')||
|
||||
evt._trigger.target.hp==1){
|
||||
return 8-ai.get.value(card)
|
||||
}
|
||||
|
@ -1578,7 +1578,7 @@ card.standard={
|
|||
if(typeof aiii=='number') return aiii;
|
||||
}
|
||||
if(Math.abs(ai.get.attitude(_status.event.player,source))<3) return 0;
|
||||
if(source.skills.contains('guanxing')) return 0;
|
||||
if(source.hasSkill('guanxing')) return 0;
|
||||
if(name!='lebu'&&name!='bingliang'){
|
||||
if(source!=_status.event.player){
|
||||
return 0;
|
||||
|
|
20
card/swd.js
20
card/swd.js
|
@ -126,11 +126,11 @@ card.swd={
|
|||
subtype:'equip1',
|
||||
skills:['xuanyuanjian','xuanyuanjian2','xuanyuanjian3'],
|
||||
enable:function(card,player){
|
||||
return player.skills.contains('xuanyuan')||player.hp>2;
|
||||
return player.hasSkill('xuanyuan')||player.hp>2;
|
||||
},
|
||||
distance:{attackFrom:-3},
|
||||
onEquip:function(){
|
||||
if(!player.skills.contains('xuanyuan')&&player.hp<=2){
|
||||
if(!player.hasSkill('xuanyuan')&&player.hp<=2){
|
||||
player.discard(card);
|
||||
}
|
||||
},
|
||||
|
@ -1734,7 +1734,7 @@ card.swd={
|
|||
shouna:{
|
||||
trigger:{global:'discardAfter'},
|
||||
filter:function(event,player){
|
||||
if(player.skills.contains('shouna2')) return false;
|
||||
if(player.hasSkill('shouna2')) return false;
|
||||
if(_status.currentPhase==event.player) return false;
|
||||
if(event.player==player) return false;
|
||||
for(var i=0;i<event.cards.length;i++){
|
||||
|
@ -1870,7 +1870,7 @@ card.swd={
|
|||
forced:true,
|
||||
popup:false,
|
||||
filter:function(event,player){
|
||||
return !player.skills.contains('xuanyuan')&&player.hp<=2
|
||||
return !player.hasSkill('xuanyuan')&&player.hp<=2
|
||||
},
|
||||
content:function(){
|
||||
var e1=player.get('e','1');
|
||||
|
@ -3025,11 +3025,11 @@ card.swd={
|
|||
disable:{
|
||||
mod:{
|
||||
targetEnabled:function(card,player,target){
|
||||
if(player.skills.contains('hslingjian_chaofeng')) return;
|
||||
if(player.hasSkill('hslingjian_chaofeng')) return;
|
||||
if(card.name=='sha'){
|
||||
if(target.skills.contains('hslingjian_chaofeng')) return;
|
||||
if(target.hasSkill('hslingjian_chaofeng')) return;
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
if(game.players[i].skills.contains('hslingjian_chaofeng')){
|
||||
if(game.players[i].hasSkill('hslingjian_chaofeng')){
|
||||
if(game.players[i].hp<game.players[i].num('h')&&
|
||||
get.distance(player,game.players[i],'attack')<=1){
|
||||
return false;
|
||||
|
@ -3109,12 +3109,12 @@ card.swd={
|
|||
trigger:{player:'shaHit'},
|
||||
check:function(event,player){
|
||||
var att=ai.get.attitude(player,event.target);
|
||||
if(player.skills.contains('jiu')) return att>0;
|
||||
if(player.hasSkill('jiu')) return att>0;
|
||||
if(event.target.hp==1) return att>0;
|
||||
if(event.target.hasSkillTag('maixie')){
|
||||
return att<=0;
|
||||
}
|
||||
if(player.skills.contains('tianxianjiu')) return false;
|
||||
if(player.hasSkill('tianxianjiu')) return false;
|
||||
return att<=0;
|
||||
},
|
||||
filter:function(event,player){
|
||||
|
@ -3528,7 +3528,7 @@ card.swd={
|
|||
trigger:{player:'shaHit'},
|
||||
check:function(event,player){
|
||||
var att=ai.get.attitude(player,event.target);
|
||||
if(player.skills.contains('jiu')) return att>0;
|
||||
if(player.hasSkill('jiu')) return att>0;
|
||||
if(event.target.hasSkillTag('maixie')){
|
||||
return att<=0;
|
||||
}
|
||||
|
|
|
@ -320,7 +320,7 @@ character.diy={
|
|||
result:{
|
||||
target:function(card,player,target,current){
|
||||
if(target.hp<=1&&get.tag(card,'damage')){
|
||||
if(player.skills.contains('jueqing')) return [1,-5];
|
||||
if(player.hasSkill('jueqing')) return [1,-5];
|
||||
return [1,0,0,-2];
|
||||
}
|
||||
}
|
||||
|
@ -512,7 +512,7 @@ character.diy={
|
|||
ciqiu2:{
|
||||
trigger:{source:'damage'},
|
||||
filter:function(event,player){
|
||||
return player.skills.contains('ciqiu3')&&event.player.hp<=0;
|
||||
return player.hasSkill('ciqiu3')&&event.player.hp<=0;
|
||||
},
|
||||
forced:true,
|
||||
content:function(){
|
||||
|
|
|
@ -207,7 +207,7 @@ character.gujian={
|
|||
effect:{
|
||||
target:function(card,player,target){
|
||||
if(get.tag(card,'damage')){
|
||||
if(player.skills.contains('jueqing')) return [1,-1.5];
|
||||
if(player.hasSkill('jueqing')) return [1,-1.5];
|
||||
return [1,0,0,-0.5];
|
||||
}
|
||||
}
|
||||
|
@ -371,7 +371,7 @@ character.gujian={
|
|||
effect:{
|
||||
target:function(card,player,target){
|
||||
if(get.tag(card,'damage')&&target.num('h')==0){
|
||||
if(player.skills.contains('jueqing')) return;
|
||||
if(player.hasSkill('jueqing')) return;
|
||||
return 0.1;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -112,7 +112,7 @@ character.jiange={
|
|||
trigger:{player:'phaseEnd'},
|
||||
direct:true,
|
||||
filter:function(event,player){
|
||||
return !player.skills.contains('huodi3');
|
||||
return !player.hasSkill('huodi3');
|
||||
},
|
||||
content:function(){
|
||||
"step 0"
|
||||
|
@ -289,7 +289,7 @@ character.jiange={
|
|||
popup:false,
|
||||
content:function(){
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
if(game.players[i].skills.contains('biantian3')){
|
||||
if(game.players[i].hasSkill('biantian3')){
|
||||
game.players[i].removeSkill('biantian3');
|
||||
game.players[i].popup('biantian3');
|
||||
}
|
||||
|
@ -305,7 +305,7 @@ character.jiange={
|
|||
"step 0"
|
||||
player.removeSkill('biantian2');
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
if(game.players[i].skills.contains('biantian3')){
|
||||
if(game.players[i].hasSkill('biantian3')){
|
||||
game.players[i].removeSkill('biantian3');
|
||||
game.players[i].popup('biantian3');
|
||||
}
|
||||
|
|
|
@ -594,7 +594,7 @@ character.ow={
|
|||
dulei:{
|
||||
enable:'phaseUse',
|
||||
filter:function(event,player){
|
||||
return !player.skills.contains('dulei2');
|
||||
return !player.hasSkill('dulei2');
|
||||
},
|
||||
filterCard:true,
|
||||
check:function(card){
|
||||
|
|
|
@ -271,7 +271,7 @@ character.refresh={
|
|||
return target.num('h')>0&&player!=target&&target.num('h')>=player.num('h');
|
||||
},function(target){
|
||||
var att=ai.get.attitude(_status.event.player,target);
|
||||
if(target.skills.contains('tuntian')) return att/10;
|
||||
if(target.hasSkill('tuntian')) return att/10;
|
||||
return 1-att;
|
||||
});
|
||||
"step 1"
|
||||
|
@ -376,7 +376,7 @@ character.refresh={
|
|||
effect:{
|
||||
target:function(card,player,target){
|
||||
if(player.num('he')>1&&get.tag(card,'damage')){
|
||||
if(player.skills.contains('jueqing')) return [1,-1.5];
|
||||
if(player.hasSkill('jueqing')) return [1,-1.5];
|
||||
if(ai.get.attitude(target,player)<0) return [1,1];
|
||||
}
|
||||
}
|
||||
|
@ -862,7 +862,7 @@ character.refresh={
|
|||
maixie:true,
|
||||
effect:{
|
||||
target:function(card,player,target){
|
||||
if(player.skills.contains('jueqing')) return [1,-1];
|
||||
if(player.hasSkill('jueqing')) return [1,-1];
|
||||
if(get.tag(card,'damage')&&player!=target) return [1,1];
|
||||
}
|
||||
}
|
||||
|
@ -906,7 +906,7 @@ character.refresh={
|
|||
"step 3"
|
||||
if(result.bool){
|
||||
player.lose(result.cards,ui.special);
|
||||
if(result.targets[0].skills.contains('reyiji2')){
|
||||
if(result.targets[0].hasSkill('reyiji2')){
|
||||
result.targets[0].storage.reyiji2=result.targets[0].storage.reyiji2.concat(result.cards);
|
||||
}
|
||||
else{
|
||||
|
@ -940,7 +940,7 @@ character.refresh={
|
|||
result:{
|
||||
effect:function(card,player,target){
|
||||
if(get.tag(card,'damage')){
|
||||
if(player.skills.contains('jueqing')) return [1,-2];
|
||||
if(player.hasSkill('jueqing')) return [1,-2];
|
||||
if(player.hp>=4) return [1,get.tag(card,'damage')*2];
|
||||
if(target.hp==3) return [1,get.tag(card,'damage')*1.5];
|
||||
if(target.hp==2) return [1,get.tag(card,'damage')*0.5];
|
||||
|
@ -982,7 +982,7 @@ character.refresh={
|
|||
player.chooseToCompare(target).set('small',true);
|
||||
"step 1"
|
||||
if(result.bool){
|
||||
if(target.skills.contains('yijue2')==false){
|
||||
if(target.hasSkill('yijue2')==false){
|
||||
target.disabledSkills.yijue=[];
|
||||
for(var i=0;i<target.skills.length;i++){
|
||||
if(!get.skillLocked(target.skills[i])){
|
||||
|
@ -1079,7 +1079,7 @@ character.refresh={
|
|||
"step 0"
|
||||
player.judge(function(){return 0});
|
||||
var target=trigger.target;
|
||||
if(target.skills.contains('retieji2')==false){
|
||||
if(target.hasSkill('retieji2')==false){
|
||||
target.disabledSkills.retieji=[];
|
||||
for(var i=0;i<target.skills.length;i++){
|
||||
if(!get.skillLocked(target.skills[i])){
|
||||
|
@ -1195,7 +1195,7 @@ character.refresh={
|
|||
},
|
||||
effect:function(card,player){
|
||||
if(get.tag(card,'damage')){
|
||||
if(player.skills.contains('jueqing')) return [1,1];
|
||||
if(player.hasSkill('jueqing')) return [1,1];
|
||||
return 1.2;
|
||||
}
|
||||
if(get.tag(card,'loseHp')){
|
||||
|
|
|
@ -652,7 +652,7 @@ character.sp={
|
|||
trigger:{source:'damageEnd'},
|
||||
filter:function(event,player){
|
||||
return _status.currentPhase==player&&event.player.isAlive()&&
|
||||
event.player.num('hej')>0&&event.player!=player&&!player.skills.contains('zhidao2');
|
||||
event.player.num('hej')>0&&event.player!=player&&!player.hasSkill('zhidao2');
|
||||
},
|
||||
forced:true,
|
||||
content:function(){
|
||||
|
@ -968,13 +968,13 @@ character.sp={
|
|||
tanhu3:{
|
||||
mod:{
|
||||
globalFrom:function(from,to){
|
||||
if(to.skills.contains('tanhu2')) return -Infinity;
|
||||
if(to.hasSkill('tanhu2')) return -Infinity;
|
||||
}
|
||||
},
|
||||
trigger:{player:'useCardToBegin'},
|
||||
frequent:true,
|
||||
filter:function(event){
|
||||
return get.type(event.card)=='trick'&&event.target&&event.target.skills.contains('tanhu2');
|
||||
return get.type(event.card)=='trick'&&event.target&&event.target.hasSkill('tanhu2');
|
||||
},
|
||||
content:function(){
|
||||
player.draw();
|
||||
|
@ -1034,7 +1034,7 @@ character.sp={
|
|||
if(ai.get.equipValue(card)<=8) return 0;
|
||||
}
|
||||
if(target.get('e','2')) return;
|
||||
if(player.skills.contains('unequip')) return;
|
||||
if(player.hasSkill('unequip')) return;
|
||||
if(get.tag(card,'respondShan')) return [0.5,0];
|
||||
}
|
||||
}
|
||||
|
@ -1083,7 +1083,7 @@ character.sp={
|
|||
trigger:{global:'phaseEnd'},
|
||||
forced:true,
|
||||
filter:function(event,player){
|
||||
return player.skills.contains('fenyong2')&&event.player.isAlive();
|
||||
return player.hasSkill('fenyong2')&&event.player.isAlive();
|
||||
},
|
||||
content:function(){
|
||||
'step 0'
|
||||
|
@ -1362,7 +1362,7 @@ character.sp={
|
|||
var num=game.countPlayer(function(target){
|
||||
return target.hp==player.hp;
|
||||
});
|
||||
if(!player.skills.contains('xunzhi2')){
|
||||
if(!player.hasSkill('xunzhi2')){
|
||||
var nh=player.num('h');
|
||||
if(nh>5) return false;
|
||||
if(num==3&&nh>3) return false;
|
||||
|
@ -1562,7 +1562,7 @@ character.sp={
|
|||
expose:0.1,
|
||||
result:{
|
||||
target:function(player,target){
|
||||
if(target.skills.contains('tuntian')) return 0;
|
||||
if(target.hasSkill('tuntian')) return 0;
|
||||
var es=target.get('e');
|
||||
var nh=target.num('h');
|
||||
var noe=(es.length==0||target.hasSkillTag('noe'));
|
||||
|
@ -1601,7 +1601,7 @@ character.sp={
|
|||
player.$give(cards,targets[0]);
|
||||
},
|
||||
content:function(){
|
||||
if(target.skills.contains('yanxiao2')&&target.storage.yanxiao2){
|
||||
if(target.hasSkill('yanxiao2')&&target.storage.yanxiao2){
|
||||
target.storage.yanxiao2.push(cards[0]);
|
||||
target.syncStorage('yanxiao2');
|
||||
target.markSkill('yanxiao2');
|
||||
|
@ -1773,7 +1773,7 @@ character.sp={
|
|||
ai:{
|
||||
effect:{
|
||||
target:function(card,player,target){
|
||||
if(player.skills.contains('jueqing')) return;
|
||||
if(player.hasSkill('jueqing')) return;
|
||||
if(get.tag(card,'damage')&&target.num('h')>1) return 0.7;
|
||||
}
|
||||
},
|
||||
|
@ -2832,7 +2832,7 @@ character.sp={
|
|||
trigger:{global:'dying'},
|
||||
priority:6,
|
||||
filter:function(event,player){
|
||||
return event.player.hp<=0&&!player.skills.contains('chenqing2');
|
||||
return event.player.hp<=0&&!player.hasSkill('chenqing2');
|
||||
},
|
||||
direct:true,
|
||||
content:function(){
|
||||
|
@ -2904,7 +2904,7 @@ character.sp={
|
|||
},
|
||||
ai:{
|
||||
skillTagFilter:function(player){
|
||||
return !player.skills.contains('chenqing2');
|
||||
return !player.hasSkill('chenqing2');
|
||||
},
|
||||
expose:0.2,
|
||||
threaten:1.5,
|
||||
|
@ -3015,7 +3015,7 @@ character.sp={
|
|||
effect:{
|
||||
target:function(card,player,target,current){
|
||||
if(card.name=='sha'){
|
||||
if(card.nature=='fire'||player.skills.contains('zhuque_skill')) return 2;
|
||||
if(card.nature=='fire'||player.hasSkill('zhuque_skill')) return 2;
|
||||
}
|
||||
if(get.tag(card,'fireDamage')&¤t<0) return 2;
|
||||
}
|
||||
|
@ -3182,7 +3182,7 @@ character.sp={
|
|||
audio:2,
|
||||
trigger:{player:['shaBegin','juedouBegin']},
|
||||
filter:function(event,player){
|
||||
if(player.skills.contains('fengpo3')) return false;
|
||||
if(player.hasSkill('fengpo3')) return false;
|
||||
return event.target&&event.targets&&event.targets.length==1;
|
||||
},
|
||||
direct:true,
|
||||
|
@ -3895,7 +3895,7 @@ character.sp={
|
|||
usable:1,
|
||||
filterCard:true,
|
||||
filterTarget:function(card,player,target){
|
||||
return player!=target&&!target.skills.contains('zhoufu2');
|
||||
return player!=target&&!target.hasSkill('zhoufu2');
|
||||
},
|
||||
prepare:function(cards,player){
|
||||
player.$throw(cards);
|
||||
|
@ -4055,11 +4055,11 @@ character.sp={
|
|||
disable:{
|
||||
mod:{
|
||||
targetEnabled:function(card,player,target){
|
||||
if(player.skills.contains('tongji')) return;
|
||||
if(player.hasSkill('tongji')) return;
|
||||
if(card.name=='sha'){
|
||||
if(target.skills.contains('tongji')) return;
|
||||
if(target.hasSkill('tongji')) return;
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
if(game.players[i].skills.contains('tongji')){
|
||||
if(game.players[i].hasSkill('tongji')){
|
||||
if(game.players[i].hp<game.players[i].num('h')&&
|
||||
get.distance(player,game.players[i],'attack')<=1){
|
||||
return false;
|
||||
|
@ -4312,7 +4312,7 @@ character.sp={
|
|||
trigger:{global:'discardAfter'},
|
||||
filter:function(event,player){
|
||||
if(event.player==player||_status.currentPhase==player) return false;
|
||||
if(player.skills.contains('shenxian2')) return false;
|
||||
if(player.hasSkill('shenxian2')) return false;
|
||||
for(var i=0;i<event.cards.length;i++){
|
||||
if(get.type(event.cards[i])=='basic'){
|
||||
return true;
|
||||
|
@ -4941,7 +4941,7 @@ character.sp={
|
|||
filter:function(event,player){
|
||||
if(player.num('h')>1) return false;
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
if(game.players[i].skills.contains('junbing')){
|
||||
if(game.players[i].hasSkill('junbing')){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -4949,7 +4949,7 @@ character.sp={
|
|||
},
|
||||
check:function(event,player){
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
if(game.players[i].skills.contains('junbing')){
|
||||
if(game.players[i].hasSkill('junbing')){
|
||||
var num=game.players[i].num('h');
|
||||
var att=ai.get.attitude(player,game.players[i]);
|
||||
if(num==0) return true;
|
||||
|
@ -4968,7 +4968,7 @@ character.sp={
|
|||
}
|
||||
else{
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
if(game.players[i].skills.contains('junbing')){
|
||||
if(game.players[i].hasSkill('junbing')){
|
||||
event.target=game.players[i];break;
|
||||
}
|
||||
}
|
||||
|
@ -5130,7 +5130,7 @@ character.sp={
|
|||
trigger:{player:'phaseEnd'},
|
||||
forced:true,
|
||||
filter:function(event,player){
|
||||
return player.getStat('damage')>=3&&player.skills.contains('huxiao');
|
||||
return player.getStat('damage')>=3&&player.hasSkill('huxiao');
|
||||
},
|
||||
content:function(){
|
||||
"step 0"
|
||||
|
@ -5460,7 +5460,7 @@ character.sp={
|
|||
audio:2,
|
||||
enable:'phaseUse',
|
||||
filter:function(event,player){
|
||||
return player.skills.contains('duwu2')==false;
|
||||
return player.hasSkill('duwu2')==false;
|
||||
},
|
||||
filterCard:function(){
|
||||
if(ui.selected.targets.length) return false;
|
||||
|
@ -5691,13 +5691,13 @@ character.sp={
|
|||
content:function(){
|
||||
if(!player.storage.baobian){
|
||||
player.storage.baobian=[];
|
||||
if(player.skills.contains('tiaoxin')){
|
||||
if(player.hasSkill('tiaoxin')){
|
||||
player.storage.baobian.push('tiaoxin');
|
||||
}
|
||||
if(player.skills.contains('paoxiao')){
|
||||
if(player.hasSkill('paoxiao')){
|
||||
player.storage.baobian.push('paoxiao');
|
||||
}
|
||||
if(player.skills.contains('shensu')){
|
||||
if(player.hasSkill('shensu')){
|
||||
player.storage.baobian.push('shensu');
|
||||
}
|
||||
}
|
||||
|
@ -6091,7 +6091,7 @@ character.sp={
|
|||
},
|
||||
content:function(){
|
||||
var target=trigger.target;
|
||||
if(target.skills.contains('chixin3')){
|
||||
if(target.hasSkill('chixin3')){
|
||||
target.storage.chixin++;
|
||||
}
|
||||
else{
|
||||
|
@ -6134,7 +6134,7 @@ character.sp={
|
|||
if(player==_status.currentPhase&&player.get('s').contains('chixin')){
|
||||
var num=game.checkMod(card,player,1,'cardUsable',player.get('s'))-20;
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
if(game.players[i].skills.contains('chixin3')){
|
||||
if(game.players[i].hasSkill('chixin3')){
|
||||
num+=1-game.players[i].storage.chixin;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -486,7 +486,7 @@ character.swd={
|
|||
heihuo:{
|
||||
enable:'phaseUse',
|
||||
filter:function(event,player){
|
||||
return player.num('h')>0&&player.num('he',{type:'equip'})>0&&!player.skills.contains('heihuo2');
|
||||
return player.num('h')>0&&player.num('he',{type:'equip'})>0&&!player.hasSkill('heihuo2');
|
||||
},
|
||||
filterCard:function(card){
|
||||
return get.type(card)=='equip';
|
||||
|
@ -777,7 +777,7 @@ character.swd={
|
|||
trigger:{player:'shaAfter'},
|
||||
direct:true,
|
||||
filter:function(event,player){
|
||||
return event.target.isAlive()&&player.num('he')>0&&!player.skills.contains('lianda2');
|
||||
return event.target.isAlive()&&player.num('he')>0&&!player.hasSkill('lianda2');
|
||||
},
|
||||
content:function(){
|
||||
"step 0"
|
||||
|
@ -1071,7 +1071,7 @@ character.swd={
|
|||
effect:{
|
||||
target:function(card,player){
|
||||
if(get.tag(card,'damage')){
|
||||
if(player.skills.contains('jueqing')) return [1,-2];
|
||||
if(player.hasSkill('jueqing')) return [1,-2];
|
||||
return 0.7;
|
||||
}
|
||||
}
|
||||
|
@ -1434,7 +1434,7 @@ character.swd={
|
|||
forced:true,
|
||||
popup:false,
|
||||
filter:function(event,player){
|
||||
return event.parent.skill=='linyun'&&!player.skills.contains('linyun4');
|
||||
return event.parent.skill=='linyun'&&!player.hasSkill('linyun4');
|
||||
},
|
||||
content:function(){
|
||||
player.draw();
|
||||
|
@ -1566,7 +1566,7 @@ character.swd={
|
|||
trigger:{player:['phaseEnd','dieBegin']},
|
||||
forced:true,
|
||||
filter:function(event,player){
|
||||
if(player.skills.contains('hutian4')) return false;
|
||||
if(player.hasSkill('hutian4')) return false;
|
||||
return player.storage.hutian?true:false;
|
||||
},
|
||||
priority:-1,
|
||||
|
@ -1618,7 +1618,7 @@ character.swd={
|
|||
var skills=info[3];
|
||||
for(var j=0;j<skills.length;j++){
|
||||
if(lib.translate[skills[j]+'_info']&&lib.skill[skills[j]]&&
|
||||
!lib.skill[skills[j]].unique&&!player.skills.contains(skills[j])){
|
||||
!lib.skill[skills[j]].unique&&!player.hasSkill(skills[j])){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -1651,7 +1651,7 @@ character.swd={
|
|||
var skills=lib.character[name][3];
|
||||
for(var j=0;j<skills.length;j++){
|
||||
if(lib.translate[skills[j]+'_info']&&lib.skill[skills[j]]&&
|
||||
!lib.skill[skills[j]].unique&&!player.skills.contains(skills[j])){
|
||||
!lib.skill[skills[j]].unique&&!player.hasSkill(skills[j])){
|
||||
list.push(skills[j]);
|
||||
}
|
||||
}
|
||||
|
@ -1781,7 +1781,7 @@ character.swd={
|
|||
maixie:true,
|
||||
effect:function(card,player,target){
|
||||
if(get.tag(card,'damage')){
|
||||
if(player.skills.contains('jueqing')) return [1,-0.5];
|
||||
if(player.hasSkill('jueqing')) return [1,-0.5];
|
||||
if(!target.hasFriend()){
|
||||
if(lib.config.mode=='guozhan'){
|
||||
if(!player.hasFriend()) return;
|
||||
|
@ -1904,7 +1904,7 @@ character.swd={
|
|||
effect:{
|
||||
target:function(card,player,target){
|
||||
if(get.tag(card,'damage')){
|
||||
if(player.skills.contains('jueqing')) return [1,-1.5];
|
||||
if(player.hasSkill('jueqing')) return [1,-1.5];
|
||||
if(player.hp>=4) return [1,1.5];
|
||||
if(target.hp==3) return [1,1];
|
||||
if(target.hp==2) return [1,0.5];
|
||||
|
@ -2155,7 +2155,7 @@ character.swd={
|
|||
},
|
||||
content:function(){
|
||||
"step 0"
|
||||
if(!player.skills.contains('unequip')){
|
||||
if(!player.hasSkill('unequip')){
|
||||
event.added=true
|
||||
player.skills.push('unequip');
|
||||
}
|
||||
|
@ -2174,7 +2174,7 @@ character.swd={
|
|||
result:{
|
||||
target:function(player,target){
|
||||
var added=false;
|
||||
if(!player.skills.contains('unequip')){
|
||||
if(!player.hasSkill('unequip')){
|
||||
added=true;
|
||||
player.skills.push('unequip');
|
||||
}
|
||||
|
@ -2210,7 +2210,7 @@ character.swd={
|
|||
viewAs:{name:'chiyuxi',nature:'fire'},
|
||||
check:function(card){
|
||||
var player=_status.event.player;
|
||||
if(player.skills.contains('jianji')&&get.type(card)=='equip'&&
|
||||
if(player.hasSkill('jianji')&&get.type(card)=='equip'&&
|
||||
lib.filter.filterCard({name:'sha'},player)){
|
||||
return 0;
|
||||
}
|
||||
|
@ -2382,7 +2382,7 @@ character.swd={
|
|||
trigger:{source:'damageAfter'},
|
||||
direct:true,
|
||||
filter:function(event,player){
|
||||
return event.parent.name!='dangping'&&!player.skills.contains('dangping2');
|
||||
return event.parent.name!='dangping'&&!player.hasSkill('dangping2');
|
||||
},
|
||||
content:function(){
|
||||
"step 0"
|
||||
|
@ -2417,10 +2417,10 @@ character.swd={
|
|||
enable:'phaseUse',
|
||||
usable:2,
|
||||
filter:function(event,player){
|
||||
return player.num('h')>0&&!player.skills.contains('duishi3');
|
||||
return player.num('h')>0&&!player.hasSkill('duishi3');
|
||||
},
|
||||
filterTarget:function(card,player,target){
|
||||
return player!=target&&target.num('h')&&!target.skills.contains('duishi2');
|
||||
return player!=target&&target.num('h')&&!target.hasSkill('duishi2');
|
||||
},
|
||||
filterCard:true,
|
||||
check:function(card){return 8-ai.get.value(card)},
|
||||
|
@ -2641,7 +2641,7 @@ character.swd={
|
|||
return ai.get.damageEffect(event.player,player,player,'thunder')>0;
|
||||
},
|
||||
filter:function(event,player){
|
||||
return event.player!=player&&!player.skills.contains('touxi2')&&event.player.isAlive();
|
||||
return event.player!=player&&!player.hasSkill('touxi2')&&event.player.isAlive();
|
||||
},
|
||||
prompt:function(event,player){
|
||||
return '是否对'+get.translation(event.player)+'发动【偷袭】?';
|
||||
|
@ -3326,7 +3326,7 @@ character.swd={
|
|||
return player.attitudeTo(event.player)>3;
|
||||
},
|
||||
filter:function(event,player){
|
||||
return player.num('h')>0&&!player.skills.contains('susheng2');
|
||||
return player.num('h')>0&&!player.hasSkill('susheng2');
|
||||
},
|
||||
content:function(){
|
||||
"step 0"
|
||||
|
@ -4061,7 +4061,7 @@ character.swd={
|
|||
effect:{
|
||||
target:function(card,player,target){
|
||||
if(get.tag(card,'damage')){
|
||||
if(player.skills.contains('jueqing')) return [1,-2];
|
||||
if(player.hasSkill('jueqing')) return [1,-2];
|
||||
if(target.storage.yishan.length==0) return 1.5;
|
||||
if(target.storage.yishan[0]=='tao'||target.storage.yishan[1]=='tao'){
|
||||
return [0,2];
|
||||
|
@ -4337,7 +4337,7 @@ character.swd={
|
|||
effect:{
|
||||
target:function(card,player,target){
|
||||
if(get.tag(card,'damage')){
|
||||
if(player.skills.contains('jueqing')) return;
|
||||
if(player.hasSkill('jueqing')) return;
|
||||
if(target.storage.daixing>1) return 0.1;
|
||||
if(target.storage.daixing==1) return 0.5;
|
||||
}
|
||||
|
@ -4516,7 +4516,7 @@ character.swd={
|
|||
forced:true,
|
||||
popup:false,
|
||||
filter:function(event,player){
|
||||
return player.skills.contains('xianjiang');
|
||||
return player.hasSkill('xianjiang');
|
||||
},
|
||||
content:function(){
|
||||
player.storage.xianjiang=[];
|
||||
|
@ -4947,7 +4947,7 @@ character.swd={
|
|||
effect:{
|
||||
target:function(card,player,target){
|
||||
if(get.tag(card,'damage')){
|
||||
if(player.skills.contains('jueqing')) return [1,-1];
|
||||
if(player.hasSkill('jueqing')) return [1,-1];
|
||||
var num=player.num('h')-target.num('h');
|
||||
if(num>0){
|
||||
return [1,0,0,-num/2];
|
||||
|
@ -5007,7 +5007,7 @@ character.swd={
|
|||
player.chooseToCompare(target);
|
||||
"step 1"
|
||||
if(result.bool){
|
||||
if(target.skills.contains('tanlin2')==false){
|
||||
if(target.hasSkill('tanlin2')==false){
|
||||
target.addSkill('tanlin2');
|
||||
player.addSkill('tanlin3');
|
||||
player.gain([result.target]);
|
||||
|
@ -5072,7 +5072,7 @@ character.swd={
|
|||
tanlin4:{
|
||||
mod:{
|
||||
targetInRange:function(card,player,target,now){
|
||||
if(target.skills.contains('tanlin2')) return true;
|
||||
if(target.hasSkill('tanlin2')) return true;
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -5144,7 +5144,7 @@ character.swd={
|
|||
effect:{
|
||||
target:function(card,player,target){
|
||||
if(get.tag(card,'damage')&&_status.currentPhase!=target){
|
||||
if(player.skills.contains('jueqing')) return [1,-1.5];
|
||||
if(player.hasSkill('jueqing')) return [1,-1.5];
|
||||
return [1,0.5];
|
||||
}
|
||||
}
|
||||
|
@ -5979,7 +5979,7 @@ character.swd={
|
|||
priority:1,
|
||||
forced:true,
|
||||
filter:function(event,player){
|
||||
return !player.skills.contains('xiaomoyu2');
|
||||
return !player.hasSkill('xiaomoyu2');
|
||||
},
|
||||
content:function(){
|
||||
"step 0"
|
||||
|
@ -6800,7 +6800,7 @@ character.swd={
|
|||
yueren:{
|
||||
trigger:{player:'shaBegin'},
|
||||
filter:function(event,player){
|
||||
return !player.skills.contains('yueren2');
|
||||
return !player.hasSkill('yueren2');
|
||||
},
|
||||
check:function(event,player){
|
||||
return ai.get.attitude(player,event.target)<=0;
|
||||
|
@ -6861,7 +6861,7 @@ character.swd={
|
|||
popup:false,
|
||||
content:function(){
|
||||
var target=player.nextSeat;
|
||||
while(target.isDead()&&target.skills.contains('busi')==false){
|
||||
while(target.isDead()&&target.hasSkill('busi')==false){
|
||||
target=target.nextSeat;
|
||||
}
|
||||
if(target.isDead()){
|
||||
|
@ -6900,7 +6900,7 @@ character.swd={
|
|||
if(event.player==player||event.source==player) return false;
|
||||
if(!event.source) return false;
|
||||
if(player.num('he')==0) return false;
|
||||
if(player.skills.contains('yinguo2')) return false;
|
||||
if(player.hasSkill('yinguo2')) return false;
|
||||
return true;
|
||||
},
|
||||
content:function(){
|
||||
|
@ -6939,10 +6939,10 @@ character.swd={
|
|||
effect:{
|
||||
target:function(card,player,target){
|
||||
if(!get.tag(card,'damage')) return;
|
||||
if(target.skills.contains('yinguo')) return;
|
||||
if(target.hasSkill('yinguo')) return;
|
||||
var source=null;
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
if(game.players[i].skills.contains('yinguo')){
|
||||
if(game.players[i].hasSkill('yinguo')){
|
||||
source=game.players[i];
|
||||
break;
|
||||
}
|
||||
|
@ -7501,7 +7501,7 @@ character.swd={
|
|||
usable:1,
|
||||
filterCard:{color:'red'},
|
||||
filterTarget:function(card,player,target){
|
||||
return !target.skills.contains('zhenjiu2');
|
||||
return !target.hasSkill('zhenjiu2');
|
||||
},
|
||||
check:function(card){
|
||||
return 8-ai.get.value(card);
|
||||
|
|
|
@ -106,7 +106,7 @@ character.xiake={
|
|||
},
|
||||
mod:{
|
||||
attackFrom:function(from,to,distance){
|
||||
if(from.skills.contains('jiu')) return distance-1;
|
||||
if(from.hasSkill('jiu')) return distance-1;
|
||||
}
|
||||
},
|
||||
ai:{
|
||||
|
|
|
@ -574,7 +574,7 @@ character.xianjian={
|
|||
effect:{
|
||||
target:function(card,player,target){
|
||||
if(get.tag(card,'thunderDamage')){
|
||||
if(target.hp<=1||!target.skills.contains('xfenxin')) return [0,0];
|
||||
if(target.hp<=1||!target.hasSkill('xfenxin')) return [0,0];
|
||||
return [0,1.5];
|
||||
}
|
||||
}
|
||||
|
@ -642,7 +642,7 @@ character.xianjian={
|
|||
},
|
||||
content:function(){
|
||||
"step 0"
|
||||
if(!player.skills.contains('unequip')){
|
||||
if(!player.hasSkill('unequip')){
|
||||
event.added=true;
|
||||
player.skills.push('unequip');
|
||||
}
|
||||
|
@ -661,7 +661,7 @@ character.xianjian={
|
|||
result:{
|
||||
target:function(player,target){
|
||||
var added=false;
|
||||
if(!player.skills.contains('unequip')){
|
||||
if(!player.hasSkill('unequip')){
|
||||
added=true;
|
||||
player.skills.push('unequip');
|
||||
}
|
||||
|
@ -703,7 +703,7 @@ character.xianjian={
|
|||
game.delay();
|
||||
},
|
||||
filterTarget:function(card,player,target){
|
||||
return target!=player&&!target.skills.contains('tianfu2');
|
||||
return target!=player&&!target.hasSkill('tianfu2');
|
||||
},
|
||||
check:function(card){
|
||||
if(_status.event.player.hp>=3) return 8-ai.get.value(card);
|
||||
|
@ -898,7 +898,7 @@ character.xianjian={
|
|||
if(!player.num('he')) return false;
|
||||
if(player==event.player) return false;
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
if(game.players[i].skills.contains('wangyou3')) return true;
|
||||
if(game.players[i].hasSkill('wangyou3')) return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
|
@ -907,7 +907,7 @@ character.xianjian={
|
|||
var targets=[];
|
||||
var num=0;
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
if(game.players[i].skills.contains('wangyou3')){
|
||||
if(game.players[i].hasSkill('wangyou3')){
|
||||
var att=ai.get.attitude(player,game.players[i]);
|
||||
if(att>0) num++;
|
||||
else if(att<0) num--;
|
||||
|
@ -1041,7 +1041,7 @@ character.xianjian={
|
|||
jubao:{
|
||||
trigger:{global:'discardAfter'},
|
||||
filter:function(event,player){
|
||||
if(player.skills.contains('jubao2')) return false;
|
||||
if(player.hasSkill('jubao2')) return false;
|
||||
if(event.player==player) return false;
|
||||
if(_status.currentPhase==player) return false;
|
||||
for(var i=0;i<event.cards.length;i++){
|
||||
|
|
|
@ -1521,7 +1521,7 @@ character.yijiang={
|
|||
},
|
||||
result:{
|
||||
player:function(player){
|
||||
if(player.num('h','sha')>0) return 0.6;
|
||||
if(player.num('h','sha')>0) return 0;
|
||||
var num=player.num('h');
|
||||
if(num>player.hp) return 0;
|
||||
if(num==1) return -2;
|
||||
|
@ -1841,10 +1841,10 @@ character.yijiang={
|
|||
silent:true,
|
||||
priority:5,
|
||||
filter:function(event,player){
|
||||
return player.skills.contains('benxi');
|
||||
return player.hasSkill('benxi');
|
||||
},
|
||||
content:function(){
|
||||
player.storage.benxi=!player.skills.contains('unequip');
|
||||
player.storage.benxi=!player.hasSkill('unequip');
|
||||
if(player.storage.benxi){
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
if(get.distance(player,game.players[i])>1){
|
||||
|
@ -1901,7 +1901,7 @@ character.yijiang={
|
|||
check:function(event,player){
|
||||
if(ai.get.attitude(player,event.player)>=0) return false;
|
||||
if(event.player.num('e','zhuge')) return false;
|
||||
if(event.player.skills.contains('paoxiao')) return false;
|
||||
if(event.player.hasSkill('paoxiao')) return false;
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
if(event.player.canUse('sha',game.players[i])&&
|
||||
ai.get.attitude(player,game.players[i])>0) break;
|
||||
|
@ -1996,7 +1996,7 @@ character.yijiang={
|
|||
event.finish();
|
||||
}
|
||||
"step 2"
|
||||
if(player.skills.contains('jiu')){
|
||||
if(player.hasSkill('jiu')){
|
||||
game.broadcastAll(function(player){
|
||||
player.removeSkill('jiu');
|
||||
if(player.node.jiu){
|
||||
|
@ -2041,10 +2041,10 @@ character.yijiang={
|
|||
if(get.color(trigger.card)=='red'){
|
||||
go=true;
|
||||
}
|
||||
else if(!trigger.player.skills.contains('paoxiao')&&
|
||||
!trigger.player.skills.contains('tanlnin3')&&
|
||||
!trigger.player.skills.contains('zhaxiang2')&&
|
||||
!trigger.player.skills.contains('fengnu')&&
|
||||
else if(!trigger.player.hasSkill('paoxiao')&&
|
||||
!trigger.player.hasSkill('tanlin3')&&
|
||||
!trigger.player.hasSkill('zhaxiang2')&&
|
||||
!trigger.player.hasSkill('fengnu')&&
|
||||
!trigger.player.num('e','zhuge')){
|
||||
var nh=trigger.player.num('h');
|
||||
if(player==trigger.player){
|
||||
|
@ -2269,7 +2269,7 @@ character.yijiang={
|
|||
trigger:{player:'damageEnd',source:'damageEnd'},
|
||||
direct:true,
|
||||
filter:function(event,player){
|
||||
if(player.skills.contains('yaoming2')) return false;
|
||||
if(player.hasSkill('yaoming2')) return false;
|
||||
var nh=player.num('h');
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
if(game.players[i].num('h')!=nh) return true;
|
||||
|
@ -2376,7 +2376,7 @@ character.yijiang={
|
|||
content:function(){
|
||||
'step 0'
|
||||
var num=player.hp;
|
||||
if(!player.skills.contains('yanzhu')){
|
||||
if(!player.hasSkill('yanzhu')){
|
||||
num=player.maxHp;
|
||||
}
|
||||
player.chooseTarget([1,num],'是否发动【兴学】?').set('ai',function(target){
|
||||
|
@ -2897,7 +2897,7 @@ character.yijiang={
|
|||
ai:{
|
||||
result:{
|
||||
target:function(player,target){
|
||||
if(player.skills.contains('jijiang3')) return 0;
|
||||
if(player.hasSkill('jijiang3')) return 0;
|
||||
return ai.get.effect(target,{name:'sha'},player,target);
|
||||
}
|
||||
},
|
||||
|
@ -2909,7 +2909,7 @@ character.yijiang={
|
|||
zuoding:{
|
||||
trigger:{global:'useCard'},
|
||||
filter:function(event,player){
|
||||
return !player.skills.contains('zuoding2')&&get.suit(event.card)=='spade'&&
|
||||
return !player.hasSkill('zuoding2')&&get.suit(event.card)=='spade'&&
|
||||
event.targets&&event.targets.length&&event.player!=player;
|
||||
},
|
||||
direct:true,
|
||||
|
@ -2947,7 +2947,7 @@ character.yijiang={
|
|||
filter:function(event,player){
|
||||
if(event.responded) return false;
|
||||
if(!event.filterCard({name:'shan'})) return false;
|
||||
if(player.skills.contains('huomo2')) return false;
|
||||
if(player.hasSkill('huomo2')) return false;
|
||||
if(event.parent.name!='sha') return false;
|
||||
var hs=player.get('he',{color:'black'});
|
||||
for(var i=0;i<hs.length;i++){
|
||||
|
@ -3209,7 +3209,7 @@ character.yijiang={
|
|||
trigger:{player:'useCardToBegin'},
|
||||
filter:function(event,player){
|
||||
return _status.currentPhase==player&&event.targets.length==1&&
|
||||
event.target.num('h')>0&&!player.skills.contains('taoxi4')&&player!=event.target;
|
||||
event.target.num('h')>0&&!player.hasSkill('taoxi4')&&player!=event.target;
|
||||
},
|
||||
check:function(event,player){
|
||||
return ai.get.attitude(player,event.target)<0;
|
||||
|
@ -3723,7 +3723,7 @@ character.yijiang={
|
|||
ai:{
|
||||
respondSha:true,
|
||||
order:function(item,player){
|
||||
if(player.skills.contains('wusheng')&&player.skills.contains('paoxiao')){
|
||||
if(player.hasSkill('wusheng')&&player.hasSkill('paoxiao')){
|
||||
return 1;
|
||||
}
|
||||
if(player.num('h')<4){
|
||||
|
@ -4451,6 +4451,7 @@ character.yijiang={
|
|||
}
|
||||
}
|
||||
},
|
||||
dingpin2:{},
|
||||
faen:{
|
||||
audio:2,
|
||||
trigger:{global:['turnOverAfter','linkAfter']},
|
||||
|
@ -4504,7 +4505,7 @@ character.yijiang={
|
|||
trigger:{player:'useCard'},
|
||||
filter:function(event,player){
|
||||
if(_status.currentPhase!=player) return false;
|
||||
if(player.skills.contains('chanhui2')) return false;
|
||||
if(player.hasSkill('chanhui2')) return false;
|
||||
if(event.targets.length>1) return false;
|
||||
var card=event.card;
|
||||
if(card.name=='sha') return true;
|
||||
|
@ -4608,7 +4609,7 @@ character.yijiang={
|
|||
effect:{
|
||||
target:function(card,player,target){
|
||||
if(get.tag(card,'damage')){
|
||||
if(player.skills.contains('jueqing')) return [1,-2];
|
||||
if(player.hasSkill('jueqing')) return [1,-2];
|
||||
var hasfriend=false;
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
if(game.players[i]!=target&&ai.get.attitude(game.players[i],target)>=0){
|
||||
|
@ -4617,7 +4618,7 @@ character.yijiang={
|
|||
}
|
||||
if(!hasfriend) return;
|
||||
if(target.hp>=4) return [0.5,get.tag(card,'damage')*2];
|
||||
if(!target.skills.contains('paiyi')&&target.hp>1) return [0.5,get.tag(card,'damage')*1.5];
|
||||
if(!target.hasSkill('paiyi')&&target.hp>1) return [0.5,get.tag(card,'damage')*1.5];
|
||||
if(target.hp==3) return [0.5,get.tag(card,'damage')*1.5];
|
||||
if(target.hp==2) return [1,get.tag(card,'damage')*0.5];
|
||||
}
|
||||
|
@ -4632,7 +4633,7 @@ character.yijiang={
|
|||
trigger:{player:'phaseBegin'},
|
||||
forced:true,
|
||||
filter:function(event,player){
|
||||
return !player.skills.contains('paiyi')&&player.storage.quanji&&player.storage.quanji.length>=3;
|
||||
return !player.hasSkill('paiyi')&&player.storage.quanji&&player.storage.quanji.length>=3;
|
||||
},
|
||||
content:function(){
|
||||
"step 0"
|
||||
|
@ -5607,9 +5608,9 @@ character.yijiang={
|
|||
trigger.finish();
|
||||
var ex=0;
|
||||
if(trigger.card&&trigger.card.name=='sha'){
|
||||
if(player.skills.contains('jiu')) ex++;
|
||||
if(player.skills.contains('luoyi2')) ex++;
|
||||
if(player.skills.contains('reluoyi2')) ex++;
|
||||
if(player.hasSkill('jiu')) ex++;
|
||||
if(player.hasSkill('luoyi2')) ex++;
|
||||
if(player.hasSkill('reluoyi2')) ex++;
|
||||
}
|
||||
trigger.player.loseHp(trigger.num+ex);
|
||||
}
|
||||
|
@ -5769,7 +5770,7 @@ character.yijiang={
|
|||
if(card.name=='guiyoujie') return [0,0.5];
|
||||
if(target.isTurnedOver()){
|
||||
if(get.tag(card,'damage')){
|
||||
if(player.skills.contains('jueqing')) return [1,-2];
|
||||
if(player.hasSkill('jueqing')) return [1,-2];
|
||||
if(target.hp==1) return;
|
||||
return [1,target.num('h')/2];
|
||||
}
|
||||
|
@ -6277,7 +6278,7 @@ character.yijiang={
|
|||
ai:{
|
||||
effect:{
|
||||
target:function(card,player,target){
|
||||
if(player.skills.contains('jueqing')) return [1,-1.5];
|
||||
if(player.hasSkill('jueqing')) return [1,-1.5];
|
||||
var hasfriend=false;
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
if(game.players[i]!=target&&ai.get.attitude(game.players[i],target)>=0){
|
||||
|
@ -6296,7 +6297,7 @@ character.yijiang={
|
|||
ai:{
|
||||
effect:{
|
||||
target:function(card,player,target){
|
||||
if(player.skills.contains('jueqing')) return [1,-2];
|
||||
if(player.hasSkill('jueqing')) return [1,-2];
|
||||
var hasfriend=false;
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
if(game.players[i]!=target&&ai.get.attitude(game.players[i],target)>=0){
|
||||
|
@ -6639,7 +6640,7 @@ character.yijiang={
|
|||
effect:{
|
||||
target:function(card,player,target){
|
||||
if(get.tag(card,'damage')){
|
||||
if(player.skills.contains('jueqing')) return [1,-2];
|
||||
if(player.hasSkill('jueqing')) return [1,-2];
|
||||
var hasfriend=false;
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
if(game.players[i]!=target&&ai.get.attitude(game.players[i],target)>=0){
|
||||
|
@ -6876,7 +6877,7 @@ character.yijiang={
|
|||
content:function(){
|
||||
"step 0"
|
||||
player.judge(function(card){
|
||||
if(player.skills.contains('shibei2')){
|
||||
if(player.hasSkill('shibei2')){
|
||||
if(get.color(card)=='black') return -1;
|
||||
}
|
||||
else{
|
||||
|
@ -6891,7 +6892,7 @@ character.yijiang={
|
|||
else if(result.judge<0){
|
||||
player.loseHp();
|
||||
}
|
||||
if(!player.skills.contains('shibei2')){
|
||||
if(!player.hasSkill('shibei2')){
|
||||
player.addTempSkill('shibei2','phaseAfter');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -144,7 +144,7 @@ character.yxs={
|
|||
order:1,
|
||||
result:{
|
||||
player:function(player,target){
|
||||
if(!player.skills.contains('xiushen')) return 0;
|
||||
if(!player.hasSkill('xiushen')) return 0;
|
||||
if(target.isLinked()) return 0;
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
if(game.players[i].isLinked()) return 0;
|
||||
|
@ -237,7 +237,7 @@ character.yxs={
|
|||
effect:{
|
||||
target:function(card,player,target){
|
||||
if(get.tag(card,'damage')){
|
||||
if(player.skills.contains('jueqing')) return [1,-2];
|
||||
if(player.hasSkill('jueqing')) return [1,-2];
|
||||
if(!target.hasFriend()) return;
|
||||
if(target.hp>=4) return [1,get.tag(card,'damage')*2];
|
||||
if(target.hp==3) return [1,get.tag(card,'damage')*1.5];
|
||||
|
@ -740,7 +740,7 @@ character.yxs={
|
|||
var skills=info[3];
|
||||
for(var j=0;j<skills.length;j++){
|
||||
if(lib.translate[skills[j]+'_info']&&lib.skill[skills[j]]&&
|
||||
!lib.skill[skills[j]].unique&&!player.skills.contains(skills[j])){
|
||||
!lib.skill[skills[j]].unique&&!player.hasSkill(skills[j])){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -773,7 +773,7 @@ character.yxs={
|
|||
var skills=lib.character[name][3];
|
||||
for(var j=0;j<skills.length;j++){
|
||||
if(lib.translate[skills[j]+'_info']&&lib.skill[skills[j]]&&
|
||||
!lib.skill[skills[j]].unique&&!player.skills.contains(skills[j])){
|
||||
!lib.skill[skills[j]].unique&&!player.hasSkill(skills[j])){
|
||||
list.push(skills[j]);
|
||||
}
|
||||
}
|
||||
|
@ -908,40 +908,40 @@ character.yxs={
|
|||
ducai3:{
|
||||
mod:{
|
||||
cardEnabled:function(card,player){
|
||||
if(player.skills.contains('ducai2')) return;
|
||||
if(player.hasSkill('ducai2')) return;
|
||||
var suit;
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
if(game.players[i].skills.contains('ducai2')){
|
||||
if(game.players[i].hasSkill('ducai2')){
|
||||
suit=get.suit(game.players[i].storage.ducai2);
|
||||
}
|
||||
}
|
||||
if(suit&&get.suit(card)==suit) return false;
|
||||
},
|
||||
cardUsable:function(card,player){
|
||||
if(player.skills.contains('ducai2')) return;
|
||||
if(player.hasSkill('ducai2')) return;
|
||||
var suit;
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
if(game.players[i].skills.contains('ducai2')){
|
||||
if(game.players[i].hasSkill('ducai2')){
|
||||
suit=get.suit(game.players[i].storage.ducai2);
|
||||
}
|
||||
}
|
||||
if(suit&&get.suit(card)==suit) return false;
|
||||
},
|
||||
cardRespondable:function(card,player){
|
||||
if(player.skills.contains('ducai2')) return;
|
||||
if(player.hasSkill('ducai2')) return;
|
||||
var suit;
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
if(game.players[i].skills.contains('ducai2')){
|
||||
if(game.players[i].hasSkill('ducai2')){
|
||||
suit=get.suit(game.players[i].storage.ducai2);
|
||||
}
|
||||
}
|
||||
if(suit&&get.suit(card)==suit) return false;
|
||||
},
|
||||
cardSavable:function(card,player){
|
||||
if(player.skills.contains('ducai2')) return;
|
||||
if(player.hasSkill('ducai2')) return;
|
||||
var suit;
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
if(game.players[i].skills.contains('ducai2')){
|
||||
if(game.players[i].hasSkill('ducai2')){
|
||||
suit=get.suit(game.players[i].storage.ducai2);
|
||||
}
|
||||
}
|
||||
|
@ -1279,7 +1279,7 @@ character.yxs={
|
|||
effect:{
|
||||
target:function(card,player,target){
|
||||
if(get.tag(card,'damage')){
|
||||
if(player.skills.contains('jueqing')) return [1,-2];
|
||||
if(player.hasSkill('jueqing')) return [1,-2];
|
||||
var hasfriend=false;
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
if(game.players[i]!=target&&ai.get.attitude(game.players[i],target)>=0){
|
||||
|
@ -1300,7 +1300,7 @@ character.yxs={
|
|||
direct:true,
|
||||
priority:11,
|
||||
filter:function(event,player){
|
||||
if(player.skills.contains('bolehuiyan4')) return false;
|
||||
if(player.hasSkill('bolehuiyan4')) return false;
|
||||
if(event.target.isUnderControl()) return false;
|
||||
return event.player!=player&&event.target!=player&&event.target.num('h')>0;
|
||||
},
|
||||
|
@ -1311,16 +1311,16 @@ character.yxs={
|
|||
event.dialog=ui.create.dialog('慧眼:预言'+get.translation(trigger.player)+'对'+get.translation(trigger.target)+'的杀能否命中');
|
||||
}
|
||||
player.chooseControl('能命中','不能命中','cancel').ai=function(event){
|
||||
if(trigger.player.skills.contains('wushuang')) return 0;
|
||||
if(trigger.player.skills.contains('liegong')) return 0;
|
||||
if(trigger.player.skills.contains('tieji')) return 0;
|
||||
if(trigger.player.skills.contains('juji')) return 0;
|
||||
if(trigger.player.skills.contains('retieji')) return 0;
|
||||
if(trigger.player.skills.contains('roulin')&&trigger.target.sex=='female') return 0;
|
||||
if(trigger.player.skills.contains('nvquan')&&trigger.target.sex=='male') return 0;
|
||||
if(trigger.target.skills.contains('yijue2')) return 0;
|
||||
if(trigger.target.skills.contains('shejie2')) return 0;
|
||||
if(trigger.target.skills.contains('shanguang2')) return 0;
|
||||
if(trigger.player.hasSkill('wushuang')) return 0;
|
||||
if(trigger.player.hasSkill('liegong')) return 0;
|
||||
if(trigger.player.hasSkill('tieji')) return 0;
|
||||
if(trigger.player.hasSkill('juji')) return 0;
|
||||
if(trigger.player.hasSkill('retieji')) return 0;
|
||||
if(trigger.player.hasSkill('roulin')&&trigger.target.sex=='female') return 0;
|
||||
if(trigger.player.hasSkill('nvquan')&&trigger.target.sex=='male') return 0;
|
||||
if(trigger.target.hasSkill('yijue2')) return 0;
|
||||
if(trigger.target.hasSkill('shejie2')) return 0;
|
||||
if(trigger.target.hasSkill('shanguang2')) return 0;
|
||||
|
||||
var equip=trigger.target.get('e','2');
|
||||
if(equip&&equip.name=='bagua') return 1;
|
||||
|
@ -1450,7 +1450,7 @@ character.yxs={
|
|||
result:{
|
||||
target:function(card,player,target){
|
||||
if(player.num('he')>1&&get.tag(card,'damage')){
|
||||
if(player.skills.contains('jueqing')) return [1,-1];
|
||||
if(player.hasSkill('jueqing')) return [1,-1];
|
||||
if(ai.get.attitude(target,player)<0) return [1,0,0,-1.5];
|
||||
}
|
||||
}
|
||||
|
@ -1691,7 +1691,7 @@ character.yxs={
|
|||
direct:true,
|
||||
filter:function(event,player){
|
||||
if(get.position(event.card)!='d') return false;
|
||||
if(player.skills.contains('jieyong2')) return false;
|
||||
if(player.hasSkill('jieyong2')) return false;
|
||||
return player.num('he',{color:'black'})>0;
|
||||
},
|
||||
content:function(){
|
||||
|
@ -1736,7 +1736,7 @@ character.yxs={
|
|||
}
|
||||
var dialog=ui.create.dialog([list,'vcard']);
|
||||
player.chooseButton(dialog,function(button){
|
||||
// if(player.skills.contains('jieyong4')==false){
|
||||
// if(player.hasSkill('jieyong4')==false){
|
||||
// for(var i=0;i<game.players.length;i++){
|
||||
// if(ai.get.attitude(player,game.players[i])<-3&&
|
||||
// game.players[i].hp==1&&game.players[i].num('h')<=1){
|
||||
|
@ -1790,7 +1790,7 @@ character.yxs={
|
|||
player.addTempSkill('jieyong6','phaseAfter');
|
||||
}
|
||||
else{
|
||||
if(player.skills.contains('jieyong4')){
|
||||
if(player.hasSkill('jieyong4')){
|
||||
player.addTempSkill('jieyong5','phaseAfter')
|
||||
}
|
||||
else{
|
||||
|
@ -1803,7 +1803,7 @@ character.yxs={
|
|||
order:9,
|
||||
result:{
|
||||
player:function(player){
|
||||
if(player.skills.contains('jieyong5')||player.skills.contains('jieyong6')) return 0;
|
||||
if(player.hasSkill('jieyong5')||player.hasSkill('jieyong6')) return 0;
|
||||
return 1;
|
||||
}
|
||||
},
|
||||
|
@ -1834,7 +1834,7 @@ character.yxs={
|
|||
direct:true,
|
||||
filter:function(event,player){
|
||||
return _status.currentPhase!=player&&event.player!=player&&get.type(event.card)=='trick'&&
|
||||
get.position(event.card)=='d'&&!player.skills.contains('zhulu2')&&
|
||||
get.position(event.card)=='d'&&!player.hasSkill('zhulu2')&&
|
||||
get.itemtype(event.card)=='card'&&player.num('he',{suit:get.suit(event.card)})>0;
|
||||
},
|
||||
content:function(){
|
||||
|
|
|
@ -156,7 +156,7 @@ character.zhuogui={
|
|||
target:function(card,player,target,current){
|
||||
if(target.get('e','2')) return;
|
||||
if(card.name=='sha'){
|
||||
if(card.nature=='fire'||player.skills.contains('zhuque_skill')) return 2;
|
||||
if(card.nature=='fire'||player.hasSkill('zhuque_skill')) return 2;
|
||||
}
|
||||
if(get.tag(card,'fireDamage')&¤t<0) return 2;
|
||||
}
|
||||
|
|
|
@ -357,16 +357,16 @@ play.soldier={
|
|||
enable:'phaseUse',
|
||||
usable:1,
|
||||
filter:function(event,player){
|
||||
if(player.skills.contains('tongxinbing')) return false;
|
||||
if(player.hasSkill('tongxinbing')) return false;
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
if(game.players[i].skills.contains('tongxinbing')) return true;
|
||||
if(game.players[i].hasSkill('tongxinbing')) return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
filterCard:true,
|
||||
discard:false,
|
||||
filterTarget:function(card,player,target){
|
||||
return player!=target&&target.skills.contains('tongxinbing');
|
||||
return player!=target&&target.hasSkill('tongxinbing');
|
||||
},
|
||||
check:function(card){
|
||||
return 10-ai.get.value(card);
|
||||
|
|
136
game/game.js
136
game/game.js
|
@ -56,7 +56,7 @@
|
|||
};
|
||||
var lib={
|
||||
configprefix:'noname_0.9_',
|
||||
versionOL:12,
|
||||
versionOL:13,
|
||||
updateURL:localStorage.getItem('noname_update_url')||'http://websha.cn/',
|
||||
devURL:'https://rawgit.com/libccy/noname/master/',
|
||||
assetURL:'',
|
||||
|
@ -81,6 +81,7 @@
|
|||
extensions:[],
|
||||
extensionPack:{},
|
||||
cardType:{},
|
||||
hook:{globaltrigger:{},globalskill:{}},
|
||||
characterDialogGroup:{
|
||||
'收藏':function(name,capt){
|
||||
return lib.config.favouriteCharacter.contains(name)?capt:null;
|
||||
|
@ -7204,14 +7205,14 @@
|
|||
for(var i in player.tempSkills){
|
||||
player.removeSkill(i);
|
||||
}
|
||||
for(var i in lib.skill.globalmap){
|
||||
if(lib.skill.globalmap[i].contains(player)){
|
||||
lib.skill.globalmap[i].remove(player);
|
||||
if(lib.skill.globalmap[i].length==0&&!lib.skill[i].globalFixed){
|
||||
game.removeGlobalSkill(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
// for(var i in lib.skill.globalmap){
|
||||
// if(lib.skill.globalmap[i].contains(player)){
|
||||
// lib.skill.globalmap[i].remove(player);
|
||||
// if(lib.skill.globalmap[i].length==0&&!lib.skill[i].globalFixed){
|
||||
// game.removeGlobalSkill(i);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
game.broadcastAll(function(player,cards){
|
||||
player.classList.add('dead');
|
||||
|
@ -7747,6 +7748,15 @@
|
|||
this.ws.send.apply(this.ws,arguments);
|
||||
return this;
|
||||
},
|
||||
getId:function(){
|
||||
if(_status.video||_status.connectMode) return this;
|
||||
if(this.playerid){
|
||||
delete game.playerMap[this.playerid];
|
||||
}
|
||||
this.playerid=get.id();
|
||||
game.playerMap[this.playerid]=this;
|
||||
return this;
|
||||
},
|
||||
chat:function(str){
|
||||
lib.element.player.say.call(this,str);
|
||||
game.broadcast(function(id,str){
|
||||
|
@ -7987,7 +7997,7 @@
|
|||
if(!_status.video){
|
||||
game.addVideo('update',this,[this.num('h'),this.hp,this.maxHp,this.hujia]);
|
||||
}
|
||||
if(this.node.jiu&&!this.skills.contains('jiu')){
|
||||
if(this.node.jiu&&!this.hasSkill('jiu')){
|
||||
this.node.jiu.delete();
|
||||
this.node.jiu2.delete();
|
||||
delete this.node.jiu;
|
||||
|
@ -8115,6 +8125,9 @@
|
|||
skills.addArray(this.additionalSkills[i](this));
|
||||
}
|
||||
}
|
||||
for(var i in this.tempSkills){
|
||||
skills.add(i);
|
||||
}
|
||||
if(arg2) skills=skills.concat(this.hiddenSkills);
|
||||
if(arg3!==false){
|
||||
for(i=0;i<this.node.equips.childNodes.length;i++){
|
||||
|
@ -9429,7 +9442,7 @@
|
|||
}
|
||||
},
|
||||
isMad:function(){
|
||||
return this.skills.contains('mad');
|
||||
return this.hasSkill('mad');
|
||||
},
|
||||
goMad:function(end){
|
||||
if(end){
|
||||
|
@ -9977,6 +9990,37 @@
|
|||
if(info.init){
|
||||
info.init(this);
|
||||
}
|
||||
if(info.trigger&&this.playerid){
|
||||
var playerid=this.playerid;
|
||||
var setTrigger=function(i,evt){
|
||||
if(i=='global'){
|
||||
if(!lib.hook.globaltrigger[evt]){
|
||||
lib.hook.globaltrigger[evt]={};
|
||||
}
|
||||
if(!lib.hook.globaltrigger[evt][playerid]){
|
||||
lib.hook.globaltrigger[evt][playerid]=[];
|
||||
}
|
||||
lib.hook.globaltrigger[evt][playerid].add(skill);
|
||||
}
|
||||
else{
|
||||
var name=playerid+'_'+i+'_'+evt;
|
||||
if(!lib.hook[name]){
|
||||
lib.hook[name]=[];
|
||||
}
|
||||
lib.hook[name].add(skill);
|
||||
}
|
||||
}
|
||||
for(var i in info.trigger){
|
||||
if(typeof info.trigger[i]=='string'){
|
||||
setTrigger(i,info.trigger[i]);
|
||||
}
|
||||
else if(Array.isArray(info.trigger)){
|
||||
for(var j=0;j<info.trigger.length;j++){
|
||||
setTrigger(i,info.trigger[i][j]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
addSkill:function(skill){
|
||||
if(get.objtype(skill)=='array'){
|
||||
|
@ -10074,15 +10118,53 @@
|
|||
this.skills.remove(skill);
|
||||
this.checkConflict();
|
||||
delete this.tempSkills[skill];
|
||||
if(lib.skill[skill]&&lib.skill[skill].onremove){
|
||||
lib.skill[skill].onremove(this);
|
||||
}
|
||||
var info=lib.skill[skill];
|
||||
if(info){
|
||||
if(info.onremove){
|
||||
info.onremove(this);
|
||||
}
|
||||
if(info.trigger){
|
||||
var playerid=this.playerid;
|
||||
var removeTrigger=function(i,evt){
|
||||
if(i=='global'){
|
||||
for(var j in lib.hook.globaltrigger){
|
||||
if(lib.hook.globaltrigger[j][playerid]){
|
||||
lib.hook.globaltrigger[j][playerid].remove(skill);
|
||||
if(lib.hook.globaltrigger[j][playerid].length==0){
|
||||
delete lib.hook.globaltrigger[j][playerid];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else{
|
||||
var name=playerid+'_'+i+'_'+evt;
|
||||
if(lib.hook[name]){
|
||||
lib.hook[name].remove(skill);
|
||||
if(lib.hook[name].length==0){
|
||||
delete lib.hook[name];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
for(var i in info.trigger){
|
||||
if(typeof info.trigger[i]=='string'){
|
||||
removeTrigger(i,info.trigger[i]);
|
||||
}
|
||||
else if(Array.isArray(info.trigger)){
|
||||
for(var j=0;j<info.trigger.length;j++){
|
||||
removeTrigger(i,info.trigger[i][j]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return skill;
|
||||
},
|
||||
addTempSkill:function(skill,expire){
|
||||
if(this.hasSkill(skill)&&this.tempSkills[skill]==undefined) return;
|
||||
this.addSkill(skill);
|
||||
this.skills.remove(skill);
|
||||
this.tempSkills[skill]=expire;
|
||||
this.checkConflict();
|
||||
return skill;
|
||||
|
@ -11991,6 +12073,9 @@
|
|||
notLink:function(){
|
||||
return this.getParent().name!='_lianhuan'&&this.getParent().name!='_lianhuan2';
|
||||
},
|
||||
triggerx:function(name){
|
||||
|
||||
},
|
||||
trigger:function(name){
|
||||
if(_status.video) return;
|
||||
if(name=='gameStart'){
|
||||
|
@ -16916,11 +17001,33 @@
|
|||
}
|
||||
lib.skill.globalmap[skill].add(player);
|
||||
}
|
||||
if(info.trigger){
|
||||
var setTrigger=function(i,evt){
|
||||
var name=i+'_'+evt;
|
||||
if(!lib.hook.globalskill[name]){
|
||||
lib.hook.globalskill[name]=[];
|
||||
}
|
||||
lib.hook.globalskill[name].add(skill);
|
||||
}
|
||||
for(var i in info.trigger){
|
||||
if(typeof info.trigger[i]=='string'){
|
||||
setTrigger(i,info.trigger[i]);
|
||||
}
|
||||
else if(Array.isArray(info.trigger)){
|
||||
for(var j=0;j<info.trigger.length;j++){
|
||||
setTrigger(i,info.trigger[i][j]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
},
|
||||
removeGlobalSkill:function(skill){
|
||||
lib.skill.global.remove(skill);
|
||||
delete lib.skill.globalmap[skill];
|
||||
for(var i in lib.hook.globalskill){
|
||||
lib.hook.globalskill.remove(skill);
|
||||
}
|
||||
},
|
||||
removeExtension:function(extname,keepfile){
|
||||
var prefix='extension_'+extname;
|
||||
|
@ -19278,6 +19385,7 @@
|
|||
players:[],
|
||||
dead:[],
|
||||
imported:[],
|
||||
playerMap:{},
|
||||
phaseNumber:0
|
||||
};
|
||||
var ui={
|
||||
|
|
|
@ -1,13 +1,11 @@
|
|||
window.noname_update={
|
||||
version:'1.8.20.2',
|
||||
version:'1.9.0',
|
||||
changeLog:[
|
||||
'修bug',
|
||||
'性能提升',
|
||||
],
|
||||
files:{
|
||||
global:[
|
||||
'mode/guozhan.js',
|
||||
'character/xianjian.js',
|
||||
'game/game.js',
|
||||
],
|
||||
'1.8.20.1':[],
|
||||
}
|
||||
}
|
||||
|
|
|
@ -179,7 +179,7 @@ mode.boss={
|
|||
},500);
|
||||
var rect=event.current.getBoundingClientRect();
|
||||
var boss=ui.create.player();
|
||||
boss.playerid=get.id();
|
||||
boss.getId();
|
||||
boss.init(event.current.name);
|
||||
game.boss=boss;
|
||||
boss.side=true;
|
||||
|
@ -200,7 +200,7 @@ mode.boss={
|
|||
}
|
||||
for(var i=0;i<result.links.length;i++){
|
||||
var player=ui.create.player(ui.arena);
|
||||
player.playerid=get.id();
|
||||
player.getId();
|
||||
player.init(result.links[i]).animate('start');
|
||||
player.setIdentity('cai');
|
||||
player.identity='cai';
|
||||
|
@ -384,7 +384,7 @@ mode.boss={
|
|||
game.boss.delete();
|
||||
game.dead.remove(game.boss);
|
||||
var boss=ui.create.player();
|
||||
boss.playerid=get.id();
|
||||
boss.getId();
|
||||
boss.init(name);
|
||||
game.addVideo('bossSwap',game.boss,boss.name);
|
||||
if(game.me==game.boss){
|
||||
|
|
|
@ -289,7 +289,7 @@ mode.chess={
|
|||
_status.friendCount=_status.mylist.length;
|
||||
while(_status.mylist.length){
|
||||
friend=ui.create.player().animate('start');
|
||||
friend.playerid=get.id();
|
||||
friend.getId();
|
||||
if(!event.friendZhu){
|
||||
event.friendZhu=friend;
|
||||
}
|
||||
|
@ -320,7 +320,7 @@ mode.chess={
|
|||
}
|
||||
while(_status.enemylist.length){
|
||||
enemy=ui.create.player().animate('start');
|
||||
enemy.playerid=get.id();
|
||||
enemy.getId();
|
||||
enemy.init(_status.enemylist.shift());
|
||||
enemy.side=!side;
|
||||
enemy.setIdentity('enemy');
|
||||
|
@ -1484,7 +1484,7 @@ mode.chess={
|
|||
num=4;
|
||||
}
|
||||
var player=ui.create.player();
|
||||
player.playerid=get.id();
|
||||
player.getId();
|
||||
if(enemy=='treasure'){
|
||||
player.animate('judgestart');
|
||||
player.side=null;
|
||||
|
@ -4769,7 +4769,7 @@ mode.chess={
|
|||
},
|
||||
chance:function(target,player){
|
||||
var chance;
|
||||
var renyi=player.skills.contains('leader_renyi');
|
||||
var renyi=player.hasSkill('leader_renyi');
|
||||
switch(target.hp){
|
||||
case 1:chance=0.7;break;
|
||||
case 2:chance=0.4;break;
|
||||
|
@ -4963,7 +4963,7 @@ mode.chess={
|
|||
audio:2,
|
||||
trigger:{player:['phaseBegin','phaseEnd'],global:'gameStart'},
|
||||
filter:function(event,player,name){
|
||||
if(!player.skills.contains('tongshuai')) return false;
|
||||
if(!player.hasSkill('tongshuai')) return false;
|
||||
if(name=='phaseBegin'&&game.phaseNumber==1) return false;
|
||||
return true;
|
||||
},
|
||||
|
@ -5141,7 +5141,7 @@ mode.chess={
|
|||
if(card.name=='shunshou') return;
|
||||
if(card.name=='yuanjiao') return;
|
||||
if(card.name=='yiyi') return;
|
||||
if(!player.skills.contains('cangming2')) return [0,0,0,0];
|
||||
if(!player.hasSkill('cangming2')) return [0,0,0,0];
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -5305,7 +5305,7 @@ mode.chess={
|
|||
result:{
|
||||
target:function(player,target){
|
||||
var added=false;
|
||||
if(!player.skills.contains('unequip')){
|
||||
if(!player.hasSkill('unequip')){
|
||||
added=true;
|
||||
player.skills.push('unequip');
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@ mode.guozhan={
|
|||
for(var i=0;i<game.players.length;i++){
|
||||
game.players[i].node.name.hide();
|
||||
game.players[i].node.name2.hide();
|
||||
game.players[i].playerid=get.id();
|
||||
game.players[i].getId();
|
||||
}
|
||||
game.chooseCharacter();
|
||||
}
|
||||
|
|
|
@ -169,7 +169,7 @@ mode.identity={
|
|||
}
|
||||
else{
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
game.players[i].playerid=get.id();
|
||||
game.players[i].getId();
|
||||
}
|
||||
game.chooseCharacter();
|
||||
}
|
||||
|
@ -1578,7 +1578,7 @@ mode.identity={
|
|||
for(i=0;i<game.players.length;i++){
|
||||
player=game.players[i];
|
||||
var php=player.hp;
|
||||
if(player.skills.contains('benghuai')&&php>4){
|
||||
if(player.hasSkill('benghuai')&&php>4){
|
||||
php=4;
|
||||
}
|
||||
else if(php>6){
|
||||
|
|
|
@ -411,7 +411,7 @@ mode.stone={
|
|||
ui.arena.classList.add('stone');
|
||||
"step 1"
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
game.players[i].playerid=get.id();
|
||||
game.players[i].getId();
|
||||
game.players[i].classList.add('noidentity');
|
||||
}
|
||||
game.enemy=game.me.next;
|
||||
|
@ -750,7 +750,7 @@ mode.stone={
|
|||
hasFellowSkill:function(skill,exclude){
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
if(exclude&&game.players[i]==this) continue;
|
||||
if(game.players[i].skills.contains(skill)&&
|
||||
if(game.players[i].hasSkill(skill)&&
|
||||
game.players[i].side==this.side){
|
||||
return true;
|
||||
}
|
||||
|
@ -761,7 +761,7 @@ mode.stone={
|
|||
var num=0;
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
if(exclude&&game.players[i]==this) continue;
|
||||
if(game.players[i].skills.contains(skill)&&
|
||||
if(game.players[i].hasSkill(skill)&&
|
||||
game.players[i].side==this.side){
|
||||
num++;
|
||||
}
|
||||
|
@ -919,7 +919,7 @@ mode.stone={
|
|||
game.additionaldead.push(this);
|
||||
setTimeout(function(){
|
||||
var player=ui.create.player();
|
||||
player.playerid=get.id();
|
||||
player.getId();
|
||||
player.classList.add('noidentity');
|
||||
player.dataset.position=dead.dataset.position;
|
||||
player.side=dead.side;
|
||||
|
@ -979,7 +979,7 @@ mode.stone={
|
|||
game.additionaldead.push(this);
|
||||
setTimeout(function(){
|
||||
var player=ui.create.player();
|
||||
player.playerid=get.id();
|
||||
player.getId();
|
||||
player.classList.add('noidentity');
|
||||
player.dataset.position=dead.dataset.position;
|
||||
player.side=dead.side;
|
||||
|
@ -1867,7 +1867,7 @@ mode.stone={
|
|||
enable:true,
|
||||
fullimage:true,
|
||||
filterTarget:function(card,player,target){
|
||||
return target.isMin()&&!target.skills.contains('warlock_fushishu');
|
||||
return target.isMin()&&!target.hasSkill('warlock_fushishu');
|
||||
},
|
||||
content:function(){
|
||||
target.addSkill('warlock_fushishu');
|
||||
|
@ -2151,7 +2151,7 @@ mode.stone={
|
|||
},
|
||||
fullimage:true,
|
||||
filterTarget:function(card,player,target){
|
||||
return target.isMin()&&!target.skills.contains('paladin_zhihuizhufu');
|
||||
return target.isMin()&&!target.hasSkill('paladin_zhihuizhufu');
|
||||
},
|
||||
content:function(){
|
||||
target.addSkill('paladin_zhihuizhufu');
|
||||
|
@ -2250,7 +2250,7 @@ mode.stone={
|
|||
stoneact:2,
|
||||
career:'paladin',
|
||||
enable:function(card,player){
|
||||
return !player.skills.contains('paladin_zhengqianghaosheng');
|
||||
return !player.hasSkill('paladin_zhengqianghaosheng');
|
||||
},
|
||||
fullimage:true,
|
||||
filterTarget:function(card,player,target){
|
||||
|
@ -2650,7 +2650,7 @@ mode.stone={
|
|||
enable:true,
|
||||
fullimage:true,
|
||||
filterTarget:function(card,player,target){
|
||||
return player.side==target.side&&target.isMin()&&!target.skills.contains('druid_conglinzhihun');
|
||||
return player.side==target.side&&target.isMin()&&!target.hasSkill('druid_conglinzhihun');
|
||||
},
|
||||
selectTarget:-1,
|
||||
content:function(){
|
||||
|
@ -2665,7 +2665,7 @@ mode.stone={
|
|||
var num=0;
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
if(game.players[i].isMin()&&game.players[i].side==player.side&&
|
||||
!game.players[i].skills.contains('druid_conglinzhihun')){
|
||||
!game.players[i].hasSkill('druid_conglinzhihun')){
|
||||
num++;
|
||||
if(num>=2) return 1;
|
||||
}
|
||||
|
@ -2729,7 +2729,7 @@ mode.stone={
|
|||
selectTarget:-1,
|
||||
content:function(){
|
||||
'step 0'
|
||||
if(player.skills.contains('druid_ziyang')){
|
||||
if(player.hasSkill('druid_ziyang')){
|
||||
player.drawDeck(3);
|
||||
event.finish();
|
||||
}
|
||||
|
@ -3277,7 +3277,7 @@ mode.stone={
|
|||
enable:true,
|
||||
fullimage:true,
|
||||
filterTarget:function(card,player,target){
|
||||
return target.isMin()&&!target.skills.contains('shaman_fengnu');
|
||||
return target.isMin()&&!target.hasSkill('shaman_fengnu');
|
||||
},
|
||||
content:function(){
|
||||
target.addSkill('shaman_fengnu');
|
||||
|
@ -3288,7 +3288,7 @@ mode.stone={
|
|||
useful:4,
|
||||
result:{
|
||||
target:function(player,target){
|
||||
if(target.skills.contains('shaman_tuteng')) return 0;
|
||||
if(target.hasSkill('shaman_tuteng')) return 0;
|
||||
if(target.hp>1) return target.hp;
|
||||
return 0;
|
||||
}
|
||||
|
@ -3302,7 +3302,7 @@ mode.stone={
|
|||
enable:true,
|
||||
fullimage:true,
|
||||
filterTarget:function(card,player,target){
|
||||
return target.isMin()&&!target.skills.contains('shaman_shihuawuqi');
|
||||
return target.isMin()&&!target.hasSkill('shaman_shihuawuqi');
|
||||
},
|
||||
content:function(){
|
||||
target.addSkill('shaman_shihuawuqi');
|
||||
|
@ -3315,7 +3315,7 @@ mode.stone={
|
|||
target:function(player,target){
|
||||
if(target.isTurnedOver()) return 0;
|
||||
var num=0;
|
||||
if(target.skills.contains('shaman_fengnu')){
|
||||
if(target.hasSkill('shaman_fengnu')){
|
||||
num=3;
|
||||
}
|
||||
if(target.isMin()) return target.hp+num;
|
||||
|
@ -3381,7 +3381,7 @@ mode.stone={
|
|||
enable:true,
|
||||
fullimage:true,
|
||||
filterTarget:function(card,player,target){
|
||||
return target.isMin()&&!target.skills.contains('shaman_xianzuzhihun');
|
||||
return target.isMin()&&!target.hasSkill('shaman_xianzuzhihun');
|
||||
},
|
||||
content:function(){
|
||||
target.addSkill('shaman_xianzuzhihun');
|
||||
|
@ -4029,7 +4029,7 @@ mode.stone={
|
|||
useful:5,
|
||||
result:{
|
||||
target:function(player,target){
|
||||
if(target.skills.contains('warlock_yongsheng')) return 2;
|
||||
if(target.hasSkill('warlock_yongsheng')) return 2;
|
||||
if(target.hp==1&&target.num('h')<=2) return 1;
|
||||
return 0;
|
||||
}
|
||||
|
@ -4209,7 +4209,7 @@ mode.stone={
|
|||
fullimage:true,
|
||||
chongzhu:true,
|
||||
enable:function(event,player){
|
||||
return !player.skills.contains('druid_yexingchengzhang')&&!player.isMin();
|
||||
return !player.hasSkill('druid_yexingchengzhang')&&!player.isMin();
|
||||
},
|
||||
stoneact:2,
|
||||
career:'druid',
|
||||
|
@ -4263,7 +4263,7 @@ mode.stone={
|
|||
type:'stonecard',
|
||||
fullimage:true,
|
||||
enable:function(event,player){
|
||||
return !player.skills.contains('spell_yemanpaoxiao');
|
||||
return !player.hasSkill('spell_yemanpaoxiao');
|
||||
},
|
||||
stoneact:2,
|
||||
career:'druid',
|
||||
|
@ -4456,7 +4456,7 @@ mode.stone={
|
|||
type:'stonecard',
|
||||
fullimage:true,
|
||||
enable:function(event,player){
|
||||
return !player.skills.contains('spell_sijidaifa');
|
||||
return !player.hasSkill('spell_sijidaifa');
|
||||
},
|
||||
stoneact:0,
|
||||
career:'rogue',
|
||||
|
@ -5289,7 +5289,7 @@ mode.stone={
|
|||
stoneact:1,
|
||||
filterTarget:function(card,player,target){
|
||||
return target.isMin()&&target.side==player.side&&
|
||||
(!target.skills.contains('chaofeng')||target.hp<target.maxHp);
|
||||
(!target.hasSkill('chaofeng')||target.hp<target.maxHp);
|
||||
},
|
||||
content:function(){
|
||||
if(target.hp<target.maxHp){
|
||||
|
@ -5714,7 +5714,7 @@ mode.stone={
|
|||
forced:true,
|
||||
popup:false,
|
||||
filter:function(event,player){
|
||||
return event.player.skills.contains('stone_fuchou');
|
||||
return event.player.hasSkill('stone_fuchou');
|
||||
},
|
||||
content:function(){
|
||||
game.delay();
|
||||
|
@ -5772,7 +5772,7 @@ mode.stone={
|
|||
forced:true,
|
||||
popup:false,
|
||||
filter:function(event,player){
|
||||
return event.player.skills.contains('warlock_zhaohuan');
|
||||
return event.player.hasSkill('warlock_zhaohuan');
|
||||
},
|
||||
content:function(){
|
||||
game.delay();
|
||||
|
@ -5903,7 +5903,7 @@ mode.stone={
|
|||
filter:function(event,player){
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
if(game.players[i]!=player&&game.players[i].isMin()&&
|
||||
!game.players[i].skills.contains('chaofeng')) return true;
|
||||
!game.players[i].hasSkill('chaofeng')) return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
|
@ -5911,7 +5911,7 @@ mode.stone={
|
|||
"step 0"
|
||||
event.chooser=player.getLeader();
|
||||
event.chooser.chooseTarget('陪练:令一名随从获得嘲讽',function(card,playerx,target){
|
||||
return player!=target&&target.isMin()&&!target.skills.contains('chaofeng');
|
||||
return player!=target&&target.isMin()&&!target.hasSkill('chaofeng');
|
||||
}).ai=function(target){
|
||||
return ai.get.attitude(event.chooser,target)*target.hp;
|
||||
};
|
||||
|
@ -6331,7 +6331,7 @@ mode.stone={
|
|||
forced:true,
|
||||
unique:true,
|
||||
filter:function(event,player){
|
||||
return event.player.side!=player.side&&!player.skills.contains('stone_qianxing');
|
||||
return event.player.side!=player.side&&!player.hasSkill('stone_qianxing');
|
||||
},
|
||||
content:function(){
|
||||
player.addSkill('stone_qianxing');
|
||||
|
@ -6649,7 +6649,7 @@ mode.stone={
|
|||
forced:true,
|
||||
popup:false,
|
||||
filter:function(event,player){
|
||||
return event.player.skills.contains('druid_qicheng');
|
||||
return event.player.hasSkill('druid_qicheng');
|
||||
},
|
||||
content:function(){
|
||||
game.delay();
|
||||
|
@ -6759,7 +6759,7 @@ mode.stone={
|
|||
filter:function(event,player){
|
||||
var fellows=player.getLeader().getFellow();
|
||||
for(var i=0;i<fellows.length;i++){
|
||||
if(fellows[i].skills.contains('shaman_tuteng')) return true;
|
||||
if(fellows[i].hasSkill('shaman_tuteng')) return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
|
@ -6767,7 +6767,7 @@ mode.stone={
|
|||
var num=0;
|
||||
var fellows=player.getLeader().getFellow();
|
||||
for(var i=0;i<fellows.length;i++){
|
||||
if(fellows[i].skills.contains('shaman_tuteng')) num++;
|
||||
if(fellows[i].hasSkill('shaman_tuteng')) num++;
|
||||
}
|
||||
player.maxHp+=num;
|
||||
player.hp+=num;
|
||||
|
@ -6878,7 +6878,7 @@ mode.stone={
|
|||
forced:true,
|
||||
popup:false,
|
||||
filter:function(event,player){
|
||||
return event.player.skills.contains('hunter_tanxianmao');
|
||||
return event.player.hasSkill('hunter_tanxianmao');
|
||||
},
|
||||
content:function(){
|
||||
player.gain(game.createCard('spell_tanxianmao'),'gain2');
|
||||
|
@ -6934,7 +6934,7 @@ mode.stone={
|
|||
forced:true,
|
||||
popup:false,
|
||||
filter:function(event,player){
|
||||
return event.player.skills.contains('druid_conglinzhihun');
|
||||
return event.player.hasSkill('druid_conglinzhihun');
|
||||
},
|
||||
content:function(){
|
||||
game.delay();
|
||||
|
@ -6978,7 +6978,7 @@ mode.stone={
|
|||
popup:false,
|
||||
filter:function(event,player){
|
||||
if(!player.storage.shaman_xianzuzhihun) return false;
|
||||
return event.player.skills.contains('shaman_xianzuzhihun');
|
||||
return event.player.hasSkill('shaman_xianzuzhihun');
|
||||
},
|
||||
content:function(){
|
||||
game.delay();
|
||||
|
@ -7083,7 +7083,7 @@ mode.stone={
|
|||
forced:true,
|
||||
popup:false,
|
||||
filter:function(event,player){
|
||||
return event.player.skills.contains('hunter_jiewang');
|
||||
return event.player.hasSkill('hunter_jiewang');
|
||||
},
|
||||
content:function(){
|
||||
player.gain(game.createCard(lib.beastList.randomGet()+'_stonecharacter'),'draw');
|
||||
|
@ -7116,7 +7116,7 @@ mode.stone={
|
|||
trigger:{source:'damageBegin'},
|
||||
forced:true,
|
||||
filter:function(event,player){
|
||||
return player.getLeader().skills.contains('spell_yemanpaoxiao')&&event.notLink();
|
||||
return player.getLeader().hasSkill('spell_yemanpaoxiao')&&event.notLink();
|
||||
},
|
||||
content:function(){
|
||||
trigger.num++;
|
||||
|
@ -7378,7 +7378,7 @@ mode.stone={
|
|||
forced:true,
|
||||
popup:false,
|
||||
filter:function(event,player){
|
||||
return event.player.skills.contains('rogue_xunbao');
|
||||
return event.player.hasSkill('rogue_xunbao');
|
||||
},
|
||||
content:function(){
|
||||
player.gain(game.createCard('spell_sijidaifa'),'gain2');
|
||||
|
@ -7545,7 +7545,7 @@ mode.stone={
|
|||
forced:true,
|
||||
popup:false,
|
||||
filter:function(event,player){
|
||||
return event.player.skills.contains('warlock_yongsheng');
|
||||
return event.player.hasSkill('warlock_yongsheng');
|
||||
},
|
||||
content:function(){
|
||||
game.delay();
|
||||
|
@ -7869,7 +7869,7 @@ mode.stone={
|
|||
popup:false,
|
||||
unique:true,
|
||||
filter:function(event,player){
|
||||
return player.skills.contains('hunter_nuhou2');
|
||||
return player.hasSkill('hunter_nuhou2');
|
||||
},
|
||||
content:function(){
|
||||
player.damage('nosource');
|
||||
|
@ -8003,7 +8003,7 @@ mode.stone={
|
|||
forced:true,
|
||||
popup:false,
|
||||
filter:function(event,player){
|
||||
return event.player.skills.contains('druid_chengzhang');
|
||||
return event.player.hasSkill('druid_chengzhang');
|
||||
},
|
||||
content:function(){
|
||||
if(player.num('h')){
|
||||
|
@ -8071,7 +8071,7 @@ mode.stone={
|
|||
filter:function(event,player){
|
||||
if(event.player.career&&player.side==event.player.side){
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
if(!game.players[i].career&&game.players[i].skills.contains('shaman_tuteng')&&
|
||||
if(!game.players[i].career&&game.players[i].hasSkill('shaman_tuteng')&&
|
||||
game.players[i].side==player.side){
|
||||
return true;
|
||||
}
|
||||
|
@ -8082,7 +8082,7 @@ mode.stone={
|
|||
content:function(){
|
||||
var list=[];
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
if(!game.players[i].career&&game.players[i].skills.contains('shaman_tuteng')&&
|
||||
if(!game.players[i].career&&game.players[i].hasSkill('shaman_tuteng')&&
|
||||
game.players[i].side==player.side){
|
||||
list.push(game.players[i]);
|
||||
}
|
||||
|
@ -8212,7 +8212,7 @@ mode.stone={
|
|||
_warlock_skill:{
|
||||
enable:'phaseUse',
|
||||
filter:function(event,player){
|
||||
if(player.skills.contains('stone_lianyu')) return false;
|
||||
if(player.hasSkill('stone_lianyu')) return false;
|
||||
if(player.career!='warlock') return false;
|
||||
if(player.getActCount()+2>player.actcount) return false;
|
||||
return true;
|
||||
|
@ -8234,7 +8234,7 @@ mode.stone={
|
|||
_warlock_skillx:{
|
||||
enable:'phaseUse',
|
||||
filter:function(event,player){
|
||||
if(!player.skills.contains('stone_lianyu')) return false;
|
||||
if(!player.hasSkill('stone_lianyu')) return false;
|
||||
if(player.career!='warlock') return false;
|
||||
if(player.getActCount()+2>player.actcount) return false;
|
||||
if(!player.canAddFellow()) return false;
|
||||
|
@ -8557,10 +8557,10 @@ mode.stone={
|
|||
_chaofeng:{
|
||||
mod:{
|
||||
targetEnabled:function(card,player,target){
|
||||
if(target.skills.contains('chaofeng')) return;
|
||||
if(target.hasSkill('chaofeng')) return;
|
||||
if(card.name=='sha'){
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
if(game.players[i].side==target.side&&game.players[i].skills.contains('chaofeng')){
|
||||
if(game.players[i].side==target.side&&game.players[i].hasSkill('chaofeng')){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -8612,7 +8612,7 @@ mode.stone={
|
|||
popup:false,
|
||||
unique:true,
|
||||
filter:function(event,player){
|
||||
return player.skills.contains('stone_juxingchanchu2');
|
||||
return player.hasSkill('stone_juxingchanchu2');
|
||||
},
|
||||
content:function(){
|
||||
player.loseHp();
|
||||
|
@ -8646,7 +8646,7 @@ mode.stone={
|
|||
popup:false,
|
||||
unique:true,
|
||||
filter:function(event,player){
|
||||
return player.skills.contains('stone_shishigui2');
|
||||
return player.hasSkill('stone_shishigui2');
|
||||
},
|
||||
content:function(){
|
||||
player.loseHp();
|
||||
|
@ -8960,7 +8960,7 @@ mode.stone={
|
|||
popup:false,
|
||||
unique:true,
|
||||
filter:function(event,player){
|
||||
return player.skills.contains('stone_mafengzhuru2');
|
||||
return player.hasSkill('stone_mafengzhuru2');
|
||||
},
|
||||
content:function(){
|
||||
player.loseHp();
|
||||
|
@ -10140,7 +10140,7 @@ mode.stone={
|
|||
attitude:function(from,to){
|
||||
if(!from||!to) return 0;
|
||||
var num;
|
||||
if(to.isMin()&&!to.skills.contains('chaofeng')){
|
||||
if(to.isMin()&&!to.hasSkill('chaofeng')){
|
||||
num=5;
|
||||
}
|
||||
else{
|
||||
|
|
|
@ -106,13 +106,13 @@ mode.versus={
|
|||
}
|
||||
game.players[i].setIdentity(game.players[i].identity);
|
||||
game.players[i].node.identity.dataset.color=get.translation(game.players[i].side+'Color');
|
||||
game.players[i].playerid=get.id();
|
||||
game.players[i].getId();
|
||||
}
|
||||
game.chooseCharacterFour();
|
||||
}
|
||||
else if(_status.mode=='two'){
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
game.players[i].playerid=get.id();
|
||||
game.players[i].getId();
|
||||
}
|
||||
game.chooseCharacterTwo();
|
||||
}
|
||||
|
@ -143,7 +143,7 @@ mode.versus={
|
|||
else{
|
||||
game.players[j].type='human';
|
||||
}
|
||||
game.players[i].playerid=get.id();
|
||||
game.players[i].getId();
|
||||
}
|
||||
game.chooseCharacterJiange();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue