Merge pull request #672 from copcap/dev-dongzhao

新杀董昭;苏飞调整;配音补充
This commit is contained in:
Spmario233 2023-11-25 22:32:11 +08:00 committed by GitHub
commit a09525f388
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
23 changed files with 176 additions and 50 deletions

BIN
audio/die/dc_dongzhao.mp3 Normal file

Binary file not shown.

BIN
audio/die/sunyu.mp3 Normal file

Binary file not shown.

BIN
audio/die/yj_sufei.mp3 Normal file

Binary file not shown.

BIN
audio/skill/dcdingji1.mp3 Normal file

Binary file not shown.

BIN
audio/skill/dcdingji2.mp3 Normal file

Binary file not shown.

BIN
audio/skill/dcquanshou1.mp3 Normal file

Binary file not shown.

BIN
audio/skill/dcquanshou2.mp3 Normal file

Binary file not shown.

BIN
audio/skill/dcshexue1.mp3 Normal file

Binary file not shown.

BIN
audio/skill/dcshexue2.mp3 Normal file

Binary file not shown.

BIN
audio/skill/dcyijia1.mp3 Normal file

Binary file not shown.

BIN
audio/skill/dcyijia2.mp3 Normal file

Binary file not shown.

BIN
audio/skill/shuojian1.mp3 Normal file

Binary file not shown.

BIN
audio/skill/shuojian2.mp3 Normal file

Binary file not shown.

View File

