Merge branch 'PR-Branch' of https://github.com/kuangshen04/noname into PR-Branch

This commit is contained in:
kuangshen04 2024-01-21 23:59:06 +08:00
commit 9019cd41c1
37 changed files with 472 additions and 75 deletions

BIN
audio/die/liyi.mp3 Normal file

Binary file not shown.

BIN
audio/die/muludawang.mp3 Normal file

Binary file not shown.

Binary file not shown.

BIN
audio/die/sb_caopi.mp3 Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
audio/skill/olfengyan1.mp3 Normal file

Binary file not shown.

BIN
audio/skill/olfengyan2.mp3 Normal file

Binary file not shown.

BIN
audio/skill/olfudao1.mp3 Normal file

Binary file not shown.

BIN
audio/skill/olfudao2.mp3 Normal file

Binary file not shown.

BIN
audio/skill/olzhanjin1.mp3 Normal file

Binary file not shown.

BIN
audio/skill/olzhanjin2.mp3 Normal file

Binary file not shown.

BIN
audio/skill/sbfangzhu1.mp3 Normal file

Binary file not shown.

BIN
audio/skill/sbfangzhu2.mp3 Normal file

Binary file not shown.

BIN
audio/skill/sbsongwei1.mp3 Normal file

Binary file not shown.

BIN
audio/skill/sbsongwei2.mp3 Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
audio/skill/shoufa1.mp3 Normal file

Binary file not shown.

BIN
audio/skill/shoufa2.mp3 Normal file

Binary file not shown.

BIN
audio/skill/yuxiang.mp3 Normal file

Binary file not shown.

BIN
audio/skill/zhoulin1.mp3 Normal file

Binary file not shown.

BIN
audio/skill/zhoulin2.mp3 Normal file

Binary file not shown.

View File

