This commit is contained in:
parent
5fc3cbf14e
commit
d7874bc77b
|
@ -230,7 +230,7 @@ card.yunchou={
|
|||
if(target==player&&target.num('h')<=1) return 0;
|
||||
return 0.5;
|
||||
}
|
||||
if(target.skills.contains('toulianghuanzhu2')) return 0;
|
||||
if(target.hasSkill('toulianghuanzhu2')) return 0;
|
||||
return -0.5;
|
||||
}
|
||||
},
|
||||
|
@ -648,7 +648,7 @@ card.yunchou={
|
|||
return 0;
|
||||
},
|
||||
target:function(player,target){
|
||||
if(target.skills.contains('dujian2')||target.num('h')==0) return 0;
|
||||
if(target.hasSkill('dujian2')||target.num('h')==0) return 0;
|
||||
if(player.num('h')<=1) return 0;
|
||||
return -1.5;
|
||||
}
|
||||
|
|
|
@ -155,7 +155,7 @@ character.boss={
|
|||
targets[1].$gain2(cards);
|
||||
targets[0].damage(targets[1]);
|
||||
}
|
||||
if(!player.skills.contains('yinmo')){
|
||||
if(!player.hasSkill('yinmo')){
|
||||
event.finish();
|
||||
}
|
||||
"step 2"
|
||||
|
@ -208,7 +208,7 @@ character.boss={
|
|||
usable:1,
|
||||
filterCard:{color:'black'},
|
||||
filterTarget:function(card,player,target){
|
||||
return !target.skills.contains('mazui2');
|
||||
return !target.hasSkill('mazui2');
|
||||
},
|
||||
check:function(card){
|
||||
return 6-ai.get.value(card);
|
||||
|
@ -709,7 +709,7 @@ character.boss={
|
|||
globalTo:function(from,to,distance){
|
||||
if(to.isFriendOf(from)) return;
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
if(game.players[i].skills.contains('boss_zhenwei')&&
|
||||
if(game.players[i].hasSkill('boss_zhenwei')&&
|
||||
game.players[i].isFriendOf(to)&&game.players[i]!=to){
|
||||
return distance+1;
|
||||
}
|
||||
|
@ -775,7 +775,7 @@ character.boss={
|
|||
}
|
||||
if(_status.mode=='jiange'){
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
if(game.players[i].isFriendOf(player)&&game.players[i].skills.contains('huodi')){
|
||||
if(game.players[i].isFriendOf(player)&&game.players[i].hasSkill('huodi')){
|
||||
return num>0;
|
||||
}
|
||||
}
|
||||
|
@ -992,11 +992,11 @@ character.boss={
|
|||
popup:false,
|
||||
content:function(){
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
if(game.players[i].skills.contains('boss_biantian3')){
|
||||
if(game.players[i].hasSkill('boss_biantian3')){
|
||||
game.players[i].removeSkill('boss_biantian3');
|
||||
game.players[i].popup('boss_biantian3');
|
||||
}
|
||||
if(game.players[i].skills.contains('boss_biantian2')){
|
||||
if(game.players[i].hasSkill('boss_biantian2')){
|
||||
game.players[i].removeSkill('boss_biantian2');
|
||||
game.players[i].popup('boss_biantian2');
|
||||
}
|
||||
|
@ -1012,11 +1012,11 @@ character.boss={
|
|||
content:function(){
|
||||
"step 0"
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
if(game.players[i].skills.contains('boss_biantian3')){
|
||||
if(game.players[i].hasSkill('boss_biantian3')){
|
||||
game.players[i].removeSkill('boss_biantian3');
|
||||
game.players[i].popup('boss_biantian3');
|
||||
}
|
||||
if(game.players[i].skills.contains('boss_biantian2')){
|
||||
if(game.players[i].hasSkill('boss_biantian2')){
|
||||
game.players[i].removeSkill('boss_biantian2');
|
||||
game.players[i].popup('boss_biantian2');
|
||||
}
|
||||
|
@ -1382,7 +1382,7 @@ character.boss={
|
|||
globalFrom:function(from,to,distance){
|
||||
if(to.isEnemyOf(from)) return;
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
if(game.players[i].skills.contains('boss_jingfan')&&
|
||||
if(game.players[i].hasSkill('boss_jingfan')&&
|
||||
game.players[i].isFriendOf(from)&&game.players[i]!=from){
|
||||
return distance-1;
|
||||
}
|
||||
|
@ -1401,7 +1401,7 @@ character.boss={
|
|||
globalFixed:true,
|
||||
filter:function(event){
|
||||
if(lib.config.mode!='boss') return false;
|
||||
return event.player==game.boss&&event.player.skills.contains('boss_bianshen2');
|
||||
return event.player==game.boss&&event.player.hasSkill('boss_bianshen2');
|
||||
},
|
||||
content:function(){
|
||||
'step 0'
|
||||
|
@ -1421,7 +1421,7 @@ character.boss={
|
|||
globalFixed:true,
|
||||
filter:function(event){
|
||||
if(lib.config.mode!='boss') return false;
|
||||
return event.player==game.boss&&event.player.skills.contains('boss_bianshen3');
|
||||
return event.player==game.boss&&event.player.hasSkill('boss_bianshen3');
|
||||
},
|
||||
content:function(){
|
||||
'step 0'
|
||||
|
@ -1441,7 +1441,7 @@ character.boss={
|
|||
globalFixed:true,
|
||||
filter:function(event){
|
||||
if(lib.config.mode!='boss') return false;
|
||||
return event.player==game.boss&&event.player.skills.contains('boss_bianshen4');
|
||||
return event.player==game.boss&&event.player.hasSkill('boss_bianshen4');
|
||||
},
|
||||
content:function(){
|
||||
'step 0'
|
||||
|
@ -1704,7 +1704,7 @@ character.boss={
|
|||
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;
|
||||
}
|
||||
|
@ -1756,7 +1756,7 @@ character.boss={
|
|||
forced:true,
|
||||
globalFixed:true,
|
||||
filter:function(event,player){
|
||||
return event.player.skills.contains('boss_minbao')&&event.player.isDead();
|
||||
return event.player.hasSkill('boss_minbao')&&event.player.isDead();
|
||||
},
|
||||
content:function(){
|
||||
trigger.player.line(player,'fire');
|
||||
|
@ -1832,7 +1832,7 @@ character.boss={
|
|||
forced:true,
|
||||
globalFixed:true,
|
||||
filter:function(event,player){
|
||||
return player.num('e')>0&&event.player.skills.contains('boss_shanbeng')&&event.player.isDead();
|
||||
return player.num('e')>0&&event.player.hasSkill('boss_shanbeng')&&event.player.isDead();
|
||||
},
|
||||
content:function(){
|
||||
player.discard(player.get('e'));
|
||||
|
@ -1975,11 +1975,11 @@ character.boss={
|
|||
}
|
||||
var be=target.num('e',{color:'black'});
|
||||
if(target.num('h','shan')&&be){
|
||||
if(!target.skills.contains('guidao')) return 0;
|
||||
if(!target.hasSkill('guidao')) return 0;
|
||||
return [0,hastarget?target.num('he')/2:0];
|
||||
}
|
||||
if(target.num('h','shan')&&target.num('h')>2){
|
||||
if(!target.skills.contains('guidao')) return 0;
|
||||
if(!target.hasSkill('guidao')) return 0;
|
||||
return [0,hastarget?target.num('h')/4:0];
|
||||
}
|
||||
if(target.num('h')>3||(be&&target.num('h')>=2)){
|
||||
|
@ -1991,7 +1991,7 @@ character.boss={
|
|||
if(target.num('h')==1&&!be){
|
||||
return [1.2,0];
|
||||
}
|
||||
if(!target.skills.contains('guidao')) return [1,0.05];
|
||||
if(!target.hasSkill('guidao')) return [1,0.05];
|
||||
return [1,Math.min(0.5,(target.num('h')+be)/4)];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -100,7 +100,7 @@ character.extra={
|
|||
trigger:{source:'dieAfter'},
|
||||
forced:true,
|
||||
filter:function(event,player){
|
||||
return !player.skills.contains('lianpo2');
|
||||
return !player.hasSkill('lianpo2');
|
||||
},
|
||||
content:function(){
|
||||
player.addSkill('lianpo2');
|
||||
|
@ -193,7 +193,7 @@ character.extra={
|
|||
audio:2,
|
||||
enable:'phaseUse',
|
||||
filter:function(event,player){
|
||||
return player.storage.baonu>=2&&!player.skills.contains('wushuang');
|
||||
return player.storage.baonu>=2&&!player.hasSkill('wushuang');
|
||||
},
|
||||
content:function(){
|
||||
player.storage.baonu-=2;
|
||||
|
@ -244,10 +244,10 @@ character.extra={
|
|||
maixie:true,
|
||||
effect:{
|
||||
target:function(card,player,target){
|
||||
if(player.skills.contains('jueqing')) return [1,-2];
|
||||
if(player.hasSkill('jueqing')) return [1,-2];
|
||||
if(get.tag(card,'damage')){
|
||||
if(target.hp==target.maxHp){
|
||||
if(!target.skills.contains('jilue')){
|
||||
if(!target.hasSkill('jilue')){
|
||||
return [0,1];
|
||||
}
|
||||
return [0.7,1];
|
||||
|
@ -259,7 +259,7 @@ character.extra={
|
|||
if(_status.currentPhase!=player) return;
|
||||
if(get.type(card)=='basic'||get.type(card,'trick')=='trick') return;
|
||||
if(player.hp<=2) return;
|
||||
if(!player.skills.contains('jilue')||player.storage.renjie==0){
|
||||
if(!player.hasSkill('jilue')||player.storage.renjie==0){
|
||||
return [0,0,0,0];
|
||||
}
|
||||
}
|
||||
|
@ -497,7 +497,7 @@ character.extra={
|
|||
effect:{
|
||||
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];
|
||||
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){
|
||||
|
@ -569,7 +569,7 @@ character.extra={
|
|||
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.hp==1) return;
|
||||
if(target.isTurnedOver()) return [0,3];
|
||||
var num=0;
|
||||
|
@ -696,7 +696,7 @@ character.extra={
|
|||
player.chooseTarget('选择角色获得大雾标记',
|
||||
[1,Math.min(game.players.length,player.storage.qixing.length)]).ai=function(target){
|
||||
if(target.isMin()) return 0;
|
||||
if(target.skills.contains('biantian2')) return 0;
|
||||
if(target.hasSkill('biantian2')) return 0;
|
||||
var att=ai.get.attitude(player,target);
|
||||
if(att>=4){
|
||||
if(target.hp==1&&target.maxHp>2) return att;
|
||||
|
@ -763,11 +763,11 @@ character.extra={
|
|||
silent:true,
|
||||
content:function(){
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
if(game.players[i].skills.contains('dawu2')){
|
||||
if(game.players[i].hasSkill('dawu2')){
|
||||
game.players[i].removeSkill('dawu2');
|
||||
game.players[i].popup('dawu2');
|
||||
}
|
||||
if(game.players[i].skills.contains('kuangfeng2')){
|
||||
if(game.players[i].hasSkill('kuangfeng2')){
|
||||
game.players[i].removeSkill('kuangfeng2');
|
||||
game.players[i].popup('kuangfeng2');
|
||||
}
|
||||
|
|
|
@ -192,7 +192,7 @@ character.hearth={
|
|||
'step 1'
|
||||
var skill1=result.buttons[0].name;
|
||||
var skill2=result.buttons[1].name;
|
||||
if(target.skills.contains(skill1)){
|
||||
if(target.hasSkill(skill1)){
|
||||
target.removeSkill(skill1);
|
||||
target.addSkill(skill2);
|
||||
target.storage.peiyu[skill2]=player;
|
||||
|
@ -936,7 +936,7 @@ character.hearth={
|
|||
filter:function(event,player){
|
||||
return event.targets&&event.targets.length==1&&
|
||||
event.target!=event.player&&_status.currentPhase==event.player&&
|
||||
!event.player.skills.contains('yiwen2');
|
||||
!event.player.hasSkill('yiwen2');
|
||||
},
|
||||
forced:true,
|
||||
content:function(){
|
||||
|
@ -1107,7 +1107,7 @@ character.hearth={
|
|||
trigger:{player:'phaseBegin'},
|
||||
frequent:true,
|
||||
filter:function(event,player){
|
||||
return !player.skills.contains('xunbao2');
|
||||
return !player.hasSkill('xunbao2');
|
||||
},
|
||||
priority:1,
|
||||
// filterCard:true,
|
||||
|
@ -1588,7 +1588,7 @@ character.hearth={
|
|||
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;
|
||||
var nh=target.num('h');
|
||||
if(nh>5) return [1,-1];
|
||||
|
@ -2382,7 +2382,7 @@ character.hearth={
|
|||
forced:true,
|
||||
globalFixed:true,
|
||||
filter:function(event,player){
|
||||
return event.player.skills.contains('bingshi')&&event.player.isDead();
|
||||
return event.player.hasSkill('bingshi')&&event.player.isDead();
|
||||
},
|
||||
content:function(){
|
||||
trigger.player.line(player,'thunder');
|
||||
|
@ -2624,7 +2624,7 @@ character.hearth={
|
|||
shengyan:{
|
||||
trigger:{global:'recoverEnd'},
|
||||
filter:function(event,player){
|
||||
return !player.skills.contains('shengyan2')&&event.player.hp<event.player.maxHp;
|
||||
return !player.hasSkill('shengyan2')&&event.player.hp<event.player.maxHp;
|
||||
},
|
||||
prompt:function(event,player){
|
||||
return '是否对'+get.translation(event.player)+'发动【圣言】?';
|
||||
|
@ -2699,7 +2699,7 @@ character.hearth={
|
|||
effect:{
|
||||
target:function(card,player){
|
||||
if(get.tag(card,'damage')){
|
||||
if(player.skills.contains('jueqing')) return [1,-1];
|
||||
if(player.hasSkill('jueqing')) return [1,-1];
|
||||
return 0.8;
|
||||
}
|
||||
}
|
||||
|
@ -2954,7 +2954,7 @@ character.hearth={
|
|||
bianxing:{
|
||||
trigger:{global:'useCard'},
|
||||
filter:function(event,player){
|
||||
if(player.skills.contains('bianxing2')) return false;
|
||||
if(player.hasSkill('bianxing2')) return false;
|
||||
if(event.player==player) return false;
|
||||
if(_status.currentPhase!=event.player) return false;
|
||||
if(!event.targets) return false;
|
||||
|
@ -3023,7 +3023,7 @@ character.hearth={
|
|||
bingjia:{
|
||||
enable:'phaseUse',
|
||||
filter:function(event,player){
|
||||
return !player.skills.contains('bingjia2');
|
||||
return !player.hasSkill('bingjia2');
|
||||
},
|
||||
filterCard:true,
|
||||
check:function(card){
|
||||
|
@ -3135,7 +3135,7 @@ character.hearth={
|
|||
return player.num('h',{color:'black'})>0;
|
||||
},
|
||||
filterTarget:function(card,player,target){
|
||||
return player!=target&&!target.skills.contains('mdzhoufu2');
|
||||
return player!=target&&!target.hasSkill('mdzhoufu2');
|
||||
},
|
||||
prepare:function(cards,player){
|
||||
player.$throw(cards);
|
||||
|
@ -3339,7 +3339,7 @@ character.hearth={
|
|||
filter:function(event,player){
|
||||
if(event.player==player) return false;
|
||||
if(_status.currentPhase!=event.player) return false;
|
||||
if(event.player.skills.contains('mengun2')) return false;
|
||||
if(event.player.hasSkill('mengun2')) return false;
|
||||
if(get.itemtype(event.card)!='card') return false;
|
||||
if(!player.num('h',{suit:get.suit(event.card)})) return false;
|
||||
return get.type(event.card)=='basic';
|
||||
|
@ -3448,7 +3448,7 @@ character.hearth={
|
|||
trigger:{player:'discardAfter'},
|
||||
direct:true,
|
||||
filter:function(event,player){
|
||||
if(player.skills.contains('tzhenji2')){
|
||||
if(player.hasSkill('tzhenji2')){
|
||||
return false;
|
||||
}
|
||||
if(event.cards){
|
||||
|
@ -3581,7 +3581,7 @@ character.hearth={
|
|||
ai:{
|
||||
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;
|
||||
}
|
||||
},
|
||||
|
@ -3727,7 +3727,7 @@ character.hearth={
|
|||
else if(result.buttons.length==2){
|
||||
var skill1=result.buttons[0].name;
|
||||
var skill2=result.buttons[1].name;
|
||||
if(player.skills.contains(skill1)){
|
||||
if(player.hasSkill(skill1)){
|
||||
player.removeSkill(skill1);
|
||||
player.addSkill(skill2);
|
||||
}
|
||||
|
@ -3744,7 +3744,7 @@ character.hearth={
|
|||
},
|
||||
effect:function(card,player){
|
||||
if(get.tag(card,'damage')){
|
||||
if(player.skills.contains('jueqing')) return;
|
||||
if(player.hasSkill('jueqing')) return;
|
||||
return 1.2;
|
||||
}
|
||||
},
|
||||
|
@ -4341,7 +4341,7 @@ character.hearth={
|
|||
value:10,
|
||||
result:{
|
||||
target:function(player,target){
|
||||
if(target.skills.contains('hsmengjing_mengye')) return 0.5;
|
||||
if(target.hasSkill('hsmengjing_mengye')) return 0.5;
|
||||
return -target.num('he');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -143,7 +143,7 @@ character.shenhua={
|
|||
if(_status.event.name=='xiangle') return;
|
||||
var bs=player.get('h',{type:'basic'});
|
||||
if(bs.length<2) return 0;
|
||||
if(player.skills.contains('jiu')||player.skills.contains('tianxianjiu')) return;
|
||||
if(player.hasSkill('jiu')||player.hasSkill('tianxianjiu')) return;
|
||||
if(bs.length<=3&&player.num('h','sha')<=1){
|
||||
for(var i=0;i<bs.length;i++){
|
||||
if(bs[i].name!='sha'&&ai.get.value(bs[i])<7){
|
||||
|
@ -232,7 +232,7 @@ character.shenhua={
|
|||
player.maxHp++;
|
||||
player.update();
|
||||
player.recover();
|
||||
if(player.skills.contains('ruoyu')){
|
||||
if(player.hasSkill('ruoyu')){
|
||||
player.addSkill('jijiang');
|
||||
}
|
||||
else{
|
||||
|
@ -1455,7 +1455,7 @@ character.shenhua={
|
|||
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.hp<=1) return;
|
||||
var hastarget=false;
|
||||
var hasfriend=false;
|
||||
|
@ -2072,7 +2072,7 @@ character.shenhua={
|
|||
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];
|
||||
}
|
||||
}
|
||||
|
@ -2243,7 +2243,7 @@ character.shenhua={
|
|||
return 0;
|
||||
},
|
||||
player:function(player,target){
|
||||
if(target.skills.contains('jueqing')) return -10;
|
||||
if(target.hasSkill('jueqing')) return -10;
|
||||
var mn=1;
|
||||
var hs=player.get('h');
|
||||
for(var i=0;i<hs.length;i++){
|
||||
|
@ -2299,7 +2299,7 @@ character.shenhua={
|
|||
effect:{
|
||||
target:function(card,player,target,current){
|
||||
if(get.tag(card,'damage')&&target.hp>1){
|
||||
if(player.skills.contains('jueqing')) return [1,-2];
|
||||
if(player.hasSkill('jueqing')) return [1,-2];
|
||||
var max=0;
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
if(ai.get.attitude(target,game.players[i])>0){
|
||||
|
@ -2601,7 +2601,7 @@ character.shenhua={
|
|||
content:function(){
|
||||
"step 0";
|
||||
player.chooseTarget('是否发动【'+get.skillTranslation('releiji',player)+'】?').ai=function(target){
|
||||
if(target.skills.contains('hongyan')) return 0;
|
||||
if(target.hasSkill('hongyan')) return 0;
|
||||
return ai.get.damageEffect(target,_status.event.player,_status.event.player,'thunder');
|
||||
};
|
||||
"step 1"
|
||||
|
@ -2639,11 +2639,11 @@ character.shenhua={
|
|||
}
|
||||
var be=target.num('e',{color:'black'});
|
||||
if(target.num('h','shan')&&be){
|
||||
if(!target.skills.contains('guidao')) return 0;
|
||||
if(!target.hasSkill('guidao')) return 0;
|
||||
return [0,hastarget?target.num('he')/2:0];
|
||||
}
|
||||
if(target.num('h','shan')&&target.num('h')>2){
|
||||
if(!target.skills.contains('guidao')) return 0;
|
||||
if(!target.hasSkill('guidao')) return 0;
|
||||
return [0,hastarget?target.num('h')/4:0];
|
||||
}
|
||||
if(target.num('h')>3||(be&&target.num('h')>=2)){
|
||||
|
@ -2655,7 +2655,7 @@ character.shenhua={
|
|||
if(target.num('h')==1&&!be){
|
||||
return [1.2,0];
|
||||
}
|
||||
if(!target.skills.contains('guidao')) return [1,0.05];
|
||||
if(!target.hasSkill('guidao')) return [1,0.05];
|
||||
return [1,Math.min(0.5,(target.num('h')+be)/4)];
|
||||
}
|
||||
}
|
||||
|
@ -2850,7 +2850,7 @@ character.shenhua={
|
|||
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;
|
||||
}
|
||||
},
|
||||
|
@ -2951,7 +2951,7 @@ character.shenhua={
|
|||
content:function(){
|
||||
"step 0";
|
||||
player.chooseTarget('是否发动【雷击】?').ai=function(target){
|
||||
if(target.skills.contains('hongyan')) return 0;
|
||||
if(target.hasSkill('hongyan')) return 0;
|
||||
return ai.get.damageEffect(target,_status.event.player,_status.event.player,'thunder');
|
||||
};
|
||||
"step 1"
|
||||
|
|
|
@ -106,7 +106,7 @@ character.standard={
|
|||
maixie:true,
|
||||
effect:{
|
||||
target:function(card,player){
|
||||
if(player.skills.contains('jueqing')) return [1,-1];
|
||||
if(player.hasSkill('jueqing')) return [1,-1];
|
||||
if(get.tag(card,'damage')) return [1,0.5];
|
||||
}
|
||||
}
|
||||
|
@ -133,7 +133,7 @@ character.standard={
|
|||
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];
|
||||
}
|
||||
}
|
||||
|
@ -230,7 +230,7 @@ character.standard={
|
|||
ai:{
|
||||
result:{
|
||||
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')&&ai.get.damageEffect(target,player,player)>0) return [1,0,0,-1.5];
|
||||
}
|
||||
}
|
||||
|
@ -256,7 +256,7 @@ character.standard={
|
|||
},function(target){
|
||||
if(!_status.event.aicheck) return 0;
|
||||
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;
|
||||
}).set('aicheck',check);
|
||||
"step 1"
|
||||
|
@ -377,7 +377,7 @@ character.standard={
|
|||
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];
|
||||
|
@ -620,7 +620,7 @@ character.standard={
|
|||
filter:function(event,player){
|
||||
if(event.filterCard&&!event.filterCard({name:'sha'},player)) return false;
|
||||
if(!player.hasZhuSkill('jijiang')) return false;
|
||||
if(player.skills.contains('jijiang3')) return false;
|
||||
if(player.hasSkill('jijiang3')) return false;
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
if(game.players[i].group=='shu'&&game.players[i]!=player){
|
||||
return lib.filter.cardUsable({name:'sha'},player);
|
||||
|
@ -684,7 +684,7 @@ character.standard={
|
|||
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);
|
||||
}
|
||||
},
|
||||
|
|
213
game/game.js
213
game/game.js
|
@ -3558,7 +3558,7 @@
|
|||
}
|
||||
if(!lib.node.http) lib.node.http=require('http');
|
||||
if(!lib.node.https) lib.node.https=require('https');
|
||||
var request = (url.indexOf('https'==0)?lib.node.https:lib.node.http).get(url, function(response) {
|
||||
var request = (url.indexOf('https')==0?lib.node.https:lib.node.http).get(url, function(response) {
|
||||
var stream=response.pipe(file);
|
||||
stream.on('finish',onsuccess);
|
||||
stream.on('error',onerror);
|
||||
|
@ -9975,6 +9975,14 @@
|
|||
addSkillTrigger:function(skill,hidden){
|
||||
var info=lib.skill[skill];
|
||||
if(!info) return;
|
||||
if(typeof info.group=='string'){
|
||||
this.addSkillTrigger(info.group,hidden);
|
||||
}
|
||||
else if(Array.isArray(info.group)){
|
||||
for(var i=0;i<info.group.length;i++){
|
||||
this.addSkillTrigger(info.group[i],hidden);
|
||||
}
|
||||
}
|
||||
if(info.global&&(!hidden||info.globalSilent)){
|
||||
if(typeof info.global=='string'){
|
||||
game.addGlobalSkill(info.global,this);
|
||||
|
@ -10107,6 +10115,55 @@
|
|||
}
|
||||
return this;
|
||||
},
|
||||
removeSkillTrigger:function(skill){
|
||||
var info=lib.skill[skill];
|
||||
if(!info) return;
|
||||
if(typeof info.group=='string'){
|
||||
this.removeSkillTrigger(info.group);
|
||||
}
|
||||
else if(Array.isArray(info.group)){
|
||||
for(var i=0;i<info.group.length;i++){
|
||||
this.removeSkillTrigger(info.group[i]);
|
||||
}
|
||||
}
|
||||
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];
|
||||
}
|
||||
if(get.emptyobj(lib.hook.globaltrigger[j])){
|
||||
delete lib.hook.globaltrigger[j];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
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]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
removeSkill:function(skill){
|
||||
if(Array.isArray(skill)){
|
||||
for(var i=0;i<skill.length;i++){
|
||||
|
@ -10117,46 +10174,14 @@
|
|||
this.unmarkSkill(skill);
|
||||
this.skills.remove(skill);
|
||||
this.checkConflict();
|
||||
this.initedSkills.remove(skill);
|
||||
delete this.tempSkills[skill];
|
||||
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]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
this.removeSkillTrigger(skill);
|
||||
}
|
||||
}
|
||||
return skill;
|
||||
|
@ -12078,25 +12103,6 @@
|
|||
if(name=='gameStart'){
|
||||
_status.gameStarted=true;
|
||||
}
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
for(var j in game.players[i].tempSkills){
|
||||
var expire=game.players[i].tempSkills[j];
|
||||
if(expire==name||
|
||||
(get.objtype(expire)=='array'&&expire.contains(name))||
|
||||
(typeof expire=='function'&&expire(event,game.players[i],name))){
|
||||
delete game.players[i].tempSkills[j];
|
||||
game.players[i].removeSkill(j);
|
||||
}
|
||||
else if(typeof expire=='object'){
|
||||
if(expire.player==name&&event.player==game.players[i]||
|
||||
expire.target==name&&event.target==game.players[i]||
|
||||
expire.source==name&&event.source==game.players[i]){
|
||||
delete game.players[i].tempSkills[j];
|
||||
game.players[i].removeSkill(j);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
var event=this;
|
||||
var start=event.player||game.me||game.players[0];
|
||||
if(!game.players.contains(start)){
|
||||
|
@ -12104,48 +12110,77 @@
|
|||
}
|
||||
var list=[];
|
||||
var roles=['player','source','target'];
|
||||
for(var i=0;i<roles.length;i++){
|
||||
if(event[roles[i]]){
|
||||
var triggername=event[roles[i]].playerid+'_'+roles[i]+'_'+name;
|
||||
if(lib.hook[triggername]){
|
||||
for(var j=0;j<lib.hook[triggername].length;j++){
|
||||
list.push([lib.hook[triggername][j],event[roles[i]]]);
|
||||
}
|
||||
}
|
||||
triggername=roles[i]+'_'+name;
|
||||
if(lib.hook.globalskill[triggername]){
|
||||
for(var j=0;j<lib.hook.globalskill[triggername].length;j++){
|
||||
list.push([lib.hook.globalskill[triggername][j],event[roles[i]]]);
|
||||
}
|
||||
}
|
||||
var addList=function(skill,player){
|
||||
var info=lib.skill[skill];
|
||||
var num=0;
|
||||
if(info.priority){
|
||||
num=info.priority*100;
|
||||
}
|
||||
}
|
||||
var triggername='global_'+name;
|
||||
if(lib.hook.globalskill[triggername]){
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
for(var j=0;j<lib.hook.globalskill[triggername].length;j++){
|
||||
list.push([lib.hook.globalskill[triggername][j],game.players[i]]);
|
||||
}
|
||||
if(info.forced){
|
||||
num+=50;
|
||||
}
|
||||
}
|
||||
list.push([skill,player,num]);
|
||||
};
|
||||
var totalPopulation=game.players.length+game.dead.length+1;
|
||||
var player=start;
|
||||
var globalskill='global_'+name;
|
||||
var map=_status.connectMode?lib.playerOL:game.playerMap;
|
||||
for(var i in lib.hook.globaltrigger[name]){
|
||||
if(map[i]&&map[i].isAlive()){
|
||||
for(var j=0;j<lib.hook.globaltrigger[name][i].length;j++){
|
||||
list.push([lib.hook.globaltrigger[name][i][j],map[i]]);
|
||||
for(var iwhile=0;iwhile<totalPopulation;iwhile++){
|
||||
for(var j in player.tempSkills){
|
||||
var expire=player.tempSkills[j];
|
||||
if(expire==name||
|
||||
(get.objtype(expire)=='array'&&expire.contains(name))||
|
||||
(typeof expire=='function'&&expire(event,player,name))){
|
||||
delete player.tempSkills[j];
|
||||
player.removeSkill(j);
|
||||
}
|
||||
else if(typeof expire=='object'){
|
||||
if(expire.player==name&&event.player==player||
|
||||
expire.target==name&&event.target==player||
|
||||
expire.source==name&&event.source==player){
|
||||
delete player.tempSkills[j];
|
||||
player.removeSkill(j);
|
||||
}
|
||||
}
|
||||
}
|
||||
for(var i=0;i<roles.length;i++){
|
||||
if(event[roles[i]]==player){
|
||||
var triggername=player.playerid+'_'+roles[i]+'_'+name;
|
||||
if(lib.hook[triggername]){
|
||||
for(var j=0;j<lib.hook[triggername].length;j++){
|
||||
addList(lib.hook[triggername][j],player);
|
||||
}
|
||||
}
|
||||
triggername=roles[i]+'_'+name;
|
||||
if(lib.hook.globalskill[triggername]){
|
||||
for(var j=0;j<lib.hook.globalskill[triggername].length;j++){
|
||||
addList(lib.hook.globalskill[triggername][j],player);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
list.sort(function(a,b){
|
||||
var priority=lib.sort.priority(a,b);
|
||||
if(priority) return priority;
|
||||
if(start){
|
||||
return get.distance(start,a[1],'absolute')-get.distance(start,b[1],'absolute');
|
||||
if(lib.hook.globalskill[globalskill]){
|
||||
for(var j=0;j<lib.hook.globalskill[globalskill].length;j++){
|
||||
addList(lib.hook.globalskill[globalskill][j],player);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
for(var i in lib.hook.globaltrigger[name]){
|
||||
if(map[i]==player){
|
||||
for(var j=0;j<lib.hook.globaltrigger[name][i].length;j++){
|
||||
addList(lib.hook.globaltrigger[name][i][j],map[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
player=player.next;
|
||||
if(!player||player==start){
|
||||
break;
|
||||
}
|
||||
}
|
||||
list.sort(function(a,b){
|
||||
return b[2]-a[2];
|
||||
});
|
||||
if(list.length){
|
||||
for(i=0;i<list.length;i++){
|
||||
for(var i=0;i<list.length;i++){
|
||||
game.createTrigger(name,list[i][0],list[i][1],event);
|
||||
}
|
||||
}
|
||||
|
@ -21756,7 +21791,7 @@
|
|||
}
|
||||
}
|
||||
page.classList.add('menu-buttons');
|
||||
if(mode.indexOf('mode_')!=0&&!lib.config.customCardPack[mode]){
|
||||
if(!connectMenu&&mode.indexOf('mode_')!=0&&!lib.config.customCardPack[mode]){
|
||||
ui.create.div('.config.more','隐藏卡牌包',page,function(){
|
||||
if(this.innerHTML=='隐藏卡牌包'){
|
||||
this.innerHTML='卡牌包将在重启后隐藏';
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
window.noname_update={
|
||||
version:'1.8.20.4',
|
||||
version:'1.8.20.5',
|
||||
changeLog:[
|
||||
'修bug'
|
||||
],
|
||||
|
|
Loading…
Reference in New Issue