星董卓、张臶

This commit is contained in:
mengxinzxz 2023-12-05 01:03:27 +08:00
parent f3efb6af89
commit 3bf33aceda
3 changed files with 244 additions and 2 deletions

View File

@ -4,6 +4,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
name:'sp2',
connect:true,
character:{
star_dongzhuo:['male','qun',5,['star_dz_a','star_dz_b','star_dz_c'],['zhu']],
star_yuanshu:['male','qun',4,['starcanxi','starpizhi','starzhonggu'],['zhu']],
star_caoren:['male','wei',4,['starsujun','starlifeng']],
mp_liuling:['male','jin',3,['mpjiusong','mpmaotao','mpbishi'],['doublegroup:wei:qun:jin']],
@ -109,12 +110,178 @@ game.import('character',function(lib,game,ui,get,ai,_status){
sp_xuzhou:['re_taoqian','caosong','zhangmiao','qiuliju'],
sp_zhongyuan:['re_hucheer','re_zoushi','caoanmin','re_dongcheng'],
sp_xiaohu:['haomeng','yanfuren','yanrou','dc_zhuling'],
sp_star:['star_caoren','star_yuanshu'],
sp_star:['star_caoren','star_yuanshu','star_dongzhuo'],
mini_qixian:['mp_liuling'],
sp_decade:['caobuxing','re_maliang','dc_jikang'],
}
},
skill:{
//星董卓
star_dz_a:{
audio:2,
trigger:{source:'damageBegin1'},
filter:function(event,player){
return !event.player.getHistory('damage').length&&player.getHistory('useCard').length>=event.player.getHp();
},
forced:true,
logTarget:'player',
content:function(){
trigger.num++;
},
},
star_dz_b:{
audio:2,
trigger:{player:'phaseZhunbeiBegin'},
filter:function(event,player){
return player.getHp()>0;
},
direct:true,
content:function*(event,map){
var player=map.player;
var str=get.cnNumber(player.getHp());
var choiceList=[
'令至多'+str+'名体力值大于等于你的角色各失去1点体力',
'令至多'+str+'名手牌数大于等于你的角色各弃置一张手牌',
],list=['cancel2'];
if(game.hasPlayer(target=>{
if(target==player) return player.countCards('h',card=>lib.filter.cardDiscardable(card,player));
return target.countCards('h')>=Math.max(1,player.countCards('h'));
})) list.unshift('弃牌');
else choiceList[1]='<span style="opacity:0.5">'+choiceList[1]+'</span>';
list.unshift('扣血');
var result=yield player.chooseControl(list).set('prompt','###'+get.prompt('star_dz_b')+'###选择其中一项令任意名符合条件的角色执行然后你摸等量的牌回合结束时若这些角色中有本回合未受到过伤害的角色则你失去1点体力').set('ai',()=>{
var player=_status.event.player;
var controls=_status.event.controls.slice();
var cards=player.getCards('hes',card=>get.tag(card,'damage')&&player.hasValueTarget(card));
var cardx=cards.filter(card=>get.name(card)=='sha');
cardx.sort((a,b)=>player.getUseValue(b)-player.getUseValue(a));
cardx=cardx.slice(Math.min(cardx.length,player.getCardUsable('sha')),cardx.length);
cards.removeArray(cardx);
var targets1=game.filterPlayer(target=>get.attitude(player,target)<0&&target.getHp()>=player.getHp()&&get.effect(target,{name:'losehp'},player,player)>0&&cards.some(card=>player.canUse(card,target)));
_status.star_dz_b_check=true;
var targets2=game.filterPlayer(target=>get.attitude(player,target)<0&&target.countCards('h')>=Math.max(1,player.countCards('h'))&&get.effect(target,{name:'guohe_copy2'},player,player)>0&&cards.some(card=>player.canUse(card,target)));
delete _status.star_dz_b_check;
[targets1,targets2].forEach(list=>{
list.sort((a,b)=>get.damageEffect(b)-get.damageEffect(a));
list=list.slice(0,Math.min(player.getHp(),cards.length));
});
if(!controls.includes('弃牌')) return 1-get.sgn(targets1.length);
return Math.max(0,get.sgn(targets2.length-targets1.length));
}).set('choiceList',choiceList);
if(result.control!='cancel2'){
var choice=result.index;
var result2=yield player.chooseTarget([1,player.getHp()],'请选择【技能】的目标','令至多'+str+'名'+(choice?'手牌数':'体力值')+'大于你的角色各'+(choice?'弃置一张手牌':'失去1点体力'),(card,player,target)=>{
var name=_status.event.card.name;
if(name=='guohe_copy2'){
if(target==player) return player.countCards('h',card=>lib.filter.cardDiscardable(card,player));
return target.countCards('h')>=Math.max(1,player.countCards('h'));
}
return target.getHp()>=player.getHp();
}).set('ai',target=>{
var player=_status.event.player;
if(get.attitude(player,target)>=0) return 0;
return get.effect(target,_status.event.card,player,player);
}).set('card',{name:choice?'guohe_copy2':'loseHp'});
if(result2.bool){
var targets=result2.targets.sortBySeat();
player.logSkill('star_dz_b',targets);
targets.forEach(target=>{
target.addTempSkill('star_dz_b_threaten');
if(choice) target.chooseToDiscard('h',true);
else target.loseHp();
});
player.draw(targets.length);
player.when('phaseEnd').then(()=>{
targets.forEach(target=>target.removeSkill('star_dz_b_threaten'));
var targetx=targets.filter(target=>!target.getHistory('damage').length);
if(targetx.length){
targetx.forEach(target=>target.chat('乐'));
player.popup('杯具');
player.loseHp();
return;
}
player.popup('洗具');
}).vars({targets:targets});
}
}
},
global:'star_dz_b_check',
subSkill:{
check:{
mod:{
canBeDiscarded:function(card,player,target){
if(!_status.star_dz_b_check) return;
if(player.hasSkill('star_dz_b')&&get.position(card)!='h') return false;
},
},
},
threaten:{
charlotte:true,
trigger:{player:'damageEnd'},
firstDo:true,
forced:true,
popup:false,
content:function(){
player.removeSkill('star_dz_b_threaten');
},
ai:{threaten:114514+1919810},
mark:true,
markimage:'image/card/sha.png',
intro:{content:'我还没受到伤害哟!'},
},
},
},
star_dz_c:{
unique:true,
audio:2,
trigger:{global:'useCardAfter'},
filter:function(event,player){
return event.player!=player&&event.card.name=='jiu'&&player.isDamaged()&&event.player.group=='qun';
},
direct:true,
zhuSkill:true,
content:function*(event,map){
var player=map.player,target=map.trigger.target;
var result=yield target.chooseBool(get.prompt('star_dz_c',player),'令'+get.translation(player)+'回复1点体力').set('choice',get.recoverEffect(player,target,target)>0);
if(result.bool){
target.line(player);
player.logSkill('star_dz_c');
player.recover();
}
},
global:'star_dz_c_global',
subSkill:{
global:{
audio:'star_dz_c',
forceaudio:true,
filter:function(event,player){
if(!player.countCards('hes',card=>{
if(get.position(card)=='h'&&_status.connectMode) return true;
return get.name(card)=='jiu';
})) return false;
return event.type=='dying'&&event.dying&&event.dying!=player&&event.dying.hp<=0&&event.dying.hasZhuSkill('star_dz_c')&&player.group=='qun';
},
filterCard:function(card,player){
return get.name(card)=='jiu';
},
check:()=>1,
viewAs:{name:'tao'},
position:'hes',
prompt:function(){
return '将一张【酒】当作【桃】对'+get.translation(_status.event.dying)+'使用';
},
ai:{
save:true,
skillTagFilter:function(player,arg,target){
if(!player.countCards('hes',card=>{
if(get.position(card)=='h'&&_status.connectMode) return true;
return get.name(card)=='jiu';
})||player==target||!target.hasSkill('star_dz_c')||player.group!='qun') return false;
},
},
},
},
},
//星袁术
starcanxi:{
audio:2,
@ -10989,6 +11156,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){
starpizhi_info:'锁定技。①一名角色死亡后若你拥有该角色对应的“玺角”标记你失去之并摸X张牌。②结束阶段你摸X张牌。X为你本局游戏失去的“玺角”标记数',
starzhonggu:'冢骨',
starzhonggu_info:'主公技,锁定技。摸牌阶段,若游戏轮数大于等于场上的群势力角色数,则你额外摸两张牌,否则你少摸一张牌。',
star_dongzhuo:'星董卓',
star_dongzhuo_prefix:'星',
star_dz_a:'技能',
star_dz_a_info:'锁定技。当你于回合内对一名其他角色造成伤害时,若其本回合未受到过伤害,且你本回合使用的牌数大于等于其体力值,则此伤害+1。',
star_dz_b:'技能',
star_dz_b_info:'准备阶段你可以选择令至多X名体力值大于等于你的角色各失去1点体力或令至多X名手牌数大于等于你的角色各弃置一张手牌。若如此做你摸等同于选择角色数的牌且本回合结束时若这些角色中存在本回合未受到过伤害的角色则你失去1点体力。',
star_dz_c:'技能',
star_dz_c_info:'主公技。①其他群势力角色使用【酒】结算完毕后其可以令你回复1点体力。②当你处于濒死状态时其他群势力角色可以将【酒】当作【桃】对你使用。',
sp_whlw:"文和乱武",
sp_zlzy:"逐鹿中原",

View File

@ -4,6 +4,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
name:'xianding',
connect:true,
character:{
zhangjian:['male','qun',105,['dc_zj_a','dc_zj_b']],
zhugeruoxue:['female','wei',3,['dcqiongying','dcnuanhui']],
caoyi:['female','wei',4,['dcmiyi','dcyinjun']],
malingli:['female','shu',3,['dclima','dcxiaoyin','dchuahuo']],
@ -100,11 +101,71 @@ game.import('character',function(lib,game,ui,get,ai,_status){
sp2_jichu:['zhaoang','dc_liuye','dc_wangyun','yanghong','huanfan','xizheng'],
sp2_yuxiu:['dongguiren','dc_tengfanglan','zhangjinyun','zhoubuyi','dc_xujing'],
sp2_qifu:['dc_guansuo','xin_baosanniang','dc_zhaoxiang'],
sp2_gaoshan:['wanglang','liuhui'],
sp2_gaoshan:['wanglang','liuhui','zhangjian'],
sp2_wumiao:['wu_zhugeliang','wu_luxun'],
}
},
skill:{
//张臶
dc_zj_a:{
audio:2,
trigger:{player:'damageBegin2'},
filter:function(event,player){
return event.getParent().type=='card';
},
forced:true,
content:function(){
var num=get.number(trigger.card);
if(typeof num=='number'&&num>0) trigger.num=num;
else trigger.cancel();
},
ai:{
effect:{
target:function(card,player,target,current){
if(get.tag(card,'damage')&&typeof get.number(card)!='number') return 'zeroplayertarget';
},
},
},
},
dc_zj_b:{
audio:2,
trigger:{player:'phaseJieshuBegin'},
filter:function(event,player){
return player.countDiscardableCards(player,'he');
},
direct:true,
content:function*(event,map){
var player=map.player;
var result=yield player.chooseTarget(get.prompt2('dc_zj_b'),lib.filter.notMe).set('ai',target=>{
var player=_status.event.player;
if(!player.hasFriend()) return 0;
return -game.countPlayer(current=>current.inRange(target)&&get.attitude(current,target)<0&&get.damageEffect(target,current,current)>0);
});
if(result.bool){
var target=result.targets[0];
player.logSkill('dc_zj_b',target);
player.discard(player.getCards('he')).discarder=player;
target.addSkill('dc_zj_a');
target.addSkill('dc_zj_b_threaten');
player.when('phaseBegin').then(()=>{
if(target.isIn()){
target.removeSkill('dc_zj_a');
target.removeSkill('dc_zj_b_threaten');
}
}).vars({target:target});
}
},
subSkill:{
//定要将你赶尽杀绝
threaten:{
charlotte:true,
mark:true,
marktext:'噩',
intro:{content:'已经开始汗流浃背了'},
ai:{threaten:114514*1919810},
},
},
},
//诸葛若雪
dcqiongying:{
audio:2,
@ -12691,6 +12752,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
},
characterIntro:{
zhangjian:'张臶136年240年字子明钜鹿人。汉末三国时期隐士、音乐家精通谶纬之学。张臶生活的年代从东汉一直到曹魏齐王时期受到朝廷多次征召一直回避不愿做官。他活了一百零五岁是三国时期有可靠记载的最长寿的人之一。',
puyuan:'蒲元是三国时蜀汉杰出的工匠。为诸葛亮造刀三千口,并且制作木牛流马。后来姜维为他写过两部传记《蒲元传》《蒲元别传》。',
guanlu:"管辂209年256年字公明平原今山东德州平原县人。三国时期曹魏术士。年八九岁便喜仰观星辰。成人后精通《周易》善于卜筮、相术习鸟语相传每言辄中出神入化。体性宽大常以德报怨。正元初为少府丞。北宋时被追封为平原子。管辂是历史上著名的术士被后世奉为卜卦观相的祖师。",
gexuan:"葛玄164年-244年汉族吴丹阳郡句容县都乡吉阳里人今句容市祖籍山东琅琊三国著名高道道教灵宝派祖师。字孝先号仙翁被尊称为“葛天师”。道教尊为葛仙翁又称太极仙翁与张道陵、许逊、萨守坚共为四大天师。为汉下邳僮侯葛艾后裔祖葛矩安平太守黄门郎从祖葛弥豫章第五郡太守。父葛焉字德儒州主簿山阴令散骑常侍大尚书。随左慈学道得《太清丹经》、《黄帝九鼎神丹经》、《金液丹经》等道经。曾采药海山吴嘉禾二年233年在閤皂山修道建庵筑坛立炉修炼九转金丹。喜好遨游山川去过括苍山、南岳山、罗浮山。编撰《灵宝经诰》精研上清、灵宝等道家真经并嘱弟子世世箓传。",
@ -13317,6 +13379,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
dcqiongying_info:'出牌阶段限一次。你可以移动场上的一张牌,然后你弃置一张与此牌花色相同的手牌(若没有该花色的手牌则改为展示所有手牌)。',
dcnuanhui:'暖惠',
dcnuanhui_info:'结束阶段你可以选择一名装备区有牌的角色其可以视为依次使用X张基本牌X为其装备区牌数。若其以此法使用了至少两张牌其弃置装备区里的所有牌。',
zhangjian:'张臶',
dc_zj_a:'技能',
dc_zj_a_info:'锁定技。当你受到牌造成的伤害时,若此牌有点数,则你将此伤害值改为此牌点数,否则你防止此伤害。',
dc_zj_b:'技能',
dc_zj_b_info:'结束阶段,你可以弃置所有牌并令一名其他角色获得〖技能〗直到你的下个回合开始。',
sp2_yinyu:'隐山之玉',
sp2_huben:'百战虎贲',

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB