This commit is contained in:
libccy 2017-02-26 01:26:08 +08:00
parent 86a175d260
commit 124e82a11b
5 changed files with 105 additions and 60 deletions

View File

@ -25,18 +25,33 @@ card.zhenfa={
type:'zhenfa',
chongzhu:true,
enable:function(card,player){
if(player.identity=='unknown') return false;
return player.next.identity==player.identity||player.previous.identity==player.identity;
if(player.inline()) return true;
if(player.identity=='unknown'||player.identity=='ye') return false;
return game.hasPlayer(function(current){
return current!=player&&current.isFriendOf(player);
});
},
filterTarget:function(card,player,target){
if(player==target) return player.inline();
return player.inline(target);
if(player.inline()) return player.inline(target);
if(!player.getNext()) return false;
var list=game.filterPlayer(function(current){
return current!=player&&current.isFriendOf(player);
});
list.sort(function(a,b){
return get.distance(player,a,'absolute')-get.distance(player,b,'absolute');
});
return target==list[0];
},
selectTarget:-1,
multitarget:true,
multiline:true,
content:function(){
game.asyncDraw(targets);
if(targets.length==1){
game.swapSeat(targets[0],game.me.getNext(),true,true);
}
else{
game.asyncDraw(targets);
}
},
mode:['guozhan'],
ai:{
@ -149,33 +164,31 @@ card.zhenfa={
type:'zhenfa',
chongzhu:true,
enable:function(card,player){
if(player.identity=='unknown'||player.identity=='ye') return false;
return (get.population(player.identity)>1)
return player.siege()||player.sieged();
},
filterTarget:function(card,player,target){
return target.identity==player.identity;
return target==player;
},
multitarget:true,
selectTarget:-1,
content:function(){
lib.temp=targets[0];
targets.sort(lib.sort.seat);
var rest=game.players.slice(0);
rest.remove(targets);
rest.sort(function(a,b){
if(a.identity=='unknown') return 1;
else return -1;
})
lib.temp={};
if(targets.length>rest.length+1) targets.length=rest.length+1;
for(var i=1;i<targets.length;i++){
game.swapSeat(targets[i],targets[i-1].next.next,false);
game.swapSeat(rest[i-1],targets[i-1].next,false);
'step 0'
event.targets=game.filterPlayer(function(current){
return current.siege(player);
});
'step 1'
if(event.targets.length){
var current=event.targets.shift();
player.line(current,'green');
player.discardPlayerCard(current,true);
event.redo();
}
if(rest[targets.length-1]){
game.swapSeat(rest[targets.length-1],targets[targets.length-1].next,false);
'step 2'
var list=game.filterPlayer(function(current){
return current.sieged(player);
});
if(list.length){
player.useCard({name:'sha'},list,false);
}
game.log(get.translation(player.identity)+'势力角色摆成了七星阵')
},
mode:['guozhan'],
ai:{
@ -354,15 +367,15 @@ card.zhenfa={
huyizhen:'虎翼阵',
niaoxiangzhen:'鸟翔阵',
niaoxiangzhen_info:'令所有非你阵营的队列的角色今次打出一张闪,或者受到一点伤害',
huyizhen_info:'将一张非基本牌当作杀对你围攻的角色使用',
longfeizhen_info:'弃置围攻你的角色各一张牌,然后摸一张牌',
qixingzhen_info:'令我方所有角色进入围攻状态',
shepanzhen_info:'令我方所有角色进入队列状态',
yunchuizhen_info:'令所有围攻角色获得技能【无双】,直到其首次造成伤害',
fengyangzhen_info:'令所有被围攻角色获得技能【飞影】,直到其首次受到伤害',
qixingzhen_info:'弃置所有围攻你的角色各一张牌,然后视为对所有你围攻的角色使用一张不计入出杀次数的杀',
// longfeizhen_info:'弃置围攻你的角色各一张牌,然后摸一张牌',
// qixingzhen_info:'令我方所有角色进入围攻状态',
// shepanzhen_info:'令我方所有角色进入队列状态',
// yunchuizhen_info:'令所有围攻角色获得技能【无双】,直到其首次造成伤害',
// fengyangzhen_info:'令所有被围攻角色获得技能【飞影】,直到其首次受到伤害',
dizaizhen_info:'所有小势力角色摸一张牌',
changshezhen_info:'与你同一队列的所有角色摸一张牌',
pozhenjue_info:'将所有角色的顺序随机重排',
changshezhen_info:'若你处于队列中,与你同一队列的所有角色摸一张牌,否则将与你逆时针距离最近的同势力角色移至你下家',
// pozhenjue_info:'将所有角色的顺序随机重排',
tianfuzhen_info:'所有大势力角色弃置一张牌'
},
list:[
@ -392,24 +405,24 @@ card.zhenfa={
// ["heart",5,'zhonghuangzhen'],
// ["diamond",6,'huyizhen'],
["club",6,'huyizhen'],
["spade",6,'huyizhen'],
// ["club",6,'huyizhen'],
// ["spade",6,'huyizhen'],
// ["heart",6,'huyizhen'],
// ["diamond",7,'qixingzhen'],
// ["club",7,'qixingzhen'],
// ["spade",7,'qixingzhen'],
["diamond",7,'qixingzhen'],
["club",7,'qixingzhen'],
["spade",7,'qixingzhen'],
// ["heart",7,'qixingzhen'],
["diamond",8,'shepanzhen'],
// ["diamond",8,'shepanzhen'],
// ["club",8,'shepanzhen'],
// ["spade",8,'shepanzhen'],
["heart",8,'shepanzhen'],
// ["heart",8,'shepanzhen'],
// ["diamond",9,'longfeizhen'],
["club",9,'longfeizhen'],
// ["club",9,'longfeizhen'],
// ["spade",9,'longfeizhen'],
["heart",9,'longfeizhen'],
// ["heart",9,'longfeizhen'],
["diamond",11,'niaoxiangzhen'],
// ["club",11,'niaoxiangzhen'],
@ -421,7 +434,7 @@ card.zhenfa={
// ["spade",12,'yunchuizhen'],
// ["heart",12,'yunchuizhen'],
["diamond",13,'pozhenjue'],
// ["diamond",13,'pozhenjue'],
// ["club",13,'pozhenjue'],
// ["spade",13,'pozhenjue'],
//["heart",13,'pozhenjue'],

View File

@ -761,7 +761,11 @@ character.standard={
if(player.isUnderControl()){
game.modeSwapPlayer(player);
}
var cards=get.cards(Math.min(5,game.countPlayer()));
var num=Math.min(5,game.countPlayer());
if(player.hasSkill('yizhi')&&player.hasSkill('guanxing')){
num=5;
}
var cards=get.cards(num);
event.cards=cards;
var switchToAuto=function(){
_status.imchoosing=false;

View File

@ -5857,7 +5857,6 @@
game.saveConfig('characters',lib.config.all.characters);
game.saveConfig('cards',lib.config.all.cards);
game.saveConfig('plays',['cardpile']);
game.saveConfig('hiddenCardPack',['zhenfa']);
game.saveConfig('hiddenPlayPack',['character', 'soldier', 'weather']);
game.saveConfig('tao_enemy',true);
game.saveConfig('layout','long2');
@ -17200,6 +17199,7 @@
lib.skill[i]=lib.init.eval(mode.skill[i]);
}
}
game.finishCards();
_status.event={
finished:true,
next:[],
@ -17275,6 +17275,7 @@
lib.skill[i]=lib.init.eval(mode.skill[i]);
}
}
game.finishCards();
if(mode.characterPack){
for(var i in mode.characterPack){
lib.characterPack[i]=mode.characterPack[i];
@ -21114,6 +21115,7 @@
catch(e){
game.print('游戏出错:'+event.name);
game.print(e.toString());
console.log(e);
}
}
else{
@ -36701,14 +36703,11 @@
if(node==game.me&&node.hiddenSkills.length){
skills.addArray(node.hiddenSkills);
}
if(node.awakenedSkills.length){
for(var i=0;i<node.awakenedSkills.length;i++){
if(node.disabledSkills[node.awakenedSkills[i]]&&
node.disabledSkills[node.awakenedSkills[i]].length==1){
skills.push(node.awakenedSkills[i]);
}
for(var i in node.disabledSkills){
if(node.disabledSkills[i].length==1&&node.disabledSkills[i][0]==i+'_awake'){
skills.push(i);
}
}
}
for(i=0;i<skills.length;i++){
if(lib.skill[skills[i]]&&lib.skill[skills[i]].nopop) continue;
if(lib.translate[skills[i]+'_info']){

View File

@ -22,7 +22,7 @@ card.pack={
extra:'军争',
sp:'SP',
guozhan:'国战',
// zhenfa:'阵法',
zhenfa:'阵法',
yunchou:'运筹帷幄',
swd:'轩辕剑',
gujian:'古剑奇谭',

View File

@ -72,7 +72,6 @@ mode.guozhan={
if(lib.configOL.guozhanpile){
lib.card.list=lib.guozhanPile.slice(0);
}
game.randomMapOL();
game.broadcastAll(function(pack){
for(var i=0;i<game.players.length;i++){
game.players[i].node.name.hide();
@ -92,6 +91,7 @@ mode.guozhan={
}
}
},lib.characterPack.mode_guozhan);
game.randomMapOL();
}
else{
for(var i=0;i<game.players.length;i++){
@ -235,7 +235,7 @@ mode.guozhan={
// gz_dengai:['male','wei',4,['tuntian','ziliang','gzjixi']],
// gz_caohong:['male','wei',4,['huyuan','heyi']],
// gz_jiangfei:['male','shu',3,['shengxi','gzshoucheng']],
// gz_jiangwei:['male','shu',4,['tiaoxin','yizhi','tianfu']],
gz_jiangwei:['male','shu',4,['tiaoxin','yizhi','tianfu']],
// gz_xusheng:['male','wu',4,['yicheng']],
gz_jiangqing:['male','wu',4,['gzshangyi','niaoxiang']],
gz_hetaihou:['female','qun',3,['zhendu','qiluan']],
@ -257,6 +257,27 @@ mode.guozhan={
zoushi:'军阀张济之妻,张绣之婶。张绣降曹后,邹氏遂被曹操霸占。贾诩献计趁机诛杀曹操,险些得手。曹操在损失爱将典韦、侄子曹安民和长子曹昂后方才逃出生天。',
},
skill:{
tianfu:{
init:function(player){
player.checkMainSkill('tianfu');
},
inherit:'kanpo',
zhenfa:'inline',
viewAsFilter:function(player){
return _status.currentPhase.inline(player)&&!player.hasSkill('kanpo')&&player.num('h',{color:'black'})>0;
},
},
yizhi:{
init:function(player){
if(player.checkViceSkill('yizhi')){
player.removeMaxHp();
}
},
inherit:'guanxing',
filter:function(event,player){
return !player.hasSkill('guanxing');
}
},
gzshangyi:{
audio:'shangyi',
enable:'phaseUse',
@ -1308,7 +1329,16 @@ mode.guozhan={
else{
event.current.showCharacter(1);
}
event.goto(num);
if(event.current.identity=='ye'||num!=1){
if(event.dir){
event.dir=false;
event.current=player;
event.goto(num);
}
}
else{
event.goto(num);
}
}
else if(event.dir){
event.dir=false;
@ -2009,6 +2039,7 @@ mode.guozhan={
}
}
for(var j=0;j<game.players[i].hiddenSkills.length;j++){
game.players[i].name1=game.players[i].name;
game.players[i].addSkillTrigger(game.players[i].hiddenSkills[j],true);
}
}
@ -2419,8 +2450,7 @@ mode.guozhan={
}
else{
if(disable!==false){
this.disableSkill(skill,skill);
this.awakenedSkills.add(skill);
this.awakenSkill(skill);
}
return false;
}
@ -2431,8 +2461,7 @@ mode.guozhan={
}
else{
if(disable!==false){
this.disableSkill(skill,skill);
this.awakenedSkills.add(skill);
this.awakenSkill(skill);
}
return false;
}