This commit is contained in:
libccy 2017-02-07 10:47:44 +08:00
parent 50daf2edec
commit 5e3da029d2
9 changed files with 51 additions and 94 deletions

View File

@ -147,7 +147,7 @@ card.gujian={
content:function(){ content:function(){
target.$gain2(cards); target.$gain2(cards);
target.storage.mizhilianou=card; target.storage.mizhilianou=card;
target.storage.mizhilianou_markcount=3; target.storage.mizhilianou_markcount=4;
target.addSkill('mizhilianou'); target.addSkill('mizhilianou');
}, },
ai:{ ai:{
@ -270,7 +270,7 @@ card.gujian={
if(target.hasSha()) return 1; if(target.hasSha()) return 1;
if(nh&&Math.random()<0.5) return 1; if(nh&&Math.random()<0.5) return 1;
} }
return player.needsToDiscard?0.2:0; return player.needsToDiscard()?0.2:0;
} }
} }
} }
@ -295,7 +295,7 @@ card.gujian={
value:4, value:4,
result:{ result:{
target:function(player,target){ target:function(player,target){
if(target.isHealthy()) return player.needsToDiscard?0.1:0; if(target.isHealthy()) return player.needsToDiscard()?0.1:0;
if(target.isLowestHp()) return 1.5; if(target.isLowestHp()) return 1.5;
return 1/Math.max(1,target.hp); return 1/Math.max(1,target.hp);
} }
@ -356,7 +356,7 @@ card.gujian={
if(target.hasSha()) return 1; if(target.hasSha()) return 1;
if(nh&&Math.random()<0.5) return 1; if(nh&&Math.random()<0.5) return 1;
} }
return player.needsToDiscard?0.2:0; return player.needsToDiscard()?0.2:0;
} }
} }
} }
@ -1277,11 +1277,11 @@ card.gujian={
nopop:true, nopop:true,
intro:{ intro:{
content:function(storage,player){ content:function(storage,player){
return '结束阶段你有75%的机率弃置一名随机敌人的一张随机牌(剩余'+player.storage.mapodoufu_markcount+'回合)' return '结束阶段你有70%的机率弃置一名随机敌人的一张随机牌(剩余'+player.storage.mapodoufu_markcount+'回合)'
} }
}, },
content:function(){ content:function(){
if(Math.random()<0.75){ if(Math.random()<0.7){
var list=player.getEnemies(); var list=player.getEnemies();
for(var i=0;i<list.length;i++){ for(var i=0;i<list.length;i++){
if(!list[i].num('he')){ if(!list[i].num('he')){
@ -1615,7 +1615,7 @@ card.gujian={
liyutang:'鲤鱼汤', liyutang:'鲤鱼汤',
liyutang_info:'结束阶段,若你的体力值为全场最少或之一,你获得一点护甲,持续两回合', liyutang_info:'结束阶段,若你的体力值为全场最少或之一,你获得一点护甲,持续两回合',
mizhilianou:'蜜汁藕', mizhilianou:'蜜汁藕',
mizhilianou_info:'你可以将一张红桃牌当作桃使用,持续回合', mizhilianou_info:'你可以将一张红桃牌当作桃使用,持续回合',
xiajiao:'虾饺', xiajiao:'虾饺',
xiajiao_info:'你在摸牌阶段额外摸一张牌,并在摸牌阶段时弃置一张牌,持续三回合', xiajiao_info:'你在摸牌阶段额外摸一张牌,并在摸牌阶段时弃置一张牌,持续三回合',
tanhuadong:'昙花冻', tanhuadong:'昙花冻',
@ -1629,7 +1629,7 @@ card.gujian={
molicha:'茉莉茶', molicha:'茉莉茶',
molicha_info:'弃置判定区内的所有牌;你不能成为延时锦囊牌的目标,持续五回合', molicha_info:'弃置判定区内的所有牌;你不能成为延时锦囊牌的目标,持续五回合',
mapodoufu:'麻婆豆腐', mapodoufu:'麻婆豆腐',
mapodoufu_info:'结束阶段你有75%的机率弃置一名随机敌人的一张随机牌,持续三回合', mapodoufu_info:'结束阶段你有70%的机率弃置一名随机敌人的一张随机牌,持续三回合',
}, },
list:[ list:[
['spade',2,'tanhuadong'], ['spade',2,'tanhuadong'],

View File

@ -1052,6 +1052,10 @@ card.swd={
es.splice(i--,1); es.splice(i--,1);
} }
} }
if(!es.length){
event.finish();
return;
}
var num=get.rand(es.length); var num=get.rand(es.length);
var card; var card;
target.removeEquipTrigger(); target.removeEquipTrigger();
@ -4070,7 +4074,7 @@ card.swd={
if(!player.num('h',{type:['hslingjian','jiqi']})) return false; if(!player.num('h',{type:['hslingjian','jiqi']})) return false;
var es=player.get('he',{type:'equip'}); var es=player.get('he',{type:'equip'});
for(var i=0;i<es.length;i++){ for(var i=0;i<es.length;i++){
if(lib.inpile.contains(es[i].name)) return true; if(lib.inpile.contains(es[i].name)&&!lib.card[es[i].name].nopower) return true;
} }
return false; return false;
}, },
@ -4191,7 +4195,7 @@ card.swd={
trigger:{player:'phaseEnd'}, trigger:{player:'phaseEnd'},
frequent:true, frequent:true,
filter:function(event,player){ filter:function(event,player){
return player.isLowestHp(); return player.isLowestHp()&&player.isDamaged();
}, },
content:function(){ content:function(){
player.recover(); player.recover();

View File

@ -498,13 +498,7 @@ character.extra={
target:function(card,player,target,current){ target:function(card,player,target,current){
if(target.hp<=1&&get.tag(card,'damage')){ if(target.hp<=1&&get.tag(card,'damage')){
if(player.hasSkill('jueqing')) return [1,-5]; if(player.hasSkill('jueqing')) return [1,-5];
var hasfriend=false; if(!target.hasFriend()) return;
for(var i=0;i<game.players.length;i++){
if(game.players[i]!=target&&ai.get.attitude(game.players[i],target)>=0){
hasfriend=true;break;
}
}
if(!hasfriend) return;
if(player.hp>2&&ai.get.attitude(player,target)<=0) return [0,2]; if(player.hp>2&&ai.get.attitude(player,target)<=0) return [0,2];
return [1,0,0,-player.hp]; return [1,0,0,-player.hp];
} }
@ -930,13 +924,7 @@ character.extra={
effect:{ effect:{
target:function(card,player,target){ target:function(card,player,target){
if(get.tag(card,'recover')&&target.hp>=1) return [0,0]; if(get.tag(card,'recover')&&target.hp>=1) return [0,0];
var hasfriend=false; if(!target.hasFriend()) return;
for(var i=0;i<game.players.length;i++){
if(game.players[i]!=target&&ai.get.attitude(game.players[i],target)>=0){
hasfriend=true;break;
}
}
if(!hasfriend) return;
if((get.tag(card,'damage')==1||get.tag(card,'loseHp'))&&target.hp>1) return [0,1]; if((get.tag(card,'damage')==1||get.tag(card,'loseHp'))&&target.hp>1) return [0,1];
} }
}, },

View File

@ -630,6 +630,7 @@ character.refresh={
}, },
ai:{ ai:{
effect:function(card,player,target){ effect:function(card,player,target){
if(!target.hasFriend()) return;
if(get.type(card,'trick')=='trick'&&ui.selected.targets.length==0) return [1,1]; if(get.type(card,'trick')=='trick'&&ui.selected.targets.length==0) return [1,1];
}, },
}, },

View File

@ -1155,13 +1155,7 @@ character.shenhua={
maixie:true, maixie:true,
effect:{ effect:{
target:function(card,player,target){ target:function(card,player,target){
var hasfriend=false; if(!target.hasFriend()) return;
for(var i=0;i<game.players.length;i++){
if(game.players[i]!=target&&ai.get.attitude(game.players[i],target)>=0){
hasfriend=true;break;
}
}
if(!hasfriend) return;
if(get.tag(card,'damage')==1&&target.hp==2&&!target.isTurnedOver()&& if(get.tag(card,'damage')==1&&target.hp==2&&!target.isTurnedOver()&&
_status.currentPhase!=target&&get.distance(_status.currentPhase,target,'absolute')<=3) return [0.5,1]; _status.currentPhase!=target&&get.distance(_status.currentPhase,target,'absolute')<=3) return [0.5,1];
} }
@ -1415,13 +1409,7 @@ character.shenhua={
}, },
effect:{ effect:{
target:function(card,player,target,current){ target:function(card,player,target,current){
var hasfriend=false; if(!target.hasFriend()) return;
for(var i=0;i<game.players.length;i++){
if(game.players[i]!=target&&ai.get.attitude(game.players[i],target)>=0){
hasfriend=true;break;
}
}
if(!hasfriend) return;
if(target.hp<=1&&get.tag(card,'damage')) return [1,0,0,-2]; if(target.hp<=1&&get.tag(card,'damage')) return [1,0,0,-2];
} }
} }
@ -1904,8 +1892,8 @@ character.shenhua={
if(get.tag(card,'damage')){ if(get.tag(card,'damage')){
if(player.hasSkill('jueqing')) return [1,-2]; if(player.hasSkill('jueqing')) return [1,-2];
if(target.hp<=1) return; if(target.hp<=1) return;
if(!target.hasFriend()) return;
var hastarget=false; var hastarget=false;
var hasfriend=false;
var turnfriend=false; var turnfriend=false;
for(var i=0;i<game.players.length;i++){ for(var i=0;i<game.players.length;i++){
if(ai.get.attitude(target,game.players[i])<0&&!game.players[i].isTurnedOver()){ if(ai.get.attitude(target,game.players[i])<0&&!game.players[i].isTurnedOver()){
@ -1915,12 +1903,8 @@ character.shenhua={
hastarget=true; hastarget=true;
turnfriend=true; turnfriend=true;
} }
if(game.players[i]!=target&&ai.get.attitude(game.players[i],target)>=0){
hasfriend=true;
}
} }
if(ai.get.attitude(player,target)>0&&!hastarget) return; if(ai.get.attitude(player,target)>0&&!hastarget) return;
if(!hasfriend) return;
if(turnfriend||target.hp==target.maxHp) return [0.5,1]; if(turnfriend||target.hp==target.maxHp) return [0.5,1];
if(target.hp>1) return [1,1]; if(target.hp>1) return [1,1];
} }

View File

@ -1991,14 +1991,7 @@ character.swd={
} }
} }
else{ else{
var hasFriend=false; if(!target.hasFriend()) return;
for(var i=0;i<game.players.length;i++){
if(get.distance(player,game.players[i],'attack')>1&&
player!=game.players[i]&&ai.get.attitude(player,game.players[i]>0)){
hasFriend=true;break;
}
}
if(!hasFriend) return;
var hs=target.num('h'); var hs=target.num('h');
if(get.tag(card,'respondShan')){ if(get.tag(card,'respondShan')){
var shans=target.num('h','shan'); var shans=target.num('h','shan');
@ -8753,7 +8746,7 @@ character.swd={
mufeng:'沐风', mufeng:'沐风',
mufeng_info:'在一名角色的结束阶段若你的手牌数比其少你可以将手牌补至与该角色相同最多补至5每轮限一次', mufeng_info:'在一名角色的结束阶段若你的手牌数比其少你可以将手牌补至与该角色相同最多补至5每轮限一次',
hjifeng:'祭风', hjifeng:'祭风',
hjifeng_info:'出牌阶段限一次,若你手牌中没有祭器牌,你可以将一张手牌置于牌堆顶,并根据其花色获得对应祭器。黑桃:青龙之圭;梅花:白兽之琥;方片:朱雀之璋;红桃:玄武之璜', hjifeng_info:'出牌阶段限一次,若你手牌中没有祭器牌,你可以将一张手牌置于牌堆顶,并根据其花色获得对应祭器:黑桃-青龙之圭;梅花-白兽之琥;方片-朱雀之璋;红桃-玄武之璜',
mufeng_old_info:'锁定技,每当你于回合外失去牌,你的防御距离+1若防御距离的变化值超过了存活角色数的一半则降至0', mufeng_old_info:'锁定技,每当你于回合外失去牌,你的防御距离+1若防御距离的变化值超过了存活角色数的一半则降至0',
lexue:'乐学', lexue:'乐学',
lexue_info:'回合内,你随机获得制衡、集智、缔盟、驱虎中的一个技能;回合外,你随机获得遗计、急救、鬼道、反馈中的一个技能', lexue_info:'回合内,你随机获得制衡、集智、缔盟、驱虎中的一个技能;回合外,你随机获得遗计、急救、鬼道、反馈中的一个技能',

View File

@ -4947,13 +4947,7 @@ character.yijiang={
target:function(card,player,target){ target:function(card,player,target){
if(get.tag(card,'damage')){ if(get.tag(card,'damage')){
if(player.hasSkill('jueqing')) return [1,-2]; if(player.hasSkill('jueqing')) return [1,-2];
var hasfriend=false; if(!target.hasFriend()) return;
for(var i=0;i<game.players.length;i++){
if(game.players[i]!=target&&ai.get.attitude(game.players[i],target)>=0){
hasfriend=true;break;
}
}
if(!hasfriend) return;
if(target.hp>=4) return [0.5,get.tag(card,'damage')*2]; if(target.hp>=4) return [0.5,get.tag(card,'damage')*2];
if(!target.hasSkill('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==3) return [0.5,get.tag(card,'damage')*1.5];
@ -6608,13 +6602,7 @@ character.yijiang={
effect:{ effect:{
target:function(card,player,target){ target:function(card,player,target){
if(player.hasSkill('jueqing')) return [1,-1.5]; if(player.hasSkill('jueqing')) return [1,-1.5];
var hasfriend=false; if(!target.hasFriend()) return;
for(var i=0;i<game.players.length;i++){
if(game.players[i]!=target&&ai.get.attitude(game.players[i],target)>=0){
hasfriend=true;break;
}
}
if(!hasfriend) return;
if(get.tag(card,'damage')) return [1,0,0,-0.7]; if(get.tag(card,'damage')) return [1,0,0,-0.7];
} }
} }
@ -6641,13 +6629,7 @@ character.yijiang={
effect:{ effect:{
target:function(card,player,target){ target:function(card,player,target){
if(player.hasSkill('jueqing')) return [1,-2]; if(player.hasSkill('jueqing')) return [1,-2];
var hasfriend=false; if(!target.hasFriend()) return;
for(var i=0;i<game.players.length;i++){
if(game.players[i]!=target&&ai.get.attitude(game.players[i],target)>=0){
hasfriend=true;break;
}
}
if(!hasfriend) return;
if(get.tag(card,'damage')) return [1,0,0,-1]; if(get.tag(card,'damage')) return [1,0,0,-1];
} }
} }
@ -6987,13 +6969,7 @@ character.yijiang={
target:function(card,player,target){ target:function(card,player,target){
if(get.tag(card,'damage')){ if(get.tag(card,'damage')){
if(player.hasSkill('jueqing')) return [1,-2]; if(player.hasSkill('jueqing')) return [1,-2];
var hasfriend=false; if(!target.hasFriend()) return;
for(var i=0;i<game.players.length;i++){
if(game.players[i]!=target&&ai.get.attitude(game.players[i],target)>=0){
hasfriend=true;break;
}
}
if(!hasfriend) return;
if(target.hp>=4) return [1,2]; if(target.hp>=4) return [1,2];
if(target.hp==3) return [1,1.5]; if(target.hp==3) return [1,1.5];
if(target.hp==2) return [1,0.5]; if(target.hp==2) return [1,0.5];

View File

@ -732,6 +732,7 @@ character.yxs={
sanbanfu:{ sanbanfu:{
trigger:{player:'shaBegin'}, trigger:{player:'shaBegin'},
filter:function(event,player){ filter:function(event,player){
if(player.storage.sanbanfu||player.storage.sanbanfu2) return false;
return !event.directHit; return !event.directHit;
}, },
check:function(event,player){ check:function(event,player){
@ -765,17 +766,18 @@ character.yxs={
trigger:{player:'shaAfter'}, trigger:{player:'shaAfter'},
forced:true, forced:true,
popup:false, popup:false,
filter:function(event,player){ silent:true,
return player.storage.sanbanfu;
},
content:function(){ content:function(){
player.damage(trigger.target); if(player.storage.sanbanfu) player.damage(trigger.target);
delete player.storage.sanbanfu;
delete player.storage.sanbanfu2;
} }
}, },
sanbanfu3:{ sanbanfu3:{
trigger:{source:'damageBegin'}, trigger:{source:'damageBegin'},
forced:true, forced:true,
popup:false, popup:false,
silent:true,
filter:function(event,player){ filter:function(event,player){
return event.card&&event.card.name=='sha'&&player.storage.sanbanfu2; return event.card&&event.card.name=='sha'&&player.storage.sanbanfu2;
}, },
@ -1766,13 +1768,7 @@ character.yxs={
target:function(card,player,target){ target:function(card,player,target){
if(get.tag(card,'damage')){ if(get.tag(card,'damage')){
if(player.hasSkill('jueqing')) return [1,-2]; if(player.hasSkill('jueqing')) return [1,-2];
var hasfriend=false; if(!target.hasFriend()) return;
for(var i=0;i<game.players.length;i++){
if(game.players[i]!=target&&ai.get.attitude(game.players[i],target)>=0){
hasfriend=true;break;
}
}
if(!hasfriend) return;
if(target.hp>=4) return [1,2]; if(target.hp>=4) return [1,2];
if(target.hp==3) return [1,1.5]; if(target.hp==3) return [1,1.5];
if(target.hp==2) return [1,0.5]; if(target.hp==2) return [1,0.5];

View File

@ -13293,6 +13293,16 @@
},200); },200);
}, },
$throw:function(card,time,init){ $throw:function(card,time,init){
if(typeof card=='number'){
var tmp=card;
card=[];
while(tmp--){
var cardx=ui.create.card();
cardx.classList.add('infohidden');
cardx.classList.add('infoflip');
card.push(cardx);
}
}
if(init!==false){ if(init!==false){
if(init!=='nobroadcast'){ if(init!=='nobroadcast'){
game.broadcast(function(player,card,time,init){ game.broadcast(function(player,card,time,init){
@ -32285,6 +32295,9 @@
return num/list.length; return num/list.length;
}, },
rank:function(name,num){ rank:function(name,num){
if(typeof name=='object'&&name.name){
name=name.name;
}
if(num==true) num=9; if(num==true) num=9;
if(typeof num!='number') num=false; if(typeof num!='number') num=false;
if(name==_status.lord) return num?Math.round(7*(num-1)/8+1):'ap'; if(name==_status.lord) return num?Math.round(7*(num-1)/8+1):'ap';
@ -32355,16 +32368,18 @@
var info=JSON.parse(info.slice(13)); var info=JSON.parse(info.slice(13));
var id=info.shift(); var id=info.shift();
if(!id){ if(!id){
card=ui.create.card().init(info); card=ui.create.card();
if(info&&info[2]) card.init(info);
} }
else if(lib.cardOL[id]){ else if(lib.cardOL[id]){
if(lib.cardOL[id].name!=info[2]){ if(lib.cardOL[id].name!=info[2]){
lib.cardOL[id].init(info); if(info&&info[2]) lib.cardOL[id].init(info);
} }
card=lib.cardOL[id]; card=lib.cardOL[id];
} }
else if(game.online){ else if(game.online){
card=ui.create.card().init(info); card=ui.create.card();
if(info&&info[2]) card.init(info);
lib.cardOL[id]=card; lib.cardOL[id]=card;
card.cardid=id; card.cardid=id;
} }