v1.9.52.1

This commit is contained in:
libccy 2018-07-08 18:16:24 +08:00
parent c7de67a787
commit 9eb57cad97
5 changed files with 52 additions and 26 deletions

View File

@ -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:'刘禅',

View File

@ -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)&&current.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')&&current<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');

View File

@ -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<entrylist.length;i++){
if(entrylist[i]!=window.noname_asset_list[i+1]){
diff=true;
break;
}
}
}
else{
diff=true;
}
if(diff){
var assetversion='window.noname_asset_list=[\n\t\''+updates.version+'\'';
fs.writeFile('game/asset.js',assetversion+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||'')+'\',';

View File

@ -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,

View File

@ -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'
]
};