This commit is contained in:
libccy 2018-06-29 23:29:56 +08:00
parent 2b91bd68db
commit c7de67a787
6 changed files with 263 additions and 106 deletions

View File

@ -3964,28 +3964,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
trigger:{player:'phaseEnd'}, trigger:{player:'phaseEnd'},
frequent:true, frequent:true,
filter:function(event,player){ filter:function(event,player){
var list=['wei','shu','wu','qun']; return player.countCards('h')<game.countGroup();
var players=game.filterPlayer();
var num=0;
for(var i=0;i<players.length&&list.length;i++){
if(list.contains(players[i].group)){
list.remove(players[i].group);
num++;
}
}
return player.countCards('h')<num;
}, },
content:function(){ content:function(){
var list=['wei','shu','wu','qun']; player.draw(game.countGroup()-player.countCards('h'));
var players=game.filterPlayer();
var num=0;
for(var i=0;i<players.length&&list.length;i++){
if(list.contains(players[i].group)){
list.remove(players[i].group);
num++;
}
}
player.draw(num-player.countCards('h'));
}, },
ai:{ ai:{
threaten:1.3 threaten:1.3

View File

@ -113,8 +113,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
liuye:['male','wei',3,['polu','choulve']], liuye:['male','wei',3,['polu','choulve']],
beimihu:['female','qun',3,['zongkui','guju','baijia']], beimihu:['female','qun',3,['zongkui','guju','baijia']],
// sp_liuqi:['male','qun',3,['wenji','tunjiang']], sp_liuqi:['male','qun',3,['spwenji','sptunjiang']],
// luzhi:['male','wei',3,['qingzhong','weijing']], luzhi:['male','wei',3,['qingzhong','weijing']],
}, },
characterIntro:{ characterIntro:{
huangfusong:'字义真。安定郡朝那县(今宁夏彭阳)人。于黄巾起义时,以中郎将身份讨伐黄巾,用火攻大破张梁、张宝。[45] 后接替董卓进攻张梁,连胜七阵。掘张角墓,拜左车骑将军、冀州牧,因拒绝贿赂宦官而被免职。[46] 董卓死,王允命其与吕布等共至郿坞抄籍董卓家产、人口,皇甫嵩将坞中所藏良家子女,尽行释放。', huangfusong:'字义真。安定郡朝那县(今宁夏彭阳)人。于黄巾起义时,以中郎将身份讨伐黄巾,用火攻大破张梁、张宝。[45] 后接替董卓进攻张梁,连胜七阵。掘张角墓,拜左车骑将军、冀州牧,因拒绝贿赂宦官而被免职。[46] 董卓死,王允命其与吕布等共至郿坞抄籍董卓家产、人口,皇甫嵩将坞中所藏良家子女,尽行释放。',
@ -323,13 +323,220 @@ game.import('character',function(lib,game,ui,get,ai,_status){
} }
}, },
skill:{ skill:{
// wenji:{ qingzhong:{
// trigger:{player:'phaseUseBegin'}, trigger:{player:'phaseUseBegin'},
check:function(event,player){
// }, if(game.hasPlayer(function(current){
// tunjiang:{ return current!=player&&current.isMinHandcard();
})){
// }, return true;
}
if(player.countCards('h')<=2) return true;
if(player.countCards('h')<=3&&!player.countCards('h','shan')) return true;
if(player.countCards('h',{type:'basic'})<=1) return true;
return false;
},
content:function(){
player.draw(2);
player.addTempSkill('qingzhong_give');
},
subSkill:{
give:{
trigger:{player:'phaseUseEnd'},
filter:function(event,player){
return !player.isMinHandcard(true);
},
forced:true,
content:function(){
'step 0'
var list=game.filterPlayer(function(current){
return current.isMinHandcard();
});
if(list.length==1){
if(list[0]!=player){
player.line(list[0],'green');
player.swapHandcards(list[0]);
}
event.finish();
}
else{
player.chooseTarget(true,'清忠:选择一名手牌最少的角色与其交换手牌',function(card,player,target){
return target.isMinHandcard();
}).set('ai',function(target){
return get.attitude(_status.event.player,target);
});
}
'step 1'
if(result.bool){
var target=result.targets[0];
if(target!=player){
player.line(target,'green');
player.swapHandcards(target);
}
}
}
}
}
},
weijing:{
group:['weijing_sha','weijing_shan'],
subSkill:{
sha:{
enable:'chooseToUse',
viewAs:{name:'sha'},
filterCard:function(){return false},
viewAsFilter:function(player){
if(player.hasSkill('weijing_disable')) return false;
},
selectCard:-1,
mark:false,
precontent:function(){
player.addTempSkill('weijing_disable','roundStart');
},
prompt:'视为使用一张杀',
ai:{
order:function(){
if(!player.hasShan()&&!game.hasPlayer(function(current){
return player.canUse('sha',current)&&current.hp==1&&get.effect(current,{name:'sha'},player,player)>0;
})){
return 0;
}
return 2.95;
},
skillTagFilter:function(player,tag,arg){
if(player.hasSkill('weijing_disable')) return false;
if(arg!='use') return false;
},
respondSha:true,
}
},
shan:{
enable:'chooseToRespond',
viewAs:{name:'shan'},
mark:false,
filterCard:function(){return false},
viewAsFilter:function(player){
if(player.hasSkill('weijing_disable')) return false;
},
onrespond:function(event,player){
player.addTempSkill('weijing_disable','roundStart');
},
selectCard:-1,
prompt:'视为使用一张闪',
ai:{
order:function(){
if(player.hasSkill('qingzhong_give')) return 2.95;
return 3.15;
},
skillTagFilter:function(player){
if(player.hasSkill('weijing_disable')) return false;
},
respondShan:true,
}
},
disable:{
mark:true,
intro:{
content:'本轮已发动'
}
}
}
},
spwenji:{
trigger:{player:'phaseUseBegin'},
direct:true,
filter:function(event,player){
return game.hasPlayer(function(current){
return current!=player&&current.countCards('he');
});
},
content:function(){
'step 0'
player.chooseTarget(get.prompt2('spwenji'),function(card,player,target){
return target!=player&&target.countCards('he');
}).set('ai',function(target){
var att=get.attitude(_status.event.player,target);
if(att>0) return Math.sqrt(att)/10;
return 5-att;
});
'step 1'
if(result.bool){
var target=result.targets[0];
event.target=target;
player.logSkill('spwenji',target);
target.chooseCard('he',true,'问计:将一张牌交给'+get.translation(player));
}
else{
event.finish();
}
'step 2'
if(result.bool){
player.addTempSkill('spwenji_respond');
player.storage.spwenji_respond=result.cards[0].name;
event.target.give(result.cards,player);
}
},
subSkill:{
respond:{
onremove:true,
mod:{
wuxieRespondable:function(card,player,target,current){
if(player!=current&&player.storage.spwenji_respond==card.name){
return false;
}
}
},
ai:{
norespond:true,
skillTagFilter:function(player,tag,arg){
if(tag=='norespond'&&Array.isArray(arg)){
var evt=arg[2].getParent();
if(evt.type=='card'&&evt.name==player.storage.spwenji_respond) return true;
}
return false;
}
}
}
}
},
sptunjiang:{
trigger:{player:'phaseUseBegin'},
silent:true,
content:function(){
player.addTempSkill('sptunjiang_count');
player.addTempSkill('sptunjiang_end');
},
subSkill:{
count:{
trigger:{player:'useCard'},
silent:true,
filter:function(event,player){
if(event.targets){
for(var i=0;i<event.targets.length;i++){
if(event.targets[i]!=player){
return true;
}
}
}
return false;
},
content:function(){
player.addTempSkill('sptunjiang_used');
}
},
used:{},
end:{
trigger:{player:'phaseEnd'},
frequent:true,
filter:function(event,player){
return !player.hasSkill('sptunjiang_used');
},
content:function(){
player.draw(game.countGroup());
}
}
}
},
baijia:{ baijia:{
unique:true, unique:true,
ai:{ ai:{
@ -2752,14 +2959,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
trigger:{player:'phaseDrawBegin'}, trigger:{player:'phaseDrawBegin'},
forced:true, forced:true,
content:function(){ content:function(){
var list=['wei','shu','wu','qun']; trigger.num+=game.countGroup()-2;
var num=game.countPlayer(function(current){
if(list.contains(current.group)){
list.remove(current.group);
return true;
}
});
trigger.num+=num-2;
} }
}, },
xinyongsi2:{ xinyongsi2:{
@ -9100,14 +9300,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
trigger:{player:'phaseDrawBegin'}, trigger:{player:'phaseDrawBegin'},
forced:true, forced:true,
content:function(){ content:function(){
var list=['wei','shu','wu','qun']; trigger.num+=game.countGroup();
var num=game.countPlayer(function(current){
if(list.contains(current.group)){
list.remove(current.group);
return true;
}
});
trigger.num+=num;
} }
}, },
yongsi2:{ yongsi2:{
@ -9115,14 +9308,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
trigger:{player:'phaseDiscardBegin'}, trigger:{player:'phaseDiscardBegin'},
forced:true, forced:true,
content:function(){ content:function(){
var list=['wei','shu','wu','qun']; player.chooseToDiscard(game.countGroup(),'he',true);
var num=game.countPlayer(function(current){
if(list.contains(current.group)){
list.remove(current.group);
return true;
}
});
player.chooseToDiscard(num,'he',true);
} }
}, },
bifa:{ bifa:{
@ -9864,16 +10050,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){
quyi:'麹义', quyi:'麹义',
liuye:'刘晔', liuye:'刘晔',
beimihu:'卑弥呼', beimihu:'卑弥呼',
// luzhi:'', luzhi:'鲁芝',
sp_liuqi:'刘琦',
// qingzhong:'清忠', qingzhong:'清忠',
// qingzhong_info:'出牌阶段开始时,你可以摸两张牌,若如此做,本阶段结束时,你与手牌数最少的角色交换手牌。', qingzhong_info:'出牌阶段开始时,你可以摸两张牌,若如此做,本阶段结束时,你与手牌数最少的角色交换手牌。',
// weijing:'卫境', weijing:'卫境',
// weijing_info:'每轮限一次,你可以在需要使用【杀】或【闪】时,视为使用一张【杀】或【闪】。', weijing_info:'每轮限一次,你可以在需要使用【杀】或【闪】时,视为使用一张【杀】或【闪】。',
// wenji:'问计', spwenji:'问计',
// wenji_info:'出牌阶段开始时,你可以令一名其他角色交给你一张牌。你于本回合内使用与该牌同名的牌不能被其他角色响应。', spwenji_info:'出牌阶段开始时,你可以令一名其他角色交给你一张牌。你于本回合内使用与该牌同名的牌不能被其他角色响应。',
// tunjiang:'屯江', sptunjiang:'屯江',
// tunjiang_info:'结束阶段若你未跳过本回合的出牌阶段且你于本回合出牌阶段内未使用牌指定过其他角色为目标则你可以摸X张牌X为全场势力数。', sptunjiang_info:'结束阶段若你未跳过本回合的出牌阶段且你于本回合出牌阶段内未使用牌指定过其他角色为目标则你可以摸X张牌X为全场势力数。',
zongkui:'纵傀', zongkui:'纵傀',
zongkui_mark:'纵傀', zongkui_mark:'纵傀',
zongkui_mark_bg:'傀', zongkui_mark_bg:'傀',

View File

@ -2887,13 +2887,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
content:function(){ content:function(){
'step 0' 'step 0'
player.storage.zongzuo=true; player.storage.zongzuo=true;
var list=['wei','shu','wu','qun']; var num=game.countGroup();
var num=game.countPlayer(function(current){
if(list.contains(current.group)){
list.remove(current.group);
return true;
}
});
player.gainMaxHp(num); player.gainMaxHp(num);
event.num=num; event.num=num;
'step 1' 'step 1'
@ -2907,8 +2901,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
forced:true, forced:true,
audio:'zongzuo', audio:'zongzuo',
filter:function(event,player){ filter:function(event,player){
var list=['wei','shu','wu','qun']; if(!lib.group.contains(event.player.group)) return false;
if(!list.contains(event.player.group)) return false;
if(game.hasPlayer(function(current){ if(game.hasPlayer(function(current){
return current.group==event.player.group; return current.group==event.player.group;
})){ })){
@ -7892,14 +7885,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
zongshi:{ zongshi:{
mod:{ mod:{
maxHandcard:function(player,num){ maxHandcard:function(player,num){
var list=['wei','shu','wu','qun']; return num+game.countGroup();
var num2=game.countPlayer(function(current){
if(list.contains(current.group)){
list.remove(current.group);
return true;
}
});
return num+num2;
} }
} }
}, },
@ -7910,14 +7896,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return player.countCards('h')<=player.maxHp||player.skipList.contains('phaseUse'); return player.countCards('h')<=player.maxHp||player.skipList.contains('phaseUse');
}, },
content:function(){ content:function(){
var list=['wei','shu','wu','qun']; trigger.num+=game.countGroup();
var num=game.countPlayer(function(current){
if(list.contains(current.group)){
list.remove(current.group);
return true;
}
});
trigger.num+=num;
player.addTempSkill('zishou2'); player.addTempSkill('zishou2');
}, },

View File

@ -12512,6 +12512,9 @@
} }
player.logSkill(event.skill); player.logSkill(event.skill);
player.checkShow(event.skill,true); player.checkShow(event.skill,true);
if(lib.skill[event.skill].onrespond&&!game.online){
lib.skill[event.skill].onrespond(event,player);
}
} }
else if(lib.config.show_card_prompt&&!lib.config.hide_card_prompt_basic){ else if(lib.config.show_card_prompt&&!lib.config.hide_card_prompt_basic){
player.popup(card.name,'wood'); player.popup(card.name,'wood');
@ -21264,7 +21267,7 @@
if(event.name!='chooseToRespond') return true; if(event.name!='chooseToRespond') return true;
var source=event.getParent().player; var source=event.getParent().player;
if(source!=player){ if(source!=player){
if(source.hasSkillTag('norespond',false,[card,player],true)){ if(source.hasSkillTag('norespond',false,[card,player,event],true)){
return false; return false;
} }
} }
@ -23056,7 +23059,7 @@
} }
}, },
suit:['club','spade','diamond','heart'], suit:['club','spade','diamond','heart'],
group:['wei','shu','wu','qun'], group:['wei','shu','wu','qun','shen'],
nature:['fire','thunder','poison'], nature:['fire','thunder','poison'],
linked:['fire','thunder'], linked:['fire','thunder'],
}; };
@ -28802,7 +28805,7 @@
} }
var num=round-(game.roundNumber-storage); var num=round-(game.roundNumber-storage);
if(num>0){ if(num>0){
str+=get.cnNumber(num)+'轮后技能重置'; str+=get.cnNumber(num)+'轮后'+(info.roundtext||'技能重置');
} }
else{ else{
str+='技能可发动'; str+='技能可发动';
@ -29965,6 +29968,15 @@
} }
return cards; return cards;
}, },
countGroup:function(){
var list=lib.group.slice(0);
return game.countPlayer(function(current){
if(list.contains(current.group)){
list.remove(current.group);
return true;
}
});
},
players:[], players:[],
dead:[], dead:[],
imported:[], imported:[],

View File

@ -1,20 +1,18 @@
window.noname_update={ window.noname_update={
version:'1.9.51', version:'1.9.52',
update:'1.9.50.2', update:'1.9.51',
changeLog:[ changeLog:[
'bug修复' '新武将'
],
players:[
'sp_liuqi',
'luzhi'
], ],
// players:[
// 'sp_liuqi',
// 'luzhi'
// ],
files:[ files:[
'character/diy.js',
'character/sp.js', 'character/sp.js',
'game/asset.js', 'character/yijiang.js',
'game/directory.js',
'game/game.js', 'game/game.js',
'game/server.js', 'mode/boss.js'
'mode/connect.js',
'mode/versus.js'
] ]
}; };

View File

@ -5285,10 +5285,9 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
for(var i=0;i<players.length;i++){ for(var i=0;i<players.length;i++){
if(players[i]!=player){ if(players[i]!=player){
var e=players[i].getEquip('qinggang'); var e=players[i].getEquip('qinggang');
if(e.length){ if(e){
player.gain(e,players[i]); player.line(players[i],'green');
players[i].$give(e,player); players[i].give(e,player);
break;
} }
} }
} }