This commit is contained in:
libccy 2017-02-25 16:39:15 +08:00
parent 9c91a179d6
commit 652cc151b2
3 changed files with 90 additions and 31 deletions

View File

@ -7766,7 +7766,7 @@ character.yijiang={
yaowu:'耀武', yaowu:'耀武',
qianxi:'潜袭', qianxi:'潜袭',
qianxi2:'潜袭', qianxi2:'潜袭',
qianxi2_bg:'袭', qianxi2_bg:'袭',
fuli:'伏枥', fuli:'伏枥',
jiefan:'解烦', jiefan:'解烦',
juece:'绝策', juece:'绝策',

View File

@ -12974,6 +12974,10 @@
this.disabledSkills[skills]=[]; this.disabledSkills[skills]=[];
} }
this.disabledSkills[skills].add(skill); this.disabledSkills[skills].add(skill);
var group=lib.skill[skills].group;
if(typeof group=='string'||Array.isArray(group)){
this.disableSkill(skill,group);
}
} }
else if(Array.isArray(skills)){ else if(Array.isArray(skills)){
for(var i=0;i<skills.length;i++){ for(var i=0;i<skills.length;i++){
@ -13495,6 +13499,14 @@
isIn:function(){ isIn:function(){
return this.classList.contains('dead')==false&&this.classList.contains('out')==false&&!this.removed; return this.classList.contains('dead')==false&&this.classList.contains('out')==false&&!this.removed;
}, },
isUnseen:function(num){
switch(num){
case 0:return this.classList.contains('unseen');
case 1:return this.classList.contains('unseen2');
case 2:return this.classList.contains('unseen')||this.classList.contains('unseen2');
default:return this.classList.contains('unseen')&&this.classList.contains('unseen2');
}
},
isUnderControl:function(self,me){ isUnderControl:function(self,me){
me=me||game.me; me=me||game.me;
if(this.isMad()) return false; if(this.isMad()) return false;
@ -36003,8 +36015,8 @@
if(card){ if(card){
card=get.copy(card); card=get.copy(card);
card.cards=ui.selected.cards.slice(0); card.cards=ui.selected.cards.slice(0);
return card;
} }
return card;
} }
if(_status.event._get_card){ if(_status.event._get_card){
return _status.event._get_card; return _status.event._get_card;
@ -36624,7 +36636,8 @@
} }
if(node.awakenedSkills.length){ if(node.awakenedSkills.length){
for(var i=0;i<node.awakenedSkills.length;i++){ for(var i=0;i<node.awakenedSkills.length;i++){
if(node.disabledSkills[node.awakenedSkills[i]]){ if(node.disabledSkills[node.awakenedSkills[i]]&&
node.disabledSkills[node.awakenedSkills[i]].length==1){
skills.push(node.awakenedSkills[i]); skills.push(node.awakenedSkills[i]);
} }
} }

View File

@ -231,14 +231,32 @@ mode.guozhan={
// gz_mifuren:['female','shu',3,['gzguixiu','gzcunsi']], // gz_mifuren:['female','shu',3,['gzguixiu','gzcunsi']],
gz_sunce:['male','wu',4,['jiang','yingyang','hunshang']], gz_sunce:['male','wu',4,['jiang','yingyang','hunshang']],
gz_chendong:['male','wu',4,['duanxie','fenming']], gz_chendong:['male','wu',4,['duanxie','fenming']],
// gz_sp_dongzhuo:['male','qun',4,['hengzheng','baoling']], gz_sp_dongzhuo:['male','qun',4,['hengzheng','baoling']],
// gz_zhangren:['male','qun',4,['chuanxin','fengshi']], // gz_zhangren:['male','qun',4,['chuanxin','fengshi']],
} }
}, },
skill:{ skill:{
// baoling:{ baoling:{
// trigger:{player:'phaseEnd'}, trigger:{player:'phaseUseEnd'},
// }, init:function(player){
player.checkMainSkill('baoling');
},
forced:true,
filter:function(event,player){
return player.hasViceCharacter();
},
content:function(){
'step 0'
player.removeCharacter(1);
'step 1'
player.awakenSkill('baoling');
player.gainMaxHp(3,true);
'step 2'
player.recover(3);
player.addSkill('benghuai');
},
derivation:'benghuai'
},
gzmingshi:{ gzmingshi:{
trigger:{player:'damageBegin'}, trigger:{player:'damageBegin'},
forced:true, forced:true,
@ -264,13 +282,9 @@ mode.guozhan={
}, },
hunshang:{ hunshang:{
init:function(player){ init:function(player){
if(player.hasViceSkill('hunshang')){ if(player.checkViceSkill('hunshang')){
player.removeMaxHp(); player.removeMaxHp();
} }
else{
player.disableSkill('hunshang',['hunshang','hunshang_yingzi','hunshang_yinghun']);
player.awakenedSkills.add('hunshang');
}
}, },
group:['hunshang_yingzi','hunshang_yinghun'], group:['hunshang_yingzi','hunshang_yinghun'],
}, },
@ -393,28 +407,48 @@ mode.guozhan={
forced:true, forced:true,
silent:true, silent:true,
filter:function(event,player){ filter:function(event,player){
return event.source&&event.source.isIn()&&event.source!=player; return event.source&&event.source.isIn()&&event.source!=player&&
(event.source.hasMainCharacter()||event.source.hasViceCharacter());
}, },
content:function(){ content:function(){
'step 0' 'step 0'
player.chooseControl('主将','副将',function(){ if(!trigger.source.hasViceCharacter()){
return Math.random()<0.5?'主将':'副将'; event._result={control:'主将'}
}).set('prompt','令'+get.translation(trigger.source)+'失去一张武将牌的所有技能'); }
else if(!trigger.source.hasMainCharacter()){
event._result={control:'副将'}
}
else{
player.chooseControl('主将','副将',function(){
return Math.random()<0.5?'主将':'副将';
}).set('prompt','令'+get.translation(trigger.source)+'失去一张武将牌的所有技能');
}
'step 1' 'step 1'
var skills; var skills;
if(result.control=='主将'){ if(result.control=='主将'){
trigger.source.showCharacter(0); trigger.source.showCharacter(0);
trigger.source.node.avatar.classList.add('disabled'); trigger.source.node.avatar.classList.add('disabled');
skills=lib.character[trigger.source.name]; skills=lib.character[trigger.source.name][3];
game.log(trigger.source,'失去了主将技能'); game.log(trigger.source,'失去了主将技能');
} }
else{ else{
trigger.source.showCharacter(1); trigger.source.showCharacter(1);
trigger.source.node.avatar2.classList.add('disabled'); trigger.source.node.avatar2.classList.add('disabled');
skills=lib.character[trigger.source.name2]; skills=lib.character[trigger.source.name2][3];
game.log(trigger.source,'失去了副将技能'); game.log(trigger.source,'失去了副将技能');
} }
trigger.source.disableSkill('gzduanchang',skills); var list=[];
for(var i=0;i<skills.length;i++){
list.add(skills[i]);
var info=lib.skill[skills[i]];
if(typeof info.derivation=='string'){
list.add(info.derivation);
}
else if(Array.isArray(info.derivation)){
list.addArray(info.derivation);
}
}
trigger.source.disableSkill('gzduanchang',list);
}, },
logTarget:'source', logTarget:'source',
ai:{ ai:{
@ -1870,14 +1904,6 @@ mode.guozhan={
} }
game.tryResult(); game.tryResult();
}, },
isUnseen:function(num){
switch(num){
case 0:return this.classList.contains('unseen');
case 1:return this.classList.contains('unseen2');
case 2:return this.classList.contains('unseen')||this.classList.contains('unseen2');
default:return this.classList.contains('unseen')&&this.classList.contains('unseen2');
}
},
checkShow:function(skill){ checkShow:function(skill){
var sourceSkill=get.info(skill); var sourceSkill=get.info(skill);
if(sourceSkill&&sourceSkill.sourceSkill){ if(sourceSkill&&sourceSkill.sourceSkill){
@ -1901,11 +1927,25 @@ mode.guozhan={
} }
return false; return false;
}, },
hasViceSkill:function(skill){ checkViceSkill:function(skill){
return game.expandSkills(lib.character[this.name2][3].slice(0)).contains(skill); if(game.expandSkills(lib.character[this.name2][3].slice(0)).contains(skill)){
return true;
}
else{
this.disableSkill(skill,skill);
this.awakenedSkills.add(skill);
return false;
}
}, },
hasMainSkill:function(skill){ checkMainSkill:function(skill){
return game.expandSkills(lib.character[this.name1][3].slice(0)).contains(skill); if(game.expandSkills(lib.character[this.name1][3].slice(0)).contains(skill)){
return true;
}
else{
this.disableSkill(skill,skill);
this.awakenedSkills.add(skill);
return false;
}
}, },
removeMaxHp:function(){ removeMaxHp:function(){
if(game.online) return; if(game.online) return;
@ -1978,6 +2018,12 @@ mode.guozhan={
} }
},this,'gz_shibing'+(info[0]=='male'?1:2)+info[1],num); },this,'gz_shibing'+(info[0]=='male'?1:2)+info[1],num);
}, },
hasMainCharacter:function(){
return this.name1.indexOf('gz_shibing')!=0;
},
hasViceCharacter:function(){
return this.name2.indexOf('gz_shibing')!=0;
},
showCharacter:function(num,log){ showCharacter:function(num,log){
if(num==0&&!this.isUnseen(0)){ if(num==0&&!this.isUnseen(0)){
return; return;