v1.9.49.1

This commit is contained in:
Congyue Cui 2018-04-23 01:59:02 +08:00
parent 18442f0d7c
commit 831356ca3e
24 changed files with 806 additions and 160 deletions

View File

@ -1530,6 +1530,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
qiankunbiao_info:'随机弃置一名其他角色和其相邻角色的一张牌',
bingpotong:'天女散花',
bingpotong_ab:'散花',
bingpotong_info:'出牌阶段对至多3名角色使用你与每个目标依次同时展示一张手牌若颜色相同你弃置展示的手牌目标失去一点体力并终止结算',
feibiao:'飞镖',
feibiao_info:'出牌阶段对一名距离1以外的角色使用令其弃置一张黑色手牌或流失一点体力',

View File

@ -819,13 +819,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
type:'spell',
subtype:'spell_gold',
vanish:true,
enable:function(event,player){
if(player.maxHp==1) return false;
var list=player.getEnemies();
for(var i=0;i<list.length;i++){
if(list[i].getStockSkills().length) return true;
}
},
enable:true,
notarget:true,
contentBefore:function(){
player.$skill('冲刺','legend','metal');

View File

@ -411,9 +411,9 @@ game.import('card',function(lib,game,ui,get,ai,_status){
}
}
else{
if(cards[0]){
cards[0].discard();
}
// if(cards[0]){
// cards[0].discard();
// }
event.finish();
}
'step 1'
@ -424,6 +424,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
else{
target.addTempSkill('chuansongmen2');
}
cards[0].fix();
target.gain(cards,'gain2');
}
else{

View File

@ -4423,6 +4423,15 @@ game.import('card',function(lib,game,ui,get,ai,_status){
},
content:function(){
trigger.num++;
},
ai:{
effect:{
target:function(card,player,target){
if(card.name=='sha'){
return [1,-2];
}
}
}
}
},
baihupifeng:{

View File

@ -4246,7 +4246,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
gw_lanbote:'兰伯特',
kuanglie:'狂猎',
kuanglie_info:'锁定技,每当一名敌方角色成为你的黑色牌的目标,你视为对其使用【刺骨寒霜】;在一名角色受到【刺骨寒霜】的影响后,你随机获得一张【狂猎】牌',
kuanglie_info:'锁定技每当你使用黑色牌指定其他角色为目标后目标随机弃置一张牌每当你以此法累计弃置2张牌后你摸一张牌',
// kuanglie_info:'锁定技,每当一名敌方角色成为你的黑色牌的目标,你视为对其使用【刺骨寒霜】;在一名角色受到【刺骨寒霜】的影响后,你随机获得一张【狂猎】牌',
lingshuang:'凛霜',
lingshuang_info:'每当你失去最后一张基本牌你可以视为对距离2以内的所有敌方角色使用【刺骨寒霜】在一名角色受到【刺骨寒霜】影响时你可以弃置一张手牌将其效果改为“摸牌数-2”',
gwshuangwu:'霜舞',

View File

@ -122,6 +122,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
hs_yangyanwageli:['female','qun',3,['hspuzhao','hsyanxin']],
hs_aiqinvyao:['famale','qun',4,['nsaiqi','nsbeiming']],
hs_yelinlonghou:['female','qun',4,['ylyuchu']],
hs_yelinchulong:["male","qun",1,[],['unseen']],
hs_ashamoer:['female','wei',3,['asyouzhang']],
hs_fengjianhuanfengzhe:['male','wei',3,['tuteng','huanfeng']],
hs_taisi:['female','wei',3,['hsxingyi','hshuanling']],
// hs_bingshuangnvwang:['female','wei',3,['hsshuangshi','hs']]
},
characterIntro:{
hs_jaina:'戴林·普罗德摩尔之女。 在吉安娜成年早期,她致力于阻止将引发第三次战争的天灾瘟疫传播,当战况加剧后,吉安娜获得了新部落大酋长萨尔的信任,成为团结艾泽拉斯各族携手对抗燃烧军团的关键人物。当战争结束后,吉安娜管理着塞拉摩岛,致力于促进部落与联盟间的关系。吉安娜的和平立场与性格在接任萨尔成为部落大酋长的加尔鲁什·地狱咆哮以一颗魔法炸弹夷平塞拉摩后改变了。身为肯瑞托的新领袖,她拥有让加尔鲁什为他酿成的惨剧付出血的代价的权力与决心。',
@ -205,6 +212,477 @@ game.import('character',function(lib,game,ui,get,ai,_status){
hs_malfurion:['hs_malorne'],
},
skill:{
hshuanling:{
trigger:{player:'phaseEnd'},
direct:true,
filter:function(event,player){
return player.storage.hshuanling.length&&player.countCards('he');
},
init:function(player){
player.storage.hshuanling=[];
},
intro:{
content:'cards'
},
content:function(){
'step 0'
var num=Math.min(
Math.max(1,player.countCards('e')),
player.storage.hshuanling.length
);
var next=player.chooseToDiscard('he',get.prompt2('hshuanling'),[1,num]);
next.ai=function(card){
if(get.position(card)=='e') return 7-get.value(card);
return 8-get.value(card);
};
next.logSkill='hshuanling';
next.delay=false;
'step 1'
if(result.bool){
event.num=result.cards.length;
player.draw(event.num);
}
else{
event.finish();
}
'step 2'
if(event.num){
var enemies=player.getEnemies();
var list=player.storage.hshuanling.slice(0);
while(list.length){
var choice=list.randomRemove();
var card=game.createCard(choice);
var target=null;
for(var i=0;i<enemies.length;i++){
if(lib.filter.targetEnabled2(card,player,enemies[i])){
target=enemies[i];
break;
}
}
if(target){
player.storage.hshuanling.remove(choice);
if(!player.storage.hshuanling.length){
player.unmarkSkill('hshuanling');
}
else{
player.syncStorage('hshuanling');
player.updateMarks();
}
player.useCard(card,target);
break;
}
}
event.num--;
event.redo();
}
},
group:['hshuanling_count'],
subSkill:{
// clear:{
// trigger:{player:'phaseAfter'},
// silent:true,
// content:function(){
// player.storage.hshuanling.length=0;
// }
// },
count:{
trigger:{global:'useCard'},
silent:true,
filter:function(event,player){
if(get.is.converted(event)) return false;
if(!event.player.isEnemiesOf(player)) return false;
if(get.type(event.card)!='trick') return false;
if(event.targets.length!=1) return false;
if(!event.targets[0].isFriendsOf(player)) return false;
if(get.info(event.card).multitarget) return false;
if(get.info(event.card).singleCard) return false;
if(!get.info(event.card).enable) return false;
return true;
},
content:function(){
player.storage.hshuanling.add(trigger.card);
player.markSkill('hshuanling');
}
}
}
},
hsxiujian:{
trigger:{player:'useCardToAfter'},
forced:true,
filter:function(event,player){
return get.type2(event.card)=='trick'&&event.target.isEnemiesOf(player);
},
content:function(){
player.useCard({name:'sha'},trigger.target,false);
}
},
hsxingyi:{
trigger:{global:'useSkillAfter'},
forced:true,
filter:function(event,player){
if(lib.filter.skillDisabled(event.skill)) return false;
if(!game.expandSkills(event.player.getStockSkills()).contains(event.skill)) return false;
return _status.currentPhase==event.player&&event.player.isEnemiesOf(player);
},
content:function(){
player.addTempSkill(trigger.skill,{player:'phaseAfter'});
}
},
hshuanling_old:{
trigger:{player:'useCardAfter'},
forced:true,
subSkill:{
basic:{},
trick:{}
},
usable:1,
filter:function(event,player){
if(!event.targets) return false;
if(event.targets.length>1) return false;
if(event.targets[0]==player) return false;
return get.type2(event.card)=='trick';
},
content:function(){
var list=get.inpile2('trick');
while(list.length){
var name=list.randomRemove();
if(!lib.card[name].multitarget&&
player.canUse(name,trigger.targets[0])&&
get.effect(trigger.targets[0],{name:name},player,player)>0){
player.useCard(game.createCard(name),trigger.targets[0],false);
break;
}
}
}
},
hshuanling_old2:{
trigger:{player:'useCard'},
filter:function(event,player){
// if(get.is.converted(event)) return false;
if(!player.countCards('he')) return false;
// if(!event.targets||!event.targets.contains(player)) return false;
var info=get.info(event.card);
if(info.type!='trick'&&info.type!='basic') return false;
if(info.multitarget) return false;
if(event.targets.length>1) return true;
return game.hasPlayer(function(current){
return !event.targets.contains(current)&&lib.filter.targetEnabled2(event.card,event.player,current);
});
},
direct:true,
content:function(){
'step 0'
var bool1=(trigger.targets.length>1);
var bool2=game.hasPlayer(function(current){
return !trigger.targets.contains(current)&&lib.filter.targetEnabled2(trigger.card,trigger.player,current);
});
if(bool1&&bool2){
player.chooseControlList(true,get.prompt('hshuanling'),[
'弃置任意张牌 ,并为'+get.translation(trigger.card)+'增加等量的目标',
'弃置任意张牌 ,并为'+get.translation(trigger.card)+'减少等量的目标'],function(event,player){
if(_status.event.add) return 0;
return 1;
}).set('add',get.effect(player,trigger.card,trigger.player,player)>=0);
}
else if(bool2){
event.type='add';
event.goto(2);
event.unchosen=true;
}
else{
event.type='remove';
event.goto(2);
event.unchosen=true;
}
'step 1'
if(result.control=='cancel2'){
event.finish();
}
else if(result.index==1){
event.type='remove';
}
else{
event.type='add';
}
'step 2'
if(event.type=='add'){
var num=game.countPlayer(function(current){
return !trigger.targets.contains(current)&&lib.filter.targetEnabled2(trigger.card,trigger.player,current);
});
var num2=game.countPlayer(function(current){
if(!trigger.targets.contains(current)&&lib.filter.targetEnabled2(trigger.card,trigger.player,current)){
return get.effect(current,trigger.card,player,player)>0;
}
return false;
});
if(num2>2) num2=2;
player.chooseCardTarget({
selectCard:[1,num],
selectTarget:function(){
return ui.selected.cards.length;
},
position:'he',
prompt:event.unchosen?get.prompt('hshuanling'):null,
prompt2:'弃置任意张牌,并为'+get.translation(trigger.card)+'增加等量的目标',
filterTarget:function(card,player,target){
return !trigger.targets.contains(target)&&lib.filter.targetEnabled2(trigger.card,trigger.player,target);
},
ai1:function(card){
if(ui.selected.cards.length>=num2) return 0;
return get.value(trigger.card)-get.value(card)-1;
},
ai2:function(target){
var trigger=_status.event.getTrigger();
return get.effect(target,trigger.card,trigger.player,_status.event.player);
}
});
}
else{
var num=trigger.targets.length-1;
var num2=game.countPlayer(function(current){
if(trigger.targets.contains(current)){
return get.effect(current,trigger.card,player,player)<0;
}
return false;
});
if(num2>2) num2=2;
player.chooseCardTarget({
selectCard:[1,num],
selectTarget:function(){
return ui.selected.cards.length;
},
prompt:event.unchosen?get.prompt('hshuanling'):null,
prompt2:'弃置任意张牌,并为'+get.translation(trigger.card)+'减少等量的目标',
filterTarget:function(card,player,target){
return trigger.targets.contains(target);
},
ai1:function(card){
if(!player.needsToDiscard(ui.selected.cards.length)) return 0;
if(ui.selected.cards.length>=num2) return 0;
return Math.max(5,get.value(trigger.card))-get.value(card)-1;
},
ai2:function(target){
var trigger=_status.event.getTrigger();
return -get.effect(target,trigger.card,trigger.player,_status.event.player);
}
});
}
'step 3'
if(result.bool){
if(!event.isMine()) game.delayx();
event.targets=result.targets.slice(0);
event.cards=result.cards.slice(0);
}
else{
event.finish();
}
'step 4'
player.logSkill('hshuanling',event.targets);
player.discard(event.cards).delay=false;
if(event.type=='add'){
for(var i=0;i<event.targets.length;i++){
trigger.targets.push(event.targets[i]);
}
}
else{
for(var i=0;i<event.targets.length;i++){
trigger.targets.remove(event.targets[i]);
}
}
},
ai:{
expose:0.2
}
},
asyouzhang:{
trigger:{player:'phaseEnd'},
frequent:true,
filter:function(event,player){
if(player.countCards('h',{type:'basic'})==0) return true;
if(player.countCards('h',{type:['trick','delay']})==0) return true;
if(player.countCards('e')==0) return true;
return false;
},
content:function(){
'step 0'
if(player.countCards('h',{type:'basic'})==0){
var card=get.cardPile(function(card){
return get.type(card)=='basic';
});
if(card){
player.gain(card,'draw');
}
event.basiccard=card;
}
'step 1'
if(event.basiccard){
if(player.hasUseTarget(event.basiccard)){
var next=player.chooseToUse();
next.filterCard=function(card){
return card==event.basiccard;
};
next.prompt='是否使用'+get.translation(event.basiccard)+'';
}
}
'step 2'
if(player.countCards('h',{type:['trick','delay']})==0){
var card=get.cardPile(function(card){
return get.type(card)=='trick'||get.type(card)=='delay';
});
if(card){
player.gain(card,'draw');
}
event.trickcard=card;
}
'step 3'
if(event.trickcard){
if(player.hasUseTarget(event.trickcard)){
var next=player.chooseToUse();
next.filterCard=function(card){
return card==event.trickcard;
};
next.prompt='是否使用'+get.translation(event.trickcard)+'';
}
}
'step 4'
if(player.countCards('h',{type:'equip'})==0){
var card=get.cardPile(function(card){
return get.type(card)=='equip';
});
if(card){
player.gain(card,'draw');
}
event.equipcard=card;
}
'step 5'
if(event.equipcard){
if(player.hasUseTarget(event.equipcard)){
var next=player.chooseToUse();
next.filterCard=function(card){
return card==event.equipcard;
};
next.prompt='是否使用'+get.translation(event.equipcard)+'';
}
}
}
},
ylyuchu:{
trigger:{player:'recoverAfter'},
forced:true,
filter:function(event,player){
if(player.hasSkill('subplayer')) return false;
return player.storage.ylyuchu.length<3;
},
init:function(player){
if(!player.storage.ylyuchu) player.storage.ylyuchu=[];
},
ai:{
threaten:0.7
},
// onremove:function(player){
// delete player.storage.ylyuchu;
// delete player.storage.ylyuchu2;
// delete player.storage.ylyuchu3;
// },
group:['ylyuchu_swap','ylyuchu_phase'],
subSkill:{
chosen:{},
swap:{
trigger:{player:'phaseEnd'},
silent:true,
filter:function(event,player){
return player.storage.ylyuchu.length;
},
content:function(){
var list=game.filterPlayer();
list.remove(player);
player.storage.ylyuchu2=list.randomGets(player.storage.ylyuchu.length);
player.storage.ylyuchu3=player.storage.ylyuchu.slice(0).randomSort();
}
},
phase:{
trigger:{global:'phaseBefore'},
forced:true,
popup:false,
filter:function(event,player){
if(player.hasSkill('subplayer')) return false;
if(player.storage.ylyuchu2&&player.storage.ylyuchu3){
var idx=player.storage.ylyuchu2.indexOf(event.player);
var target=player.storage.ylyuchu3[idx];
if(target&&player.storage.ylyuchu.contains(target)){
return true;
}
}
return false;
},
content:function(){
if(player.storage.ylyuchu2&&player.storage.ylyuchu3){
var idx=player.storage.ylyuchu2.indexOf(trigger.player);
var target=player.storage.ylyuchu3[idx];
if(target&&player.storage.ylyuchu.contains(target)){
player.callSubPlayer(target);
player.storage.ylyuchu2[idx]=null;
}
}
}
},
exit:{
trigger:{player:['phaseAfter']},
forced:true,
popup:false,
priority:-60,
content:function(){
player.exitSubPlayer();
}
},
draw:{
trigger:{player:'phaseDrawBegin'},
silent:true,
filter:function(event){
return event.num>0;
},
content:function(){
trigger.num--;
}
},
enter:{
trigger:{global:'phaseAfter'},
forced:true,
popup:false,
priority:-60,
filter:function(event,player){
return event.player!=player;
},
content:function(){
player.insertPhase(null,true);
}
}
},
content:function(){
'step 0'
event.num=trigger.num;
'step 1'
if(event.num&&player.storage.ylyuchu.length<3){
var skill=player.addSubPlayer({
name:'hs_yelinchulong',
skills:['ylyuchu_draw','ylyuchu_exit','ylyuchu_enter'],
hp:2,
maxHp:2,
hs:get.cards(2),
skill:skill,
// intro:'下个敌方回合开始前,随机切换至此随从',
intro2:'当前回合结束后进行一个额外回合并切换回本体',
onremove:function(player){
player.storage.ylyuchu.remove(skill);
delete lib.skill[skill];
}
});
player.storage.ylyuchu.push(skill);
event.num--;
event.redo();
}
}
},
nsaiqi:{
trigger:{player:'useCard'},
forced:true,
@ -557,6 +1035,19 @@ game.import('character',function(lib,game,ui,get,ai,_status){
event.finish();
}
'step 2'
if(!event.isMine()){
game.delay(0.5);
}
},
group:'hstianqi_win',
subSkill:{
win:{
trigger:{player:'phaseBegin'},
priority:30,
forced:true,
skillAnimation:true,
animationColor:'legend',
filter:function(event,player){
var es=player.getCards('e');
var num=0;
for(var i=0;i<es.length;i++){
@ -564,7 +1055,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
num++;
}
}
if(num==4){
return num==4;
},
content:function(){
'step 0'
game.delay();
'step 1'
if(game.showIdentity){
game.showIdentity();
}
@ -575,10 +1071,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
game.over(false);
}
}
else{
if(!event.isMine()){
game.delay(0.5);
}
}
},
ai:{
@ -6875,6 +7367,57 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player.awakenSkill('zuling');
}
},
huanfeng:{
skillAnimation:'epic',
animationColor:'thunder',
trigger:{player:'phaseBegin'},
forced:true,
unique:true,
filter:function(event,player){
// if(player.storage.huanfeng_awake) return false;
var skills=['tuteng1','tuteng2','tuteng3','tuteng4'];
for(var i=0;i<skills.length;i++){
if(!player.hasSkill(skills[i])){
return false;
}
}
return true;
},
content:function(){
// player.storage.huanfeng_awake=true;
player.removeSkill('tuteng1');
player.removeSkill('tuteng2');
player.removeSkill('tuteng3');
player.removeSkill('tuteng4');
// player.awakenSkill('huanfeng');
player.storage.huanfeng_end=player.addSubPlayer({
name:'hs_alakir',
hp:3,
maxHp:3,
skills:lib.character.hs_alakir[3],
hs:get.cards(4)
});
player.callSubPlayer(player.storage.huanfeng_end);
game.createTrigger('phaseBegin','shengdun',player,trigger);
},
// group:'huanfeng_end',
subSkill:{
end:{
temp:true,
vanish:true,
trigger:{player:'phaseEnd'},
silent:true,
filter:function(event,player){
return player.storage.huanfeng_end;
},
content:function(){
player.insertPhase();
delete player.storage.huanfeng_end;
}
}
}
},
tuteng_h:{
mod:{
maxHandcard:function(player,num){
@ -7998,6 +8541,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
hs_kchromaggus:'克洛玛古斯',
hs_kaituozhe:'开拓者',
hs_yelinlonghou:'夜鳞龙后',
hs_yelinchulong:'雏龙',
hs_ronghejuren:'熔核巨人',
hs_shanlingjuren:'山岭巨人',
hs_mijiaojisi:'秘教祭司',
@ -8033,7 +8578,28 @@ game.import('character',function(lib,game,ui,get,ai,_status){
hs_baiguyoulong:'白骨幼龙',
hs_yangyanwageli:'阳焰瓦格里',
hs_aiqinvyao:'哀泣女妖',
hs_ashamoer:'阿莎摩尔',
hs_fengjianhuanfengzhe:'风剪唤风者',
hs_taisi:'苔丝',
// hsxiujian:'袖箭',
// hsxiujian_info:'锁定技,在你对一名敌方角色使用一张锦囊牌后,你视为对其使用一张杀',
// hsyingzong:'影踪',
// hsyingzong_info:'',
hsxingyi:'星移',
hsxingyi_info:'锁定技,每当一名敌方角色于回合内使用主动技能,你获得此技能直到下一回合结束',
hshuanling:'幻灵',
hshuanling_bg:'灵',
hshuanling_info:'结束阶段你可以弃置至多X张牌X为你装备区内的牌数且至少为1并摸等量的牌每弃置一张牌你视为对一个敌机敌人使用一张本局敌方角色对友方角色使用过的单目标非转化普通锦囊牌',
// hshuanling_info:'锁定技,当你于回合内使用首张指定其他角色为惟一目标的锦囊牌后,你视为对其随机使用一张锦囊牌(此牌对你有正面效果)',
// hshuanling_info:'每当你使用一张基本牌或普通锦囊牌,你可以弃置任意张牌令其增加或减少等量的目标',
huanfeng:'唤风',
huanfeng_info:'锁定技准备阶段若你有4个图腾你失去所有图腾然后获得并召唤随从奥拉基尔',
asyouzhang:'幽瘴',
asyouzhang_info:'结束阶段,若你的手牌中没有基本牌/锦囊牌/装备牌,你可以获得牌堆顶的一张基本牌/锦囊牌/装备牌,并可以立即使用',
ylyuchu:'育雏',
ylyuchu_info:'锁定技每当你回复一点体力你获得一只雏龙随从不超过3只结束阶段你每有一只雏龙便随机选择一名其他角色在该角色的下个回合开始前你切换至该雏龙然后在此回合结束后进行一个额外回合并切换回本体',
nsaiqi:'哀泣',
nsaiqi_info:'锁定技每当你使用一张牌你移除牌堆顶的3张牌你的手牌上限始终+1',
nsbeiming:'悲鸣',
@ -8051,7 +8617,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
hsnitai:'拟态',
hsnitai_info:'锁定技,出牌阶段开始时,你获得一张随机炉石角色的技能牌',
hstianqi:'天启',
hstianqi_info:'出牌阶段限一次,你可以选择一项:弃置一张手牌并随机装备一件天启骑士(不能替换现有装备),或弃置一张装备区内的牌并摸两张牌;若你此时装备区内集齐了4件天启骑士你获得游戏胜利',
hstianqi_info:'出牌阶段限一次,你可以选择一项:弃置一张手牌并随机装备一件天启骑士(不能替换现有装备),或弃置一张装备区内的牌并摸两张牌;准备阶段,若你装备区内集齐了4件天启骑士你获得游戏胜利',
hspuzhao:'普照',
hspuzhao_info:'出牌阶段限一次,你可以弃置一张红桃牌,然后令至多三名随机友方角色各摸一张牌(若你无其他队友,改为摸两张牌)',
hsyanxin:'炎心',

View File

@ -23,6 +23,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
old_quancong:['male','wu',4,['zhenshan']],
old_yuanshu:['male','qun',4,['yongsi','weidi']],
old_lingju:['female','qun',3,['jieyuan','fenxin_old']],
old_maliang:['male','shu',3,['xiemu','naman']],
old_chenqun:['male','wei',3,['dingpin','oldfaen']],
},
characterFilter:{
old_lingju:function(mode){
@ -30,6 +32,24 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
},
skill:{
oldfaen:{
audio:'faen',
trigger:{global:['turnOverAfter','linkAfter']},
filter:function(event,player){
if(event.name=='link') return event.player.isLinked();
return true;
},
check:function(event,player){
return get.attitude(player,event.player)>0;
},
logTarget:'player',
content:function(){
trigger.player.draw();
},
ai:{
expose:0.2
}
},
zhenshan:{
trigger:{player:'chooseToRespondBegin'},
filter:function(event,player){
@ -370,7 +390,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
old_caozhen:'旧曹真',
old_quancong:'旧全琮',
old_lingju:'旧灵雎',
old_maliang:'旧马良',
old_chenqun:'旧陈群',
oldfaen:'法恩',
oldfaen_info:'当一名角色翻面或横置后,你可以令其摸一张牌。',
zhenshan:'振赡',
zhenshan_use:'振赡',
zhenshan_use_backup:'振赡',

View File

@ -2913,7 +2913,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if(num>1) return att/3;
return att/4;
}
return att;
return att*1.1;
}
return att;
});

View File

@ -1972,6 +1972,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
'step 2'
if(event.type=='add'){
player.chooseTarget(event.unchosen?get.prompt('sheyan'):null,'为'+get.translation(trigger.card)+'增加一个目标',function(card,player,target){
var trigger=_status.event.getTrigger();
return !trigger.targets.contains(target)&&lib.filter.targetEnabled2(trigger.card,trigger.player,target);
}).set('ai',function(target){
var trigger=_status.event.getTrigger();

View File

@ -1,70 +1,5 @@
(function(){
if(typeof require !== 'function'||typeof document !== 'undefined') return;
global.window=global;
require(__dirname+'/update.js');
var fs=require('fs');
var path=require('path');
fs.readFile('game/asset.js','utf-8',function(err, current){
var assetlist='\t\''+window.noname_update.version+'\'';
var skinlist='\nwindow.noname_skin_list={\n';
var get = function(dir,callback){
fs.readdir(dir,function(err,list){
var shift=function(){
if(list.length){
var filename=list.shift();
var delay=false;
if(!/\.|~|_/.test(filename[0])){
var url=dir+'/'+filename;
var stat=fs.statSync(url);
if(stat.isFile()){
if(['.jpg','.png','.mp3','.ttf'].indexOf(path.extname(url))!=-1){
assetlist+=',\n\t\''+path.relative(path.dirname(__dirname),url)+'\'';
}
}
else if(stat.isDirectory()){
if(dir==path.dirname(__dirname)+'/image/skin'){
fs.readdir(url,function(err,list){
var num=0;
for(var i=0;i<list.length;i++){
var url2=url+'/'+list[i];
var stat=fs.statSync(url2);
if(stat.isFile()&&path.extname(url2)=='.jpg'){
num++;
}
}
skinlist+='\t'+filename+':'+num+',\n';
shift();
});
delay=true;
}
else{
get(url,shift);
delay=true;
}
}
}
if(!delay){
shift();
}
}
else{
callback();
}
}
shift();
});
};
get(path.dirname(__dirname),function(){
current=current.slice(0,current.lastIndexOf('window.noname_asset_list=[')+26);
fs.writeFile('game/asset.js',current+'\n'+assetlist+'\n];'+skinlist.slice(0,skinlist.length-2)+'\n};','utf-8',function(){
console.log('done');
});
});
});
})();
window.noname_asset_list=[
'1.9.47',
'1.9.49.1',
'audio/background/music_danji.mp3',
'audio/background/music_default.mp3',
'audio/background/music_diaochan.mp3',
@ -1726,18 +1661,21 @@ window.noname_asset_list=[
'image/character/hs_anduin.jpg',
'image/character/hs_anomalus.jpg',
'image/character/hs_antonidas.jpg',
'image/character/hs_ashamoer.jpg',
'image/character/hs_aya.jpg',
'image/character/hs_baiguyoulong.jpg',
'image/character/hs_bannabusi.jpg',
'image/character/hs_barnes.jpg',
'image/character/hs_bchillmaw.jpg',
'image/character/hs_bilanyoulong.jpg',
'image/character/hs_bingshuangnvwang.jpg',
'image/character/hs_blingtron.jpg',
'image/character/hs_bolvar.jpg',
'image/character/hs_brann.jpg',
'image/character/hs_enzoth.jpg',
'image/character/hs_fachaotuteng.jpg',
'image/character/hs_fandral.jpg',
'image/character/hs_fengjianhuanfengzhe.jpg',
'image/character/hs_fenjie.jpg',
'image/character/hs_finley.jpg',
'image/character/hs_fuding.jpg',
@ -1799,6 +1737,7 @@ window.noname_asset_list=[
'image/character/hs_shuiwenxuejia.jpg',
'image/character/hs_siwangzhiyi.jpg',
'image/character/hs_sthrall.jpg',
'image/character/hs_taisi.jpg',
'image/character/hs_tanghangu.jpg',
'image/character/hs_tgolem.jpg',
'image/character/hs_totemic.jpg',
@ -1818,6 +1757,8 @@ window.noname_asset_list=[
'image/character/hs_xuefashi.jpg',
'image/character/hs_yangyanwageli.jpg',
'image/character/hs_yashaji.jpg',
'image/character/hs_yelinchulong.jpg',
'image/character/hs_yelinlonghou.jpg',
'image/character/hs_yelise.jpg',
'image/character/hs_yinggencao.jpg',
'image/character/hs_yngvar.jpg',
@ -1924,10 +1865,12 @@ window.noname_asset_list=[
'image/character/ns_zuoci.jpg',
'image/character/old_caoxiu.jpg',
'image/character/old_caozhen.jpg',
'image/character/old_chenqun.jpg',
'image/character/old_huaxiong.jpg',
'image/character/old_lingju.jpg',
'image/character/old_lingtong.jpg',
'image/character/old_madai.jpg',
'image/character/old_maliang.jpg',
'image/character/old_quancong.jpg',
'image/character/old_wangyi.jpg',
'image/character/old_xusheng.jpg',
@ -2145,6 +2088,7 @@ window.noname_asset_list=[
'image/character/swd_youzhao.jpg',
'image/character/swd_yuchiyanhong.jpg',
'image/character/swd_yuli.jpg',
'image/character/swd_yunhu.jpg',
'image/character/swd_yuwentuo.jpg',
'image/character/swd_yuxiaoxue.jpg',
'image/character/swd_zhanggao.jpg',

92
game/directory.js Normal file
View File

@ -0,0 +1,92 @@
var fs=require('fs');
var path=require('path');
var exec = require('child_process').exec;
global.window=global;
require(__dirname+'/update.js');
var updates=window.noname_update;
var assetlist='window.noname_asset_list=[\n\t\''+updates.version+'\'';
var skinlist='window.noname_skin_list={\n';
var get = function(dir,callback){
fs.readdir(dir,function(err,list){
var shift=function(){
if(list.length){
var filename=list.shift();
var delay=false;
if(!/\.|~|_/.test(filename[0])){
var url=dir+'/'+filename;
var stat=fs.statSync(url);
if(stat.isFile()){
if(['.jpg','.png','.mp3','.ttf'].indexOf(path.extname(url))!=-1){
assetlist+=',\n\t\''+path.relative(path.dirname(__dirname),url)+'\'';
}
}
else if(stat.isDirectory()){
if(dir==path.dirname(__dirname)+'/image/skin'){
fs.readdir(url,function(err,list){
var num=0;
for(var i=0;i<list.length;i++){
var url2=url+'/'+list[i];
var stat=fs.statSync(url2);
if(stat.isFile()&&path.extname(url2)=='.jpg'){
num++;
}
}
skinlist+='\t'+filename+':'+num+',\n';
shift();
});
delay=true;
}
else{
get(url,shift);
delay=true;
}
}
}
if(!delay){
shift();
}
}
else{
callback();
}
}
shift();
});
};
get(path.dirname(__dirname),function(){
fs.writeFile('game/asset.js',assetlist+'\n];\n'+skinlist.slice(0,skinlist.length-2)+'\n};','utf-8',function(){
console.log('udpated asset.js');
});
exec('git diff --name-only', (error, stdout, stderr) => {
var updatelist='window.noname_update={\n\tversion:\''+updates.version+'\',';
updatelist+='\n\tupdate:\''+(updates.update||'')+'\',';
var apply=function(name,list){
updatelist+='\n\t'+name+':[\n';
for(var i=0;i<list.length;i++){
updatelist+='\t\t\''+list[i]+'\'';
if(i<list.length-1){
updatelist+=',';
}
updatelist+='\n';
}
updatelist+='\t]';
};
if(updates.changeLog){
apply('changeLog',updates.changeLog);
updatelist+=',';
}
var changes = stdout.split('\n');
for(var i=0;i<changes.length;i++){
var extname=path.extname(changes[i]);
if(!changes[i]||(extname!='.js'&&extname!='.css')){
changes.splice(i--,1);
}
}
apply('files',changes);
fs.writeFile('game/update.js',updatelist+'\n};','utf-8',function(){
console.log('updated update.js');
});
});
});

View File

@ -3390,10 +3390,14 @@
var node=this;
if(node._clearing){
var noname_inited=localStorage.getItem('noname_inited');
var onlineKey=localStorage.getItem(lib.configprefix+'key');
localStorage.clear();
if(noname_inited){
localStorage.setItem('noname_inited',noname_inited);
}
if(onlineKey){
localStorage.setItem(lib.configprefix+'key',onlineKey);
}
game.deleteDB('config');
game.deleteDB('data');
game.reload();
@ -6182,10 +6186,14 @@
if(e.shiftKey){
if(confirm('是否重置游戏?')){
var noname_inited=localStorage.getItem('noname_inited');
var onlineKey=localStorage.getItem(lib.configprefix+'key');
localStorage.clear();
if(noname_inited){
localStorage.setItem('noname_inited',noname_inited);
}
if(onlineKey){
localStorage.setItem(lib.configprefix+'key',onlineKey);
}
if(indexedDB) indexedDB.deleteDatabase(lib.configprefix+'data');
game.reload();
return;
@ -6237,10 +6245,14 @@
if(e.shiftKey){
if(confirm('是否重置游戏?')){
var noname_inited=localStorage.getItem('noname_inited');
var onlineKey=localStorage.getItem(lib.configprefix+'key');
localStorage.clear();
if(noname_inited){
localStorage.setItem('noname_inited',noname_inited);
}
if(onlineKey){
localStorage.setItem(lib.configprefix+'key',onlineKey);
}
if(indexedDB) indexedDB.deleteDatabase(lib.configprefix+'data');
game.reload();
return;
@ -6287,6 +6299,12 @@
if(window.noname_update){
lib.version=window.noname_update.version;
lib.changeLog=window.noname_update.changeLog;
if(window.noname_update.players){
lib.changeLog.push('players://'+JSON.stringify(window.noname_update.players));
}
if(window.noname_update.cards){
lib.changeLog.push('cards://'+JSON.stringify(window.noname_update.cards));
}
delete window.noname_update;
}
var noname_inited=localStorage.getItem('noname_inited');
@ -7129,9 +7147,13 @@
}
else if(index==3){
var noname_inited=localStorage.getItem('noname_inited');
var onlineKey=localStorage.getItem(lib.configprefix+'key');
localStorage.clear();
if(noname_inited){
localStorage.setItem('noname_inited',true);
localStorage.setItem('noname_inited',noname_inited);
}
if(onlineKey){
localStorage.setItem(lib.configprefix+'key',onlineKey);
}
if(indexedDB) indexedDB.deleteDatabase(lib.configprefix+'data');
setTimeout(function(){
@ -22373,6 +22395,7 @@
ui.connectClients=ui.create.div('.forceopaque.menubutton.large.connectevents.pointerdiv.left','在线',ui.window,ui.click.connectClients);
ui.connectClientsCount=ui.create.div('.forceopaque.menubutton.icon.connectevents.highlight.left','1',ui.window);
if(events.length){
console.log(events)
ui.connectEventsCount.innerHTML=events.length;
ui.connectEventsCount.show();
}
@ -31284,10 +31307,14 @@
alert('导入成功');
if(!lib.db){
var noname_inited=localStorage.getItem('noname_inited');
var onlineKey=localStorage.getItem(lib.configprefix+'key');
localStorage.clear();
if(noname_inited){
localStorage.setItem('noname_inited',noname_inited);
}
if(onlineKey){
localStorage.setItem(lib.configprefix+'key',onlineKey);
}
for(var i in data){
localStorage.setItem(i,data[i]);
}
@ -42893,6 +42920,9 @@
};
var get={
is:{
converted:function(event){
return !(event.cards&&event.card&&event.cards.length==1&&event.cards[0]==event.card);
},
safari:function(){
var ua=navigator.userAgent.toLowerCase();
return ua.indexOf('safari'!=-1)&&ua.indexOf('chrome')==-1;
@ -43449,6 +43479,9 @@
}
return list;
},
inpile2:function(type){
return get.inpile(type,'trick');
},
typeCard:function(type,filter){
var list=[];
for(var i in lib.card){

View File

@ -1,6 +1,8 @@
(function(){
var WebSocketServer=require('ws').Server;
var wss=new WebSocketServer({port:8080});
var bannedKeys=[];
var bannedIps=[];
var rooms=[{},{},{},{},{},{}];
var events=[];
@ -71,6 +73,12 @@
}
},
events:function(cfg,id,type){
if(bannedKeys.indexOf(id)!=-1){
bannedIps.push(this._socket.remoteAddress);
console.log(id, this._socket.remoteAddress);
this.close();
return;
}
var changed=false;
var time=(new Date()).getTime();
if(cfg&&id){
@ -253,6 +261,13 @@
};
wss.on('connection',function(ws){
ws.sendl=util.sendl;
if(bannedIps.indexOf(ws._socket.remoteAddress)!=-1){
ws.sendl('denied','banned');
setTimeout(function(){
ws.close();
},500);
return;
}
ws.wsid=util.getid();
clients[ws.wsid]=ws;
ws.sendl('roomlist',util.getroomlist(),util.checkevents(),util.getclientlist(ws),ws.wsid);

View File

@ -29,6 +29,7 @@ window.noname_source_list=[
'game/asset.js',
'game/codemirror.js',
'game/config.js',
'game/directory.js',
'game/game.js',
'game/http.js',
'game/jszip.js',

View File

@ -1,59 +1,23 @@
window.noname_update={
version:'1.9.49',
// update:'1.9.48',
version:'1.9.49.1',
update:'1.9.49',
changeLog:[
// '祭天祀地模式(在 选项-开始-身份 中开启)',
'修复国内镜像更新问题',
'武将修改',
'毛玻璃主题仅Safari可用',
'players://["chenqun","lifeng","maliang","huanghao"]'
'bug修复'
],
files:[
// 'game/game.js',
// 'game/package.js',
// 'game/config.js',
// 'game/source.js',
// 'game/pressure.js',
// 'game/asset.js',
// 'card/*',
// 'card/extra.js',
// 'card/yunchou.js',
// 'card/swd.js',
// 'card/gwent.js',
// 'card/standard.js',
// 'character/*',
// 'character/hearth.js',
// 'character/gwent.js',
// 'character/diy.js',
// 'character/standard.js',
// 'character/shenhua.js',
// 'character/refresh.js',
// 'character/yijiang.js',
// 'character/yxs.js',
// 'character/swd.js',
// 'character/sp.js',
// 'character/rank.js',
// 'mode/identity.js',
// 'mode/boss.js',
// 'mode/guozhan.js',
// 'mode/versus.js',
// 'mode/connect.js',
// 'mode/chess.js',
// 'mode/tafang.js',
// 'mode/guozhan.js',
// 'mode/stone.js',
// 'theme/music/style.css',
// 'theme/woodden/style.css',
// 'theme/simple/style.css',
// 'layout/default/layout.css',
// 'layout/default/phone.css',
// 'layout/default/menu.css',
// 'theme/style/cardback/*',
// 'layout/long/layout.css',
// 'layout/long2/layout.css',
// 'layout/mobile/layout.css',
// 'layout/newlayout/global.css',
// 'layout/mode/chess.css',
// 'extension/boss/extension.js',
'card/gujian.js',
'card/gwent.js',
'card/hearth.js',
'card/swd.js',
'character/gwent.js',
'character/hearth.js',
'character/old.js',
'character/ow.js',
'character/sp.js',
'game/asset.js',
'game/game.js',
'game/server.js',
'game/source.js',
'game/update.js'
]
}
};

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 156 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 285 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 33 KiB