v1.10.10版本更新内容:
※我们继续和一些优秀且具有开源精神的代码编写者保持着积极合作。在这一版本中,我们通过接收GitHub的Pull Request,整合了@kuangshen04 @mengxinzxz @lieren2023 @nonameShijian @PZ157 @XboxSoldier @universe-st @copcap 等8位代码贡献者编写的代码。
※添加OL武将「界程普」「界虞翻」;手杀武将「杨奉」「谋夏侯惇」「谋高顺」。调整「彭羕」「张虎&乐綝」的技能。调整部分星武将、谋武将和族武将的分包。
※为满足手杀杨奉“将转换技改为非转换技”的需求,添加`get.is.zhuanhuanji(skill,player)`的函数。具体详见:https://github.com/libccy/noname/pull/1060
※将对决模式中的“官渡之战”改为可以切换同名武将。
※引入Vue3,为本体和扩展将来的界面优化做准备。具体详见:https://github.com/libccy/noname/pull/1067
※添加新的换肤机制,从而处理谋武将的双原画机制。具体详见:https://github.com/libccy/noname/pull/1056
※添加freeShan的skillTag,用于AI判断八卦阵等“没有代价的免费【闪】”。
※修复本体内的动态转化牌技能在game.check更新后可能出现问题的bug。
※其他bug修复,机制优化与AI调整。
This commit is contained in:
Spmario233 2024-03-13 09:42:40 +08:00 committed by GitHub
commit 18f2a85783
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
74 changed files with 66684 additions and 376 deletions

BIN
audio/die/dc_sb_simayi.mp3 Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
audio/skill/olsbhetao3.mp3 Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
audio/skill/olsbshenli3.mp3 Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
audio/skill/olsbyufeng2.mp3 Normal file

Binary file not shown.

Binary file not shown.

View File

@ -665,7 +665,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
mtg_feixu_skill_info:'准备阶段,随机将弃牌堆的一张牌置于牌堆顶。',
mtg_haidao:'海岛',
mtg_haidao_skill:'海岛',
mtg_haidao_info:'选项一获得1点护甲无视地图效果选项二弃置一张牌并回复1点体力。地图效果锁定技,当你获得护甲时,若你已受伤,改为回复等量体力。',
mtg_haidao_info:'选项一获得1点护甲无视地图效果选项二弃置一张牌并回复1点体力。地图效果锁定技,当你获得护甲时,若你已受伤,改为回复等量体力。',
mtg_haidao_skill_info:'锁定技,当你获得护甲时,若你已受伤,改为回复等量体力。',
mtg_youlin:'幽林',
mtg_youlin_skill:'幽林',
@ -686,7 +686,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
mtg_linzhongjianta_skill_info:'若你装备区内有武器牌,你可以将一张基本牌当作杀使用。',
mtg_cangbaohaiwan:'藏宝海湾',
mtg_cangbaohaiwan_skill:'藏宝海湾',
mtg_cangbaohaiwan_info:'选择一个展包,随机获得来自该扩展包的一张衍生牌。地图效果:你在摸牌时有可能摸到衍生牌。',
mtg_cangbaohaiwan_info:'选择一个展包,随机获得来自该扩展包的一张衍生牌。地图效果:你在摸牌时有可能摸到衍生牌。',
mtg_cangbaohaiwan_skill_info:'你在摸牌时有可能摸到衍生牌。',
mtg_longlushanfeng:'龙颅山峰',
mtg_longlushanfeng_skill:'龙颅山峰',

View File

