This commit is contained in:
Spmario233 2020-12-09 21:40:44 +08:00
parent d1d4592afb
commit 2f82f5be27
27 changed files with 1293 additions and 483 deletions

View File

@ -1693,7 +1693,8 @@ game.import('card',function(lib,game,ui,get,ai,_status){
onremove:true,
trigger:{
player:['damage','damageCancelled','damageZero'],
target:['shaMiss','useCardToExcluded','shaEnd'],
source:['damage','damageCancelled','damageZero'],
target:['shaMiss','useCardToExcluded','useCardToEnd'],
global:['useCardEnd'],
},
charlotte:true,

View File

@ -71,13 +71,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
ns_yuanxi:['male','qun',4,['nsshengyan','nsdaizhan']],
ns_caoshuang:['male','wei',4,['nsjiquan','nsfuwei']],
ns_lijue:['male','qun','4/6',['nsfeixiong','nscesuan']],
ns_zhangji:['male','qun',4,['nslulve']],
ns_fanchou:['male','qun',4,['nsyangwu']],
ns_jiaxu:['male','qun',3,['nsyice','luanwu']],
ns_zhangwei:['female','shu',3,['nsqiyue','nsxuezhu']],
ns_chendao:['male','shu',4,['nsjianglie']],
yj_caoang:['male','wei',4,['yjxuepin']],
diy_wenyang:['male','wei','4/6',['lvli','choujue']],
// diy_caocao:['male','wei',4,['xicai','diyjianxiong','hujia']],
// diy_hanlong:['male','wei',4,['siji','ciqiu']],
@ -176,7 +170,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
diy_fakenews:["diy_wenyang","ns_zhangwei","ns_caimao"],
diy_default:["diy_feishi","diy_liuyan","diy_yuji","diy_caiwenji","diy_lukang","diy_zhenji","diy_liufu","diy_xizhenxihong","diy_liuzan","diy_zaozhirenjun","diy_yangyi","diy_tianyu"],
diy_key:["key_lucia","key_kyousuke","key_yuri","key_haruko","key_umi","key_rei","key_komari","key_yukine","key_yusa","key_misa","key_masato","key_iwasawa","key_kengo","key_yoshino","key_yui","key_tsumugi","key_saya","key_harukakanata","key_inari","key_shiina","key_sunohara","key_rin","key_sasami","key_akane","key_doruji","key_yuiko","key_riki","key_hisako","key_hinata","key_noda","key_tomoya","key_nagisa","key_ayato","key_ao","key_yuzuru","sp_key_kanade","key_mio","key_midori","key_kyoko","key_shizuru","key_shiorimiyuki","key_miki","key_shiori","key_kaori","sp_key_yuri","key_akiko","key_abyusa","key_godan","key_yuu","key_ryoichi","key_kotori","key_jojiro","key_shiroha","key_shizuku"],
diy_official:["ns_chendao","yj_caoang","ns_jiaxu","ns_lijue","ns_zhangji","ns_fanchou"],
diy_trashbin:['old_jiakui','ol_guohuai','junk_zhangrang'],
},
},
@ -6541,230 +6534,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
},
nsyangwu:{
enable:'phaseUse',
usable:1,
filterCard:{suit:'heart'},
filterTarget:function(card,player,target){
return target!=player&&target.countCards('h')>player.countCards('h');
},
filter:function(event,player){
var info=lib.skill.nsyangwu;
return player.countCards('h',info.filterCard)&&game.hasPlayer(function(target){
return info.filterTarget(null,player,target);
});
},
check:function(card){
var num=0;
var player=_status.event.player;
game.countPlayer(function(current){
if(current!=player&&get.attitude(player,current)<0) num=Math.max(num,current.countCards('h')-player.countCards('h'));
});
return Math.ceil((num+1)/2)*2+4-get.value(card);
},
content:function(){
var num=Math.ceil((target.countCards('h')-player.countCards('h'))/2);
if(num) player.gainPlayerCard(target,true,'h',num,'visible');
},
ai:{
order:4,
result:{
target:function(player,target){
return player.countCards('h')-target.countCards('h');
},
},
},
},
nslulve:{
enable:'phaseUse',
usable:1,
filter:function(event,player){
return game.hasPlayer(function(current){
return current.countCards('e')>0&&current.countCards('e')<=player.countCards('he');
});
},
filterCard:function(){
if(ui.selected.targets.length) return false;
return true;
},
position:'he',
selectCard:[1,Infinity],
complexSelect:true,
complexCard:true,
filterTarget:function(card,player,target){
return target!=player&&target.countCards('e')>0&&ui.selected.cards.length==target.countCards('e');
},
check:function(card){
var player=_status.event.player;
if(game.hasPlayer(function(current){
return current!=player&&current.countCards('e')>0&&ui.selected.cards.length==current.countCards('e')&&get.damageEffect(current,player,player)>0;
})) return 0;
switch(ui.selected.cards.length){
case 0:return 8-get.value(card);
case 1:return 6-get.value(card);
case 2:return 3-get.value(card);
default:return 0;
}
},
content:function(){
target.damage('nocard');
},
ai:{
damage:true,
order:2,
result:{
target:function(player,target){
return get.damageEffect(target,player);
}
},
expose:0.3
}
},
nsfeixiong:{
trigger:{player:'phaseUseBegin'},
direct:true,
filter:function(event,player){
return player.countCards('h')>0&&game.hasPlayer(function(current){
return current!=player&&player.canCompare(current);
});
},
content:function(){
'step 0'
player.chooseTarget(get.prompt2('nsfeixiong'),function(card,player,target){
return player!=target&&player.canCompare(target);
}).set('ai',function(target){
var player=_status.event.player;
var hs=player.getCards('h').sort(function(a,b){
return b.number-a.number;
});
var ts=target.getCards('h').sort(function(a,b){
return b.number-a.number;
});
if(!hs.length||!ts.length) return 0;
if(hs[0].number>ts[0].number) return get.damageEffect(target,player,player);
return 0;
});
'step 1'
if(result.bool){
var target=result.targets[0];
event.target=target;
player.logSkill('nsfeixiong',target);
player.chooseToCompare(target);
}
else event.finish();
'step 2'
if(!result.tie){
var targets=[player,target];
if(result.bool) targets.reverse();
targets[0].damage(targets[1]);
}
},
},
nscesuan:{
trigger:{player:'damageBegin3'},
forced:true,
content:function(){
'step 0'
trigger.cancel();
event.lose=player.loseMaxHp();
'step 1'
if(event.lose&&event.lose.loseHp) player.draw();
},
ai:{
filterDamage:true,
skillTagFilter:function(player,tag,arg){
if(arg&&arg.player){
if(arg.player.hasSkillTag('jueqing',false,player)) return false;
}
},
},
},
nsyice:{
trigger:{
player:'loseAfter',
global:'cardsDiscardAfter',
},
filter:function(event,player){
if(event.name=='lose'){
if(event.type!='discard') return false;
}
else{
var evt=event.getParent();
if(evt.name!='orderingDiscard'||!evt.relatedEvent||evt.relatedEvent.player!=player||!['useCard','respond'].contains(evt.relatedEvent.name)) return false;
}
return (event.cards2||event.cards).filterInD('d').length>0;
},
forced:true,
content:function(){
'step 0'
var evt=trigger.getParent().relatedEvent;
if((trigger.name=='discard'&&!trigger.delay)||evt&&evt.name=='respond') game.delayx();
'step 1'
var cards=(trigger.cards2||trigger.cards).filterInD('d');
player.$gain2(cards);
if(cards.length==1) event._result={bool:true,links:cards};
else{
var dialog=['遗策:选择要放置的卡牌','<div class="text center">(从左到右为从旧到新,后选择的后置入)</div>',cards];
var cards2=player.getStorage('nsyice');
if(cards2.length){
dialog.push('<div class="text center">原有“策”</div>');
dialog.push(cards2);
}
player.chooseButton(dialog,true,cards.length).set('filterButton',function(button){
return _status.event.cards.contains(button.link);
}).set('cards',cards);
}
'step 2'
game.cardsGotoSpecial(result.links);
player.markAuto('nsyice',result.links);
game.delayx();
'step 3'
var storage=player.storage.nsyice;
var bool=false;
for(var i=0;i<storage.length;i++){
for(var j=storage.length-1;j>i;j--){
if(get.number(storage[i])==get.number(storage[j])){
bool=true;
break;
}
}
if(bool) break;
}
if(bool){
event.cards=storage.slice(0);
event.cards=storage.splice(i,j-i+1);
player.unmarkAuto('nsyice',event.cards);
}
else event.finish();
'step 4'
var cardsx=[];
cardsx.push(cards.shift());
cardsx.push(cards.pop());
if(cards.length) player.gain(cards,'gain2');
event.cards=cardsx;
'step 5'
player.chooseButton(['将一张牌置于牌堆顶,将另一张牌置于牌堆底',cards],true);
'step 6'
ui.cardPile.insertBefore(result.links[0].fix(),ui.cardPile.firstChild);
cards.remove(result.links[0]);
ui.cardPile.appendChild(cards[0].fix());
game.updateRoundNumber();
if(_status.dying.length) event.finish();
'step 7'
player.chooseTarget('对一名角色造成1点伤害',true).set('ai',function(target){
var player=_status.event.player;
return get.damageEffect(target,player,player);
});
'step 8'
if(result.bool){
var target=result.targets[0];
player.line(target);
target.damage('nocard');
}
},
marktext:'策',
intro:{content:'cards'},
},
junktaoluan:{
audio:'taoluan',
enable:'chooseToUse',
@ -7015,67 +6784,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
junktaoluan_backup:{},
yjxuepin:{
enable:'phaseUse',
usable:1,
filterTarget:function(event,player,target){
return player.inRange(target);
},
content:function(){
'step 0'
player.loseHp();
'step 1'
if(target.countDiscardableCards(player,'he')>0) player.discardPlayerCard(target,2,'he',true);
else event.finish();
'step 2'
if(result.bool&&result.cards.length==2&&get.type2(result.cards[0],result.cards[0].original=='h'?target:false)==get.type2(result.cards[1],result.cards[1].original=='h'?target:false)) player.recover();
},
ai:{
order:4,
result:{
player:function(player,target){
if(player.hp==1) return -4;
if(target.countCards('e')>1) return 0;
if(player.hp>2||target.countCards('h')>1) return -0.5;
return -2;
},
target:function(player,target){
return -2;
},
},
},
},
nsjianglie:{
trigger:{player:'useCardToPlayered'},
filter:function(event,player){
return event.card.name=='sha'&&event.target.countCards('h')>0;
},
check:function(event,player){
return get.attitude(player,event.target)<0;
},
logTarget:'target',
content:function(){
'step 0'
trigger.target.showHandcards();
'step 1'
var cards=trigger.target.getCards('h');
var list=[];
for(var i=0;i<cards.length;i++){
list.add(get.color(cards[i]));
}
if(list.length==1) event._result={control:list[0]};
else{
list.sort();
trigger.target.chooseControl(list).set('prompt','选择弃置一种颜色的所有手牌').set('ai',function(){
var player=_status.event.player;
if(get.value(player.getCards('h',{color:'red'}))>=get.value(player.getCards('h',{color:'black'}))) return 'black';
return 'red';
});
}
'step 2'
trigger.target.discard(trigger.target.getCards('h',{color:result.control}));
},
},
ns_chuanshu:{
audio:["xingshuai",2],
trigger:{
@ -11753,6 +11462,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return str;
},
},
characterReplace:{
key_yuri:['key_yuri','sp_key_yuri'],
kanade:['sp_key_kanade','kanade'],
},
translate:{
diy_liufu:'刘馥',
diy_xizhenxihong:'习珍习宏',
@ -12238,12 +11951,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
nszhihuang_info:'每回合限一次,当主公使用牌时,你可以移去一张“威”,然后获得此牌。锁定技,若你的手牌数大于主公,则你使用牌造成的伤害+1。',
diy_wenyang:'文鸯',
yj_caoang:'SP曹昂',
yjxuepin:'血拼',
yjxuepin_info:'出牌阶段限一次你可以选择攻击范围内的一名角色并失去1点体力。你弃置其两张牌。若这两张牌类型相同你回复1点体力。',
ns_chendao:'SP陈到',
nsjianglie:'将烈',
nsjianglie_info:'当你使用【杀】指定目标后,你可以令其展示所有手牌,然后弃置其中一种颜色的牌。',
ns_zhangwei:'张葳',
nsqiyue:'骑钺',
nsqiyue_info:'锁定技,当有角色的武将牌状态改变后,你摸一张牌。',
@ -12480,24 +12187,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
ns_caimao:'蔡瑁',
nsdingzhou:'定州',
nsdingzhou_info:'出牌阶段限一次你可以选择一名区域内有牌的其他角色。你随机获得其区域内的一张牌然后摸一张牌。若你以此法获得了两张颜色不同的牌则你失去1点体力。',
ns_jiaxu:'贾诩',
nsyice:'遗策',
nsyice_info:'锁定技,当你使用/打出/弃置的牌进入弃牌堆后你将这些牌以任意顺序置于你的武将牌上称为“策”。若这些“策”中有点数相同的牌则你获得这两张牌中的所有牌将这两张牌置于牌堆两端。若场上没有处于濒死状态的角色则你对一名角色造成1点伤害。',
ns_lijue:'李傕',
ns_zhangji:'张济',
nsfeixiong:'飞熊',
nsfeixiong_info:'出牌阶段开始时你可以和一名其他角色拼点。赢的角色对没赢的角色造成1点伤害。',
nscesuan:'策算',
nscesuan_info:'锁定技,当你受到伤害时,你防止此伤害并失去一点体力上限。若你因以此法失去体力上限导致体力值减少,则你摸一张牌。',
nslulve:'掳掠',
nslulve_info:'出牌阶段限一次你可以弃置X张牌并选择一名装备区内有牌的其他角色然后对其造成1点伤害X为其装备区内的牌数。',
ns_fanchou:'樊稠',
nsyangwu:'扬武',
nsyangwu_info:'出牌阶段限一次你可以弃置一张♥手牌并选择一名手牌数大于你的其他角色。你观看其手牌并获得其中的X张牌X为其与你手牌数之差的一半且向上取整。',
diy_tieba:'吧友设计',
diy_default:'常规',
diy_key:'论外',
diy_official:'其他官方武将',
diy_yijiang:'设计比赛2020',
diy_fakenews:'假新闻',
diy_trashbin:'垃圾桶',

View File

@ -15,6 +15,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
extra_key:['key_kagari','key_shiki'],
extra_ol:['ol_zhangliao','shen_caopi','shen_zhenji'],
extra_offline:['shen_diaochan'],
extra_mini:['mini_zhugeliang','mini_lvbu'],
},
},
character:{
@ -39,6 +40,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
ol_zhangliao:['male','shen',4,['olduorui','olzhiti'],['wei']],
shen_caopi:['male','shen',5,['chuyuan','dengji'],['wei']],
shen_zhenji:['female','shen',4,['shenfu','qixian'],['wei']],
mini_zhugeliang:['male','shen',3,['qixing','minikuangfeng','minidawu'],['shu']],
mini_lvbu:['male','shen',6,['miniwuqian','minishenfen']],
},
characterIntro:{
shen_guanyu:'关羽,字云长。曾水淹七军、擒于禁、斩庞德、威震华夏,吓得曹操差点迁都躲避,但是东吴偷袭荆州,关羽兵败被害。后传说吕蒙因关羽之魂索命而死。',
@ -49,12 +53,190 @@ game.import('character',function(lib,game,ui,get,ai,_status){
characterTitle:{
//shen_ganning:"体力上限6",
},
characterReplace:{
shen_zhangliao:['shen_zhangliao','ol_zhangliao'],
shen_zhugeliang:['shen_zhugeliang','mini_zhugeliang'],
shen_lvbu:['shen_lvbu','mini_lvbu'],
},
characterFilter:{
shen_diaochan:function(mode){
return mode=='identity'||mode=='doudizhu'||mode=='single'||(mode=='versus'&&_status.mode!='standard'&&_status.mode!='three');
},
},
skill:{
miniwuqian:{
audio:'wuqian',
trigger:{
player:'useCardToPlayered',
},
filter:function(event,player){
return (event.card.name=='sha'||event.card.name=='juedou')&&player==_status.currentPhase&&
player.getHistory('useCard',function(evt){
return (evt.card.name=='sha'||evt.card.name=='juedou');
}).indexOf(event.getParent())==0;
},
forced:true,
logTarget:'target',
content:function(){
trigger.target.addTempSkill('qinggang2');
trigger.target.storage.qinggang2.add(trigger.card);
if(trigger.card.name=='sha'){
var id=trigger.target.playerid;
var map=trigger.getParent().customArgs;
if(!map[id]) map[id]={};
if(typeof map[id].shanRequired=='number'){
map[id].shanRequired++;
}
else{
map[id].shanRequired=2;
}
}
else{
var id=trigger.target.playerid;
var idt=trigger.target.playerid;
var map=trigger.getParent().customArgs;
if(!map[idt]) map[idt]={};
if(!map[idt].shaReq) map[idt].shaReq={};
if(!map[idt].shaReq[id]) map[idt].shaReq[id]=1;
map[idt].shaReq[id]++;
}
},
ai:{
unequip_ai:true,
skillTagFilter:function(player,tag,arg){
if(arg&&arg.name=='sha'&&!player.countUsed('sha')) return true;
return false;
}
}
},
minishenfen:{
audio:'ol_shenfen',
enable:'phaseUse',
skillAnimation:true,
animationColor:'metal',
limited:true,
content:function(){
"step 0"
player.awakenSkill('minishenfen');
player.loseHp(3);
event.delay=false;
event.targets=game.filterPlayer();
event.targets.remove(player);
event.targets.sort(lib.sort.seat);
player.line(event.targets,'green');
event.targets2=event.targets.slice(0);
event.targets3=event.targets.slice(0);
"step 1"
if(event.targets2.length){
event.targets2.shift().damage('nocard');
event.redo();
}
"step 2"
if(event.targets.length){
event.current=event.targets.shift()
if(event.current.countCards('e')) event.delay=true;
event.current.discard(event.current.getCards('e')).delay=false;
}
"step 3"
if(event.delay) game.delay(0.5);
event.delay=false;
if(event.targets.length) event.goto(2);
"step 4"
if(event.targets3.length){
var target=event.targets3.shift();
target.chooseToDiscard(4,'h',true).delay=false;
if(target.countCards('h')) event.delay=true;
}
"step 5"
if(event.delay) game.delay(0.5);
event.delay=false;
if(event.targets3.length) event.goto(4);
},
ai:{
order:10,
result:{
player:function(player){
if(player.hp<5||player.hasUnknown()) return 0;
return game.countPlayer(function(current){
if(current!=player){
return get.sgn(get.damageEffect(current,player,player));
}
});
}
}
}
},
minikuangfeng:{
audio:'kuangfeng',
trigger:{player:'phaseUseEnd'},
direct:true,
filter:function(event,player){
return player.getStorage('qixing').length>0;
},
content:function(){
'step 0'
player.chooseTarget([1,Math.min(game.players.length,player.getStorage('qixing').length)],get.prompt2('minikuangfeng')).set('ai',function(target){
var player=_status.event.player;
var eff=get.damageEffect(target,player,player);
if(target.hp==1||!ui.selected.targets.length) return eff;
return 0;
});
'step 1'
if(result.bool){
event.targets=result.targets;
player.chooseButton(['请选择要移去的“星”',player.getStorage('qixing')],true,result.targets.length).set('ai',function(button){
return -get.value(button.link);
});
}
else event.finish();
'step 2'
var cards=result.links;
player.logSkill('minikuangfeng',targets);
player.$throw(cards,2000);
player.unmarkAuto('qixing',cards);
game.cardsDiscard(cards);
for(var i of targets) i.damage();
},
},
minidawu:{
audio:'dawu',
trigger:{player:'phaseJieshuBegin'},
direct:true,
filter:function(event,player){
return player.getStorage('qixing').length>0;
},
content:function(){
'step 0'
player.chooseButton([get.prompt('minidawu'),player.getStorage('qixing')]).set('ai',function(button){
return 1/Math.max(0.01,get.value(button.link));
});
'step 1'
if(result.bool){
var cards=result.links;
player.logSkill('minidawu');
player.$throw(cards,2000);
player.unmarkAuto('qixing',cards);
game.cardsDiscard(cards);
player.addTempSkill('minidawu2',{player:'phaseBegin'});
}
},
},
minidawu2:{
audio:'dawu',
trigger:{player:'damageBegin3'},
forced:true,
charlotte:true,
content:function(){
trigger.num--;
},
ai:{
effect:{
target:function(card,player,target){
if(get.tag(card,'damage')&&(card.name!='sha'||!player.hasSkill('jiu'))) return 'zerotarget';
},
},
},
},
meihun:{
audio:2,
trigger:{
@ -959,17 +1141,22 @@ game.import('character',function(lib,game,ui,get,ai,_status){
"step 2"
if(event.targets.length){
event.current=event.targets.shift()
if(event.current.countCards('e')) event.delay=true;
event.current.discard(event.current.getCards('e')).delay=false;
}
"step 3"
game.delay(0.5);
if(event.delay) game.delay(0.5);
event.delay=false;
if(event.targets.length) event.goto(2);
"step 4"
if(event.targets3.length){
event.targets3.shift().chooseToDiscard(4,'h',true).delay=false;
var target=event.targets3.shift();
target.chooseToDiscard(4,'h',true).delay=false;
if(target.countCards('h')) event.delay=true;
}
"step 5"
game.delay(0.5);
if(event.delay) game.delay(0.5);
event.delay=false;
if(event.targets3.length) event.goto(4);
"step 6"
player.turnOver();
@ -3608,6 +3795,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){
huoxin_control:'惑心',
huoxin:'惑心',
huoxin_info:'出牌阶段限一次你可以展示两张花色相同的手牌并分别交给两名其他角色然后令这两名角色拼点没赢的角色获得1个“魅惑”标记。拥有2个或更多“魅惑”的角色回合即将开始时该角色移去其所有“魅惑”此回合改为由你操控。',
mini_zhugeliang:'SP神诸葛亮',
minikuangfeng:'狂风',
minikuangfeng_info:'出牌阶段结束时你可选择任意名角色并将等量的“星”置入弃牌堆然后对这些角色各造成1点伤害。',
minidawu:'大雾',
minidawu2:'大雾',
minidawu_info:'结束阶段,你可以将一张“星”置入弃牌堆。当你于下回合开始前受到伤害时,此伤害-1。',
mini_lvbu:'SP神吕布',
miniwuqian:'无前',
miniwuqian_info:'锁定技,当你于回合内使用【杀】或【决斗】指定目标后,若此牌是你本回合内使用的第一张【杀】或【决斗】,则你令其每次响应此牌需要使用的【闪】或打出的【杀】的数量+1且令其防具无效直到此牌对其结束。',
minishenfen:'神愤',
minishenfen_info:'限定技出牌阶段你可以失去3点体力对所有其他角色各造成1点伤害。这些角色弃置装备区内的所有牌然后弃置四张手牌。',
key_kagari:'篝',
kagari_zongsi:'纵丝',
@ -3628,6 +3826,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
extra_key:'神话再临·论外',
extra_ol:'神话再临OL',
extra_offline:'神话再临·线下',
extra_mini:'欢乐三国杀',
},
};
});

View File

@ -6056,6 +6056,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return '你可以将两张牌(其中至少一张为基本牌)当做任意基本牌使用或打出。';
},
},
characterReplace:{
caochun:['caochun','old_caochun'],
majun:['majun','old_majun'],
zhanggong:['zhanggong','re_zhanggong'],
baosanniang:['xin_baosanniang','re_baosanniang','baosanniang'],
heqi:['re_heqi','heqi'],
weiwenzhugezhi:['weiwenzhugezhi','re_weiwenzhugezhi'],
xugong:['xugong','re_xugong'],
liuzan:['re_liuzan','liuzan'],
sufei:['sp_sufei','xf_sufei'],
jiakui:['jiakui','old_jiakui'],
},
translate:{
liuzan:'手杀留赞',
re_sp_zhugeliang:"手杀卧龙",

View File

@ -253,6 +253,7 @@ window.noname_character_rank={
'key_shiroha',
'key_shiori',
'key_iwasawa',
'mini_zhugeliang',
],
am:[
'diy_caiwenji',
@ -435,6 +436,7 @@ window.noname_character_rank={
'ns_caoshuang',
'key_shizuku',
'luyusheng',
'mini_lvbu',
],
bp:[
'chess_diaochan',
@ -615,6 +617,8 @@ window.noname_character_rank={
'nashime',
'ns_huangchengyan',
'ns_yuanxi',
'mini_sunquan',
'mini_zuoci',
],
b:[
'diy_feishi',
@ -1217,6 +1221,9 @@ window.noname_character_rank={
'liubian',
'simashi',
'yanghuiyu',
'mini_zuoci',
'mini_lvbu',
'mini_zhugeliang',
'key_haruko',
'key_akiko',
'key_sunohara',
@ -1483,6 +1490,7 @@ window.noname_character_rank={
'ns_zhangji',
'ns_fanchou',
'xin_zhuran',
'mini_sunquan',
],
junk:[
'sunshao',

View File

@ -5452,14 +5452,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if(event.judgeResult.color=='black') event.getParent().orderingCards.remove(card);
});
"step 1"
if(result.judge>0){
if(result.bool){
event.cards.push(result.card);
player.chooseBool('是否再次发动【洛神】?').set('frequentSkill','reluoshen');
}
else{
for(var i=0;i<event.cards.length;i++){
if(get.position(event.cards[i],true)!='o'){
event.cards.splice(i,1);i--;
event.cards.splice(i,1);
i--;
}
}
if(event.cards.length){

View File

@ -7176,6 +7176,43 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return '转换技,<span class="bluetext">阴:出牌阶段限一次,你可以将一张牌交给一名手牌数最多的角色,然后对其造成一点伤害,若该角色因此死亡,则你可以令一名角色将手牌摸至四张。</span>阳:其他角色对你造成伤害后,你可以观看该角色的手牌,然后交给其一张牌,当前角色回合结束时,若此牌仍在该角色的区域内,你将手牌摸至四张。';
},
},
characterReplace:{
caoren:['caoren','sp_caoren','jsp_caoren','old_caoren'],
xiahouyuan:['ol_xiahouyuan','re_xiahouyuan','xiahouyuan'],
huangzhong:['re_huangzhong','huangzhong'],
weiyan:['ol_weiyan','re_weiyan','weiyan'],
zhoutai:['zhoutai','old_zhoutai'],
xiaoqiao:['ol_xiaoqiao','re_xiaoqiao','xiaoqiao'],
yuji:['xin_yuji','re_yuji','yuji'],
zhangjiao:['re_zhangjiao','sp_zhangjiao','zhangjiao'],
dianwei:['dianwei','re_dianwei'],
xunyu:['re_xunyu','xunyu'],
sp_zhugeliang:['ol_sp_zhugeliang','re_sp_zhugeliang','sp_zhugeliang'],
pangtong:['ol_pangtong','re_jsp_pangtong','sp_pangtong','re_pangtong','pangtong'],
taishici:['re_taishici','sp_taishici','taishici'],
re_yuanshao:['ol_yuanshao','re_yuanshao','xin_yuanshao'],
pangde:['ol_pangde','sp_pangde','re_pangde','pangde'],
yanwen:['re_yanwen','yanwen'],
caopi:['caopi','re_caopi'],
xuhuang:['re_xuhuang','yj_xuhuang','xuhuang'],
menghuo:['re_menghuo','menghuo'],
zhurong:['re_zhurong','zhurong'],
sunjian:['ol_sunjian','re_sunjian','sunjian'],
jiaxu:['jiaxu','ns_jiaxu'],
dongzhuo:['ol_dongzhuo','re_dongzhuo','dongzhuo'],
dengai:['re_dengai','ol_dengai','dengai'],
zhanghe:['zhanghe','sp_zhanghe','yj_zhanghe'],
jiangwei:['re_jiangwei','sp_jiangwei','jiangwei'],
liushan:['ol_liushan','re_liushan','liushan'],
sunce:['re_sunben','re_sunce','sunce'],
zhangzhang:['re_zhangzhang','zhangzhang'],
zuoci:['re_zuoci','mini_zuoci','zuoci'],
caiwenji:['re_caiwenji','sp_caiwenji','caiwenji'],
xuyou:['sp_xuyou','xuyou'],
guanqiujian:['guanqiujian','re_guanqiujian','old_guanqiujian'],
chendao:['chendao','ns_chendao'],
zhugezhan:['zhugezhan','old_zhugezhan'],
},
translate:{
"feichu_equip1":"已废除",
"feichu_equip1_info":"武器栏已废除",

View File

@ -5853,7 +5853,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
filter:function(event,player){
if(!player.hasZhuSkill('shichou'))return false;
if(player.countCards('he')<2) return false;
return !player.storage.shichou;
return game.hasPlayer(function(current){
return current!=player&&current.group=='shu';
});
},
init:function(player){
if(player.hasZhuSkill('shichou')){
@ -14384,7 +14386,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
name:get.name(judging),
nature:get.nature(judging),
suit:suit,
number:2,
number:5,
})
};
list.sort(function(a,b){
@ -14403,7 +14405,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
game.log(player,'将判定结果改为了','#y'+get.translation(result.control+2)+5);
trigger.fixedResult={
suit:result.control,
color:get.color({name:result.control}),
color:get.color({suit:result.control}),
number:5,
};
}
@ -14680,6 +14682,25 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return str;
},
},
characterReplace:{
caoshuang:['caoshuang','ns_caoshuang'],
caoang:['caoang','yj_caoang','tw_caoang'],
caohong:['caohong','tw_caohong'],
xiahouba:['re_xiahouba','xiahouba'],
maliang:['maliang','re_maliang','ol_maliang','old_maliang'],
dingfeng:['dingfeng','tw_dingfeng'],
zumao:['zumao','tw_zumao'],
beimihu:['tw_beimihu','beimihu'],
panfeng:['re_panfeng','panfeng'],
sunluyu:['sunluyu','re_sunluyu'],
simazhao:['simazhao','sp_simazhao'],
wangyuanji:['wangyuanji','sp_wangyuanji'],
wangyun:['re_wangyun','wangyun','old_wangyun'],
zhangliang:['re_zhangliang','zhangliang'],
lingju:['lingju','old_lingju'],
guansuo:['guansuo','old_guansuo'],
zhangxingcai:['old_zhangxingcai'],
},
translate:{
"xinfu_lingren":"凌人",
"xinfu_lingren_info":"每回合限一次。当你于出牌阶段使用带有「伤害」这一标签的基本牌或普通锦囊牌指定目标后你可以猜测其中的一个目标的手牌中是否有基本牌锦囊牌或装备牌。若你猜中的项目数≥1此牌对该角色的伤害+1≥2你摸两张牌≥3你获得技能〖奸雄〗和〖行殇〗直到下回合开始。",

View File

@ -57,6 +57,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){
lvkuanglvxiang:['male','qun',4,['liehou','qigong']],
leitong:['male','shu',4,['kuiji']],
wulan:['male','shu',4,['wlcuorui']],
ns_lijue:['male','qun','4/6',['nsfeixiong','nscesuan']],
ns_zhangji:['male','qun',4,['nslulve']],
ns_fanchou:['male','qun',4,['nsyangwu']],
ns_jiaxu:['male','qun',3,['nsyice','luanwu']],
ns_chendao:['male','shu',4,['nsjianglie']],
yj_caoang:['male','wei',4,['yjxuepin']],
mini_sunquan:['male','wu',4,['minizhiheng','jiuyuan'],['zhu']],
mini_zuoci:['male','qun',3,['minishendao','minixinsheng']],
},
characterSort:{
sp2:{
@ -70,9 +78,423 @@ game.import('character',function(lib,game,ui,get,ai,_status){
sp_guandu:["sp_zhanghe","xunchen","sp_shenpei","gaolan","lvkuanglvxiang","chunyuqiong","sp_xuyou"],
sp_huangjin:['liuhong','zhujun','re_hejin','hansui'],
sp_decade:['wulan','leitong','huaman','wangshuang','wenyang','re_liuzan','re_sunluyu','caobuxing','ol_xinxianying','ol_yujin','re_maliang','xin_baosanniang','liubian'],
sp_mini:["mini_sunquan","mini_zuoci"],
sp_luanwu:["ns_lijue","ns_zhangji","ns_fanchou"],
sp_yongjian:["ns_chendao","yj_caoang"],
sp_s:["ns_jiaxu"],
}
},
skill:{
minishendao:{
audio:'rehuashen',
trigger:{
global:"judge",
},
direct:true,
content:function(){
"step 0"
var str='你的'+(trigger.judgestr||'')+'判定为'+
get.translation(trigger.player.judging[0])+',是否修改判定结果?';
player.chooseControl('spade','heart','diamond','club','cancel2').set('prompt',str).set('ai',function(){
//return '取消';
var judging=_status.event.judging;
var trigger=_status.event.getTrigger();
var res1=trigger.judge(judging);
var list=lib.suit.slice(0);
var attitude=get.attitude(player,trigger.player);
if(attitude==0) return 0;
var getj=function(suit){
return trigger.judge({
name:get.name(judging),
nature:get.nature(judging),
suit:suit,
number:get.number(judging),
})
};
list.sort(function(a,b){
return (getj(b)-getj(a))*get.sgn(attitude);
});
if((getj(list[0])-res1)*attitude>0) return list[0];
return 'cancel2';
}).set('judging',trigger.player.judging[0]);
"step 1"
if(result.control!='cancel2'){
player.logSkill('minishendao');
//player.line(trigger.player);
player.popup(result.control+2);
game.log(player,'将判定结果改为了','#y'+get.translation(result.control+2));
trigger.fixedResult={
suit:result.control,
color:get.color({suit:result.control}),
};
}
},
ai:{
rejudge:true,
tag:{
rejudge:0.3,
},
},
},
minixinsheng:{
audio:'rexinsheng',
trigger:{player:'damageEnd'},
frequent:true,
content:function(){
"step 0"
event.cards=get.cards(3);
game.cardsGotoOrdering(event.cards);
event.videoId=lib.status.videoId++;
game.broadcastAll(function(player,id,cards){
var str;
if(player==game.me&&!_status.auto){
str='新生:获取花色各不相同的牌';
}
else{
str='新生';
}
var dialog=ui.create.dialog(str,cards);
dialog.videoId=id;
},player,event.videoId,event.cards);
event.time=get.utc();
game.addVideo('showCards',player,['新生',get.cardsInfo(event.cards)]);
game.addVideo('delay',null,2);
"step 1"
var next=player.chooseButton([0,3],true);
next.set('dialog',event.videoId);
next.set('filterButton',function(button){
for(var i=0;i<ui.selected.buttons.length;i++){
if(get.suit(ui.selected.buttons[i].link)==get.suit(button.link)) return false;
}
return true;
});
next.set('ai',function(button){
return get.value(button.link,_status.event.player);
});
"step 2"
if(result.bool&&result.links){
event.cards2=result.links;
}
else{
event.finish();
}
var time=1000-(get.utc()-event.time);
if(time>0){
game.delay(0,time);
}
"step 3"
game.broadcastAll('closeDialog',event.videoId);
var cards2=event.cards2;
player.gain(cards2,'log','gain2');
},
},
minizhiheng:{
audio:'zhiheng',
trigger:{player:'phaseUseEnd'},
direct:true,
filter:function(event){
return event.player.countCards('h')>0;
},
content:function(){
'step 0'
player.chooseToDiscard('h',get.prompt('minizhiheng'),'弃置任意张手牌,若如此做,将手牌摸至四张',[1,player.countCards('h')]).set('ai',function(card){
var num=4-player.countCards('h');
var val=6.1+Math.max(0,num);
var cs=player.countCards('h',function(card){
return get.value(card)>=val;
});
if(cs>=4) return 0;
return val-get.value(card)
}).logSkill='minizhiheng';
'step 1'
if(result.bool) player.drawTo(4);
},
},
nsyangwu:{
enable:'phaseUse',
usable:1,
filterCard:{suit:'heart'},
filterTarget:function(card,player,target){
return target!=player&&target.countCards('h')>player.countCards('h');
},
filter:function(event,player){
var info=lib.skill.nsyangwu;
return player.countCards('h',info.filterCard)&&game.hasPlayer(function(target){
return info.filterTarget(null,player,target);
});
},
check:function(card){
var num=0;
var player=_status.event.player;
game.countPlayer(function(current){
if(current!=player&&get.attitude(player,current)<0) num=Math.max(num,current.countCards('h')-player.countCards('h'));
});
return Math.ceil((num+1)/2)*2+4-get.value(card);
},
content:function(){
var num=Math.ceil((target.countCards('h')-player.countCards('h'))/2);
if(num) player.gainPlayerCard(target,true,'h',num,'visible');
},
ai:{
order:4,
result:{
target:function(player,target){
return player.countCards('h')-target.countCards('h');
},
},
},
},
nslulve:{
enable:'phaseUse',
usable:1,
filter:function(event,player){
return game.hasPlayer(function(current){
return current.countCards('e')>0&&current.countCards('e')<=player.countCards('he');
});
},
filterCard:function(){
if(ui.selected.targets.length) return false;
return true;
},
position:'he',
selectCard:[1,Infinity],
complexSelect:true,
complexCard:true,
filterTarget:function(card,player,target){
return target!=player&&target.countCards('e')>0&&ui.selected.cards.length==target.countCards('e');
},
check:function(card){
var player=_status.event.player;
if(game.hasPlayer(function(current){
return current!=player&&current.countCards('e')>0&&ui.selected.cards.length==current.countCards('e')&&get.damageEffect(current,player,player)>0;
})) return 0;
switch(ui.selected.cards.length){
case 0:return 8-get.value(card);
case 1:return 6-get.value(card);
case 2:return 3-get.value(card);
default:return 0;
}
},
content:function(){
target.damage('nocard');
},
ai:{
damage:true,
order:2,
result:{
target:function(player,target){
return get.damageEffect(target,player);
}
},
expose:0.3
}
},
nsfeixiong:{
trigger:{player:'phaseUseBegin'},
direct:true,
filter:function(event,player){
return player.countCards('h')>0&&game.hasPlayer(function(current){
return current!=player&&player.canCompare(current);
});
},
content:function(){
'step 0'
player.chooseTarget(get.prompt2('nsfeixiong'),function(card,player,target){
return player!=target&&player.canCompare(target);
}).set('ai',function(target){
var player=_status.event.player;
var hs=player.getCards('h').sort(function(a,b){
return b.number-a.number;
});
var ts=target.getCards('h').sort(function(a,b){
return b.number-a.number;
});
if(!hs.length||!ts.length) return 0;
if(hs[0].number>ts[0].number) return get.damageEffect(target,player,player);
return 0;
});
'step 1'
if(result.bool){
var target=result.targets[0];
event.target=target;
player.logSkill('nsfeixiong',target);
player.chooseToCompare(target);
}
else event.finish();
'step 2'
if(!result.tie){
var targets=[player,target];
if(result.bool) targets.reverse();
targets[0].damage(targets[1]);
}
},
},
nscesuan:{
trigger:{player:'damageBegin3'},
forced:true,
content:function(){
'step 0'
trigger.cancel();
event.lose=player.loseMaxHp();
'step 1'
if(event.lose&&event.lose.loseHp) player.draw();
},
ai:{
filterDamage:true,
skillTagFilter:function(player,tag,arg){
if(arg&&arg.player){
if(arg.player.hasSkillTag('jueqing',false,player)) return false;
}
},
},
},
nsyice:{
trigger:{
player:'loseAfter',
global:'cardsDiscardAfter',
},
filter:function(event,player){
if(event.name=='lose'){
if(event.type!='discard') return false;
}
else{
var evt=event.getParent();
if(evt.name!='orderingDiscard'||!evt.relatedEvent||evt.relatedEvent.player!=player||!['useCard','respond'].contains(evt.relatedEvent.name)) return false;
}
return (event.cards2||event.cards).filterInD('d').length>0;
},
forced:true,
content:function(){
'step 0'
var evt=trigger.getParent().relatedEvent;
if((trigger.name=='discard'&&!trigger.delay)||evt&&evt.name=='respond') game.delayx();
'step 1'
var cards=(trigger.cards2||trigger.cards).filterInD('d');
player.$gain2(cards);
if(cards.length==1) event._result={bool:true,links:cards};
else{
var dialog=['遗策:选择要放置的卡牌','<div class="text center">(从左到右为从旧到新,后选择的后置入)</div>',cards];
var cards2=player.getStorage('nsyice');
if(cards2.length){
dialog.push('<div class="text center">原有“策”</div>');
dialog.push(cards2);
}
player.chooseButton(dialog,true,cards.length).set('filterButton',function(button){
return _status.event.cards.contains(button.link);
}).set('cards',cards);
}
'step 2'
game.cardsGotoSpecial(result.links);
player.markAuto('nsyice',result.links);
game.delayx();
'step 3'
var storage=player.storage.nsyice;
var bool=false;
for(var i=0;i<storage.length;i++){
for(var j=storage.length-1;j>i;j--){
if(get.number(storage[i])==get.number(storage[j])){
bool=true;
break;
}
}
if(bool) break;
}
if(bool){
event.cards=storage.slice(0);
event.cards=storage.splice(i,j-i+1);
player.unmarkAuto('nsyice',event.cards);
}
else event.finish();
'step 4'
var cardsx=[];
cardsx.push(cards.shift());
cardsx.push(cards.pop());
if(cards.length) player.gain(cards,'gain2');
event.cards=cardsx;
'step 5'
player.chooseButton(['将一张牌置于牌堆顶,将另一张牌置于牌堆底',cards],true);
'step 6'
ui.cardPile.insertBefore(result.links[0].fix(),ui.cardPile.firstChild);
cards.remove(result.links[0]);
ui.cardPile.appendChild(cards[0].fix());
game.updateRoundNumber();
if(_status.dying.length) event.finish();
'step 7'
player.chooseTarget('对一名角色造成1点伤害',true).set('ai',function(target){
var player=_status.event.player;
return get.damageEffect(target,player,player);
});
'step 8'
if(result.bool){
var target=result.targets[0];
player.line(target);
target.damage('nocard');
}
},
marktext:'策',
intro:{content:'cards'},
},
yjxuepin:{
enable:'phaseUse',
usable:1,
filterTarget:function(event,player,target){
return player.inRange(target);
},
content:function(){
'step 0'
player.loseHp();
'step 1'
if(target.countDiscardableCards(player,'he')>0) player.discardPlayerCard(target,2,'he',true);
else event.finish();
'step 2'
if(result.bool&&result.cards.length==2&&get.type2(result.cards[0],result.cards[0].original=='h'?target:false)==get.type2(result.cards[1],result.cards[1].original=='h'?target:false)) player.recover();
},
ai:{
order:4,
result:{
player:function(player,target){
if(player.hp==1) return -4;
if(target.countCards('e')>1) return 0;
if(player.hp>2||target.countCards('h')>1) return -0.5;
return -2;
},
target:function(player,target){
return -2;
},
},
},
},
nsjianglie:{
trigger:{player:'useCardToPlayered'},
filter:function(event,player){
return event.card.name=='sha'&&event.target.countCards('h')>0;
},
check:function(event,player){
return get.attitude(player,event.target)<0;
},
logTarget:'target',
content:function(){
'step 0'
trigger.target.showHandcards();
'step 1'
var cards=trigger.target.getCards('h');
var list=[];
for(var i=0;i<cards.length;i++){
list.add(get.color(cards[i]));
}
if(list.length==1) event._result={control:list[0]};
else{
list.sort();
trigger.target.chooseControl(list).set('prompt','选择弃置一种颜色的所有手牌').set('ai',function(){
var player=_status.event.player;
if(get.value(player.getCards('h',{color:'red'}))>=get.value(player.getCards('h',{color:'black'}))) return 'black';
return 'red';
});
}
'step 2'
trigger.target.discard(trigger.target.getCards('h',{color:result.control}));
},
},
sicong:{
audio:2,
enable:'phaseUse',
@ -6086,6 +6508,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return '出牌阶段开始时,你可以展示牌堆顶的三张牌。你可弃置任意张手牌,并可获得任意张点数之和不大于你弃置的牌点数之和的牌。';
},
},
characterReplace:{
lijue:['lijue','ns_lijue'],
fanchou:['fanchou','ns_fanchou'],
zhangji:['zhangji','ns_zhangji'],
zhangchangpu:['ol_zhangchangpu','zhangchangpu'],
huangfusong:['huangfusong','old_huangfusong'],
wenyang:['wenyang','diy_wenyang'],
},
translate:{
lijue:"李傕",
zhangji:"张济",
@ -6408,6 +6838,34 @@ game.import('character',function(lib,game,ui,get,ai,_status){
sicong_info:'出牌阶段限一次你可以弃置任意张点数之和为13的牌然后摸两倍数量的牌。以此法获得的牌中黑色牌本回合无距离和次数限制红色牌本回合不计入手牌上限。',
xianzhao:'先兆',
xianzhao_info:'当你受到伤害后你可以进行一次判定然后若你弃置任意张点数之和与判定结果点数相同的牌你回复1点体力。',
yj_caoang:'SP曹昂',
yjxuepin:'血拼',
yjxuepin_info:'出牌阶段限一次你可以选择攻击范围内的一名角色并失去1点体力。你弃置其两张牌。若这两张牌类型相同你回复1点体力。',
ns_chendao:'SP陈到',
nsjianglie:'将烈',
nsjianglie_info:'当你使用【杀】指定目标后,你可以令其展示所有手牌,然后弃置其中一种颜色的牌。',
ns_jiaxu:'☆贾诩',
nsyice:'遗策',
nsyice_info:'锁定技,当你使用/打出/弃置的牌进入弃牌堆后你将这些牌以任意顺序置于你的武将牌上称为“策”。若这些“策”中有点数相同的牌则你获得这两张牌中的所有牌将这两张牌置于牌堆两端。若场上没有处于濒死状态的角色则你对一名角色造成1点伤害。',
ns_lijue:'SP李傕',
ns_zhangji:'SP张济',
nsfeixiong:'飞熊',
nsfeixiong_info:'出牌阶段开始时你可以和一名其他角色拼点。赢的角色对没赢的角色造成1点伤害。',
nscesuan:'策算',
nscesuan_info:'锁定技,当你受到伤害时,你防止此伤害并失去一点体力上限。若你因以此法失去体力上限导致体力值减少,则你摸一张牌。',
nslulve:'掳掠',
nslulve_info:'出牌阶段限一次你可以弃置X张牌并选择一名装备区内有牌的其他角色然后对其造成1点伤害X为其装备区内的牌数。',
ns_fanchou:'SP樊稠',
nsyangwu:'扬武',
nsyangwu_info:'出牌阶段限一次你可以弃置一张♥手牌并选择一名手牌数大于你的其他角色。你观看其手牌并获得其中的X张牌X为其与你手牌数之差的一半且向上取整。',
mini_sunquan:'SP孙权',
minizhiheng:'制衡',
minizhiheng_info:'出牌阶段结束时,你可以弃置任意张手牌。若如此做,你将手牌摸至四张。',
mini_zuoci:'SP左慈',
minishendao:'神道',
minishendao_info:'你的判定牌生效前,你可以将判定结果改为任意花色。',
minixinsheng:'新生',
minixinsheng_info:'当你受到伤害后,你可以展示牌堆顶的三张牌,然后获得其中每种花色的牌各一张。',
sp_whlw:"文和乱武",
sp_zlzy:"逐鹿中原",
@ -6419,6 +6877,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
sp_guandu:'官渡之战',
sp_huangjin:'黄巾之乱',
sp_decade:'其他新服武将',
sp_mini:'欢乐三国杀',
sp_luanwu:'文和乱武·线下',
sp_yongjian:'用间篇',
sp_s:'线下S系列',
},
};
});

View File

@ -2678,6 +2678,36 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
},
},
characterReplace:{
caocao:['re_caocao','caocao'],
guojia:['re_guojia','rguojia'],
simayi:['re_simayi','simayi'],
zhenji:['re_zhenji','zhenji'],
xuzhu:['re_xuzhu','xuzhu'],
zhangliao:['re_zhangliao','sp_zhangliao','yj_zhangliao','zhangliao'],
xiahoudun:['re_xiahoudun','sp_xiahoudun','xin_xiahoudun','xiahoudun'],
liubei:['re_liubei','sp_liubei','liubei'],
guanyu:['re_guanyu','jsp_guanyu','guanyu'],
zhangfei:['re_zhangfei','sp_zhangfei','old_zhangfei','zhangfei'],
zhaoyun:['re_zhaoyun','sp_zhaoyun','jsp_zhaoyun','old_zhaoyun','zhaoyun'],
machao:['re_machao','sp_machao','machao','old_machao'],
zhugeliang:['re_zhugeliang','zhugeliang'],
huangyueying:['re_huangyueying','jsp_huangyueying','huangyueying'],
sunquan:['re_sunquan','mini_sunquan','sunquan'],
zhouyu:['re_zhouyu','zhouyu'],
luxun:['re_luxun','luxun'],
lvmeng:['re_lvmeng','sp_lvmeng','lvmeng'],
huanggai:['re_huanggai','huanggai'],
daqiao:['re_daqiao','sp_daqiao','daqiao'],
sunshangxiang:['re_sunshangxiang','sp_sunshangxiang','sunshangxiang'],
ganning:['re_ganning','yj_ganning','sp_ganning','ganning'],
lvbu:['re_lvbu','lvbu'],
diaochan:['re_diaochan','sp_diaochan','ganning'],
huatuo:['re_huatuo','old_huatuo','huatuo'],
huaxiong:['re_huaxiong','old_huaxiong','huaxiong','ol_huaxiong'],
yuanshu:['yl_yuanshu','yuanshu','re_yuanshu','old_yuanshu','ol_yuanshu'],
gongsunzan:['re_gongsunzan','xin_gongsunzan','sp_gongsunzan','gongsunzan'],
},
translate:{
caocao:'曹操',
hujia:'护驾',

View File

@ -12052,6 +12052,52 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return '其他角色使用或打出牌响应你使用的牌时,你可令其获得你使用的牌(其本回合不能使用或打出这些牌),然后你获得其使用或打出的牌。';
},
},
characterReplace:{
caozhi:['re_caozhi','caozhi'],
yujin:['yujin_yujin','re_yujin','ol_yujin','xin_yujin','yujin'],
xushu:['re_xushu','xin_xushu','xushu'],
fazheng:['xin_fazheng','fazheng'],
masu:['xin_masu','re_masu','masu'],
xusheng:['xin_xusheng','re_xusheng','xusheng'],
wuguotai:['re_wuguotai','wuguotai'],
lingtong:['xin_lingtong','re_lingtong','lingtong'],
gaoshun:['gaoshun','re_gaoshun'],
zhonghui:['re_zhonghui','zhonghui','old_zhonghui'],
wangyi:['wangyi','old_wangyi'],
caozhang:['re_caozhang','xin_caozhang','caozhang'],
guanzhang:['guanzhang','old_guanzhang'],
madai:['old_madai','madai'],
liaohua:['xin_liaohua','re_liaohua','liaohua'],
bulianshi:['re_bulianshi','bulianshi','old_bulianshi'],
handang:['re_handang','handang'],
chengpu:['re_chengpu','chengpu','xin_chengpu'],
liubiao:['re_liubiao','xin_liubiao','liubiao'],
manchong:['re_manchong','manchong'],
caochong:['caochong','old_caochong'],
guohuai:['guohuai','re_guohuai','ol_guohuai'],
jianyong:['re_jianyong','xin_jianyong','jianyong'],
panzhangmazhong:['re_panzhangmazhong','panzhangmazhong'],
yufan:['re_yufan','yufan'],
zhuran:['re_zhuran','xin_zhuran','zhuran','old_zhuran'],
liru:['re_liru','xin_liru','liru'],
fuhuanghou:['fuhuanghou','old_fuhuanghou'],
chenqun:['chenqun','old_chenqun'],
hanhaoshihuan:['re_hanhaoshihuan','hanhaoshihuan'],
caozhen:['caozhen','old_caozhen'],
wuyi:['re_wuyi','wuyi'],
sunluban:['re_sunluban','sunluban'],
zhuhuan:['zhuhuan','old_zhuhuan'],
caoxiu:['re_caoxiu','caoxiu','old_caoxiu'],
xiahoushi:['xiahoushi','sp_xiahoushi'],
zhangyi:['re_zhangyi','zhangyi'],
quancong:['re_quancong','quancong','old_quancong'],
sunxiu:['re_sunxiu','sunxiu'],
zhuzhi:['zhuzhi','old_zhuzhi'],
liuyu:['liuyu','old_liuyu'],
zhangrang:['zhangrang','ol_zhangrang','junk_zhangrang'],
jikang:['re_jikang','jikang'],
xinxianying:['xinxianying','ol_xinxianying','sp_xinxianying'],
},
translate:{
old_huaxiong:'华雄',
yufan:'虞翻',

View File

@ -1,5 +1,5 @@
window.noname_asset_list=[
'v1.9.106.2.2',
'v1.9.106.3',
'audio/background/aozhan_chaoming.mp3',
'audio/background/aozhan_online.mp3',
'audio/background/aozhan_rewrite.mp3',
@ -3491,6 +3491,10 @@ window.noname_asset_list=[
'image/character/xin_zhuran.jpg',
'image/character/yanghuiyu.jpg',
'image/character/key_shizuku.jpg',
'image/character/mini_lvbu.jpg',
'image/character/mini_sunquan.jpg',
'image/character/mini_zhugeliang.jpg',
'image/character/mini_zuoci.jpg',
'image/character/baiwuchang.jpg',
'image/character/baosanniang.jpg',
@ -4476,8 +4480,8 @@ window.noname_asset_list=[
'image/emotion/throw_emotion/shoukao2.png',
'image/emotion/throw_emotion/wine1.png',
'image/emotion/throw_emotion/wine2.png',
'image/emotion/throw_emotion/yuxis1.png',
'image/emotion/throw_emotion/yuxis2.png',
'image/emotion/throw_emotion/yuxisx1.png',
'image/emotion/throw_emotion/yuxisx2.png',
'image/mode/boss/card/chixueqingfeng.png',
'image/mode/boss/card/chiyanzhenhunqin.png',

View File

@ -229,6 +229,8 @@ window.config={
// ['jiushi','kuiwei'],
['zishu','xinfu_songsang'],
['zishu','shenxing'],
['minishendao','luoshen'],
['minishendao','reluoshen'],
['akane_quanqing','lianying'],
['akane_quanqing','relianying'],
['akane_quanqing','shangshi'],

View File

@ -45,6 +45,7 @@
characterPack:{},
characterFilter:{},
characterSort:{},
characterReplace:{},
dynamicTranslate:{},
cardPack:{},
onresize:[],
@ -9779,7 +9780,7 @@
egg:'鸡蛋',
wine:'酒杯',
shoe:'拖鞋',
yuxis:'玉玺',
yuxisx:'玉玺',
shoukao:'枷锁',
junk:'平凡',
common:'普通',
@ -24525,7 +24526,7 @@
return true;
},
characterDisabled:function(i,libCharacter){
if(lib.character[i][4]&&lib.character[i][4].contains('forbidai')) return true;
if(!lib.character[i]||lib.character[i][4]&&lib.character[i][4].contains('forbidai')) return true;
if(lib.character[i][4]&&lib.character[i][4].contains('unseen')) return true;
if(lib.config.forbidai.contains(i)) return true;
if(lib.characterFilter[i]&&!lib.characterFilter[i](get.mode())) return true;
@ -24584,6 +24585,7 @@
},
characterDisabled2:function(i){
var info=lib.character[i];
if(!info) return true;
if(info[4]){
if(info[4].contains('boss')) return true;
if(info[4].contains('hiddenboss')) return true;
@ -43183,7 +43185,7 @@
node.link=item;
break;
case 'character':case 'player':
case 'character':case 'player':case 'characterx':
if(node){
node.classList.add('button');
node.classList.add('character');
@ -43192,79 +43194,117 @@
else{
node=ui.create.div('.button.character',position);
}
node._link=item;
if(_status.noReplaceCharacter&&type=='characterx') type='character';
if(type=='characterx'){
if(lib.characterReplace[item]&&lib.characterReplace[item].length) item=lib.characterReplace[item][0];
}
node.link=item;
if(type=='character'){
node.setBackground(item,'character');
node.node={
name:ui.create.div('.name',node),
hp:ui.create.div('.hp',node),
intro:ui.create.div('.intro',node),
group:ui.create.div('.identity',node)
}
var infoitem=lib.character[item];
if(!infoitem){
for(var itemx in lib.characterPack){
if(lib.characterPack[itemx][item]){
infoitem=lib.characterPack[itemx][item];break;
if(type=='character'||type=='characterx'){
if(type=='characterx'&&lib.characterReplace[node._link]&&lib.characterReplace[node._link].length>1) node._replaceButton=true;
var func=function(node,item){
node.setBackground(item,'character');
if(node.node){
node.node.name.remove();
node.node.hp.remove();
node.node.group.remove();
node.node.intro.remove();
if(node.node.replaceButton) node.node.replaceButton.remove();
}
node.node={
name:ui.create.div('.name',node),
hp:ui.create.div('.hp',node),
group:ui.create.div('.identity',node),
intro:ui.create.div('.intro',node),
};
var infoitem=lib.character[item];
if(!infoitem){
for(var itemx in lib.characterPack){
if(lib.characterPack[itemx][item]){
infoitem=lib.characterPack[itemx][item];break;
}
}
}
}
node.node.name.innerHTML=get.slimName(item);
if(lib.config.buttoncharacter_style=='default'||lib.config.buttoncharacter_style=='simple'){
if(lib.config.buttoncharacter_style=='simple'){
node.node.name.innerHTML=get.slimName(item);
if(lib.config.buttoncharacter_style=='default'||lib.config.buttoncharacter_style=='simple'){
if(lib.config.buttoncharacter_style=='simple'){
node.node.group.style.display='none';
}
node.node.name.dataset.nature=get.groupnature(infoitem[1]);
node.node.group.dataset.nature=get.groupnature(infoitem[1],'raw');
node.classList.add('newstyle');
ui.create.div(node.node.hp);
var textnode=ui.create.div('.text',get.numStr(infoitem[2]),node.node.hp);
if(infoitem[2]==0){
node.node.hp.hide();
}
else if(get.infoHp(infoitem[2])<=3){
node.node.hp.dataset.condition='mid';
}
else{
node.node.hp.dataset.condition='high';
}
}
else{
var hp=get.infoHp(infoitem[2]);
var maxHp=get.infoMaxHp(infoitem[2]);
if(maxHp>14){
if(typeof infoitem[2]=='string') node.node.hp.innerHTML=infoitem[2];
else node.node.hp.innerHTML=get.numStr(infoitem[2]);
node.node.hp.classList.add('text');
}
else{
for(var i=0;i<maxHp;i++){
var next=ui.create.div('',node.node.hp);
if(i>=hp) next.classList.add('exclude');
}
}
}
if(node.node.hp.childNodes.length==0){
node.node.name.style.top='8px';
}
if(node.node.name.querySelectorAll('br').length>=4){
node.node.name.classList.add('long');
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){
lib.setIntro(node);
}
if(infoitem[1]){
node.node.group.innerHTML='<div>'+get.translation(infoitem[1])+'</div>';
node.node.group.style.backgroundColor=get.translation(infoitem[1]+'Color');
}
else{
node.node.group.style.display='none';
}
node.node.name.dataset.nature=get.groupnature(infoitem[1]);
node.node.group.dataset.nature=get.groupnature(infoitem[1],'raw');
node.classList.add('newstyle');
ui.create.div(node.node.hp);
var textnode=ui.create.div('.text',get.numStr(infoitem[2]),node.node.hp);
if(infoitem[2]==0){
node.node.hp.hide();
if(node._replaceButton){
var intro=ui.create.div('.button.replaceButton',node);
node.node.replaceButton=intro;
intro.innerHTML='切换';
intro._node=node;
intro.addEventListener(lib.config.touchscreen?'touchend':'click',function(){
_status.tempNoButton=true;
var node=this._node;
var list=lib.characterReplace[node._link];
var link=node.link;
var index=list.indexOf(link);
if(index==list.length-1) index=0;
else index++;
link=list[index];
node.link=link;
node.refresh(node,link);
setTimeout(function(){
delete _status.tempNoButton;
},200);
});
}
else if(get.infoHp(infoitem[2])<=3){
node.node.hp.dataset.condition='mid';
}
else{
node.node.hp.dataset.condition='high';
}
}
else{
var hp=get.infoHp(infoitem[2]);
var maxHp=get.infoMaxHp(infoitem[2]);
if(maxHp>14){
if(typeof infoitem[2]=='string') node.node.hp.innerHTML=infoitem[2];
else node.node.hp.innerHTML=get.numStr(infoitem[2]);
node.node.hp.classList.add('text');
}
else{
for(var i=0;i<maxHp;i++){
var next=ui.create.div('',node.node.hp);
if(i>=hp) next.classList.add('exclude');
}
}
}
if(node.node.hp.childNodes.length==0){
node.node.name.style.top='8px';
}
if(node.node.name.querySelectorAll('br').length>=4){
node.node.name.classList.add('long');
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){
lib.setIntro(node);
}
if(infoitem[1]){
node.node.group.innerHTML='<div>'+get.translation(infoitem[1])+'</div>';
node.node.group.style.backgroundColor=get.translation(infoitem[1]+'Color');
}
else{
node.node.group.style.display='none';
}
};
node.refresh=func;
node.refresh(node,item);
}
else{
node.node={
@ -47773,6 +47813,14 @@
},
};
var get={
sourceCharacter:function(str){
if(str){
for(var i in lib.characterReplace){
if(lib.characterReplace[i].contains(str)) return i;
}
}
return str;
},
isLuckyStar:function(player){
if(player&&player.hasSkillTag('luckyStar')) return true;
if(_status.connectMode) return false;
@ -50496,7 +50544,7 @@
table.style.width='100%';
table.style.position='relative';
var listi=['wine','shoe'];
if(game.me.storage.zhuSkill_shanli) listi=['yuxis','shoukao'];
if(game.me.storage.zhuSkill_shanli) listi=['yuxisx','shoukao'];
for(var i=0;i<listi.length;i++){
td=ui.create.div('.shadowed.reduce_radius.pointerdiv.tdnode');
ui.throwEmotion.add(td);

View File

@ -1,8 +1,9 @@
window.noname_update={
version:'1.9.106.2.2',
update:'1.9.106.2.1',
version:'1.9.106.3',
update:'1.9.106.2.2',
changeLog:[
'水织静久',
'同名武将替换选择',
'微信小程序·欢乐三国杀',
'bug修复',
],
files:[
@ -19,7 +20,7 @@ window.noname_update={
//'card/zhenfa.js',
//'card/zhulu.js',
'character/diy.js',
//'character/extra.js',
'character/extra.js',
//'character/hearth.js',
//'character/gujian.js',
//'character/gwent.js',
@ -28,35 +29,35 @@ window.noname_update={
//'character/mtg.js',
//'character/old.js',
'character/rank.js',
//'character/refresh.js',
//'character/shenhua.js',
//'character/sp.js',
'character/refresh.js',
'character/shenhua.js',
'character/sp.js',
'character/sp2.js',
//'character/tw.js',
//'character/standard.js',
'character/standard.js',
//'character/swd.js',
//'character/xianjian.js',
//'character/xinghuoliaoyuan.js',
//'character/yijiang.js',
'character/yijiang.js',
//'character/yxs.js',
//'extension/boss/extension.js',
//'layout/default/layout.css',
'layout/default/layout.css',
//'layout/nova/layout.css',
//'mode/identity.js',
//'mode/doudizhu.js',
'mode/identity.js',
'mode/doudizhu.js',
//'mode/guozhan.js',
//'mode/chess.js',
//'mode/tafang.js',
//'mode/single.js',
//'mode/stone.js',
//'mode/brawl.js',
//'mode/versus.js',
'mode/stone.js',
'mode/brawl.js',
'mode/versus.js',
//'mode/boss.js',
//'game/game.js',
'game/game.js',
//'game/keyWords.js',
//'game/server.js',
//'game/NoSleep.js',
//'game/config.js',
'game/config.js',
//'game/package.js',
//'game/asset.js',
//'game/source.js',

Binary file not shown.

After

Width:  |  Height:  |  Size: 101 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 97 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

@ -1974,6 +1974,22 @@ div:not(.handcards)>.card>.info>span,
transform: none !important;
text-shadow: black 0 0 2px, black 0 0 3px;
}
.button.replaceButton,
.button.replaceButton.text{
left: 2px;
top: auto;
text-align: center;
width: 42px;
right: auto;
bottom: 3px;
background-image: linear-gradient(rgba(150, 47, 47, 1), rgba(132, 43, 43, 1));
border-radius: 3px;
}
.button.replaceButton>div{
width: 10px;
height: 10px;
}
/*--------确认--------*/
#control {
text-align: center;
@ -3356,7 +3372,7 @@ div:not(.handcards)>.card>.info>span,
#arena.selecting:not(.video) #me .card:not(.selectable)>.info,
#arena.selecting:not(.video) #me .card:not(.selectable)>.range,
#arena.selecting:not(.video) #me .card:not(.selectable)>.addinfo,
#arena.selecting:not(.video) .dialog:not(.noselect) .button:not(.selectable):not(.noclick),
#arena.selecting:not(.video) .dialog:not(.noselect) .button:not(.selectable):not(.noclick):not(.replaceButton),
.dead,.likedead {
opacity: 0.6;
}

View File

@ -1602,6 +1602,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
chooseCharacterFixed:true,
chooseCharacter:function(list,player){
game.versusVideoName='同姓之争';
_status.noReplaceCharacter=true;
if(player.side==game.me.side){
if(_status.brawl.mylist){
return _status.brawl.mylist.randomGets(2);
@ -1750,6 +1751,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
}
},
chooseCharacter:function(){
_status.noReplaceCharacter=true;
if(game.me==game.zhu){
return ['re_caocao'];
}
@ -1926,6 +1928,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
submode:'two',
chooseCharacterFixed:true,
chooseCharacterBefore:function(){
_status.noReplaceCharacter=true;
game.versusVideoName='家族之争';
var map={
wei:[],

View File

@ -211,9 +211,22 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
var i;
event.list=[];
event.list2=[];
var list4=[];
if(!event.map) event.map={};
for(i in lib.characterReplace){
var ix=lib.characterReplace[i];
for(var j=0;j<ix.length;j++){
if(lib.filter.characterDisabled(ix[j])) ix.splice(j--,1);
}
if(ix.length){
var name=ix.randomGet();
event.list.push(name);
if(game.recommendDizhu.contains(name)) event.list2.push(name);
list4.addArray(ix);
}
}
for(i in lib.character){
if(lib.filter.characterDisabled(i)) continue;
if(list4.contains(i)||lib.filter.characterDisabled(i)) continue;
event.list.push(i);
if(game.recommendDizhu.contains(i)) event.list2.push(i);
}
@ -285,6 +298,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
var identityList=['zhu','fan','fan'];
game.saveConfig('continue_name');
event.list=[];
var list4=[];
identityList.randomSort();
for(i=0;i<game.players.length;i++){
game.players[i].identity=identityList[i];
@ -303,8 +317,19 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
game.me.setIdentity();
game.me.node.identity.classList.remove('guessing');
}
for(i in lib.characterReplace){
var ix=lib.characterReplace[i];
for(var j=0;j<ix.length;j++){
if(lib.filter.characterDisabled(ix[j])) ix.splice(j--,1);
}
if(ix.length){
event.list.push(ix.randomGet());
list4.addArray(ix);
}
}
for(i in lib.character){
if(lib.filter.characterDisabled(i)) continue;
if(list4.contains(i)||lib.filter.characterDisabled(i)) continue;
event.list.push(i);
}
event.list.randomSort();
@ -362,11 +387,16 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
return game.players.randomGet(game.me,game.zhu);
};
next.ai=function(player,list,list2,back){
var listc=list.slice(0,2);
for(var i=0;i<listc.length;i++){
var listx=lib.characterReplace[listc[i]];
if(listx&&listx.length) listc[i]=listx.randomGet();
}
if(get.config('double_character')){
player.init(list[0],list[1]);
player.init(listc[0],listc[1]);
}
else{
player.init(list[0]);
player.init(listc[0]);
}
if(player==game.zhu){
player.hp++;
@ -374,8 +404,8 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
player.update();
}
if(back){
list.remove(player.name);
list.remove(player.name2);
list.remove(get.sourceCharacter(player.name));
list.remove(get.sourceCharacter(player.name2));
for(var i=0;i<list.length;i++){
back.push(list[i]);
}
@ -390,8 +420,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
ui.arena.classList.add('choose-character');
var i;
var list;
var list2=[];
var list3=[];
var list4=[];
var identityList=['zhu','fan','fan'];
var chosen=lib.config.continue_name||[];
game.saveConfig('continue_name');
@ -453,7 +482,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
_status.event.parent.swapnodialog=function(dialog,list){
var buttons=ui.create.div('.buttons');
var node=dialog.buttons[0].parentNode;
dialog.buttons=ui.create.buttons(list,'character',buttons);
dialog.buttons=ui.create.buttons(list,'characterx',buttons);
dialog.content.insertBefore(buttons,node);
buttons.animate('start');
node.remove();
@ -567,14 +596,25 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
game.me.setIdentity();
game.me.node.identity.classList.remove('guessing');
}
//选将框分配
for(i in lib.characterReplace){
var ix=lib.characterReplace[i];
for(var j=0;j<ix.length;j++){
if(chosen.contains(ix[j])||lib.filter.characterDisabled(ix[j])) ix.splice(j--,1);
}
if(ix.length){
event.list.push(i);
list4.addArray(ix);
}
}
for(i in lib.character){
if(chosen.contains(i)) continue;
if(chosen.contains(i)||list4.contains(i)) continue;
if(lib.filter.characterDisabled(i)) continue;
event.list.push(i);
list4.push(i);
}
event.list.randomSort();
_status.characterlist=event.list.slice(0);
list3.randomSort();
_status.characterlist=list4.slice(0);
var num=get.config('choice_'+game.me.identity);
list=event.list.slice(0,num);
delete event.swapnochoose;
@ -589,7 +629,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
if(_status.brawl&&_status.brawl.chooseCharacterStr){
str=_status.brawl.chooseCharacterStr;
}
dialog=ui.create.dialog(str,'hidden',[list,'character']);
dialog=ui.create.dialog(str,'hidden',[list,'characterx']);
if(!_status.brawl||!_status.brawl.noAddSetting){
if(get.config('change_identity')){
addSetting(dialog);
@ -622,7 +662,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
var buttons=ui.create.div('.buttons');
var node=_status.event.dialog.buttons[0].parentNode;
_status.event.dialog.buttons=ui.create.buttons(list,'character',buttons);
_status.event.dialog.buttons=ui.create.buttons(list,'characterx',buttons);
_status.event.dialog.content.insertBefore(buttons,node);
buttons.animate('start');
node.remove();
@ -733,8 +773,8 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
else{
game.me.init(event.choosed[0]);
}
event.list.remove(game.me.name);
event.list.remove(game.me.name2);
event.list.remove(get.sourceCharacter(game.me.name));
event.list.remove(get.sourceCharacter(game.me.name2));
if(game.me==game.zhu){
game.me.hp++;
game.me.maxHp++;
@ -749,8 +789,8 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
}
"step 3"
for(var i=0;i<game.players.length;i++){
_status.characterlist.remove(game.players[i].name);
_status.characterlist.remove(game.players[i].name2);
_status.characterlist.remove(get.sourceCharacter(game.players[i].name));
_status.characterlist.remove(get.sourceCharacter(game.players[i].name2));
}
setTimeout(function(){
ui.arena.classList.remove('choose-character');
@ -783,6 +823,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
if(identityList[i]=='zhu') game.zhu=game.players[i];
}
event.list=[];
var list4=[];
var libCharacter={};
for(var i=0;i<lib.configOL.characterPack.length;i++){
@ -792,8 +833,18 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
if(lib.character[j]) libCharacter[j]=pack[j];
}
}
for(var i in libCharacter){
if(lib.filter.characterDisabled(i,libCharacter)) continue;
for(i in lib.characterReplace){
var ix=lib.characterReplace[i];
for(var j=0;j<ix.length;j++){
if(!libCharacter[ix[j]]||lib.filter.characterDisabled(ix[j],libCharacter)) ix.splice(j--,1);
}
if(ix.length){
event.list.push(ix.randomGet());
list4.addArray(ix);
}
}
for(i in libCharacter){
if(list4.contains(i)||lib.filter.characterDisabled(i,libCharacter)) continue;
event.list.push(i);
}
_status.characterlist=event.list.slice(0);
@ -873,6 +924,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
var i;
event.list=[];
event.list2=[];
var list4=[];
event.controls=['不叫','叫地主'];
if(!event.map) event.map={};
var libCharacter={};
@ -883,8 +935,20 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
if(lib.character[j]) libCharacter[j]=pack[j];
}
}
for(i in lib.characterReplace){
var ix=lib.characterReplace[i];
for(var j=0;j<ix.length;j++){
if(!libCharacter[i]||lib.filter.characterDisabled(ix[j],libCharacter)) ix.splice(j--,1);
}
if(ix.length){
var name=ix.randomGet();
event.list.push(name);
if(game.recommendDizhu.contains(name)) event.list2.push(name);
list4.addArray(ix);
}
}
for(i in libCharacter){
if(lib.filter.characterDisabled(i,libCharacter)) continue;
if(list4.contains(i)||lib.filter.characterDisabled(i,libCharacter)) continue;
event.list.push(i);
if(game.recommendDizhu.contains(i)) event.list2.push(i);
}
@ -1005,10 +1069,8 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
}
var list;
var list2=[];
var list3=[];
var list4=[];
event.list=[];
event.list2=[];
var libCharacter={};
for(var i=0;i<lib.configOL.characterPack.length;i++){
@ -1018,12 +1080,30 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
if(lib.character[j]) libCharacter[j]=pack[j];
}
}
for(i in libCharacter){
if(lib.filter.characterDisabled(i,libCharacter)) continue;
event.list.push(i);
event.list2.push(i);
for(i in lib.characterReplace){
var ix=lib.characterReplace[i];
for(var j=0;j<ix.length;j++){
if(!libCharacter[ix[j]]||lib.filter.characterDisabled(ix[j],libCharacter)) ix.splice(j--,1);
}
if(ix.length){
event.list.push(i);
list4.addArray(ix);
}
}
_status.characterlist=event.list.slice(0);
game.broadcast(function(list){
for(var i in lib.characterReplace){
var ix=lib.characterReplace[i];
for(var j=0;j<ix.length;j++){
if(!list.contains(ix[j])) ix.splice(j--,1);
}
}
},list4);
for(i in libCharacter){
if(list4.contains(i)||lib.filter.characterDisabled(i,libCharacter)) continue;
event.list.push(i);
list4.push(i)
}
_status.characterlist=list4;
"step 1"
var list=[];
var selectButton=(lib.configOL.double_character?2:1);
@ -1042,7 +1122,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
var num3=0;
if(game.players[i]==game.zhu) num3=3;
var str='选择角色';
list.push([game.players[i],[str,[event.list.randomRemove(num+num3),'character']],selectButton,true]);
list.push([game.players[i],[str,[event.list.randomRemove(num+num3),'characterx']],selectButton,true]);
}
game.me.chooseButtonOL(list,function(player,result){
if(game.online||player==game.me) player.init(result.links[0],result.links[1]);
@ -1051,13 +1131,18 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
for(var i in result){
if(result[i]&&result[i].links){
for(var j=0;j<result[i].links.length;j++){
event.list2.remove(result[i].links[j]);
event.list.remove(get.sourceCharacter(result[i].links[j]));
}
}
}
for(var i in result){
if(result[i]=='ai'){
result[i]=event.list2.randomRemove(lib.configOL.double_character?2:1);
var listc=event.list.randomRemove(lib.configOL.double_character?2:1);
for(var i=0;i<listc.length;i++){
var listx=lib.characterReplace[listc[i]];
if(listx&&listx.length) listc[i]=listx.randomGet();
}
result[i]=listc;
}
else{
result[i]=result[i].links

View File

@ -1005,11 +1005,16 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
}
}
if(_status.event.zhongmode){
var listc=list.slice(0,2);
for(var i=0;i<listc.length;i++){
var listx=lib.characterReplace[listc[i]];
if(listx&&listx.length) listc[i]=listx.randomGet();
}
if(get.config('double_character')){
player.init(list[0],list[1]);
player.init(listc[0],listc[1]);
}
else{
player.init(list[0]);
player.init(listc[0]);
}
if(player.identity=='mingzhong'){
player.hp++;
@ -1031,6 +1036,8 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
choice=list[0];
choice2=list[1];
}
if(lib.characterReplace[choice]&&lib.characterReplace[choice].length) choice=lib.characterReplace[choice].randomGet();
if(lib.characterReplace[choice2]&&lib.characterReplace[choice2].length) choice2=lib.characterReplace[choice2].randomGet();
if(get.config('double_character')){
player.init(choice,choice2);
}
@ -1044,30 +1051,40 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
}
}
else if(player.identity=='zhong'&&(Math.random()<0.5||['sunliang','key_akane'].contains(game.zhu.name))){
var listc=list.slice(0);
for(var i=0;i<listc.length;i++){
var listx=lib.characterReplace[listc[i]];
if(listx&&listx.length) listc[i]=listx.randomGet();
}
var choice=0;
for(var i=0;i<list.length;i++){
if(lib.character[list[i]][1]==game.zhu.group){
for(var i=0;i<listc.length;i++){
if(lib.character[listc[i]][1]==game.zhu.group){
choice=i;break;
}
}
if(get.config('double_character')){
player.init(list[choice],list[choice==0?choice+1:choice-1]);
player.init(listc[choice],listc[choice==0?choice+1:choice-1]);
}
else{
player.init(list[choice]);
player.init(listc[choice]);
}
}
else{
var listc=list.slice(0,2);
for(var i=0;i<listc.length;i++){
var listx=lib.characterReplace[listc[i]];
if(listx&&listx.length) listc[i]=listx.randomGet();
}
if(get.config('double_character')){
player.init(list[0],list[1]);
player.init(listc[0],listc[1]);
}
else{
player.init(list[0]);
player.init(listc[0]);
}
}
if(back){
list.remove(player.name);
list.remove(player.name2);
list.remove(get.sourceCharacter(player.name));
list.remove(get.sourceCharacter(player.name2));
for(var i=0;i<list.length;i++){
back.push(list[i]);
}
@ -1103,6 +1120,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
var list;
var list2=[];
var list3=[];
var list4=[];
var identityList;
var chosen=lib.config.continue_name||[];
game.saveConfig('continue_name');
@ -1216,7 +1234,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
_status.event.parent.swapnodialog=function(dialog,list){
var buttons=ui.create.div('.buttons');
var node=dialog.buttons[0].parentNode;
dialog.buttons=ui.create.buttons(list,'character',buttons);
dialog.buttons=ui.create.buttons(list,'characterx',buttons);
dialog.content.insertBefore(buttons,node);
buttons.animate('start');
node.remove();
@ -1401,10 +1419,30 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
game.me.setIdentity();
game.me.node.identity.classList.remove('guessing');
}
//选将框分配
for(i in lib.characterReplace){
var ix=lib.characterReplace[i];
for(var j=0;j<ix.length;j++){
if(chosen.contains(ix[j])||lib.filter.characterDisabled(ix[j])) ix.splice(j--,1);
}
if(ix.length){
event.list.push(i);
list4.addArray(ix);
var bool=false;
for(var j of ix){
if(lib.character[j][4]&&lib.character[j][4].contains('zhu')){
bool=true;break;
}
}
(bool?list2:list3).push(i);
}
}
for(i in lib.character){
if(list4.contains(i)) continue;
if(chosen.contains(i)) continue;
if(lib.filter.characterDisabled(i)) continue;
event.list.push(i);
list4.push(i);
if(lib.character[i][4]&&lib.character[i][4].contains('zhu')){
list2.push(i);
}
@ -1414,7 +1452,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
}
list2.sort(lib.sort.character);
event.list.randomSort();
_status.characterlist=event.list.slice(0);
_status.characterlist=list4.slice(0).randomSort();
list3.randomSort();
if(_status.brawl&&_status.brawl.chooseCharacterFilter){
_status.brawl.chooseCharacterFilter(event.list,list2,list3);
@ -1428,8 +1466,8 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
}
if(game.zhu!=game.me){
event.ai(game.zhu,event.list,list2)
event.list.remove(game.zhu.name);
event.list.remove(game.zhu.name2);
event.list.remove(get.sourceCharacter(game.zhu.name));
event.list.remove(get.sourceCharacter(game.zhu.name2));
if(_status.brawl&&_status.brawl.chooseCharacter){
list=_status.brawl.chooseCharacter(event.list,num);
if(list===false||list==='nozhu'){
@ -1476,7 +1514,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
if(_status.brawl&&_status.brawl.chooseCharacterStr){
str=_status.brawl.chooseCharacterStr;
}
dialog=ui.create.dialog(str,'hidden',[list,'character']);
dialog=ui.create.dialog(str,'hidden',[list,'characterx']);
if(!_status.brawl||!_status.brawl.noAddSetting){
if(get.config('change_identity')){
addSetting(dialog);
@ -1522,6 +1560,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
}
}
else{
list2.sort(lib.sort.character);
list3.randomSort();
if(_status.brawl&&_status.brawl.chooseCharacter){
list=_status.brawl.chooseCharacter(list2,list3,num);
@ -1549,7 +1588,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
}
var buttons=ui.create.div('.buttons');
var node=_status.event.dialog.buttons[0].parentNode;
_status.event.dialog.buttons=ui.create.buttons(list,'character',buttons);
_status.event.dialog.buttons=ui.create.buttons(list,'characterx',buttons);
_status.event.dialog.content.insertBefore(buttons,node);
buttons.animate('start');
node.remove();
@ -1831,6 +1870,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
var list;
var list2=[];
var list3=[];
var list4=[];
event.list=[];
event.list2=[];
@ -1842,10 +1882,38 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
if(lib.character[j]) libCharacter[j]=pack[j];
}
}
for(i in lib.characterReplace){
var ix=lib.characterReplace[i];
for(var j=0;j<ix.length;j++){
if(!libCharacter[ix[j]]||lib.filter.characterDisabled(ix[j])) ix.splice(j--,1);
}
if(ix.length){
event.list.push(i);
event.list2.push(i);
list4.addArray(ix);
var bool=false;
for(var j of ix){
if(libCharacter[j][4]&&libCharacter[j][4].contains('zhu')){
bool=true;break;
}
}
(bool?list2:list3).push(i);
}
}
game.broadcast(function(list){
for(var i in lib.characterReplace){
var ix=lib.characterReplace[i];
for(var j=0;j<ix.length;j++){
if(!list.contains(ix[j])) ix.splice(j--,1);
}
}
},list4);
for(i in libCharacter){
if(list4.contains(i)) continue;
if(lib.filter.characterDisabled(i,libCharacter)) continue;
event.list.push(i);
event.list2.push(i);
list4.push(i);
if(libCharacter[i][4]&&libCharacter[i][4].contains('zhu')){
list2.push(i);
}
@ -1853,16 +1921,17 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
list3.push(i);
}
}
_status.characterlist=event.list.slice(0);
_status.characterlist=list4.slice(0);
if(event.zhongmode){
list=event.list.randomGets(8);
}
else{
list2.sort(lib.sort.character);
list=list2.concat(list3.randomGets(5));
}
var next=game.zhu.chooseButton(true);
next.set('selectButton',(lib.configOL.double_character?2:1));
next.set('createDialog',['选择角色',[list,'character']]);
next.set('createDialog',['选择角色',[list,'characterx']]);
next.set('callback',function(player,result){
player.init(result.links[0],result.links[1]);
});
@ -1873,10 +1942,10 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
if(game.me!=game.zhu){
game.zhu.init(result.links[0],result.links[1])
}
event.list.remove(game.zhu.name);
event.list.remove(game.zhu.name2);
event.list2.remove(game.zhu.name);
event.list2.remove(game.zhu.name2);
event.list.remove(get.sourceCharacter(game.zhu.name));
event.list.remove(get.sourceCharacter(game.zhu.name2));
event.list2.remove(get.sourceCharacter(game.zhu.name));
event.list2.remove(get.sourceCharacter(game.zhu.name2));
if(game.players.length>4){
game.zhu.maxHp++;
@ -1946,7 +2015,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
if(game.players[i].special_identity){
str+=''+get.translation(game.players[i].special_identity)+'';
}
list.push([game.players[i],[str,[event.list.randomRemove(num+num3),'character']],selectButton,true]);
list.push([game.players[i],[str,[event.list.randomRemove(num+num3),'characterx']],selectButton,true]);
}
}
game.me.chooseButtonOL(list,function(player,result){
@ -1957,16 +2026,20 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
for(var i in result){
if(result[i]&&result[i].links){
for(var j=0;j<result[i].links.length;j++){
event.list2.remove(result[i].links[j]);
event.list2.remove(get.sourceCharacter(result[i].links[j]));
}
}
}
for(var i in result){
if(result[i]=='ai'){
result[i]=event.list2.randomRemove(lib.configOL.double_character?2:1);
for(var j=0;j<result[i].length;j++){
var listx=lib.characterReplace[result[i][j]];
if(listx&&listx.length) listc[j]=listx.randomGet();
}
}
else{
result[i]=result[i].links
result[i]=result[i].links;
}
if(lib.character[result[i][0]]&&lib.character[result[i][0]][1]=='shen') shen.push(lib.playerOL[i]);
}

View File

@ -902,6 +902,21 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
return this;
},
dieAfter:function(source){
var dead=this;
if(game.me.isDead()){
if(!_status.mylist.length){
_status.friendCount.innerHTML='友军: '+get.cnNumber(0);
game.over(false);
}
}
else if(game.enemy.isDead()){
if(!_status.enemylist.length){
_status.enemyCount.innerHTML='敌军: '+get.cnNumber(0);
game.over(true);
}
}
},
dieAfter2:function(source){
var dead=this;
if(game.me.isDead()){
if(!_status.mylist.length){
@ -1036,7 +1051,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
setTimeout(function(){
dead.delete();
},500);
}
},
}
},
beastList:['stone_misha','stone_leiouke','stone_huofu','stone_caoyuanshi','stone_jiewangzhu',

View File

@ -1151,15 +1151,28 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
}
game.players[i].node.identity.dataset.color=game.players[i].side+'zhu';
}
//22选将框分配
var list=[];
for(i in lib.character){
if(!lib.filter.characterDisabled(i)){
var list4=[];
for(i in lib.characterReplace){
var ix=lib.characterReplace[i];
for(var j=0;j<ix.length;j++){
if(lib.filter.characterDisabled(ix[j])) ix.splice(j--,1);
}
if(ix.length){
list.push(i);
list4.addArray(ix);
}
}
for(i in lib.character){
if(!list4.contains(i)&&!lib.filter.characterDisabled(i)){
list.push(i);
list4.push(i);
}
}
var choose=[];
event.list=list;
_status.characterlist=list;
_status.characterlist=list4;
var addSetting=function(dialog){
dialog.add('选择座位').classList.add('add-setting');
@ -1253,7 +1266,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
game.additionaldead=[];
basenum*=2;
}
var dialog=ui.create.dialog(basestr,[characterChoice,'character']);
var dialog=ui.create.dialog(basestr,[characterChoice,'characterx']);
game.me.chooseButton(true,dialog,basenum).set('onfree',true);
if(!_status.brawl||!_status.brawl.noAddSetting){
if(get.config('change_identity')){
@ -1272,7 +1285,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
}
var buttons=ui.create.div('.buttons');
var node=_status.event.dialog.buttons[0].parentNode;
_status.event.dialog.buttons=ui.create.buttons(list.randomGets(7),'character',buttons);
_status.event.dialog.buttons=ui.create.buttons(list.randomGets(7),'characterx',buttons);
_status.event.dialog.content.insertBefore(buttons,node);
buttons.animate('start');
node.remove();
@ -1375,9 +1388,13 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
}
}
else{
game.players[i].init(event.list.randomRemove());
var name=event.list.randomRemove();
if(lib.characterReplace[name]&&lib.characterReplace[name].length) name=lib.characterReplace[name].randomGet();
game.players[i].init(name);
if(_status.replacetwo){
game.players[i].replacetwo=event.list.randomRemove();
var name2=event.list.randomRemove();
if(lib.characterReplace[name2]&&lib.characterReplace[name2].length) name2=lib.characterReplace[name2].randomGet();
game.players[i].replacetwo=name2;
}
}
}
@ -3045,12 +3062,47 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
}
}
}];
var list=get.charactersOL();
//22联机分配武将
var list=[];
var libCharacter={};
var list4=[];
for(var i=0;i<lib.configOL.characterPack.length;i++){
var pack=lib.characterPack[lib.configOL.characterPack[i]];
for(var j in pack){
if(typeof func=='function'&&func(j)) continue;
if(lib.connectBanned.contains(j)) continue;
if(lib.character[j]) libCharacter[j]=pack[j];
}
}
for(i in lib.characterReplace){
var ix=lib.characterReplace[i];
for(var j=0;j<ix.length;j++){
if(!libCharacter[ix[j]]||lib.filter.characterDisabled(ix[j],libCharacter)) ix.splice(j--,1);
}
if(ix.length){
list.push(i);
list4.addArray(ix);
}
}
game.broadcast(function(list){
for(var i in lib.characterReplace){
var ix=lib.characterReplace[i];
for(var j=0;j<ix.length;j++){
if(!list.contains(ix[j])) ix.splice(j--,1);
}
}
},list4);
for(i in libCharacter){
if(list4.contains(i)||lib.filter.characterDisabled(i,libCharacter)) continue;
list.push(i);
list4.push(i);
}
var choose=[];
event.list=list;
_status.characterlist=list;
_status.characterlist=list4;
for(var i=0;i<game.players.length;i++){
choose.push([game.players[i],['选择角色',[list.randomRemove(7),'character']],true]);
choose.push([game.players[i],['选择角色',[list.randomRemove(7),'characterx']],true]);
}
game.me.chooseButtonOL(choose,function(player,result){
if(game.online||player==game.me) player.init(result.links[0]);
@ -3058,7 +3110,9 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
'step 1'
for(var i in result){
if(result[i]=='ai'){
result[i]=event.list.randomRemove();
var name=event.list.randomRemove();
if(lib.characterReplace[name]&&lib.characterReplace[name].length) name=lib.characterReplace[name].randomGet();
result[i]=name;
}
else{
result[i]=result[i].links[0];