@ -6061,7 +6061,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
onremove:function(player){
game.countPlayer2(current=>{
if(current.getStorage('dawu2').includes(player)){
current.unmarkAuto('dawu2',player);
current.unmarkAuto('dawu2',[player]);
current.removeAdditionalSkill(`dawu_${player.playerid}`);
}
},true);

View File

@ -4,6 +4,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
name:'huicui',
connect:true,
character:{
dc_lingcao:['male','wu','4/5',['dcdufeng']],
yue_xiaoqiao:['female','wu',3,['dcqiqin','dcweiwan']],
dc_dongzhao:['male','wei',3,['dcyijia','dcdingji']],
kuaiqi:['male','wei',3,['dcliangxiu','dcxunjie']],
@ -97,7 +98,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
huicui:{
sp_baigei:['re_panfeng','xingdaorong','caoxing','re_chunyuqiong','xiahoujie','dc_caiyang','zhoushan'],
sp_caizijiaren:['re_dongbai','re_sunluyu','heyan','zhaoyan','wangtao','wangyue','zhangxuan','tengyin','zhangyao','xiahoulingnv','dc_sunru','pangshanmin','kuaiqi'],
sp_zhilan:['liuyong','wanniangongzhu','zhanghu','lvlingqi','tenggongzhu','panghui','dc_zhaotongzhaoguang','yuantanyuanxiyuanshang','yuechen'],
sp_zhilan:['liuyong','wanniangongzhu','zhanghu','lvlingqi','tenggongzhu','panghui','dc_zhaotongzhaoguang','yuantanyuanxiyuanshang','yuechen','dc_lingcao'],
sp_guixin:['re_kanze','re_chendeng','caimaozhangyun','dc_lvkuanglvxiang','dc_gaolan','yinfuren','chengui','chenjiao','dc_sp_jiaxu','qinlang','dc_dongzhao'],
sp_daihan:['mamidi','dc_jiling','zhangxun','dc_yuejiu','wanglie','leibo','qiaorui','dongwan','yuanyin'],
sp_jianghu:['guanning','huzhao','dc_huangchengyan','mengjie'],
@ -111,6 +112,55 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
},
skill:{
//凌操
dcdufeng:{
audio:2,
trigger:{player:'phaseUseBegin'},
forced:true,
async content(event,trigger,player){
const list=[];
for(let i=1;i<6;i++){
if(player.isDisabled(i)) continue;
list.push('equip'+i);
}
list.push('cancel2');
const next=player.chooseControl(list);
next.set('prompt','独锋请废除一个装备栏或点击“取消”失去1点体力');
next.set('ai',()=>{
const list=get.event().list.slice(),player=get.player();
if(player.hp<=2&&list.length>1) list.remove('cancel2');
const listx=list.filter(subtype=>!player.getEquips(subtype).length);
if(listx.length) return listx.randomGet();
return list.randomGet();
})
next.set('list',list);
const {result}=await next;
if(result.control=='cancel2') await player.loseHp();
else await player.disableEquip(result.control);
if(!player.isIn()) return;
const num=Math.min(player.countDisabled()+player.getDamagedHp(),player.maxHp);
await player.draw(num);
player.addTempSkill('dcdufeng_effect');
player.addMark('dcdufeng_effect',num,false);
},
subSkill:{
effect:{
charlotte:true,
onremove:true,
intro:{
content:'本回合攻击范围与使用【杀】的次数上限均为#',
},
mod:{
attackRangeBase(player,num){
return player.countMark('dcdufeng_effect');
},
cardUsable(card,player,num){
if(card.name=='sha') return player.countMark('dcdufeng_effect');
},
},
}
},
},
//小乔
dcqiqin:{
audio:2,
@ -5333,7 +5383,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
var dialog=ui.create.dialog('劝谏:令一名其他角色…','hidden');
dialog.add([[
['damage','对其攻击范围内的一名角色造成1点伤害'],
['draw','将其手牌数调整至体力上限(至多摸至五张),且其本回合内不能使用手牌']
['draw','将其手牌数调整至手牌上限(至多摸至五张),且其本回合内不能使用手牌']
],'textbutton']);
return dialog;
},
@ -5346,7 +5396,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
prompt:function(links){
if(links[0]=='damage') return '令一名其他角色对攻击范围内的另一名角色造成1点伤害';
return '令一名其他角色将手牌数调整至体力上限(至多摸至五张)且本回合内不能使用手牌';
return '令一名其他角色将手牌数调整至手牌上限(至多摸至五张)且本回合内不能使用手牌';
},
},
ai:{
@ -5404,15 +5454,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){
filterTarget:function(card,player,target){
if(target==player) return false;
var num=target.countCards('h');
if(num>target.maxHp) return true;
return num<Math.min(5,target.maxHp);
if(num>target.getHandcardLimit()) return true;
return num<Math.min(5,target.getHandcardLimit());
},
filterCard:()=>false,
selectCard:-1,
content:function(){
'step 0'
player.addTempSkill('dcquanjian_draw','phaseUseAfter');
var num1=target.countCards('h'),num2=target.maxHp;
var num1=target.countCards('h'),num2=target.getHandcardLimit();
var num=0;
if(num1>num2){
event.index=0;
@ -5456,7 +5506,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
ai:{
result:{
target:function(player,target){
var num1=target.countCards('h'),num2=target.maxHp;
var num1=target.countCards('h'),num2=target.getHandcardLimit();
if(num1>num2) return -1;
return Math.min(5,num2)-num1;
},
@ -10458,7 +10508,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
content:function(){
player.markAuto('dcxunji_effect',[target]);
player.addTempSkill('dcxunji_effect',{player:'die'});
target.markSkill('dcxunji_mark');
target.addTempSkill('dcxunji_mark',{player:'phaseEnd'});
},
ai:{
order:1,
@ -10471,6 +10521,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
subSkill:{
mark:{
mark:true,
marktext:'嫉',
intro:{content:'你已经被盯上了!'},
},
@ -10502,10 +10553,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
forced:true,
popup:false,
filter:function(event,player){
return event.card&&event.card.name=='juedou'&&event.getParent().skill=='dcxunji_effect';
return event.card&&event.card.name=='juedou'&&event.getParent().skill=='dcxunji_effect'&&event.player.isIn();
},
content:function(){
player.loseHp(trigger.num);
trigger.player.line(player);
player.damage(trigger.num,trigger.player);
},
},
},
@ -11083,6 +11135,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
liuyong:['liuyong','jsrg_liuyong'],
zhangxuan:['zhangxuan','jsrg_zhangxuan'],
gaoxiang:['gaoxiang','jsrg_gaoxiang'],
lingcao:['lingcao','dc_lingcao'],
},
translate:{
re_panfeng:'潘凤',
@ -11115,7 +11168,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
zhuangdan_info:'锁定技,其他角色的回合结束时,若你的手牌数为全场唯一最多,则你令〖裂胆〗失效直到你下回合结束。',
dc_caiyang:'蔡阳',
dcxunji:'寻嫉',
dcxunji_info:'出牌阶段限一次,你可以选择一名其他角色。该角色的下个结束阶段开始时,若其于该回合内造成过伤害,则你视为对其使用一张【决斗】,且当此【决斗】对其造成伤害后,你失去等量的体力。',
dcxunji_info:'出牌阶段限一次,你可以选择一名其他角色。该角色的下个结束阶段开始时,若其于该回合内造成过伤害,则你视为对其使用一张【决斗】,且当此【决斗】对其造成伤害后,其对你造成等量的伤害。',
dcjiaofeng:'交锋',
dcjiaofeng_info:'锁定技。每回合限一次当你造成伤害时若你本回合内未造成过其他伤害且你已损失的体力值大于0则你摸一张牌大于1则此伤害+1大于2则你回复1点体力。',
zhoushan:'周善',
@ -11325,7 +11378,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
dcyongbi_info:'限定技。出牌阶段你可以将所有手牌交给一名其他男性角色。你将〖媵予〗的发动时机改为“准备阶段和结束阶段开始时”。然后若这些牌中包含的花色数大于1则你与其本局游戏的手牌上限+2大于2则当你或其于本局游戏内受到大于1的伤害时此伤害-1。',
dc_huangquan:'黄权',
dcquanjian:'劝谏',
dcquanjian_info:'出牌阶段每项各限一次。你可以选择一项流程并选择一名其他角色A⒈令A对其攻击范围内的另一名角色B造成1点伤害。⒉令A将手牌数调整至体力上限至多摸至五张且其本回合内不能使用或打出手牌。然后A选择一项⒈执行此流程。⒉本回合下次受到的伤害+1。',
dcquanjian_info:'出牌阶段每项各限一次。你可以选择一项流程并选择一名其他角色A⒈令A对其攻击范围内的另一名角色B造成1点伤害。⒉令A将手牌数调整至手牌上限至多摸至五张且其本回合内不能使用或打出手牌。然后A选择一项⒈执行此流程。⒉本回合下次受到的伤害+1。',
dctujue:'途绝',
dctujue_info:'限定技。当你进入濒死状态时,你可以将所有牌交给一名其他角色。然后你回复等量的体力并摸等量的牌。',
chengui:'陈珪',
@ -11546,6 +11599,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
dcqiqin_info:'锁定技。①游戏开始时,你将所有手牌标记为“琴”。②你的“琴”牌不计入手牌上限。③准备阶段,你获得弃牌堆中所有你标记过的“琴”牌。',
dcweiwan:'媦婉',
dcweiwan_info:'出牌阶段限一次你可以弃置一张“琴”并随机获得一名其他角色区域内花色与此牌不相同的牌各一张若你获得了一张牌其失去1点体力两张牌本回合你对其使用牌无距离和次数限制三张牌本回合你不能对其使用牌。',
dc_lingcao:'新杀凌操',
dc_lingcao_prefix:'新杀',
dcdufeng:'独锋',
dcdufeng_info:'锁定技。出牌阶段开始时你失去1点体力或废除一个装备栏摸X张牌然后你的攻击范围与使用【杀】的次数上限均为X直到回合结束X为你已废除的装备栏数与损失的体力值之和至多为你的体力上限。',
sp_baigei:'无双上将',
sp_caizijiaren:'才子佳人',

View File

@ -8208,6 +8208,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
jsrg_fanjiangzhangda_prefix:'转',
jsrgfushan:'负山',
jsrgfushan_info:'出牌阶段开始时,所有其他角色可以依次交给你一张牌并令你此阶段使用【杀】的次数上限+1。此阶段结束时若你使用【杀】的次数未达到上限且此阶段以此法交给你牌的角色均存活你失去2点体力否则你将手牌摸至体力上限。',
//江山如故·合
jsrg_zhugeliang:'梦诸葛亮',
jsrg_zhugeliang_prefix:'梦',
jsrgwentian:'问天',

View File

@ -482,32 +482,34 @@ game.import('character',function(lib,game,ui,get,ai,_status){
audio:'twjieyu',
trigger:{player:'phaseJieshuBegin'},
filter:function(event,player){
for(var i=0;i<ui.discardPile.childElementCount;i++){
if(get.type(ui.discardPile.childNodes[i])=='basic') return true;
for(let i=0;i<ui.discardPile.childElementCount;i++){
if(get.type(ui.discardPile.childNodes[i],false)=='basic') return true;
}
return false;
},
prompt2:function(event,player){
const num=lib.skill.jieyu.getNum(player,true);
const num=lib.skill.jieyu.getNum(player);
return '获得弃牌堆中'+get.cnNumber(num)+'张'+(num>1?'牌名各不相同的':'')+'基本牌';
},
async content(event,trigger,player){
const num=lib.skill.jieyu.getNum(player,false);
let gains=[],names=lib.inpile.filter(name=>get.type(name)=='basic').randomGets(num);
names.forEach(name=>{
let card=get.discardPile(card=>card.name==name);
if(name) gains.push(card);
});
if(gains.length) player.gain(gains,'gain2');
const num=lib.skill.jieyu.getNum(player,event);
let gains=[],names=[];
for(let i=0;i<ui.discardPile.childElementCount;i++){
let card=ui.discardPile.childNodes[i];
if(get.type(card,false)=='basic'&&!names.includes(card.name)){
gains.push(card);
names.push(card.name);
}
}
if(gains.length) player.gain(gains.randomGets(Math.min(gains.length,num)),'gain2');
},
getNum:function(player,goon){
let num=3,bool=goon;
getNum:function(player,event){
let num=3;
const history=game.getAllGlobalHistory('everything');
for(let i=history.length-1;i>=0;i--){
const evt=history[i];
if(evt.name=='useSkill'&&evt.player==player&&evt.skill=='jieyu'){
if(!bool) bool=true;
else break;
if(evt.name=='jieyu'&&evt.player==player){
if(!event||evt!=event) break;
}
if(evt.name=='useCard'&&evt.player!=player&&evt.targets&&evt.targets.includes(player)&&get.tag(evt.card,'damage')){
num--;
@ -599,7 +601,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if(to.hujia>0) return distance+1;
},
},
audio:2,
audio:true,
trigger:{player:'damageBegin2'},
filter:function(event,player){
return player.hujia>0&&event.hasNature('fire');

View File

@ -129,6 +129,8 @@ window.noname_character_rank={
'caoxian',
'sb_guanyu',
'mb_chengui',
'jsrg_guozhao',
'sb_caopi',
],
a:[
'diy_zaozhirenjun',
@ -354,8 +356,11 @@ window.noname_character_rank={
'ol_jianyong',
'ol_sb_jiangwei',
'dc_sb_zhouyu',
'dc_lingcao',
'jsrg_zhugeliang',
],
am:[
'muludawang',
'diy_caiwenji',
'diy_liuyan',
'diy_zhenji',
@ -648,8 +653,12 @@ window.noname_character_rank={
'zhugeruoxue',
'dc_sb_lusu',
'mb_huban',
'jsrg_simayi',
'jsrg_zhaoyun',
'jsrg_zhangxuan',
],
bp:[
'xin_huojun',
'chess_diaochan',
'chess_huangzhong',
'chess_sunshangxiang',
@ -1017,8 +1026,16 @@ window.noname_character_rank={
'sunhuan',
'yue_caiyong',
'sb_huangyueying',
'jsrg_jiangwei',
'jsrg_luxun',
'jsrg_caofang',
'jsrg_guoxun',
'jsrg_gaoxiang',
'jsrg_sunlubansunluyu',
'jsrg_weiwenzhugezhi',
],
b:[
'liyi',
'diy_feishi',
'diy_liufu',
'diy_tianyu',
@ -1332,6 +1349,8 @@ window.noname_character_rank={
'lvboshe',
'ol_caozhang',
'ol_lingtong',
'jsrg_liuyong',
'jsrg_sunjun',
],
bm:[
'diy_xizhenxihong',
@ -2089,6 +2108,8 @@ window.noname_character_rank={
'dc_sb_zhouyu',
],
rare:[
'xin_huojun',
'muludawang',
'mb_huban',
'sp_jianggan',
'ol_caozhang',

View File

@ -6363,7 +6363,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
sbfangzhu:'放逐',
sbfangzhu_info:'出牌阶段限一次你可以1.移去2个“颂”标记令一名其他角色的非Charlotte技能失效直到其回合结束2.移去2个“颂”标记令一名其他角色不能响应除其以为的角色使用的牌直到其回合结束3.移去2个“颂”标记令一名其他角色将武将牌翻面4.移去2个“颂”标记令一名其他角色只能使用你选择的一种类型的牌直到其回合结束。',
sbsongwei:'颂威',
sbsongwei_info:'①出牌阶段开始时你获得Y个“颂”标记Y为场上其他魏势力角色数。②每局游戏限一次出牌阶段你可以令一名其他魏势力角色失去所有武将牌的技能。',
sbsongwei_info:'主公技。①出牌阶段开始时你获得Y个“颂”标记Y为场上其他魏势力角色数。②每局游戏限一次出牌阶段你可以令一名其他魏势力角色失去所有武将牌的技能。',
sb_zhi:'谋攻篇·知',
sb_shi:'谋攻篇·识',

View File

@ -8,7 +8,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
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:['zhangyan','niujin','hejin','hansui',"wutugu","yanbaihu","shamoke","zhugedan",'huangzu','gaogan',"tadun","fanjiangzhangda","ahuinan","dongtuna",'ol_wenqin'],
sp_nvshi:["lingju","guanyinping","zhangxingcai","mayunlu","dongbai","zhaoxiang",'ol_zhangchangpu',"daxiaoqiao","jin_guohuai"],
sp_nvshi:['ol_dingshangwan',"lingju","guanyinping","zhangxingcai","mayunlu","dongbai","zhaoxiang",'ol_zhangchangpu',"daxiaoqiao","jin_guohuai"],
sp_shaowei:["simahui","zhangbao","zhanglu","zhugeguo","xujing","zhangling",'huangchengyan','zhangzhi','lushi'],
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_huban','haopu','ol_qianzhao'],
sp_liesi:['lvboshe','mizhu','weizi','ol_liuba','zhangshiping'],
@ -18,7 +18,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
sp_zhongdan:["cuiyan","huangfusong"],
sp_guozhan2:["sp_dongzhuo","liqueguosi","zhangren"],
sp_others:["hanba","caiyang"],
sp_waitforsort:['ol_luyusheng','ol_pengyang','ol_tw_zhangji','ol_dingshangwan','ol_liwan','ol_liuyan','caoyu'],
sp_waitforsort:['ol_luyusheng','ol_pengyang','ol_tw_zhangji','ol_liwan','ol_liuyan','caoyu','liyi'],
},
},
characterFilter:{
@ -30,6 +30,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
},
character:{
liyi:['male','wu',4,['olchanshuang','olzhanjin']],
caoyu:['male','wei',3,['olgongjie','olxiangxv','olxiangzuo']],
ol_liwan:['female','wei',3,['ollianju','olsilv']],
ol_dingshangwan:['female','wei',3,['olfudao','olfengyan']],
@ -202,6 +203,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
luzhi:['male','wei',3,['qingzhong','weijing']]
},
characterIntro:{
liyi:'李异生卒年不详三国时期东吴将领。建安末与谢旌率水陆三千击破刘备军将领詹晏、陈凤。刘备领兵攻孙权时李异与陆逊等人屯巫、秭归为蜀将所破。黄武元年222年陆逊破刘备于猇亭李异追踪蜀军屯驻南山。清代学者赵一清认为此李异与刘璋部将李异为同一人。',
caoyu:'曹宇278年字彭祖沛国谯县今安徽亳州人。三国时期魏国宗室魏武帝曹操与环夫人之子邓哀王曹冲同母兄弟。太和六年封为燕王。魏明帝病危欲以大将军辅政不果。其子常道乡公曹奂是魏国末代皇帝史称魏元帝。晋朝建立后降封燕公。咸宁四年278年曹宇去世。',
zhangyan:'张燕,本姓褚,生卒年不详,常山真定(今河北正定南)人,东汉末年黑山军首领。张燕剽捍,敏捷过人,军中称为“飞燕”。官渡之战时投降曹操,被任命为平北将军,封安国亭侯。死后其子张方袭爵。',
lushi:'卢氏,五斗米教主张衡妻,张鲁母,擅长驻颜之术,常年令自己保持少女的容颜。常拜访刘焉,与其交好。',
@ -705,6 +707,207 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
},
skill:{
//李异
olchanshuang:{
audio:2,
enable:'phaseUse',
filterTarget:lib.filter.notMe,
usable:1,
content:function*(event,map){
const player=map.player,target=event.target;
const choiceList=[
'重铸一张牌',
'使用一张【杀】',
'弃置两张牌',
],list=['重铸','出杀','弃牌','无法选择'];
let result=[];
for(let current of [player,target]){
let list1=list.slice(),choiceList1=choiceList.slice();
list1=list1.filter(control=>{
if(control=='无法选择') return false;
if(control=='重铸') return current.countCards('he',card=>current.canRecast(card));
if(control=='出杀') return current.countCards('he',card=>card.name=='sha'&&current.hasUseTarget(card));
if(control=='弃牌') return current.countCards('he',card=>lib.filter.cardDiscardable(card,current))>1;
});
choiceList1=choiceList.filter(control=>{
if(choiceList.indexOf(control)==0) return current.countCards('he',card=>current.canRecast(card));
if(choiceList.indexOf(control)==1) return current.countCards('he',card=>card.name=='sha'&&current.hasUseTarget(card));
if(choiceList.indexOf(control)==2) return current.countCards('he',card=>lib.filter.cardDiscardable(card,current))>1;
});
if(list1.length){
if(list1.length==1) result.push(list.indexOf(list1[0]));
else{
let result1=yield current.chooseControl(list1).set('ai',()=>{
const current=_status.event.player;
const controls=_status.event.controls.slice();
if(controls.includes('出杀')&&current.countCards('hs',card=>card.name=='sha'&&current.hasValueTarget(card))) return '出杀';
if(controls.includes('重铸')) return '重铸';
return '弃牌';
}).set('choiceList',choiceList1);
if(result1.control) result.push(list.indexOf(result1.control));
}
}
else result.push(3);
}
player.popup(list[result[0]]);
target.popup(list[result[1]]);
for(let current of [player,target]){
switch(list[result[current==player?0:1]]){
case '重铸':
let result2=yield current.chooseCard('he','请重铸一张牌',(card,player)=>player.canRecast(card),true);
if(result2.bool) current.recast(result2.cards);
break;
case '出杀':
current.chooseToUse({
prompt:'请使用一张【杀】',
filterCard:function(card,player){
if(card.name!='sha') return false;
return lib.filter.filterCard.apply(this,arguments);
},
forced:true,
ai1:function(card){
return _status.event.player.getUseValue(card);
},
});
break;
case '弃牌':
current.chooseToDiscard('he',2,true);
break;
}
}
},
ai:{
order:function(item,player){
return get.order({name:'sha'},player)-0.1;
},
result:{
target:function(player,target){
const att=get.attitude(player,target);
if(target.countCards('hs',card=>{
return card.name=='sha'&&game.hasPlayer(current=>{
return target.canUse(card,current)&&get.effect(current,card,target,target)>0&&get.effect(current,card,target,player)>0;
});
})) return 3;
if(att>0) return 2;
if(!target.countCards('h')) return get.sgn(att)+(att==0?1:0);
return 0;
},
},
},
group:'olchanshuang_end',
subSkill:{
end:{
audio:'olchanshuang',
trigger:{player:'phaseJieshuBegin'},
filter:function(event,player){
return player.getHistory('lose',evt=>{
if(evt.type=='discard'){
var evtx=evt.getl(player);
return evtx&&evtx.cards2.length==2;
}
return evt.getParent(2).name=='recast';
}).length||player.getHistory('useCard',evt=>evt.card.name=='sha').length;
},
forced:true,
locked:false,
content:function*(event,map){
let num=0,player=map.player;
if(player.getHistory('lose',evt=>evt.getParent(2).name=='recast').length) num++;
if(player.getHistory('useCard',evt=>evt.card.name=='sha').length) num++;
if(player.getHistory('lose',evt=>{
if(evt.type=='discard'){
var evtx=evt.getl(player);
return evtx&&evtx.cards2.length==2;
}
}).length) num++;
if(num&&player.countCards('he',card=>player.canRecast(card))){
let result=yield player.chooseCard('he','请重铸一张牌',(card,player)=>player.canRecast(card),true);
if(result.bool) yield player.recast(result.cards);
}
if(num>1&&player.countCards('he',card=>card.name=='sha'&&player.hasUseTarget(card))){
yield player.chooseToUse({
prompt:'请使用一张【杀】',
filterCard:function(card,player){
if(card.name!='sha') return false;
return lib.filter.filterCard.apply(this,arguments);
},
forced:true,
ai1:function(card){
return _status.event.player.getUseValue(card);
},
});
}
if(num>2&&player.countCards('he',card=>lib.filter.cardDiscardable(card,player))) yield player.chooseToDiscard('he',2,true);
},
},
},
},
olzhanjin:{
audio:2,
locked:true,
group:'olzhanjin_guanshi',
subSkill:{
guanshi:{
audio:'olzhanjin',
nobracket:true,
equipSkill:true,
trigger:{player:['shaMiss','eventNeutralized']},
filter:function(event,player){
if(!player.hasEmptySlot(1)||!lib.card.guanshi) return false;
if(event.type!='card'||event.card.name!='sha'||!event.target.isIn()) return false;
return player.countCards('he')>=2;
},
direct:true,
locked:false,
content:function(){
"step 0"
player.chooseToDiscard(get.prompt('olzhanjin_guanshi'),'弃置两张牌,令'+get.translation(trigger.card)+'强制命中',2,'he').set('ai',function(card){
var evt=_status.event.getTrigger();
if(get.attitude(evt.player,evt.target)<0){
if(player.needsToDiscard()) return 15-get.value(card);
if(evt.baseDamage+evt.extraDamage>=Math.min(2,evt.target.hp)) return 8-get.value(card);
return 5-get.value(card);
}
return -1;
}).set('complexCard',true).logSkill='olzhanjin_guanshi';
'step 1'
if(result.bool){
if(event.triggername=='shaMiss'){
trigger.untrigger();
trigger.trigger('shaHit');
trigger._result.bool=false;
trigger._result.result=null;
}
else trigger.unneutralize();
}
},
mod:{
attackRange:function(player,num){
if(lib.card.guanshi&&player.hasEmptySlot(1)) return num-lib.card.guanshi.distance.attackFrom;
},
},
ai:{
directHit_ai:true,
skillTagFilter:function(player,tag,arg){
if(player._olzhanjin_guanshi_temp||!player.hasEmptySlot(1)||!lib.card.guanshi) return;
player._guanshi_temp=true;
var bool=(get.attitude(player,arg.target)<0&&arg.card&&arg.card.name=='sha'&&player.countCards('he',card=>{
return card!=arg.card&&(!arg.card.cards||!arg.card.cards.includes(card))&&get.value(card)<5;
})>1);
delete player._olzhanjin_guanshi_temp;
return bool;
},
effect:{
target:function(card,player,target){
if(player==target&&get.subtype(card)=='equip1'){
if(get.equipValue(card)<=get.equipValue({name:'guanshi'})) return 0;
}
},
},
},
},
},
},
//曹宇
olgongjie:{
audio:2,
@ -764,9 +967,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
return cards.length-player.countCards('h')>0;
},
usable:1,
logTarget:()=>_status.currentPhase,
async content(event,trigger,player){
player.tempBanSkill('olxiangxv',null,false);
player.when({global:'phaseEnd'}).then(()=>{
if(target&&target.isIn()){
var num=target.countCards('h')-player.countCards('h');
@ -26815,6 +27018,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
olxiangxv_info:'当你的手牌数变为全场最少时,你可以获得以下效果:本回合结束时,将手牌数调整至与当前回合角色手牌数相同(至多摸至五张)。',
olxiangzuo:'襄胙',
olxiangzuo_info:'限定技,当你进入濒死状态时,你可以交给当前回合角色任意张牌,若如此做,若你本回合已对其发动过〖恭节〗或〖相胥〗,你回复等量的体力。',
liyi:'李异',
olchanshuang:'缠双',
olchanshuang_info:'①出牌阶段限一次你可以选择一名其他角色。你与其依次选择〖缠双③〗的一项然后你与其依次执行各自选择的项。②结束阶段若X大于0你执行〖缠双③〗的前X项X为你本回合以任意形式执行过的〖缠双③〗的选项数。③选项1.重铸一张牌2.使用一张【杀】3.弃置两张牌。',
olzhanjin:'蘸金',
olzhanjin_guanshi:'贯石斧(蘸金)',
olzhanjin_info:'锁定技,若你有空置的武器栏,则你视为装备【贯石斧】。',
sp_tianji:'天极·皇室宗亲',
sp_sibi:'四弼·辅国文曲',

View File

@ -6188,7 +6188,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player.chooseCard('he',get.prompt('twxingwu'),'将一张牌置于武将牌上作为“星舞”').set('ai',function(card){
if(_status.event.goon) return 20-get.value(card);
return 7-get.value(card);
}).set('goon',player.needsToDiscard()||player.getStorage('twxingwu').length>1);
}).set('goon',player.needsToDiscard()||player.getExpansions('twxingwu').length>1);
'step 1'
if(result.bool){
player.logSkill('twxingwu');
@ -8340,6 +8340,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
effect:{
intro:{content:'使用下一张牌时弃置&张牌'},
charlotte:true,
onremove:true,
audio:'twchayi',
trigger:{player:'useCard'},
forced:true,

View File

@ -9182,7 +9182,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
},
huaping:{
audio:'huaping',
audio:2,
trigger:{global:'die'},
limited:true,
skillAnimation:true,
@ -13859,7 +13859,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
dcjinjie:'尽节',
dcjinjie_info:'当一名角色进入濒死状态时可以令其摸一张牌。然后若你本轮未进行过回合你可以弃置X张手牌令其回复1点体力X为本轮你发动过〖尽节〗的次数。',
dcjue:'举讹',
dcjue_info:'准备阶段,你可以视为对一名未受伤的角色使用一张【杀】。',
dcjue_info:'准备阶段,你可以视为对一名体力值或手牌数大于你的角色使用一张【杀】。',
dc_tengfanglan:'滕芳兰',
dcluochong:'落宠',
dcluochong_info:'一轮游戏开始时,你可以弃置任意名角色区域里的共计至多[4]张牌,然后若你以此法弃置了一名角色的至少三张牌,则你方括号内的数字-1。',

BIN
image/character/liyi.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

View File

@ -7159,9 +7159,9 @@ export class Game extends Uninstantable {
}
for (let i = 0; i < event.config.num; i++) {
let rand2 = rand.randomGet();
for (let j = 0; j < rand2.length; j++) {
if (rand2[j] == rand2) {
rand2.splice(j--, 1);
for (let j = 0; j < rand.length; j++) {
if (rand[j] == rand2) {
rand.splice(j--, 1);
}
}
event.enemylist.push(event.enemy[rand2]);

View File

@ -12,11 +12,11 @@ export class Get extends Uninstantable {
static is = Is;
/**
* 获取当前内核版本信息
*
*
* 目前仅考虑`chrome`, `firefox``safari`三种浏览器的信息其余均归于其他范畴
*
*
* > 其他后续或许会增加`IE`永无可能
*
*
* @returns {["firefox" | "chrome" | "safari" | "other", number]}
*/
static coreInfo() {
@ -79,7 +79,7 @@ export class Get extends Uninstantable {
}
/**
* Generate an object URL from the Base64-encoded octet stream
*
*
* 从Base64编码的八位字节流生成对象URL
*/
static objectURL(octetStream) {
@ -91,7 +91,7 @@ export class Get extends Uninstantable {
}
/**
* Get the card name length
*
*
* 获取此牌的字数
*/
static cardNameLength(card, player) {
@ -102,7 +102,7 @@ export class Get extends Uninstantable {
//应变
/**
* Get the Yingbian conditions (of the card)
*
*
* 获取此牌的应变条件
*/
static yingbianConditions(card) { return get.complexYingbianConditions(card).concat(get.simpleYingbianConditions(card)); }
@ -116,7 +116,7 @@ export class Get extends Uninstantable {
}
/**
* Get the Yingbian effects (of the card)
*
*
* 获取此牌的应变效果
*/
static yingbianEffects(card) {
@ -125,7 +125,7 @@ export class Get extends Uninstantable {
}
/**
* Get the default Yingbian effect of the card
*
*
* 获取此牌的默认应变效果
*/
static defaultYingbianEffect(card) {
@ -154,9 +154,9 @@ export class Get extends Uninstantable {
}
/**
* 新装备栏相关
*
*
* 获取一张装备牌实际占用的装备栏(君曹操六龙)
*
*
* 用法同get.subtype返回数组
*/
static subtypes(obj, player) {
@ -506,14 +506,14 @@ export class Get extends Uninstantable {
}
/**
* @overload
* @param { string } name
* @param { string } name
* @returns { Character }
*/
/**
* @template { 0 | 1 | 2 | 3 | 4 } T
* @overload
* @param { string } name
* @param { T } num
* @param { string } name
* @param { T } num
* @returns { Character[T] }
*/
static character(name, num) {
@ -794,9 +794,9 @@ export class Get extends Uninstantable {
}
/**
* 深拷贝函数虽然只处理了部分情况
*
*
* 除了普通的Object和NullObject均不考虑自行赋值的数据但会原样将Symbol复制过去
*
*
* @template T
* @param {T} obj - 要复制的对象若不是对象则直接返回原值
* @param {boolean} [copyKeyDeep = false] - 是否深复制`Map``key`
@ -1586,52 +1586,52 @@ export class Get extends Uninstantable {
*/
/**
* @overload
* @param { string } obj
* @param { string } obj
* @returns { 'position' | 'natures' | 'nature' }
*/
/**
* @overload
* @param { Player[] } obj
* @param { Player[] } obj
* @returns { 'players' }
*/
/**
* @overload
* @param { Card[] } obj
* @param { Card[] } obj
* @returns { 'cards' }
*/
/**
* @overload
* @param { [number, number] } obj
* @param { [number, number] } obj
* @returns { 'select' }
*/
/**
* @overload
* @param { [number, number, number, number] } obj
* @param { [number, number, number, number] } obj
* @returns { 'divposition' }
*/
/**
* @overload
* @param { Button } obj
* @param { Button } obj
* @returns { 'button' }
*/
/**
* @overload
* @param { Card } obj
* @param { Card } obj
* @returns { 'card' }
*/
/**
* @overload
* @param { Player } obj
* @param { Player } obj
* @returns { 'player' }
*/
/**
* @overload
* @param { Dialog } obj
* @param { Dialog } obj
* @returns { 'dialog' }
*/
/**
* @overload
* @param { GameEvent | GameEventPromise } obj
* @param { GameEvent | GameEventPromise } obj
* @returns { 'event' }
*/
static itemtype(obj) {
@ -1716,7 +1716,7 @@ export class Get extends Uninstantable {
return 0;
}
/**
*
*
* @param {Card | VCard} card
* @param {false | Player} [player]
* @returns {string}
@ -1736,7 +1736,7 @@ export class Get extends Uninstantable {
* @returns {string}
*/
static suit(card, player) {
if (!card) return;
if (typeof card !== 'object') return;
if (Array.isArray(card)) {
if (card.length == 1) return get.suit(card[0], player);
return 'none';
@ -1761,7 +1761,7 @@ export class Get extends Uninstantable {
* @returns {string}
*/
static color(card, player) {
if (!card) return;
if (typeof card !== 'object') return;
if (Array.isArray(card)) {
if (!card.length) return 'none';
const cards = card.slice(), color = get.color(cards.shift(), player);
@ -1790,7 +1790,7 @@ export class Get extends Uninstantable {
* @returns {number}
*/
static number(card, player) {
if (!card) return;
if (typeof card !== 'object') return;
//狗卡你是真敢出啊
var number = null;
if ('number' in card) {

View File

@ -203,6 +203,22 @@ export class Player extends HTMLDivElement {
handcards2: ui.create.div('.handcards'),
expansions: ui.create.div('.expansions')
};
if(lib.config.equip_span){
let observer = new MutationObserver(mutationsList=>{
for (let mutation of mutationsList) {
if (mutation.type === 'childList') {
const addedNodes = Array.from(mutation.addedNodes);
const removedNodes = Array.from(mutation.removedNodes);
if(addedNodes.some(card=>!card.classList.contains('emptyequip')) ||
removedNodes.some(card=>!card.classList.contains('emptyequip'))){
player.$handleEquipChange();
}
}
}
});
const config = { childList: true };
observer.observe(node.equips, config);
}
node.expansions.style.display = 'none';
const chainLength = game.layout == 'default' ? 64 : 40;
for (let repetition = 0; repetition < chainLength; repetition++) {
@ -2896,14 +2912,14 @@ export class Player extends HTMLDivElement {
}
else if (arg1[i] == 'e') {
for (j = 0; j < this.node.equips.childElementCount; j++) {
if (!this.node.equips.childNodes[j].classList.contains('removing') && !this.node.equips.childNodes[j].classList.contains('feichu')) {
if (!this.node.equips.childNodes[j].classList.contains('removing') && !this.node.equips.childNodes[j].classList.contains('feichu') && !this.node.equips.childNodes[j].classList.contains('emptyequip')) {
cards.push(this.node.equips.childNodes[j]);
}
}
}
else if (arg1[i] == 'j') {
for (j = 0; j < this.node.judges.childElementCount; j++) {
if (!this.node.judges.childNodes[j].classList.contains('removing') && !this.node.judges.childNodes[j].classList.contains('feichu')) {
if (!this.node.judges.childNodes[j].classList.contains('removing') && !this.node.judges.childNodes[j].classList.contains('feichu') && !this.node.judges.childNodes[j].classList.contains('emptyequip')) {
cards.push(this.node.judges.childNodes[j]);
if (this.node.judges.childNodes[j].viewAs && arguments.length > 1) {
this.node.judges.childNodes[j].tempJudge = this.node.judges.childNodes[j].name;
@ -3074,7 +3090,7 @@ export class Player extends HTMLDivElement {
var es = [];
if (arg3 !== false) {
for (i = 0; i < this.node.equips.childElementCount; i++) {
if (!this.node.equips.childNodes[i].classList.contains('removing') && !this.node.equips.childNodes[i].classList.contains('feichu')) {
if (!this.node.equips.childNodes[i].classList.contains('removing') && !this.node.equips.childNodes[i].classList.contains('feichu') && !this.node.equips.childNodes[i].classList.contains('emptyequip')) {
var equipskills = get.info(this.node.equips.childNodes[i]).skills;
if (equipskills) {
es.addArray(equipskills);
@ -3115,19 +3131,19 @@ export class Player extends HTMLDivElement {
for (i = 0; i < arg1.length; i++) {
if (arg1[i] == 'h') {
for (j = 0; j < this.node.handcards1.childElementCount; j++) {
if (!this.node.handcards1.childNodes[j].classList.contains('removing') && !this.node.handcards1.childNodes[j].classList.contains('feichu') && !this.node.handcards1.childNodes[j].classList.contains('glows')) {
if (!this.node.handcards1.childNodes[j].classList.contains('removing') && !this.node.handcards1.childNodes[j].classList.contains('feichu') && !this.node.handcards1.childNodes[j].classList.contains('emptyequip') && !this.node.handcards1.childNodes[j].classList.contains('glows')) {
cards.push(this.node.handcards1.childNodes[j]);
}
}
for (j = 0; j < this.node.handcards2.childElementCount; j++) {
if (!this.node.handcards2.childNodes[j].classList.contains('removing') && !this.node.handcards2.childNodes[j].classList.contains('feichu') && !this.node.handcards2.childNodes[j].classList.contains('glows')) {
if (!this.node.handcards2.childNodes[j].classList.contains('removing') && !this.node.handcards2.childNodes[j].classList.contains('feichu') && !this.node.handcards2.childNodes[j].classList.contains('emptyequip') && !this.node.handcards2.childNodes[j].classList.contains('glows')) {
cards.push(this.node.handcards2.childNodes[j]);
}
}
}
else if (arg1[i] == 'e') {
for (j = 0; j < this.node.equips.childElementCount; j++) {
if (!this.node.equips.childNodes[j].classList.contains('removing') && !this.node.equips.childNodes[j].classList.contains('feichu')) {
if (!this.node.equips.childNodes[j].classList.contains('removing') && !this.node.equips.childNodes[j].classList.contains('feichu') && !this.node.equips.childNodes[j].classList.contains('emptyequip')) {
cards.push(this.node.equips.childNodes[j]);
}
}
@ -3140,7 +3156,7 @@ export class Player extends HTMLDivElement {
}
else if (arg1[i] == 'j') {
for (j = 0; j < this.node.judges.childElementCount; j++) {
if (!this.node.judges.childNodes[j].classList.contains('removing') && !this.node.judges.childNodes[j].classList.contains('feichu')) {
if (!this.node.judges.childNodes[j].classList.contains('removing') && !this.node.judges.childNodes[j].classList.contains('feichu') && !this.node.judges.childNodes[j].classList.contains('emptyequip')) {
cards.push(this.node.judges.childNodes[j]);
if (this.node.judges.childNodes[j].viewAs && arguments.length > 1) {
this.node.judges.childNodes[j].tempJudge = this.node.judges.childNodes[j].name;
@ -9090,6 +9106,66 @@ export class Player extends HTMLDivElement {
}
}
}
$handleEquipChange(){
let player = this;
const cards = Array.from(this.node.equips.childNodes);
const cardsResume = cards.slice(0);
cards.forEach(card=>{
if(card.name.indexOf('empty_equip') == 0){
let num = get.equipNum(card);
let remove = false;
if((num == 4 || num == 3) && get.is.mountCombined()){
remove = !this.hasEmptySlot('equip3_4') || this.getEquips('equip3_4').length;
}else if(!this.hasEmptySlot(num) || this.getEquips(num).length){
remove = true;
}
if(remove){
this.node.equips.removeChild(card);
cardsResume.remove(card);
}
}
});
for(let i=1;i<=4;i++){
let add = false;
if((i == 4 || i == 3) && get.is.mountCombined()){
add = this.hasEmptySlot('equip3_4') && !this.getEquips('equip3_4').length;
}else{
add = this.hasEmptySlot(i) && !this.getEquips(i).length;
}
if(add && !cardsResume.some(card=>{
let num = get.equipNum(card);
if((i==4|| i==3) && get.is.mountCombined()){
return num == 4 || num == 3;
}else{
return num == i;
}
})){
const card = game.createCard('empty_equip' + i,'', '');
card.fix();
console.log('add '+card.name);
card.style.transform = '';
card.classList.remove('drawinghidden');
card.classList.add('emptyequip');
card.classList.add('hidden');
delete card._transform;
const equipNum = get.equipNum(card);
let equipped = false;
for (let j = 0; j < player.node.equips.childNodes.length; j++) {
if (get.equipNum(player.node.equips.childNodes[j]) >= equipNum) {
player.node.equips.insertBefore(card, player.node.equips.childNodes[j]);
equipped = true;
break;
}
}
if (!equipped) {
player.node.equips.appendChild(card);
if (_status.discarded) {
_status.discarded.remove(card);
}
}
}
}
}
$equip(card) {
game.broadcast(function (player, card) {
player.$equip(card);

View File

@ -3056,6 +3056,12 @@ export class Library extends Uninstantable {
lib.init.cssstyles();
}
},
equip_span:{
name: '装备牌占位',
intro:'打开后,没有装备的装备区将在装备栏占据空白位置。',
init: false,
unfrequent:false,
},
fold_card: {
name: '折叠手牌',
init: true,
@ -9577,6 +9583,30 @@ export class Library extends Uninstantable {
type: "equip",
subtype: "equip6",
},
empty_equip1: {
type: "equip",
subtype: "equip1",
},
empty_equip2: {
type: "equip",
subtype: "equip2",
},
empty_equip3: {
type: "equip",
subtype: "equip3",
},
empty_equip4: {
type: "equip",
subtype: "equip4",
},
empty_equip5: {
type: "equip",
subtype: "equip5",
},
empty_equip6: {
type: "equip",
subtype: "equip6",
},
zhengsu_leijin: {},
zhengsu_mingzhi: {},
zhengsu_bianzhen: {},