This commit is contained in:
libccy 2016-08-10 22:07:35 +08:00
parent 3d483746b8
commit 0253b0d154
12 changed files with 269 additions and 93 deletions

View File

@ -577,9 +577,6 @@ card.hearth={
return 0; return 0;
} }
} }
if(target.hasSkillTag('maixie')&&target.hp>1&&ui.selected.cards.length){
return 0;
}
if(player.hasSkillTag('notricksource')) return 0; if(player.hasSkillTag('notricksource')) return 0;
if(target.hasSkillTag('notrick')) return 0; if(target.hasSkillTag('notrick')) return 0;
if(card.name=='tao') return 0; if(card.name=='tao') return 0;

View File

@ -829,6 +829,13 @@ card.standard={
if(hs1.length>hs2.length+1){ if(hs1.length>hs2.length+1){
return -2; return -2;
} }
var hsx=target.get('h');
if(hsx.length>2&&hs2.length==0&&hsx[0].number<6){
return -2;
}
if(hsx.length>3&&hs2.length==0){
return -2;
}
if(hs1.length>hs2.length&&(!hs2.length||hs1[0].number>hs2[0].number)){ if(hs1.length>hs2.length&&(!hs2.length||hs1[0].number>hs2[0].number)){
return -2; return -2;
} }
@ -1613,7 +1620,8 @@ card.standard={
}, },
source:target, source:target,
source2:targets, source2:targets,
id:id id:id,
id2:id2
}); });
if(game.online){ if(game.online){
_status.event._resultid=id; _status.event._resultid=id;

View File

@ -335,7 +335,6 @@ card.swd={
if(target==players[0]) return 2; if(target==players[0]) return 2;
return 0.5; return 0.5;
}, },
player:1,
}, },
} }
}, },
@ -794,16 +793,14 @@ card.swd={
}, },
xianluhui:{ xianluhui:{
fullskin:true, fullskin:true,
type:'basic', type:'trick',
enable:true, enable:true,
selectTarget:-1, selectTarget:-1,
filterTarget:true, filterTarget:function(card,player,target){
targetDelay:false, return target.isDamaged();
content:function(){
target.recover();
}, },
contentAfter:function(){ content:function(){
game.asyncDraw(targets); target.draw(Math.min(3,target.maxHp-target.hp));
}, },
ai:{ ai:{
basic:{ basic:{
@ -813,12 +810,9 @@ card.swd={
}, },
result:{ result:{
target:function(player,target){ target:function(player,target){
target.hp<target.maxHp?2:1; Math.min(3,target.maxHp-target.hp)
}, },
}, },
tag:{
recover:1
}
} }
}, },
xiangyuye:{ xiangyuye:{
@ -3519,7 +3513,7 @@ card.swd={
pusafazhou_bg:'发', pusafazhou_bg:'发',
// pusafazhou_info:'令你抵挡一次死亡将体力回复至1并摸一张牌', // pusafazhou_info:'令你抵挡一次死亡将体力回复至1并摸一张牌',
xianluhui:'仙炉灰', xianluhui:'仙炉灰',
xianluhui_info:'令所有角色回复一点体力并摸一张牌', xianluhui_info:'令所有已受伤角色摸数量等同于其已损失体力值的牌最多3张',
caoyao:'草药', caoyao:'草药',
caoyao_info:'出牌阶段对距离为1以内的角色使用回复一点体力。', caoyao_info:'出牌阶段对距离为1以内的角色使用回复一点体力。',
pantao:'蟠桃', pantao:'蟠桃',

View File

@ -1589,6 +1589,7 @@ character.hearth={
} }
}, },
ai:{ ai:{
maixie:true,
effect:{ effect:{
target:function(card,player,target){ target:function(card,player,target){
if(get.tag(card,'damage')){ if(get.tag(card,'damage')){

View File

@ -35,7 +35,7 @@ character.shenhua={
liushan:['male','shu',3,['xiangle','fangquan','ruoyu'],['zhu']], liushan:['male','shu',3,['xiangle','fangquan','ruoyu'],['zhu']],
zhanghe:['male','wei',4,['qiaobian']], zhanghe:['male','wei',4,['qiaobian']],
dengai:['male','wei',4,['tuntian','zaoxian']], dengai:['male','wei',4,['tuntian','zaoxian']],
sunce:['male','wu',4,['jiang','hunzi','zhiba'],['zhu','fullskin']], sunce:['male','wu',4,['jiang','hunzi','zhiba'],['zhu']],
zhangzhang:['male','wu',3,['zhijian','guzheng']], zhangzhang:['male','wu',3,['zhijian','guzheng']],
caiwenji:['female','qun',3,['beige','duanchang']], caiwenji:['female','qun',3,['beige','duanchang']],
zuoci:['male','qun',3,['huashen','xinsheng']], zuoci:['male','qun',3,['huashen','xinsheng']],
@ -216,10 +216,11 @@ character.shenhua={
skillAnimation:true, skillAnimation:true,
audio:2, audio:2,
unique:true, unique:true,
zhuSkill:true,
trigger:{player:'phaseBegin'}, trigger:{player:'phaseBegin'},
forced:true, forced:true,
filter:function(event,player){ filter:function(event,player){
if(!player.isZhu)return false; if(!player.hasZhuSkill('ruoyu'))return false;
if(player.storage.ruoyu) return false; if(player.storage.ruoyu) return false;
for(var i=0;i<game.players.length;i++){ for(var i=0;i<game.players.length;i++){
if(game.players[i].hp<player.hp) return false; if(game.players[i].hp<player.hp) return false;
@ -231,7 +232,15 @@ character.shenhua={
player.maxHp++; player.maxHp++;
player.update(); player.update();
player.recover(); player.recover();
player.addSkill('jijiang'); if(player.skills.contains('ruoyu')){
player.addSkill('jijiang');
}
else{
player.additionalSkills.ruoyu='jijiang';
}
if(!player.isZhu){
player.storage.zhuSkill_ruoyu=['jijiang'];
}
} }
}, },
qiaobian:{ qiaobian:{
@ -675,6 +684,7 @@ character.shenhua={
player.addSkill('reyingzi'); player.addSkill('reyingzi');
delete player.tempSkills.yinghun; delete player.tempSkills.yinghun;
player.removeSkill('hunzi'); player.removeSkill('hunzi');
player.storage.hunzi=true;
}, },
ai:{ ai:{
threaten:function(player,target){ threaten:function(player,target){
@ -712,22 +722,37 @@ character.shenhua={
zhiba:{ zhiba:{
unique:true, unique:true,
global:'zhiba2', global:'zhiba2',
zhuSkill:true,
}, },
zhiba2:{ zhiba2:{
audio:2, audio:2,
forceaudio:true, forceaudio:true,
enable:'phaseUse', enable:'phaseUse',
filter:function(event,player){ filter:function(event,player){
var zhu=get.zhu('zhiba'); if(player.group!='wu'||player.num('h')==0) return false;
if(!zhu) return false; return game.hasPlayer(function(target){
return (player!=zhu&&player.group=='wu'&&player.num('h')>0&&zhu.num('h')>0); return target!=player&&target.hasZhuSkill('zhiba',player)&&target.num('h')>0;
});
}, },
filterTarget:function(card,player,target){ filterTarget:function(card,player,target){
return player!=target&&target.isZhu&&target.get('s').contains('zhiba'); return target!=player&&target.hasZhuSkill('zhiba',player)&&target.num('h')>0;
}, },
usable:1, usable:1,
content:function(){ content:function(){
"step 0" "step 0"
if(target.storage.hunzi){
target.chooseBool('是否拒绝制霸拼点?').set('choice',ai.get.attitude(target,player)<=0);
}
else{
event.forced=true;
}
"step 1"
if(!event.forced&&!result.bool){
game.log(target,'拒绝了拼点');
target.chat('拒绝');
event.finish();
return;
}
player.chooseToCompare(target,function(card){ player.chooseToCompare(target,function(card){
if(card.name=='du') return 20; if(card.name=='du') return 20;
var player=get.owner(card); var player=get.owner(card);
@ -737,7 +762,7 @@ character.shenhua={
} }
return get.number(card); return get.number(card);
}); });
"step 1" "step 2"
if(result.bool==false){ if(result.bool==false){
target.gain([result.player,result.target]); target.gain([result.player,result.target]);
target.$gain2([result.player,result.target]); target.$gain2([result.player,result.target]);
@ -1462,21 +1487,44 @@ character.shenhua={
songwei:{ songwei:{
unique:true, unique:true,
global:'songwei2', global:'songwei2',
zhuSkill:true,
}, },
songwei2:{ songwei2:{
audio:2, audio:2,
forceaudio:true, forceaudio:true,
trigger:{player:'judgeEnd'}, trigger:{player:'judgeEnd'},
filter:function(event,player){ filter:function(event,player){
var zhu=get.zhu('songwei'); if(player.group!='wei') return false;
if(!zhu) return false; if(get.color(event.result.card)!='black') return false;
return (player!=zhu&&player.group=='wei'&&get.color(event.result.card)=='black'); return game.hasPlayer(function(target){
}, return player!=target&&target.hasZhuSkill('songwei',player);
check:function(event,player){ });
return ai.get.attitude(player,get.zhu('songwei'))>0;
}, },
direct:true,
content:function(){ content:function(){
get.zhu('songwei').draw(); 'step 0'
var list=[];
for(var i=0;i<game.players.length;i++){
if(game.players[i]!=player&&game.players[i].hasZhuSkill('songwei',player)){
list.push(game.players[i]);
}
}
event.list=list;
'step 1'
if(event.list.length){
var current=event.list.shift();
event.current=current;
player.chooseBool('是否对'+get.translation(current)+'发动【颂威】?').set('choice',ai.get.attitude(player,current)>0);
}
else{
event.finish();
}
'step 2'
if(result.bool){
player.logSkill('songwei',event.current);
event.current.draw();
}
event.goto(1);
} }
}, },
duanliang:{ duanliang:{
@ -1840,35 +1888,54 @@ character.shenhua={
}, },
baonue:{ baonue:{
unique:true, unique:true,
global:'baonue2' global:'baonue2',
zhuSkill:true,
}, },
baonue2:{ baonue2:{
audio:2, audio:2,
forceaudio:true, forceaudio:true,
trigger:{source:'damageEnd'}, trigger:{source:'damageEnd'},
filter:function(event,player){ filter:function(event,player){
var zhu=get.zhu('baonue'); if(player.group!='qun') return false;
if(!zhu) return false; return game.hasPlayer(function(target){
return (player!=zhu&&player.group=='qun'&&zhu.hp<zhu.maxHp); return player!=target&&target.hp<target.maxHp&&target.hasZhuSkill('baonue',player);
}, });
check:function(event,player){
var zhu=get.zhu('baonue');
if(!zhu) return false;
return ai.get.attitude(player,zhu)>0;
}, },
direct:true,
content:function(){ content:function(){
"step 0" 'step 0'
player.judge(function(card){ var list=[];
if(get.suit(card)=='spade') return 4; for(var i=0;i<game.players.length;i++){
return 0; if(game.players[i]!=player&&game.players[i].hp<game.players[i].maxHp&&game.players[i].hasZhuSkill('baonue',player)){
}) list.push(game.players[i]);
"step 1"
if(result.bool){
var zhu=get.zhu('baonue');
if(zhu){
zhu.recover();
} }
} }
event.list=list;
'step 1'
if(event.list.length){
var current=event.list.shift();
event.current=current;
player.chooseBool('是否对'+get.translation(current)+'发动【暴虐】?').set('choice',ai.get.attitude(player,current)>0);
}
else{
event.finish();
}
'step 2'
if(result.bool){
player.logSkill('baonue',event.current);
player.judge(function(card){
if(get.suit(card)=='spade') return 4;
return 0;
});
}
else{
event.goto(1);
}
'step 3'
if(result.suit=='spade'){
event.current.recover();
}
event.goto(1);
} }
}, },
luanwu:{ luanwu:{
@ -2435,14 +2502,15 @@ character.shenhua={
xueyi:{ xueyi:{
mod:{ mod:{
maxHandcard:function(player,num){ maxHandcard:function(player,num){
if(player.isZhu){ if(player.hasZhuSkill('xueyi')){
for(var i=0;i<game.players.length;i++){ for(var i=0;i<game.players.length;i++){
if(player!=game.players[i]&&game.players[i].group=='qun') num+=2; if(player!=game.players[i]&&game.players[i].group=='qun') num+=2;
} }
} }
return num; return num;
} }
} },
zhuSkill:true,
}, },
mengjin:{ mengjin:{
audio:2, audio:2,
@ -3053,7 +3121,7 @@ character.shenhua={
huangtian:{ huangtian:{
unique:true, unique:true,
global:'huangtian2', global:'huangtian2',
zhuSkill:true zhuSkill:true,
}, },
huangtian2:{ huangtian2:{
audio:2, audio:2,
@ -3064,16 +3132,17 @@ character.shenhua={
player.$give(cards,targets[0]); player.$give(cards,targets[0]);
}, },
filter:function(event,player){ filter:function(event,player){
var zhu=get.zhu('huangtian'); if(player.group!='qun') return false;
if(!zhu) return false; if(player.num('h','shan')+player.num('h','shandian')==0) return 0;
return (player!=zhu&&player.group=='qun'&& return game.hasPlayer(function(target){
(player.num('h','shan')+player.num('h','shandian')>0)) return target!=player&&target.hasZhuSkill('huangtian',player);
});
}, },
filterCard:function(card){ filterCard:function(card){
return (card.name=='shan'||card.name=='shandian') return (card.name=='shan'||card.name=='shandian')
}, },
filterTarget:function(card,player,target){ filterTarget:function(card,player,target){
return player!=target&&target.isZhu&&target.get('s').contains('huangtian'); return target!=player&&target.hasZhuSkill('huangtian',player);
}, },
usable:1, usable:1,
forceaudio:true, forceaudio:true,

View File

@ -7,7 +7,7 @@ character.sp={
caohong:['male','wei',4,['yuanhu']], caohong:['male','wei',4,['yuanhu']],
xiahouba:['male','shu',4,['baobian']], xiahouba:['male','shu',4,['baobian']],
gongsunzan:['male','qun',4,['yicong']], gongsunzan:['male','qun',4,['yicong']],
yuanshu:['male','qun',4,['yongsi']], yuanshu:['male','qun',4,['yongsi','weidi']],
sp_diaochan:['female','qun',3,['lihun','biyue']], sp_diaochan:['female','qun',3,['lihun','biyue']],
sp_zhaoyun:['male','qun',3,['longdan','chongzhen']], sp_zhaoyun:['male','qun',3,['longdan','chongzhen']],
jsp_zhaoyun:['male','qun',3,['chixin','yicong','suiren']], jsp_zhaoyun:['male','qun',3,['chixin','yicong','suiren']],
@ -85,6 +85,26 @@ character.sp={
guansuo:['guanyu'], guansuo:['guanyu'],
}, },
skill:{ skill:{
weidi:{
init:function(player){
var mode=get.mode();
if(mode=='identity'||(mode=='versus'&&_status.mode=='four')){
player.additionalSkills.weidi=function(player){
var list=[];
var zhu=get.zhu(player);
if(zhu&&zhu!=player&&zhu.skills){
for(var i=0;i<zhu.skills.length;i++){
if(lib.skill[zhu.skills[i]]&&lib.skill[zhu.skills[i]].zhuSkill){
list.push(zhu.skills[i]);
}
}
}
player.storage.zhuSkill_weidi=list;
return list;
}
}
}
},
zhenlue:{ zhenlue:{
mod:{ mod:{
targetEnabled:function(card,player,target){ targetEnabled:function(card,player,target){
@ -174,11 +194,48 @@ character.sp={
return target.sex=='male'; return target.sex=='male';
}).set('ai',function(target){ }).set('ai',function(target){
if(!_status.event.goon) return 0; if(!_status.event.goon) return 0;
var player=_status.event.player;
var att=ai.get.attitude(player,target); var att=ai.get.attitude(player,target);
if(att<=1) return 0; if(att<=1) return 0;
if(target.disabledSkills.zhu&&!target.isZhu) return att*2; var mode=get.mode();
if(mode=='identity'||(mode=='versus'&&_status.mode=='four')){
if(target.name&&lib.character[target.name]){
for(var i=0;i<lib.character[target.name][3].length;i++){
if(lib.skill[lib.character[target.name][3][i]].zhuSkill){
return att*2;
}
}
}
}
return att; return att;
}).set('goon',player.hasUnknown()); }).set('goon',!player.hasUnknown());
'step 1'
if(result.bool){
player.unmarkSkill('yongdi');
player.storage.yongdi=true;
player.logSkill('yongdi',result.targets);
var target=result.targets[0];
target.gainMaxHp(true);
var mode=get.mode();
if(mode=='identity'||(mode=='versus'&&_status.mode=='four')){
if(target.name&&lib.character[target.name]){
var skills=lib.character[target.name][3];
target.storage.zhuSkill_yongdi=[];
for(var i=0;i<skills.length;i++){
var info=lib.skill[skills[i]];
if(info.zhuSkill){
target.storage.zhuSkill_yongdi.push(skills[i]);
if(info.init){
info.init(target);
}
if(info.init2){
info.init2(target);
}
}
}
}
}
}
}, },
ai:{ ai:{
expose:0.2 expose:0.2
@ -307,10 +364,17 @@ character.sp={
} }
var hs1=target.get('h','sha'); var hs1=target.get('h','sha');
var hs2=player.get('h','sha'); var hs2=player.get('h','sha');
if(hs1.length-1>hs2.length+1){ if(hs1.length>hs2.length){
return 0; return 0;
} }
if(hs1.length-1>hs2.length&&(!hs2.length||hs1[0].number>hs2[0].number)){ var hsx=target.get('h');
if(hsx.length>2&&hs2.length<=1&&hsx[0].number<6){
return 0;
}
if(hsx.length>3&&hs2.length<=1){
return 0;
}
if(hs1.length>hs2.length-1&&hs1.length>0&&(hs2.length<=1||hs1[0].number>hs2[0].number)){
return 0; return 0;
} }
return -1; return -1;
@ -6212,6 +6276,8 @@ character.sp={
yanbaihu:'严白虎', yanbaihu:'严白虎',
wanglang:'王朗', wanglang:'王朗',
weidi:'伪帝',
weidi_info:'锁定技,你视为拥有当前主公的主公技',
juesi:'决死', juesi:'决死',
juesi_info:'出牌阶段,你可以弃置一张杀并选择你攻击范围内的一名有牌的其他角色,该角色弃置一张牌,然后若弃置的牌不是杀且你的体力值不大于该角色,你视为对其使用决斗', juesi_info:'出牌阶段,你可以弃置一张杀并选择你攻击范围内的一名有牌的其他角色,该角色弃置一张牌,然后若弃置的牌不是杀且你的体力值不大于该角色,你视为对其使用决斗',
zhenlue:'缜略', zhenlue:'缜略',

View File

@ -45,10 +45,11 @@ character.standard={
hujia:{ hujia:{
audio:2, audio:2,
unique:true, unique:true,
zhuSkill:true,
trigger:{player:'chooseToRespondBegin'}, trigger:{player:'chooseToRespondBegin'},
filter:function(event,player){ filter:function(event,player){
if(event.responded) return false; if(event.responded) return false;
if(!player.isZhu) return false; if(!player.hasZhuSkill('jianxiong')) return false;
if(event.filterCard({name:'shan'})==false) return false; if(event.filterCard({name:'shan'})==false) return false;
for(var i=0;i<game.players.length;i++){ for(var i=0;i<game.players.length;i++){
if(game.players[i]!=player&&game.players[i].group=='wei') return true; if(game.players[i]!=player&&game.players[i].group=='wei') return true;
@ -555,6 +556,7 @@ character.standard={
jijiang:{ jijiang:{
unique:true, unique:true,
group:['jijiang1','jijiang2'], group:['jijiang1','jijiang2'],
zhuSkill:true,
}, },
jijiang1:{ jijiang1:{
audio:2, audio:2,
@ -562,7 +564,7 @@ character.standard={
trigger:{player:'chooseToRespondBegin'}, trigger:{player:'chooseToRespondBegin'},
filter:function(event,player){ filter:function(event,player){
if(event.responded) return false; if(event.responded) return false;
if(!player.isZhu) return false; if(!player.hasZhuSkill('jijiang')) return false;
if(event.filterCard({name:'sha'})==false) return false; if(event.filterCard({name:'sha'})==false) return false;
for(var i=0;i<game.players.length;i++){ for(var i=0;i<game.players.length;i++){
if(game.players[i]!=player&&game.players[i].group=='shu') return true; if(game.players[i]!=player&&game.players[i].group=='shu') return true;
@ -617,7 +619,7 @@ character.standard={
enable:'chooseToUse', enable:'chooseToUse',
filter:function(event,player){ filter:function(event,player){
if(event.filterCard&&!event.filterCard({name:'sha'},player)) return false; if(event.filterCard&&!event.filterCard({name:'sha'},player)) return false;
if(!player.isZhu) return false; if(!player.hasZhuSkill('jijiang')) return false;
if(player.skills.contains('jijiang3')) return false; if(player.skills.contains('jijiang3')) return false;
for(var i=0;i<game.players.length;i++){ for(var i=0;i<game.players.length;i++){
if(game.players[i].group=='shu'&&game.players[i]!=player){ if(game.players[i].group=='shu'&&game.players[i]!=player){
@ -1082,10 +1084,11 @@ character.standard={
audio:2, audio:2,
unique:true, unique:true,
trigger:{target:'taoBegin'}, trigger:{target:'taoBegin'},
zhuSkill:true,
forced:true, forced:true,
filter:function(event,player){ filter:function(event,player){
if(event.player==player) return false; if(event.player==player) return false;
if(!player.isZhu) return false; if(!player.hasZhuSkill('jiuyuan')) return false;
if(player.hp>0) return false; if(player.hp>0) return false;
if(event.player.group!='wu') return false; if(event.player.group!='wu') return false;
return true; return true;

View File

@ -128,6 +128,7 @@ character.xianjian={
if(ai.get.damageEffect(player,event.player,player)>=0) return false; if(ai.get.damageEffect(player,event.player,player)>=0) return false;
return true; return true;
}, },
usable:1,
content:function(){ content:function(){
"step 0" "step 0"
var goon=(ai.get.damageEffect(player,trigger.player,player)<=0); var goon=(ai.get.damageEffect(player,trigger.player,player)<=0);
@ -1879,7 +1880,7 @@ character.xianjian={
pal_xuanxiao:'玄霄', pal_xuanxiao:'玄霄',
zhangmu:'障目', zhangmu:'障目',
zhangmu_info:'每回合限一次,当使用需要使用或打出一张闪时,你可以展示一张闪,视为使用或打出了此闪', zhangmu_info:'每回合限一次,当需要使用或打出一张闪时,你可以展示一张闪,视为使用或打出了此闪',
feizhua:'飞爪', feizhua:'飞爪',
feizhua_info:'当你使用一张杀时,你可以将目标两侧的角色追加为额外目标', feizhua_info:'当你使用一张杀时,你可以将目标两侧的角色追加为额外目标',
leiyu:'雷狱', leiyu:'雷狱',

View File

@ -2353,21 +2353,19 @@ character.yijiang={
}, },
zhaofu:{ zhaofu:{
unique:true, unique:true,
global:'zhaofu2' global:'zhaofu2',
zhuSkill:true
}, },
zhaofu2:{ zhaofu2:{
mod:{ mod:{
attackTo:function(from,to,distance){ attackTo:function(from,to,distance){
if(from.group!='wu') return; if(from.group!='wu') return;
var zhu;
for(var i=0;i<game.players.length;i++){ for(var i=0;i<game.players.length;i++){
if(game.players[i].isZhu&&game.players[i].skills.contains('zhaofu')){ if(from!=game.players[i]&&to!=game.players[i]&&
zhu=game.players[i];break; game.players[i].hasZhuSkill('zhaofu',from)){
if(get.distance(game.players[i],to)<=1) return distance-100;
} }
} }
if(!zhu) return;
if(from==zhu||to==zhu) return;
if(get.distance(zhu,to)<=1) return distance-100;
} }
} }
}, },
@ -2741,13 +2739,14 @@ character.yijiang={
qinwang:{ qinwang:{
unique:true, unique:true,
group:['qinwang1','qinwang2'], group:['qinwang1','qinwang2'],
zhuSkill:true
}, },
qinwang1:{ qinwang1:{
audio:2, audio:2,
trigger:{player:'chooseToRespondBegin'}, trigger:{player:'chooseToRespondBegin'},
filter:function(event,player){ filter:function(event,player){
if(event.responded) return false; if(event.responded) return false;
if(!player.isZhu) return false; if(!player.hasZhuSkill('qinwang')) return false;
if(!player.num('he')) return false; if(!player.num('he')) return false;
if(event.filterCard({name:'sha'})==false) return false; if(event.filterCard({name:'sha'})==false) return false;
for(var i=0;i<game.players.length;i++){ for(var i=0;i<game.players.length;i++){
@ -2821,7 +2820,7 @@ character.yijiang={
enable:'chooseToUse', enable:'chooseToUse',
filter:function(event,player){ filter:function(event,player){
if(event.filterCard&&!event.filterCard({name:'sha'},player)) return false; if(event.filterCard&&!event.filterCard({name:'sha'},player)) return false;
if(!player.isZhu) return false; if(!player.hasZhuSkill('qinwang')) return false;
for(var i=0;i<game.players.length;i++){ for(var i=0;i<game.players.length;i++){
if(game.players[i].group=='shu'&&game.players[i]!=player){ if(game.players[i].group=='shu'&&game.players[i]!=player){
return lib.filter.cardUsable({name:'sha'},player); return lib.filter.cardUsable({name:'sha'},player);
@ -3301,17 +3300,18 @@ character.yijiang={
audio:2, audio:2,
trigger:{player:'dying'}, trigger:{player:'dying'},
priority:6, priority:6,
zhuSkill:true,
filter:function(event,player){ filter:function(event,player){
if(player.storage.xingshuai) return false; if(player.storage.xingshuai) return false;
if(player.hp>0) return false; if(player.hp>0) return false;
if(!player.isZhu) return false; if(!player.hasZhuSkill('xingshuai')) return false;
for(var i=0;i<game.players.length;i++){ for(var i=0;i<game.players.length;i++){
if(game.players[i]!=player&&game.players[i].group=='wei') return true; if(game.players[i]!=player&&game.players[i].group=='wei') return true;
} }
return false; return false;
}, },
init:function(player){ init:function(player){
if(player.isZhu){ if(player.hasZhuSkill('xingshuai')){
player.markSkill('xingshuai'); player.markSkill('xingshuai');
player.storage.xingshuai=false; player.storage.xingshuai=false;
} }

View File

@ -61,7 +61,7 @@
devURL:'https://rawgit.com/libccy/noname/master/', devURL:'https://rawgit.com/libccy/noname/master/',
assetURL:'', assetURL:'',
hallURL:'websha.cn', hallURL:'websha.cn',
reserveSkillName:['others'], reserveSkillName:['others','zhu'],
changeLog:[], changeLog:[],
updates:[], updates:[],
canvasUpdates:[], canvasUpdates:[],
@ -4846,16 +4846,23 @@
} }
if(ui.tempnowuxie&&ui.tempnowuxie.classList.contains('glow')&&event.state>0){ if(ui.tempnowuxie&&ui.tempnowuxie.classList.contains('glow')&&event.state>0){
var triggerevent=event.getTrigger(); var triggerevent=event.getTrigger();
if(ui.tempnowuxie._origin==triggerevent.parent.id){ if(triggerevent){
if(ui.tempnowuxie._origin==triggerevent.parent.id){
event.result={
bool:false
}
if(triggerevent.targets&&triggerevent.num==triggerevent.targets.length-1){
ui.tempnowuxie.close();
}
return;
}
}
else if(ui.tempnowuxie._origin==_status.event.id2){
event.result={ event.result={
bool:false bool:false
} }
if(triggerevent.targets&&triggerevent.num==triggerevent.targets.length-1){
ui.tempnowuxie.close();
}
return; return;
} }
} }
if(!_status.connectMode&&lib.config.wuxie_self&&event.getParent().state){ if(!_status.connectMode&&lib.config.wuxie_self&&event.getParent().state){
var tw=event.getTrigger().parent; var tw=event.getTrigger().parent;
@ -8083,6 +8090,9 @@
else if(this.additionalSkills[i]&&typeof this.additionalSkills[i]=='string'){ else if(this.additionalSkills[i]&&typeof this.additionalSkills[i]=='string'){
skills.add(this.additionalSkills[i]); skills.add(this.additionalSkills[i]);
} }
else if(typeof this.additionalSkills[i]=='function'){
skills.addArray(this.additionalSkills[i](this));
}
} }
if(arg2) skills=skills.concat(this.hiddenSkills); if(arg2) skills=skills.concat(this.hiddenSkills);
if(arg3!==false){ if(arg3!==false){
@ -10175,6 +10185,20 @@
hasSkill:function(skill){ hasSkill:function(skill){
return game.expandSkills(this.get('s')).contains(skill); return game.expandSkills(this.get('s')).contains(skill);
}, },
hasZhuSkill:function(skill,player){
if(!this.hasSkill(skill)) return false;
var mode=get.mode();
if(mode=='identity'||(mode=='versus'&&_status.mode=='four')){
if(mode!='identity'){
if(player&&this.side!=player.side) return false;
}
if(this.isZhu) return true;
for(var i in this.storage){
if(i.indexOf('zhuSkill_')==0&&this.storage[i].contains(skill)) return true;
}
}
return false;
},
hasSkillTag:function(tag,hidden){ hasSkillTag:function(tag,hidden){
var skills=game.expandSkills(this.get('s',hidden)); var skills=game.expandSkills(this.get('s',hidden));
for(var i=0;i<skills.length;i++){ for(var i=0;i<skills.length;i++){
@ -31660,11 +31684,17 @@
lib.game=game; lib.game=game;
lib.init.init(); lib.init.init();
HTMLDivElement.prototype.animate=function(name,time){ HTMLDivElement.prototype.animate=function(name,time){
this.classList.add(name); var that;
var that=this; if(lib.isMobileMe(this)&&name=='target'){
setTimeout(function(){ that=ui.mebg;
that.classList.remove(name); }
},time||1000); else{
that=this;
}
that.classList.add(name);
setTimeout(function(){
that.classList.remove(name);
},time||1000);
return this; return this;
}; };
HTMLDivElement.prototype.hide=function(){ HTMLDivElement.prototype.hide=function(){
@ -31871,6 +31901,12 @@
} }
return this; return this;
}; };
Array.prototype.addArray=function(arr){
for(var i=0;i<arr.length;i++){
this.add(arr[i]);
}
return this;
};
Array.prototype.remove=function(item){ Array.prototype.remove=function(item){
if(get.objtype(item)=='array'){ if(get.objtype(item)=='array'){
for(var i=0;i<item.length;i++) this.remove(item[i]); for(var i=0;i<item.length;i++) this.remove(item[i]);

View File

@ -1,7 +1,8 @@
window.noname_update={ window.noname_update={
version:'1.8.20', version:'1.8.20',
changeLog:[ changeLog:[
'新武将、新卡', '修bug',
'新武将',
], ],
files:{ files:{
global:[ global:[
@ -17,6 +18,7 @@ window.noname_update={
'character/xianjian.js', 'character/xianjian.js',
'character/refresh.js', 'character/refresh.js',
'character/shenhua.js', 'character/shenhua.js',
'character/standard.js',
'card/extra.js', 'card/extra.js',
'card/swd.js', 'card/swd.js',
'card/standard.js', 'card/standard.js',

View File

@ -126,7 +126,6 @@ mode.guozhan={
for(var i in map){ for(var i in map){
if(map[i].length<2){ if(map[i].length<2){
if(map[i].length==1){ if(map[i].length==1){
console.log(map[i][0]);
choice.remove(map[i][0]); choice.remove(map[i][0]);
list.push(map[i][0]); list.push(map[i][0]);
} }