final attack!

This commit is contained in:
Spmario233 2023-09-28 21:58:14 +08:00
parent c61c3d363a
commit dbf9cb14e8
8 changed files with 101 additions and 33 deletions

View File

@ -407,7 +407,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if(evt.player!=player) return;
for(var phase of lib.phaseName){
var evtx=evt.getParent(phase);
if(evtx&&evtx.name==phase) del+=evt.num;
if(evtx&&evtx.name==phase){
del+=evt.num;
break;
}
}
});
if(del!=0) return false;
@ -788,7 +791,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
'step 3'
if(event.num>0) event.goto(2);
'step 4'
if(!player.hasMark('dcgonghu_damage')){
if(!player.hasMark('dcgonghu_damage')&&target.isIn()){
var cards=player.getCards('h');
if(cards.length==0) event._result={bool:false};
else if(cards.length<=event.num2) event._result={bool:true,cards:cards};

View File

@ -959,6 +959,7 @@ window.noname_character_rank={
'sp_machao',
'mengyou',
're_wenpin',
'yue_zhoufei',
],
b:[
'diy_feishi',
@ -1712,6 +1713,7 @@ window.noname_character_rank={
'shen_dianwei',
'sunlingluan',
'ol_zhouqun',
'wu_luxun',
'key_tomoya',
'key_masato',
'key_shiorimiyuki',
@ -2463,6 +2465,7 @@ window.noname_character_rank={
'quhuang',
'ol_wenqin',
'clan_wanghun',
'yue_zhoufei',
],
junk:[
'sunshao',

View File

@ -126,28 +126,75 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if(result.bool){
var cards=result.cards;
event.cards=cards;
player.$throw(cards.length);
player.lose(cards,ui.cardPile).insert_index=function(){
return ui.cardPile.childNodes[ui.cardPile.childNodes.length-1];
game.log(player,`${get.cnNumber(cards.length)}张牌置入了牌堆`);
player.loseToDiscardpile(cards,ui.cardPile,'blank').set('log',false).insert_index=function(){
return ui.cardPile.childNodes[get.rand(0,ui.cardPile.childNodes.length-1)];
};
var list=[];
var piles=['cardPile','discardPile'];
for(var pile of piles){
for(var i=0;i<ui[pile].childNodes.length;i++){
var card=ui.cardPile.childNodes[i];
var number=get.number(card,false);
if(!list.contains(card)&&number==8){
list.push(card);
if(list.length==cards.length) break;
}
else event.finish();
'step 3'
var list=[];
var piles=['cardPile','discardPile'];
for(var pile of piles){
for(var i=0;i<ui[pile].childNodes.length;i++){
var card=ui.cardPile.childNodes[i];
var number=get.number(card,false);
if(!list.contains(card)&&number==8){
list.push(card);
if(list.length==cards.length) break;
}
}
}
if(list.length){
player.gain(list,'gain2').gaintag.add('dcxiongmu_tag');
player.addSkill('dcxiongmu_tag');
}
},
ai:{
effect:{
target:function(card,player,target){
if(player.hasSkillTag('jueqing')) return;
if(player._dcxiongmu_temp) return;
if(_status.event.getParent('useCard',true)||_status.event.getParent('_wuxie',true)) return;
if(get.tag(card,'damage')){
if(target.getHistory('damage').length>0){
return [1,-2];
}
else{
if(get.attitude(player,target)>0&&target.hp>1){
return 0;
}
if(get.attitude(player,target)<0&&!player.hasSkillTag('damageBonus')){
if(card.name=='sha') return;
var sha=false;
player._dcxiongmu_temp=true;
var num=player.countCards('h',function(card){
if(card.name=='sha'){
if(sha){
return false;
}
else{
sha=true;
}
}
return get.tag(card,'damage')&&player.canUse(card,target)&&get.effect(target,card,player,player)>0;
});
delete player._dcxiongmu_temp;
if(player.hasSkillTag('damage')){
num++;
}
if(num<2){
var enemies=player.getEnemies();
if(enemies.length==1&&enemies[0]==target&&player.needsToDiscard()){
return;
}
return 0;
}
}
}
}
}
if(list.length){
player.gain(list,'gain2').gaintag.add('dcxiongmu_tag');
player.addSkill('dcxiongmu_tag');
}
}
else event.finish();
},
subSkill:{
minus:{
@ -155,7 +202,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
filter:function(event,player){
return game.getGlobalHistory('everything',evt=>{
return evt.name=='damage'&&evt.player==player;
}).indexOf(event)==0;
},event).indexOf(event)==0;
},
forced:true,
locked:false,
@ -189,16 +236,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return get.number(event.card)==8;
},
prompt2:function(event,player){
var num=player.hasSkill('dczhangcai_all')?get.number(event.card):8;
return '你可以摸'+get.cnNumber(Math.max(1,player.countCards('h',card=>get.number(card)==num)))+'张牌。';
const num=player.hasSkill('dczhangcai_all')?get.number(event.card):8;
let count=1;
if(typeof num=='number') count=Math.max(1,player.countCards('h',card=>get.number(card)==num))
return '你可以摸'+get.cnNumber(count)+'张牌。';
},
frequent:true,
content:function(){
'step 0'
var num=player.hasSkill('dczhangcai_all')?get.number(trigger.card):8;
player.draw(Math.max(1,player.countCards('h',card=>{
return get.number(card)==num;
})));
var count=1;
if(typeof num=='number') count=Math.max(1,player.countCards('h',card=>get.number(card)==num));
player.draw(count);
},
ai:{
threaten:4,
@ -229,7 +277,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
result:{
player:function(player){
if(!player.hasSkill('dczhangcai')) return 0;
if(player.countCards('hs',card=>player.hasValueTarget(card))>3||player.hp==1) return 5;
if(player.countCards('hs',card=>get.number(card)!=8&&player.hasValueTarget(card))>3||player.hp==1) return 5;
return 0;
}
}
@ -259,7 +307,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
event.finish();
}
'step 1'
if(get.owner(card)==player&&get.position(card)=='h'){
if(get.owner(card)==player&&get.position(card)=='h'&&game.hasPlayer(current=>current!=player)){
player.chooseTarget(`赏誉:将${get.translation(card)}交给一名角色`,lib.filter.notMe,true);
}
else event.finish();

View File

@ -6560,6 +6560,7 @@ window.noname_asset_list=[
'image/character/dc_wangjun.jpg',
'image/character/dc_wangyun.jpg',
'image/character/dc_xiahouba.jpg',
'image/character/dc_xujing.jpg',
'image/character/dc_xushu.jpg',
'image/character/dc_yangbiao.jpg',
'image/character/dc_yanghu.jpg',
@ -7220,6 +7221,7 @@ window.noname_asset_list=[
'image/character/mengda.jpg',
'image/character/menghuo.jpg',
'image/character/mengjie.jpg',
'image/character/mengyou.jpg',
'image/character/mifangfushiren.jpg',
'image/character/mifuren.jpg',
'image/character/miheng.jpg',
@ -7632,6 +7634,7 @@ window.noname_asset_list=[
'image/character/re_wangyun.jpg',
'image/character/re_weiwenzhugezhi.jpg',
'image/character/re_weiyan.jpg',
'image/character/re_wenpin.jpg',
'image/character/re_wuguotai.jpg',
'image/character/re_wuyi.jpg',
'image/character/re_xiahoudun.jpg',
@ -8084,6 +8087,7 @@ window.noname_asset_list=[
'image/character/wenqin.jpg',
'image/character/wenyang.jpg',
'image/character/wolongfengchu.jpg',
'image/character/wu_luxun.jpg',
'image/character/wu_zhugeliang.jpg',
'image/character/wu_zhutiexiong.jpg',
'image/character/wuanguo.jpg',
@ -8236,6 +8240,7 @@ window.noname_asset_list=[
'image/character/yuantanyuanshang.jpg',
'image/character/yuantanyuanxiyuanshang.jpg',
'image/character/yue_caiwenji.jpg',
'image/character/yue_zhoufei.jpg',
'image/character/yuechen.jpg',
'image/character/yuejin.jpg',
'image/character/yuejiu.jpg',

View File

@ -18388,9 +18388,10 @@
loseToDiscardpile:function(){
"step 0"
if(event.log!=false) game.log(player,'将',cards,'置入了弃牌堆');
var next=player.lose(cards,event.position,'visible');
if(event.insert_index) next.insert_index=event.index;
var next=player.lose(cards,event.position);
if(event.insert_index) next.insert_index=event.insert_index;
if(event.insert_card) next.insert_card=true;
if(!event.blank) next.visible=true;
next.type='loseToDiscardpile';
event.done=next;
"step 1"
@ -18904,17 +18905,21 @@
if(evt.delay===false) event.delay=false;
if(evt.animate!=false){
evt.discardid=lib.status.videoId++;
game.broadcastAll(function(player,cards,id){
game.broadcastAll(function(player,cards,id,visible){
player.$throw(cards,null,'nobroadcast');
var cardnodes=[];
cardnodes._discardtime=get.time();
for(var i=0;i<cards.length;i++){
if(cards[i].clone){
cardnodes.push(cards[i].clone);
if(!visible){
cards[i].clone.classList.add('infohidden');
cards[i].clone.classList.add('infoflip');
}
}
}
ui.todiscard[id]=cardnodes;
},player,cards,evt.discardid);
},player,cards,evt.discardid,event.visible);
if(lib.config.sync_speed&&cards[0]&&cards[0].clone){
if(evt.delay!=false){
var waitingForTransition=get.time();
@ -24041,6 +24046,9 @@
else if(arguments[i]=='insert'){
next.insert_card=true;
}
else if(arguments[i]=='blank'){
next.blank=true;
}
}
if(next.cards==undefined) _status.event.next.remove(next);
next.setContent('loseToDiscardpile');

View File

@ -8,6 +8,7 @@ var pinyin_dict_polyphone = {
// START
// 武将名
"乐蔡琰": "yuè ",
"乐周妃": "yuè fēi",
"用间": " jiàn",
"乐进": "yuè ",

View File

@ -3,7 +3,7 @@ window.noname_update={
update:'1.10.1.0.1',
changeLog:[
'整合@rintim @mengxinzxz @lieren2023 @PZ157 @Tipx-L @kuangshen04 @nonameShijian @copcap的Pull Request',
'新武将:界钟繇、陈式、费曜、孙礼、夏侯楙、OL陆郁生、☆周不疑、',
'新武将:界钟繇、武陆逊、界文聘、许靖、孟优、陈式、费曜、孙礼、夏侯楙、OL陆郁生、☆周不疑、',
'技能优化:神典韦、手杀南华老仙等',
'机制更新: 属性【杀】机制完善优化等',
'界面更新: 优化自带代码编辑器;启动页增加新样式;武将资料页美化等',

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB