Merge pull request #242 from mengxinzxz/PR-Branch

段颎+优化+小修复
This commit is contained in:
Spmario233 2023-08-28 23:34:30 +08:00 committed by GitHub
commit 7fc67d5757
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 198 additions and 4 deletions

BIN
audio/die/duanjiong.mp3 Normal file

Binary file not shown.

BIN
audio/skill/olsaogu1.mp3 Normal file

Binary file not shown.

BIN
audio/skill/olsaogu2.mp3 Normal file

Binary file not shown.

View File

@ -43,6 +43,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
locked:true,
content:function(){
'step 0'
player.unmarkSkill('clanyuzhi');
var num1=0,num2=0,num3=0,bool=true;
var history=player.actionHistory;
for(var i=history.length-2;i>=0;i--){
@ -92,7 +93,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player.storage.clanyuzhi=lib.skill.dcweidang.getLength(result.cards[0]);
player.markSkill('clanyuzhi');
}
else player.unmarkSkill('clanyuzhi');
},
ai:{
threaten:3,
@ -1934,11 +1934,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player.hasCard(card=>get.suit(card)==get.suit(event.card)&&player.canRecast(card),'h');
},
content:function(){
'step 0'
if(trigger.targets&&trigger.targets.length==1){
trigger.targets[0].link(true);
}
var cards=player.getCards('h',card=>get.suit(card)==get.suit(trigger.card)&&player.canRecast(card));
if(cards.length>0) player.recast(cards);
'step 1'
player.draw();
}
},
clanhuanyin:{

View File

@ -10,10 +10,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
sp_tianzhu:["wutugu","yanbaihu","shamoke","panfeng","zhugedan",'huangzu','gaogan',"tadun","fanjiangzhangda","ahuinan","dongtuna"],
sp_nvshi:["lingju","guanyinping","zhangxingcai","mayunlu","dongbai","zhaoxiang",'ol_zhangchangpu','ol_xinxianying',"daxiaoqiao","jin_guohuai"],
sp_shaowei:["simahui","zhangbao","zhanglu","zhugeguo","xujing","zhangling",'huangchengyan','zhangzhi','lushi'],
sp_huben:["caohong","xiahouba","zhugeke","zumao","wenpin","litong","mazhong","heqi","quyi","luzhi","zangba","yuejin","dingfeng","wuyan","ol_zhuling","tianyu","huojun",'zhaoyǎn','dengzhong','ol_furong','macheng','ol_zhangyì','ol_zhujun','maxiumatie','luoxian','ol_wenqin'],
sp_huben:['duanjiong','ol_mengda',"caohong","xiahouba","zhugeke","zumao","wenpin","litong","mazhong","heqi","quyi","luzhi","zangba","yuejin","dingfeng","wuyan","ol_zhuling","tianyu","huojun",'zhaoyǎn','dengzhong','ol_furong','macheng','ol_zhangyì','ol_zhujun','maxiumatie','luoxian','ol_wenqin'],
sp_liesi:['mizhu','weizi','ol_liuba','zhangshiping'],
sp_default:["sp_diaochan","sp_zhaoyun","sp_sunshangxiang","sp_caoren","sp_jiangwei","sp_machao","sp_caiwenji","jsp_guanyu","jsp_huangyueying","sp_pangde","sp_jiaxu","yuanshu",'sp_zhangliao','sp_ol_zhanghe','sp_menghuo','ol_puyuan','ol_wenqin'],
sp_waitforsort:['ol_huban','ol_mengda','haopu'],
sp_waitforsort:['ol_huban','haopu'],
sp_qifu:["caoying",'panshu',"caochun","yuantanyuanshang",'caoshuang','wolongfengchu','guansuo','baosanniang','fengfangnv','jin_zhouchu'],
sp_wanglang:['ol_wanglang'],
sp_zhongdan:["cuiyan","huangfusong"],
@ -28,6 +28,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
},
character:{
duanjiong:['male','qun',4,['olsaogu']],
ol_zhouqun:['male','shu',4,['oltianhou','olchenshuo']],
ol_wenqin:['male','wei',4,['olguangao','olhuiqi']],
haopu:['male','shu',4,['olzhenying']],
@ -191,6 +192,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
//kaisa:["male","western",4,["zhengfu"]],
},
characterIntro:{
duanjiong:'段颎179年字纪明武威姑臧今甘肃省武威市人。东汉名将西域都护段会宗从曾孙与皇甫规字威明、张奂字然明并称“凉州三明”。段颎少时学习骑射有文武智略最初被举为孝廉为宪陵园丞、阳陵令有治理之才。汉桓帝时入军旅先破鲜卑后讨平东郭窦、公孙举起事以功封列侯。延熹二年159年起戍边征战十余年百战羌人至永康元年167年平定西羌建宁二年169年平定东羌前后斩东西羌六万余级。累功封新丰县侯。建宁三年170年段颎被征入朝历任侍中、执金吾、河南尹、司隶校尉等职他党附宦官、捕杀太学生因而得保富贵两度出任太尉。光和二年179年权宦王甫罪行被揭发段颎受牵连下狱其后在狱中饮鸩而死。',
haopu:'郝普字子太义阳治所在今湖北枣阳东南人。刘备入川后郝普为零陵太守。建安二十年215年吴将吕蒙进攻荆州三郡唯有郝普坚守待援。但援兵久久不至其挚友邓玄之又被吕蒙所骗郝普也因此上当投降吴国。湘水划界后郝普回归刘备。建安二十四年219年吕蒙再次袭击荆州击败关羽郝普再次投降最终归顺吴国并官至廷尉。郝普与隐蕃亲善隐蕃蓄谋叛变事情败露他受到牵连因此自杀。在刘备集团的5个荆州郡守中郝普是唯一一个抵抗过东吴的荆州郡守。',
ol_zhanghe:'字儁乂河间鄚人。三国时期魏国名将。官渡之战时本为袁绍部将的张郃投降了曹操并在曹操帐下多立功勋于曹魏建立后加封为征西车骑将军。诸葛亮六出祁山之间张郃多次抵御蜀军的进攻于公元231年在木门道被诸葛亮设伏射死。后谥曰壮侯。为曹魏“五子良将”之一。',
zhangshiping:'张世平是东汉末期的中山商人,曾与苏双同路,资助刘备组织武装、建立政权。于《三国演义》第一回出场,刘关张桃园三结义时资助刘备良马五十匹,金银五百两,镔铁一千斤。刘备所使用的“双股剑”、关羽所使用的“青龙偃月刀(又名‘冷艳锯’)”、张飞所使用的“丈八点钢矛(又名‘丈八蛇矛’)”皆由这一千斤上好镔铁打造而成。',
@ -688,6 +690,188 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
},
skill:{
//段颎
olsaogu:{
audio:2,
zhuanhuanji:true,
mark:true,
marktext:'☯',
intro:{
content:function(storage){
if(storage) return '转换技。①出牌阶段,你可以摸一张牌。②结束阶段,你可以弃置一张牌,令一名其他角色摸一张牌。';
return '转换技。①出牌阶段,你可以弃置两张牌(不能包含你本阶段弃置过的花色),然后使用其中的【杀】。②结束阶段,你可以弃置一张牌,令一名其他角色弃置两张牌,然后其使用弃置的【杀】。';
},
},
onChooseToUse:function(event){
if(!game.online&&!event.olsaogu){
var list=[],player=event.player;
var evtx=event.getParent('phaseUse');
player.getHistory('lose',evt=>{
if(evt.type=='discard'&&evt.getParent('phaseUse')==evtx) list.addArray(evt.cards2);
});
event.set('olsaogu',list);
}
},
enable:'phaseUse',
filter:function(event,player){
var storage=player.storage.olsaogu;
if(storage) return true;
return player.getDiscardableCards(player,'he').filter(card=>{
if(event.olsaogu&&event.olsaogu.some(cardx=>get.suit(cardx,false)==get.suit(card,player))) return false;
return true;
}).length>1;
},
filterCard:function(card,player){
if(player.storage.olsaogu) return false;
if(_status.event.olsaogu&&_status.event.olsaogu.some(cardx=>get.suit(cardx,false)==get.suit(card,player))) return false;
return true;
},
selectCard:function(){
var player=_status.event.player;
return player.storage.olsaogu?-1:2;
},
position:'he',
check:function(card){
var player=_status.event.player;
if(card.name=='sha') return player.hasValueTarget(card)?10:0.001;
return 6-get.value(card);
},
prompt:function(){
var player=_status.event.player;
var storage=player.storage.olsaogu;
return storage?'摸一张牌':'弃置两张牌(不能包含你本阶段弃置过的花色),然后使用其中的【杀】';
},
content:function(){
player.changeZhuanhuanji('olsaogu');
if(!cards.length) player.draw();
else{
var cardx=cards.filter(card=>card.name=='sha');
if(cardx.length){
var next=game.createEvent('olsaogu_chooseToUseSha');
next.player=player;
next.cards=cardx;
next.setContent(lib.skill.olsaogu.chooseToUseSha);
}
}
},
ai:{
order:function(item,player){
return get.order({name:'sha'},player)-0.2;
},
result:{
player:function(player){
var storage=player.storage.olsaogu;
if(storage) return 1;
if(player.getDiscardableCards(player,'he').filter(card=>{
if(card.name!='sha') return false;
if(_status.event.olsaogu&&_status.event.olsaogu.some(cardx=>get.suit(cardx,false)==get.suit(card,player))) return false;
return true;
}).length) return 1;
return 0;
},
},
},
group:'olsaogu_effect',
subSkill:{
effect:{
trigger:{player:'phaseJieshuBegin'},
filter:function(event,player){
if(_status.connectMode) return player.countCards('he');
return player.countDiscardableCards(player,'he');
},
direct:true,
content:function(){
'step 0'
var str,storage=player.storage.olsaogu;
if(storage) str='弃置一张牌,令一名其他角色摸一张牌。';
else str='弃置一张牌,令一名其他角色弃置两张牌,然后其使用弃置的【杀】。';
player.chooseCardTarget({
prompt:get.prompt('olsaogu'),
prompt2:str,
filterTarget:function(card,player,target){
return player!=target&&target.countCards('he')>1;
},
filterCard:lib.filter.cardDiscardable,
position:'he',
ai1:function(card){
return 5-get.value(card);
},
ai2:function(target){
var player=_status.event.player;
var att=get.attitude(player,target);
var storage=player.storage.olsaogu;
if(storage) return att;
var cards=target.getCards('he',card=>{
if(card.name!='sha') return false;
return lib.filter.cardDiscardable(card,target)&&game.hasPlayer(function(current){
if(!current.canUse(card,target,false)) return false;
return get.effect(current,card,target,target)>0&&get.effect(current,card,target,player)>0;
});
});
if(cards.length&&att>0) return Math.sqrt(Math.min(2,cards.length))*cards.reduce(function(num,card){
var players=game.filterPlayer(current=>target.canUse(card,current,false));
players.sort((a,b)=>get.effect(b,card,target,target)*get.effect(b,card,target,player)-get.effect(a,card,target,target)*get.effect(a,card,target,player));
return num=(get.effect(players[0],card,target,target)*get.effect(players[0],card,target,player));
},0);
return get.effect(target,{name:'guohe_copy2'},player,player)*Math.sqrt(Math.min(2,target.countDiscardableCards(player,'he')));
},
});
'step 1'
if(result.bool){
var cards=result.cards,target=result.targets[0];
player.logSkill('olsaogu',target);
player.discard(cards);
if(player.storage.olsaogu){
target.draw();
event.finish();
}
else{
event.target=target;
target.chooseToDiscard(2,'he','扫谷:弃置两张牌,然后使用其中的【杀】',true).set('ai',function(card){
var player=_status.event.player;
if(card.name=='sha'&&player.hasValueTarget(card)) return 10;
return -get.value(card);
});
}
}
else event.finish();
'step 2'
if(result.bool){
var cards=result.cards.filter(card=>card.name=='sha');
if(cards.length){
var next=game.createEvent('olsaogu_chooseToUseSha');
next.player=target;
next.cards=cards;
next.setContent(lib.skill.olsaogu.chooseToUseSha);
}
}
},
},
},
chooseToUseSha:function(){
'step 0'
event.cards2=cards.filter(i=>get.position(i,true)=='d'&&player.hasUseTarget(i));
if(!event.cards2.length) event.finish();
'step 1'
if(event.cards2.length==1) event._result={bool:true,links:event.cards2};
else player.chooseButton(['扫谷:请使用其中的【杀】',event.cards2],true).set('filterButton',button=>{
return _status.event.player.hasUseTarget(button.link,false);
}).set('ai',button=>{
return _status.event.player.getUseValue(button.link);
});
'step 2'
if(result.bool){
var card=result.links[0];
event.cards2.remove(card);
player.$gain2(card,false);
game.delayx();
player.chooseUseTarget(true,card,false);
}
else event.finish();
'step 3'
if(event.cards2.length) event.goto(1);
},
},
//OL周群
oltianhou:{
audio:2,
@ -22820,7 +23004,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
luochong:function(player){
var storage=player.getStorage('luochong');
var str='准备阶段开始时/当你受到伤害后,你可选择本轮内未选择过的一项(每名角色每轮限选一次):'
var str='准备阶段开始时/当你于一回合首次受到伤害后,你可选择本轮内未选择过的一项(每名角色每轮限选一次):'
var choiceList=[
'⒈令一名角色回复1点体力。',
'⒉令一名角色失去1点体力。',
@ -22866,6 +23050,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if(player.storage.olmiuyan) return '转换技。你可以将一张黑色牌当做【火攻】使用。然后若此技能:处于阳状态且此牌造成了伤害,则你获得此阶段内所有被展示过的牌;<span class="bluetext">处于阴状态且未造成伤害,则你令此技能失效直到本轮结束。</span>';
return '转换技。你可以将一张黑色牌当做【火攻】使用。然后若此技能:<span class="bluetext">处于阳状态且此牌造成了伤害,则你获得此阶段内所有被展示过的牌;</span>处于阴状态且未造成伤害,则你令此技能失效直到本轮结束。';
},
olsaogu:function(player){
if(player.storage.olsaogu) return '转换技。①出牌阶段。阴:你可以弃置两张牌(不能包含你本阶段弃置过的花色),然后使用其中的【杀】;<span class="bluetext">阳:你可以摸一张牌</span>。②结束阶段,你可以弃置一张牌,令一名其他角色执行你当前〖扫谷①〗的分支。';
return '转换技。①出牌阶段。<span class="bluetext">阴:你可以弃置两张牌(不能包含你本阶段弃置过的花色),然后使用其中的【杀】</span>;阳:你可以摸一张牌。②结束阶段,你可以弃置一张牌,令一名其他角色执行你当前〖扫谷①〗的分支。';
},
},
characterReplace:{
caoshuang:['caoshuang','ns_caoshuang'],
@ -24024,6 +24212,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
oltianhou_club_info:'锁定技。其他角色的结束阶段开始时若其体力值为全场最小则其失去1点体力。',
oltianhou_diamond:'凝雾',
oltianhou_diamond_info:'锁定技。其他角色使用【杀】指定与其座次不相邻唯一目标时,则其判定。若判定结果的点数大于此【杀】,则此【杀】对其无效。',
duanjiong:'段颎',
olsaogu:'扫谷',
olsaogu_info:'转换技。①出牌阶段。阴:你可以弃置两张牌(不能包含你本阶段弃置过的花色),然后使用其中的【杀】;阳:你可以摸一张牌。②结束阶段,你可以弃置一张牌,令一名其他角色执行你当前〖扫谷①〗的分支。',
sp_tianji:'天极·皇室宗亲',
sp_sibi:'四弼·辅国文曲',

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB