diff --git a/audio/die/clan_wuban.mp3 b/audio/die/clan_wuban.mp3 new file mode 100644 index 000000000..004199a1d Binary files /dev/null and b/audio/die/clan_wuban.mp3 differ diff --git a/audio/die/clan_wuxian.mp3 b/audio/die/clan_wuxian.mp3 new file mode 100644 index 000000000..6ded41dc3 Binary files /dev/null and b/audio/die/clan_wuxian.mp3 differ diff --git a/audio/die/dc_liuye.mp3 b/audio/die/dc_liuye.mp3 new file mode 100644 index 000000000..56721f2e9 Binary files /dev/null and b/audio/die/dc_liuye.mp3 differ diff --git a/audio/die/dc_zhaoyǎn.mp3 b/audio/die/dc_zhaoyǎn.mp3 new file mode 100644 index 000000000..aaa4cd9d5 Binary files /dev/null and b/audio/die/dc_zhaoyǎn.mp3 differ diff --git a/audio/die/luyi.mp3 b/audio/die/luyi.mp3 new file mode 100644 index 000000000..3c1ee5b14 Binary files /dev/null and b/audio/die/luyi.mp3 differ diff --git a/audio/die/shen_zhangfei.mp3 b/audio/die/shen_zhangfei.mp3 new file mode 100644 index 000000000..992ddc353 Binary files /dev/null and b/audio/die/shen_zhangfei.mp3 differ diff --git a/audio/die/wangwei.mp3 b/audio/die/wangwei.mp3 new file mode 100644 index 000000000..969562074 Binary files /dev/null and b/audio/die/wangwei.mp3 differ diff --git a/audio/die/zhugeshang.mp3 b/audio/die/zhugeshang.mp3 new file mode 100644 index 000000000..c71de6f0c Binary files /dev/null and b/audio/die/zhugeshang.mp3 differ diff --git a/audio/skill/clanguixiang1.mp3 b/audio/skill/clanguixiang1.mp3 new file mode 100644 index 000000000..ee6ee06d8 Binary files /dev/null and b/audio/skill/clanguixiang1.mp3 differ diff --git a/audio/skill/clanguixiang2.mp3 b/audio/skill/clanguixiang2.mp3 new file mode 100644 index 000000000..c8442845b Binary files /dev/null and b/audio/skill/clanguixiang2.mp3 differ diff --git a/audio/skill/clanmuyin_clan_wuban1.mp3 b/audio/skill/clanmuyin_clan_wuban1.mp3 new file mode 100644 index 000000000..e06d13224 Binary files /dev/null and b/audio/skill/clanmuyin_clan_wuban1.mp3 differ diff --git a/audio/skill/clanmuyin_clan_wuban2.mp3 b/audio/skill/clanmuyin_clan_wuban2.mp3 new file mode 100644 index 000000000..c5c10586e Binary files /dev/null and b/audio/skill/clanmuyin_clan_wuban2.mp3 differ diff --git a/audio/skill/clanmuyin_clan_wuxian1.mp3 b/audio/skill/clanmuyin_clan_wuxian1.mp3 new file mode 100644 index 000000000..b43c3d41c Binary files /dev/null and b/audio/skill/clanmuyin_clan_wuxian1.mp3 differ diff --git a/audio/skill/clanmuyin_clan_wuxian2.mp3 b/audio/skill/clanmuyin_clan_wuxian2.mp3 new file mode 100644 index 000000000..6989d19a7 Binary files /dev/null and b/audio/skill/clanmuyin_clan_wuxian2.mp3 differ diff --git a/audio/skill/clanyirong1.mp3 b/audio/skill/clanyirong1.mp3 new file mode 100644 index 000000000..e7d1b19cc Binary files /dev/null and b/audio/skill/clanyirong1.mp3 differ diff --git a/audio/skill/clanyirong2.mp3 b/audio/skill/clanyirong2.mp3 new file mode 100644 index 000000000..3a6ce30c0 Binary files /dev/null and b/audio/skill/clanyirong2.mp3 differ diff --git a/audio/skill/clanzhanding1.mp3 b/audio/skill/clanzhanding1.mp3 new file mode 100644 index 000000000..33e7b455b Binary files /dev/null and b/audio/skill/clanzhanding1.mp3 differ diff --git a/audio/skill/clanzhanding2.mp3 b/audio/skill/clanzhanding2.mp3 new file mode 100644 index 000000000..9f953aed9 Binary files /dev/null and b/audio/skill/clanzhanding2.mp3 differ diff --git a/audio/skill/dcbingji1.mp3 b/audio/skill/dcbingji1.mp3 new file mode 100644 index 000000000..780530588 Binary files /dev/null and b/audio/skill/dcbingji1.mp3 differ diff --git a/audio/skill/dcbingji2.mp3 b/audio/skill/dcbingji2.mp3 new file mode 100644 index 000000000..dc16636e2 Binary files /dev/null and b/audio/skill/dcbingji2.mp3 differ diff --git a/audio/skill/dcfuning1.mp3 b/audio/skill/dcfuning1.mp3 new file mode 100644 index 000000000..9efd9c08f Binary files /dev/null and b/audio/skill/dcfuning1.mp3 differ diff --git a/audio/skill/dcfuning2.mp3 b/audio/skill/dcfuning2.mp3 new file mode 100644 index 000000000..6e7bb28ac Binary files /dev/null and b/audio/skill/dcfuning2.mp3 differ diff --git a/audio/skill/dcfuxue1.mp3 b/audio/skill/dcfuxue1.mp3 new file mode 100644 index 000000000..92dd04024 Binary files /dev/null and b/audio/skill/dcfuxue1.mp3 differ diff --git a/audio/skill/dcfuxue2.mp3 b/audio/skill/dcfuxue2.mp3 new file mode 100644 index 000000000..e0eafb85d Binary files /dev/null and b/audio/skill/dcfuxue2.mp3 differ diff --git a/audio/skill/dchuace1.mp3 b/audio/skill/dchuace1.mp3 new file mode 100644 index 000000000..92cfbc811 Binary files /dev/null and b/audio/skill/dchuace1.mp3 differ diff --git a/audio/skill/dchuace2.mp3 b/audio/skill/dchuace2.mp3 new file mode 100644 index 000000000..51af7f7ae Binary files /dev/null and b/audio/skill/dchuace2.mp3 differ diff --git a/audio/skill/dcpoyuan1.mp3 b/audio/skill/dcpoyuan1.mp3 new file mode 100644 index 000000000..0c81692c6 Binary files /dev/null and b/audio/skill/dcpoyuan1.mp3 differ diff --git a/audio/skill/dcpoyuan2.mp3 b/audio/skill/dcpoyuan2.mp3 new file mode 100644 index 000000000..784d6f31a Binary files /dev/null and b/audio/skill/dcpoyuan2.mp3 differ diff --git a/audio/skill/dcruizhan1.mp3 b/audio/skill/dcruizhan1.mp3 new file mode 100644 index 000000000..adf3b8c05 Binary files /dev/null and b/audio/skill/dcruizhan1.mp3 differ diff --git a/audio/skill/dcruizhan2.mp3 b/audio/skill/dcruizhan2.mp3 new file mode 100644 index 000000000..34a6141ab Binary files /dev/null and b/audio/skill/dcruizhan2.mp3 differ diff --git a/audio/skill/dcshilie1.mp3 b/audio/skill/dcshilie1.mp3 new file mode 100644 index 000000000..be7fa955a Binary files /dev/null and b/audio/skill/dcshilie1.mp3 differ diff --git a/audio/skill/dcshilie2.mp3 b/audio/skill/dcshilie2.mp3 new file mode 100644 index 000000000..2a66b0465 Binary files /dev/null and b/audio/skill/dcshilie2.mp3 differ diff --git a/audio/skill/dcshoutan1.mp3 b/audio/skill/dcshoutan1.mp3 new file mode 100644 index 000000000..f7481e53c Binary files /dev/null and b/audio/skill/dcshoutan1.mp3 differ diff --git a/audio/skill/dcshoutan2.mp3 b/audio/skill/dcshoutan2.mp3 new file mode 100644 index 000000000..d4aee325a Binary files /dev/null and b/audio/skill/dcshoutan2.mp3 differ diff --git a/audio/skill/dcyaoyi1.mp3 b/audio/skill/dcyaoyi1.mp3 new file mode 100644 index 000000000..2ce4f9be3 Binary files /dev/null and b/audio/skill/dcyaoyi1.mp3 differ diff --git a/audio/skill/dcyaoyi2.mp3 b/audio/skill/dcyaoyi2.mp3 new file mode 100644 index 000000000..f7213067b Binary files /dev/null and b/audio/skill/dcyaoyi2.mp3 differ diff --git a/audio/skill/huomo_huzhao1.mp3 b/audio/skill/huomo_huzhao1.mp3 new file mode 100644 index 000000000..243287888 Binary files /dev/null and b/audio/skill/huomo_huzhao1.mp3 differ diff --git a/audio/skill/huomo_huzhao2.mp3 b/audio/skill/huomo_huzhao2.mp3 new file mode 100644 index 000000000..6b4fbb1ae Binary files /dev/null and b/audio/skill/huomo_huzhao2.mp3 differ diff --git a/audio/skill/sangu1.mp3 b/audio/skill/sangu1.mp3 new file mode 100644 index 000000000..05a5cfdef Binary files /dev/null and b/audio/skill/sangu1.mp3 differ diff --git a/audio/skill/sangu2.mp3 b/audio/skill/sangu2.mp3 new file mode 100644 index 000000000..3380fb166 Binary files /dev/null and b/audio/skill/sangu2.mp3 differ diff --git a/audio/skill/shencai1.mp3 b/audio/skill/shencai1.mp3 new file mode 100644 index 000000000..01916c1ec Binary files /dev/null and b/audio/skill/shencai1.mp3 differ diff --git a/audio/skill/shencai2.mp3 b/audio/skill/shencai2.mp3 new file mode 100644 index 000000000..dc595c878 Binary files /dev/null and b/audio/skill/shencai2.mp3 differ diff --git a/audio/skill/xunshi1.mp3 b/audio/skill/xunshi1.mp3 new file mode 100644 index 000000000..5a4b3a996 Binary files /dev/null and b/audio/skill/xunshi1.mp3 differ diff --git a/audio/skill/xunshi2.mp3 b/audio/skill/xunshi2.mp3 new file mode 100644 index 000000000..36c16f338 Binary files /dev/null and b/audio/skill/xunshi2.mp3 differ diff --git a/audio/skill/yizu1.mp3 b/audio/skill/yizu1.mp3 new file mode 100644 index 000000000..9f0e962b2 Binary files /dev/null and b/audio/skill/yizu1.mp3 differ diff --git a/audio/skill/yizu2.mp3 b/audio/skill/yizu2.mp3 new file mode 100644 index 000000000..0afd0ac07 Binary files /dev/null and b/audio/skill/yizu2.mp3 differ diff --git a/card/extra.js b/card/extra.js index 1533feea0..7c843b736 100644 --- a/card/extra.js +++ b/card/extra.js @@ -928,34 +928,34 @@ game.import('card',function(lib,game,ui,get,ai,_status){ }, translate:{ jiu:'酒', - jiu_info:'出牌阶段,对自己使用,令自己的下一张使用的【杀】造成的伤害+1(每回合限使用1次);濒死阶段,对自己使用,回复1点体力', + jiu_info:'①每回合限一次。出牌阶段,对你自己使用。目标角色使用的下一张【杀】的伤害值基数+1。②当你处于濒死状态时,对你自己使用。目标角色回复1点体力。', huogong:'火攻', tiesuo:'铁索连环', - tiesuo_info:'出牌阶段使用,选择1至2个角色,分别横置或重置这些角色', + tiesuo_info:'此牌可被重铸。出牌阶段,对至多两名角色使用。目标角色横置。', huogong_bg:'攻', - huogong_info:'目标角色展示一张手牌,然后若你能弃掉一张与所展示牌相同花色的手牌,则火攻对该角色造成1点火焰伤害。', + huogong_info:'出牌阶段,对一名有手牌的角色使用。目标角色展示一张手牌A,然后你可以弃置一张与A花色相同的手牌,对目标造成1点火属性伤害。', tiesuo_bg:'索', bingliang:'兵粮寸断', hualiu:'骅骝', zhuque:'朱雀羽扇', bingliang_bg:'粮', - bingliang_info:'目标角色判定阶段进行判定:若判定结果不为梅花,则跳过该角色的摸牌阶段。', + bingliang_info:'出牌阶段,对一名距离为1的其他角色使用。目标角色于其判定阶段进行判定:若判定结果不为梅花,则其跳过下一个摸牌阶段。', hualiu_bg:'+马', hualiu_info:'你的防御距离+1', zhuque_bg:'扇', zhuque_skill:'朱雀羽扇', - zhuque_info:'你可以将一张普通【杀】当具火焰伤害的【杀】使用。', + zhuque_info:'当你声明使用普【杀】时,你可以为此【杀】赋予火属性。', guding:'古锭刀', - guding_info:'锁定技,当你使用【杀】对目标角色造成伤害时,若其没有手牌,此伤害+1。', + guding_info:'锁定技,当你因执行【杀】的效果而对目标角色造成伤害时,若其没有手牌,则此伤害+1。', guding_skill:'古锭刀', tengjia:'藤甲', //tengjia_info:'锁定技,【南蛮入侵】、【万箭齐发】、【出其不意】和普通【杀】对你无效。当你受到火焰伤害时,该伤害+1。', - tengjia_info:'锁定技,【南蛮入侵】、【万箭齐发】和普通【杀】对你无效。当你受到火焰伤害时,该伤害+1。', + tengjia_info:'锁定技。①【南蛮入侵】、【万箭齐发】和普【杀】对你无效。②当你受到火属性伤害时,此伤害+1。', tengjia1:'藤甲', tengjia2:'藤甲', tengjia3:'藤甲', baiyin:'白银狮子', - baiyin_info:'锁定技,你每次受到伤害时,最多承受1点伤害(防止多余的伤害);当你失去装备区里的【白银狮子】时,你回复1点体力。', + baiyin_info:'锁定技。①当你受到伤害时,若此伤害大于1,则你将伤害值扣减至1点。②当你失去装备区内的【白银狮子】后,你回复1点体力。', baiyin_skill:'白银狮子', muniu:'木牛流马', diff --git a/card/guozhan.js b/card/guozhan.js index abee94516..2f062ac65 100644 --- a/card/guozhan.js +++ b/card/guozhan.js @@ -181,7 +181,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){ if(result.bool&&result.targets&&result.targets.length){ var current=result.targets[0]; target.line(current,'green'); - current.gain(event.cards2,'gain2'); + current.gain(event.cards2,'gain2').giver=player; event.given_list.push(current); event.goto(3); } @@ -1799,61 +1799,62 @@ game.import('card',function(lib,game,ui,get,ai,_status){ }, translate:{ liulongcanjia:'六龙骖驾', - liulongcanjia_info:'锁定技,你计算与其他角色的距离-1,其他角色计算与你的距离+1。
锁定技,当此牌进入你的装备区时,你弃置你装备区内其他坐骑牌;当此牌在你的装备区内,你不能使用其他坐骑牌(你的装备区便不能置入其他坐骑牌)。', + liulongcanjia_info:'锁定技。①你计算与其他角色的距离-1,其他角色计算与你的距离+1。②当此牌进入你的装备区时,你弃置你装备区内其他坐骑牌。③你的装备区内不能置入其他坐骑牌。', minguangkai:'明光铠', minguangkai_cancel:'明光铠', minguangkai_link:'明光铠', - minguangkai_info:'锁定技,当你成为【火烧连营】、【火攻】或火【杀】的目标时,取消之;若你是小势力角色,你不会被横置。', + minguangkai_info:'锁定技。①当你成为【火烧连营】、【火攻】或火【杀】的目标时,取消之。②当你即将横置前,若你是小势力角色,取消之。', dinglanyemingzhu:'定澜夜明珠', dinglanyemingzhu_bg:'珠', - dinglanyemingzhu_info:'锁定技,你视为拥有技能“制衡”,若你已经有“制衡”,则改为取消弃置牌数的限制。', + dinglanyemingzhu_info:'锁定技。若你拥有〖制衡〗,则你取消〖制衡〗的弃置牌数限制,否则你视为拥有〖制衡〗。', dinglanyemingzhu_skill:'制衡', - dinglanyemingzhu_skill_info:'出牌阶段限一次,你可以弃置至多X张牌(X为你的体力上限),然后摸等量的牌', + dinglanyemingzhu_skill_info:'出牌阶段限一次。你可以弃置至多X张牌(X为你的体力上限),然后摸等量的牌。', feilongduofeng:'飞龙夺凤', feilongduofeng2:'飞龙夺凤', feilongduofeng3:'飞龙夺凤', - feilongduofeng_info:'当你使用【杀】指定一名角色为目标后,你可令该角色弃置一张牌。当你使用【杀】令其他角色进入濒死状态时,你可以获得其一张手牌。', + feilongduofeng_info:'①当你使用【杀】指定目标后,你可令目标角色弃置一张牌。②当你因使用【杀】而令其他角色进入濒死状态时,你可以获得其一张手牌。', taipingyaoshu:'太平要术', - taipingyaoshu_info:'锁定技,防止你受到的所有属性伤害;你的手牌上限+X(X为势力数);当你失去装备区里的【太平要术】时,你摸两张牌,然后若你的体力值大于1,你失去1点体力。', - taipingyaoshu_info_guozhan:'锁定技,防止你受到的所有属性伤害;全场每有一名与你势力相同的角色存活,你的手牌上限便+1;当你失去装备区里的【太平要术】时,你摸两张牌,然后若你的体力值大于1,你失去1点体力。', + taipingyaoshu_info:'锁定技。①当你即将收到属性伤害时,取消之。②你的手牌上限+X(X为势力数)。③当你失去装备区里的【太平要术】时,你摸两张牌,然后若你的体力值大于1,你失去1点体力。', + taipingyaoshu_info_guozhan:'锁定技。①当你即将收到属性伤害时,取消之。②你的手牌上限+X(X为与你势力相同的角色数)。③当你失去装备区里的【太平要术】时,你摸两张牌,然后若你的体力值大于1,你失去1点体力。', yuxi_skill:'玉玺', yuxi_skill2:'玉玺', yuxi:'玉玺', - yuxi_info:'锁定技,若你有明置的武将牌,你的势力视为唯一的大势力;锁定技,摸牌阶段,若你有明置的武将牌,你多摸一张牌;锁定技,出牌阶段开始时,若你有明置的武将牌,你视为使用【知己知彼】', + yuxi_info:'锁定技。若你有明置的武将牌,则:①你的势力视为唯一的大势力。②摸牌阶段开始时,你令额定摸牌数+1。③出牌阶段开始时,你视为使用【知己知彼】', xietianzi:'挟令', - xietianzi_info:'出牌阶段,对自己使用。你结束出牌阶段,若如此做,弃牌阶段结束时,你可以弃置一张手牌,获得一个额外的回合', - xietianzi_info_guozhan:'出牌阶段,对为大势力角色的你使用。你结束出牌阶段,若如此做,弃牌阶段结束时,你可以弃置一张手牌,获得一个额外的回合', + xietianzi_info:'出牌阶段,对自己使用。你结束出牌阶段。本回合的弃牌阶段结束时,你可以弃置一张手牌,获得一个额外的回合。', + xietianzi_info_guozhan:'出牌阶段,对身为大势力角色的自己使用。你结束出牌阶段。本回合的弃牌阶段结束时,你可以弃置一张手牌,获得一个额外的回合。', shuiyanqijunx:'水淹七军', - shuiyanqijunx_info:'出牌阶段,对一名其他角色使用。目标角色选择一项:1、弃置装备区里的所有牌(至少一张);2、受到你造成的1点雷电伤害', - shuiyanqijunx_info_guozhan:'出牌阶段,对一名装备区里有牌的其他角色使用。目标角色选择一项:1、弃置装备区里的所有牌;2、受到你造成的1点雷电伤害', + shuiyanqijunx_info:'出牌阶段,对一名其他角色使用。目标角色选择一项:⒈弃置装备区里的所有牌(至少一张)。⒉受到你造成的1点雷电伤害', + shuiyanqijunx_info_guozhan:'出牌阶段,对一名装备区里有牌的其他角色使用。目标角色选择一项:⒈弃置装备区里的所有牌。⒉受到你造成的1点雷电伤害', lulitongxin:'勠力同心', - lulitongxin_info:'出牌阶段,对所有大势力角色或所有小势力角色使用。若目标角色:不处于“连环状态”,其横置;处于“连环状态”,其摸一张牌', - lulitongxin_info_versus:'出牌阶段,对所有敌方角色或所有己方角色使用。若目标角色:为敌方角色且不处于“连环状态”,其横置;为己方角色且处于“连环状态”,其摸一张牌。', + lulitongxin_info:'出牌阶段,对所有大势力角色或所有小势力角色使用。若目标角色:未横置,则其横置;已横置,则其摸一张牌。', + lulitongxin_info_versus:'出牌阶段,对所有己方角色或所有敌方角色使用。若目标角色:未横置,则其横置;已横置,则其摸一张牌。', lianjunshengyan:'联军盛宴', lianjunshengyan_info:'出牌阶段,对你和你选择的除你的势力外的一个势力的所有角色使用。若目标角色:为你,你选择摸Y张牌并回复X-Y点体力(X为该势力的角色数,Y∈[0,X]);不为你,其摸一张牌,然后重置。', lianjunshengyan_info_boss:'出牌阶段,对场上所有角色使用。你摸X张牌(X为存活角色数),其他角色依次选择回复1点体力或摸一张牌。', chiling:'敕令', - chiling_info:'出牌阶段,对所有没有势力的角色使用。目标角色选择一项:1、明置一张武将牌,然后摸一张牌;2、弃置一张装备牌;3、失去1点体力。当【敕令】因判定或弃置而置入弃牌堆时,系统将之移出游戏并将【诏书】置于牌堆底,然后系统于当前回合结束后视为对所有没有势力的角色使用【敕令】。', + chiling_info:'①出牌阶段,对所有没有势力的角色使用。目标角色选择一项:1、明置一张武将牌,然后摸一张牌;2、弃置一张装备牌;3、失去1点体力。②当【敕令】因判定或弃置而置入弃牌堆时,系统将之移出游戏并将【诏书】置于牌堆底,然后系统于当前回合结束后视为对所有没有势力的角色使用【敕令】。', diaohulishan:'调虎离山', diaohulishan_info:'出牌阶段,对至多两名其他角色使用。目标角色于此回合结束之前不计入距离的计算且不能使用牌且不是牌的合法目标且不能失去或回复体力或受到伤害。', huoshaolianying:'火烧连营', huoshaolianying_bg:'烧', - huoshaolianying_info_guozhan:'出牌阶段,对你的下家和与其处于同一队列的角色使用,每名角色受到一点火焰伤害', - huoshaolianying_info:'对离你最近的一名横置角色使用(若无横置角色则改为对距离你最近的所有角色使用),对目标造成一点火焰伤害', + huoshaolianying_info_guozhan:'出牌阶段,对你的下家及其队列中的所有角色使用。你对目标角色造成1点火属性伤害。', + huoshaolianying_info:'出牌阶段,对距离最小的一名横置角色使用(若无横置角色,则改为对距离最小的所有角色使用),你对目标造成1点火属性伤害。', yuanjiao:'远交近攻', - yuanjiao_info:'出牌阶段,对一名与你势力不同的角色使用。其摸一张牌,然后你摸三张牌。', + yuanjiao_info:'出牌阶段,对一名与你势力不同的其他角色使用。其摸一张牌,然后你摸三张牌。', + yuanjiao_info_guozhan:'出牌阶段,对一名与你势力不同且已确定势力的其他角色使用。其摸一张牌,然后你摸三张牌。', yuanjiao_bg:'交', zhibi:'知己知彼', - zhibi_info:'出牌阶段对一名其他角色使用,观看其手牌或武将牌', + zhibi_info:'出牌阶段,对一名有手牌或有暗置武将牌的其他角色使用。你选择一项:⒈观看其手牌。⒉观看其的一张暗置武将牌。', yiyi:'以逸待劳', - yiyi_info_guozhan:'对与自己势力相同的所有角色使用,摸两张牌然后弃置两张牌', - yiyi_info_combat:'对所有友方角色使用,摸两张牌然后弃置两张牌', - yiyi_info:'对与任意三名角色使用,摸两张牌然后弃置两张牌', + yiyi_info_guozhan:'出牌阶段,对所有己方角色使用。目标角色摸两张牌,然后弃置两张牌。', + yiyi_info_combat:'出牌阶段,对所有己方角色使用。目标角色摸两张牌,然后弃置两张牌。', + yiyi_info:'出牌阶段,对至多三名角色使用。目标角色摸两张牌,然后弃置两张牌。', yiyi_bg:'逸', wuliu:'吴六剑', - wuliu_info:'其他与装备者势力相同的角色攻击范围+1', + wuliu_info:'锁定技。与你势力相同的所有其他角色的攻击范围+1。', sanjian:'三尖两刃刀', - sanjian_info:'当你使用杀造成伤害后,可以弃置1张手牌对一名距离受伤害角色1以内的其他角色造成1点伤害', + sanjian_info:'当你因执行【杀】而对A造成伤害后,你可以弃置一张牌并选择一名其他角色B(A至B的距离需为1)。你对B造成1点伤害。', wuliu_skill:'吴六剑', sanjian_skill:'三尖两刃刀', jingfanma_bg:'-马', @@ -1862,7 +1863,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){ huxinjing_bg:'镜', huxinjing:'护心镜', huxinjing_info:'此牌可对其他角色使用。当你受到伤害时,若伤害值大于1或大于等于你的体力值,则你可以将【护心镜】置入弃牌堆,然后防止此伤害。', - huxinjing_info_guozhan:'当你受到伤害时,若伤害值大于或等于你的体力值,则你可以将【护心镜】置入弃牌堆,然后防止此伤害。', + huxinjing_info_guozhan:'当你受到伤害时,若伤害值大于等于你的体力值,则你可以将【护心镜】置入弃牌堆,然后防止此伤害。', gz_haolingtianxia:'号令天下', gz_haolingtianxia_info:'出牌阶段,对一名体力值不为全场最少的角色使用。所有其他角色依次选择一项:①弃置一张牌(魏势力角色无需弃牌),视为对目标角色使用一张【杀】;②弃置目标角色的一张牌(魏势力角色改为获得其一张牌)。', gz_kefuzhongyuan:'克复中原', @@ -1874,7 +1875,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){ zhaoshu:'诏书', zhaoshu_skill:'锦囊召唤', zhaoshu_global:'诏书', - zhaoshu_info:'
  • 出牌阶段,对你自己使用。你将此牌置于目标的武将牌上。
  • 与你势力相同的角色的出牌阶段限一次,其可以将一张手牌(小势力角色改为至多两张)置于【诏书】上,称为“应”。
  • 出牌阶段限一次,若你的“应”中包含至少四种花色,则你可以发动“锦囊召唤”,将所有“应”置入弃牌堆,然后随机获得一张未加入游戏的势力锦囊牌。', + zhaoshu_info:'
  • 出牌阶段,对你自己使用。你将此牌置于目标的武将牌上。
  • 与你势力相同的角色的出牌阶段限一次,其可以将一张手牌(小势力角色改为至多两张)置于【诏书】上,称为“应”。
  • 出牌阶段限一次,若你的“应”中包含至少四种花色,则你可以发动“锦囊召唤”:将所有“应”置入弃牌堆,然后随机获得一张未加入游戏的势力锦囊牌。', }, list:[ ['heart',9,'yuanjiao'], diff --git a/card/sp.js b/card/sp.js index 42a80d29e..748dece0e 100644 --- a/card/sp.js +++ b/card/sp.js @@ -152,6 +152,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){ return (lib.filter.judge(card,player,target)&&player==target); }, selectTarget:[-1,-1], + toself:true, judge:function(card){ if(get.suit(card)=='spade') return -6; return 0; @@ -279,8 +280,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){ player.chooseCard('h','将一张手牌交给'+get.translation(event.target1),true); } 'step 1' - player.$giveAuto(result.cards,event.target1); - event.target1.gain(result.cards,player); + player.give(result.cards,event.target1); 'step 2' if(!event.target1.countCards('h')){ event.finish(); @@ -298,8 +298,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){ if(!event.directresult){ event.directresult=result.cards; } - event.target1.$giveAuto(event.directresult,event.target2); - event.target2.gain(event.directresult,event.target1); + event.target1.give(event.directresult,event.target2); }, ai:{ order:2.5, diff --git a/card/standard.js b/card/standard.js index 2520be62b..5fd3b2774 100644 --- a/card/standard.js +++ b/card/standard.js @@ -401,10 +401,10 @@ game.import('card',function(lib,game,ui,get,ai,_status){ yingbian_tags:['gain','draw'], yingbian:function(event){ var bool=false; - if(get.cardtag(event.card,'yingbian_damage')){ + if(get.cardtag(event.card,'yingbian_gain')){ bool=true; var cardx=event.respondTo; - if(cardx&&cardx[1]&&cardx[1].cards&&cardx[1].cards.filterInD('od').length) player.gain(cardx[1].cards.filterInD('od'),'gain2','log'); + if(cardx&&cardx[1]&&cardx[1].cards&&cardx[1].cards.filterInD('od').length) event.player.gain(cardx[1].cards.filterInD('od'),'gain2','log'); } if(!bool||get.cardtag(event.card,'yingbian_draw')) event.player.draw(); }, @@ -1621,7 +1621,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){ "step 1" if(event.directfalse||result.bool==false){ var cards=target.getCards('e',{subtype:'equip1'}); - if(cards.length) player.gain(cards,target,'give'); + if(cards.length) player.gain(cards,target,'give','bySelf'); } }, ai:{ @@ -1774,6 +1774,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){ return (lib.filter.judge(card,player,target)&&player==target); }, selectTarget:[-1,-1], + toself:true, judge:function(card){ if(get.suit(card)=='spade'&&get.number(card)>1&&get.number(card)<10) return -5; return 1; @@ -2135,7 +2136,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){ direct:true, filter:function(event,player){ if(get.mode()=='guozhan'||!event.card||event.card.name!='sha') return false; - return event.target.isIn&&player.canUse('sha',event.target,false)&&(player.hasSha()||_status.connectMode&&player.countCards('h')); + return event.target.isIn()&&player.canUse('sha',event.target,false)&&(player.hasSha()||_status.connectMode&&player.countCards('h')); }, content:function(){ "step 0" @@ -2821,15 +2822,15 @@ game.import('card',function(lib,game,ui,get,ai,_status){ renwang_bg:'盾', hanbing_skill:'寒冰剑', renwang_skill:'仁王盾', - hanbing_info:'当你使用杀造成伤害时,你可以防止此伤害,改为依次弃置目标角色的两张牌。', - hanbing_skill_info:'当你使用杀造成伤害时,你可以防止此伤害,改为依次弃置目标角色的两张牌。', - renwang_info:'锁定技,黑色的杀对你无效', - renwang_skill_info:'锁定技,黑色的杀对你无效', + hanbing_info:'当你因执行【杀】的效果而造成伤害时,若目标角色有能被弃置的牌,则你可以防止此伤害,然后依次弃置目标角色的两张牌。', + hanbing_skill_info:'当你因执行【杀】的效果而造成伤害时,若目标角色有能被弃置的牌,则你可以防止此伤害,然后依次弃置目标角色的两张牌。', + renwang_info:'锁定技,黑色【杀】对你无效', + renwang_skill_info:'锁定技,黑色【杀】对你无效', sha_info:'出牌阶段,对你攻击范围内的一名角色使用。其须使用一张【闪】,否则你对其造成1点伤害。', shan_info:'抵消一张【杀】', - tao_info:'出牌阶段,对自己使用,回复一点体力。', - bagua_info:'当你需要使用或打出一张【闪】时,你可以进行一次判定,若判定结果为红色,视为你使用或打出了一张【闪】。', - bagua_skill_info:'当你需要使用或打出一张【闪】时,你可以进行一次判定,若判定结果为红色,视为你使用或打出了一张【闪】。', + tao_info:'①出牌阶段,对自己使用,目标角色一点体力。②当有角色处于濒死状态时,对该角色使用。目标角色回复1点体力。', + bagua_info:'当你需要使用或打出一张【闪】时,你可以进行判定。若结果为红色,则你视为使用或打出一张【闪】。', + bagua_skill_info:'当你需要使用或打出一张【闪】时,你可以进行判定。若结果为红色,则你视为使用或打出一张【闪】。', jueying_info:'锁定技,其他角色计算与你的距离+1。', dilu_info:'锁定技,其他角色计算与你的距离+1。', zhuahuang_info:'锁定技,其他角色计算与你的距离+1。', diff --git a/card/yingbian.js b/card/yingbian.js index 333c02564..b737d88d3 100644 --- a/card/yingbian.js +++ b/card/yingbian.js @@ -801,7 +801,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){ suijiyingbian:'随机应变', suijiyingbian_info:'此牌的牌名视为你本回合内使用或打出的上一张基本牌或普通锦囊牌的牌名。', zhujinqiyuan:'逐近弃远', - zhujinqiyuan_info:'出牌阶段,对一名有牌的其他角色使用。若你与其距离的大于1,你弃置其区域内的一张牌;若你与其的距离等于1,你获得其区域内的一张牌。', + zhujinqiyuan_info:'出牌阶段,对一名有牌的其他角色使用。若你至其距离的大于1,你弃置其区域内的一张牌。若你至其的距离等于1,你获得其区域内的一张牌。', dongzhuxianji:'洞烛先机', dongzhuxianji_info:'出牌阶段,对包含你在内的一名角色使用。目标角色卜算2,然后摸两张牌。', chuqibuyi:'出其不意', @@ -817,7 +817,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){ heiguangkai_info:'锁定技,当你成为【杀】或伤害类锦囊牌或黑色普通锦囊牌的目标后,若此牌的目标数大于1,则你令此牌对你无效。', tongque:'铜雀', tongque_skill:'铜雀', - tongque_info:'锁定技,你于一回合内使用的第一张带有【应变】效果的牌无视条件直接生效。', + tongque_info:'锁定技,你于一回合内使用的第一张带有“应变”效果的牌无视条件直接生效。', tianjitu:'天机图', tianjitu_skill:'天机图', tianjitu_info:'锁定技,当此牌进入你的装备区时,你弃置一张不为此【天机图】的牌。当此牌离开你的装备区后,你将手牌摸至五张。', diff --git a/card/yongjian.js b/card/yongjian.js index 89881f7c5..dc8047bf3 100644 --- a/card/yongjian.js +++ b/card/yongjian.js @@ -75,7 +75,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){ } else event.finish(); 'step 2' - if(result.index==0) player.gain(event.show_card,target,'give'); + if(result.index==0) player.gain(event.show_card,target,'give','bySelf'); else target.damage(); }, ai:{ @@ -106,12 +106,12 @@ game.import('card',function(lib,game,ui,get,ai,_status){ if(result.bool&&target.isIn()){ var num=result.cards.length,hs=player.getCards('h'); if(!hs.length) event.finish(); - else if(hs.length0&&get.attitude(viewer,player)>0){ + return 0; + } + }, result:{ target:function(player,target){ if(get.attitude(player,target)<=0) return ((target.countCards('he',function(card){ @@ -420,8 +425,9 @@ game.import('card',function(lib,game,ui,get,ai,_status){ discard:false, lose:false, delay:false, + equipSkill:true, content:function(){ - target.gain(cards,player,'giveAuto'); + player.give(cards,target); }, }, qixingbaodao:{ @@ -555,28 +561,30 @@ game.import('card',function(lib,game,ui,get,ai,_status){ } else if(!event.given){ if(_status.connectMode){ - game.broadcastAll(function(){delete _status.noclearcountdown}); - game.stopCountChoose(); + game.broadcastAll(function(){delete _status.noclearcountdown;game.stopCountChoose()}); } event.finish(); } 'step 3' if(_status.connectMode){ - game.broadcastAll(function(){delete _status.noclearcountdown}); - game.stopCountChoose(); + game.broadcastAll(function(){delete _status.noclearcountdown;game.stopCountChoose()}); } var logs=[]; + var map=[],cards=[]; for(var i in event.given_map){ var source=(_status.connectMode?lib.playerOL:game.playerMap)[i]; logs.push(source); - source.gain(event.given_map[i],player,'give'); + map.push([source,event.given_map[i]]); + cards.addArray(event.given_map[i]); } - logs.sortBySeat(); - event.next.sort(function(a,b){ - return lib.sort.seat(a.player,b.player); - }); + game.loseAsync({ + gain_list:map, + player:player, + cards:cards, + giver:player, + animate:'giveAuto', + }).setContent('gaincardMultiple'); player.logSkill('g_du_give',logs); - player.removeGaintag('du_given'); }, ai:{expose:0.1}, }, diff --git a/character/clan.js b/character/clan.js new file mode 100644 index 000000000..dfe73e46c --- /dev/null +++ b/character/clan.js @@ -0,0 +1,264 @@ +'use strict'; +game.import('character',function(lib,game,ui,get,ai,_status){ + return { + //clan n.宗派;(尤指苏格兰的)宗族,氏族,家族;庞大的家族;帮派;小集团 + name:'clan', + connect:true, + character:{ + clan_wuxian:['female','shu',3,['clanyirong','clanguixiang','clanmuyin'],['clan:陈留吴氏']], + clan_wuban:['male','shu',4,['clanzhanding','clanmuyin'],['clan:陈留吴氏']], + }, + characterSort:{ + clan:{ + clan_wu:['clan_wuxian','clan_wuban'], + }, + }, + skill:{ + //族吴班 + clanzhanding:{ + audio:2, + enable:'chooseToUse', + viewAsFilter:function(player){ + return player.countCards('hes')>0; + }, + viewAs:{name:'sha'}, + filterCard:true, + position:'hes', + selectCard:[1,Infinity], + check:function(card){ + return 6-ui.selected.cards.length-get.value(card); + }, + onuse:function(links,player){ + player.addTempSkill('clanzhanding_effect'); + }, + ai:{ + order:1, + respondSha:true, + skillTagFilter:function(player){ + return player.countCards('hes')>0; + }, + }, + subSkill:{ + effect:{ + trigger:{player:'useCardAfter'}, + forced:true, + popup:false, + filter:function(event,player){ + return event.skill=='clanzhanding'; + }, + content:function(){ + lib.skill.chenliuwushi.change(player,-1); + if(player.hasHistory('sourceDamage',function(evt){ + return evt.card==trigger.card; + })){ + var num1=player.countCards('h'),num2=player.getHandcardLimit(); + if(num1num2) return num1-num2; + return [0,1]; + }, + filterCard:function(card,player){ + var num1=player.countCards('h'),num2=player.getHandcardLimit(); + return num1>num2; + }, + check:function(card){ + return 6-ui.selected.cards.length-get.value(card); + }, + prompt:function(){ + var player=_status.event.player; + var num1=player.countCards('h'),num2=player.getHandcardLimit(); + var str=''; + if(num1>num2){ + str+=('弃置'+get.cnNumber(num1-num2)+'张牌,然后手牌上限+1。') + } + else{ + str+=('摸'+get.cnNumber(Math.min(5,num2-num1))+'张牌,然后手牌上限-1。'); + } + str+=('
    ※当前手牌上限:'+num2); + var num3=player.countMark('clanguixiang_count'); + if(num3>0){ + str+=(';阶段数:'+num3) + } + str+='
    '; + return str; + }, + content:function(){ + 'step 0' + if(cards.length){ + lib.skill.chenliuwushi.change(player,1); + event.finish(); + } + else{ + var num1=player.countCards('h'),num2=player.getHandcardLimit(); + if(num1num; + }); + }, + filter:function(event,player){ + return game.hasPlayer(function(current){ + return (current==player||current.hasClan('陈留吴氏'))&&!lib.skill.clanmuyin.isMax(current); + }); + }, + direct:true, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt('clanmuyin'),'令一名陈留吴氏角色的手牌上限+1',function(card,player,current){ + return (current==player||current.hasClan('陈留吴氏'))&&!lib.skill.clanmuyin.isMax(current); + }).set('ai',function(target){ + return get.attitude(_status.event.player,target); + }); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + player.logSkill('clanmuyin',target); + lib.skill.chenliuwushi.change(target,1); + game.delayx(); + } + }, + }, + chenliuwushi:{ + charlotte:true, + change:function(player,num){ + player.addSkill('chenliuwushi'); + var info=player.storage; + if(typeof info.chenliuwushi!='number') info.chenliuwushi=0; + info.chenliuwushi+=num; + if(info.chenliuwushi==0) player.unmarkSkill('chenliuwushi'); + else player.markSkill('chenliuwushi'); + if(num>=0) game.log(player,'的手牌上限','#y+'+num); + else game.log(player,'的手牌上限','#g'+num); + }, + mod:{ + maxHandcard:function(player,num){ + var add=player.storage.chenliuwushi; + if(typeof add=='number') return num+add; + }, + }, + markimage:'image/card/handcard.png', + intro:{ + content:function(num,player){ + var str='
  • 手牌上限'; + if(num>=0) str+='+'; + str+=num; + str+='
  • 当前手牌上限:'; + str+=player.getHandcardLimit(); + return str; + }, + }, + }, + }, + characterReplace:{ + wuban:['clan_wuban','wuban'], + }, + translate:{ + clan_wuxian:'族吴苋', + clanyirong:'移荣', + clanyirong_info:'出牌阶段限两次。若你的手牌数:小于X,则你可以将手牌摸至X张(至多摸五张),然后X-1;大于X,则你可以将手牌弃置至X张,然后X+1。(X为你的手牌上限)', + clanguixiang:'贵相', + clanguixiang_info:'锁定技。你的非出牌阶段开始前,若此阶段即将成为你本回合内的第X个阶段(X为你的手牌上限),则你终止此阶段,改为进行一个出牌阶段。', + clanmuyin:'穆荫', + clanmuyin_info:'宗族技。准备阶段,你可以选择一名手牌上限不为全场最多的陈留吴氏角色。该角色的手牌上限+1。', + chenliuwushi:'陈留·吴氏', + clan_wuban:'族吴班', + clanzhanding:'斩钉', + clanzhanding_info:'你可以将任意张牌当做【杀】使用。你以此法使用的【杀】结算结束后,你令你的手牌上限-1,然后若你因此【杀】造成过伤害,则你将手牌摸至体力上限(至多摸五张),否则你令此【杀】不计入次数限制。', + + clan_wu:'陈留·吴氏', + }, + }; +}); diff --git a/character/diy.js b/character/diy.js index ac5794bb1..84f4a0c6c 100755 --- a/character/diy.js +++ b/character/diy.js @@ -87,6 +87,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ key_kyou:['female','key',3,['kyou_zhidian','kyou_duanfa']], key_seira:['female','key',3,['seira_xinghui','seira_yuanying']], key_kiyu:['female','key',3,['kiyu_yuling','kiyu_xianyu']], + //key_tomoyo:['female','key',4,['tomoyo_wuwei','tomoyo_yingshou']], ns_huangchengyan:['male','shu',3,['nslongyue','nszhenyin']], ns_sunchensunjun:['male','wu',5,['nsxianhai','nsxingchu']], @@ -308,6 +309,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ key_kotarou:'#bb1154486224', key_seira:'#b阿开木木W🍀', key_kiyu:'#b无面◎隐者', + key_tomoyo:'#b长发及腰黑长直', ns_huangchengyan:'#g竹邀月', ns_sunchensunjun:'#gVenusjeu', @@ -530,6 +532,52 @@ game.import('character',function(lib,game,ui,get,ai,_status){ key_lucia:['key_shizuru'], }, skill:{ + //坂上智代 + tomoyo_wuwei:{ + enable:['chooseToUse','chooseToRespond'], + viewAs:{name:'sha'}, + viewAsFilter:function(player){ + var storage=player.getStorage('tomoyo_wuwei_mark'); + return player.hasCard(function(card){ + return !storage.contains(get.suit(card)); + },'hs'); + }, + position:'hs', + filterCard:function(card,player){ + var storage=player.getStorage('tomoyo_wuwei_mark'); + return !storage.contains(get.suit(card)); + }, + onuse:function(result,player){ + player.markAuto('tomoyo_wuwei_mark',[get.suit(result.card,false)]); + player.addTempSkill('tomoyo_wuwei_mark'); + }, + onrespond:function(event,player){ + player.markAuto('tomoyo_wuwei_mark',[get.suit(event.card,false)]); + player.addTempSkill('tomoyo_wuwei_mark'); + }, + group:'tomoyo_wuwei_combo', + subSkill:{ + mark:{ + charlotte:true, + onremove:true, + }, + combo:{ + trigger:{global:'useCardAfter'}, + direct:true, + filter:function(event,player){ + return player.inRangeOf(event.player)&&player.canUse('sha',event.player,false); + }, + content:function(){ + player.chooseToUse(get.prompt('tomoyo_wuwei',trigger.target),'对该角色使用一张【杀】',function(card,player,event){ + if(get.name(card)!='sha') return false; + return lib.filter.filterCard.apply(this,arguments); + },trigger.player,-1).set('addCount',false).logSkill='tomoyo_wuwei_combo'; + }, + }, + }, + }, + tomoyo_yingshou:{}, + tomoyo_changshi:{}, //天宫希优 kiyu_yuling:{ mod:{ @@ -802,7 +850,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ target.recover(); }, mark:true, - intro:{content:'skillinfo'}, + intro:{content:'你的手牌对其他“姻缘者”可见。出牌阶段限一次,你可以获得一名其他“姻缘者”区域内的一张牌,然后其回复1点体力。'}, ai:{ order:9, viewHandcard:true, @@ -1734,7 +1782,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } 'step 1' if(result.bool){ - trigger.player.gain(result.cards,player,'giveAuto'); + player.give(result.cards,trigger.player); } }, }, @@ -1966,11 +2014,21 @@ game.import('character',function(lib,game,ui,get,ai,_status){ group:['mia_qianmeng_achieve','mia_qianmeng_fail'], subSkill:{ achieve:{ - trigger:{global:'gainAfter'}, + trigger:{ + global:['gainAfter','loseAsyncAfter'], + }, forced:true, filter:function(event,player){ var card=player.storage.mia_qianmeng; - return card&&event.cards.contains(card)&&event.player.getCards('he').contains(card); + if(event.name=='gain'){ + var source=event.player,cards=event.getg(source); + return cards.contains(card)&&source.getCards('hejsx').contains(card); + } + else{ + if(event.type!='gain') return false; + var owner=get.owner(card); + return owner&&event.getg(owner).contains(card); + } }, skillAnimation:true, animationColor:'key', @@ -1978,7 +2036,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ 'step 0' game.log(player,'成功完成使命'); player.awakenSkill('mia_qianmeng'); - if(player!=trigger.player) player.gain(player.storage.mia_qianmeng,trigger.player,'give'); + var card=player.storage.mia_qianmeng,owner=get.owner(card); + if(owner&&owner!=player) owner.give(card,player); 'step 1' if(player.hp0){ player.chooseCard('he',true,'交给'+get.translation(target)+'一张牌'); } else event.finish(); 'step 3' - if(result.bool) target.gain(result.cards,player,'giveAuto'); + if(result.bool) player.give(result.cards,target); }, intro:{ content:'已与$共勉', @@ -2633,7 +2692,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ else event.finish(); 'step 3' if(result.bool&&result.cards&&result.cards.length){ - target.gain(result.cards,player,'giveAuto') + player.give(result.cards,target); } }, }, @@ -2671,7 +2730,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ else event.finish(); 'step 3' if(result.bool&&result.cards&&result.cards.length){ - target.gain(result.cards,player,'giveAuto') + player.give(result.cards,target); } }, }, @@ -4016,9 +4075,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }); 'step 1' if(result.bool){ - player.logSkill('hiroto_huyu',trigger.player); - player.gain(result.cards,trigger.player,'giveAuto'); - player.storage.hiroto_huyu2=trigger.player; + var target=trigger.player; + player.logSkill('hiroto_huyu',target); + target.give(result.cards,player); + player.storage.hiroto_huyu2=target; player.addSkill('hiroto_zonglve'); player.addSkill('hiroto_huyu2'); } @@ -4044,7 +4104,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ cards=cards.filter(function(card){ return he.contains(card); }); - if(cards.length) target.gain(cards,player,'giveAuto'); + if(cards.length) target.gain(cards,player,'giveAuto','bySelf'); } }, mark:'character', @@ -5929,7 +5989,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ event.target=target; player.logSkill('kamome_jieban',target); player.addTempSkill('kamome_jieban_phase'); - target.gain(result.cards,player,'giveAuto'); + player.give(result.cards,target); player.changeZhuanhuanji('kamome_jieban'); } else event.finish(); @@ -5953,7 +6013,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } else event.finish(); 'step 3' - player.gain(result.cards,target,'giveAuto'); + target.give(result.cards,player); }, }, kamome_jieban_phase:{charlotte:true}, @@ -6620,7 +6680,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(player.countCards('he')>0) player.chooseCard('he',true,'交给'+get.translation(target)+'一张牌'); else event.goto(3); 'step 2' - target.gain(result.cards,player,'giveAuto'); + player.give(result.cards,target); 'step 3' var history=game.getGlobalHistory('cardMove'); for(var i=0;i0; - return event.relatedLose&&event.relatedLose.hs&&event.relatedLose.hs.length>0; - }, - check:function(event,player){ - return get.attitude(player,event[event.name=='gain'?'source':'player'])>0&&get.attitude(player,_status.currentPhase)<=0; - }, - logTarget:function(event){ - return event[event.name=='gain'?'source':'player']; + else if(event.name=='lose'){ + if(event.type!='discard'||event.player==source||event.player.isDead()) return false; + if((event.discarder||event.getParent(2).player)==event.player) return false; + if(!event.getl(event.player).hs.length) return false; + return true; + } + else if(event.name=='gain'){ + if(event.giver||event.getParent().name=='_yongjian_zengyu') return false; + var cards=event.getg(event.player); + if(!cards.length) return false; + return game.hasPlayer(function(current){ + if(current==event.player||current==source) return false; + var hs=event.getl(current).hs; + for(var i of hs){ + if(cards.contains(i)) return true; + } + return false; + }); + } + else if(event.type=='gain'){ + if(event.giver||!event.player||event.player==source||event.player.isDead()) return false; + var hs=event.getl(event.player); + return game.hasPlayer(function(current){ + if(current==event.player) return false; + var cards=event.getg(current); + for(var i of cards){ + if(hs.contains(i)) return true; + } + }); + } + else if(event.type=='discard'){ + if(!event.discarder) return false; + return game.hasPlayer(function(current){ + return current!=source&¤t!=event.discarder&&event.getl(current).hs.length>0; + }); + } + return false; }, + direct:true, content:function(){ - "step 0" - event.target=trigger[trigger.name=='gain'?'source':'player']; - event.target.judge(); - "step 1" + 'step 0' + var targets=[],source=_status.currentPhase; + if(trigger.name=='gain'){ + var cards=trigger.getg(trigger.player); + targets.addArray(game.filterPlayer(function(current){ + if(current==trigger.player||current==source) return false; + var hs=trigger.getl(current).hs; + for(var i of hs){ + if(cards.contains(i)) return true; + } + return false; + })); + } + else if(trigger.name=='loseAsync'&&trigger.type=='discard'){ + targets.addArray(game.filterPlayer(function(current){ + return current!=trigger.discarder&¤t!=source&&trigger.getl(current).hs.length>0; + })); + } + else targets.push(trigger.player); + event.targets=targets.sortBySeat(); + if(!event.targets.length) event.finish(); + 'step 1' + var target=targets.shift(); + event.target=target; + if(target.isAlive()) player.chooseBool(get.prompt2('nagisa_fuxin',target)).set('ai',function(){ + var evt=_status.event.getParent(); + return get.attitude(evt.player,evt.target)>0&&get.attitude(evt.player,_status.currentPhase)<=0; + }); + else{ + if(targets.length>0) event.goto(1); + else event.finish(); + } + 'step 2' + if(result.bool){ + player.logSkill('nagisa_fuxin',target); + target.judge(); + } + else{ + if(targets.length>0) event.goto(1); + else event.finish(); + } + 'step 3' if(result.color=='red') target.draw(); - else if(_status.currentPhase&&_status.currentPhase.countCards('he')) _status.currentPhase.chooseToDiscard('he',true); + else{ + var source=_status.currentPhase; + if(source){ + source.chooseToDiscard('he',true); + } + } + if(targets.length>0) event.goto(1); }, ai:{expose:0.2}, }, @@ -7316,7 +7445,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(player.canUse(card,trigger.player,false)) player.useCard(card,trigger.player,false); } 'step 3' - if(result.bool) trigger.player.gain(result.cards,player,'giveAuto') + if(result.bool) player.give(result.cards,target); }, subSkill:{true:{charlotte:true},false:{charlotte:true}}, ai:{expose:0.2}, @@ -7365,7 +7494,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ event.gainner=event.giver==player?trigger.target:player; event.giver.chooseCard('he',true,'交给'+get.translation(event.gainner)+'一张牌'); 'step 1' - event.gainner.gain(result.cards,event.giver,'giveAuto'); + event.giver.give(result.cards,event.gainner); }, }, hinata_qiulve:{ @@ -7816,7 +7945,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, content:function(){ 'step 0' - target.gain(cards,player,'giveAuto'); + player.give(cards,target); target.addTempSkill('akane_yifu3','phaseUseEnd'); target.draw(); 'step 1' @@ -7825,7 +7954,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }); else event.finish(); 'step 2' - player.gain(result.cards,target,'giveAuto'); + target.give(result.cards,player); }, ai:{ expose:0.3, @@ -9549,7 +9678,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ logTarget:'player', content:function(){ 'step 0' - player.gain(trigger.player.getCards('j'),trigger.player,'give'); + player.gain(trigger.player.getCards('j'),trigger.player,'give','bySelf'); 'step 1' if(player.hp>1) player.loseHp(); }, @@ -9595,9 +9724,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ delay:0, content:function(){ 'step 0' - target.gain(cards,player,'give'); + player.give(cards,target); 'step 1' - target.chooseUseTarget(cards[0],game.filterPlayer(function(current){ + if(!target.getCards('h').contains(cards[0])) event._result={bool:false}; + else target.chooseUseTarget(cards[0],game.filterPlayer(function(current){ return current!=player; }),'请使用得到的牌,或者跳过下回合的判定阶段和摸牌阶段'); 'step 2' @@ -9905,7 +10035,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ var stat=player.getStat(); if(!stat.noname_zhuyuan) stat.noname_zhuyuan=[]; stat.noname_zhuyuan.push(target); - target.gain(cards,player,'giveAuto'); + player.give(cards,target,'visible'); "step 1" game.log(player,'获得了技能','#g【铁骑】'); player.addTempSkill('noname_retieji',{player:'phaseAfter'}); @@ -10131,7 +10261,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, content:function(){ 'step 0' - target.gain(cards,player,'give'); + player.give(cards,target,'visible'); if(get.type(cards[0],player)!='basic'){ player.draw(); event.finish(); @@ -10326,7 +10456,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ else event.finish(); 'step 2' if(result.bool){ - trigger.target.gain(result.cards,target,'giveAuto'); + target.gain(result.cards,trigger.target); target.damage(); } else{ @@ -10451,11 +10581,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ nsdiewu:{ trigger:{ player:['damageEnd','gainAfter'], + global:'loseAsyncAfter', }, forced:true, locked:false, filter:function(event,player){ - if(event.name=='gain') return event.cards&&event.cards.length>1; + if(event.name!='damage') return event.getg(player).length>1; return true; }, content:function(){ @@ -10810,7 +10941,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player.logSkill('nsxingchu',target); player.awakenSkill('nsxingchu'); var he=trigger.player.getCards('he'); - if(he.length) target.gain(he,trigger.player,'giveAuto'); + if(he.length) target.gain(he,trigger.player,'giveAuto','bySelf'); target.gainMaxHp(); } }, @@ -11176,7 +11307,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }).set('att',get.attitude(target,player)>0); 'step 2' if(result.bool){ - player.gain(result.cards,target,'give'); + target.give(result.cards,player,'visible'); } else{ player.addTempSkill('junktaoluan3'); @@ -17010,6 +17141,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ kiyu_yuling_info:'锁定技。你不是有距离限制的锦囊牌的合法目标;你成为【杀】的目标后,使用者需弃置X张牌(X为其至你的距离)。', kiyu_xianyu:'先预', kiyu_xianyu_info:'每轮限一次。一名角色的出牌阶段开始时,你可观看其手牌并预测其使用这些牌的顺序。此出牌阶段结束时,你摸X张牌,且其本回合的手牌上限+X(X为你的预测与其实际使用顺序的吻合数且至多为3)。', + key_tomoyo:'坂上智代', + tomoyo_wuwei:'武威', + tomoyo_wuwei_info:'①每回合每种花色限一次。你可以将一张手牌当做【杀】使用或打出。②当有角色使用【闪】后,若你在其攻击范围内,你可以对其使用一张【杀】(无距离限制)。', + /*tomoyo_yingshou:'樱守', + tomoyo_yingshou_info:'', + tomoyo_changshi:'长誓', + tomoyo_changshi_info:'',*/ noname:"小无", noname_zhuyuan:"祝愿", diff --git a/character/extra.js b/character/extra.js index d9445b92b..d6208493c 100755 --- a/character/extra.js +++ b/character/extra.js @@ -13,7 +13,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ extra_yin:['shen_liubei','shen_luxun'], extra_lei:['shen_ganning','shen_zhangliao'], extra_key:['key_kagari','key_shiki','db_key_hina'], - extra_decade:['shen_jiangwei','shen_machao'], + extra_decade:['shen_jiangwei','shen_machao','shen_zhangfei'], extra_ol:['ol_zhangliao','shen_caopi','shen_zhenji','shen_sunquan'], extra_mobilezhi:['shen_guojia','shen_xunyu'], extra_mobilexin:['shen_taishici','shen_sunce'], @@ -22,6 +22,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, character:{ + shen_zhangfei:['male','shen',4,['shencai','xunshi'],['shu']], tw_shen_guanyu:['male','shen',4,['twwushen','twwuhun'],['shu']], shen_machao:['male','shen',4,['shouli','hengwu'],['shu']], shen_sunquan:['male','shen',4,['dili','yuheng'],['wei']], @@ -71,6 +72,305 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, skill:{ + shencai:{ + audio:2, + enable:'phaseUse', + usable:5, + filter:function(event,player){ + var count=player.getStat('skill').shencai; + if(count&&count>player.countMark('shencai')) return false; + return true; + }, + filterTarget:lib.filter.notMe, + onremove:true, + prompt:'选择一名其他角色进行地狱审判', + content:function(){ + var next=target.judge(); + next.callback=lib.skill.shencai.contentx; + }, + ai:{ + order:8, + result:{target:-1}, + }, + contentx:function(){ + var card=event.judgeResult.card; + var player=event.getParent(2).player; + var target=event.getParent(2).target; + var list=[],str=lib.skill.shencai.getStr(card); + for(var i in lib.skill.shencai.filterx){ + if(str.indexOf(lib.skill.shencai.filterx[i])!=-1) list.push('shencai_'+i); + } + if(list.length){ + if(get.position(card,true)=='o') player.gain(card,'gain2'); + for(var i in lib.skill.shencai.filterx){ + var num=target.countMark('shencai_'+i); + if(num>0){ + target.removeMark('shencai_'+i,num); + target.removeSkill('shencai_'+i); + } + } + if(target.isIn()){ + for(var i of list){ + target.addSkill(i); + target.addMark(i,1); + } + } + } + else if(target.isIn()){ + player.gainPlayerCard(target,true,'hej'); + target.addMark('shencai_death',1); + target.addSkill('shencai_death'); + } + }, + filterx:{ + losehp:'体力', + weapon:'武器', + respond:'打出', + distance:'距离', + }, + getStr:function(node){ + var str='',name=node.name; + if(lib.translate[name+'_info']){ + if(lib.card[name].type&&lib.translate[lib.card[name].type]) str+=(''+get.translation(lib.card[name].type)+'牌|'); + if(get.subtype(name)){ + str+=(''+get.translation(get.subtype(name))+'|'); + } + if(lib.card[name]&&lib.card[name].addinfomenu){ + str+=(''+lib.card[name].addinfomenu+'|'); + } + if(get.subtype(name)=='equip1'){ + var added=false; + if(lib.card[node.name]&&lib.card[node.name].distance){ + var dist=lib.card[node.name].distance; + if(dist.attackFrom){ + added=true; + str+=('攻击范围:'+(-dist.attackFrom+1)+'|'); + } + } + if(!added){ + str+=('攻击范围:1|'); + } + } + } + if(lib.card[name].cardPrompt){ + str+=(''+lib.card[name].cardPrompt(node)+'|'); + } + else if(lib.translate[name+'_info']){ + str+=(''+lib.translate[name+'_info']+'|'); + } + if(lib.card[name].yingbian_prompt&&get.is.yingbian(node)){ + if(typeof lib.card[name].yingbian_prompt=='function') str+=('应变:'+lib.card[name].yingbian_prompt(node)+'|'); + else str+=('应变:'+lib.card[name].yingbian_prompt+'|'); + } + return str; + }, + subSkill:{ + losehp:{ + charlotte:true, + marktext:'笞', + trigger:{player:'damageEnd'}, + forced:true, + content:function(){ + player.loseHp(trigger.num); + }, + ai:{ + effect:{ + target:function(card,player,target,current){ + if(get.tag(card,'damage')&¤t<0) return 1.6; + }, + }, + }, + intro:{ + name:'神裁 - 体力', + name2:'笞', + content:'锁定技。当你受到伤害后,你失去等量的体力。', + onunmark:true, + }, + }, + weapon:{ + charlotte:true, + marktext:'杖', + trigger:{target:'useCardToTargeted'}, + forced:true, + filter:function(event,player){ + return event.card.name=='sha'; + }, + content:function(){ + trigger.directHit.add(player); + game.log(player,'不可响应',trigger.card); + }, + intro:{ + name:'神裁 - 武器', + name2:'杖', + content:'锁定技。当你成为【杀】的目标后,你不能使用牌响应此【杀】。', + onunmark:true, + }, + global:'shencai_weapon_ai', + }, + ai:{ + ai:{ + directHit_ai:true, + skillTagFilter:function(player,tag,arg){ + if(!arg||!arg.card||arg.card.name!='sha') return false; + if(!arg.target||!arg.target.hasSkill('shencai_weapon')) return false; + return true; + }, + }, + }, + respond:{ + charlotte:true, + marktext:'徒', + trigger:{ + player:'loseAfter', + global:['equipAfter','addJudgeAfter','gainAfter','loseAsyncAfter','addToExpansionAfter'], + }, + forced:true, + filter:function(event,player){ + if(!player.hasCard(function(card){ + return lib.filter.cardDiscardable(card,player,'shencai_respond'); + },'h')) return false; + var evt=event.getParent('shencai_respond'); + if(evt&&evt.player==player) return false; + evt=event.getl(player); + return evt&&evt.hs&&evt.hs.length>0; + }, + content:function(){ + var cards=player.getCards('h',function(card){ + return lib.filter.cardDiscardable(card,player,'shencai_respond'); + }); + if(cards.length>0) player.discard(cards.randomGet()); + }, + intro:{ + name:'神裁 - 打出', + name2:'徒', + content:'锁定技。当你失去手牌后,你随机弃置一张手牌(不嵌套触发)。', + onunmark:true, + }, + }, + distance:{ + charlotte:true, + marktext:'流', + trigger:{player:'phaseJieshuBegin'}, + forced:true, + content:function(){ + player.turnOver(); + }, + intro:{ + name:'神裁 - 距离', + name2:'流', + content:'锁定技。结束阶段开始时,你翻面。', + onunmark:true, + }, + }, + death:{ + charlotte:true, + marktext:'死', + mod:{ + maxHandcard:function(player,num){ + return num-player.countMark('shencai_death'); + }, + }, + trigger:{player:'phaseEnd'}, + forced:true, + filter:function(event,player){ + return player.countMark('shencai_death')>game.countPlayer(); + }, + content:function(){ + player.die(); + }, + intro:{ + name:'神裁 - 死', + name2:'死', + content:'锁定技。你的角色手牌上限-#;回合结束时,若场上存活人数小于#,则你死亡。', + onunmark:true, + }, + }, + }, + intro:{ + content:'发动次数上限+#', + }, + }, + xunshi:{ + audio:2, + mod:{ + cardname:function(card){ + if(lib.skill.xunshi.isXunshi(card)) return 'sha'; + }, + cardnature:function(card){ + if(lib.skill.xunshi.isXunshi(card)) return false; + }, + suit:function(card){ + if(lib.skill.xunshi.isXunshi(card)) return 'none'; + }, + targetInRange:function(card){ + if(get.color(card)=='none') return true; + }, + cardUsable:function(card){ + if(get.color(card)=='none') return Infinity; + }, + }, + isXunshi:function(card){ + var info=lib.card[card.name]; + if(!info||(info.type!='trick'&&info.type!='delay')) return false; + if(info.notarget) return false; + if(info.selectTarget!=undefined){ + if(Array.isArray(info.selectTarget)){ + if(info.selectTarget[0]<0) return !info.toself; + return info.selectTarget[0]!=1||info.selectTarget[1]!=1; + } + else{ + if(info.selectTarget<0) return !info.toself; + return info.selectTarget!=1; + } + } + return false; + }, + trigger:{player:'useCard2'}, + forced:true, + filter:function(event,player){ + return get.color(event.card)=='none'; + }, + content:function(){ + 'step 0' + if(player.countMark('shencai')<4&&player.hasSkill('shencai',null,null,false)) player.addMark('shencai',1,false); + if(trigger.addCount!==false){ + trigger.addCount=false; + var stat=player.getStat().card,name=trigger.card.name; + if(typeof stat[name]=='number') stat[name]--; + } + var info=get.info(trigger.card); + if(info.allowMultiple==false) event.finish(); + else if(trigger.targets&&!info.multitarget){ + if(!game.hasPlayer(function(current){ + return !trigger.targets.contains(current)&&lib.filter.targetEnabled2(trigger.card,player,current); + })) event.finish(); + } + else event.finish(); + 'step 1' + var prompt2='为'+get.translation(trigger.card)+'增加任意个目标' + player.chooseTarget(get.prompt('xunshi'),function(card,player,target){ + var player=_status.event.player; + return !_status.event.targets.contains(target)&&lib.filter.targetEnabled2(_status.event.card,player,target); + },[1,Infinity]).set('prompt2',prompt2).set('ai',function(target){ + var trigger=_status.event.getTrigger(); + var player=_status.event.player; + return get.effect(target,trigger.card,player,player); + }).set('card',trigger.card).set('targets',trigger.targets); + 'step 2' + if(result.bool){ + if(!event.isMine()&&!event.isOnline()) game.delayx(); + event.targets=result.targets; + } + else{ + event.finish(); + } + 'step 3' + if(event.targets){ + player.line(event.targets,'fire'); + trigger.targets.addArray(event.targets); + } + }, + }, twwushen:{ mod:{ cardname:function(card,player,name){ @@ -529,7 +829,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ var card=result.cards[0]; var num=get.number(card); if([1,11,12,13].contains(num)){ - if(lib.filter.canBeGained(card,player,target)) player.gain(card,target,'give'); + if(lib.filter.canBeGained(card,player,target)) player.gain(card,target,'give','bySelf'); } else if(lib.filter.canBeDiscarded(card,player,target)) target.discard(card); } @@ -1508,7 +1808,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ var target=result.targets[0]; //player.logSkill('pinghe',target); player.line(target,'green'); - target.gain(result.cards,player,'giveAuto'); + player.give(result.cards,target); trigger.cancel(); player.loseMaxHp(); if(player.hasSkill('yingba')){ @@ -2369,7 +2669,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ event.finish(); } 'step 3' - if(result.bool&&result.cards&&result.cards.length) player.gain(result.cards,target,'give'); + if(result.bool&&result.cards&&result.cards.length) target.give(result.cards,player,'give'); }, }, //Connect Mode support after Angel Beats! -2nd beat- @@ -2401,27 +2701,32 @@ game.import('character',function(lib,game,ui,get,ai,_status){ multitarget:true, multiline:true, delay:false, + discard:false, + lose:false, check:function(card){ return 6-get.value(card); }, targetprompt:['拼点发起人','拼点目标'], content:function(){ 'step 0' - player.showCards(cards); - 'step 1' - var target=targets[0]; - targets.sortBySeat(); - if(target!=targets[0]) cards.reverse(); + var list=[]; for(var i=0;i0; @@ -6663,7 +6663,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ var target=result.targets[0]; target.logSkill('mjchenshi'); player.line(target,'green'); - target.gain(result.cards,player,'giveAuto'); + player.give(result.cards,target); trigger.getParent().mjchenshi_ai=true; } else event.finish(); @@ -6728,7 +6728,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ var target=result.targets[0]; target.logSkill('mjchenshi'); player.line(target,'green'); - target.gain(result.cards,player,'giveAuto'); + player.give(result.cards,target); } else event.finish(); 'step 2' @@ -7272,7 +7272,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ lose:false, delay:false, content:function(){ - target.gain(player,cards,'giveAuto'); + player.give(cards,target); }, check:function(card){ return 5-get.value(card); @@ -7404,7 +7404,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ content:function(){ player.addTempSkill('hxrenshi2','phaseUseEnd'); player.markAuto('hxrenshi2',targets); - target.gain(cards,player,'giveAuto'); + player.give(cards,target); }, ai:{ order:1, @@ -7540,7 +7540,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }); 'step 2' if(result.index+event.addIndex==0){ - player.gain(target.getCards('he').randomGet(),'giveAuto',target); + target.give(target.getCards('he').randomGet(),player); event.finish(); } else player.gain(card,'gain2'); @@ -7645,7 +7645,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ target.equip(cards[0]); } else{ - target.gain(cards,player,'giveAuto'); + player.give(cards,target); } player.gainPlayerCard(target,cards.length==2?'e':'h',true); }, @@ -7685,7 +7685,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ var target=trigger.player; player.logSkill('sheyi',target); player.addTempSkill('sheyi2','roundStart'); - target.gain(result.cards,player,'giveAuto'); + player.give(result.cards,target); trigger.cancel(); } }, @@ -7766,7 +7766,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ var target=result.targets[0]; event.target=target; player.logSkill('rejieyue',target); - target.gain(result.cards,player,'giveAuto'); + player.give(result.cards,target); } else event.finish(); 'step 2' @@ -8065,7 +8065,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return 8-get.value(card); }, content:function(){ - target.gain(cards,player,'giveAuto'); + player.give(cards,target); if(!target.storage.mouli2) target.storage.mouli2=[]; if(!target.storage.mouli3) target.storage.mouli3=[]; target.storage.mouli2.add(player); @@ -9659,7 +9659,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, content:function(){ 'step 0' - target.gain(cards,player,'give'); + player.give(cards,target,true); 'step 1' if(!target.isIn()){ event.finish(); @@ -9754,7 +9754,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }); 'step 1' if(!result.bool) trigger.player.loseHp(); - else player.gain(result.cards,trigger.player,'giveAuto'); + else trigger.player.give(result.cards,player); }, }, shameng:{ @@ -10032,7 +10032,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } "step 2" if(result.bool){ - player.gain(result.cards,event.target,'give'); + target.give(result.cards,player); game.delay(); } else{ @@ -10267,7 +10267,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(result.bool){ var target=result.targets[0]; player.line(target); - target.gain(card,player,'giveAuto'); + player.give(card,target); } }, mod:{ @@ -10660,14 +10660,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{global:['loseAfter','useCard','phaseAfter','cardsDiscardAfter','loseAsyncAfter']}, filter:function(event,player){ if(event.player&&event.player!=player.storage.jinglve2) return false; - if(event.name=='phase') return event.player.getCards('hej').contains(player.storage.jinglve3); - if(!event.cards.contains(player.storage.jinglve3)) return false; - if(event.name=='lose'&&event.getlx===false) return false; - else if(event.name=='loseAsync'&&event.position==ui.discardPile){ - var evt=event.getl(player.storage.jinglve2); - if(!evt.cards.contains(player.storage.jinglve3)) return false; - } - return event.name=='useCard'||get.position(player.storage.jinglve3,true)=='d'||event.position==ui.discardPile; + var card=player.storage.jinglve3; + if(event.name=='phase') return event.player.getCards('hej').contains(card); + if(event.name=='useCard') return event.cards.contains(card); + return (get.position(card,true)=='d'&&event.getd().contains(card)); }, forced:true, charlotte:true, @@ -10679,7 +10675,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } else{ if(trigger.name=='phase'){ - player.gain(player.storage.jinglve3,trigger.player,'giveAuto'); + player.gain(player.storage.jinglve3,trigger.player,'giveAuto','bySelf'); } else if(get.position(player.storage.jinglve3,true)=='d') player.gain(player.storage.jinglve3,'gain2'); } @@ -11440,7 +11436,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(result.bool){ if(result.targets.length){ event.target=result.targets[0]; - event.target.gain(result.cards,player,'giveAuto'); + player.give(result.cards,event.target); event.card=result.cards[0]; } else{ @@ -12075,7 +12071,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } else event.finish(); 'step 3' - target.gain(result.cards,player,'giveAuto'); + player.give(result.cards,target); }, }, shuaiyan:{ @@ -12112,7 +12108,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player.line(target,'green'); target.chooseCard('he',true,'交给'+get.translation(player)+'一张牌'); 'step 3' - player.gain(result.cards,target,'giveAuto') + target.give(result.cards,player); }, }, relihuo:{ @@ -12720,9 +12716,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, logTarget:'player', content:function(){ - "step 0" + 'step 0' event.cards=game.cardsGotoOrdering(get.cards(3)).cards; - "step 1" + if(_status.connectMode) game.broadcastAll(function(){_status.noclearcountdown=true}); + event.given_map={}; + 'step 1' if(event.cards.length>1){ player.chooseCardButton('周旋:请选择要分配的牌',true,event.cards,[1,event.cards.length]).set('ai',function(button){ if(ui.selected.buttons.length==0) return 1; @@ -12735,13 +12733,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ else{ event.finish(); } - "step 2" + 'step 2' if(result.bool){ - for(var i=0;i0) event.goto(1); + 'step 4' + if(_status.connectMode){ + game.broadcastAll(function(){delete _status.noclearcountdown;game.stopCountChoose()}); + } + var list=[]; + for(var i in event.given_map){ + var source=(_status.connectMode?lib.playerOL:game.playerMap)[i]; + player.line(source,'green'); + list.push([source,event.given_map[i]]); + } + game.loseAsync({ + gain_list:list, + giver:player, + animate:'draw', + }).setContent('gaincardMultiple'); }, }, reshanxi:{ @@ -13071,12 +13082,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ content:function(){ 'step 0' var cards=player.getExpansions('xinqingjian2'); - player.chooseTarget(true,lib.filter.notMe).set('createDialog',['清俭:选择一名角色获得这些牌'+(cards.length>1?',然后摸一张牌':''),cards]); + player.chooseTarget(true,lib.filter.notMe).set('createDialog',['清俭:将这些牌交给一名角色'+(cards.length>1?',然后摸一张牌':''),cards]); 'step 1' if(result.bool){ var target=result.targets[0]; player.line(target,'thunder'); - if(target.gain(player.getExpansions('xinqingjian2'),player,'giveAuto').cards.length>1) player.draw(); + if(player.give(player.getExpansions('xinqingjian2'),target).cards.length>1) player.draw(); } 'step 2' player.removeSkill('xinqingjian2'); @@ -13634,18 +13645,25 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, discard:false, lose:false, - delay:0, + delay:false, content:function(){ var targets=game.filterPlayer(function(current){ return current!=player; }).randomGets(cards.length); + var map=[]; for(var i=0;i0 }; @@ -15584,7 +15602,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ types.add(get.type(cards[i],'trick')); } player.logSkill('yirang',target); - target.gain(cards,player,'give'); + player.give(cards,target); player.gainMaxHp(target.maxHp-player.maxHp,true); player.recover(types.length); game.delay(); @@ -16261,7 +16279,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player.draw(player.maxHp-player.countCards('h')); } else{ - target.gain(cards,player,'giveAuto'); + player.give(cards,target); } }, ai:{ @@ -16583,6 +16601,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ wujing:['tw_wujing','wujing'], sunru:['dc_sunru','sunru'], zhouchu:['jin_zhouchu','zhouchu'], + liuye:['dc_liuye','liuye'], }, translate:{ liuzan:'手杀留赞', @@ -16810,7 +16829,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ chendeng:'手杀陈登', zhouxuan:'周旋', zhouxuan2:'周旋', - zhouxuan_info:'出牌阶段限一次,你可以弃置一张牌并指定一名角色,然后选择一个基本牌的名称或非基本牌的类型。其使用或打出下一张牌时,若此牌的名称或类型和你选择的相同,则你观看牌堆顶的三张牌,然后将这些牌分配给任意角色。', + zhouxuan_info:'出牌阶段限一次,你可以弃置一张牌并指定一名角色,然后选择一个基本牌的名称或非基本牌的类型。其使用或打出下一张牌时,若此牌的名称或类型和你选择的相同,则你观看牌堆顶的三张牌,然后将这些牌以任意分割方式交给任意名角色。', fengji:'丰积', fengji_info:'锁定技,回合结束时,你记录你的手牌数。准备阶段开始时,若你的手牌数不小于你记录的手牌数,则你摸两张牌且本回合手牌上限为体力上限。', re_guanqiujian:'手杀毌丘俭', @@ -17424,6 +17443,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ buxu_backup:'补叙', buxu_info:'出牌阶段,若你的“六经”中有空缺的位置,则你可以弃置X+1张牌并选择一种空缺的“六经”。系统从牌堆或弃牌堆中检索一张对应的牌,然后你将此牌置于你武将牌上,填补“六经”的对应位置。', re_dianwei:"手杀典韦", + liuye:'手杀刘晔', mobile_standard:'手杀异构·标准包', mobile_shenhua:'手杀异构·神话再临', diff --git a/character/offline.js b/character/offline.js index 9f4c54c43..e48c0ca06 100644 --- a/character/offline.js +++ b/character/offline.js @@ -149,20 +149,24 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, yjyibing:{ - trigger:{player:'gainAfter'}, + trigger:{ + player:'gainAfter', + global:'loseAsyncAfter', + }, direct:true, filter:function(event,player){ if(event.getParent().name=='_yongjian_zengyu') return false; - var evt=event.getParent('phaseDraw'),hs=player.getCards('h'); - return (!evt||evt.player!=player)&&event.cards.filter(function(card){ + var evt=event.getParent('phaseDraw'),hs=player.getCards('h'),cards=event.getg(player); + return cards.length>0&&(!evt||evt.player!=player)&&cards.filter(function(card){ return hs.contains(card)&&game.checkMod(card,player,'unchanged','cardEnabled2',player)!==false; - }).length==event.cards.length&&player.hasUseTarget({ + }).length==cards.length&&player.hasUseTarget({ name:'sha', cards:event.cards, },false); }, content:function(){ - player.chooseUseTarget(get.prompt('yjyibing'),'将'+get.translation(trigger.cards)+'当做【杀】使用','sha',trigger.cards,false,'nodistance').logSkill='yjyibing'; + var cards=trigger.getg(player); + player.chooseUseTarget(get.prompt('yjyibing'),'将'+get.translation(cards)+'当做【杀】使用','sha',cards,false,'nodistance').logSkill='yjyibing'; }, }, //龙羽飞 @@ -334,7 +338,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ delete player.storage.jsprende; }); } - target.gain(cards,player,'giveAuto'); + player.give(cards,target); if(typeof player.storage.jsprende!='number'){ player.storage.jsprende=0; } @@ -482,7 +486,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(result.bool){ var target2=result.targets[0]; target.line(target2,'green'); - target2.gain(target,card,'giveAuto','bySelf'); + target2.gain(target,card,'giveAuto').giver=player; } else event.finish(); 'step 3' @@ -1484,20 +1488,25 @@ game.import('character',function(lib,game,ui,get,ai,_status){ xinmanjuan:{ audio:'manjuan', forced:true, - priority:15, - trigger:{player:'gainAfter'}, + trigger:{ + player:'gainAfter', + global:'loseAsyncAfter', + }, filter:function(event,player){ - return event.type!='xinmanjuan'; + var hs=player.getCards('h'); + return event.type!='xinmanjuan'&&event.getg(player).filter(function(card){ + return hs.contains(card); + }).length>0; }, content:function(){ "step 0" - player.lose(trigger.cards,ui.discardPile,'visible'); - player.$throw(trigger.cards,1000); - game.log(player,'将',trigger.cards,'置入了弃牌堆') - "step 1" - event.cards=trigger.cards.slice(0); + var hs=player.getCards('h'),cards=trigger.getg(player).filter(function(card){ + return hs.contains(card); + }); + event.cards=cards; + player.loseToDiscardpile(cards); if(_status.currentPhase!=player) event.finish(); - "step 2" + "step 1" event.card=event.cards.shift(); event.togain=[]; var number=get.number(event.card); @@ -1506,15 +1515,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if((!trigger.cards.contains(current))&&get.number(current)==number) event.togain.push(current); } if(!event.togain.length) event.goto(5); - "step 3" + "step 2" player.chooseButton(['是否获得其中的一张牌?',event.togain]).ai=function(button){ return get.value(button.link); }; - "step 4" + "step 3" if(result.bool){ player.gain(result.links[0],'gain2').type='xinmanjuan'; } - "step 5" + "step 4" if(event.cards.length) event.goto(2); }, ai:{ @@ -1860,7 +1869,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ 'step 5' if(event.cards){ player.line(result.targets,'green'); - result.targets[0].gain(event.cards,'gain2'); + result.targets[0].gain(event.cards,'gain2').giver=player; game.log(player,'将',event.cards,'交给',result.targets[0]); event.finish(); } @@ -2299,7 +2308,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player.storage.shichou=true; player.logSkill('shichou',target); player.awakenSkill('shichou'); - target.gain(cards,player,'giveAuto'); + player.give(cards,target); player.storage.shichou_target=target; player.addSkill('shichou2'); target.markSkillCharacter('shichou',player,'誓仇','代替'+get.translation(player)+'承受伤害直到首次进入濒死状态'); diff --git a/character/rank.js b/character/rank.js index 66811c563..84e99efe1 100644 --- a/character/rank.js +++ b/character/rank.js @@ -102,6 +102,8 @@ window.noname_character_rank={ 'shen_guojia', 'yangyan', 'liuhui', + 'luyi', + 'shen_zhangfei', 'key_kamome', 'key_yukine', 'key_inari', @@ -534,6 +536,8 @@ window.noname_character_rank={ 'dukui', 'quanhuijie', 'yinfuren', + 'dc_zhaoyǎn', + 'clan_wuxian', ], bp:[ 'chess_diaochan', @@ -826,6 +830,8 @@ window.noname_character_rank={ 'dc_huban', 'dingshangwan', 're_zhuhuan', + 'dc_liuye', + 'zhugeshang', ], b:[ 'diy_feishi', @@ -1069,6 +1075,7 @@ window.noname_character_rank={ 'dengzhong', 'dc_liru', 'kebineng', + 'wangwei', ], bm:[ 'diy_xizhenxihong', @@ -1305,6 +1312,7 @@ window.noname_character_rank={ 'duji', 'bianxi', 'junk_sunquan', + 'clan_wuban', ], rarity:{ legend:[ @@ -1430,6 +1438,9 @@ window.noname_character_rank={ 'tw_shen_guanyu', 'huojun', 'quanhuijie', + 'clan_wuxian', + 'luyi', + 'shen_zhangfei', 'key_tomoya', 'key_masato', 'key_shiorimiyuki', @@ -2057,6 +2068,9 @@ window.noname_character_rank={ 'dingshangwan', 're_zhuhuan', 'yinfuren', + 'dc_liuye', + 'dc_zhaoyǎn', + 'zhugeshang', ], junk:[ 'sunshao', @@ -2081,6 +2095,7 @@ window.noname_character_rank={ 'dc_liuba', 'bianxi', 'junk_sunquan', + 'clan_wuban', ], } }; diff --git a/character/refresh.js b/character/refresh.js index a38b74c50..ba8b26d95 100755 --- a/character/refresh.js +++ b/character/refresh.js @@ -75,7 +75,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ re_quancong:['male','wu',4,['xinyaoming']], re_liaohua:['male','shu',4,['xindangxian','xinfuli']], re_guohuai:['male','wei',4,['decadejingce']], - re_wuyi:['male','shu',4,['xinbenxi']], + re_wuyi:['male','shu',4,['xinbenxi'],['clan:陈留吴氏']], re_zhuran:['male','wu',4,['xindanshou']], re_caozhi:['male','wei',3,['reluoying','rejiushi','chengzhang']], ol_pangtong:['male','shu',3,['ollianhuan','olniepan'],[]], @@ -132,7 +132,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ol_liushan:['male','shu',3,['xiangle','olfangquan','olruoyu'],['zhu']], re_zhangzhang:['male','wu',3,['rezhijian','guzheng']], - re_sunce:['male','wu',4,['jiang','olhunzi','olzhiba'],['zhu']], + re_sunce:['male','wu',4,['oljiang','olhunzi','olzhiba'],['zhu']], re_jianyong:['male','shu',3,['reqiaoshui','jyzongshi']], }, characterIntro:{ @@ -150,6 +150,52 @@ game.import('character',function(lib,game,ui,get,ai,_status){ re_xushu:['zhaoyun','sp_zhugeliang'], }, skill:{ + oljiang:{ + audio:'jiang', + inherit:'jiang', + group:'oljiang_gain', + subSkill:{ + gain:{ + audio:'jiang', + audioname:['sp_lvmeng','re_sunben','re_sunce'], + trigger:{global:['loseAfter','loseAsyncAfter']}, + usable:1, + filter:function(event,player){ + if(player.hp<1||event.type!='discard'||event.position!=ui.discardPile) return false; + var filter=(card)=>(card.name=='juedou'||(card.name=='sha'&&get.color(card,false)=='red')); + var cards=event.getd().filter(filter); + if(!cards.filter((card)=>(get.position(card,true)=='d')).length) return false; + var searched=false; + if(game.getGlobalHistory('cardMove',function(evt){ + if(searched||evt.type!='discard'||evt.position!=ui.discardPile) return false; + var evtx=evt; + if(evtx.getlx===false) evtx=evt.getParent(); + var cards=evtx.getd().filter(filter); + if(!cards.length) return false; + searched=true; + return evtx!=event; + }).length>0) return false; + return true; + }, + prompt2:function(event,player){ + var cards=event.getd().filter(function(card){ + return (card.name=='juedou'||(card.name=='sha'&&get.color(card,false)=='red'))&&get.position(card,true)=='d'; + }); + return '失去1点体力并获得'+get.translation(cards); + }, + check:function(event,player){ + return player.hp>1&&!player.storage.olhunzi; + }, + content:function(){ + player.loseHp(); + var cards=trigger.getd().filter(function(card){ + return (card.name=='juedou'||(card.name=='sha'&&get.color(card,false)=='red'))&&get.position(card,true)=='d'; + }); + if(cards.length>0) player.gain(cards,'gain2'); + }, + }, + }, + }, //李儒 dcmieji:{ audio:2, @@ -864,7 +910,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ 'step 1' if(result.bool){ var card=result.cards[0]; - player.gain(card,target,'give').gaintag.add('reqinwang'); + target.give(card,player).gaintag.add('reqinwang'); player.addTempSkill('reqinwang_clear'); player.chooseBool('是否令'+get.translation(target)+'摸一张牌?'); } @@ -970,7 +1016,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ var cards=target.getCards('h',function(card){ return get.suit(card,target)=='heart'; }); - if(cards.length>0) player.gain(cards,target,'give'); + if(cards.length>0) player.gain(cards,target,'give','bySelf'); } } }, @@ -1957,7 +2003,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, rebotu:{ audio:'botu', - trigger:{player:'phaseJieshuBegin'}, + trigger:{player:'phaseEnd'}, frequent:true, filter:function(event,player){ if(player.countMark('rebotu_count')>=Math.min(3,game.countPlayer())) return false; @@ -1984,7 +2030,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, group:'rebotu_mark', subSkill:{ - count:{onremove:true}, + count:{ + onremove:true, + charlotte:true, + }, mark:{ trigger:{ global:['loseAfter','cardsDiscardAfter'], @@ -2810,7 +2859,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ //usable:1, //forceaudio:true, content:function(){ - target.gain(cards,player,'giveAuto'); + player.give(cards,target); target.addTempSkill('xinhuangtian3','phaseUseEnd'); }, ai:{ @@ -2992,7 +3041,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(result.bool){ var target=result.targets[0]; player.line(target,'green'); - target.gain(result.cards,player,'giveAuto'); + player.give(result.cards,target); player.markAuto('olhaoshi_help',[target]); player.addTempSkill('olhaoshi_help',{player:'phaseBeginStart'}); } @@ -3031,7 +3080,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ 'step 1' if(result.bool){ target.logSkill('olhaoshi_help',player); - player.gain(result.cards,target,'giveAuto'); + target.give(result.cards,player); } if(targets.length) event.goto(0); }, @@ -3349,11 +3398,23 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:2, trigger:{ global:'gainAfter', - player:'damageEnd', + player:['damageEnd','loseAsyncAfter'], }, frequent:true, filter:function(event,player){ if(event.name=='damage') return true; + if(event.name=='loseAsync'){ + if(event.type!='gain'||event.giver) return false; + var cards=event.getl(player).cards2; + return game.hasPlayer(function(current){ + if(current==player) return false; + var cardsx=event.getg(current); + for(var i of cardsx){ + if(cards.contains(i)) return true; + } + return false; + }); + } if(player==event.player) return false; var evt=event.getl(player); return evt&&evt.cards2&&evt.cards2.length>0; @@ -3646,7 +3707,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ content:function(){ 'step 0' player.awakenSkill('rexianzhou'); - target.gain(cards,player,'give'); + player.give(cards,target); player.recover(cards.length) 'step 1' var list=game.filterPlayer(function(current){ @@ -4358,8 +4419,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ frequent:true, preHidden:true, filter:function(event,player,name){ - if(name=='damageEnd') return true; - if(!event.card) return false; + //if(name=='damageEnd') return true; + //if(!event.card) return false; if(player.hasHistory('useSkill',function(evt){ return evt.skill=='gzquanji'&&evt.event.triggername==name; })) return false; @@ -4879,7 +4940,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } "step 2" if(result.bool){ - player.gain(result.cards,event.target,'give'); + target.give(result.cards,player); game.delay(); } else{ @@ -4981,7 +5042,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(result.bool){ var card=result.cards[0]; event.card=card; - player.gain(card,target,'giveAuto'); + target.give(card,player); } else{ target.loseHp(); @@ -5045,7 +5106,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ var target=result.targets[0]; event.target=target; player.logSkill('rexuanhuo',target); - target.gain(result.cards,player,'giveAuto'); + player.give(result.cards,target); } else event.finish(); 'step 2' @@ -5103,7 +5164,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }); } else{ - player.gain(target.getCards('h'),target,'giveAuto'); + target.give(target.getCards('h'),player,'giveAuto'); event.finish(); } 'step 5' @@ -5621,7 +5682,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ 'step 2' if(result.cards&&result.cards.length){ if(get.type2(result.cards[0])=='trick'){ - player.gain(result.cards,target,'giveAuto'); + target.give(result.cards,player); event.finish(); } else target.discard(result.cards); @@ -7990,13 +8051,25 @@ game.import('character',function(lib,game,ui,get,ai,_status){ inherit:'hunzi', content:function(){ player.loseMaxHp(); - player.recover(); + //player.recover(); player.addSkill('reyingzi'); player.addSkill('gzyinghun'); + player.addTempSkill('olhunzi_effect'); game.log(player,'获得了技能','#g【英姿】','和','#g【英魂】'); player.awakenSkill(event.name); player.storage[event.name]=true; - } + }, + subSkill:{ + effect:{ + trigger:{player:'phaseJieshuBegin'}, + forced:true, + popup:false, + charlotte:true, + content:function(){ + player.chooseDrawRecover(2,true); + }, + }, + }, }, olzhiba:{ audio:2, @@ -9331,58 +9404,74 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return (event.num>0) }, content:function (){ - "step 0" - event.count=1; - "step 1" + 'step 0' + event.count=trigger.num; + 'step 1' player.draw(2); - event.given=0; - "step 2" + event.count--; + if(_status.connectMode) game.broadcastAll(function(){_status.noclearcountdown=true}); + event.given_map={}; + event.num=2; + 'step 2' player.chooseCardTarget({ - filterCard:true, - selectCard:[1,2-event.given], - filterTarget:function(card,player,target){ - return player!=target&&target!=event.temp; + filterCard:function(card){ + return !card.hasGaintag('reyiji_tag'); }, + filterTarget:lib.filter.notMe, + selectCard:[1,event.num], + prompt:'请选择要分配的卡牌和目标', ai1:function(card){ - if(ui.selected.cards.length>0) return -1; - if(card.name=='du') return 20; - return (_status.event.player.countCards('h')-_status.event.player.hp); + if(!ui.selected.cards.length) return 1; + return 0; }, ai2:function(target){ - var att=get.attitude(_status.event.player,target); - if(ui.selected.cards.length&&ui.selected.cards[0].name=='du'){ - if(target.hasSkillTag('nodu')) return 0; - return 1-att; - } - return att-4; + var player=_status.event.player,card=ui.selected.cards[0]; + var val=target.getUseValue(card); + if(val>0) return val*get.attitude(player,target)*2; + return get.value(card,target)*get.attitude(player,target); }, - prompt:'请选择要送人的卡牌' }); - "step 3" + 'step 3' if(result.bool){ - player.line(result.targets,'green'); - result.targets[0].gain(result.cards,player,'giveAuto'); - event.given+=result.cards.length; - if(event.given<2){ - event.temp=result.targets[0]; - event.goto(2); - } - else if(event.count0) event.goto(2); } - else if(event.count0){ + player.chooseBool(get.prompt2('new_reyiji')); } else event.finish(); - "step 4" + 'step 6' if(result.bool){ - player.logSkill(event.name); + player.logSkill('new_reyiji'); event.goto(1); } }, @@ -9722,19 +9811,20 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player.gain(list,'gain2'); }, }, - "new_qingjian":{ + new_qingjian:{ audio:"qingjian", - //unique:true, trigger:{ player:"gainAfter", + global:'loseAsyncAfter', }, direct:true, usable:1, - filter:function (event,player){ - if(event.parent.parent.name=='phaseDraw') return false; - return event.cards&&event.cards.length>0 + filter:function(event,player){ + var evt=event.getParent('phaseDraw'); + if(evt&&evt.player==player) return false; + return event.getg(player).length>0; }, - content:function (){ + content:function(){ "step 0" player.chooseCardTarget({ position:'he', @@ -9769,37 +9859,33 @@ game.import('character',function(lib,game,ui,get,ai,_status){ var cards=result.cards; var type=[]; for(var i=0;i0 + var evt=event.getParent('phaseDraw'); + if(evt&&evt.player==player) return false; + return event.getg(player).length>0; }, content:function(){ "step 0" - event.cards=trigger.cards.slice(0); + event.cards=trigger.getg(player); "step 1" player.chooseCardTarget({ filterCard:function(card){ @@ -10858,7 +10945,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ content:function(){ "step 0" target.storage.refanjian=cards[0]; - target.gain(cards[0],player,'give'); + player.give(cards[0],target); "step 1" var suit=get.suit(target.storage.refanjian); if(!target.countCards('h')) event._result={control:'refanjian_hp'}; @@ -12092,7 +12179,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player.logSkill(event.name,trigger.player); if(result.control=='获得牌'){ event.togain=trigger.player.getCards('he'); - player.gain(event.togain,trigger.player,'giveAuto'); + player.gain(event.togain,trigger.player,'giveAuto','bySelf'); } else player.recover(); } @@ -12403,7 +12490,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ olxueyi_info:'主公技,锁定技。①游戏开始时,你获得2X个“裔”标记(X为场上群势力角色的数目)。②出牌阶段开始时,你可以移去一个“裔”标记,然后摸一张牌。③你的手牌上限+Y(Y为“裔”标记数)。', olxueyi_draw:'血裔', olhunzi:'魂姿', - olhunzi_info:'觉醒技,准备阶段,若你的体力值为1,你减1点体力上限并回复1点体力,然后获得技能〖英姿〗和〖英魂〗。', + olhunzi_info:'觉醒技,准备阶段,若你的体力值为1,你减1点体力上限并获得技能〖英姿〗和〖英魂〗;本回合的结束阶段,你摸两张牌或回复1点体力。', olzhiba:'制霸', olzhiba_info:'主公技,其他吴势力的角色的出牌阶段限一次,其可以与你拼点(你可拒绝此拼点)。若其没赢,你可以获得两张拼点牌。你的出牌阶段限一次,你可以和一名吴势力角色拼点,若你赢,你获得两张拼点牌。', olzhiba2:'制霸', @@ -12454,6 +12541,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ "new_retuxi":"突袭", "new_retuxi_info":"摸牌阶段摸牌时,你可以少摸任意张牌,然后获得等量的角色的各一张手牌。", "new_retuxi_info_guozhan":"摸牌阶段摸牌时,你可以少摸至多两张牌,然后获得等量的角色的各一张手牌。", + reyiji_tag:'已分配', "new_reyiji":"遗计", "new_reyiji_info":"当你受到1点伤害后,你可以摸两张牌,然后可以将至多两张手牌交给其他角色。", "new_rejianxiong":"奸雄", @@ -12561,7 +12649,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ botu:'博图', botu_info:'回合结束时,若你本回合出牌阶段内使用的牌包含四种花色,则你可以进行一个额外回合。', rebotu:'博图', - rebotu_info:'每轮限X次。结束阶段,若本回合内置入弃牌堆的牌中包含至少四种花色,则你可获得一个额外的回合。(X为存活角色数且至多为3)', + rebotu_info:'每轮限X次。回合结束时,若本回合内置入弃牌堆的牌中包含至少四种花色,则你可获得一个额外的回合。(X为存活角色数且至多为3)', xin_yuji:'界于吉', re_zuoci:'界左慈', @@ -12954,7 +13042,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ olningwu_info:'锁定技。当一名角色A于一回合内第二次受到伤害后,若A或伤害来源为你,则你摸一张牌,然后弃置其装备区或判定区内的一张牌。', re_zhuhuan:'界朱桓', refenli:'奋励', - refenli_info:'若你的手牌数为全场最多,你可以跳过摸牌阶段和摸牌阶段;若你的体力值为全场最多,你可以跳过出牌阶段;若你的装备区里有牌且数量为全场最多,你可以跳过弃牌阶段。', + refenli_info:'若你的手牌数为全场最多,你可以跳过判定阶段和摸牌阶段;若你的体力值为全场最多,你可以跳过出牌阶段;若你的装备区里有牌且数量为全场最多,你可以跳过弃牌阶段。', //破界石不值钱了 就逮着免费突破硬削是吧 repingkou:'平寇', repingkou_info:'回合结束时,你可以对至多X名其他角色各造成1点伤害(X为你本回合跳过的阶段数)。若你选择的角色数小于X,则你可以弃置其中一名角色装备区内的一张牌', @@ -12963,6 +13051,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ dcmieji_info:'出牌阶段限一次,你可以展示一张武器牌或黑色锦囊牌。你将此牌置于牌堆顶,然后令一名有手牌的其他角色选择一项:⒈弃置一张锦囊牌;⒉依次弃置两张非锦囊牌。', dcfencheng:'焚城', dcfencheng_info:'限定技。出牌阶段,你可以指定一名其他角色,令从其开始的其他角色依次选择一项:⒈弃置至少X张牌(X为上一名角色弃置的牌数+1)。⒉你对其造成2点伤害。', + oljiang:'激昂', + oljiang_info:'①当你使用【决斗】或红色【杀】指定第一个目标后,或成为【决斗】或红色【杀】的目标后,你可以摸一张牌。②当有【决斗】或红色【杀】于每回合内首次因弃置而进入弃牌堆后,你可以失去1点体力并获得这些牌。', refresh_standard:'界限突破·标', refresh_feng:'界限突破·风', diff --git a/character/sb.js b/character/sb.js index ca417a7dc..76da350ca 100644 --- a/character/sb.js +++ b/character/sb.js @@ -59,7 +59,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ else event.finish(); 'step 2' if(result.bool){ - player.gain(result.cards,target,'giveAuto'); + target.give(result.cards,player); } }, ai:{ @@ -372,10 +372,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){ var list=player.getStorage('spmingxuan'),cards=result.cards.randomSort(); var targets=game.filterPlayer((current)=>(current!=player&&!list.contains(current))).randomGets(cards.length).sortBySeat(); player.line(targets,'green'); + var map=[]; for(var i=0;i1?'至多':'')+get.cnNumber(num)+'张手牌交给等量的其他群势力角色。先按顺序选中所有要给出的手牌,然后再按顺序选择等量的目标角色', + selectCard:[1,num], + selectTarget:function(){ + return ui.selected.cards.length; + }, + filterTarget:function(card,player,target){ + return target!=player&&target.group=='qun'; + }, + complexSelect:true, + filterOk:function(){ + return ui.selected.cards.length==ui.selected.targets.length; + }, + ai1:function(card){ + var player=_status.event.player; + var value=get.value(card,player,'raw'); + if(game.hasPlayer(function(target){ + return (target!=player&&target.group=='qun'&&!ui.selected.targets.contains(target))&&(get.sgn(value)==get.sgn(get.attitude(player,target))) + })) return 1/Math.max(1,get.useful(card)); + return -1; + }, + ai2:function(target){ + var player=_status.event.player; + var card=ui.selected.cards[ui.selected.targets.length]; + if(card&&get.value(card,player,'raw')<0) return -get.attitude(player,target); + return get.attitude(player,target); + }, + }); } + else event.finish(); + 'step 1' + if(result.bool&&result.cards.length>0){ + var list=[]; + for(var i=0;i0) return true; return false; @@ -2365,15 +2376,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){ content:function(){ 'step 0' player.changeZhuanhuanji('nzry_shenshi'); - target.gain(cards,player,'giveAuto'); + player.give(cards,target); target.damage('nocard'); 'step 1' if(!target.isAlive()){ - player.chooseTarget('请选择一名角色并令其将手牌摸至四张',function(card,player,target){ + player.chooseTarget('令一名角色将手牌摸至四张',function(card,player,target){ return target.countCards('h')<4; - }).ai=function(target){ + }).set('ai',function(target){ return get.attitude(player,target) - }; + }); } else{ event.finish(); @@ -2415,7 +2426,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }); "step 1" if(result.bool){ - trigger.source.gain(result.cards,player,'give'); + player.give(result.cards,trigger.song); trigger.source.storage.nzry_shenshi1=result.cards[0]; trigger.source.storage.nzry_shenshi2=player; trigger.source.addSkill('nzry_shenshi1'); @@ -3905,44 +3916,88 @@ game.import('character',function(lib,game,ui,get,ai,_status){ direct:true, preHidden:true, content:function(){ - "step 0" - var cards=[]; - var cards2=[]; + 'step 0' + var cards=[],cards2=[]; + var target=trigger.player; game.getGlobalHistory('cardMove',function(evt){ - if(evt.name=='cardsDiscard'&&evt.getParent('phaseDiscard')==trigger) cards.addArray(evt.cards.filterInD('d')); - }); - game.countPlayer2(function(current){ - current.getHistory('lose',function(evt){ - if(evt.type!='discard'||evt.getParent('phaseDiscard')!=trigger) return; - cards.addArray(evt.cards.filterInD('d')); - if(current==trigger.player) cards2.addArray(evt.hs.filterInD('d')); - }) - }); - event.cards=cards; - var check=lib.skill.guzheng.checkx(trigger,player,cards,cards2); - player.chooseCardButton(cards,'固政:选择令'+get.translation(trigger.player)+'收回的牌').set('ai',function(button){ - if(_status.event.check){ - return 20-get.value(button.link,_status.event.getTrigger().player); + if(evt.name=='cardsDiscard'){ + if(evt.getParent('phaseDiscard')==trigger){ + var moves=evt.cards.filterInD('d'); + cards.addArray(moves); + cards2.removeArray(moves); + } } - return 0; - }).set('check',check).set('cards',cards2).set('filterButton',function(button){ - return _status.event.cards.contains(button.link); - }).setHiddenSkill(event.name); - "step 1" - if(result.bool){ - game.delay(0.5); - player.logSkill('guzheng',trigger.player); - trigger.player.gain(result.links[0]); - trigger.player.$gain2(result.links[0]); - game.log(trigger.player,'收回了',result.links[0]); - event.cards.remove(result.links[0]); - if(event.cards.length){ - player.gain(event.cards); - player.$gain2(event.cards); - game.log(player,'收回了',event.cards); + if(evt.name=='lose'){ + if(evt.type!='discard'||evt.position!=ui.discardPile||evt.getParent('phaseDiscard')!=trigger) return; + var moves=evt.cards.filterInD('d'); + cards.addArray(moves); + if(evt.player==target) cards2.addArray(moves); + else cards2.removeArray(moves); } - game.delay(); + }); + if(!cards2.length) event.finish(); + else if(cards.length==1){ + event.card=cards[0]; + player.chooseBool().set('createDialog',[ + get.prompt('guzheng',target), + '点击“确认”以令其收回此牌', + cards, + ]).set('choice',lib.skill.guzheng.checkx(trigger,player,cards,cards2)).set('ai',function(){ + return _status.event.choice; + }).setHiddenSkill('guzheng'); } + else{ + player.chooseButton(2,[ + get.prompt('guzheng',target), + '被选择的牌将成为对方收回的牌', + cards, + [['获得剩余的牌','放弃剩余的牌'],'tdnodes'], + ]).set('filterButton',function(button){ + var type=typeof button.link; + if(ui.selected.buttons.length&&type==typeof ui.selected.buttons[0].link) return false; + return type=='string'||_status.event.allowed.contains(button.link); + }).set('allowed',cards2).set('check',lib.skill.guzheng.checkx(trigger,player,cards,cards2)).set('ai',function(button){ + if(typeof button.link=='string'){ + return button.link=='获得剩余的牌'?1:0; + } + if(_status.event.check){ + return 20-get.value(button.link,_status.event.getTrigger().player); + } + return 0; + }).setHiddenSkill('guzheng'); + } + 'step 1' + if(result.bool){ + var target=trigger.player; + player.logSkill('guzheng',target); + if(!result.links||!result.links.length){ + target.gain(card,'gain2').giver=player; + } + else{ + if(typeof result.links[0]!='string') result.links.reverse(); + var card=result.links[1]; + target.gain(card,'gain2').giver=player; + if(result.links[0]!='获得剩余的牌') event.finish(); + } + } + else event.finish(); + 'step 2' + //避免插入结算改变弃牌堆 重新判断一次 + var cards=[]; + game.getGlobalHistory('cardMove',function(evt){ + if(evt.name=='cardsDiscard'){ + if(evt.getParent('phaseDiscard')==trigger){ + var moves=evt.cards.filterInD('d'); + cards.addArray(moves); + } + } + if(evt.name=='lose'){ + if(evt.type!='discard'||evt.position!=ui.discardPile||evt.getParent('phaseDiscard')!=trigger) return; + var moves=evt.cards.filterInD('d'); + cards.addArray(moves); + } + }); + if(cards.length>0) player.gain(cards,'gain2'); }, ai:{ threaten:1.3, @@ -4485,9 +4540,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } "step 2" if(event.cards.length){ - player.gain(event.cards); - player.$gain2(event.cards); - game.delay(); + player.gain(event.cards,'gain2'); } }, ai:{ @@ -4532,10 +4585,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{global:'useCardAfter'}, forced:true, filter:function(event,player){ - return (event.card.name=='nanman'&&event.player!=player&&get.itemtype(event.cards)=='cards'&&get.position(event.cards[0],true)=='o'); + return (event.card.name=='nanman'&&event.player!=player&&event.cards.filterInD().length>0); }, content:function(){ - player.gain(trigger.cards,'gain2'); + player.gain(trigger.cards.filterInD(),'gain2'); } }, lieren:{ @@ -4572,7 +4625,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ content:function(){ "step 0" event.togain=trigger.player.getCards('he'); - player.gain(event.togain,trigger.player,'giveAuto'); + player.gain(event.togain,trigger.player,'giveAuto','bySelf'); }, }, fangzhu:{ @@ -4782,7 +4835,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }); "step 1" if(result.targets&&result.targets[0]){ - result.targets[0].gain(result.cards,player,'giveAuto'); + player.give(result.cards,result.targets[0]); } } }, @@ -4792,7 +4845,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ usable:1, position:'he', filterCard:function(){ - if(ui.selected.targets.length==2) return false; + var targets=ui.selected.targets; + if(targets.length==2){ + if(Math.abs(targets[0].countCards('h')-targets[1].countCards('h'))<=ui.selected.cards.length) return false; + } return true; }, selectCard:[0,Infinity], @@ -4800,13 +4856,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){ complexCard:true, filterTarget:function(card,player,target){ if(player==target) return false; - if(ui.selected.targets.length==0) return true; - return (Math.abs(ui.selected.targets[0].countCards('h')-target.countCards('h'))== - ui.selected.cards.length); + return true; + }, + filterOk:function(){ + var targets=ui.selected.targets; + if(targets.length!=2) return false; + return (Math.abs(targets[0].countCards('h')-targets[1].countCards('h'))==ui.selected.cards.length); }, multitarget:true, multiline:true, - complexSelect:true, content:function(){ targets[0].swapHandcards(targets[1]); }, @@ -6904,31 +6962,93 @@ game.import('character',function(lib,game,ui,get,ai,_status){ fenji:{ audio:2, trigger:{ - global:["gainAfter","loseAfter"], + global:['gainAfter','loseAfter','loseAsyncAfter'], }, - filter:function(event){ - var evt=event; + direct:true, + filter:function(event,player){ if(event.name=='lose'){ - if(event.type!='discard') return false; - evt=event.getParent(); + if(event.type!='discard'||!event.player.isIn()) return false; + if((event.discarder||event.getParent(2).player)==event.player) return false; + if(!event.getl(event.player).hs.length) return false; + return true; } - var player=evt[event.name=='gain'?'source':'player']; - if(!player||player.isDead()) return false; - if(evt[event.name=='gain'?'bySelf':'notBySelf']!=true) return false; - if(event.name=='lose') return event.hs.length>0; - return event.relatedLose&&event.relatedLose.hs&&event.relatedLose.hs.length>0; - }, - check:function(event,player){ - return get.attitude(player,event[event.name=='gain'?'source':'player'])>2; - }, - logTarget:function(event){ - return event[event.name=='gain'?'source':'player']; + else if(event.name=='gain'){ + if(event.giver||event.getParent().name=='_yongjian_zengyu') return false; + var cards=event.getg(event.player); + if(!cards.length) return false; + return game.hasPlayer(function(current){ + if(current==event.player) return false; + var hs=event.getl(current).hs; + for(var i of hs){ + if(cards.contains(i)) return true; + } + return false; + }); + } + else if(event.type=='gain'){ + if(event.giver||!event.player||!event.player.isIn()) return false; + var hs=event.getl(event.player); + return game.hasPlayer(function(current){ + if(current==event.player) return false; + var cards=event.getg(current); + for(var i of cards){ + if(hs.contains(i)) return true; + } + }); + } + else if(event.type=='discard'){ + if(!event.discarder) return false; + return game.hasPlayer(function(current){ + return current!=event.discarder&&event.getl(current).hs.length>0; + }); + } + return false; }, content:function(){ - "step 0" - player.loseHp(); - "step 1" - trigger[trigger.name=='gain'?'source':'player'].draw(2); + 'step 0' + var targets=[]; + if(trigger.name=='gain'){ + var cards=trigger.getg(trigger.player); + targets.addArray(game.filterPlayer(function(current){ + if(current==trigger.player) return false; + var hs=trigger.getl(current).hs; + for(var i of hs){ + if(cards.contains(i)) return true; + } + return false; + })); + } + else if(trigger.name=='loseAsync'&&trigger.type=='discard'){ + targets.addArray(game.filterPlayer(function(current){ + return current!=trigger.discarder&&trigger.getl(current).hs.length>0; + })); + } + else targets.push(trigger.player); + event.targets=targets.sortBySeat(); + if(!event.targets.length) event.finish(); + 'step 1' + var target=targets.shift(); + event.target=target; + if(target.isIn()) player.chooseBool(get.prompt('fenji',target),'失去1点体力,令该角色摸两张牌').set('ai',function(){ + var evt=_status.event.getParent(); + return get.attitude(evt.player,evt.target)>4; + }); + else{ + if(targets.length>0) event.goto(1); + else event.finish(); + } + 'step 2' + if(result.bool){ + player.logSkill('fenji',target); + player.loseHp(); + } + else{ + if(targets.length>0) event.goto(1); + else event.finish(); + } + 'step 3' + target.draw(2); + if(targets.length>0) event.goto(1); }, }, new_fenji:{ @@ -7176,7 +7296,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ //usable:1, //forceaudio:true, content:function(){ - target.gain(cards,player,'giveAuto'); + player.give(cards,target); target.addTempSkill('huangtian3','phaseUseEnd'); }, ai:{ @@ -7646,8 +7766,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ "xinfu_zuilun_info":"结束阶段,你可以观看牌堆顶三张牌,你每满足以下一项便保留一张,然后以任意顺序放回其余的牌:1.你于此回合内造成过伤害;2.你于此回合内未弃置过牌;3.手牌数为全场最少。若均不满足,你与一名其他角色失去一点体力。", "xinfu_fuyin":"父荫", "xinfu_fuyin_info":"锁定技,你每回合第一次成为【杀】或【决斗】的目标后,若你的手牌数小于等于该角色,此牌对你无效。", - "drlt_wanglie":"往烈", - "drlt_wanglie_info":"出牌阶段,你使用的第一张牌无距离限制;当你于回合内使用牌时,你可以令此牌不能被响应,若如此做,本回合内你不能再使用牌", + drlt_wanglie:"往烈", + drlt_wanglie_info:"①出牌阶段,你使用的第一张牌无距离限制。②当你于出牌阶段内使用牌时,你可以令此牌不能被响应,然后你于本阶段内不能再使用牌", "drlt_xiongluan":"雄乱", "drlt_xiongluan_info":"限定技,出牌阶段,你可以废除你的判定区和装备区,然后指定一名其他角色。直到回合结束,你对其使用牌无距离和次数限制,其不能使用和打出手牌", "drlt_congjian":"从谏", @@ -7655,6 +7775,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ "drlt_yongsi":"庸肆", "drlt_yongsi_info":"锁定技,摸牌阶段,你改为摸X张牌(X为存活势力数);出牌阶段结束时,若你本回合:1.没有造成伤害,将手牌摸至当前体力值;2.造成的伤害超过1点,本回合手牌上限改为已损失体力值", "drlt_weidi":"伪帝", + weidi_tag:'伪帝', "drlt_weidi_info":"主公技,弃牌阶段开始时,若你的手牌数大于手牌上限,则你可以将至多X张手牌分别交给等量的其他群雄角色(X为你的手牌数与手牌上限之差)。", "drlt_qianjie":"谦节", "drlt_qianjie_info":"锁定技,当你横置时,取消之。你不能成为延时类锦囊的目标。你不能成为其他角色拼点的目标。", @@ -7945,7 +8066,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ guidao_info:'一名角色的判定牌生效前,你可以打出一张黑色牌替换之。', huangtian_info:'主公技,其他群势力角色的出牌阶段限一次,其可以交给你一张【闪】或【闪电】。', guhuo_info:'每名角色的回合限一次,你可以扣置一张手牌当一张基本牌或普通锦囊牌使用或打出。其他角色依次选择是否质疑。一旦有其他角色质疑则翻开此牌:若为假则此牌作废,若为真,则质疑角色获得技能“缠怨”(锁定技,你不能质疑于吉,只要你的体力值为1,你失去你的武将技能)', - fenji_info:'当一名角色的手牌被其他角色弃置或获得后,你可以失去1点体力,然后令该角色摸两张牌。', + fenji_info:'当一名角色的手牌不因赠予或交给而被其他角色获得后,或一名角色的手牌被其他角色限制后,你可以令其摸两张牌。', new_fenji:"奋激", new_fenji_info:"一名角色的结束阶段开始时,若其没有手牌,你可以令其摸两张牌,然后你失去1点体力。", diff --git a/character/sp.js b/character/sp.js index 28a10c03d..b535eaf9c 100755 --- a/character/sp.js +++ b/character/sp.js @@ -93,7 +93,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ sp_diaochan:['female','qun',3,['lihun','rebiyue']], sp_zhaoyun:['male','qun',3,['ollongdan','chongzhen']], liuxie:['male','qun',3,['tianming','mizhao']], - zhugejin:['male','wu',3,['hongyuan','huanshi','mingzhe']], + zhugejin:['male','wu',3,['olhuanshi','olhongyuan','olmingzhe']], zhugeke:['male','wu',3,['aocai','duwu']], guanyinping:['female','shu',3,['huxiao','xueji','wuji']], simalang:['male','wei',3,['junbing','quji']], @@ -657,6 +657,207 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, skill:{ + //新诸葛瑾 + olhuanshi:{ + audio:'huanshi', + trigger:{global:'judge'}, + filter:function(event,player){ + return player.countCards('he')>0; + }, + logTarget:'player', + prompt2:function(event,player){ + var str=(get.translation(event.player)+'的'+event.judgestr+'判定为'+get.translation(event.player.judging[0])+'。你可以令其观看你的牌,其选择一张牌进行改判。'); + if(!player.hasSkill('olhuanshi_mark',null,null,false)) str+='然后你可以重铸任意张牌。'; + return str; + }, + check:function(event,player){ + if(get.attitude(player,event.player)<=0) return false; + var cards=player.getCards('he'); + var judge=event.judge(event.player.judging[0]); + for(var i=0;ijudge) return true; + if(_status.currentPhase!=player&&judge2==judge&&get.color(cards[i])=='red'&&get.useful(cards[i])<5) return true; + } + return false; + }, + content:function(){ + 'step 0' + var target=trigger.player; + var judge=trigger.judge(target.judging[0]); + var attitude=get.attitude(target,player); + target.choosePlayerCard('请选择代替判定的牌','he','visible',true,player).set('ai',function(button){ + var card=button.link; + var judge=_status.event.judge; + var attitude=_status.event.attitude; + var result=trigger.judge(card)-judge; + var player=_status.event.player; + if(result>0){ + return 20+result; + } + if(result==0){ + if(_status.currentPhase==player) return 0; + if(attitude>=0){ + return get.color(card)=='red'?7:0-get.value(card); + } + else{ + return get.color(card)=='black'?10:0+get.value(card); + } + } + if(attitude>=0){ + return get.color(card)=='red'?0:-10+result; + } + else{ + return get.color(card)=='black'?0:-10+result; + } + }).set('filterButton',function(button){ + var player=_status.event.target; + var card=button.link; + var mod2=game.checkMod(card,player,'unchanged','cardEnabled2',player); + if(mod2!='unchanged') return mod2; + var mod=game.checkMod(card,player,'unchanged','cardRespondable',player); + if(mod!='unchanged') return mod; + return true; + }).set('judge',judge).set('attitude',attitude); + 'step 1' + if(result.bool){ + event.card=result.links[0]; + player.respond(event.card,'highlight','noOrdering').nopopup=true; + } + else{ + event.finish(); + } + 'step 2' + if(result.bool){ + if(trigger.player.judging[0].clone){ + trigger.player.judging[0].clone.classList.remove('thrownhighlight'); + game.broadcast(function(card){ + if(card.clone){ + card.clone.classList.remove('thrownhighlight'); + } + },trigger.player.judging[0]); + game.addVideo('deletenode',player,get.cardsInfo([trigger.player.judging[0].clone])); + } + game.cardsDiscard(trigger.player.judging[0]); + trigger.player.judging[0]=event.card; + trigger.orderingCards.add(event.card); + game.log(trigger.player,'的判定牌改为',event.card); + game.delay(2); + } + if(!player.countCards('h')||player.hasSkill('olhuanshi_mark',null,null,false)) event.finish(); + 'step 3' + player.chooseCard('是否重铸任意张手牌?','操作提示:选择要重铸的牌并点击“确定”',[1,player.countCards('h')]).set('ai',function(card){ + var player=_status.event.player,cards=ui.selected.cards; + if(!player.hasSkill('olmingzhe')) return 5-get.value(card); + for(var i of cards){ + if(get.color(i,player)=='red') return 5-get.value(card); + } + return 7.5-get.value(card); + }); + 'step 4' + if(result.bool){ + player.addTempSkill('olhuanshi_mark'); + player.loseToDiscardpile(result.cards); + player.draw(result.cards.length); + } + }, + ai:{ + rejudge:true, + tag:{ + rejudge:1, + } + }, + subSkill:{mark:{charlotte:true}}, + }, + olhongyuan:{ + audio:'hongyuan', + trigger:{ + player:'gainAfter', + global:'loseAsyncAfter', + }, + direct:true, + filter:function(event,player){ + var cards=event.getg(player); + return cards.length>=2&&!player.hasSkill('olhongyuan_blocker',null,null,false); + }, + content:function(){ + 'step 0' + var max=Math.min(2,game.countPlayer()-1,player.countCards('he')); + player.chooseCardTarget({ + prompt:get.prompt('olhongyuan'), + prompt2:'操作提示:按顺序选择任意张要交出的牌,并按任意顺序选择等量的获得牌的角色', + filterCard:true, + selectCard:[1,max], + position:'he', + filterTarget:lib.filter.notMe, + selectTarget:[1,max], + filterOk:function(){ + return ui.selected.cards.length==ui.selected.targets.length; + }, + ai1:function(card){ + var player=_status.event.player; + var num=game.countPlayer(function(current){ + return current!=player&&get.attitude(player,current)>0&&!current.hasSkillTag('nogain'); + }); + if(num<=ui.selected.cards.length) return -get.value(card); + if(!player.hasSkill('olmingzhe')) return 4-Math.max(player.getUseValue(card),get.value(card,player)); + if(ui.selected.cards.length&&get.color(card)=='red') return 6-get.value(card); + return 4-Math.max(player.getUseValue(card),get.value(card,player)); + }, + ai2:function(target){ + var player=_status.event.player,att=get.attitude(player,target); + var card=ui.selected.cards[ui.selected.targets.length]; + if(!card) return att; + var val=get.value(card,target); + if(val<0) return -att*Math.sqrt(-val); + return att*Math.sqrt(val+2); + }, + }); + 'step 1' + if(result.bool){ + player.logSkill('olhongyuan',result.targets); + player.addTempSkill('olhongyuan_blocker',['phaseZhunbeiBefore','phaseJudgeBefore','phaseDrawBefore','phaseUseBefore','phaseDiscardBefore','phaseJieshuBefore','phaseBefore']); + var map=[]; + for(var i=0;i0) player.showCards(cards,get.translation(player)+'发动了【明哲】'); + } + player.draw(); + }, + }, //吕范 xindiaodu:{ audio:"diaodu", @@ -732,7 +933,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(result.bool){ var target=result.targets[0]; player.line(target,'green'); - target.gain(card,player,'give'); + player.give(card,target); } }, }, @@ -3106,17 +3307,22 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } 'step 4' if(_status.connectMode){ - game.broadcastAll(function(){delete _status.noclearcountdown}); - game.stopCountChoose(); + game.broadcastAll(function(){delete _status.noclearcountdown;game.stopCountChoose()}); } + var map=[],cards=[]; for(var i in event.given_map){ var source=(_status.connectMode?lib.playerOL:game.playerMap)[i]; player.line(source,'green'); - source.gain(event.given_map[i],player,'giveAuto'); + map.push([source,event.given_map[i]]); + cards.addArray(event.given_map[i]); } - event.next.sort(function(a,b){ - return lib.sort.seat(a.player,b.player); - }); + if(map.length) game.loseAsync({ + gain_list:map, + player:player, + cards:cards, + giver:player, + animate:'giveAuto', + }).setContent('gaincardMultiple'); }, }, gain:{ @@ -3241,7 +3447,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, content:function(){ var cards=player.getCards('h'); - trigger.player.gain(cards,player,'giveAuto'); + player.give(cards,trigger.player); player.addTempSkill('yuanzi_effect'); player.addTempSkill('yuanzi_round','roundStart'); }, @@ -4356,17 +4562,22 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } 'step 4' if(_status.connectMode){ - game.broadcastAll(function(){delete _status.noclearcountdown}); - game.stopCountChoose(); + game.broadcastAll(function(){delete _status.noclearcountdown;game.stopCountChoose()}); } + var map=[],cards=[]; for(var i in event.given_map){ var source=(_status.connectMode?lib.playerOL:game.playerMap)[i]; player.line(source,'green'); - source.gain(event.given_map[i],player,'giveAuto'); + map.push([source,event.given_map[i]]); + cards.addArray(event.given_map[i]); } - event.next.sort(function(a,b){ - return lib.sort.seat(a.player,b.player); - }); + if(map.length) game.loseAsync({ + gain_list:map, + player:player, + cards:cards, + giver:player, + animate:'giveAuto', + }).setContent('gaincardMultiple') 'step 5' var list=lib.inpile.filter(function(i){ return get.type2(i)=='trick'; @@ -4855,7 +5066,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ 'step 1' if(result.bool){ var card=result.cards[0]; - player.gain(card,target,'give'); + target.give(card,player,'give'); var type=get.type2(card,target); if(lib.skill['zhaosong_'+type]){ target.addSkill('zhaosong_'+type); @@ -5276,17 +5487,22 @@ game.import('character',function(lib,game,ui,get,ai,_status){ else event.finish(); 'step 7' if(_status.connectMode){ - game.broadcastAll(function(){delete _status.noclearcountdown}); - game.stopCountChoose(); + game.broadcastAll(function(){delete _status.noclearcountdown;game.stopCountChoose()}); } + var map=[],cards=[]; for(var i in event.given_map){ var source=(_status.connectMode?lib.playerOL:game.playerMap)[i]; player.line(source,'green'); - source.gain(event.given_map[i],player,'giveAuto'); + map.push([source,event.given_map[i]]); + cards.addArray(event.given_map[i]); } - event.next.sort(function(a,b){ - return lib.sort.seat(a.player,b.player); - }); + if(map.length) game.loseAsync({ + gain_list:map, + player:player, + cards:cards, + giver:player, + animate:'giveAuto', + }).setContent('gaincardMultiple'); }, update:function(player){ player.removeGaintag('olsujian'); @@ -6262,10 +6478,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ subSkill:{ gain:{ audio:'zhuikong', - trigger:{player:'gainAfter'}, + trigger:{ + player:'gainAfter', + global:'loseAsyncAfter', + }, usable:1, filter:function(event,player){ - return player.isTurnedOver()&&player!=_status.currentPhase; + return player.isTurnedOver()&&player!=_status.currentPhase&&event.getg(player).length>0; }, check:function(event,player){ return get.attitude(player,_status.currentPhase)>0; @@ -6330,7 +6549,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, content:function(){ 'step 0' - targets[0].gain(cards,player,'giveAuto'); + player.give(cards,targets[0]); 'step 1' if(!targets[0].isAlive()||!targets[1].isAlive()){ event.finish(); @@ -6391,7 +6610,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(result.bool){ var target=trigger.player; player.logSkill('spfengyin',target); - target.gain(result.cards,player,'give'); + player.give(result.cards,true,'give'); target.skip('phaseUse'); target.skip('phaseDiscard'); } @@ -6954,7 +7173,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(!target.countCards('he')) event.finish(); else target.chooseCard('he','交给'+get.translation(player)+'一张牌',true); 'step 1' - player.gain(result.cards,target,'giveAuto'); + target.give(result.cards,player); 'step 2' if(player.countCards('h')<=target.countCards('h')){ event.finish(); @@ -7413,7 +7632,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } else event.finish(); 'step 3' - result.targets[0].gain(card,targets[0],'give'); + targets[0].gain(card,result.targets[0],'give'); }, ai:{ order:4, @@ -7986,7 +8205,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ 'step 0' target.chooseCard('he','交给'+get.translation(player)+'一张牌',true); 'step 1' - player.gain(result.cards,target,'giveAuto'); + target.give(result.cards,player); 'step 2' if(player.countCards('h')<=target.countCards('h')){ event.finish(); @@ -8089,10 +8308,25 @@ game.import('character',function(lib,game,ui,get,ai,_status){ //蒋干 weicheng:{ audio:2, - trigger:{global:'gainAfter'}, + trigger:{ + global:'gainAfter', + player:'loseAsyncAfter', + }, //forced:true, frequent:true, filter:function(event,player){ + if(event.name=='loseAsync'){ + if(event.type!='gain'||player.hp>player.countCards('h')) return false; + var cards=event.getl(player).cards2; + return game.hasPlayer(function(current){ + if(current==player) return false; + var cardsx=event.getg(current); + for(var i of cardsx){ + if(cards.contains(i)) return true; + } + return false; + }); + } if(event.player!=player&&player.hp>player.countCards('h')){ var evt=event.getl(player); return evt&&evt.hs&&evt.hs.length>0; @@ -8267,7 +8501,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ 'step 2' if(result.bool){ var cards=result.cards; - player.gain(cards,trigger.target,'giveAuto'); + trigger.target.give(cards,player); } else{ trigger.getParent().directHit.add(trigger.target); @@ -8727,7 +8961,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } else{ if(event.e){ - player.gain(event.e,event.target,'give'); + player.gain(event.e,event.target,'give','bySelf'); player.addTempSkill('new_mumu2') } } @@ -8953,11 +9187,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, draw:{ - trigger:{player:'gainAfter'}, + trigger:{ + player:'gainAfter', + global:'loseAsyncAfter', + }, audio:"zishu", forced:true, filter:function(event,player){ - if(_status.currentPhase!=player) return false; + if(_status.currentPhase!=player||event.getg(player).length==0) return false; return event.getParent(2).name!='zishu_draw'; }, content:function(){ @@ -10288,7 +10525,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player.logSkill('xiashu',result.targets); event.target=result.targets[0]; var hs=player.getCards('h'); - event.target.gain(hs,player,'giveAuto'); + player.give(hs,target); } else{ event.finish(); @@ -10354,10 +10591,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ '获得'+get.translation(event.target)+'未展示的牌']).set('choice',choice); 'step 5' if(result.index==0){ - player.gain(event.cards1,target,'give'); + player.gain(event.cards1,target,'give','bySelf'); } else{ - player.gain(event.cards2,target,'giveAuto'); + player.gain(event.cards2,target,'giveAuto','bySelf'); } }, ai:{ @@ -10532,7 +10769,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } 'step 4' if(result.bool){ - event.target.gain(result.cards,player,'giveAuto'); + player.give(result.cards,target); } }, ai:{ @@ -10556,7 +10793,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ delay:false, filterCard:true, content:function(){ - target.gain(cards,player,'giveAuto').gaintag.add('fuman'); + player.give(cards,target).gaintag.add('fuman'); target.addSkill('fuman2'); player.addSkill('fuman_draw'); var stat=player.getStat('skill'); @@ -11304,7 +11541,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ delay:false, content:function(){ 'step 0' - target.gain(cards,player,'giveAuto'); + player.give(cards,target); if(get.color(cards[0])=='black'){ target.chooseToDiscard(2,'he','弃置两张牌,或令'+get.translation(player)+'摸两张牌').set('ai',function(card){ if(_status.event.goon) return 7-get.value(card); @@ -11344,26 +11581,46 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(name=='phaseDiscard'&&get.color(card)=='black') return false; } }, - trigger:{global:'gainAfter'}, + trigger:{ + global:'gainAfter', + player:'loseAsyncAfter', + }, forced:true, popup:false, filter:function(event,player){ + if(event.name=='loseAsync'){ + if(event.type!='gain') return false; + var hs=current.getCards('h'),cards=event.getl(player).cards2; + return game.hasPlayer(function(current){ + if(current==player) return false; + var cardsx=event.getg(current); + for(var i of cardsx){ + if(cards.contains(i)&&hs.contains(card)&&cards.contains(card)&&get.color(card,player)=='black') return true; + } + return false; + }); + } if(event.player!=player){ var hs=event.player.getCards('h'); var evt=event.getl(player); return evt&&evt.cards2&&evt.cards2.filter(function(card){ - return hs.contains(card)&&get.color(card,event.player)=='black'; + return hs.contains(card)&&get.color(card,player)=='black'; }).length>0; } return false; }, content:function(){ - trigger.player.addSkill('xiehui2'); - var hs=trigger.player.getCards('h'); - var cards=trigger.getl(player).cards2.filter(function(card){ - return hs.contains(card)&&get.color(card,trigger.player)=='black'; + var cards=trigger.getl(player).cards2; + game.countPlayer(function(current){ + if(current==player) return; + var hs=current.getCards('h'),cardsx=trigger.getg(current).filter(function(card){ + return hs.contains(card)&&cards.contains(card)&&get.color(card,player)=='black'; + }); + if(cardsx.length>0){ + current.addSkill('xiehui2'); + current.addGaintag(cards,'xiehui'); + } }); - trigger.player.addGaintag(cards,'xiehui'); } }, xiehui2:{ @@ -11658,9 +11915,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, direct:true, filter:function(event,player){ - if(event.name=='gain'&&event.player==player) return event.cards&&event.cards.length>1; - var evt=event.getl(player); - return evt&&evt.cards2&&evt.cards2.length>1; + var num=event.getl(player).cards2.length; + if(event.getg) num=Math.max(num,event.getg(player).length) + return num>1; }, content:function(){ 'step 0' @@ -11721,7 +11978,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return 0; }, content:function(){ - target.gain(cards,player,'giveAuto'); + player.give(cards,target,'give'); target.recover(); }, ai:{ @@ -11911,7 +12168,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ 'step 0' player.awakenSkill('jianshu'); player.storage.jianshu=true; - targets[0].gain(cards,player,'give'); + player.give(cards,targets[0],'give'); 'step 1' targets[0].chooseToCompare(targets[1]); 'step 2' @@ -13359,7 +13616,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ else{ var target=result.targets[0]; target.recover(); - target.gain(cards,player,'give'); + player.give(cards,target,'give'); target.draw(cards.length); } } @@ -14427,7 +14684,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(result.bool){ event.count--; player.logSkill('bushi',trigger.player); - trigger.player.gain(result.links[0],'give',player); + trigger.player.gain(result.links[0],'give',player,'bySelf'); } else event.finish(); 'step 3' @@ -15487,7 +15744,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(trigger.player.storage.rezhoufu2_markcount>=2){ delete trigger.player.storage.rezhoufu2_markcount; var cards=trigger.player.getExpansions('rezhoufu2'); - player.gain(cards,trigger.player); + player.gain(cards,trigger.player,'give','bySelf'); } else trigger.player.markSkill('rezhoufu2'); }, @@ -15656,7 +15913,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ event.finish(); } "step 1" - trigger.target.gain(result.cards,player,'give'); + player.give(result.cards,trigger.target,'give'); game.delay(); event.card=result.cards[0]; "step 2" @@ -15793,78 +16050,78 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return false; }, direct:true, - popup:false, preHidden:true, content:function(){ - "step 0" + 'step 0' if(trigger.delay==false) game.delay(); event.cards=[]; - event.logged=false; var cards2=trigger.getl(player).cards2; for(var i=0;i1; - }); - } - player.chooseCardButton(get.prompt('lirang'),event.cards,[1,event.cards.length]).set('ai',function(button){ - if(!_status.event.goon||ui.selected.buttons.length) return 0; - if(button.link.name=='du') return 2; - return 1; - }).set('goon',goon).setHiddenSkill(event.name); } - else{ - event.finish(); + if(!goon){ + goon=game.hasPlayer(function(current){ + return player!=current&&get.attitude(player,current)>1; + }); } - "step 2" + player.chooseButton(['礼让:是否分配本次弃置的牌?',event.cards], + [1,event.cards.length]).set('ai',function(button){ + if(_status.event.goon&&ui.selected.buttons.length==0) return 1+Math.abs(get.value(button.link)); + return 0; + }).set('goon',goon).setHiddenSkill('lirang'); + 'step 2' if(result.bool){ + event.cards.removeArray(result.links); event.togive=result.links.slice(0); - player.chooseTarget('将'+get.translation(result.links)+'交给一名角色',true,function(card,player,target){ - return target!=player; - }).set('ai',function(target){ + player.chooseTarget('选择一名其他角色获得'+get.translation(result.links),true,lib.filter.notMe).set('ai',function(target){ var att=get.attitude(_status.event.player,target); if(_status.event.enemy){ return -att; } + else if(att>0){ + return att/(1+target.countCards('h')); + } else{ - if(att>2) return att/Math.sqrt(1+target.countCards('h')); - return att/Math.sqrt(1+target.countCards('h'))/5; + return att/100; } }).set('enemy',get.value(event.togive[0],player,'raw')<0); } - else{ - //game.cardsDiscard(event.cards); - event.finish(); + else event.goto(4); + 'step 3' + if(result.targets.length){ + var id=result.targets[0].playerid,map=event.given_map; + if(!map[id]) map[id]=[]; + map[id].addArray(event.togive); } - "step 3" - if(result.bool){ - if(!event.logged){ - player.logSkill('lirang',result.targets); - event.logged=true; - } - else player.line(result.targets,'green'); - for(var i=0;i0) event.goto(1); + 'step 4' + if(_status.connectMode){ + game.broadcastAll(function(){delete _status.noclearcountdown;game.stopCountChoose()}); } - else{ - //game.cardsDiscard(event.cards); - event.finish(); + var list=[],targets=[]; + for(var i in event.given_map){ + var source=(_status.connectMode?lib.playerOL:game.playerMap)[i]; + list.push([source,event.given_map[i]]); + targets.push(source); + } + if(targets.length){ + player.logSkill('lirang',targets); + game.loseAsync({ + gain_list:list, + giver:player, + animate:'gain2', + }).setContent('gaincardMultiple'); } }, ai:{ @@ -16297,7 +16554,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ "step 0" player.awakenSkill('cunsi'); var cards=player.getCards('h'); - target.gain(cards,player,'giveAuto'); + player.give(cards,target); player.storage.cunsi=true; game.delay(); target.addSkill('yongjue'); @@ -16638,7 +16895,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player.draw(); "step 2" var cards=player.getCards('h'); - target.gain(cards,player,'giveAuto'); + player.give(cards,target); event.num=cards.length; "step 3" var he=target.getCards('he'); @@ -16646,7 +16903,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ else if(he.length<=num) event._result={cards:he}; else target.chooseCard('选择还给'+get.translation(player)+'的牌',true,event.num,'he'); "step 4" - player.gain(result.cards,target,'giveAuto'); + target.give(result.cards,player); }, audio:2, }, @@ -17175,7 +17432,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ "step 1" if(result.bool){ event.card=result.links[0]; - player.respond(event.card,'highlight').nopopup=true; + player.respond(event.card,'highlight','noOrdering').nopopup=true; } else{ event.finish(); @@ -17429,7 +17686,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } "step 1" if(result.bool&&!event.directfalse){ - player.storage.bifa2[1].gain(result.cards,player,'giveAuto'); + player.give(result.cards,player.storage.bifa2[1]); player.gain(player.storage.bifa2[0],'draw'); } else{ @@ -17672,8 +17929,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ else player.chooseCard('he',true,player.storage.lihun.hp,'离魂:选择要交给'+get.translation(player.storage.lihun)+'的牌'); } "step 1" - player.storage.lihun.gain(result.cards,player); - player.$give(result.cards.length,player.storage.lihun); + player.give(result.cards,player.storage.lihun); } }, yuanhu:{ @@ -17839,7 +18095,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ content:function(){ "step 0" event.target1=targets[0]; - targets[0].gain(cards,player,'giveAuto'); + player.give(cards,targets[0],'giveAuto'); "step 1" if(!targets[0].countCards('h')){ event.finish(); @@ -18710,14 +18966,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return event.lianhuanable==true&&event.player.isAlive(); }, frequent:true, - content:function (){ - "step 0" - event.cards=get.cards(game.countPlayer(function(current){ + content:function(){ + 'step 0' + event.cards=game.cardsGotoOrdering(get.cards(game.countPlayer(function(current){ return current.isLinked(); - })+1); - "step 1" + })+1)).cards; + if(_status.connectMode) game.broadcastAll(function(){_status.noclearcountdown=true}); + event.given_map={}; + 'step 1' if(event.cards.length>1){ - player.chooseCardButton('【称好】:请选择要分配的牌',true,event.cards,[1,event.cards.length]).set('ai',function(button){ + player.chooseCardButton('称好:请选择要分配的牌',true,event.cards,[1,event.cards.length]).set('ai',function(button){ if(ui.selected.buttons.length==0) return 1; return 0; }); @@ -18728,13 +18986,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ else{ event.finish(); } - "step 2" + 'step 2' if(result.bool){ - for(var i=0;i0) event.goto(1); + 'step 4' + if(_status.connectMode){ + game.broadcastAll(function(){delete _status.noclearcountdown;game.stopCountChoose()}); + } + var list=[]; + for(var i in event.given_map){ + var source=(_status.connectMode?lib.playerOL:game.playerMap)[i]; + player.line(source,'green'); + list.push([source,event.given_map[i]]); + } + game.loseAsync({ + gain_list:list, + giver:player, + animate:'draw', + }).setContent('gaincardMultiple'); }, }, "jianjie_faq":{}, @@ -19265,6 +19536,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ puyuan:['puyuan','ol_puyuan'], huangzu:['dc_huangzu','huangzu'], huojun:['huojun','tw_huojun'], + zhaoyǎn:['dc_zhaoyǎn','zhaoyǎn'], }, translate:{ "xinfu_lingren":"凌人", @@ -19410,7 +19682,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ wangyun:'王允', sunqian:'孙乾', xizhicai:'戏志才', - liuye:'刘晔', beimihu:'卑弥呼', luzhi:'鲁芝', bianfuren:'卞夫人', @@ -20220,7 +20491,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ olqisi_info:'①游戏开始时,你获得两张副类别不同的牌,并将这些牌置入你的装备区。②摸牌阶段开始时,你可以少摸一张牌并声明一种装备牌的副类别,然后从牌堆或弃牌堆中获得一张该副类别的牌。', olzhuiji:'追击', olzhuiji_info:'锁定技。①你至体力值不大于你的角色的距离为1。②当你使用【杀】指定距离为1的角色为目标后,你令其选择一项:⒈弃置一张牌。⒉重铸装备区内的所有牌。', - zhaoyǎn:'赵俨', + zhaoyǎn:'OL赵俨', tongxie:'同协', tongxie_info:'出牌阶段开始时,你可以选择包括你在内的至多三名角色(你与这些角色均称为“同协角色”)。这些角色中手牌数唯一最少的角色摸一张牌,且你获得如下效果直到你下回合开始:①当有“同协角色”对唯一目标角色使用的【杀】结算结束后,其他“同协角色”可以依次对目标角色使用一张【杀】(无距离和次数限制,且不能再触发此效果)。②当有“同协角色”受到伤害时,其他“同协角色”(本回合内失去过体力的角色除外)可以防止此伤害,失去1点体力。', jin_zhouchu:'周处', @@ -20263,6 +20534,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ olzeyue_info:'限定技。准备阶段,你可以选择一名于你的上个回合结束后对你造成过伤害的角色A及其武将牌上的一个非锁定技B,令A的B失效。然后每轮游戏开始时,A依次视为对你使用X张【杀】(X为B失效状态下经过的完整轮数)。当你因这些【杀】受到伤害后,你令A恢复技能B。', xindiaodu:"调度", xindiaodu_info:"①每回合限一次,与你势力相同的角色使用装备牌时,其可以摸一张牌。②出牌阶段开始时,你可以获得与你势力相同的一名角色装备区内的一张牌,然后你可以将此牌交给另一名与你势力相同的其他角色。", + olhuanshi:'缓释', + olhuanshi_info:'一名角色的判定牌生效前,你可以令其观看你的牌并其中的一张牌,你打出此牌代替判定牌。然后你可以重铸任意张牌(每回合限重铸一次)。', + olhongyuan:'弘援', + olhongyuan_info:'每阶段限一次。当你一次性获得至少两张牌以后,你可以将至多两张牌交给等量名角色。', + olmingzhe:'明哲', + olmingzhe_info:'锁定技。当你于出牌阶段外失去红色牌后,你展示这些牌中所有背面朝上移动的牌(没有则不展示),然后摸一张牌。', sp_tianji:'天极·皇室宗亲', sp_sibi:'四弼·辅国文曲', diff --git a/character/sp2.js b/character/sp2.js index 9ce6f7525..b3e3b647c 100644 --- a/character/sp2.js +++ b/character/sp2.js @@ -4,6 +4,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ name:'sp2', connect:true, character:{ + dc_zhaoyǎn:['male','wei',3,['dcfuning','dcbingji']], + wangwei:['male','qun',4,['dcruizhan','dcshilie']], + dc_liuye:['male','wei',3,['dcpoyuan','dchuace']], + luyi:['female','qun',3,['dcyaoyi','dcfuxue']], dingshangwan:['female','wei',3,['dcfengyan','dcfudao']], chengui:['male','qun',3,['dcyingtu','dccongshi']], dc_huban:['male','wei',4,['dcchongyi']], @@ -189,10 +193,648 @@ game.import('character',function(lib,game,ui,get,ai,_status){ sp2_huangjia:['caomao','liubian','dc_liuyu'], sp2_zhangtai:['guozhao','fanyufeng','ruanyu','yangwan','re_panshu'], sp2_jinse:['caojinyu','re_sunyi','re_fengfangnv','caohua','laiyinger','zhangfen'], - sp_decade:['huaman','caobuxing','re_maliang','xin_baosanniang','re_xinxianying','dongxie','zhouyi','dc_jiben','zhaoang','dc_liuba','liuhui','guanhai','quanhuijie','yinfuren','dc_huangquan','dc_huban','chengui','dingshangwan'], + sp_decade:['huaman','caobuxing','re_maliang','xin_baosanniang','re_xinxianying','dongxie','zhouyi','dc_jiben','zhaoang','dc_liuba','liuhui','guanhai','quanhuijie','yinfuren','dc_huangquan','dc_huban','chengui','dingshangwan','luyi','dc_liuye','wangwei','dc_zhaoyǎn'], } }, skill:{ + //赵俨 + dcfuning:{ + audio:2, + trigger:{player:'useCard'}, + prompt2:function(event,player){ + return '摸两张牌,然后弃置'+get.cnNumber(1+player.getHistory('useSkill',function(evt){ + return evt.skill=='dcfuning'; + }).length)+'张牌'; + }, + check:function(event,player){ + return player.getHistory('useSkill',function(evt){ + return evt.skill=='dcfuning'; + }).length<2; + }, + content:function(){ + player.draw(2); + player.chooseToDiscard('he',true,+player.getHistory('useSkill',function(evt){ + return evt.skill=='dcfuning'; + }).length); + }, + }, + dcbingji:{ + audio:2, + enable:'phaseUse', + usable:4, + filter:function(event,player){ + var hs=player.getCards('h'),suits=player.getStorage('dcbingji_mark'); + if(!hs.length) return false; + var suit=get.suit(hs[0],player); + if(suit=='none'||suits.contains(suit)) return false; + for(var i=1;ifalse, + selectCard:-1, + filterTarget:function(card,player,target){ + if(!card) card=get.card(); + if(player==target) return false; + return lib.filter.targetEnabled2(card,player,target)&&lib.filter.targetInRange(card,player,target); + }, + selectTarget:1, + ignoreMod:true, + filterOk:()=>true, + precontent:function(){ + player.logSkill('dcbingji'); + delete event.result.skill; + var hs=player.getCards('h'); + player.showCards(hs,get.translation(player)+'发动了【秉纪】'); + player.markAuto('dcbingji_mark',[get.suit(hs[0],player)]); + player.addTempSkill('dcbingji_mark'); + }, + } + }, + prompt:function(links,player){ + return '请选择【'+get.translation(links[0][2])+'】的目标'; + }, + }, + subSkill:{ + mark:{ + charlotte:true, + onremove:true, + trigger:{player:'useCard1'}, + forced:true, + popup:false, + firstDo:true, + filter:function(event,player){ + return event.addCount!==false&&event.card.name=='sha'&&event.card.storage&&event.card.storage.dcbingji; + }, + content:function(){ + trigger.addCount=false; + player.getStat('card').sha--; + }, + }, + }, + }, + //王威 + dcruizhan:{ + audio:2, + trigger:{global:'phaseZhunbeiBegin'}, + filter:function(event,player){ + return player!=event.player&&event.player.countCards('h')>=Math.max(1,event.player.hp)&&player.canCompare(event.player); + }, + logTarget:'player', + check:function(event,player){ + var goon=player.hasCard(function(card){ + return card.name=='sha'||get.value(card)<=5; + }); + var target=event.player; + if(goon&&get.attitude(player,target)<0){ + return get.effect(target,{name:'sha'},player,player)>0; + } + return 0; + }, + content:function(){ + 'step 0' + event.target=trigger.player; + player.chooseToCompare(event.target).set('ai',function(card){ + if(typeof card=='string'&&lib.skill[card]){ + var ais=lib.skill[card].check||function(){return 0}; + return ais(); + } + var player=get.owner(card); + var getn=function(card){ + if(player.hasSkill('tianbian')&&get.suit(card)=='heart') return 13; + return get.number(card); + } + var event=_status.event.getParent(); + var to=(player==event.player?event.target:event.player); + var addi=(get.value(card)>=8&&get.type(card)!='equip')?-6:0; + if(card.name=='du') addi-=5; + if(player==event.player){ + if(get.name(card,player)=='sha'){ + return 10+getn(card); + } + return getn(card)-get.value(card)/2+addi; + } + else{ + if(get.name(card,player)=='sha'){ + return -10-getn(card)-get.value(card)/2+addi; + } + return getn(card)-get.value(card)/2+addi; + } + }); + 'step 1' + var bool1=result.bool; + var bool2=(get.name(result.player,player)=='sha'||get.name(result.target,target)=='sha'); + if(bool1||bool2){ + if(player.canUse('sha',target)){ + player.useCard({name:'sha',isCard:true},target,false); + if(!bool1||!bool2) event.finish(); + } + else event.finish(); + } + else event.finish(); + 'step 2' + if(target.hasCard(function(card){ + return lib.filter.canBeGained(card,target,player) + },'he')&&player.hasHistory('sourceDamage',function(evt){ + var evtx=evt.getParent('useCard'); + return evtx&&evtx.card==evt.card&&evtx.getParent()==event; + })) player.gainPlayerCard(target,true,'he'); + }, + }, + dcshilie:{ + audio:2, + enable:'phaseUse', + usable:1, + chooseButton:{ + dialog:function(event,player){ + return ui.create.dialog('示烈:请选择一项',[[ + ['recover','回复1点体力,将两张牌置于武将牌上作为“示烈”'], + ['losehp','失去1点体力,获得两张“示烈”牌'], + ],'textbutton'],'hidden'); + }, + check:function(button){ + return button.link=='recover'?1:0; + }, + backup:function(links,player){ + return get.copy(lib.skill['dcshilie_'+links[0]]); + }, + prompt:()=>'点击“确定”以执行选项', + }, + intro:{ + markcount:'expansion', + content:'expansion', + }, + onremove:function(player,skill){ + var cards=player.getExpansions(skill); + if(cards.length) player.loseToDiscardpile(cards); + delete player.storage.dcmingfa_info; + }, + group:'dcshilie_die', + ai:{ + order:0.5, + result:{ + player:function(player){ + if(player.isDamaged()&&!player.countCards('h','tao')) return 1; + return 0; + }, + }, + }, + subSkill:{ + backup:{}, + recover:{ + audio:'dcshilie', + selectCard:-1, + selectTarget:-1, + filterCard:()=>false, + filterTarget:()=>false, + multitarget:true, + content:function(){ + 'step 0' + player.recover(); + 'step 1' + var hs=player.getCards('he'); + if(!hs.length) event.finish(); + else if(hs.length<=2) event._result={bool:true,cards:hs}; + else player.chooseCard('he',2,true,'选择两张牌作为“示烈”牌'); + 'step 2' + if(result.bool){ + player.addToExpansion(result.cards,player,'give').gaintag.add('dcshilie'); + } + else event.finish(); + 'step 3' + var cards=player.getExpansions('dcshilie'); + if(cards.length>game.countPlayer()){ + player.loseToDiscardpile(cards.slice(0,cards.length-game.countPlayer())); + } + }, + }, + losehp:{ + audio:'dcshilie', + selectCard:-1, + selectTarget:-1, + filterCard:()=>false, + filterTarget:()=>false, + multitarget:true, + content:function(){ + 'step 0' + player.loseHp(); + 'step 1' + var hs=player.getExpansions('dcshilie'); + if(!hs.length) event.finish(); + else if(hs.length<=2) event._result={bool:true,links:hs}; + else player.chooseButton(['选择获得两张“示烈”牌',hs],2,true); + 'step 2' + if(result.bool){ + player.gain(result.links,'gain2'); + } + }, + }, + die:{ + audio:'dcshilie', + forceDie:true, + trigger:{player:'die'}, + filter:function(event,player){ + return player.getExpansions('dcshilie').length>0; + }, + direct:true, + skillAnimation:true, + animationColor:'metal', + content:function(){ + 'step 0' + player.chooseTarget(get.prompt('dcshilie'),'令一名角色获得你的“示烈”牌',function(card,player,target){ + return target!=player&&target!=_status.event.getTrigger().source; + }); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + player.logSkill('dcshilie_die',target); + player.give(player.getExpansions('dcshilie'),target,'give'); + } + }, + }, + }, + }, + //刘晔 + dcpoyuan:{ + audio:2, + trigger:{ + global:'phaseBefore', + player:['phaseZhunbeiBegin','enterGame'], + }, + filter:function(event,player){ + if(event.name=='phase'&&game.phaseNumber>0) return false; + if(player.getEquip('pilitoushiche')){ + return game.hasPlayer(function(current){ + return current!=player&¤t.countDiscardableCards(player,'e')>0; + }); + } + else{ + return !player.isDisabled(5)&&player.countCards('he')>0; + } + }, + direct:true, + content:function(){ + 'step 0' + if(player.getEquip('pilitoushiche')){ + event.goto(2); + player.chooseTarget(get.prompt('dcpoyuan'),'弃置一名其他角色的至多两张装备牌',function(card,player,target){ + return target!=player&&target.countDiscardableCards(player,'e')>0; + }).set('ai',function(target){ + var player=_status.event.player,cards=target.getDiscardableCards(player,'e'); + var att=get.attitude(player,target); + if(att<0&&target.hasSkillTag('noe')) att/=2; + var zheng=[],fu=[]; + for(var i of cards){ + var val=get.value(i,target); + if(val>0) zheng.push(i); + else fu.push(i); + } + zheng.sort((a,b)=>get.value(b,target)-get.value(a,target)); + fu.sort((a,b)=>get.value(b,target)-get.value(a,target)); + zheng=zheng.slice(0,2); + fu=fu.slice(0,2); + var eff1=0,eff2=0; + for(var i of zheng) eff1+=get.value(i,target); + for(var i of fu) eff2+=(1-get.value(i,target)); + return -att*Math.max(effe1,eff2); + }); + } + else{ + player.chooseToDiscard('he',get.prompt('dcpoyuan'),'弃置一张牌,装备一张【霹雳投石车】').set('ai',function(card){ + return 7.5-get.value(card); + }).logSkill='dcpoyuan'; + } + 'step 1' + if(result.bool){ + var card=game.createCard('pilitoushiche','diamond',9); + player.$gain2(card); + game.delayx(); + player.equip(card); + } + event.finish(); + 'step 2' + if(result.bool){ + var target=result.targets[0]; + player.logSkill('dcpoyuan',target); + player.discardPlayerCard(target,true,'e',[1,2]) + } + }, + }, + dchuace:{ + audio:2, + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return event.dchuace&&event.dchuace.length>0&&player.countCards('hs')>0; + }, + onChooseToUse:function(event){ + if(game.online||event.dchuace) return; + var list=lib.inpile.filter(function(i){ + return get.type(i)=='trick'&&lib.filter.filterCard({name:i},event.player,event); + }); + if(!list.length){ + event.set('dchuace',list); + return; + } + var history=_status.globalHistory; + var stop=false; + for(var i=history.length-1;i>=0;i--){ + var evt=history[i]; + if(!stop){ + if(evt.isRound) stop=true; + continue; + } + else{ + for(var j of evt.useCard) list.remove(j.card.name); + if(evt.isRound) break; + } + } + event.set('dchuace',list); + }, + chooseButton:{ + dialog:function(event,player){ + return ui.create.dialog('画策',[event.dchuace,'vcard'],'hidden'); + }, + check:function(button){ + var player=_status.event.player,card={name:button.link[2]}; + return player.getUseValue(card); + }, + backup:function(links,player){ + return { + audio:'dchuace', + viewAs:{name:links[0][2]}, + ai1:(card)=>7-get.value(card), + filterCard:true, + position:'hs', + popname:true, + } + }, + prompt:function(links,player){ + return '将一张手牌当做【'+get.translation(links[0][2])+'】使用'; + }, + }, + ai:{ + order:6, + result:{player:1}, + }, + subSkill:{backup:{}}, + }, + pilitoushiche:{ + trigger:{player:'useCard'}, + forced:true, + equipSkill:true, + filter:function(event,player){ + return get.type(event.card)=='basic'; + }, + content:function(){ + if(player==_status.currentPhase) trigger.baseDamage++; + else player.draw(); + }, + }, + //路易 + dcyaoyi:{ + audio:2, + getZhuanhuanji:function(player,bool){ + var skills=player.getSkills(null,false,false).filter(function(i){ + var info=get.info(i); + return info&&!info.charlotte&&info.zhuanhuanji; + }); + if(!bool) return skills; + if(!skills.length) return 'none'; + var state=lib.skill.dcyaoyi.getState(player,skills[0]); + for(var i=1;i0&&!player.getStat('skill').dcshoutan; + }, + selectCard:function(){ + if(_status.event.player.hasSkill('dcyaoyi')) return [0,1]; + return [1,1]; + }, + filterCard:function(card,player){ + if(player.hasSkill('dcyaoyi')) return false; + var color=get.color(card,player); + if(player.storage.dcshoutan) return color=='black'; + return color!='black'; + }, + prompt:function(){ + var player=_status.event.player; + if(player.hasSkill('dcyaoyi')) return '点击“确认”来变更转换技状态'; + if(player.storage.dcshoutan) return '弃置一张黑色手牌,变更转换技状态'; + return '弃置一张非黑色手牌,变更转换技状态'; + }, + check:function(card){ + return 11-get.value(card); + }, + content:function(){ + player.changeZhuanhuanji('dcshoutan'); + player.addTempSkill('dcshoutan_blocker',{player:['useCard1','useSkillBegin','phaseUseEnd']}); + }, + zhuanhuanji:true, + mark:true, + marktext:'☯', + intro:{ + content:function(storage,player){ + if(storage) return '转换技。出牌阶段限一次,你可以弃置一张黑色手牌。'; + return '转换技。出牌阶段限一次,你可以弃置一张不为黑色的手牌。'; + }, + }, + ai:{ + order:0.1, + result:{ + player:function(player){ + var base=0; + if(ui.selected.cards.length) base=get.value(ui.selected.cards[0]); + var status=player.storage.dcshoutan; + var cards=player.getCards('hs',function(card){ + return !ui.selected.cards.contains(card); + }); + for(var card of cards){ + var val1=player.getUseValue(card,null,true); + player.storage.dcshoutan=!status; + var val2=0; + try{ + val2=player.getUseValue(card,null,true); + }catch(e){ + player.storage.dcshoutan=status; + } + player.storage.dcshoutan=status; + if(val2>val1) base-=(val2-val1); + } + if(base<0) return 1; + return 0; + }, + }, + }, + subSkill:{blocker:{charlotte:true}}, + }, + dcfuxue:{ + audio:2, + trigger:{player:'phaseZhunbeiBegin'}, + direct:true, + filter:function(event,player){ + return player.hp>0&&ui.discardPile.childNodes.length>0; + }, + content:function(){ + 'step 0' + var cards=Array.from(ui.discardPile.childNodes); + var gains=cards.slice(0); + var history=game.getAllGlobalHistory('cardMove',function(evt){ + if(evt.name=='lose') return evt.position==ui.discardPile; + return evt.name=='cardsDiscard'; + }); + for(var i=history.length-1;i>=0;i--){ + var evt=history[i]; + var cards2=evt.cards.filter(function(card){ + return cards.contains(card); + }); + if(cards2.length){ + if(lib.skill.dcfuxue.isUse(evt)){ + gains.removeArray(cards2); + } + cards.removeArray(cards2); + } + if(!cards.length) break; + } + if(gains.length){ + var num=player.hp; + player.chooseButton([ + '复学:选择获得'+(num>0?'至多':'')+get.cnNumber(num)+'张牌', + gains, + ],[1,num]).set('ai',function(button){ + var player=_status.event.player,card=button.link; + var getn=function(card){ + return player.countCards('h',card.name)+ui.selected.buttons.filter((button)=>button.link.name==card.name).length; + } + var val=player.getUseValue(card); + if(card.name=='tao'&&getn(card)>=player.getDamagedHp()) return 0; + if(card.name=='sha'&&getn(card)>=player.getCardUsable('sha')) return 0; + return val; + }); + } + else event.finish(); + 'step 1' + if(result.bool){ + player.logSkill('dcfuxue'); + player.gain(result.links,'gain2').gaintag.add('dcfuxue'); + } + }, + isUse:function(event){ + if(event.name!='cardsDiscard') return false; + var evtx=event.getParent(); + if(evtx.name!='orderingDiscard') return false; + var evt2=(evtx.relatedEvent||evtx.getParent()); + return (evt2.name=='phaseJudge'||evt2.name=='useCard'); + }, + group:'dcfuxue_draw', + subSkill:{ + draw:{ + trigger:{player:'phaseJieshuBegin'}, + forced:true, + locked:false, + mod:{ + aiOrder:function(player,card,num){ + if(get.itemtype(card)=='card'&&card.hasGaintag('dcfuxue')) return num+0.5; + }, + }, + filter:function(event,player){ + return player.hp>0&&!player.hasCard(function(card){ + return card.hasGaintag('dcfuxue'); + },'h'); + }, + content:function(){ + player.draw(player.hp); + }, + }, + }, + }, //丁尚涴 dcfengyan:{ enable:'phaseUse', @@ -247,7 +889,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player.addTempSkill('dcfengyan_gain','phaseUseAfter'); target.chooseCard('h',true,'交给'+get.translation(player)+'一张牌'); 'step 1' - if(result.bool) player.gain(result.cards,target,'giveAuto'); + if(result.bool) target.give(result.cards,player); }, ai:{ tag:{ @@ -399,26 +1041,55 @@ game.import('character',function(lib,game,ui,get,ai,_status){ //陈珪 dcyingtu:{ audio:2, - trigger:{global:'gainAfter'}, + trigger:{ + global:['gainAfter','loseAsyncAfter'], + }, usable:1, filter:function(event,player){ - var target=event.player; - if(target!=player.getNext()&&target!=player.getPrevious()) return false; + return lib.skill.dcyingtu.filterx(event,player,player.getNext())||lib.skill.dcyingtu.filterx(event,player,player.getPrevious()); + }, + filterx:function(event,player,target){ var evt=event.getParent('phaseDraw'); if(evt&&target==evt.player) return false; - return target.hasCard(function(card){ + return event.getg(target).length>0&&target.hasCard(function(card){ return lib.filter.canBeGained(card,target,player) },'he'); }, logTarget:'player', - check:function(event,player){ - var source=event.player; - var target=(event.player==player.getNext()?player.getPrevious():player.getNext()); + direct:true, + checkx:function(player,source){ + var target=(source==player.getNext()?player.getPrevious():player.getNext()); return Math.min(0,get.attitude(player,target))>=get.attitude(player,source); }, content:function(){ 'step 0' - var target=trigger.player; + var targets=[]; + event.targets=targets; + if(lib.skill.dcyingtu.filterx(trigger,player,player.getNext())) targets.add(player.getNext()); + if(lib.skill.dcyingtu.filterx(trigger,player,player.getPrevious())) targets.add(player.getPrevious()); + 'step 1' + var target=targets.shift(); + event.target=target; + player.chooseBool( + get.prompt('dcyingtu',target), + '获得该角色的一张牌,然后将一张牌交给该角色的对位角色。若你给出的是装备牌,则其使用其获得的牌。' + ).set('goon',lib.skill.dcyingtu.checkx(player,target)).set('ai',function(){ + return _status.event.goon; + }); + 'step 2' + if(result.bool){ + player.logSkill('dcyingtu',target); + var next=game.createEvent('dcyingtu_insert'); + next.player=player; + next.target=target; + next.setContent(lib.skill.dcyingtu.contentx); + event.finish(); + } + else if(targets.length>0) event.goto(1); + else player.storage.counttrigger.dcyingtu--; + }, + contentx:function(){ + 'step 0' event.side=(target==player.getPrevious()?'getNext':'getPrevious'); player.gainPlayerCard(target,true,'he'); 'step 1' @@ -435,7 +1106,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ var card=result.cards[0]; event.card=card; player.line(target); - target.gain(card,player,'giveAuto'); + player.give(card,target); } else event.finish(); 'step 3' @@ -534,7 +1205,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ keep:{ charlotte:true, mod:{ - cardUsable:function(player,num){ + maxHandcard:function(player,num){ return num+player.countMark('dcchongyi_keep'); }, }, @@ -732,8 +1403,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(result.bool){ var target=result.targets[0]; player.logSkill('dctujue',target); + player.awakenSkill('dctujue'); var cards=player.getCards('he'); - target.gain(cards,player,'giveAuto'); + player.give(cards,target); player.recover(cards.length); player.draw(cards.length); } @@ -789,7 +1461,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ 'step 5' if(result.control!='cancel2'){ var i=result.index; - targets[i].gain(cards[1-i],targets[1-i],'give'); + targets[1-i].gain(cards[1-i],targets[i],'give'); } }, onremove:true, @@ -815,7 +1487,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ 'step 0' player.awakenSkill('dcyongbi'); if(player.hasSkill('dcyingyu',null,null,false)) player.storage.dcyingyu=true; - target.gain(cards,player,'giveAuto'); + player.give(cards,target); 'step 1' var list=[]; for(var i of cards){ @@ -1231,7 +1903,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } else{ event.goto(3); - player.chooseTarget(true,lib.filter.notMe,'令一名其他角色获得'+get.translation(event.cards[0])).set('ai',function(target){ + player.chooseTarget(true,lib.filter.notMe,'将'+get.translation(event.cards[0])+'交给一名其他角色').set('ai',function(target){ return get.attitude(_status.event.player,target); }); } @@ -1246,7 +1918,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(result.bool){ var target=result.targets[0]; player.line(target,'green'); - target.gain(cards,player,'giveAuto'); + player.give(cards,target); player.addMark('dcliehou',1); } }, @@ -2801,7 +3473,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, content:function(){ var list=player.storage.dcditing_effect; - player.gain(list[0],list[1],'giveAuto'); + player.gain(list[0],list[1],'giveAuto','bySelf'); }, }, }, @@ -3155,7 +3827,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ var target=result.targets[0]; event.target=target; player.line(target,'green'); - target.gain(card,trigger.player,'give'); + target.gain(card,trigger.player,'give').giver=player; 'step 3' if(target.isMinHp()) target.recover(); }, @@ -6509,7 +7181,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ delay:false, content:function(){ 'step 0' - target.gain(cards,player,'giveAuto'); + player.give(cards,target); 'step 1' if(target.countCards('h')>0){ game.broadcastAll(function(num){ @@ -6698,7 +7370,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } else event.finish(); 'step 2' - target.gain(result.cards,player,'giveAuto'); + player.give(result.cards,target); var numx=0; for(var i of result.cards) numx+=get.number(i,player); if(numx>num) player.draw(); @@ -7261,7 +7933,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ event.target=target; player.logSkill('heqia',target); if(result.cards.length){ - target.gain(result.cards,player,'giveAuto'); + player.give(result.cards,target); event.source=target; event.num=result.cards.length; event.goto(4); @@ -7278,7 +7950,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ 'step 3' if(result.bool){ event.source=player; - player.gain(result.cards,target,'giveAuto'); + target.give(result.cards,player); event.num=result.cards.length; } else event.finish(); @@ -7598,13 +8270,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, content:function(){ 'step 0' - target.gain(cards,player,'giveAuto'); + player.give(cards,target); 'step 1' var next=target.chooseCard('he',[2,Infinity],'交给'+get.translation(player)+'至少两张装备牌,否则受到1点伤害',{type:'equip'}); if(get.damageEffect(target,player,target)>=0) next.set('ai',()=>-1); else next.set('ai',(card)=>ui.selected.cards.length<2?(6-get.value(card)):0); 'step 2' - if(result.bool) player.gain(result.cards,target,'giveAuto'); + if(result.bool) target.give(result.cards,player); else target.damage('nocard'); }, ai:{ @@ -7708,8 +8380,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ while(cards.length){ ui.cardPile.insertBefore(cards.pop().fix(),ui.cardPile.firstChild); } - trigger.player.gain(moved[1],'gain2'); - if(moved[2].length) player.gain(moved[2],'gain2'); + var list=[[trigger.player,moved[1]]]; + if(moved[2].length) list.push([player,moved[2]]); + game.loseAsync({ + gain_list:list, + giver:player, + animate:'gain2', + }).setContent('gaincardMultiple'); } }, mark:true, @@ -8078,7 +8755,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }*/ } 'step 2' - if(result.bool) event.gainner.gain(result.cards,event.giver,'giveAuto'); + if(result.bool) event.giver.give(result.cards,event.gainner); }, ai:{ order:8, @@ -8228,7 +8905,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, content:function(){ 'step 0' - target.gain(cards,player,'giveAuto').gaintag.add('fengxiang_tag'); + player.give(cards,target).gaintag.add('fengxiang_tag'); 'step 1' var list=[]; for(var name of lib.inpile){ @@ -9133,7 +9810,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } else event.finish(); 'step 9' - if(result.bool) player.gain(result.cards,target,'giveAuto'); + if(result.bool) target.give(result.cards,player,'giveAuto'); }, }, rexingluan:{ @@ -9302,35 +9979,77 @@ game.import('character',function(lib,game,ui,get,ai,_status){ //杜夫人 yise:{ audio:2, - trigger:{global:'gainAfter'}, + trigger:{ + global:'gainAfter', + player:'loseAsyncAfter', + }, filter:function(event,player){ - if(player==event.player||!event.player.isIn()) return false; - var evt=event.getl(player); - if(!evt||!evt.cards2.length) return false; - if(event.player.isDamaged()) return true; - for(var i of evt.cards2){ - var color=get.color(i,player); - if(color=='black') return true; + if(event.name=='loseAsync'){ + if(event.type!='gain') return false; } - return false; + var cards=event.getl(player).cards2; + return game.hasPlayer(function(current){ + if(current==player) return false; + var cardsx=event.getg(current); + for(var i of cardsx){ + if(cards.contains(i)){ + if(current.isDamaged()) return true; + return get.color(i,player)=='black'; + } + } + return false; + }); }, direct:true, content:function(){ 'step 0' var cards=trigger.getl(player).cards2; + event.cards=cards; + event.targets=game.filterPlayer(function(current){ + if(current==player) return false; + var cardsx=trigger.getg(current); + for(var i of cardsx){ + if(cards.contains(i)) return true; + } + return false; + }).sortBySeat(); + if(!event.targets.length) event.finish(); + 'step 1' + var target=targets.shift(); + var cardsx=trigger.getg(target); + var goon=false; + for(var i of cardsx){ + if(cards.contains(i)){ + if(target.isDamaged()||get.color(i,player)=='black'){goon=true;break;} + } + } + if(goon){ + var next=game.createEvent('yise_insert'); + next.player=player; + next.target=target; + next.cards=cardsx; + next.setContent(lib.skill.yise.contentx); + } + if(targets.length>0) event.redo(); + }, + contentx:function(){ + 'step 0' for(var i of cards){ event[get.color(i,player)]=true; if(event.red&&event.black) break; } - if(event.red&&trigger.player.isDamaged()){ - player.chooseBool(get.prompt('yise',trigger.player),'令'+get.translation(trigger.player)+'回复1点体力').set('ai',()=>get.recoverEffect(_status.event.getTrigger().player,_status.event.player,_status.event.player)>0); + if(event.red&&target.isDamaged()){ + player.chooseBool( + get.prompt('yise',target), + '令'+get.translation(target)+'回复1点体力' + ).set('ai',()=>get.recoverEffect(_status.event.getParent().target,_status.event.player,_status.event.player)>0); } 'step 1' - if(event.black||event.red&&result.bool) player.logSkill('yise',trigger.player); - if(event.red&&result.bool) trigger.player.recover(); + if(event.black||event.red&&result.bool) player.logSkill('yise',target); + if(event.red&&result.bool) target.recover(); if(event.black){ - trigger.player.addMark('yise_damage',1,false); - trigger.player.addSkill('yise_damage'); + target.addMark('yise_damage',1,false); + target.addSkill('yise_damage'); } }, subSkill:{ @@ -9396,7 +10115,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(result.bool){ var target=result.targets[0]; player.logSkill('shunshi',target); - target.gain(result.cards,player,'giveAuto'); + player.give(result.cards,target); player.addMark('shunshi_mark',1,false); player.addTempSkill('shunshi_mark',{player:'phaseEnd'}); } @@ -9445,7 +10164,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ hs.addArray(target.getCards('he',function(card){ return get.subtype(card)=='equip2'; })) - player.gain(hs,target,'give'); + player.gain(hs,target,'give','bySelf'); if(player.hasMark('zhtongyuan_basic')) event.finish(); else event.num=hs.length; } @@ -9459,7 +10178,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ else if(hs.length<=num) event._result={bool:true,cards:hs}; else player.chooseCard('he',true,'选择交给'+get.translation(target)+get.cnNumber(num)+'张牌',num); 'step 2' - if(result.bool&&result.cards&&result.cards.length) target.gain(result.cards,player,'giveAuto'); + if(result.bool&&result.cards&&result.cards.length) player.give(result.cards,target); }, ai:{ order:4, @@ -9804,7 +10523,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ else targets[1].chooseCard('h',true,'交给'+get.translation(player)+'一张手牌'); 'step 3' if(result.bool){ - player.gain(result.cards,targets[1],'giveAuto'); + targets[1].give(result.cards,player); } if(targets.length<3) event.goto(5); 'step 4' @@ -10206,7 +10925,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, content:function(){ 'step 0' - target.gain(cards,player,'give'); + player.give(cards,target); 'step 1' if(get.color(cards[0],player)=='red'){ player.draw(); @@ -10372,10 +11091,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(result.bool){ var target=result.targets[0]; player.logSkill('qljsuiren',target); - target.gain(player.getCards('h',function(card){ + player.giver(player.getCards('h',function(card){ var type=get.type(card,player); return (type=='basic'||type=='trick')&&get.tag(card,'damage')>0; - }),player,'giveAuto'); + }),target,'give'); } }, }, @@ -10433,7 +11152,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ var cards=target.getCards('h',function(card){ return get.suit(card,target)==result.control&&lib.filter.cardDiscardable(card,target,'yachai'); }); - if(cards.length) player.gain(cards,target,'give'); + if(cards.length) target.give(cards,player,'give'); event.finish(); 'step 4' target.chooseToDiscard('h',true,num); @@ -10642,10 +11361,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ subSkill:{ gain:{ audio:'fuzhong', - trigger:{player:'gainAfter'}, + trigger:{ + player:'gainAfter', + global:'loseAsyncAfter', + }, forced:true, filter:function(event,player){ - return player!=_status.currentPhase; + return player!=_status.currentPhase&&event.getg(player).length>0; }, content:function(){ player.addMark('fuzhong',1); @@ -10695,7 +11417,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(result.bool){ player.addTempSkill('xuezhao_sha'); player.addMark('xuezhao_sha',1,false); - player.gain(result.cards,target,'giveAuto'); + target.give(result.cards,player); target.draw(); } else{ @@ -10933,14 +11655,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){ subSkill:{ draw:{ audio:'jielie', - trigger:{global:'gainAfter'}, + trigger:{ + global:['gainAfter','loseAsyncAfter'], + }, forced:true, filter:function(event,player){ - return player.countMark('jielie_draw')<3&&event.player==player.storage.jielie&&event.player!=_status.currentPhase&&event.cards&&event.cards.length>0; + if(player.countMark('jielie_draw')>=3) return false; + var target=player.storage.jielie; + return target&&target==_status.currentPhase&&event.getg(target).length>0; }, logTarget:'player', content:function(){ - var num=Math.min(3-player.countMark('jielie_draw'),trigger.cards.length); + var num=Math.min(3-player.countMark('jielie_draw'),trigger.getg(player.storage.jielie).length); player.addMark('jielie_draw',num,false); player.draw(num); }, @@ -11287,7 +12013,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ 'step 1' if(result.bool){ var cards=result.cards,target=result.targets[0],num=Math.min(5,cards.length); - target.gain(cards,player,'giveAuto'); + player.give(cards,target); player.gainMaxHp(num); player.recover(num); } @@ -11360,7 +12086,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ else event.finish(); 'step 2' if(result.index==0){ - player.gain(target.getCards('h'),target,'giveAuto'); + target.give(target.getCards('h'),player); player.turnOver(); event.finish(); } @@ -11655,7 +12381,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }); var target=result.targets[0]; player.logSkill('reyirang',target); - target.gain(cards,player,'give'); + player.give(cards,target,'give'); if(target.maxHp>player.maxHp) player.gainMaxHp(target.maxHp-player.maxHp,true); player.recover(cards.length); } @@ -11717,7 +12443,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ 'step 3' if(result.bool){ var num=player.countMark('cslilu'); - result.targets[0].gain(result.cards,player,'giveAuto'); + player.give(result.cards,result.targets[0]); if(result.cards.length>num){ player.gainMaxHp(); player.recover(); @@ -11928,7 +12654,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } else{ event.recover=target; - target.gain(cards,player,'give'); + player.give(cards,target); } player.changeZhuanhuanji('bazhan'); 'step 1' @@ -12103,11 +12829,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:'recangchu', trigger:{ player:'gainAfter', + global:'loseAsyncAfter', }, forced:true, usable:1, filter:function(event,player){ - return player!=_status.currentPhase&&player.countMark('recangchu')0; }, content:function(){ player.addMark('recangchu',1); @@ -12168,6 +12895,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ filterTarget:function(card,player,target){ return target!=player; }, + filterOk:function(){ + return ui.selected.cards.length==ui.selected.targets.length; + }, complexSelect:true, position:'he', ai1:function(card){ @@ -12186,20 +12916,22 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } else event.finish(); 'step 3' - if(result.bool){ - while(result.cards.length){ - var target=result.targets.shift(); - var card=result.cards.shift(); - target.gain(card,player); - player.$giveAuto(card,target); + if(result.bool&&result.cards.length>0){ + var list=[]; + for(var i=0;i0){ + var list=[]; + for(var i=0;i1) player.addTempSkill('yanjiao2'); event.finish(); "step 8" @@ -17440,7 +18192,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ 'step 2' var cards=player.getCards('h'); cards.remove(result.cards[0]); - player.storage.zhafu_hf.gain(cards,player,'giveAuto'); + player.give(cards,player.storage.zhafu_hf); 'step 3' player.removeSkill('zhafu_hf'); }, @@ -19092,6 +19844,20 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, }, + pilitoushiche:{ + fullskin:true, + derivation:'dc_liuye', + cardimage:'ly_piliche', + type:'equip', + subtype:'equip5', + skills:['pilitoushiche'], + destroy:true, + ai:{ + basic:{ + equipValue:3 + } + }, + }, }, characterIntro:{ tangji:'唐姬,会稽太守唐瑁女,弘农怀王刘辩的妃子。刘辩死后,唐姬回归故里,因节烈不愿改嫁他人,后被汉献帝下诏封为弘农王妃。', @@ -19203,6 +19969,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ yinfuren:'尹夫人,原汉大将军何进的儿媳,丈夫早逝,生有一子何晏。曹操任司空时娶尹氏为妾,一并收养何晏,并生有一子曹矩。', chengui:'陈珪(生卒年不详),一作圭,字汉瑜。徐州下邳(治今江苏睢宁西北)人,广汉太守陈亹之孙,太尉陈球之侄,吴郡太守陈瑀(一作陈璃)、汝阴太守陈琮的从兄,陈登、陈应之父。官至沛相。', dingshangwan:'丁尚涴,又名丁夫人。东汉末年权臣曹操的原配夫人。丁尚涴嫁给曹操时,曹操另有刘夫人,生长子曹昂和清河长公主。后刘夫人早亡,曹昂便由丁尚涴抚养,丁尚涴视其为己出。
    建安二年(公元197年),曹昂随军出征宛城,战死沙场。丁尚涴悲痛欲绝,口出怨言数落曹操,又悲啼不止。曹操恼羞成怒,将其打发回了娘家。不久之后,心生悔意的曹操亲自前往丁家,打算将丁尚涴接回。然而丁尚涴却只是闷头织布。曹操手抚其背,说:“顾我共载归乎!”丁尚涴依旧不理不睬。曹操走到门口,又回过头:“得无尚可邪!”然而依旧得不到回应,只得感叹:“真诀矣。”于是与之和离,并让丁家允许她改嫁,丁家不敢为之。
    丁尚涴去世后,卞夫人请求曹操安葬她,于是葬在许城以南。后来曹操病重,知道自己时日无多,临终前叹道:“我前后行意,于心未曾有所负也。假令死而有灵,子修若问‘我母所在’,我将何辞以答!”', + luyi:'卢弈,游卡桌游《三国杀》中虚构的人物。设定为卢植之女。至情至孝。其人虽体弱多病,然而却天资聪颖,有过目不忘、出口成章之才。先后拜蔡邕、王允等人为师,纳诸家之长融会贯通。又善弈棋,曾与当时国手山子道、王九真、郭凯对弈,不分胜负,一时之间名动京华,被太学征辟为女博士,世人皆称其为“女先生”。董卓之乱后,卢弈随父亲隐居乡野,创办上谷学宫,邀天下士子论道。相传诸葛亮、曹植、荀彧、张昭等人都参加过。各学派在卢弈主持下论道,成为一时佳话。后上谷学宫遭曹魏所忌,卢弈为请求曹叡赦免学宫,与司马懿对无棋之弈。卢弈破指凝血,以血为棋,终胜司马懿半子。但却旧伤复发,局终而陨。', + wangwei:'王威,东汉末年人。荆州刺史刘表部下将领,乃忠义之士。刘表亡后,刘琮投降曹操,王威向刘琮献计偷袭曹操,刘琮没有采纳。小说《三国演义》中,曹操表刘琮为青州刺史,使远离故乡,时只有王威追随,曹操复遣于禁追杀刘琮等人,王威亦于乱军中殉主。', }, characterTitle:{ wulan:'#b对决限定武将', @@ -19303,6 +20071,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ var list=lib.skill.dchuishu.getList(player); return '摸牌阶段结束时,你可以摸['+list[0]+']张牌。若如此做:你弃置['+list[1]+']张手牌,且当你于本回合内弃置第['+list[2]+']+1张牌后,你从弃牌堆中获得一张锦囊牌。'; }, + dcshoutan:function(player){ + if(player.storage.dcshoutan) return '转换技。出牌阶段限一次,阴:你可以弃置一张不为黑色的手牌。阳:你可以弃置一张黑色手牌。'; + return '转换技。出牌阶段限一次,阴:你可以弃置一张不为黑色的手牌。阳:你可以弃置一张黑色手牌。'; + }, }, perfectPair:{}, characterReplace:{ @@ -19861,7 +20633,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ zhtongyuan_info:'锁定技。①当你使用红色锦囊牌后,你于〖摧坚〗后增加“若其手牌中没有【闪】,则你摸两张牌”;②当你使用或打出红色基本牌后,你删除〖摧坚〗中的“,然后你交给其等量的牌”。③当你使用红色的普通锦囊牌/基本牌时,若你已发动过〖摧坚①〗和〖摧坚②〗,则此牌不可被响应/可额外增加一个目标。', dufuren:'杜夫人', yise:'异色', - yise_info:'其他角色获得你的牌后,若这些牌中:有红色牌,你可令其回复1点体力;有黑色牌,其下次受到【杀】造成的伤害时,此伤害+1。', + yise_info:'其他角色得到你的牌后,若这些牌中:有红色牌,你可令其回复1点体力;有黑色牌,其下次受到【杀】造成的伤害时,此伤害+1。', shunshi:'顺世', shunshi_info:'准备阶段开始时,或当你受到伤害后,你可将一张牌交给一名不为伤害来源的其他角色并获得如下效果直到你的回合结束:摸牌阶段的额定摸牌数+1,使用【杀】的次数上限+1,手牌上限+1。', lvlingqi:'吕玲绮', @@ -20249,7 +21021,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ dcchongyi_info:'①一名角色使用【杀】时,若此牌是其于当前出牌阶段内使用的第一张牌,则你可以令其摸两张牌,且其本回合使用【杀】的次数上限+1。②一名角色的出牌阶段结束时,若其于此阶段内使用的第一张牌为【杀】,则你可以令其本回合的手牌上限+1。', chengui:'陈珪', dcyingtu:'营图', - dcyingtu_info:'每回合限一次。当你的上家/下家于出牌阶段外获得牌后,你可以获得其一张牌,然后将一张牌交给你的下家/上家。若你给出的牌为装备牌,则其使用之。', + dcyingtu_info:'每回合限一次。当你的上家/下家于摸牌阶段外获得牌后,你可以获得其一张牌,然后将一张牌交给你的下家/上家。若你给出的牌为装备牌,则其使用之。', dccongshi:'从势', dccongshi_info:'一名角色使用的装备牌结算结束后,若其装备区内的牌数为全场最多,则你摸一张牌。', dingshangwan:'丁尚涴', @@ -20257,6 +21029,30 @@ game.import('character',function(lib,game,ui,get,ai,_status){ dcfengyan_info:'出牌阶段每项各限一次。你可以:⒈令一名体力值不大于你的其他角色交给你一张手牌。⒉视为对一名手牌数不大于你的角色使用一张【杀】(无距离和次数限制)。', dcfudao:'抚悼', dcfudao_info:'游戏开始时,你选择一名其他角色,称为“继子”角色。当你或“继子”每回合首次使用牌指定对方为目标后,你与其各摸两张牌。当有角色杀死你或“继子”后,该角色称为“决裂”角色。当你或“继子”对“决裂”造成伤害后,此伤害+1。当你成为“决裂”角色使用牌的目标后,其本回合内不能再使用牌。', + luyi:'卢弈', + dcyaoyi:'邀弈', + dcyaoyi_info:'锁定技。①游戏开始时,你令所有存活且未拥有转换技的角色获得〖手谈〗。②你发动〖手谈〗时无需弃置牌,且无次数限制。③所有拥有转换技的角色不能使用牌指定其他拥有转换技且双方所有转换技状态均相同的角色为目标。', + dcfuxue:'复学', + dcfuxue_info:'①准备阶段,你可以从弃牌堆中选择获得至多X张不因使用而进入弃牌堆的牌。②结束阶段,若你的手牌区中没有因〖复学①〗获得的牌,则你摸X张牌(X为你的体力值)。', + dcshoutan:'手谈', + dcshoutan_info:'转换技。出牌阶段限一次,阴:你可以弃置一张不为黑色的手牌。阳:你可以弃置一张黑色手牌。', + dc_liuye:'刘晔', + dcpoyuan:'破垣', + dcpoyuan_info:'游戏开始时或准备阶段开始时,若你的装备区内:没有【霹雳投石车】,则你可以弃置一张牌,然后将一张【霹雳投石车】置入装备区;有【霹雳投石车】,则你可以弃置一名其他角色装备区内的至多两张牌。', + dchuace:'画策', + dchuace_info:'出牌阶段限一次。你可以将一张手牌当做上一轮内未被使用过的普通锦囊牌使用。', + pilitoushiche:'霹雳投石车', + pilitoushiche_info:'锁定技。①当你于回合内使用基本牌时,你令此牌的牌面数值+1。②当你于回合外使用基本牌时,你摸一张牌。③当此牌离开你的装备区时,销毁之。', + wangwei:'王威', + dcruizhan:'锐战', + dcruizhan_info:'其他角色的准备阶段开始时,若其的手牌数不小于其体力值,则你可以和其拼点。若你赢或拼点牌中有【杀】,则你视为对其使用一张【杀】。然后若此【杀】造成了伤害且以上两个条件均被满足,则你获得其一张牌。', + dcshilie:'示烈', + dcshilie_info:'①出牌阶段限一次。你可以选择一项:⒈回复1点体力,将两张牌置于武将牌上作为“示烈”。若“示烈”牌数大于存活人数,则你将最早的多余牌置入弃牌堆;⒉失去1点体力,获得两张“示烈”牌。(满血则不回血,无牌则不移动)②当你死亡时,你可以将所有“示烈”牌交给一名其他角色。', + dc_zhaoyǎn:'赵俨', + dcfuning:'抚宁', + dcfuning_info:'当你使用牌时,你可以摸两张牌,然后弃置X张牌(X为你本回合内发动过〖抚宁〗的次数)。', + dcbingji:'秉纪', + dcbingji_info:'出牌阶段每种花色各限一次。若你有手牌且这些牌的花色均相同,则你可以展示手牌,然后选择一名其他角色,视为对其使用一张【杀】或【桃】(有距离限制)。', sp_whlw:"文和乱武", sp_zlzy:"逐鹿中原", diff --git a/character/standard.js b/character/standard.js index ddeae9a47..ef74d3031 100755 --- a/character/standard.js +++ b/character/standard.js @@ -546,14 +546,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return (event.num>0) }, content:function(){ - "step 0" + 'step 0' event.count=trigger.num; - "step 1" + 'step 1' event.count--; - event.cards=get.cards(2); - "step 2" + event.cards=game.cardsGotoOrdering(get.cards(2)).cards; + if(_status.connectMode) game.broadcastAll(function(){_status.noclearcountdown=true}); + event.given_map={}; + 'step 2' if(event.cards.length>1){ - player.chooseCardButton('将“遗计”牌分配给任意角色',true,event.cards,[1,event.cards.length]).set('ai',function(button){ + player.chooseCardButton('遗计:请选择要分配的牌',true,event.cards,[1,event.cards.length]).set('ai',function(button){ if(ui.selected.buttons.length==0) return 1; return 0; }); @@ -562,15 +564,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ event._result={links:event.cards.slice(0),bool:true}; } else{ - event.goto(5); + event.finish(); } - "step 3" + 'step 3' if(result.bool){ - for(var i=0;i0) player.chooseBool(get.prompt2(event.name)).set('frequentSkill',event.name); - else event.finish(); - "step 6" + if(cards.length>0) event.goto(2); + 'step 5' + if(_status.connectMode){ + game.broadcastAll(function(){delete _status.noclearcountdown;game.stopCountChoose()}); + } + var list=[]; + for(var i in event.given_map){ + var source=(_status.connectMode?lib.playerOL:game.playerMap)[i]; + player.line(source,'green'); + list.push([source,event.given_map[i]]); + } + game.loseAsync({ + gain_list:list, + giver:player, + animate:'draw', + }).setContent('gaincardMultiple'); + if(event.count<=0) event.finish(); + 'step 6' + player.chooseBool(get.prompt2(event.name)).set('frequentSkill',event.name); + 'step 7' if(result.bool){ player.logSkill(event.name); event.goto(1); @@ -827,7 +842,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return 10-get.value(card); }, content:function(){ - target.gain(cards,player,'giveAuto'); + player.give(cards,target); var evt2=event.getParent(3); var num=0; player.getHistory('lose',function(evt){ @@ -1659,12 +1674,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ "step 1" game.log(target,'选择了'+get.translation(result.control)); event.choice=result.control; - target.popup(event.choice); - event.card=player.getCards('h').randomGet(); - target.gain(event.card,player,'give'); - game.delay(); + target.chat('我选'+get.translation(event.choice)); + target.gainPlayerCard(player,true,'h'); "step 2" - if(get.suit(event.card)+'2'!=event.choice) target.damage('nocard'); + if(result.bool&&get.suit(result.cards[0],player)+'2'!=event.choice) target.damage('nocard'); }, ai:{ order:1, @@ -2359,41 +2372,37 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, }, - "xinfu_jijie":{ + xinfu_jijie:{ enable:"phaseUse", usable:1, audio:2, - //filter:function(){ - //return ui.cardPile.hasChildNodes(); - //}, - content:function (){ + content:function(){ 'step 0' - //event.card=ui.cardPile.lastChild; - event.card=get.bottomCards()[0]; - var content=['牌堆底的一张牌',[event.card]]; - game.log(player,'观看了牌堆底的一张牌'); - player.chooseControl('ok').set('dialog',content); - 'step 1' - player.chooseTarget('选择获得此牌的角色').set('ai',function(target){ - var att=get.attitude(_status.event.player,target); - if(_status.event.du){ - if(target.hasSkillTag('nodu')) return 0.5; - return -att; - } + var card=get.bottomCards()[0]; + game.cardsGotoOrdering(card); + event.card=card; + player.chooseTarget(true).set('ai',function(target){ + var att=get.attitude(_status.event.player,target); + if(_status.event.du){ + if(target.hasSkillTag('nodu')) return 0.5; + return -att; + } if(att>0){ - if(_status.event.player!=target) att+=2; - return att+Math.max(0,5-target.countCards('h')); - } - return att; - }).set('du',event.card.name=='du').set('same',event.same); - 'step 2' + if(_status.event.player!=target) att+=2; + return att+Math.max(0,5-target.countCards('h')); + } + return att; + }).set('du',event.card.name=='du').set('createDialog',[ + '机捷:选择一名角色获得此牌', + [card] + ]); + 'step 1' if(result.bool){ - event.target=result.targets[0]; - player.line(event.target,'green'); - player.give(card,event.target,true); + var target=result.targets[0]; + player.line(target,'green'); + var next=target.gain(card,'draw'); + next.giver=player; } - else ui.cardPile.appendChild(event.card); - game.updateRoundNumber(); }, ai:{ order:7.2, @@ -2402,23 +2411,41 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, }, - "xinfu_jiyuan":{ + xinfu_jiyuan:{ trigger:{ - global:"dying", - source:"gainAfter", + global:['dying','gainAfter','loseAsyncAfter'], }, - //priority:6, audio:2, - filter:function (event,player){ + filter:function(event,player){ if(event.name=='dying') return true; - return event.player!=player&&event.bySelf!=true; + if(event.giver!=player) return false; + if(event.name=='gain'){ + return event.getg(event.player).length>0; + } + return game.hasPlayer(function(current){ + return event.getg(current).length>0; + }); }, - check:function (event,player){ - return get.attitude(player,event.player)>0; - }, - logTarget:"player", - content:function (){ - trigger.player.draw(); + direct:true, + content:function(){ + 'step 0' + if(trigger.name!='loseAsync') event.targets=[trigger.player]; + else event.targets=game.filterPlayer(function(current){ + return trigger.getg(current).length>0; + }); + 'step 1' + var target=event.targets.shift(); + event.target=target; + player.chooseBool(get.prompt2('xinfu_jiyuan',target)).set('ai',function(){ + var evt=_status.event; + return get.attitude(player,evt.getParent().target)>0; + }); + 'step 2' + if(result.bool){ + player.logSkill('xinfu_jiyuan',target); + target.draw(); + } + if(targets.length>0) event.goto(1); }, }, }, @@ -2591,7 +2618,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ keji_info:'弃牌阶段开始时,若你于本回合的出牌阶段内没有过使用或打出过【杀】,则你可以跳过此阶段。', kurou_info:'出牌阶段,你可以失去一点体力,然后摸两张牌。', yingzi_info:'摸牌阶段,你可以多摸一张牌。', - fanjian_info:'出牌阶段限一次,你可以令一名角色选择一种花色并展示你的一张手牌,若选择的花色与展示的不同,该角色受到来自你的一点伤害。然后该角色获得展示的牌。', + fanjian_info:'出牌阶段限一次。你可以令一名角色选择一种花色,然后其获得你的一张手牌。若其以此法选择的花色与其获得的牌花色不同,则你对其造成1点伤害。', guose_info:'你可以将一张方片手牌当做【乐不思蜀】使用。', liuli_info:'当你成为【杀】的目标时,你可以弃置一张牌并将此【杀】转移给攻击范围内的一名其他角色(不能是此【杀】的使用者)。', qianxun_info:'锁定技,你不能成为【顺手牵羊】和【乐不思蜀】的目标。', @@ -2613,10 +2640,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ yaowu_info:'锁定技,一名角色使用红色【杀】对你造成伤害时,该角色回复1点体力或摸一张牌。', "new_jiangchi":"将驰", "new_jiangchi_info":"摸牌阶段结束时,你可以选择一项:1、摸一张牌,若如此做,你本回合内不能使用或打出【杀】且【杀】不计入手牌上限。 2、弃置一张牌,若如此做,出牌阶段你使用【杀】无距离限制且你可以额外使用一张【杀】,直到回合结束。", - "xinfu_jijie":"机捷", - "xinfu_jijie_info":"出牌阶段限一次。你可以观看牌堆底的一张牌,然后将其交给一名角色。", - "xinfu_jiyuan":"急援", - "xinfu_jiyuan_info":"当一名角色进入濒死状态时,或你交给一名其他角色牌时,你可以令其摸一张牌。", + xinfu_jijie:"机捷", + xinfu_jijie_info:"出牌阶段限一次。你可以观看牌堆底的一张牌,然后将其交给一名角色。", + xinfu_jiyuan:"急援", + xinfu_jiyuan_info:"当有角色进入濒死状态时,或你将牌交给一名其他角色后,你可以令该角色摸一张牌。", ganglie_three:'刚烈', ganglie_three_info:'当你受到伤害后,你可令一名敌方角色判定。若结果不为♥,其弃置两张牌或受到来自你的1点伤害。', zhongyi:'忠义', diff --git a/character/tw.js b/character/tw.js index 04c7ef311..c95ef3abf 100644 --- a/character/tw.js +++ b/character/tw.js @@ -34,7 +34,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ tw_fuwan:['male','qun',4,['twmoukui']], tw_zhaoxiang:['female','shu',4,['refanghun','twfuhan','twqueshi']], yuejiu:['male','qun',4,['cuijin']], - wuban:['male','shu',4,['jintao']], + wuban:['male','shu',4,['jintao'],['clan:陈留吴氏']], duosidawang:['male','qun','4/5',['equan','manji']], jiachong:['male','qun',3,['beini','dingfa']], tw_dongzhao:['male','wei',3,['twmiaolve','twyingjia']], @@ -94,7 +94,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }); 'step 2' if(result.bool){ - target.gain(result.cards,player,'giveAuto'); + player.give(result.cards,target); } 'step 3' if(targets.length&&player.countCards('h')>0) event.goto(1); @@ -228,7 +228,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ 'step 1' if(result.bool){ if(result.cards&&result.cards.length){ - player.gain(result.cards,target,'giveAuto').type='twzhengjian'; + target.give(result.cards,player).type='twzhengjian'; } else target.damage(); } @@ -276,7 +276,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ 'step 1' if(result.bool){ if(result.cards&&result.cards.length){ - player.gain(result.cards,target,'giveAuto').type='twzhengjian'; + target.give(result.cards,player).type='twzhengjian'; } else target.damage(); } @@ -299,12 +299,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, twzhongchi:{ audio:2, - trigger:{player:'gainAfter'}, + trigger:{ + player:'gainAfter', + global:'loseAsyncAfter', + }, forced:true, skillAnimation:true, animationColor:'wood', filter:function(event,player){ - if(player.storage.twzhengjian||!player.hasSkill('twzhengjian',null,null,false)) return false; + if(player.storage.twzhengjian||!player.hasSkill('twzhengjian',null,null,false)||!event.getg(player).length) return false; var num1=game.countPlayer2(); var list=[]; player.getAllHistory('gain',function(evt){ @@ -941,7 +944,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }); "step 2" if(result.bool&&result.cards&&result.cards.length){ - player.gain(result.cards,event.current,'giveAuto'); + event.current.give(result.cards,player); if(!event.jiu&&get.name(result.cards[0],player)=='jiu') event.jiu=true; } "step 3" @@ -1199,7 +1202,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(result.bool){ var card=result.cards[0]; event.card=card; - trigger.player.gain(card,trigger.target,'giveAuto'); + trigger.target.give(card,trigger.player); } else event.finish(); 'step 2' @@ -1452,7 +1455,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(result.bool){ target.logSkill('twchunlao',player); if(!target.hasSkill('twchunlao')) game.trySkillAudio('twchunlao',player); - if(player!=target) player.gain(result.cards,target,'giveAuto'); + if(player!=target) target.give(result.cards,player,'giveAuto'); trigger.baseDamage++; } }, @@ -1649,7 +1652,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } else event.finish(); 'step 3' - if(result.bool) player.gain(result.cards,target,'giveAuto'); + if(result.bool) target.give(result.cards,player); }, }, twzhouhu:{ @@ -1987,7 +1990,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(!result.bool){ trigger.player.damage(); } - else player.gain(result.cards,trigger.player,'giveAuto'); + else trigger.player.give(result.cards,player); }, mark:true, marktext:'', @@ -2075,29 +2078,35 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } else player.storage.counttrigger.twzhian--; 'step 2' - if(result.bool&&target.getCards('ej').contains(trigger.cards[0])) player.gain(trigger.cards,target,'give'); + if(result.bool&&target.getCards('ej').contains(trigger.cards[0])) player.gain(trigger.cards,target,'give','bySelf'); }, }, twyujue:{ audio:2, global:'twyujue_give', - trigger:{player:'gainAfter'}, + trigger:{ + player:'gainAfter', + global:'loseAsyncAfter', + }, direct:true, filter:function(event,player){ if(player==_status.currentPhase) return false; + var cards=event.getg(player); + if(!cards.length) return false; return game.hasPlayer(function(current){ if(current==player) return false; var evt=event.getl(current); - if(!evt||!evt.cards2||!evt.cards2.length) return false; + if(!evt||!evt.cards2||!evt.cards2.filter((card)=>cards.contains(card)).length) return false; return (!current.hasSkill('twyujue_effect0'))||(!current.hasSkill('twyujue_effect1')); }) }, content:function(){ 'step 0' + var cards=trigger.getg(player); var list=game.filterPlayer(function(current){ if(current==player) return false; var evt=trigger.getl(current); - if(!evt||!evt.cards2||!evt.cards2.length) return false; + if(!evt||!evt.cards2||!evt.cards2.filter((card)=>cards.contains(card)).length) return false; return (!current.hasSkill('twyujue_effect0'))||(!current.hasSkill('twyujue_effect1')); }).sortBySeat(); event.targets=list; @@ -2262,7 +2271,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, content:function(){ game.trySkillAudio('twyujue',target); - target.gain(cards,player,'give'); + player.give(cards,target); target.addTempSkill('twyujue_clear'); target.addMark('twyujue_clear',cards.length,false); }, @@ -2892,7 +2901,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }).set('goon',get.attitude(target,player)>0); 'step 1' if(result.bool){ - player.gain(result.cards,target,'giveAuto'); + target.give(result.cards,player); } else{ game.log(target,'拒绝给牌'); @@ -3090,7 +3099,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ var target=result.targets[0]; event.target=target; player.logSkill('xinzhenjun',target); - target.gain(result.cards,player,'giveAuto') + player.give(result.cards,target) } else event.finish(); 'step 2' @@ -3281,7 +3290,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ meiyingqiang:{ equipSkill:true, trigger:{ - player:['loseAfter','gainAfter'], + player:['loseAfter'], global:['equipAfter','addJudgeAfter','gainAfter','loseAsyncAfter','addToExpansionAfter'], }, filter:function(event,player){ @@ -4033,7 +4042,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ content:function(){ 'step 0' event.cards=player.getCards('h'); - target.gain(event.cards,player,'giveAuto').gaintag.add('twrangyi'); + player.give(event.cards,target).gaintag.add('twrangyi'); target.addTempSkill('twrangyi2'); 'step 1' target.chooseToUse({ @@ -4080,7 +4089,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return card.hasGaintag('twrangyi'); }); game.delayx(); - trigger.getParent(2).player.gain(cards,player,'giveAuto'); + player.give(cards,trigger.getParent(2).player); }, onremove:function(player){ player.removeGaintag('twrangyi'); @@ -4493,19 +4502,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ 'step 0' if(typeof player.storage.waishi!='number') player.storage.waishi=1; player.storage.waishi--; - player.lose(cards,ui.special); player.choosePlayerCard(target,true,'h',cards.length).chooseonly=true; 'step 1' - event.cards2=result.cards; - target.lose(event.cards2,ui.special); + player.swapHandcards(target,cards,result.cards); 'step 2' - player.gain(event.cards2); - target.gain(cards); - player.$give(cards.length,target); - target.$give(event.cards2.length,player); - 'step 3' - game.delay(1.2); - 'step 4' if(target.countCards('h')>player.countCards('h')||player.group==target.group) player.draw(); }, ai:{ diff --git a/character/xinghuoliaoyuan.js b/character/xinghuoliaoyuan.js index 858d3992c..98a4fb438 100755 --- a/character/xinghuoliaoyuan.js +++ b/character/xinghuoliaoyuan.js @@ -135,7 +135,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return player.storage.xinyingshi_source&&player.storage.xinyingshi_source.isIn()&&player.getExpansions('xinyingshi_cards').length>0; }, content:function(){ - player.storage.xinyingshi_source.gain(player.getExpansions('xinyingshi_cards'),player,'give'); + player.storage.xinyingshi_source.gain(player.getExpansions('xinyingshi_cards'),player,'give','bySelf'); }, }, }, @@ -148,33 +148,35 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return player.countCards('h')>0; }, filterTarget:function (card,player,target){ - return target!=player&&target.countCards('h'); + return target!=player&&target.countCards('h')>0; }, content:function (){ 'step 0' - event.cardt=target.getCards('h').randomGet(); + player.choosePlayerCard(target,true,'h'); + 'step 1' + event.cardt=result.cards[0]; target.showCards(event.cardt); - player.chooseCard('he').ai=function(card){ - var numt=event.cardt.number; + player.chooseCard('he').set('ai',function(card){ + var event=_status.event.getParent(),player=event.player; + var numt=get.number(event.cardt); var att=get.attitude(player,target); var value=get.value(event.cardt); - if(card.number2) return value+6-get.value(card); - else if(card.number==numt) return value-get.value(card); + var num=get.number(card); + if(num2) return value+6-get.value(card); + else if(num==numt) return value-get.value(card); return -1; - }; - 'step 1' + }); + 'step 2' if(!result.bool) event.finish(); else{ player.showCards(result.cards); - event.cardp=result.cards; + event.cardp=result.cards[0]; } - 'step 2' - player.$giveAuto(event.cardp,target); - target.gain(event.cardp,player); - target.give(event.cardt,player); 'step 3' - var nump=event.cardp[0].number; - var numt=event.cardt.number; + player.swapHandcards(target,[event.cardp],[event.cardt]); + 'step 4' + var nump=get.number(event.cardp,player); + var numt=get.number(event.cardt,target); if(nump0) event.goto(1); }, }, "xinfu_denglou":{ - unique:true, audio:2, trigger:{ player:"phaseJieshuBegin", }, limited:true, - init:function (player){ - player.storage.xinfu_denglou=false; - }, filter:function (event,player){ - if(player.countCards('h')) return false; - return player.storage.xinfu_denglou==false; + return player.countCards('h')==0; }, skillAnimation:true, animationColor:'gray', marktext:"登", - mark:true, - intro:{ - content:"limited", - }, content:function (){ "step 0" player.awakenSkill('xinfu_denglou'); - player.storage.xinfu_denglou=true; event.cards=get.cards(4); event.gains=[] event.discards=[] @@ -720,177 +689,150 @@ game.import('character',function(lib,game,ui,get,ai,_status){ target.damage(3,'thunder'); }, }, - "xinfu_weilu":{ + xinfu_weilu:{ audio:2, trigger:{ player:"damageEnd", }, - filter:function (event,player){ - return (event.source!=undefined&&!event.source.hasSkill('weilu_effect')); + filter:function(event,player){ + return event.source&&event.source.isIn()&&!player.getStorage('xinfu_weilu_effect').contains(event.source) }, check:function (event,player){ - return (get.attitude(player,event.source)<=0); + return (get.effect(target,{name:'losehp'},player,player)>=0); }, forced:true, logTarget:"source", - content:function (){ - trigger.source.storage.weilu_effect=player; - trigger.source.addTempSkill('weilu_effect',{player:"dieAfter",}); - trigger.source.addTempSkill('weilu_effect_phase'); + content:function(){ + player.addTempSkill('xinfu_weilu_effect',{player:'die'}); + player.markAuto('xinfu_weilu_effect',[trigger.source]); + game.delayx(); }, ai:{ - "maixie_defend":true, - threaten:0.7, + maixie_defend:true, + threaten:0.85, effect:{ target:function (card,player,target){ - if(player.hasSkillTag('jueqing',false,target)) return [1,-1]; - return 0.8; - // if(get.tag(card,'damage')&&get.damageEffect(target,player,player)>0) return [1,0,0,-1.5]; + if(player.hasSkillTag('jueqing',false,target)) return; + return 0.9; }, }, }, - }, - "weilu_effect":{ - group:["weilu_effect_clear"], subSkill:{ - clear:{ - sub:true, - trigger:{ - global:"phaseAfter", - }, - filter:function (event,player){ - if(player.hasSkill('weilu_effect_phase')) return false; - return event.player.hasSkill('xinfu_weilu'); - }, - silent:true, + effect:{ + audio:'xinfu_weilu', + trigger:{player:'phaseUseBegin'}, + charlotte:true, forced:true, - popup:false, - content:function (){ - player.removeSkill('weilu_effect'); + logTarget:function(event,player){ + return player.getStorage('xinfu_weilu_effect').filter(function(current){ + return current.isAlive()&¤t.hp>1; + }); + }, + content:function(){ + 'step 0' + var targets=player.getStorage('xinfu_weilu_effect'); + player.removeSkill('xinfu_weilu_effect'); + event.targets=targets.sortBySeat(); + 'step 1' + var target=targets.shift(); + if(target.isAlive()&&target.hp>1){ + event._delay=true; + var num=target.hp-1; + player.markAuto('xinfu_weilu_recover',[[target,num]]); + target.loseHp(num); + } + if(targets.length>0) event.redo(); + else if(!event._delay) event.finish(); + 'step 2' + player.addTempSkill('xinfu_weilu_recover',{player:['phaseUseAfter','phaseAfter']}); + game.delayx(); + }, + onremove:true, + intro:{content:'已将$列入“威虏”战略打击目标'}, + }, + recover:{ + audio:'xinfu_weilu', + charlotte:true, + trigger:{player:'phaseUseEnd'}, + forced:true, + filter:function(event,player){ + var targets=player.getStorage('xinfu_weilu_recover'); + for(var i of targets){ + if(i[0].isIn()&&i[0].isDamaged()) return true; + } + return false; + }, + onremove:true, + logTarget:function(event,player){ + var logs=[],targets=player.getStorage('xinfu_weilu_recover'); + for(var i of targets){ + if(i[0].isIn()&&i[0].isDamaged()) logs.add(i[0]); + } + return logs; + }, + content:function(){ + 'step 0' + event.list=player.getStorage('xinfu_weilu_recover').slice(0); + event.list.sort(function(a,b){ + return lib.sort.seat(a[0],b[0]); + }); + 'step 1' + var group=event.list.shift(); + if(group[0].isAlive()&&group[0].isDamaged()){ + group[0].recover(group[1]); + event._delay=true; + } + if(event.list.length>0) event.redo(); + else if(!event._delay) event.finish(); + 'step 2' + game.delayx(); }, }, - phase:{ - sub:true, - }, - }, - mark:"character", - onremove:true, - intro:{ - content:"$的下个回合的出牌阶段开始时,失去体力至1点。", - }, - trigger:{ - global:"phaseUseBegin", - }, - filter:function (event,player){ - if(player.hasSkill('weilu_effect_phase')) return false; - return event.player==player.storage.weilu_effect; - }, - silent:true, - forced:true, - popup:false, - content:function (){ - if(player.hp>1){ - trigger.player.logSkill('xinfu_weilu'); - trigger.player.line(player); - var num=player.hp-1; - player.storage.weilu_hp=num; - player.loseHp(num); - player.addSkill('weilu_effect2'); - } - player.removeSkill('weilu_effect'); }, }, - "weilu_effect2":{ - trigger:{ - global:"phaseUseEnd", - }, - silent:true, - forced:true, - popup:false, - content:function (){ - if(player.storage.weilu_hp){ - trigger.player.logSkill('xinfu_weilu'); - trigger.player.line(player); - player.recover(player.storage.weilu_hp); - } - player.removeSkill('weilu_effect2'); - }, - }, - "xinfu_zengdao":{ + xinfu_zengdao:{ audio:2, - init:function (player){ - player.storage.xinfu_zengdao=false; - }, limited:true, - unique:true, enable:"phaseUse", - usable:1, - filterTarget:function (card,player,target){ - return player!=target; - }, - filter:function (event,player){ - if(player.storage.xinfu_zengdao==true) return false; + filter:function(event,player){; return player.countCards('e')>0; }, + filterTarget:lib.filter.notMe, skillAnimation:true, animationColor:'thunder', position:"e", filterCard:true, selectCard:[1,Infinity], discard:false, - lose:true, - content:function (){ + lose:false, + content:function(){ player.awakenSkill('xinfu_zengdao'); - player.$give(cards,target,false); - target.storage.xinfu_zengdao2=cards.slice(0); + target.addToExpansion(cards,player,'give').gaintag.add('xinfu_zengdao2'); target.addSkill('xinfu_zengdao2'); }, - ai:{ - order:1, - result:{ - target:0, - }, - }, - mark:true, - intro:{ - content:"limited", - }, }, - "xinfu_zengdao2":{ - trigger:{ - source:"damageBegin1", - }, - audio:"xinfu_zengdao", + xinfu_zengdao2:{ + trigger:{source:'damageBegin1'}, forced:true, charlotte:true, - content:function (){ + filter:function(event,player){ + return player.getExpansions('xinfu_zengdao2').length>0; + }, + content:function(){ 'step 0' - player.chooseCardButton('将一张“刀”置入弃牌堆',player.storage.xinfu_zengdao2,true); + player.chooseCardButton('将一张“刀”置入弃牌堆',player.getExpansions('xinfu_zengdao2'),true); 'step 1' if(result.bool){ - player.$throw(result.links); - var card=result.links[0]; - game.cardsDiscard(card); - player.storage.xinfu_zengdao2.remove(card); - player.syncStorage('xinfu_zengdao2'); - player.updateMarks('xinfu_zengdao2'); + trigger.num++; + player.loseToDiscardpile(result.links); } - if(player.storage.xinfu_zengdao2.length==0){ - player.removeSkill('xinfu_zengdao2'); - } - trigger.num++; }, - mark:true, marktext:"刀", intro:{ - content:"cards", + content:'expansion', + markcount:'expansion', onunmark:function(storage,player){ - if(storage&&storage.length){ - player.$throw(storage,1000); - game.cardsDiscard(storage); - game.log(storage,'被置入了弃牌堆'); - storage.length=0; - } + player.removeSkill('xinfu_zengdao2'); }, }, }, @@ -1017,17 +959,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){ for(var i=0;i0&&!game.hasPlayer(function(current){ return current.hasSkill('yingshi_heart'); }); @@ -1041,76 +983,52 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }); 'step 1' if(result.bool){ - var cards=player.getCards('he'); - var togain=[] - for(var i=0;i0; }, forced:true, - content:function (){ + logTarget:'source', + content:function(){ 'step 0' - trigger.source.chooseCardButton('选择要获得的牌',player.storage.yingshi_heart,true); + trigger.source.chooseCardButton('应势:选择获得一张“酬”',player.getExpansions('xinfu_yingshi'),true); 'step 1' if(result.bool){ - player.$give(result.links,trigger.source); - trigger.source.gain(result.links,'fromStorage'); - player.storage.yingshi_heart.remove(result.links[0]); - player.syncStorage('yingshi_heart'); - player.updateMarks('yingshi_heart'); + trigger.source.gain(result.links,player,'give'); } - if(player.storage.yingshi_heart.length==0){ - delete player.storage.yingshi_heart; - player.removeSkill('yingshi_heart'); - } - }, - mark:true, - intro:{ - content:"cards", - onunmark:function(storage,player){ - if(storage&&storage.length){ - player.$throw(storage,1000); - game.cardsDiscard(storage); - game.log(storage,'被置入了弃牌堆'); - storage.length=0; - } - }, }, }, - "yingshi_die":{ + yingshi_die:{ + audio:'xinfu_yingshi', forced:true, - silent:true, - popup:false, - trigger:{ - global:"dieBegin", + trigger:{global:'die'}, + logTarget:'player', + filter:function(event,player){ + return event.player.getExpansions('xinfu_yingshi').length>0; }, - filter:function (event,player){ - return event.player.storage.yingshi_heart&&event.player.storage.yingshi_heart.length; - }, - content:function (){ - player.logSkill('xinfu_yingshi'); - trigger.player.$give(trigger.player.storage.yingshi_heart,player); - player.gain(trigger.player.storage.yingshi_heart); - delete trigger.player.storage.yingshi_heart; - trigger.player.removeSkill('yingshi_heart'); + content:function(){ + var target=trigger.player; + player.gain(target.getExpansions('xinfu_yingshi'),target,'give','bySelf'); }, }, "xinfu_duanfa":{ diff --git a/character/yijiang.js b/character/yijiang.js index 9bf4c7af7..7d15529e6 100755 --- a/character/yijiang.js +++ b/character/yijiang.js @@ -13,10 +13,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ yijiang_2015:['caoxiu','caorui','zhongyao','xiahoushi','liuchen','zhangyi','zhuzhi','quancong','sunxiu','gongsunyuan','guotufengji'], yijiang_2016:['guohuanghou','sunziliufang','huanghao','liyan','sundeng','cenhun','zhangrang','liuyu'], yijiang_2017:['xinxianying','jikang','wuxian','qinmi','xuezong','xushi','caiyong','caojie'], - yijiang_2022:['lukai','kebineng'], + yijiang_2022:['lukai','kebineng','zhugeshang'], }, }, character:{ + zhugeshang:['male','shu',3,['sangu','yizu']], kebineng:['male','qun',4,['kousheng']], lukai:['male','wu',4,['lkbushi','lkzhongzhuang']], xin_fazheng:['male','shu',3,['xinenyuan','xinxuanhuo'],['die_audio']], @@ -61,7 +62,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ chengpu:['male','wu',4,['lihuo','chunlao']], gaoshun:['male','qun',4,['xinxianzhen','jinjiu']], caozhen:['male','wei',4,['xinsidi']], - wuyi:['male','shu',4,['benxi']], + wuyi:['male','shu',4,['benxi'],['clan:陈留吴氏']], hanhaoshihuan:['male','wei',4,['shenduan','yonglve']], caorui:['male','wei',3,['huituo','mingjian','xingshuai'],['zhu']], @@ -82,7 +83,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ liyan:['male','shu',3,['duliang','fulin']], sundeng:['male','wu',4,['xinkuangbi']], - cenhun:['male','wu',3,['jishe','lianhuo']], + cenhun:['male','wu',4,['jishe','lianhuo']], huanghao:['male','shu',3,['qinqing','huisheng']], zhangrang:['male','qun',3,['taoluan']], sunziliufang:['male','wei',3,['guizao','jiyu']], @@ -102,6 +103,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ yujin:["male","wei",4,["yizhong"],[]], }, characterIntro:{ + zhugeshang:'诸葛尚(244年2月-263年11月),琅琊阳都(今山东沂南)人,诸葛瞻长子,诸葛亮之孙。诸葛尚博览兵书且精通武艺。炎兴元年(公元263年),出任先锋,抗拒魏国大将邓艾,与其父诸葛瞻同战死于绵竹,时年十九岁。', kebineng:'轲比能(?~235年),为中国三国时期的鲜卑首领之一。轲比能出身鲜卑支部,因他作战勇敢,执法公平,不贪财物,所以被鲜卑民众推举为大人。轲比能因其部落近塞,所以他抓住有利条件积极学习汉族先进技术和文化,促进了鲜卑族的进步和北方的民族融合。轲比能统率下的部众,战守有法,战斗力相当强大。自曹操北征后向曹氏进贡表示效忠。魏文帝时,轲比能受封附义王。轲比能在进行部落统一战争时,受魏国干涉,受沉重打击,于是对魏怀贰,献书魏帝表忠,以麻痹魏庭,使之放松警惕。此后,轲比能的部众变得强盛,控弦十余万骑,为害魏国边境。每次钞略得财物,轲比能都公开透明地均平分配,所以得部众死力,各部大人都敬畏之。实力强大后,他继续部落统一战争,于是威行诸部落,建立起强大的鲜卑族政权。深感威胁的魏国幽州刺史王雄派刺客韩龙将其刺杀,其政权立刻崩溃,鲜卑民族再次陷入混战。', lukai:'陆凯(198-269年),字敬风,吴郡吴县(今江苏省苏州市)人。三国时期吴国重臣,丞相陆逊的族侄,大司马陆抗的族兄。黄武年间,举孝廉出身,曾任永兴县长、诸暨县长,颇有治绩。拜建武都尉、儋耳太守,与聂友率军讨伐朱崖和儋耳,迁建武校尉。五凤二年(255年),讨斩零陵山贼陈毖,拜偏将军、巴丘督,册封都乡侯。迁武昌右部督,随军进入寿春。后拜荡魏将军,加号绥远将军。吴景帝孙休继位,拜征北将军、假节、领豫州牧。孙皓即位,迁任镇西大将军,都督巴丘,又领荆州牧,进封嘉兴侯。宝鼎元年(266年),迁左丞相。以正直及屡次劝谏孙皓而闻名。建衡元年(269年),去世,时年七十二。', caozhi:'字子建,沛国谯人,三国曹魏著名文学家,建安文学代表人物。魏武帝曹操之子,魏文帝曹丕之弟,生前曾为陈王,去世后谥号“思”,因此又称陈思王。南朝宋文学家谢灵运更有“天下才有一石,曹子建独占八斗”的评价。王士祯尝论汉魏以来二千年间诗家堪称“仙才”者,曹植、李白、苏轼三人耳。', @@ -199,6 +201,200 @@ game.import('character',function(lib,game,ui,get,ai,_status){ zhonghui:['jiangwei'], }, skill:{ + //诸葛尚 + sangu:{ + audio:2, + trigger:{player:'phaseUseEnd'}, + direct:true, + getEffect:function(player,target,event){ + var att=get.attitude(player,target); + if(att==0) return 0; + var list1=[],list2=[]; + var used=[]; + player.getHistory('useCard',function(evt){ + if(evt.getParent('phaseUse')==event) used.add(evt.card.name); + }); + event.used=used; + for(var name of lib.inpile){ + var add=false,type=get.type(name); + if(name=='sha') add=true; + else if(type=='trick'){ + var info=lib.card[name]; + if(info&&!info.singleCard&&!info.notarget) add=true; + } + if(!add) continue; + if(used.contains(name)) list1.push(name); + else list2.push(name); + } + var getv=function(name,player,arg){ + return player.getUseValue({name:name},arg); + } + if(att<0){ + for(var i of list1){ + if(getv(i,target)<=0) return -att*Math.sqrt(get.threaten(target))*2; + } + return 0; + } + else{ + var list=list1; + if(player.hp>1) list=list.concat(list2); + list.sort(function(a,b){ + return getv(b,target)-getv(a,target); + }); + list=list.slice(3); + var eff=0,base=5; + for(var i of list){ + var res=getv(i,target); + if(res<=base) break; + else eff+=res; + } + return Math.sqrt(eff/1.5)*att; + } + }, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt('sangu'),lib.filter.notMe).set('ai',function(target){ + return lib.skill.sangu.getEffect(_status.event.player,target,_status.event.getTrigger()); + }); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + player.logSkill('sangu',target); + event.target=target; + } + else event.finish(); + 'step 2' + var list1=[],list2=[]; + var used=[]; + player.getHistory('useCard',function(evt){ + if(evt.getParent('phaseUse')==trigger) used.add(evt.card.name); + }); + event.used=used; + for(var name of lib.inpile){ + var add=false,type=get.type(name); + if(name=='sha') add=true; + else if(type=='trick'){ + var info=lib.card[name]; + if(info&&!info.singleCard&&!info.notarget) add=true; + } + if(!add) continue; + if(used.contains(name)) list1.push([type,'',name]); + else list2.push([type,'',name]); + } + if(!list1.length&&!list2.length) event.finish(); + else{ + var dialog=['为'+get.translation(target)+'选择至多三个牌名']; + if(list1.length){ + dialog.push('
    本阶段已使用过的牌
    '); + dialog.push([list1,'vcard']); + } + if(list2.length){ + dialog.push('
    本阶段未使用过的牌
    '); + dialog.push([list2,'vcard']); + } + player.chooseButton(dialog,true,[1,3]).set('ai',function(button){ + var card={name:button.link[2]},list=_status.event.list; + var player=_status.event.player,target=_status.event.getParent().target; + if(get.attitude(player,target)<0){ + if(!list.contains(card.name)) return 0; + return -target.getUseValue(card); + } + else{ + if(player.hp<2&&!list.contains(card.name)) return 0; + var val=target.getUseValue(card),base=5; + val=Math.min(15,val-base); + if(card.name=='wuzhong'||card.name=='dongzhuxianji') val+=15; + else if(card.name=='shunshou') val+=6; + return val; + } + }).set('list',list1.map((i)=>i[2])); + } + 'step 3' + if(result.bool){ + var names=result.links.map((i)=>i[2]); + if(!target.storage.sangu_effect) target.storage.sangu_effect=[]; + target.storage.sangu_effect=target.storage.sangu_effect.concat(names); + game.log(player,'为',target,'选择了','#y'+get.translation(names)); + target.addTempSkill('sangu_effect',{player:'phaseUseAfter'}); + target.markSkill('sangu_effect'); + for(var i of names){ + if(!event.used.contains(i)){ + player.loseHp(); + break; + } + } + } + }, + subSkill:{ + effect:{ + trigger:{player:'phaseUseBegin'}, + charlotte:true, + forced:true, + popup:false, + content:function(){ + player.addTempSkill('sangu_viewas'); + }, + onremove:true, + intro:{ + mark:function(dialog,storage,player){ + if(!storage||!storage.length) return '当前无可用牌'; + dialog.add([[storage[0]],'vcard']); + if(storage.length>1) dialog.addSmall([storage.slice(1),'vcard']) + }, + content:'$', + }, + }, + viewas:{ + mod:{ + cardname:function(card,player){ + var storage=player.getStorage('sangu_effect'); + if(storage.length) return storage[0]; + }, + cardnature:function(card,player){ + var storage=player.getStorage('sangu_effect'); + if(storage.length) return false; + }, + }, + trigger:{player:['useCard','respond']}, + forced:true, + charlotte:true, + filter:function(event,player){ + return player.getStorage('sangu_effect').length>0; + }, + content:function(){ + player.unmarkAuto('sangu_effect',[player.getStorage('sangu_effect')[0]]); + }, + }, + }, + }, + yizu:{ + audio:2, + trigger:{target:'useCardToTargeted'}, + forced:true, + usable:1, + filter:function(event,player){ + return player.isDamaged()&&player.hp<=event.player.hp&&(event.card.name=='sha'||event.card.name=='juedou'); + }, + content:function(){ + player.recover(); + }, + ai:{ + effect:{ + target:function(card,player,target,current){ + if(target.isHealthy()||(card.name!='sha'&&card.name!='juedou')) return; + if((target.storage.counttrigger&&target.storage.counttrigger.yizu)&¤t<0) return 5; + if(player.hp0) return 1.2; + if(get.attitude(player,target)>=0) return; + var copy=get.effect(target,{name:'shacopy'},player,player); + if(copy>0&&player.isPhaseUsing()&&Math.min(player.getCardUsable('sha'),player.countCards('hs',function(card){ + return get.name(card)=='sha'&&player.canUse(card,target,null,true); + }))>=2) return; + return [0,2]; + }, + }, + }, + }, //轲比能 kousheng:{ audio:2, @@ -595,7 +791,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }); 'step 1' if(result.bool){ - player.gain(result.cards,target,'giveAuto').gaintag.add('xinkuangbi_keep'); + target.give(result.cards,player,'giveAuto').gaintag.add('xinkuangbi_keep'); player.addTempSkill('xinkuangbi_keep'); target.addSkill('xinkuangbi_draw'); target.addMark('xinkuangbi_draw',result.cards.length,false); @@ -1408,7 +1604,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }; "step 1" if(result.bool){ - player.gain(result.cards,targets[0],'give'); + targets[0].give(result.cards,player,'give'); } else{ if(targets[0].canUse('sha',targets[1])) targets[0].useCard({name:'sha',isCard:true},targets[1]); @@ -1605,7 +1801,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ 'step 2' var target=event.target; if(result.bool){ - player.gain(result.cards,target,'give'); + target.give(result.cards,player,'give'); } else{ player.addTempSkill('xintaoluan3'); @@ -3224,7 +3420,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } "step 5" if(result.targets.length){ - result.targets[0].gain(event.togive,'draw'); + result.targets[0].gain(event.togive,'draw').giver=player; player.line(result.targets[0],'green'); game.log(result.targets[0],'获得了'+get.cnNumber(event.togive.length)+'张','#g“书”'); if(event.cards.length) event.goto(3); @@ -4273,7 +4469,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ 'step 2' var target=event.target; if(result.bool){ - player.gain(result.cards,target,'give'); + target.give(result.cards,player); } else{ player.addTempSkill('taoluan3'); @@ -4485,7 +4681,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ 'step 2' if(result.bool){ var card=result.links[0]; - trigger.source.gain(card,player,'giveAuto'); + trigger.source.gain(card,player,'giveAuto','bySelf'); trigger.cancel(); if(!player.storage.huisheng) player.storage.huisheng=[]; player.storage.huisheng.push(trigger.source); @@ -4984,7 +5180,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } 'step 2' if(result.bool&&result.cards&&result.cards.length){ - player.gain(result.cards,target,'give'); + target.give(result.cards,player); } }, ai:{ @@ -6853,7 +7049,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }); 'step 1' if(result.index==0){ - player.gain(target.getCards('e'),'giveAuto',target); + target.give(target.getCards('e'),player); player.storage.reyanzhu=true; } else{ @@ -7054,7 +7250,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ 'step 1' if(result.bool){ var es=target.getCards('e'); - player.gain(es,target,'give'); + target.give(es,player,'give'); player.removeSkill('yanzhu'); } else{ @@ -7485,7 +7681,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, huomo:{ audio:2, - autoname:['huzhao'], + audioname:['huzhao'], enable:'chooseToUse', onChooseToUse:function(event){ if(game.online||event.huomo_list) return; @@ -7813,7 +8009,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ lose:false, delay:false, content:function(){ - target.gain(cards,player,'giveAuto'); + player.give(cards,target); target.addTempSkill('mingjian2',{player:'phaseAfter'}); target.storage.mingjian2++; target.updateMarks('mingjian2'); @@ -7884,8 +8080,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ var target=result.targets[0]; target.addSkill('mingjian2_old'); var hs=player.getCards('h'); - target.gain(hs,player); - player.$give(hs.length,target); + player.give(hs,target); } } }, @@ -9213,7 +9408,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return 0; }); "step 2" - trigger.player.gain(result.cards,player,'giveAuto'); + player.give(result.cards,trigger.player); trigger.player.addSkill('xiantu4'); trigger.player.storage.xiantu4.push(player); }, @@ -9452,7 +9647,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }); "step 3" if(result.bool){ - player.gain(result.cards,event.target,'giveAuto'); + target.give(result.cards,player); trigger.untrigger(); trigger.getParent().player=event.target; game.log(event.target,'成为了',trigger.card,'的使用者'); @@ -9501,7 +9696,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }); "step 3" if(result.bool){ - player.gain(result.cards,event.target,'giveAuto'); + target.give(result.cards,player); trigger.untrigger(); trigger.getParent().player=event.target; game.log(event.target,'成为了',trigger.card,'的使用者'); @@ -9715,7 +9910,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ "step 0" player.awakenSkill('xianzhou'); var cards=player.getCards('e'); - target.gain(cards,player,'give'); + player.give(cards,target); event.num=cards.length; game.delay(); "step 1" @@ -9916,7 +10111,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } "step 2" if(result.bool){ - player.gain(result.cards,event.target,'give'); + target.give(result.cards,player); if(get.name(result.cards[0])!='shan'){ trigger.getParent().targets.push(event.target); trigger.getParent().triggeredTargets2.push(event.target); @@ -9958,7 +10153,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } "step 2" if(result.bool){ - player.gain(result.cards,event.target,'giveAuto'); + target.give(result.cards,player); game.delay(); } else{ @@ -10194,7 +10389,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ event.giver=giver; 'step 1' var card=result.cards[0]; - event.gainner.gain(card,event.giver,'giveAuto'); + event.giver.give(card,event.gainner); 'step 2' if(event.gainner.countCards('h')==event.giver.countCards('h')){ player.chooseDrawRecover(true); @@ -10253,7 +10448,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ delay:false, content:function(){ "step 0" - targets[0].gain(cards,player,'give'); + player.give(cards,targets[0],'visible'); "step 1" if(!lib.filter.filterTarget({name:'sha',isCard:true},targets[0],targets[1])) event._result={control:'draw_card'}; else targets[0].chooseControl('draw_card','出杀',function(){ @@ -10520,7 +10715,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }).set('check',check); "step 2" if(result.bool){ - result.targets[0].gain(result.cards,event.player,'giveAuto'); + player.give(result.cards,result.targets[0]); player.line(result.targets,'green'); } }, @@ -11117,7 +11312,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(num!=2) event.finish(); 'step 1' if(result.cards){ - player.gain(result.cards,target,'giveAuto'); + target.give(result.cards,player); } }, ai:{ @@ -11381,9 +11576,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }); "step 1" if(result.bool){ - player.gain(result.links); - player.$draw(result.links); - game.delay(2); + player.gain(result.links,'draw'); } for(var i=event.cards.length-1;i>=0;i--){ if(!result.bool||!result.links.contains(event.cards[i])){ @@ -11434,7 +11627,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ "step 0" event.num=trigger.num; "step 1" - trigger.source.chooseCard('交给'+get.translation(player)+'一张手牌或流失一点体力').set('ai',function(card){ + trigger.source.chooseCard('选择一张手牌交给'+get.translation(player)+',或点“取消”失去一点体力').set('ai',function(card){ if(get.attitude(_status.event.player,_status.event.getParent().player)>0){ return 11-get.value(card); } @@ -11444,7 +11637,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }); "step 2" if(result.bool){ - player.gain(result.cards,trigger.source,'giveAuto'); + trigger.source.give(result.cards,player); } else{ trigger.source.loseHp(); @@ -11515,7 +11708,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, content:function(){ "step 0" - trigger.source.chooseCard('交出一张红桃牌或流失一点体力',function(card){ + trigger.source.chooseCard('选择一张红桃牌交给'+get.translation(player)+',或点“取消”失去一点体力',function(card){ return get.suit(card)=='heart'; }).set('ai',function(card){ if(get.attitude(_status.event.player,_status.event.getParent().player)>0){ @@ -11527,7 +11720,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }); "step 1" if(result.bool){ - player.gain(result.cards,'giveAuto',trigger.source); + trigger.source(result.cards,player); } else{ trigger.source.loseHp(); @@ -11562,21 +11755,22 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, content:function(){ "step 0" - target.gain(cards,player,'give'); + player.give(cards,target); // game.delay(); "step 1" player.gainPlayerCard(target,'he',true); "step 2" var source=target; event.card=result.links[0]; - player.chooseTarget('选择一个目标送出'+get.translation(event.card),function(card,player,target){ + if(player.getCards('h').contains(event.card)) player.chooseTarget('将'+get.translation(event.card)+'交给另一名其他角色',function(card,player,target){ return target!=_status.event.sourcex&&target!=player; }).set('ai',function(target){ return get.attitude(_status.event.player,target); }).set('sourcex',target); + else event.finish(); "step 3" if(result.bool){ - result.targets[0].gain(card,player,'give'); + player.give(card,result.targets[0],'give'); game.delay(); } }, @@ -11843,7 +12037,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ 'step 0' player.turnOver(); 'step 1' - trigger.player.gain(player.getCards('h'),'give',player); + player.give(player.getCards('h'),trigger.player); 'step 2' trigger.player.recover(); }, @@ -12473,7 +12667,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ caozhen:['re_caozhen','xin_caozhen','caozhen','old_caozhen'], wuyi:['re_wuyi','wuyi'], sunluban:['re_sunluban','xin_sunluban','sunluban'], - zhuhuan:['zhuhuan','old_zhuhuan'], + zhuhuan:['re_zhuhuan','zhuhuan','old_zhuhuan'], caoxiu:['re_caoxiu','caoxiu','old_caoxiu'], xiahoushi:['re_xiahoushi','xiahoushi'], zhangyi:['re_zhangyi','zhangyi'], @@ -12746,10 +12940,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ sidi:'司敌', sidi2:'司敌', sidi3:'司敌', - sidi_info:'当你使用或其他角色在你的回合内使用【闪】时,你可以将牌堆顶的一张牌正面向上置于你的武将牌上;一名其他角色的出牌阶段开始时,你可以移去一张“司敌”牌,然后该角色本阶段可使用杀的次数上限-1', + sidi_info:'当你使用或其他角色在你的回合内使用【闪】时,你可以将牌堆顶的一张牌正面向上置于你的武将牌上;一名其他角色的出牌阶段开始时,你可以移去一张“司敌”牌,然后该角色本阶段可使用杀的次数上限-1。', xinsidi:'司敌', xinsidi2:'司敌', - xinsidi_info:'其他角色出牌阶段开始时,你可以弃置一张与你装备区里的牌颜色相同的非基本牌,然后该角色于此阶段内不能使用和打出与此牌颜色相同的牌。此阶段结束时,若其此阶段没有使用【杀】,视为你对其使用了【杀】', + xinsidi_info:'其他角色出牌阶段开始时,你可以弃置一张与你装备区里的牌颜色相同的非基本牌,然后该角色于此阶段内不能使用和打出与此牌颜色相同的牌。此阶段结束时,若其此阶段没有使用【杀】,视为你对其使用了【杀】。', dangxian:'当先', dangxian_info:'锁定技,准备阶段,你执行一个额外的出牌阶段', xindangxian:'当先', @@ -13087,8 +13281,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ lkzhongzhuang:'忠壮', lkzhongzhuang_info:'锁定技。当你因执行【杀】的效果而造成伤害时,若你的攻击范围:大于3,则此伤害+1;小于3,则此伤害改为1。', kebineng:'轲比能', - kousheng:'寇胜', + kousheng:'寇旌', kousheng_info:'①出牌阶段开始时,你可以选择任意张手牌,这些牌称为“寇胜”直到回合结束。②你的“寇胜”均视为【杀】且无次数限制。③当你因执行对应实体牌包含“寇胜”的【杀】的效果而造成伤害后,你展示所有“寇胜”牌,然后目标角色可以用所有手牌交换这些牌。', + zhugeshang:'诸葛尚', + sangu:'三顾', + sangu_info:'出牌阶段结束时,你可以选择至多三个{【杀】或不为notarget或singleCard的普通锦囊牌}中的牌名,然后令一名其他角色记录这些牌名。该角色的下个出牌阶段开始时,其的手牌均视为其记录中的第一张牌直到此阶段结束,且当其使用或打出牌时,移除这些牌中的第一张牌。若你以此法选择过的牌名中包含你本阶段内未使用过的牌名,则你失去1点体力。', + yizu:'轶祖', + yizu_info:'锁定技。每回合限一次,当你成为【杀】或【决斗】的目标后,若你的体力值不大于使用者的体力值,则你回复1点体力。', yijiang_2011:'一将成名2011', yijiang_2012:'一将成名2012', diff --git a/character/yingbian.js b/character/yingbian.js index d4ff96fc3..94c8fc4a3 100644 --- a/character/yingbian.js +++ b/character/yingbian.js @@ -1132,7 +1132,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(result.bool){ var target=result.targets[0]; player.logSkill('xuanbei_give',target); - target.gain(cards,'gain2'); + target.gain(cards,'gain2').giver=player; } else player.storage.counttrigger.xuanbei_give--; }, @@ -1327,7 +1327,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(!target.storage.caozhao_info) target.storage.caozhao_info={}; target.storage.caozhao_info[cards[0].cardid]=lib.skill.caozhao_backup.cardname; target.addSkill('caozhao_info'); - target.gain(cards,player,'give').gaintag.add('caozhao'); + player.give(cards,target,'give').gaintag.add('caozhao'); } else{ if(!player.storage.caozhao_info) player.storage.caozhao_info={}; @@ -1991,7 +1991,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ 'step 0' trigger.player.chooseCard('he',true,'将一张牌交给'+get.translation(player)); 'step 1' - if(result.bool) player.gain(result.cards,trigger.player,'giveAuto'); + if(result.bool) trigger.player.give(result.cards,player); 'step 2' var card=player.getEquip('cheliji_feilunzhanyu'); if(card) player.discard(card); @@ -2073,7 +2073,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ var cards=player.getExpansions('qiaoyan'); if(cards.length){ var source=trigger.source; - source.gain(cards,player,'give'); + source.gain(cards,player,'give','bySelf'); event.finish(); } else{ @@ -2119,7 +2119,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ content:function(){ 'step 0' event.cards=player.getExpansions('qiaoyan'); - player.chooseTarget(true,'请选择【献珠】的目标','令一名角色获得'+get.translation(event.cards)+'。若该角色不为你自己,则你令其视为对其攻击范围内的另一名角色使用【杀】').set('ai',function(target){ + player.chooseTarget(true,'请选择【献珠】的目标','将'+get.translation(event.cards)+'交给一名角色。若该角色不为你自己,则你令其视为对其攻击范围内的另一名角色使用【杀】').set('ai',function(target){ var player=_status.event.player; var eff=get.sgn(get.attitude(player,target))*get.value(_status.event.getParent().cards[0],target); if(player!=target) eff+=Math.max.apply(null,game.filterPlayer(function(current){ @@ -2134,7 +2134,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ var target=result.targets[0]; event.target=target; player.logSkill('xianzhu',target); - target.gain(cards,player,'give'); + player.give(cards,target,'give'); } else event.finish(); 'step 2' @@ -2607,7 +2607,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return target!=player&&target.hasZhuSkill('ruilve',player)&&!target.hasSkill('ruilve3'); }, content:function(){ - target.gain(cards,player,'giveAuto'); + player.give(cards,target); target.addTempSkill('ruilve3','phaseUseEnd'); }, ai:{ @@ -2748,8 +2748,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player.chooseToCompare(target); 'step 1' if(result.bool&&target.isAlive()){ - var cards=target.getCards('h'); - if(cards.length) player.gain(cards,target,'giveAuto'); + var num=target.countCards('h'); + if(num>0) player.gainPlayerCard(target,true,'h',num); } else event.finish(); 'step 2' @@ -2757,7 +2757,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(num&&target.isAlive()) player.chooseCard('h',num,true,'交给'+get.translation(target)+get.cnNumber(num)+'张牌') else event.finish(); 'step 3' - if(result.bool&&result.cards&&result.cards.length) target.gain(result.cards,player,'giveAuto'); + if(result.bool&&result.cards&&result.cards.length) player.give(result.cards,target); }, ai:{ order:1, diff --git a/game/asset.js b/game/asset.js index 2af378fe2..64f536f9e 100644 --- a/game/asset.js +++ b/game/asset.js @@ -1,5 +1,5 @@ window.noname_asset_list=[ - 'v1.9.117.2', + 'v1.9.118', 'audio/background/aozhan_chaoming.mp3', 'audio/background/aozhan_online.mp3', 'audio/background/aozhan_rewrite.mp3', @@ -203,6 +203,14 @@ window.noname_asset_list=[ 'audio/die/quanhuijie.mp3', 'audio/die/re_zhuhuan.mp3', 'audio/die/yinfuren.mp3', + 'audio/die/clan_wuban.mp3', + 'audio/die/clan_wuxian.mp3', + 'audio/die/dc_liuye.mp3', + 'audio/die/dc_zhaoyǎn.mp3', + 'audio/die/luyi.mp3', + 'audio/die/shen_zhangfei.mp3', + 'audio/die/wangwei.mp3', + 'audio/die/zhugeshang.mp3', 'audio/die/baosanniang.mp3', 'audio/die/beimihu.mp3', @@ -1138,6 +1146,44 @@ window.noname_asset_list=[ 'audio/skill/refenli2.mp3', 'audio/skill/repingkou1.mp3', 'audio/skill/repingkou2.mp3', + 'audio/skill/clanguixiang1.mp3', + 'audio/skill/clanguixiang2.mp3', + 'audio/skill/clanmuyin_clan_wuban1.mp3', + 'audio/skill/clanmuyin_clan_wuban2.mp3', + 'audio/skill/clanmuyin_clan_wuxian1.mp3', + 'audio/skill/clanmuyin_clan_wuxian2.mp3', + 'audio/skill/clanyirong1.mp3', + 'audio/skill/clanyirong2.mp3', + 'audio/skill/clanzhanding1.mp3', + 'audio/skill/clanzhanding2.mp3', + 'audio/skill/dcbingji1.mp3', + 'audio/skill/dcbingji2.mp3', + 'audio/skill/dcfuning1.mp3', + 'audio/skill/dcfuning2.mp3', + 'audio/skill/dcfuxue1.mp3', + 'audio/skill/dcfuxue2.mp3', + 'audio/skill/dchuace1.mp3', + 'audio/skill/dchuace2.mp3', + 'audio/skill/dcpoyuan1.mp3', + 'audio/skill/dcpoyuan2.mp3', + 'audio/skill/dcruizhan1.mp3', + 'audio/skill/dcruizhan2.mp3', + 'audio/skill/dcshilie1.mp3', + 'audio/skill/dcshilie2.mp3', + 'audio/skill/dcshoutan1.mp3', + 'audio/skill/dcshoutan2.mp3', + 'audio/skill/dcyaoyi1.mp3', + 'audio/skill/dcyaoyi2.mp3', + 'audio/skill/huomo_huzhao1.mp3', + 'audio/skill/huomo_huzhao2.mp3', + 'audio/skill/sangu1.mp3', + 'audio/skill/sangu2.mp3', + 'audio/skill/shencai1.mp3', + 'audio/skill/shencai2.mp3', + 'audio/skill/xunshi1.mp3', + 'audio/skill/xunshi2.mp3', + 'audio/skill/yizu1.mp3', + 'audio/skill/yizu2.mp3', 'audio/skill/aichen1.mp3', 'audio/skill/aichen2.mp3', @@ -4778,6 +4824,7 @@ window.noname_asset_list=[ 'image/card/lukai_heart.png', 'image/card/lukai_spade.png', 'image/card/dagongche.png', + 'image/card/handcard.png', 'image/card/bagua.png', 'image/card/baihupifeng.png', @@ -5826,6 +5873,14 @@ window.noname_asset_list=[ 'image/character/quanhuijie.jpg', 'image/character/re_zhuhuan.jpg', 'image/character/yinfuren.jpg', + 'image/character/clan_wuban.jpg', + 'image/character/clan_wuxian.jpg', + 'image/character/dc_liuye.jpg', + 'image/character/dc_zhaoyǎn.jpg', + 'image/character/luyi.jpg', + 'image/character/shen_zhangfei.jpg', + 'image/character/wangwei.jpg', + 'image/character/zhugeshang.jpg', 'image/character/baiwuchang.jpg', 'image/character/baosanniang.jpg', diff --git a/game/config.js b/game/config.js index c8c9aa464..bed20520d 100644 --- a/game/config.js +++ b/game/config.js @@ -20,7 +20,7 @@ window.config={ zhinang_tricks:['guohe','wuxie','wuzhong','dongzhuxianji'], connect_zhinang_tricks:['guohe','wuxie','wuzhong','dongzhuxianji'], all:{ - sgscharacters:['standard','shenhua','xinghuoliaoyuan','refresh','yijiang','sp','sp2','extra','old','mobile','tw','yingbian','offline','sb'], + sgscharacters:['standard','shenhua','xinghuoliaoyuan','refresh','yijiang','sp','sp2','extra','old','mobile','tw','yingbian','offline','sb','clan'], sgscards:['standard','extra','sp','guozhan','zhulu','yingbian','yongjian'], sgsmodes:['identity','guozhan','versus','doudizhu','single','brawl','connect'], stockmode:['identity','guozhan','versus','boss','doudizhu','single','chess','stone','connect','brawl','tafang'], @@ -133,7 +133,7 @@ window.config={ sort:'type_sort', cards:['standard','extra'], - characters:['standard','shenhua','sp','sp2','yijiang','refresh','xinghuoliaoyuan','mobile','extra','yingbian','sb','tw','offline'], + characters:['standard','shenhua','sp','sp2','yijiang','refresh','xinghuoliaoyuan','mobile','extra','yingbian','sb','tw','offline','clan'], connect_characters:['diy'], connect_cards:['huanlekapai','guozhan','sp','zhulu','yingbian','yongjian'], plays:[], diff --git a/game/game.js b/game/game.js index 2b217ee62..b65ea5b15 100644 --- a/game/game.js +++ b/game/game.js @@ -4830,14 +4830,6 @@ guozhan:{ name:'国战', connect:{ - update:function(config,map){ - if(config.connect_onlyguozhan){ - map.connect_junzhu.show(); - } - else{ - map.connect_junzhu.hide(); - } - }, connect_guozhan_mode:{ name:'游戏模式', init:'normal', @@ -10234,12 +10226,14 @@ diamond:"♦︎", spade:"♠︎", club:"♣︎", + none:'◎', ghujia:'护甲', ghujia_bg:'甲', heart2:"红桃", diamond2:"方片", spade2:"黑桃", club2:"梅花", + none2:'无色', red:'红色', black:'黑色', ok:"确定", @@ -11273,25 +11267,18 @@ while(ui.dialogs.length){ ui.dialogs[0].close(); } - if(!player.noPhaseDelay&&lib.config.show_phase_prompt){ - player.popup('回合开始'); - } - if(lib.config.glow_phase){ - if(_status.currentPhase){ - _status.currentPhase.classList.remove('glow_phase'); - game.broadcast(function(player){ - player.classList.remove('glow_phase'); - },_status.currentPhase); - } - player.classList.add('glow_phase'); - game.broadcast(function(player){ - player.classList.add('glow_phase'); - },player); - } - _status.currentPhase=player; - _status.discarded=[]; game.phaseNumber++; player.phaseNumber++; + game.broadcastAll(function(player,player2,num,popup){ + if(lib.config.glow_phase){ + if(player2) player2.classList.remove('glow_phase'); + player.classList.add('glow_phase'); + } + player.phaseNumber=num; + if(popup&&lib.config.show_phase_prompt) player.popup('回合开始',null,false); + },player,_status.currentPhase,player.phaseNumber,!player.noPhaseDelay); + _status.currentPhase=player; + _status.discarded=[]; game.syncState(); game.addVideo('phaseChange',player); if(game.phaseNumber==1){ @@ -11944,7 +11931,8 @@ str=get.prompt(event.skill,trigger[info.logTarget],player); } else if(typeof info.logTarget=='function'){ - str=get.prompt(event.skill,info.logTarget(trigger,player),player); + var logTarget=info.logTarget(trigger,player); + if(get.itemtype(logTarget).indexOf('player')==0) str=get.prompt(event.skill,logTarget,player); } else{ str=get.prompt(event.skill,null,player); @@ -12329,8 +12317,13 @@ "step 5" player.phaseJieshu(); }, + phaseZhunbei:function(){ + event.trigger(event.name); + game.log(player,'进入了准备阶段'); + }, phaseJudge:function(){ "step 0" + game.log(player,'进入了判定阶段'); event.cards=player.getCards('j'); if(!event.cards.length) event.finish(); "step 1" @@ -12394,6 +12387,7 @@ }, phaseDraw:function(){ "step 0" + game.log(player,'进入了摸牌阶段'); event.trigger("phaseDrawBegin1"); "step 1" event.trigger("phaseDrawBegin2"); @@ -12422,7 +12416,11 @@ } }, phaseUse:function(){ - "step 0"; + "step 0" + if(!event.logged){ + game.log(player,'进入了出牌阶段'); + event.logged=true; + } var next=player.chooseToUse(); if(!lib.config.show_phaseuse_prompt){ next.set('prompt',false); @@ -12459,6 +12457,7 @@ }, phaseDiscard:function(){ "step 0" + game.log(player,'进入了弃牌阶段'); event.num=player.needsToDiscard(); if(event.num<=0) event.finish(); else{ @@ -12472,6 +12471,10 @@ "step 2" event.cards=result.cards; }, + phaseJieshu:function(){ + event.trigger(event.name); + game.log(player,'进入了结束阶段'); + }, chooseToUse:function(){ "step 0" if(event.responded) return; @@ -12595,7 +12598,7 @@ ui.click.ok(); } else if(ai.basic.chooseCard(event.ai1)){ - if(ai.basic.chooseTarget(event.ai2)){ + if(ai.basic.chooseTarget(event.ai2)&&(!event.filterOk||event.filterOk())){ ui.click.ok(); event._aiexcludeclear=true; } @@ -12780,7 +12783,7 @@ ui.click.ok(); } else if(ai.basic.chooseCard(event.ai1||event.ai)){ - if(ai.basic.chooseTarget(event.ai2)){ + if(ai.basic.chooseTarget(event.ai2)&&(!event.filterOk||event.filterOk())){ ui.click.ok(); event._aiexcludeclear=true; } @@ -13021,7 +13024,7 @@ "step 1" if(event.result=='ai'){ game.check(); - if(ai.basic.chooseCard(event.ai)||forced){ + if((ai.basic.chooseCard(event.ai)||forced)&&(!event.filterOk||event.filterOk())){ ui.click.ok(); } else if(event.skill){ @@ -13071,12 +13074,73 @@ else{ event.done=player.discard(event.result.cards); } + event.done.discarder=player; } if(event.dialog&&event.dialog.close) event.dialog.close(); }, + gaincardMultiple:function(){ + 'step 0' + event.type='gain'; + if(event.animate=='give'||event.animate=='gain2') event.visible=true; + if(player&&cards) player.lose(cards,ui.special).set('type','gain').set('forceDie',true).set('getlx',false); + 'step 1' + switch(event.animate){ + case 'draw': + game.delay(0,get.delayx(500,500)); + for(var i of event.gain_list){ + if(get.itemtype(i[1])=='card') i[1]=[i[1]]; + i[0].$draw(i[1].length); + } + break; + case 'gain': + game.delay(0,get.delayx(700,700)); + for(var i of event.gain_list){ + if(get.itemtype(i[1])=='card') i[1]=[i[1]]; + i[0].$gain(i[1].length); + } + break; + case 'gain2': case 'draw2': + game.delay(0,get.delayx(500,500)); + for(var i of event.gain_list){ + if(get.itemtype(i[1])=='card') i[1]=[i[1]]; + i[0].$gain2(i[1]); + } + break; + case 'give': case 'giveAuto': + if(!player) break; + var evt=event.getl(player); + game.delay(0,get.delayx(500,500)); + for(var i of event.gain_list){ + if(get.itemtype(i[1])=='card') i[1]=[i[1]]; + var shown=i[1].slice(0),hidden=[]; + if(event.animate=='giveAuto'){ + for(var card of i[1]){ + if(evt.hs.contains(card)){ + shown.remove(card); + hidden.push(card); + } + } + } + if(shown.length>0) player.$give(shown,i[0]); + if(hidden.length>0) player.$giveAuto(hidden,i[0]); + } + default: + event.finish(); + } + for(var i of event.gain_list){ + var next=i[0].gain(i[1]); + next.getlx=false; + if(event.visible) next.visible=true; + if(event.giver) next.giver=event.giver; + if(event.gaintag) next.gaintag.addArray(event.gaintag); + } + 'step 2' + game.delayx(); + }, discardMultiple:function(){ 'step 0' event.type='discard'; + event.visible=true; if(!event.position) event.position=ui.discardPile; var cards=[]; event.cards=cards; @@ -13667,7 +13731,7 @@ } else{ game.check(); - if(ai.basic.chooseButton(event.ai)||forced) ui.click.ok(); + if((ai.basic.chooseButton(event.ai)||forced)&&(!event.filterOk||event.filterOk())) ui.click.ok(); else ui.click.cancel(); } } @@ -13878,7 +13942,7 @@ "step 1" if(event.result=='ai'){ game.check(); - if(ai.basic.chooseCard(event.ai)||forced){ + if((ai.basic.chooseCard(event.ai)||forced)&&(!event.filterOk||event.filterOk())){ ui.click.ok(); } else if(event.skill){ @@ -13949,7 +14013,7 @@ "step 1" if(event.result=='ai'){ game.check(); - if(ai.basic.chooseTarget(event.ai)||forced){ + if((ai.basic.chooseTarget(event.ai)||forced)&&(!event.filterOk||event.filterOk())){ ui.click.ok(); } else{ @@ -14002,7 +14066,7 @@ if(event.result=='ai'){ game.check(); if(ai.basic.chooseCard(event.ai1)){ - if(ai.basic.chooseTarget(event.ai2)){ + if(ai.basic.chooseTarget(event.ai2)&&(!event.filterOk||event.filterOk())){ ui.click.ok(); _status.event._aiexclude.length=0; } @@ -14405,7 +14469,7 @@ "step 1" if(event.result=='ai'){ game.check(); - if(ai.basic.chooseButton(event.ai)||forced) ui.click.ok(); + if((ai.basic.chooseButton(event.ai)||forced)&&(!event.filterOk||event.filterOk())) ui.click.ok(); else ui.click.cancel(); } event.dialog.close(); @@ -14523,7 +14587,7 @@ "step 1" if(event.result=='ai'){ game.check(); - if(ai.basic.chooseButton(event.ai)||forced) ui.click.ok(); + if((ai.basic.chooseButton(event.ai)||forced)&&(!event.filterOk||event.filterOk())) ui.click.ok(); else ui.click.cancel(); } event.dialog.close(); @@ -14553,6 +14617,7 @@ if(!event.chooseonly){ var next=target.discard(event.cards); if(player!=target) next.notBySelf=true; + next.discarder=player; event.done=next; if(event.delay===false){ next.set('delay',false); @@ -14669,7 +14734,7 @@ "step 1" if(event.result=='ai'){ game.check(); - if(ai.basic.chooseButton(event.ai)||forced) ui.click.ok(); + if((ai.basic.chooseButton(event.ai)||forced)&&(!event.filterOk||event.filterOk())) ui.click.ok(); else ui.click.cancel(); } event.dialog.close(); @@ -15869,8 +15934,12 @@ cards2:event.cards2, }).setContent('swapHandcardsx'); 'step 1' - player.gain(event.cards2); - target.gain(event.cards1); + game.loseAsync({ + gain_list:[ + [player,event.cards2], + [target,event.cards1] + ], + }).setContent('gaincardMultiple'); 'step 2' game.delayx(); }, @@ -17282,6 +17351,25 @@ }, player:{ //新函数 + hasClan:function(clan,unseen){ + if(unseen||!this.isUnseen(0)){ + var info=lib.character[this.name1]; + if(info&&info[4]){ + for(var i of info[4]){ + if(typeof i=='string'&&i.indexOf('clan:')==0&&i.slice(5)==clan) return true; + } + } + } + if(this.name2&&(unseen||!this.isUnseen(1))){ + var info=lib.character[this.name2]; + if(info&&info[4]){ + for(var i of info[4]){ + if(typeof i=='string'&&i.indexOf('clan:')==0&&i.slice(5)==clan) return true; + } + } + } + return false; + }, changeZhuanhuanji:function(skill){ var player=this,info=get.info(skill),zhuanhuan=info.zhuanhuanji; if(typeof zhuanhuan=='function') zhuanhuan(player,skill); @@ -17398,6 +17486,10 @@ next.toShow=toShow; next._args=arguments; next.setContent('showCharacter'); + var evt=_status.event; + evt.next.remove(next); + if(evt.logSkill) evt=evt.getParent(); + evt.after.push(next); return next; }, $showCharacter:function(num,log){ @@ -19446,7 +19538,7 @@ phaseZhunbei:function(){ var next=game.createEvent('phaseZhunbei'); next.player=this; - next.setContent('emptyEvent'); + next.setContent('phaseZhunbei'); return next; }, phaseJudge:function(){ @@ -19480,7 +19572,7 @@ phaseJieshu:function(){ var next=game.createEvent('phaseJieshu'); next.player=this; - next.setContent('emptyEvent'); + next.setContent('phaseJieshu'); return next; }, chooseToUse:function(use){ @@ -19528,7 +19620,9 @@ if(next.selectTarget==undefined){ next.selectTarget=lib.filter.selectTarget; } - next.position='hs'; + if(next.position==undefined){ + next.position='hs'; + } if(next.ai1==undefined) next.ai1=get.order; if(next.ai2==undefined) next.ai2=get.effect_use; next.setContent('chooseToUse'); @@ -20965,6 +21059,10 @@ }); return map; }; + next.getg=function(player){ + if(this.getlx===false||player!=this.player) return []; + return this.cards.slice(0); + } next.gaintag=[]; return next; }, @@ -21050,6 +21148,7 @@ var next=target.gain(cards,this); next.animate=visible?'give':'giveAuto'; next.giver=this; + return next; }, lose:function(){ var next=game.createEvent('lose'); @@ -26123,6 +26222,7 @@ _skillChoice:this._skillChoice, ai1:this.ai1, ai2:this.ai2, + filterOk:this.filterOk, } if(skill){ var info=get.info(skill); @@ -26141,17 +26241,21 @@ if(!evt.ignoreMod&&player){ var mod=game.checkMod(card,player,'unchanged','cardEnabled2',player); if(mod!='unchanged') return mod; - if(evt._backup&&evt._backup.filterCard){ - var cardx2=lib.skill[evt.skill].viewAs(ui.selected.cards.concat([card]),player); - if(get.is.object(cardx2)){ - var cardx=get.autoViewAs(cardx2,ui.selected.cards.concat([card])); - if(!get.filter(evt._backup.filterCard)(cardx,player,evt)) return false; - } - } } return get.filter(evt.filterCard2).apply(this,arguments); }; } + if(info.filterOk==undefined){ + this.filterOk=function(){ + var evt=_status.event; + var card=get.card(),player=get.player(); + var filter=evt._backup.filterCard; + if(filter&&!filter(card,player,evt)) return false; + if(evt._backup.filterOk) return evt._backup.filterOk(); + return true; + }; + } + else this.filterOk=info.filterOk; if(info.selectCard!=undefined) this.selectCard=info.selectCard; if(info.position!=undefined) this.position=info.position; if(info.forced!=undefined) this.forced=info.forced; @@ -26174,14 +26278,21 @@ if(!evt.ignoreMod&&player){ var mod=game.checkMod(card,player,'unchanged','cardEnabled2',player); if(mod!='unchanged') return mod; - if(evt._backup&&evt._backup.filterCard){ - var cardx=get.autoViewAs(lib.skill[evt.skill].viewAs,ui.selected.cards.concat([card])); - if(!get.filter(evt._backup.filterCard)(cardx,player,evt)) return false; - }; } return get.filter(evt.filterCard2).apply(this,arguments); }; } + if(info.filterOk==undefined){ + this.filterOk=function(){ + var evt=_status.event; + var card=get.card(),player=get.player(); + var filter=evt._backup.filterCard; + if(filter&&!filter(card,player,evt)) return false; + if(evt._backup.filterOk) return evt._backup.filterOk() + return true; + }; + } + else this.filterOk=info.filterOk; if(info.selectCard!=undefined) this.selectCard=info.selectCard; if(info.position!=undefined) this.position=info.position; if(info.forced!=undefined) this.forced=info.forced; @@ -26205,6 +26316,7 @@ this.complexTarget=info.complexTarget; if(info.ai1!=undefined) this.ai1=info.ai1; if(info.ai2!=undefined) this.ai2=info.ai2; + this.filterOk=info.filterOk; } delete this.fakeforce; } @@ -26232,6 +26344,7 @@ this._cardChoice=this._backup._cardChoice; this._targetChoice=this._backup._targetChoice; this._skillChoice=this._backup._skillChoice; + this.filterOk=this._backup.filterOk; } delete this.skill; delete this.ignoreMod; @@ -27172,7 +27285,11 @@ }, targetEnabledx:function(card,player,target){ if(!card) return false; - if(_status.event.addCount_extra&&!lib.filter.cardUsable2(card,player)&&!game.checkMod(card,player,target,false,'cardUsableTarget',player)) return false; + var event=_status.event; + if(event._backup&&event._backup.filterCard==lib.filter.filterCard&&(!lib.filter.cardEnabled(card,player,event)||!lib.filter.cardUsable(card,player,event))) return false; + if(event.addCount_extra){ + if(!lib.filter.cardUsable2(card,player)&&!game.checkMod(card,player,target,false,'cardUsableTarget',player)) return false; + } var info=get.info(card); if(info.singleCard&&info.filterAddedTarget&&ui.selected.targets.length) return info.filterAddedTarget(card,player,target,ui.selected.targets[ui.selected.targets.length-1]); return lib.filter.targetEnabled.apply(this,arguments); @@ -27793,6 +27910,7 @@ }, }, dualside:{ + charlotte:true, subSkill:{ turn:{ trigger:{player:['turnOverAfter','dieBefore']}, @@ -29449,6 +29567,7 @@ }, loseAsync:function(arg){ var next=game.createEvent('loseAsync'); + next.forceDie=true; next.getd=function(player,key,position){ if(!position) position=ui.discardPile; if(!key) key='cards'; @@ -29485,6 +29604,16 @@ }); return map; }; + next.getg=function(player){ + var that=this; + var cards=[]; + player.getHistory('gain',function(evt){ + if(evt.parent==that){ + cards.addArray(evt.cards); + } + }); + return cards; + }; if(arg&&get.is.object(arg)){ for(var i in arg) next[i]=arg[i]; } @@ -29509,6 +29638,25 @@ return history; } }, + getAllGlobalHistory:function(key,filter){ + var list=[]; + var all=_status.globalHistory; + for(var j=0;j攻击范围:1'); } } - else if(get.subtype(node)){ - uiintro.add('
    '+get.translation(get.subtype(node))+'
    '); + else if(get.subtype(name)){ + uiintro.add('
    '+get.translation(get.subtype(name))+'
    '); } else if(lib.card[name]&&lib.card[name].addinfomenu){ uiintro.add('
    '+lib.card[name].addinfomenu+'
    '); diff --git a/game/package.js b/game/package.js index f66a17905..864122c8b 100644 --- a/game/package.js +++ b/game/package.js @@ -7,6 +7,7 @@ window.noname_package={ yijiang:'一将成名', sp:'璀璨星河', yingbian:'文德武备', + clan:'门阀士族', sp2:'系列专属', extra:'神将', mobile:'移动版', diff --git a/game/source.js b/game/source.js index 3a055581e..e78e78db9 100644 --- a/game/source.js +++ b/game/source.js @@ -14,6 +14,7 @@ window.noname_source_list=[ 'card/yunchou.js', 'card/zhenfa.js', 'card/zhulu.js', + 'character/clan.js', 'character/diy.js', 'character/extra.js', 'character/gujian.js', diff --git a/game/update.js b/game/update.js index 6cfe94879..a597184b2 100644 --- a/game/update.js +++ b/game/update.js @@ -1,16 +1,17 @@ window.noname_update={ - version:'1.9.117.2', - update:'1.9.117.1', + version:'1.9.118', + update:'1.9.117.2', changeLog:[ - '新的dialog Button', - 'OL神孙权', - '十周年界李儒、界朱桓、陈珪、黄权、胡班、丁尚涴、柯比能、全惠解、尹夫人', - '其他技能调整和bug修复', 'players://["chengui","dc_huangquan","dc_huban","dc_liru","dingshangwan","junk_sunquan","kebineng","quanhuijie","re_zhuhuan","yinfuren"]', + '部分代码大改', + 'OL族吴苋、族吴班', + '十周年神张飞、卢弈、诸葛尚、刘晔、赵俨、王威', + '其他技能调整和bug修复', + 'players://["clan_wuban","clan_wuxian","dc_liuye","dc_zhaoyǎn","luyi","shen_zhangfei","wangwei","zhugeshang"]', ], files:[ - //'card/extra.js', + 'card/extra.js', //'card/gujian.js', - //'card/guozhan.js', + 'card/guozhan.js', //'card/gwent.js', //'card/huanlekapai.js', //'card/mtg.js', @@ -18,10 +19,11 @@ window.noname_update={ 'card/standard.js', //'card/swd.js', //'card/yunchou.js', - //'card/yingbian.js', - //'card/yongjian.js', + 'card/yingbian.js', + 'card/yongjian.js', //'card/zhenfa.js', //'card/zhulu.js', + 'character/clan.js', 'character/diy.js', 'character/extra.js', //'character/hearth.js', @@ -35,32 +37,32 @@ window.noname_update={ //'character/ow.js', 'character/rank.js', 'character/refresh.js', - //'character/sb.js', - //'character/shenhua.js', + 'character/sb.js', + 'character/shenhua.js', 'character/sp.js', 'character/sp2.js', - //'character/standard.js', + 'character/standard.js', 'character/tw.js', //'character/swd.js', //'character/xianjian.js', - //'character/xinghuoliaoyuan.js', - 'character/yingbian.js', + 'character/xinghuoliaoyuan.js', 'character/yijiang.js', + 'character/yingbian.js', //'character/yxs.js', //'extension/boss/extension.js', //'font/suits.ttf', 'layout/default/layout.css', - 'layout/default/menu.css', + //'layout/default/menu.css', //'layout/long2/layout.css', //'layout/mobile/equip.css', //'layout/mobile/layout.css', //'layout/newlayout/global.css', //'layout/nova/layout.css', //'mode/boss.js', - //'mode/brawl.js', + 'mode/brawl.js', //'mode/chess.js', //'mode/connect.js', - //'mode/doudizhu.js', + 'mode/doudizhu.js', 'mode/guozhan.js', //'mode/identity.js', //'mode/single.js', @@ -70,10 +72,10 @@ window.noname_update={ 'game/game.js', //'game/keyWords.js', //'game/NoSleep.js', - //'game/config.js', - //'game/package.js', + 'game/config.js', + 'game/package.js', //'game/asset.js', - //'game/source.js', + 'game/source.js', //'theme/style/hp/custom.css', //'theme/style/hp/emotion.css', //'theme/style/hp/glass.css', diff --git a/image/card/handcard.png b/image/card/handcard.png new file mode 100644 index 000000000..db56902ba Binary files /dev/null and b/image/card/handcard.png differ diff --git a/image/character/clan_wuban.jpg b/image/character/clan_wuban.jpg new file mode 100644 index 000000000..489e02c91 Binary files /dev/null and b/image/character/clan_wuban.jpg differ diff --git a/image/character/clan_wuxian.jpg b/image/character/clan_wuxian.jpg new file mode 100644 index 000000000..68aa486dd Binary files /dev/null and b/image/character/clan_wuxian.jpg differ diff --git a/image/character/dc_liuye.jpg b/image/character/dc_liuye.jpg new file mode 100644 index 000000000..1ca6d16eb Binary files /dev/null and b/image/character/dc_liuye.jpg differ diff --git a/image/character/dc_zhaoyǎn.jpg b/image/character/dc_zhaoyǎn.jpg new file mode 100644 index 000000000..00b5b6a7f Binary files /dev/null and b/image/character/dc_zhaoyǎn.jpg differ diff --git a/image/character/luyi.jpg b/image/character/luyi.jpg new file mode 100644 index 000000000..011776f1c Binary files /dev/null and b/image/character/luyi.jpg differ diff --git a/image/character/shen_zhangfei.jpg b/image/character/shen_zhangfei.jpg new file mode 100644 index 000000000..fe95b0a01 Binary files /dev/null and b/image/character/shen_zhangfei.jpg differ diff --git a/image/character/wangwei.jpg b/image/character/wangwei.jpg new file mode 100644 index 000000000..71704ebe5 Binary files /dev/null and b/image/character/wangwei.jpg differ diff --git a/image/character/zhugeshang.jpg b/image/character/zhugeshang.jpg new file mode 100644 index 000000000..70bbfec20 Binary files /dev/null and b/image/character/zhugeshang.jpg differ diff --git a/layout/default/layout.css b/layout/default/layout.css index 252989f06..fc81d93bc 100644 --- a/layout/default/layout.css +++ b/layout/default/layout.css @@ -1733,7 +1733,10 @@ div:not(.handcards)>.card>.info>span, } .content>div { position: relative; - margin: 8px; + margin-top: 8px; + margin-bottom: 8px; + margin-left: 4px; + margin-right: 4px; } .content>.caption + .buttons:not(*:last-child){ margin-top: 0; diff --git a/mode/brawl.js b/mode/brawl.js index 07c8d8fd8..d91647067 100644 --- a/mode/brawl.js +++ b/mode/brawl.js @@ -1938,7 +1938,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ var map3=[]; var list1=['司','夏','诸','皇']; var list2=['马','侯','葛','甫']; - var exclude=['界','新','大','旧','☆','神']; + var exclude=['界','新','大','旧','☆','神','晋','族','谋']; for(var i in lib.character){ if(lib.filter.characterDisabled(i)) continue; if(lib.character[i][1]=='key') continue; diff --git a/mode/doudizhu.js b/mode/doudizhu.js index 508f8db35..1c757fd75 100644 --- a/mode/doudizhu.js +++ b/mode/doudizhu.js @@ -2236,7 +2236,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ } else event.finish(); 'step 2' - if(result.bool&&result.cards&&result.cards.length) target.gain(result.cards,player,'giveAuto'); + if(result.bool&&result.cards&&result.cards.length) player.give(result.cards,target); }, ai:{ viewHandcard:true, diff --git a/mode/guozhan.js b/mode/guozhan.js index aaede9fad..dd0e7ed6a 100644 --- a/mode/guozhan.js +++ b/mode/guozhan.js @@ -1993,7 +1993,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ } } 'step 2' - if(result.bool) event.gainner.gain(result.cards,event.giver,'giveAuto'); + if(result.bool) event.giver.give(result.cards,event.gainner,'giveAuto'); 'step 3' if(target.isIn()) player.chooseBool('纵横:是否令'+get.translation(target)+'获得【锋略】?').set('ai',function(){ var evt=_status.event.getParent(); @@ -2053,7 +2053,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ } } 'step 2' - if(result.bool) event.gainner.gain(result.cards,event.giver,'giveAuto'); + if(result.bool) event.giver.give(result.cards,event.gainner,'giveAuto'); }, ai:{ order:8, @@ -2617,7 +2617,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ } else event.goto(3); 'step 2' - target.gain(result.cards,player,'giveAuto'); + player.give(result.cards,target); 'step 3' if(target.isIn()&&event.name=='gzweimeng') player.chooseBool('纵横:是否令'+get.translation(target)+'获得【危盟】?').set('ai',function(){ var evt=_status.event.getParent(); @@ -3359,6 +3359,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ }) }, filterCard:true, + position:'he', filterTarget:function(card,player,target){ return target!=player&&target.countCards('he')>0; }, @@ -3376,7 +3377,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ player.gainPlayerCard(target,'he',true); event.finish(); } - else player.gain(result.cards,target,'give'); + else target.give(result.cards,player); 'step 2' if(result.bool&&result.cards&&result.cards.length&& target.isIn()&&player.isIn()&&get.suit(result.cards[0],target)=='spade'&&target.canUse('sha',player,false)) target.useCard({name:'sha',isCard:true},false,player); @@ -4169,7 +4170,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ }, content:function(){ 'step 0' - target.gain(cards,player,'giveAuto'); + player.give(cards,target); 'step 1' player.chooseJunlingFor(target); 'step 2' @@ -4494,6 +4495,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ filter:function(event,player){ return !player.getHistory('useCard').length||!player.getHistory('sourceDamage').length; }, + check:()=>false, content:function(){ lib.skill.rekuangcai.change(player,player.getHistory('useCard').length?-1:1); }, @@ -4996,7 +4998,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ 'step 2' if(result.bool){ event.card=result.cards[0]; - player.gain(result.cards,target,'give').gaintag.add('gzwenji'); + target.give(result.cards,player).gaintag.add('gzwenji'); } 'step 3' if(target.identity=='unknown'||target.isFriendOf(player)){ @@ -5015,7 +5017,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ else event.finish(); 'step 4' if(result.bool){ - target.gain(result.cards,player,'give'); + player.give(result.cards,target); player.removeGaintag('gzwenji'); } else{ @@ -6032,7 +6034,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ else event.finish(); 'step 3' if(result.cards){ - target.gain(result.cards,player,'giveAuto'); + player.give(result.cards,target); } }, group:['gzweidi_ft','gzweidi_ftc'], @@ -6161,7 +6163,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ 'step 1' if(result.bool){ player.logSkill('gzfudi',trigger.source); - trigger.source.gain(result.cards,player,'giveAuto'); + player.give(result.cards,trigger.source); } else event.finish(); 'step 2' @@ -6516,7 +6518,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ player.line(result.targets,'green'); if(result.cards.length){ event.cards=result.cards; - result.targets[0].gain(result.cards,player,'give'); + player.give(result.cards,result.cards[0]); } else{ player.storage.gzzhengbi_eff1=result.targets[0]; @@ -6537,7 +6539,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ else{ if(target.countCards('h')){ var cards=target.getCards('h'); - player.gain(cards,target,'giveAuto'); + target.give(cards,player); event.finish(); } else event.finish(); @@ -6547,7 +6549,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ target.chooseCard('he',(check?1:2),{type:(check?['trick','delay','equip']:'basic')},true); 'step 5' if(result.cards){ - player.gain(result.cards,target,'giveAuto'); + target.give(result.cards,player); } }, subSkill:{ @@ -6703,7 +6705,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ if(result.bool){ event.target=result.targets[0]; player.logSkill('gzjieyue',result.targets); - result.targets[0].gain(result.cards[0],player,'giveAuto'); + player.give(result.cards[0],result.targets[0]); player.chooseJunlingFor(result.targets[0]); } else event.finish(); @@ -7093,7 +7095,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ }); 'step 1' if(result.bool){ - player.gain(result.cards[0],trigger.source,'giveAuto'); + trigger.source.give(result.cards[0],player,'giveAuto'); } else trigger.source.loseHp(); }, @@ -7867,15 +7869,15 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ }, frequent:true, preHidden:true, - filter:function(event){ - return (event.num>0) - }, content:function(){ - "step 0" + 'step 0' event.cards=game.cardsGotoOrdering(get.cards(2)).cards; - "step 1" + 'step 1' + if(_status.connectMode) game.broadcastAll(function(){_status.noclearcountdown=true}); + event.given_map={}; + 'step 2' if(event.cards.length>1){ - player.chooseCardButton('将“遗计”牌分配给任意角色',true,event.cards,[1,event.cards.length]).set('ai',function(button){ + player.chooseCardButton('遗计:请选择要分配的牌',true,event.cards,[1,event.cards.length]).set('ai',function(button){ if(ui.selected.buttons.length==0) return 1; return 0; }); @@ -7886,13 +7888,11 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ else{ event.finish(); } - "step 2" + 'step 3' if(result.bool){ - for(var i=0;i0) event.goto(2); + 'step 5' + if(_status.connectMode){ + game.broadcastAll(function(){delete _status.noclearcountdown;game.stopCountChoose()}); + } + var list=[]; + for(var i in event.given_map){ + var source=(_status.connectMode?lib.playerOL:game.playerMap)[i]; + player.line(source,'green'); + list.push([source,event.given_map[i]]); + } + game.loseAsync({ + gain_list:list, + giver:player, + animate:'draw', + }).setContent('gaincardMultiple'); }, ai:{ maixie:true, @@ -8620,12 +8635,12 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ return 5-get.value(card); }, selectCard:[1,3], - prepare:'give', discard:false, - // delay:0.5, + lose:false, + delay:false, content:function(){ "step 0" - target.gain(cards,player); + player.give(cards,target); "step 1" if(!target.isUnseen()){ player.draw(cards.length); @@ -9829,12 +9844,11 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ var card=list.randomGet(); var owner=get.owner(card); if(owner){ - player.gain(card,owner,'give'); + player.gain(card,owner,'give','bySelf'); player.line(owner,'green'); } else{ - player.gain(card,'log'); - player.$draw(card); + player.gain(card,'gain2'); } } }, @@ -9952,7 +9966,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ } } var owner=get.owner(cards[0]); - if(owner) player.gain(cards,'give',owner); + if(owner) player.gain(cards,'give',owner,'bySelf'); else player.gain(cards,'gain2'); }, group:'zhangwu_draw', @@ -10170,7 +10184,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ if(result.bool){ var card=result.links[0]; player.logSkill('ziliang',trigger.player); - trigger.player.gain(card,player,'give'); + player.give(card,trigger.player); } } }, @@ -10213,7 +10227,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ target.equip(card); } else{ - target.gain(card,player,'giveAuto'); + player.give(card,target); event.finish(); } } @@ -11009,7 +11023,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ }, content:function(){ 'step 0' - if(player.phaseNumber==1&&player.isUnseen(0)&&(_status.connectMode?!lib.configOL.junzhu:get.config('junzhu'))){ + if(player.phaseNumber==1&&player.isUnseen(0)&&(_status.connectMode?lib.configOL.junzhu:get.config('junzhu'))){ var name=player.name1; if(name.indexOf('gz_')!=0||!lib.junList.contains(name.slice(3))){ event.goto(3); @@ -12241,6 +12255,21 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ // } } }, + dynamicTranslate:{ + gzzhaosong:function(player){ + var storage=player.getStorage('gzzhaosong'); + var list1=['效果①','效果②','效果③']; + var str='每局游戏每项限一次。'; + var list2=['①一名角色进入濒死状态时,你可以令其回复至2点体力并摸一张牌。','②出牌阶段,你可观看一名其他角色的所有暗置武将牌和手牌,然后可以获得其区域内的一张牌。','③一名角色使用【杀】选择唯一目标后,你可以为此【杀】增加两个目标。']; + for(var i=0;i<3;i++){ + var bool=storage.contains(list1[i]); + if(bool) str+=''; + str+=list2[i]; + if(bool) str+=''; + } + return str; + }, + }, translate:{ ye:'野', ye2:'野心家', @@ -13286,7 +13315,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ 'step 2' if(event.junling=='junling2'&&source!=player){ if(result.cards.length&&event.ing){ - source.gain(result.cards,player,'giveAuto'); + player.give(result.cards,source); } event.num++; if(event.num<3){ @@ -13858,7 +13887,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ wontYe:function(group){ if(!group) group=lib.character[this.name1][1]; if(_status.yeidentity&&_status.yeidentity.contains(group)) return false; - if(get.zhu(this,null,true)) return true; + if(get.zhu(this,null,group)) return true; return get.totalPopulation(group)+1<=get.population()/2; }, perfectPair:function(choosing){