This commit is contained in:
libccy 2017-01-08 12:09:34 +08:00
parent 6ce42c0317
commit 0a135f5331
14 changed files with 292 additions and 92 deletions

View File

@ -785,21 +785,35 @@ card.swd={
type:'jiguan', type:'jiguan',
wuxieable:true, wuxieable:true,
filterTarget:function(card,player,target){ filterTarget:function(card,player,target){
var es=target.get('e'); return target==player;
for(var i=0;i<es.length;i++){ // var es=target.get('e');
if(lib.inpile.contains(es[i].name)) return true; // for(var i=0;i<es.length;i++){
} // if(lib.inpile.contains(es[i].name)) return true;
return false; // }
// return false;
}, },
selectTarget:-1,
content:function(){ content:function(){
var es=target.get('e'); var es=target.get('e');
var list=get.typeCard('hslingjian'); var list=get.typeCard('hslingjian');
var list2=get.typeCard('jiqi');
var cards=[]; var cards=[];
var time=0; var time=0;
target.clearEquipTrigger();
for(var i=0;i<es.length;i++){ for(var i=0;i<es.length;i++){
if(lib.inpile.contains(es[i].name)){ if(!lib.inpile.contains(es[i].name)){
var card=game.createCard(list.randomGet()); es.splice(i--,1);
}
}
var num=get.rand(es.length);
var card;
for(var i=0;i<es.length;i++){
target.clearEquipTrigger(es[i]);
if(i==num){
card=game.createCard(list2.randomGet());
}
else{
card=game.createCard(list.randomGet());
}
cards.push(card); cards.push(card);
time+=200; time+=200;
setTimeout((function(card,name){ setTimeout((function(card,name){
@ -821,21 +835,22 @@ card.swd={
} }
}(es[i],lib.skill._lingjianduanzao.process([card,es[i]]))),i*200); }(es[i],lib.skill._lingjianduanzao.process([card,es[i]]))),i*200);
} }
}
target.$gain2(cards); target.$gain2(cards);
game.delay(0,time) game.delay(0,time)
}, },
ai:{ ai:{
value:7,
order:7.5, order:7.5,
result:{ result:{
target:function(player,target){ // target:function(player,target){
var es=target.get('e'); // var es=target.get('e');
var num=0; // var num=0;
for(var i=0;i<es.length;i++){ // for(var i=0;i<es.length;i++){
if(lib.inpile.contains(es[i].name)) num++; // if(lib.inpile.contains(es[i].name)) num++;
} // }
return num; // return num;
} // }
target:1
} }
} }
}, },
@ -1752,13 +1767,13 @@ card.swd={
_shenmiguo:{ _shenmiguo:{
trigger:{player:'useCardAfter'}, trigger:{player:'useCardAfter'},
direct:true, direct:true,
usable:1,
filter:function(event,player){ filter:function(event,player){
if(event.parent.name=='_shenmiguo') return false; if(event.parent.name=='_shenmiguo') return false;
if(_status.currentPhase!=player) return false; if(_status.currentPhase!=player) return false;
if(event.parent.parent.name!='phaseUse') return false; if(event.parent.parent.name!='phaseUse') return false;
if(!event.targets||!event.card) return false; if(!event.targets||!event.card) return false;
if(event.card.name=='shenmiguo') return false; if(event.card.name=='shenmiguo') return false;
if(player.hasSkill('shenmiguo2')) return false;
var type=get.type(event.card); var type=get.type(event.card);
if(type!='basic'&&type!='trick') return false; if(type!='basic'&&type!='trick') return false;
var card=game.createCard(event.card.name,event.card.suit,event.card.number,event.card.nature); var card=game.createCard(event.card.name,event.card.suit,event.card.number,event.card.nature);
@ -1788,9 +1803,13 @@ card.swd={
return true; return true;
},trigger.player,-1).set('cardname',trigger.card.name).targetRequired=true; },trigger.player,-1).set('cardname',trigger.card.name).targetRequired=true;
'step 1' 'step 1'
if(result.bool){
player.addTempSkill('shenmiguo2','phaseAfter');
}
delete player.storage.shenmiguo; delete player.storage.shenmiguo;
} }
}, },
shenmiguo2:{},
yuruyi:{ yuruyi:{
trigger:{player:'drawBegin'}, trigger:{player:'drawBegin'},
forced:true, forced:true,
@ -4399,7 +4418,7 @@ card.swd={
_lingjianduanzao:'煅造', _lingjianduanzao:'煅造',
_lingjianduanzao_info:'出牌阶段你可以将一张装备牌和一张可煅造的牌合成为一件强化装备并可装备给距离1以内的一名角色', _lingjianduanzao_info:'出牌阶段你可以将一张装备牌和一张可煅造的牌合成为一件强化装备并可装备给距离1以内的一名角色',
jiguanshu:'机关鼠', jiguanshu:'机关鼠',
jiguanshu_info:'出牌阶段对一名角色使用,用随机零件强化目标装备区内的装备', jiguanshu_info:'出牌阶段对自己使用,用随机祭器强化装备区内的一张随机装备,然后用随机零件强化其余的装备',
lingjiandai:'零件袋', lingjiandai:'零件袋',
lingjiandai_info:'出牌阶段对自己使用获得3张随机零件', lingjiandai_info:'出牌阶段对自己使用获得3张随机零件',
mujiaren:'木甲人', mujiaren:'木甲人',

View File

@ -31,7 +31,7 @@ character.hearth={
hs_trueheart:['female','qun',3,['qianghuax']], hs_trueheart:['female','qun',3,['qianghuax']],
hs_sainaliusi:['male','wu',4,['chongsheng','yulu']], hs_sainaliusi:['male','wu',4,['chongsheng','yulu']],
hs_lrhonin:['male','wei',4,['bingyan','yufa']], hs_lrhonin:['male','wei',4,['bingyan','yufa']],
hs_bolvar:['male','wei',4,['yuanzheng','byuhuo']], hs_bolvar:['male','wei',4,['yuanzheng','bzhuiji']],
hs_fuding:['male','wei',4,['shengdun','fbeifa']], hs_fuding:['male','wei',4,['shengdun','fbeifa']],
hs_xuanzhuanjijia:['male','shu',3,['jixuan']], hs_xuanzhuanjijia:['male','shu',3,['jixuan']],
hs_ysera:['female','wu',4,['chenshui']], hs_ysera:['female','wu',4,['chenshui']],
@ -95,6 +95,23 @@ character.hearth={
hs_malfurion:['hs_malorne'], hs_malfurion:['hs_malorne'],
}, },
skill:{ skill:{
bzhuiji:{
trigger:{global:'dieAfter'},
check:function(event,player){
return ai.get.attitude(player,event.source)<=0;
},
filter:function(event,player){
return event.source&&event.source.isAlive()&&event.source!=player;
},
content:function(){
player.draw(2);
player.useCard({name:'juedou'},trigger.source);
},
ai:{
threaten:1.5,
expose:0.1
}
},
lianjin:{ lianjin:{
enable:'phaseUse', enable:'phaseUse',
usable:2, usable:2,
@ -955,6 +972,7 @@ character.hearth={
event.target.draw(result.cards.length); event.target.draw(result.cards.length);
player.storage.xianji3=event.target; player.storage.xianji3=event.target;
player.addSkill('xianji3'); player.addSkill('xianji3');
player.addExpose(0.2);
} }
} }
}, },
@ -1637,6 +1655,16 @@ character.hearth={
} }
}, },
yuanzheng:{ yuanzheng:{
trigger:{player:'useCardToBegin'},
direct:true,
filter:function(event,player){
return event.target&&event.target!=player&&get.distance(player,event.target)>1&&event.target.num('he')>0;
},
content:function(){
player.discardPlayerCard(trigger.target,get.prompt('yuanzheng',trigger.target),'hej').logSkill=['yuanzheng',trigger.target];
}
},
yuanzheng_old:{
trigger:{player:'useCardToBegin'}, trigger:{player:'useCardToBegin'},
direct:true, direct:true,
filter:function(event,player){ filter:function(event,player){
@ -4907,7 +4935,9 @@ character.hearth={
shifa:'嗜法', shifa:'嗜法',
shifa_info:'锁定技,出牌阶段开始时,你令场上所有角色各获得一张随机锦囊牌', shifa_info:'锁定技,出牌阶段开始时,你令场上所有角色各获得一张随机锦囊牌',
yuanzheng:'远征', yuanzheng:'远征',
yuanzheng_info:'每当你对攻击范围外的一名角色使用一张牌,你可以选择一项:摸一张牌,或视为对目标使用一张杀', yuanzheng_info:'每当你对距离1以外的角色使用一张牌你可以弃置目标区域内的一张牌',
bzhuiji:'追击',
bzhuiji_info:'每当一名角色死亡,你可以摸两张牌,并视为对杀死该角色的人使用一张决斗',
byuhuo:'浴火', byuhuo:'浴火',
byuhuo2:'浴火', byuhuo2:'浴火',
byuhuo_info:'觉醒技当你进入濒死状态时你须将体力和体力上限变为2并将武将牌翻至背面在你的下一回合开始时你对所有其他角色造成两点火焰伤害在此之前你不能成为其他角色的卡牌的目标', byuhuo_info:'觉醒技当你进入濒死状态时你须将体力和体力上限变为2并将武将牌翻至背面在你的下一回合开始时你对所有其他角色造成两点火焰伤害在此之前你不能成为其他角色的卡牌的目标',

View File

@ -20,7 +20,7 @@ character.ow={
ow_tuobiang:['male','shu',3,['paotai','maoding']], ow_tuobiang:['male','shu',3,['paotai','maoding']],
// ow_baolei:['female','shu',3,[]], // ow_baolei:['female','shu',3,[]],
ow_banzang:['male','qun',4,['fengshi','yinbo']], ow_banzang:['male','qun',4,['fengshi','yinbo']],
ow_laiyinhate:['male','qun',4,['lzhongjia','mengji']], ow_laiyinhate:['male','qun',4,['zhongdun','mengji']],
// ow_luba:['male','shu',4,[]], // ow_luba:['male','shu',4,[]],
// ow_wensidun:['male','shu',4,[]], // ow_wensidun:['male','shu',4,[]],
// ow_zhaliya:['female','shu',4,['pingzhang','lichang']], // ow_zhaliya:['female','shu',4,['pingzhang','lichang']],
@ -31,18 +31,18 @@ character.ow={
forced:true, forced:true,
unique:true, unique:true,
filter:function(event,player){ filter:function(event,player){
return player.storage.zhongjia&&!player.hujia&&event.card&&event.card.name=='sha'&&event.notLink(); return player.storage.zhongdun&&!player.hujia&&event.card&&event.card.name=='sha'&&event.notLink();
}, },
content:function(){ content:function(){
trigger.num++; trigger.num++;
} }
}, },
lzhongjia:{ zhongdun:{
unique:true, unique:true,
init2:function(player){ init2:function(player){
if(!player.storage.zhongjia){ if(!player.storage.zhongdun){
player.changeHujia(8); player.changeHujia(game.players.length);
player.storage.zhongjia=true; player.storage.zhongdun=true;
} }
}, },
enable:'phaseUse', enable:'phaseUse',
@ -363,6 +363,7 @@ character.ow={
game.addVideo('storage',player,['shoujia2',null]); game.addVideo('storage',player,['shoujia2',null]);
if(!player.isTurnedOver()){ if(!player.isTurnedOver()){
player.turnOver(); player.turnOver();
player.draw();
} }
}, },
intro:{ intro:{
@ -2577,8 +2578,8 @@ character.ow={
translate:{ translate:{
mengji:'猛击', mengji:'猛击',
mengji_info:'锁定技,若你已发动重盾,当你没有护甲时,你的杀造成的伤害+1', mengji_info:'锁定技,若你已发动重盾,当你没有护甲时,你的杀造成的伤害+1',
lzhongjia:'重盾', zhongdun:'重盾',
lzhongjia_info:'游戏开始时你获得8点护甲;出牌阶段限一次,你可以弃置一张牌并将一点护甲分给一名没有护甲的其他角色', zhongdun_info:'游戏开始时,你获得等同于游戏人数护甲;出牌阶段限一次,你可以弃置一张牌并将一点护甲分给一名没有护甲的其他角色',
paotai:'炮台', paotai:'炮台',
paotai2:'炮台', paotai2:'炮台',
paotai_info:'出牌阶段你可以弃置一张杀布置或升级一个炮台最高3级回合结束阶段炮台有一定机率对一名随机敌人造成一点火焰伤害每当你受到杀造成的伤害炮台降低一级', paotai_info:'出牌阶段你可以弃置一张杀布置或升级一个炮台最高3级回合结束阶段炮台有一定机率对一名随机敌人造成一点火焰伤害每当你受到杀造成的伤害炮台降低一级',
@ -2595,7 +2596,7 @@ character.ow={
shoujia:'兽夹', shoujia:'兽夹',
shoujia2:'兽夹', shoujia2:'兽夹',
shoujia3:'兽夹', shoujia3:'兽夹',
shoujia_info:'出牌阶段限一次,你可以将一张牌背面朝上置于一名其他角色的武将牌上,当该角色使用一张与此牌花色相同的牌指定其他角色为目标时,将此牌置入弃牌堆,该角色将武将牌翻至背面;当该角色对你造成伤害时,将此牌置入弃牌堆', shoujia_info:'出牌阶段限一次,你可以将一张牌背面朝上置于一名其他角色的武将牌上,当该角色使用一张与此牌花色相同的牌指定其他角色为目标时,将此牌置入弃牌堆,该角色将武将牌翻至背面并摸一张牌;当该角色对你造成伤害时,将此牌置入弃牌堆',
shihuo:'嗜火', shihuo:'嗜火',
shihuo_info:'锁定技,每当一名角色受到火焰伤害,你摸一张牌', shihuo_info:'锁定技,每当一名角色受到火焰伤害,你摸一张牌',
shanguang:'闪光', shanguang:'闪光',

View File

@ -240,6 +240,7 @@ character.refresh={
}, },
rejizhi:{ rejizhi:{
audio:2, audio:2,
usable:3,
trigger:{player:'useCard'}, trigger:{player:'useCard'},
frequent:true, frequent:true,
filter:function(event){ filter:function(event){
@ -1563,7 +1564,7 @@ character.refresh={
rerende:'仁德', rerende:'仁德',
rerende_info:'出牌阶段,你可以将至少一张手牌交给其他角色,然后你于此阶段内不能再以此法交给该角色牌;若你于此阶段内给出的牌首次达到两张,你可以视为使用一张基本牌', rerende_info:'出牌阶段,你可以将至少一张手牌交给其他角色,然后你于此阶段内不能再以此法交给该角色牌;若你于此阶段内给出的牌首次达到两张,你可以视为使用一张基本牌',
liyu_info:'当你使用【杀】对一名其他角色造成伤害后,该角色可令你获得其一张牌,若如此做,则视为你对其选择的另一名角色使用一张【决斗】', liyu_info:'当你使用【杀】对一名其他角色造成伤害后,该角色可令你获得其一张牌,若如此做,则视为你对其选择的另一名角色使用一张【决斗】',
rejizhi_info:'当你使用一张装备牌或锦囊牌时,你可以摸一张牌并展示之,若此牌是基本牌,你须弃置一张手牌', rejizhi_info:'当你使用一张装备牌或锦囊牌时,你可以摸一张牌并展示之,若此牌是基本牌,你须弃置一张手牌每回合限3次',
xunxun_info:'摸牌阶段,你可以放弃摸牌,改为观看牌堆顶的四张牌,然后获得其中的两张牌,将其余的牌以任意顺序置于牌堆底。', xunxun_info:'摸牌阶段,你可以放弃摸牌,改为观看牌堆顶的四张牌,然后获得其中的两张牌,将其余的牌以任意顺序置于牌堆底。',
wangxi_info:'每当你对其他角色造成1点伤害后或受到其他角色造成的1点伤害后你可与该角色各摸一张牌。', wangxi_info:'每当你对其他角色造成1点伤害后或受到其他角色造成的1点伤害后你可与该角色各摸一张牌。',
reguose_info:'出牌阶段限一次,你可以选择一项:将一张方片花色牌当做【乐不思蜀】使用;或弃置一张方片花色牌并弃置场上的一张【乐不思蜀】。选择完成后,你摸一张牌。', reguose_info:'出牌阶段限一次,你可以选择一项:将一张方片花色牌当做【乐不思蜀】使用;或弃置一张方片花色牌并弃置场上的一张【乐不思蜀】。选择完成后,你摸一张牌。',

View File

@ -6554,6 +6554,7 @@ character.sp={
jici:'激词', jici:'激词',
jici_info:'当你发动“鼓舌”拼点的牌亮出后若点数小于X你可令点数+X若点数等于X你可令你本回合发动“鼓舌”的次数上限+1X为你“饶舌”标记的数量', jici_info:'当你发动“鼓舌”拼点的牌亮出后若点数小于X你可令点数+X若点数等于X你可令你本回合发动“鼓舌”的次数上限+1X为你“饶舌”标记的数量',
shefu:'设伏', shefu:'设伏',
shefu_bg:'伏',
shefu_info:'结束阶段开始时,你可以将一张手牌移出游戏,称为"伏兵"。然后为"伏兵"记录一个基本牌或锦囊牌名称(须与其他"伏兵"记录的名称均不同)。你的回合外,当有其他角色使用与你记录的"伏兵"牌名相同的牌时,你可以令此牌无效,然后将该"伏兵"置入弃牌堆', shefu_info:'结束阶段开始时,你可以将一张手牌移出游戏,称为"伏兵"。然后为"伏兵"记录一个基本牌或锦囊牌名称(须与其他"伏兵"记录的名称均不同)。你的回合外,当有其他角色使用与你记录的"伏兵"牌名相同的牌时,你可以令此牌无效,然后将该"伏兵"置入弃牌堆',
benyu:'贲育', benyu:'贲育',
benyu2:'贲育', benyu2:'贲育',

View File

@ -2719,32 +2719,30 @@ character.swd={
dangping2:{}, dangping2:{},
duishi:{ duishi:{
enable:'phaseUse', enable:'phaseUse',
usable:1,
filter:function(event,player){ filter:function(event,player){
return player.num('h')>0; return player.num('h')>0&&!player.hasSkill('duishi2');
}, },
filterTarget:function(card,player,target){ filterTarget:function(card,player,target){
return player!=target&&target.num('h')>0; return player!=target&&target.num('h')>0&&!target.hasSkill('duishi3');
}, },
filterCard:true, filterCard:true,
check:function(card){return 8-ai.get.value(card)}, check:function(card){return 8-ai.get.value(card)},
content:function(){ content:function(){
"step 0" "step 0"
var suit=get.suit(cards[0]); var suit=get.suit(cards[0]);
target.chooseToDiscard({suit:suit},'h','弃置一张'+get.translation(suit)+ target.chooseToDiscard({suit:suit},'h','对诗:弃置一张'+get.translation(suit)+
'牌并令'+get.translation(player)+'摸一张牌,或随机弃置两张牌').ai=function(card){ '牌,或令'+get.translation(player)+'获得你一张牌').ai=function(card){
return 8-ai.get.value(card); if(ai.get.attitude(target,player)>0) return 0;
return 9-ai.get.value(card);
} }
"step 1" "step 1"
if(result.bool){ if(result.bool){
player.draw(); target.addTempSkill('duishi3','phaseAfter');
} }
else{ else{
var he=target.get('he'); player.gainPlayerCard(target,'he',true);
if(he.length){ player.addTempSkill('duishi2','phaseAfter');
target.discard(he.randomGets(2));
}
} }
}, },
ai:{ ai:{
@ -8256,7 +8254,7 @@ character.swd={
guisi:'归思', guisi:'归思',
guisi_info:'每当你成为杀的目标,你可以交给对方一张手牌并取消之', guisi_info:'每当你成为杀的目标,你可以交给对方一张手牌并取消之',
duishi:'对诗', duishi:'对诗',
duishi_info:'出牌阶段限一次,你可以弃置一张手牌,并指定一名有手牌的角色选择一项:弃置一张与之花色相同的手牌并令你摸一张牌,或随机弃置两张牌', duishi_info:'出牌阶段,你可以弃置一张手牌,并指定一名有手牌的角色选择一项:1)弃置一张与之花色相同的手牌本回合内对诗不能再次指定其为目标2)令你获得其一张牌,对诗失效直到回合结束',
anlianying:'连营', anlianying:'连营',
anlianying_info:'每当你失去最后一张手牌,可摸两张牌', anlianying_info:'每当你失去最后一张手牌,可摸两张牌',
lianwu:'连舞', lianwu:'连舞',

View File

@ -1,5 +1,6 @@
play.boss={ play.boss={
init:function(){ init:function(){
if(get.mode()=='tafang') return;
if(get.mode()!='boss'){ if(get.mode()!='boss'){
lib.characterPack.mode_extension_boss={ lib.characterPack.mode_extension_boss={
boss_zhangchunhua:['female','wei',4,['jueqing','wuxin','shangshix'],['boss','bossallowed'],'wei'], boss_zhangchunhua:['female','wei',4,['jueqing','wuxin','shangshix'],['boss','bossallowed'],'wei'],
@ -156,6 +157,7 @@ play.boss={
} }
}, },
arenaReady:function(){ arenaReady:function(){
if(get.mode()=='tafang') return;
var loadversus=function(){ var loadversus=function(){
if(get.mode()!='versus'){ if(get.mode()!='versus'){
window.mode={}; window.mode={};

View File

@ -1031,6 +1031,12 @@
init:true, init:true,
game:'sgs', game:'sgs',
unfrequent:true unfrequent:true
},
show_favourite_menu:{
name:'显示收藏菜单',
init:true,
game:'sgs',
unfrequent:true
}, },
hide_card_image:{ hide_card_image:{
name:'隐藏卡牌背景', name:'隐藏卡牌背景',
@ -2107,6 +2113,8 @@
map.choice_zhong.hide(); map.choice_zhong.hide();
map.choice_nei.hide(); map.choice_nei.hide();
map.choice_fan.hide(); map.choice_fan.hide();
map.ban_identity.hide();
map.ban_identity2.hide();
} }
else{ else{
map.player_number.show(); map.player_number.show();
@ -2122,6 +2130,13 @@
map.choice_zhong.show(); map.choice_zhong.show();
map.choice_nei.show(); map.choice_nei.show();
map.choice_fan.show(); map.choice_fan.show();
map.ban_identity.show();
if(config.ban_identity=='off'){
map.ban_identity2.hide();
}
else{
map.ban_identity2.show();
}
} }
}, },
identity_mode:{ identity_mode:{
@ -2318,6 +2333,28 @@
} }
} }
}, },
ban_identity:{
name:'屏蔽身份',
init:'off',
item:{
off:'关闭',
zhu:'主公',
zhong:'忠臣',
nei:'内奸',
fan:'反贼',
},
},
ban_identity2:{
name:'屏蔽身份2',
init:'off',
item:{
off:'关闭',
zhu:'主公',
zhong:'忠臣',
nei:'内奸',
fan:'反贼',
},
},
ai_strategy:{ ai_strategy:{
name:'内奸策略', name:'内奸策略',
init:'ai_strategy_1', init:'ai_strategy_1',
@ -4926,6 +4963,15 @@
window.lib=lib; window.lib=lib;
window._status=_status; window._status=_status;
}, },
m:function(){
if(lib.config.game!='sgs'){
game.saveConfig('game','sgs');
}
else{
game.saveConfig('game','hs');
}
game.reload();
},
c:function(){ c:function(){
(function(){ (function(){
var a=0,b=0,c=0,d=0; var a=0,b=0,c=0,d=0;
@ -5242,6 +5288,7 @@
'default':"默认", 'default':"默认",
zhenfa:'阵法', zhenfa:'阵法',
mode_derivation_card_config:'衍生', mode_derivation_card_config:'衍生',
mode_favourite_character_config:'收藏',
heart:"♥︎", heart:"♥︎",
diamond:"♦︎", diamond:"♦︎",
spade:"♠︎", spade:"♠︎",
@ -22204,6 +22251,19 @@
} }
return node; return node;
}; };
if(lib.config.show_favourite_menu&&!connectMenu&&Array.isArray(lib.config.favouriteCharacter)){
lib.characterPack.mode_favourite={};
for(var i=0;i<lib.config.favouriteCharacter.length;i++){
var favname=lib.config.favouriteCharacter[i];
if(lib.character[favname]){
lib.characterPack.mode_favourite[favname]=lib.character[favname];
}
}
if(!get.is.empty(lib.characterPack.mode_favourite)){
ui.favouriteCharacter=createModeConfig('mode_favourite',start.firstChild).link;
}
delete lib.characterPack.mode_favourite;
}
var characterlist=connectMenu?lib.connectCharacterPack:lib.config.all.characters; var characterlist=connectMenu?lib.connectCharacterPack:lib.config.all.characters;
for(var i=0;i<characterlist.length;i++){ for(var i=0;i<characterlist.length;i++){
createModeConfig(characterlist[i],start.firstChild); createModeConfig(characterlist[i],start.firstChild);
@ -28526,6 +28586,7 @@
} }
}, },
favouriteCharacter:function(e){ favouriteCharacter:function(e){
if(typeof this.link=='string'){
if(this.innerHTML=='添加收藏'){ if(this.innerHTML=='添加收藏'){
this.innerHTML='移除收藏'; this.innerHTML='移除收藏';
lib.config.favouriteCharacter.add(this.link); lib.config.favouriteCharacter.add(this.link);
@ -28534,7 +28595,28 @@
this.innerHTML='添加收藏'; this.innerHTML='添加收藏';
lib.config.favouriteCharacter.remove(this.link); lib.config.favouriteCharacter.remove(this.link);
} }
if(ui.favouriteCharacter){
if(lib.config.favouriteCharacter.contains(this.link)){
for(var i=0;i<ui.favouriteCharacter.childElementCount;i++){
if(ui.favouriteCharacter.childNodes[i].link==this.link){
break;
}
}
if(i==ui.favouriteCharacter.childElementCount){
ui.create.button(this.link,'character',ui.favouriteCharacter).classList.add('noclick');
}
}
else{
for(var i=0;i<ui.favouriteCharacter.childElementCount;i++){
if(ui.favouriteCharacter.childNodes[i].link==this.link){
ui.favouriteCharacter.childNodes[i].remove();
break;
}
}
}
}
game.saveConfig('favouriteCharacter',lib.config.favouriteCharacter); game.saveConfig('favouriteCharacter',lib.config.favouriteCharacter);
}
e.stopPropagation(); e.stopPropagation();
}, },
dragtouchdialog:function(e){ dragtouchdialog:function(e){
@ -31082,6 +31164,14 @@
return false; return false;
}, },
}, },
rand:function(num,num2){
if(typeof num2=='number'){
return num+Math.floor(Math.random()*(num2-num+1));
}
else{
return Math.floor(Math.random()*num);
}
},
prompt:function(skill,target,player){ prompt:function(skill,target,player){
player=player||_status.event.player; player=player||_status.event.player;
if(target){ if(target){
@ -32792,7 +32882,7 @@
else{ else{
uiintro.add(get.translation(node)); uiintro.add(get.translation(node));
} }
if(node.name=='muniu'&&get.position(node)=='e'){ if(node.name.indexOf('muniu')==0&&get.position(node)=='e'){
var num=0; var num=0;
if(node.cards){ if(node.cards){
num=node.cards.length; num=node.cards.length;
@ -32803,6 +32893,9 @@
else{ else{
uiintro.add('<div class="text center">'+'共有'+get.cnNumber(num)+'张牌'+'</div>'); uiintro.add('<div class="text center">'+'共有'+get.cnNumber(num)+'张牌'+'</div>');
} }
if(node.name!='muniu'){
uiintro.add('<div class="text">'+lib.translate[node.name+'_info'].slice(81)+'</div>');
}
} }
else if(node.name=='lianyaohu'&&get.position(node)=='e'){ else if(node.name=='lianyaohu'&&get.position(node)=='e'){
var num=0; var num=0;

View File

@ -1,5 +1,5 @@
window.noname_update={ window.noname_update={
version:'1.9.3.3', version:'1.9.3.4',
changeLog:[ changeLog:[
'bug修复', 'bug修复',
], ],
@ -9,15 +9,22 @@ window.noname_update={
'game/game.js', 'game/game.js',
'game/package.js', 'game/package.js',
'mode/boss.js', 'mode/boss.js',
'mode/guozhan.js',
'mode/identity.js',
'character/yijiang.js', 'character/yijiang.js',
'character/sp.js',
'character/hearth.js', 'character/hearth.js',
'character/swd.js', 'character/swd.js',
'character/ow.js',
'character/refresh.js',
'card/hearth.js', 'card/hearth.js',
'card/swd.js', 'card/swd.js',
'extension/boss/extension.js', 'extension/boss/extension.js',
'layout/default/layout.css',
], ],
'1.9.3':[], '1.9.3':[],
'1.9.3.1':[], '1.9.3.1':[],
'1.9.3.2':[], '1.9.3.2':[],
'1.9.3.3':[],
} }
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 KiB

After

Width:  |  Height:  |  Size: 57 KiB

View File

@ -852,6 +852,10 @@ div:not(.handcards)>.card>.info>span,
height:108px; height:108px;
background-size: cover; background-size: cover;
} }
.dialog .buttons>.button.character>.name,
.button.character.longcharacter>.name{
overflow: visible;
}
.card.center{top:calc(50% - 52px);left:calc(50% - 52px);} .card.center{top:calc(50% - 52px);left:calc(50% - 52px);}
.card>.background{font-size: 80px;height: 80px;padding-top: 14px;text-align: center;} .card>.background{font-size: 80px;height: 80px;padding-top: 14px;text-align: center;}
.equips>.card>.background{font-size: 36px;height: 36px;padding-top: 3px;} .equips>.card>.background{font-size: 36px;height: 36px;padding-top: 3px;}
@ -977,7 +981,12 @@ margin-bottom: 5px;
.caption>.ctext{text-align:center;font-size:16px;} .caption>.ctext{text-align:center;font-size:16px;}
.button.character,.button.card{width: 90px;height: 90px;position: relative;margin: 6px;} .button.character,.button.card{width: 90px;height: 90px;position: relative;margin: 6px;}
.button.card{font-size: 14px;} .button.card{font-size: 14px;}
.button.character>.name{left:5px;top:22px;} .button.character>.name{
left:5px;
top:22px;
max-height: 68px;
overflow: hidden;
}
.button.character>.hp{left:5px;top:3px;} .button.character>.hp{left:5px;top:3px;}
.button.character>.hp.text{ .button.character>.hp.text{
top:8px; top:8px;

View File

@ -1174,25 +1174,42 @@ mode.guozhan={
event.skillHidden=true; event.skillHidden=true;
var bool1=(game.expandSkills(lib.character[player.name1][3]).contains(trigger.skill)); var bool1=(game.expandSkills(lib.character[player.name1][3]).contains(trigger.skill));
var bool2=(game.expandSkills(lib.character[player.name2][3]).contains(trigger.skill)); var bool2=(game.expandSkills(lib.character[player.name2][3]).contains(trigger.skill));
var nai=function(){
var player=_status.event.player;
if(!_status.event.yes) return false;
if(player.identity!='unknown') return true;
if(Math.random()<0.5) return true;
var info=get.info(_status.event.skill);
if(info&&info.ai&&info.ai.maixie) return true;
var group=lib.character[player.name1][1];
var popu=get.population(lib.character[player.name1][1])
if(popu>=2||(popu==1&&game.players.length<=4)){
return true;
}
if(get.population(group)>0&&get.totalPopulation(group)+1<=get.population()/2){
return Math.random()<0.2?true:false;
}
var nming=0;
for(var i=0;i<game.players.length;i++){
if(game.players[i]!=player&&game.players[i].identity!='unknown'){
nming++;
}
}
if(nming==game.players.length-1) return Math.random()<0.5?true:false;
return (Math.random()<0.1*nming/game.players.length)?true:false;
}
if(bool1&&bool2){ if(bool1&&bool2){
event.name=player.name1; event.name=player.name1;
event.name2=player.name2; event.name2=player.name2;
var info=get.info(trigger.skill);
var yes=!info.check||info.check(trigger._trigger,player);
var next=player.chooseBool('是否明置'+get.translation(event.name)+'以发动【'+get.translation(trigger.skill)+'】?');
next.ai=function(){
return yes;
};
} }
else{ else{
event.name=bool1?player.name1:player.name2; event.name=bool1?player.name1:player.name2;
var info=get.info(trigger.skill);
var yes=!info.check||info.check(trigger._trigger,player);
var next=player.chooseBool('是否明置'+get.translation(event.name)+'以发动【'+get.translation(trigger.skill)+'】?');
next.ai=function(){
return yes;
};
} }
var info=get.info(trigger.skill);
var next=player.chooseBool('是否明置'+get.translation(event.name)+'以发动【'+get.translation(trigger.skill)+'】?');
next.yes=!info.check||info.check(trigger._trigger,player);
next.skill=trigger.skill;
next.ai=nai
} }
"step 1" "step 1"
if(result.bool){ if(result.bool){
@ -1203,9 +1220,10 @@ mode.guozhan={
} }
else if(event.name2){ else if(event.name2){
var info=get.info(trigger.skill); var info=get.info(trigger.skill);
var yes=!info.check||info.check(trigger._trigger,player); var next=player.chooseBool('是否明置'+get.translation(event.name2)+'以发动【'+get.translation(trigger.skill)+'】?');
player.chooseBool('是否明置'+get.translation(event.name2)+'以发动【'+get.translation(trigger.skill)+'】?').ai=function(){ next.yes=!info.check||info.check(trigger._trigger,player);
return yes; next.ai=function(){
return _status.event.yes;
}; };
} }
else{ else{

View File

@ -134,19 +134,23 @@ mode.hearthstone={
}; };
for(var i=0;i<lib.careerList.length;i++){ for(var i=0;i<lib.careerList.length;i++){
var className=get.translation(lib.careerList[i]); var className=get.translation(lib.careerList[i]);
result[className]=[]; result[className+'_link:'+lib.careerList[i]]=[];
result.list[className]=[]; result.list[className]=[];
} }
result['中立']=[]; result['中立']=[];
result.list['中立']=[]; result.list['中立']=[];
for(var i=0;i<list.length;i++){ for(var i=0;i<list.length;i++){
var className=get.translation(lib.card[list[i][2]].class); var className=get.translation(lib.card[list[i][2]].class);
if(!result[className]){ var className2=className;
result[className]=[]; if(lib.card[list[i][2]].class!='neutral'){
className2+='_link:'+lib.card[list[i][2]].class
}
if(!result[className2]){
result[className2]=[];
result.list[className]=[]; result.list[className]=[];
} }
result.list[className].push(list[i]); result.list[className].push(list[i]);
result[className].push(list[i]); result[className2].push(list[i]);
} }
return result; return result;
}}); }});

View File

@ -748,6 +748,23 @@ mode.identity={
identityList.unshift(event.identity); identityList.unshift(event.identity);
delete event.identity; delete event.identity;
} }
else if(_status.mode!='zhong'&&(!_status.brawl||!_status.brawl.identityShown)){
var ban_identity=[];
ban_identity.push(get.config('ban_identity')||'off');
if(ban_identity[0]!='off'){
ban_identity.push(get.config('ban_identity2')||'off');
}
ban_identity.remove('off');
if(ban_identity.length){
var identityList2=identityList.slice(0);
for(var i=0;i<ban_identity.length;i++){
while(identityList2.remove(ban_identity[i]));
}
ban_identity=identityList2.randomGet();
identityList.remove(ban_identity);
identityList.splice(game.players.indexOf(game.me),0,ban_identity);
}
}
for(i=0;i<game.players.length;i++){ for(i=0;i<game.players.length;i++){
if(_status.brawl&&_status.brawl.identityShown){ if(_status.brawl&&_status.brawl.identityShown){
if(game.players[i].identity=='zhu') game.zhu=game.players[i]; if(game.players[i].identity=='zhu') game.zhu=game.players[i];