From 9eb57cad970c7937ef54113c7b01efaf6f06e2e5 Mon Sep 17 00:00:00 2001 From: libccy Date: Sun, 8 Jul 2018 18:16:24 +0800 Subject: [PATCH] v1.9.52.1 --- character/shenhua.js | 5 ++++- character/sp.js | 24 ++++++++++++++++-------- game/directory.js | 30 +++++++++++++++++++++++++----- game/game.js | 2 +- game/update.js | 17 ++++++----------- 5 files changed, 52 insertions(+), 26 deletions(-) diff --git a/character/shenhua.js b/character/shenhua.js index de22fafeb..fa5fa0d20 100644 --- a/character/shenhua.js +++ b/character/shenhua.js @@ -1614,6 +1614,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ forced:true, popup:false, content:function(){ + 'step 0' + event.trigger('playercontrol'); + 'step 1' var slist=player.storage.huashen.owned; var list=[]; for(var i in slist){ @@ -4457,7 +4460,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ beige_info:'一名角色每受到【杀】造成的一次伤害,你可以弃一张牌,并令其进行一次判定,判定结果为:♥该角色回复1点体力;♦︎该角色摸两张牌;♣伤害来源弃两张牌;♠伤害来源将其武将牌翻面', duanchang_info:'锁定技,杀死你的角色失去当前的所有技能直到游戏结束。', // fushen_info:'回合开始前,你可以选择与任意一名角色交换控制权,该角色可选择在下一个回合开始前与你换回', - huashen_info:'所有人都展示武将牌后,你随机获得两张未加入游戏的武将牌,选一张置于你面前并声明该武将的一项技能,你拥有该技能且同时将性别和势力属性变成与该武将相同知道该化身被替换。在你的每个准备阶段和结束后,你可以替换化身牌,你须为新的化身重新声明一项技能(你不可声明锁定技、觉醒技或主公技)。', + huashen_info:'所有人都展示武将牌后,你随机获得两张未加入游戏的武将牌,选一张置于你面前并声明该武将的一项技能,你拥有该技能且同时将性别和势力属性变成与该武将相同知道该化身被替换。在你的每个准备阶段和结束后,你可以替换化身牌,你须为新的化身重新声明一项技能(你不可声明限定技、觉醒技或主公技)。', xinsheng_info:'你每受到1点伤害,可获得一张新化身牌。', jiangwei:'姜维', liushan:'刘禅', diff --git a/character/sp.js b/character/sp.js index 2b60253c1..4a645302b 100644 --- a/character/sp.js +++ b/character/sp.js @@ -396,6 +396,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ prompt:'视为使用一张杀', ai:{ order:function(){ + var player=_status.event.player; if(!player.hasShan()&&!game.hasPlayer(function(current){ return player.canUse('sha',current)&¤t.hp==1&&get.effect(current,{name:'sha'},player,player)>0; })){ @@ -417,6 +418,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ filterCard:function(){return false}, viewAsFilter:function(player){ if(player.hasSkill('weijing_disable')) return false; + if(!lib.filter.cardRespondable({name:'sha'},player)) return false; }, onrespond:function(event,player){ player.addTempSkill('weijing_disable','roundStart'); @@ -430,6 +432,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, skillTagFilter:function(player){ if(player.hasSkill('weijing_disable')) return false; + if(!lib.filter.cardRespondable({name:'sha'},player)) return false; }, respondShan:true, } @@ -2809,13 +2812,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ filterCard:{name:'shan'}, viewAs:{name:'sha'}, viewAsFilter:function(player){ - if(!player.storage.fanghun) return false; + if(!player.storage.fanghun||player.storage.fanghun<0) return false; if(!player.countCards('h','shan')) return false; }, prompt:'将一张闪当杀使用或打出', onuse:function(result,player){ player.storage.fanghun--; - if(!player.storage.fanghun){ + if(!player.storage.fanghun||player.storage.fanghun<0){ + player.storage.fanghun=0; player.unmarkSkill('fanghun'); } else{ @@ -2831,7 +2835,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, respondSha:true, skillTagFilter:function(player){ - if(!player.storage.fanghun) return false; + if(!player.storage.fanghun||player.storage.fanghun<0) return false; if(!player.countCards('h','shan')) return false; }, order:function(){ @@ -2847,12 +2851,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ viewAs:{name:'shan'}, prompt:'将一张杀当闪打出', viewAsFilter:function(player){ - if(!player.storage.fanghun) return false; + if(!player.storage.fanghun||player.storage.fanghun<0) return false; if(!player.countCards('h','sha')) return false; }, onrespond:function(result,player){ player.storage.fanghun--; - if(!player.storage.fanghun){ + if(!player.storage.fanghun||player.storage.fanghun<0){ + player.storage.fanghun=0; player.unmarkSkill('fanghun'); } else{ @@ -2863,12 +2868,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ respondShan:true, skillTagFilter:function(player){ - if(!player.storage.fanghun) return false; + if(!player.storage.fanghun||player.storage.fanghun<0) return false; if(!player.countCards('h','sha')) return false; }, effect:{ target:function(card,player,target,current){ - if(!player.storage.fanghun) return false; + if(!player.storage.fanghun||player.storage.fanghun<0) return 0; if(get.tag(card,'respondShan')&¤t<0) return 0.6 } }, @@ -5949,9 +5954,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:2, trigger:{player:'phaseDrawBegin'}, check:function(event,player){ - if(player.storage.tunchu&&player.storage.tunchu.length) return false; return player.countCards('h')-player.countCards('h',{type:'equip'})<=player.hp; }, + filter:function(event,player){ + if(player.storage.tunchu&&player.storage.tunchu.length) return false; + return true; + }, content:function(){ trigger.num+=2; player.addTempSkill('tunchu_choose','phaseDrawAfter'); diff --git a/game/directory.js b/game/directory.js index 7fe742b08..1bc608504 100644 --- a/game/directory.js +++ b/game/directory.js @@ -3,10 +3,12 @@ var path=require('path'); var exec = require('child_process').exec; global.window=global; require(__dirname+'/update.js'); +require(__dirname+'/asset.js'); var updates=window.noname_update; -var assetlist='window.noname_asset_list=[\n\t\''+updates.version+'\''; +var assetlist=''; var skinlist='window.noname_skin_list={\n'; +var entrylist=[]; var get = function(dir,callback){ fs.readdir(dir,function(err,list){ var shift=function(){ @@ -18,7 +20,9 @@ var get = function(dir,callback){ 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)+'\''; + var assetentry=path.relative(path.dirname(__dirname),url); + assetlist+=',\n\t\''+assetentry+'\''; + entrylist.push(assetentry); } } else if(stat.isDirectory()){ @@ -55,10 +59,26 @@ var get = function(dir,callback){ }); }; + 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'); - }); + var diff=false; + if(window.noname_asset_list.length==entrylist.length+1){ + for(var i=0;i { var updatelist='window.noname_update={\n\tversion:\''+updates.version+'\','; updatelist+='\n\tupdate:\''+(updates.update||'')+'\','; diff --git a/game/game.js b/game/game.js index d248f0c71..cbc2e2c75 100644 --- a/game/game.js +++ b/game/game.js @@ -21543,7 +21543,7 @@ } }, autoswap:{ - trigger:{player:['chooseToUseBegin','chooseToRespondBegin','chooseToDiscardBegin','chooseToCompareBegin', + trigger:{player:['playercontrol','chooseToUseBegin','chooseToRespondBegin','chooseToDiscardBegin','chooseToCompareBegin', 'chooseButtonBegin','chooseCardBegin','chooseTargetBegin','chooseCardTargetBegin','chooseControlBegin', 'chooseBoolBegin','choosePlayerCardBegin','discardPlayerCardBegin','gainPlayerCardBegin']}, forced:true, diff --git a/game/update.js b/game/update.js index d3fd67b4d..a36c7cdfd 100644 --- a/game/update.js +++ b/game/update.js @@ -1,18 +1,13 @@ window.noname_update={ - version:'1.9.52', - update:'1.9.51', + version:'1.9.52.1', + update:'1.9.52', changeLog:[ - '新武将' - ], - players:[ - 'sp_liuqi', - 'luzhi' + 'bug修复(李丰、赵襄、鲁芝、左慈)' ], files:[ - 'character/diy.js', + 'character/shenhua.js', 'character/sp.js', - 'character/yijiang.js', - 'game/game.js', - 'mode/boss.js' + 'game/directory.js', + 'game/game.js' ] }; \ No newline at end of file