Merge branch 'libccy:PR-Branch' into PR-Branch

This commit is contained in:
157 2023-10-28 15:07:33 +08:00 committed by GitHub
commit ca9eeb4850
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 261 additions and 134 deletions

View File

@ -242,6 +242,17 @@ game.import('card',function(lib,game,ui,get,ai,_status){
target:function(player,target){
if(target.hasSkill('huogong2')||target.countCards('h')==0) return 0;
if(player.countCards('h')<=1) return 0;
if(_status.event.player == player){
if(target.isAllCardsKnown(player)){
if(!target.countCards('h',card=>{
return player.countCards('h',card2=>{
return get.suit(card2) == get.suit(card);
});
})){
return 0;
}
}
}
if(target==player){
if(typeof _status.event.filterCard=='function'&&
_status.event.filterCard({name:'huogong'},player,_status.event)){

View File

@ -696,7 +696,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
});
},
mode:['guozhan'],
global:['g_chiling1','g_chiling2','g_chiling3'],
//global:['g_chiling1','g_chiling2','g_chiling3'],
filterTarget:function(card,player,target){
return target.isUnseen();
},
@ -754,6 +754,27 @@ game.import('card',function(lib,game,ui,get,ai,_status){
}
target.draw();
},
destroy:function(card,targetPosition,player,event){
if(event.name!='lose'||event.name!='cardsDiscard'||targetPosition!='discardPile') return false;
var evt=event.getParent().relatedEvent;
if(evt&&evt.name=='useCard') return false;
return true;
},
onDestroy:function(){
var currentPhase=_status.currentPhase;
if(currentPhase){
_status.chiling=true;
currentPhase.addTempSkill('g_chiling3');
}
if(!lib.inpile.contains('zhaoshu')){
lib.inpile.push('zhaoshu');
var card=game.createCard2('zhaoshu','club',3);
game.log(card,'被置于了牌堆底');
ui.cardPile.appendChild(card);
game.updateRoundNumber();
}
},
ai:{
order:6,
result:{
@ -1570,50 +1591,9 @@ game.import('card',function(lib,game,ui,get,ai,_status){
}
},
},
g_chiling1:{
mode:['guozhan'],
trigger:{
player:'loseEnd',
global:'cardsDiscardEnd',
},
filter:function(event,player){
var evt=event.getParent().relatedEvent;
if(evt&&evt.name=='useCard') return false;
for(var i=0;i<event.cards.length;i++){
if(event.cards[i].name=='chiling'&&get.position(event.cards[i],true)=='d'){
return true;
}
}
return false;
},
forced:true,
popup:false,
content:function(){
var cards=[];
for(var i=0;i<trigger.cards.length;i++){
if(trigger.cards[i].name=='chiling'&&get.position(trigger.cards[i],true)=='d'){
cards.push(trigger.cards[i]);
}
}
if(cards.length){
game.cardsGotoSpecial(cards);
game.log(cards,'已被移出游戏');
_status.chiling=true;
if(player&&player.popup) player.popup('敕令');
}
if(!lib.inpile.contains('zhaoshu')){
lib.inpile.push('zhaoshu');
var card=game.createCard2('zhaoshu','club',3);
game.log(card,'被置于了牌堆底');
ui.cardPile.appendChild(card);
game.updateRoundNumber();
}
},
},
g_chiling2:{},
g_chiling3:{
mode:['guozhan'],
trigger:{player:'phaseAfter'},
trigger:{player:'phaseEnd'},
forced:true,
popup:false,
filter:function(){

View File

@ -77,7 +77,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if(typeof count!='number') count=1;
while(count--){
let card=game.createCard('ying','spade',1);
card.destroyed='discardPile';
cards.push(card);
}
return cards;

View File

@ -3362,36 +3362,26 @@ game.import('character',function(lib,game,ui,get,ai,_status){
var num=1-trigger.player.hp;
if(num>0) trigger.player.recover(num);
'step 1'
if(player.hp==1&&player.maxHp==1){
event.finish(); return;
}
var hp=player.hp-1,maxhp=player.maxHp-1;
var choiceList=['失去'+hp+'点体力,令'+get.translation(trigger.player)+'获得'+hp+'点护甲','减'+maxhp+'点体力上限,令'+get.translation(trigger.player)+'获得'+maxhp+'点护甲'];
var choices=[];
if(hp>0) choices.push('选项一');
else choiceList[0]='<span style="opacity:0.5">'+choiceList[0]+'</span>';
if(maxhp>0) choices.push('选项二');
else choiceList[1]='<span style="opacity:0.5">'+choiceList[1]+'</span>';
player.chooseControl(choices).set('prompt','安国:请选择一项').set('choiceList',choiceList).set('ai',()=>{
var player=_status.event.player;
if(player.hp<=1||get.attitude(player,_status.event.getTrigger().player)>=4&&player.hp-1<0.4*(player.maxHp-1)&&player.maxHp>1) return '选项二';
return '选项一';
});
if(hp>0&&maxhp>0){
player.chooseControl(choices).set('prompt','安国:请选择一项').set('choiceList',[
'失去'+hp+'点体力,令'+get.translation(trigger.player)+'获得1点护甲',
'减'+maxhp+'点体力上限,令'+get.translation(trigger.player)+'获得1点护甲'
]).set('ai',()=>'选项一');
}
else if(hp>0) event._result={control:'选项一'};
else if(maxhp>0) event._result={control:'选项二'};
else event.finish();
'step 2'
if(result.control=='选项一'){
var num=player.hp-1;
if(num>0){
player.loseHp(num);
trigger.player.changeHujia(num);
}
if(num>0) player.loseHp(num);
}
else {
else{
var num=player.maxHp-1;
if(num>0){
player.loseMaxHp(num);
trigger.player.changeHujia(num);
}
if(num>0) player.loseMaxHp(num);
}
trigger.player.changeHujia(1,null,true);
}
}
}
@ -4871,13 +4861,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){
mobilexingxue:{
audio:2,
trigger:{player:'phaseJieshuBegin'},
filter:function(event,player){
var num=player.storage.mobileyanzhu?player.maxHp:player.hp;
return num>0;
},
direct:true,
content:function(){
'step 0'
var num=player.hp;
if(!player.hasSkill('mobileyanzhu')){
num=player.maxHp;
}
var num=player.storage.mobileyanzhu?player.maxHp:player.hp;
player.chooseTarget([1,num],get.prompt2('mobilexingxue')).set('ai',function(target){
var att=get.attitude(_status.event.player,target);
if(target.countCards('he')) return att;
@ -4904,7 +4895,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
'step 3'
if(event.current&&event.current.countCards('he')){
if(player.hasSkill('mobileyanzhu')||event.targets2.length==1) event.current.chooseCard('选择一张牌置于牌堆顶','he',true);
if(player.storage.mobileyanzhu||event.targets2.length==1) event.current.chooseCard('选择一张牌置于牌堆顶','he',true);
else event.current.chooseCardTarget({
prompt:'将一张牌置于牌堆顶,或交给其他目标角色',
filterCard:true,
@ -4942,22 +4933,24 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
'step 5'
event.goto(2);
}
},
derivation:'mobilexingxuex',
},
mobileyanzhu:{
audio:2,
enable:'phaseUse',
usable:1,
filterTarget:function(card,player,target){
return target.countCards('he')>0&&target!=player;
return target.countCards('hej')>0&&target!=player;
},
content:function(){
'step 0'
if(target.countCards('e')){
target.chooseBool('是否将装备区内的所有牌交给'+get.translation(player)+'','若选择“取消”,则其将获得你的一张牌').set('ai',function(){
target.chooseBool('是否将装备区内的所有牌交给'+get.translation(player)+'','若选择“取消”,则其将获得你区域里的一张牌').set('ai',function(){
if(_status.event.effect>0) return false;
if(_status.event.player.countCards('e')>=3) return false;
return true;
});
}).set('effect',get.effect(target,{name:'shunshou'},player,target));
}
else{
player.gainPlayerCard(target,true,'he');
@ -4968,22 +4961,26 @@ game.import('character',function(lib,game,ui,get,ai,_status){
var es=target.getCards('e');
target.give(es,player,'give');
player.removeSkill('mobileyanzhu');
player.storage.mobileyanzhu=true;
player.popup('兴学');
game.log(player,'修改了技能','【兴学】');
}
else{
player.gainPlayerCard(target,true,'he');
player.gainPlayerCard(target,true,'hej');
}
},
ai:{
order:6,
result:{
target:function(player,target){
var ne=target.countCards('e');
var ne=target.countCards('e'),nj=target.countCards('j');
if(nj) return 2.5;
if(!ne) return -2;
if(ne>=2) return -ne;
return 0;
}
}
}
},
},
},
},
//毛玠
bingqing:{
@ -14678,6 +14675,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if(player.countMark('spshidi')%2==0) return '转换技,锁定技。①准备阶段/结束阶段开始时,若你发动此分支的累计次数为奇数/偶数,则你获得一个“☯”。<span class="bluetext">②若你的“☯”数为偶数,则你至其他角色的距离-1且你使用的黑色【杀】不可被响应。</span>③若你的“☯”数为奇数,则其他角色至你的距离+1且你不可响应红色【杀】。';
return '转换技,锁定技。①准备阶段/结束阶段开始时,若你发动此分支的累计次数为奇数/偶数,则你获得一个“☯”。②若你的“☯”数为偶数,则你至其他角色的距离-1且你使用的黑色【杀】不可被响应。<span class="bluetext">③若你的“☯”数为奇数,则其他角色至你的距离+1且你不可响应红色【杀】。</span>';
},
mobilexingxue:function(player){
return lib.translate[(player.storage.mobileyanzhu?'mobilexingxuex':'mobilexingxue')+'_info'];
},
},
perfectPair:{
simazhao:['simayi','jin_simayi','jin_wangyuanji'],
@ -15255,9 +15255,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
xin_sunxiu:'手杀界孙休',
xin_sunxiu_prefix:'手杀界',
mobileyanzhu:'宴诛',
mobileyanzhu_info:'出牌阶段限一次,你可以令一名有牌的其他角色选择一项:①你获得其装备区里所有的牌,然后你失去技能〖宴诛〗。②你获得其一张牌。',
mobileyanzhu_info:'出牌阶段限一次,你可以令一名有牌的其他角色选择一项:①你获得其装备区里所有的牌,然后你失去技能〖宴诛〗并修改技能〖兴学〗。②你获得其区域里的一张牌。',
mobilexingxue:'兴学',
mobilexingxue_info:'结束阶段开始时你可以令至多X名角色依次摸一张牌并将一张牌置于牌堆顶X为你的体力值若你未拥有〖宴诛〗则将X改为你的体力上限且其可以改为将一张牌交给一名其他目标角色。',
mobilexingxue_info:'结束阶段开始时你可以令至多X名角色依次摸一张牌并将一张牌置于牌堆顶X为你的体力值。',
mobilexingxuex:'兴学·改',
mobilexingxuex_info:'结束阶段开始时你可以令至多X名角色依次摸一张牌并将一张牌置于牌堆顶或交给一名其他目标角色X为你的体力上限。',
re_wuguotai:'手杀界吴国太',
re_wuguotai_prefix:'手杀界',
reganlu:'甘露',
@ -15347,7 +15349,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
xin_zhuzhi:'手杀界朱治',
xin_zhuzhi_prefix:'手杀界',
sbanguo:'安国',
sbanguo_info:'①游戏开始时你令一名其他角色获得1枚“安国”标记有“安国”的角色手牌上限基数等于体力上限。②出牌阶段开始时你可以将一名有“安国”的角色的所有“安国”移动给一名本局游戏未获得过“安国”的其他角色。③当你受到伤害时若有有“安国”的角色且伤害值不小于你的体力值且此伤害没有来源或来源没有“安国”防止此伤害。④一名角色进入濒死状态时若其有你因〖安国①〗获得的“安国”你移去其该“安国”令其将体力回复至1点。然后你选择一项1.若你的体力值大于1你失去体力至1点2.若你的体力上限大于1你将体力上限减至1。最后你令其获得X点护甲X为你以此法失去的体力值或减少的体力上限。',
sbanguo_info:'①游戏开始时你令一名其他角色获得1枚“安国”标记有“安国”的角色手牌上限基数等于体力上限。②出牌阶段开始时你可以将一名有“安国”的角色的所有“安国”移动给一名本局游戏未获得过“安国”的其他角色。③当你受到伤害时若有有“安国”的角色且伤害值不小于你的体力值且此伤害没有来源或来源没有“安国”防止此伤害。④一名角色进入濒死状态时若其有你因〖安国①〗获得的“安国”你移去其该“安国”令其将体力回复至1点。然后你选择一项1.若你的体力值大于1你失去体力至1点2.若你的体力上限大于1你将体力上限减至1。最后你令其获得1点护甲。',
wangjun:'手杀王濬',
wangjun_prefix:'手杀',
zhujian:'筑舰',

View File

@ -6,7 +6,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
connectBanned:['zhangliang'],
characterSort:{
offline:{
offline_star:["sp_xiahoushi","jsp_zhaoyun","huangjinleishi","sp_pangtong","sp_daqiao","sp_ganning","sp_xiahoudun","sp_lvmeng","sp_zhangfei","sp_liubei","old_machao","zhangliang","jsp_caoren"],
offline_star:['jsp_ganfuren',"sp_xiahoushi","jsp_zhaoyun","huangjinleishi","sp_pangtong","sp_daqiao","sp_ganning","sp_xiahoudun","sp_lvmeng","sp_zhangfei","sp_liubei","old_machao","zhangliang","jsp_caoren"],
offline_sticker:['sp_gongsunzan','sp_simazhao','sp_wangyuanji','sp_xinxianying','sp_liuxie'],
offline_yijiang:['ol_xinxianying'],
offline_luanwu:["ns_lijue","ns_zhangji","ns_fanchou"],
@ -19,6 +19,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
},
character:{
jsp_ganfuren:['female','shu',3,['shushen','shenzhi'],['character:gz_ganfuren']],
ol_xinxianying:['female','wei',3,['xincaishi','xinzhongjian']],
zhangliang:["male","qun",4,["old_jijun","old_fangtong"]],
jsp_caoren:['male','wei',4,['kuiwei','yanzheng']],
@ -6683,6 +6684,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
old_machao_prefix:'J.SP',
jsp_caoren:'☆SP曹仁',
jsp_caoren_prefix:'☆SP',
jsp_ganfuren:'☆SP甘夫人',
jsp_ganfuren_prefix:'☆SP',
zhangliang:'SP张梁',
zhangliang_prefix:'SP',
ol_xinxianying:'将辛宪英',

View File

@ -7,7 +7,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
old:{
old_standard:['ol_yuanshu'],
old_shenhua:['old_shen_zhaoyun','old_caocao',"yuji","zhangjiao","old_zhugezhan","old_guanqiujian","xiahouyuan","weiyan","old_xiaoqiao","pangde","xuhuang",'junk_sunquan',"huangzhong","new_caoren",'old_chendao'],
old_refresh:["old_zhangfei","old_huatuo","old_zhaoyun","ol_huaxiong",'old_re_lidian','old_guanyu'],
old_refresh:["old_zhangfei","old_huatuo","old_zhaoyun","ol_huaxiong",'old_guanyu'],
old_yijiang1:["masu","xushu","xin_yujin","old_xusheng","old_lingtong","fazheng",'old_gaoshun','re_yujin'],
old_yijiang2:["old_zhonghui","madai",'old_handang','old_liubiao','oldre_liubiao','old_guanzhang','old_wangyi'],
old_yijiang3:["liru","old_zhuran","old_fuhuanghou","old_caochong"],
@ -25,7 +25,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
old_caocao:['male','shen',3,['junkguixin','feiying'],['die_audio']],
old_chendao:['male','shu',4,['drlt_wanglie']],
old_liyan:['male','shu',3,['duliang','fulin']],
old_re_lidian:['male','wei',3,['xunxun','wangxi']],
old_guanzhang:['male','shu',4,['old_fuhun']],
new_caoren:['male','wei',4,['jushou']],
huangzhong:['male','shu',4,['liegong']],
@ -1192,8 +1191,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
junk_sunquan_prefix:'旧神',
new_caoren:'旧曹仁',
new_caoren_prefix:'旧',
old_re_lidian:'旧李典',
old_re_lidian_prefix:'旧',
old_liyan:'旧李严',
old_liyan_prefix:'旧',
old_chendao:'旧陈到',

View File

@ -4,7 +4,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
name:'refresh',
characterSort:{
refresh:{
refresh_standard:["re_caocao","re_simayi","re_guojia","re_zhangliao","re_xuzhu","re_xiahoudun","re_zhangfei","re_zhaoyun","re_guanyu","re_machao","re_zhouyu","re_lvmeng","re_ganning","re_luxun","re_daqiao","re_huanggai","re_lvbu","re_huatuo","re_liubei","re_diaochan","re_huangyueying","re_sunquan","re_sunshangxiang","re_zhenji","re_zhugeliang","re_huaxiong",'re_gongsunzan'],
refresh_standard:["re_caocao","re_simayi","re_guojia","re_zhangliao","re_xuzhu","re_xiahoudun","re_zhangfei","re_zhaoyun","re_guanyu","re_machao","re_zhouyu","re_lvmeng","re_ganning","re_luxun","re_daqiao","re_huanggai","re_lvbu","re_huatuo","re_liubei","re_diaochan","re_huangyueying","re_sunquan","re_sunshangxiang","re_zhenji","re_zhugeliang","re_huaxiong",'re_gongsunzan',"re_lidian","re_xushu"],
refresh_feng:['caoren','ol_xiahouyuan','ol_weiyan','ol_xiaoqiao','zhoutai','re_zhangjiao','xin_yuji','ol_huangzhong'],
refresh_huo:["ol_sp_zhugeliang","ol_xunyu","ol_dianwei","ol_yanwen","ol_pangtong","ol_yuanshao","ol_pangde","re_taishici"],
refresh_lin:['re_menghuo','ol_sunjian','re_caopi','ol_xuhuang','ol_dongzhuo','ol_zhurong','re_jiaxu','ol_lusu'],
@ -20,6 +20,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
connect:true,
character:{
re_xushu:['male','shu',4,['zhuhai','qianxin']],
re_lidian:['male','wei',3,['xunxun','xinwangxi']],
re_zhongyao:['male','wei',3,['rehuomo','zuoding'],['clan:颍川钟氏']],
xin_zhangliang:['male','qun',4,['rejijun','refangtong'],['unseen']],
re_simalang:['male','wei',3,['requji','rejunbing'],['unseen']],
@ -15279,8 +15281,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
decadexianzhen_info:'每回合限一次。出牌阶段,你可以和一名其他角色拼点。若你赢:本回合你无视该角色的防具,且对其使用牌没有次数和距离限制,且本回合对其使用牌造成伤害时,此伤害+1每种牌名每回合限一次若你没赢你本回合内不能使用【杀】且【杀】不计入手牌上限。',
decadejinjiu:'禁酒',
decadejinjiu_info:'锁定技。你的【酒】的牌名均视为【杀】且点数视为K你的回合内其他角色不能使用【酒】。',
dc_xushu:'徐庶',
dc_xushu_prefix:'',
dc_xushu:'新杀徐庶',
dc_xushu_prefix:'新杀',
rezhuhai:'诛害',
rezhuhai_info:'其他角色的回合结束时,若其本回合内造成过伤害,则你可以选择一项:⒈将一张手牌当做【杀】对其使用。⒉视为对其使用一张【过河拆桥】。',
xsqianxin:'潜心',
@ -15477,6 +15479,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
ol_lingtong_prefix:'OL界',
olxuanfeng:'旋风',
olxuanfeng_info:'当你一次性失去至少两张牌后,或失去装备区的牌后,你可以依次弃置一至两名其他角色的共计两张牌。',
re_lidian:'界李典',
re_lidian_prefix:'界',
re_xushu:'界徐庶',
re_xushu_prefix:'界',
refresh_standard:'界限突破·标',
refresh_feng:'界限突破·风',

View File

@ -5,7 +5,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
connect:true,
characterSort:{
sp:{
sp_tianji:["sunhao","liuxie","caoang","hetaihou","sunluyu",'ol_wangrong',"zuofen","ganfuren","ol_bianfuren","qinghegongzhu","tengfanglan","ruiji",'caoxiancaohua'],
sp_tianji:["sunhao","liuxie","caoang","hetaihou","sunluyu",'ol_wangrong',"zuofen","ol_bianfuren","qinghegongzhu","tengfanglan","ruiji",'caoxiancaohua'],
sp_sibi:["yangxiu","chenlin","chengyu","shixie","fuwan","wangyun","zhugejin","simalang","maliang","buzhi","dongyun","kanze","sunqian","xizhicai","sunshao",'duxi',"jianggan",'ol_dengzhi','ol_yangyi','ol_dongzhao','ol_chendeng','jin_yanghu','wangyan','xiahouxuan','quhuang','zhanghua','wangguan','sunhong','caoxi'],
sp_tianzhu:['niujin','hejin','hansui',"wutugu","yanbaihu","shamoke","panfeng","zhugedan",'huangzu','gaogan',"tadun","fanjiangzhangda","ahuinan","dongtuna",'ol_wenqin'],
sp_nvshi:["lingju","guanyinping","zhangxingcai","mayunlu","dongbai","zhaoxiang",'ol_zhangchangpu',"daxiaoqiao","jin_guohuai"],
@ -182,7 +182,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
kanze:['male','wu',3,['xiashu','kuanshi']],
heqi:['male','wu',4,['olqizhou','olshanxi']],
ganfuren:['female','shu',3,['shushen','shenzhi']],
//mifuren:['female','shu',3,['guixiu','cunsi']],
yuejin:['male','wei',4,['xiaoguo']],
sp_dongzhuo:['male','qun',5,['hengzheng']],
@ -11258,13 +11257,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
//邓芝
olxiuhao:{
audio:2,
trigger:{
player:'damageBegin4',
source:'damageBegin2',
},
trigger:{global:'damageBegin4'},
usable:1,
filter:function(event,player){
return event.source&&event.source.isIn()&&event.source!=event.player;
return event.source&&event.source.isIn()&&[event.source,event.player].contains(player)&&event.source!=event.player;
},
logTarget:function(event,player){
return player==event.player?event.source:event.player;
@ -25263,7 +25259,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
yuantanyuanshang:['yuantanyuanshang','yuantanyuanxiyuanshang'],
ruiji:['ruiji','dc_ruiji'],
jsp_huangyueying:['jsp_huangyueying','re_jsp_huangyueying'],
ganfuren:['ganfuren','dc_ganfuren'],
ganfuren:['ganfuren','dc_ganfuren','jsp_ganfuren'],
wenqin:['wenqin','pe_wenqin'],
zhouqun:['ol_zhouqun','zhouqun'],
qianzhao:['ol_qianzhao','qianzhao'],
@ -25351,9 +25347,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
zhugejin:'诸葛瑾',
zhugeke:'诸葛恪',
guanyinping:'关银屏',
gz_ganfuren:'甘夫人',
ganfuren:'SP甘夫人',
ganfuren_prefix:'SP',
sunhao:'孙皓',
chengyu:'程昱',
simalang:'司马朗',
@ -26098,7 +26091,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
ol_dengzhi:'OL邓芝',
ol_dengzhi_prefix:'OL',
olxiuhao:'修好',
olxiuhao_info:'每回合限一次。当你受到其他角色造成的伤害时,或其他角色造成伤害时,你可防止此伤害,然后令伤害来源摸两张牌。',
olxiuhao_info:'每回合限一次。当你受到其他角色造成的伤害时,或其他角色受到你造成伤害时,你可防止此伤害,然后令伤害来源摸两张牌。',
olsujian:'素俭',
olsujian_given:'已分配',
olsujian_info:'锁定技。弃牌阶段开始前,你将此阶段的规则改为:{你选择一项:①将所有不为本回合得到的手牌分配给其他角色。②弃置这些手牌,然后弃置一名其他角色等量的牌}。',

View File

@ -138,7 +138,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
audio:2,
enable:'chooseToUse',
filter:function(event,player){
if(!event.filterCard({name:'sha'})&&!event.filterCard({name:'wuxie'})) return false;
if(!event.filterCard({name:'sha'},player,event)&&!event.filterCard({name:'wuxie'},player,event)) return false;
return player.countCards('h',card=>{
return !player.getStorage('starlifeng_count').contains(get.color(card,player))||_status.connectMode;
});
@ -151,7 +151,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return ui.create.dialog('砺锋',[list,'vcard']);
},
check:function(button){
return _status.event.player.getUseValue({name:button.link[2],nature:button.link[3]});
var player=_status.event.player;
return _status.event.getParent().type=='phase'?player.getUseValue({name:button.link[2]}):1
},
backup:function(links,player){
return {
@ -196,13 +197,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return !player.getStorage('starlifeng_count').contains(get.color(card,player))||_status.connectMode;
})) return false;
},
order:function(item,player){
if(player&&_status.event.type=='phase'){
if(player.hasSkill('starsujin')&&Math.abs(player.countCards('h')-2*player.countCards('h',{type:'basic'}))==1) return 10;
return get.order({name:'sha'})+0.3;
}
return 2;
},
order:10,
result:{player:1},
},
group:'starlifeng_mark',
subSkill:{

View File

@ -6,15 +6,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){
characterSort:{
standard:{
standard_2008:["caocao","simayi","xiahoudun","zhangliao","xuzhu","guojia","zhenji","liubei","guanyu","zhangfei","zhugeliang","zhaoyun","machao","huangyueying","sunquan","ganning","lvmeng","huanggai","zhouyu","daqiao","luxun","sunshangxiang","huatuo","lvbu","diaochan"],
standard_2013:["huaxiong","re_yuanshu","re_xushu","re_lidian"],
standard_2013:['old_re_lidian',"huaxiong","re_yuanshu"],
standard_2019:["gongsunzan","xf_yiji"],
standard_2023:["std_panfeng"],
standard_2023:["std_panfeng",'ganfuren'],
},
},
character:{
old_re_lidian:['male','wei',3,['xunxun','wangxi']],
ganfuren:['female','shu',3,['stdshushen','shenzhi']],
std_panfeng:['male','qun',4,['stdkuangfu']],
re_lidian:['male','wei',3,['xunxun','xinwangxi']],
re_xushu:['male','shu',4,['zhuhai','qianxin']],
caocao:['male','wei',4,['jianxiong','hujia'],['zhu']],
simayi:['male','wei',3,['fankui','guicai']],
xiahoudun:['male','wei',4,['ganglie']],
@ -94,6 +94,31 @@ game.import('character',function(lib,game,ui,get,ai,_status){
guanyu:['zhangfei','liaohua'],
},
skill:{
//标准版甘夫人
stdshushen:{
audio:'shushen',
trigger:{player:'recoverEnd'},
direct:true,
content:function(){
'step 0'
event.num=trigger.num||1;
'step 1'
player.chooseTarget(get.prompt2('stdshushen'),lib.filter.notMe).set('ai',function(target){
return get.attitude(_status.event.player,target);
});
'step 2'
if(result.bool){
var target=result.targets[0];
player.logSkill('stdshushen',target);
target.draw(target.countCards('h')?1:2);
if(event.num>1&&player.hasSkill('stdshushen')){
event.num--;
event.goto(1);
}
}
},
ai:{threaten:0.8,expose:0.1},
},
stdkuangfu:{
audio:'xinkuangfu',
trigger:{source:'damageSource'},
@ -2713,11 +2738,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
rewangzun_info:'锁定技,一名其他角色的准备阶段开始时,若其体力值大于你,你摸一张牌。然后若其身份为主公/主帅/君主/地主且明置,则你摸一张牌,且其本回合的手牌上限-1。',
retongji:'同疾',
retongji_info:'攻击范围内包含你的角色成为【杀】的目标时,若你不是此【杀】的使用者或目标,其可弃置一张牌,然后将此【杀】转移给你。',
re_xushu:'徐庶',
re_lidian:'李典',
std_panfeng:'潘凤',
stdkuangfu:'狂斧',
stdkuangfu_info:'锁定技。出牌阶段限一次。当你使用【杀】对其他角色造成伤害后若其体力值小于你你摸两张牌不小于你你失去1点体力。',
ganfuren:'甘夫人',
stdshushen:'淑慎',
stdshushen_info:'当你回复1点体力时你可以令一名其他角色摸一张牌若其没有手牌则改为摸两张牌。',
old_re_lidian:'李典',
standard_2008:"2008版标准包",
standard_2013:"2013版标准包",

View File

@ -8395,9 +8395,10 @@
var that=this;
this.timeout=setTimeout(function(){
if(!that.destroyed){
if(!that._selfDestroyed){
position.appendChild(that);
}
else that.remove();
that.classList.remove('removing');
delete that.destiny;
},time);
@ -12745,6 +12746,7 @@
return;
}
if(card.willBeDestroyed('equip',player,event)){
card.selfDestroy(event);
event.finish();
return;
}
@ -13719,7 +13721,7 @@
var withPile=false;
for(var i=0;i<cards.length;i++){
if(cards[i].willBeDestroyed('discardPile',null,event)){
cards[i].remove();
cards[i].selfDestroy(event);
continue;
}
if(get.position(cards[i],true)=='c') withPile=true;
@ -13739,7 +13741,7 @@
var withPile=false;
for(var i=0;i<cards.length;i++){
if(cards[i].willBeDestroyed('ordering',null,event)){
cards[i].remove();
cards[i].selfDestroy(event);
continue;
}
if(get.position(cards[i],true)=='c') withPile=true;
@ -13762,7 +13764,7 @@
var withPile=false;
for(var i=0;i<cards.length;i++){
if(cards[i].willBeDestroyed('special',null,event)){
cards[i].remove();
cards[i].selfDestroy(event);
continue;
}
if(get.position(cards[i],true)=='c') withPile=true;
@ -18048,6 +18050,7 @@
else{
game.log(player,'展示了',cards);
}
game.addCardKnower(cards,'everyone');
game.delayx(event.delay_time||2.5);
game.addVideo('showCards',player,[event.str,get.cardsInfo(cards)]);
"step 1"
@ -18056,6 +18059,7 @@
},
viewCards:function(){
"step 0"
game.addCardKnower(event.cards,player);
if(player==game.me){
event.dialog=ui.create.dialog(event.str,event.cards);
if(event.isMine()){
@ -19254,7 +19258,9 @@
for(var i in map){
var owner=(_status.connectMode?lib.playerOL:game.playerMap)[i];
var next=owner.lose(map[i][0],ui.special).set('type','gain').set('forceDie',true).set('getlx',false);
if(event.visible==true) next.visible=true;
if(event.visible==true){
next.visible=true;
}
event.relatedLose=next;
}
}
@ -19264,6 +19270,7 @@
"step 1"
for(var i=0;i<cards.length;i++){
if(cards[i].willBeDestroyed('handcard',player,event)){
cards[i].selfDestroy(event);
cards.splice(i--,1);
}
else if(event.losing_map){
@ -19273,6 +19280,8 @@
var hs=source.getCards('hejsx');
if(hs.contains(cards[i])){
cards.splice(i--,1);
}else{
cards[i].addKnower(event.visible?'everyone':source);
}
}
}
@ -19458,6 +19467,7 @@
"step 1"
for(var i=0;i<cards.length;i++){
if(cards[i].willBeDestroyed('expansion',player,event)){
cards[i].selfDestroy(event);
cards.splice(i--,1);
}
else if(event.losing_map){
@ -19680,8 +19690,7 @@
}
else if(cards[i].hasOwnProperty('destroyed')){
if(event.getlx!==false&&event.position&&cards[i].willBeDestroyed(event.position.id,null,event)){
cards[i].delete();
continue;
cards[i].selfDestroy(event);
}
}
else if(info.destroy){
@ -19765,6 +19774,10 @@
event.js=js;
event.ss=ss;
event.xs=xs;
game.clearCardKnowers(hs);
if(hs.length && !event.visible){
this.getCards('h').forEach(hcard=>{hcard.clearKnowers();});
}
"step 2"
if(num<cards.length){
if(event.es.contains(cards[num])){
@ -20348,6 +20361,7 @@
}
"step 1"
if(cards[0].willBeDestroyed('judge',player,event)){
cards[0].selfDestroy(event);
event.finish();
return;
}
@ -20606,6 +20620,8 @@
for(i=0;i<bottom.length;i++){
ui.cardPile.appendChild(bottom[i]);
}
game.addCardKnower(top,player);
game.addCardKnower(bottom,player);
player.popup(get.cnNumber(top.length)+'上'+get.cnNumber(bottom.length)+'下');
game.log(player,'将'+get.cnNumber(top.length)+'张牌置于牌堆顶');
game.updateRoundNumber();
@ -20969,6 +20985,32 @@
return get.is.shownCard(card);
});
}
//获取该角色被other所知的牌。
getKnownCards(other,filter){
if(!other)other = _status.event.player;
if(!other)other = this;
if(!filter)filter = (card)=>{return true};
return this.getCards('h',function(card){
return card.isKnownBy(other) && filter(card);
});
}
//判断此角色的手牌是否已经被看光了。
isAllCardsKnown(other){
if(!other)other = _status.event.player;
if(!other)other = this;
return this.countCards('h',function(card){
return !card.isKnownBy(other);
}) == 0;
}
//判断此角色是否有被知的牌。
hasKnownCards(other,filter){
if(!other)other = _status.event.player;
if(!other)other = this;
if(!filter)filter = (card)=>{return true};
return this.countCards('h',function(card){
return card.isKnownBy(other) && filter(card);
}) > 0;
}
//Execute the delay card effect
//执行延时锦囊牌效果
executeDelayCardEffect(card,target,judge,judge2){
@ -28350,8 +28392,13 @@
let cards,selected=get.copy(ui.selected.cards);
if(get.itemtype(ignore)==='cards') selected.addArray(ignore);
else if(get.itemtype(ignore)==='card') selected.add(ignore);
if(this===viewer||get.itemtype(viewer)==='player'&&viewer.hasSkillTag('viewHandcard',null,this,true)) cards=this.getCards('h');
else cards=this.getShownCards();
/*if(this===viewer||get.itemtype(viewer)==='player'&&viewer.hasSkillTag('viewHandcard',null,this,true)) cards=this.getCards('h');
else cards=this.getShownCards();*/
if(this === viewer || get.itemtype(viewer) == 'player'){
cards = this.getKnownCards(viewer);
}else{
cards = this.getShownCards();
}
if(cards.some(card=>{
if(selected.includes(card)) return false;
let name=get.name(card,this);
@ -28372,8 +28419,13 @@
let cards,selected=get.copy(ui.selected.cards);
if(get.itemtype(ignore)==='cards') selected.addArray(ignore);
else if(get.itemtype(ignore)==='card') selected.add(ignore);
if(this===viewer||get.itemtype(viewer)==='player'&&viewer.hasSkillTag('viewHandcard',null,this,true)) cards=this.getCards('h');
else cards=this.getShownCards();
/*if(this===viewer||get.itemtype(viewer)==='player'&&viewer.hasSkillTag('viewHandcard',null,this,true)) cards=this.getCards('h');
else cards=this.getShownCards();*/
if(this === viewer || get.itemtype(viewer) == 'player'){
cards = this.getKnownCards(viewer);
}else{
cards = this.getShownCards();
}
if(cards.some(card=>{
if(selected.includes(card)) return false;
let name=get.name(card,this);
@ -29980,6 +30032,17 @@
buildIntro(noclick){
if(!noclick) lib.setIntro(this);
}
//执行销毁一张牌的钩子函数
selfDestroy(event){
if(this._selfDestroyed) return;
this._selfDestroyed=true;
this.fix();
this.delete();
const info=get.info(this,false);
if(!info) return;
if(info.destroyLog!==false) game.log(this,'被销毁了');
if(info.onDestroy) info.onDestroy(this,event);
}
//判断一张牌进入某个区域后是否会被销毁
willBeDestroyed(targetPosition,player,event){
const destroyed=this.destroyed;
@ -30142,6 +30205,10 @@
this.number=parseInt(card[1])||0;
this.name=card[2];
if(info.destroy&&(typeof info.destroy!='boolean'&&!lib.skill[info.destroy])){
this.destroyed=info.destroy;
}
if(_status.connectMode&&!game.online&&lib.cardOL&&!this.cardid){
this.cardid=get.id();
lib.cardOL[this.cardid]=this;
@ -30503,6 +30570,41 @@
aiexclude(){
_status.event._aiexclude.add(this);
}
//为此牌添加知情者。参数可为数组,若参数为字符串'everyone',则所有玩家均为知情者。
addKnower(player){
if(!this._knowers){
this._knowers = [];
}
if(typeof player == 'string'){
this._knowers.add(player);
}else{
let type = get.itemtype(player);
if(type == 'player'){
this._knowers.add(player.playerid);
}else if(type == 'players'){
player.forEach(p=>this._knowers.add(p.playerid));
}
}
}
//清除此牌的知情者。
clearKnowers(){
if(this._knowers)delete this._knowers;
}
//判断玩家对此牌是否知情。
isKnownBy(player){
if(['e','j'].includes(get.position(this)))return true;//装备区或者判定区的牌,必知情。
let owner = get.owner(this);
if(owner){
if(owner == player)return true;//是牌主,必知情。
if(player.hasSkillTag('viewHandcard',null,owner,true))return true;//有viewHandcard标签必知情。
if(owner.isUnderControl(true,player))return true;//被操控,必知情。
}
if(get.is.shownCard(this))return true;//此牌是明置牌,必知情。
if(this._knowers){
return this._knowers.includes('everyone') || this._knowers.includes(player.playerid);
}
return false;
}
getSource(name){
if(this.name==name) return true;
var info=lib.card[this.name];
@ -30608,9 +30710,6 @@
if(this._uncheck.length==0) this.classList.remove('uncheck');
}
discard(bool){
if(!this.willBeDestroyed('discardPile',null,event)){
ui.discardPile.appendChild(this);
}
this.fix();
this.classList.remove('glow');
if(bool===false){
@ -36130,6 +36229,20 @@
if(i.storage.renku) i.markSkill('renku');
}
},
//为牌添加知情者。
addCardKnower:function(cards,players){
if(get.itemtype(cards) == 'card'){
cards = [cards];
}
cards.forEach(card=>card.addKnower(players));
},
//移除牌的所有知情者。
clearCardKnowers:function(cards){
if(get.itemtype(cards) == 'card'){
cards = [cards];
}
cards.forEach(card=>card.clearKnowers());
},
loseAsync:function(arg){
var next=game.createEvent('loseAsync');
next.forceDie=true;
@ -36384,7 +36497,7 @@
const pile=ui.cardPile;
for(let i=0;i<cards.length;i++){
if(cards[i].willBeDestroyed('cardPile',null,event)){
cards[i].remove();
cards[i].selfDestroy(event);
continue;
}
if(event.insert_index){