This commit is contained in:
parent
b9163fba65
commit
1b3bd6f50b
278
card/gujian.js
278
card/gujian.js
|
@ -1,6 +1,33 @@
|
|||
'use strict';
|
||||
card.gujian={
|
||||
card:{
|
||||
jinlianzhu:{
|
||||
type:'trick',
|
||||
fullskin:true,
|
||||
filterTarget:true,
|
||||
content:function(){
|
||||
var evt=event.getParent(3)._trigger;
|
||||
evt.untrigger();
|
||||
evt.finish();
|
||||
if(evt.source){
|
||||
evt.source.draw();
|
||||
}
|
||||
},
|
||||
ai:{
|
||||
order:1,
|
||||
value:[5,1],
|
||||
useful:[6,1],
|
||||
result:{
|
||||
target:function(player,target){
|
||||
var evt=_status.event.getTrigger();
|
||||
var eff=ai.get.damageEffect(target,evt.source,target,evt.nature);
|
||||
if(eff>0) return -1;
|
||||
if(eff<0) return 2;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
chunbing:{
|
||||
fullskin:true,
|
||||
type:'food',
|
||||
|
@ -249,7 +276,13 @@ card.gujian={
|
|||
bingpotong:{
|
||||
fullskin:true,
|
||||
type:'jiguan',
|
||||
enable:true,
|
||||
enable:function(card,player){
|
||||
if(player.hasSkill('bingpotong')&&player.storage.bingpotong.contains(card)){
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
wuxieable:true,
|
||||
filterTarget:function(card,player,target){
|
||||
return target.num('h')>0;
|
||||
},
|
||||
|
@ -295,20 +328,23 @@ card.gujian={
|
|||
game.addVideo('deletenode',player,get.cardsInfo([clone]));
|
||||
}
|
||||
target.loseHp();
|
||||
event.finish();
|
||||
}
|
||||
else{
|
||||
player.$gain2(event.card1);
|
||||
target.discard(event.card2).animate=false;
|
||||
var clone=event.card2.clone;
|
||||
if(clone){
|
||||
clone.style.transition='all 0.5s';
|
||||
clone.style.transform='scale(1.2)';
|
||||
clone.delete();
|
||||
game.addVideo('deletenode',target,get.cardsInfo([clone]));
|
||||
}
|
||||
target.$gain2(event.card2);
|
||||
game.delay();
|
||||
}
|
||||
ui.arena.classList.remove('thrownhighlight');
|
||||
game.addVideo('thrownhighlight2');
|
||||
"step 4"
|
||||
if(cards&&cards.length){
|
||||
player.gain(cards,'gain2');
|
||||
if(!player.hasSkill('bingpotong')){
|
||||
player.addSkill('bingpotong');
|
||||
}
|
||||
player.storage.bingpotong=player.storage.bingpotong.concat(cards);
|
||||
}
|
||||
},
|
||||
ai:{
|
||||
basic:{
|
||||
|
@ -345,6 +381,7 @@ card.gujian={
|
|||
type:'jiguan',
|
||||
enable:true,
|
||||
fullskin:true,
|
||||
wuxieable:true,
|
||||
filterTarget:function(card,player,target){
|
||||
return get.distance(player,target)>1;
|
||||
},
|
||||
|
@ -383,6 +420,51 @@ card.gujian={
|
|||
type:'jiguan',
|
||||
enable:true,
|
||||
fullskin:true,
|
||||
wuxieable:true,
|
||||
filterTarget:function(card,player,target){
|
||||
return target!=player&&target.num('he')>0;
|
||||
},
|
||||
changeTarget:function(player,targets){
|
||||
var target=targets[0];
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
if(get.distance(target,game.players[i],'pure')==1&&game.players[i].num('he')){
|
||||
targets.push(game.players[i]);
|
||||
}
|
||||
}
|
||||
},
|
||||
content:function(){
|
||||
var he=target.get('he');
|
||||
if(he.length){
|
||||
target.discard(he.randomGet()).delay=false;
|
||||
}
|
||||
},
|
||||
contentAfter:function(){
|
||||
game.delay(0.5);
|
||||
},
|
||||
ai:{
|
||||
order:7,
|
||||
tag:{
|
||||
loseCard:1,
|
||||
discard:1,
|
||||
},
|
||||
result:{
|
||||
player:function(player,target){
|
||||
var num=0;
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
if(game.players[i]==target||(get.distance(target,game.players[i],'pure')==1&&game.players[i].num('he'))){
|
||||
var att=ai.get.attitude(player,game.players[i]);
|
||||
if(att>0){
|
||||
num--;
|
||||
}
|
||||
else if(att<0){
|
||||
num++;
|
||||
}
|
||||
}
|
||||
}
|
||||
return num;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
wenhuangsan:{
|
||||
type:'jiguan',
|
||||
|
@ -413,11 +495,116 @@ card.gujian={
|
|||
type:'jiguan',
|
||||
enable:true,
|
||||
fullskin:true,
|
||||
filterTarget:true,
|
||||
wuxieable:true,
|
||||
content:function(){
|
||||
var list=[1,2,3,4,5,6];
|
||||
if(player.getEnemies().contains(target)){
|
||||
if(target.num('he')==0){
|
||||
list.remove(1);
|
||||
}
|
||||
if(target.isLinked()){
|
||||
list.remove(4);
|
||||
}
|
||||
if(target.hasSkill('fengyin')){
|
||||
list.remove(5);
|
||||
}
|
||||
switch(list.randomGet()){
|
||||
case 1:target.discard(target.get('he').randomGet());break;
|
||||
case 2:target.loseHp();break;
|
||||
case 3:target.damage();break;
|
||||
case 4:if(!target.isLinked()) target.link();break;
|
||||
case 5:target.addTempSkill('fengyin',{player:'phaseAfter'});break;
|
||||
case 6:{
|
||||
var list=[];
|
||||
for(var i=0;i<lib.inpile.length;i++){
|
||||
var info=lib.card[lib.inpile[i]];
|
||||
if(info.type=='delay'&&!info.cancel&&!target.hasJudge(lib.inpile[i])){
|
||||
list.push(lib.inpile[i]);
|
||||
}
|
||||
}
|
||||
if(list.length){
|
||||
var card=game.createCard(list.randomGet());
|
||||
target.addJudge(card);
|
||||
target.$draw(card);
|
||||
game.delay();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else{
|
||||
if(target.isHealthy()){
|
||||
list.remove(2);
|
||||
}
|
||||
if(!target.num('j')){
|
||||
list.remove(5);
|
||||
}
|
||||
if(!target.isLinked()&&!target.isTurnedOver()){
|
||||
list.remove(6);
|
||||
}
|
||||
if(target.hasSkill('qianxing')){
|
||||
list.remove(4);
|
||||
}
|
||||
switch(list.randomGet()){
|
||||
case 1:target.draw();break;
|
||||
case 2:target.recover();break;
|
||||
case 3:target.changeHujia();break;
|
||||
case 4:target.addTempSkill('qianxing',{player:'phaseBegin'});break;
|
||||
case 5:target.discard(target,get('j'));break;
|
||||
case 6:{
|
||||
if(target.isLinked()) target.link();
|
||||
if(target.isTurnedOver()) target.turnOver();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
ai:{
|
||||
order:4,
|
||||
value:5,
|
||||
result:{
|
||||
player:function(player,target){
|
||||
if(ai.get.attitude(player,target)==0) return 0;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
liufengsan:{
|
||||
type:'jiguan',
|
||||
type:'trick',
|
||||
enable:true,
|
||||
fullskin:true,
|
||||
filterTarget:true,
|
||||
content:function(){
|
||||
var list=[];
|
||||
for(var i=0;i<2;i++){
|
||||
list.push(game.createCard('shan','red'));
|
||||
}
|
||||
target.gain(list,'gain2');
|
||||
},
|
||||
ai:{
|
||||
order:1,
|
||||
result:{
|
||||
target:function(player,target){
|
||||
if(target==player){
|
||||
if(!target.hasShan()) return 2;
|
||||
var num=target.needsToDiscard(2);
|
||||
if(num==0) return 1.5;
|
||||
if(num==1) return 1;
|
||||
return 0.5;
|
||||
}
|
||||
else{
|
||||
switch(target.num('h')){
|
||||
case 0:return 2;
|
||||
case 1:return 1.5;
|
||||
case 2:return 1;
|
||||
default:return 0.5;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
shihuifen:{
|
||||
type:'trick',
|
||||
|
@ -447,13 +634,21 @@ card.gujian={
|
|||
}
|
||||
}
|
||||
},
|
||||
jinlianzhu:{
|
||||
type:'jiguan',
|
||||
enable:true,
|
||||
fullskin:true,
|
||||
},
|
||||
},
|
||||
skill:{
|
||||
bingpotong:{
|
||||
trigger:{player:'phaseAfter'},
|
||||
forced:true,
|
||||
popup:false,
|
||||
silent:true,
|
||||
onremove:true,
|
||||
init:function(player){
|
||||
player.storage.bingpotong=[];
|
||||
},
|
||||
content:function(){
|
||||
player.removeSkill('bingpotong');
|
||||
}
|
||||
},
|
||||
heilonglinpian:{
|
||||
mark:true,
|
||||
marktext:'鳞',
|
||||
|
@ -656,34 +851,50 @@ card.gujian={
|
|||
},trigger.player,-1).targetRequired=true;
|
||||
}
|
||||
},
|
||||
_jinlianzhu:{
|
||||
trigger:{global:'damageBefore'},
|
||||
direct:true,
|
||||
filter:function(event,player){
|
||||
if(!lib.filter.targetEnabled({name:'jinlianzhu'},player,event.player)) return false;
|
||||
return player.hasCard('jinlianzhu');
|
||||
},
|
||||
content:function(){
|
||||
player.chooseToUse(get.prompt('jinlianzhu',trigger.player).replace(/发动/,'使用'),function(card,player){
|
||||
if(card.name!='jinlianzhu') return false;
|
||||
var mod=game.checkMod(card,player,'unchanged','cardEnabled',player.get('s'));
|
||||
if(mod!='unchanged') return mod;
|
||||
return true;
|
||||
},trigger.player,-1).targetRequired=true;
|
||||
}
|
||||
},
|
||||
},
|
||||
cardType:{
|
||||
food:0.3
|
||||
},
|
||||
translate:{
|
||||
// jinlianzhu:'金莲珠',
|
||||
// jinlianzhu_info:'金莲珠',
|
||||
jinlianzhu:'金莲珠',
|
||||
jinlianzhu_info:'对一名即将受到伤害的角色使用,防止此伤害,并令伤害来源摸一张牌',
|
||||
shihuifen:'石灰粉',
|
||||
shihuifen_info:'在一名其他角色的出牌阶段开始时对其使用,目标需打出一张闪,否则此阶段使用卡牌无法指定其他角色为目标',
|
||||
// liufengsan:'流风散',
|
||||
// liufengsan_info:'流风散',
|
||||
// liutouge:'六骰格',
|
||||
// liutouge_info:'六骰格',
|
||||
liufengsan:'流风散',
|
||||
liufengsan_info:'出牌阶段对一名角色使用,目标获得两张闪',
|
||||
liutouge:'六骰格',
|
||||
liutouge_info:'出牌阶段对一名角色使用,若目标是敌人,对目标施加一个随机的负面效果;否则对目标施加一个随机的正面效果',
|
||||
// longxugou:'龙须钩',
|
||||
// longxugou_info:'龙须钩',
|
||||
// mianlijinzhen:'棉里针',
|
||||
// mianlijinzhen_info:'棉里针',
|
||||
mianlijinzhen:'棉里针',
|
||||
mianlijinzhen_info:'令一名角色摸一张牌并展示,若不是黑桃,你对其造成一点伤害',
|
||||
// shenhuofeiya:'神火飞鸦',
|
||||
// shenhuofeiya_info:'神火飞鸦',
|
||||
// tuhunsha:'土魂砂',
|
||||
// tuhunsha_info:'土魂砂',
|
||||
// wenhuangsan:'瘟癀伞',
|
||||
// wenhuangsan_info:'瘟癀伞',
|
||||
// qiankunbiao:'乾坤镖',
|
||||
// qiankunbiao_info:'乾坤镖',
|
||||
qiankunbiao:'乾坤镖',
|
||||
qiankunbiao_info:'随机弃置一名其他角色和其相邻角色的一张牌',
|
||||
|
||||
bingpotong:'冰魄筒',
|
||||
bingpotong_info:'出牌阶段,对一名有手牌的角色使用,你与其同时展示一张手牌,若颜色相同,你弃置展示的牌,目标流失一点体力;若颜色不同,目标弃置展示的牌',
|
||||
bingpotong_info:'出牌阶段,对一名有手牌的角色使用,你与其同时展示一张手牌,若颜色相同,你弃置展示的牌,目标流失一点体力;若颜色不同,你收回此牌且本回合内不可再使用',
|
||||
feibiao:'飞镖',
|
||||
feibiao_info:'出牌阶段,对一名距离1以外的角色使用,令其弃置一张黑色手牌或流失一点体力',
|
||||
|
||||
|
@ -746,7 +957,6 @@ card.gujian={
|
|||
['spade',11,'feibiao','poison'],
|
||||
|
||||
['spade',3,'bingpotong','poison'],
|
||||
['club',11,'bingpotong','poison'],
|
||||
['club',12,'bingpotong','poison'],
|
||||
|
||||
['club',5,'shihuifen'],
|
||||
|
@ -759,5 +969,19 @@ card.gujian={
|
|||
|
||||
['diamond',6,'shujinsan'],
|
||||
['spade',2,'shujinsan'],
|
||||
|
||||
['spade',9,'qiankunbiao'],
|
||||
['club',13,'qiankunbiao'],
|
||||
|
||||
['heart',9,'jinlianzhu'],
|
||||
['spade',7,'jinlianzhu'],
|
||||
|
||||
['heart',6,'liutouge'],
|
||||
['club',6,'liutouge'],
|
||||
|
||||
['club',6,'liufengsan'],
|
||||
['club',3,'liufengsan'],
|
||||
|
||||
['spade',1,'mianlijinzhen'],
|
||||
]
|
||||
};
|
||||
|
|
|
@ -249,20 +249,20 @@ card.yunchou={
|
|||
'step 1'
|
||||
if(!result.tie){
|
||||
if(result.bool){
|
||||
targets[0].discardPlayerCard(targets[1],true);
|
||||
targets[0].gainPlayerCard(targets[1],true);
|
||||
targets[0].line(targets[1]);
|
||||
}
|
||||
else{
|
||||
targets[1].discardPlayerCard(targets[0],true);
|
||||
targets[1].gainPlayerCard(targets[0],true);
|
||||
targets[1].line(targets[0]);
|
||||
}
|
||||
event.finish();
|
||||
}
|
||||
'step 2'
|
||||
targets[0].discardPlayerCard(player,true);
|
||||
targets[0].discardPlayerCard(player);
|
||||
targets[0].line(player);
|
||||
'step 3'
|
||||
targets[1].discardPlayerCard(player,true);
|
||||
targets[1].discardPlayerCard(player);
|
||||
targets[1].line(player);
|
||||
},
|
||||
selectTarget:2,
|
||||
|
@ -1199,7 +1199,7 @@ card.yunchou={
|
|||
suolianjia_info:'锁定技,你防止即将受到的属性伤害,当装备时进入连环状态,当卸下时解除连环状态',
|
||||
suolianjia_bg:'链',
|
||||
geanguanhuo:'隔岸观火',
|
||||
geanguanhuo_info:'出牌阶段对两名其他角色使用,令目标拼点,赢的角色须弃置输的角色一张牌,若点数相同,目标各弃置你一张牌',
|
||||
geanguanhuo_info:'出牌阶段对两名其他角色使用,令目标拼点,赢的角色获得另一方的一张牌;若点数相同,两名目标可分别弃置你一张牌',
|
||||
toulianghuanzhu:'偷梁换柱',
|
||||
toulianghuanzhu_info:'令一名角色获得另一名角色的两张手牌,然后还回两张手牌',
|
||||
toulianghuanzhu_bg:'柱',
|
||||
|
|
|
@ -4003,6 +4003,7 @@ character.swd={
|
|||
},
|
||||
huanjian:{
|
||||
enable:'phaseUse',
|
||||
usable:1,
|
||||
filterCard:function(card){
|
||||
return get.color(card)=='black';
|
||||
},
|
||||
|
@ -8871,7 +8872,7 @@ character.swd={
|
|||
shengshou:'圣手',
|
||||
huanjian:'幻箭',
|
||||
yuhuo:'浴火',
|
||||
huanjian_info:'你可以将一张黑色牌当作冰魄筒使用',
|
||||
huanjian_info:'出牌阶段限一次,你可以将一张黑色牌当作冰魄筒使用',
|
||||
shengshou_info:'你可以将一张黑色手牌当作草药使用',
|
||||
susheng_info:'在任意一名角色即将死亡时,你可以弃置一张手牌防止其死亡,并将其体力回复至1,每回合限发动一次',
|
||||
zhanlu_info:'出牌阶段,你可以弃置一张黑桃牌令至多3名角色各回复一点体力',
|
||||
|
|
|
@ -2520,7 +2520,7 @@ character.xianjian={
|
|||
zhimeng:'织梦',
|
||||
zhimeng2:'织梦',
|
||||
zhimeng3:'织梦',
|
||||
zhimeng_info:'结束阶段,你可以选择一名其他角色将牌堆顶的一张牌置于该角色的武将牌上,直到你的下个回合开始将其收入手牌。当一名角色武将牌上有牌时,每当其成为与此牌类型相同的卡牌的目标,可以摸一张牌',
|
||||
zhimeng_info:'结束阶段,你可以选择一名其他角色将牌堆顶的一张牌置于该角色的武将牌上,直到你的下个回合开始将其收入手牌。当一名角色武将牌上有织梦牌时,每当其成为与此牌类型相同的卡牌的目标,可以摸一张牌',
|
||||
runxin:'润心',
|
||||
runxin_info:'每当你使用或打出一张红桃牌,你可以令一名角色回复一点体力',
|
||||
tannang:'探囊',
|
||||
|
|
|
@ -6822,7 +6822,7 @@ character.yijiang={
|
|||
return event.player.hp<=0&&event.player.num('h')>0;
|
||||
},
|
||||
check:function(event,player){
|
||||
if(event.player==player){
|
||||
if(event.player.isUnderControl(true,player)){
|
||||
return event.player.get('h',function(card){
|
||||
return get.type(card)!='basic';
|
||||
}).length>0;
|
||||
|
@ -6848,7 +6848,7 @@ character.yijiang={
|
|||
player.choosePlayerCard(trigger.player,get.prompt('buyi',trigger.player),'h').set('ai',function(button){
|
||||
if(!_status.event.check) return 0;
|
||||
if(_status.event.target.isUnderControl(true,_status.event.player)){
|
||||
if(get.type(card)!='basic'){
|
||||
if(get.type(button.link)!='basic'){
|
||||
return 10-ai.get.value(button.link);
|
||||
}
|
||||
return 0;
|
||||
|
|
26
game/game.js
26
game/game.js
|
@ -2128,7 +2128,8 @@
|
|||
map.choice_nei.hide();
|
||||
map.choice_fan.hide();
|
||||
map.ban_identity.hide();
|
||||
map.ban_identity2.hide();
|
||||
map.ban_identity2.hide();
|
||||
map.ban_identity3.hide();
|
||||
}
|
||||
else{
|
||||
map.player_number.show();
|
||||
|
@ -2151,6 +2152,12 @@
|
|||
else{
|
||||
map.ban_identity2.show();
|
||||
}
|
||||
if(config.ban_identity=='off'||config.ban_identity2=='off'){
|
||||
map.ban_identity3.hide();
|
||||
}
|
||||
else{
|
||||
map.ban_identity3.show();
|
||||
}
|
||||
}
|
||||
},
|
||||
identity_mode:{
|
||||
|
@ -8654,7 +8661,13 @@
|
|||
cards=cards.concat(player.getDeckCards(event.drawDeck));
|
||||
}
|
||||
if(event.animate!=false){
|
||||
player.gain(cards,'draw');
|
||||
if(event.visible){
|
||||
player.gain(cards,'gain2');
|
||||
game.log(player,'摸了'+get.cnNumber(num)+'张牌(',cards,')');
|
||||
}
|
||||
else{
|
||||
player.gain(cards,'draw');
|
||||
}
|
||||
}
|
||||
else{
|
||||
player.gain(cards);
|
||||
|
@ -11228,6 +11241,9 @@
|
|||
else if(typeof arguments[i]=='boolean'){
|
||||
next.animate=arguments[i];
|
||||
}
|
||||
else if(arguments[i]=='visible'){
|
||||
next.visible=true;
|
||||
}
|
||||
else if(typeof arguments[i]=='object'&&arguments[i].drawDeck!=undefined){
|
||||
next.drawDeck=arguments[i].drawDeck;
|
||||
}
|
||||
|
@ -12763,8 +12779,9 @@
|
|||
}
|
||||
return false;
|
||||
},
|
||||
needsToDiscard:function(){
|
||||
return Math.max(0,this.num('h')-this.getHandcardLimit());
|
||||
needsToDiscard:function(num){
|
||||
if(typeof num!='number') num=0;
|
||||
return Math.max(0,num+this.num('h')-this.getHandcardLimit());
|
||||
},
|
||||
distanceTo:function(target,method){
|
||||
return get.distance(this,target,method);
|
||||
|
@ -19926,6 +19943,7 @@
|
|||
dialog.addSmall(hs);
|
||||
}
|
||||
}
|
||||
dialog.add(ui.create.div('.placeholder.slim'));
|
||||
var clients=game.players.concat(game.dead);
|
||||
for(var i=0;i<clients.length;i++){
|
||||
if(clients[i].isOnline2()){
|
||||
|
|
|
@ -96,7 +96,11 @@
|
|||
display: none;
|
||||
}
|
||||
#arena.choose-character>.dialog .placeholder{
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
#arena.choose-character>.dialog.noupdate .placeholder{
|
||||
margin-bottom: 0;
|
||||
height: 0;
|
||||
}
|
||||
#arena.choose-character>.dialog{
|
||||
height:calc(100% - 280px);
|
||||
|
|
Loading…
Reference in New Issue