diff --git a/audio/effect/throw_egg1.mp3 b/audio/effect/throw_egg1.mp3 new file mode 100644 index 000000000..c54296b7f Binary files /dev/null and b/audio/effect/throw_egg1.mp3 differ diff --git a/audio/effect/throw_egg2.mp3 b/audio/effect/throw_egg2.mp3 new file mode 100644 index 000000000..9c2aa308d Binary files /dev/null and b/audio/effect/throw_egg2.mp3 differ diff --git a/audio/effect/throw_flower1.mp3 b/audio/effect/throw_flower1.mp3 new file mode 100644 index 000000000..eac76b2dd Binary files /dev/null and b/audio/effect/throw_flower1.mp3 differ diff --git a/audio/effect/throw_flower2.mp3 b/audio/effect/throw_flower2.mp3 new file mode 100644 index 000000000..cddbd45df Binary files /dev/null and b/audio/effect/throw_flower2.mp3 differ diff --git a/audio/effect/throw_shoe1.mp3 b/audio/effect/throw_shoe1.mp3 new file mode 100644 index 000000000..66b78070c Binary files /dev/null and b/audio/effect/throw_shoe1.mp3 differ diff --git a/audio/effect/throw_shoe2.mp3 b/audio/effect/throw_shoe2.mp3 new file mode 100644 index 000000000..a25b14b7c Binary files /dev/null and b/audio/effect/throw_shoe2.mp3 differ diff --git a/audio/effect/throw_wine1.mp3 b/audio/effect/throw_wine1.mp3 new file mode 100644 index 000000000..0b5283e76 Binary files /dev/null and b/audio/effect/throw_wine1.mp3 differ diff --git a/audio/effect/throw_wine2.mp3 b/audio/effect/throw_wine2.mp3 new file mode 100644 index 000000000..88ca75853 Binary files /dev/null and b/audio/effect/throw_wine2.mp3 differ diff --git a/card/extra.js b/card/extra.js index 1bf9a5a30..c2867ea40 100644 --- a/card/extra.js +++ b/card/extra.js @@ -27,7 +27,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){ clearLose:true, equipDelay:false, loseDelay:false, - skills:['muniu_skill','muniu_skill2','muniu_skill6','muniu_skill7'], + skills:['muniu_skill','muniu_skill4','muniu_skill6','muniu_skill7'], ai:{ equipValue:function(card){ if(card.card) return 7+card.card.length; @@ -166,7 +166,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){ fullskin:true, type:'trick', enable:true, - cardnature:'fire', + //cardnature:'fire', filterTarget:function(card,player,target){ if(player!=game.me&&player.countCards('h')<2) return false; return target.countCards('h')>0; @@ -356,7 +356,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){ fullskin:true, type:'equip', subtype:'equip1', - cardnature:'fire', + //cardnature:'fire', distance:{attackFrom:-3}, ai:{ basic:{ @@ -381,19 +381,50 @@ game.import('card',function(lib,game,ui,get,ai,_status){ fullskin:true, type:'equip', subtype:'equip2', - cardnature:'fire', + //cardnature:'fire', ai:{ + value:function(card,player,index,method){ + if(player.isDisabled(2)) return 0.01; + if(card==player.getEquip(2)){ + if(player.hasSkillTag('noDirectDamage')) return 10; + if(game.hasPlayer(function(current){ + return get.attitude(current,player)<0&¤t.hasSkillTag('fireAttack',null,null,true); + })) return 0; + return 6; + } + var value=0; + var info=get.info(card); + var current=player.getEquip(info.subtype); + if(current&&card!=current){ + value=get.value(current,player); + } + var equipValue=info.ai.equipValue; + if(equipValue==undefined){ + equipValue=info.ai.basic.equipValue; + } + if(typeof equipValue=='function'){ + if(method=='raw') return equipValue(card,player); + if(method=='raw2') return equipValue(card,player)-value; + return Math.max(0.1,equipValue(card,player)-value); + } + if(typeof equipValue!='number') equipValue=0; + if(method=='raw') return equipValue; + if(method=='raw2') return equipValue-value; + return Math.max(0.1,equipValue-value); + }, equipValue:function(card,player){ if(player.hasSkillTag('maixie')&&player.hp>1) return 0; if(player.hasSkillTag('noDirectDamage')) return 10; if(get.damageEffect(player,player,player,'fire')>=0) return 10; - var num=3-game.countPlayer(function(current){ - return get.attitude(current,player)<0; + var num=4-game.countPlayer(function(current){ + if(get.attitude(current,player)<0){ + if(current.hasSkillTag('fireAttack',null,null,true)) return 3; + return 1; + } + return false; }); - if(player.hp==1) num+=4; + if(player.hp==1) num+=3; if(player.hp==2) num+=1; - if(player.hp==3) num--; - if(player.hp>3) num-=4; return num; }, basic:{ @@ -630,7 +661,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){ } }, muniu_skill4:{ - enable:'chooseToUse', + enable:['chooseToUse','chooseToRespond'], filter:function(event,player){ var muniu=player.getEquip(5); if(!muniu.cards) return false; @@ -662,10 +693,11 @@ game.import('card',function(lib,game,ui,get,ai,_status){ return { filterCard:function(){return false}, selectCard:-1, + position:'h', viewAs:links[0], precontent:function(){ -- delete event.result.skill; -- }, + delete event.result.skill; + }, }; }, prompt:function(links){ @@ -901,6 +933,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){ trigger.num++; }, ai:{ + fireAttack:true, effect:{ target:function(card,player,target,current){ if(card.name=='sha'){ diff --git a/card/guozhan.js b/card/guozhan.js index 1525d35a2..372608d9a 100644 --- a/card/guozhan.js +++ b/card/guozhan.js @@ -1361,8 +1361,6 @@ game.import('card',function(lib,game,ui,get,ai,_status){ }, }, translate:{ - - equip6:'坐骑', liulongcanjia:'六龙骖驾', liulongcanjia_info:'锁定技,你计算与其他角色的距离-1,其他角色计算与你的距离+1。
锁定技,当此牌进入你的装备区时,你弃置你装备区内其他坐骑牌;当此牌在你的装备区内,你不能使用其他坐骑牌(你的装备区便不能置入其他坐骑牌)。', minguangkai:'明光铠', diff --git a/card/standard.js b/card/standard.js index f0465801d..b6588c4f5 100644 --- a/card/standard.js +++ b/card/standard.js @@ -1090,12 +1090,12 @@ game.import('card',function(lib,game,ui,get,ai,_status){ result:{ target:function(player,target){ if(get.attitude(player,target)<=0) return (target.countCards('he',function(card){ - return card.name=='tengjia'||get.value(card)>0; + return get.value(card,target)>0&&card!=target.getEquip('jinhe'); })>0)?-1.5:1.5; var js=target.getCards('j'); if(js.length){ var jj=js[0].viewAs?{name:js[0].viewAs}:js[0]; - if(jj.name=='shunshou') return 3; + //if(jj.name=='shunshou') return 3; if(js.length==1&&get.effect(target,jj,target,player)>=0){ return -1.5; } @@ -1104,14 +1104,16 @@ game.import('card',function(lib,game,ui,get,ai,_status){ return -1.5; }, player:function(player,target){ - if(get.attitude(player,target)<0&&!target.countCards('he')){ + if(get.attitude(player,target)<0&&!target.countCards('he',function(card){ + return get.value(card,target)>0&&card!=target.getEquip('jinhe'); + })){ return 0; } if(get.attitude(player,target)>1){ var js=target.getCards('j'); if(js.length){ var jj=js[0].viewAs?{name:js[0].viewAs}:js[0]; - if(jj.name=='shunshou') return 1; + //if(jj.name=='shunshou') return 1; if(js.length==1&&get.effect(target,jj,target,player)>=0){ return 0; } @@ -1189,7 +1191,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){ var es=target.getCards('e'); var noe=(es.length==0||target.hasSkillTag('noe')); var noe2=(es.filter(function(esx){ - return esx.name=='tengjia'||get.value(esx)>0 + return get.value(esx,target)>0; }).length==0); var noh=(nh==0||target.hasSkillTag('noh')); if(noh&&(noe||noe2)) return 0; diff --git a/card/zhulu.js b/card/zhulu.js index e684359bb..0f18f47ee 100644 --- a/card/zhulu.js +++ b/card/zhulu.js @@ -630,7 +630,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){ order:9.5, equipValue:function(card,player){ if(card!=player.getEquip(5)) return 5; - if(_status.jinhe&&_status.jinhe[card.cardid]&&(_status.event.name=='discardPlayerCard'||_status.event.name=='chooseToDiscard')) return 2*player.countCards('h'); + if(_status.jinhe&&_status.jinhe[card.cardid]&&_status.event.name!='gainPlayerCard') return 3*player.countCards('h'); return 0; }, value:function(){ @@ -742,6 +742,19 @@ game.import('card',function(lib,game,ui,get,ai,_status){ "step 2" game.broadcastAll(ui.clear); }, + ai:{ + order:1, + result:{ + player:function(player){ + var suit=get.suit(_status.jinhe[player.getEquip(5).cardid].card); + var hs=player.getCards('h',function(card){ + return get.suit(card)==suit; + }); + if(!hs.length||get.value(hs)<5) return 1; + return -1; + }, + }, + }, }, yexingyi_skill:{ equipSkill:true, diff --git a/character/diy.js b/character/diy.js index 43c6764e8..2ab6ce325 100755 --- a/character/diy.js +++ b/character/diy.js @@ -4381,8 +4381,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, save:true, respondSha:true, + fireAttack:true, skillTagFilter:function(player){ - return player.countCards('he',{suit:'diamond'})>0; + return target=='fireAttack'||player.countCards('he',{suit:'diamond'})>0; }, }, group:['inari_baiwei_shan','inari_baiwei_draw'], @@ -4637,6 +4638,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return 0; } }, + fireAttack:true, }, group:'kanata_shuangche', }, @@ -5267,6 +5269,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(result.index==0) trigger.player.damage('fire'); else trigger.changeToZero(); }, + ai:{ + fireAttack:true, + }, }, nsqiyue:{ trigger:{global:['turnOverEnd','linkEnd','showCharacterEnd','hideCharacterEnd','removeCharacterEnd']}, @@ -6372,7 +6377,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ usable:1, filterCard:{suit:'heart'}, filterTarget:function(card,player,target){ - return target!=player&&target.countCards('h')>0; + return target!=player&&target.countCards('h')>player.countCards('h'); }, filter:function(event,player){ var info=lib.skill.nsyangwu; diff --git a/character/extra.js b/character/extra.js index 348b9eeb3..fd65840e4 100755 --- a/character/extra.js +++ b/character/extra.js @@ -91,6 +91,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ 'step 2' var suit=result.control; player.chat(get.translation(suit+2)); + game.log(player,'选择了','#y'+get.translation(suit+2)) if(target.countCards('h',{suit:suit})){ target.chooseCard('h','交给'+get.translation(player)+'一张'+get.translation(suit)+'花色的手牌',true,function(card,player){ return get.suit(card,player)==_status.event.suit; @@ -2206,6 +2207,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, ai:{ order:1, + fireAttack:true, result:{ target:function(player,target){ if(target.hasSkillTag('nofire')) return 0; @@ -2220,6 +2222,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:4, group:['longhun1','longhun2','longhun3','longhun4'], ai:{ + fireAttack:true, skillTagFilter:function(player,tag){ switch(tag){ case 'respondSha':{ @@ -2234,6 +2237,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(player.countCards('he',{suit:'heart'})trigger.num2&&get.position(trigger.card,true)=='o'){ + else if(trigger.num1>trigger.num2&&get.position(trigger.card2,true)=='o'){ str+='/拼点牌'; cards.push(trigger.card2); } @@ -945,7 +944,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ var player=_status.event.player; if(player==get.zhu(player)&&player.hp<=2) return 0; return get.attitude(player,target)-4; - }); + }).animate=false; 'step 1' if(result.bool){ var target=result.targets[0]; @@ -4570,6 +4569,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, ai:{ order:7, + fireAttack:true, + threaten:1.7, result:{ player:1, }, @@ -4719,6 +4720,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, save:true, skillTagFilter:function(player,tag,arg){ + if(tag=='fireAttack') return true; if(!player.storage.yizan&&player.countCards('he')<2) return false; if(!player.hasCard(function(card){ return get.type(card)=='basic'; @@ -4731,6 +4733,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, respondSha:true, respondShan:true, + fireAttack:true, }, }, "yizan_respond_shan":{ @@ -6399,7 +6402,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ jinglve3:'景略', jinglve_info:'出牌阶段限一次,你可以观看一名其他角色的手牌,将其中一张牌标记为「死士」。当其使用对应的实体牌中包含「死士」的牌时,你取消此牌的所有目标。当「死士」牌不因使用而进入弃牌堆,或其回合结束后,若「死士」牌仍在其区域内,则你获得此牌。', shanli:'擅立', - shanli_info:'觉醒技,准备阶段,若你已发动过〖败移〗且对至少两名角色发动过〖景略〗,则你减1点体力上限并选择一名其他角色。系统随机选择三个不为〖忘隙(仲村由理)〗的主公技,然后你选择其中一个,令其获得之。', + shanli_info:'觉醒技,准备阶段,若你已发动过〖败移〗且对至少两名角色发动过〖景略〗,则你减1点体力上限并选择一名角色。系统随机选择三个不为〖忘隙(仲村由理)〗的主公技,然后你选择其中一个技能,令其获得之。其将交互表情中的【拖鞋】和【酒杯】替换为【手铐】和【玉玺】。', mobile_standard:'手杀异构·标准包', mobile_shenhua:'手杀异构·神话再临', mobile_yijiang1:'手杀异构·一将成名', diff --git a/character/refresh.js b/character/refresh.js index 82fecb0c5..8e11618bc 100755 --- a/character/refresh.js +++ b/character/refresh.js @@ -657,6 +657,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger.card.nature='fire'; }, group:['decadelihuo2','decadelihuo3'], + ai:{ + fireAttack:true, + }, }, decadelihuo2:{ trigger:{player:'useCard2'}, @@ -3797,6 +3800,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, ai:{ + fireAttack:true, save:true, respondShan:true, respondSha:true, @@ -3807,6 +3811,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ result:{ player:1, }, + threaten:1.3, }, group:['reguhuo_shan','reguhuo_wuxie','reguhuo_guess'], }, @@ -4313,6 +4318,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } return 4-get.value(card) }, + ai:{ + fireAttack:true, + }, }, rekanpo:{ audio:2, @@ -5895,6 +5903,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, ai:{ + fireAttack:true, order:function(skill,player){ if(player.hp1){ return 10; diff --git a/character/shenhua.js b/character/shenhua.js index d26c1aa16..f936eccda 100755 --- a/character/shenhua.js +++ b/character/shenhua.js @@ -4948,7 +4948,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return 6-get.value(card); } return 3-get.value(card) - } + }, + ai:{ + fireAttack:true, + }, }, bazhen:{ audio:2, @@ -6821,9 +6824,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ save:true, respondShan:true, + fireAttack:true, skillTagFilter:function(player){ if(player.hasSkill('guhuo_phase')) return false; }, + threaten:1.2, }, }, "guhuo_guess":{ diff --git a/character/sp.js b/character/sp.js index 7acc1fe41..19b45cb27 100755 --- a/character/sp.js +++ b/character/sp.js @@ -3307,7 +3307,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(att>0) return att+1; if(att==0) return Math.random(); return att; - }); + }).animate=false; 'step 1' if(result.bool){ var target=result.targets[0]; @@ -4477,7 +4477,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return 1/Math.sqrt(target.hp+1); } return 0; - }); + }).animate=false; 'step 1' if(result.bool){ var target=result.targets[0]; @@ -12076,6 +12076,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, ai:{ damage:true, + fireAttack:true, threaten:1.5, order:7, result:{ @@ -13663,6 +13664,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } return 4-get.value(card) }, + ai:{ + fireAttack:true, + }, }, "smh_lianhuan":{ audio:2, diff --git a/character/sp2.js b/character/sp2.js index 478faeaa4..9327f5476 100644 --- a/character/sp2.js +++ b/character/sp2.js @@ -4,6 +4,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ name:'sp2', connect:true, character:{ + ol_dingyuan:['male','qun',4,['weihuan','shouchong'],['unseen']], liubian:['male','qun',3,['shiyuan','dushi']], xin_baosanniang:['female','shu',3,['xinfu_wuniang','decadexushen']], re_hejin:['male','qun',4,['spmouzhu']], @@ -71,6 +72,128 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, skill:{ + weihuan:{ + trigger:{player:'phaseZhunbeiBegin'}, + direct:true, + filter:function(event,player){ + if(!game.hasPlayer(function(current){ + return current.hasSkill('panshi'); + })) return true; + return player.countCards('he')>1&&game.hasPlayer(function(current){ + return current!=player&&!current.hasSkill('panshi'); + }); + }, + content:function(){ + 'step 0' + if(game.hasPlayer(function(current){ + return current.hasSkill('panshi'); + })) event.goto(2); + else player.chooseTarget(lib.filter.notMe,get.prompt('weihuan'),'令一名其他角色获得「虎」标记'); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + player.logSkill('weihuan',target); + target.addSkill('panshi'); + } + event.finish(); + 'step 2' + player.chooseCardTarget({ + prompt:get.prompt('weihuan'), + prompt2:('弃置两张牌并将'+get.translation(game.filterPlayer(function(current){ + return current.hasSkill('panshi'); + }))+'的「虎」标记转移给其他角色'), + position:'he', + filterTarget:function(card,player,target){ + return player!=target&&!target.hasSkill('panshi'); + }, + filterCard:lib.filter.cardDiscardable, + selectCard:2, + }); + 'step 3' + if(result.bool){ + var target=result.targets[0]; + player.logSkill('weihuan'); + player.discard(result.cards).delay=false; + player.line2(game.filterPlayer(function(current){ + if(current.hasSkill('panshi')){ + current.removeSkill('panshi'); + return true; + } + }).concat(result.targets),'green'); + target.addSkill('panshi'); + } + else event.finish(); + 'step 4' + game.delayx(); + }, + derivation:'panshi', + }, + panshi:{ + mark:true, + marktext:'虎', + intro:{content:'吾乃吕奉先是也'}, + trigger:{player:'phaseZhunbeiBegin'}, + forced:true, + filter:function(event,player){ + return player.countCards('h')>0&&game.hasPlayer(function(current){ + return current!=player&¤t.hasSkill('weihuan'); + }); + }, + content:function(){ + 'step 0' + var targets=game.filterPlayer(function(current){ + return current!=player&¤t.hasSkill('weihuan'); + }); + if(targets.length==1){ + event.target=targets[0]; + player.chooseCard('h',true,'叛弑:将一张手牌交给'+get.translation(targets)); + } + else player.chooseCardTarget({ + prompt:'叛弑:将一张手牌交给'+get.translation(targets)+'中的一名角色', + filterCard:true, + position:'h', + targets:targets, + forced:true, + filterTarget:function(card,player,target){ + return _status.event.targets.contains(target); + }, + }); + 'step 1' + if(result.bool){ + if(!target) target=result.targets[0]; + player.line(target); + target.gain(result.cards,player,'giveAuto'); + } + }, + group:'panshi_damage', + }, + panshi_damage:{ + trigger:{source:'damageBegin1'}, + forced:true, + logTarget:'player', + filter:function(event,player){ + return event.card&&event.card.name=='sha'&&event.player.hasSkill('weihuan'); + }, + content:function(){ + trigger.num++; + }, + }, + shouchong:{ + trigger:{global:'damageEnd'}, + forced:true, + filter:function(event,player){ + return event.source&&event.source.isAlive()&&!player.hasSkill('shouchong2'); + }, + content:function(){ + player.addTempSkill('shouchong2','roundStart'); + if(trigger.source!=player) player.draw(); + else if(trigger.player.isAlive()){ + player.line(trigger.player,'green'); + trigger.player.damage(); + } + }, + }, + shouchong2:{}, shiyuan:{ trigger:{target:'useCardToTargeted'}, frequent:true, @@ -1446,6 +1569,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player:1, }, threaten:2.9, + fireAttack:true, }, group:['lvli2','lvli3','lvli4','lvli5','lvli6'] }, @@ -6099,6 +6223,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ shiyuan_info:'每回合每项限一次,当你成为其他角色使用牌的目标后:①若其体力值大于你,你摸三张牌。②若其体力值等于你,你摸两张牌。③若其体力值小于你,你摸一张牌。', dushi:'毒逝', dushi_info:'锁定技,你处于濒死状态时,其他角色不能对你使用【桃】。你死亡时,你选择一名其他角色获得〖毒逝〗。', + ol_dingyuan:'丁原', + weihuan:'为患', + weihuan_info:'准备阶段,若场上没有“虎”标记,你可令一名其他角色获得一个“虎”标记;若场上有“虎”标记,你可以弃置两张牌移动“虎”标记。拥有“虎”标记的角色获得技能“叛弑”', + panshi:'叛弑', + panshi_info:'锁定技,准备阶段,你交给有“为患”技能的角色一张手牌;你的【杀】对其造成的伤害+1', + shouchong:'首冲', + shouchong_info:'锁定技,有角色造成伤害后,若此伤害是本轮第一次造成伤害,且伤害来源是其他角色,则你摸一张牌;若伤害来源是你,则你对受伤角再造成1点伤害。', + sp_whlw:"文和乱武", sp_zlzy:"逐鹿中原", diff --git a/character/yijiang.js b/character/yijiang.js index 347bc85a7..f736c2040 100755 --- a/character/yijiang.js +++ b/character/yijiang.js @@ -7234,8 +7234,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, save:true, respondSha:true, + fireAttack:true, respondShan:true, skillTagFilter:function(player,tag,arg){ + if(tag=='fireAttack') return true; if(player.hasCard(function(card){ return get.color(card)=='black'&&get.type(card)!='basic'; },'he')){ @@ -9416,7 +9418,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } } else{ - if(att<=0){ + if(att<=0&&source.countCards('e',function(card){ + return get.value(card,source)>0&&get.effect(player,card,player,player)>0; + })){ return '移动装备'; } } @@ -9432,8 +9436,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ "step 1" if(result.control=='移动装备'){ player.logSkill('qieting',trigger.player); - player.choosePlayerCard(trigger.player,'e','将一张装备牌移至你的装备区').set('filterButton',function(button){ + player.choosePlayerCard(trigger.player,'e','将一张装备牌移至你的装备区',true).set('filterButton',function(button){ return _status.event.player.isEmpty(get.subtype(button.link)); + }).set('ai',function(button){ + return get.effect(player,button.link,player,player); }); } else{ diff --git a/game/asset.js b/game/asset.js index a9d3e7215..61eec7ed9 100644 --- a/game/asset.js +++ b/game/asset.js @@ -1,5 +1,5 @@ window.noname_asset_list=[ - 'v1.9.106.2', + 'v1.9.106.2.1', 'audio/background/aozhan_chaoming.mp3', 'audio/background/aozhan_online.mp3', 'audio/background/aozhan_rewrite.mp3', @@ -403,6 +403,14 @@ window.noname_asset_list=[ 'audio/effect/lose.mp3', 'audio/effect/loseHp.mp3', 'audio/effect/recover.mp3', + 'audio/effect/throw_egg1.mp3', + 'audio/effect/throw_egg2.mp3', + 'audio/effect/throw_flower1.mp3', + 'audio/effect/throw_flower2.mp3', + 'audio/effect/throw_shoe1.mp3', + 'audio/effect/throw_shoe2.mp3', + 'audio/effect/throw_wine1.mp3', + 'audio/effect/throw_wine2.mp3', 'audio/effect/tie.mp3', 'audio/effect/win.mp3', @@ -4457,6 +4465,18 @@ window.noname_asset_list=[ 'image/emotion/xiaowu_emotion/12.gif', 'image/emotion/xiaowu_emotion/13.gif', 'image/emotion/xiaowu_emotion/14.gif', + 'image/emotion/throw_emotion/egg1.png', + 'image/emotion/throw_emotion/egg2.png', + 'image/emotion/throw_emotion/flower1.png', + 'image/emotion/throw_emotion/flower2.png', + 'image/emotion/throw_emotion/shoe1.png', + 'image/emotion/throw_emotion/shoe2.png', + 'image/emotion/throw_emotion/shoukao1.png', + 'image/emotion/throw_emotion/shoukao2.png', + 'image/emotion/throw_emotion/wine1.png', + 'image/emotion/throw_emotion/wine2.png', + 'image/emotion/throw_emotion/yuxis1.png', + 'image/emotion/throw_emotion/yuxis2.png', 'image/mode/boss/card/chixueqingfeng.png', 'image/mode/boss/card/chiyanzhenhunqin.png', diff --git a/game/game.js b/game/game.js index d77aa0c56..3384a66a9 100644 --- a/game/game.js +++ b/game/game.js @@ -9775,16 +9775,21 @@ }, }, translate:{ + flower:'鲜花', + egg:'鸡蛋', + wine:'酒杯', + shoe:'拖鞋', + yuxis:'玉玺', + shoukao:'枷锁', junk:'平凡', common:'普通', rare:'精品', epic:'史诗', legend:'传说', - 'default':"默认", + default:"默认", special:'特殊', zhenfa:'阵法', aozhan:"鏖战", - "aozhan_info":"", mode_derivation_card_config:'衍生', mode_banned_card_config:'禁卡', mode_favourite_character_config:'收藏', @@ -9859,6 +9864,7 @@ equip3:'防御马', equip4:'攻击马', equip5:'宝物', + equip6:'坐骑', zero:'零', one:'一', two:'二', @@ -11742,17 +11748,19 @@ if(game.modeSwapPlayer&&!_status.auto&&player.isUnderControl()){ game.modeSwapPlayer(player); } - game.check(); if(event.isMine()){ - game.pause(); - if(event.openskilldialog){ - event.skillDialog=ui.create.dialog(event.openskilldialog); - delete event.openskilldialog; - event.dialog=event.prompt; - } - else{ - if(event.prompt) event.dialog=ui.create.dialog(event.prompt); - if(event.prompt2) event.dialog.addText(event.prompt2); + var ok=game.check(); + if(!ok){ + game.pause(); + if(event.openskilldialog){ + event.skillDialog=ui.create.dialog(event.openskilldialog); + delete event.openskilldialog; + event.dialog=event.prompt; + } + else{ + if(event.prompt) event.dialog=ui.create.dialog(event.prompt); + if(event.prompt2) event.dialog.addText(event.prompt2); + } } } else if(event.isOnline()){ @@ -11764,20 +11772,31 @@ } "step 1" if(event.result=='ai'){ - game.check(); - if(ai.basic.chooseCard(event.ai)||forced){ + var ok=game.check(); + if(ok){ ui.click.ok(); } - else if(event.skill){ + else if(ai.basic.chooseCard(event.ai)){ + ui.click.ok(); + event._aiexcludeclear=true; + } + else if(event.skill&&!event.norestore){ var skill=event.skill; ui.click.cancel(); event._aiexclude.add(skill); + var info=get.info(skill); + if(info.sourceSkill){ + event._aiexclude.add(info.sourceSkill); + } event.redo(); game.resume(); } else{ ui.click.cancel(); } + if(event.aidelay&&event.result&&event.result.bool){ + game.delayx(); + } } "step 2" event.resume(); @@ -12777,7 +12796,7 @@ ui.click.cancel(); } } - if(event.result.bool){ + if(event.result.bool&&event.animate!==false){ for(var i=0;i',ui.window); + var width=30; + var height=30; + var left=getLeft(player)-width; + var top=player.offsetTop+player.offsetHeight/3-height; + emotion.style.left=left+'px'; + emotion.style.top=top+'px'; + var left2=getLeft(target)-width; + var top2=target.offsetTop+target.offsetHeight/3-height; + emotion.style['z-index']=10; + emotion.style.transform='translateY('+(top2-top)+'px) translateX('+(left2-left)+'px)'; + if(lib.config.background_audio) game.playAudio('effect','throw_'+name+get.rand(1,2)); + setTimeout(function(){ + emotion.innerHTML=(''); + setTimeout(function(){ + emotion.delete(); + },1200); + },600); + }, trySkillAnimate:function(name,popname,checkShow){ if(!game.online&&lib.config.skill_animation_type!='off'&&lib.skill[name]&&lib.skill[name].skillAnimation){ if(lib.config.skill_animation_type=='default'){ @@ -16462,6 +16507,11 @@ game.playerMap[this.playerid]=this; return this; }, + throwEmotion:function(target,emotion){ + game.broadcastAll(function(player,target,emotion){ + player.$throwEmotion(target,emotion); + },this,target,emotion); + }, emotion:function(pack,id){ var str=''; lib.element.player.say.call(this,str); @@ -25070,6 +25120,7 @@ 'chooseBoolBegin','choosePlayerCardBegin','discardPlayerCardBegin','gainPlayerCardBegin']}, forced:true, priority:100, + forceDie:true, popup:false, filter:function(event,player){ if(event.autochoose&&event.autochoose()) return false; @@ -25836,6 +25887,12 @@ } } }, + throwEmotion:function(target,emotion){ + var player=lib.playerOL[this.id]; + if(player){ + player.throwEmotion(target,emotion); + } + }, emotion:function(id,pack,emotion){ var that=this; if(!this.id||(!lib.playerOL[this.id]&&(!game.connectPlayers||!function(){ @@ -28773,6 +28830,14 @@ console.log(player); } }, + throwEmotion:function(player,content){ + if(player&&content){ + player.$throwEmotion(game.playerMap[content[0]],content[1]); + } + else{ + console.log(player); + } + }, line:function(player,content){ if(player&&content){ player.line(game.playerMap[content[0]],content[1]); @@ -46822,6 +46887,7 @@ var layer=ui.create.div('.poplayer',ui.window); var clicklayer=function(e){ if(_status.touchpopping) return; + delete ui.throwEmotion; delete _status.removePop; uiintro.delete(); this.remove(); @@ -50386,6 +50452,62 @@ } } } + if(!game.observe&&_status.gameStarted&&game.me&&node!=game.me){ + ui.throwEmotion=[]; + uiintro.addText('发送交互表情'); + var click=function(){ + if(_status.dragged) return; + if(_status.justdragged) return; + if(_status.throwEmotionWait) return; + var emotion=this.link; + if(game.online){ + game.send('throwEmotion',node,emotion); + } + else game.me.throwEmotion(node,emotion); + uiintro._close(); + _status.throwEmotionWait=true; + setTimeout(function(){ + _status.throwEmotionWait=false; + if(ui.throwEmotion){ + for(var i of ui.throwEmotion) i.classList.remove('exclude'); + } + },(emotion=='flower'||emotion=='egg')?5000:10000) + }; + var td; + var table=document.createElement('div'); + table.classList.add('add-setting'); + table.style.margin='0'; + table.style.width='100%'; + table.style.position='relative'; + var listi=['flower','egg']; + for(var i=0;i'; + td.addEventListener(lib.config.touchscreen?'touchend':'click',click); + } + uiintro.content.appendChild(table); + table=document.createElement('div'); + table.classList.add('add-setting'); + table.style.margin='0'; + table.style.width='100%'; + table.style.position='relative'; + var listi=['wine','shoe']; + if(game.me.storage.zhuSkill_shanli) listi=['yuxis','shoukao']; + for(var i=0;i'; + td.addEventListener(lib.config.touchscreen?'touchend':'click',click); + } + uiintro.content.appendChild(table); + } var modepack=lib.characterPack['mode_'+get.mode()]; if(lib.config.show_favourite&&lib.character[node.name]&&game.players.contains(node)&& (!modepack||!modepack[node.name])&&(!simple||get.is.phoneLayout())){ @@ -51764,7 +51886,7 @@ return -1.5; } if(player.getCards('e').contains(card)){ - var evalue=get.equipValue(card); + var evalue=get.value(card,player); if(player.hasSkillTag('noe')){ if(evalue>=7){ return evalue/6; diff --git a/game/update.js b/game/update.js index 5e10b2d90..cf5dc1a54 100644 --- a/game/update.js +++ b/game/update.js @@ -1,28 +1,25 @@ window.noname_update={ - version:'1.9.106.2', - update:'1.9.106.1', + version:'1.9.106.2.1', + update:'1.9.106.2', changeLog:[ - '小无表情包、背景', - '刘辩', - '司马师,羊徽瑜,手杀朱然', - '线下版李傕、张济、樊稠', + '鲜花/鸡蛋/酒杯/拖鞋表情', 'bug修复', ], files:[ - //'card/extra.js', + 'card/extra.js', //'card/huanlekapai.js', //'card/sp.js', - //'card/standard.js', + 'card/standard.js', //'card/swd.js', //'card/mtg.js', //'card/gujian.js', - //'card/guozhan.js', + 'card/guozhan.js', //'card/gwent.js', //'card/yunchou.js', //'card/zhenfa.js', 'card/zhulu.js', 'character/diy.js', - //'character/extra.js', + 'character/extra.js', //'character/hearth.js', //'character/gujian.js', //'character/gwent.js', @@ -30,7 +27,7 @@ window.noname_update={ 'character/mobile.js', //'character/mtg.js', //'character/old.js', - 'character/rank.js', + //'character/rank.js', 'character/refresh.js', 'character/shenhua.js', 'character/sp.js', @@ -46,9 +43,9 @@ window.noname_update={ //'layout/default/layout.css', //'layout/nova/layout.css', //'mode/identity.js', - //'mode/doudizhu.js', - 'mode/guozhan.js', - 'mode/chess.js', + 'mode/doudizhu.js', + //'mode/guozhan.js', + //'mode/chess.js', //'mode/tafang.js', //'mode/single.js', //'mode/stone.js', @@ -60,7 +57,7 @@ window.noname_update={ //'game/server.js', //'game/NoSleep.js', //'game/config.js', - 'game/package.js', + //'game/package.js', //'game/asset.js', //'game/source.js', //'theme/style/hp/xinglass.css', diff --git a/image/emotion/throw_emotion/egg1.png b/image/emotion/throw_emotion/egg1.png new file mode 100644 index 000000000..f84d8cb67 Binary files /dev/null and b/image/emotion/throw_emotion/egg1.png differ diff --git a/image/emotion/throw_emotion/egg2.png b/image/emotion/throw_emotion/egg2.png new file mode 100644 index 000000000..4c5c97d12 Binary files /dev/null and b/image/emotion/throw_emotion/egg2.png differ diff --git a/image/emotion/throw_emotion/flower1.png b/image/emotion/throw_emotion/flower1.png new file mode 100644 index 000000000..0fac349a1 Binary files /dev/null and b/image/emotion/throw_emotion/flower1.png differ diff --git a/image/emotion/throw_emotion/flower2.png b/image/emotion/throw_emotion/flower2.png new file mode 100644 index 000000000..6b4ac6dd9 Binary files /dev/null and b/image/emotion/throw_emotion/flower2.png differ diff --git a/image/emotion/throw_emotion/shoe1.png b/image/emotion/throw_emotion/shoe1.png new file mode 100644 index 000000000..d7027c062 Binary files /dev/null and b/image/emotion/throw_emotion/shoe1.png differ diff --git a/image/emotion/throw_emotion/shoe2.png b/image/emotion/throw_emotion/shoe2.png new file mode 100644 index 000000000..462888d84 Binary files /dev/null and b/image/emotion/throw_emotion/shoe2.png differ diff --git a/image/emotion/throw_emotion/shoukao1.png b/image/emotion/throw_emotion/shoukao1.png new file mode 100644 index 000000000..ea5727e92 Binary files /dev/null and b/image/emotion/throw_emotion/shoukao1.png differ diff --git a/image/emotion/throw_emotion/shoukao2.png b/image/emotion/throw_emotion/shoukao2.png new file mode 100644 index 000000000..bc26f3779 Binary files /dev/null and b/image/emotion/throw_emotion/shoukao2.png differ diff --git a/image/emotion/throw_emotion/wine1.png b/image/emotion/throw_emotion/wine1.png new file mode 100644 index 000000000..e43047bf2 Binary files /dev/null and b/image/emotion/throw_emotion/wine1.png differ diff --git a/image/emotion/throw_emotion/wine2.png b/image/emotion/throw_emotion/wine2.png new file mode 100644 index 000000000..8545cd945 Binary files /dev/null and b/image/emotion/throw_emotion/wine2.png differ diff --git a/image/emotion/throw_emotion/yuxis1.png b/image/emotion/throw_emotion/yuxis1.png new file mode 100644 index 000000000..50189cd56 Binary files /dev/null and b/image/emotion/throw_emotion/yuxis1.png differ diff --git a/image/emotion/throw_emotion/yuxis2.png b/image/emotion/throw_emotion/yuxis2.png new file mode 100644 index 000000000..ff03d0dd9 Binary files /dev/null and b/image/emotion/throw_emotion/yuxis2.png differ diff --git a/mode/doudizhu.js b/mode/doudizhu.js index 0d93d0c92..7b6d31d89 100644 --- a/mode/doudizhu.js +++ b/mode/doudizhu.js @@ -226,6 +226,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ event.map[id].addArray(event.list2.randomRemove(1)); event.list.removeArray(event.map[id]); event.map[id].addArray(event.list.randomRemove(4-event.map[id].length)); + event.list2.removeArray(event.map[id]); } event.dialog=ui.create.dialog('你的选将框',[event.map[game.me.playerid],'character']); event.start=game.players.randomGet(); @@ -893,6 +894,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ event.map[id].addArray(event.list2.randomRemove(1)); event.list.removeArray(event.map[id]); event.map[id].addArray(event.list.randomRemove(4-event.map[id].length)); + event.list2.removeArray(event.map[id]); } _status.characterlist=event.list.slice(0); event.videoId=lib.status.videoId++; @@ -1161,7 +1163,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ } }, get:{ - attitude:function(from,to){ + rawAttitude:function(from,to){ if(from.identity==to.identity) return 10; return -10; },