@ -155,11 +155,13 @@ game.import('card',function(lib,game,ui,get,ai,_status){
next.set('useShan',(()=>{
if(target.hasSkillTag('noShan',null,event)) return false;
if(target.hasSkillTag('useShan',null,event)) return true;
if(event.baseDamage+event.extraDamage<=0 || target.isLinked()&&game.hasNature(event.card)&&get.attitude(target,player._trueMe||player)>0) return false;
if(target.isLinked()&&game.hasNature(event.card)&&get.attitude(target,player._trueMe||player)>0) return false;
if(event.baseDamage+event.extraDamage<=0&&!game.hasNature(event.card,'ice')) return false;
if(target.hasSkillTag('freeShan',false,event,true)) return true;
if(event.shanRequired>1&&target.mayHaveShan(target,'use',null,'count')<event.shanRequired-(event.shanIgnored||0)) return false;
if(event.baseDamage+event.extraDamage>=target.hp+
((player.hasSkillTag('jueqing',false,target)||target.hasSkill('gangzhi'))?target.hujia:0)) return true;
if(!game.hasNature(event.card, 'ice')&&get.damageEffect(target,player,target,get.nature(event.card))>=0) return false;
if(!game.hasNature(event.card,'ice')&&get.damageEffect(target,player,target,get.nature(event.card))>=0) return false;
return true;
})());
//next.autochoose=lib.filter.autoRespondShan;
@ -394,7 +396,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
useful:(card,i)=>{
let player = _status.event.player, basic = [7, 5.1, 2], num = basic[Math.min(2, i)];
if(player.hp>2&&player.hasSkillTag('maixie')) num *= 0.57;
if(player.getEquip('bagua') || player.getEquip('rewrite_bagua') || player.getEquip('renwang') || player.getEquip('rewrite_renwang')) num *= 0.8;
if(player.hasSkillTag('freeShan',false,null,true) || player.getEquip('rewrite_renwang')) num *= 0.8;
return num;
},
value:[7,5.1,2],
@ -2676,6 +2678,18 @@ game.import('card',function(lib,game,ui,get,ai,_status){
},
ai:{
respondShan:true,
freeShan:true,
skillTagFilter(player,tag,arg){
if(tag!=='respondShan'&&tag!=='freeShan') return;
if(player.hasSkillTag('unequip2')) return false;
if(!arg||!arg.player) return true;
if(arg.player.hasSkillTag('unequip',false,{
target:player
})||arg.player.hasSkillTag('unequip_ai',false,{
target:player
})) return false;
return true;
},
effect:{
target:function(card,player,target,effect){
if(target.hasSkillTag('unequip2')) return;

View File

@ -227,7 +227,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
diy_default:["diy_yuji","diy_caiwenji","diy_lukang","diy_zhenji","old_majun"],
diy_noname:['noname'],
diy_key:["key_lucia","key_kyousuke","key_yuri","key_haruko","key_umi","key_rei","key_komari","key_yukine","key_yusa","key_misa","key_masato","key_iwasawa","key_kengo","key_yoshino","key_yui","key_tsumugi","key_saya","key_harukakanata","key_inari","key_shiina","key_sunohara","key_rin","key_sasami","key_akane","key_doruji","key_yuiko","key_riki","key_hisako","key_hinata","key_noda","key_tomoya","key_nagisa","key_ayato","key_ao","key_yuzuru","sp_key_kanade","key_mio","key_midori","key_kyoko","key_shizuru","key_shiorimiyuki","key_miki","key_shiori","key_kaori","sp_key_yuri","key_akiko","key_abyusa","key_godan","key_yuu","key_ryoichi","key_kotori","key_jojiro","key_shiroha","key_shizuku","key_hiroto","key_sakuya","key_youta","key_rumi","key_chihaya","key_yukito","key_asara","key_kotomi","key_mia","key_kano","db_key_liyingxia","key_erika","key_satomi","key_iriya","key_fuuko"],
diy_trashbin:['junk_guanyu','junk_zhangjiao','old_jiakui','ol_guohuai','junk_zhangrang','old_bulianshi','junk_sunquan','ol_maliang','junk_liubei','junk_huangyueying','junk_lidian','junk_duanwei','junk_xuyou'],
diy_trashbin:['junk_guanyu','junk_zhangjiao','old_jiakui','ol_guohuai','junk_zhangrang','old_bulianshi','ol_maliang','junk_liubei','junk_huangyueying','junk_lidian','junk_duanwei','junk_xuyou'],
},
},
characterIntro:{
@ -17684,9 +17684,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return player.additionalSkills.junkyuheng&&player.additionalSkills.junkyuheng.length>0;
},
async content(event,trigger,player){
const skills = player.additionalSkills.junkyuheng;
const skillslength = player.additionalSkills.junkyuheng.length;
await player.removeAdditionalSkills('junkyuheng');
await player.draw(skills.length);
await player.draw(skillslength);
},
},
},

View File

@ -6835,17 +6835,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){
prompt:'将♦牌当做杀,♥牌当做桃,♣牌当做闪,♠牌当做无懈可击使用或打出',
//动态的viewAs
viewAs(cards,player){
var name=false;
var nature=null;
//根据选择的卡牌的花色 判断要转化出的卡牌是闪还是火杀还是无懈还是桃
switch(get.suit(cards[0],player)){
case 'club':name='shan';break;
case 'diamond':name='sha';nature='fire';break;
case 'spade':name='wuxie';break;
case 'heart':name='tao';break;
if(cards.length){
var name=false,nature=null;
//根据选择的卡牌的花色 判断要转化出的卡牌是闪还是火杀还是无懈还是桃
switch(get.suit(cards[0],player)){
case 'club':name='shan';break;
case 'diamond':name='sha';nature='fire';break;
case 'spade':name='wuxie';break;
case 'heart':name='tao';break;
}
//返回判断结果
if(name) return {name:name,nature:nature};
}
//返回判断结果
if(name) return {name:name,nature:nature};
return null;
},
//AI选牌思路
@ -6996,15 +6997,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){
enable:['chooseToUse','chooseToRespond'],
prompt:'将♦手牌当做火【杀】,♥手牌当做【桃】,♣手牌当做【闪】,♠手牌当做【无懈可击】使用或打出',
viewAs(cards,player){
var name=false;
var nature=null;
switch(get.suit(cards[0],player)){
case 'club':name='shan';break;
case 'diamond':name='sha';nature='fire';break;
case 'spade':name='wuxie';break;
case 'heart':name='tao';break;
if(cards.length){
var name=false,nature=null;
switch(get.suit(cards[0],player)){
case 'club':name='shan';break;
case 'diamond':name='sha';nature='fire';break;
case 'spade':name='wuxie';break;
case 'heart':name='tao';break;
}
if(name) return {name:name,nature:nature};
}
if(name) return {name:name,nature:nature};
return null;
},
check(card){

View File

@ -2775,7 +2775,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
order:7,
result:{
target(player,target){
if(player.getEquip('tengjia')||player.getEquip('bagua')) return -1;
if(player.getEquip('tengjia')||player.hasSkillTag('freeShan',false,{
player:target,
card:new lib.element.VCard({name:'sha'})
})) return -1;
if(get.effect(player,{name:'sha'},target,player)>=0) return -1;
if(!player.hasShan()){
if(ui.selected.targets.length) return 0;

View File

@ -136,6 +136,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}).length<4-player.getStorage('dcjianzhuan').length;
},
forced:true,
derivation:'dcjianzhuan_faq',
async content(event,trigger,player){
const evtx=event.getParent('phaseUse'),num=player.getHistory('useSkill',evt=>{
return evt.skill=='dcjianzhuan'&&evt.event.getParent('phaseUse')==evtx;
@ -163,6 +164,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
discard_target:{
intro:'拆牌',
introx:(num)=>'令一名角色弃置'+num+'张牌',
weight:1,
ai_effect(player,num){
return game.hasPlayer(target=>{
return get.effect(target,{name:'guohe_copy2'},player,player)>0;
@ -182,6 +184,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
draw_self:{
intro:'摸牌',
introx:(num)=>'摸'+num+'张牌',
weight:1,
ai_effect(player,num){
return 3;
},
@ -192,10 +195,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
recast_self:{
intro:'重铸',
introx:(num)=>'重铸'+num+'张牌',
weight:1,
ai_effect(player,num){
return 1;
},
async content(player,num=1){
if(!player.hasCard(lib.filter.cardRecastable,'he')) return;
const {result:{bool,cards}}=await player.chooseCard('重铸'+num+'张牌','he',num,lib.filter.cardRecastable,true).set('ai',lib.skill.zhiheng.check);
if(bool) await player.recast(cards);
},
@ -203,6 +208,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
discard_self:{
intro:'弃牌',
introx:(num)=>'弃置'+num+'张牌',
weight:'90%',
ai_effect(player,num){
let cards=player.getCards('hs');
cards.sort((a,b)=>get.value(b)-get.value(a));
@ -226,13 +232,36 @@ game.import('character',function(lib,game,ui,get,ai,_status){
forced:true,
async content(event,trigger,player){
const info=get.info('dcjianzhuan').choices;
let choices=[],map={};
let map={};
let unfixedWeightTotal=0,remainedWeight=100;
let entries=[];
for(const i in info){
map[info[i].intro]=i;
const infox=info[i];
map[infox.intro]=i;
if(player.getStorage('dcjianzhuan').includes(i)) continue;
choices.push(info[i].intro);
let weight=(infox.weight||1).toString();
if(weight.endsWith('%')){
weight=Math.min(remainedWeight,parseInt(weight.slice(0,-1)));
entries.push([infox.intro,weight]);
remainedWeight-=weight;
}
else{
weight=parseInt(weight);
unfixedWeightTotal+=weight;
entries.push([infox.intro,-weight]);
}
}
const removeChoice=choices.randomGet();
entries=entries.map(entry=>{
let weight=entry[1];
if(weight<0) weight=-remainedWeight/unfixedWeightTotal*weight;
return [entry[0],weight];
});
let rand=Math.random()*100;
let removeChoice=entries.find(entry=>{
rand-=entry[1];
return rand<0;
})[0];
if(get.isLuckyStar(player)&&Object.keys(entries).includes('弃牌')) removeChoice='弃牌';
player.markAuto('dcjianzhuan',[map[removeChoice]]);
player.popup(removeChoice);
game.log(player,'移去了','#g'+removeChoice,'项');
@ -276,9 +305,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if(!player.getStorage('dcjianzhuan').includes(i)) choices.push(i);
}
if(choices.length){
const choice=choices.randomGet();
for(let i=1;i<=3;i++){
await info[choice].content(player,1);
for(const choice of choices){
for(let i=1;i<=3;i++){
await info[choice].content(player,1);
}
}
}
await player.gainMaxHp(2);
@ -1172,22 +1202,24 @@ game.import('character',function(lib,game,ui,get,ai,_status){
dczixi:{
init(){
game.addGlobalSkill('dczixi_judge');
game.broadcastAll((list)=>{
list.forEach(name=>{
const namex='dczixi_'+name;
if(!lib.card[namex]){
lib.card[namex]={
type:'special_delay',
fullskin:true,
noEffect:true,
wuxieable:false,
};
lib.card[namex].cardimage=name;
lib.translate[namex]=lib.translate[name]+'·姊希';
lib.translate[namex+'_info']='由【姊希】技能创造的无效果【'+lib.translate[name]+'】';
}
});
},lib.skill.dczixi.zixiList);
game.broadcastAll(()=>lib.skill.dczixi.video());
},
video(){
const list=lib.skill.dczixi.zixiList;
for(const name of list){
const namex='dczixi_'+name;
if(!lib.card[namex]){
lib.card[namex]={
type:'special_delay',
fullskin:true,
noEffect:true,
wuxieable:false,
};
lib.card[namex].cardimage=name;
lib.translate[namex]=lib.translate[name]+'·姊希';
lib.translate[namex+'_info']='由【姊希】技能创造的无效果【'+lib.translate[name]+'】';
}
}
},
audio:2,
trigger:{player:['phaseUseBegin','phaseUseEnd']},
@ -1201,6 +1233,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
zixiList:['lebu','bingliang','shandian'],
direct:true,
async content(event,trigger,player){
game.addVideo('skill',player,['dczixi',[]]);
const names=lib.skill.dczixi.zixiList.filter(name=>{
return player.countCards('h',card=>{
return card.hasGaintag('dcqiqin_tag')&&game.hasPlayer(target=>target.canAddJudge(get.autoViewAs({name:'dczixi_'+name},[card])));
@ -2318,7 +2351,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
result:{
target:function(player,target){
if(player.getStorage('dclvecheng_xiongluan').includes(target)) return 0;
if(target.getEquip('bagua')||target.getEquip('rewrite_bagua')) return -0.6;
if(target.hasSkillTag('freeShan',false,{
player:player
},true)) return -0.6;
var hs=player.countCards('h',card=>{
if(!player.canUse(card,target)) return false;
return get.name(card)=='sha'&&get.effect(target,card,player,player)>0;
@ -6086,8 +6121,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
trigger.baseDamage++;
player.addSkill('dccuijin_damage');
player.markAuto('dccuijin_damage',[trigger.card]);
if(!player.storage.dccuijin_map) player.storage.dccuijin_map={};
player.storage.dccuijin_map[trigger.card.cardid]=trigger.targets.slice();
if(!player.storage.dccuijin_map) player.storage.dccuijin_map={cards:[],targets:[]};
player.storage.dccuijin_map.cards.push(trigger.card);
player.storage.dccuijin_map.targets.push(trigger.targets.slice());
}
},
subSkill:{
@ -6108,7 +6144,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
content:function(){
'step 0'
var card=trigger.card;
var card=trigger.card,idx=player.storage.dccuijin_map.cards.indexOf(card);
if(event.triggername=='useCardAfter'){
var cards=player.getStorage('dccuijin_damage');
cards=cards.remove(card);
@ -6116,10 +6152,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player.removeSkill('dccuijin_damage');
delete player.storage.dccuijin_map;
}
else delete player.storage.dccuijin_map[card.cardid];
else if(idx!==-1){
player.storage.dccuijin_map.cards.splice(idx,1);
player.storage.dccuijin_map.targets.splice(idx,1);
}
event.finish();
}
else{
else if(idx!==-1){
var target,source;
if(trigger.name.indexOf('damage')==0){
target=trigger.player;
@ -6129,11 +6168,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
target=trigger.target;
source=trigger.player;
}
if(player.storage.dccuijin_map[card.cardid].includes(target)&&!target.hasHistory('damage',evt=>{
if(player.storage.dccuijin_map.targets[idx].includes(target)&&!target.hasHistory('damage',evt=>{
return evt.card==card;
})){
player.logSkill('dccuijin_damage',source);
player.storage.dccuijin_map[card.cardid].remove(target);
player.storage.dccuijin_map.targets[idx].remove(target);
player.draw(2);
if(source&&source.isIn()){
player.line(trigger.player,'green');
@ -12998,6 +13037,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
dc_caoshuang_prefix:'新杀',
dcjianzhuan:'渐专',
dcjianzhuan_info:'锁定技。①当你于出牌阶段使用牌时你选择此阶段未执行过的一项执行⒈令一名角色弃置X张牌⒉摸X张牌⒊重铸X张牌⒋弃置X张牌X为此技能于本阶段的发动次数。②出牌阶段结束时若你本阶段执行过〖渐专①〗的所有选项则你随机移除〖渐专①〗的一项。',
dcjianzhuan_faq:'渐专概率',
dcjianzhuan_faq_info:'<br>当系统随机选择要删除的选项时“弃置X张牌”的选项概率固定为90%剩余选项平分剩余的的10%概率。<br>如第一次删除时删除弃牌选项概率为90%其余三个选项被删除的概率均为3.33%若删除了非弃牌选项第二次删除时删除弃牌选项的概率依旧是90%其余两个选项被删除的概率均为5%。',
dcfanshi:'返势',
dcfanshi_info:'觉醒技结束阶段若〖渐专①〗剩余选项数小于2则你执行三次X视为1的剩余选项然后增加2点体力上限并回复2点体力失去技能〖渐专〗并获得技能〖覆斗〗。',
dcfudou:'覆斗',

View File

@ -6,7 +6,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
connect:true,
characterSort:{
mobile:{
mobile_default:['xin_huojun','muludawang','mb_chengui','mb_huban','mb_xianglang','yanxiang','xin_wuban','laimin','baoxin','jiangji','liwei','xin_guozhao',"miheng","taoqian","lingcao","sunru","lifeng","zhuling","liuye","zhaotongzhaoguang","majun","simazhao","wangyuanji","pangdegong","shenpei","hujinding","zhangyì","jiakui","yangbiao","chendeng","dongcheng","yangyi","dengzhi","zhengxuan","sp_sufei","furong","dingyuan","simashi","yanghuiyu","hucheer","gongsunkang","nanhualaoxian","zhouqun","qiaozhou","fuqian","simafu","mayuanyi","yanpu","sunhanhua","sp_maojie","peixiu","sp_jianggan","ruanhui","xin_mamidi","sp_caosong","yangfu","wangjun","sp_pengyang","qianzhao",'shichangshi'],
mobile_default:['xin_huojun','muludawang','mb_chengui','mb_huban','mb_xianglang','yanxiang','xin_wuban','laimin','baoxin','jiangji','liwei','xin_guozhao',"miheng","taoqian","lingcao","sunru","lifeng","zhuling","liuye","zhaotongzhaoguang","majun","simazhao","wangyuanji","pangdegong","shenpei","hujinding","zhangyì","jiakui","yangbiao","chendeng","dongcheng","yangyi","dengzhi","zhengxuan","sp_sufei","furong","dingyuan","simashi","yanghuiyu","hucheer","gongsunkang","nanhualaoxian","zhouqun","qiaozhou","fuqian","simafu","mayuanyi","yanpu","sunhanhua","sp_maojie","peixiu","sp_jianggan","ruanhui","xin_mamidi","sp_caosong","yangfu","wangjun","sp_pengyang","qianzhao",'shichangshi','yangfeng'],
mobile_yijiang:["yj_zhanghe","yj_zhangliao","yj_xuhuang","yj_ganning",'yj_huangzhong','yj_weiyan','yj_zhoubuyi'],
mobile_standard:["xin_xiahoudun","xin_zhangfei"],
mobile_shenhua_feng:['re_xiaoqiao',"xin_zhoutai"],
@ -26,6 +26,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
},
character:{
yangfeng:['male','shu',4,['mbxuetu','mbweiming']],
xin_huojun:['male','shu',4,['sidai','jieyu'],['character:tw_huojun','die_audio:tw_huojun']],
muludawang:['male','qun','3/3/1',['shoufa','zhoulin','yuxiang']],
mb_chengui:['male','qun',3,['guimou','zhouxian']],
@ -178,6 +179,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
scs_gaowang:['male','qun','',['scsmiaoyu'],['unseen','sex:male_castrated']],
},
characterIntro:{
yangfeng:'杨奉197年/198年东汉末年将领。杨奉早年参加白波军起义曾经帮助李傕对抗郭汜后来背叛李傕。兴平二年加号兴义将军护送汉献帝刘协东归雒阳颇有功勋加号车骑将军屯兵于梁县。建安元年随着汉献帝迁都许县失去权力先后依附于袁术、吕布劫掠徐州和扬州地区。建安二年一说三年带兵进犯刘备领地被刘备诱杀。',
muludawang:'古典小说《三国演义》中的虚构人物,八纳洞主,孟获盟友。擅驱兽法,能行风雨,控制猛兽并指挥它们作战。在法术帮助下最初对蜀军取得一些胜利,但在诸葛亮的喷火木兽将他的动物吓跑后战败,最后死于乱军之中。',
laimin:'来敏165年—261年字敬达义阳新野人东汉太中大夫来歙之后司空来艳之子三国时期蜀汉官员。东汉末年逢董卓之乱来敏跟随姐夫黄琬到荆州避难黄琬是刘璋祖母的侄子来敏又与姐姐来氏入蜀被刘璋引为宾客。来敏喜欢读书尤其喜欢《左氏春秋》。刘备平定益州后以来敏为典学校尉后立太子来敏为家令。刘禅继位后任命来敏为虎贲中郎将诸葛亮驻汉中请来敏为军祭酒、辅军将军。却因其口出狂言而被罢官诸葛亮死后来敏历任大长秋、光禄大夫、执慎将军等职期间多次因说错话而被免官蜀汉景耀年间来敏去世时年九十七岁。',
shichangshi:'十常侍指中国东汉公元25年—220年灵帝时期168年-189年操纵政权的十二个宦官张让、赵忠、夏恽、郭胜、孙璋、毕岚、栗嵩、段珪、高望、张恭、韩悝、宋典在小说《三国演义》里十常侍指的是指张让、赵忠、封谞、段珪、曹节、侯览、蹇硕、程旷、夏恽、郭胜十人他们都任职中常侍。玩弄小皇帝于股掌之中以至灵帝称“张常侍是我父赵常侍是我母”。十常侍自己横征暴敛卖官鬻爵他们的父兄子弟遍布天下横行乡里祸害百姓无官敢管。人民不堪剥削、压迫纷纷起来反抗。当时一些比较清醒的官吏已看出宦官集团的黑暗腐败导致大规模农民起义的形势。郎中张钧在给皇帝的奏章中明确指出黄巾起义是外戚宦官专权逼出来的他说“张角所以能兴兵作乱万人所以乐附之者其源皆由十常侍多放父兄、子弟、婚宗、宾客典据州郡辜确财利侵略百姓百姓之怨无所告诉故谋议不轨聚为盗贼。”后被曹操、袁绍所歼。',
@ -394,6 +396,210 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
},
skill:{
//杨奉
mbxuetu:{
audio:2,
enable:'phaseUse',
usable:2,
filter(event,player){
if (player.countMark('mbxuetu_status') !== 1 && player.getStat('skill').mbxuetu) return false;
if (!player.storage.mbxuetu) return player.countCards('he');
return true;
},
zhuanhuanji2(skill, player){
return player.countMark('mbxuetu_status') !== 1;
},
filterCard(card,player){
if (player.countMark('mbxuetu_status') > 1) return false;
if (player.countMark('mbxuetu_status') === 1) {
if (player.getStorage('mbxuetu_used').includes(false)) return false;
return true;
}
return !player.storage.mbxuetu;
},
selectCard(){
const player = get.player();
if (player.countMark('mbxuetu_status') > 1) return -1;
if (player.countMark('mbxuetu_status') === 1) {
if (player.getStorage('mbxuetu_used').includes(false)) return -1;
if (player.getStorage('mbxuetu_used').includes(true)) return 1;
return [0,1];
}
return !player.storage.mbxuetu ? 1 : -1;
},
check(card){
return 6-get.value(card);
},
prompt(){
const player = get.player(), storage = player.storage.mbxuetu, status = player.countMark('mbxuetu_status');
if (status === 0) {
if (storage) return '转换技。出牌阶段限一次你可以失去1点体力然后令一名角色摸两张牌。';
return '转换技。出牌阶段限一次你可以弃置一张牌然后令一名角色回复1点体力。';
}
else if (status === 1) {
return '出牌阶段各限一次。⒈你可以弃置一张牌然后令一名角色回复1点体力⒉你可以失去1点体力然后令一名角色摸两张牌。';
}
else {
if (storage) return '转换技。出牌阶段限一次你可以摸一张牌然后对一名角色造成1点伤害。';
return '转换技。出牌阶段限一次你可以回复1点体力然后令一名角色弃置两张牌。';
}
},
position:'he',
filterTarget:true,
onremove:['mbxuetu','mbxuetu_status'],
derivation:['mbxuetu_achieve','mbxuetu_fail'],
async content(event,trigger,player){
const target = event.targets[0], storage = Boolean(player.storage.mbxuetu);
const status = player.countMark('mbxuetu_status');
player.changeZhuanhuanji('mbxuetu');
if (status < 2) {
if (!player.storage.mbxuetu_used) {
player.when(['phaseUseAfter', 'mbweiming_achieveAfter']).then(() => {
delete player.storage.mbxuetu_used;
});
}
player.markAuto('mbxuetu_used', storage);
if (status === 0 && !storage || status === 1 && event.cards.length) {
await target.recover();
}
else {
await player.loseHp();
await target.draw(2);
}
}
else {
if (!storage) {
await player.recover();
await target.chooseToDiscard(2,true,'he');
}
else {
await player.draw();
await target.damage();
}
}
},
mark:true,
marktext:'☯',
intro:{
content:(storage,player)=>{
if (!player.countMark('mbxuetu_status')) {
if (storage) return '转换技。出牌阶段限一次你可以失去1点体力然后令一名角色摸两张牌。';
return '转换技。出牌阶段限一次你可以弃置一张牌然后令一名角色回复1点体力。';
}
else {
if (storage) return '转换技。出牌阶段限一次你可以摸一张牌然后对一名角色造成1点伤害。';
return '转换技。出牌阶段限一次你可以回复1点体力然后令一名角色弃置两张牌。';
}
}
},
ai:{
order(item,player){
const status = player.countMark('mbxuetu_status');
if (status > 1) return Math.max(get.order({ name: 'guohe' }), get.order({ name: 'chuqibuyi' }));
if (status === 1 || player.storage.mbxuetu) return 9;
return 2;
},
result:{
target(player,target){
const status = player.countMark('mbxuetu_status');
if (status > 1) {
if (player.storage.mbxuetu) return -get.damageEffect(target, player, player) / 10;
return -2;
}
if (status === 0 && player.storage.mbxuetu || status === 1 && !ui.selected.cards.length) return 2;
const eff = get.recoverEffect(target, player, player);
return eff > 0 ? 2 : (eff < 0 ? -get.sgnAttitude(player, target) : 0);
},
player(player,target){
const status = player.countMark('mbxuetu_status');
if (status > 1) {
if (player.storage.mbxuetu) return 1;
return get.recoverEffect(player, player) / 6;
}
if (status === 1 || !player.storage.mbxuetu) return -0.5;
const eff = get.effect(player, {name: 'losehp'}, player, player);
if (eff >= 0) return Math.min(1, eff / 2);
const hp = player.getHp() + player.countCards('hes', card => {
return player.canSaveCard(card, player);
});
return -1.5 * Math.max(0, 3 - hp);
},
},
},
},
mbweiming:{
audio:2,
trigger:{
player:'phaseUseBegin',
},
filter(event,player){
return game.hasPlayer(current => {
return !player.getStorage('mbweiming').includes(current);
});
},
dutySkill:true,
forced:true,
direct:true,
group:['mbweiming_achieve', 'mbweiming_fail'],
async content(event, trigger, player){
const targets = await player.chooseTarget('威命:记录一名未记录过的角色','当你杀死没有被记录过的角色后,则〖威命〗使命成功;如果在你杀死这些角色中的一名之前,有被记录过的角色死亡,则你〖威命〗使命失败。',true)
.set('filterTarget', (card, player, target) => {
return !player.getStorage('mbweiming').includes(target);
})
.set('ai', target => {
if (target === player) return 1;
return 1 + Math.sqrt(Math.abs(get.attitude(player, target))) * Math.abs(get.threaten(target)) / Math.sqrt(target.getHp() + 1) / Math.sqrt(target.countCards('hes') + 1);
})
.forResultTargets();
if (targets && targets.length > 0) {
const target = targets[0];
player.logSkill('mbweiming', target);
player.markAuto('mbweiming', target);
}
},
intro:{
content: '已记录$',
},
subSkill: {
achieve: {
audio:'mbweiming',
trigger:{
source:'dieAfter',
},
filter(event,player){
return !player.getStorage('mbweiming').includes(event.player);
},
dutySkill:true,
forced:true,
skillAnimation:true,
animationColor:'fire',
async content(event, trigger, player){
game.log(player,'成功完成使命');
player.awakenSkill('mbweiming');
player.storage.mbxuetu_status = 1;
player.unmarkSkill('mbxuetu');
await game.asyncDelayx();
}
},
fail: {
audio:'mbweiming',
trigger:{
global:'dieAfter',
},
filter(event,player){
return player.getStorage('mbweiming').includes(event.player);
},
dutySkill:true,
forced:true,
async content(event, trigger, player){
game.log(player,'使命失败');
player.awakenSkill('mbweiming');
player.storage.mbxuetu_status = 2;
await game.asyncDelayx();
}
},
},
},
//霍骏
sidai:{
audio:'twsidai',
@ -15644,6 +15850,20 @@ game.import('character',function(lib,game,ui,get,ai,_status){
][['豹','鹰','熊','兔'].indexOf(zhoufa)];
return str+'。';
},
mbxuetu(player){
const xuetu=player.storage.mbxuetu, status = player.countMark('mbxuetu_status');
if (status === 0) {
if (!xuetu) return '转换技。出牌阶段限一次,<span class="bluetext">阴你可以弃置一张牌然后令一名角色回复1点体力</span>阳你可以失去1点体力然后令一名角色摸两张牌。';
return '转换技。出牌阶段限一次你可以弃置一张牌然后令一名角色回复1点体力<span class="bluetext">阳你可以失去1点体力然后令一名角色摸两张牌。</span>';
}
else if (status === 1) {
return lib.translate.mbxuetu_achieve_info;
}
else {
if (!xuetu) return '转换技。出牌阶段限一次,<span class="bluetext">阴你可以回复1点体力然后令一名角色弃置两张牌</span>阳你可以摸一张牌然后对一名角色造成1点伤害。';
return '转换技。出牌阶段限一次你可以回复1点体力然后令一名角色弃置两张牌<span class="bluetext">阳你可以摸一张牌然后对一名角色造成1点伤害。</span>';
}
},
},
perfectPair:{
simazhao:['simayi','jin_simayi','jin_wangyuanji'],
@ -16526,6 +16746,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){
sidai_info:'限定技出牌阶段你可以将手牌区内的所有基本牌当做【杀】使用。若此牌对应的实体牌中包含【闪】则目标角色成为此牌的目标后需弃置一张基本牌否则不可响应此牌包含【桃】则当目标角色受到此牌的伤害后其减1点体力上限。',
jieyu:'竭御',
jieyu_info:'结束阶段你可以从弃牌堆中获得共X张不同牌名的基本牌X为3-你上次发动〖竭御〗至今你成为其他角色使用伤害类卡牌目标的次数且X至少为1。',
yangfeng:'杨奉',
mbxuetu:'血途',
mbxuetu_info:'转换技。出牌阶段限一次你可以弃置一张牌然后令一名角色回复1点体力你可以失去1点体力然后令一名角色摸两张牌。',
mbxuetu_achieve:'血途·成功',
mbxuetu_achieve_info:'出牌阶段各限一次。⒈你可以弃置一张牌然后令一名角色回复1点体力⒉你可以失去1点体力然后令一名角色摸两张牌。',
mbxuetu_fail:'血途·失败',
mbxuetu_fail_info:'转换技。出牌阶段限一次你可以回复1点体力然后令一名角色弃置两张牌你可以摸一张牌然后对一名角色造成1点伤害。',
mbweiming:'威命',
mbweiming_info:'使命技,锁定技。①出牌阶段开始时,你记录一名未以此法记录过的角色。②成功:当你杀死一名未被〖威命①〗记录过的角色后,修改〖血途〗为成功版本。③失败:当一名被〖威命①〗记录过的角色死亡后,你修改〖血途〗为失败版本。',
mobile_standard:'手杀异构·标准包',
mobile_shenhua_feng:'手杀异构·其疾如风',

View File

@ -1100,7 +1100,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if(name=='sha'){
if(event.filterCard(get.autoViewAs({name},'unsure'),player,event)) list.push(['基本','','sha']);
for(var nature of lib.inpile_nature){
if(event.filterCard(get.autoViewAs({name,nature},'unsure'),player,event)) list.push(['基本','','sha',j]);
if(event.filterCard(get.autoViewAs({name,nature},'unsure'),player,event)) list.push(['基本','','sha',nature]);
}
}
else if(get.type(name)=='trick'&&event.filterCard(get.autoViewAs({name},'unsure'),player,event)) list.push(['锦囊','',name]);
@ -3480,6 +3480,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
usable:1,
filter:function(event,player){
var zhu=get.mode()=='identity'?get.zhu(player):game.filterPlayer(i=>i.getSeatNum()==1)[0];
if(!zhu) return false;
return zhu.countGainableCards(player,zhu==player?'ej':'hej');
},
filterTarget:function(card,player,target){

View File

@ -12,11 +12,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){
ol_sb_taishici:['male','wu',4,['olsbdulie','olsbdouchan']],
ol_gaoshun:['male','qun',4,['olxianzhen','decadejinjiu'],['die_audio:re_gaoshun']],
ol_sb_yuanshao:['male','qun',4,['olsbhetao','olsbshenli','olsbyufeng','olsbshishou'],['zhu']],
ol_yufan:['male','wu',3,['olzongxuan','olzhiyan'],['tempname:re_yufan','die_audio:re_yufan']],
ol_chengpu:['male','wu',4,['ollihuo','olchunlao'],['tempname:xin_chengpu','die_audio:xin_chengpu']],
},
characterSort:{
onlyOL:{
onlyOL_yijiang1:['ol_jianyong','ol_lingtong','ol_gaoshun'],
onlyOL_yijiang2:['ol_caozhang'],
onlyOL_yijiang2:['ol_caozhang','ol_chengpu'],
onlyOL_yijiang3:['ol_yufan'],
onlyOL_sb:['ol_sb_jiangwei','ol_sb_guanyu','ol_sb_taishici','ol_sb_yuanshao'],
},
},
@ -24,6 +27,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
characterReplace:{
},
characterSubstitute:{
ol_sb_yuanshao:[
],
},
card:{
sizhaojian:{
derivation:'ol_sb_yuanshao',
@ -44,10 +51,231 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
},
skill:{
//程普
ollihuo:{
audio:'relihuo',
trigger:{player:'useCard1'},
filter(event,player){
return event.card.name=='sha'&&!game.hasNature(event.card,'fire');
},
check(event,player){
let card=new lib.element.VCard(get.copy(event.card));
game.setNature(card,'fire');
const eff1=event.targets.reduce((sum,target)=>{
return sum+get.effect(target,event.card,player,player);
},0);
let targets=event.targets.slice();
if(get.info('lihuo2').filter(event,player)){
let targetx=game.filterPlayer(target=>{
return !targets.includes(target)&&player.canUse(card,target)&&get.effect(target,card,player,player)>0;
});
if(targetx.length) targets.add(targetx.sort((a,b)=>{
return get.effect(b,card,player,player)-get.effect(a,card,player,player);
})[0]);
}
const eff2=targets.reduce((sum,target)=>{
return sum+get.effect(target,card,player,player);
},0);
return eff2>eff1;
},
content(){
game.log(player,'将',trigger.card,'改为了火属性');
game.setNature(trigger.card,'fire');
player.when('useCardAfter').filter(evt=>evt==trigger).then(()=>{
if(game.hasPlayer2(target=>{
return target.getHistory('damage',evt=>evt.card&&evt.card==trigger.card).length;
})){
player.chooseToDiscard('he','疠火弃置一张牌或失去1点体力').set('ai',card=>{
const player=get.event('player');
if((get.name(card)=='tao'||get.name(card)=='jiu')&&lib.filter.cardSavable(card,player,player)) return -1;
if(player.hp<=1){
if(cards.length<player.getEnemies().length&&player.hasCard((cardx)=>{
return (get.name(cardx)=='tao'||get.name(cardx)=='jiu')&&lib.filter.cardSavable(cardx,player,player);
},'hs')) return 7-get.value(card);
return -1;
}
return 24-5*cards.length-2*Math.min(4,player.getHp())-get.value(card);
});
}
else event.finish();
}).then(()=>{
if(!result.bool) player.loseHp();
});
},
ai:{fireAttack:true},
group:'ollihuo_add',
subSkill:{
add:{
inherit:'lihuo2',
async content(event,trigger,player){
const {result:{bool,targets}}=await player.chooseTarget(get.prompt('ollihuo'),'为'+get.translation(trigger.card)+'增加一个目标',(card,player,target)=>{
const trigger=get.event().getTrigger();
return !trigger.targets.includes(target)&&player.canUse(trigger.card,target);
}).set('card',trigger.card).set('ai',target=>{
const player=get.event('player'),trigger=get.event().getTrigger();
return get.effect(target,trigger.card,player,player);
});
if(bool){
player.logSkill('ollihuo',targets);
trigger.targets.addArray(targets);
}
},
},
},
},
olchunlao:{
audio:'chunlao',
audioname:['xin_chengpu'],
trigger:{
player:'loseAfter',
global:'loseAsyncAfter',
},
filter(event,player){
if(event.type!='discard'||event.getlx===false) return false;
const evt=event.getl(player);
return evt&&evt.cards2&&evt.cards2.some(i=>i.name=='sha'&&get.position(i)=='d');
},
forced:true,
locked:false,
content(){
const evt=trigger.getl(player);
player.addToExpansion(evt.cards2.filter(i=>i.name=='sha'&&get.position(i)=='d'),'gain2').gaintag.add('olchunlao');
},
ai:{
effect:{
player(card,player,target){
if(_status.currentPhase!=player) return;
if(card.name=='sha'&&!player.getExpansions('olchunlao').length&&target.hp>1){
return 'zeroplayertarget';
}
},
},
},
intro:{
content:'expansion',
markcount:'expansion',
},
onremove(player,skill){
var cards=player.getExpansions(skill);
if(cards.length) player.loseToDiscardpile(cards);
},
group:'olchunlao_save',
subSkill:{
save:{
inherit:'chunlao2',
filter(event,player){
return event.type=='dying'&&event.dying&&event.dying.hp<=0&&player.getExpansions('olchunlao').length;
},
async content(event,trigger,player){
const target=event.targets[0];
const {result:{bool,links}}=await player.chooseCardButton(get.translation('olchunlao'),player.getExpansions('olchunlao'),true);
if(bool){
player.logSkill('olchunlao',target);
await player.loseToDiscardpile(links);
event.type='dying';
await target.useCard({name:'jiu',isCard:true},target);
}
},
ai:{
save:true,
skillTagFilter(player){
return player.getExpansions('olchunlao').length;
},
order:6,
result:{target:1},
},
},
},
},
//虞翻
olzongxuan:{
audio:'rezongxuan',
trigger:{global:['loseAfter','loseAsyncAfter']},
filter(event,player){
if(event.type!='discard'||event.getlx===false) return false;
return get.info('olzongxuan').getCards(event,player).length;
},
check(event,player){
if(event.getParent(3).name!='phaseDiscard') return false;
const cards=get.info('olzongxuan').getCards(event,player);
return game.hasPlayer(target=>{
if(cards.some(i=>get.type(i,target)=='equip')&&(get.attitude(player,target)>0||get.recoverEffect(target,player,player)>0)) return true;
if(cards.some(i=>get.type(i,target)!='equip')&&target.getHp()>=player.getHp()&&get.effect(target,{name:'losehp'},player,player)>0) return true;
return false;
});
},
async content(event,trigger,player){
const {result:{bool,moved}}=await player.chooseToMove('纵玄:将任意张牌置于牌堆顶',true).set('list',[
['本次弃置的牌',get.info('olzongxuan').getCards(trigger,player)],
['牌堆顶'],
]).set('filterOk',moved=>moved[1].length).set('processAI',list=>{
const player=get.event('player');
const cards=list[0][1].slice(),cards2=cards.filter(card=>{
return game.hasPlayer(target=>{
if(get.type(card,target)=='equip'&&(get.attitude(player,target)>0||get.recoverEffect(target,player,player)>0)) return true;
if(get.type(card,target)!='equip'&&target.getHp()>=player.getHp()&&get.effect(target,{name:'losehp'},player,player)>0) return true;
return false;
});
}),cards3=(cards2.length?cards2.randomGet():cards.randomGet());
return [[],[cards3]];
});
if(bool){
let cards=moved[1].slice();
game.log(player,'将',cards,'置于了牌堆顶');
while(cards.length){
ui.cardPile.insertBefore(cards.pop().fix(),ui.cardPile.firstChild);
}
}
},
getCards(event,player){
let cards=[];
for(const target of [player,player.getPrevious()]){
const evt=event.getl(target);
if(evt&&evt.cards2&&evt.cards2.some(i=>get.position(i)=='d')) cards.addArray(evt.cards2.filter(i=>get.position(i)=='d'));
}
return cards;
},
},
olzhiyan:{
audio:'zhiyan',
audioname:['re_yufan'],
trigger:{global:'phaseJieshuBegin'},
filter(event,player){
return event.player==player||event.player==player.getPrevious();
},
direct:true,
async content(event,trigger,player){
const {result:{bool,targets}}=await player.chooseTarget(get.prompt2('olzhiyan')).set('ai',target=>{
const player=get.event('player'),cards=get.event('cards');
if(!cards.length) return 0;
const card=cards[0];
if(get.type(card,target)=='equip'&&(get.attitude(player,target)>0||get.recoverEffect(target,player,player)>0)) return get.recoverEffect(target,player,player)+get.attitude(player,target);
if(get.type(card,target)!='equip'&&target.getHp()>=player.getHp()&&get.effect(target,{name:'losehp'},player,player)>0) return get.effect(target,{name:'losehp'},player,player);
return 0;
}).set('cards',Array.from(ui.cardPile.childNodes||[])||[]);
if(bool){
const target=targets[0];
player.logSkill('olzhiyan',target);
const {result}=await target.draw('visible');
if(result){
const card=result[0];
if(get.type(card,target)=='equip'){
if(target.getCards('h').includes(card)&&target.hasUseTarget(card)){
const {result:{bool}}=await target.chooseUseTarget(card,true,'nopopup');
if(bool) await target.recover();
}
}
else if(target.getHp()>=player.getHp()) await target.loseHp();
}
}
},
ai:{expose:0.2},
},
//OL谋袁绍
//真·四世三公——袁神,启动
olsbhetao:{
audio:2,
audio:3,
audioname:['ol_sb_yuanshao_shadow'],
trigger:{global:'useCardToPlayered'},
filter(event,player){
return event.player!=player&&event.isFirstTarget&&event.targets.length>1&&player.countCards('he',card=>{
@ -80,6 +308,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if(bool){
const target=targets[0];
player.logSkill('olsbhetao',target);
player.changeSkin('olsbhetao','ol_sb_yuanshao');
player.discard(cards);
trigger.getParent().effectCount++;
trigger.getParent().excluded.addArray(game.filterPlayer(i=>trigger.targets.includes(i)&&target!=i));
@ -110,7 +339,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
},
olsbshenli:{
audio:2,
audio:3,
audioname:['ol_sb_yuanshao_shadow'],
trigger:{player:'useCardToPlayered'},
filter(event,player){
if(!player.isPhaseUsing()||player.hasSkill('olsbshenli_used')) return false;
@ -145,6 +375,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return num2+(sum>player.countCards('h')?Math.min(5,sum):0)+(sum>player.getHp()?num2:0)>=num1;
},
async content(event,trigger,player){
player.changeSkin('olsbshenli','ol_sb_yuanshao_shadow');
player.addTempSkill('olsbshenli_used','phaseUseAfter');
trigger.getParent().targets.addArray(game.filterPlayer(target=>{
return !trigger.targets.includes(target)&&player.canUse(trigger.card,target,false);
@ -157,8 +388,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
const bool=(sum>player.countCards('h')),goon=(sum>player.getHp());
if(bool) player.draw(Math.min(5,sum));
if(goon){
const targets=game.filterPlayer(target=>trigger.targets.includes(target))
if(targets.length) player.useCard(trigger.card,targets,false);
const targets=game.filterPlayer(target=>trigger.targets.includes(target)&&player.canUse(trigger.card,target,false));
if(targets.length&&(!trigger.cards||!trigger.cards.length||trigger.cards.every(card=>{
return !get.owner(card);
}))) player.useCard(trigger.card,targets,false);
}
});
},
@ -166,7 +399,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
subSkill:{used:{charlotte:true}},
},
olsbyufeng:{
audio:1,
audio:2,
audioname2:{
ol_sb_yuanshao_shadow:'olsbyufeng_ol_sb_yuanshao_shadow',
},
trigger:{
global:'phaseBefore',
player:'enterGame',
@ -190,6 +426,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player.equip(card);
},
subSkill:{
ol_sb_yuanshao_shadow:{
audio:1,
},
sizhaojian:{
equipSkill:true,
mod:{
@ -247,7 +486,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
olsbshishou:{
unique:true,
audio:2,
audio:3,
audioname:['ol_sb_yuanshao_shadow'],
trigger:{global:['loseAfter','equipAfter','addJudgeAfter','gainAfter','loseAsyncAfter','addToExpansionAfter']},
filter(event,player){
if(player.getEquip(1)) return false;
@ -1040,7 +1280,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
olsbhetao:'合讨',
olsbhetao_info:'其他角色使用牌执行第一个目标后若此牌指定的目标数大于1则你可以弃置一张与此牌颜色相同的牌并令此牌改为对其中一名目标角色结算两次。',
olsbshenli:'神离',
olsbshenli_info:'出牌阶段限一次当你使用【杀】指定目标后你可以令所有可成为此牌目标的其他角色均成为此牌目标此牌结算完毕后若你因此牌造成的伤害值X大于你的手牌数你摸X张牌至多摸五张大于你的体力值令此牌额外结算一次。',
olsbshenli_info:'出牌阶段限一次当你使用【杀】指定目标后你可以令所有可成为此牌目标的其他角色均成为此牌目标此牌结算完毕后若你因此牌造成的伤害值X大于你的手牌数你摸X张牌至多摸五张大于你的体力值再次对所有目标角色中可以成为此牌目标的角色使用此牌。',
olsbyufeng:'玉锋',
olsbyufeng_sizhaojian:'思召剑',
olsbyufeng_block:'思召剑',
@ -1050,6 +1290,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){
sizhaojian_append:'<span class="text" style="font-family: yuanli">【思召剑】于闪闪节3月2日-3月15日外离开装备区后销毁此牌</span>',
olsbshishou:'士首',
olsbshishou_info:'主公技,其他群势力角色失去装备区的牌后,若你的装备区中没有武器牌,其可将【思召剑】置入你的装备区。',
ol_yufan:'OL界虞翻',
ol_yufan_prefix:'OL界',
olzongxuan:'纵玄',
olzongxuan_info:'当你或你的上家因弃置而失去牌后,你可以将位于弃牌堆的这些牌中的任意牌以任意顺序置于牌堆顶。',
olzhiyan:'直言',
olzhiyan_info:'你或你的上家的结束阶段你可以令一名角色正面朝上摸一张牌然后若此牌为装备牌则其使用此牌并回复1点体力不为装备牌且其体力值大于等于你则其失去1点体力。',
ol_chengpu:'OL界程普',
ol_chengpu_prefix:'OL界',
ollihuo:'疠火',
ollihuo_info:'①你使用的非火【杀】可以改为火【杀】若如此做此牌结算完毕后若此牌造成过伤害则你弃置一张牌或失去1点体力。②你使用火【杀】可以额外指定一个目标。',
olchunlao:'醇醪',
olchunlao_info:'①当你的【杀】因弃置进入弃牌堆后,你将位于弃牌堆的这些牌称为“醇”置于武将牌上。②一名角色处于濒死状态时,你可以将一张“醇”置入弃牌堆,然后令其视为使用一张【酒】。',
onlyOL_yijiang1:'OL专属·将1',
onlyOL_yijiang2:'OL专属·将2',

View File

@ -2295,7 +2295,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
direct:true,
content:function(){
"step 0"
var dis=trigger.target.countCards('h','shan')||trigger.target.getEquip('bagua')||trigger.target.countCards('h')>2;
var dis=trigger.target.countCards('h','shan')||trigger.target.hasSkillTag('freeShan',false,{
player:player,
card:trigger.card
},true)||trigger.target.countCards('h')>2;
var att=get.attitude(player,trigger.target);
var next=player.chooseToDiscard(get.prompt('xiandan'));
next.ai=function(card){

View File

@ -920,6 +920,7 @@ window.noname_character_rank={
'sp_jiangwan',
'xinchang',
'xin_yufan',
'ol_yufan',
'tw_re_caohong',
'tw_mayunlu',
'tw_hucheer',
@ -1068,6 +1069,9 @@ window.noname_character_rank={
'shen_xuzhu',
'dc_jiangji',
'dc_wangling',
'yangfeng',
'sb_xiahoudun',
'sb_gaoshun',
],
b:[
'junk_guanyu',
@ -1536,6 +1540,7 @@ window.noname_character_rank={
'sp_jiben',
'sp_fuwan',
're_chengpu',
'ol_chengpu',
're_niujin',
'wangfuzhaolei',
'caizhenji',
@ -2406,6 +2411,7 @@ window.noname_character_rank={
're_liubiao',
'liubiao',
're_chengpu',
'ol_chengpu',
're_manchong',
're_yufan',
're_liru',
@ -2513,6 +2519,7 @@ window.noname_character_rank={
'sp_zhangchangpu',
'ol_dongzhao',
'xin_yufan',
'ol_yufan',
'xuangongzhu',
'xinchang',
'tw_mayunlu',

View File

@ -8698,14 +8698,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){
position:'hs',
prompt:'将杀当做闪,或将闪当做杀,或将桃当做酒,或将酒当做桃使用或打出',
viewAs:function(cards,player){
var name=false;
switch(get.name(cards[0],player)){
case 'sha':name='shan';break;
case 'shan':name='sha';break;
case 'tao':name='jiu';break;
case 'jiu':name='tao';break;
if(cards.length){
var name=false;
switch(get.name(cards[0],player)){
case 'sha':name='shan';break;
case 'shan':name='sha';break;
case 'tao':name='jiu';break;
case 'jiu':name='tao';break;
}
if(name) return {name:name};
}
if(name) return {name:name};
return null;
},
check:function(card){

View File

@ -5,12 +5,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
name:'sb',
connect:true,
character:{
sb_gaoshun:['male','qun',4,['sbxianzhen','sbjinjiu']],
sb_xiahoudun:['male','wei',4,['sbganglie','sbqingjian']],
sb_xunyu:['male','wei',3,['sbquhu','sbjieming']],
sb_caopi:['male','wei',3,['sbxingshang','sbfangzhu','sbsongwei'],['zhu']],
sb_guanyu:['male','shu',4,['sbwusheng','sbyijue']],
sb_huangyueying:['female','shu',3,['sbjizhi','sbqicai']],
sb_sp_zhugeliang:['male','shu',3,['sbhuoji','sbkanpo']],
sb_zhugeliang:['male','shu',3,['sbguanxing','sbkongcheng']],
sb_zhanghe:['male','wei',4,['sbqiaobian']],
sb_yujin:['male','wei',4,['sbxiayuan','sbjieyue']],
sb_huaxiong:['male','qun','3/4/1',['new_reyaowu','sbyangwei']],
@ -49,15 +50,345 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
characterSort:{
sb:{
sb_zhi:['sb_sunquan','sb_zhouyu','sb_zhangjiao','sb_caocao','sb_zhenji','sb_liubei','sb_daqiao','sb_liubiao','sb_sp_zhugeliang','sb_zhugeliang'],
sb_zhi:['sb_sunquan','sb_zhouyu','sb_zhangjiao','sb_caocao','sb_zhenji','sb_liubei','sb_daqiao','sb_liubiao','sb_sp_zhugeliang'],
sb_shi:['sb_xuhuang','sb_machao','sb_fazheng','sb_chengong','sb_diaochan','sb_pangtong','sb_zhanghe','sb_caopi'],
sb_tong:['liucheng','sp_yangwan','sb_xiahoushi','sb_zhangfei','sb_zhaoyun','sb_sunce','sb_zhurong','sb_xiaoqiao'],
sb_yu:['sb_yujin','sb_lvmeng','sb_huangzhong','sb_huanggai','sb_zhouyu','sb_caoren','sb_ganning','sb_yl_luzhi','sb_huangyueying'],
sb_neng:['sb_huaxiong','sb_sunshangxiang','sb_jiangwei','sb_yuanshao','sb_menghuo','sb_guanyu'],
sb_waitforsort:['sb_xunyu'],
sb_waitforsort:['sb_xunyu','sb_xiahoudun','sb_gaoshun'],
}
},
characterSubstitute:{
sb_sp_zhugeliang:[
],
},
skill:{
//高顺
sbxianzhen:{
audio:2,
enable:'phaseUse',
usable:1,
filterTarget(card,player,target){
return target!==player;
},
async content(event,trigger,player){
const target = event.targets[0];
player.addTempSkill('sbxianzhen_attack', 'phaseUseAfter');
player.markAuto('sbxianzhen_attack',target);
},
ai:{
expose: 0.2,
order(item,player){
return get.order({ name: 'sha' }) + 1;
},
result:{
target(player,target){
if (!player.countCards('hs', card => {
return get.name(card) === 'sha' && player.canUse(card, target, false);
})) return -0.1;
if (target.countCards('h') === 1 && player.canCompare(target)) return -2;
return -1.5;
},
}
},
subSkill:{
attack:{
audio:'sbxianzhen',
trigger:{player:'useCardToPlayered'},
filter(event,player){
if (event.card.name !== 'sha') return false;
return player.getStorage('sbxianzhen_attack').includes(event.target) && event.target.isIn() && player.canCompare(event.target);
},
charlotte:true,
onremove:true,
logTarget:'target',
check(event,player){
return get.attitude(player, event.target) < 0;
},
prompt(event,player){
return `陷阵:是否与${get.translation(event.target)}拼点?`
},
prompt2(event,player){
const target = event.target, card = event.card;
return `若你赢,${get.translation(card)}无视防具且不计入次数且若你本回合未以此法造成过伤害你对其造成1点伤害<br>若其拼点牌为【杀】,则你获得之;<br>若其拼点牌为其最后的手牌,则${get.translation(card)}对其造成伤害时,此伤害+1。`
},
group:'sbxianzhen_record',
async content(event,trigger,player){
const target = trigger.target, card = trigger.card;
const next = player.chooseToCompare(target);
let result = await next.forResult();
if (result.bool) {
target.addTempSkill('qinggang2');
target.storage.qinggang2.add(card);
if (trigger.addCount !== false) {
trigger.addCount = false;
const stat = player.getStat('card');
if (stat[card.name] && stat[card.name] > 0) stat[card.name]--;
}
game.log(card, '无视防具且不计入次数限制');
if (!player.storage.sbxianzhen_damaged) {
player.storage.sbxianzhen_damaged = true;
player.when('phaseAfter').then(() => {
delete player.storage.sbxianzhen_damaged;
})
await target.damage();
await game.asyncDelayx();
}
}
const toGain = [];
for (const lose_list of next.lose_list) {
let [comparer, cards] = lose_list;
if (!Array.isArray(cards)) cards = [cards];
if (comparer === player) continue;
for (const card of cards) {
if (get.name(card, comparer) == 'sha' && get.position(card, true) == 'd') {
toGain.push(card);
}
}
}
if (toGain.length) await player.gain(toGain, 'gain2');
if (player.getStorage('sbxianzhen_recorded').includes(target)) {
const id = target.playerid;
const map = trigger.getParent().customArgs;
if (!map[id]) map[id] = {};
if (typeof map[id].extraDamage != 'number') {
map[id].extraDamage = 0;
}
map[id].extraDamage++;
game.log(card, '对', target, '造成的伤害+1');
}
},
intro:{
content:'本阶段对$使用牌无距离限制,且使用杀指定其为目标后可以与其拼点',
},
mod:{
targetInRange(card,player,target){
if(player.getStorage('sbxianzhen_attack').includes(target)) return true;
},
}
},
record:{
trigger:{
global:'loseAsyncEnd',
},
charlotte:true,
silent:true,
filter(event,player){
if(event.getParent(2).name !== 'sbxianzhen_attack') return false;
return game.hasPlayer(current => {
if (current.countCards('h')) return false;
const evt = event.getl(current);
return evt && evt.hs && evt.hs.length;
});
},
async content(event,trigger,player){
const targets = [];
game.countPlayer(current => {
if (current.countCards('h')) return false;
const evt = trigger.getl(current);
if(evt && evt.hs && evt.hs.length) targets.add(current);
});
if (!player.storage.sbxianzhen_recorded) {
player.when('sbxianzhen_attackAfter').then(() => {
delete player.storage.sbxianzhen_recorded;
})
}
player.markAuto('sbxianzhen_recorded', targets);
},
},
}
},
sbjinjiu:{
audio:2,
inherit:'rejinjiu',
group:['sbjinjiu_decrease','sbjinjiu_compare'],
global:'sbjinjiu_global',
subSkill:{
decrease:{
audio:'sbjinjiu',
forced:true,
trigger:{player:'damageBegin4'},
filter(event,player){
return event.getParent(2).jiu;
},
async content(event,trigger){
trigger.num = 1;
},
ai:{
filterDamage:true,
skillTagFilter(player,tag,arg){
return arg&&arg.jiu;
},
},
},
global:{
mod:{
cardEnabled(card,player){
if(card.name=='jiu'&&_status.currentPhase&&_status.currentPhase!=player&&_status.currentPhase.hasSkill('sbjinjiu')) return false;
},
cardSavable(card,player){
if(card.name=='jiu'&&_status.currentPhase&&_status.currentPhase!=player&&_status.currentPhase.hasSkill('sbjinjiu')) return false;
},
},
},
compare:{
trigger:{
global:'compare',
},
filter(event,player){
const participant = [event.player];
if(event.targets) participant.addArray(event.targets);
else participant.add(event.target);
if (!participant.includes(player)) return false;
if (event.player !== player && event.card1 && event.card1.name === 'jiu') return true;
if (event.target !== player && event.card2 && event.card2.name === 'jiu') return true;
return false;
},
forced:true,
direct:true,
async content(event,trigger,player){
for (const [role, ind] of [['player',1], ['target',2]]){
const current = trigger[role], card = trigger[`card${ind}`];
if (current !== player && card && card.name === 'jiu') {
await player.logSkill('sbjinjiu_compare', current);
game.log(current, '拼点牌点数视为','#yA');
trigger[`num${ind}`] = 1;
}
}
}
},
},
},
//夏侯惇
sbganglie:{
audio:2,
enable:'phaseUse',
filter(event,player){
if (!event.sbganglie_enabledTargets) return false;
return game.hasPlayer(current=>{
return lib.skill.sbganglie.filterTarget(null,player,current);
});
},
onChooseToUse(event){
if (game.online || event.type !== 'phase') return;
const player = event.player;
const chosen = player.getAllHistory('useSkill', evt => evt.skill === 'sbganglie').map(evt => {
return evt.targets;
}).flat();
const targets = player.getAllHistory('damage', evt => evt.source && evt.source.isIn()).map(evt => evt.source).unique();
targets.removeArray(chosen);
event.set('sbganglie_enabledTargets',targets);
},
filterTarget(card,player,target){
return get.event('sbganglie_enabledTargets').includes(target);
},
async content(event,trigger,player){
event.targets[0].damage(2);
},
ai:{
order:6,
result:{
target:-2,
}
},
},
sbqingjian:{
audio:2,
trigger:{
global:['loseAfter','cardsDiscardAfter','loseAsyncAfter','equipAfter'],
},
forced:true,
locked:false,
filter(event,player){
if (player.getExpansions('sbqingjian').length >= Math.max(1, player.getHp() - 1)) return false;
if (event.name !== 'cardsDiscard') {
if (event.position !== ui.discardPile) return false;
if (!game.hasPlayer(current => {
const evt = event.getl(current);
return evt.cards && evt.cards.length > 0;
})) return false;
}
else{
const evt = event.getParent();
if (evt.relatedEvent && evt.relatedEvent.name === 'useCard') return false;
}
return true;
},
group:'sbqingjian_give',
async content(event,trigger,player){
let cards = trigger.cards.slice();
const maxNum = Math.max(1, player.getHp() - 1);
const myLen = player.getExpansions('sbqingjian').length, cardsLen = trigger.cards.length;
const overflow = myLen + cardsLen - maxNum;
if (overflow > 0) cards.randomRemove(overflow);
const next = player.addToExpansion(cards, 'gain2');
next.gaintag.add('sbqingjian');
await next;
},
marktext:'俭',
intro:{
content:'expansion',
markcount:'expansion',
},
subSkill:{
give:{
audio:'sbqingjian',
trigger:{player:'phaseUseEnd'},
filter(event,player){
return player.getExpansions('sbqingjian').length > 0;
},
forced:true,
locked:false,
async content(event,trigger,player){
if (_status.connectMode) game.broadcastAll(() => { _status.noclearcountdown = true });
const given_map = {};
event.given_map = given_map;
const expansions = player.getExpansions('sbqingjian');
let result;
while (true) {
if (expansions.length > 1) {
result = await player.chooseCardButton('清俭:请选择要分配的牌', true, expansions, [1, expansions.length]).set('ai', button => {
if (ui.selected.buttons.length) return 0;
return get.value(button.link, get.player());
}).forResult();
}
else if (expansions.length === 1) result = { bool: true, links: expansions.slice(0) };
else return;
if (!result.bool) return;
const toGive = result.links;
result = await player.chooseTarget(`选择一名角色获得${get.translation(toGive)}`, expansions.length === 1).set('ai', target => {
const att = get.attitude(get.player(), target);
if (get.event('toEnemy')) return Math.max(0.01, 100 - att);
else if (att > 0) return Math.max(0.1, att / Math.sqrt(1 + target.countCards('h') + (get.event().getParent().given_map[target.playerid] || 0)));
else return Math.max(0.01, (100 + att) / 200);
}).set('toEnemy', get.value(toGive[0], player, 'raw') < 0).forResult();
if (result.bool) {
expansions.removeArray(toGive);
if (result.targets.length) {
const id = result.targets[0].playerid;
if (!given_map[id]) given_map[id] = [];
given_map[id].addArray(toGive);
}
if (!expansions.length) break;
}
}
if (_status.connectMode) game.broadcastAll(() => { delete _status.noclearcountdown; game.stopCountChoose() });
const gain_list = [];
for (const i in given_map) {
const source = (_status.connectMode ? lib.playerOL : game.playerMap)[i];
player.line(source, 'green');
gain_list.push([source, given_map[i]]);
game.log(source, '获得了', given_map[i]);
}
await game.loseAsync({
gain_list,
giver: player,
animate: 'gain2',
}).setContent('gaincardMultiple');
}
},
},
},
//荀彧
sbquhu:{
audio:2,
@ -936,8 +1267,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
sbyijue:{
audio:2,
trigger:{source:'damageBegin2'},
trigger:{global:'damageBegin4'},
filter:function(event,player){
if(!event.source||event.source!=player||event.player==player) return false;
return event.num>=event.player.hp&&!player.getStorage('sbyijue').includes(event.player);
},
forced:true,
@ -1248,15 +1580,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
async content(event,trigger,player){
player.awakenSkill('sbhuoji');
game.log(player,'成功完成使命');
if (get.character(player.name1)[3].includes('sbhuoji')) {
player.reinitCharacter(player.name1, 'sb_zhugeliang', false);
}
else if (player.name2&&get.character(player.name2)[3].includes('sbhuoji')) {
player.reinitCharacter(player.name2, 'sb_zhugeliang', false);
}
else{
player.changeSkills(['sbguanxing','sbkongcheng'],['sbhuoji','sbkanpo']);
}
player.changeSkin('sbhuoji','sb_zhugeliang');
player.changeSkills(['sbguanxing','sbkongcheng'],['sbhuoji','sbkanpo']);
},
},
fail:{
@ -1296,7 +1621,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
sbkanpo:{
init:function(player){
if(!player.storage.sbkanpo){
player.storage.sbkanpo=[get.mode()=='doudizhu'?2:4,[],[]];
player.storage.sbkanpo=[(get.mode()=='doudizhu'||(get.mode()=='versus'&&_status.mode=='two'))?2:4,[],[]];
player.markSkill('sbkanpo');
}
},
@ -6675,15 +7000,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){
sbtianxiang:'天香',
sbtianxiang_info_identity:'①出牌阶段限三次你可以交给一名没有“天香”标记的其他角色一张红色牌然后令其获得此牌花色的“天香”标记。②当你受到伤害时你可以移去一名角色的“天香”标记若此“天香”标记为红桃你防止此伤害其受到伤害来源对其造成的1点伤害若没有伤害来源则改为无来源伤害方片其交给你两张牌。③准备阶段你移去场上所有的“天香”标记然后摸等量的牌。',
sbtianxiang_info:'①出牌阶段限三次你可以交给一名没有“天香”标记的其他角色一张红色牌然后令其获得此牌花色的“天香”标记。②当你受到伤害时你可以移去一名角色的“天香”标记若此“天香”标记为红桃你防止此伤害其受到伤害来源对其造成的1点伤害若没有伤害来源则改为无来源伤害方片其交给你两张牌。③准备阶段你移去场上所有的“天香”标记然后摸X张牌X为移去的“天香”标记数+2。',
sb_sp_zhugeliang:'谋卧龙',
sb_sp_zhugeliang:'谋诸葛亮',
sb_sp_zhugeliang_prefix:'谋',
sb_zhugeliang:'谋诸葛亮',
sb_zhugeliang_prefix:'谋',
sbhuoji:'火计',
sbhuoji_info:'使命技。①使命出牌阶段限一次。你可以对一名其他角色造成1点火焰伤害然后你对所有与其势力相同的不为其的其他角色各造成1点火焰伤害。②成功准备阶段若你本局游戏已造成的火焰伤害不小于本局游戏总角色数则你失去〖火计〗和〖看破〗然后获得〖观星〗和〖空城〗。③失败使命成功前进入濒死状态。',
sbkanpo:'看破',
sbkanpo_info:'①一轮游戏开始时你清除〖看破①〗记录的牌名然后你可以依次记录任意个未于上次发动〖看破①〗记录清除过的非装备牌牌名对其他角色不可见每局游戏至多记录4个牌名。②其他角色使用你〖看破①〗记录过的牌名的牌时你可以移去一个〖看破①〗中的此牌名的记录令此牌无效然后你摸一张牌。',
sbkanpo_info_doudizhu:'①一轮游戏开始时你清除〖看破①〗记录的牌名然后你可以依次记录任意个未于上次发动〖看破①〗记录清除过的非装备牌牌名对其他角色不可见每局游戏至多记录2个牌名。②其他角色使用你〖看破①〗记录过的牌名的牌时你可以移去一个〖看破①〗中的此牌名的记录令此牌无效然后你摸一张牌。',
sbkanpo_info_versus_two:'①一轮游戏开始时你清除〖看破①〗记录的牌名然后你可以依次记录任意个未于上次发动〖看破①〗记录清除过的非装备牌牌名对其他角色不可见每局游戏至多记录2个牌名。②其他角色使用你〖看破①〗记录过的牌名的牌时你可以移去一个〖看破①〗中的此牌名的记录令此牌无效然后你摸一张牌。',
sbguanxing:'观星',
sbguanxing_info:'①准备阶段你将所有“星”置入弃牌堆将牌堆顶的X张牌置于你的武将牌上称为“星”X为7-此前发动〖观星①〗次数的三倍且X至少为0。然后你可以将任意张“星”置于牌堆顶。②结束阶段若你未于本回合的准备阶段将“星”置于过牌堆顶你可以将任意张“星”置于牌堆顶。③你可以如手牌般使用或打出“星”。',
sbkongcheng:'空城',
@ -6703,7 +7027,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
sbwusheng_info:'你可以将一张手牌当作任意【杀】使用或打出。出牌阶段开始时,你可以选择一名非主公的其他角色,本阶段对其使用【杀】无距离和次数限制,使用【杀】指定其为目标后摸一张牌,对其使用三张【杀】后不能对其使用【杀】。',
sbwusheng_info_identity:'你可以将一张手牌当作任意【杀】使用或打出。出牌阶段开始时,你可以选择一名非主公的其他角色,本阶段对其使用【杀】无距离和次数限制,使用【杀】指定其为目标后摸两张牌,对其使用三张【杀】后不能对其使用【杀】。',
sbyijue:'义绝',
sbyijue_info:'锁定技,每名角色每局游戏限一次,当你对一名角色造成大于等于其体力值的伤害时,你防止此伤害,且本回合你使用牌指定其为目标时,此牌对其无效。',
sbyijue_info:'锁定技,每名角色每局游戏限一次,一名其他角色受到你对其造成大于等于其体力值的伤害时,你防止此伤害,且本回合你使用牌指定其为目标时,此牌对其无效。',
sb_caopi:'谋曹丕',
sb_caopi_prefix:'谋',
sbxingshang:'行殇',
@ -6718,6 +7042,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){
sbquhu_info:'出牌阶段限一次。你可以选择两名有牌的其他角色你与这些角色同时将任意张牌扣置于武将牌上。若你以此法扣置的牌唯一最少则扣置牌最多的其他角色获得你扣置的牌且这些角色获得各自扣置的牌否则这两名角色中扣置牌较多的角色对较少的角色造成1点伤害获得你扣置的牌然后这些角色将各自扣置的牌置入弃牌堆若这两名角色扣置的牌数相同视为与你逆时针最近座次的角色扣置牌较多。',
sbjieming:'节命',
sbjieming_info:'当你受到伤害后你可以令一名角色摸三张牌然后其可以弃置任意张牌。若其弃置的牌数不大于X你失去1点体力X为你已损失的体力值至少为1。',
sb_xiahoudun:'谋夏侯惇',
sb_xiahoudun_prefix:'谋',
sbganglie:'刚烈',
sbganglie_info:'出牌阶段你可以选择一名本局游戏对你造成过伤害且未以此法选择过的角色你对其造成2点伤害。',
sbqingjian:'清俭',
sbqingjian_info:'①当有一张牌不因使用而进入弃牌堆后若你的“清俭”数小于X你将此牌置于你的武将牌上称为“清俭”X为你的体力值-1且至少为1。②出牌阶段结束时你将所有“清俭”分配给任意角色。',
sb_gaoshun:'谋高顺',
sb_gaoshun_prefix:'谋',
sbxianzhen:'陷阵',
sbxianzhen_info:'出牌阶段限一次。你可以选择一名其他角色你于本阶段获得如下效果⒈你对其使用牌无距离限制⒉当你使用【杀】指定其为目标后你可以与其拼点若你赢此【杀】无视防具且不计入次数且若你本回合未以此法造成过伤害你对其造成1点伤害若其拼点牌为【杀】则你获得之若其拼点牌为其最后的手牌则此【杀】对其造成伤害时此伤害+1。',
sbjinjiu:'禁酒',
sbjinjiu_info:'锁定技。①你的【酒】均视为【杀】。②当你受到酒【杀】的伤害时你令此伤害减至1。③其他角色不能于你的回合内使用【酒】。④当一名其他角色的拼点牌亮出后若你为发起者或参与者且此牌为【酒】则此牌的点数视为A。',
sb_zhi:'谋攻篇·知',
sb_shi:'谋攻篇·识',

View File

@ -162,7 +162,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
else{
if(game.checkMod(card,player,'unchanged','cardEnabled2',player)===false) return false;
const cardx=get.autoViewAs({name:'tiesuo'},[card]);
return event._backup.filterCard(cardx,player,target);
return event._backup.filterCard(cardx,player,event);
}
},
filterTarget:function(fuck,player,target){
@ -1389,7 +1389,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
order:13,
result:{
target:(player,target)=>{
if(target.getEquip('bagua')||target.getEquip('rewrite_bagua')) return 0;
let hs=player.countCards('h',card=>{
if(!get.tag(card,'damage')||get.effect(target,card,player,player)<=0) return 0;
if(get.name(card,player)==='sha'){
@ -5435,6 +5434,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
ai:{
respondShan:true,
freeShan:true,
skillTagFilter(player,tag,arg){
if(tag!=='respondShan'&&tag!=='freeShan') return;
if(!player.hasEmptySlot(2)||player.hasSkillTag('unequip2')) return false;
if(!arg||!arg.player) return true;
if(arg.player.hasSkillTag('unequip',false,{
target:player
})||arg.player.hasSkillTag('unequip_ai',false,{
target:player
})) return false;
return true;
},
effect:{
target:function(card,player,target){
if(player==target&&get.subtype(card)=='equip2'){
@ -7716,7 +7727,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
},
characterReplace:{
caoren:['caoren','old_caoren','sb_caoren','new_caoren'],
caoren:['caoren','old_caoren','sb_caoren','new_caoren','star_caoren'],
sp_caoren:['sp_caoren','jsp_caoren'],
xiahouyuan:['re_xiahouyuan','ol_xiahouyuan','xiahouyuan'],
huangzhong:['re_huangzhong','ol_huangzhong','sb_huangzhong','huangzhong','jsrg_huangzhong'],
@ -7731,7 +7742,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
pangtong:['pangtong','ol_pangtong','re_pangtong','sb_pangtong'],
re_jsp_pangtong:['re_jsp_pangtong','jsrg_pangtong','sp_pangtong'],
taishici:['taishici','re_taishici','ol_sb_taishici'],
re_yuanshao:['re_yuanshao','ol_yuanshao','xin_yuanshao','ol_sb_yuanshao','sb_yuanshao'],
re_yuanshao:['re_yuanshao','ol_yuanshao','xin_yuanshao','ol_sb_yuanshao','star_yuanshao','sb_yuanshao'],
pangde:['re_pangde','ol_pangde','pangde'],
yanwen:['yanwen','ol_yanwen','re_yanwen'],
caopi:['caopi','re_caopi','ps_caopi','sb_caopi'],
@ -7740,7 +7751,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
zhurong:['zhurong','ol_zhurong','re_zhurong','sb_zhurong'],
sunjian:['sunjian','ol_sunjian','re_sunjian','tw_ol_sunjian'],
jiaxu:['jiaxu','re_jiaxu','ns_jiaxu','ps_jiaxu'],
dongzhuo:['dongzhuo','ol_dongzhuo','re_dongzhuo','sp_dongzhuo','yj_dongzhuo'],
dongzhuo:['dongzhuo','ol_dongzhuo','re_dongzhuo','star_dongzhuo','sp_dongzhuo','yj_dongzhuo'],
dengai:['dengai','ol_dengai','re_dengai'],
sp_ol_zhanghe:['sp_ol_zhanghe','yj_zhanghe','sp_zhanghe','jsrg_zhanghe'],
jiangwei:['jiangwei','ol_jiangwei','re_jiangwei','ol_sb_jiangwei','sb_jiangwei','jsrg_jiangwei'],

View File

@ -2413,9 +2413,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
ai:{
directHit_ai:true,
skillTagFilter:function(player,tag,arg){
if(!arg||!arg.card||!arg.target||(arg.card.name!='sha'&&arg.card.name!='juedou')) return false;
if(tag!=='directHit_ai'||!arg||!arg.card||!arg.target||(arg.card.name!='sha'&&arg.card.name!='juedou')) return false;
if(player.storage.counttrigger&&player.storage.counttrigger.dbquedi&&player.storage.counttrigger.dbquedi>0) return false;
if(arg.target.countCards('h')==1&&(arg.card.name!='sha'||!arg.target.getEquip('bagua')||player.hasSkillTag('unequip',false,{
if(arg.target.countCards('h')==1&&(arg.card.name!='sha'||!arg.target.hasSkillTag('freeShan',false,{
player:player,
card:arg.card
})||player.hasSkillTag('unequip',false,{
name:arg.card?arg.card.name:null,
target:arg.target,
card:arg.card
@ -5792,7 +5795,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if(name=='sha'){
if(event.filterCard(get.autoViewAs({name},'unsure'),player,event)) list.push(['基本','','sha']);
for(var nature of lib.inpile_nature){
if(event.filterCard(get.autoViewAs({name,nature},'unsure'),player,event)) list.push(['基本','','sha',j]);
if(event.filterCard(get.autoViewAs({name,nature},'unsure'),player,event)) list.push(['基本','','sha',nature]);
}
}
else if(get.type2(name)=='trick'&&event.filterCard(get.autoViewAs({name},'unsure'),player,event)) list.push(['锦囊','',name]);
@ -6510,7 +6513,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
characterReplace:{
wangcan:['wangcan','sp_wangcan','tw_wangcan'],
sunshao:['sunshao','sp_sunshao'],
xunchen:['xunchen','re_xunchen','sp_xunchen','tw_xunchen'],
xunchen:['xunchen','re_xunchen','sp_xunchen','tw_xunchen','clan_xunchen'],
xinpi:['xinpi','sp_xinpi'],
duyu:['duyu','dc_duyu','sp_duyu','pk_sp_duyu'],
zhangwen:['zhangwen','sp_zhangwen'],
@ -6524,7 +6527,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
liuzhang:['liuzhang','tw_liuzhang'],
chenzhen:['sp_chenzhen','tw_chenzhen'],
feiyi:['ol_feiyi','feiyi','tw_feiyi'],
wangling:['dc_wangling','wangling','tw_wangling'],
wangling:['dc_wangling','wangling','tw_wangling','clan_wangling'],
qiaogong:['qiaogong','tw_qiaogong'],
sp_chendong:['sp_chendong','tw_chendong','chendong'],
sp_jiangqing:['sp_jiangqing','tw_jiangqing','jiangqing'],

View File

@ -3248,11 +3248,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
audio:2,
enable:'chooseToUse',
hiddenCard:function(player,name){
if(name!='wuxie'&&lib.inpile.includes(name)&&lib.skill.olqifan.getNum()) return true;
if(name!='wuxie'&&lib.inpile.includes(name)) return true;
},
getNum:()=>game.getGlobalHistory('useCard').reduce((list,evt)=>list.add(get.type2(evt.card)),[]).length,
filter:function(event,player){
if(event.responded||event.type=='wuxie'||event.olqifan||!lib.skill.olqifan.getNum()) return false;
if(event.responded||event.type=='wuxie'||event.olqifan) return false;
for(var i of lib.inpile){
if(i!='wuxie'&&event.filterCard(get.autoViewAs({name:i},'unsure'),player,event)) return true;
}
@ -3263,7 +3263,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
'step 0'
var evt=event.getParent(2);
evt.set('olqifan',true);
var cards=get.bottomCards(lib.skill.olqifan.getNum(),true);
var cards=get.bottomCards(lib.skill.olqifan.getNum()+1,true);
var aozhan=player.hasSkill('aozhan');
player.chooseButton(['嚣翻:选择要使用的牌',cards]).set('filterButton',function(button){
return _status.event.cards.includes(button.link);
@ -15738,8 +15738,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if(get.attitude(player,event.player)>=0) return false;
var e2=player.getEquip(2);
if(e2){
if(e2.name=='tengjia') return true;
if(e2.name=='bagua') return true;
if(e2.name=='tengjia'||e2.name=='rewrite_tengjia') return true;
if(e2.name=='bagua'||e2.name=='rewrite_bagua') return true;
}
return event.player.countCards('h')>event.player.hp;
},
@ -18212,60 +18212,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
sha:{
audio:'fanghun',
inherit:'ollongdan',
enable:['chooseToUse','chooseToRespond'],
prompt:'弃置一枚【梅影】标记,将杀当做闪,或将闪当做杀,或将桃当做酒,或将酒当做桃使用或打出',
viewAs:function(cards,player){
var name=false;
switch(get.name(cards[0],player)){
case 'sha':name='shan';break;
case 'shan':name='sha';break;
case 'tao':name='jiu';break;
case 'jiu':name='tao';break;
}
if(name) return {name:name};
return null;
},
position:'hs',
check:function(card){
var player=_status.event.player;
if(_status.event.type=='phase'){
var max=0;
var name2;
var list=['sha','tao','jiu'];
var map={sha:'shan',tao:'jiu',jiu:'tao'}
for(var i=0;i<list.length;i++){
var name=list[i];
if(player.countCards('hs',map[name])>(name=='jiu'?1:0)&&player.getUseValue({name:name})>0){
var temp=get.order({name:name});
if(temp>max){
max=temp;
name2=map[name];
}
}
}
if(name2==get.name(card,player)) return 1;
return 0;
}
return 1;
},
filterCard:function(card,player,event){
event=event||_status.event;
var filter=event._backup.filterCard;
var name=get.name(card,player);
if(name=='sha'&&filter({name:'shan',cards:[card]},player,event)) return true;
if(name=='shan'&&filter({name:'sha',cards:[card]},player,event)) return true;
if(name=='tao'&&filter({name:'jiu',cards:[card]},player,event)) return true;
if(name=='jiu'&&filter({name:'tao',cards:[card]},player,event)) return true;
return false;
},
filter:function(event,player){
if(!player.storage.fanghun||player.storage.fanghun<=0) return false;
var filter=event.filterCard;
if(filter(get.autoViewAs({name:'sha'},'unsure'),player,event)&&player.countCards('hs','shan')) return true;
if(filter(get.autoViewAs({name:'shan'},'unsure'),player,event)&&player.countCards('hs','sha')) return true;
if(filter(get.autoViewAs({name:'jiu'},'unsure'),player,event)&&player.countCards('hs','jiu')) return true;
if(filter(get.autoViewAs({name:'tao'},'unsure'),player, event)&&player.countCards('hs','tao')) return true;
return false;
return player.hasMark('fanghun')&&get.info('ollongdan').filter(event,player);
},
onrespond:function(){return this.onuse.apply(this,arguments)},
onuse:function(result,player){
@ -18275,15 +18226,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
respondSha:true,
respondShan:true,
skillTagFilter:function(player,tag){
if(!player.storage.fanghun||player.storage.fanghun<0) return false;
var name;
switch(tag){
case 'respondSha':name='shan';break;
case 'respondShan':name='sha';break;
}
if(!player.countCards('hs',name)) return false;
if(!player.hasMark('fanghun')) return false;
return get.info('ollongdan').ai.skillTagFilter(player,tag);
},
order:function(item,player){
const awakened=Object.keys(player.storage).some(i=>typeof i=='string'&&i.indexOf('fuhan')!=-1);
if(player&&_status.event.type=='phase'){
var max=0;
var list=['sha','tao','jiu'];
@ -18295,11 +18242,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if(temp>max) max=temp;
}
}
if(max>0) max+=((player.storage.refuhan||player.storage.twfuhan)?0.3:-0.3);
if(max>0) max+=(awakened?0.3:-0.3);
return max;
}
if(!player) player=_status.event.player;
return (player.storage.refuhan||player.storage.twfuhan)?4:1;
return awakened?4:1;
},
},
},
@ -20072,6 +20019,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
ai:{
respondShan:true,
freeShan:true,
skillTagFilter(player,tag,arg){
if(tag!=='respondShan'&&tag!=='freeShan') return;
if(!player.hasEmptySlot(2)||player.hasSkillTag('unequip2')) return false;
if(!arg||!arg.player) return true;
if(arg.player.hasSkillTag('unequip',false,{
target:player
})||arg.player.hasSkillTag('unequip_ai',false,{
target:player
})) return false;
return true;
},
effect:{
target:function(card,player,target){
if(player==target&&get.subtype(card)=='equip2'){
@ -20530,8 +20489,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if(get.attitude(player,event.player)>=0) return false;
var e2=player.getEquip(2);
if(e2){
if(e2.name=='tengjia') return true;
if(e2.name=='bagua') return true;
if(e2.name=='tengjia'||e2.name=='rewrite_tengjia') return true;
if(e2.name=='bagua'||e2.name=='rewrite_bagua') return true;
}
return player.countCards('h','shan')>0;
},
@ -26414,7 +26373,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
characterReplace:{
guanyinping:['guanyinping','old_guanyinping'],
shixie:['shixie','dc_shixie','old_shixie'],
caoshuang:['caoshuang','ns_caoshuang'],
caoshuang:['caoshuang','dc_caoshuang','ns_caoshuang'],
caoang:['caoang','yj_caoang','tw_caoang'],
caohong:['caohong','tw_re_caohong','tw_caohong','yj_caohong'],
xiahouba:['xiahouba','dc_xiahouba','tw_xiahouba'],
@ -26426,7 +26385,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
sunluyu:['sunluyu','re_sunluyu','mb_sunluyu'],
jin_simazhao:['jin_simazhao','simazhao','sp_simazhao'],
jin_wangyuanji:['jin_wangyuanji','wangyuanji','sp_wangyuanji'],
wangyun:['wangyun','dc_wangyun','re_wangyun','jsrg_wangyun','old_wangyun','pe_wangyun'],
wangyun:['clan_wangyun','wangyun','dc_wangyun','re_wangyun','jsrg_wangyun','old_wangyun','pe_wangyun'],
zhangliang:['xin_zhangliang','re_zhangliang','zhangliang'],
lingju:['lingju','old_lingju'],
guansuo:['guansuo','dc_guansuo'],
@ -27624,10 +27583,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
olgangshu_info:'①当你使用非基本牌结算结束后,你可以令以下一项数值+1每项至多加至51.攻击范围2.受〖刚述〗影响的下个摸牌阶段摸牌数3.使用【杀】的次数上限。②当有牌被你抵消后,重置你〖刚述①〗增加的所有数值。',
oljianxuan:'谏旋',
oljianxuan_info:'当你受到伤害后,你可以令一名角色摸一张牌,然后若其手牌数等于你〖刚述①〗中的任意一项对应的数值,其重复此流程。',
ol_pengyang:'OL彭羕',
ol_pengyang_prefix:'OL',
ol_pengyang:'彭羕',
olqifan:'嚣翻',
olqifan_info:'当你需要使用不为【无懈可击】的牌时你可以观看牌堆底的X张牌并使用其中的一张。此牌结算结束时你依次弃置以下前X个区域中的所有牌⒈判定区、⒉装备区、⒊手牌区X为本回合使用过的牌中包含的类型数。',
olqifan_info:'当你需要使用不为【无懈可击】的牌时你可以观看牌堆底的X+1张牌并使用其中的一张。此牌结算结束时你依次弃置以下前X个区域中的所有牌⒈判定区、⒉装备区、⒊手牌区X为本回合使用过的牌中包含的类型数。',
oltuishi:'侻失',
oltuishi_info:'锁定技。①你不能使用【无懈可击】。②当你使用点数为字母的牌时,你令此牌无效并摸一张牌,且你对手牌数小于你的角色使用的下一张牌无距离和次数限制。',
ol_tw_zhangji:'张既',

View File

@ -115,7 +115,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
sp_xiaohu:['haomeng','yanfuren','yanrou','dc_zhuling'],
sp_star:['star_caoren','star_yuanshu','star_dongzhuo','star_yuanshao','star_zhangchunhua'],
mini_qixian:['mp_liuling'],
sp_decade:['caobuxing','re_maliang','dc_jikang'],
sp2_waitforsort:['caobuxing','re_maliang','dc_jikang'],
}
},
skill:{
@ -6599,16 +6599,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){
direct:true,
filter:function(event,player){
if(!game.hasPlayer(function(current){
return current.hasSkill('panshi');
return current.hasSkill('cixiao_yizi');
})) return true;
return player.countCards('he')>=1&&game.hasPlayer(function(current){
return current!=player&&!current.hasSkill('panshi');
return current!=player&&!current.hasSkill('cixiao_yizi');
});
},
content:function(){
'step 0'
if(game.hasPlayer(function(current){
return current.hasSkill('panshi');
return current.hasSkill('cixiao_yizi');
})) event.goto(2);
else player.chooseTarget(lib.filter.notMe,get.prompt('cixiao'),'令一名其他角色获得「义子」标记').set('ai',function(target){
var player=_status.event.player;
@ -6619,19 +6619,19 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if(result.bool){
var target=result.targets[0];
player.logSkill('cixiao',target);
target.addSkills('panshi');
target.addSkills('cixiao_yizi');
}
event.finish();
'step 2'
var list=game.filterPlayer(function(current){
return current.hasSkill('panshi');
return current.hasSkill('cixiao_yizi');
});
player.chooseCardTarget({
prompt:get.prompt('cixiao'),
prompt2:('弃置一张牌并将'+get.translation(list)+'的「义子」标记转移给其他角色'),
position:'he',
filterTarget:function(card,player,target){
return player!=target&&!target.hasSkill('panshi');
return player!=target&&!target.hasSkill('cixiao_yizi');
},
filterCard:lib.filter.cardDiscardable,
ai1:function(card){
@ -6654,12 +6654,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player.logSkill('cixiao');
player.discard(result.cards).delay=false;
player.line2(game.filterPlayer(function(current){
if(current.hasSkill('panshi')){
current.removeSkills('panshi');
if(current.hasSkill('cixiao_yizi')){
current.removeSkills('cixiao_yizi');
return true;
}
}).concat(result.targets),'green');
target.addSkills('panshi');
target.addSkills('cixiao_yizi');
}
else event.finish();
'step 4'
@ -6667,11 +6667,20 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
derivation:'panshi',
ai:{threaten:8},
subSkill: {
yizi: {
mark: true,
charlotte: true,
marktext: '子',
intro: {
name: '义子',
content: '具有〖叛弑〗'
},
group: 'panshi'
}
}
},
panshi:{
mark:true,
marktext:'子',
intro:{content:'我是儿子'},
trigger:{player:'phaseZhunbeiBegin'},
forced:true,
filter:function(event,player){
@ -8887,7 +8896,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
game.expandSkills(list2);
for(var k=0;k<list2.length;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||(info.zhuSkill&&!player.isZhu2())) continue;
if(get.is.zhuanhuanji(list2[k],player)) continue;
if(!info||!info.trigger||!info.trigger.player||info.silent||info.limited||info.juexingji||info.hiddenSkill||info.dutySkill||(info.zhuSkill&&!player.isZhu2())) continue;
if(info.trigger.player==name2||Array.isArray(info.trigger.player)&&info.trigger.player.includes(name2)){
if(info.ai&&(info.ai.combo||info.ai.notemp||info.ai.neg)) continue;
if(info.init) continue;
@ -8967,7 +8977,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
game.expandSkills(list2);
for(var k=0;k<list2.length;k++){
var info=lib.skill[list2[k]];
if(!info||!info.enable||info.charlotte||info.limited||info.juexingji||info.zhuanhuanji||info.hiddenSkill||info.dutySkill||(info.zhuSkill&&!player.isZhu2())) continue;
if(get.is.zhuanhuanji(list2[k],player)) continue;
if(!info||!info.enable||info.charlotte||info.limited||info.juexingji||info.hiddenSkill||info.dutySkill||(info.zhuSkill&&!player.isZhu2())) continue;
if((info.enable=='phaseUse'||(Array.isArray(info.enable)&&info.enable.includes('phaseUse')))||(info.enable=='chooseToUse'||(Array.isArray(info.enable)&&info.enable.includes('chooseToUse')))){
if(info.ai&&(info.ai.combo||info.ai.notemp||info.ai.neg)) continue;
if(info.init||info.onChooseToUse) continue;
@ -11042,7 +11053,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
jin_simashi:['dc_simashi','jin_simashi','simashi'],
jin_yanghuiyu:['jin_yanghuiyu','yanghuiyu'],
taoqian:['re_taoqian','taoqian'],
sp_liubei:['jsrg_liubei','sp_liubei'],
jsp_liubei:['jsrg_liubei','jsp_liubei'],
dongcheng:['re_dongcheng','dongcheng'],
hucheer:['re_hucheer','hucheer','tw_hucheer'],
nanhualaoxian:['re_nanhualaoxian','nanhualaoxian','jsrg_nanhualaoxian'],
@ -11658,8 +11669,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
sp_fenghuo:'烽火连天',
sp_danqi:'千里单骑',
sp_star:'将星系列',
sp_decade:'其他新服武将',
mini_qixian:'小程序·竹林七贤',
sp2_waitforsort:'等待分包',
},
pinyins:{
卑弥呼:['Himiko']

View File

@ -435,7 +435,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
judgeEvent.judge2=result=>result.bool;
const {result:{judge}}=await judgeEvent;
if(judge<2) return;
const {result:{bool:chooseToDiscardResultBool}}=await player.chooseToDiscard(2).set('ai',card=>{
const {result:{bool:chooseToDiscardResultBool}}=await event.target.chooseToDiscard(2).set('ai',card=>{
if(card.name=='tao') return -10;
if(card.name=='jiu'&&_status.event.player.hp==1) return -10;
return get.unuseful(card)+2.5*(5-get.owner(card).hp);
@ -2337,7 +2337,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
xuzhu:['xuzhu','re_xuzhu'],
zhangliao:['zhangliao','re_zhangliao'],
sp_zhangliao:['sp_zhangliao','yj_zhangliao','jsrg_zhangliao'],
xiahoudun:['xiahoudun','re_xiahoudun','xin_xiahoudun'],
xiahoudun:['xiahoudun','re_xiahoudun','xin_xiahoudun','sb_xiahoudun'],
liubei:['liubei','re_liubei','sb_liubei','dc_liubei','junk_liubei'],
guanyu:['guanyu','re_guanyu','ol_sb_guanyu','sb_guanyu','ps_guanyu','old_guanyu','junk_guanyu'],
zhangfei:['zhangfei','re_zhangfei','old_zhangfei','xin_zhangfei','sb_zhangfei','tw_zhangfei','jsrg_zhangfei','yj_zhangfei'],
@ -2360,7 +2360,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
diaochan:['diaochan','re_diaochan','sb_diaochan'],
huatuo:['huatuo','re_huatuo','old_huatuo'],
huaxiong:['huaxiong','re_huaxiong','old_huaxiong','sb_huaxiong','ol_huaxiong'],
yuanshu:['yuanshu','re_yuanshu','yl_yuanshu','old_yuanshu','ol_yuanshu'],
yuanshu:['yuanshu','re_yuanshu','yl_yuanshu','old_yuanshu','ol_yuanshu','star_yuanshu'],
gongsunzan:['gongsunzan','re_gongsunzan','dc_gongsunzan','xin_gongsunzan'],
re_lidian:['re_lidian','old_re_lidian','junk_lidian'],
},

View File

@ -9528,7 +9528,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
direct:true,
content:function(){
"step 0"
var dis=trigger.target.countCards('h','shan')||trigger.target.getEquip('bagua')||trigger.target.countCards('h')>2;
var dis=trigger.target.countCards('h','shan')||trigger.target.hasSkillTag('freeShan',false,{
player:player,
card:trigger.card
},true)||trigger.target.countCards('h')>2;
var next=player.chooseToDiscard(get.prompt('shoulie',trigger.target));
next.ai=function(card){
if(dis) return 7-get.value(card);

View File

@ -2070,7 +2070,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
const {links}=result;
if(typeof links[0]!=='string') links.reverse();
let [fn,card]=links;
const selectedPlayer=lose_list[cards.indexOf(card)][0];
const selectedPlayer=lose_list.find(item=>{
if(Array.isArray(item[1])) return item[1].includes(card);
return item[1]==card;
})[0];
player.logSkill('twniju',selectedPlayer);
selectedPlayer.addTempSkill('twniju_change');
if(!selectedPlayer.storage.twniju_change) selectedPlayer.storage.twniju_change=[];
@ -11535,22 +11538,19 @@ game.import('character',function(lib,game,ui,get,ai,_status){
filter:function(event,player){
return game.hasPlayer(function(current){
return current.getSkills(null,false,false).filter(function(i){
var info=get.info(i);
return info&&info.zhuanhuanji;
return get.is.zhuanhuanji(i,current);
}).length>0;
});
},
filterTarget:function(card,player,target){
return target.getSkills(null,false,false).filter(function(i){
var info=get.info(i);
return info&&info.zhuanhuanji;
return get.is.zhuanhuanji(i,target);
}).length>0;
},
content:function(){
'step 0'
var list=target.getSkills(null,false,false).filter(function(i){
var info=get.info(i);
return info&&info.zhuanhuanji;
return get.is.zhuanhuanji(i,target);
});
if(list.length==1){
event._result={control:list[0]};
@ -11584,8 +11584,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
filter:function(event,player){
return game.hasPlayer(function(current){
return current.getSkills(null,false,false).filter(function(i){
var info=get.info(i);
return info&&info.zhuanhuanji;
return get.is.zhuanhuanji(i,current);
}).length>0;
});
},

View File

@ -117,10 +117,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){
sp2_mouding:['dc_sb_lusu','dc_sb_zhouyu','dc_sb_simayi'],
}
},
characterSubstitute:{
dc_sb_simayi:[
],
},
skill:{
//谋司马懿
dcsbquanmou:{
audio:2,
audioname:['dc_sb_simayi_shadow'],
zhuanhuanji:true,
marktext:'☯',
enable:'phaseUse',
@ -141,6 +146,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
async content(event,trigger,player){
const target = event.targets[0];
player.changeZhuanhuanji('dcsbquanmou');
player.changeSkin('dcsbquanmou','dc_sb_simayi'+(player.storage.dcsbquanmou?'_shadow':''));
player.markAuto('dcsbquanmou_selected', [target]);
const cards = await target.chooseCard('he', true, `选择交给${get.translation(player)}一张牌`).forResultCards();
if (cards && cards.length) {
@ -175,8 +181,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
subSkill:{
true:{
audio:'dcsbquanmou',
charlotte:true,
audio:'dcsbquanmou',
audioname:['dc_sb_simayi_shadow'],
trigger:{source:'damageSource'},
forced:true,
popup:false,
@ -233,8 +240,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
},
false:{
audio:'dcsbquanmou',
charlotte:true,
audio:'dcsbquanmou',
audioname:['dc_sb_simayi_shadow'],
trigger:{source:'damageBegin2'},
forced:true,
filter(event,player){
@ -282,7 +290,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
dcsbpingliao:{
audio:2,
trigger:{player:'useCard0'},
audioname:['dc_sb_simayi_shadow'],
trigger:{player:'useCard'},
forced:true,
filter(event,player){
return event.card.name=='sha';
@ -291,7 +300,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return game.filterPlayer(current=>player.inRange(current));
},
async content(event, trigger, player) {
trigger.hideTargets = true;
const unrespondedTargets = [];
const respondedTargets = [];
let nonnonTargetResponded = false;
@ -313,8 +321,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){
})) return get.order(card);
return -1;
}
//先用随机数凑合一下 等157优化
return event.getRand('dcsbpingliao') > 0.5 ? 0 : get.order(card);
//如果自己没有其他的闪桃就不响应
else {
const needsTao = (player.hp <= 1);
const shanAndTao = player.getCards('hs', card=>{
const name = get.name(card);
return name == 'shan' || (needsTao && name == 'shan');
});
shanAndTao.remove(card);
if(card.cards) shanAndTao.removeArray(card.cards);
if(!shanAndTao.length) return 0;
}
return event.getRand('dcsbpingliao') > (1 / Math.max(1,player.hp)) ? 0 : get.order(card);
}).set('respondedTargets', respondedTargets).forResult();
if (result.bool) {
respondedTargets.push(target);
@ -342,7 +360,19 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
},
},
group:'dcsbpingliao_hide',
subSkill:{
hide:{
trigger:{player:'useCard0'},
forced:true,
filter(event,player){
return event.card.name=='sha';
},
async content(event, trigger, player){
trigger.hideTargets = true;
game.log(player,'隐藏了',trigger.card,'的目标');
},
},
buff:{
onremove:true,
charlotte:true,
@ -3360,8 +3390,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if(['equip','delay'].includes(get.type(card))&&player.hasValueTarget(card)&&choices.includes('场上')) return '场上';
var val=get.value(card);
var next=_status.currentPhase;
if(trigger.name=='damage') next=next.getNext();
if(get.attitude(player,next)>0&&val>=6||get.attitude(player,next)<0&&val<=4.5) return '牌堆顶';
if(next){
if(trigger.name=='damage') next=next.getNext();
if(get.attitude(player,next)>0&&val>=6||get.attitude(player,next)<0&&val<=4.5) return '牌堆顶';
}
return '牌堆底';
}());
}
@ -7936,8 +7968,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
audio:2,
getZhuanhuanji:function(player,bool){
var skills=player.getSkills(null,false,false).filter(function(i){
var info=get.info(i);
return info&&!info.charlotte&&info.zhuanhuanji;
const list=get.skillCategoriesOf(i);
return !list.includes('Charlotte')&&list.includes('转换技');
});
if(!bool) return skills;
if(!skills.length) return 'none';
@ -10288,9 +10320,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player.chooseTarget(get.prompt2('juetao'),lib.filter.notMe).set('ai',function(target){
let att=-get.attitude(_status.event.player,target);
if(att<=0) return att;
if(target.hasSkillTag('nodamage')) return 0.01*att;
if(target.getEquip('tengjia')||target.getEquip('renwang')) return 0.2*att;
if(target.getEquip('bagua')) return 0.3*att;
if(target.hasSkillTag('nodamage')||target.getEquip('qimenbagua')) return 0.01*att;
if(target.getEquip('tengjia')||target.getEquip('renwang')) return 0.3*att;
if(target.getEquip('rewrite_tengjia')||target.getEquip('rewrite_renwang')) return 0.2*att;
if(target.hasSkillTag('freeShan',false,{
player:_status.event.player
},true)) return 0.3*att;
if(target.getEquip(2)) return att/2;
return 1.2*att;
});
@ -14713,7 +14748,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
dclingfang:'凌芳',
dclingfang_info:'锁定技。准备阶段或当其他角色使用黑色牌结算结束后若你是此牌的目标或你使用黑色牌结算结束后若你不是此牌目标你获得1枚“绞”。',
dcfengying:'风影',
dcfengying_info:'①一名角色的回合开始时,你记录弃牌堆中所有黑色基本牌或黑色普通锦囊牌的牌名。②每回合每种牌名各限一次。你可以将一张点数不大于“绞”数的手牌当做任意一张〖风影①〗记录中的牌使用。',
dcfengying_info:'①一名角色的回合开始时,你记录弃牌堆中所有黑色基本牌或黑色普通锦囊牌的牌名。②每回合每种牌名各限一次。你可以将一张点数不大于“绞”数的手牌当做任意一张〖风影①〗记录中的牌使用(无距离和次数限制)。',
dcshouze:'受责',
dcshouze_info:'锁定技。结束阶段若你有“绞”你弃1枚“绞”随机获得弃牌堆中的一张黑色牌失去1点体力。',
chengbing:'程秉',

View File

@ -17,6 +17,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){
liuyao:["male","qun",4,["xinfu_kannan",'twniju'],['zhu']],
liuyan:["male","qun",3,["xinfu_tushe","xinfu_limu"]],
},
characterSort:{
xinghuoliaoyuan:{
// xinghuoliaoyuan_tianfu:[],
xinghuoliaoyuan_tianliang:['duji','liuyan','yanjun'],
xinghuoliaoyuan_tianji:['panjun','wangcan'],
xinghuoliaoyuan_tiantong:['re_jsp_pangtong','sp_taishici'],
xinghuoliaoyuan_tianxiang:['lvdai','zhoufang','liuyao'],
xinghuoliaoyuan_qisha:['lvqian','re_zhangliang'],
},
},
characterIntro:{
wangcan:"王粲177年217年2月17日字仲宣。山阳郡高平县今山东微山两城镇人。东汉末年文学家“建安七子”之一太尉王龚曾孙、司空王畅之孙。",
re_jsp_pangtong:"庞统,字士元,襄阳(治今湖北襄阳)人。三国时刘备帐下谋士,官拜军师中郎将。才智与诸葛亮齐名,人称“凤雏”。在进围雒县时,统率众攻城,不幸被流矢击中去世,时年三十六岁。追赐统为关内侯,谥曰靖侯。庞统死后,葬于落凤庞统墓坡。",
@ -1730,6 +1740,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
"xinfu_limu_info":"出牌阶段你可以将一张♦牌当做【乐不思蜀】对自己使用然后回复1点体力。只要你的判定区内有牌你对攻击范围内的其他角色使用牌便没有次数和距离限制。",
xinyingshi:'应势',
xinyingshi_info:'出牌阶段开始时,若场上所有角色的武将牌上均没有“酬”,则你可以将任意张牌置于一名角色的武将牌上,称为“酬”。若如此做:当有角色使用牌对有“酬”的角色造成伤害后,其可以获得一张“酬”,并获得牌堆中所有与“酬”花色点数均相同的牌;有“酬”的角色死亡时,你获得其所有“酬”。',
xinghuoliaoyuan_tianfu:'天府',
xinghuoliaoyuan_tianliang:'天梁',
xinghuoliaoyuan_tianji:'天机',
xinghuoliaoyuan_tiantong:'天同',
xinghuoliaoyuan_tianxiang:'天相',
xinghuoliaoyuan_qisha:'七杀',
},
};
});

View File

@ -3692,11 +3692,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){
ai:{
directHit_ai:true,
skillTagFilter:function(player,tag,arg){
if(player._zhuandui_temp) return false;
if(player._zhuandui_temp||tag!=='directHit_ai') return false;
player._zhuandui_temp=true;
var bool=function(){
if(arg.card.name!='sha'||get.attitude(player,arg.target)>=0||!arg.target.countCards('h')) return false;
if(arg.target.countCards('h')==1&&(!arg.target.getEquip('bagua')||player.hasSkillTag('unequip',false,{
if(arg.target.countCards('h')==1&&(!arg.target.hasSkillTag('freeShan',false,{
player:player,
card:arg.card
},true)||player.hasSkillTag('unequip',false,{
name:arg.card?arg.card.name:null,
target:arg.target,
card:arg.card
@ -7254,7 +7257,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
var trigger=_status.event.getTrigger();
if(att>0&&eff>=0) return 1;
if(att>=0&&eff>0) return 1;
if(att>0&&(trigger.player.hp>=3||trigger.player.getEquip('bagua')||trigger.player.countCards('h','shan'))){
if(att>0&&(trigger.player.hp>=3||trigger.player.hasSkillTag('freeShan',false,{
player:_status.event.player,
card:new lib.element.VCard({name:'sha',isCard:true})
})||trigger.player.countCards('h','shan'))){
if(name=='lebu'&&nh>trigger.player.hp) return 1;
if(name=='bingliang'&&nh<trigger.player.hp) return 1;
}
@ -7290,7 +7296,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
var trigger=_status.event.getTrigger();
if(att>0&&eff>=0) return 1;
if(att>=0&&eff>0) return 1;
if(att>0&&(trigger.player.hp>=3||trigger.player.getEquip('bagua')||trigger.player.countCards('h','shan'))){
if(att>0&&(trigger.player.hp>=3||trigger.player.hasSkillTag('freeShan',false,{
player:_status.event.player,
card:new lib.element.VCard({name:'sha',isCard:true})
})||trigger.player.countCards('h','shan'))){
if(name=='lebu'&&nh>trigger.player.hp) return 1;
if(name=='bingliang'&&nh<trigger.player.hp) return 1;
}
@ -9895,8 +9904,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
ai:{
directHit_ai:true,
skillTagFilter:function(player,tag,arg){
if(!arg.target.hasSkill('qianxi2')) return false;
if(arg.card.name=='sha') return arg.target.storage.qianxi2=='red'&&(!arg.target.getEquip('bagua')||player.hasSkillTag('unequip',false,{
if(tag!=='directHit_ai'||!arg.target.hasSkill('qianxi2')) return false;
if(arg.card.name=='sha') return arg.target.storage.qianxi2=='red'&&(!arg.target.hasSkillTag('freeShan',false,{
player:player,
card:arg.card
},true)||player.hasSkillTag('unequip',false,{
name:arg.card?arg.card.name:null,
target:arg.target,
card:arg.card
@ -13912,7 +13924,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
xusheng:['xusheng','xin_xusheng','re_xusheng','old_xusheng'],
wuguotai:['wuguotai','xin_wuguotai','re_wuguotai'],
lingtong:['lingtong','xin_lingtong','ol_lingtong','re_lingtong','old_lingtong'],
gaoshun:['gaoshun','xin_gaoshun','ol_gaoshun','re_gaoshun','old_gaoshun'],
gaoshun:['gaoshun','xin_gaoshun','ol_gaoshun','re_gaoshun','sb_gaoshun','old_gaoshun'],
zhonghui:['zhonghui','xin_zhonghui','re_zhonghui','old_zhonghui','pe_zhonghui'],
wangyi:['wangyi','re_wangyi','old_wangyi'],
caozhang:['caozhang','ol_caozhang','re_caozhang','xin_caozhang'],
@ -13921,14 +13933,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){
liaohua:['liaohua','re_liaohua','xin_liaohua'],
bulianshi:['bulianshi','dc_bulianshi','re_bulianshi','old_bulianshi'],
handang:['handang','xin_handang','re_handang','tw_handang','old_handang'],
chengpu:['chengpu','re_chengpu','xin_chengpu','tw_chengpu','ns_chengpu'],
chengpu:['chengpu','ol_chengpu','re_chengpu','xin_chengpu','tw_chengpu','ns_chengpu'],
liubiao:['liubiao','xin_liubiao','re_liubiao','sb_liubiao','oldre_liubiao','old_liubiao'],
manchong:['manchong','re_manchong'],
caochong:['caochong','re_caochong','old_caochong'],
guohuai:['guohuai','re_guohuai','xin_guohuai','tw_guohuai','ol_guohuai'],
jianyong:['jianyong','ol_jianyong','re_jianyong','xin_jianyong'],
panzhangmazhong:['panzhangmazhong','re_panzhangmazhong','xin_panzhangmazhong'],
yufan:['yufan','xin_yufan','re_yufan'],
yufan:['yufan','ol_yufan','xin_yufan','re_yufan'],
zhuran:['zhuran','re_zhuran','xin_zhuran','old_zhuran'],
liru:['xin_liru','dc_liru','re_liru','yj_liru','+liru'],
fuhuanghou:['fuhuanghou','re_fuhuanghou','xin_fuhuanghou','old_fuhuanghou'],
@ -13961,7 +13973,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
sundeng:['sundeng','re_sundeng','ns_sundeng'],
caiyong:['caiyong','re_caiyong'],
chengong:['chengong','re_chengong','sb_chengong'],
xunyou:['xunyou','re_xunyou'],
xunyou:['xunyou','re_xunyou','clan_xunyou'],
xuezong:['xuezong','tw_xuezong'],
huanghao:['huanghao','dc_huanghao','old_huanghao'],
caorui:['caorui','re_caorui','old_caorui'],
@ -13970,6 +13982,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
zhangsong:['zhangsong','re_zhangsong'],
zhongyao:['zhongyao','re_zhongyao'],
liwan:['ol_liwan','liwan'],
wuxian:['wuxian','clan_wuxian'],
},
translate:{
old_huaxiong:'将华雄',

View File

@ -3554,7 +3554,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
trigger:{global:'phaseJieshuBegin'},
filter:function(event,player){
return player.hasMark('xijue')&&event.player.isAlive()&&event.player!=player&&player.countCards('h',function(card){
if(_status.connectMode) return true;
if(_status.connectMode||get.mode()!='guozhan') return true;
return get.type(card)=='basic';
});
},
@ -3567,7 +3567,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if(get.damageEffect(trigger.player,player,player)<=0){
nono=true;
}
var next=player.chooseToDiscard('是否弃置一枚“爵”和一张基本牌,对'+get.translation(trigger.player)+'发动【骁果】?',{type:'basic'});
var next=player.chooseToDiscard(`是否弃置一枚“爵”和一张${get.mode()=='guozhan'?'基本':'手'}牌,对${get.translation(trigger.player)}发动【骁果】?`,'h',function(card,player){
if(get.mode()!='guozhan') return true;
return get.type(card,player)=='basic';
});
next.set('ai',function(card){
if(_status.event.nono) return 0;
return 8-get.useful(card);
@ -3776,6 +3779,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
jiachong:['dc_jiachong','jin_jiachong','jiachong'],
yangyan:['yangyan','old_yangyan'],
yangzhi:['yangzhi','old_yangzhi'],
zhongyan:['zhongyan','clan_zhongyan'],
},
translate:{
jin_zhangchunhua:'晋张春华',
@ -3798,7 +3802,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
xijue_tuxi_info:'摸牌阶段摸牌时,你可以少摸任意张牌,然后获得等量的角色的各一张手牌。',
xijue_tuxi_info_guozhan:'摸牌阶段摸牌时,你可以少摸至多两张牌,然后获得等量的角色的各一张手牌。',
xijue_xiaoguo:'骁果',
xijue_xiaoguo_info:'其他角色的结束阶段开始时,你可以弃置一张基本令该角色选择一项1.弃置一张装备牌然后你摸一张牌2.受到你对其造成的1点伤害。',
xijue_xiaoguo_info:'其他角色的结束阶段开始时,你可以弃置一张令该角色选择一项1.弃置一张装备牌然后你摸一张牌2.受到你对其造成的1点伤害。',
xijue_xiaoguo_info_guozhan:'其他角色的结束阶段开始时你可以弃置一张基本牌令该角色选择一项1.弃置一张装备牌2.受到你对其造成的1点伤害。',
gz_duyu:'杜预',
duyu:'晋杜预',

View File

@ -1066,7 +1066,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
check:function(event,player){
if(get.attitude(player,event.target)>=0) return false;
if(event.target.getEquip('bagua')) return false;
if(event.target.hasSkillTag('freeShan',false,{
player:player,
card:event.card
},true)) return false;
if(event.target.hasSkillTag('respondShan')&&event.target.countCards('h')>=3) return false;
return true;
},
@ -2186,7 +2189,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if(trigger.target.hasSkill('shanguang2')) return 0;
var equip=trigger.target.getEquip(2);
if(equip&&equip.name=='bagua') return 1;
if(equip&&(equip.name=='bagua'||equip.name=='rewrite_bagua')) return 1;
return trigger.target.countCards('h')<2?0:1;
};
"step 1"

View File

@ -1,5 +1,5 @@
window.noname_asset_list=[
'v1.10.8',
'v1.10.10',
/*audio start*/
'audio/background/aozhan_chaoming.mp3',
'audio/background/aozhan_online.mp3',
@ -296,6 +296,8 @@ window.noname_asset_list=[
'audio/die/dc_mengda.mp3',
'audio/die/dc_ruiji.mp3',
'audio/die/dc_sb_lusu.mp3',
'audio/die/dc_sb_simayi.mp3',
'audio/die/dc_sb_simayi_shadow.mp3',
'audio/die/dc_sb_zhouyu.mp3',
'audio/die/dc_sp_jiaxu.mp3',
'audio/die/dc_sunchen.mp3',
@ -627,6 +629,7 @@ window.noname_asset_list=[
'audio/die/ol_sb_jiangwei.mp3',
'audio/die/ol_sb_taishici.mp3',
'audio/die/ol_sb_yuanshao.mp3',
'audio/die/ol_sb_yuanshao_shadow.mp3',
'audio/die/ol_sp_zhugeliang.mp3',
'audio/die/ol_sunjian.mp3',
'audio/die/ol_wangrong.mp3',
@ -2103,6 +2106,14 @@ window.noname_asset_list=[
'audio/skill/dcsbmengmou2.mp3',
'audio/skill/dcsbmingshi1.mp3',
'audio/skill/dcsbmingshi2.mp3',
'audio/skill/dcsbpingliao_dc_sb_simayi_shadow1.mp3',
'audio/skill/dcsbpingliao_dc_sb_simayi_shadow2.mp3',
'audio/skill/dcsbpingliao1.mp3',
'audio/skill/dcsbpingliao2.mp3',
'audio/skill/dcsbquanmou_dc_sb_simayi_shadow1.mp3',
'audio/skill/dcsbquanmou_dc_sb_simayi_shadow2.mp3',
'audio/skill/dcsbquanmou1.mp3',
'audio/skill/dcsbquanmou2.mp3',
'audio/skill/dcsbronghuo1.mp3',
'audio/skill/dcsbronghuo2.mp3',
'audio/skill/dcsbyingmou1.mp3',
@ -3671,17 +3682,31 @@ window.noname_asset_list=[
'audio/skill/olsbfumeng2.mp3',
'audio/skill/olsbguidao1.mp3',
'audio/skill/olsbguidao2.mp3',
'audio/skill/olsbhetao_ol_sb_yuanshao_shadow1.mp3',
'audio/skill/olsbhetao_ol_sb_yuanshao_shadow2.mp3',
'audio/skill/olsbhetao_ol_sb_yuanshao_shadow3.mp3',
'audio/skill/olsbhetao1.mp3',
'audio/skill/olsbhetao2.mp3',
'audio/skill/olsbhetao3.mp3',
'audio/skill/olsbranji1.mp3',
'audio/skill/olsbranji2.mp3',
'audio/skill/olsbshenli_ol_sb_yuanshao_shadow1.mp3',
'audio/skill/olsbshenli_ol_sb_yuanshao_shadow2.mp3',
'audio/skill/olsbshenli_ol_sb_yuanshao_shadow3.mp3',
'audio/skill/olsbshenli1.mp3',
'audio/skill/olsbshenli2.mp3',
'audio/skill/olsbshenli3.mp3',
'audio/skill/olsbshishou_ol_sb_yuanshao_shadow1.mp3',
'audio/skill/olsbshishou_ol_sb_yuanshao_shadow2.mp3',
'audio/skill/olsbshishou_ol_sb_yuanshao_shadow3.mp3',
'audio/skill/olsbshishou1.mp3',
'audio/skill/olsbshishou2.mp3',
'audio/skill/olsbshishou3.mp3',
'audio/skill/olsbweilin1.mp3',
'audio/skill/olsbweilin2.mp3',
'audio/skill/olsbyufeng_ol_sb_yuanshao_shadow1.mp3',
'audio/skill/olsbyufeng1.mp3',
'audio/skill/olsbyufeng2.mp3',
'audio/skill/olsbzhuri1.mp3',
'audio/skill/olsbzhuri2.mp3',
'audio/skill/olshandao1.mp3',
@ -7250,6 +7275,7 @@ window.noname_asset_list=[
'image/character/hhzz_shiona.jpg',
'image/character/hhzz_takaramono1.jpg',
'image/character/hhzz_takaramono2.jpg',
'image/character/hidden_image.jpg',
'image/character/hs_aedwin.jpg',
'image/character/hs_aerfusi.jpg',
'image/character/hs_aiqinvyao.jpg',
@ -7749,6 +7775,7 @@ window.noname_asset_list=[
'image/character/ol_caiwenji.jpg',
'image/character/ol_caozhang.jpg',
'image/character/ol_chendeng.jpg',
'image/character/ol_chengpu.jpg',
'image/character/ol_dengai.jpg',
'image/character/ol_dengzhi.jpg',
'image/character/ol_dianwei.jpg',
@ -7787,6 +7814,7 @@ window.noname_asset_list=[
'image/character/ol_sb_jiangwei.jpg',
'image/character/ol_sb_taishici.jpg',
'image/character/ol_sb_yuanshao.jpg',
'image/character/ol_sb_yuanshao_shadow.jpg',
'image/character/ol_sp_zhugeliang.jpg',
'image/character/ol_sunjian.jpg',
'image/character/ol_wanglang.jpg',
@ -7802,6 +7830,7 @@ window.noname_asset_list=[
'image/character/ol_yanwen.jpg',
'image/character/ol_yuanshao.jpg',
'image/character/ol_yuanshu.jpg',
'image/character/ol_yufan.jpg',
'image/character/ol_yujin.jpg',
'image/character/ol_zhangchangpu.jpg',
'image/character/ol_zhangliao.jpg',

48244
game/compiler-sfc.browser.js Normal file

File diff suppressed because one or more lines are too long

View File

@ -211,7 +211,7 @@ new Promise(resolve => {
navigator.serviceWorker.addEventListener('message', e => {
console.log(e);
});
registration_1.update();
registration_1.update().catch(console.error);
} catch (e_1) {
console.log('serviceWorker加载失败: ', e_1);
}

View File

@ -76,6 +76,7 @@ var pinyin_dict_polyphone = {
"血诏": "xuè ",
"血偿": "xuè ",
"血拼": "xuè ",
"血途": "xuè ",
"行殇": "xíng ",
"节行": "jié xíng",
"天行": " xíng",

View File

@ -124,6 +124,7 @@ window.noname_source_list=[
'game/asset.js',
'game/codemirror.js',
'game/compiler-sfc.browser.js',
'game/config.js',
'game/core-js-bundle.js',
'game/directory.js',
@ -140,6 +141,7 @@ window.noname_source_list=[
'game/server.js',
'game/source.js',
'game/update.js',
'game/vue.esm-browser.js',
'image/card/cardtempname_bg.png',
'image/flappybird/BG.png',

View File

@ -2,29 +2,26 @@ window.noname_update={
version:'1.10.9',
update:'1.10.8',
changeLog:[
'整合@mengxinzxz @copcap @hadeszoro @universe-st @cjk7989 @PZ157 @lieren2023 @Ansolve @Rintim @kuangshen04 @XboxSoldier 的Pull Request',
'OL谋袁绍、郭图、刘磐、陆凯、谋关羽(初版)',
'十周年谋司马懿、曹爽、星张春华、司马师、王凌、蒋济、公孙修、胡遵、吕范、李傕郭汜、臧霸、陈武董袭',
'“转化牌花色/点数”的模糊匹配',
'整合@kuangshen04 @mengxinzxz @lieren2023 @nonameShijian @PZ157 @XboxSoldier @universe-st @copcap 的Pull Request',
'OL界程普、界虞翻',
'手杀杨奉、谋夏侯惇、谋高顺',
'引入Vue框架和新的换肤机制',
'其他AI优化与bug修复',
],
files:[
'card/extra.js',
'card/guozhan.js',
'service-worker.js',
'card/mtg.js',
'card/standard.js',
'character/clan.js',
'character/collab.js',
'character/ddd.js',
'character/diy.js',
'character/extra.js',
'character/gwent.js',
'character/huicui.js',
'character/jsrg.js',
'character/mobile.js',
'character/offline.js',
'character/old.js',
'character/onlyOL.js',
'character/ow.js',
'character/rank.js',
'character/refresh.js',
'character/sb.js',
@ -36,17 +33,19 @@ window.noname_update={
'character/swd.js',
'character/tw.js',
'character/xianding.js',
'character/xianjian.js',
'character/xinghuoliaoyuan.js',
'character/yijiang.js',
'character/yingbian.js',
'character/yxs.js',
'game/compiler-sfc.browser.js',
'game/game.js',
'game/pinyinjs.js',
'game/vue.esm-browser.js',
'layout/default/layout.css',
'mode/boss.js',
'mode/brawl.js',
'mode/guozhan.js',
'mode/identity.js',
'mode/versus.js',
'noname/game/index.js',
@ -56,17 +55,9 @@ window.noname_update={
'noname/library/index.js',
'noname/library/element/button.js',
'noname/library/element/content.js',
'noname/library/element/contents.js',
'noname/library/element/gameEvent.js',
'noname/library/element/player.js',
'noname/library/element/vcard.js',
'noname/library/init/index.js',
'noname/ui/create/index.js',
'noname/ui/create/menu/index.js',
]
};

16684
game/vue.esm-browser.js Normal file

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

View File

@ -19,6 +19,19 @@
};
const STACK_REGEXP = /^\s*at .*(\S+:\d+|\(native\))/m;
const errorList = [];
function extractLocation(urlLike) {
// 不存在地址信息的字符串
if (!/:/.test(urlLike)) {
return [urlLike];
}
// 捕获位置用到的正则
const regExp = /(.+?)(?::(\d+))?(?::(\d+))?$/;
const parts = regExp.exec(urlLike.replace(/[()]/g, ''));
// @ts-ignore
return [parts[1], parts[2] || void 0, parts[3] || void 0];
}
window.onunhandledrejection = async event => {
event.promise.catch(error => {
console.log(error);

View File

@ -2869,7 +2869,18 @@ div:not(.handcards)>.card>.info>span,
#arena:not(.observe) .unseen2_v>.avatar2,
#arena:not(.observe) .unseen_v>.name:not(.name2):not(.name_seat),
#arena:not(.observe) .unseen2_v>.name2 {
opacity: 0.2 !important
opacity: 0.2 !important;
}
.player>.unseen_show>.avatar,
.player>.unseen2_show>.avatar2 {
opacity: 0;
}
#arena:not(.observe) .player:not([data-position='0']).unseen_show>.avatar,
#arena:not(.observe) .player:not([data-position='0']).unseen2_show>.avatar2 {
opacity: 1 !important;
background-image:url('../../image/character/hidden_image.jpg') !important;
}
.player>.name_seat {

View File

@ -80,6 +80,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
event.current=null;
var list=[];
if(lib.storage.current==undefined) lib.storage.current='boss_hundun';
for(var i in lib.character){
var info=lib.character[i];
if(info[4].includes('boss')){

View File

@ -2617,7 +2617,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
var evt=evt_list[0],character=evt_list[1];
game.addGlobalSkill(evt);
var func=function(map,evt){
var func=function(map,evt,character){
for(var i in map){
var player=lib.playerOL[i];
if(player){
@ -2631,20 +2631,12 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
}
}
}
game.falseZhu.init('re_caocao');
game.trueZhu.init('ol_sb_yuanshao');
game.trueZhu.hp++;
game.trueZhu.maxHp++;
game.falseZhu.hp++;
game.falseZhu.maxHp++;
game.trueZhu.update();
game.falseZhu.update();
ui.arena.classList.add('choose-character');
if(evt=='shishengshibai'){
ui.guanduInfo=get.is.phoneLayout()?ui.create.div('.touchinfo.left',ui.window):ui.create.div(ui.gameinfo);
ui.guanduInfo.innerHTML='十胜十败0';
}
const showGuanduEvent=function(evt){
const showGuanduEvent=function(evt,character){
if(ui['GuanduEvent_'+evt]) return;
ui['GuanduEvent_'+evt]=ui.create.system(get.translation(evt),null,true);
lib.setPopped(ui['GuanduEvent_'+evt],function(){
@ -2660,10 +2652,10 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
for(const i in lib.playerOL){
const target=lib.playerOL[i];
if(target==game.me){
showGuanduEvent(evt);
showGuanduEvent(evt,character);
}
else if(target.isOnline2()){
target.send(showGuanduEvent,evt);
target.send(showGuanduEvent,evt,character);
}
}
if(lib.config.background_speak) game.playAudio('skill',evt);
@ -2674,26 +2666,94 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
dialog.close();
},5000)
};
game.broadcastAll(func,map,evt);
game.broadcastAll(func,map,evt,character);
_status.firstAct=game.falseZhu;
game.delay(0,5000);
"step 1"
event.falseList=['ol_xiahouyuan','litong','zangba','manchong','xunyu','re_guojia','re_zhangliao','xuhuang','caohong','jsp_guanyu','hanhaoshihuan','caoren','yujin','liuye','chengyu','xunyou','zhangxiu','sp_jiaxu'].filter(function(name){
if(!Array.isArray(lib.character[name])) return false;
lib.character[name][1]='wei';
return true;
game.falseZhu.chooseButtonOL([
[game.falseZhu,[
'请选择武将',
[['caocao'],'characterx'],
],true],
[game.trueZhu,[
'请选择武将',
[['re_yuanshao'],'characterx'],
],true]
],function(player,result){
if(game.online||player==game.me){
player.init(result.links[0]);
}
})
"step 2"
game.broadcastAll(function(result){
for(var i in result){
if(!lib.playerOL[i].name){
lib.playerOL[i].init(result[i].links[0]);
}
lib.playerOL[i].hp++;
lib.playerOL[i].maxHp++;
lib.playerOL[i].update();
}
},result);
"step 3"
event.falseList=['xiahouyuan','litong','zangba','manchong','xunyu','guojia','zhangliao','xuhuang','caohong','jsp_guanyu','hanhaoshihuan','caoren','yujin','liuye','chengyu','xunyou','zhangxiu','sp_jiaxu'].filter(function(name){
if(lib.characterReplace[name]){
let goon = false;
for(let i of lib.characterReplace[name]){
if(lib.character[i]){
lib.character[i][1] = 'wei';
goon = true;
}
}
return goon;
}
else if(lib.character[name]){
lib.character[name][1] = 'wei';
return true;
}
return false;
});
event.trueList=['xinping','hanmeng','gaogan','yuantanyuanshang','lvkuanglvxiang','xinpi','xunchen','sp_zhanghe','chenlin','re_liubei','yj_jushou','guotufengji','gaolan','sp_xuyou','tianfeng','chunyuqiong','sp_shenpei'].filter(function(name){
if(!Array.isArray(lib.character[name])) return false;
lib.character[name][1]='qun';
return true;
event.trueList=['xinping','hanmeng','gaogan','yuantanyuanshang','lvkuanglvxiang','xinpi','xunchen','sp_ol_zhanghe','chenlin','jsp_liubei','yj_jushou','guotufengji','gaolan','xuyou','tianfeng','chunyuqiong','shenpei'].filter(function(name){
if(lib.characterReplace[name]){
let goon = false;
for(let i of lib.characterReplace[name]){
if(lib.character[i]){
lib.character[i][1] = 'qun';
goon = true;
}
}
return goon;
}
else if(lib.character[name]){
lib.character[name][1] = 'qun';
return true;
}
return false;
});
game.broadcast(function(list1,list2){
while(list1.length){
lib.character[list1.shift()][1]='wei';
for(let name of list1){
if(lib.characterReplace[name]){
for(let i of lib.characterReplace[name]){
if(lib.character[i]){
lib.character[i][1] = 'wei';
}
}
}
else if(lib.character[name]){
lib.character[name][1] = 'wei';
}
}
while(list2.length){
lib.character[list2.shift()][1]='qun';
for(let name of list2){
if(lib.characterReplace[name]){
for(let i of lib.characterReplace[name]){
if(lib.character[i]){
lib.character[i][1] = 'qun';
}
}
}
else if(lib.character[name]){
lib.character[name][1] = 'qun';
}
}
},event.falseList,event.trueList);
event.map={};
@ -2702,7 +2762,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
if(current.identity=='zhong'){
var choice=event[current.side+'List'].randomRemove(2);
event.map[current.playerid]=choice;
list.push([current,['请选择武将',[choice,'character']],true]);
list.push([current,['请选择武将',[choice,'characterx']],true]);
}
});
game.me.chooseButtonOL(list,function(player,result){
@ -2710,16 +2770,16 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
player.init(result.links[0]);
}
});
"step 2"
"step 4"
for(var i in result){
if(result[i]=='ai'){
result[i]=event.map[i].randomGet();
result[i]=event.map[i].randomRemove(1)[0];
}
else result[i]=result[i].links[0];
}
game.broadcastAll(function(result){
for(var i in result){
lib.playerOL[i].init(result[i]);
if(!lib.playerOL[i].name) lib.playerOL[i].init(result[i]);
}
setTimeout(function(){
ui.arena.classList.remove('choose-character');
@ -2733,14 +2793,59 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
'step 0'
lib.init.onfree();
ui.arena.classList.add('choose-character');
game.falseZhu.init('re_caocao');
game.trueZhu.init('ol_sb_yuanshao');
game.trueZhu.hp++;
game.trueZhu.maxHp++;
game.falseZhu.hp++;
game.falseZhu.maxHp++;
game.trueZhu.update();
game.falseZhu.update();
const side=game.me.side.toString();
event.friendSide=side;event.enemySide=(side=='true'?'false':'true');
event.zhuList=[['caocao'],['re_yuanshao']];
event.falseList=['xiahouyuan','litong','zangba','manchong','xunyu','guojia','zhangliao','xuhuang','caohong','jsp_guanyu','hanhaoshihuan','caoren','yujin','liuye','chengyu','xunyou','zhangxiu','sp_jiaxu'].filter(function(name){
if(lib.characterReplace[name]){
let goon = false;
for(let i of lib.characterReplace[name]){
if(lib.character[i]){
lib.character[i][1] = 'wei';
goon = true;
}
}
return goon;
}
else if(lib.character[name]){
lib.character[name][1] = 'wei';
return true;
}
return false;
});
event.trueList=['xinping','hanmeng','gaogan','yuantanyuanshang','lvkuanglvxiang','xinpi','xunchen','sp_ol_zhanghe','chenlin','jsp_liubei','yj_jushou','guotufengji','gaolan','xuyou','tianfeng','chunyuqiong','shenpei'].filter(function(name){
if(lib.characterReplace[name]){
let goon = false;
for(let i of lib.characterReplace[name]){
if(lib.character[i]){
lib.character[i][1] = 'qun';
goon = true;
}
}
return goon;
}
else if(lib.character[name]){
lib.character[name][1] = 'qun';
return true;
}
return false;
});
'step 1'
game[event.enemySide+'Zhu'].chooseButton(['请选择你的武将牌',[event.zhuList[event.enemySide=='true'?1:0],'characterx']],true);
'step 2'
game[event.enemySide+'Zhu'].init(result.links[0]);
game[event.enemySide+'Zhu'].maxHp++;
game[event.enemySide+'Zhu'].hp++;
game[event.enemySide+'Zhu'].update();
'step 3'
game.countPlayer(current=>{
if(current.side.toString()==event.enemySide&&current.identity=='zhong'){
let choice=event[event.enemySide+'List'].randomRemove(2)[0];
if(lib.characterReplace[choice]) choice=lib.characterReplace[choice].randomGet();
current.init(choice);
}
});
'step 4'
var evt_list=[['huoshaowuchao','chunyuqiong'],['liangcaokuifa','sp_xuyou'],['zhanyanliangzhuwenchou','jsp_guanyu'],['shishengshibai','re_guojia'],['xutuhuanjin','yj_jushou'],['liangjunxiangchi','yj_jushou'],['jianshoudaiyuan','tianfeng'],['yiruoshengqiang','re_caocao'],['shichongerjiao','sp_xuyou']].randomGet();
var evt=evt_list[0],character=evt_list[1];
game.addGlobalSkill(evt);
@ -2766,27 +2871,39 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
}
},evt);
game.me.chooseControl('ok').set('dialog',['###本局特殊事件:'+get.translation(evt)+'###'+get.translation(evt+'_info'),[[character],'character']]);
'step 1'
event.falseList=['ol_xiahouyuan','litong','zangba','manchong','xunyu','re_guojia','re_zhangliao','xuhuang','caohong','jsp_guanyu','hanhaoshihuan','caoren','yujin','liuye','chengyu','xunyou','zhangxiu','sp_jiaxu'].filter(function(name){
if(!Array.isArray(lib.character[name])) return false;
lib.character[name][1]='wei';
return true;
});
event.trueList=['xinping','hanmeng','gaogan','yuantanyuanshang','lvkuanglvxiang','xinpi','xunchen','sp_zhanghe','chenlin','re_liubei','yj_jushou','guotufengji','gaolan','sp_xuyou','tianfeng','chunyuqiong','sp_shenpei'].filter(function(name){
if(!Array.isArray(lib.character[name])) return false;
lib.character[name][1]='qun';
return true;
});
'step 2'
'step 5'
game[event.friendSide+'Zhu'].chooseButton(['请选择你的武将牌',[event.zhuList[event.friendSide=='true'?1:0],'characterx']],true);
'step 6'
if(game[event.friendSide+'Zhu']==game.me){
game[event.friendSide+'Zhu'].init(result.links[0]);
game[event.friendSide+'Zhu'].maxHp++;
game[event.friendSide+'Zhu'].hp++;
game[event.friendSide+'Zhu'].update();
}
else event.zhuChoice=result.links[0];
'step 7'
if(game.me.identity!='zhu'){
event.choose_me=true;
game.me.chooseButton(['请选择你的武将牌',[event[game.me.side+'List'].randomRemove(2),'character']],true);
game.me.chooseButton(['请选择你的武将牌',[event[event.friendSide+'List'].randomRemove(2),'characterx']],true);
}
'step 3'
'step 8'
if(event.choose_me) game.me.init(result.links[0]);
game.countPlayer(function(current){
if(current!=game.me&&current.identity=='zhong') current.init(event[current.side+'List'].randomRemove(2)[0]);
if(current!=game.me&&current.side.toString()==event.friendSide){
if(current.identity=='zhong'){
let choice=event[event.friendSide+'List'].randomRemove(2)[0];
if(lib.characterReplace[choice]) choice = lib.characterReplace[choice].randomGet();
current.init(choice);
}
else{
current.init(event.zhuChoice);
current.maxHp++;
current.hp++;
current.update();
}
}
});
'step 9'
setTimeout(function(){
ui.arena.classList.remove('choose-character');
},500);
@ -4811,13 +4928,15 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
enable: ['chooseToUse', 'chooseToRespond'],
position: 'hs',
prompt: '将【杀】当作【闪】,或将【闪】当作的【杀】使用或打出,然后你的下个弃牌阶段的手牌上限-1',
viewAs: function(cards, player) {
var name = false;
switch (get.name(cards[0], player)) {
case 'sha': name = 'shan'; break;
case 'shan': name = 'sha'; break;
viewAs:function(cards,player){
if(cards.length){
var name=false;
switch(get.name(cards[0],player)){
case 'sha':name='shan';break;
case 'shan':name='sha';break;
}
if(name) return {name:name};
}
if (name) return { name: name };
return null;
},
onuse: function(links, player) {
@ -4877,7 +4996,15 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
}
if (!player.countCards('hs', name)) return false;
},
order: 0.01,
order:function(item,player){
if(player&&_status.event.type=='phase'){
if(player.countCards('hs','shan')&&player.getUseValue({name:'sha'})>0){
return get.order({name:'sha'},player)*0.99;
}
return 0;
}
return 0.001;
},
},
subSkill: {
less: {

View File

@ -2721,6 +2721,18 @@ export class Game extends Uninstantable {
}
}
},
changeSkin: function (player, map) {
if (!player || !map) return;
player.tempname.remove(map.from);
player.tempname.add(map.to);
player.skin[name] = map.to;
const goon = (!lib.character[map.to]);
if (goon) lib.character[map.to] = ['', '', 0, [], (map.list.find(i => i[0] == map.to) || [map.to, []])[1]];
player.smoothAvatar(map.avatar2);
player.node['avatar' + map.name.slice(4)].setBackground(map.to, 'character');
player.node['avatar' + map.name.slice(4)].show();
if (goon) delete lib.character[map.to];
},
skill: function (player, content) {
if (typeof content == 'string') {
if (lib.skill[content]) lib.skill[content].video(player);
@ -5874,17 +5886,18 @@ export class Game extends Uninstantable {
return false;
}
const useCache = !lib.config.compatiblemode && !event.skill && !event.multitarget
&& ['button', 'card', 'target'].every(type => {
if (!event[`filter${uppercaseType(type)}`]) return true;
// if (typeof event[`select${uppercaseType(type)}`] === 'function') return false;
if (get.select(event[`select${uppercaseType(type)}`])[1] < 0) return false;
if (type === "button") type = "select";
return !event[`complex${uppercaseType(type)}`];
});
let useCache = !lib.config.compatiblemode && !event.skill && !event.multitarget;
const filterCache = type => {
if (get.select(event[`select${uppercaseType(type)}`])[1] < 0) return false;
const cardinfo = get.info(get.card() || {});
if (cardinfo && cardinfo.complexTarget) return false;
if (type === "button") type = "select";
return !event[`complex${uppercaseType(type)}`];
};
['button', 'card', 'target'].forEach(type => {
if (!event[`filter${uppercaseType(type)}`]) return;
if (!filterCache(type)) useCache = false;
if (!ok) game.uncheck(type);
else ({ ok, auto = auto } = game.Check[type](event, useCache));
});

View File

@ -281,7 +281,7 @@ export class Get extends Uninstantable {
if (info.zhuSkill) list.add('主公技');
if (info.limited) list.add('限定技');
if (info.juexingji) list.add('觉醒技');
if (info.zhuanhuanji) list.add('转换技');
if (get.is.zhuanhuanji(skill, player)) list.add('转换技');
if (info.hiddenSkill) list.add('隐匿技');
if (info.clanSkill) list.add('宗族技');
if (info.groupSkill) list.add('势力技');

View File

@ -443,4 +443,18 @@ export class Is extends Uninstantable {
if (info.locked) return true;
return false;
}
/**
* @param { string } skill
* @param { Player } player
* @returns
*/
static zhuanhuanji(skill, player) {
const info = lib.skill[skill], { zhuanhuanji } = info;
if ('zhuanhuanji2' in info) {
const { zhuanhuanji2 } = info;
if (typeof zhuanhuanji2 === 'function') return Boolean(zhuanhuanji2(skill, player));
return Boolean(zhuanhuanji2);
}
return Boolean(zhuanhuanji);
}
}

View File

@ -2890,35 +2890,40 @@ export const Content = {
},
phaseUse: function () {
"step 0";
const stat = player.getStat();
for (let i in stat.skill) {
let bool = false;
const info = lib.skill[i];
if (!info) continue;
if (info.enable != undefined) {
if (typeof info.enable == 'string' && info.enable == 'phaseUse') bool = true;
else if (typeof info.enable == 'object' && info.enable.includes('phaseUse')) bool = true;
}
if (bool) stat.skill[i] = 0;
}
for (let i in stat.card) {
let bool = false;
const info = lib.card[i];
if (!info) continue;
if (info.updateUsable == 'phaseUse') stat.card[i] = 0;
}
"step 1";
event.trigger('phaseUseBefore');
"step 2";
event.trigger('phaseUseBegin');
"step 3";
if (!event.logged) {
game.log(player, '进入了出牌阶段');
event.logged = true;
const stat = player.getStat();
for (let i in stat.skill) {
let bool = false;
const info = lib.skill[i];
if (!info) continue;
if (info.enable != undefined) {
if (typeof info.enable == 'string' && info.enable == 'phaseUse') bool = true;
else if (typeof info.enable == 'object' && info.enable.includes('phaseUse')) bool = true;
}
if (bool) stat.skill[i] = 0;
}
for (let i in stat.card) {
let bool = false;
const info = lib.card[i];
if (!info) continue;
if (info.updateUsable == 'phaseUse') stat.card[i] = 0;
}
}
var next = player.chooseToUse();
if (!lib.config.show_phaseuse_prompt) {
next.set('prompt', false);
}
next.set('type', 'phase');
"step 1";
"step 4";
if (result.bool && !event.skipped) {
event.goto(0);
event.goto(3);
}
game.broadcastAll(function () {
if (ui.tempnowuxie) {
@ -2926,6 +2931,10 @@ export const Content = {
delete ui.tempnowuxie;
}
});
"step 5";
event.trigger('phaseUseEnd');
"step 6";
event.trigger('phaseUseAfter');
},
phaseDiscard: function () {
"step 0";
@ -8092,8 +8101,11 @@ export const Content = {
_status.dying.remove(player);
if (lib.config.background_speak) {
if (lib.character[player.name] && lib.character[player.name][4].some(tag => /^die:.+$/.test(tag))) {
var tag = lib.character[player.name][4].find(tag => /^die:.+$/.test(tag));
const name = (player.skin.name || player.name);
const goon = (!lib.character[name]);
if (goon) lib.character[name] = ['', '', 0, [], ((lib.characterSubstitute[player.name] || []).find(i => i[0] == name) || [name, []])[1]];
if (lib.character[name][4].some(tag => /^die:.+$/.test(tag))) {
var tag = lib.character[name][4].find(tag => /^die:.+$/.test(tag));
var reg = new RegExp("^ext:(.+)?/");
var match = tag.match(/^die:(.+)$/);
if (match) {
@ -8102,16 +8114,17 @@ export const Content = {
game.playAudio(path);
}
}
else if (lib.character[player.name] && lib.character[player.name][4].some(tag => tag.startsWith('die_audio'))) {
var tag = lib.character[player.name][4].find(tag => tag.startsWith('die_audio'));
else if (lib.character[name][4].some(tag => tag.startsWith('die_audio'))) {
var tag = lib.character[name][4].find(tag => tag.startsWith('die_audio'));
var list = tag.split(':').slice(1);
game.playAudio('die', list.length ? list[0] : player.name);
game.playAudio('die', list.length ? list[0] : name);
}
else {
game.playAudio('die', player.name, function () {
game.playAudio('die', player.name.slice(player.name.indexOf('_') + 1));
game.playAudio('die', name, function () {
game.playAudio('die', name.slice(name.indexOf('_') + 1));
});
}
if (goon) delete lib.character[name];
}
}, player);

View File

@ -1651,6 +1651,7 @@ export class Player extends HTMLDivElement {
this.sex = lib.character[this.name][0];
if (this.group == 'unknown') this.group = lib.character[this.name][1];
this.classList.remove('unseen');
this.classList.remove('unseen_show');
break;
case 1:
if (log !== false) game.log(this, '展示了副将', '#b' + this.name2);
@ -1658,6 +1659,7 @@ export class Player extends HTMLDivElement {
if (this.sex == 'unknown') this.sex = lib.character[this.name2][0];
if (this.name.startsWith('unknown')) this.name = this.name2;
this.classList.remove('unseen2');
this.classList.remove('unseen2_show');
break;
case 2:
if (log !== false) {
@ -1671,6 +1673,8 @@ export class Player extends HTMLDivElement {
if (this.group == 'unknown') this.group = lib.character[this.name][1];
this.classList.remove('unseen');
this.classList.remove('unseen2');
this.classList.remove('unseen_show');
this.classList.remove('unseen2_show');
break;
}
if (!this.isUnseen(2)) {
@ -2128,6 +2132,10 @@ export class Player extends HTMLDivElement {
this.name = character;
this.name1 = character;
this.tempname = [];
this.skin = {
name: character,
name2: character2,
};
this.sex = info[0];
this.group = info[1];
this.hp = hp1;
@ -2279,6 +2287,7 @@ export class Player extends HTMLDivElement {
this.node.name.classList.add('long');
}
if (info[4].includes('hiddenSkill') && !this.noclick) {
if (!_status.video && get.mode() != 'guozhan') this.classList.add('unseen_show');
this.classList.add(_status.video ? 'unseen_v' : 'unseen');
if (!this.node.name_seat && !_status.video) {
this.node.name_seat = ui.create.div('.name.name_seat', get.verticalStr(get.translation(this.name)), this);
@ -2300,6 +2309,7 @@ export class Player extends HTMLDivElement {
this.node.count.classList.add('p2');
if (info2[4].includes('hiddenSkill') && !this.noclick) {
if (!_status.video && get.mode() != 'guozhan') this.classList.add('unseen2_show');
this.classList.add(_status.video ? 'unseen2_v' : 'unseen2');
}
this.node.name2.innerHTML = get.slimName(character2);
@ -2310,6 +2320,76 @@ export class Player extends HTMLDivElement {
return this;
}
/**
* 换肤换音想要支持某个武将更换皮肤必须在lib.character.characterSubstitute中存在该武将的id以下以name代指武将idcharacter代指换肤图片名
*
* 如果换肤换音引用本体的image/character素材作为更换的皮肤且不需要使用本体audio/die以外的地方的配音则你无需在characterSubstitute中书写关于此皮肤的信息
*
* 如果lib.character[character]不存在且想引用其他路径的图片素材或阵亡素材请以[character,[]]的形式写入lib.character.characterSubstitute[name]第二个数组填入形式同lib.character[4]的书写形式
*
* @param { string | string }
*/
changeSkin(skill, character) {
if (!skill || !character) {
console.log('error: no sourceSkill or character to changeSkin', get.translation(this));
return;
}
for (const i of ['name', 'name1', 'name2']) {
if (i == 'name1' && this.name === this.name1) continue;
const list = lib.characterSubstitute[this[i]];
if (this[i] && list) {
if ((get.character(this[i], 3) || []).includes(skill)) {
const name = (i == 'name2' ? 'name2' : 'name');
if (this.skin[name] != character) {
const origin = this.skin[name];
game.broadcastAll((player, name, character, list, origin) => {
player.tempname.remove(origin);
player.tempname.add(character);
player.skin[name] = character;
const goon = (!lib.character[character]);
if (goon) lib.character[character] = ['', '', 0, [], (list.find(i => i[0] == character) || [character, []])[1]];
player.smoothAvatar(name == 'name2');
player.node['avatar' + name.slice(4)].setBackground(character, 'character');
player.node['avatar' + name.slice(4)].show();
if (goon) delete lib.character[character];
}, this, name, character, list, origin);
game.addVideo('changeSkin', this, {
from: origin,
to: character,
name: name,
list: list,
avatar2: name == 'name2',
});
}
}
}
}
}
changeSkinByName(character, index){
const name = (index == 2 ? 'name2' : 'name');
const list = lib.characterSubstitute[this[name]];
if (list && lib.characterSubstitute[this[name]]) {
const origin = this.skin[name];
game.broadcastAll((player, name, character, list, origin) => {
player.tempname.remove(origin);
player.tempname.add(character);
player.skin[name] = character;
const goon = (!lib.character[character]);
if (goon) lib.character[character] = ['', '', 0, [], (list.find(i => i[0] == character) || [character, []])[1]];
player.smoothAvatar(name == 'name2');
player.node['avatar' + name.slice(4)].setBackground(character, 'character');
player.node['avatar' + name.slice(4)].show();
if (goon) delete lib.character[character];
}, this, name, character, list, origin);
game.addVideo('changeSkin', this, {
from: origin,
to: character,
name: name,
list: list,
avatar2: name == 'name2',
});
}
}
initOL(name, character) {
this.node.avatar.setBackground(character, 'character');
this.node.avatar.show();
@ -2470,13 +2550,16 @@ export class Player extends HTMLDivElement {
}
if (this.name2 == from) {
this.name2 = to;
this.skin.name2 = to;
}
else if (this.name == from || this.name1 == from) {
if (this.name1 == from) {
this.name1 = to;
this.skin.name = to;
}
if (!this.isUnseen(1)) {
this.name = to;
if (this.skin.name != to) this.skin.name = to;
this.sex = info2[0];
}
}
@ -2568,6 +2651,7 @@ export class Player extends HTMLDivElement {
delete this.name;
delete this.name1;
delete this.tempname;
delete this.skin;
delete this.sex;
delete this.group;
delete this.hp;
@ -2625,6 +2709,8 @@ export class Player extends HTMLDivElement {
this.node.hp.show();
this.classList.remove('unseen');
this.classList.remove('unseen2');
this.classList.remove('unseen_show');
this.classList.remove('unseen2_show');
this.node.identity.style.backgroundColor = '';
this.node.intro.innerHTML = '';
@ -3888,7 +3974,7 @@ export class Player extends HTMLDivElement {
return next;
}
phaseUse() {
var next = game.createEvent('phaseUse');
var next = game.createEvent('phaseUse', false);
next.player = this;
next.setContent('phaseUse');
return next;
@ -7465,7 +7551,7 @@ export class Player extends HTMLDivElement {
this.addSkill(skillsToAdd[i], null, true, true);
this.additionalSkills[skill].push(skillsToAdd[i]);
}
this.checkConflict();
_status.event.clearStepCache();
return this;
@ -8738,10 +8824,10 @@ export class Player extends HTMLDivElement {
if (this.hasSkillTag('respondSha', true, respond ? 'respond' : 'use', true)) return true;
return this.hasUsableCard('sha');
}
hasShan() {
hasShan(respond) {
if (this.countCards('hs', 'shan')) return true;
if (this.countCards('hs', 'hufu')) return true;
if (this.hasSkillTag('respondShan', true, null, true)) return true;
if (this.hasSkillTag('respondShan', true, respond ? 'respond' : 'use', true)) return true;
return this.hasUsableCard('shan');
}
mayHaveSha(viewer, type, ignore, rvt) {
@ -8790,7 +8876,7 @@ export class Player extends HTMLDivElement {
}
mayHaveShan(viewer, type, ignore, rvt) {
/**
* type: skill tag type 'use', 'respond'
* type: skill tag type 'use', 'respond' or object
* ignore: ignore cards, ui.selected.cards added
* rvt: return value type 'count', 'odds', 'bool'(default)
*/

View File

@ -63,6 +63,7 @@ export class Library extends Uninstantable {
static characterFilter = {};
static characterSort = {};
static characterReplace = {};
static characterSubstitute = {};
static characterInitFilter = {};
static characterGuozhanFilter = ["mode_guozhan"];
static dynamicTranslate = {};
@ -6117,9 +6118,12 @@ export class Library extends Uninstantable {
}
if (config.connect_versus_mode == '2v2' || config.connect_versus_mode == '3v3') {
map.connect_replace_handcard.show();
if(config.connect_versus_mode == '2v2') map.connect_olfeiyang_four.show();
else map.connect_olfeiyang_four.hide();
}
else {
map.connect_replace_handcard.hide();
map.connect_olfeiyang_four.hide();
}
},
connect_versus_mode: {
@ -10326,13 +10330,24 @@ export class Library extends Uninstantable {
};
const del = groupSort(a) - groupSort(b);
if (del != 0) return del;
let aa = a, bb = b;
if (a.includes('_')) {
a = a.slice(a.indexOf('_') + 1);
var aa = a, bb = b;
var firstUnderscoreIndexA = a.indexOf('_');
var firstUnderscoreIndexB = b.indexOf('_');
var secondUnderscoreIndexA = firstUnderscoreIndexA != -1 ? a.indexOf('_', firstUnderscoreIndexA + 1) : -1;
var secondUnderscoreIndexB = firstUnderscoreIndexB != -1 ? b.indexOf('_', firstUnderscoreIndexB + 1) : -1;
if (secondUnderscoreIndexA != -1) {
a = a.slice(secondUnderscoreIndexA + 1);
} else if (firstUnderscoreIndexA != -1) {
a = a.slice(firstUnderscoreIndexA + 1);
}
if (b.includes('_')) {
b = b.slice(b.indexOf('_') + 1);
if (secondUnderscoreIndexB != -1) {
b = b.slice(secondUnderscoreIndexB + 1);
} else if (firstUnderscoreIndexB != -1) {
b = b.slice(firstUnderscoreIndexB + 1);
}
if (a != b) {
return a > b ? 1 : -1;
}
@ -10355,12 +10370,23 @@ export class Library extends Uninstantable {
var del = typeSort(a) - typeSort(b);
if (del != 0) return del;
var aa = a, bb = b;
if (a.includes('_')) {
a = a.slice(a.indexOf('_') + 1);
var firstUnderscoreIndexA = a.indexOf('_');
var firstUnderscoreIndexB = b.indexOf('_');
var secondUnderscoreIndexA = firstUnderscoreIndexA != -1 ? a.indexOf('_', firstUnderscoreIndexA + 1) : -1;
var secondUnderscoreIndexB = firstUnderscoreIndexB != -1 ? b.indexOf('_', firstUnderscoreIndexB + 1) : -1;
if (secondUnderscoreIndexA != -1) {
a = a.slice(secondUnderscoreIndexA + 1);
} else if (firstUnderscoreIndexA != -1) {
a = a.slice(firstUnderscoreIndexA + 1);
}
if (b.includes('_')) {
b = b.slice(b.indexOf('_') + 1);
if (secondUnderscoreIndexB != -1) {
b = b.slice(secondUnderscoreIndexB + 1);
} else if (firstUnderscoreIndexB != -1) {
b = b.slice(firstUnderscoreIndexB + 1);
}
if (a != b) {
return a > b ? 1 : -1;
}
@ -10400,12 +10426,23 @@ export class Library extends Uninstantable {
},
capt: function (a, b) {
var aa = a, bb = b;
if (aa.includes('_')) {
aa = aa.slice(aa.indexOf('_') + 1);
var firstUnderscoreIndexAA = aa.indexOf('_');
var firstUnderscoreIndexBB = bb.indexOf('_');
var secondUnderscoreIndexAA = firstUnderscoreIndexAA != -1 ? aa.indexOf('_', firstUnderscoreIndexAA + 1) : -1;
var secondUnderscoreIndexBB = firstUnderscoreIndexBB != -1 ? bb.indexOf('_', firstUnderscoreIndexBB + 1) : -1;
if (secondUnderscoreIndexAA != -1) {
aa = aa.slice(secondUnderscoreIndexAA + 1);
} else if (firstUnderscoreIndexAA != -1) {
aa = aa.slice(firstUnderscoreIndexAA + 1);
}
if (bb.includes('_')) {
bb = bb.slice(bb.indexOf('_') + 1);
if (secondUnderscoreIndexBB != -1) {
bb = bb.slice(secondUnderscoreIndexBB + 1);
} else if (firstUnderscoreIndexBB != -1) {
bb = bb.slice(firstUnderscoreIndexBB + 1);
}
if (aa != bb) {
return aa > bb ? 1 : -1;
}

View File

@ -3,14 +3,26 @@
*/
var ts;
importScripts('./game/typescript.js');
/**
* @type { import('./game/compiler-sfc.browser.js') }
*/
var sfc;
importScripts('./game/compiler-sfc.browser.js');
// @ts-ignore
if (typeof ts != 'undefined') {
console.log(`ts loaded`);
} else {
console.log(`ts undefined`);
}
// @ts-ignore
if (typeof sfc != 'undefined') {
console.log(`sfc loaded`);
sfc.registerTS(() => ts);
} else {
console.log(`sfc undefined`);
}
console.log('serviceWorker version 2.2');
console.log('serviceWorker version 2.3');
self.addEventListener("install", (event) => {
// The promise that skipWaiting() returns can be safely ignored.
@ -28,11 +40,27 @@ self.addEventListener('message', event => {
console.log(event.data);
});
/**
* 将vue编译的结果放在这里调用的时候直接返回就好了
*/
const vueFileMap = new Map();
self.addEventListener('fetch', event => {
// @ts-ignore
const request = event.request;
if (typeof request.url != 'string') return console.log(request);
if (!['.ts', '.json'].some(ext => request.url.endsWith(ext))) return;
if (vueFileMap.has(request.url)) {
const rep = new Response(new Blob([vueFileMap.get(request.url)], { type: "text/javascript" }), {
status: 200,
statusText: "OK",
headers: new Headers({
"Content-Type": "text/javascript"
}),
});
event.respondWith(rep);
return;
}
if (!['.ts', '.json', '.vue'].some(ext => request.url.endsWith(ext))) return;
if (request.url.endsWith('.d.ts')) return;
if (request.url.endsWith('.json')) {
// @ts-ignore
@ -55,7 +83,7 @@ self.addEventListener('fetch', event => {
let js;
if (request.url.endsWith('.json')) {
js = `export default ${text}`;
} else {
} else if (request.url.endsWith('.ts')) {
js = ts.transpile(text, {
module: ts.ModuleKind.ES2015,
target: ts.ScriptTarget.ES2019,
@ -63,6 +91,73 @@ self.addEventListener('fetch', event => {
resolveJsonModule: true,
esModuleInterop: true,
}, request.url);
} else if (request.url.endsWith('.vue')) {
const id = Date.now().toString();
const scopeId = `data-v-${id}`;
// 后续处理sourceMap合并
const { descriptor } = sfc.parse(text, { filename: request.url, sourceMap: true });
// console.log({ descriptor });
const hasScoped = descriptor.styles.some((s) => s.scoped);
// 编译 script因为可能有 script setup还要进行 css 变量注入
const script = sfc.compileScript(descriptor, {
id: scopeId,
inlineTemplate: true,
templateOptions: {
scoped: hasScoped,
compilerOptions: {
scopeId: hasScoped ? scopeId : undefined,
}
},
});
// 用于存放代码,最后 join('\n') 合并成一份完整代码
const codeList = [];
vueFileMap.set(
request.url + '?type=script',
// 重写 default
sfc.rewriteDefault(script.content, "__sfc_main__")
.replace(`const __sfc_main__`, `export const __sfc_main__`)
// import vue重新指向
.replaceAll(`from "vue"`, `from "/game/vue.esm-browser.js"`)
.replaceAll(`from 'vue'`, `from '/game/vue.esm-browser.js'`)
);
codeList.push(`import { __sfc_main__ } from '${request.url}?type=script'`);
codeList.push(`__sfc_main__.__scopeId = '${scopeId}'`);
// 编译模板,转换成 render 函数
const template = sfc.compileTemplate({
source: descriptor.template.content,
filename: request.url, // 用于错误提示
id: scopeId,
scoped: hasScoped,
compilerOptions: {
scopeId: hasScoped ? scopeId : undefined,
}
});
vueFileMap.set(request.url + '?type=template', template.code
// .replace(`function render(_ctx, _cache) {`, str => str + 'console.log(_ctx);')
.replaceAll(`from "vue"`, `from "/game/vue.esm-browser.js"`)
.replaceAll(`from 'vue'`, `from '/game/vue.esm-browser.js'`)
);
codeList.push(`import { render } from '${request.url}?type=template'`);
codeList.push(`__sfc_main__.render = render;`);
codeList.push(`export default __sfc_main__;`);
// 一个 Vue 文件,可能有多个 style 标签
let styleIndex = 0;
for (const styleBlock of descriptor.styles) {
const styleCode = sfc.compileStyle({
source: styleBlock.content,
id,
filename: request.url,
scoped: styleBlock.scoped,
});
const varName = `el${ styleIndex }`;
const styleDOM = `let ${ varName } = document.createElement('style');\n${ varName }.innerHTML = \`${styleCode.code}\`;\ndocument.body.append(${ varName });`;
codeList.push(styleDOM);
}
js = codeList.join('\n');
// console.log(js);
}
const rep = new Response(new Blob([js], { type: "text/javascript" }), {
status: 200,