final attack!
This commit is contained in:
parent
c61c3d363a
commit
dbf9cb14e8
|
@ -407,7 +407,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
if(evt.player!=player) return;
|
if(evt.player!=player) return;
|
||||||
for(var phase of lib.phaseName){
|
for(var phase of lib.phaseName){
|
||||||
var evtx=evt.getParent(phase);
|
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;
|
if(del!=0) return false;
|
||||||
|
@ -788,7 +791,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
'step 3'
|
'step 3'
|
||||||
if(event.num>0) event.goto(2);
|
if(event.num>0) event.goto(2);
|
||||||
'step 4'
|
'step 4'
|
||||||
if(!player.hasMark('dcgonghu_damage')){
|
if(!player.hasMark('dcgonghu_damage')&&target.isIn()){
|
||||||
var cards=player.getCards('h');
|
var cards=player.getCards('h');
|
||||||
if(cards.length==0) event._result={bool:false};
|
if(cards.length==0) event._result={bool:false};
|
||||||
else if(cards.length<=event.num2) event._result={bool:true,cards:cards};
|
else if(cards.length<=event.num2) event._result={bool:true,cards:cards};
|
||||||
|
|
|
@ -959,6 +959,7 @@ window.noname_character_rank={
|
||||||
'sp_machao',
|
'sp_machao',
|
||||||
'mengyou',
|
'mengyou',
|
||||||
're_wenpin',
|
're_wenpin',
|
||||||
|
'yue_zhoufei',
|
||||||
],
|
],
|
||||||
b:[
|
b:[
|
||||||
'diy_feishi',
|
'diy_feishi',
|
||||||
|
@ -1712,6 +1713,7 @@ window.noname_character_rank={
|
||||||
'shen_dianwei',
|
'shen_dianwei',
|
||||||
'sunlingluan',
|
'sunlingluan',
|
||||||
'ol_zhouqun',
|
'ol_zhouqun',
|
||||||
|
'wu_luxun',
|
||||||
'key_tomoya',
|
'key_tomoya',
|
||||||
'key_masato',
|
'key_masato',
|
||||||
'key_shiorimiyuki',
|
'key_shiorimiyuki',
|
||||||
|
@ -2463,6 +2465,7 @@ window.noname_character_rank={
|
||||||
'quhuang',
|
'quhuang',
|
||||||
'ol_wenqin',
|
'ol_wenqin',
|
||||||
'clan_wanghun',
|
'clan_wanghun',
|
||||||
|
'yue_zhoufei',
|
||||||
],
|
],
|
||||||
junk:[
|
junk:[
|
||||||
'sunshao',
|
'sunshao',
|
||||||
|
|
|
@ -126,28 +126,75 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
if(result.bool){
|
if(result.bool){
|
||||||
var cards=result.cards;
|
var cards=result.cards;
|
||||||
event.cards=cards;
|
event.cards=cards;
|
||||||
player.$throw(cards.length);
|
game.log(player,`将${get.cnNumber(cards.length)}张牌置入了牌堆`);
|
||||||
player.lose(cards,ui.cardPile).insert_index=function(){
|
player.loseToDiscardpile(cards,ui.cardPile,'blank').set('log',false).insert_index=function(){
|
||||||
return ui.cardPile.childNodes[ui.cardPile.childNodes.length-1];
|
return ui.cardPile.childNodes[get.rand(0,ui.cardPile.childNodes.length-1)];
|
||||||
};
|
};
|
||||||
var list=[];
|
}
|
||||||
var piles=['cardPile','discardPile'];
|
else event.finish();
|
||||||
for(var pile of piles){
|
'step 3'
|
||||||
for(var i=0;i<ui[pile].childNodes.length;i++){
|
var list=[];
|
||||||
var card=ui.cardPile.childNodes[i];
|
var piles=['cardPile','discardPile'];
|
||||||
var number=get.number(card,false);
|
for(var pile of piles){
|
||||||
if(!list.contains(card)&&number==8){
|
for(var i=0;i<ui[pile].childNodes.length;i++){
|
||||||
list.push(card);
|
var card=ui.cardPile.childNodes[i];
|
||||||
if(list.length==cards.length) break;
|
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:{
|
subSkill:{
|
||||||
minus:{
|
minus:{
|
||||||
|
@ -155,7 +202,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
filter:function(event,player){
|
filter:function(event,player){
|
||||||
return game.getGlobalHistory('everything',evt=>{
|
return game.getGlobalHistory('everything',evt=>{
|
||||||
return evt.name=='damage'&&evt.player==player;
|
return evt.name=='damage'&&evt.player==player;
|
||||||
}).indexOf(event)==0;
|
},event).indexOf(event)==0;
|
||||||
},
|
},
|
||||||
forced:true,
|
forced:true,
|
||||||
locked:false,
|
locked:false,
|
||||||
|
@ -189,16 +236,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
return get.number(event.card)==8;
|
return get.number(event.card)==8;
|
||||||
},
|
},
|
||||||
prompt2:function(event,player){
|
prompt2:function(event,player){
|
||||||
var num=player.hasSkill('dczhangcai_all')?get.number(event.card):8;
|
const num=player.hasSkill('dczhangcai_all')?get.number(event.card):8;
|
||||||
return '你可以摸'+get.cnNumber(Math.max(1,player.countCards('h',card=>get.number(card)==num)))+'张牌。';
|
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,
|
frequent:true,
|
||||||
content:function(){
|
content:function(){
|
||||||
'step 0'
|
|
||||||
var num=player.hasSkill('dczhangcai_all')?get.number(trigger.card):8;
|
var num=player.hasSkill('dczhangcai_all')?get.number(trigger.card):8;
|
||||||
player.draw(Math.max(1,player.countCards('h',card=>{
|
var count=1;
|
||||||
return get.number(card)==num;
|
if(typeof num=='number') count=Math.max(1,player.countCards('h',card=>get.number(card)==num));
|
||||||
})));
|
player.draw(count);
|
||||||
},
|
},
|
||||||
ai:{
|
ai:{
|
||||||
threaten:4,
|
threaten:4,
|
||||||
|
@ -229,7 +277,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
result:{
|
result:{
|
||||||
player:function(player){
|
player:function(player){
|
||||||
if(!player.hasSkill('dczhangcai')) return 0;
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -259,7 +307,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
event.finish();
|
event.finish();
|
||||||
}
|
}
|
||||||
'step 1'
|
'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);
|
player.chooseTarget(`赏誉:将${get.translation(card)}交给一名角色`,lib.filter.notMe,true);
|
||||||
}
|
}
|
||||||
else event.finish();
|
else event.finish();
|
||||||
|
|
|
@ -6560,6 +6560,7 @@ window.noname_asset_list=[
|
||||||
'image/character/dc_wangjun.jpg',
|
'image/character/dc_wangjun.jpg',
|
||||||
'image/character/dc_wangyun.jpg',
|
'image/character/dc_wangyun.jpg',
|
||||||
'image/character/dc_xiahouba.jpg',
|
'image/character/dc_xiahouba.jpg',
|
||||||
|
'image/character/dc_xujing.jpg',
|
||||||
'image/character/dc_xushu.jpg',
|
'image/character/dc_xushu.jpg',
|
||||||
'image/character/dc_yangbiao.jpg',
|
'image/character/dc_yangbiao.jpg',
|
||||||
'image/character/dc_yanghu.jpg',
|
'image/character/dc_yanghu.jpg',
|
||||||
|
@ -7220,6 +7221,7 @@ window.noname_asset_list=[
|
||||||
'image/character/mengda.jpg',
|
'image/character/mengda.jpg',
|
||||||
'image/character/menghuo.jpg',
|
'image/character/menghuo.jpg',
|
||||||
'image/character/mengjie.jpg',
|
'image/character/mengjie.jpg',
|
||||||
|
'image/character/mengyou.jpg',
|
||||||
'image/character/mifangfushiren.jpg',
|
'image/character/mifangfushiren.jpg',
|
||||||
'image/character/mifuren.jpg',
|
'image/character/mifuren.jpg',
|
||||||
'image/character/miheng.jpg',
|
'image/character/miheng.jpg',
|
||||||
|
@ -7632,6 +7634,7 @@ window.noname_asset_list=[
|
||||||
'image/character/re_wangyun.jpg',
|
'image/character/re_wangyun.jpg',
|
||||||
'image/character/re_weiwenzhugezhi.jpg',
|
'image/character/re_weiwenzhugezhi.jpg',
|
||||||
'image/character/re_weiyan.jpg',
|
'image/character/re_weiyan.jpg',
|
||||||
|
'image/character/re_wenpin.jpg',
|
||||||
'image/character/re_wuguotai.jpg',
|
'image/character/re_wuguotai.jpg',
|
||||||
'image/character/re_wuyi.jpg',
|
'image/character/re_wuyi.jpg',
|
||||||
'image/character/re_xiahoudun.jpg',
|
'image/character/re_xiahoudun.jpg',
|
||||||
|
@ -8084,6 +8087,7 @@ window.noname_asset_list=[
|
||||||
'image/character/wenqin.jpg',
|
'image/character/wenqin.jpg',
|
||||||
'image/character/wenyang.jpg',
|
'image/character/wenyang.jpg',
|
||||||
'image/character/wolongfengchu.jpg',
|
'image/character/wolongfengchu.jpg',
|
||||||
|
'image/character/wu_luxun.jpg',
|
||||||
'image/character/wu_zhugeliang.jpg',
|
'image/character/wu_zhugeliang.jpg',
|
||||||
'image/character/wu_zhutiexiong.jpg',
|
'image/character/wu_zhutiexiong.jpg',
|
||||||
'image/character/wuanguo.jpg',
|
'image/character/wuanguo.jpg',
|
||||||
|
@ -8236,6 +8240,7 @@ window.noname_asset_list=[
|
||||||
'image/character/yuantanyuanshang.jpg',
|
'image/character/yuantanyuanshang.jpg',
|
||||||
'image/character/yuantanyuanxiyuanshang.jpg',
|
'image/character/yuantanyuanxiyuanshang.jpg',
|
||||||
'image/character/yue_caiwenji.jpg',
|
'image/character/yue_caiwenji.jpg',
|
||||||
|
'image/character/yue_zhoufei.jpg',
|
||||||
'image/character/yuechen.jpg',
|
'image/character/yuechen.jpg',
|
||||||
'image/character/yuejin.jpg',
|
'image/character/yuejin.jpg',
|
||||||
'image/character/yuejiu.jpg',
|
'image/character/yuejiu.jpg',
|
||||||
|
|
16
game/game.js
16
game/game.js
|
@ -18388,9 +18388,10 @@
|
||||||
loseToDiscardpile:function(){
|
loseToDiscardpile:function(){
|
||||||
"step 0"
|
"step 0"
|
||||||
if(event.log!=false) game.log(player,'将',cards,'置入了弃牌堆');
|
if(event.log!=false) game.log(player,'将',cards,'置入了弃牌堆');
|
||||||
var next=player.lose(cards,event.position,'visible');
|
var next=player.lose(cards,event.position);
|
||||||
if(event.insert_index) next.insert_index=event.index;
|
if(event.insert_index) next.insert_index=event.insert_index;
|
||||||
if(event.insert_card) next.insert_card=true;
|
if(event.insert_card) next.insert_card=true;
|
||||||
|
if(!event.blank) next.visible=true;
|
||||||
next.type='loseToDiscardpile';
|
next.type='loseToDiscardpile';
|
||||||
event.done=next;
|
event.done=next;
|
||||||
"step 1"
|
"step 1"
|
||||||
|
@ -18904,17 +18905,21 @@
|
||||||
if(evt.delay===false) event.delay=false;
|
if(evt.delay===false) event.delay=false;
|
||||||
if(evt.animate!=false){
|
if(evt.animate!=false){
|
||||||
evt.discardid=lib.status.videoId++;
|
evt.discardid=lib.status.videoId++;
|
||||||
game.broadcastAll(function(player,cards,id){
|
game.broadcastAll(function(player,cards,id,visible){
|
||||||
player.$throw(cards,null,'nobroadcast');
|
player.$throw(cards,null,'nobroadcast');
|
||||||
var cardnodes=[];
|
var cardnodes=[];
|
||||||
cardnodes._discardtime=get.time();
|
cardnodes._discardtime=get.time();
|
||||||
for(var i=0;i<cards.length;i++){
|
for(var i=0;i<cards.length;i++){
|
||||||
if(cards[i].clone){
|
if(cards[i].clone){
|
||||||
cardnodes.push(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;
|
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(lib.config.sync_speed&&cards[0]&&cards[0].clone){
|
||||||
if(evt.delay!=false){
|
if(evt.delay!=false){
|
||||||
var waitingForTransition=get.time();
|
var waitingForTransition=get.time();
|
||||||
|
@ -24041,6 +24046,9 @@
|
||||||
else if(arguments[i]=='insert'){
|
else if(arguments[i]=='insert'){
|
||||||
next.insert_card=true;
|
next.insert_card=true;
|
||||||
}
|
}
|
||||||
|
else if(arguments[i]=='blank'){
|
||||||
|
next.blank=true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(next.cards==undefined) _status.event.next.remove(next);
|
if(next.cards==undefined) _status.event.next.remove(next);
|
||||||
next.setContent('loseToDiscardpile');
|
next.setContent('loseToDiscardpile');
|
||||||
|
|
|
@ -8,6 +8,7 @@ var pinyin_dict_polyphone = {
|
||||||
// START
|
// START
|
||||||
// 武将名
|
// 武将名
|
||||||
"乐蔡琰": "yuè ",
|
"乐蔡琰": "yuè ",
|
||||||
|
"乐周妃": "yuè fēi",
|
||||||
"用间": " jiàn",
|
"用间": " jiàn",
|
||||||
|
|
||||||
"乐进": "yuè ",
|
"乐进": "yuè ",
|
||||||
|
|
|
@ -3,7 +3,7 @@ window.noname_update={
|
||||||
update:'1.10.1.0.1',
|
update:'1.10.1.0.1',
|
||||||
changeLog:[
|
changeLog:[
|
||||||
'整合@rintim @mengxinzxz @lieren2023 @PZ157 @Tipx-L @kuangshen04 @nonameShijian @copcap的Pull Request',
|
'整合@rintim @mengxinzxz @lieren2023 @PZ157 @Tipx-L @kuangshen04 @nonameShijian @copcap的Pull Request',
|
||||||
'新武将:界钟繇、陈式、费曜、孙礼、夏侯楙、OL陆郁生、☆周不疑、',
|
'新武将:界钟繇、武陆逊、界文聘、许靖、孟优、陈式、费曜、孙礼、夏侯楙、OL陆郁生、☆周不疑、',
|
||||||
'技能优化:神典韦、手杀南华老仙等',
|
'技能优化:神典韦、手杀南华老仙等',
|
||||||
'机制更新: 属性【杀】机制完善优化等',
|
'机制更新: 属性【杀】机制完善优化等',
|
||||||
'界面更新: 优化自带代码编辑器;启动页增加新样式;武将资料页美化等',
|
'界面更新: 优化自带代码编辑器;启动页增加新样式;武将资料页美化等',
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 85 KiB |
Loading…
Reference in New Issue