This commit is contained in:
parent
bf6ad78189
commit
1de8af81c6
|
@ -463,6 +463,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
ai:{
|
||||
order:1.5,
|
||||
value:[4,1],
|
||||
norepeat:1,
|
||||
result:{
|
||||
target:function(player,target){
|
||||
if(target==player){
|
||||
|
|
|
@ -1027,7 +1027,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
filterTarget:true,
|
||||
content:function(){
|
||||
'step 0'
|
||||
target.chooseToDiscard('h',2,true);
|
||||
target.chooseToDiscard('h',2,true).delay=false;
|
||||
'step 1'
|
||||
target.draw();
|
||||
},
|
||||
|
|
63
card/swd.js
63
card/swd.js
|
@ -3326,69 +3326,6 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
delete player.storage.kongxin;
|
||||
},
|
||||
},
|
||||
lianyao_hujia:{
|
||||
mode:['identity','guozhan'],
|
||||
enable:'phaseUse',
|
||||
usable:1,
|
||||
filter:function(event,player){
|
||||
if(player!=game.me) return false;
|
||||
var card=player.getEquip('lianyaohu');
|
||||
if(card.storage.shouhua&&card.storage.shouhua.length) return true;
|
||||
return false;
|
||||
},
|
||||
content:function(){
|
||||
"step 0"
|
||||
var list=[];
|
||||
var card=player.getEquip('lianyaohu');
|
||||
for(var i=0;i<card.storage.shouhua.length;i++){
|
||||
list.push(card.storage.shouhua[i].name);
|
||||
}
|
||||
var dialog=ui.create.dialog([list,'character']);
|
||||
for(var i=0;i<dialog.buttons.length;i++){
|
||||
dialog.buttons[i].link=card.storage.shouhua[i];
|
||||
dialog.buttons[i].querySelector('.intro').remove();
|
||||
}
|
||||
player.chooseButton(dialog,true);
|
||||
"step 1"
|
||||
if(result.bool){
|
||||
game.restorePlayer(result.links[0]);
|
||||
game.delay();
|
||||
}
|
||||
else{
|
||||
event.finish();
|
||||
}
|
||||
"step 2"
|
||||
game.swapPlayer(result.links[0]);
|
||||
result.links[0].hp=1;
|
||||
result.links[0].update();
|
||||
result.links[0].storage.lianyao_hujia=player;
|
||||
game.swapPlayer(result.links[0]);
|
||||
result.links[0].addSkill('lianyao_hujia2');
|
||||
result.links[0].insertPhase();
|
||||
result.links[0].setIdentity();
|
||||
result.links[0].identityShown=true;
|
||||
player.out(true);
|
||||
}
|
||||
},
|
||||
lianyao_hujia2:{
|
||||
trigger:{player:['phaseAfter','changeHp']},
|
||||
forced:true,
|
||||
popup:false,
|
||||
content:function(){
|
||||
player.hp=1;
|
||||
player.update();
|
||||
var me=player.storage.lianyao_hujia;
|
||||
delete player.storage.lianyao_hujia;
|
||||
me.lockOut=false;
|
||||
me.out();
|
||||
player.removeSkill('lianyao_hujia2');
|
||||
if(player==game.me){
|
||||
game.swapPlayer(me);
|
||||
game.removePlayer(player);
|
||||
game.delay();
|
||||
}
|
||||
}
|
||||
},
|
||||
qinglianxindeng:{
|
||||
trigger:{player:'damageBefore'},
|
||||
forced:true,
|
||||
|
|
|
@ -109,15 +109,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
return !player.hasSkill('lianpo2');
|
||||
},
|
||||
content:function(){
|
||||
player.addSkill('lianpo2');
|
||||
}
|
||||
},
|
||||
lianpo2:{
|
||||
trigger:{global:'phaseAfter'},
|
||||
forced:true,
|
||||
priority:-50,
|
||||
content:function(){
|
||||
player.removeSkill('lianpo2');
|
||||
player.insertPhase();
|
||||
}
|
||||
},
|
||||
|
|
|
@ -33,7 +33,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
// gw_aigeleisi:['male','wu',4,[]],
|
||||
gw_aokeweisite:['male','qun',4,['yunhuo']],
|
||||
// gw_kaxier:['male','wu',4,[]],
|
||||
// gw_luobo:['male','wu',4,[]],
|
||||
gw_luobo:['male','qun',3,['junchi']],
|
||||
// gw_mieren:['male','wu',4,[]],
|
||||
// gw_sanhanya:['male','wu',4,[]],
|
||||
gw_shanhu:['female','qun',3,['shuijian']],
|
||||
|
@ -54,6 +54,87 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
gw_yioufeisi:'国王还是乞丐,两者有何区别,人类少一个算一个',
|
||||
},
|
||||
skill:{
|
||||
junchi:{
|
||||
trigger:{global:'shaAfter'},
|
||||
direct:true,
|
||||
filter:function(event,player){
|
||||
return event.player!=player&&event.target!=player&&event.target.isIn()&&player.hasCard(function(card){
|
||||
return player.canUse(card,event.player,false);
|
||||
});
|
||||
},
|
||||
content:function(){
|
||||
var next=player.chooseToUse(get.prompt('junchi'),trigger.target,-1).set('targetRequired',true);
|
||||
next.prompt2='对'+get.translation(trigger.target)+'使用一张牌,并摸一张牌';
|
||||
next.filterCard=function(card){
|
||||
return player.canUse(card,trigger.target,false)&&!get.info(card).multitarget;
|
||||
};
|
||||
next.oncard=function(){
|
||||
player.draw();
|
||||
};
|
||||
next.logSkill='junchi';
|
||||
},
|
||||
subSkill:{
|
||||
gold:{
|
||||
trigger:{global:'useCardAfter'},
|
||||
frequent:true,
|
||||
filter:function(event,player){
|
||||
return event.player!=player&get.subtype(event.card)=='spell_gold';
|
||||
},
|
||||
content:function(){
|
||||
player.insertPhase();
|
||||
}
|
||||
}
|
||||
},
|
||||
group:'junchi_gold'
|
||||
},
|
||||
junchi_old:{
|
||||
trigger:{global:'shaAfter'},
|
||||
forced:true,
|
||||
popup:false,
|
||||
filter:function(event,player){
|
||||
return event.player!=player&&event.target!=player&&event.player.isIn()&&event.player.countCards('he');
|
||||
},
|
||||
content:function(){
|
||||
'step 0'
|
||||
var att=get.attitude(trigger.player,player);
|
||||
trigger.player.chooseCard('he','是否交给'+get.translation(player)+'一张牌?').ai=function(card){
|
||||
if(att>1){
|
||||
if(trigger.target.isIn()){
|
||||
return 9-get.value(card);
|
||||
}
|
||||
return 4-get.value(card);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
'step 1'
|
||||
if(result.bool){
|
||||
player.logSkill('junchi');
|
||||
player.gain(result.cards,trigger.player);
|
||||
if(get.position(result.cards[0])=='h'){
|
||||
trigger.player.$giveAuto(result.cards,player);
|
||||
}
|
||||
else{
|
||||
trigger.player.$give(result.cards,player);
|
||||
}
|
||||
trigger.player.addExpose(0.2);
|
||||
trigger.player.line(player,'green');
|
||||
}
|
||||
else{
|
||||
event.finish();
|
||||
}
|
||||
'step 2'
|
||||
if(trigger.target.isIn()){
|
||||
var next=player.chooseToUse('是否对'+get.translation(trigger.target)+'使用一张牌?',trigger.target,-1).set('targetRequired',true);
|
||||
next.filterCard=function(card){
|
||||
return player.canUse(card,trigger.target,false)&&!get.info(card).multitarget;
|
||||
};
|
||||
next.oncard=function(){
|
||||
player.recover();
|
||||
trigger.player.draw();
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
hupeng:{
|
||||
enable:'phaseUse',
|
||||
usable:1,
|
||||
|
@ -278,7 +359,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
forced:true,
|
||||
content:function(){
|
||||
'step 0'
|
||||
player.addSkill('yunhuo2');
|
||||
player.insertPhase();
|
||||
event.list=player.getEnemies().sortBySeat();
|
||||
'step 1'
|
||||
if(event.list.length){
|
||||
|
@ -296,17 +377,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
game.delayx();
|
||||
}
|
||||
},
|
||||
yunhuo2:{
|
||||
trigger:{player:'phaseAfter'},
|
||||
forced:true,
|
||||
popup:false,
|
||||
silent:true,
|
||||
priority:-50,
|
||||
content:function(){
|
||||
player.insertPhase();
|
||||
player.removeSkill('yunhuo2');
|
||||
}
|
||||
},
|
||||
yinzhang:{
|
||||
enable:'phaseUse',
|
||||
usable:1,
|
||||
|
@ -604,8 +674,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(event.targets.length){
|
||||
event.current=event.targets.shift();
|
||||
if(event.current.hasSha()){
|
||||
event.current.addTempSkill('gwzhanjiang3','gwzhanjiangAfter');
|
||||
event.current.chooseToUse({name:'sha'},'是否对'+get.translation(trigger.player)+'使用一张杀?',trigger.player,-1);
|
||||
event.current.chooseToUse({name:'sha'},'是否对'+get.translation(trigger.player)+'使用一张杀?',trigger.player,-1).oncard=function(card,player){
|
||||
player.draw();
|
||||
};
|
||||
}
|
||||
else{
|
||||
event.redo();
|
||||
|
@ -1218,6 +1289,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
gw_zhangyujushou:'章鱼巨兽',
|
||||
gw_zhuoertan:'卓尔坦',
|
||||
|
||||
junchi:'骏驰',
|
||||
junchi_info:'每当一名其他角色使用一张杀,若目标不是你,你可以对杀的目标使用一张牌,然后摸一张牌;每当一名其他角色使用一张金卡,你可以在此回合结束后获得一个额外回合',
|
||||
junchi_old_info:'当一名其他角色使用杀对一个目标结算后,该角色可以交给你一张牌,然后你可以对杀的目标使用一张牌,若如此做,你回复一点体力,杀的使用者摸一张牌',
|
||||
gw_dudayuanshuai1:'杜达元帅',
|
||||
gw_dudayuanshuai1_info:'当你成为其他角色使用牌的目标时,你可以使用此牌取消之,然后获得对你使用的牌',
|
||||
gw_dudayuanshuai2:'杜达元帅',
|
||||
|
|
|
@ -1179,7 +1179,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
return 1;
|
||||
}
|
||||
var geteff=function(current){
|
||||
return get.effect(current,{name:'sha'},player,player)>0;
|
||||
return player.canUse('sha',current,false,true)&&get.effect(current,{name:'sha'},player,player)>0;
|
||||
}
|
||||
if(player.hasSha()&&geteff(target)){
|
||||
var num=game.countPlayer(function(current){
|
||||
|
|
|
@ -910,9 +910,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
content:function(){
|
||||
'step 0'
|
||||
target.draw();
|
||||
target.chooseToDiscard(2,'h',true).delay=false;
|
||||
'step 1'
|
||||
target.chooseToDiscard(2,'h',true);
|
||||
target.draw();
|
||||
},
|
||||
selectTarget:-1,
|
||||
ai:{
|
||||
|
@ -9546,7 +9546,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
miedao_info:'锁定技,摸牌阶段,你额外摸X张牌;弃牌阶段,你至少须弃X张牌(不足则全弃),X为你已损失的体力值。',
|
||||
|
||||
senluo:'森罗',
|
||||
senluo_info:'出牌阶段限一次,若你的手牌数为全场最少或之一,你可以令所有有手牌的其他角色摸一张牌并弃置两张手牌',
|
||||
senluo_info:'出牌阶段限一次,若你的手牌数为全场最少或之一,你可以令所有有手牌的其他角色弃置两张手牌然后摸一张牌',
|
||||
polang:'破浪',
|
||||
polang_info:'每当你造成一次伤害,可以一张对方的装备牌',
|
||||
jikong:'亟空',
|
||||
|
|
|
@ -332,7 +332,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
result:{
|
||||
target:function(player,target){
|
||||
if(target.hp==1&&target.maxHp>=3){
|
||||
return get.recoverEffect(target,player,player);
|
||||
return get.recoverEffect(target,player,target);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
18
game/game.js
18
game/game.js
|
@ -11040,6 +11040,9 @@
|
|||
}
|
||||
}
|
||||
event.id=get.id();
|
||||
if(event.oncard){
|
||||
event.oncard(event.card,event.player);
|
||||
}
|
||||
event.trigger('useCard');
|
||||
event._oncancel=function(){
|
||||
game.broadcastAll(function(id){
|
||||
|
@ -11471,6 +11474,9 @@
|
|||
}
|
||||
else{
|
||||
player.gain(cards);
|
||||
if(event.$draw){
|
||||
player.$draw(cards.length);
|
||||
}
|
||||
}
|
||||
event.result=cards;
|
||||
},
|
||||
|
@ -14380,7 +14386,7 @@
|
|||
}
|
||||
}
|
||||
if(result.card||!result.skill){
|
||||
this.useCard(result.card,result.cards,result.targets,result.skill);
|
||||
this.useCard(result.card,result.cards,result.targets,result.skill).oncard=event.oncard;
|
||||
}
|
||||
else if(result.skill){
|
||||
this.useSkill(result.skill,result.cards,result.targets);
|
||||
|
@ -14526,6 +14532,10 @@
|
|||
else if(typeof arguments[i]=='boolean'){
|
||||
next.animate=arguments[i];
|
||||
}
|
||||
else if(arguments[i]=='nodelay'){
|
||||
next.animate=false;
|
||||
next.$draw=true;
|
||||
}
|
||||
else if(arguments[i]=='visible'){
|
||||
next.visible=true;
|
||||
}
|
||||
|
@ -35716,8 +35726,10 @@
|
|||
}
|
||||
if(node.node.name.querySelectorAll('br').length>=4){
|
||||
node.node.name.classList.add('long');
|
||||
node.addEventListener('mouseenter',ui.click.buttonnameenter);
|
||||
node.addEventListener('mouseleave',ui.click.buttonnameleave);
|
||||
if(lib.config.buttoncharacter_style=='old'){
|
||||
node.addEventListener('mouseenter',ui.click.buttonnameenter);
|
||||
node.addEventListener('mouseleave',ui.click.buttonnameleave);
|
||||
}
|
||||
}
|
||||
node.node.intro.innerHTML=lib.config.intro;
|
||||
if(!noclick){
|
||||
|
|
|
@ -26,7 +26,7 @@ window.noname_update={
|
|||
// 'theme/music/style.css',
|
||||
// 'theme/woodden/style.css',
|
||||
// 'theme/simple/style.css',
|
||||
// 'layout/default/layout.css',
|
||||
'layout/default/layout.css',
|
||||
// 'layout/default/phone.css',
|
||||
// 'layout/default/menu.css',
|
||||
// 'theme/style/cardback/*',
|
||||
|
|
|
@ -1668,6 +1668,10 @@ div:not(.handcards)>.card>.info>span,
|
|||
}
|
||||
.button.newstyle>.name{
|
||||
top: 8px;
|
||||
max-height: 80px;
|
||||
}
|
||||
.button.newstyle>.name.long{
|
||||
top: 6px;
|
||||
}
|
||||
.button.newstyle>.hp,
|
||||
.button.newstyle>.hp.text{
|
||||
|
|
Loading…
Reference in New Issue