乒乓球!
This commit is contained in:
parent
76247d1c44
commit
ffc3c70344
|
@ -281,6 +281,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
key_nao:'#b潮鸣',
|
key_nao:'#b潮鸣',
|
||||||
key_yuuki:'#b4399司命',
|
key_yuuki:'#b4399司命',
|
||||||
key_kyouko:'#b阿阿阿687',
|
key_kyouko:'#b阿阿阿687',
|
||||||
|
key_tenzen:'#b皋耳击',
|
||||||
|
|
||||||
ns_huangchengyan:'#g竹邀月',
|
ns_huangchengyan:'#g竹邀月',
|
||||||
ns_sunchensunjun:'#gVenusjeu',
|
ns_sunchensunjun:'#gVenusjeu',
|
||||||
|
@ -454,17 +455,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
skill:{
|
skill:{
|
||||||
tenzen_yixing:{
|
tenzen_yixing:{
|
||||||
trigger:{
|
trigger:{
|
||||||
player:'damageEnd',
|
global:'damageEnd',
|
||||||
source:'damageSource',
|
|
||||||
},
|
|
||||||
logTarget:function(event,player){
|
|
||||||
if(player==event.player) return event.source;
|
|
||||||
return event.player;
|
|
||||||
},
|
},
|
||||||
filter:function(event,player){
|
filter:function(event,player){
|
||||||
if(!event.card||(event.card.name!='sha'&&event.card.name!='juedou')) return false;
|
if(!event.card||(event.card.name!='sha'&&event.card.name!='juedou')) return false;
|
||||||
var hairi=lib.skill.tenzen_yixing.logTarget(event,player);
|
var hairi=event.source;
|
||||||
return hairi&&hairi!=player&&hairi.isAlive()&&(hairi.name1!='key_shizuku'&&hairi.name2!='key_shizuku');
|
if(hairi&&(hairi==player||player.inRangeOf(hairi))&&hairi.isAlive()&&(hairi.name1!='key_shizuku'&&hairi.name2!='key_shizuku')) return true;
|
||||||
|
hairi=event.player;
|
||||||
|
return (hairi&&(hairi==player||player.inRange(hairi))&&hairi.isAlive()&&(hairi.name1!='key_shizuku'&&hairi.name2!='key_shizuku'));
|
||||||
},
|
},
|
||||||
frequent:true,
|
frequent:true,
|
||||||
content:function(){
|
content:function(){
|
||||||
|
@ -561,16 +559,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
},
|
},
|
||||||
content:function(){
|
content:function(){
|
||||||
'step 0'
|
'step 0'
|
||||||
player.viewHandcards(trigger.target);
|
//player.viewHandcards(trigger.target);
|
||||||
|
player.chooseButton(['选择移去一张“兴”',player.storage.tenzen_yixing],true);
|
||||||
'step 1'
|
'step 1'
|
||||||
player.chooseButton(['选择一张“兴”置于牌堆顶',player.storage.tenzen_yixing],true);
|
|
||||||
'step 2'
|
|
||||||
if(result.bool){
|
if(result.bool){
|
||||||
player.unmarkAuto('tenzen_yixing',result.links);
|
player.unmarkAuto('tenzen_yixing',result.links);
|
||||||
var cards=get.cards(5);
|
var cards=get.cards(5);
|
||||||
player.showCards(cards,get.translation(player)+'发动了【天全】');
|
player.showCards(cards,get.translation(player)+'发动了【天全】');
|
||||||
game.cardsGotoOrdering(cards).relatedEvent=trigger.getParent();
|
game.cardsGotoOrdering(cards).relatedEvent=trigger.getParent();
|
||||||
ui.cardPile.insertBefore(result.links[0],ui.cardPile.firstChild);
|
game.log(player,'移去了',result.links[0]);
|
||||||
|
player.$throw(result.links[0],1500);
|
||||||
|
game.cardsDiscard(result.links);
|
||||||
|
//ui.cardPile.insertBefore(result.links[0],ui.cardPile.firstChild);
|
||||||
var num=cards.filter(function(card){
|
var num=cards.filter(function(card){
|
||||||
return get.type(card,false)=='basic';
|
return get.type(card,false)=='basic';
|
||||||
}).length;
|
}).length;
|
||||||
|
@ -14974,12 +14974,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
kyouko_gongmian_info:'①出牌阶段,你可以选择一名未以此法选择过的角色,若其手牌:大于你,你获得其一张牌,然后交给其一张牌;小于你,其交给你一张牌,然后你交给其一张牌;等于你,你与其各摸一张牌。②出牌阶段结束时,你可以获得一名其他角色区域内的至多X张牌,然后交给其等量的牌。③弃牌阶段开始时,若X不小于你的体力值,你可以获得一名手牌数少于你的角色的所有手牌,然后将手牌数的一半(向上取整)交给该角色。(X为你本回合内发动过〖共勉①〗的次数)',
|
kyouko_gongmian_info:'①出牌阶段,你可以选择一名未以此法选择过的角色,若其手牌:大于你,你获得其一张牌,然后交给其一张牌;小于你,其交给你一张牌,然后你交给其一张牌;等于你,你与其各摸一张牌。②出牌阶段结束时,你可以获得一名其他角色区域内的至多X张牌,然后交给其等量的牌。③弃牌阶段开始时,若X不小于你的体力值,你可以获得一名手牌数少于你的角色的所有手牌,然后将手牌数的一半(向上取整)交给该角色。(X为你本回合内发动过〖共勉①〗的次数)',
|
||||||
key_tenzen:'加纳天善',
|
key_tenzen:'加纳天善',
|
||||||
tenzen_yixing:'弈兴',
|
tenzen_yixing:'弈兴',
|
||||||
tenzen_yixing_info:'当你因【杀】或【决斗】而造成伤害后或受到伤害后,你可以摸一张牌,然后将一张牌置于武将牌上,称为“兴”。当你成为其他角色使用【杀】或普通锦囊牌的唯一目标后,你可以获得一张“兴”,并于此牌结算完成后视为对其使用一张名称相同的牌。',
|
tenzen_yixing_info:'当有角色因【杀】或【决斗】而受到伤害后,若其在你的攻击范围内或你在伤害来源的攻击范围内,你可以摸一张牌,然后将一张牌置于武将牌上,称为“兴”。当你成为其他角色使用【杀】或普通锦囊牌的唯一目标后,你可以获得一张“兴”,并于此牌结算完成后视为对其使用一张名称相同的牌。',
|
||||||
//若对方为水织静久则无法触发〖弈兴〗
|
//若对方为水织静久则无法触发〖弈兴〗
|
||||||
tenzen_lingyu:'领域',
|
tenzen_lingyu:'领域',
|
||||||
tenzen_lingyu_info:'觉醒技,准备阶段,若你的“兴”超过一张,则你减1点体力上限并获得技能〖天全〗。若你以此法失去了体力,则你摸两张牌。',
|
tenzen_lingyu_info:'觉醒技,准备阶段,若你的“兴”超过一张,则你减1点体力上限并获得技能〖天全〗。若你以此法失去了体力,则你摸两张牌。',
|
||||||
tenzen_tianquan:'天全',
|
tenzen_tianquan:'天全',
|
||||||
tenzen_tianquan_info:'每回合限一次,当你使用【杀】或【决斗】指定唯一目标后,你可以观看目标角色的手牌,将一张“兴”置于牌堆顶并展示牌堆顶的五张牌。这些牌中每有一张基本牌,响应此牌需要的【闪】/【杀】的数量便+1。此牌结算完成后,若此牌造成过伤害,则你获得这些牌中的非基本牌。',
|
tenzen_tianquan_info:'每回合限一次,当你使用【杀】或【决斗】指定唯一目标后,你可以移去一张“兴”并展示牌堆顶的五张牌。这些牌中每有一张基本牌,响应此牌需要的【闪】/【杀】的数量便+1。此牌结算完成后,若此牌造成过伤害,则你获得这些牌中的非基本牌。',
|
||||||
|
|
||||||
noname:"小无",
|
noname:"小无",
|
||||||
noname_zhuyuan:"祝愿",
|
noname_zhuyuan:"祝愿",
|
||||||
|
|
|
@ -5768,7 +5768,7 @@
|
||||||
else{
|
else{
|
||||||
map.connect_change_card.show();
|
map.connect_change_card.show();
|
||||||
}
|
}
|
||||||
if(config.connect_doudizhu_mode=='kaihei'||config.connect_doudizhu_mode=='huanle'||config.connect_doudizhu_mode=='online'){
|
if(config.connect_doudizhu_mode!='normal'){
|
||||||
map.connect_double_character.hide();
|
map.connect_double_character.hide();
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
@ -5782,6 +5782,7 @@
|
||||||
normal:'休闲',
|
normal:'休闲',
|
||||||
kaihei:'开黑',
|
kaihei:'开黑',
|
||||||
huanle:'欢乐',
|
huanle:'欢乐',
|
||||||
|
binglin:'兵临',
|
||||||
online:'智斗',
|
online:'智斗',
|
||||||
},
|
},
|
||||||
restart:true,
|
restart:true,
|
||||||
|
@ -5812,7 +5813,7 @@
|
||||||
map.edit_character.hide();
|
map.edit_character.hide();
|
||||||
map.reset_character.hide();
|
map.reset_character.hide();
|
||||||
}
|
}
|
||||||
if(config.doudizhu_mode=='kaihei'||config.doudizhu_mode=='huanle'||config.doudizhu_mode=='online'){
|
if(config.doudizhu_mode!='normal'){
|
||||||
map.double_character.hide();
|
map.double_character.hide();
|
||||||
map.free_choose.hide();
|
map.free_choose.hide();
|
||||||
map.change_identity.hide();
|
map.change_identity.hide();
|
||||||
|
@ -5834,7 +5835,7 @@
|
||||||
map.choice_fan.show();
|
map.choice_fan.show();
|
||||||
map.revive.show();
|
map.revive.show();
|
||||||
}
|
}
|
||||||
if(config.double_character&&config.doudizhu_mode!='kaihei'&&config.doudizhu_mode!='huanle'){
|
if(config.double_character&&config.doudizhu_mode=='normal'){
|
||||||
map.double_hp.show();
|
map.double_hp.show();
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
@ -5848,6 +5849,7 @@
|
||||||
normal:'休闲',
|
normal:'休闲',
|
||||||
kaihei:'开黑',
|
kaihei:'开黑',
|
||||||
huanle:'欢乐',
|
huanle:'欢乐',
|
||||||
|
binglin:'兵临',
|
||||||
online:'智斗',
|
online:'智斗',
|
||||||
},
|
},
|
||||||
restart:true,
|
restart:true,
|
||||||
|
@ -49829,6 +49831,7 @@
|
||||||
switch(config.doudizhu_mode){
|
switch(config.doudizhu_mode){
|
||||||
case 'kaihei':return '开黑斗地主';
|
case 'kaihei':return '开黑斗地主';
|
||||||
case 'huanle':return '欢乐斗地主';
|
case 'huanle':return '欢乐斗地主';
|
||||||
|
case 'binglin':return '兵临城下';
|
||||||
case 'online':return '智斗三国';
|
case 'online':return '智斗三国';
|
||||||
default:return '休闲'+(config.double_character?'双将':'')+'斗地主';
|
default:return '休闲'+(config.double_character?'双将':'')+'斗地主';
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,49 +1,46 @@
|
||||||
window.noname_update={
|
window.noname_update={
|
||||||
version:'1.9.110.8',
|
version:'1.9.110.8.1',
|
||||||
update:'1.9.110.7.1.1',
|
update:'1.9.110.8',
|
||||||
changeLog:[
|
changeLog:[
|
||||||
'加纳天善',
|
'兵临城下(斗地主)',
|
||||||
'神郭嘉',
|
|
||||||
'界姜维、界祝融、钟琰、黄承彦',
|
|
||||||
'界郭图逢纪、段煨',
|
|
||||||
'bug修复',
|
'bug修复',
|
||||||
],
|
],
|
||||||
files:[
|
files:[
|
||||||
'card/extra.js',
|
//'card/extra.js',
|
||||||
//'card/gujian.js',
|
//'card/gujian.js',
|
||||||
//'card/guozhan.js',
|
//'card/guozhan.js',
|
||||||
//'card/gwent.js',
|
//'card/gwent.js',
|
||||||
//'card/huanlekapai.js',
|
//'card/huanlekapai.js',
|
||||||
//'card/mtg.js',
|
//'card/mtg.js',
|
||||||
//'card/sp.js',
|
//'card/sp.js',
|
||||||
'card/standard.js',
|
//'card/standard.js',
|
||||||
//'card/swd.js',
|
//'card/swd.js',
|
||||||
//'card/yunchou.js',
|
//'card/yunchou.js',
|
||||||
//'card/yingbian.js',
|
//'card/yingbian.js',
|
||||||
//'card/zhenfa.js',
|
//'card/zhenfa.js',
|
||||||
//'card/zhulu.js',
|
//'card/zhulu.js',
|
||||||
'character/diy.js',
|
'character/diy.js',
|
||||||
'character/extra.js',
|
//'character/extra.js',
|
||||||
//'character/hearth.js',
|
//'character/hearth.js',
|
||||||
//'character/gujian.js',
|
//'character/gujian.js',
|
||||||
//'character/gwent.js',
|
//'character/gwent.js',
|
||||||
//'character/hearth.js',
|
//'character/hearth.js',
|
||||||
'character/mobile.js',
|
//'character/mobile.js',
|
||||||
//'character/mtg.js',
|
//'character/mtg.js',
|
||||||
//'character/old.js',
|
//'character/old.js',
|
||||||
//'character/ow.js',
|
//'character/ow.js',
|
||||||
'character/rank.js',
|
//'character/rank.js',
|
||||||
'character/refresh.js',
|
//'character/refresh.js',
|
||||||
'character/shenhua.js',
|
//'character/shenhua.js',
|
||||||
'character/sp.js',
|
//'character/sp.js',
|
||||||
'character/sp2.js',
|
//'character/sp2.js',
|
||||||
//'character/tw.js',
|
//'character/tw.js',
|
||||||
//'character/standard.js',
|
//'character/standard.js',
|
||||||
//'character/swd.js',
|
//'character/swd.js',
|
||||||
//'character/xianjian.js',
|
//'character/xianjian.js',
|
||||||
//'character/xinghuoliaoyuan.js',
|
//'character/xinghuoliaoyuan.js',
|
||||||
'character/yingbian.js',
|
//'character/yingbian.js',
|
||||||
'character/yijiang.js',
|
//'character/yijiang.js',
|
||||||
//'character/yxs.js',
|
//'character/yxs.js',
|
||||||
//'extension/boss/extension.js',
|
//'extension/boss/extension.js',
|
||||||
//'layout/default/layout.css',
|
//'layout/default/layout.css',
|
||||||
|
@ -52,8 +49,8 @@ window.noname_update={
|
||||||
//'mode/boss.js',
|
//'mode/boss.js',
|
||||||
//'mode/brawl.js',
|
//'mode/brawl.js',
|
||||||
//'mode/chess.js',
|
//'mode/chess.js',
|
||||||
//'mode/doudizhu.js',
|
'mode/doudizhu.js',
|
||||||
'mode/guozhan.js',
|
//'mode/guozhan.js',
|
||||||
//'mode/identity.js',
|
//'mode/identity.js',
|
||||||
//'mode/single.js',
|
//'mode/single.js',
|
||||||
//'mode/stone.js',
|
//'mode/stone.js',
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 29 KiB |
Binary file not shown.
After Width: | Height: | Size: 31 KiB |
Binary file not shown.
After Width: | Height: | Size: 31 KiB |
Binary file not shown.
After Width: | Height: | Size: 14 KiB |
664
mode/doudizhu.js
664
mode/doudizhu.js
|
@ -27,6 +27,30 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
game.prepareArena(3);
|
game.prepareArena(3);
|
||||||
}
|
}
|
||||||
"step 1"
|
"step 1"
|
||||||
|
event.replacePile=function(){
|
||||||
|
var map={
|
||||||
|
shuiyanqijunx:'shuiyanqijuny',
|
||||||
|
bingliang:'binglinchengxia',
|
||||||
|
fangtian:'toushiche',
|
||||||
|
wutiesuolian:'toushiche',
|
||||||
|
};
|
||||||
|
for(var i=0;i<lib.card.list.length;i++){
|
||||||
|
var name=lib.card.list[i][2];
|
||||||
|
if(map[name]){
|
||||||
|
lib.card.list[i][2]=map[name];
|
||||||
|
lib.card.list[i][4]=null;
|
||||||
|
lib.card.list[i]._replaced=true;
|
||||||
|
}
|
||||||
|
else if(name=='lebu'){
|
||||||
|
switch(lib.card.list[i][0]){
|
||||||
|
case 'spade': lib.card.list[i][2]='shuiyanqijuny';break;
|
||||||
|
case 'club': lib.card.list[i][2]='luojingxiashi';break;
|
||||||
|
default: lib.card.list[i][2]='baiyidujiang';break;
|
||||||
|
}
|
||||||
|
lib.card.list[i]._replaced=true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
_status.mode=get.config('doudizhu_mode');
|
_status.mode=get.config('doudizhu_mode');
|
||||||
if(_status.connectMode){
|
if(_status.connectMode){
|
||||||
_status.mode=lib.configOL.doudizhu_mode;
|
_status.mode=lib.configOL.doudizhu_mode;
|
||||||
|
@ -34,6 +58,9 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
lib.configOL.number=3;
|
lib.configOL.number=3;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
else if(_status.mode=='binglin'){
|
||||||
|
event.replacePile();
|
||||||
|
}
|
||||||
else if(_status.mode=='online'){
|
else if(_status.mode=='online'){
|
||||||
lib.card.list=lib.online_cardPile.slice(0);
|
lib.card.list=lib.online_cardPile.slice(0);
|
||||||
lib.inpile.addArray(['nanman','wanjian','taoyuan','wugu']);
|
lib.inpile.addArray(['nanman','wanjian','taoyuan','wugu']);
|
||||||
|
@ -46,6 +73,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
lib.inpile.addArray(['nanman','wanjian','taoyuan','wugu']);
|
lib.inpile.addArray(['nanman','wanjian','taoyuan','wugu']);
|
||||||
game.fixedPile=true;
|
game.fixedPile=true;
|
||||||
}
|
}
|
||||||
|
else if(_status.mode=='binglin') event.replacePile();
|
||||||
if(lib.configOL.number<3){
|
if(lib.configOL.number<3){
|
||||||
lib.configOL.number=3;
|
lib.configOL.number=3;
|
||||||
}
|
}
|
||||||
|
@ -102,6 +130,11 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
return num;
|
return num;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
else if(_status.mode=='binglin'){
|
||||||
|
next.num=function(player){
|
||||||
|
return (player==game.zhu?5:4);
|
||||||
|
};
|
||||||
|
}
|
||||||
if(_status.mode!='online'&&_status.connectMode&&lib.configOL.change_card) game.replaceHandcards(game.players.slice(0));
|
if(_status.mode!='online'&&_status.connectMode&&lib.configOL.change_card) game.replaceHandcards(game.players.slice(0));
|
||||||
game.phaseLoop(game.zhu||_status.firstAct||game.me);
|
game.phaseLoop(game.zhu||_status.firstAct||game.me);
|
||||||
game.zhu.showGiveup();
|
game.zhu.showGiveup();
|
||||||
|
@ -196,6 +229,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
case 'normal':namex='休闲斗地主';break;
|
case 'normal':namex='休闲斗地主';break;
|
||||||
case 'kaihei':namex='开黑斗地主';break;
|
case 'kaihei':namex='开黑斗地主';break;
|
||||||
case 'huanle':namex='欢乐斗地主';break;
|
case 'huanle':namex='欢乐斗地主';break;
|
||||||
|
case 'binglin':namex='兵临城下';break;
|
||||||
case 'online':namex='智斗三国';break;
|
case 'online':namex='智斗三国';break;
|
||||||
}
|
}
|
||||||
var name=[
|
var name=[
|
||||||
|
@ -226,7 +260,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
checkResult:function(){
|
checkResult:function(){
|
||||||
var me=game.me._trueMe||game.me;
|
var me=game.me._trueMe||game.me;
|
||||||
if(game.zhu.isAlive()){
|
if(game.zhu.isAlive()){
|
||||||
if(_status.mode!='online'&&game.players.length>1) return;
|
if(_status.mode!='online'&&(_status.mode!='binglin'||game.roundNumber<3)&&game.players.length>1) return;
|
||||||
if(me==game.zhu){
|
if(me==game.zhu){
|
||||||
game.over(true);
|
game.over(true);
|
||||||
}
|
}
|
||||||
|
@ -288,7 +322,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
event.dialog=ui.create.dialog('你的选将框与底牌',[event.map[game.me.playerid],'character'],game.me.storage.doudizhu_cardPile);
|
event.dialog=ui.create.dialog('你的选将框与底牌',[event.map[game.me.playerid],'character'],game.me.storage.doudizhu_cardPile);
|
||||||
event.start=game.players.randomGet();
|
event.start=game.players.randomGet();
|
||||||
event.current=event.start;
|
event.current=event.start;
|
||||||
game.delay(4);
|
game.delay(7);
|
||||||
"step 2"
|
"step 2"
|
||||||
if(event.current==game.me) event.dialog.content.firstChild.innerHTML='是否叫地主?';
|
if(event.current==game.me) event.dialog.content.firstChild.innerHTML='是否叫地主?';
|
||||||
else{
|
else{
|
||||||
|
@ -354,7 +388,102 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
},500);
|
},500);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
chooseCharacterBinglin:function(){
|
||||||
|
var next=game.createEvent('chooseCharacter',false);
|
||||||
|
next.setContent(function(){
|
||||||
|
"step 0"
|
||||||
|
game.no_continue_game=true;
|
||||||
|
lib.init.onfree();
|
||||||
|
"step 1"
|
||||||
|
ui.arena.classList.add('choose-character');
|
||||||
|
game.zhuSkill='zhuSkill_'+['xiangyang','jiangling','fancheng'].randomGet();
|
||||||
|
var i;
|
||||||
|
event.list=[];
|
||||||
|
event.map={};
|
||||||
|
for(i in lib.character){
|
||||||
|
if(lib.filter.characterDisabled(i)) continue;
|
||||||
|
event.list.push(i);
|
||||||
|
}
|
||||||
|
event.list.randomSort();
|
||||||
|
_status.characterlist=event.list.slice(0);
|
||||||
|
for(var player of game.players){
|
||||||
|
event.map[player.playerid]=event.list.randomRemove(4);
|
||||||
|
}
|
||||||
|
event.controls=['不叫地主','一倍','两倍','三倍'];
|
||||||
|
event.dialog=ui.create.dialog('本局城池:'+get.translation(game.zhuSkill),[event.map[game.me.playerid],'character']);
|
||||||
|
event.start=game.players.randomGet();
|
||||||
|
event.current=event.start;
|
||||||
|
game.delay(8);
|
||||||
|
"step 2"
|
||||||
|
event.current.classList.add('glow_phase');
|
||||||
|
if(event.current==game.me) event.dialog.content.firstChild.innerHTML='是否叫地主?';
|
||||||
|
else{
|
||||||
|
event.dialog.content.firstChild.innerHTML='请等待其他玩家叫地主';
|
||||||
|
game.delay(2);
|
||||||
|
}
|
||||||
|
event.current.chooseControl(event.controls).set('ai',function(){
|
||||||
|
return _status.event.getParent().controls.randomGet();
|
||||||
|
});
|
||||||
|
"step 3"
|
||||||
|
event.current.classList.remove('glow_phase');
|
||||||
|
event.current._control=result.control;
|
||||||
|
event.current.chat(result.control);
|
||||||
|
if(result.control=='三倍'){
|
||||||
|
game.bonusNum=3;
|
||||||
|
game.zhu=event.current;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else if(result.control!='不叫地主'){
|
||||||
|
event.controls.splice(1,event.controls.indexOf(result.control));
|
||||||
|
event.tempDizhu=event.current;
|
||||||
|
if(result.control=='二倍') game.bonusNum=2;
|
||||||
|
}
|
||||||
|
event.current=event.current.next;
|
||||||
|
if(event.current==event.start){
|
||||||
|
game.zhu=event.tempDizhu||event.start.previous;
|
||||||
|
}
|
||||||
|
else event.goto(2);
|
||||||
|
if(event.current==event.start.previous&&!event.tempDizhu) event.controls.remove('不叫地主');
|
||||||
|
"step 4"
|
||||||
|
for(var player of game.players){
|
||||||
|
player.identity=player==game.zhu?'zhu':'fan';
|
||||||
|
player.showIdentity();
|
||||||
|
}
|
||||||
|
event.dialog.close();
|
||||||
|
event.map[game.zhu.playerid].addArray(event.list.randomRemove(3));
|
||||||
|
"step 5"
|
||||||
|
var list=['请选择你的武将',[event.map[game.me.playerid],'character']];
|
||||||
|
if(game.me.identity=='fan'){
|
||||||
|
var friend=game.findPlayer(function(current){
|
||||||
|
return current!=game.me&¤t.identity=='fan';
|
||||||
|
});
|
||||||
|
list.push('<div class="text center">队友的选将框</div>');
|
||||||
|
list.push([event.map[friend.playerid],'character']);
|
||||||
|
}
|
||||||
|
game.me.chooseButton(list,true).set('list',event.map[game.me.playerid]).set('filterButton',function(button){
|
||||||
|
return _status.event.list.contains(button.link);
|
||||||
|
});
|
||||||
|
"step 6"
|
||||||
|
game.me.init(result.links[0]);
|
||||||
|
for(var player of game.players){
|
||||||
|
if(player!=game.me) player.init(event.map[player.playerid].randomGet());
|
||||||
|
if(player==game.zhu){
|
||||||
|
player.addSkill(game.zhuSkill);
|
||||||
|
}
|
||||||
|
else player.addSkill(['binglin_shaxue','binglin_neihong']);
|
||||||
|
}
|
||||||
|
game.zhu.hp++;
|
||||||
|
game.zhu.maxHp++;
|
||||||
|
game.zhu.update();
|
||||||
|
for(var i=0;i<game.players.length;i++){
|
||||||
|
_status.characterlist.remove(game.players[i].name1);
|
||||||
|
_status.characterlist.remove(game.players[i].name2);
|
||||||
|
}
|
||||||
|
setTimeout(function(){
|
||||||
|
ui.arena.classList.remove('choose-character');
|
||||||
|
},500);
|
||||||
|
});
|
||||||
|
},
|
||||||
chooseCharacterHuanle:function(){
|
chooseCharacterHuanle:function(){
|
||||||
var next=game.createEvent('chooseCharacter',false);
|
var next=game.createEvent('chooseCharacter',false);
|
||||||
next.setContent(function(){
|
next.setContent(function(){
|
||||||
|
@ -532,6 +661,10 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
game.chooseCharacterZhidou();
|
game.chooseCharacterZhidou();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if(_status.mode=='binglin'){
|
||||||
|
game.chooseCharacterBinglin();
|
||||||
|
return;
|
||||||
|
}
|
||||||
var next=game.createEvent('chooseCharacter',false);
|
var next=game.createEvent('chooseCharacter',false);
|
||||||
next.showConfig=true;
|
next.showConfig=true;
|
||||||
next.addPlayer=function(player){
|
next.addPlayer=function(player){
|
||||||
|
@ -1013,7 +1146,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
if(player.identity=='fan') player._friend=(player.next.identity=='fan'?player.next:player.previous);
|
if(player.identity=='fan') player._friend=(player.next.identity=='fan'?player.next:player.previous);
|
||||||
map[player.playerid]=player._characterChoice;
|
map[player.playerid]=player._characterChoice;
|
||||||
}
|
}
|
||||||
game.broadcast(function(map){
|
game.broadcastAll(function(map){
|
||||||
for(var i in map){
|
for(var i in map){
|
||||||
lib.playerOL[i]._characterChoice=map[i];
|
lib.playerOL[i]._characterChoice=map[i];
|
||||||
}
|
}
|
||||||
|
@ -1203,6 +1336,150 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
},500);
|
},500);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
chooseCharacterBinglinOL:function(){
|
||||||
|
var next=game.createEvent('chooseCharacter',false);
|
||||||
|
next.setContent(function(){
|
||||||
|
"step 0"
|
||||||
|
ui.arena.classList.add('choose-character');
|
||||||
|
var i;
|
||||||
|
var libCharacter={};
|
||||||
|
for(var i=0;i<lib.configOL.characterPack.length;i++){
|
||||||
|
var pack=lib.characterPack[lib.configOL.characterPack[i]];
|
||||||
|
for(var j in pack){
|
||||||
|
if(j=='zuoci') continue;
|
||||||
|
if(lib.character[j]) libCharacter[j]=pack[j];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
event.list=[];
|
||||||
|
event.map={};
|
||||||
|
for(i in libCharacter){
|
||||||
|
if(lib.filter.characterDisabled(i,libCharacter)) continue;
|
||||||
|
event.list.push(i);
|
||||||
|
}
|
||||||
|
event.list.randomSort();
|
||||||
|
_status.characterlist=event.list.slice(0);
|
||||||
|
event.controls=['不叫地主','一倍','两倍','三倍'];
|
||||||
|
for(var player of game.players){
|
||||||
|
var id=player.playerid;
|
||||||
|
event.map[id]=event.list.randomRemove(4);
|
||||||
|
}
|
||||||
|
event.start=game.players.randomGet();
|
||||||
|
event.current=event.start;
|
||||||
|
|
||||||
|
event.videoId=lib.status.videoId++;
|
||||||
|
game.zhuSkill='zhuSkill_'+['xiangyang','jiangling','fancheng'].randomGet();
|
||||||
|
game.broadcastAll(function(map,id,skill){
|
||||||
|
ui.create.dialog('本局城池:'+get.translation(skill),[map[game.me.playerid],'character']).videoId=id;
|
||||||
|
},event.map,event.videoId,game.zhuSkill);
|
||||||
|
game.delay(6);
|
||||||
|
"step 1"
|
||||||
|
game.broadcastAll(function(id,current){
|
||||||
|
var dialog=get.idDialog(id);
|
||||||
|
if(dialog){
|
||||||
|
if(game.me==current) dialog.content.firstChild.innerHTML='是否叫地主?';
|
||||||
|
else dialog.content.firstChild.innerHTML='请等待其他玩家叫地主';
|
||||||
|
}
|
||||||
|
},event.videoId,event.current);
|
||||||
|
if(event.current!=game.me&&!event.current.isOnline()) game.delay(2);
|
||||||
|
event.current.chooseControl(event.controls).set('ai',function(){
|
||||||
|
return _status.event.getParent().controls.randomGet();
|
||||||
|
});
|
||||||
|
"step 2"
|
||||||
|
event.current._control=result.control;
|
||||||
|
event.current.chat(result.control);
|
||||||
|
if(result.control=='三倍'){
|
||||||
|
game.bonusNum=3;
|
||||||
|
game.zhu=event.current;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else if(result.control!='不叫地主'){
|
||||||
|
event.controls.splice(1,event.controls.indexOf(result.control));
|
||||||
|
event.tempDizhu=event.current;
|
||||||
|
if(result.control=='二倍') game.bonusNum=2;
|
||||||
|
}
|
||||||
|
event.current=event.current.next;
|
||||||
|
if(event.current==event.start){
|
||||||
|
game.zhu=event.tempDizhu||event.start;
|
||||||
|
}
|
||||||
|
else event.goto(1);
|
||||||
|
if(event.current==event.start.previous&&!event.tempDizhu) event.controls.remove('不叫地主');
|
||||||
|
"step 3"
|
||||||
|
for(var player of game.players){
|
||||||
|
player.identity=player==game.zhu?'zhu':'fan';
|
||||||
|
player.showIdentity();
|
||||||
|
player.identityShown=true;
|
||||||
|
player._characterChoice=event.map[player.playerid];
|
||||||
|
}
|
||||||
|
event.map[game.zhu.playerid].addArray(event.list.randomRemove(3));
|
||||||
|
game.broadcastAll(function(id,map){
|
||||||
|
var dialog=get.idDialog(id);
|
||||||
|
if(dialog) dialog.close();
|
||||||
|
game.me._characterChoice=map[game.me.playerid];
|
||||||
|
},event.videoId,event.map);
|
||||||
|
var list=[];
|
||||||
|
for(var i=0;i<game.players.length;i++){
|
||||||
|
var dialog=['请选择武将',[event.map[game.players[i].playerid],'character']];
|
||||||
|
if(game.players[i].identity=='fan'){
|
||||||
|
var friend=game.findPlayer(function(current){
|
||||||
|
return current!=game.players[i]&¤t.identity=='fan';
|
||||||
|
});
|
||||||
|
dialog.push('<div class="text center">队友的选将框</div>');
|
||||||
|
dialog.push([event.map[friend.playerid],'character']);
|
||||||
|
}
|
||||||
|
list.push([game.players[i],dialog,true,function(){return Math.random()},function(button){
|
||||||
|
return _status.event.player._characterChoice.contains(button.link);
|
||||||
|
}]);
|
||||||
|
}
|
||||||
|
game.me.chooseButtonOL(list,function(player,result){
|
||||||
|
if(game.online||player==game.me) player.init(result.links[0]);
|
||||||
|
});
|
||||||
|
"step 4"
|
||||||
|
for(var i in lib.playerOL){
|
||||||
|
if(!result[i]||result[i]=='ai'||!result[i].links||!result[i].links.length){
|
||||||
|
result[i]=event.map[i].randomGet();
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
result[i]=result[i].links[0];
|
||||||
|
}
|
||||||
|
if(!lib.playerOL[i].name){
|
||||||
|
lib.playerOL[i].init(result[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
game.zhu.maxHp++;
|
||||||
|
game.zhu.hp++;
|
||||||
|
game.zhu.update();
|
||||||
|
|
||||||
|
game.broadcast(function(result,zhu){
|
||||||
|
for(var i in result){
|
||||||
|
if(!lib.playerOL[i].name){
|
||||||
|
lib.playerOL[i].init(result[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
game.zhu=zhu;
|
||||||
|
zhu.maxHp++;
|
||||||
|
zhu.hp++;
|
||||||
|
zhu.update();
|
||||||
|
|
||||||
|
setTimeout(function(){
|
||||||
|
ui.arena.classList.remove('choose-character');
|
||||||
|
},500);
|
||||||
|
},result,game.zhu);
|
||||||
|
for(var player of game.players){
|
||||||
|
if(player==game.zhu){
|
||||||
|
player.addSkill(game.zhuSkill);
|
||||||
|
}
|
||||||
|
else player.addSkill(['binglin_shaxue','binglin_neihong']);
|
||||||
|
}
|
||||||
|
for(var i=0;i<game.players.length;i++){
|
||||||
|
_status.characterlist.remove(game.players[i].name1);
|
||||||
|
_status.characterlist.remove(game.players[i].name2);
|
||||||
|
}
|
||||||
|
setTimeout(function(){
|
||||||
|
ui.arena.classList.remove('choose-character');
|
||||||
|
},500);
|
||||||
|
});
|
||||||
|
},
|
||||||
chooseCharacterZhidouOL:function(){
|
chooseCharacterZhidouOL:function(){
|
||||||
var next=game.createEvent('chooseCharacter',false);
|
var next=game.createEvent('chooseCharacter',false);
|
||||||
next.setContent(function(){
|
next.setContent(function(){
|
||||||
|
@ -1355,6 +1632,10 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
game.chooseCharacterZhidouOL();
|
game.chooseCharacterZhidouOL();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
else if(_status.mode=='binglin'){
|
||||||
|
game.chooseCharacterBinglinOL();
|
||||||
|
return;
|
||||||
|
}
|
||||||
var next=game.createEvent('chooseCharacter',false);
|
var next=game.createEvent('chooseCharacter',false);
|
||||||
next.setContent(function(){
|
next.setContent(function(){
|
||||||
"step 0"
|
"step 0"
|
||||||
|
@ -1509,6 +1790,29 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
zhadan_info:'当一张牌被使用时,对此牌使用。取消此牌的所有目标,且本局游戏的底价翻倍。',
|
zhadan_info:'当一张牌被使用时,对此牌使用。取消此牌的所有目标,且本局游戏的底价翻倍。',
|
||||||
jiwangkailai:'继往开来',
|
jiwangkailai:'继往开来',
|
||||||
jiwangkailai_info:'出牌阶段,对包含你自己在内的一名角色使用。目标角色选择一项:①弃置所有手牌,然后摸等量的牌。②将所有手牌当做一张不为【继往开来】的普通锦囊牌使用。',
|
jiwangkailai_info:'出牌阶段,对包含你自己在内的一名角色使用。目标角色选择一项:①弃置所有手牌,然后摸等量的牌。②将所有手牌当做一张不为【继往开来】的普通锦囊牌使用。',
|
||||||
|
zhuSkill_xiangyang:'襄阳',
|
||||||
|
zhuSkill_xiangyang_info:'回合结束时,你可获得一个额外的出牌阶段或摸牌阶段。',
|
||||||
|
zhuSkill_jiangling:'江陵',
|
||||||
|
zhuSkill_jiangling_info:'当你使用【杀】或普通锦囊牌选择唯一目标时,你可为此牌增加一个目标。',
|
||||||
|
zhuSkill_fancheng:'樊城',
|
||||||
|
zhuSkill_fancheng2:'樊城',
|
||||||
|
zhuSkill_fancheng_info:'限定技,出牌阶段,你可获得如下效果:每回合限两次,当你造成伤害时,此伤害+1。',
|
||||||
|
binglin_shaxue:'歃血',
|
||||||
|
binglin_shaxue_info:'锁定技,每局游戏限三次,当你受到队友造成的伤害时,你防止此伤害。',
|
||||||
|
binglin_neihong:'内讧',
|
||||||
|
binglin_neihong_info:'锁定技,当你杀死队友后,你所在的阵营视为游戏失败。',
|
||||||
|
baiyidujiang:'白衣渡江',
|
||||||
|
baiyidujiang_info:'出牌阶段,对地主使用。你选择一项:①令其将手牌数摸至全场最多。②令其将手牌数弃置至全场最少。',
|
||||||
|
shuiyanqijuny:'水淹七军',
|
||||||
|
shuiyanqijuny_info:'出牌阶段,对至多两名角色使用。目标角色受到1点雷属性伤害,然后若其:是第一个目标,其弃置一张牌;不是第一个目标,其摸一张牌。',
|
||||||
|
luojingxiashi:'落井下石',
|
||||||
|
luojingxiashi_info:'出牌阶段,对所有其他的已受伤角色使用。目标角色受到1点伤害。',
|
||||||
|
binglinchengxia:'兵临城下',
|
||||||
|
binglinchengxia_info:'出牌阶段,对一名其他角色使用。将此牌横置于目标角色的判定区内。目标角色于判定阶段进行判定,若判定结果不为♦,则其弃置装备区内的所有牌或受到1点伤害。',
|
||||||
|
toushiche:'投石车',
|
||||||
|
toushiche_skill:'投石车',
|
||||||
|
toushiche_info:'锁定技,结束阶段开始时,你令所有手牌数大于你的角色依次弃置一张手牌。',
|
||||||
|
_binglin_bingjin:'兵尽',
|
||||||
},
|
},
|
||||||
element:{
|
element:{
|
||||||
player:{
|
player:{
|
||||||
|
@ -1555,7 +1859,15 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
dieAfter:function(source){
|
dieAfter:function(source){
|
||||||
game.checkResult();
|
if(_status.mode=='binglin'&&source&&this!=source&&this.identity==source.identity&&source.hasSkill('binglin_neihong')){
|
||||||
|
if(game.me==game.zhu){
|
||||||
|
game.over(true);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
game.over(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else game.checkResult();
|
||||||
},
|
},
|
||||||
logAi:function(targets,card){},
|
logAi:function(targets,card){},
|
||||||
showIdentity:function(){
|
showIdentity:function(){
|
||||||
|
@ -1586,6 +1898,138 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
skill:{
|
skill:{
|
||||||
|
_binglin_bingjin:{
|
||||||
|
trigger:{player:'phaseEnd'},
|
||||||
|
forced:true,
|
||||||
|
ruleSkill:true,
|
||||||
|
filter:function(event,player){
|
||||||
|
return game.roundNumber>14;
|
||||||
|
},
|
||||||
|
content:function(){
|
||||||
|
player.loseHp();
|
||||||
|
},
|
||||||
|
},
|
||||||
|
zhuSkill_xiangyang:{
|
||||||
|
trigger:{player:'phaseEnd'},
|
||||||
|
charlotte:true,
|
||||||
|
direct:true,
|
||||||
|
content:function(){
|
||||||
|
'step 0'
|
||||||
|
player.chooseControl('摸牌阶段','出牌阶段','cancel2').set('prompt','襄阳:是否执行一个额外的阶段?');
|
||||||
|
'step 1'
|
||||||
|
if(result.control!='cancel2'){
|
||||||
|
player.logSkill(event.name);
|
||||||
|
var next=player[result.index?'phaseUse':'phaseDraw']();
|
||||||
|
event.next.remove(next);
|
||||||
|
trigger.next.push(next);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
zhuSkill_jiangling:{
|
||||||
|
trigger:{player:'useCard2'},
|
||||||
|
direct:true,
|
||||||
|
charlotte:true,
|
||||||
|
filter:function(event,player){
|
||||||
|
if(event.card.name!='sha'&&get.type(event.card)!='trick') return false;
|
||||||
|
if(!event.targets||event.targets.length!=1) return false;
|
||||||
|
var info=get.info(event.card);
|
||||||
|
if(info.allowMultiple==false) return false;
|
||||||
|
if(event.targets&&!info.multitarget){
|
||||||
|
if(game.hasPlayer(function(current){
|
||||||
|
return !event.targets.contains(current)&&lib.filter.targetEnabled2(event.card,player,current)&&lib.filter.targetInRange(event.card,player,current);
|
||||||
|
})){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
},
|
||||||
|
content:function(){
|
||||||
|
'step 0'
|
||||||
|
var prompt2='为'+get.translation(trigger.card)+'增加一个目标'
|
||||||
|
player.chooseTarget(get.prompt('zhuSkill_jiangling'),function(card,player,target){
|
||||||
|
var player=_status.event.player;
|
||||||
|
if(_status.event.targets.contains(target)) return false;
|
||||||
|
return lib.filter.targetEnabled2(_status.event.card,player,target)&&lib.filter.targetInRange(_status.event.card,player,target);
|
||||||
|
}).set('prompt2',prompt2).set('ai',function(target){
|
||||||
|
var trigger=_status.event.getTrigger();
|
||||||
|
var player=_status.event.player;
|
||||||
|
return get.effect(target,trigger.card,player,player)*(_status.event.targets.contains(target)?-1:1);
|
||||||
|
}).set('targets',trigger.targets).set('card',trigger.card);
|
||||||
|
'step 1'
|
||||||
|
if(result.bool){
|
||||||
|
if(!event.isMine()&&!event.isOnline()) game.delayx();
|
||||||
|
event.targets=result.targets;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
event.finish();
|
||||||
|
}
|
||||||
|
'step 2'
|
||||||
|
if(event.targets){
|
||||||
|
player.logSkill('zhuSkill_jiangling',event.targets);
|
||||||
|
if(trigger.targets.contains(event.targets[0])) trigger.targets.removeArray(event.targets);
|
||||||
|
else trigger.targets.addArray(event.targets);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
zhuSkill_fancheng:{
|
||||||
|
enable:'phaseUse',
|
||||||
|
limited:true,
|
||||||
|
charlotte:true,
|
||||||
|
skillAnimation:true,
|
||||||
|
animationColor:'gray',
|
||||||
|
content:function(){
|
||||||
|
player.awakenSkill('zhuSkill_fancheng');
|
||||||
|
player.addTempSkill('zhuSkill_fancheng2');
|
||||||
|
},
|
||||||
|
},
|
||||||
|
zhuSkill_fancheng2:{
|
||||||
|
trigger:{source:'damageBegin2'},
|
||||||
|
forced:true,
|
||||||
|
charlotte:true,
|
||||||
|
usable:2,
|
||||||
|
logTarget:'player',
|
||||||
|
content:function(){
|
||||||
|
trigger.num++;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
binglin_shaxue:{
|
||||||
|
init:function(player,skill){
|
||||||
|
player.addMark(skill,3,false);
|
||||||
|
},
|
||||||
|
trigger:{player:'damageBegin3'},
|
||||||
|
forced:true,
|
||||||
|
charlotte:true,
|
||||||
|
filter:function(event,player){
|
||||||
|
return event.source&&player!=event.source&&player.identity==event.source.identity&&player.countMark('binglin_shaxue')>0;
|
||||||
|
},
|
||||||
|
content:function(){
|
||||||
|
trigger.cancel();
|
||||||
|
player.removeMark('binglin_shaxue',1,false);
|
||||||
|
},
|
||||||
|
intro:{content:'剩余次数:#'},
|
||||||
|
},
|
||||||
|
binglin_neihong:{charlotte:true},
|
||||||
|
toushiche_skill:{
|
||||||
|
trigger:{player:'phaseJieshuBegin'},
|
||||||
|
forced:true,
|
||||||
|
filter:function(event,player){
|
||||||
|
return lib.skill.toushiche_skill.logTarget(null,player).length>0;
|
||||||
|
},
|
||||||
|
logTarget:function(event,player){
|
||||||
|
var hs=player.countCards('h');
|
||||||
|
return game.filterPlayer(function(current){
|
||||||
|
return current!=player&¤t.countCards('h')>hs;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
content:function(){
|
||||||
|
'step 0'
|
||||||
|
event.targets=lib.skill.toushiche_skill.logTarget(null,player).sortBySeat();
|
||||||
|
'step 1'
|
||||||
|
var target=targets.shift();
|
||||||
|
if(target.countCards('h')>0) target.chooseToDiscard('h',true);
|
||||||
|
if(targets.length) event.redo();
|
||||||
|
},
|
||||||
|
},
|
||||||
_gongshoujintui:{
|
_gongshoujintui:{
|
||||||
enable:'chooseToUse',
|
enable:'chooseToUse',
|
||||||
filter:function(event,player){
|
filter:function(event,player){
|
||||||
|
@ -1713,7 +2157,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
trigger:{player:'phaseJudgeBegin'},
|
trigger:{player:'phaseJudgeBegin'},
|
||||||
direct:true,
|
direct:true,
|
||||||
filter:function(event,player){
|
filter:function(event,player){
|
||||||
return _status.mode!='online'&&player==game.zhu&&player.countCards('j')&&player.countCards('h')>1;
|
return _status.mode!='online'&&_status.mode!='binglin'&&player==game.zhu&&player.countCards('j')&&player.countCards('h')>1;
|
||||||
},
|
},
|
||||||
content:function(){
|
content:function(){
|
||||||
"step 0"
|
"step 0"
|
||||||
|
@ -1730,14 +2174,14 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
trigger:{player:'phaseZhunbeiBegin'},
|
trigger:{player:'phaseZhunbeiBegin'},
|
||||||
forced:true,
|
forced:true,
|
||||||
filter:function(event,player){
|
filter:function(event,player){
|
||||||
return _status.mode!='online'&&player==game.zhu;
|
return _status.mode!='online'&&_status.mode!='binglin'&&player==game.zhu;
|
||||||
},
|
},
|
||||||
content:function(){
|
content:function(){
|
||||||
player.draw();
|
player.draw();
|
||||||
},
|
},
|
||||||
mod:{
|
mod:{
|
||||||
cardUsable:function(card,player,num){
|
cardUsable:function(card,player,num){
|
||||||
if(_status.mode!='online'&&player==game.zhu&&card.name=='sha') return num+1;
|
if(_status.mode!='online'&&_status.mode!='binglin'&&player==game.zhu&&card.name=='sha') return num+1;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -1747,7 +2191,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
silent:true,
|
silent:true,
|
||||||
popup:false,
|
popup:false,
|
||||||
filter:function(event,player){
|
filter:function(event,player){
|
||||||
return _status.mode!='online'&&event.player.identity==player.identity;
|
return _status.mode!='online'&&_status.mode!='binglin'&&event.player.identity==player.identity;
|
||||||
},
|
},
|
||||||
content:function(){
|
content:function(){
|
||||||
player.chooseDrawRecover(2);
|
player.chooseDrawRecover(2);
|
||||||
|
@ -2060,6 +2504,208 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
card:{
|
card:{
|
||||||
|
baiyidujiang:{
|
||||||
|
fullskin:true,
|
||||||
|
enable:true,
|
||||||
|
filterTarget:function(card,player,target){
|
||||||
|
return target==game.zhu;
|
||||||
|
},
|
||||||
|
selectTarget:-1,
|
||||||
|
type:'trick',
|
||||||
|
content:function(){
|
||||||
|
'step 0'
|
||||||
|
if(!player.isIn()||!target.isIn()){
|
||||||
|
event.finish();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var num1=0,num2=Infinity,str=get.translation(target);
|
||||||
|
game.countPlayer(function(current){
|
||||||
|
var num=current.countCards('h');
|
||||||
|
if(num>num1) num1=num;
|
||||||
|
if(num<num2) num2=num;
|
||||||
|
});
|
||||||
|
var num=target.countCards('h'),choices=[];
|
||||||
|
event.addIndex=0;
|
||||||
|
if(num<num1){
|
||||||
|
choices.push('令'+str+'将手牌摸至'+get.cnNumber(num1)+'张');
|
||||||
|
event.num1=num1;
|
||||||
|
}
|
||||||
|
else event.addIndex++;
|
||||||
|
if(num>num2){
|
||||||
|
choices.push('令'+str+'将手牌弃置至'+get.cnNumber(num2)+'张');
|
||||||
|
event.num2=num2;
|
||||||
|
}
|
||||||
|
if(!choices.length) event.finish();
|
||||||
|
else if(choices.length==1) event._result={index:0};
|
||||||
|
else player.chooseControl().set('choiceList',choices).set('ai',function(){
|
||||||
|
var evt=_status.event.getParent();
|
||||||
|
return get.attitude(evt.player,evt.target)>0?1:0;
|
||||||
|
});
|
||||||
|
'step 1'
|
||||||
|
if(result.index+event.addIndex==0){
|
||||||
|
target.drawTo(event.num1);
|
||||||
|
}
|
||||||
|
else target.chooseToDiscard(true,'h',target.countCards('h')-event.num2);
|
||||||
|
},
|
||||||
|
ai:{
|
||||||
|
order:6,
|
||||||
|
value:4,
|
||||||
|
useful:2,
|
||||||
|
tag:{
|
||||||
|
draw:1,
|
||||||
|
loseCard:1,
|
||||||
|
},
|
||||||
|
result:{
|
||||||
|
target:function(player,target,card,isLink){
|
||||||
|
var num1=0,num2=Infinity,str=get.translation(target);
|
||||||
|
game.countPlayer(function(current){
|
||||||
|
var num=current.countCards('h',function(cardx){
|
||||||
|
if(ui.selected.cards.contains(cardx)) return false;
|
||||||
|
if(card.cards&&card.cards.contains(cardx)) return false;
|
||||||
|
return true;
|
||||||
|
});
|
||||||
|
if(num>num1) num1=num;
|
||||||
|
if(num<num2) num2=num;
|
||||||
|
});
|
||||||
|
var num=target.countCards('h',function(cardx){
|
||||||
|
if(ui.selected.cards.contains(cardx)) return false;
|
||||||
|
if(card.cards&&card.cards.contains(cardx)) return false;
|
||||||
|
return true;
|
||||||
|
});
|
||||||
|
if(num1>num){
|
||||||
|
if(get.attitude(player,target)>0) return (num1-num)/1.2;
|
||||||
|
}
|
||||||
|
if(num2<num){
|
||||||
|
if(get.attitude(player,target)>0) return (num2-num)/1.2;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
shuiyanqijuny:{
|
||||||
|
fullskin:true,
|
||||||
|
cardimage:'shuiyanqijunx',
|
||||||
|
enable:true,
|
||||||
|
filterTarget:true,
|
||||||
|
type:'trick',
|
||||||
|
selectTarget:[1,2],
|
||||||
|
content:function(){
|
||||||
|
target.damage('thunder');
|
||||||
|
if(num>0) target.draw();
|
||||||
|
else target.chooseToDiscard('he',true);
|
||||||
|
},
|
||||||
|
ai:{
|
||||||
|
order:6,
|
||||||
|
value:4,
|
||||||
|
useful:2,
|
||||||
|
tag:{
|
||||||
|
damage:1,
|
||||||
|
thunderDamage:1,
|
||||||
|
natureDamage:1,
|
||||||
|
loseCard:1,
|
||||||
|
},
|
||||||
|
result:{
|
||||||
|
target:function(player,target){
|
||||||
|
if(!ui.selected.targets.length) return -1.5;
|
||||||
|
return -0.5
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
luojingxiashi:{
|
||||||
|
fullskin:true,
|
||||||
|
enable:true,
|
||||||
|
type:'trick',
|
||||||
|
selectTarget:-1,
|
||||||
|
filterTarget:function(card,player,target){
|
||||||
|
return target!=player&&target.isDamaged();
|
||||||
|
},
|
||||||
|
content:function(){
|
||||||
|
target.damage();
|
||||||
|
},
|
||||||
|
ai:{
|
||||||
|
order:3,
|
||||||
|
value:4,
|
||||||
|
useful:2,
|
||||||
|
tag:{
|
||||||
|
loseCard:1,
|
||||||
|
},
|
||||||
|
result:{
|
||||||
|
target:-1.5,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
binglinchengxia:{
|
||||||
|
fullskin:true,
|
||||||
|
type:'delay',
|
||||||
|
filterTarget:function(card,player,target){
|
||||||
|
return (lib.filter.judge(card,player,target)&&player!=target);
|
||||||
|
},
|
||||||
|
judge:function(card){
|
||||||
|
if(get.suit(card)=='diamond') return 0;
|
||||||
|
return -3;
|
||||||
|
},
|
||||||
|
effect:function(){
|
||||||
|
'step 0'
|
||||||
|
if(result.bool==false){
|
||||||
|
if(!player.countCards('e',function(card){
|
||||||
|
return lib.filter.cardDiscardable(card,player,'shuiyanqijuny');
|
||||||
|
})){
|
||||||
|
player.damage('nosource');
|
||||||
|
event.finish();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else player.chooseControl('discard_card','take_damage',function(event,player){
|
||||||
|
if(get.damageEffect(player,event.player,player)>=0){
|
||||||
|
return 'take_damage';
|
||||||
|
}
|
||||||
|
if(player.hp>=3&&player.countCards('e')>=2){
|
||||||
|
return 'take_damage';
|
||||||
|
}
|
||||||
|
return 'discard_card';
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else event.finish();
|
||||||
|
'step 1'
|
||||||
|
if(result.control=='discard_card'){
|
||||||
|
player.discard(player.getCards('e',function(card){
|
||||||
|
return lib.filter.cardDiscardable(card,player,'shuiyanqijuny');
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
else player.damage('nosource');
|
||||||
|
},
|
||||||
|
ai:{
|
||||||
|
order:1,
|
||||||
|
value:3,
|
||||||
|
useful:2,
|
||||||
|
tag:{
|
||||||
|
damage:1,
|
||||||
|
loseCard:1,
|
||||||
|
},
|
||||||
|
result:{
|
||||||
|
target:function(player,target,card,isLink){
|
||||||
|
var es=target.getCards('e');
|
||||||
|
if(!es.length) return -1.5;
|
||||||
|
var val=0;
|
||||||
|
for(var i of es) val+=get.value(i,target);
|
||||||
|
return -Math.min(1.5,val/5);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
toushiche:{
|
||||||
|
fullskin:true,
|
||||||
|
type:'equip',
|
||||||
|
subtype:'equip1',
|
||||||
|
distance:{attackFrom:-3},
|
||||||
|
ai:{
|
||||||
|
basic:{
|
||||||
|
equipValue:2.5
|
||||||
|
}
|
||||||
|
},
|
||||||
|
skills:['toushiche_skill']
|
||||||
|
},
|
||||||
gongshoujianbei:{
|
gongshoujianbei:{
|
||||||
fullskin:true,
|
fullskin:true,
|
||||||
type:'trick',
|
type:'trick',
|
||||||
|
|
Loading…
Reference in New Issue