From 3763e50d09f5347f0e4b2a6cae128d1bd4e1d78a Mon Sep 17 00:00:00 2001 From: libccy Date: Tue, 21 Mar 2017 19:16:35 +0800 Subject: [PATCH] m --- character/extra.js | 2 + character/hearth.js | 3 ++ character/ow.js | 62 ++++++++++++++++++++++++++++-- character/refresh.js | 2 + character/shenhua.js | 2 + character/standard.js | 2 + character/swd.js | 4 +- character/yijiang.js | 2 + character/yxs.js | 3 +- game/game.js | 79 +++++++++++++++++++++++++++++++++++++++ game/update.js | 2 +- layout/default/layout.css | 4 +- mode/boss.js | 3 +- 13 files changed, 161 insertions(+), 9 deletions(-) diff --git a/character/extra.js b/character/extra.js index 7beb6ff93..21d311fb5 100644 --- a/character/extra.js +++ b/character/extra.js @@ -243,6 +243,7 @@ character.extra={ }, ai:{ maixie:true, + maixie_hp:true, effect:{ target:function(card,player,target){ if(player.hasSkill('jueqing')) return [1,-2]; @@ -562,6 +563,7 @@ character.extra={ }, ai:{ maixie:true, + maixie_hp:true, threaten:function(player,target){ if(target.hp==1) return 2.5; return 1; diff --git a/character/hearth.js b/character/hearth.js index 535bfeb4a..e7a0ea22d 100644 --- a/character/hearth.js +++ b/character/hearth.js @@ -845,6 +845,7 @@ character.hearth={ }, ai:{ maixie:true, + maixie_hp:true, effect:{ target:function(card,player,target){ if(get.tag(card,'damage')){ @@ -1169,6 +1170,7 @@ character.hearth={ }, ai:{ maixie:true, + maixie_hp:true, effect:{ target:function(card,player,target){ if(player.hasSkill('jueqing')) return [1,-2]; @@ -2841,6 +2843,7 @@ character.hearth={ }, ai:{ maixie:true, + maixie_hp:true, effect:{ target:function(card,player,target){ if(get.tag(card,'damage')){ diff --git a/character/ow.js b/character/ow.js index 646fd40b7..84b958927 100644 --- a/character/ow.js +++ b/character/ow.js @@ -18,7 +18,7 @@ character.ow={ ow_kuangshu:['male','shu',3,['liudan','shoujia','shihuo']], ow_tuobiang:['male','shu',3,['paotai','maoding']], - // ow_baolei:['male','qun',4,[]], + ow_baolei:['male','qun',4,['bshaowei','zhencha']], ow_banzang:['male','qun',4,['bfengshi','yinbo']], ow_laiyinhate:['male','qun',4,['zhongdun','mengji']], ow_luba:['male','shu',4,['liangou','xiyang']], @@ -52,6 +52,62 @@ character.ow={ ow_heiying:'作为全世界最臭名昭著的黑客,“黑影”利用信息与情报操控权贵。早在她称自己为“黑影”之前,░░░░░░是千千万万在智械危机后变成孤儿的儿童之一。在家乡大部分基础设施都被摧毁的情况下,她依靠自己在黑客以及计算机方面的天赋活了下来。在黑客领域的一连串的胜利让░░░░░░对自己的实力过度自信,最终她在毫无防备的情况下,陷入了一张覆盖全球的阴谋网——并且也因此被人盯上了。由于自己的安全面临严重威胁,░░░░░░不得不删除关于自己的全部信息,从此销声匿迹。后来,她以“黑影”的身份再度出现,经过改造的她决心查出那张阴谋网背后的真相。', }, skill:{ + zhencha:{ + init:function(player){ + player.storage.zhencha=true; + }, + mark:true, + intro:{ + content:function(storage,player){ + if(storage){ + return '每当你使用一张杀,你摸一张牌或回复一点体力'; + } + else if(player.hasSkill('bshaowei')&&player.storage.bshaowei){ + return '你的杀无视距离和防具并可额外指定一个目标;你使用杀无次数限制;你不能闪避杀'; + } + else{ + return '无额外技能'; + } + } + }, + trigger:{player:'phaseEnd'}, + filter:function(event,player){ + if(player.hasSkill('zhencha2')) return false; + return !player.storage.zhencha; + }, + content:function(){ + player.storage.bshaowei=false; + player.storage.zhencha=true; + if(player.marks.zhencha){ + player.marks.zhencha.firstChild.innerHTML='侦'; + } + player.addTempSkill('zhencha2','phaseAfter'); + } + }, + bshaowei:{ + init:function(player){ + player.storage.bshaowei=false; + }, + trigger:{player:'phaseEnd'}, + filter:function(event,player){ + if(player.hasSkill('zhencha2')) return false; + return !player.storage.bshaowei; + }, + check:function(event,player){ + if(!player.hasShan()) return true; + if(!player.hasSha()) return false; + return Math.random()<0.5; + }, + content:function(){ + player.storage.bshaowei=true; + player.storage.zhencha=false; + if(player.marks.zhencha){ + player.marks.zhencha.firstChild.innerHTML='哨'; + } + player.addTempSkill('zhencha2','phaseAfter'); + } + }, + zhencha2:{}, pingzhang:{ trigger:{global:'damageBegin'}, alter:true, @@ -3046,9 +3102,9 @@ character.ow={ feitiao:'飞跳', feitiao_info:'出牌阶段限一次,你可以弃置一张牌并指定一名其他角色,你与该角色的距离视为1直到回合结束,然后该角色随机弃置一张牌', bshaowei:'哨卫', - bshaowei_info:'结束阶段,你可以切换至此模式。当处于时模式时,每当你使用一张杀,你摸一张牌或回复一点体力', + bshaowei_info:'结束阶段,你可以切换至哨卫模式。当处于时模式时,每当你使用一张杀,你摸一张牌或回复一点体力', zhencha:'侦查', - zhencha_info:'结束阶段,你可以切换至此模式,然后获得一点护甲。当处于时模式时,你的杀无视距离和防具并可额外指定一个目标;你使用杀无次数限制;你不能闪避杀', + zhencha_info:'结束阶段,你可以切换至侦查模式,并获得一点护甲。当处于时模式时,你的杀无视距离和防具并可额外指定一个目标;你使用杀无次数限制;你不能闪避杀', liangou:'链钩', liangou_info:'出牌阶段限一次,你可以弃置一张牌,指定一名其他角色并进行一次判定,若结果不为红桃,该角色与你距离为1且受到的首次伤害+1直到回合结束', xiyang:'吸氧', diff --git a/character/refresh.js b/character/refresh.js index a093c23ba..d2325713a 100644 --- a/character/refresh.js +++ b/character/refresh.js @@ -868,6 +868,7 @@ character.refresh={ }, ai:{ maixie:true, + maixie_hp:true, effect:{ target:function(card,player,target){ if(player.hasSkill('jueqing')) return [1,-1]; @@ -946,6 +947,7 @@ character.refresh={ }, ai:{ maixie:true, + maixie_hp:true, result:{ effect:function(card,player,target){ if(get.tag(card,'damage')){ diff --git a/character/shenhua.js b/character/shenhua.js index c17c6a2fc..dfb66fb5a 100644 --- a/character/shenhua.js +++ b/character/shenhua.js @@ -1958,6 +1958,7 @@ character.shenhua={ }, ai:{ maixie:true, + maixie_hp:true, effect:{ target:function(card,player,target){ if(get.tag(card,'damage')){ @@ -2926,6 +2927,7 @@ character.shenhua={ }, ai:{ maixie:true, + maixie_hp:true, effect:{ target:function(card,player,target,current){ if(get.tag(card,'damage')&&target.hp>1){ diff --git a/character/standard.js b/character/standard.js index 7bd56a597..7fc96b06f 100644 --- a/character/standard.js +++ b/character/standard.js @@ -140,6 +140,7 @@ character.standard={ }, ai:{ maixie:true, + maixie_hp:true, effect:{ target:function(card,player){ if(player.hasSkill('jueqing')) return [1,-1]; @@ -398,6 +399,7 @@ character.standard={ }, ai:{ maixie:true, + maixie_hp:true, effect:{ target:function(card,player,target){ if(get.tag(card,'damage')){ diff --git a/character/swd.js b/character/swd.js index c3b0a900f..c938aed63 100644 --- a/character/swd.js +++ b/character/swd.js @@ -2685,6 +2685,7 @@ character.swd={ }, ai:{ maixie:true, + maixie_hp:true, effect:function(card,player,target){ if(get.tag(card,'damage')){ if(player.hasSkill('jueqing')) return [1,-0.5]; @@ -2899,6 +2900,7 @@ character.swd={ group:'pozhou2', ai:{ maixie:true, + maixie_hp:true, effect:{ target:function(card,player,target){ if(get.tag(card,'damage')){ @@ -5076,6 +5078,7 @@ character.swd={ }, ai:{ maixie:true, + maixie_hp:true, effect:{ target:function(card,player,target){ if(get.tag(card,'damage')){ @@ -7044,7 +7047,6 @@ character.swd={ } }, ai:{ - maixie:true, effect:{ target:function(card,player,target,current){ if(card.name=='sha'&&(get.color(card)=='red')){ diff --git a/character/yijiang.js b/character/yijiang.js index d0f7a2349..5338565e3 100644 --- a/character/yijiang.js +++ b/character/yijiang.js @@ -4860,6 +4860,7 @@ character.yijiang={ }, ai:{ maixie:true, + maixie_hp:true, threaten:0.8, effect:{ target:function(card,player,target){ @@ -6898,6 +6899,7 @@ character.yijiang={ }, ai:{ maixie:true, + maixie_hp:true, effect:{ target:function(card,player,target){ if(get.tag(card,'damage')){ diff --git a/character/yxs.js b/character/yxs.js index 2c50c2606..360b84885 100644 --- a/character/yxs.js +++ b/character/yxs.js @@ -528,6 +528,7 @@ character.yxs={ }, ai:{ maixie:true, + maixie_hp:true, expose:0.2, effect:{ target:function(card,player,target){ @@ -890,7 +891,6 @@ character.yxs={ } }, ai:{ - maixie:true, effect:{ target:function(card,player,target){ if(get.tag(card,'damage')){ @@ -2008,6 +2008,7 @@ character.yxs={ }, ai:{ maixie:true, + maixie_hp:true, effect:{ target:function(card,player,target){ if(get.tag(card,'damage')){ diff --git a/game/game.js b/game/game.js index f0c0dcda1..0172925c2 100644 --- a/game/game.js +++ b/game/game.js @@ -9689,6 +9689,56 @@ if(event.dialog) event.dialog.close(); event.resume(); }, + chooseDrawRecover:function(){ + 'step 0' + if(player.isHealthy()&&event.forced){ + player.draw(event.num1); + event.finish(); + return; + } + var controls=['draw_card']; + if(player.isDamaged()){ + event.num1=Math.min(event.num1,player.maxHp-player.hp); + controls.push('recover_hp'); + } + if(!event.forced){ + controls.push('cancel2'); + } + var prompt=event.prompt; + if(!prompt){ + if(player.isHealthy()){ + prompt='是否摸'+get.cnNumber(event.num1)+'张牌?'; + } + else{ + prompt='摸'+get.cnNumber(event.num1)+'张牌或回复'+get.cnNumber(event.num2)+'点体力'; + } + } + var func=event.ai; + if(typeof func!='function'){ + var choice='draw_card'; + var nh=player.num('h'); + if(player.isDamaged()&&ai.get.recoverEffect(player)>0){ + if(player.hp==1||player.needsToDiscard()||player.hasSkillTag('maixie_hp')){ + choice='recover_hp'; + } + else if(player.hp==2){ + if(event.num2>event.num1){ + choice='recover_hp'; + } + else if(event.num2==event.num1){ + if(nh>=2){ + choice='recover_hp'; + } + } + } + else{ + if(event.num1div>.avatar2.avatar3{ left: 12px; - width: 14px; top: 31px; - height: 14px; + transform: scale(0.7); + transform-origin: top left; } #window.rightbar #historybar, diff --git a/mode/boss.js b/mode/boss.js index 9d38b7a1b..c545f364e 100644 --- a/mode/boss.js +++ b/mode/boss.js @@ -1093,7 +1093,8 @@ mode.boss={ } }, ai:{ - maixie:true + maixie:true, + maixie_hp:true, } }, boss_zhangwu_ai:{