Skip to content

Commit

Permalink
Merge pull request #249 from mengxinzxz/PR-Branch
Browse files Browse the repository at this point in the history
新武将+bug修复+技能调整+国战模式调整
  • Loading branch information
Spmario233 authored Sep 1, 2023
2 parents b9793c4 + 8d7d5e4 commit e22fd84
Show file tree
Hide file tree
Showing 45 changed files with 491 additions and 83 deletions.
Binary file added audio/die/clan_wanghun.mp3
Binary file not shown.
Binary file added audio/die/clan_wukuang.mp3
Binary file not shown.
Binary file added audio/die/clan_zhongyan.mp3
Binary file not shown.
Binary file added audio/die/dongxie.mp3
Binary file not shown.
Binary file added audio/die/ol_wenqin.mp3
Binary file not shown.
Binary file added audio/die/peiyuanshao.mp3
Binary file not shown.
Binary file added audio/skill/clanbaozu_clan_zhongyan1.mp3
Binary file not shown.
Binary file added audio/skill/clanbaozu_clan_zhongyan2.mp3
Binary file not shown.
Binary file added audio/skill/clanchenya1.mp3
Binary file not shown.
Binary file added audio/skill/clanchenya2.mp3
Binary file not shown.
Binary file added audio/skill/clanfuxun1.mp3
Binary file not shown.
Binary file added audio/skill/clanfuxun2.mp3
Binary file not shown.
Binary file added audio/skill/clanguangu1.mp3
Binary file not shown.
Binary file added audio/skill/clanguangu2.mp3
Binary file not shown.
Binary file added audio/skill/clanlianzhu1.mp3
Binary file not shown.
Binary file added audio/skill/clanlianzhu2.mp3
Binary file not shown.
Binary file added audio/skill/clanmuyin_clan_wukuang1.mp3
Binary file not shown.
Binary file added audio/skill/clanmuyin_clan_wukuang2.mp3
Binary file not shown.
Binary file added audio/skill/clanxiaoyong1.mp3
Binary file not shown.
Binary file added audio/skill/clanxiaoyong2.mp3
Binary file not shown.
Binary file added audio/skill/clanzhongliu_clan_wanghun1.mp3
Binary file not shown.
Binary file added audio/skill/clanzhongliu_clan_wanghun2.mp3
Binary file not shown.
Binary file added audio/skill/dchumei1.mp3
Binary file not shown.
Binary file added audio/skill/dchumei2.mp3
Binary file not shown.
Binary file added audio/skill/dcjiaoxia1.mp3
Binary file not shown.
Binary file added audio/skill/dcjiaoxia2.mp3
Binary file not shown.
Binary file added audio/skill/dcmoyu1.mp3
Binary file not shown.
Binary file added audio/skill/dcmoyu2.mp3
Binary file not shown.
Binary file added audio/skill/olguangao1.mp3
Binary file not shown.
Binary file added audio/skill/olguangao2.mp3
Binary file not shown.
Binary file added audio/skill/olhuiqi1.mp3
Binary file not shown.
Binary file added audio/skill/olhuiqi2.mp3
Binary file not shown.
Binary file added audio/skill/olxieju1.mp3
Binary file not shown.
Binary file added audio/skill/olxieju2.mp3
Binary file not shown.
6 changes: 4 additions & 2 deletions character/clan.js
Original file line number Diff line number Diff line change
Expand Up @@ -898,6 +898,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
global:'clanlianzhu_global',
subSkill:{
global:{
forceaudio:true,
audio:'clanlianzhu',
enable:'phaseUse',
filter:(event,player)=>game.hasPlayer(current=>lib.skill.clanlianzhu_global.filterTarget(null,player,current)),
filterCard:(card,player)=>game.hasPlayer(current=>current.hasSkill('clanlianzhu')&&!current.hasSkill('clanlianzhu_targeted')&&!current.storage.clanlianzhu)&&player.canRecast(card),
Expand Down Expand Up @@ -2026,6 +2028,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return 6-ui.selected.cards.length-get.value(card);
},
onuse:function(links,player){
lib.skill.chenliuwushi.change(player,-1);
player.addTempSkill('clanzhanding_effect');
},
ai:{
Expand All @@ -2044,7 +2047,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return event.skill=='clanzhanding';
},
content:function(){
lib.skill.chenliuwushi.change(player,-1);
if(player.hasHistory('sourceDamage',function(evt){
return evt.card==trigger.card;
})){
Expand Down Expand Up @@ -2283,7 +2285,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
chenliuwushi:'陈留·吴氏',
clan_wuban:'族吴班',
clanzhanding:'斩钉',
clanzhanding_info:'你可以将任意张牌当做【杀】使用。你以此法使用的【杀】结算结束后,你令你的手牌上限-1,然后若你因此【杀】造成过伤害,则你将手牌摸至手牌上限(至多摸五张),否则你令此【杀】不计入次数限制。',
clanzhanding_info:'你可以将任意张牌当做【杀】使用并你令你的手牌上限-1。你以此法使用的【杀】结算结束后,若你因此【杀】造成过伤害,则你将手牌摸至手牌上限(至多摸五张),否则你令此【杀】不计入次数限制。',
clan_xunshu:'族荀淑',
clanshenjun:'神君',
clanshenjun_info:'当一名角色使用【杀】或普通锦囊牌时,若你手牌中有该牌名的牌,你展示之,且这些牌称为“神君”。然后本阶段结束时,你可以将等同于你“神君”数张牌当做一张“神君”牌使用。',
Expand Down
4 changes: 2 additions & 2 deletions character/extra.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
extra_mobilezhi:['shen_guojia','shen_xunyu'],
extra_mobilexin:['shen_taishici','shen_sunce'],
extra_tw:['tw_shen_guanyu','tw_shen_lvmeng'],
extra_offline:['shen_diaochan','boss_zhaoyun'],
extra_offline:['shen_diaochan','boss_zhaoyun','shen_dianwei'],
},
},
character:{
Expand Down Expand Up @@ -2829,7 +2829,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
'step 1'
if(result.control!='cancel2'){
if(result.control=='选项二'){
player.logSkill('tspowei',target);
player.logSkill('tspowei_use',target);
player.gainPlayerCard(target,'h',true);
event.goto(3);
}
Expand Down
39 changes: 27 additions & 12 deletions character/huicui.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
zhangkai:['male','qun',4,['dcxiangshu']],
gaoxiang:['male','shu',4,['dcchiying'],['unseen']],
yuanyin:['male','qun',3,['dcmoshou','dcyunjiu'],['unseen']],
dongwan:['female','qun',3,['dcshengdu','dcjieling'],['unseen']],
dongwan:['female','qun',3,['dcshengdu','dcjieling']],
zhangchu:['female','qun',3,['dcjizhong','dcrihui','dcguangshi']],
peiyuanshao:['male','qun',4,['dcmoyu'],['unseen']],
peiyuanshao:['male','qun',4,['dcmoyu']],
mengjie:['male','qun',3,['dcyinlu','dcyouqi']],
dc_huojun:['male','shu',4,['dcgue','dcsigong']],
dc_sunhanhua:['female','wu',3,['dchuiling','dcchongxu']],
Expand Down Expand Up @@ -885,12 +885,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
target.chooseToUse(function(card,player,event){
if(get.name(card)!='sha') return false;
return lib.filter.filterCard.apply(this,arguments);
},'是否对'+get.translation(player)+'使用一张【杀】(伤害基数为'+num+')?').set('targetRequired',true).set('complexSelect',true).set('filterTarget',function(card,player,target){
},'是否对'+get.translation(player)+'使用一张无距离限制的【杀】(伤害基数为'+num+')?').set('targetRequired',true).set('complexSelect',true).set('filterTarget',function(card,player,target){
if(target!=_status.event.sourcex&&!ui.selected.targets.contains(_status.event.sourcex)) return false;
return lib.filter.filterTarget.apply(this,arguments);
return lib.filter.targetEnabled.apply(this,arguments);
}).set('sourcex',player).set('num',num).set('oncard',card=>{
var evt=_status.event;
evt.baseDamage=evt.num;
_status.event.baseDamage=_status.event.getParent().num;
});
'step 2'
if(result.bool){
Expand All @@ -904,7 +903,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
charlotte:true,
onremove:true,
},
ban:{charlotte:true},
ban:{
charlotte:true,
mark:true,
marktext:'欲',
intro:{content:'偷马贼被反打了!'},
},
ai:{
ai:{
effect:{
Expand Down Expand Up @@ -937,7 +941,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){
target:player,
card:{name:'sha'},
},true)) return eff;
if(player.getStorage('dcmoyu_clear').length||player.hp+player.countCards('hs','tao')<=1) return 0;
if(target.hasSha()&&player.hp+player.countCards('h',function(card){
var mod2=game.checkMod(card,player,'unchanged','cardEnabled2',player);
if(mod2!='unchanged') return mod2;
var mod=game.checkMod(card,player,player,'unchanged','cardSavable',player);
if(mod!='unchanged') return mod;
var savable=get.info(card).savable;
if(typeof savable=='function') savable=savable(card,player,player);
return savable;
})<=player.getStorage('dcmoyu_clear').length+1) return 0;
return eff;
}
}
Expand Down Expand Up @@ -1148,16 +1160,19 @@ game.import('character',function(lib,game,ui,get,ai,_status){
targetInRange:function(card){
if(card.storage&&card.storage.dcjieling) return true;
},
cardUsable:function(card,player,num){
if(card.storage&&card.storage.dcjieling) return Infinity;
},
},
subSkill:{
after:{
trigger:{global:'useCardAfter'},
forced:true,
direct:true,
charlotte:true,
audio:'dcjieling',
trigger:{global:'useCardAfter'},
filter:function(event,player){
return event.card.name=='sha'&&event.card.storage&&event.card.storage.dcjieling;
},
direct:true,
content:function(){
'step 0'
var damaged=game.hasPlayer2(current=>{
Expand Down Expand Up @@ -10197,7 +10212,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
dcsigong_info:'其他角色的回合结束时,若其于本回合内使用牌被响应过,你可以将手牌摸至或弃置至1,视为对其使用一张需使用X张【闪】抵消的【杀】,且此【杀】的伤害基数+1(X为你以此法弃置的牌数且至少为1)。当你以此法造成伤害后,该技能于本轮失效。',
peiyuanshao:'裴元绍',
dcmoyu:'没欲',
dcmoyu_info:'出牌阶段每名角色限一次。你可以获得一名其他角色区域里的一张牌,然后其可以对你使用一张【杀】,且此【杀】伤害基数为X(X为你于本回合发动此技能的次数)。若此【杀】对你造成了伤害,你令此技能于本回合失效。',
dcmoyu_info:'出牌阶段每名角色限一次。你可以获得一名其他角色区域里的一张牌,然后其可以对你使用一张无距离限制的【杀】,且此【杀】伤害基数为X(X为你于本回合发动此技能的次数)。若此【杀】对你造成了伤害,你令此技能于本回合失效。',
zhangchu:'张楚',
dcjizhong:'集众',
dcjizhong_info:'出牌阶段限一次。你可以令一名其他角色摸两张牌,然后其选择一项:1.若其没有“信众”标记,其获得“信众”标记;2.弃置三张手牌。',
Expand Down
24 changes: 19 additions & 5 deletions character/mobile.js
Original file line number Diff line number Diff line change
Expand Up @@ -7920,6 +7920,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
audio:3,
enable:'phaseUse',
usable:1,
filter:function(event,player){
return game.hasPlayer(function(target){
return lib.skill.beizhu.filterTarget(null,player,target);
});
},
filterTarget:function(card,player,target){
return target!=player&&target.countCards('h')>0;
},
Expand All @@ -7933,12 +7938,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
event.cards=cards;
event.goto(5);
}
else player.discardPlayerCard('he',target,true);
else player.discardPlayerCard('he',target,'visible',true);
'step 2'
player.chooseBool('是否令'+get.translation(target)+'获得一张【杀】?').set('ai',function(){
var evt=_status.event.getParent();
return get.attitude(evt.player,evt.target)>0;
});
player.chooseBool('是否令'+get.translation(target)+'获得一张【杀】?').set('choice',get.attitude(player,target)>0);
'step 3'
if(result.bool){
var card=get.cardPile2(function(card){
Expand All @@ -7965,6 +7967,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){
event.redo();
}
},
ai:{
order:7,
threaten:1.14+5.14,
result:{
player:function(player,target){
var eff=get.effect(target,{name:'guohe_copy2'},player,player);
var cards=target.getCards('h',{name:'sha'});
if(!cards.length) return eff;
return eff/(cards.length+3);
},
},
},
},
beizhu_draw:{
trigger:{player:'damageEnd'},
Expand Down
10 changes: 9 additions & 1 deletion character/sp.js
Original file line number Diff line number Diff line change
Expand Up @@ -9038,7 +9038,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){
var type=get.type(trigger.card,false);
player.chooseToDiscard('h',get.prompt('olfengzi'),'弃置一张'+get.translation(type)+'牌,令'+get.translation(trigger.card)+'结算两次',function(card,player){
return get.type2(card,player)==_status.event.type;
}).set('type',type).set('ai',()=>-1).logSkill='olfengzi';
}).set('type',type).set('ai',function(card){
var player=_status.event.player;
var trigger=_status.event.getTrigger();
if(trigger.card.name=='tiesuo') return 0;
var num=0;
for(var i of trigger.targets) num+=get.effect(i,trigger.card,player,player);
if(num<=0) return 0;
return 7-get.value(card);
}).logSkill='olfengzi';
'step 1'
if(result.bool){
trigger.effectCount++;
Expand Down
173 changes: 172 additions & 1 deletion character/sp2.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
zhaozhong:['male','qun',6,['yangzhong','huangkong']],
hanfu:['male','qun',4,['hfjieying','weipo']],
re_quyi:['male','qun',4,['refuqi','jiaozi']],
dongxie:['female','qun','3/4',['juntun','jiaojie']],
dongxie:['female','qun',4,['dcjiaoxia','dchumei']],
wangrong:['female','qun',3,['minsi','jijing','zhuide']],
ol_dingyuan:['male','qun',4,['cixiao','xianshuai']],
xin_baosanniang:['female','shu',3,['decadewuniang','decadexushen']],
Expand Down Expand Up @@ -111,6 +111,173 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
},
skill:{
//董翓
dcjiaoxia:{
mod:{
cardUsableTarget:function(card,player,target){
if(!player.isPhaseUsing()) return;
if(card.name=='sha'&&!player.getStorage('dcjiaoxia_mark').contains(target)) return true;
},
},
audio:2,
trigger:{player:'phaseUseBegin'},
filter:function(event,player){
return player.countCards('h');
},
check:function(event,player){
return player.countCards('h',card=>{
return game.hasPlayer(target=>{
var cardx=get.autoViewAs({name:'sha'},[card]);
return player.canUse(cardx,target)&&get.effect(target,cardx,player,player)>0&&(!player.hasUseTarget(card)||player.hasValueTarget(card));
});
});
},
content:function(){
var cards=player.getCards('h');
player.addTempSkill('dcjiaoxia_used','phaseUseAfter');
player.addGaintag(cards,'dcjiaoxia_used');
},
group:'dcjiaoxia_load',
subSkill:{
load:{
charlotte:true,
trigger:{player:'useCard1'},
filter:function(event,player){
if(!player.isPhaseUsing()) return false;
return event.card.name=='sha'&&event.targets&&event.targets.some(target=>!player.getStorage('dcjiaoxia_mark').contains(target));
},
forced:true,
popup:false,
firstDo:true,
content:function(){
player.addTempSkill('dcjiaoxia_mark','phaseUseAfter');
player.markAuto('dcjiaoxia_mark',trigger.targets.filter(target=>!player.getStorage('dcjiaoxia_mark').contains(target)));
},
},
mark:{
charlotte:true,
onremove:true,
},
used:{
mod:{
aiOrder:function(player,card,num){
if(get.itemtype(card)=='card'&&card.hasGaintag('dcjiaoxia_used')) return num+1;
},
cardname:function(card,player){
if(get.itemtype(card)=='card'&&card.hasGaintag('dcjiaoxia_used')) return 'sha';
},
},
charlotte:true,
onremove:function(player){
player.removeGaintag('dcjiaoxia_used');
},
trigger:{player:'useCardAfter'},
filter:function(event,player){
return event.cards&&event.cards.length==1&&player.hasUseTarget(get.copy(event.cards[0]))&&player.getHistory('lose',evt=>{
if(evt.getParent()!=event) return false;
for(var i in evt.gaintag_map){
if(evt.gaintag_map[i].contains('dcjiaoxia_used')) return true;
}
return false;
}).length&&player.getHistory('sourceDamage',evt=>evt.card==event.card).length;
},
direct:true,
content:function(){
var card=get.copy(trigger.cards[0]);
player.chooseUseTarget(card,get.prompt('dcjiaoxia'),false,false).set('prompt2','视为使用'+get.translation(card)).logSkill='dcjiaoxia';
},
},
},
},
dchumei:{
subSkill:{
0:{charlotte:true},
1:{charlotte:true},
2:{charlotte:true},
},
onChooseToUse:function(event){
if(!game.online&&!event.dchumei_num){
var player=event.player;
var evtx=event.getParent('phaseUse');
event.set('dchumei_num',player.getHistory('sourceDamage',function(evt){
return evt.getParent('phaseUse')==evtx;
}).length);
}
},
audio:2,
enable:'phaseUse',
filter:function(event,player){
if(typeof event.dchumei_num!='number') return false;
return game.hasPlayer(target=>lib.skill.dchumei.filterTarget(null,player,target));
},
filterTarget:function(card,player,target){
if(target.getHp()>_status.event.dchumei_num) return false;
if(!player.hasSkill('dchumei_0')) return true;
if(!player.hasSkill('dchumei_1')&&target.countCards('he')) return true;
if(!player.hasSkill('dchumei_2')&&target.isDamaged()) return true;
return false;
},
content:function(){
'step 0'
var str=get.translation(target);
player.chooseButton([
'狐魅:请选择一项',
[[
[0,'令'+str+'摸一张牌'],
[1,'令'+str+'交给你一张牌'],
[2,'令'+str+'回复1点体力'],
].filter(list=>{
if(player.hasSkill('dchumei_'+list[0])) return false;
if(list[0]==1&&!target.countCards('he')) return false;
if(list[0]==2&&target.isHealthy()) return false;
return true;
}),'textbutton']
],true).set('filterButton',button=>{
var target=_status.event.target;
if(player.hasSkill('dchumei_'+button.link)) return false;
if(button.link==1&&!target.countCards('he')) return false;
if(button.link==2&&target.isHealthy()) return false;
return true;
}).set('ai',function(button){
var target=_status.event.target;
return [
get.effect(target,{name:'wuzhong'},player,player)/2,
get.effect(target,{name:'shunshou_copy2'},player,player),
get.recoverEffect(target,player,player),
][button.link];
}).set('target',target);
'step 1'
if(result.bool){
var num=result.links[0];
player.addTempSkill('dchumei_'+num,'phaseUseAfter');
switch(num){
case 0:
target.draw();
break;
case 1:
target.chooseCard('狐魅:交给'+get.translation(player)+'一张牌','he',true);
break;
case 2:
target.recover();
break;
}
if(num!=1) event.finish();
}
else event.finish();
'step 2'
if(result.bool) player.gain(result.cards,target,'giveAuto');
},
ai:{
order:1,
result:{
target:function(player,target){
if(!player.hasSkill('dchumei_0')) return 1;
if(!player.hasSkill('dchumei_1')) return -1;
if(!player.hasSkill('dchumei_2')) return 1;
},
},
},
},
//魏关羽
dcdanji:{
audio:'danji',
Expand Down Expand Up @@ -10060,6 +10227,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
juntun_info:'锁定技,准备阶段,若X大于1,则你减1点体力上限并摸X张牌(X为你的体力上限)。',
jiaojie:'狡黠',
jiaojie_info:'锁定技,你的红色牌不计入手牌上限。你使用黑色牌无距离和次数限制。',
dcjiaoxia:'狡黠',
dcjiaoxia_info:'①出牌阶段开始时,你可以令自己的所有手牌于此阶段均视为【杀】。若如此做,你使用以此法转化的【杀】造成伤害后,你可以视为使用此牌对应的原卡牌。②出牌阶段,你对你本阶段未使用过【杀】的角色使用【杀】无次数限制。',
dchumei:'狐魅',
dchumei_info:'出牌阶段各限一次,你可以选择一名体力值不大于X的角色,令其:①摸一张牌。②交给你一张牌。③回复1点体力。(X为你本阶段造成伤害的次数)',
buchen:'不臣',
buchen_info:'隐匿技,你于其他角色的回合登场时,可获得当前回合角色的一张牌。',
smyyingshi:'鹰视',
Expand Down
Loading

0 comments on commit e22fd84

Please sign in to comment.