Merge pull request #184 from mengxinzxz/PR-Branch

国战诸多武将bug修复
This commit is contained in:
Spmario233 2023-07-31 23:24:42 +08:00 committed by GitHub
commit d18ffacaf6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 210 additions and 222 deletions

View File

@ -9729,7 +9729,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
olzhiba3:{}, olzhiba3:{},
rehuashen:{ rehuashen:{
//mode:['identity','single','doudizhu'],
audio:2, audio:2,
unique:true, unique:true,
direct:true, direct:true,
@ -9753,7 +9752,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}); });
event.aiChoice=skills[0]; event.aiChoice=skills[0];
var choice='更换技能'; var choice='更换技能';
if(event.aiChoice==player.storage.rehuashen.current2||get.skillRank(event.aiChoice,cond)<1) choice='弃置化身'; if(event.aiChoice==player.storage.rehuashen.current2||get.skillRank(event.aiChoice,cond)<1) choice='制衡化身';
if(player.isOnline2()){ if(player.isOnline2()){
player.send(function(cards,id){ player.send(function(cards,id){
var dialog=ui.create.dialog('是否发动【化身】?',[cards,'character']); var dialog=ui.create.dialog('是否发动【化身】?',[cards,'character']);
@ -9766,7 +9765,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
event.dialog.style.display='none'; event.dialog.style.display='none';
} }
if(event.triggername=='rehuashen') event._result={control:'更换技能'}; if(event.triggername=='rehuashen') event._result={control:'更换技能'};
else player.chooseControl('弃置化身','更换技能','cancel2').set('ai',function(){ else player.chooseControl('制衡化身','更换技能','cancel2').set('ai',function(){
return _status.event.choice; return _status.event.choice;
}).set('choice',choice); }).set('choice',choice);
"step 1" "step 1"
@ -9784,7 +9783,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
} }
if(!event.logged){player.logSkill('rehuashen');event.logged=true} if(!event.logged){player.logSkill('rehuashen');event.logged=true}
var next=player.chooseButton(true).set('dialog',event.videoId); var next=player.chooseButton(true).set('dialog',event.videoId);
if(event.control=='弃置化身'){ if(event.control=='制衡化身'){
next.set('selectButton',[1,2]); next.set('selectButton',[1,2]);
next.set('filterButton',function(button){ next.set('filterButton',function(button){
return button.link!=_status.event.current; return button.link!=_status.event.current;
@ -9797,7 +9796,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}); });
next.set('choice',event.aiChoice); next.set('choice',event.aiChoice);
} }
var prompt=event.control=='弃置化身'?'选择弃置至多两张化身':'选择要切换的化身'; var prompt=event.control=='制衡化身'?'选择制衡至多两张化身':'选择要切换的化身';
var func=function(id,prompt){ var func=function(id,prompt){
var dialog=get.idDialog(id); var dialog=get.idDialog(id);
if(dialog){ if(dialog){
@ -9811,7 +9810,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
func(event.videoId,prompt); func(event.videoId,prompt);
} }
"step 2" "step 2"
if(result.bool&&event.control!='弃置化身'){ if(result.bool&&event.control!='制衡化身'){
event.card=result.links[0]; event.card=result.links[0];
var func=function(card,id){ var func=function(card,id){
var dialog=get.idDialog(id); var dialog=get.idDialog(id);
@ -9871,22 +9870,21 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if(!_status.noclearcountdown){ if(!_status.noclearcountdown){
game.stopCountChoose(); game.stopCountChoose();
} }
if(event.control=='弃置化身') return; if(event.control=='制衡化身') return;
if(player.storage.rehuashen.current!=event.card){ if(player.storage.rehuashen.current!=event.card){
player.storage.rehuashen.current=event.card; player.storage.rehuashen.current=event.card;
game.broadcastAll(function(character,player){ game.broadcastAll(function(player,sex){
player.sex=lib.character[character][0]; player.sex=sex;
//player.group=lib.character[character][1]; game.log(player,'将性别变为了','#y'+get.translation(sex)+'性');
//player.node.name.dataset.nature=get.groupnature(player.group); },player,lib.character[event.card][0]);
},event.card,player); player.changeGroup(lib.character[event.card][1]);
player.changeGroup(lib.character[event.card][1],false);
} }
var link=result.control; var link=result.control;
player.storage.rehuashen.current2=link; player.storage.rehuashen.current2=link;
if(!player.additionalSkills.rehuashen||!player.additionalSkills.rehuashen.contains(link)){ if(!player.additionalSkills.rehuashen||!player.additionalSkills.rehuashen.contains(link)){
player.addAdditionalSkill('rehuashen',link); player.addAdditionalSkill('rehuashen',link);
player.flashAvatar('rehuashen',event.card); player.flashAvatar('rehuashen',event.card);
game.log(player,'获得技能','#g【'+get.translation(link)+'】'); game.log(player,'获得技能','#g【'+get.translation(link)+'】');
player.popup(link); player.popup(link);
player.syncStorage('rehuashen'); player.syncStorage('rehuashen');
player.updateMarks('rehuashen'); player.updateMarks('rehuashen');
@ -9903,31 +9901,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player:['phaseBegin','phaseEnd','rehuashen'], player:['phaseBegin','phaseEnd','rehuashen'],
}, },
filter:function(event,player,name){ filter:function(event,player,name){
//if(name=='phaseBegin'&&game.phaseNumber==1) return false;
return player.storage.rehuashen&&player.storage.rehuashen.character.length>0; return player.storage.rehuashen&&player.storage.rehuashen.character.length>0;
}, },
banned:['lisu','sp_xiahoudun','xushao','zhoutai','old_zhoutai'], banned:['lisu','sp_xiahoudun','xushao','zhoutai','old_zhoutai','shixie'],
addHuashen:function(player){ addHuashen:function(player){
if(!player.storage.rehuashen) return; if(!player.storage.rehuashen) return;
if(!_status.characterlist){ if(!_status.characterlist){
if(_status.connectMode) var list=get.charactersOL(); lib.skill.pingjian.initList();
else{
var list=[];
for(var i in lib.character){
if(lib.filter.characterDisabled2(i)||lib.filter.characterDisabled(i)) continue;
list.push(i);
}
}
game.countPlayer(function(current){
list.remove(current.name);
list.remove(current.name1);
list.remove(current.name2);
if(current.storage.huashen&&current.storage.huashen.owned){
for(var i in current.storage.huashen.owned) list.removeArray(current.storage.huashen.owned[i]);
}
if(current.storage.rehuashen&&current.storage.rehuashen.character) list.removeArray(current.storage.rehuashen.character)
});
_status.characterlist=list;
} }
_status.characterlist.randomSort(); _status.characterlist.randomSort();
var bool=false; var bool=false;

View File

@ -4255,24 +4255,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
addHuashen:function(player){ addHuashen:function(player){
if(!player.storage.huashen) return; if(!player.storage.huashen) return;
if(!_status.characterlist){ if(!_status.characterlist){
if(_status.connectMode) var list=get.charactersOL(); lib.skill.pingjian.initList();
else{
var list=[];
for(var i in lib.character){
if(lib.filter.characterDisabled2(i)||lib.filter.characterDisabled(i)) continue;
list.push(i);
}
}
game.countPlayer(function(current){
list.remove(current.name);
list.remove(current.name1);
list.remove(current.name2);
if(current.storage.huashen&&current.storage.huashen.owned){
for(var i in current.storage.huashen.owned) list.removeArray(current.storage.huashen.owned[i]);
}
if(current.storage.rehuashen&&current.storage.rehuashen.character) list.removeArray(current.storage.rehuashen.character)
});
_status.characterlist=list;
} }
_status.characterlist.randomSort(); _status.characterlist.randomSort();
var bool=false; var bool=false;
@ -4495,6 +4478,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player.markSkill('huashen'); player.markSkill('huashen');
game.broadcastAll(function(character,player){ game.broadcastAll(function(character,player){
player.sex=lib.character[character][0]; player.sex=lib.character[character][0];
game.log(player,'将性别变为了','#y'+get.translation(lib.character[character][0])+'性');
//player.group=lib.character[character][1]; //player.group=lib.character[character][1];
//player.node.name.dataset.nature=get.groupnature(player.group); //player.node.name.dataset.nature=get.groupnature(player.group);
var mark=player.marks.huashen; var mark=player.marks.huashen;
@ -4514,7 +4498,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},200); },200);
} }
},character,player); },character,player);
player.changeGroup(lib.character[character][1],false); player.changeGroup(lib.character[character][1]);
} }
player.storage.huashen.current2=skill; player.storage.huashen.current2=skill;
if(!player.additionalSkills.huashen||!player.additionalSkills.huashen.contains(skill)){ if(!player.additionalSkills.huashen||!player.additionalSkills.huashen.contains(skill)){

View File

@ -7917,49 +7917,54 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
}, },
pingjian:{ pingjian:{
audio:2,
trigger:{
player:['damageEnd','phaseJieshuBegin'],
},
initList:function(){ initList:function(){
var list=[]; var list=[];
if(_status.connectMode) var list=get.charactersOL(); if(_status.connectMode) list=get.charactersOL();
else{ else{
var list=[]; var list=[];
for(var i in lib.character){ for(var i in lib.character){
if(lib.filter.characterDisabled2(i)||lib.filter.characterDisabled(i)) continue; if(!lib.filter.characterDisabled2(i)&&!lib.filter.characterDisabled(i)) list.push(i);
list.push(i);
} }
} }
game.countPlayer2(function(current){ game.countPlayer2(function(current){
list.remove(current.name); list.remove(current.name);
list.remove(current.name1); list.remove(current.name1);
list.remove(current.name2); list.remove(current.name2);
if(current.storage.rehuashen&&current.storage.rehuashen.character) list.removeArray(current.storage.rehuashen.character)
}); });
_status.characterlist=list; _status.characterlist=list;
}, },
init:function(player){
player.addSkill('pingjian_check');
if(!player.storage.pingjian_check) player.storage.pingjian_check={};
},
onremove:function(player){
player.removeSkill('pingjian_check');
},
audio:2,
trigger:{player:['damageEnd','phaseJieshuBegin']},
frequent:true, frequent:true,
content:function(){ content:function(){
'step 0' 'step 0'
if(!player.storage.pingjian) player.storage.pingjian=[];
event._result={bool:true};
'step 1'
if(result.bool){
if(!_status.characterlist){ if(!_status.characterlist){
lib.skill.pingjian.initList(); lib.skill.pingjian.initList();
} }
var allList=_status.characterlist.slice(0);
game.countPlayer(function(current){
allList.add(current.name);
allList.add(current.name1);
allList.add(current.name2);
});
var list=[]; var list=[];
var skills=[]; var skills=[];
var map=[]; var map=[];
_status.characterlist.randomSort(); allList.randomSort();
var name2=event.triggername; var name2=event.triggername;
for(var i=0;i<_status.characterlist.length;i++){ for(var i=0;i<allList.length;i++){
var name=_status.characterlist[i]; var name=allList[i];
if(name.indexOf('zuoci')!=-1||name.indexOf('xushao')!=-1) continue; if(name.indexOf('zuoci')!=-1||name.indexOf('xushao')!=-1) continue;
var skills2=lib.character[name][3]; var skills2=lib.character[name][3];
for(var j=0;j<skills2.length;j++){ for(var j=0;j<skills2.length;j++){
if(player.storage.pingjian.contains(skills2[j])) continue; if(player.getStorage('pingjian').contains(skills2[j])) continue;
if(skills.contains(skills2[j])){ if(skills.contains(skills2[j])){
list.add(name); list.add(name);
if(!map[name]) map[name]=[]; if(!map[name]) map[name]=[];
@ -7973,7 +7978,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
var info=lib.skill[list2[k]]; var info=lib.skill[list2[k]];
if(!info||!info.trigger||!info.trigger.player||info.silent||info.limited||info.juexingji||info.zhuanhuanji||info.hiddenSkill||info.dutySkill) continue; if(!info||!info.trigger||!info.trigger.player||info.silent||info.limited||info.juexingji||info.zhuanhuanji||info.hiddenSkill||info.dutySkill) continue;
if(info.trigger.player==name2||Array.isArray(info.trigger.player)&&info.trigger.player.contains(name2)){ if(info.trigger.player==name2||Array.isArray(info.trigger.player)&&info.trigger.player.contains(name2)){
if(info.init||info.ai&&(info.ai.combo||info.ai.notemp||info.ai.neg)) continue; if(info.ai&&(info.ai.combo||info.ai.notemp||info.ai.neg)) continue;
if(info.init) info.init(player,list2[k]);
if(info.filter){ if(info.filter){
try{ try{
var bool=info.filter(trigger,player,name2); var bool=info.filter(trigger,player,name2);
@ -7993,52 +7999,49 @@ game.import('character',function(lib,game,ui,get,ai,_status){
} }
if(list.length>2) break; if(list.length>2) break;
} }
if(!skills.length){ if(skills.length) player.chooseControl(skills).set('dialog',['评鉴:请选择尝试发动的技能',[list,'character']]);
//player.draw();
event.finish();
}
else{
//skills.unshift('摸一张牌');
player.chooseControl(skills).set('dialog',['请选择要发动的技能',[list,'character']]).set('ai',function(){return 0});
}
}
else event.finish(); else event.finish();
'step 2' 'step 1'
if(result.control=='摸一张牌'){ player.markAuto('pingjian',[result.control]);
player.draw(); player.addTempSkill(result.control);
return; player.storage.pingjian_check[result.control]=(trigger.name=='damage'?trigger:'phaseJieshu');
if(trigger.name=='damage'){
var info=lib.translate[result.control+'_info'];
if(info&&info.indexOf('1点伤害')+info.indexOf('一点伤害')!=-2) trigger.num=1;//暂时想到的让多点伤害只执行一次的拙见
} }
player.storage.pingjian.add(result.control);
player.addTempSkill(result.control,event.triggername=='damageEnd'?'damageAfter':'phaseJieshu');
}, },
group:'pingjian_use', group:'pingjian_use',
phaseUse_special:['xinfu_lingren'], phaseUse_special:[],
ai:{threaten:5},
}, },
pingjian_use:{ pingjian_use:{
audio:'pingjian', audio:'pingjian',
enable:'phaseUse', enable:'phaseUse',
usable:1, usable:1,
position:'he', prompt:()=>lib.translate.pingjian_info,
content:function(){ content:function(){
'step 0' 'step 0'
if(!player.storage.pingjian) player.storage.pingjian=[];
event._result={bool:true};
'step 1'
if(result.bool){
var list=[]; var list=[];
var skills=[]; var skills=[];
var map=[]; var map=[];
if(!_status.characterlist){ if(!_status.characterlist){
lib.skill.pingjian.initList(); lib.skill.pingjian.initList();
} }
_status.characterlist.randomSort(); var allList=_status.characterlist.slice(0);
for(var i=0;i<_status.characterlist.length;i++){ game.countPlayer(function(current){
var name=_status.characterlist[i]; allList.add(current.name);
allList.add(current.name1);
allList.add(current.name2);
});
allList.randomSort();
for(var i=0;i<allList.length;i++){
var name=allList[i];
if(name.indexOf('zuoci')!=-1||name.indexOf('xushao')!=-1) continue; if(name.indexOf('zuoci')!=-1||name.indexOf('xushao')!=-1) continue;
var skills2=lib.character[name][3]; var skills2=lib.character[name][3];
for(var j=0;j<skills2.length;j++){ for(var j=0;j<skills2.length;j++){
if(player.storage.pingjian.contains(skills2[j])) continue; if(player.getStorage('pingjian').contains(skills2[j])) continue;
if(skills.contains(skills2[j])||lib.skill.pingjian.phaseUse_special.contains(skills2[j])){ var info=lib.translate[skills2[j]+'_info'];
if(skills.contains(skills2[j])||(info&&info.indexOf('当你于出牌阶段')!=-1)){
list.add(name); list.add(name);
if(!map[name]) map[name]=[]; if(!map[name]) map[name]=[];
map[name].push(skills2[j]); map[name].push(skills2[j]);
@ -8049,18 +8052,25 @@ game.import('character',function(lib,game,ui,get,ai,_status){
game.expandSkills(list2); game.expandSkills(list2);
for(var k=0;k<list2.length;k++){ for(var k=0;k<list2.length;k++){
var info=lib.skill[list2[k]]; var info=lib.skill[list2[k]];
if(!info||!info.enable||info.viewAs||info.limited||info.juexingji||info.zhuanhuanji||info.hiddenSkill||info.dutySkill) continue; if(!info||!info.enable||info.charlotte||info.limited||info.juexingji||info.zhuanhuanji||info.hiddenSkill||info.dutySkill) continue;
if(info.enable=='phaseUse'||Array.isArray(info.enable)&&info.enable.contains('phaseUse')){ if((info.enable=='phaseUse'||(Array.isArray(info.enable)&&info.enable.contains('phaseUse')))||(info.enable=='chooseToUse'||(Array.isArray(info.enable)&&info.enable.contains('chooseToUse')))){
if(info.init||info.onChooseToUse||info.ai&&(info.ai.combo||info.ai.notemp||info.ai.neg)) continue; if(info.ai&&(info.ai.combo||info.ai.notemp||info.ai.neg)) continue;
var evt=event.getParent(2);
if(info.init) info.init(player,list2[k]);
if(info.onChooseToUse) info.onChooseToUse(evt);
if(info.filter){ if(info.filter){
try{ try{
var bool=info.filter(event.getParent(2),player); var bool=info.filter(evt,player);
if(!bool) continue; if(!bool) continue;
} }
catch(e){ catch(e){
continue; continue;
} }
} }
if(info.viewAs&&typeof info.viewAs!='function'){
if(evt.filterCard&&!evt.filterCard(info.viewAs,player,evt)) continue;
if(info.viewAsFilter&&info.viewAsFilter(player)==false) continue;
}
list.add(name); list.add(name);
if(!map[name]) map[name]=[]; if(!map[name]) map[name]=[];
map[name].push(skills2[j]); map[name].push(skills2[j]);
@ -8071,45 +8081,52 @@ game.import('character',function(lib,game,ui,get,ai,_status){
} }
if(list.length>2) break; if(list.length>2) break;
} }
if(!skills.length){ if(skills.length) player.chooseControl(skills).set('dialog',['评鉴:请选择尝试发动的技能',[list,'character']]);
//player.draw();
event.finish();
}
else{
//skills.unshift('摸一张牌');
player.chooseControl(skills).set('dialog',['请选择要发动的技能',[list,'character']]).set('ai',function(){return 0});
}
}
else event.finish(); else event.finish();
'step 2' 'step 1'
if(result.control=='摸一张牌'){ player.markAuto('pingjian',[result.control]);
player.draw(); player.addTempSkill(result.control);
return; player.storage.pingjian_check[result.control]='phaseUse';
}
player.storage.pingjian.add(result.control);
player.addTempSkill(result.control,'phaseUseEnd');
player.addTempSkill('pingjian_temp','phaseUseEnd');
player.storage.pingjian_temp=result.control;
//event.getParent(2).goto(0);
}, },
ai:{order:10,result:{player:1}}, ai:{order:12,result:{player:1}},
}, },
pingjian_temp:{ pingjian_check:{
onremove:true, charlotte:true,
trigger:{player:['useSkillBegin','useCard1']}, trigger:{player:['useSkill','logSkillBegin']},
silent:true,
firstDo:true,
filter:function(event,player){ filter:function(event,player){
var info=lib.skill[event.skill]; if(get.info(event.skill).charlotte) return false;
if(!info) return false; var skill=event.sourceSkill||event.skill;
if(event.skill==player.storage.pingjian_temp) return true; return player.storage.pingjian_check[skill];
if(info.sourceSkill==player.storage.pingjian_temp||info.group==player.storage.pingjian_temp) return true;
if(Array.isArray(info.group)&&info.group.contains(player.storage.pingjian_temp)) return true;
return false;
}, },
direct:true,
firstDo:true,
priority:Infinity,
content:function(){ content:function(){
player.removeSkill(player.storage.pingjian_temp); var skill=trigger.sourceSkill||trigger.skill;
player.removeSkill('pingjian_temp'); player.removeSkill(skill);
delete player.storage.pingjian_check[skill];
},
group:'pingjian_check2',
},
pingjian_check2:{
charlotte:true,
trigger:{player:['phaseUseEnd','damageEnd','phaseJieshuBegin']},
filter:function(event,player){
return Object.keys(player.storage.pingjian_check).find(function(skill){
if(event.name!='damage') return player.storage.pingjian_check[skill]==event.name;
return player.storage.pingjian_check[skill]==event;
});
},
direct:true,
lastDo:true,
priority:-Infinity,
content:function(){
var skills=Object.keys(player.storage.pingjian_check).filter(function(skill){
if(trigger.name!='damage') return player.storage.pingjian_check[skill]==trigger.name;
return player.storage.pingjian_check[skill]==trigger;
});
player.removeSkill(skills);
for(var skill of skills) delete player.storage.pingjian_check[skill];
}, },
}, },
//上兵伐谋 //上兵伐谋
@ -10122,8 +10139,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
xugong:"许贡", xugong:"许贡",
zhangchangpu:"张昌蒲", zhangchangpu:"张昌蒲",
pingjian:'评荐', pingjian:'评荐',
pingjian_info:'结束阶段开始时/当你受到伤害后/出牌阶段限一次,你可以令系统随机从剩余武将牌堆中检索出三张拥有发动时机为结束阶段开始时/当你受到伤害后/出牌阶段的技能的武将牌。然后你可以选择尝试发动其中一个技能。每个技能每局只能选择一次。',
pingjian_use:'评荐', pingjian_use:'评荐',
pingjian_info:'结束阶段开始时/当你受到伤害后/出牌阶段限一次,你可以令系统随机检索出三张拥有发动时机为结束阶段开始时/当你受到伤害后/出牌阶段的技能的武将牌。然后你可以选择尝试发动其中一个技能。每个技能每局游戏只能选择一次。',
songshu:'颂蜀', songshu:'颂蜀',
songshu_info:'出牌阶段,你可以和其他角色拼点。若你没赢,你与其各摸两张牌,且你本阶段内不能再发动〖颂蜀〗。', songshu_info:'出牌阶段,你可以和其他角色拼点。若你没赢,你与其各摸两张牌,且你本阶段内不能再发动〖颂蜀〗。',

View File

@ -3358,7 +3358,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
}, },
frequent:true, frequent:true,
content:function(){ content:function(){
player.draw(player.getHistory('useCard').length); player.draw(Math.min(player.getHistory('useCard').length,5));
}, },
}, },
gzduannian:{ gzduannian:{
@ -3540,7 +3540,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
target:1, target:1,
}, },
}, },
derivation:['releiji','nhyinbing','nhhuoqi','nhguizhu','nhxianshou','nhlundao','nhguanyue','nhyanzheng'], derivation:['leiji','nhyinbing','nhhuoqi','nhguizhu','nhxianshou','nhlundao','nhguanyue','nhyanzheng'],
subSkill:{ subSkill:{
clear:{ clear:{
onremove:function(player){ onremove:function(player){
@ -3748,24 +3748,29 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
audio:'gzxiongnve', audio:'gzxiongnve',
mark:true, mark:true,
intro:{ intro:{
content:'受到的伤害-1', content:'其他角色对你造成伤害时,此伤害-1',
}, },
trigger:{player:'damageBegin3'}, trigger:{player:'damageBegin3'},
filter:function(event,player){
return event.source&&event.source!=player;
},
forced:true, forced:true,
logTarget:'source',
content:function(){ content:function(){
trigger.num--; trigger.num--;
}, },
ai:{ ai:{
effect:{ effect:{
target:function(card,player,target){ target:function(card,player,target){
if(target==player) return;
if(player.hasSkillTag('jueqing',false,target)) return; if(player.hasSkillTag('jueqing',false,target)) return;
var num=get.tag(card,'damage'); var num=get.tag(card,'damage');
if(num){ if(num){
if(num>1) return 0.5; if(num>1) return 0.5;
return 0; return 0;
} }
} },
} },
}, },
}, },
end:{ end:{
@ -4122,7 +4127,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
}, },
goon:function(){ goon:function(){
var target=trigger.player; var target=trigger.player;
if(player.canUse('tao',target)&&get.effect(target,{name:'tao',isCard:true},player,player)>0) return true; if(get.recoverEffect(target,player,player)>0) return true;
var card={name:'sha',nature:'thunder',isCard:true}; var card={name:'sha',nature:'thunder',isCard:true};
if(game.hasPlayer(function(current){ if(game.hasPlayer(function(current){
return current!=player&&current!=target&&target.canUse(card,current,false)&&get.effect(current,card,target,player)>0; return current!=player&&current!=target&&target.canUse(card,current,false)&&get.effect(current,card,target,player)>0;
@ -4139,7 +4144,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
return current!=target&&current.isFriendOf(target)&&current.isLinked(); return current!=target&&current.isFriendOf(target)&&current.isLinked();
}))?3:1)*(-get.attitude(target,player,player)+1); }))?3:1)*(-get.attitude(target,player,player)+1);
}, },
}).setHiddenSkill(event.name); }).setHiddenSkill('daming');
'step 1' 'step 1'
if(result.bool){ if(result.bool){
var target=result.targets[0]; var target=result.targets[0];
@ -4178,28 +4183,22 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
if(num>0) player.draw(num); if(num>0) player.draw(num);
'step 4' 'step 4'
if(trigger.player.isIn()){ if(trigger.player.isIn()){
var target=trigger.player,tao=(lib.filter.cardEnabled({name:'tao',isCard:true},player,'forceEnable')&&lib.filter.targetEnabled2({name:'tao',isCard:true},player,target)),sha=game.filterPlayer(function(current){ var target=trigger.player,sha=game.filterPlayer(function(current){
return current!=target&&current!=player&&target.canUse({name:'sha',nature:'thunder',isCard:true},current,false); return current!=target&&current!=player&&target.canUse({name:'sha',nature:'thunder',isCard:true},current,false);
}); });
if(sha.length){ if(sha.length){
var next=player.chooseTarget('请选择'+get.translation(target)+'使用雷【杀】的目标',function(card,player,target){ var next=player.chooseTarget('请选择'+get.translation(target)+'使用雷【杀】的目标',function(card,player,target){
return _status.event.list.contains(target); return _status.event.list.contains(target);
}); });
if(tao){ next.set('prompt2','或点「取消」令其回复1点体力');
next.set('prompt2','或点「取消」并视为对其使用【桃】'); next.set('goon',get.recoverEffect(target,player,player));
next.set('goon',get.effect(target,{name:'tao',isCard:true},player,player));
}
else{
next.set('forced',true);
next.set('goon',0);
}
next.set('list',sha); next.set('list',sha);
next.set('ai',function(target){ next.set('ai',function(target){
var player=_status.event.player; var player=_status.event.player;
return get.effect(target,{name:'sha',nature:'thunder',isCard:true},_status.event.getTrigger().player,player)-_status.event.goon; return get.effect(target,{name:'sha',nature:'thunder',isCard:true},_status.event.getTrigger().player,player)-_status.event.goon;
}); });
} }
else if(tao) event._result={bool:false}; else if(target.isDamaged()) event._result={bool:false};
else event.finish(); else event.finish();
} }
else event.finish(); else event.finish();
@ -4213,7 +4212,10 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
} }
trigger.player.useCard({name:'sha',nature:'thunder',isCard:true},target,false).animate=false; trigger.player.useCard({name:'sha',nature:'thunder',isCard:true},target,false).animate=false;
} }
else player.useCard({name:'tao',isCard:true},trigger.player); else{
player.line(trigger.player);
trigger.player.recover();
}
}, },
}, },
xiaoni:{ xiaoni:{
@ -5199,6 +5201,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
}, },
}, },
gzzhuosheng:{ gzzhuosheng:{
audio:'zhuosheng',
trigger:{global:'damageEnd'}, trigger:{global:'damageEnd'},
logTarget:'player', logTarget:'player',
filter:function(event,player){ filter:function(event,player){
@ -5232,6 +5235,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
if(get.itemtype(card)=='card'&&card.hasGaintag('gzzhuosheng2')&&get.type(card)=='basic') return num-0.1; if(get.itemtype(card)=='card'&&card.hasGaintag('gzzhuosheng2')&&get.type(card)=='basic') return num-0.1;
}, },
}, },
audio:'zhuosheng',
trigger:{player:'useCard2'}, trigger:{player:'useCard2'},
direct:true, direct:true,
filterx:function(event,player){ filterx:function(event,player){
@ -5289,7 +5293,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
group:['gzzhuosheng2_equip','gzzhuosheng2_silent'], group:['gzzhuosheng2_equip','gzzhuosheng2_silent'],
subSkill:{ subSkill:{
equip:{ equip:{
audio:'gzzhuosheng2', audio:'zhuosheng',
trigger:{player:'useCard'}, trigger:{player:'useCard'},
filter:function(event,player){ filter:function(event,player){
return get.type(event.card)=='equip'&&lib.skill.gzzhuosheng2.filterx(event,player); return get.type(event.card)=='equip'&&lib.skill.gzzhuosheng2.filterx(event,player);
@ -8086,6 +8090,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
} }
}, },
gzxuanhuo:{ gzxuanhuo:{
audio:'rexuanhuo',
global:'gzxuanhuo_others', global:'gzxuanhuo_others',
derivation:['fz_new_rewusheng','fz_gzpaoxiao','fz_new_longdan','fz_new_tieji','fz_liegong','fz_xinkuanggu'], derivation:['fz_new_rewusheng','fz_gzpaoxiao','fz_new_longdan','fz_new_tieji','fz_liegong','fz_xinkuanggu'],
ai:{ ai:{
@ -8098,6 +8103,8 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
}, },
subSkill:{ subSkill:{
others:{ others:{
audio:'rexuanhuo',
forceaudio:true,
enable:'phaseUse', enable:'phaseUse',
usable:1, usable:1,
filter:function(event,player){ filter:function(event,player){
@ -8293,7 +8300,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
}, },
gzenyuan:{ gzenyuan:{
locked:true, locked:true,
audio:['enyuan',2], audio:'reenyuan',
group:['gzenyuan_gain','gzenyuan_damage'], group:['gzenyuan_gain','gzenyuan_damage'],
preHidden:true, preHidden:true,
ai:{ ai:{
@ -8308,6 +8315,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
}, },
subSkill:{ subSkill:{
gain:{ gain:{
audio:'reenyuan',
trigger:{target:'useCardToTargeted'}, trigger:{target:'useCardToTargeted'},
forced:true, forced:true,
filter:function(event,player){ filter:function(event,player){
@ -8315,9 +8323,9 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
}, },
logTarget:'player', logTarget:'player',
content:function(){trigger.player.draw()}, content:function(){trigger.player.draw()},
audio:'enyuan1',
}, },
damage:{ damage:{
audio:'reenyuan',
trigger:{player:'damageEnd'}, trigger:{player:'damageEnd'},
forced:true, forced:true,
filter:function(event,player){ filter:function(event,player){
@ -8336,7 +8344,6 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
} }
else trigger.source.loseHp(); else trigger.source.loseHp();
}, },
audio:'enyuan2',
}, },
} }
}, },
@ -13718,7 +13725,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
gzzhukou:'逐寇', gzzhukou:'逐寇',
gzzhukou_info:'当你于一名角色的出牌阶段第一次造成伤害后你可以摸X张牌X为本回合你已使用的牌数且至多为5。', gzzhukou_info:'当你于一名角色的出牌阶段第一次造成伤害后你可以摸X张牌X为本回合你已使用的牌数且至多为5。',
gzduannian:'断念', gzduannian:'断念',
gzduannian_info:'出牌阶段结束时,若你有手牌你可以弃置所有手牌,然后将手牌摸至体力上限。', gzduannian_info:'出牌阶段结束时,若你有手牌你可以弃置所有手牌,然后将手牌摸至体力上限。',
gzlianyou:'莲佑', gzlianyou:'莲佑',
gzlianyou_info:'你死亡时,可以选择一名其他角色。该角色获得技能“兴火”。', gzlianyou_info:'你死亡时,可以选择一名其他角色。该角色获得技能“兴火”。',
gzxinghuo:'兴火', gzxinghuo:'兴火',
@ -13742,7 +13749,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
gzfangyuan:'方圆', gzfangyuan:'方圆',
gzfangyuan_info:'阵法技,若你在一个围攻关系中:①是围攻角色,则所有围攻角色的手牌上限+1且被围攻角色手牌上限-1②是被围攻角色则结束阶段开始时你视为对一名围攻角色使用【杀】。', gzfangyuan_info:'阵法技,若你在一个围攻关系中:①是围攻角色,则所有围攻角色的手牌上限+1且被围攻角色手牌上限-1②是被围攻角色则结束阶段开始时你视为对一名围攻角色使用【杀】。',
daming:'达命', daming:'达命',
daming_info:'一名己方角色A的出牌阶段开始时你可弃置一张锦囊牌横置一名角色并摸X张牌X为拥有横置角色的势力数。然后你选择一项视为对A使用一张【桃】②令A视为对由你选择的另一名角色使用一张雷【杀】。', daming_info:'一名己方角色A的出牌阶段开始时你可弃置一张锦囊牌横置一名角色并摸X张牌X为拥有横置角色的势力数。然后你选择一项令A回复1点体力②令A视为对由你选择的另一名角色使用一张雷【杀】。',
xiaoni:'嚣逆', xiaoni:'嚣逆',
xiaoni_info:'锁定技,当你使用牌时,或成为其他角色使用牌的目标后,若场上存在其他己方角色且这些角色的手牌数均不大于你,则目标角色/你不可响应此牌。', xiaoni_info:'锁定技,当你使用牌时,或成为其他角色使用牌的目标后,若场上存在其他己方角色且这些角色的手牌数均不大于你,则目标角色/你不可响应此牌。',
gztongduo:'统度', gztongduo:'统度',