@ -314,8 +314,8 @@ game.import('card',function(lib,game,ui,get,ai,_status){
result:{
target:function(player,target){
let hs=player.getCards('h');
if(hs.length<=1 || !hs.some(i=>{
return get.value(hs[i])<5.5;
if(hs.length<=1||!hs.some(i=>{
return get.value(i)<5.5;
})) return 0;
let targets=get.copy(ui.selected.targets);
if(_status.event.preTarget) targets.add(_status.event.preTarget);

View File

@ -4,6 +4,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
name:'huicui',
connect:true,
character:{
dc_dongzhao:['male','wei',3,['dcyijia','dcdingji']],
kuaiqi:['male','wei',3,['dcliangxiu','dcxunjie']],
yue_caiyong:['male','qun',3,['dcjiaowei','dcfeibai']],
pangshanmin:['male','wei',3,['dccaisi','dczhuoli']],
@ -96,7 +97,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
sp_baigei:['re_panfeng','xingdaorong','caoxing','re_chunyuqiong','xiahoujie','dc_caiyang','zhoushan'],
sp_caizijiaren:['re_dongbai','re_sunluyu','heyan','zhaoyan','wangtao','wangyue','zhangxuan','tengyin','zhangyao','xiahoulingnv','dc_sunru','pangshanmin','kuaiqi'],
sp_zhilan:['liuyong','wanniangongzhu','zhanghu','lvlingqi','tenggongzhu','panghui','dc_zhaotongzhaoguang','yuantanyuanxiyuanshang','yuechen'],
sp_guixin:['re_kanze','re_chendeng','caimaozhangyun','dc_lvkuanglvxiang','dc_gaolan','yinfuren','chengui','chenjiao','dc_sp_jiaxu','qinlang'],
sp_guixin:['re_kanze','re_chendeng','caimaozhangyun','dc_lvkuanglvxiang','dc_gaolan','yinfuren','chengui','chenjiao','dc_sp_jiaxu','qinlang','dc_dongzhao'],
sp_daihan:['mamidi','dc_jiling','zhangxun','dc_yuejiu','wanglie','leibo','qiaorui','dongwan','yuanyin'],
sp_jianghu:['guanning','huzhao','dc_huangchengyan','mengjie'],
sp_zongheng:['huaxin','luyusheng','re_xunchen','re_miheng','fengxi','re_dengzhi','dc_yanghu','zongyu'],
@ -109,6 +110,106 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
},
skill:{
//董昭
dcyijia:{
audio:2,
trigger:{global:'damageEnd'},
filter:function(event,player){
if(!event.player.isIn()) return false;
if(get.distance(player,event.player)>1) return false;
return player.canMoveCard(null,true,game.filterPlayer(i=>i!=event.player),event.player,'canReplace');
},
check:function(event,player){
return player.canMoveCard(true,true,game.filterPlayer(i=>i!=event.player),event.player,'canReplace');
},
prompt2:function(event,player){
return `将场上一张装备牌移动至${get.translation(event.player)}的装备区内(替换原装备)。然后若其因此脱离了一名角色的攻击范围,你摸一张牌。`;
},
logTarget:'player',
line:false,
content:function*(event,map){
const player=map.player,trigger=map.trigger,target=trigger.player;
const inRangeList=game.filterPlayer(current=>current.inRange(target));
yield player.moveCard(true,game.filterPlayer(i=>i!=target),target,'canReplace');
const leaveSomeone=inRangeList.some(current=>!current.inRange(target));
if(leaveSomeone) player.draw();
},
ai:{
maixie:true,
expose:0.2,
threaten:3.3,
},
},
dcdingji:{
audio:2,
trigger:{player:'phaseZhunbeiBegin'},
direct:true,
content:function*(event,map){
const player=map.player;
let result;
result=yield player.chooseTarget(get.prompt2('dcdingji')).set('ai',target=>{
const att=get.attitude(get.player(),target)/2;
const delta=5-target.countCards('h');
let fix=1;
const hs=target.getCards('h');
outer:for(let i=0;i<hs.length-1;i++){
const name1=get.name(hs[i]);
for(let j=i+1;j<hs.length;j++){
const name2=get.name(hs[j]);
if(name1==name2){
fix=0.5; break outer;
}
}
}
if(delta>0){
if(target.hasSkillTag('nogain')) att/=3;
return Math.sqrt(delta)*att*fix;
}
if(delta>-2&&att>0) return fix==0.5?0.1:-1;
return -Math.sqrt(-delta)*att/2;
});
if(!result.bool) return event.finish();
const target=result.targets[0];
player.logSkill('dcdingji',target);
if(target!=player) player.addExpose(0.3);
const delta=5-target.countCards('h');
if(delta!=0){
yield target[delta>0?'draw':'chooseToDiscard'](Math.abs(delta),true);
}
target.showHandcards();
const hs=target.getCards('h');
let hasSame=false;
outer:for(let i=0;i<hs.length-1;i++){
const name1=get.name(hs[i]);
for(let j=i+1;j<hs.length;j++){
const name2=get.name(hs[j]);
if(name1==name2){
hasSame=true; break outer;
}
}
}
game.delayex();
if(hasSame) return event.finish();
const list=get.inpileVCardList(info=>{
if(!['basic','trick'].includes(info[0])) return false;
if(!target.hasUseTarget(new lib.element.VCard({name:info[2],nature:info[3],isCard:true}))) return false;
return hs.some(card=>{
return get.name(card)==info[2]&&get.is.sameNature([card,info[3]],true);
});
});
if(!list.length) return event.finish();
result=yield target.chooseButton(['是否视为使用其中一张牌?',[list,'vcard']]).set('ai',button=>{
return get.player().getUseValue({name:button.link[2]});
});
if(result.bool){
target.chooseUseTarget(new lib.element.VCard({
name:result.links[0][2],
nature:result.links[0][3],
isCard:true,
}),true,false);
}
},
},
//蒯祺
dcliangxiu:{
audio:2,
@ -11250,6 +11351,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
dcliangxiu_info:'出牌阶段,你可以弃置两张不同类型的牌,然后从两张与你弃置的牌类型均不同的牌中选择一张获得之(每阶段每种类型限一次)。',
dcxunjie:'殉节',
dcxunjie_info:'每轮每项限一次。一名角色的回合结束时若你本回合于摸牌阶段外得到过牌你可以选择一项1.令一名角色将手牌数摸或弃置至与其体力值相同2.令一名角色将体力值回复或失去至与其手牌数相同。',
dc_dongzhao:'董昭',
dcyijia:'移驾',
dcyijia_info:'一名角色受到伤害后若你至其的距离不大于1你可以将场上一张装备牌移动至其对应装备栏替换原装备。若其因此脱离了一名角色的攻击范围你摸一张牌。',
dcdingji:'定基',
dcdingji_info:'准备阶段,你可以令一名角色将手牌摸或弃置至五张,然后其展示手牌。若牌名均不同,则其可以视为使用其中一张基本或普通锦囊牌。',
sp_baigei:'无双上将',
sp_caizijiaren:'才子佳人',

View File

@ -638,6 +638,7 @@ window.noname_character_rank={
'kuaiqi',
'shen_huatuo',
'dc_guansuo',
'dc_dongzhao',
],
bp:[
'chess_diaochan',

View File

@ -25334,7 +25334,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
dengzhi:['ol_dengzhi','re_dengzhi','dengzhi','tw_dengzhi'],
wangrong:['ol_wangrong','wangrong'],
zongyu:['zongyu','sp_zongyu','tw_zongyu'],
ol_dongzhao:['ol_dongzhao','tw_dongzhao'],
ol_dongzhao:['ol_dongzhao','dc_dongzhao','tw_dongzhao'],
mayunlu:['mayunlu','tw_mayunlu'],
zhuling:['ol_zhuling','dc_zhuling','zhuling'],
zangba:['zangba','tw_zangba'],
@ -26224,7 +26224,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
zhuangshu_equip:'金梳',
zhuangshu_equip_bg:'金',
zhuangshu_equip_info:'锁定技。出牌阶段结束时,你将手牌摸至手牌上限(至多摸五张)。当此牌不因交换装备或移动至其他装备区而离开你的装备区后,销毁之。',
ol_dongzhao:'董昭',
ol_dongzhao:'OL董昭',
ol_dongzhao_prefix:'OL',
olxianlve:'先略',
olxianlve_info:'①主公的回合开始时,你可声明并记录一个锦囊牌的名称并移除先前的记录。②每回合限一次,其他角色使用〖先略〗记录过的锦囊牌后,你可摸两张牌并可以分配给任意其他角色,然后你可声明并记录一个锦囊牌的名称并移除先前的记录。',
olzaowang:'造王',

View File

@ -595,9 +595,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
audio:2,
enable:'phaseUse',
usable:3,
filter:function(event,player){
return !player.hasSkill('shuojian_ban');
},
filterTarget:lib.filter.notMe,
filterCard:true,
position:'he',
@ -611,7 +608,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
'step 0'
player.give(cards,target);
'step 1'
var num=3-get.skillCount('shuojian');
var num=3-get.skillCount('shuojian')+1;
event.num=num;
event.num2=num;
if(event.num==0) event.finish();
@ -624,19 +621,19 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if(evt.name=='chooseTarget') evt=evt.getParent();
if(!evt.goon) return 0;
return get.effect_use.apply(this,arguments);
}).set('goon',target.getUseValue({name:'guohe'})>player.getUseValue({name:'wuzhong'})/(1.8-num*0.3));
}).set('goon',target.getUseValue({name:'guohe'})>get.sgnAttitude(target,player)*player.getUseValue({name:'wuzhong'})/(2-num*0.4));
'step 3'
if(!result.bool){
player.draw(num);
if(num>1) player.chooseToDiscard('he',num-1,true);
event.finish();
}
'step 4'
if(--event.num2>0){
event.goto(2);
}
else player.addTempSkill('shuojian_ban');
else player.tempBanSkill('shuojian');
},
subSkill:{ban:{charlotte:true}},
ai:{
expose:0.15,
order:8,
@ -14546,7 +14543,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
biejun_info:'①其他角色的出牌阶段限一次。其可以将一张手牌交给你。②每回合限一次。当你受到伤害时,若你手牌中没有本回合因〖别君①〗得到的牌,你可以翻面并防止此伤害。',
yj_sufei:'苏飞',
shuojian:'数谏',
shuojian_info:'出牌阶段限三次。你可以交给一名其他角色一张牌其选择一项1.令你摸X张牌2.视为使用X张【过河拆桥】然后此技能本回合失效X为此技能本阶段剩余发动次数。',
shuojian_info:'出牌阶段限三次。你可以交给一名其他角色一张牌其选择一项1.令你摸X张牌并弃置X-1张牌2.视为使用X张【过河拆桥】然后此技能本回合失效X为此技能本阶段剩余发动次数+1)。',
yj_qiaozhou:'谯周',
shiming:'识命',
shiming_info:'每轮限一次。一名角色的摸牌阶段你可以观看牌堆顶的两张牌并可以将其中一张置于牌堆底。然后该角色可以改为对自己造成1点伤害然后从牌堆底摸三张牌。',

View File

@ -18474,7 +18474,7 @@ new Promise(resolve=>{
},
moveCard:function(){
'step 0'
if(!player.canMoveCard(null,event.nojudge,event.sourceTargets,event.aimTargets,event.filter)){
if(!player.canMoveCard(null,event.nojudge,event.sourceTargets,event.aimTargets,event.filter,event.canReplace?'canReplace':'noReplace')){
event.finish();
return;
}
@ -18491,7 +18491,7 @@ new Promise(resolve=>{
if(target.isMin()) return false;
var es=from.getCards('e',filterCard);
for(var i=0;i<es.length;i++){
if(target.canEquip(es[i])) return true;
if(target.canEquip(es[i],_status.event.canReplace)) return true;
}
return false;
}
@ -18507,25 +18507,30 @@ new Promise(resolve=>{
var player=_status.event.player;
var att=get.attitude(player,target);
var sgnatt=get.sgn(att);
var aimTargets=get.event('aimTargets'),filterCard=get.event('filter');
if(ui.selected.targets.length==0){
if(att>0){
if(!_status.event.nojudge&&target.countCards('j',function(card){
if(!filterCard(card)) return false;
return game.hasPlayer(function(current){
if(!aimTargets.includes(current)) return false;
return current!=target&&current.canAddJudge(card)&&get.attitude(player,current)<0;
})
})) return 14;
if(target.countCards('e',function(card){
if(!filterCard(card)) return false;
return get.value(card,target)<0&&game.hasPlayer(function(current){
return current!=target&&get.attitude(player,current)<0&&current.canEquip(card)&&get.effect(target,card,player,player)<0;
if(!aimTargets.includes(current)) return false;
return current!=target&&get.attitude(player,current)<0&&current.canEquip(card,_status.event.canReplace)&&get.effect(target,card,player,player)<0;
});
})>0) return 9;
}
else if(att<0){
if(game.hasPlayer(function(current){
if(current!=target&&get.attitude(player,current)>0){
var es=target.getCards('e');
var es=target.getCards('e',filterCard);
for(var i=0;i<es.length;i++){
if(get.value(es[i],target)>0&&current.canEquip(es[i])&&get.effect(current,es[i],player,player)>0) return true;
if(get.value(es[i],target)>0&&current.canEquip(es[i],_status.event.canReplace)&&get.effect(current,es[i],player,player)>_status.event.canReplace?get.effect(target,es[i],player,player):0) return true;
}
}
})){
@ -18534,18 +18539,19 @@ new Promise(resolve=>{
}
return 0;
}
var es=ui.selected.targets[0].getCards('e');
var es=ui.selected.targets[0].getCards('e',filterCard);
var i;
var att2=get.sgn(get.attitude(player,ui.selected.targets[0]));
for(i=0;i<es.length;i++){
if(sgnatt!=0&&att2!=0&&sgnatt!=att2&&
get.sgn(get.value(es[i],ui.selected.targets[0]))==-att2&&
get.sgn(get.effect(target,es[i],player,target))==sgnatt&&
target.canEquip(es[i])){
target.canEquip(es[i],_status.event.canReplace)){
return Math.abs(att);
}
}
if(i==es.length&&(_status.event.nojudge||!ui.selected.targets[0].countCards('j',function(card){
if(!filterCard(card)) return false;
return target.canAddJudge(card);
})||att2<=0)){
return 0;
@ -18558,6 +18564,7 @@ new Promise(resolve=>{
next.set('filter',event.filter);
next.set('sourceTargets',event.sourceTargets||game.filterPlayer());
next.set('aimTargets',event.aimTargets||game.filterPlayer());
next.set('canReplace',event.canReplace);
if(event.prompt2) next.set('prompt2',event.prompt2);
if(event.forced) next.set('forced',true);
'step 1'
@ -18594,9 +18601,9 @@ new Promise(resolve=>{
return targets1.canAddJudge(button.link);
}
else{
return targets1.canEquip(button.link);
return targets1.canEquip(button.link,_status.event.canReplace);
}
}).set('filter',event.filter);
}).set('filter',event.filter).set('canReplace',event.canReplace);
}
else{
event.finish();
@ -25128,7 +25135,7 @@ new Promise(resolve=>{
canMoveCard(withatt,nojudge){
const player=this;
const args=Array.from(arguments).slice(2);
let sourceTargets,aimTargets,filterCard;
let sourceTargets,aimTargets,filterCard,canReplace;
args.forEach(arg=>{
if(get.itemtype(arg)=='players'){
if(!sourceTargets) sourceTargets=arg;
@ -25144,6 +25151,9 @@ new Promise(resolve=>{
else if(typeof arg=='object'&&arg){
filterCard=get.filter(arg);
}
else if(arg=='canReplace'){
canReplace=true;
}
});
if(!sourceTargets) sourceTargets=game.filterPlayer();
if(!aimTargets) aimTargets=game.filterPlayer();
@ -25156,9 +25166,12 @@ new Promise(resolve=>{
if(withatt){
if(get.sgn(get.value(es[i],current))!=-att) return false;
var att2=get.sgn(get.attitude(player,current2));
if(att==att2||att2!=get.sgn(get.effect(current2,es[i],player,current2))) return false;
if(!canReplace||att<0&&current2.countEquipableSlot(get.subtype(es[i]))){
if(att==att2||att2!=get.sgn(get.effect(current2,es[i],player,current2))) return false;
}
// if((!canReplace||!current2.countEquipableSlot(get.subtype(es[i]))&&current2.canEquip(es[i],true))&&(att==att2||att2!=get.sgn(get.effect(current2,es[i],player,current2)))) return false;
}
return current!=current2&&!current2.isMin()&&current2.canEquip(es[i]);
return current!=current2&&!current2.isMin()&&current2.canEquip(es[i],canReplace);
})){
return true;
}
@ -25196,7 +25209,12 @@ new Promise(resolve=>{
else if(!next.aimTargets) next.aimTargets=[arguments[i]];
}
else if(typeof arguments[i]=='string'){
get.evtprompt(next,arguments[i]);
if(arguments[i]=='canReplace'){
next.canReplace=true;
}
else{
get.evtprompt(next,arguments[i]);
}
}
else if(Array.isArray(arguments[i])){
for(var j=0;j<arguments[i].length;j++){
@ -60716,7 +60734,10 @@ new Promise(resolve=>{
if(typeof obj=='string') obj={name:obj};
if(typeof obj!='object') return;
var name=get.name(obj,player);
if(!lib.card[name]) return;
if(!lib.card[name]){
if(!name.startsWith('sha_')) return;
if(name.slice(4).split('_').every(n=>lib.nature.has(n))) return lib.card['sha'].type;
}
if(method=='trick'&&lib.card[name].type=='delay') return 'trick';
return lib.card[name].type;
},

Binary file not shown.

Before

Width:  |  Height:  |  Size: 145 KiB

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 102 KiB

View File

@ -3539,29 +3539,29 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
return -3;
}
return -4;
case 'commoner':
if(to.identity=='zhong') return 0;
if(get.population('fan')==0){
if(to.ai.identity_mark=='zhong'&&to.ai.shown<1) return 0;
return -0.5;
}
if(zhongmode&&to.ai.sizhong&&to.ai.shown<1) return 6;
if(game.players.length==3){
var fan;
for(var i=0; i<game.players.length; i++){
if(game.players[i].identity=='fan'){
fan=game.players[i]; break;
}
case 'commoner':
if(to.identity=='zhong') return 0;
if(get.population('fan')==0){
if(to.ai.identity_mark=='zhong'&&to.ai.shown<1) return 0;
return -0.5;
}
if(zhongmode&&to.ai.sizhong&&to.ai.shown<1) return 6;
if(game.players.length==3){
var fan;
for(var i=0; i<game.players.length; i++){
if(game.players[i].identity=='fan'){
fan=game.players[i]; break;
}
if(fan){
if(to.hp>1&&to.hp>fan.hp&&to.countCards('he')>fan.countCards('he')){
return -3;
}
}
return 3;
}
if(situation<0&&game.zhu&&game.zhu.hp<=2) return -3.8;
return 2-get.population('fan');
if(fan){
if(to.hp>1&&to.hp>fan.hp&&to.countCards('he')>fan.countCards('he')){
return -3;
}
}
return 3;
}
if(situation<0&&game.zhu&&game.zhu.hp<=2) return -3.8;
return Math.max(-4,2-get.population('fan'));
}
break;
case 'zhong':case 'mingzhong':
@ -3574,7 +3574,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
return Math.min(3,-situation);
case 'fan': return -8;
case 'commoner':
return Math.min(3,Math.max(-3,situation));
return Math.min(3,Math.max(-3,situation-0.2));
}
break;
case 'nei':
@ -3684,7 +3684,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
return Math.min(3,situation);
case 'fan': return 5;
case 'commoner':
return 2*get.population('fan')-2;
return 2*get.population('fan')-3;
}
break;
case 'commoner':