diff --git a/character/ow.js b/character/ow.js index 17fe0f020..204599f23 100644 --- a/character/ow.js +++ b/character/ow.js @@ -1217,6 +1217,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return target!=player&&get.distance(player,target,'attack')<=1; }, check:function(card){ + if(card.name=='sha'&&_status.event.player.countCards('h','sha')<3) return 0; return 6-get.value(card); }, content:function(){ diff --git a/game/asset.js b/game/asset.js index f146a6b92..fcd82e2c7 100644 --- a/game/asset.js +++ b/game/asset.js @@ -1,2882 +1,2945 @@ +(function(){ + if(typeof require !== 'function') 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