diff --git a/LICENSE b/LICENSE
deleted file mode 100644
index d7f105139..000000000
--- a/LICENSE
+++ /dev/null
@@ -1,339 +0,0 @@
-GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Lesser General Public License instead.) You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
-
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term "modification".) Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
- 1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
- 2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) You must cause the modified files to carry prominent notices
- stating that you changed the files and the date of any change.
-
- b) You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any
- part thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
- c) If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display an
- announcement including an appropriate copyright notice and a
- notice that there is no warranty (or else, saying that you provide
- a warranty) and that users may redistribute the program under
- these conditions, and telling the user how to view a copy of this
- License. (Exception: if the Program itself is interactive but
- does not normally print such an announcement, your work based on
- the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
- a) Accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of Sections
- 1 and 2 above on a medium customarily used for software interchange; or,
-
- b) Accompany it with a written offer, valid for at least three
- years, to give any third party, for a charge no more than your
- cost of physically performing source distribution, a complete
- machine-readable copy of the corresponding source code, to be
- distributed under the terms of Sections 1 and 2 above on a medium
- customarily used for software interchange; or,
-
- c) Accompany it with the information you received as to the offer
- to distribute corresponding source code. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form with such
- an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable. However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
- 5. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Program or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
- 6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
- 7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all. For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
-
- 9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation. If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
- 10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission. For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this. Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
- NO WARRANTY
-
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- {description}
- Copyright (C) {year} {fullname}
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
- Gnomovision version 69, Copyright (C) year name of author
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
- `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
- {signature of Ty Coon}, 1 April 1989
- Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs. If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library. If this is what you want to do, use the GNU Lesser General
-Public License instead of this License.
diff --git a/README.md b/README.md
deleted file mode 100644
index 0d77a9994..000000000
--- a/README.md
+++ /dev/null
@@ -1,2 +0,0 @@
-noname
-======
diff --git a/card/compensate.js b/card/compensate.js
new file mode 100644
index 000000000..4484a6f6c
--- /dev/null
+++ b/card/compensate.js
@@ -0,0 +1,78 @@
+card.compensate={
+ list:[
+ ["diamond",3,'guohe'],
+ ['club',8,'guohe'],
+ ['spade',13,'guohe'],
+
+ ["heart",4,"huogong","fire"],
+ ["diamond",5,"huogong","fire"],
+ ["diamond",10,"huogong","fire"],
+ ["diamond",13,"huogong","fire"],
+
+ ["heart",1,"juedou"],
+ ["diamond",1,"juedou"],
+ ["club",1,"juedou"],
+
+ ["heart",12,"wuzhong"],
+ ["diamond",3,"wuzhong"],
+
+ ["club",10,"wuxie"],
+ ["spade",10,"wuxie"],
+ ["spade",11,"wuxie"],
+
+ // ['heart',5,'jiu'],
+ // ['spade',9,'jiu'],
+ // ['spade',2,'jiu'],
+
+ ['heart',8,'tao'],
+ ['heart',10,'tao'],
+
+ ["heart",10,"sha","fire"],
+ ["diamond",4,"sha","fire"],
+ ["heart",5,"sha","fire"],
+ ["spade",4,"sha","thunder"],
+ ["spade",5,"sha","thunder"],
+ ["club",5,"sha","thunder"],
+ ["spade",9,"sha","thunder"],
+ ["club",8,"sha"],
+ ["club",10,"sha"],
+ ["club",2,"sha"],
+ ["club",10,"sha"],
+ ["spade",10,"sha"],
+ ["spade",10,"sha"],
+ ["spade",11,"sha"],
+ ["spade",6,"sha"],
+ ["club",2,"sha"],
+ ["club",8,"sha"],
+ ["spade",9,"sha"],
+
+ ["spade",4,"sha"],
+ ["spade",7,"sha"],
+ ["spade",1,"sha"],
+ ["club",4,"sha"],
+ ["club",7,"sha"],
+ ["club",2,"sha"],
+
+ ["heart",11,"shan"],
+ ["heart",12,"shan"],
+ ["diamond",6,"shan"],
+ ["heart",11,"shan"],
+ ["heart",8,"shan"],
+ ["diamond",5,"shan"],
+ ["diamond",2,"shan"],
+ ["heart",11,"shan"],
+ ["heart",12,"shan"],
+ ["heart",12,"shan"],
+ ["heart",4,"shan"],
+ ["heart",4,"shan"],
+ ["diamond",6,"shan"],
+ ["diamond",7,"shan"],
+ ["heart",11,"shan"],
+ ["heart",12,"shan"],
+ ["diamond",6,"shan"],
+ ["diamond",7,"shan"],
+
+ ["club",5,"tiesuo"],
+ ["spade",8,"tiesuo"],
+ ],
+}
diff --git a/card/ex.js b/card/ex.js
new file mode 100644
index 000000000..70db58861
--- /dev/null
+++ b/card/ex.js
@@ -0,0 +1,105 @@
+card.ex={
+ card:{
+ hanbing:{
+ fullskin:true,
+ type:"equip",
+ subtype:"equip1",
+ distance:{attackFrom:-1},
+ skills:['hanbing_skill'],
+ ai:{
+ basic:{
+ equipValue:2
+ }
+ },
+ },
+ renwang:{
+ fullskin:true,
+ type:"equip",
+ subtype:"equip2",
+ skills:['renwang_skill'],
+ ai:{
+ basic:{
+ equipValue:8
+ },
+ },
+ },
+ },
+ skill:{
+ hanbing_skill:{
+ trigger:{player:'shaHit'},
+ direct:true,
+ filter:function(event,player){
+ return event.target.get('he').length>0;
+ },
+ content:function(){
+ "step 0"
+ player.choosePlayerCard('是否发动【寒冰剑】?','he',trigger.target,[1,2],function(button){
+ var eff=ai.get.damageEffect(trigger.target,player,player);
+ if(ai.get.attitude(player,trigger.target)>0){
+ if(eff>=0) return false;
+ return 10-ai.get.buttonValue(button);
+ }
+ if(eff<=0) return ai.get.buttonValue(button);
+ if(trigger.target.hp==1) return false;
+ if(player.skills.contains('jiu')||player.skills.contains('tianxianjiu')) return false;
+ if(ui.dialog.buttons.length<2) return -1;
+ var num=0;
+ for(var i=0;i1.5) num++;
+ }
+ if(num>=2) return ai.get.buttonValue(button)-1.5;
+ });
+ "step 1"
+ if(result.bool){
+ trigger.untrigger();
+ var cards=[];
+ for(var i=0;i0) return 1;
+ }
+ }
+ }
+ return 0;
+ },
+ },
+ tag:{
+ save:1
+ }
+ }
+ },
+ huogong:{
+ fullskin:true,
+ type:'trick',
+ enable:true,
+ filterTarget:function(card,player,target){
+ if(player!=game.me&&player.num('h')<3) return false;
+ return target.num('h')>0;
+ },
+ content:function(){
+ "step 0"
+ if(target.get('h').length==0){
+ event.finish();
+ return;
+ }
+ target.chooseCard(true);
+ "step 1"
+ event.dialog=ui.create.dialog(get.translation(target.name)+'展示的手牌',result.cards);
+ event.card2=result.cards[0];
+ game.log(get.translation(target.name)+'展示了'+get.translation(event.card2));
+ player.chooseToDiscard(function(card){
+ return get.suit(card)==get.suit(_status.event.parent.card2);
+ },function(card){
+ if(ai.get.damageEffect(target,player,player,'fire')>0){
+ return 6-ai.get.value(card,_status.event.player);
+ }
+ return -1;
+ }).prompt=false;
+ game.delay(2);
+ "step 2"
+ if(result.bool){
+ target.damage('fire');
+ }
+ else{
+ target.addTempSkill('huogong2','phaseBegin');
+ }
+ event.dialog.close();
+ },
+ ai:{
+ basic:{
+ order:4,
+ value:[3,1],
+ useful:1,
+ },
+ result:{
+ player:function(player){
+ var nh=player.num('h');
+ if(nh==2&&player.hp==1) return 0;
+ if(nh<=player.hp&&
+ _status.event.name=='chooseToUse'&&_status.event.filterCard({name:'huogong'})) return -10;
+ },
+ target:function(player,target){
+ if(target.skills.contains('huogong2')) return 0;
+ return -1.5;
+ }
+ },
+ tag:{
+ damage:1,
+ fireDamage:1,
+ natureDamage:1,
+ }
+ }
+ },
+ tiesuo:{
+ fullskin:true,
+ type:'trick',
+ enable:true,
+ filterTarget:true,
+ selectTarget:[1,2],
+ content:function(){
+ target.link();
+ },
+ chongzhu:true,
+ ai:{
+ basic:{
+ useful:4,
+ value:4,
+ order:7
+ },
+ result:{
+ target:function(player,target){
+ if(target.classList.contains('linked')) return 1;
+ if(ai.get.attitude(player,target)>=0) return -1;
+ for(var i=0;i3) num-=4;
+ return num;
+ }
+ },
+ },
+ skills:['tengjia1','tengjia2']
+ },
+ baiyin:{
+ fullskin:true,
+ type:'equip',
+ subtype:'equip2',
+ onLose:function(){
+ player.recover();
+ },
+ filterLose:function(card,player){
+ return player.hp0;
+ }
+ return att<=0;
+ },
+ content:function(){
+ trigger.card.nature='fire';
+ player.addSkill('zhuque_skill2');
+ player.storage.zhuque_skill=trigger.card;
+ }
+ },
+ zhuque_skill2:{
+ trigger:{player:'useCardAfter'},
+ forced:true,
+ popup:false,
+ content:function(){
+ delete player.storage.zhuque_skill.nature;
+ }
+ },
+ huogon2:{},
+ },
+ translate:{
+ jiu:'酒',
+ huogong:'火攻',
+ tiesuo:'铁锁连环',
+ huogong_bg:'攻',
+ tiesuo_bg:'锁',
+ _chongzhu:'重铸',
+ _lianhuan:'连环',
+ _lianhuan2:'连环',
+ bingliang:'兵粮寸断',
+ hualiu:'骅骝',
+ zhuque:'朱雀羽扇',
+ bingliang_bg:'粮',
+ bingliang_info:'目标角色判定阶段进行判定:若判定结果不为梅花,则跳过该角色的摸牌阶段。',
+ hualiu_bg:'+马',
+ zhuque_bg:'扇',
+ zhuque_skill:'朱雀羽扇',
+ zhuque_info:'你可以将一张普通【杀】当具火焰伤害的【杀】使用。',
+ guding:'古锭刀',
+ guding_info:'锁定技,当你使用【杀】对目标角色造成伤害时,若其没有手牌,此伤害+1。',
+ guding_skill:'古锭刀',
+ tengjia:'藤甲',
+ tengjia_info:'锁定技,【南蛮入侵】、【万箭齐发】和普通【杀】对你无效。你每次受到火焰伤害时,该伤害+1。',
+ tengjia1:'藤甲',
+ tengjia2:'藤甲',
+ baiyin:'白银狮子',
+ baiyin_info:'锁定技,你每次受到伤害时,最多承受1点伤害(防止多余的伤害);当你失去装备区里的【白银狮子】时,你回复1点体力。',
+ baiyin_skill:'白银狮子',
+ _baiyin:'白银狮子',
+ },
+ list:[
+ ["heart",4,"sha","fire"],
+ ["heart",7,"sha","fire"],
+ ["heart",10,"sha","fire"],
+ ["diamond",4,"sha","fire"],
+ ["diamond",5,"sha","fire"],
+ ["spade",4,"sha","thunder"],
+ ["spade",5,"sha","thunder"],
+ ["spade",6,"sha","thunder"],
+ ["spade",7,"sha","thunder"],
+ ["spade",8,"sha","thunder"],
+ ["club",5,"sha","thunder"],
+ ["club",6,"sha","thunder"],
+ ["club",7,"sha","thunder"],
+ ["club",8,"sha","thunder"],
+ ["heart",8,"shan"],
+ ["heart",9,"shan"],
+ ["heart",11,"shan"],
+ ["heart",12,"shan"],
+ ["diamond",6,"shan"],
+ ["diamond",7,"shan"],
+ ["diamond",8,"shan"],
+ ["diamond",10,"shan"],
+ ["diamond",11,"shan"],
+ ["heart",5,"tao"],
+ ["heart",6,"tao"],
+ ["diamond",2,"tao"],
+ ["diamond",3,"tao"],
+ ["diamond",9,"jiu"],
+ ["spade",3,"jiu"],
+ ["spade",9,"jiu"],
+ ["club",3,"jiu"],
+ ["club",9,"jiu"],
+
+ ["diamond",13,"hualiu"],
+ ["club",1,"baiyin"],
+ ["spade",2,"tengjia",'fire'],
+ ["club",2,"tengjia",'fire'],
+ ["spade",2,"guding"],
+ ["diamond",2,"zhuque",'fire'],
+
+ ["heart",2,"huogong","fire"],
+ ["heart",3,"huogong","fire"],
+ ["diamond",12,"huogong","fire"],
+ ["spade",11,"tiesuo"],
+ ["spade",12,"tiesuo"],
+ ["club",10,"tiesuo"],
+ ["club",11,"tiesuo"],
+ ["club",12,"tiesuo"],
+ ["club",13,"tiesuo"],
+ ["heart",13,"wuxie"],
+ ["heart",13,"wuxie"],
+ ["spade",13,"wuxie"],
+ ["spade",10,"bingliang"],
+ ["club",4,"bingliang"],
+ ],
+}
diff --git a/card/guozhan.js b/card/guozhan.js
new file mode 100644
index 000000000..d69e7ccba
--- /dev/null
+++ b/card/guozhan.js
@@ -0,0 +1,246 @@
+card.guozhan={
+ card:{
+ yuanjiao:{
+ fullskin:true,
+ type:'trick',
+ enable:true,
+ filterTarget:function(card,player,target){
+ if(lib.config.mode!='guozhan') return player!=target;
+ if(target.identity=='unknown'||player.identity=='unknown') return false;
+ if(player==target) return false;
+ if(player.identity=='ye') return true;
+ return player.identity!=target.identity;
+ },
+ content:function(){
+ game.asyncDraw([target,player],[1,lib.config.mode=='guozhan'?3:1]);
+ },
+ ai:{
+ basic:{
+ useful:4,
+ value:8,
+ order:9
+ },
+ result:{
+ target:1,
+ player:3,
+ },
+ },
+ // mode:['guozhan'],
+ },
+ zhibi:{
+ fullskin:true,
+ type:'trick',
+ enable:true,
+ chongzhu:true,
+ filterTarget:function(card,player,target){
+ if(player==target) return false;
+ return (target.get('h').length||
+ target.classList.contains('unseen')||
+ target.classList.contains('unseen2'))
+ },
+ content:function(){
+ "step 0"
+ if(!player.storage.zhibi){
+ player.storage.zhibi=[];
+ }
+ player.storage.zhibi.push(target);
+ if(!event.isMine()){
+ event.finish();
+ return;
+ }
+ var controls=[];
+ if(target.get('h').length) controls.push('手牌');
+ if(target.classList.contains('unseen')) controls.push('主将');
+ if(target.classList.contains('unseen2')) controls.push('副将');
+ if(controls.length>1){
+ player.chooseControl(controls);
+ }
+ if(controls.length==0) event.finish();
+ "step 1"
+ game.pause();
+ ui.create.confirm('o');
+ var content;
+ if(result.control){
+ if(result.control=='手牌') content=target.get('h');
+ else if(result.control=='主将') content=[[target.name1],'character'];
+ else content=[[target.name2],'character'];
+ }
+ else if(target.get('h').length){
+ content=target.get('h');
+ }
+ else if(target.classList.contains('unseen')){
+ content=[[target.name1],'character'];
+ }
+ else{
+ content=[[target.name2],'character'];
+ }
+ event.dialog=ui.create.dialog(content);
+ "step 2"
+ event.dialog.close();
+ },
+ mode:['guozhan'],
+ ai:{
+ order:9.5,
+ result:{
+ player:function(player,target){
+ if(player.num('h')<=player.hp) return 0;
+ if(player.storage.zhibi&&player.storage.zhibi.contains(target)) return 0;
+ return target.isUnseen()?1:0;
+ }
+ }
+ }
+ },
+ yiyi:{
+ fullskin:true,
+ type:'trick',
+ enable:true,
+ filterTarget:function(card,player,target){
+ if(player.identity=='unknown'||player.identity=='ye'||lib.config.mode!='guozhan') return player==target;
+ return player.identity==target.identity;
+ },
+ selectTarget:-1,
+ content:function(){
+ target.draw(lib.config.mode=='guozhan'?2:3);
+ target.chooseToDiscard(2,'he',true).ai=ai.get.disvalue;
+ },
+ ai:{
+ basic:{
+ useful:4,
+ value:4,
+ order:7
+ },
+ result:{
+ target:function(player,target){
+ if(lib.config.mode!='guozhan') return 1;
+ if(target.num('h')<=1){
+ return 0;
+ }
+ return 1;
+ },
+ },
+ },
+ // mode:['guozhan'],
+ },
+ wuliu:{
+ fullskin:true,
+ type:'equip',
+ subtype:'equip1',
+ distance:{attackFrom:-1},
+ ai:{
+ basic:{
+ equipValue:function(card,player){
+ if(player.identity=='unknown'||player.identity=='ye') return 2.5;
+ var num=2;
+ for(var i=0;i1;
+ },
+ content:function(){
+ "step 0"
+ var damaged=trigger.player;
+ player.chooseCardTarget({
+ filterTarget:function(card,player,target){
+ return get.distance(damaged,target)<=1&&target!=damaged;
+ },
+ ai1:function(card){
+ return 9-ai.get.value(card);
+ },
+ ai2:function(target){
+ return ai.get.damageEffect(target,player,player);
+ },
+ prompt:'是否发动三尖两刃刀?'
+ });
+ "step 1"
+ if(result.bool){
+ player.logSkill('sanjian');
+ player.discard(result.cards);
+ result.targets[0].damage();
+ }
+ }
+ },
+ },
+ translate:{
+ yuanjiao:'远交近攻',
+ yuanjiao_info:'对一名不同势力的角色使用,对方摸一张牌,然后你摸3张牌(非国战模式中改为摸1张)',
+ yuanjiao_bg:'交',
+ zhibi:'知己知彼',
+ zhibi_info:'出牌阶段对一名其他角色使用,观看其手牌或装备牌',
+ yiyi:'以逸待劳',
+ yiyi_info:'对与自己势力相同的所有角色使用,摸两张牌然后弃置两张牌(非国战模式改为对自己使用,摸3张弃两张)',
+ yiyi_bg:'逸',
+ wuliu:'吴六剑',
+ wuliu_info:'与装备者势力相同的角色攻击范围+1',
+ sanjian:'三尖两刃刀',
+ sanjian_info:'当你使用杀造成伤害后,可以弃置1张手牌对一名距离受伤害角色1以内的其他角色造成1点伤害',
+ wuliu_skill:'吴六剑',
+ sanjian_skill:'三尖两刃刀',
+ jingfanma_bg:'-马',
+ jingfanma:'惊帆',
+ },
+ list:[
+ ['heart',9,'yuanjiao'],
+ ['club',3,'zhibi'],
+ ['club',4,'zhibi'],
+ ['diamond',4,'yiyi'],
+ ['heart',11,'yiyi'],
+ ['diamond',6,'wuliu'],
+ ['diamond',12,'sanjian'],
+ ['heart',3,'jingfanma'],
+ ],
+}
diff --git a/card/qimou.js b/card/qimou.js
new file mode 100644
index 000000000..04d86a4ae
--- /dev/null
+++ b/card/qimou.js
@@ -0,0 +1,351 @@
+card.qimou={
+ card:{
+ chenhuodajie:{
+ fullskin:true,
+ type:'trick',
+ content:function(){
+ if(target.num('he')){
+ player.gainPlayerCard('he',target,true);
+ }
+ },
+ ai:{
+ order:1,
+ useful:6,
+ value:6,
+ result:{
+ target:-1
+ },
+ tag:{
+ loseCard:1
+ }
+ }
+ },
+ shushangkaihua:{
+ fullskin:true,
+ type:'trick',
+ enable:true,
+ selectTarget:-1,
+ multitarget:true,
+ multiline:true,
+ filterTarget:function(card,player,target){
+ var num=target.num('h');
+ for(var i=0;i0){
+ num++;
+ }
+ else if(eff<0){
+ num--;
+ }
+ }
+ }
+ return num;
+ }
+ }
+ }
+ },
+ yihuajiemu:{
+ fullskin:true,
+ type:'trick',
+ enable:true,
+ filterTarget:function(card,player,target){
+ if(ui.selected.targets.length){
+ return target.get('e',{subtype:'equip5'}).length==0;
+ }
+ else{
+ return target.get('e',{subtype:'equip5'}).length>0;
+ }
+ },
+ selectTarget:2,
+ multitarget:true,
+ content:function(){
+ if(targets[0].get('e','5')){
+ targets[0].$give(targets[0].get('e','5'),targets[1]);
+ targets[1].equip(targets[0].get('e','5'));
+ game.delay();
+ }
+ },
+ ai:{
+ order:1,
+ result:{
+ target:function(player,target){
+ if(target.get('e',{subtype:'equip5'}).length){
+ if(ai.get.attitude(target,player)>0){
+ return -0.5;
+ }
+ return -1;
+ }
+ return 1;
+ }
+ },
+ tag:{
+ loseCard:1
+ }
+ }
+ },
+ fudichouxin:{
+ fullskin:true,
+ type:'trick',
+ enable:true,
+ filterTarget:function(card,player,target){
+ return player!=target&&target.get('h').length;
+ },
+ content:function(){
+ "step 0"
+ player.chooseToCompare(target).clear=false;
+ "step 1"
+ if(result.bool){
+ player.gain([result.player,result.target]);
+ result.player.clone.moveTo(player).delete();
+ result.target.clone.moveTo(player).delete();
+ }
+ else if(!result.cancelled){
+ result.player.clone.delete();
+ result.target.clone.delete();
+ }
+ },
+ ai:{
+ order:4,
+ result:{
+ target:function(player,target){
+ if(player.get('h').length<=1) return 0;
+ return -1;
+ },
+ player:function(player){
+ if(player.get('h').length<=1) return 0;
+ return 0.5;
+ }
+ },
+ tag:{
+ loseCard:1
+ }
+ }
+ },
+ shuiyanqijun:{
+ fullskin:true,
+ type:'trick',
+ enable:true,
+ filterTarget:function(card,player,target){
+ return target.num('e');
+ },
+ selectTarget:-1,
+ content:function(){
+ if(target.num('e')) target.chooseToDiscard('e',true);
+ },
+ ai:{
+ order:9,
+ result:{
+ target:-1
+ },
+ tag:{
+ multitarget:1,
+ multineg:1
+ }
+ }
+ },
+ toulianghuanzhu:{
+ fullskin:true,
+ type:'trick',
+ enable:true,
+ filterTarget:function(card,player,target){
+ return target.num('h')>0;
+ },
+ selectTarget:2,
+ multitarget:true,
+ targetprompt:['被拿牌','得牌'],
+ content:function(){
+ "step 0"
+ targets[0].addTempSkill('toulianghuanzhu2','phaseAfter');
+ var hs=targets[0].get('h');
+ event.num=Math.min(2,hs.length);
+ if(event.num){
+ targets[1].gain(hs.randomGets(event.num));
+ targets[0].$give(event.num,targets[1]);
+ game.delay();
+ }
+ else{
+ event.finish();
+ }
+ "step 1"
+ if(targets[1].num('h')){
+ targets[1].chooseCard(true,event.num,'选择'+get.cnNumber(event.num)+'张手牌还给'+get.translation(targets[0])).ai=ai.get.disvalue;
+ }
+ else{
+ event.finish();
+ }
+ "step 2"
+ targets[0].gain(result.cards);
+ targets[1].$give(event.num,targets[0]);
+ },
+ ai:{
+ order:9,
+ tag:{
+ discard:1,
+ multitarget:1,
+ multineg:1
+ },
+ result:{
+ target:function(player,target){
+ if(ui.selected.targets.length){
+ if(target==player&&target.num('h')<=1) return 0;
+ return 0.5;
+ }
+ if(target.skills.contains('toulianghuanzhu2')) return 0;
+ return -0.5;
+ }
+ },
+ useful:3,
+ value:7
+ }
+ },
+ },
+ skill:{
+ toulianghuanzhu2:{},
+ _chenhuodajie:{
+ trigger:{global:'damageEnd'},
+ direct:true,
+ filter:function(event,player){
+ if(event.player==player) return false;
+ if(!event.player.num('he')) return false;
+ if(player.num('h','chenhuodajie')) return true;
+ var mn=player.get('e','5');
+ if(mn&&mn.name=='muniu'&&mn.cards&&mn.cards.length){
+ for(var i=0;i=3&&ai.get.attitude(game.players[i],player)>=3){
+ players.push(game.players[i]);
+ }
+ }
+ players.sort(lib.sort.seat);
+ var choice=players[0];
+ player.chooseTarget('是否移动木牛流马?',function(card,player,target){
+ return player!=target&&!target.get('e','5');
+ }).ai=function(target){
+ return target==choice?1:-1;
+ };
+ "step 1"
+ if(result.bool){
+ var card=player.get('e','5');
+ result.targets[0].equip(card);
+ player.addTempSkill('muniu_skill6','equipAfter');
+ player.$give(card,result.targets[0]);
+ game.delay();
+ }
+ },
+ ai:{
+ save:true,
+ respondSha:true,
+ respondShan:true,
+ order:1,
+ result:{
+ player:1
+ }
+ }
+ },
+ muniu_skill2:{
+ group:['muniu_skill3','muniu_skill4']
+ },
+ muniu_skill3:{
+ trigger:{player:'chooseToRespondBegin'},
+ filter:function(event,player){
+ if(event.responded) return false;
+ var muniu=player.get('e','5');
+ if(!muniu.cards) return false;
+ for(var i=0;i=ai.get.equipValue(button.link)) return -1;
+ return 1;
+ }
+ if(get.tag(button.link,'multitarget')) return -1;
+ return 1;
+ }).filterButton=function(button){
+ return trigger.filterCard(button.link,player,trigger);
+ };
+ player.addTempSkill('muniu_skill8',['useCardAfter','phaseAfter']);
+ "step 1"
+ if(result.bool){
+ lib.skill.muniu_skill5.viewAs=result.buttons[0].link;
+ event.parent.parent.backup('muniu_skill5');
+ event.parent.parent.step=0;
+ if(event.isMine()){
+ event.parent.parent.openskilldialog='选择'+get.translation(result.buttons[0].link)+'的目标';
+ }
+ }
+ else{
+ event.parent.parent.step=0;
+ }
+ },
+ ai:{
+ order:4,
+ result:{
+ player:function(player){
+ if(player.tempSkills['muniu_skill8']) return 0;
+ if(_status.dying) return ai.get.attitude(player,_status.dying);
+ return 1;
+ }
+ },
+ useful:-1,
+ value:-1
+ }
+ },
+ muniu_skill5:{
+ filterCard:function(){return false},
+ selectCard:-1
+ },
+ muniu_skill6:{},
+ muniu_skill8:{},
+ muniu_skill7:{
+ filter:function(){return false},
+ hiddenCard:function(player,name){
+ var muniu=player.get('e','5');
+ if(!muniu.cards) return false;
+ for(var i=0;i2;
+ },
+ distance:{attackFrom:-Infinity},
+ onEquip:function(){
+ //player.loseHp();
+ if(!player.skills.contains('xuanyuan')&&player.hp<=2){
+ player.discard(card);
+ }
+ },
+ onLose:function(){
+ if(!player.skills.contains('xuanyuan')) player.loseHp();
+ },
+ ai:{
+ equipValue:20
+ }
+ },
+ pangufu:{
+ fullskin:true,
+ type:'equip',
+ subtype:'equip1',
+ skills:['pangufu'],
+ distance:{attackFrom:-3},
+ ai:{
+ equipValue:8
+ }
+ },
+ lianyaohu:{
+ fullskin:true,
+ type:'equip',
+ subtype:'equip5',
+ onLose:function(){
+ delete player.storage.lianhua;
+ },
+ ai:{
+ equipValue:8
+ },
+ skills:['lianhua','shouna']
+ },
+ haotianta:{
+ type:'equip',
+ subtype:'equip5',
+ skills:['haotianta'],
+ enable:function(card,player){return player==game.me;},
+ onEquip:function(){
+ //player.loseHp();
+ },
+ onLose:function(){
+ //player.loseHp();
+ },
+ ai:{
+ equipValue:0
+ }
+ },
+ fuxiqin:{
+ fullskin:true,
+ type:'equip',
+ subtype:'equip5',
+ skills:['kongxin'],
+ ai:{
+ equipValue:8
+ }
+ },
+ shennongding:{
+ fullskin:true,
+ type:'equip',
+ subtype:'equip5',
+ skills:['shennongding'],
+ ai:{
+ equipValue:6
+ }
+ },
+ kongdongyin:{
+ fullskin:true,
+ type:'equip',
+ subtype:'equip5',
+ skills:['kongdongyin'],
+ ai:{
+ basic:{
+ equipValue:function(card,player){
+ if(player.hp==2) return 7;
+ if(player.hp==1) return 9;
+ return 5;
+ }
+ }
+ }
+ },
+ // kunlunjing:{
+ // type:'equip',
+ // subtype:'equip5',
+ // skills:['kunlunjing'],
+ // onEquip:function(){
+ // //if(player==game.me) player.loseHp();
+ // },
+ // onLose:function(){
+ // //if(player==game.me) player.loseHp();
+ // },
+ // ai:{
+ // equipValue:5
+ // }
+ // },
+ nvwashi:{
+ fullskin:true,
+ type:'equip',
+ subtype:'equip5',
+ skills:['nvwashi'],
+ ai:{
+ equipValue:7
+ }
+ }
+ },
+ skill:{
+ lianhua:{
+ enable:'phaseUse',
+ filter:function(event,player){
+ var hu=player.get('e','5');
+ if(hu&&hu.storage.shouna&&hu.storage.shouna.length>1){
+ return true;
+ }
+ return false;
+ },
+ usable:1,
+ content:function(){
+ "step 0"
+ event.hu=player.get('e','5');
+ player.chooseCardButton('弃置两张壶中的牌,然后从牌堆中获得一张类别不同的牌',2,event.hu.storage.shouna).ai=function(){
+ return 1;
+ }
+ "step 1"
+ if(result.bool){
+ var type=[];
+ player.$throw(result.links);
+ game.log(get.translation(player)+'弃置了'+get.translation(result.links));
+ for(var i=0;i0;
+ },
+ content:function(){
+ trigger.player.chooseToDiscard(true,'he');
+ }
+ },
+ shouhua:{
+ mode:['identity','infinity'],
+ enable:'phaseUse',
+ filter:function(event,player){
+ return player==game.me;
+ },
+ usable:1,
+ filterTarget:function(card,player,target){
+ return target!=game.zhu&&target!=game.me&&target.hp0){
+ return trigger.judge(button.link);
+ }
+ if(ai.get.attitude(player,trigger.player)<0){
+ return -trigger.judge(button.link);
+ }
+ };
+ "step 1"
+ var card=result.links[0];
+ event.cards.remove(card);
+ for(var i=0;i0){
+ trigger.result.bool=true;
+ trigger.player.popup('洗具');
+ }
+ if(trigger.result.judge<0){
+ trigger.result.bool=false;
+ trigger.player.popup('杯具');
+ }
+ game.log(get.translation(trigger.player)+'的判定结果为'+get.translation(card)+
+ '('+get.translation(get.suit(card))+get.number(card)+')');
+ trigger.direct=true;
+ trigger.position.appendChild(card);
+ game.delay(2);
+ }
+ else{
+ event.finish();
+ }
+ "step 2"
+ var card=trigger.result.card;
+ if(trigger.position!=ui.discardPile){
+ trigger.position.appendChild(card);
+ trigger.result.node.delete();
+ }
+ else{
+ player.gain(card);
+ player.$gain2(card);
+ }
+ game.delay();
+ },
+ ai:{
+ tag:{
+ rejudge:10
+ }
+ }
+ },
+ shennongding:{
+ enable:'phaseUse',
+ usable:1,
+ filterCard:true,
+ selectCard:2,
+ check:function(card){
+ if(get.tag(card,'recover')>=1) return 0;
+ return 7-ai.get.value(card);
+ },
+ filter:function(event,player){
+ return player.hp0;
+ },
+ content:function(){
+ trigger.untrigger();
+ trigger.finish();
+ player.hp=1;
+ player.draw();
+ player.discard(player.get('e',{subtype:'equip5'}));
+ game.delay();
+ }
+ },
+
+ nvwashi:{
+ trigger:{global:'dying'},
+ priority:6,
+ filter:function(event,player){
+ return event.player.hp<=0;
+ },
+ check:function(event,player){
+ return ai.get.attitude(player,event.player)>0;
+ },
+ content:function(){
+ "step 0"
+ trigger.player.judge(function(card){
+ return get.suit(card)=='heart'?1:0;
+ });
+ "step 1"
+ if(result.bool){
+ trigger.player.recover();
+ }
+ },
+ ai:{
+ threaten:1.2,
+ expose:0.2
+ }
+ },
+ kongxin:{
+ enable:'phaseUse',
+ usable:1,
+ filterTarget:function(card,player,target){
+ return target!=player&&target.num('h');
+ },
+ filter:function(event,player){
+ return player.num('h')?true:false;
+ },
+ content:function(){
+ "step 0"
+ player.chooseToCompare(target);
+ "step 1"
+ if(result.bool){
+ event.bool=true;
+ player.chooseTarget('选择一个目标视为'+get.translation(target)+'对其使用一张杀',function(card,player,target2){
+ return player!=target2&&target.canUse('sha',target2);
+ }).ai=function(target){
+ return ai.get.effect(target,{name:'sha'},target,player);
+ }
+ }
+ else{
+ target.discardPlayerCard(player);
+ }
+ "step 2"
+ if(event.bool&&result.bool){
+ target.useCard({name:'sha'},result.targets);
+ }
+ },
+ ai:{
+ order:7,
+ result:{
+ target:function(player,target){
+ if(ai.get.attitude(player,target)>=0) return 0;
+ for(var i=0;i0){
+ return -1;
+ }
+ }
+ return 0;
+ }
+ }
+ }
+ },
+ kongxin2:{
+ trigger:{player:'dying'},
+ priority:10,
+ forced:true,
+ popup:false,
+ filter:function(event,player){
+ return player==game.me;
+ },
+ content:function(){
+ player.removeSkill('kongxin2');
+ game.swapPlayer(player);
+ player.storage.kongxin.lockOut=false;
+ player.storage.kongxin.out();
+ if(player==game.me) game.swapPlayer(player.storage.kongxin);
+ if(lib.config.mode=='identity') player.storage.kongxin.setIdentity();
+ delete player.storage.kongxin;
+ },
+ },
+ lianyao_hujia:{
+ mode:['identity','guozhan'],
+ enable:'phaseUse',
+ usable:1,
+ filter:function(event,player){
+ if(player!=game.me) return false;
+ var card=player.get('e','5');
+ if(card.storage.shouhua&&card.storage.shouhua.length) return true;
+ return false;
+ },
+ content:function(){
+ "step 0"
+ var list=[];
+ var card=player.get('e','5');
+ for(var i=0;i=0) return -1;
+ return 1;
+ };
+ next.autochoose=lib.filter.autoRespondShan;
+ }
+ "step 1"
+ if(result.bool==false){
+ event.trigger('shaHit');
+ }
+ else{
+ event.trigger('shaMiss');
+ }
+ "step 2"
+ if(result.bool==false&&!event.unhurt){
+ target.damage(get.nature(event.card));
+ event.result={bool:true}
+ event.trigger('shaDamage');
+ }
+ else{
+ event.result={bool:false}
+ event.trigger('shaUnhirt');
+ }
+ },
+ ai:{
+ basic:{
+ useful:[5,1],
+ value:[5,1],
+ },
+ order:3,
+ result:{
+ target:-1.5,
+ },
+ tag:{
+ respond:1,
+ respondShan:1,
+ damage:function(card){
+ if(card.nature=='poison') return;
+ return 1;
+ },
+ natureDamage:function(card){
+ if(card.nature) return 1;
+ },
+ fireDamage:function(card,nature){
+ if(card.nature=='fire') return 1;
+ },
+ thunderDamage:function(card,nature){
+ if(card.nature=='thunder') return 1;
+ },
+ poisonDamage:function(card,nature){
+ if(card.nature=='poison') return 1;
+ }
+ }
+ }
+ },
+ shacopy:{
+ ai:{
+ basic:{
+ useful:[5,1],
+ value:[5,1],
+ },
+ order:3,
+ result:{
+ target:-1.5,
+ },
+ tag:{
+ respond:1,
+ respondShan:1,
+ damage:function(card){
+ if(card.nature=='poison') return;
+ return 1;
+ },
+ natureDamage:function(card){
+ if(card.nature) return 1;
+ },
+ fireDamage:function(card,nature){
+ if(card.nature=='fire') return 1;
+ },
+ thunderDamage:function(card,nature){
+ if(card.nature=='thunder') return 1;
+ },
+ poisonDamage:function(card,nature){
+ if(card.nature=='poison') return 1;
+ }
+ }
+ }
+ },
+ shan:{
+ fullskin:true,
+ type:'basic',
+ ai:{
+ basic:{
+ useful:[7,2],
+ value:[7,2]
+ }
+ }
+ },
+ tao:{
+ fullskin:true,
+ type:'basic',
+ enable:function(card,player){
+ return player.hp2) return 0;
+ if(target.hp<0&&target!=player&&target.identity!='zhu') return 0;
+ if(ai.get.attitude(player,target)<3) return 0;
+ if(lib.config.mode=='identity'&&player.identity=='fan'&&target.identity=='fan'){
+ var tri=_status.event.parent._trigger;
+ if(tri&&tri.name=='dying'&&tri.source&&tri.source.identity=='fan'&&tri.source!=target){
+ var num=target.num('h','jiu')?1:0;
+ for(var i=0;i1) return 2;
+ }
+ }
+ return 0;
+ }
+ }
+ return 2;
+ },
+ },
+ tag:{
+ recover:1,
+ save:1,
+ }
+ }
+ },
+ bagua:{
+ fullskin:true,
+ type:'equip',
+ subtype:'equip2',
+ ai:{
+ basic:{
+ equipValue:8
+ }
+ },
+ skills:['bagua_skill']
+ },
+ jueying:{
+ fullskin:true,
+ type:'equip',
+ subtype:'equip3',
+ distance:{globalTo:1},
+ },
+ dilu:{
+ fullskin:true,
+ type:'equip',
+ subtype:'equip3',
+ distance:{globalTo:1},
+ },
+ zhuahuang:{
+ fullskin:true,
+ type:'equip',
+ subtype:'equip3',
+ distance:{globalTo:1},
+ },
+ chitu:{
+ fullskin:true,
+ type:'equip',
+ subtype:'equip4',
+ distance:{globalFrom:-1},
+ },
+ dawan:{
+ fullskin:true,
+ type:'equip',
+ subtype:'equip4',
+ distance:{globalFrom:-1},
+ },
+ zixin:{
+ fullskin:true,
+ type:'equip',
+ subtype:'equip4',
+ distance:{globalFrom:-1},
+ },
+ zhuge:{
+ fullskin:true,
+ type:'equip',
+ subtype:'equip1',
+ ai:{
+ basic:{
+ equipValue:function(card,player){
+ var num=1,i,no_target=true;
+ for(i=0;i1) return 0;
+ return 2-2*get.distance(player,target,'absolute')/game.players.length;
+ }
+ },
+ tag:{
+ draw:1,
+ multitarget:1
+ }
+ }
+ },
+ taoyuan:{
+ fullskin:true,
+ type:'trick',
+ enable:true,
+ selectTarget:-1,
+ filterTarget:function(card,player,target){
+ return target.hp=0) return 0;
+ return 1;
+ };
+ next.autochoose=lib.filter.autoRespondSha;
+ "step 1"
+ if(result.bool==false){
+ target.damage();
+ }
+ },
+ ai:{
+ wuxie:function(target,card,player,viewer){
+ if(ai.get.attitude(viewer,target)>0&&target.num('h','sha')){
+ if(!target.num('h')||target.hp==1||Math.random()<0.7) return 0;
+ }
+ },
+ basic:{
+ order:9,
+ useful:[5,1]
+ },
+ result:{
+ target:function(player,target){
+ var num=0;
+ for(var i=0;i1) return 0;
+ return -1.5;
+ },
+ },
+ tag:{
+ respond:1,
+ respondSha:1,
+ damage:1,
+ multitarget:1,
+ multineg:1,
+ }
+ }
+ },
+ wanjian:{
+ fullskin:true,
+ type:'trick',
+ enable:true,
+ selectTarget:-1,
+ filterTarget:function(card,player,target){
+ return target!=player;
+ },
+ content:function(){
+ "step 0"
+ var next=target.chooseToRespond({name:'shan'});
+ next.ai=function(card){
+ if(ai.get.damageEffect(target,player,target)>=0) return 0;
+ return 1;
+ };
+ next.autochoose=lib.filter.autoRespondShan;
+ "step 1"
+ if(result.bool==false){
+ target.damage();
+ }
+ },
+ ai:{
+ wuxie:function(target,card,player,viewer){
+ if(ai.get.attitude(viewer,target)>0&&target.num('h','shan')){
+ if(!target.num('h')||target.hp==1||Math.random()<0.7) return 0;
+ }
+ },
+ basic:{
+ order:9,
+ useful:1
+ },
+ result:{
+ target:function(player,target){
+ var num=0;
+ for(var i=0;i1) return 0;
+ return -1.5;
+ },
+ },
+ tag:{
+ respond:1,
+ respondShan:1,
+ damage:1,
+ multitarget:1,
+ multineg:1,
+ }
+ }
+ },
+ wuzhong:{
+ fullskin:true,
+ type:'trick',
+ enable:true,
+ selectTarget:-1,
+ filterTarget:function(card,player,target){
+ return target==player;
+ },
+ content:function(){
+ target.draw(2);
+ },
+ ai:{
+ basic:{
+ order:7.2,
+ useful:4,
+ value:10
+ },
+ result:{
+ target:2,
+ },
+ tag:{
+ draw:2
+ }
+ }
+ },
+ juedou:{
+ fullskin:true,
+ type:'trick',
+ enable:true,
+ filterTarget:function(card,player,target){
+ return target!=player;
+ },
+ content:function(){
+ "step 0"
+ if(event.turn==undefined) event.turn=target;
+ "step 1"
+ event.trigger('juedou');
+ "step 2"
+ if(event.directHit){
+ event._result={bool:false};
+ }
+ else{
+ var next=event.turn.chooseToRespond({name:'sha'});
+ next.ai=function(card){
+ if(event.turn==target){
+ if(ai.get.attitude(target,player)<0){
+ return ai.get.unuseful2(card)
+ }
+ return -1;
+ }
+ else{
+ if(ai.get.attitude(player,target)<0){
+ return ai.get.unuseful2(card)
+ }
+ return -1;
+ }
+ };
+ next.autochoose=lib.filter.autoRespondSha;
+ if(event.turn==target){
+ next.source=player;
+ }
+ else{
+ next.source=target;
+ }
+ }
+ "step 3"
+ if(result.bool){
+ if(event.turn==target) event.turn=player;
+ else event.turn=target;
+ event.goto(1);
+ }
+ else{
+ if(event.turn==target){
+ target.damage();
+ }
+ else{
+ player.damage(target);
+ }
+ }
+ },
+ ai:{
+ basic:{
+ order:5,
+ useful:1,
+ value:4
+ },
+ result:{
+ target:-1.5,
+ player:function(player,target){
+ if(ai.get.damageEffect(target,player,target)>0&&ai.get.attitude(player,target)>0&&ai.get.attitude(target,player)>0){
+ return 0;
+ }
+ if(target.num('h','sha')>player.num('h','sha')){
+ return -2;
+ }
+ return -0.5;
+ }
+ },
+ tag:{
+ respond:2,
+ respondSha:2,
+ damage:1,
+ }
+ }
+ },
+ shunshou:{
+ fullskin:true,
+ type:'trick',
+ enable:true,
+ range:{global:1},
+ selectTarget:1,
+ filterTarget:function(card,player,target){
+ if(player==target) return false;
+ return (target.num('hej')>0);
+ },
+ content:function(){
+ "step 0"
+ if(target.num('hej')){
+ player.choosePlayerCard(target,true);
+ }
+ else{
+ event.finish();
+ }
+ "step 1"
+ player.gain(result.buttons[0].link);
+ target.$give(1,player);
+ },
+ ai:{
+ wuxie:function(target,card,player,viewer){
+ if(ai.get.attitude(viewer,player)>0&&ai.get.attitude(viewer,target)>0){
+ return 0;
+ }
+ },
+ basic:{
+ order:7.5,
+ useful:4,
+ value:9
+ },
+ result:{
+ target:function(player,target){
+ if(ai.get.attitude(player,target)<=0) return (target.num('he')>0)?-1.5:1.5;
+ var js=target.get('j');
+ if(js.length){
+ var jj=js[0].viewAs?{name:js[0].viewAs}:js[0];
+ if(jj.name=='shunshou') return 3;
+ if(js.length==1&&ai.get.effect(target,jj,target,player)>=0){
+ return -1.5;
+ }
+ return 3;
+ }
+ return -1.5;
+ },
+ player:1
+ },
+ tag:{
+ loseCard:1,
+ gain:1,
+ }
+ }
+ },
+ guohe:{
+ fullskin:true,
+ type:'trick',
+ enable:true,
+ selectTarget:1,
+ filterTarget:function(card,player,target){
+ if(player==target) return false;
+ return (target.num('hej')>0);
+ },
+ content:function(){
+ "step 0"
+ if(target.num('hej')){
+ player.choosePlayerCard(target,true);
+ }
+ else{
+ event.finish();
+ }
+ "step 1"
+ target.discard(result.buttons[0].link);
+ },
+ ai:{
+ basic:{
+ order:9,
+ useful:1,
+ value:5,
+ },
+ result:{
+ target:function(player,target){
+ if(ai.get.attitude(player,target)<=0) return (target.num('he'))?-1.5:1.5;
+ var js=target.get('j');
+ if(js.length){
+ var jj=js[0].viewAs?{name:js[0].viewAs}:js[0];
+ if(jj.name=='guohe') return 3;
+ if(js.length==1&&ai.get.effect(target,jj,target,player)>=0){
+ return -1.5;
+ }
+ return 2;
+ }
+ return -1.5;
+ },
+ },
+ tag:{
+ loseCard:1,
+ }
+ }
+ },
+ jiedao:{
+ fullskin:true,
+ type:'trick',
+ enable:true,
+ selectTarget:2,
+ multitarget:true,
+ targetprompt:['被借刀','出杀目标'],
+ filterTarget:function(card,player,target){
+ if(ui.selected.targets.length==0){
+ return (player!=target&&target.get('e',{subtype:'equip1'}).length);
+ }
+ else{
+ return lib.filter.filterTarget({name:'sha'},ui.selected.targets[0],target);
+ }
+ },
+ content:function(){
+ "step 0"
+ targets[0].chooseToUse('对'+get.translation(targets[1])+'使用一张杀,或令'+get.translation(player)+'获得你的武器牌',{name:'sha'},targets[1],-1);
+ "step 1"
+ if(result.bool==false){
+ player.gain(targets[0].get('e',{subtype:'equip1'}));
+ targets[0].$give(targets[0].get('e',{subtype:'equip1'}),player);
+ }
+ },
+ ai:{
+ basic:{
+ order:8,
+ value:2,
+ useful:1,
+ },
+ result:{
+ target:-1.5,
+ player:function(player){
+ if(player.get('he',{subtype:'equip1'}).length) return 0;
+ return 1.5;
+ },
+ },
+ tag:{
+ gain:1,
+ use:1,
+ useSha:1,
+ multitarget:1,
+ multineg:1,
+ loseCard:1,
+ }
+ }
+ },
+ wuxie:{
+ fullskin:true,
+ type:'trick',
+ ai:{
+ basic:{
+ useful:[6,4],
+ value:[6,4],
+ },
+ result:{player:1},
+ expose:0.2
+ },
+ notarget:true,
+ content:function(){},
+ },
+ lebu:{
+ fullskin:true,
+ type:'delay',
+ filterTarget:function(card,player,target){
+ return (lib.filter.judge(card,player,target)&&player!=target);
+ },
+ judge:function(card){
+ if(get.suit(card)=='heart') return 0;
+ return -3;
+ },
+ effect:function(){
+ if(result.bool==false){
+ player.skip('phaseUse');
+ }
+ },
+ ai:{
+ basic:{
+ order:1,
+ useful:1,
+ value:8,
+ },
+ result:{
+ target:function(player,target){
+ var num=target.hp-target.num('h')-2;
+ if(num>-1) return -1;
+ if(target.hp<3) num--;
+ if(target.hp<2) num--;
+ if(target.hp<1) num--;
+ return num;
+ }
+ },
+ tag:{
+ skip:'phaseUse'
+ }
+ }
+ },
+ shandian:{
+ fullskin:true,
+ type:'delay',
+ enable:function(card,player){
+ return (lib.filter.judge(card,player,player));
+ },
+ filterTarget:function(card,player,target){
+ return (lib.filter.judge(card,player,target)&&player==target);
+ },
+ selectTarget:[-1,-1],
+ judge:function(card){
+ if(get.suit(card)=='spade'&&get.number(card)>1&&get.number(card)<10) return -6;
+ return 0;
+ },
+ effect:function(){
+ if(result.judge){
+ player.damage(3,'thunder','nosource');
+ }
+ else{
+ if(!card.expired){
+ if(card.name!='shandian'){
+ player.next.addJudge('shandian',card);
+ }
+ else{
+ player.next.addJudge(card);
+ }
+ }
+ else{
+ card.expired=false;
+ }
+ }
+ },
+ cancel:function(){
+ if(!card.expired){
+ player.next.addJudge(card);
+ }
+ else{
+ card.expired=false;
+ }
+ },
+ ai:{
+ basic:{
+ order:1,
+ useful:0,
+ value:0,
+ },
+ result:{
+ target:function(player,target){
+ var rejudge,num=0;
+ for(var i=0;i0&&
+ ai.get.attitude(game.players[i],target)>0) num+=rejudge;
+ else num-=rejudge;
+ }
+ }
+ }
+ if(num>0) return num;
+ if(num==0){
+ if(lib.config.mode=='identity'){
+ if(target.identity=='nei') return 1;
+ var situ=ai.get.situation();
+ if(target.identity=='fan'){
+ if(situ>1) return 1;
+ }
+ else{
+ if(situ<-1) return 1;
+ }
+ }
+ else if(lib.config.mode=='guozhan'){
+ if(target.identity=='ye') return 1;
+ for(var i=0;i2&&target.hp<2) return 1;
+ if(game.players.length<3) return -1;
+ if(target.hp<=2&&target.num('he')<=3) return 1;
+ }
+ }
+ }
+ return -1;
+ }
+ },
+ tag:{
+ // damage:1,
+ // natureDamage:1,
+ // thunderDamage:1,
+ }
+ }
+ },
+ },
+ skill:{
+ zhuge_skill:{
+ mod:{
+ cardUsable:function(card,player,num){
+ if(card.name=='sha') return Infinity;
+ }
+ },
+ },
+ cixiong_skill:{
+ trigger:{player:'shaBegin'},
+ priority:5,
+ filter:function(event,player){
+ if(player.sex=='male'&&event.target.sex=='female') return true;
+ if(player.sex=='female'&&event.target.sex=='male') return true;
+ return false;
+ },
+ content:function(){
+ "step 0"
+ trigger.target.chooseToDiscard().ai=function(card){
+ return -ai.get.attitude(trigger.target,player)-ai.get.value(card);
+ };
+ "step 1"
+ if(result.bool==false) player.draw();
+ }
+ },
+ qinggang_skill:{
+ trigger:{player:'useCard'},
+ forced:true,
+ priority:10,
+ filter:function(event){
+ return event.card.name=='sha';
+ },
+ content:function(){
+ player.addTempSkill('unequip','useCardAfter');
+ }
+ },
+ qinglong_skill:{
+ trigger:{player:'shaMiss'},
+ direct:true,
+ content:function(){
+ "step 0"
+ player.chooseToUse('是否发动青龙偃月刀?',{name:'sha'},trigger.target,-1);
+ "step 1"
+ if(result.bool) player.logSkill('qinglong');
+ }
+ },
+ zhangba_skill:{
+ enable:['chooseToUse','chooseToRespond'],
+ filterCard:true,
+ selectCard:2,
+ position:'h',
+ viewAs:{name:'sha'},
+ prompt:'将两张手牌当杀使用或打出',
+ check:function(card){return 6-ai.get.useful(card)},
+ ai:{
+ respondSha:true,
+ }
+ },
+ guanshi_skill:{
+ trigger:{player:'shaMiss'},
+ direct:true,
+ filter:function(event,player){
+ return player.num('he')>2;
+ },
+ content:function(){
+ "step 0"
+ player.chooseToDiscard('是否发动贯石斧?',2,'he',function(card){
+ return player.get('e',{subtype:'equip1'}).contains(card)==false;
+ }).ai=
+ function(card){
+ if(ai.get.attitude(player,trigger.target)<0){
+ if(player.skills.contains('jiu')||
+ player.skills.contains('tianxianjiu')||
+ trigger.target.hp==1){
+ return 7-ai.get.value(card)
+ }
+ return 5-ai.get.value(card)
+ }
+ return -1;
+ };
+ "step 1"
+ if(result.bool){
+ player.logSkill('guanshi');
+ trigger.untrigger();
+ trigger.trigger('shaHit');
+ trigger._result.bool=false;
+ }
+ }
+ },
+ fangtian_skill:{
+ mod:{
+ selectTarget:function(card,player,range){
+ if(card.name!='sha') return;
+ if(range[1]==-1) return;
+ var cards=player.get('h');
+ for(var i=0;i0
+ },
+ content:function(){
+ "step 0"
+ player.chooseButton(ui.create.dialog('选择要弃置的马',trigger.target.get('e',{subtype:['equip3','equip4']})));
+ "step 1"
+ if(result.bool){
+ trigger.target.discard(result.buttons[0].link);
+ }
+ }
+ },
+ bagua_skill:{
+ trigger:{player:'chooseToRespondBegin'},
+ filter:function(event,player){
+ if(!event.filterCard({name:'shan'})) return false;
+ if(event.parent.player.num('s','unequip')) return false;
+ return true;
+ },
+ content:function(){
+ "step 0"
+ player.judge('bagua',function(card){return (get.color(card)=='red')?1.5:-0.5});
+ "step 1"
+ if(result.judge>0){
+ trigger.untrigger();
+ trigger.responded=true;
+ trigger.result={bool:true,card:{name:'shan'}}
+ }
+ },
+ ai:{
+ effect:{
+ target:function(card,player,target,effect){
+ if(player.num('s','unequip')) return;
+ if(get.tag(card,'respondShan')) return 0.5;
+ }
+ }
+ }
+ },
+ _wuxie1:{
+ trigger:{player:'useCardToBefore'},
+ priority:5,
+ filter:function(event,player){
+ if(!event.target) return false;
+ if(get.type(event.card)!='trick') return false;
+ return true;
+ },
+ popup:false,
+ forced:true,
+ content:function(){
+ "step 0"
+ if(trigger.multitarget){
+ event.source2=trigger.targets;
+ }
+ event.source=trigger.target;
+ event.current=trigger.player;
+ event.end=trigger.player;
+ event.state=true;
+ event.card=trigger.card;
+ "step 1"
+ if(ui.wuxie.classList.contains('glow')&&!_status.auto){
+ if(event.current==game.me){
+ event._result={bool:false};
+ return;
+ }
+ if(lib.config.mode=='versus'&&lib.storage.single_control&&event.current.side==game.me.side){
+ event._result={bool:false};
+ return;
+ }
+ }
+ if(event.current.num('h','wuxie')==0){
+ var noask=true;
+ var skills=event.current.get('s',true).concat(lib.skill.global);
+ game.expandSkills(skills);
+ for(var i=0;i1;
+ },
+ content:function(){
+ "step 0"
+ target.chooseToDiscard({color:'black'},'弃置一张黑色手牌或受流失一点体力').ai=function(card){
+ return 8-ai.get.value(card);
+ };
+ "step 1"
+ if(!result.bool){
+ target.loseHp();
+ }
+ },
+ ai:{
+ basic:{
+ order:9,
+ value:3,
+ useful:1,
+ },
+ result:{
+ target:-2
+ },
+ tag:{
+ discard:1,
+ loseHp:1
+ }
+ }
+ },
+ caoyao:{
+ fullskin:true,
+ type:'basic',
+ range:{global:1},
+ enable:true,
+ filterTarget:function(card,player,target){
+ return target.hp0},
+ notarget:true,
+ content:function(){
+ "step 0"
+ var list=[];
+ for(var i=0;i3) return 7;
+ }
+ return -10;
+ },
+ result:{
+ player:function(player){
+ if(player.hp<=2) return -1;
+ for(var i=0;i3) return 2;
+ }
+ return -10;
+ }
+ },
+ }
+ },
+ pantao:{
+ type:'basic',
+ enable:function(card,player){
+ return player.hp0) return 1;
+ }
+ }
+ }
+ return 0;
+ },
+ },
+ }
+ },
+ langeguaiyi:{
+ fullskin:true,
+ type:'equip',
+ subtype:'equip5',
+ skills:['longfan'],
+ ai:{
+ basic:{
+ equipValue:7,
+ }
+ }
+ },
+ guiyoujie:{
+ fullskin:true,
+ type:'delay',
+ filterTarget:function(card,player,target){
+ return (lib.filter.judge(card,player,target)&&player!=target);
+ },
+ judge:function(card){
+ if(get.color(card)=='red') return 0;
+ return -3;
+ },
+ effect:function(){
+ if(result.bool==false){
+ player.turnOver();
+ player.draw();
+ }
+ },
+ ai:{
+ basic:{
+ order:1,
+ useful:1,
+ value:6,
+ },
+ result:{
+ target:-3
+ },
+ }
+ },
+ yufulu:{
+ fullskin:true,
+ type:'equip',
+ enable:function(card,player){
+ return player.sex=='female';
+ },
+ subtype:'equip5',
+ skills:['touzhi'],
+ ai:{
+ basic:{
+ equipValue:function(card,player){
+ if(player.sex=='female') return 5;
+ return 0;
+ },
+ }
+ }
+ },
+ xixueguizhihuan:{
+ fullskin:true,
+ type:'equip',
+ subtype:'equip5',
+ skills:['xixue'],
+ ai:{
+ basic:{
+ equipValue:5
+ }
+ }
+ },
+ zhufangshenshi:{
+ fullskin:true,
+ chongzhu:true,
+ type:'basic',
+ enable:function(){
+ return game.players.length>2;
+ },
+ filterTarget:function(card,player,target){
+ return player.next==target||player.previous==target;
+ },
+ content:function(){
+ game.swapSeat(player,target);
+ },
+ ai:{
+ basic:{
+ order:7,
+ },
+ result:{
+ target:function(player,target){
+ if(player.next==target) return -1;
+ if(player.previous==target) return 1;
+ }
+ }
+ },
+ mode:['identity','guozhan'],
+ },
+ jingleishan:{
+ fullskin:true,
+ type:'trick',
+ enable:true,
+ selectTarget:-1,
+ filterTarget:function(card,player,target){
+ return target!=player;
+ },
+ content:function(){
+ "step 0"
+ var next=target.chooseToRespond({name:'sha'});
+ next.ai=function(card){
+ if(ai.get.damageEffect(target,player,target,'thunder')>=0) return 0;
+ return 1;
+ };
+ next.autochoose=lib.filter.autoRespondSha;
+ "step 1"
+ if(result.bool==false){
+ target.damage('thunder');
+ }
+ },
+ ai:{
+ wuxie:function(target,card,player,viewer){
+ if(ai.get.attitude(viewer,target)>0&&target.num('h','sha')){
+ if(!target.num('h')||target.hp==1||Math.random()<0.7) return 0;
+ }
+ },
+ basic:{
+ order:9,
+ useful:[5,1]
+ },
+ result:{
+ target:function(player,target){
+ if(target.hasSkillTag('nothunder')) return 0;
+ var num=0;
+ for(var i=0;i1) return 0;
+ return -1.5;
+ },
+ },
+ tag:{
+ respond:1,
+ respondSha:1,
+ damage:1,
+ natureDamage:1,
+ thunderDamage:1,
+ multitarget:1,
+ multineg:1,
+ }
+ }
+ },
+ chiyuxi:{
+ fullskin:true,
+ type:'trick',
+ enable:true,
+ selectTarget:-1,
+ filterTarget:function(card,player,target){
+ return target!=player;
+ },
+ content:function(){
+ "step 0"
+ var next=target.chooseToRespond({name:'shan'});
+ next.ai=function(card){
+ if(ai.get.damageEffect(target,player,target,'fire')>=0) return 0;
+ return 1;
+ };
+ next.autochoose=lib.filter.autoRespondShan;
+ "step 1"
+ if(result.bool==false){
+ target.damage('fire');
+ }
+ },
+ ai:{
+ wuxie:function(target,card,player,viewer){
+ if(ai.get.attitude(viewer,target)>0&&target.num('h','shan')){
+ if(!target.num('h')||target.hp==1||Math.random()<0.7) return 0;
+ }
+ },
+ basic:{
+ order:9,
+ useful:1
+ },
+ result:{
+ target:function(player,target){
+ if(target.hasSkillTag('nofire')) return 0;
+ var num=0;
+ for(var i=0;i1) return 0;
+ return -1.5;
+ },
+ },
+ tag:{
+ respond:1,
+ respondShan:1,
+ damage:1,
+ natureDamage:1,
+ fireDamage:1,
+ multitarget:1,
+ multineg:1,
+ }
+ }
+ },
+ guangshatianyi:{
+ fullskin:true,
+ type:'equip',
+ enable:function(card,player){
+ return player.sex=='female';
+ },
+ subtype:'equip2',
+ skills:['guangshatianyi'],
+ ai:{
+ basic:{
+ equipValue:function(card,player){
+ if(player.sex=='female') return 6;
+ return 0;
+ },
+ }
+ }
+ },
+ guilingzhitao:{
+ type:'equip',
+ subtype:'equip5',
+ skills:['nigong'],
+ ai:{
+ basic:{
+ equipValue:function(card,player){
+ if(!player.storage.nigong) return 5;
+ return 5+player.storage.nigong;
+ }
+ }
+ },
+ onLose:function(){
+ player.storage.nigong=0;
+ },
+ onEquip:function(){
+ player.storage.nigong=0;
+ }
+ },
+ qipoguyu:{
+ type:'equip',
+ subtype:'equip5',
+ skills:['xujin'],
+ onLose:function(){
+ player.storage.xujin=0;
+ },
+ onEquip:function(){
+ player.storage.xujin=0;
+ }
+ },
+ sadengjinhuan:{
+ fullskin:true,
+ type:'equip',
+ subtype:'equip5',
+ skills:['sadengjinhuan'],
+ ai:{
+ basic:{
+ equipValue:6
+ }
+ },
+ },
+ ximohu:{
+ type:'equip',
+ subtype:'equip5',
+ skills:['ximohu'],
+ ai:{
+ basic:{
+ equipValue:6
+ }
+ },
+ },
+ guiyanfadao:{
+ type:'equip',
+ subtype:'equip1',
+ distance:{attackFrom:-1},
+ ai:{
+ basic:{
+ equipValue:3
+ }
+ },
+ skills:['guiyanfadao']
+ },
+ },
+ skill:{
+ baihupifeng:{
+ trigger:{player:'phaseEnd'},
+ frequent:true,
+ filter:function(event,player){
+ if(player.hp==player.maxHp) return false;
+ for(var i=0;igame.players[i].hp) return false;
+ }
+ return true;
+ },
+ content:function(){
+ player.recover();
+ },
+ },
+ // fengxueren:{
+ // trigger:{source:'damageEnd'},
+ // filter:function(event){
+ // return event.card&&event.card.name=='sha';
+ // },
+ // forced:true,
+ // content:function(){
+ // "step 0"
+ // trigger.player.turnOver();
+ // trigger.player.popup('fengxueren');
+ // "step 1"
+ // trigger.player.draw();
+ // "step 2"
+ // if(player.num('he')){
+ // player.chooseToDiscard(true);
+ // }
+ // }
+ // },
+ fengxueren:{
+ trigger:{player:'shaHit'},
+ check:function(event,player){
+ var att=ai.get.attitude(player,event.target);
+ if(player.skills.contains('jiu')) return att>0;
+ if(event.target.hasSkillTag('maixie')){
+ return att<=0;
+ }
+ if(event.target.hp==1) return att>0;
+ if(player.skills.contains('tianxianjiu')) return false;
+ return att<=0;
+ },
+ filter:function(event,player){
+ return !event.target.isTurnedOver()&&!player.skills.contains('fengxueren2');
+ },
+ content:function(){
+ trigger.unhurt=true;
+ trigger.target.turnOver();
+ player.addTempSkill('fengxueren2','phaseAfter')
+ }
+ },
+ fengxueren2:{},
+ chilongya:{
+ trigger:{source:'damageBefore'},
+ forced:true,
+ priority:5,
+ content:function(){
+ trigger.nature='fire';
+ }
+ },
+ chilongya2:{
+ trigger:{source:'damageBegin'},
+ filter:function(event,player){
+ return (event.card&&event.card.name=='sha');
+ },
+ popup:false,
+ forced:true,
+ content:function(){
+ if(Math.random()<0.5){
+ trigger.num++;
+ trigger.player.addSkill('chilongfengxue');
+ }
+ }
+ },
+ chilongfengxue:{
+ trigger:{global:'shaAfter'},
+ forced:true,
+ popup:false,
+ content:function(){
+ player.draw();
+ player.removeSkill('chilongfengxue');
+ }
+ },
+ shentou:{
+ enable:'phaseUse',
+ usable:1,
+ filterCard:true,
+ check:function(card){
+ return 8-ai.get.value(card);
+ },
+ filterTarget:function(card,player,target){
+ if(target.get('h').length==0) return false;
+ if(target==player) return false;
+ if(target.num('h')<=player.num('h')) return false;
+ return true;
+ },
+ content:function(){
+ "step 0"
+ player.judge(function(card){
+ if(get.suit(card)=='club') return -1;
+ return 1;
+ });
+ "step 1"
+ if(result.bool){
+ player.gain(target.get('h').randomGet());
+ target.$give(1,player);
+ }
+ },
+ ai:{
+ basic:{
+ order:5
+ },
+ result:{
+ player:0.3,
+ target:-1,
+ }
+ }
+ },
+ pusafazhou:{
+ trigger:{player:'dieBefore'},
+ forced:true,
+ filter:function(event,player){
+ return player.maxHp>0;
+ },
+ content:function(){
+ trigger.untrigger();
+ trigger.finish();
+ player.hp=1;
+ player.draw();
+ player.discard(player.get('e',{subtype:'equip5'}));
+ game.delay();
+ }
+ },
+ old_longfan:{
+ enable:'phaseUse',
+ usable:1,
+ prompt:'?',
+ filterTarget:true,
+ content:function(){
+ "step 0"
+ if(event.isMine()){
+ event.longfan=ui.create.control('〇','〇','〇','〇',function(){
+ event.longfan.status--;
+ });
+ event.longfan.status=4;
+ for(var i=0;i1) event.count(1);
+ if(event.longfan.status>2) event.count(2);
+ if(event.longfan.status>3) event.count(3);
+ },200);
+ event.count=function(num){
+ event.longfan.childNodes[num].num=(event.longfan.childNodes[num].num+1)%10;
+ if(event.longfan.childNodes[num].num==2) event.longfan.childNodes[num].innerHTML='二';
+ else event.longfan.childNodes[num].innerHTML=get.cnNumber(event.longfan.childNodes[num].num);
+ }
+ game.pause();
+ }
+ else{
+ event.finish();
+ var x=Math.random();
+ if(x<0.1) target.draw();
+ else if(x<0.2) target.chooseToDiscard(true);
+ else if(x<0.3) target.loseHp();
+ else if(x<0.4) target.recover();
+ else if(x<0.6){
+ if(ai.get.attitude(player,target)>0) target.draw();
+ else target.chooseToDiscard(true);
+ }
+ else if(x<0.8){
+ if(ai.get.attitude(player,target)>0) target.recover();
+ else target.loseHp();
+ }
+ }
+ "step 1"
+ var str='';
+ for(var i=0;iplayer.hp?2:0;break;
+ case 'diamond':return 1;break;
+ case 'club':return 1;break;
+ case 'spade':return 0;break;
+ }
+ });
+ "step 1"
+ switch(result.suit){
+ case 'heart':player.recover();break;
+ case 'diamond':player.draw();break;
+ case 'club':{
+ player.chooseTarget('弃置一名角色的一张牌',function(card,player,target){
+ return player!=target&&target.num('he')>0;
+ }).ai=function(target){
+ return -ai.get.attitude(player,target);
+ };
+ break;
+ }
+ }
+ if(result.suit!='club'){
+ event.finish();
+ }
+ "step 2"
+ if(result.bool&&result.targets&&result.targets.length){
+ player.discardPlayerCard(result.targets[0],'he',true);
+ }
+ },
+ ai:{
+ order:10,
+ result:{
+ player:1
+ }
+ }
+ },
+ touzhi:{
+ enable:'phaseUse',
+ usable:1,
+ filterCard:function(card){
+ return get.subtype(card)=='equip1';
+ },
+ filter:function(event,player){
+ return player.num('he',{subtype:'equip1'})>0;
+ },
+ discard:false,
+ prepare:function(cards,player,targets){
+ player.$give(cards,targets[0]);
+ },
+ filterTarget:function(card,player,target){
+ if(player==target) return false;
+ return true;
+ },
+ content:function(){
+ target.damage();
+ target.gain(cards);
+ game.delay();
+ },
+ check:function(card){
+ return 10-ai.get.value(card);
+ },
+ position:'he',
+ ai:{
+ basic:{
+ order:8
+ },
+ result:{
+ target:-1
+ }
+ }
+ },
+ xixue:{
+ trigger:{source:'damageEnd'},
+ forced:true,
+ filter:function(event,player){
+ return event.card&&event.card.name=='sha'
+ },
+ content:function(){
+ player.recover(trigger.num);
+ }
+ },
+ guangshatianyi:{
+ trigger:{player:'damageBegin'},
+ forced:true,
+ filter:function(event,player){
+ if(event.source&&event.source.num('s','unequip')) return;
+ if(Math.random()>1/3) return false;
+ if(event.parent.player.num('s','unequip')) return false;
+ return true;
+ },
+ content:function(){
+ trigger.num--;
+ }
+ },
+ nigong:{
+ trigger:{player:'damageAfter'},
+ group:['nigong2'],
+ forced:true,
+ content:function(){
+ player.storage.nigong+=trigger.num;
+ if(player.storage.nigong>4){
+ player.storage.nigong=4;
+ }
+ },
+ ai:{
+ threaten:0.6,
+ effect:function(card,player,target){
+ if(get.tag(card,'damage')) return [1,0.5];
+ }
+ },
+ intro:{
+ content:function(storage){
+ return '已积攒'+storage+'点伤害';
+ }
+ }
+ },
+ nigong2:{
+ enable:'phaseUse',
+ usable:1,
+ filter:function(event,player){
+ return player.storage.nigong>1;
+ },
+ filterTarget:function(card,player,target){
+ return player!=target;
+ },
+ content:function(){
+ target.damage(Math.floor(player.storage.nigong/2));
+ player.storage.nigong=0;
+ },
+ ai:{
+ order:10,
+ result:{
+ target:function(player,target){
+ return -Math.floor(player.storage.nigong/2);
+ }
+ }
+ }
+ },
+ xujin:{
+ trigger:{player:'phaseBefore'},
+ check:function(){return false;},
+ filter:function(event,player){
+ return player.storage.xujin0;
+ },
+ content:function(){
+ trigger.num+=player.storage.xujin;
+ player.storage.xujin--;
+ }
+ },
+ sadengjinhuan:{
+ trigger:{player:'shaMiss'},
+ check:function(event,player){
+ return ai.get.attitude(player,event.target)<0;
+ },
+ content:function(){
+ "step 0"
+ player.judge(function(card){
+ return get.color(card)=='red'?1:0;
+ })
+ "step 1"
+ if(result.bool){
+ trigger.target.chooseToRespond({name:'shan'}).autochoose=lib.filter.autoRespondShan;
+ }
+ else{
+ event.finish();
+ }
+ "step 2"
+ if(!result.bool){
+ trigger.untrigger();
+ trigger.trigger('shaHit');
+ trigger._result.bool=false;
+ }
+ }
+ },
+ ximohu:{
+ trigger:{player:'damageBefore'},
+ forced:true,
+ filter:function(event){
+ return event.nature=='thunder';
+ },
+ content:function(){
+ trigger.untrigger();
+ trigger.finish();
+ player.recover(trigger.num);
+ },
+ ai:{
+ effect:function(card){
+ if(get.tag(card,'thunderDamage')) return [0,2];
+ }
+ }
+ },
+ guiyanfadao:{
+ trigger:{player:'useCardToBefore'},
+ priority:5,
+ filter:function(event,player){
+ if(event.card.name=='sha'&&!event.card.nature) return true;
+ },
+ content:function(){
+ trigger.card.nature='poison';
+ player.addSkill('guiyanfadao2');
+ player.storage.zhuque_skill=trigger.card;
+ }
+ },
+ guiyanfadao2:{
+ trigger:{player:'useCardAfter'},
+ forced:true,
+ popup:false,
+ content:function(){
+ delete player.storage.zhuque_skill.nature;
+ }
+ },
+ tianxianjiu:{
+ trigger:{source:'damageEnd'},
+ filter:function(event){
+ return (event.card&&(event.card.name=='sha'));
+ },
+ forced:true,
+ content:function(){
+ player.draw(2);
+ player.removeSkill('tianxianjiu');
+ }
+ },
+ },
+ translate:{
+ guiyanfadao:'鬼眼法刀',
+ guiyanfadao_bg:'眼',
+ // guiyanfadao_info:'你可以将一张普通杀当毒杀使用',
+ tianxianjiu:'天仙酒',
+ tianxianjiu_bg:'仙',
+ tianxianjiu_info:'出牌阶段对自己使用,你使用的下一张杀造成伤害后可以摸两张牌',
+ xiangyuye:'翔羽叶',
+ xiangyuye_info:'出牌阶段,对一名攻击范围外的角色使用,令其弃置一张黑色手牌或流失一点体力',
+ huanpodan:'还魄丹',
+ huanpodan_bg:'魄',
+ // huanpodan_info:'出牌阶段对一名已死亡角色使用,令其复活并回复一点体力,然后你流失一点体力',
+ ximohu:'吸魔壶',
+ ximohu_bg:'魔',
+ // ximohu_info:'锁定技,你将即将受到的雷属性伤害转化为你的体力值',
+ sadengjinhuan:'萨登荆环',
+ sadengjinhuan_info:'当你的杀被闪避后,可以进行一次判定,若结果为红色目标需再打出一张闪',
+ // sadengjinhuan_info:'锁定技,每当你使用一张杀被闪避后,若此杀在弃牌堆,你有50%的机率对目标再使用一次此杀',
+ sadengjinhuan_bg:'荆',
+ qipoguyu:'奇魄古玉',
+ xujin:'蓄劲',
+ xujin2:'蓄劲',
+ // qipoguyu_info:'装备后获得蓄劲技能',
+ xujin_info:'回合开始前,若你的蓄劲标记数小于当前的体力值,你可以跳过此回合,并获得一枚蓄劲标记。锁定技,每当你即将造成伤害,你令此伤害+X,然后弃置一枚蓄劲标记,X为你拥有的蓄劲标记数',
+ guilingzhitao:'归灵指套',
+ nigong:'逆攻',
+ nigong2:'逆攻',
+ nigong3:'逆攻',
+ nigong4:'逆攻',
+ // guilingzhitao_info:'装备后获得逆攻技能',
+ nigong_info:'每当你受到一点伤害,你获得一个逆攻标记,标记数不能超4。出牌阶段,你可以弃置所有逆攻标记并令任意一名其他角色X/2点伤害,X为逆攻标记的数量且向下取整',
+ baihupifeng:'白狐披风',
+ baihupifeng_bg:'狐',
+ baihupifeng_info:'回合结束阶段,若你的体力值是全场最小的之一,你可以回复一点体力',
+ fengxueren:'封雪刃',
+ fengxueren_bg:'雪',
+ // fengxueren_info:'你使用杀击中目标后,可以防止伤害并令目标翻面,每回合限发动一次',
+ chilongya:'赤龙牙',
+ // chilongya_info:'锁定技,你即将造成的伤害均视为火焰伤害',
+ daihuofenglun:'带火风轮',
+ daihuofenglun_bg:'轮',
+ // daihuofenglun_info:'你与其他角色的距离-2,其他角色与你的距离-1',
+ xiayuncailing:'霞云彩绫',
+ xiayuncailing_bg:'云',
+ // xiayuncailing_info:'你与其他角色的距离+1,其他角色与你的距离+2',
+ shentoumianju:'神偷面具',
+ shentoumianju_bg:'偷',
+ shentoumianju_info:'出牌阶段,你可以指定一名手牌比你多的角色进行一次判定,若结果不为梅花,你获得其一张手牌',
+ shentou:'神偷',
+ shentou_info:'出牌阶段,你可以进行一次判定,若结果不为梅花,你获得任意一名角色的一张手牌',
+ pusafazhou:'菩萨发咒',
+ pusafazhou_bg:'发',
+ // pusafazhou_info:'令你抵挡一次死亡,将体力回复至1,并摸一张牌',
+ yuhuanghua:'雨皇花',
+ yuhuanghua_bg:'皇',
+ // yuhuanghua_info:'令所有角色回复一点体力并摸一张牌',
+ caoyao:'草药',
+ caoyao_info:'出牌阶段,对距离为1以内的角色使用,回复一点体力。',
+ pantao:'蟠桃',
+ // pantao_info:'出牌阶段,对自己使用,回复两点体力。',
+ langeguaiyi:'蓝格怪衣',
+ langeguaiyi_bg:'格',
+ langeguaiyi_info:'?',
+ longfan:'龙帆',
+ longfan_info:'出牌阶段限一次,你可以进行一次判定,然后按花色执行以下效果。红桃:你回复一点体力;方片:你摸一张牌;梅花:你弃置一名其他角色的一张牌;黑桃:无事发生',
+ // longfan_info:'0000:翻面;1111:弃手牌;2222:弃装备牌;3333:受伤害;4444:流失体力;5555:连环;6666:摸牌;7777:回复体力;8888:弃置判定牌;9999:置衡',
+ guiyoujie:'鬼幽结',
+ guiyoujie_info:'出牌阶段,对一名其他角色使用。若判定结果为黑色,则将其翻面。',
+ yufulu:'御夫录',
+ yufulu_info:'仅女性角色可以使用,出牌阶段,可弃置一张武器牌令一名角色受到一点伤害,然后该角色获得此武器牌',
+ touzhi:'投掷',
+ touzhi_info:'出牌阶段,可弃置一张武器牌令一名角色受到一点伤害,然后该角色获得此武器牌',
+ xixueguizhihuan:'吸血鬼指环',
+ xixueguizhihuan_info:'锁定技,每当你使用杀造成一点伤害,你回复一点体力',
+ xixue:'吸血',
+ xixue_info:'锁定技,每当你使用杀造成一点伤害,你回复一点体力',
+ zhufangshenshi:'土地神符',
+ zhufangshenshi_info:'出牌阶段,对一名相邻角色使用,与其交换位置',
+ jingleishan:'惊雷闪',
+ jingleishan_info:'出牌阶段,对所有其他角色使用。每名目标角色需打出一张【杀】,否则受到1点雷电伤害。',
+ chiyuxi:'炽羽袭',
+ chiyuxi_info:'出牌阶段,对所有其他角色使用。每名目标角色需打出一张【闪】,否则受到1点火焰伤害。',
+ guangshatianyi:'光纱天衣',
+ guangshatianyi_bg:'纱',
+ // guangshatianyi_info:'仅女性可装备,锁定技,每当你即将受到伤害,有三分之一的概率令伤害减一',
+ },
+ list:[
+ ['spade',1,'baihupifeng'],
+ // ['club',1,'fengxueren'],
+ ['diamond',1,'langeguaiyi'],
+ // ['heart',1,'daihuofenglun','fire'],
+
+// ['diamond',2,'xiayuncailing'],
+ // ['spade',2,'pusafazhou'],
+// ['heart',2,'pantao'],
+ //['club',2,'huanpodan'],
+
+ ['club',3,'caoyao'],
+ // ['diamond',3,'chilongya','fire'],
+ ['spade',3,'guiyoujie'],
+ //['heart',3,'xiangyuye','poison'],
+
+ ['club',4,'caoyao'],
+ //['heart',4,'zhufangshenshi'],
+ //['spade',4,'huanpodan'],
+// ['diamond',4,'xiangyuye','poison'],
+
+ ['club',5,'caoyao'],
+ ['spade',5,'xixueguizhihuan'],
+ //['diamond',5,'huanpodan'],
+
+ ['club',6,'shentoumianju'],
+ ['spade',6,'yufulu'],
+// ['heart',6,'xiangyuye','poison'],
+ //['diamond',6,'xiangyuye','poison'],
+
+ ['diamond',7,'chiyuxi','fire'],
+ ['club',7,'jingleishan','thunder'],
+ // ['spade',7,'guilingzhitao'],
+// ['heart',7,'xiangyuye','poison'],
+
+ ['spade',8,'zhufangshenshi'],
+ ['club',8,'xiangyuye'],
+ //['heart',8,'huanpodan'],
+
+ // ['spade',9,'ximohu','brown'],
+ ['club',9,'guiyoujie'],
+ ['diamond',9,'xiangyuye'],
+
+ // ['diamond',9,'tianxianjiu'],
+ ['heart',9,'tianxianjiu'],
+ ['spade',5,'jiu'],
+ ['diamond',2,'tianxianjiu'],
+
+ //['spade',10,'qipoguyu'],
+ //['diamond',10,'xiangyuye','poison'],
+
+ ['spade',11,'xiangyuye'],
+ // ['club',11,'xiangyuye','poison'],
+
+// ['diamond',12,'xiangyuye','poison'],
+ //['spade',12,'guiyanfadao','poison'],
+
+ // ['heart',13,'yuhuanghua'],
+ // ['diamond',13,'guangshatianyi'],
+ ['club',13,'sadengjinhuan'],
+ //['spade',6,'xiangyuye','poison'],
+ ],
+}
diff --git a/card/wanxiang.js b/card/wanxiang.js
new file mode 100644
index 000000000..2a8fc5e90
--- /dev/null
+++ b/card/wanxiang.js
@@ -0,0 +1,14 @@
+card.wanxiang={
+ card:{
+
+ },
+ skill:{
+
+ },
+ translate:{
+
+ },
+ list:[
+
+ ],
+}
\ No newline at end of file
diff --git a/card/yibao.js b/card/yibao.js
new file mode 100644
index 000000000..29964337c
--- /dev/null
+++ b/card/yibao.js
@@ -0,0 +1,414 @@
+card.yibao={
+ card:{
+ hufu:{
+ fullskin:true,
+ type:'basic',
+ ai:{
+ value:[7.5,5,2],
+ useful:[7.5,5,2],
+ }
+ },
+ huoshan:{
+ fullskin:true,
+ type:'delay',
+ enable:function(card,player){
+ return (lib.filter.judge(card,player,player));
+ },
+ filterTarget:function(card,player,target){
+ return (lib.filter.judge(card,player,target)&&player==target);
+ },
+ selectTarget:[-1,-1],
+ judge:function(card){
+ if(get.suit(card)=='heart'&&get.number(card)>1&&get.number(card)<10) return -6;
+ return 0;
+ },
+ effect:function(){
+ if(result.judge){
+ player.damage(2,'fire','nosource');
+ var players=get.players();
+ for(var i=0;i0&&
+ ai.get.attitude(game.players[i],target)>0) num+=rejudge;
+ else num-=rejudge;
+ }
+ }
+ }
+ if(num>0) return num;
+ if(num==0){
+ if(lib.config.mode=='identity'){
+ if(target.identity=='nei') return 1;
+ var situ=ai.get.situation();
+ if(target.identity=='fan'){
+ if(situ>1) return 1;
+ }
+ else{
+ if(situ<-1) return 1;
+ }
+ }
+ else if(lib.config.mode=='guozhan'){
+ if(target.identity=='ye') return 1;
+ for(var i=0;i2&&target.hp<2) return 1;
+ if(game.players.length<3) return -1;
+ if(target.hp<=2&&target.num('he')<=3) return 1;
+ }
+ }
+ }
+ return -1;
+ }
+ },
+ tag:{
+ // damage:1,
+ // natureDamage:1,
+ // fireDamage:1,
+ }
+ }
+ },
+ hongshui:{
+ type:'delay',
+ enable:function(card,player){
+ return (lib.filter.judge(card,player,player));
+ },
+ filterTarget:function(card,player,target){
+ return (lib.filter.judge(card,player,target)&&player==target);
+ },
+ selectTarget:[-1,-1],
+ judge:function(card){
+ if(get.suit(card)=='club'&&get.number(card)>1&&get.number(card)<10) return -3;
+ return 0;
+ },
+ fullskin:true,
+ effect:function(){
+ if(result.judge){
+ if(player.num('he')==0) player.loseHp();
+ else player.chooseToDiscard('he',true,3);
+ var players=get.players();
+ for(var i=0;i0&&
+ ai.get.attitude(game.players[i],target)>0) num+=rejudge;
+ else num-=rejudge;
+ }
+ }
+ }
+ if(num>0) return num;
+ if(num==0){
+ if(lib.config.mode=='identity'){
+ if(target.identity=='nei') return 1;
+ var situ=ai.get.situation();
+ if(target.identity=='fan'){
+ if(situ>0) return 1;
+ }
+ else{
+ if(situ<0) return 1;
+ }
+ }
+ else if(lib.config.mode=='guozhan'){
+ if(game.players.length<=2) return -1;
+ if(target.identity=='ye') return 1;
+ for(var i=0;i0;
+ },
+ content:function(){
+ "step 0"
+ target.chooseToDiscard('he',[1,2]).ai=function(card){
+ if(target.hasSkillTag('nofire')) return 0;
+ if(target.hasSkillTag('maixie')&&target.hp>1&&ui.selected.cards.length){
+ return 0;
+ }
+ if(get.type(card)!='basic'){
+ return 10-ai.get.value(card);
+ }
+ return 8-ai.get.value(card);
+ };
+ "step 1"
+ if(!result.bool||result.cards.length<2){
+ if(result.bool) target.damage(2-result.cards.length,'fire');
+ else target.damage(2,'fire');
+ }
+ },
+ ai:{
+ basic:{
+ order:4,
+ value:7,
+ useful:2,
+ },
+ result:{
+ target:function(player,target){
+ if(target.hasSkillTag('nofire')) return 0;
+ return -2;
+ }
+ },
+ tag:{
+ damage:2,
+ fireDamage:2,
+ natureDamage:2,
+ discard:2,
+ loseCard:2,
+ position:'he',
+ }
+ }
+ },
+ dujian:{
+ fullskin:true,
+ type:'basic',
+ enable:true,
+ filterTarget:function(card,player,target){
+ return target.num('h')>0;
+ },
+ content:function(){
+ "step 0"
+ if(target.num('h')==0||player.num('h')==0){
+ event.finish();
+ return;
+ }
+ player.chooseCard(true);
+ "step 1"
+ event.card1=result.cards[0];
+ target.chooseCard(true);
+ "step 2"
+ event.card2=result.cards[0];
+ player.$compare(event.card1,target,event.card2);
+ game.delay(4);
+ "step 3"
+ if(get.color(event.card2)==get.color(event.card1)){
+ player.discard(event.card1).animate=false;
+ target.$gain2(event.card2);
+ var clone=event.card1.clone;
+ if(clone){
+ clone.style.transition='all 0.5s';
+ clone.style.webkitTransform='scale(1.2)';
+ clone.delete();
+ }
+ target.loseHp();
+ }
+ else{
+ player.$gain2(event.card1);
+ target.$gain2(event.card2);
+ target.addTempSkill('dujian2','phaseBegin');
+ }
+ },
+ ai:{
+ basic:{
+ order:2,
+ value:3,
+ useful:1,
+ },
+ result:{
+ player:function(player,target){
+ if(player.num('h')<=Math.max(2,player.hp)&&
+ _status.event.name=='chooseToUse'&&_status.event.filterCard({name:'dujian'})) return -10;
+ },
+ target:-1.5
+ },
+ tag:{
+ loseHp:1
+ }
+ }
+ },
+ qiankundai:{
+ fullskin:true,
+ type:'equip',
+ subtype:'equip5',
+ onLose:function(){
+ player.draw();
+ },
+ skills:['qiankundai'],
+ ai:{
+ order:9.5,
+ basic:{
+ equipValue:function(card,player){
+ if(player.num('h','qiankundai')) return 6;
+ return 1;
+ }
+ }
+ }
+ },
+ },
+ skill:{
+ dujian2:{},
+ qiankundai:{
+ mod:{
+ maxHandcard:function(player,num){
+ return num+1;
+ }
+ },
+ },
+ _hufu_sha:{
+ enable:['chooseToRespond','chooseToUse'],
+ filter:function(event,player){
+ return player.num('h','hufu')>0;
+ },
+ filterCard:{name:'hufu'},
+ viewAs:{name:'sha'},
+ prompt:'将一张虎符当杀使用或打出',
+ check:function(card){return 1},
+ ai:{
+ order:1,
+ useful:7.5,
+ value:7.5
+ }
+ },
+ _hufu_shan:{
+ enable:['chooseToRespond','chooseToUse'],
+ filter:function(event,player){
+ return player.num('h','hufu')>0;
+ },
+ filterCard:{name:'hufu'},
+ viewAs:{name:'shan'},
+ prompt:'将一张虎符当闪使用或打出',
+ check:function(){return 1},
+ ai:{
+ order:1,
+ useful:7.5,
+ value:7.5
+ }
+ },
+ _hufu_jiu:{
+ enable:['chooseToRespond','chooseToUse'],
+ filter:function(event,player){
+ return player.num('h','hufu')>0;
+ },
+ filterCard:{name:'hufu'},
+ viewAs:{name:'jiu'},
+ prompt:'将一张虎符当酒使用',
+ check:function(){return 1},
+ },
+ },
+ translate:{
+ huoshan:'火山',
+ huoshan_info:'出牌阶段,对自己使用。若判定结果为红桃2~9,则目标角色受到2点火焰伤害,距离目标1以内的其他角色受到1点火焰伤害。若判定不为红桃2~9,将之移动到下家的判定区里。',
+ hongshui:'洪水',
+ hongshui_info:'出牌阶段,对自己使用。若判定结果为梅花2~9,该角色须弃置3张牌,距离该角色为X的角色须弃置3-X张牌,若没有牌则失去一点体力,X至少为1',
+ liuxinghuoyu:'流星火羽',
+ liuxinghuoyu_info:'出牌阶段,对一名有手牌或装备牌的角色使用,令其弃置0~2张牌,并受到2-X点火焰伤害,X为弃置的卡牌数',
+ dujian:'毒箭',
+ dujian_info:'出牌阶段,对一名有手牌或装备牌的角色使用,令其展示一张手牌,若与你选择的手牌颜色相同,你对其造成一点毒属性伤害',
+ qiankundai:'乾坤袋',
+ qiankundai_info:'你的手牌上限+1。当你失去该装备时,你摸取一张牌。',
+ hufu:'虎符',
+ hufu_bg:'符',
+ _hufu_sha:'符杀',
+ _hufu_shan:'符闪',
+ _hufu_jiu:'符酒',
+ hufu_info:'你可以将一张虎符当作杀、闪或酒使用或打出',
+ },
+ list:[
+ ['heart',1,'hufu'],
+ ['spade',1,'hufu'],
+ ['club',1,'qiankundai'],
+ ['heart',6,'huoshan','fire'],
+ ['club',7,'hongshui'],
+ ['diamond',3,'liuxinghuoyu','fire'],
+ ['heart',6,'liuxinghuoyu','fire'],
+ ['heart',9,'liuxinghuoyu','fire'],
+ //['heart',11,'liuxinghuoyu','fire'],
+ //['heart',12,'liuxinghuoyu','fire'],
+ ['spade',3,'dujian'],
+ //['club',6,'dujian','poison'],
+ //['club',9,'dujian','poison'],
+ ['club',11,'dujian'],
+ ['club',12,'dujian'],
+ //['club',3,'sha','poison'],
+ //['club',4,'sha','poison'],
+ //['club',5,'sha','poison'],
+ //['spade',6,'sha','poison'],
+ //['spade',7,'sha','poison'],
+ //['club',3,'sha','poison'],
+ //['club',4,'sha','poison'],
+ //['club',5,'sha','poison'],
+ //['spade',6,'sha','poison'],
+ //['spade',7,'sha','poison'],
+ ],
+}
diff --git a/card/zhenfa.js b/card/zhenfa.js
new file mode 100644
index 000000000..3d44f736f
--- /dev/null
+++ b/card/zhenfa.js
@@ -0,0 +1,423 @@
+card.zhenfa={
+ card:{
+ pozhenjue:{
+ type:'zhenfa',
+ chongzhu:true,
+ enable:true,
+ filterTarget:true,
+ selectTarget:-1,
+ multitarget:true,
+ content:function(){
+ var n=game.players.length;
+ while(n--){
+ game.swapSeat(game.players.randomGet(),game.players.randomGet());
+ }
+ },
+ mode:['guozhan'],
+ ai:{
+ order:8,
+ result:{
+ player:1,
+ },
+ }
+ },
+ changshezhen:{
+ type:'zhenfa',
+ chongzhu:true,
+ enable:function(card,player){
+ if(player.identity=='unknown') return false;
+ return player.next.identity==player.identity||player.previous.identity==player.identity;
+ },
+ filterTarget:function(card,player,target){
+ if(player==target) return player.inline();
+ return player.inline(target);
+ },
+ selectTarget:-1,
+ multitarget:true,
+ multiline:true,
+ content:function(){
+ game.asyncDraw(targets);
+ },
+ mode:['guozhan'],
+ ai:{
+ order:7,
+ result:{
+ target:1,
+ },
+ tag:{
+ draw:1
+ }
+ }
+ },
+ tianfuzhen:{
+ type:'zhenfa',
+ chongzhu:true,
+ enable:true,
+ filterTarget:function(card,player,target){
+ if(target.get('he').length==0) return false;
+ if(target.identity=='unknown'||target.identity=='ye') return false;
+ var wei=get.population('wei'),shu=get.population('shu'),wu=get.population('wu'),qun=get.population('qun');
+ if(wei<=1&&shu<=1&&wu<=1&&qun<=1) return false;
+ var max=Math.max(wei,shu,wu,qun);
+ return get.population(target.identity)==max;
+ },
+ selectTarget:-1,
+ content:function(){
+ target.chooseToDiscard('he',true);
+ },
+ mode:['guozhan'],
+ ai:{
+ order:7,
+ result:{
+ target:-1,
+ },
+ tag:{
+ discard:1
+ }
+ }
+ },
+ dizaizhen:{
+ type:'zhenfa',
+ chongzhu:true,
+ enable:true,
+ multitarget:true,
+ multiline:true,
+ filterTarget:function(card,player,target){
+ if(target.identity=='unknown') return false;
+ var wei=get.population('wei'),shu=get.population('shu'),wu=get.population('wu'),qun=get.population('qun');
+ if(wei<=1&&shu<=1&&wu<=1&&qun<=1) return false;
+ if(target.identity=='ye') return true;
+ var max=Math.max(wei,shu,wu,qun);
+ return get.population(target.identity)!=max;
+ },
+ selectTarget:-1,
+ content:function(){
+ game.asyncDraw(targets);
+ },
+ mode:['guozhan'],
+ ai:{
+ order:7,
+ result:{
+ target:1,
+ },
+ tag:{
+ draw:1
+ }
+ }
+ },
+ fengyangzhen:{
+ type:'zhenfa',
+ chongzhu:true,
+ enable:true,
+ filterTarget:function(card,player,target){
+ return target.sieged();
+ },
+ selectTarget:-1,
+ content:function(){
+ target.addTempSkill('feiying',{player:'damageAfter'});
+ target.popup('feiying');
+ game.log(get.translation(target)+'获得了技能飞影');
+ },
+ mode:['guozhan'],
+ ai:{
+ order:7,
+ result:{
+ target:2,
+ },
+ }
+ },
+ yunchuizhen:{
+ type:'zhenfa',
+ chongzhu:true,
+ enable:true,
+ filterTarget:function(card,player,target){
+ return target.sieging();
+ },
+ selectTarget:-1,
+ content:function(){
+ target.addTempSkill('wushuang',{source:'damageAfter'});
+ target.popup('wushuang');
+ game.log(get.translation(target)+'获得了技能无双');
+ },
+ mode:['guozhan'],
+ ai:{
+ order:7,
+ result:{
+ target:2,
+ },
+ }
+ },
+ qixingzhen:{
+ type:'zhenfa',
+ chongzhu:true,
+ enable:function(card,player){
+ if(player.identity=='unknown'||player.identity=='ye') return false;
+ return (get.population(player.identity)>1)
+ },
+ filterTarget:function(card,player,target){
+ return target.identity==player.identity;
+ },
+ multitarget:true,
+ selectTarget:-1,
+ content:function(){
+ lib.temp=targets[0];
+ targets.sort(lib.sort.seat);
+ var rest=game.players.slice(0);
+ rest.remove(targets);
+ rest.sort(function(a,b){
+ if(a.identity=='unknown') return 1;
+ else return -1;
+ })
+ lib.temp={};
+ if(targets.length>rest.length+1) targets.length=rest.length+1;
+ for(var i=1;i1)
+ },
+ filterTarget:function(card,player,target){
+ return target.identity==player.identity;
+ },
+ multitarget:true,
+ selectTarget:-1,
+ content:function(){
+ lib.temp=targets[0];
+ targets.sort(lib.sort.seat);
+ lib.temp={};
+ for(var i=1;i0){
+ return 6-ai.get.value(card);
+ }
+ return 0;
+ };
+ "step 1"
+ if(result.bool){
+ player.useCard({name:'sha'},result.cards,target,false);
+ }
+ "step 2"
+ if(target==player.next) event.player2=player.next.next;
+ else event.player2=player.previous.previous;
+ event.player2.chooseCard('将一张非基本牌当作杀对'+get.translation(target)+'使用','he',function(card){
+ return get.type(card)!='basic';
+ }).ai=function(card){
+ if(ai.get.effect(target,{name:'sha'},event.player2,event.player2)>0){
+ return 6-ai.get.value(card);
+ }
+ return 0;
+ };
+ "step 3"
+ if(result.bool){
+ event.player2.useCard({name:'sha'},result.cards,target,false);
+ }
+ },
+ mode:['guozhan'],
+ ai:{
+ order:7,
+ result:{
+ target:-2,
+ },
+ }
+ },
+ niaoxiangzhen:{
+ type:'zhenfa',
+ chongzhu:true,
+ enable:true,
+ filterTarget:function(card,player,target){
+ if(player.identity==target.identity) return false;
+ if(target.identity=='unknown'||target.identity=='ye') return false;
+ return target.identity==target.next.identity||target.identity==target.previous.identity
+ },
+ selectTarget:-1,
+ content:function(){
+ "step 0"
+ var next=target.chooseToRespond({name:'shan'});
+ next.ai=function(card){
+ if(ai.get.damageEffect(target,player,target)>=0) return 0;
+ return 1;
+ };
+ next.autochoose=lib.filter.autoRespondShan;
+ "step 1"
+ if(result.bool==false){
+ target.damage();
+ }
+ },
+ ai:{
+ basic:{
+ order:9,
+ useful:1
+ },
+ result:{
+ target:-1.5,
+ },
+ tag:{
+ respond:1,
+ respondShan:1,
+ damage:1,
+ }
+ },
+ mode:['guozhan'],
+ },
+ },
+ skill:{
+
+ },
+ translate:{
+ zhenfa:'阵法',
+ changshezhen:'长蛇阵',
+ pozhenjue:'破阵决',
+ tianfuzhen:'天覆阵',
+ dizaizhen:'地载阵',
+ fengyangzhen:'风扬阵',
+ yunchuizhen:'云垂阵',
+ qixingzhen:'七星阵',
+ shepanzhen:'蛇蟠阵',
+ shepanzhen_bg:'列',
+ yunchuizhen_bg:'垂',
+ longfeizhen:'龙飞阵',
+ huyizhen:'虎翼阵',
+ niaoxiangzhen:'鸟翔阵',
+ niaoxiangzhen_info:'令所有非你阵营的队列的角色今次打出一张闪,或者受到一点伤害',
+ huyizhen_info:'将一张非基本牌当作杀对你围攻的角色使用',
+ longfeizhen_info:'弃置围攻你的角色各一张牌',
+ qixingzhen_info:'令我方所有角色进入围攻状态',
+ shepanzhen_info:'令我方所有角色进入队列状态',
+ yunchuizhen_info:'令所有围攻角色获得技能【无双】,直到其首次造成伤害',
+ fengyangzhen_info:'令所有被围攻角色获得技能【飞影】,直到其首次受到伤害',
+ dizaizhen_info:'令势力数不是最多的所有角色摸一张牌',
+ changshezhen_info:'与你同一队列的所有角色摸一张牌',
+ pozhenjue_info:'将所有角色的顺序随机重排',
+ tianfuzhen_info:'令势力数最多的所有角色弃置一张牌'
+ },
+ list:[
+ ["diamond",1,'changshezhen'],
+ ["club",1,'changshezhen'],
+ // ["spade",1,'changshezhen'],
+ // ["heart",1,'changshezhen'],
+
+ ["diamond",2,'tianfuzhen'],
+ // ["club",2,'tianfuzhen'],
+ ["spade",2,'tianfuzhen'],
+ ["heart",2,'tianfuzhen'],
+
+ ["diamond",3,'dizaizhen'],
+ // ["club",3,'dizaizhen'],
+ ["spade",3,'dizaizhen'],
+ ["heart",3,'dizaizhen'],
+
+ ["diamond",4,'fengyangzhen'],
+ ["club",4,'fengyangzhen'],
+ // ["spade",4,'fengyangzhen'],
+ // ["heart",4,'fengyangzhen'],
+
+ // ["diamond",5,'zhonghuangzhen'],
+ // ["club",5,'zhonghuangzhen'],
+ // ["spade",5,'zhonghuangzhen'],
+ // ["heart",5,'zhonghuangzhen'],
+
+ ["diamond",6,'huyizhen'],
+ ["club",6,'huyizhen'],
+ // ["spade",6,'huyizhen'],
+ // ["heart",6,'huyizhen'],
+
+ ["diamond",7,'qixingzhen'],
+ // ["club",7,'qixingzhen'],
+ // ["spade",7,'qixingzhen'],
+ ["heart",7,'qixingzhen'],
+
+ ["diamond",8,'shepanzhen'],
+ // ["club",8,'shepanzhen'],
+ // ["spade",8,'shepanzhen'],
+ ["heart",8,'shepanzhen'],
+
+ // ["diamond",9,'longfeizhen'],
+ // ["club",9,'longfeizhen'],
+ ["spade",9,'longfeizhen'],
+ ["heart",9,'longfeizhen'],
+
+ ["diamond",11,'niaoxiangzhen'],
+ // ["club",11,'niaoxiangzhen'],
+ ["spade",11,'niaoxiangzhen'],
+ ["heart",11,'niaoxiangzhen'],
+
+ ["diamond",12,'yunchuizhen'],
+ // ["club",12,'yunchuizhen'],
+ // ["spade",12,'yunchuizhen'],
+ ["heart",12,'yunchuizhen'],
+
+ ["diamond",13,'pozhenjue'],
+ // ["club",13,'pozhenjue'],
+ // ["spade",13,'pozhenjue'],
+ //["heart",13,'pozhenjue'],
+ ],
+}
diff --git a/character/diy.js b/character/diy.js
new file mode 100644
index 000000000..abff5b912
--- /dev/null
+++ b/character/diy.js
@@ -0,0 +1,791 @@
+character.diy={
+ character:{
+ // diy_caocao:['male','wei',4,['xicai','diyjianxiong','hujia']],
+ // diy_hanlong:['male','wei',4,['siji','ciqiu'],['fullskin']],
+ diy_feishi:['male','shu',3,['shuaiyan','moshou'],['fullskin']],
+ diy_liuyan:['male','shu',4,['juedao','geju'],['fullskin']],
+ diy_luxun:['male','wu',3,['shaoying','zonghuo'],['fullskin']],
+ diy_yuji:['male','qun',3,['diyguhuo','diychanyuan'],['fullskin']],
+ // diy_zhouyu:['male','wu',3,['jieyan','honglian']],
+ diy_zhouyu:['male','wu',3,['xiongzi','yaliang'],['fullskin']],
+ diy_caiwenji:['female','qun',3,['beige','guihan'],['fullskin']],
+ diy_lukang:['male','wu',4,['luweiyan','qianxun'],['fullskin']],
+ diy_xuhuang:['male','wei',4,['diyduanliang'],['fullskin']],
+ diy_dianwei:['male','wei',4,['diyqiangxi'],['fullskin']],
+ diy_huangzhong:['male','shu',4,['liegong','fuli'],['fullskin']],
+ diy_weiyan:['male','shu',4,['diykuanggu'],['fullskin']],
+ diy_zhenji:['female','wei',3,['jiaoxia','yiesheng'],['fullskin']],
+ diy_menghuo:['male','shu',4,['huoshou','zaiqix'],['fullskin']],
+ re_huangyueying:['female','shu',3,['rejizhi','qicai'],['fullskin']],
+ old_zhonghui:['male','wei',3,['zzhenggong','zquanji','zbaijiang'],['fullskin']],
+ },
+ skill:{
+ zaiqix:{
+ trigger:{player:'phaseDrawBefore'},
+ filter:function(event,player){
+ return player.hp=2;
+ }
+ return true;
+ },
+ content:function(){
+ "step 0"
+ trigger.untrigger();
+ trigger.finish();
+ event.cards=get.cards(player.maxHp-player.hp+1);
+ player.showCards(event.cards);
+ "step 1"
+ var num=0;
+ for(var i=0;i=player.maxHp-1) return [0,0];
+ }
+ }
+ }
+ },
+ jiaoxia:{
+ trigger:{target:'useCardToBegin'},
+ filter:function(event,player){
+ return event.card&&get.color(event.card)=='red';
+ },
+ frequent:true,
+ content:function(){
+ player.draw();
+ },
+ ai:{
+ effect:function(card,player,target){
+ if(get.color(card)=='red') return [1,1];
+ },
+ }
+ },
+ diykuanggu:{
+ trigger:{source:'damageEnd'},
+ forced:true,
+ content:function(){
+ if(get.distance(trigger.player,player,'attack')>1){
+ player.draw(trigger.num);
+ }
+ else{
+ player.recover(trigger.num);
+ }
+ }
+ },
+ diyduanliang:{
+ group:['diyduanliang1','diyduanliang2'],
+ ai:{
+ threaten:1.2
+ }
+ },
+ diyduanliang1:{
+ enable:'phaseUse',
+ usable:1,
+ discard:false,
+ filter:function(event,player){
+ var cards=player.get('he',{color:'black'});
+ for(var i=0;i0;
+ },
+ content:function(){
+ trigger.source.discard(trigger.source.get('he',{color:'red'}));
+ },
+ ai:{
+ expose:0.1,
+ result:{
+ threaten:0.8,
+ target:function(card,player,target){
+ if(get.tag(card,'damage')&&ai.get.attitude(target,player)<0){
+ return [1,0,0,-player.num('he',{color:'red'})];
+ }
+ }
+ }
+ }
+ },
+ diyguhuo:{
+ trigger:{player:'phaseBegin'},
+ forced:true,
+ filter:function(event,player){
+ return player.num('hej')>0;
+ },
+ content:function(){
+ "step 0"
+ player.draw(2);
+ "step 1"
+ player.chooseToDiscard('hej',2,true);
+ },
+ ai:{
+ effect:{
+ target:function(card){
+ if(get.type(card)=='delay') return [0,1];
+ }
+ }
+ }
+ },
+ diychanyuan:{
+ trigger:{player:'dieBegin'},
+ forced:true,
+ filter:function(event){
+ return event.source!=undefined;
+ },
+ content:function(){
+ trigger.source.addSkill('benghuai');
+ },
+ ai:{
+ threaten:function(player,target){
+ if(target.hp==1) return 0.2;
+ },
+ result:{
+ target:function(card,player,target,current){
+ if(target.hp<=1&&get.tag(card,'damage')){
+ if(player.skills.contains('jueqing')) return [1,-5];
+ return [1,0,0,-10];
+ }
+ }
+ }
+ }
+ },
+ zonghuo:{
+ trigger:{source:'damageBefore'},
+ direct:true,
+ priority:10,
+ filter:function(event){
+ return event.nature!='fire';
+ },
+ content:function(){
+ "step 0"
+ player.chooseToDiscard('是否发动【纵火】?').ai=function(card){
+ var att=ai.get.attitude(player,trigger.player);
+ if(trigger.player.hasSkillTag('nofire')){
+ if(att>0) return 8-ai.get.value(card);
+ return -1;
+ }
+ if(att<0){
+ return 7-ai.get.value(card);
+ }
+ return -1;
+ }
+ "step 1"
+ if(result.bool){
+ player.logSkill('zonghuo',trigger.player,'fire');
+ trigger.nature='fire';
+ }
+ }
+ },
+ shaoying:{
+ trigger:{source:'damageAfter'},
+ direct:true,
+ filter:function(event){
+ return event.nature=='fire';
+ },
+ content:function(){
+ "step 0"
+ player.chooseTarget('是否发动【烧营】?',function(card,player,target){
+ return get.distance(trigger.player,target)<=1&&trigger.player!=target;
+ }).ai=function(target){
+ return ai.get.damageEffect(target,player,player,'fire');
+ }
+ "step 1"
+ if(result.bool){
+ var card=get.cards()[0];
+ ui.discardPile.appendChild(card);
+ player.showCards(card);
+ event.bool=get.color(card)=='red';
+ event.target=result.targets[0];
+ player.logSkill('shaoying',event.target,false);
+ trigger.player.line(event.target,'fire');
+ }
+ else{
+ event.finish();
+ }
+ "step 2"
+ if(event.bool){
+ event.target.damage('fire');
+ }
+ }
+ },
+ tiangong:{
+ group:['tiangong2'],
+ trigger:{player:'damageBefore'},
+ filter:function(event){
+ if(event.nature=='thunder') return true;
+ },
+ forced:true,
+ content:function(){
+ trigger.untrigger();
+ trigger.finish();
+ },
+ ai:{
+ effect:{
+ target:function(card,player,target,current){
+ if(card.name=='tiesuo') return 0;
+ if(get.tag(card,'thunderDamage')) return 0;
+ }
+ }
+ }
+ },
+ tiangong2:{
+ trigger:{source:'damageAfter'},
+ filter:function(event){
+ if(event.nature=='thunder') return true;
+ },
+ forced:true,
+ content:function(){
+ player.draw();
+ },
+ },
+ diyleiji:{
+ trigger:{player:'respond'},
+ filter:function(event,player){
+ return event.card.name=='shan';
+ },
+ direct:true,
+ content:function(){
+ "step 0";
+ player.chooseTarget('是否发动新雷击?').ai=function(target){
+ return ai.get.damageEffect(target,player,player,'thunder');
+ };
+ "step 1"
+ if(result.bool){
+ player.logSkill('diyleiji',result.targets,'thunder');
+ event.target=result.targets[0];
+ event.target.judge(function(card){
+ // var suit=get.suit(card);
+ // if(suit=='spade') return -4;
+ // if(suit=='club') return -2;
+ if(get.color(card)=='black') return -2;
+ return 0;
+ });
+ }
+ else{
+ event.finish();
+ }
+ "step 2"
+ if(result.bool==false){
+ event.target.damage('thunder');
+ player.recover();
+ }
+ },
+ ai:{
+ effect:{
+ target:function(card,player,target,current){
+ if(get.tag(card,'respondShan')){
+ var hastarget=false;
+ for(var i=0;i2){
+ return [0,hastarget?target.num('h')/4:0];
+ }
+ if(target.num('h')>3||(be&&target.num('h')>=2)){
+ return [0,0];
+ }
+ if(target.num('h')==0){
+ return [1.5,0];
+ }
+ if(target.num('h')==1&&!be){
+ return [1.2,0];
+ }
+ return [1,Math.min(0.5,(target.num('h')+be)/4)];
+ }
+ }
+ }
+ }
+ },
+ xicai:{
+ inherit:'jianxiong'
+ },
+ diyjianxiong:{
+ mode:['identity'],
+ trigger:{global:'dieBefore'},
+ forced:true,
+ filter:function(event,player){
+ return event.player!=game.zhu&&_status.currentPhase==player;
+ },
+ content:function(){
+ trigger.player.identity='fan';
+ trigger.player.setIdentity('fan');
+ trigger.player.identityShown=true;
+ }
+ },
+ shuaiyan:{
+ trigger:{global:'recoverAfter'},
+ filter:function(event,player){
+ return event.player!=player&&_status.currentPhase!=player;
+ },
+ content:function(){
+ "step 0"
+ var att=ai.get.attitude(trigger.player,player);
+ var bool=0;
+ if(att<0){
+ if(trigger.player.num('e')==0&&trigger.player.num('h')>2) bool=1;
+ else if(trigger.player.num('he')==0) bool=1;
+ }
+ else if(att==0&&trigger.player.num('he')==0){
+ bool=1;
+ }
+ trigger.player.chooseControl('draw_card','discard_card').ai=function(){
+ return bool;
+ };
+ "step 1"
+ if(result.control=='draw_card'){
+ player.draw();
+ event.finish();
+ }
+ else if(trigger.player.num('he')){
+ player.discardPlayerCard(trigger.player,true,'he');
+ }
+ else{
+ event.finish();
+ }
+ }
+ },
+ moshou:{
+ mod:{
+ targetEnabled:function(card,player,target,now){
+ if(card.name=='bingliang'||card.name=='lebu') return false;
+ }
+ },
+ },
+ siji:{
+ trigger:{player:'phaseDiscardEnd'},
+ frequent:true,
+ filter:function(event,player){
+ if(event.cards){
+ for(var i=0;i0;
+ },
+ content:function(){
+ var list=[];
+ for(var i=0;i0) player.draw(list.length);
+ }
+ },
+ diyqiangxi:{
+ enable:'phaseUse',
+ usable:1,
+ filterCard:function(card){
+ return get.subtype(card)=='equip1';
+ },
+ selectCard:[0,1],
+ filterTarget:function(card,player,target){
+ if(player==target) return false;
+ return get.distance(player,target,'attack')<=1;
+ },
+ content:function(){
+ "step 0"
+ if(cards.length==0){
+ player.loseHp();
+ }
+ "step 1"
+ target.damage();
+ "step 2"
+ if(target.isAlive()&&target.num('he')){
+ player.discardPlayerCard(target);
+ }
+ },
+ check:function(card){
+ return 10-ai.get.value(card);
+ },
+ position:'he',
+ ai:{
+ order:8,
+ result:{
+ player:function(player,target){
+ if(ui.selected.cards.length) return 0;
+ if(player.hp>=target.hp) return -0.9;
+ if(player.hp<=2) return -10;
+ return -2;
+ },
+ target:function(player,target){
+ if(player.hp<=1) return 0;
+ return ai.get.damageEffect(target,player);
+ }
+ }
+ },
+ threaten:1.3
+ },
+ },
+ translate:{
+ diy_caocao:'曹操',
+ diy_menghuo:'孟获',
+ diy_huangzhong:'黄忠',
+ diy_xuhuang:'徐晃',
+ diy_zhangjiao:'张角',
+ diy_dianwei:'典韦',
+ diy_weiyan:'魏延',
+ xicai:'惜才',
+ diyjianxiong:'奸雄',
+ diy_feishi:'费诗',
+ shuaiyan:'率言',
+ moshou:'墨守',
+ diy_hanlong:'韩龙',
+ diy_luxun:'陆伯言',
+ diy_yuji:'于吉',
+ diy_zhouyu:'神周瑜',
+ diy_zhouyu:'周公瑾',
+ diy_lukang:'陆抗',
+ diy_caiwenji:'蔡昭姬',
+ diy_zhenji:'甄姬',
+ siji:'伺机',
+ ciqiu:'刺酋',
+ ciqiu2:'刺酋',
+ ciqiu3:'刺酋',
+ diy_liuyan:'刘焉',
+ juedao:'绝道',
+ geju:'割据',
+ diyleiji:'雷击',
+ tiangong:'天公',
+ tiangong2:'天公',
+ shaoying:'烧营',
+ zonghuo:'纵火',
+ diychanyuan:'缠怨',
+ diyguhuo:'蛊惑',
+ jieyan:'劫焰',
+ honglian:'红莲',
+ xiongzi:'雄姿',
+ yaliang:'雅量',
+ yaliang_info:'每当你对其他角色造成1点伤害后,或受到其他角色造成的1点伤害后,你可与该角色各摸一张牌。',
+ luweiyan:'围堰',
+ guihan:'归汉',
+ diyduanliang:'断粮',
+ diyduanliang1:'断粮',
+ diyduanliang2:'断粮',
+ diyqiangxi:'强袭',
+ diykuanggu:'狂骨',
+ jiaoxia:'皎霞',
+ diyzaiqi:'再起',
+ batu:'霸图',
+ zaiqix:'再起',
+ zaiqix_info:'摸牌阶段,若你已受伤,你可以放弃摸牌并展示牌堆顶的X+1张牌,X为你已损失的体力值,其中每有一张♥牌,你回复1点体力,然后弃掉这些♥牌,将其余的牌收入手牌。',
+ batu_info:'回合结束阶段,你可以将手牌数补至X,X为现存的势力数',
+ diyzaiqi_info:'锁定技,你摸牌阶段额外摸X张牌,X为你已损失的体力值',
+ jiaoxia_info:'每当你成为红色牌的目标,你可以摸一张牌',
+ diykuanggu_info:'锁定技,每当你造成一点伤害,你在其攻击范围内,你回复一点体力,否则你摸一张牌',
+ diyqiangxi_info:'出牌阶段,你可以自减一点体力或弃一张武器牌,然后你对你攻击范围内的一名角色造成一点伤害并弃置其一张牌,每回合限一次。',
+ diyduanliang_info:'出牌阶段限一次,你可以将一张黑色的基本牌或装备牌当兵粮寸断对一名角色使用,然后摸一张牌。你的兵粮寸断可以指定距离2以内的角色作为目标',
+ guihan_info:'限定技,当你进入濒死状态时,可以指定一名男性角色与其各回复一点体力并摸两张牌',
+ luweiyan_info:'你可以将一张装备牌当水淹七军使用',
+ xiongzi_info:'锁定技,你于摸牌阶段额外摸X+1张牌,X为你装备区牌数的一半,向下取整',
+ honglian_info:'每当你受到来自其他角色的伤害,可以弃置伤害来源的所有红色牌',
+ jieyan_info:'出牌阶段限一次,你可以弃置一张红色手牌令场上所有角色受到一点火焰伤害',
+ diyguhuo_info:'锁定技,回合开始阶段,你摸两张牌,然后弃置区域内的两张牌',
+ diychanyuan_info:'锁定技,杀死你的角色获得技能【崩坏】',
+ zonghuo_info:'你可弃置一张牌将你即将造成的伤害变为火焰伤害',
+ shaoying_info:'每当你造成一次火焰伤害,可指定距离受伤害角色1以内的另一名角色,并展示牌堆顶的一张牌,若此牌为红色,该角色受到一点火焰伤害',
+ tiangong_info:'锁定技,你防止即将受到的雷电伤害,每当你造成一次雷电伤害,你摸一张牌',
+ diyleiji_info:'每当你使用或打出一张【闪】,可令任意一名角色进行一次判定,若结果为黑色,其受到一点雷电伤害,然后你摸回复一点体力',
+ juedao_info:'出牌阶段,你可以弃置一张手牌,横置你的武将牌;锁定技,若你处于连环状态,你与其他角色的距离、其他角色与你的距离各+1。',
+ geju_info:'准备阶段开始时,你可以摸X张牌(X为攻击范围内不含有你的势力数)。',
+ siji_info:'弃牌阶段结束后,你可以摸2X张牌(X为你于此阶段内弃置的【杀】的数量)。',
+ ciqiu_info:'锁定技,每当你使用【杀】对目标角色造成伤害时,若该角色未受伤,你令此伤害+1;锁定技,每当未受伤的角色因受到你使用【杀】造成的伤害而扣减体力后,若该角色的体力值为0,你令其死亡,然后你失去“刺酋”。 ',
+ shuaiyan_info:'每当其他角色于你的回合外回复体力后,你可以令该角色选择一项:1.令你摸一张牌;2.令你弃置其一张牌。 ',
+ moshou_info:'锁定技,你不能成为乐不思蜀和兵粮寸断的目标。',
+ xicai_info:'你可以立即获得对你造成伤害的牌',
+ diyjianxiong_info:'锁定技,在身份局中,在你回合内死亡的角色均视为反贼,国战中,在你回合内死亡的角色若与你势力相同则随机改为另一个势力',
+ },
+}
diff --git a/character/extra.js b/character/extra.js
new file mode 100644
index 000000000..c9e772fdf
--- /dev/null
+++ b/character/extra.js
@@ -0,0 +1,1127 @@
+character.extra={
+ character:{
+ shen_guanyu:['male','shu',6,['wuhun','wushen'],['fullskin']],
+ shen_zhaoyun:['male','shu',2,['juejing','longhun'],['fullskin'],['fullskin']],
+ shen_zhugeliang:['male','shu',3,['qixing','kuangfeng','dawu'],['fullskin']],
+ shen_lvmeng:['male','wu',3,['shelie','gongxin'],['fullskin']],
+ shen_zhouyu:['male','wu',4,['yeyan','swdqinyin'],['fullskin']],
+ shen_simayi:['male','wei',4,['renjie','sbaiyin','lianpo'],['fullskin']],
+ shen_caocao:['male','wei',3,['guixin','feiying'],['fullskin']],
+ shen_lvbu:['male','qun',5,['baonu','wuqian','shenfen'],['fullskin']],
+ },
+ skill:{
+ lianpo:{
+ trigger:{source:'dieAfter'},
+ forced:true,
+ filter:function(event,player){
+ return !player.skills.contains('lianpo2');
+ },
+ content:function(){
+ player.addSkill('lianpo2');
+ }
+ },
+ lianpo2:{
+ trigger:{global:'phaseAfter'},
+ forced:true,
+ content:function(){
+ player.removeSkill('lianpo2');
+ player.phase();
+ }
+ },
+ baonu:{
+ trigger:{source:'damageEnd',player:'damageEnd'},
+ forced:true,
+ mark:true,
+ filter:function(event){
+ return event.num>0;
+ },
+ init:function(player){
+ player.storage.baonu=2;
+ },
+ content:function(){
+ player.storage.baonu+=trigger.num;
+ },
+ intro:{
+ content:'mark'
+ }
+ },
+ shenfen:{
+ enable:'phaseUse',
+ filter:function(event,player){
+ return !player.storage.shenfen&&player.storage.baonu>=6;
+ },
+ init:function(player){
+ player.storage.shenfen=false;
+ },
+ mark:true,
+ content:function(){
+ "step 0"
+ player.unmark('shenfen');
+ player.storage.shenfen=true;
+ player.storage.baonu-=6;
+ event.targets=game.players.slice(0);
+ event.targets.remove(player);
+ event.targets.sort(lib.sort.seat);
+ event.targets2=event.targets.slice(0);
+ player.turnOver();
+ "step 1"
+ if(event.targets.length){
+ event.targets.shift().damage();
+ event.redo();
+ }
+ "step 2"
+ if(event.targets2.length){
+ var cur=event.targets2.shift();
+ if(cur&&cur.num('he')){
+ cur.chooseToDiscard('he',true,4);
+ }
+ event.redo();
+ }
+ },
+ intro:{
+ content:'limited'
+ },
+ ai:{
+ order:10,
+ result:{
+ player:function(player){
+ var num=0;
+ for(var i=0;i0?1:-1;
+ }
+ }
+ return num;
+ }
+ }
+ }
+ },
+ wuqian:{
+ enable:'phaseUse',
+ filter:function(event,player){
+ return player.storage.baonu>=2&&!player.skills.contains('wushuang');
+ },
+ content:function(){
+ player.storage.baonu-=2;
+ player.addTempSkill('wushuang','phaseAfter');
+ },
+ ai:{
+ order:5,
+ result:{
+ player:function(player){
+ if(!player.storage.shenfen) return 0;
+ var cards=player.get('h','sha');
+ if(cards.length){
+ for(var i=0;i0&&
+ game.players[i].num('h','shan')){
+ return 1;
+ }
+ }
+ }
+ return 0;
+ }
+ }
+ }
+ },
+ renjie:{
+ trigger:{player:'damageEnd'},
+ forced:true,
+ unique:true,
+ group:'renjie2',
+ mark:true,
+ filter:function(event){
+ return event.num>0;
+ },
+ init:function(player){
+ player.storage.renjie=0;
+ },
+ content:function(){
+ player.storage.renjie+=trigger.num;
+ },
+ intro:{
+ content:'mark'
+ },
+ ai:{
+ maixie:true,
+ effect:{
+ target:function(card,player,target){
+ if(player.skills.contains('jueqing')) return [1,-2];
+ if(get.tag(card,'damage')){
+ if(target.hp==target.maxHp){
+ if(!target.skills.contains('jilue')){
+ return [0,1];
+ }
+ return [0.7,1];
+ }
+ return 0.7;
+ }
+ },
+ player:function(card,player){
+ if(_status.currentPhase!=player) return;
+ if(card.name=='wuzhong'||card.name=='yiyi'||
+ card.name=='yuanjiao'||card.name=='shunshou') return;
+ if(player.hp<=2) return;
+ if(!player.skills.contains('jilue')||player.storage.renjie==0){
+ return [0,0,0,0];
+ }
+
+ }
+ }
+ }
+ },
+ renjie2:{
+ trigger:{player:'phaseDiscardEnd'},
+ forced:true,
+ filter:function(event){
+ return event.cards&&event.cards.length>0;
+ },
+ content:function(){
+ player.storage.renjie+=trigger.cards.length;
+ }
+ },
+ sbaiyin:{
+ trigger:{player:'phaseBegin'},
+ forced:true,
+ unique:true,
+ filter:function(event,player){
+ return player.storage.renjie>=4;
+ },
+ content:function(){
+ player.loseMaxHp();
+ player.addSkill('jilue');
+ player.removeSkill('sbaiyin');
+ }
+ },
+ jilue:{
+ unique:true,
+ group:['jilue_guicai','jilue_fangzhu','jilue_wansha','jilue_zhiheng','jilue_jizhi']
+ },
+ jilue_guicai:{
+ trigger:{global:'judge'},
+ direct:true,
+ filter:function(event,player){
+ return player.num('h')>0&&player.storage.renjie>0;
+ },
+ content:function(){
+ "step 0"
+ player.chooseCard('是否弃置一枚“忍”,并发动【鬼才】?').ai=function(card){
+ var trigger=_status.event.parent._trigger;
+ var player=_status.event.player;
+ var result=trigger.judge(card)-trigger.judge(trigger.player.judging);
+ var attitude=ai.get.attitude(player,trigger.player);
+ if(attitude==0||result==0) return 0;
+ if(attitude>0){
+ return result-ai.get.value(card)/2;
+ }
+ else{
+ return -result-ai.get.value(card)/2;
+ }
+ };
+ "step 1"
+ if(result.bool){
+ player.respond(result.cards);
+ }
+ else{
+ event.finish();
+ }
+ "step 2"
+ if(result.bool){
+ player.logSkill('jilue_guicai');
+ player.storage.renjie--;
+ if(trigger.player.judging.clone) trigger.player.judging.clone.delete();
+ ui.discardPile.appendChild(trigger.player.judging);
+ trigger.player.judging=result.cards[0];
+ trigger.position.appendChild(result.cards[0]);
+ game.log(get.translation(trigger.player)+'的判定牌改为'+get.translation(result.cards[0]));
+ game.delay(2);
+ }
+ },
+ ai:{
+ tag:{
+ rejudge:1,
+ }
+ }
+ },
+ jilue_fangzhu:{
+ trigger:{player:'damageEnd'},
+ direct:true,
+ priority:-1,
+ filter:function(event,player){
+ return player.storage.renjie>0;
+ },
+ content:function(){
+ "step 0"
+ player.chooseTarget('是否弃置一枚“忍”,并发动【放逐】?',function(card,player,target){
+ return player!=target
+ }).ai=function(target){
+ if(target.isTurnedOver()){
+ return ai.get.attitude(player,target)-1;
+ }
+ else{
+ if(player.maxHp-player.hp==1){
+ return -ai.get.attitude(player,target)-1;
+ }
+ }
+ return 0;
+ }
+ "step 1"
+ if(result.bool){
+ player.storage.renjie--;
+ player.logSkill('jilue_fangzhu',result.targets);
+ result.targets[0].draw(player.maxHp-player.hp);
+ result.targets[0].turnOver();
+ }
+ },
+ },
+ jilue_wansha:{
+ enable:'phaseUse',
+ usable:1,
+ filter:function(event,player){
+ return player.storage.renjie>0;
+ },
+ content:function(){
+ player.storage.renjie--;
+ player.addTempSkill('wansha','phaseAfter');
+ }
+ },
+ jilue_zhiheng:{
+ enable:'phaseUse',
+ usable:1,
+ filter:function(event,player){
+ return player.storage.renjie>0;
+ },
+ position:'he',
+ filterCard:true,
+ selectCard:[1,Infinity],
+ prompt:'弃置一枚“忍”,然后弃置任意张牌并摸等量的牌',
+ check:function(card){return 6-ai.get.value(card)},
+ content:function(){
+ player.storage.renjie--;
+ player.draw(cards.length);
+ },
+ ai:{
+ order:1,
+ result:{
+ player:function(player){
+ var num=0;
+ var cards=player.get('he');
+ for(var i=0;i2) return 1;
+ if(cards.length==2&&player.storage.jilue>1);
+ return 0;
+ }
+ },
+ threaten:1.5
+ },
+ },
+ jilue_jizhi:{
+ trigger:{player:'useCard'},
+ filter:function(event,player){
+ return (get.type(event.card)=='trick'&&event.cards[0]&&event.cards[0]==event.card)&&player.storage.renjie>0;
+ },
+ content:function(){
+ player.storage.renjie--;
+ player.draw();
+ },
+ ai:{
+ threaten:1.4
+ }
+ },
+ wushen:{
+ mod:{
+ cardEnabled:function(card,player){
+ if(card.name!='sha'&&get.suit(card)=='heart') return false;
+ },
+ cardUsable:function(card,player){
+ if(card.name!='sha'&&get.suit(card)=='heart') return false;
+ },
+ cardRespondable:function(card,player){
+ if(card.name!='sha'&&get.suit(card)=='heart') return false;
+ },
+ cardSavable:function(card,player){
+ if(card.name!='sha'&&get.suit(card)=='heart') return false;
+ },
+ targetInRange:function(card){
+ if(get.suit(card)=='heart'||_status.event.skill=='wushen') return true;
+ }
+ },
+ enable:['chooseToUse','chooseToRespond'],
+ filterCard:{suit:'heart'},
+ viewAs:{name:'sha'},
+ check:function(){return 1},
+ ai:{
+ effect:{
+ target:function(card,player,target,current){
+ if(get.tag(card,'respondSha')&¤t<0) return 0.6
+ }
+ },
+ respondSha:true,
+ order:4,
+ useful:-1,
+ value:-1
+ }
+ },
+ wuhun:{
+ trigger:{player:'dieBegin'},
+ forced:true,
+ filter:function(event){
+ return event.source!=undefined;
+ },
+ content:function(){
+ trigger.source.loseHp(trigger.source.hp);
+ },
+ ai:{
+ threaten:function(player,target){
+ if(target.hp==1) return 0.5;
+ },
+ result:{
+ target:function(card,player,target,current){
+ if(target.hp<=1&&get.tag(card,'damage')){
+ if(player.skills.contains('jueqing')) return [1,-5];
+ if(player.hp>2&&ai.get.attitude(player,target<=0)) return [0,2];
+ return [1,0,0,-player.hp];
+ }
+ }
+ }
+ }
+ },
+ guixin:{
+ trigger:{player:'damageEnd'},
+ check:function(event,player){
+ if(player.isTurnedOver()) return true;
+ var num=0;
+ for(var i=0;i0){
+ num++;
+ }
+ if(num>=2) return true;
+ }
+ return false;
+ },
+ content:function(){
+ "step 0"
+ var targets=game.players.slice(0);
+ targets.remove(player);
+ targets.sort(lib.sort.seat);
+ event.targets=targets;
+ event.num=0;
+ "step 1"
+ if(num0){
+ num++;
+ }
+ if(num>2) return [0,1];
+ if(num==2) return [0.5,1];
+ }
+ }
+ }
+ }
+ }
+ },
+ qixing:{
+ unique:true,
+ trigger:{global:'gameDrawAfter',player:'phaseBegin'},
+ forced:true,
+ check:function(event,player){
+ return player.hp<=1;
+ },
+ filter:function(event,player){
+ return !player.storage.qixing;
+ },
+ content:function(){
+ "step 0"
+ player.gain(get.cards(7))._triggered=null;
+ "step 1"
+ player.chooseCard('选择七张牌作为星',7,true).ai=function(card){
+ return ai.get.value(card);
+ };
+ "step 2"
+ player.lose(result.cards,ui.special)._triggered=null;
+ player.storage.qixing=result.cards;
+ },
+ mark:true,
+ intro:{
+ mark:function(dialog,content,player){
+ if(content&&content.length){
+ if(player==game.me){
+ dialog.add(content);
+ }
+ else{
+ return '共有'+get.cnNumber(content.length)+'张星';
+ }
+ }
+ },
+ content:function(content,player){
+ if(content&&content.length){
+ if(player==game.me){
+ return get.translation(content);
+ }
+ return '共有'+get.cnNumber(content.length)+'张星';
+ }
+ }
+ },
+ group:['qixing2'],
+ },
+ qixing2:{
+ trigger:{player:'phaseDrawAfter'},
+ direct:true,
+ filter:function(event,player){
+ return player.storage.qixing&&player.storage.qixing.length;
+ },
+ content:function(){
+ "step 0"
+ player.chooseCard('选择任意张手牌与星交换',[1,player.num('h')]).ai=function(card){
+ return 1;
+ };
+ "step 1"
+ if(result.bool){
+ player.logSkill('qixing');
+ player.lose(result.cards,ui.special)._triggered=null;
+ player.storage.qixing=player.storage.qixing.concat(result.cards);
+ event.num=result.cards.length;
+ }
+ else{
+ event.finish();
+ }
+ "step 2"
+ player.chooseCardButton(player.storage.qixing,'选择'+event.num+'张牌作为手牌',event.num,true).ai=function(button){
+ if(player.skipList.contains('phaseUse')){
+ return -ai.get.value(button.link);
+ }
+ return ai.get.value(button.link);
+ }
+ if(player==game.me&&_status.auto){
+ game.delay(0.5);
+ }
+ "step 3"
+ player.gain(result.links)._triggered=null;
+ for(var i=0;i=5){
+ if(target.hp==1&&target.maxHp>2) return att;
+ if(target.hp==2&&target.maxHp>3&&target.num('he')==0) return att*0.7;
+ return 0;
+ }
+ return -1;
+ }
+ "step 1"
+ if(result.bool){
+ var length=result.targets.length;
+ for(var i=0;i=2;
+ },
+ direct:true,
+ content:function(){
+ "step 0"
+ var recover=0,lose=0;
+ for(var i=0;i0){
+ if(game.players[i].hp<2){
+ lose--;
+ recover+=0.5;
+ }
+ lose--;
+ recover++;
+ }
+ else if(ai.get.attitude(player,game.players[i])<0){
+ if(game.players[i].hp<2){
+ lose++;
+ recover-=0.5;
+ }
+ lose++;
+ recover--;
+ }
+ }
+ else{
+ if(ai.get.attitude(player,game.players[i])>0){
+ lose--;
+ }
+ else if(ai.get.attitude(player,game.players[i])<0){
+ lose++;
+ }
+ }
+ }
+ }
+ player.chooseControl('失去体力','回复体力','cancel').ai=function(){
+ if(lose>recover&&lose>0) return 0;
+ if(lose0) return 1;
+ return 2;
+ }
+ "step 1"
+ if(result.bool==false||result.control=='cancel'){
+ event.finish();
+ }
+ else{
+ player.logSkill('qinyin');
+ event.bool=(result.control=='回复体力');
+ event.num=0;
+ event.players=game.players.slice(0);
+ }
+ "step 2"
+ if(event.num=1) return [0,0];
+ var hasfriend=false;
+ for(var i=0;i=0){
+ hasfriend=true;break;
+ }
+ }
+ if(!hasfriend) return;
+ if((get.tag(card,'damage')==1||get.tag(card,'loseHp'))&&target.hp>1) return [0,1];
+ }
+ },
+ threaten:function(player,target){
+ if(target.hp==1) return 2;
+ return 0.5;
+ },
+ }
+ },
+ longhun1:{
+ enable:['chooseToUse','chooseToRespond'],
+ prompt:'将一张红桃牌当桃使用',
+ position:'he',
+ check:function(card,event){
+ if(_status.event.player.hp>1) return 0;
+ return 10-ai.get.value(card);
+ },
+ selectCard:function(){
+ return Math.max(1,_status.event.player.hp);
+ },
+ viewAs:{name:'tao'},
+ filterCard:function(card){
+ return get.suit(card)=='heart';
+ }
+ },
+ longhun2:{
+ enable:['chooseToUse','chooseToRespond'],
+ prompt:'将一张方片牌当火杀使用或打出',
+ position:'he',
+ check:function(card,event){
+ if(_status.event.player.hp>1) return 0;
+ return 10-ai.get.value(card);
+ },
+ selectCard:function(){
+ return Math.max(1,_status.event.player.hp);
+ },
+ viewAs:{name:'sha',nature:'fire'},
+ filterCard:function(card){
+ return get.suit(card)=='diamond';
+ }
+ },
+ longhun3:{
+ enable:['chooseToUse','chooseToRespond'],
+ prompt:'将一张黑桃牌当无懈可击使用',
+ position:'he',
+ viewAsFilter:function(player){
+ return player.num('he',{color:'black'})>=player.hp;
+ },
+ check:function(card,event){
+ if(_status.event.player.hp>1) return 0;
+ return 7-ai.get.value(card);
+ },
+ selectCard:function(){
+ return Math.max(1,_status.event.player.hp);
+ },
+ viewAs:{name:'wuxie'},
+ viewAsFilter:function(player){
+ return player.num('he',{suit:'spade'})>0;
+ },
+ filterCard:function(card){
+ return get.suit(card)=='spade';
+ }
+ },
+ longhun4:{
+ enable:['chooseToUse','chooseToRespond'],
+ prompt:'将一张梅花牌当闪打出',
+ position:'he',
+ check:function(card,event){
+ if(_status.event.player.hp>1) return 0;
+ return 10-ai.get.value(card);
+ },
+ selectCard:function(){
+ return Math.max(1,_status.event.player.hp);
+ },
+ viewAs:{name:'shan'},
+ filterCard:function(card){
+ return get.suit(card)=='club';
+ }
+ },
+ juejing:{
+ mod:{
+ maxHandcard:function(player,num){
+ return 2+num;
+ }
+ },
+ trigger:{player:'phaseDrawBegin'},
+ priority:-5,
+ filter:function(event,player){
+ return player.hpplayer.hp){
+ return 6-ai.get.value(card);
+ }
+ return 4-ai.get.value(card)
+ }
+ },
+ bazhen:{
+ inherit:'bagua_skill',
+ filter:function(event,player){
+ if(!event.filterCard({name:'shan'})) return false;
+ if(event.parent.player.num('s','unequip')) return false;
+ if(player.get('e','2')) return false;
+ return true;
+ },
+ ai:{
+ effect:{
+ target:function(card,player,target){
+ if(player==target&&get.subtype(card)=='equip2'){
+ if(ai.get.equipValue(card)<=8) return 0;
+ }
+ if(target.num('e','2')) return;
+ if(player.skills.contains('unequip')) return;
+ if(get.tag(card,'respondShan')) return [0.5,0];
+ }
+ }
+ }
+ },
+ kanpo:{
+ enable:'chooseToUse',
+ filterCard:function(card){
+ return get.color(card)=='black';
+ },
+ viewAsFilter:function(player){
+ return player.num('h',{color:'black'})>0;
+ },
+ viewAs:{name:'wuxie'},
+ prompt:'将一张黑色牌当无懈可击使用',
+ check:function(card){return 8-ai.get.value(card)},
+ threaten:1.2
+ },
+ lianhuan:{
+ group:['lianhuan1','lianhuan2']
+ },
+ lianhuan1:{
+ enable:'phaseUse',
+ filter:function(event,player){
+ return player.num('h',{suit:'club'})>0;
+ },
+ filterCard:function(card){
+ return get.suit(card)=='club';
+ },
+ viewAs:{name:'tiesuo'},
+ prompt:'将一张梅花牌当铁锁连环使用',
+ check:function(card){return 4-ai.get.value(card)}
+ },
+ lianhuan2:{
+ enable:'phaseUse',
+ filter:function(event,player){
+ return player.num('h',{suit:'club'})>0;
+ },
+ filterCard:function(card){
+ return get.suit(card)=='club';
+ },
+ check:function(card){
+ return 5-ai.get.useful(card);
+ },
+ content:function(){
+ player.draw();
+ },
+ discard:false,
+ prepare:function(cards,player){
+ player.$throw(cards);
+ },
+ ai:{
+ basic:{
+ order:1
+ },
+ result:{
+ player:1,
+ },
+ }
+ },
+ niepan:{
+ unique:true,
+ enable:'chooseToUse',
+ mark:true,
+ init:function(player){
+ player.storage.niepan=false;
+ },
+ filter:function(event,player){
+ if(event.type!='dying') return false;
+ if(player!=_status.dying) return false;
+ if(player.storage.niepan) return false;
+ },
+ content:function(){
+ player.hp=Math.min(3,player.maxHp);
+ player.discard(player.get('hej'));
+ player.draw(3);
+ player.unmarkSkill('niepan');
+ if(player.classList.contains('linked')) player.link();
+ if(player.classList.contains('turnedover')) player.turnOver();
+ player.storage.niepan=true;
+ },
+ ai:{
+ save:true,
+ result:{
+ player:10
+ },
+ threaten:function(player,target){
+ if(!target.storage.niepan) return 0.6;
+ }
+ },
+ intro:{
+ content:'limited'
+ }
+ },
+ quhu:{
+ enable:'phaseUse',
+ usable:1,
+ filter:function(event,player){
+ if(player.num('h')==0) return false;
+ for(var i=0;iplayer.hp&&game.players[i].num('h')) return true;
+ }
+ return false;
+ },
+ filterTarget:function(card,player,target){
+ return target.hp>player.hp&&target.num('h')>0;
+ },
+ content:function(){
+ "step 0"
+ player.chooseToCompare(target);
+ "step 1"
+ if(result.bool){
+ player.chooseTarget(function(card,player,target1){
+ return target1!=target&&get.distance(target,target1,'attack')<=1;
+ },true).ai=function(target1){
+ return ai.get.damageEffect(target1,target,player);
+ }
+ }
+ else{
+ player.damage(target);
+ event.finish();
+ }
+ "step 2"
+ if(result.bool){
+ result.targets[0].damage(target);
+ }
+ },
+ ai:{
+ order:0.5,
+ result:{
+ target:function(player,target){
+ var att=ai.get.attitude(player,target);
+ var oc=(target.num('h')==1);
+ if(att>0&&oc) return 0;
+ for(var i=0;i0){
+ return att>0?att/2:att-(oc?5:0);
+ }
+ }
+ }
+ return 0;
+ },
+ player:function(player){
+ var mn=1;
+ var hs=player.get('h');
+ for(var i=0;i2){
+ max=Math.max(Math.min(5,game.players[i].hp)-game.players[i].num('h'),max);
+ }
+ }
+ switch(max){
+ case 0:return mn==13?0:-20;
+ case 1:return mn>=12?0:-15;
+ case 2:return 0;
+ case 3:return 1;
+ default:return max;
+ }
+ }
+ },
+ expose:0.2
+ }
+ },
+ jieming:{
+ trigger:{player:'damageEnd'},
+ direct:true,
+ filter:function(event,player){
+ return event.num>0
+ },
+ content:function(){
+ "step 0"
+ player.chooseTarget([1,trigger.num],function(card,player,target){
+ return target.num('h')2){
+ return Math.min(5,target.maxHp)-target.num('h');
+ }
+ return att/3;
+ }
+ "step 1"
+ if(result.bool){
+ player.logSkill('jieming',result.targets);
+ for(var i=0;i1){
+ if(player.skills.contains('jueqing')) return [1,-2];
+ var max=0;
+ for(var i=0;i0){
+ max=Math.max(Math.min(5,game.players[i].hp)-game.players[i].num('h'),max);
+ }
+ }
+ switch(max){
+ case 0:return 2;
+ case 1:return 1.5;
+ case 2:return [1,2];
+ default:return [0,max];
+ }
+ }
+ if((card.name=='tao'||card.name=='caoyao')&&
+ target.hp>1&&target.num('h')<=target.hp) return [0,0];
+ }
+ },
+ }
+ },
+ qiangxi:{
+ enable:'phaseUse',
+ usable:1,
+ filterCard:function(card){
+ return get.subtype(card)=='equip1';
+ },
+ selectCard:[0,1],
+ filterTarget:function(card,player,target){
+ if(player==target) return false;
+ return get.distance(player,target,'attack')<=1;
+ },
+ content:function(){
+ "step 0"
+ if(cards.length==0){
+ player.loseHp();
+ }
+ "step 1"
+ target.damage();
+ },
+ check:function(card){
+ return 10-ai.get.value(card);
+ },
+ position:'he',
+ ai:{
+ order:8,
+ result:{
+ player:function(player,target){
+ if(ui.selected.cards.length) return 0;
+ if(player.hp>=target.hp) return -0.9;
+ if(player.hp<=2) return -10;
+ return -2;
+ },
+ target:function(player,target){
+ return ai.get.damageEffect(target,player);
+ }
+ }
+ },
+ threaten:1.3
+ },
+ tianyi:{
+ enable:'phaseUse',
+ usable:1,
+ filterTarget:function(card,player,target){
+ return player!=target&&target.num('h')>0;
+ },
+ filter:function(event,player){
+ return player.num('h')>0;
+ },
+ content:function(){
+ "step 0"
+ player.chooseToCompare(target);
+ "step 1"
+ if(result.bool){
+ player.addTempSkill('tianyi2','phaseAfter');
+ }
+ else{
+ player.addTempSkill('tianyi3','phaseAfter');
+ }
+ },
+ ai:{
+ order:function(name,player){
+ var cards=player.get('h');
+ if(player.num('h','sha')==0){
+ return 1;
+ }
+ for(var i=0;i11&&ai.get.value(cards[i])<7){
+ return 9;
+ }
+ }
+ return lib.card.sha.ai.order-1;
+ },
+ result:{
+ player:function(player){
+ if(player.num('h','sha')>0) return 0.6;
+ var num=player.num('h');
+ if(num>player.hp) return 0;
+ if(num==1) return -2;
+ if(num==2) return -1;
+ return -0.7;
+ },
+ target:function(player,target){
+ var num=target.num('h');
+ if(num==1) return -1;
+ if(num==2) return -0.7;
+ return -0.5
+ },
+ },
+ threaten:1.3
+ }
+ },
+ tianyi2:{
+ mod:{
+ targetInRange:function(card,player,target,now){
+ if(card.name=='sha') return true;
+ },
+ selectTarget:function(card,player,range){
+ if(card.name=='sha'&&range[1]!=-1) range[1]++;
+ },
+ cardUsable:function(card,player,num){
+ if(card.name=='sha') return num+1;
+ }
+ },
+ },
+ tianyi3:{
+ mod:{
+ cardEnabled:function(card){if(card.name=='sha') return false}
+ }
+ },
+ shuangxiong:{
+ trigger:{player:'phaseDrawBefore'},
+ check:function(event,player){
+ if(player.num('h')>player.hp) return true;
+ if(player.num('h')>3) return true;
+ return false;
+ },
+ content:function(){
+ "step 0"
+ player.judge();
+ "step 1"
+ player.gain(result.card);
+ player.addTempSkill('shuangxiong2','phaseAfter');
+ player.storage.shuangxiong=get.color(result.card);
+ trigger.untrigger();
+ trigger.finish();
+ }
+ },
+ shuangxiong2:{
+ enable:'phaseUse',
+ viewAs:{name:'juedou'},
+ filterCard:function(card,player){
+ return get.color(card)!=player.storage.shuangxiong;
+ },
+ check:function(card){
+ return 6-ai.get.value(card);
+ },
+ ai:{
+ basic:{
+ order:10
+ }
+ }
+ },
+ luanji:{
+ enable:'phaseUse',
+ viewAs:{name:'wanjian'},
+ filterCard:function(card,player){
+ if(ui.selected.cards.length){
+ return get.suit(card)==get.suit(ui.selected.cards[0]);
+ }
+ var cards=player.get('h');
+ for(var i=0;i0;
+ },
+ check:function(event,player){
+ return ai.get.attitude(player,event.target)<0;
+ },
+ content:function(){
+ player.discardPlayerCard('he',trigger.target,true);
+ }
+ },
+ },
+ translate:{
+ zhugeliangwolong:'卧龙',
+ pangtong:'庞统',
+ xunyu:'荀彧',
+ dianwei:'典韦',
+ taishici:'太史慈',
+ yanwen:'颜良文丑',
+ yuanshao:'袁绍',
+ pangde:'庞德',
+ huoji:'火计',
+ bazhen:'八阵',
+ kanpo:'看破',
+ lianhuan:'连环',
+ lianhuan1:'连环',
+ lianhuan2:'重铸♣︎',
+ niepan:'涅槃',
+ quhu:'驱虎',
+ jieming:'节命',
+ qiangxi:'强袭',
+ tianyi:'天义',
+ shuangxiong:'双雄',
+ shuangxiong2:'双雄',
+ luanji:'乱击',
+ xueyi:'血裔',
+ mengjin:'猛进',
+ huoji_info:'出牌阶段,你可以将你的任意一张♥或♦手牌当【火攻】使用。',
+ bazhen_info:'当你没装备防具时,始终视为你装备着【八卦阵】。',
+ kanpo_info:'你可以将你的任意一张♠或♣手牌当【无懈可击】使用。',
+ lianhuan_info:'出牌阶段,你可以将你任意一张梅花手牌当【铁索连环】使用或重铸。',
+ niepan_info:'当你处于濒死状态时,你可以丢弃你所有的牌和你判定区里的牌,并重置你的武将牌,然后摸三张牌且体力回复至3点。',
+ quhu_info:'出牌阶段,你可以与一名体力比你多的角色拼电,若你赢,则该角色对其攻击范围内另一名由你指定的角色造成1点伤害。若你没赢,他/她对你造成一点伤害。每回合限用一次。',
+ jieming_info:'你每受到1点伤害,可令任意一名角色将手牌补至其体力上限的张数(不能超过五张)。',
+ qiangxi_info:'出牌阶段,你可以自减一点体力或弃一张武器牌,然后你对你攻击范围内的一名角色造成一点伤害,每回合限一次。',
+ tianyi_info:'出牌阶段,你可以和一名角色拼点,若你赢,你获得以下技能直到回合结束:攻击范围无限;可额外使用一张【杀】;使用【杀】时可额外指定一个目标,若你没赢,你不能使用【杀】直到回合结束。每回合限一次。',
+ shuangxiong_info:'摸牌阶段,你可选择放弃摸牌并进行一次判定:你获得此判定牌,且于此回合的出牌阶段,你可以将任意一张与此判定牌不同颜色的手牌当【决斗】使用。',
+ luanji_info:'出牌阶段,你可以将任意两张相同花色的手牌当【万箭齐发】使用。',
+ xueyi_info:'场上每有一名其他群雄角色存活,你的手牌上限便+2。',
+ mengjin_info:'当你使用的【杀】被【闪】抵消时,你可以弃掉对方的一张牌。',
+ },
+ help:{
+
+ }
+}
diff --git a/character/gujian.js b/character/gujian.js
new file mode 100644
index 000000000..87daa8dc0
--- /dev/null
+++ b/character/gujian.js
@@ -0,0 +1,1048 @@
+character.gujian={
+ character:{
+ gjqt_bailitusu:['male','shu',4,['xuelu','fanshi','shahun'],['fullskin']],
+ gjqt_fengqingxue:['female','wu',3,['qinglan','yuehua','swd_wuxie'],['fullskin']],
+ gjqt_xiangling:['female','wu',3,['qianhuan','meihu','xidie'],['fullskin']],
+ gjqt_fanglansheng:['male','wu',3,['fanyin','mingkong','fumo'],['fullskin']],
+ gjqt_yinqianshang:['male','qun',4,['zhongji','zuizhan'],['fullskin']],
+ gjqt_hongyu:['female','shu',4,['jianwu','meiying'],['fullskin']],
+
+ gjqt_yuewuyi:['male','wei',4,['yanjia','xiuhua'],['fullskin']],
+ gjqt_wenrenyu:['female','shu',4,['jizhan','qianjun'],['fullskin']],
+ gjqt_xiayize:['male','qun',3,['xuanning','liuguang','yangming'],['fullskin']],
+ gjqt_aruan:['female','wu',3,['zhaolu','jiehuo','yuling'],['fullskin']],
+ },
+ skill:{
+ jianwu:{
+ trigger:{player:'shaBegin'},
+ forced:true,
+ filter:function(event,player){
+ return get.distance(event.target,player,'attack')>1;
+ },
+ content:function(){
+ trigger.directHit=true;
+ }
+ },
+ zuizhan:{
+ trigger:{player:'useCard'},
+ popup:false,
+ filter:function(event,player){
+ if(event.card.name!='sha') return false;
+ for(var i=0;iplayer.hp&&player.num('h','lebu')==0)||get.distance(player,event.player)>1);
+ },
+ prompt:function(event,player){
+ return '是否对'+get.translation(event.player)+'发动【魅影】?'
+ },
+ content:function(){
+ "step 0"
+ player.phase();
+ player.storage.meiying=trigger.player;
+ "step 1"
+ if(!player.isTurnedOver()){
+ player.turnOver();
+ }
+ delete player.storage.meiying;
+ },
+ mod:{
+ targetInRange:function(card,player,target,now){
+ if(target==player.storage.meiying) return true;
+ },
+ },
+ ai:{
+ effect:{
+ target:function(card){
+ if(card.name=='guiyoujie') return [0,0];
+ }
+ }
+ }
+ },
+ xidie:{
+ trigger:{player:'phaseBegin'},
+ direct:true,
+ filter:function(event,player){
+ return player.num('h')>player.hp;
+ },
+ content:function(){
+ "step 0"
+ player.chooseToDiscard('是否发动【戏蝶】?',[1,Math.min(3,player.num('h')-player.hp)]).ai=function(card){
+ return 6-ai.get.value(card);
+ }
+ "step 1"
+ if(result.bool){
+ player.logSkill('xidie');
+ player.storage.xidie=result.cards.length;
+ }
+ },
+ group:'xidie2'
+ },
+ xidie2:{
+ trigger:{player:'phaseEnd'},
+ forced:true,
+ filter:function(event,player){
+ return player.storage.xidie>0;
+ },
+ content:function(){
+ player.draw(player.storage.xidie);
+ player.storage.xidie=0;
+ }
+ },
+ meihu:{
+ trigger:{player:'damageEnd'},
+ check:function(event,player){
+ return ai.get.attitude(player,event.source)<4;
+ },
+ filter:function(event,player){
+ return event.source&&event.source!=player&&event.source.num('h')>0;
+ },
+ content:function(){
+ "step 0"
+ trigger.source.chooseCard('交给'+get.translation(player)+'一张手牌',true).ai=function(card){
+ return -ai.get.value(card);
+ };
+ "step 1"
+ if(result.bool){
+ player.gain(result.cards[0]);
+ trigger.source.$give(1,player);
+ }
+ },
+ ai:{
+ effect:{
+ target:function(card,player,target){
+ if(get.tag(card,'damage')){
+ if(player.skills.contains('jueqing')) return [1,-1.5];
+ return [1,0,0,-0.5];
+ }
+ }
+ }
+ }
+ },
+ qianhuan:{
+ trigger:{player:'phaseAfter'},
+ check:function(event,player){
+ return player.hp==1||player.isTurnedOver();
+ },
+ filter:function(event,player){
+ return player.hp1||player.num('h',{color:'black'})>1;
+ },
+ direct:true,
+ content:function(){
+ "step 0"
+ player.chooseToDiscard('是否发动伏魔?',2,function(card){
+ if(ui.selected.cards.length){
+ return get.color(card)==get.color(ui.selected.cards[0]);
+ }
+ return player.num('h',{color:get.color(card)})>1;
+ }).ai=function(card){
+ if(ai.get.damageEffect(trigger.source,player,player,'thunder')>0){
+ return 8-ai.get.value(card);
+ }
+ return 0;
+ };
+ "step 1"
+ if(result.bool){
+ player.logSkill('fumo',trigger.source,'thunder');
+ // player.line(trigger.source,'thunder');
+ trigger.source.damage('thunder');
+ }
+ },
+ ai:{
+ threaten:0.8
+ }
+ },
+ fanyin:{
+ trigger:{player:'phaseEnd'},
+ direct:true,
+ content:function(){
+ "step 0"
+ player.chooseTarget('是否发动【梵音】?',function(card,player,target){
+ if(player==target) return false;
+ if(target.isLinked()) return true;
+ if(target.isTurnedOver()) return true;
+ if(target.num('j')) return true;
+ if(target.hp==target.maxHp) return false;
+ for(var i=0;i0){
+ var min=true;
+ for(var i=0;i0){
+ return num+att;
+ }
+ }
+ return num;
+ }
+ "step 1"
+ if(result.bool){
+ event.target=result.targets[0];
+ player.logSkill('fanyin',event.target);
+ }
+ else{
+ event.finish();
+ }
+ "step 2"
+ if(event.target.isLinked()){
+ event.target.link();
+ }
+ "step 3"
+ if(event.target.isTurnedOver()){
+ event.target.turnOver();
+ }
+ "step 4"
+ var cards=event.target.get('j');
+ if(cards.length){
+ event.target.discard(cards);
+ }
+ "step 5"
+ var min=true;
+ for(var i=0;i=1;
+ },
+ content:function(){
+ if(trigger.num>=1){
+ trigger.num--;
+ }
+ if(trigger.source){
+ trigger.source.storage.mingkong=true;
+ trigger.source.addTempSkill('mingkong2','phaseBefore');
+ }
+ },
+ ai:{
+ effect:{
+ target:function(card,player,target){
+ if(get.tag(card,'damage')&&target.num('h')==0){
+ if(player.skills.contains('jueqing')) return;
+ return 0.1;
+ }
+ }
+ }
+ },
+ },
+ mingkong2:{
+ trigger:{source:'damageEnd'},
+ forced:true,
+ popup:false,
+ filter:function(event,player){
+ return player.storage.mingkong?true:false;
+ },
+ content:function(){
+ player.draw();
+ player.storage.mingkong=false;
+ player.removeSkill('mingkong2');
+ }
+ },
+ yuehua:{
+ trigger:{player:['useCardAfter','respondAfter','discardAfter']},
+ frequent:true,
+ filter:function(event,player){
+ if(player==_status.currentPhase) return false;
+ if(event.cards){
+ for(var i=0;i0;
+ },
+ direct:true,
+ priority:-5,
+ content:function(){
+ "step 0"
+ player.chooseToDiscard('是否对'+get.translation(trigger.player)+'发动【晴岚】?','he').ai=function(card){
+ if(trigger.num>1||!trigger.source){
+ if(ai.get.attitude(player,trigger.player)>0){
+ return 9-ai.get.value(card);
+ }
+ return -1;
+ }
+ else if(ai.get.attitude(player,trigger.player)>0){
+ if(trigger.player.hp==1){
+ return 8-ai.get.value(card);
+ }
+ if(trigger.source.hp==trigger.source.maxHp){
+ return 6-ai.get.value(card);
+ }
+ }
+ else if(ai.get.attitude(player,trigger.source)>0&&
+ trigger.source.hp1){
+ if(get.color(card)=='red') return 5-ai.get.value(card);
+ }
+ return -1;
+ }
+ "step 1"
+ if(result.bool){
+ player.logSkill('qinglan');
+ trigger.untrigger();
+ trigger.finish();
+ if(trigger.source){
+ trigger.source.recover();
+ }
+ }
+ else{
+ event.finish();
+ }
+ "step 2"
+ if(trigger.source){
+ trigger.source.draw();
+ }
+ },
+ ai:{
+ expose:0.1
+ }
+ },
+ fanshi:{
+ trigger:{player:'phaseDiscardAfter'},
+ forced:true,
+ filter:function(event,player){
+ return player.getStat('damage')>0;
+ },
+ check:function(event,player){
+ return player.hp==player.maxHp;
+ },
+ content:function(){
+ "step 0"
+ player.loseHp();
+ "step 1"
+ player.draw();
+ }
+ },
+ xuelu:{
+ unique:true,
+ trigger:{player:'phaseEnd'},
+ direct:true,
+ filter:function(event,player){
+ return player.maxHp>player.hp;
+ },
+ content:function(){
+ "step 0"
+ player.chooseCardTarget({
+ position:'he',
+ filterTarget:function(card,player,target){
+ return player!=target;
+ },
+ filterCard:true,
+ ai1:function(card){
+ return 9-ai.get.value(card);
+ },
+ ai2:function(target){
+ return ai.get.damageEffect(target,player,player,'fire');
+ },
+ prompt:'是否发动【血戮】?'
+ });
+ "step 1"
+ if(result.bool){
+ event.target=result.targets[0];
+ player.logSkill('xuelu',event.target,'fire');
+ event.num=Math.ceil((player.maxHp-player.hp)/2);
+ player.discard(result.cards);
+ }
+ else{
+ event.finish();
+ }
+ "step 2"
+ if(event.target){
+ event.target.damage(event.num,'fire');
+ }
+ },
+ ai:{
+ maixie:true,
+ expose:0.2,
+ threaten:function(player,target){
+ if(target.hp==1) return 3;
+ if(target.hp==2) return 1.5;
+ return 0.5;
+ },
+ effect:{
+ target:function(card,player,target){
+ if(get.tag(card,'damage')){
+ if(target.hp==target.maxHp) return [0,1];
+ }
+ if(get.tag(card,'recover')&&player.hp>=player.maxHp-1) return [0,0];
+ }
+ }
+ }
+ },
+ xiuhua:{
+ forbid:['versus'],
+ trigger:{player:'shaHit'},
+ filter:function(event,player){
+ return event.target!=player.previous;
+ },
+ content:function(){
+ game.swapSeat(trigger.target,player,true,true);
+ }
+ },
+ shahun:{
+ enable:'chooseToUse',
+ filter:function(event,player){
+ return !player.storage.shahun&&player.hp<=0;
+ },
+ content:function(){
+ "step 0"
+ var cards=player.get('hej');
+ player.discard(cards);
+ event.num=Math.max(3,cards.length);
+ "step 1"
+ if(player.isLinked()) player.link();
+ "step 2"
+ if(player.isTurnedOver()) player.turnOver();
+ "step 3"
+ player.draw(event.num);
+ "step 4"
+ player.recover(1-player.hp);
+ player.removeSkill('fanshi');
+ player.addSkill('juejing');
+ player.storage.shahun=3;
+ player.markSkill('shahun');
+ },
+ group:'shahun2',
+ intro:{
+ content:'turn'
+ },
+ ai:{
+ save:true,
+ result:{
+ player:3
+ }
+ }
+ },
+ shahun2:{
+ trigger:{player:'phaseAfter'},
+ forced:true,
+ filter:function(event,player){
+ return player.storage.shahun?true:false;
+ },
+ content:function(){
+ if(player.storage.shahun>1){
+ player.storage.shahun--;
+ }
+ else{
+ player.die();
+ }
+ }
+ },
+ yanjia:{
+ enable:'chooseToUse',
+ filter:function(event,player){
+ return player.num('he',{type:'equip'})>0;
+ },
+ filterCard:function(card){
+ return get.type(card)=='equip';
+ },
+ position:'he',
+ viewAs:{name:'wuzhong'},
+ prompt:'将一张装备牌当无中生有使用',
+ check:function(card){
+ var player=_status.currentPhase;
+ if(player.num('he',{subtype:get.subtype(card)})>1){
+ return 11-ai.get.equipValue(card);
+ }
+ if(player.num('h')0&&player.storage.xuanning!=3;
+ },
+ filterCard:function(card){
+ return get.type(card)=='basic';
+ },
+ check:function(card){
+ return 7-ai.get.useful(card);
+ },
+ content:function(){
+ player.storage.xuanning=3;
+ player.markSkill('xuanning');
+ },
+ ai:{
+ result:{
+ player:function(player){
+ var num=player.num('h');
+ if(num>player.hp+1) return 1;
+ if(player.storage.xuanning>=2) return 0;
+ if(num>player.hp) return 1
+ if(player.storage.xuanning>=1) return 0;
+ return 1;
+ },
+ },
+ order:5
+ }
+ },
+ xuanning2:{
+ trigger:{player:'damageEnd'},
+ forced:true,
+ filter:function(event,player){
+ if(player.storage.xuanning){
+ return (event.source&&event.source.num('he')>0);
+ }
+ return false;
+ },
+ content:function(){
+ player.discardPlayerCard(trigger.source,ai.get.buttonValue,'he',true);
+ player.storage.xuanning--;
+ if(!player.storage.xuanning){
+ player.unmarkSkill('xuanning');
+ }
+ }
+ },
+ liuguang:{
+ trigger:{player:'phaseBegin'},
+ direct:true,
+ filter:function(event,player){
+ if(player.storage.xuanning) return true;
+ return false;
+ },
+ content:function(){
+ "step 0"
+ player.chooseTarget(function(card,player,target){
+ return player!=target;
+ },'是否发动【流光】?',[1,3]).ai=function(target){
+ return ai.get.damageEffect(target,player,player);
+ }
+ "step 1"
+ if(result.bool){
+ player.storage.xuanning--;
+ if(!player.storage.xuanning){
+ player.unmarkSkill('xuanning');
+ }
+ event.targets=result.targets.slice(0);
+ event.targets.sort(lib.sort.seat);
+ player.logSkill('liuguang',result.targets);
+ }
+ else{
+ event.finish();
+ }
+ "step 2"
+ if(event.targets.length){
+ var target=event.targets.shift();
+ var next=target.chooseToDiscard('流光:弃置一张牌或受到一点伤害','he');
+ next.ai=function(card){
+ if(ai.get.damageEffect(_status.event.player,player,_status.event.player)>=0) return -1;
+ if(_status.event.player.hp==1) return 9-ai.get.value(card);
+ return 8-ai.get.value(card);
+ };
+ next.autochoose=function(){
+ return this.player.num('he')==0;
+ };
+ event.current=target;
+ }
+ else{
+ event.finish();
+ }
+ "step 3"
+ if(result.bool&&result.cards&&result.cards.length){
+ event.goto(2);
+ }
+ else{
+ event.current.damage();
+ }
+ },
+ ai:{
+ expose:0.2
+ }
+ },
+ yangming:{
+ enable:'phaseUse',
+ filter:function(event,player){
+ if(player.storage.yangming2>0) return false;
+ return player.num('h',{color:'red'})>0;
+ },
+ filterCard:function(card){
+ return get.color(card)=='red';
+ },
+ content:function(){
+ player.storage.yangming2=2;
+ player.addSkill('yangming2');
+ },
+ check:function(card){
+ return 6-ai.get.value(card);
+ },
+ ai:{
+ result:{
+ player:1
+ },
+ order:6
+ }
+ },
+ yangming2:{
+ trigger:{player:'phaseUseEnd'},
+ direct:true,
+ mark:true,
+ content:function(){
+ "step 0"
+ player.storage.yangming2--;
+ if(player.storage.yangming2>0){
+ event.finish();
+ }
+ else{
+ player.removeSkill('yangming2');
+ var num=0
+ for(var i=0;i5;
+ },
+ check:function(event,player){
+ return player.num('h')<2;
+ },
+ content:function(){
+ player.chooseToDiscard(true,player.num('h')-5);
+ }
+ },
+ yuling4:{
+ mod:{
+ cardEnabled:function(card,player){
+ if(_status.currentPhase!=player) return;
+ if(get.cardCount(true,player)>=player.maxHp+2) return false;
+ }
+ }
+ },
+ yuling5:{
+ trigger:{player:['useCardAfter','phaseBegin']},
+ forced:true,
+ popup:false,
+ silent:true,
+ content:function(){
+ player.storage.yuling=player.maxHp+2-get.cardCount(true,player);
+ }
+ },
+ yuling6:{
+ trigger:{player:'phaseAfter'},
+ forced:true,
+ popup:false,
+ silent:true,
+ content:function(){
+ delete player.storage.yuling;
+ }
+ },
+ },
+ translate:{
+ gjqt_bailitusu:'百里屠苏',
+ gjqt_fengqingxue:'风晴雪',
+ gjqt_fanglansheng:'方兰生',
+ gjqt_xiangling:'襄铃',
+ gjqt_yinqianshang:'尹千觞',
+ gjqt_hongyu:'红玉',
+
+ gjqt_yuewuyi:'乐无异',
+ gjqt_wenrenyu:'闻人羽',
+ gjqt_xiayize:'夏夷则',
+ gjqt_aruan:'阿阮',
+
+ xidie:'戏蝶',
+ xidie2:'戏蝶',
+ xidie_info:'回合开始阶段,若你的手牌数大于体力值,可以弃置至多X张牌,并于回合结束阶段摸等量的牌,X为你的体力值与手牌数之差且不超过3',
+ meihu:'魅狐',
+ meihu2:'魅狐',
+ meihu_info:'当你受到伤害后,可令伤害来源交给你一张手牌',
+ jianwu:'剑舞',
+ jianwu_info:'锁定技,每当你使用一张杀,若你不在目标的攻击范围内,此杀不可闪避。',
+ meiying:'魅影',
+ meiying_info:'在一名其他角色的回合开始前,若你的武将牌正面朝上,你可以进行一个额外回合,并在回合结束后翻面(若已翻面则不翻回来)。若如此做,你对其使用卡牌无视距离直到回合结束。',
+ zhongji:'重击',
+ zhongji_info:'每当你即将造成伤害,可弃置一张黑色手牌令伤害+1',
+ zuizhan:'醉斩',
+ zuizhan_info:'每当你使用一张杀,可以摸一张牌,然后此杀随机增加一个额外目标',
+ qianhuan:'千幻',
+ qianhuan_info:'回合结束后,若你已受伤,你可以回复一点体力并摸一张牌,然后将武将牌翻面。若你的武将牌背面朝上,你不能使用卡牌,也不能成为卡牌的目标',
+ fumo:'伏魔',
+ fumo_info:'每当你受到一次伤害,可以弃置两张颜色相同的手牌并对伤害来源造成一点雷电伤害',
+ fanyin:'梵音',
+ fanyin_info:'回合结束阶段,你可以令一名角色重置武将牌。若其体力值是全场最少的之一,其回复一点体力。',
+ mingkong:'明空',
+ mingkong_info:'锁定技,若你没有手牌,你受到的伤害-1,然后伤害来源摸一张牌',
+ qinglan:'晴岚',
+ qinglan_info:'每当有一名角色即将受到属性伤害,你可以弃置一张牌令其防止此伤害,然后伤害来源摸一张牌并回复一点体力',
+ yuehua:'月华',
+ yuehua_info:'每当你于回合外使用、打出或弃置红色牌,你可以摸一张牌',
+ xuelu:'血戮',
+ xuelu_info:'回合结束阶段,你可以弃置一张牌并对一名其他角色造成X点火焰伤害,X为你已损失体力值的一半,向上取整',
+ fanshi:'反噬',
+ fanshi_info:'锁定技,若你于回合内造成过伤害,你于弃牌阶段结束时流失一点体力并摸一张牌',
+ shahun:'煞魂',
+ shahun2:'煞魂',
+ shahun_info:'限定技,濒死阶段,你可以重置武将牌,弃置所有牌并摸等量的牌(至少三张),然后将体力回复至1;若如此做,你失去技能【反噬】,并获得技能【绝境】,然后于三回合后立即死亡',
+
+ xiuhua:'袖花',
+ xiuhua_info:'每当你使用杀击中目标,你可以将其拉至你的旁边',
+ liuying:'流影',
+ liuying_info:'你可以将一张装备牌当顺手牵羊使用',
+ yanjia:'偃甲',
+ yanjia_info:'你可以将一张装备牌当无中生有使用',
+ boyun:'拨云',
+ boyun1:'拨云',
+ boyun2:'拨云',
+ boyun_info:'在你的回合内,你可以弃置一张装备牌,并展示牌堆顶的一张牌,若其为装备牌,你须将其交给任意一张角色并对其造成一点伤害,否则你摸一张牌',
+ jizhan:'疾战',
+ jizhan_info:'出牌阶段,你可以将移动到任意一名角色的前一位,视为对其使用了一张杀,每阶段限一次',
+ qianjun:'千军',
+ qianjun_info:'每当你使用一张杀,你可以弃置一张非基本牌,令距离目标1以内的所有角色成为额外目标',
+ xuanning:'玄凝',
+ xuanning1:'玄凝',
+ xuanning2:'玄凝',
+ liuguang:'流光',
+ yangming:'养命',
+ yangming2:'养命',
+ xuanning_info:'出牌阶段,你可以弃置一基本牌,获得至多3个玄凝标记。当你受到伤害时,若你有玄凝标记,你须弃置一个玄凝标记并弃置伤害来源一张牌',
+ liuguang_info:'回合开始阶段,若你有玄凝标记,你可以弃置一枚玄凝标记,选择至多三名角色依次令其弃置一张牌或受到一点伤害,若有角色受到伤害则终止结算',
+ yangming_info:'出牌阶段,你可以弃置一张红色牌,并在下个出牌阶段结束时令距离1以内的任意名角色回复一点体力,在此之前不可再次发动',
+ zhaolu:'朝露',
+ jiehuo:'劫火',
+ yuling:'御灵',
+ yuling1:'御灵',
+ yuling2:'御灵',
+ yuling3:'御灵',
+ yuling4:'御灵',
+ zhaolu_info:'锁定技,每隔X回合,你流失一点体力上限,每当你受到一点伤害或有人死亡,视为减少两个回合,X为现存角色数且至多为5',
+ jiehuo_info:'限定技,出牌阶段,你可以令所有其他角色受到X点火焰伤害,然后你立即死亡,X为你的体力值且不超过该角色的当前体力值',
+ yuling_info:'锁定技,你没有摸牌和弃牌阶段,你的手牌数始终为5,你在一个出牌阶段最多使用X+2张牌,X为你的体力上限',
+ },
+}
diff --git a/character/guozhan.js b/character/guozhan.js
new file mode 100644
index 000000000..ed3eca138
--- /dev/null
+++ b/character/guozhan.js
@@ -0,0 +1,16 @@
+character.guozhan={
+ character:{
+ ganfuren:['female','shu',3,['shushen','shenzhi'],['fullskin']],
+ mifuren:['female','shu',3,['guixiu','cunsi'],['fullskin']],
+ mateng:['male','qun',4,['xiongyi','mashu'],['fullskin']],
+ tianfeng:['male','qun',3,['sijian','suishi'],['fullskin']],
+ yuejin:['male','wei',4,['xiaoguo'],['fullskin']],
+ chendong:['male','wu',4,['duanxie','fenming'],['fullskin']],
+ sp_dongzhuo:['male','qun',5,['hengzheng'],['fullskin']],
+ jiangfei:['male','shu',3,['shengxi','shoucheng'],['fullskin']],
+ jiangqing:['male','wu',4,['shangyi'],['fullskin']],
+ hetaihou:['female','qun',3,['zhendu','qiluan'],['fullskin']],
+ kongrong:['male','qun',3,['lirang','mingshi'],['fullskin']],
+ dingfeng:['male','wu',4,['fenxun'],['fullskin']],
+ },
+};
diff --git a/character/jiange.js b/character/jiange.js
new file mode 100644
index 000000000..3b472ac43
--- /dev/null
+++ b/character/jiange.js
@@ -0,0 +1,605 @@
+character.jiange={
+ character:{
+ jg_pangtong:['male','shu',3,['qiwu','tianyu'],['fullskin']],
+ jg_huangyueying:['female','shu',3,['zhinang','jingmiao'],['fullskin']],
+ jg_zhugeliang:['male','shu',3,['biantian','bazhen'],['fullskin']],
+ jg_liubei:['male','shu',4,['jizhen','lingfeng'],['fullskin']],
+ jg_xiahouyuan:['male','wei',4,['shensu','juechen'],['fullskin']],
+ jg_caozhen:['male','wei',4,['chiying','jingfan'],['fullskin']],
+ jg_zhanghe:['male','wei',4,['huodi','jueji'],['fullskin']],
+ jg_simayi:['male','wei',6,['xuanlei','sfanshi','konghun'],['fullskin']],
+ },
+ skill:{
+ sfanshi:{
+ init:function(player){
+ player.maxHp=Math.floor(game.players.length/2)+2;
+ player.hp=player.maxHp;
+ player.update();
+ },
+ trigger:{global:'dieAfter'},
+ forced:true,
+ content:function(){
+ player.maxHp=Math.floor(game.players.length/2)+2;
+ player.hp=Math.min(player.hp,player.maxHp);
+ player.update();
+ },
+ group:'sfanshi2',
+ ai:{
+ mingzhi:false
+ }
+ },
+ sfanshi2:{
+ trigger:{player:'phaseEnd'},
+ forced:true,
+ check:function(){
+ return false;
+ },
+ content:function(){
+ player.loseHp();
+ }
+ },
+ konghun:{
+ trigger:{player:'phaseUseBegin'},
+ direct:true,
+ filter:function(event,player){
+ return player.hp<=Math.floor(game.players.length/3);
+ },
+ content:function(){
+ "step 0"
+ player.chooseTarget('是否发动【控魂】?',function(card,player,target){
+ return player!=target;
+ },[1,Math.floor(game.players.length/2)]).ai=function(target){
+ return ai.get.damageEffect(target,player,player,'thunder')+1;
+ }
+ "step 1"
+ if(result.bool){
+ event.targets=result.targets.slice(0);
+ player.logSkill('konghun',event.targets,'thunder');
+ event.targets.sort(lib.sort.seat);
+ event.num=0;
+ }
+ else{
+ event.finish();
+ }
+ "step 2"
+ if(event.num0&&event.player!=player&&event.player.hp1||event.targets[0]!=player);
+ },
+ silent:true,
+ forced:true,
+ popup:false,
+ content:function(){
+ player.addTempSkill('huodi3','phaseAfter');
+ }
+ },
+ huodi3:{},
+ jingfan:{
+ trigger:{player:'phaseUseEnd'},
+ unique:true,
+ direct:true,
+ content:function(){
+ "step 0"
+ var num=get.cardCount(true,player)-player.num('h');
+ event.num=num;
+ if(num>0){
+ player.draw(num);
+ }
+ "step 1"
+ if(event.num>0){
+ player.chooseTarget('选择至多'+get.cnNumber(event.num)+'名角色令其与其他角色的距离-1',[1,event.num],function(card,player,target){
+ return player!=target;
+ }).ai=function(target){
+ return ai.get.attitude(player,target);
+ }
+ }
+ else{
+ event.finish();
+ }
+ "step 2"
+ if(result.bool&&result.targets){
+ player.logSkill('jingfan',result.targets);
+ for(var i=0;i0;
+ },
+ filter:function(event,player){
+ if(event.num<=1) return false;
+ return true;
+ },
+ priority:-11,
+ content:function(){
+ trigger.num=1;
+ if(trigger.source){
+ trigger.source.addTempSkill('chiying2','damageAfter');
+ }
+ }
+ },
+ chiying2:{
+ trigger:{source:'damageEnd'},
+ forced:true,
+ popup:false,
+ content:function(){
+ player.draw();
+ }
+ },
+ juechen:{
+ trigger:{player:'useCard'},
+ filter:function(event,player){
+ return event.card.name=='sha';
+ },
+ direct:true,
+ content:function(){
+ "step 0"
+ game.delay(0.5);
+ player.chooseTarget('是否发动【绝尘】?',function(card,player,target){
+ return player!=target&&!trigger.targets.contains(target)&&target.num('he')>0;
+ }).ai=function(target){
+ return -ai.get.attitude(player,target);
+ }
+ "step 1"
+ if(result.bool){
+ player.logSkill('juechen',result.targets);
+ player.discardPlayerCard(true,result.targets[0],'he');
+ }
+ }
+ },
+ lingfeng:{
+ trigger:{player:'phaseDrawBefore'},
+ check:function(event,player){
+ for(i=0;i0;
+ }).ai=function(target){
+ return -ai.get.attitude(player,target);
+ }
+ }
+ "step 2"
+ if(result.bool&&result.targets&&result.targets.length){
+ player.discardPlayerCard(result.targets[0],'he',true);
+ }
+ "step 3"
+ player.gain(event.cards);
+ player.$draw(event.cards);
+ game.delay();
+ },
+ ai:{
+ threaten:1.1
+ }
+ },
+ biantian4:{
+ trigger:{player:'dieBegin'},
+ forced:true,
+ popup:false,
+ content:function(){
+ for(var i=0;i0;
+ },
+ content:function(){
+ "step 0"
+ player.choosePlayerCard(trigger.player,'是否发动【精妙】弃置'+
+ get.translation(trigger.player)+'一张牌?','he');
+ "step 1"
+ if(result.bool){
+ player.logSkill('jingmiao',trigger.player);
+ trigger.player.discard(result.links);
+ }
+ },
+ ai:{
+ expose:0.2
+ }
+ },
+ zhinang:{
+ trigger:{player:'phaseBegin'},
+ frequent:true,
+ content:function(){
+ "step 0"
+ event.cards=get.cards(3);
+ event.cards2=[];
+ for(var i=0;iplayer.hp){
+ if(target==player) return Math.max(1,att-2);
+ }
+ if(target==player) return att+5;
+ return att;
+ }
+ if(!event.isMine()){
+ dialog.style.display='none';
+ }
+ }
+ "step 1"
+ if(result&&result.targets&&result.targets.length){
+ event.target=result.targets[0];
+ }
+ if(event.cards2.length){
+ event.target.gain(event.cards2,'gain');
+ }
+ },
+ ai:{
+ threaten:1.3
+ }
+ },
+ qiwu:{
+ trigger:{player:'useCard'},
+ forced:true,
+ filter:function(event,player){
+ return get.suit(event.card)=='club'&&player.hp0){
+ player.discardPlayerCard(target,'he',true);
+ }
+ else{
+ event.finish();
+ }
+ },
+ ai:{
+ order:4,
+ expose:0.2,
+ result:{
+ target:-1,
+ player:function(player,target){
+ if(target.num('h')==0) return 0;
+ if(target.num('h')==1) return -0.1;
+ if(player.hp<=2) return -2;
+ if(player.num('h','shan')==0) return -1;
+ return -0.5;
+ }
+ },
+ threaten:1.1
+ }
+ },
+ zhiji:{
+ unique:true,
+ trigger:{player:'phaseBegin'},
+ forced:true,
+ filter:function(event,player){
+ if(player.storage.zhiji) return false;
+ return player.num('h')==0;
+ },
+ content:function(){
+ "step 0"
+ player.chooseControl('zhiji_recover','zhiji_draw',function(event,player){
+ if(player.hp>=2) return 'zhiji_draw';
+ return 'zhiji_recover';
+ });
+ "step 1"
+ if(result.control=='zhiji_draw'){
+ player.draw(2);
+ }
+ else{
+ player.recover();
+ }
+ "step 2"
+ if(lib.config.mode!='guozhan'||player.maxHp>=4){
+ player.loseMaxHp();
+ }
+ player.storage.zhiji=true;
+ if(player.hp>player.maxHp) player.hp=player.maxHp;
+ player.update();
+ player.addSkill('guanxing')
+ }
+ },
+ xiangle:{
+ trigger:{target:'useCardToBefore'},
+ forced:true,
+ filter:function(event,player){
+ return event.card.name=='sha';
+ },
+ content:function(){
+ "step 0"
+ trigger.player.chooseToDiscard(function(card){
+ return get.type(card)=='basic';
+ }).ai=function(card){
+ return 10-ai.get.value(card);
+ };
+ "step 1"
+ if(result.bool==false){
+ trigger.finish();
+ trigger.untrigger();
+ }
+ },
+ ai:{
+ effect:{
+ target:function(card,player,target,current){
+ if(card.name=='sha'){
+ if(player.num('h',{type:'basic'})<2) return 0;
+ return [1,0,1,-0.5];
+ }
+ }
+ }
+ }
+ },
+ fangquan:{
+ trigger:{player:'phaseUseBefore'},
+ filter:function(event,player){
+ return player.num('h')>0;
+ },
+ direct:true,
+ content:function(){
+ "step 0"
+ var fang=player.hp>=2&&player.num('h')<=player.hp+1;
+ player.chooseTarget('是否发动放权?',function(card,player,target){
+ return target!=player;
+ }).ai=function(target){
+ if(!fang) return -1;
+ return ai.get.attitude(player,target)-4;
+ };
+ "step 1"
+ if(result.bool){
+ player.logSkill('fangquan',result.targets);
+ trigger.untrigger();
+ trigger.finish();
+ player.addSkill('fangquan2');
+ player.storage.fangquan=result.targets[0];
+ }
+ }
+ },
+ fangquan2:{
+ trigger:{player:'phaseEnd'},
+ forced:true,
+ popup:false,
+ content:function(){
+ "step 0"
+ player.chooseToDiscard(true);
+ "step 1"
+ player.storage.fangquan.phase();
+ player.removeSkill('fangquan2');
+ }
+ },
+ ruoyu:{
+ unique:true,
+ trigger:{player:'phaseBegin'},
+ forced:true,
+ filter:function(event,player){
+ if(player!=game.zhu)return false;
+ if(player.storage.ruoyu) return false;
+ for(var i=0;i0;
+ },
+ direct:true,
+ frequent:true,
+ content:function(){
+ "step 0"
+ if(player.num('j')==0&&(!event.isMine()||!lib.config.autoskilllist.contains('qiaobian1'))){
+ event.finish();
+ }
+ else{
+ player.chooseToDiscard('是否发动巧变路过判定阶段?').ai=ai.get.unuseful2;
+ }
+ "step 1"
+ if(result.bool){
+ player.logSkill('qiaobian');
+ trigger.untrigger();
+ trigger.finish();
+ }
+ }
+ },
+ qiaobian2:{
+ trigger:{player:'phaseDrawBefore'},
+ filter:function(event,player){
+ return player.num('h')>0;
+ },
+ direct:true,
+ check:function(event,player){
+
+ },
+ content:function(){
+ "step 0"
+ var check,i,num=0,num2=0;
+ for(i=0;i=2&&num2>0);
+
+ player.chooseCardTarget({
+ ai1:function(card){
+ if(!check) return 0;
+ return 6-ai.get.useful(card);
+ },
+ ai2:function(target){
+ if(!check) return 0;
+ return 1-ai.get.attitude(player,target);
+ },
+ filterTarget:function(card,player,target){
+ return target.num('h')>0;
+ },
+ selectTarget:[0,2],
+ filterCard:true,
+ prompt:'是否发动巧变路过摸牌阶段?'
+ });
+ "step 1"
+ if(result.bool){
+ player.logSkill('qiaobian',result.targets);
+ player.discard(result.cards);
+ }
+ "step 2"
+ game.delay();
+ "step 3"
+ if(result.bool){
+ for(var i=0;i0;
+ },
+ direct:true,
+ check:function(event,player){
+
+ },
+ content:function(){
+ "step 0"
+ var check;
+ for(var i=0;i0&&game.players[i].num('j')){
+ check=true;break;
+ }
+ }
+ if(!check){
+ if(player.num('h')>player.hp+1){
+ check=false;
+ }
+ else if(player.num('h',{name:['wuzhong']})){
+ check=false;
+ }
+ else{
+ check=true;
+ }
+ }
+
+ player.chooseCardTarget({
+ ai1:function(card){
+ if(!check) return 0;
+ return 7-ai.get.useful(card);
+ },
+ ai2:function(target){
+ if(!check) return 0;
+ if(ui.selected.targets.length==0){
+ if(target.num('j')&&ai.get.attitude(player,target)>0) return 10;
+ if(ai.get.attitude(player,target)<0){
+ for(var i=0;i0){
+ if((target.get('e','1')&&!game.players[i].get('e','1'))||
+ (target.get('e','2')&&!game.players[i].get('e','2'))||
+ (target.get('e','3')&&!game.players[i].get('e','3'))||
+ (target.get('e','4')&&!game.players[i].get('e','4'))||
+ (target.get('e','5')&&!game.players[i].get('e','5'))) return -ai.get.attitude(player,target);
+ }
+ }
+ }
+ return 0;
+ }
+ return -ai.get.attitude(player,target)*ai.get.attitude(player,ui.selected.targets[0]);
+ },
+ multitarget:true,
+ filterTarget:function(card,player,target){
+ if(ui.selected.targets.length){
+ var from=ui.selected.targets[0];
+ var judges=from.get('j');
+ for(var i=0;i0;
+ }
+ },
+ selectTarget:2,
+ filterCard:true,
+ prompt:'是否发动巧变路过出牌阶段?',
+ targetprompt:['被移走','移动目标']
+ });
+ "step 1"
+ if(result.bool==false){
+ event.finish();
+ return;
+ }
+ trigger.untrigger();
+ trigger.finish();
+ player.discard(result.cards);
+ player.logSkill('qiaobian',result.targets,false);
+ player.line2(result.targets);
+ event.targets=result.targets;
+ "step 2"
+ game.delay();
+ "step 3"
+ if(targets.length==2){
+ player.choosePlayerCard('ej',function(button){
+ if(ai.get.attitude(player,targets[0])>ai.get.attitude(player,targets[1])){
+ return get.position(button.link)=='j'?10:0;
+ }
+ else{
+ if(get.position(button.link)=='j') return -10;
+ return ai.get.equipValue(button.link);
+ }
+ },targets[0]);
+ }
+ else{
+ event.finish();
+ }
+ "step 4"
+ if(result.bool){
+ if(get.position(result.buttons[0].link)=='e'){
+ event.targets[1].equip(result.buttons[0].link);
+ }
+ else if(result.buttons[0].link.viewAs){
+ event.targets[1].addJudge({name:result.buttons[0].link.viewAs},[result.buttons[0].link]);
+ }
+ else{
+ event.targets[1].addJudge(result.buttons[0].link);
+ }
+ event.targets[0].$give(result.buttons[0].link,event.targets[1])
+ game.delay();
+ }
+ },
+ ai:{
+ expose:0.2
+ }
+ },
+ qiaobian4:{
+ trigger:{player:'phaseDiscardBefore'},
+ direct:true,
+ filter:function(event,player){
+ return player.num('h')>0;
+ },
+ content:function(){
+ "step 0"
+ var discard=player.num('h')>player.hp;
+ player.chooseToDiscard('是否发动巧变路过弃牌阶段?').ai=function(card){
+ if(discard){
+ return 100-ai.get.useful(card);
+ }
+ else{
+ return -1;
+ }
+ };
+ "step 1"
+ if(result.bool){
+ player.logSkill('qiaobian');
+ trigger.untrigger();
+ trigger.finish();
+ }
+ }
+ },
+ tuntian:{
+ trigger:{player:'loseEnd'},
+ frequent:true,
+ filter:function(event,player){
+ if(player==_status.currentPhase) return false;
+ for(var i=0;i=0){
+ hasfriend=true;break;
+ }
+ }
+ if(!hasfriend) return;
+ if(get.tag(card,'respondSha')||get.tag(card,'respondShan')){
+ if(target.num('h')==0) return 2;
+ return [0.5,target.num('h','sha')+target.num('h','shan')];
+ }
+ }
+ },
+ threaten:function(player,target){
+ if(target.num('h')==0) return 2;
+ return 0.5;
+ }
+ }
+ },
+ zaoxian:{
+ unique:true,
+ trigger:{player:'phaseBegin'},
+ forced:true,
+ filter:function(event,player){
+ if(player.storage.tuntian) return player.storage.tuntian.length>=3&&!player.storage.zaoxian;
+ },
+ content:function(){
+ if(lib.config.mode!='guozhan'||player.maxHp>=4){
+ player.loseMaxHp();
+ }
+ player.addSkill('jixi');
+ player.storage.zaoxian=true;
+ }
+ },
+ jixi:{
+ enable:'phaseUse',
+ filter:function(event,player){
+ return player.storage.tuntian.length>0;
+ },
+ content:function(){
+ "step 0"
+ player.chooseCardButton('急袭',player.storage.tuntian);
+ "step 1"
+ if(result.bool){
+ var card=result.buttons[0].link;
+ event.card=card;
+ player.storage.tuntian.remove(card);
+ if(!player.storage.tuntian.length){
+ player.unmarkSkill('tuntian');
+ }
+ player.chooseTarget(function(noname,player,target){
+ var temp=card.name;
+ card.name='shunshou';
+ var result=player.canUse(card,target);
+ card.name=temp;
+ return result;
+ },true).ai=function(target){
+ return -ai.get.attitude(player,target);
+ };
+ }
+ else{
+ event.finish();
+ }
+ "step 2"
+ if(result.bool){
+ player.useCard({name:'shunshou'},[event.card],result.targets[0])
+ }
+ },
+ ai:{
+ order:10,
+ result:{
+ player:function(player){
+ return player.storage.tuntian.length-1;
+ }
+ }
+ }
+ },
+ jiang:{
+ trigger:{player:['shaBefore','juedouBefore'],target:['shaBefore','juedouBefore']},
+ filter:function(event,player){
+ if(event.card.name=='juedou') return true;
+ return get.color(event.card)=='red';
+ },
+ frequent:true,
+ content:function(){
+ player.draw();
+ },
+ ai:{
+ effect:{
+ target:function(card,player,target){
+ if(card.name=='sha'&&get.color(card)=='red') return [1,0.6];
+ },
+ player:function(card,player,target){
+ if(card.name=='sha'&&get.color(card)=='red') return [1,1];
+ }
+ }
+ }
+ },
+ hunzi:{
+ unique:true,
+ trigger:{player:'phaseBegin'},
+ filter:function(event,player){
+ return player.hp==1;
+ },
+ forced:true,
+ priority:3,
+ group:'hunzi2',
+ content:function(){
+ if(lib.config.mode!='guozhan'||player.maxHp>=4){
+ player.loseMaxHp();
+ }
+ if(player.hp>player.maxHp) player.loseHp();
+ player.addSkill('reyingzi');
+ delete player.tempSkills.yinghun;
+ player.removeSkill('hunzi');
+ },
+ ai:{
+ maixie:true,
+ effect:{
+ target:function(card,player,target){
+ var hasfriend=false;
+ for(var i=0;i=0){
+ hasfriend=true;break;
+ }
+ }
+ if(!hasfriend) return;
+ if(get.tag(card,'damage')==1&&target.hp==2&&_status.currentPhase!=target) return [0.5,1];
+ }
+ }
+ }
+ },
+ hunzi2:{
+ unique:true,
+ trigger:{player:'phaseBefore'},
+ filter:function(event,player){
+ return player.hp==1;
+ },
+ forced:true,
+ popup:false,
+ content:function(){
+ player.addTempSkill('yinghun','phaseAfter');
+ },
+ },
+ zhiba:{
+ unique:true,
+ global:'zhiba2',
+ },
+ zhiba2:{
+ enable:'phaseUse',
+ filter:function(event,player){
+ if(!game.zhu) return false;
+ return (player!=game.zhu&&game.zhu.skills.contains('zhiba')&&
+ player.group=='wu'&&player.num('h')>0&&game.zhu.num('h')>0);
+ },
+ filterTarget:function(card,player,target){
+ return target==game.zhu;
+ },
+ usable:1,
+ content:function(){
+ "step 0"
+ player.chooseToCompare(target,function(card){
+ var player=get.owner(card);
+ if(player!=game.zhu&&ai.get.attitude(player,game.zhu)>0){
+ return -get.number(card);
+ }
+ return get.number(card);
+ });
+ "step 1"
+ if(result.bool==false){
+ target.gain([result.player,result.target]);
+ target.$gain2([result.player,result.target]);
+ }
+ },
+ ai:{
+ basic:{
+ order:1
+ },
+ expose:0.2,
+ result:{
+ target:function(player){
+ var cards=player.get('h');
+ for(var i=0;i0;
+ },
+ filterCard:function(card){
+ return get.type(card)=='equip';
+ },
+ check:function(card){
+ var player=_status.currentPhase;
+ if(player.num('he',{subtype:get.subtype(card)})>1){
+ return 11-ai.get.equipValue(card);
+ }
+ return 6-ai.get.value(card);
+ },
+ filterTarget:function(card,player,target){
+ return player!=target&&!target.get('e',get.subtype(card)[5]);
+ },
+ content:function(){
+ target.equip(cards[0]);
+ player.draw();
+ },
+ discard:false,
+ prepare:function(cards,player,targets){
+ player.$give(cards,targets[0],false);
+ },
+ ai:{
+ basic:{
+ order:10
+ },
+ result:{
+ target:3,
+ },
+ threaten:1.3
+ }
+ },
+ guzheng:{
+ unique:true,
+ gainable:true,
+ trigger:{global:'phaseDiscardEnd'},
+ filter:function(event,player){
+ if(event.player!=player&&event.player.classList.contains('dead')==false&&
+ event.cards&&event.cards.length){
+ for(var i=0;i0) return true;
+ var num=0;
+ for(var i=0;i2;
+ },
+ direct:true,
+ content:function(){
+ "step 0"
+ game.delay();
+ "step 1"
+ event.cards=trigger.cards.slice(0);
+ for(var i=0;i0;
+ },
+ content:function(){
+ "step 0"
+ player.chooseToDiscard('he','是否发动悲歌?').ai=ai.get.unuseful2;
+ "step 1"
+ if(result.bool){
+ player.logSkill('beige');
+ trigger.player.judge();
+ }
+ else{
+ event.finish();
+ }
+ "step 2"
+ switch(get.suit(result.card)){
+ case 'heart':trigger.player.recover();break;
+ case 'diamond':trigger.player.draw(2);break;
+ case 'club':trigger.source.chooseToDiscard('he',2,true);break;
+ case 'spade':trigger.source.turnOver();break;
+ }
+ },
+ ai:{
+ expose:0.3
+ }
+ },
+ duanchang:{
+ trigger:{player:'dieBegin'},
+ forced:true,
+ filter:function(event){
+ return event.source!=undefined;
+ },
+ content:function(){
+ trigger.source.clearSkills();
+ },
+ ai:{
+ threaten:function(player,target){
+ if(target.hp==1) return 0.2;
+ return 1.5;
+ },
+ effect:{
+ target:function(card,player,target,current){
+ var hasfriend=false;
+ for(var i=0;i=0){
+ hasfriend=true;break;
+ }
+ }
+ if(!hasfriend) return;
+ if(target.hp<=1&&get.tag(card,'damage')) return [1,0,0,-2];
+ }
+ }
+ }
+ },
+ // fushen:{
+ // trigger:{player:'phaseBefore'},
+ // content:function(){
+ // "step 0"
+ // if(player.storage.fushen&&player.storage.fushen.classList.contains('dead')==false){
+ // if(player==game.me) game.swapPlayer(player.storage.fushen);
+ // else if(player.storage.fushen==game.me) game.swapPlayer(player);
+ // delete player.storage.fushen;
+ // event.finish();
+ // }
+ // else{
+ // player.chooseTarget(function(card,player,target){
+ // if(player==target) return false;
+ // return true;
+ // }).ai=function(){
+ // return -1;//1+Math.random();
+ // }
+ // }
+ // "step 1"
+ // if(result.bool){
+ // player.storage.fushen=result.targets[0];
+ // if(player==game.me){
+ // game.swapPlayer(result.targets[0]);
+ // }
+ // else if(result.targets[0]==game.me){
+ // game.swapPlayer(player);
+ // }
+ // }
+ // }
+ // },
+ huashen:{
+ unique:true,
+ forbid:['guozhan'],
+ init:function(player){
+ player.storage.huashen={
+ list:[],
+ owned:{},
+ player:player,
+ get:function(num){
+ if(typeof num!='number') num=1;
+ var player=this.player;
+ while(num--){
+ var name=player.storage.huashen.unowned.shift();
+ var skills=lib.character[name][3].slice(0);
+ for(var i=0;i0&&player!=target&&target.num('h')>=player.num('h');
+ },function(target){
+ return (1-ai.get.attitude(_status.event.player,target));
+ });
+ "step 1"
+ if(result.bool){
+ player.logSkill('retuxi');
+ for(var i=0;i0;
+ },
+ content:function(){
+ "step 0"
+ player.chooseCard('鬼才:请选择代替判定的牌','he').ai=function(card){
+ var trigger=_status.event.parent._trigger;
+ var player=_status.event.player;
+ var result=trigger.judge(card)-trigger.judge(trigger.player.judging);
+ var attitude=ai.get.attitude(player,trigger.player);
+ if(attitude==0||result==0) return 0;
+ if(attitude>0){
+ return result-ai.get.value(card)/2;
+ }
+ else{
+ return -result-ai.get.value(card)/2;
+ }
+ };
+ "step 1"
+ if(result.bool){
+ player.respond(result.cards);
+ }
+ else{
+ event.finish();
+ }
+ "step 2"
+ if(result.bool){
+ player.logSkill('guicai');
+ if(trigger.player.judging.clone) trigger.player.judging.clone.delete();
+ ui.discardPile.appendChild(trigger.player.judging);
+ trigger.player.judging=result.cards[0];
+ game.delay(2);
+ }
+ },
+ ai:{
+ tag:{
+ rejudge:1,
+ }
+ }
+ },
+ refankui:{
+ trigger:{player:'damageEnd'},
+ direct:true,
+ filter:function(event,player){
+ return (event.source&&event.source.num('he'));
+ },
+ content:function(){
+ "step 0"
+ event.num=trigger.num;
+ "step 1"
+ if(num==0||trigger.source.num('he')==0){
+ event.finish();
+ return;
+ }
+ event.num--;
+ player.choosePlayerCard(trigger.source,ai.get.buttonValue,'he');
+ "step 2"
+ if(result.bool){
+ player.logSkill('refankui',trigger.source);
+ player.gain(result.buttons[0].link);
+ trigger.source.$give(1,player);
+ event.goto(1);
+ }
+ },
+ ai:{
+ result:{
+ target:function(card,player,target){
+ if(player.num('he')>1&&get.tag(card,'damage')){
+ if(player.skills.contains('jueqing')) return [1,-1.5];
+ if(ai.get.attitude(target,player)<0) return [1,1];
+ }
+ }
+ }
+ }
+ },
+ reluoyi:{
+ trigger:{player:'phaseDrawBegin'},
+ check:function(event,player){
+ if(player.num('h','sha')) return true;
+ return Math.random()<0.5;
+ },
+ content:function(){
+ "step 0"
+ player.addTempSkill('luoyi2',{player:'phaseBefore'});
+ trigger.untrigger();
+ trigger.finish();
+ "step 1"
+ event.cards=get.cards(3);
+ event.dialog=ui.create.dialog('裸衣',event.cards);
+ game.delay(2);
+ "step 2"
+ event.dialog.close();
+ for(var i=0;i=player.hp+3) return true;
+ if(player.num('h')>=player.hp+2&&game.players.length+game.dead.length>=7) return true;
+ return false;
+ },
+ content:function(){
+ if(lib.config.mode!='guozhan'||player.maxHp>=4){
+ player.loseMaxHp();
+ }
+ player.addSkill('gongxin');
+ }
+ },
+ qingjian:{
+ unique:true,
+ trigger:{player:'gainAfter'},
+ direct:true,
+ filter:function(event){
+ if(event.parent.parent.name=='phaseDraw') return false;
+ return event.cards&&event.cards.length>0
+ },
+ content:function(){
+ "step 0"
+ event.cards=trigger.cards.slice(0);
+ "step 1"
+ player.chooseCardTarget({
+ filterCard:function(card){
+ return _status.event.parent.cards.contains(card);
+ },
+ selectCard:[1,event.cards.length],
+ filterTarget:function(card,player,target){
+ return player!=target;
+ },
+ ai1:function(card){
+ if(ui.selected.cards.length>0) return -1;
+ return (_status.event.player.num('h')-_status.event.player.hp);
+ },
+ ai2:function(target){
+ if(target.num('h')>player.num('h')) return 0;
+ return ai.get.attitude(_status.event.player,target)-4;
+ },
+ prompt:'请选择要送人的卡牌'
+ });
+ "step 2"
+ if(result.bool){
+ player.logSkill('qingjian',result.targets);
+ result.targets[0].gain(result.cards);
+ player.$give(result.cards.length,result.targets[0]);
+ for(var i=0;i0;
+ },
+ filterTarget:function(card,player,target){
+ return player!=target;
+ },
+ filterCard:true,
+ check:function(card){
+ return 8-ai.get.value(card);
+ },
+ discard:false,
+ prepare:function(cards,player,targets){
+ player.$give(1,targets[0]);
+ },
+ content:function(){
+ "step 0"
+ target.storage.refanjian=cards[0];
+ target.gain(cards[0]);
+ "step 1"
+ target.chooseControl('refanjian_card','refanjian_hp').ai=function(event,player){
+ var cards=target.get('he',{suit:get.suit(player.storage.refanjian)});
+ if(cards.length==1) return 0;
+ if(cards.length==2){
+ for(var i=0;i=8) return 1;
+ }
+ if(cards.length>2&&player.hp>2) return 1;
+ if(cards.length>3) return 1;
+ return 0;
+ }
+ "step 2"
+ if(result.control=='refanjian_card'){
+ target.showHandcards();
+ }
+ else{
+ target.loseHp();
+ event.finish();
+ }
+ "step 3"
+ target.discard(target.get('he',{suit:get.suit(target.storage.refanjian)}))
+ },
+ ai:{
+ order:9,
+ result:{
+ target:function(player,target){
+ return -target.num('he');
+ }
+ },
+ threaten:2,
+ }
+ },
+ reqianxun:{
+ init:function(player){
+ player.storage.reqianxun2=[];
+ },
+ trigger:{target:'useCardToBegin',player:'judgeAfter'},
+ filter:function(event,player){
+ if(player.num('h')==0) return false;
+ if(event.parent.name=='phaseJudge'){
+ return event.result.judge!=0;
+ }
+ if(event.name=='judge') return false;
+ if(event.targets&&event.targets.length>1) return false;
+ if(event.card&&get.type(event.card)=='trick'&&event.player!=player) return true;
+ },
+ content:function(){
+ player.storage.reqianxun2=player.storage.reqianxun2.concat(player.get('h'));
+ player.lose(player.get('h'),ui.special);
+ player.addSkill('reqianxun2');
+ },
+ ai:{
+ effect:function(card,player,target){
+ if(get.type(card,'trick')=='trick'&&ui.selected.targets.length==0) return [1,1];
+ },
+ },
+ },
+ reqianxun2:{
+ trigger:{global:'phaseAfter'},
+ forced:true,
+ content:function(){
+ player.gain(player.storage.reqianxun2);
+ player.removeSkill('reqianxun2');
+ player.storage.reqianxun2=[];
+ },
+ mark:true,
+ intro:{
+ content:'cardCount'
+ }
+ },
+ relianying:{
+ trigger:{player:'loseEnd'},
+ direct:true,
+ filter:function(event,player){
+ if(player.num('h')) return false;
+ for(var i=0;i0){
+ return att+Math.max(0,5-target.num('h'));
+ }
+ return att;
+ }
+ }
+ else{
+ player.chooseBool('是否弃置'+get.translation(event.card)+'?');
+ event.disbool=true;
+ }
+ game.delay(2);
+ "step 1"
+ if(event.disbool){
+ if(!result.bool){
+ game.log(get.translation(player)+'展示了'+get.translation(event.card));
+ ui.cardPile.insertBefore(event.card,ui.cardPile.firstChild);
+ }
+ else{
+ game.log(get.translation(player)+'展示并弃掉了'+get.translation(event.card));
+ ui.discardPile.appendChild(event.card);
+ }
+ }
+ else if(result.targets){
+ result.targets[0].gain(event.card);
+ event.node.moveTo(result.targets[0]);
+ game.log(get.translation(result.targets[0])+'获得了'+get.translation(event.card));
+ }
+ else{
+ game.log(get.translation(player)+'展示并弃掉了'+get.translation(event.card));
+ ui.discardPile.appendChild(event.card);
+ }
+ event.node.delete();
+ },
+ ai:{
+ effect:{
+ target:function(card,player){
+ if(get.tag(card,'respond')&&player.num('h')>1) return [1,0.2];
+ }
+ }
+ }
+ },
+ rejianxiong:{
+ trigger:{player:'damageEnd'},
+ direct:true,
+ content:function(){
+ "step 0"
+ if(get.itemtype(trigger.cards)=='cards'&&get.position(trigger.cards[0])=='d'){
+ player.chooseControl('rejianxiong_mopai','rejianxiong_napai','cancel').ai=function(){
+ if(trigger.cards.length==1&&trigger.cards[0].name=='sha') return 0;
+ return 1;
+ };
+ }
+ else{
+ player.chooseControl('rejianxiong_mopai','cancel');
+ }
+ "step 1"
+ if(result.control=='rejianxiong_napai'){
+ player.logSkill('rejianxiong');
+ player.gain(trigger.cards);
+ player.$gain2(trigger.cards);
+ }
+ else if(result.control=='rejianxiong_mopai'){
+ player.logSkill('rejianxiong');
+ player.draw();
+ }
+ },
+ ai:{
+ maixie:true,
+ effect:{
+ target:function(card,player,target){
+ if(player.skills.contains('jueqing')) return [1,-1];
+ if(get.tag(card,'damage')&&player!=target) return [1,1];
+ }
+ }
+ }
+ },
+ reyiji:{
+ trigger:{player:'damageEnd'},
+ frequent:true,
+ filter:function(event){
+ return (event.num>0)
+ },
+ content:function(){
+ "step 0"
+ event.num=1;
+ event.count=1;
+ "step 1"
+ player.gain(get.cards(2));
+ player.$draw(2);
+ "step 2"
+ player.chooseCardTarget({
+ filterCard:true,
+ selectCard:[1,2],
+ filterTarget:function(card,player,target){
+ return player!=target&&target!=event.temp;
+ },
+ ai1:function(card){
+ if(ui.selected.cards.length>0) return -1;
+ return (_status.event.player.num('h')-_status.event.player.hp);
+ },
+ ai2:function(target){
+ return ai.get.attitude(_status.event.player,target)-4;
+ },
+ prompt:'请选择要送人的卡牌'
+ });
+ "step 3"
+ if(result.bool){
+ player.lose(result.cards,ui.special);
+ if(result.targets[0].skills.contains('reyiji2')){
+ result.targets[0].storage.reyiji2=result.targets[0].storage.reyiji2.concat(result.cards);
+ }
+ else{
+ result.targets[0].addSkill('reyiji2');
+ result.targets[0].storage.reyiji2=result.cards;
+ }
+ player.$give(result.cards.length,result.targets[0]);
+ if(num==1){
+ event.temp=result.targets[0];
+ event.num++;
+ event.goto(2);
+ }
+ else if(event.count=4) return [1,get.tag(card,damage)*2];
+ if(target.hp==3) return [1,get.tag(card,damage)*1.5];
+ if(target.hp==2) return [1,get.tag(card,damage)*0.5];
+ }
+ }
+ },
+ threaten:0.6
+ }
+ },
+ reyiji2:{
+ trigger:{player:'phaseDrawBegin'},
+ forced:true,
+ mark:true,
+ popup:'遗计拿牌',
+ content:function(){
+ player.$draw(player.storage.reyiji2.length);
+ player.gain(player.storage.reyiji2);
+ delete player.storage.reyiji2;
+ player.removeSkill('reyiji2');
+ game.delay();
+ },
+ intro:{
+ content:'cardCount'
+ }
+ },
+ yijue:{
+ enable:'phaseUse',
+ usable:1,
+ filterTarget:function(card,player,target){
+ return player!=target&&target.num('h');
+ },
+ filter:function(event,player){
+ return player.num('h')>0;
+ },
+ content:function(){
+ "step 0"
+ player.chooseToCompare(target).small=true;
+ "step 1"
+ if(result.bool){
+ if(target.skills.contains('yijue2')==false){
+ target.disabledSkills.yijue=[];
+ for(var i=0;i0;
+ };
+ }
+ else{
+ event.finish();
+ }
+ "step 2"
+ if(result.bool){
+ target.recover();
+ }
+ },
+ ai:{
+ result:{
+ target:function(player,target){
+ if(target.num('h')>target.hp+1&&ai.get.recoverEffect(target)>0){
+ return 1;
+ }
+ if(player.canUse('sha',target)&&(player.num('h','sha')||player.num('he',{color:'red'}))){
+ return -2;
+ }
+ return -0.5;
+ }
+ },
+ order:9,
+ }
+ },
+ yijue2:{
+ trigger:{global:'phaseAfter'},
+ forced:true,
+ mark:true,
+ content:function(){
+ delete player.disabledSkills.yijue;
+ player.removeSkill('yijue2');
+ },
+ mod:{
+ cardEnabled:function(){
+ return false;
+ },
+ cardUsable:function(){
+ return false;
+ },
+ cardRespondable:function(){
+ return false;
+ },
+ cardSavable:function(){
+ return false;
+ }
+ },
+ intro:{
+ content:function(st,player){
+ var storage=player.disabledSkills.yijue;
+ if(storage&&storage.length){
+ var str='失效技能:';
+ for(var i=0;i1;
+ return 8-ai.get.value(card);
+ };
+ "step 2"
+ if(!result.bool){
+ trigger.directHit=true;
+ }
+ }
+ },
+ retieji2:{
+ trigger:{global:'phaseAfter'},
+ forced:true,
+ content:function(){
+ delete player.disabledSkills.retieji;
+ player.removeSkill('retieji2');
+ },
+ mark:true,
+ intro:{
+ content:function(st,player){
+ var storage=player.disabledSkills.retieji;
+ if(storage&&storage.length){
+ var str='失效技能:';
+ for(var i=0;i2) return current-1;
+ },
+ globalTo:function(from,to,current){
+ if(to.hp<=2) return current+1;
+ },
+ },
+ ai:{
+ threaten:0.8
+ }
+ },
+ qiaomeng:{
+ trigger:{source:'damageEnd'},
+ direct:true,
+ filter:function(event){
+ return event.card&&event.card.name=='sha'&&event.cards&&
+ get.color(event.cards)=='black'&&event.player.num('e');
+ },
+ content:function(){
+ "step 0"
+ player.choosePlayerCard('e',trigger.player);
+ "step 1"
+ if(result.bool){
+ player.logSkill('qiaomeng');
+ trigger.player.discard(result.links[0]);
+ event.card=result.links[0];
+ }
+ else{
+ event.finish();
+ }
+ "step 2"
+ if(get.position(card)=='d'){
+ if(get.subtype(card)=='equip3'||get.subtype(card)=='equip4'){
+ player.gain(card);
+ player.$gain2(card);
+ }
+ }
+ }
+ },
+ rekurou:{
+ enable:'phaseUse',
+ usable:1,
+ filterCard:true,
+ check:function(card){
+ return 9-ai.get.value(card);
+ },
+ position:'he',
+ content:function(){
+ player.loseHp();
+ },
+ ai:{
+ order:9,
+ result:{
+ player:function(player){
+ if(player.hp<=2) return 0;
+ if(player.num('h')+1=4){
+ player.loseMaxHp();
+ }
+ }
+ },
+ jianyan:{
+ enable:'phaseUse',
+ usable:1,
+ content:function(){
+ "step 0"
+ player.chooseControl(['red','black'].concat(get.types())).ai=function(){
+ if(player.num('shan')==0) return 'basic';
+ if(player.num('e')<=1) return 'equip';
+ if(player.num('h')>2) return 'trick';
+ return 'red';
+ };
+ "step 1"
+ var num=20;
+ var card;
+ event.cards=[];
+ while(num--){
+ card=get.cards(0);
+ event.cards.push(card);
+ if(get.color(card)==result.control) break;
+ else if(get.type(card,'trick')==result.control) break;
+ }
+ event.card=card;
+ player.showCards(event.cards);
+ player.chooseTarget(true,'选择一名男性角色送出'+get.translation(event.card),function(card,player,target){
+ return target.sex=='male';
+ });
+ "step 2"
+ result.targets[0].$gain(event.card);
+ for(var i=0;i0;
+ },
+ prepare:function(cards,player,targets){
+ player.$throw(cards);
+ },
+ position:'he',
+ filterCard:{suit:'diamond'},
+ filterTarget:function(card,player,target){
+ if(player!=target) return lib.filter.targetEnabled({name:'lebu'},player,target);
+ return target.num('j','lebu');
+ },
+ check:function(card){
+ return 7-ai.get.value(card);
+ },
+ content:function(){
+ if(target.num('j','lebu')){
+ target.discard(target.get('j','lebu',0));
+ }
+ else{
+ target.addJudge('lebu',cards);
+ }
+ player.draw();
+ },
+ ai:{
+ result:{
+ target:function(player,target){
+ if(target.num('j','lebu')) return -ai.get.effect(target,{name:'lebu'},player,target);
+ return ai.get.effect(target,{name:'lebu'},player,target);
+ }
+ },
+ order:9,
+ }
+ },
+ fenwei:{
+ unique:true,
+ mark:true,
+ trigger:{global:'useCard'},
+ priority:5,
+ filter:function(event,player){
+ if(get.info(event.card).multitarget) return false;
+ if(event.targets.length<2) return false;
+ if(player.storage.fenwei) return false;
+ return true;
+ },
+ init:function(player){
+ player.storage.fenwei=false;
+ },
+ direct:true,
+ content:function(){
+ "step 0"
+ player.chooseTarget('选择令'+get.translation(trigger.card)+'无效的目标',
+ [1,trigger.targets.length],function(card,player,target){
+ return trigger.targets.contains(target);
+ }).ai=function(target){
+ if(game.phaseNumber>game.players.length*2&&trigger.targets.length>=game.players.length-1){
+ return -ai.get.effect(target,trigger.card,trigger.player,player);
+ }
+ return -1;
+ };
+ "step 1"
+ if(result.bool){
+ player.unmarkSkill('fenwei');
+ player.logSkill('fenwei',result.targets);
+ player.storage.fenwei=true;
+ for(var i=0;i0;
+ },
+ filterCard:true,
+ position:'he',
+ selectTarget:[1,Infinity],
+ check:function(card){
+ if(get.suit(card)=='spade') return 8-ai.get.value(card);
+ return 5-ai.get.value(card);
+ },
+ content:function(){
+ "step 0"
+ if(num==0&&get.suit(cards[0])=='spade') player.draw();
+ player.choosePlayerCard(targets[num],'he',true);
+ "step 1"
+ if(result.bool){
+ if(result.links.length) targets[num].discard(result.links[0]);
+ if(get.suit(result.links[0])=='spade') targets[num].draw();
+ }
+ },
+ ai:{
+ result:{
+ target:-1
+ },
+ threaten:1.2,
+ order:3
+ }
+ },
+ xunxun:{
+ trigger:{player:'phaseDrawBefore'},
+ frequent:true,
+ content:function(){
+ "step 0"
+ event.cards=get.cards(4);
+ player.chooseCardButton(event.cards,2,true,'选择获得两张牌').ai=ai.get.buttonValue;
+ trigger.untrigger();
+ trigger.finish();
+ "step 1"
+ var choice=[];
+ for(var i=0;i-3;
+ return ai.get.attitude(player,event.player)>-3;
+ },
+ content:function(){
+ "step 0"
+ game.asyncDraw([trigger.player,trigger.source],trigger.num);
+ "step 1"
+ game.delay();
+ }
+ }
+ },
+ translate:{
+ re_zhangliao:'张辽',
+ re_huangyueying:'黄月英',
+ re_simayi:'司马懿',
+ re_xuzhu:'许褚',
+ re_xiahoudun:'夏侯惇',
+ re_lvmeng:'吕蒙',
+ re_zhouyu:'周瑜',
+ re_luxun:'陆逊',
+ re_zhaoyun:'赵云',
+ re_guanyu:'关羽',
+ re_zhangfei:'张飞',
+ re_machao:'马超',
+ re_caocao:'曹操',
+ re_guojia:'郭嘉',
+ re_lvbu:'吕布',
+ re_xushu:'徐庶',
+ re_huanggai:'黄盖',
+ re_gongsunzan:'公孙瓒',
+ re_daqiao:'大乔',
+ re_ganning:'甘宁',
+ re_huatuo:'华佗',
+ re_lidian:'李典',
+ qinxue:'勤学',
+ retuxi:'突袭·新',
+ reluoyi:'裸衣·新',
+ reluoyi2:'裸衣·新',
+ reganglie:'刚烈·新',
+ qingjian:'清俭',
+ reyingzi:'英姿·新',
+ refanjian:'反间·新',
+ refanjian_card:'弃牌',
+ refanjian_hp:'流失体力',
+ reqianxun:'谦逊·新',
+ reqianxun2:'谦逊·新',
+ relianying:'连营·新',
+ retishen:'替身',
+ retishen2:'替身',
+ reyajiao:'涯角',
+ rejianxiong:'奸雄·新',
+ rejianxiong_mopai:'摸牌',
+ rejianxiong_napai:'拿牌',
+ reyiji:'遗计·新',
+ reyiji2:'遗计·新',
+ yijue:'义绝',
+ yijue2:'义绝',
+ retieji:'铁骑·新',
+ retieji2:'铁骑·新',
+ refankui:'反馈·新',
+ reyicong:'义从',
+ qiaomeng:'趫猛',
+ rekurou:'苦肉·新',
+ zhaxiang:'诈降',
+ zhaxiang2:'诈降',
+ zhuhai:'诛害',
+ qianxin:'潜心',
+ jianyan:'荐言',
+ reguicai:'鬼才·新',
+ xunxun:'恂恂',
+ wangxi:'忘隙',
+ reguose:'国色·新',
+ fenwei:'奋威',
+ chulao:'除痨',
+ rejizhi:'集智',
+// rejizhi_info:'当你使用一张装备牌或锦囊牌时,你可以展示牌堆顶牌,若该牌为基本牌,将之置入弃牌堆或用一张手牌与之交换;若不为基本牌,则将之收入手牌。',
+ rejizhi_info:'当你使用一张装备牌或锦囊牌时,你可以摸一张牌并展示之,若此牌是基本牌,你须弃置一张手牌',
+ xunxun_info:'摸牌阶段,你可以放弃摸牌,改为观看牌堆顶的四张牌,然后获得其中的两张牌,将其余的牌以任意顺序置于牌堆底。',
+ wangxi_info:'每当你对其他角色造成1点伤害后,或受到其他角色造成的1点伤害后,你可与该角色各摸一张牌。',
+ reguose_info:'出牌阶段限一次,你可以选择一项:将一张方片花色牌当做【乐不思蜀】使用;或弃置一张方片花色牌并弃置场上的一张【乐不思蜀】。选择完成后,你摸一张牌。',
+ fenwei_info:'当一名角色使用的锦囊牌指定了至少两名角色为目标时,你可以令此牌对其中任意名角色无效。',
+ chulao_info:'出牌阶段限一次,若你有牌,你可以选择任意名势力各不相同的其他角色,你弃置你和这些角色的各一张牌。然后以此法弃置黑桃牌的角色各摸一张牌。',
+ reguicai_info:'在任意角色的判定牌生效前,你可以打出一张牌代替之',
+ zhuhai_info:'一名其他角色的结束阶段开始时,若该角色本回合造成过伤害,你可以对其使用一张【杀】。',
+ qianxin_info:'觉醒技,当你造成一次伤害后,若你已受伤,你须减1点体力上限,并获得技能“荐言”。',
+ jianyan_info:'出牌阶段限一次,你可以声明一种牌的类别或颜色,然后连续亮出牌堆顶的牌,直到亮出符合你声明的牌为止,选择一名男性角色,该角色获得此牌,再将其余以此法亮出的牌置入弃牌堆。',
+ rekurou_info:'出牌阶段限一次,你可以弃置一张牌,然后失去1点体力。',
+ zhaxiang_info:'锁定技 每当你失去1点体力后,你摸三张牌。然后若此时是你的出牌阶段,则直到回合结束,你使用红色【杀】无距离限制且不能被【闪】响应,你可以额外使用一张【杀】。',
+ qiaomeng_info:'每当你使用黑色【杀】对一名角色造成伤害后,你可以弃置该角色装备区里的一张牌,若此牌是坐骑牌,你于此牌置入弃牌堆时获得之。',
+ reyicong_info:'锁定技,只要你的体力值大于2点,你计算与其他角色的距离时,始终-1;只要你的体力值为2点或更低,其他角色计算与你的距离时,始终+1。',
+ refankui_info:'每当你受到1点伤害后,你可以获得伤害来源的一张牌。',
+ retieji_info:'当你使用【杀】指定一名角色为目标后,你可以进行一次判定并令该角色的非锁定技失效直到回合结束,除非该角色弃置一张与判定结果花色相同的牌,否则不能使用【闪】抵消此【杀】。',
+ yijue_info:'出牌阶段限一次,你可以与一名其他角色拼点,若你赢,则直到回合结束,该角色不能使用或打出手牌且其非锁定技失效,若你没赢,你可令该角色回复一点体力。',
+ reyiji_info:'每当你受到1点伤害后,你可以摸两张牌。然后你可以在至多两名角色的武将牌旁边分别扣置至多两张手牌,这些角色的下个摸牌阶段开始时,该角色获得其武将牌旁的这些牌。',
+ rejianxiong_info:'每当你受到伤害后,你可以选择一项:摸一张牌,或获得对你造成伤害的牌。',
+ reyajiao_info:'每当你于回合外使用或打出一张手牌时,你可以亮出牌堆顶的一张牌,若此牌与你此次使用或打出的牌类别相同,你可以将之交给任意一名角色;若不同则你可以将之置入弃牌堆。',
+ retishen_info:'限定技,准备阶段开始时,你可以将体力回复至等同于你上回合结束时的体力值,然后你每以此法回复1点体力,便摸一张牌。',
+ reqianxun_info:'每当一张延时类锦囊牌或其他角色使用的非延时类锦囊牌生效时,若你是此牌的唯一目标,你可以将所有手牌置于你的武将牌上,若如此做,此回合结束时,你获得你武将牌上的所有牌。',
+ relianying_info:'当你失去最后的手牌时,你可以令至多X名角色各摸一张牌(X为你此次失去的手牌数)。',
+ reyingzi_info:'锁定技,摸牌阶段摸牌时,你额外摸一张牌;你的手牌上限不会因体力值的减少而减少。',
+ refanjian_info:'出牌阶段限一次,你可以展示一张手牌并将此牌交给一名其他角色。然后该角色选择一项:展示其手牌并弃置所有与此牌花色相同的牌,或是去一点体力。',
+ qingjian_info:'每当你于摸牌阶段外获得牌时,你可以将其中任意牌以任意顺序交给其他角色',
+ qinxue_info:'觉醒技,准备阶段开始时,若你的手牌数比体力值多3(人数不少于7时改为2)或更多,你须减一点体力上限并获得技能【攻心】',
+ retuxi_info:'摸牌阶段摸牌时,你可以少摸任意张牌,然后选择等量的手牌数大于或等于你的其他角色,获得这些角色的各一张手牌。',
+ reluoyi_info:'你可以跳过摸牌阶段,然后展示牌堆顶的三张牌,获得其中的基本牌、武器牌和【决斗】,若如此做,直到你的下回合开始,你为伤害来源的【杀】或【决斗】造成的伤害+1。',
+ reganglie_info:'每当你受到1点伤害后,可进行一次判定,若结果为红色,你对伤害来源造成1点伤害,若结果为黑色,你弃置其一张牌。'
+ },
+}
diff --git a/character/sp.js b/character/sp.js
new file mode 100644
index 000000000..8b0392394
--- /dev/null
+++ b/character/sp.js
@@ -0,0 +1,2755 @@
+character.sp={
+ character:{
+ yangxiu:['male','wei',3,['jilei','danlao'],['fullskin']],
+ chenlin:['male','wei',3,['bifa','songci'],['fullskin']],
+ caohong:['male','wei',4,['yuanhu'],['fullskin']],
+ xiahouba:['male','shu',4,['baobian'],['fullskin']],
+ gongsunzan:['male','qun',4,['yicong'],['fullskin']],
+ yuanshu:['male','qun',4,['yongsi'],['fullskin']],
+ sp_diaochan:['female','qun',3,['lihun','biyue'],['fullskin']],
+ sp_zhaoyun:['male','qun',3,['longdan','chongzhen'],['fullskin']],
+ jsp_zhaoyun:['male','qun',3,['chixin','yicong','suiren'],['fullskin']],
+ liuxie:['male','qun',3,['tianming','mizhao'],['fullskin']],
+ zhugejin:['male','wu',3,['hongyuan','huanshi','mingzhe'],['fullskin']],
+ zhugeke:['male','wu',3,['aocai','duwu'],['fullskin']],
+ guanyinping:['female','shu',3,['huxiao','xueji','wuji'],['fullskin']],
+ simalang:['male','wei',3,['junbing','quji'],['fullskin']],
+ zhangxingcai:['female','shu',3,['shenxian','qiangwu'],['fullskin']],
+ fuwan:['male','qun',4,['moukui'],['fullskin']],
+ sp_sunshangxiang:['female','shu',3,['liangzhu','xiaoji'],['fullskin']],
+ caoang:['male','wei',4,['kaikang'],['fullskin']],
+ re_yuanshu:['male','qun',4,['wangzun','tongji'],['fullskin']],
+ sp_caoren:['male','wei',4,['kuiwei','yanzheng'],['fullskin']],
+ zhangbao:['male','qun',3,['zhoufu','yingbin'],['fullskin']],
+ maliang:['male','shu',3,['xiemu','naman'],['fullskin']],
+ sp_pangtong:['male','qun',3,['manjuan','zuixiang'],['fullskin']],
+ zhugedan:['male','wei',4,['gongao','juyi'],['fullskin']],
+ sp_jiangwei:['male','shu',4,['kunfen','fengliang'],['fullskin']],
+ sp_machao:['male','qun',4,['zhuiji','cihuai'],['fullskin']],
+ sunhao:['male','wu',5,['canshi','chouhai'],['fullskin']],
+ },
+ skill:{
+ canshi:{
+ trigger:{player:'phaseDrawBefore'},
+ check:function(event,player){
+ var num=0;
+ for(var i=0;i3) return true;
+ }
+ }
+ return false;
+ },
+ prompt:function(){
+ var num=0;
+ for(var i=0;i0){
+ player.draw(num);
+ }
+ player.addTempSkill('canshi2','phaseAfter');
+ }
+ },
+ canshi2:{
+ trigger:{player:'useCard'},
+ forced:true,
+ filter:function(event,player){
+ if(player.num('he')==0) return false;
+ var type=get.type(event.card,'trick');
+ return type=='basic'||type=='trick';
+ },
+ content:function(){
+ game.delay(0.5);
+ player.chooseToDiscard(true,'he');
+ }
+ },
+ chouhai:{
+ trigger:{player:'damageBegin'},
+ forced:true,
+ filter:function(event,player){
+ return player.num('h')==0;
+ },
+ content:function(){
+ trigger.num++;
+ },
+ ai:{
+ effect:{
+ target:function(card,player,target,current){
+ if(get.tag(card,'damage')&&target.num('h')==0) return [1,-2];
+ }
+ }
+ }
+ },
+ kunfen:{
+ trigger:{player:'phaseEnd'},
+ direct:true,
+ check:function(event,player){
+ if(player.hp>2) return true;
+ if(player.hp==2&&player.num('h')==0) return true;
+ return false;
+ },
+ content:function(){
+ "step 0"
+ if(player.storage.kunfen){
+ player.chooseBool('是否发动【困奋】?').ai=function(){
+ if(player.hp>3) return true;
+ if(player.hp==3&&player.num('h')<3) return true;
+ if(player.hp==2&&player.num('h')==0) return true;
+ return false;
+ }
+ }
+ else{
+ event.forced=true;
+ }
+ "step 1"
+ if(event.forced||result.bool){
+ player.logSkill('kunfen');
+ player.loseHp();
+ }
+ else{
+ event.finish();
+ }
+ "step 2"
+ player.draw(2);
+ },
+ ai:{
+ threaten:1.5
+ }
+ },
+ fengliang:{
+ unique:true,
+ trigger:{player:'dying'},
+ priority:10,
+ forced:true,
+ filter:function(event,player){
+ return !player.storage.kunfen;
+ },
+ content:function(){
+ "step 0"
+ player.loseMaxHp();
+ "step 1"
+ if(player.hp<2){
+ player.recover(2-player.hp);
+ }
+ "step 2"
+ player.addSkill('tiaoxin');
+ player.storage.kunfen=true;
+ },
+ },
+ zhuiji:{
+ mod:{
+ globalFrom:function(from,to){
+ if(from.hp>to.hp) return -Infinity;
+ }
+ }
+ },
+ cihuai:{
+ trigger:{player:'phaseUseBegin'},
+ direct:true,
+ filter:function(event,player){
+ return player.num('h','sha')==0;
+ },
+ content:function(){
+ "step 0"
+ player.chooseTarget('是否发动【刺槐】?',function(card,player,target){
+ return player.canUse({name:'sha'},target);
+ }).ai=function(target){
+ return ai.get.effect(target,{name:'sha'},player,player);
+ }
+ "step 1"
+ if(result.bool){
+ player.logSkill('cihuai');
+ player.showHandcards();
+ player.useCard({name:'sha'},result.targets);
+ }
+ },
+ ai:{
+ expose:0.2,
+ }
+ },
+ jilei:{
+ trigger:{player:'damageEnd'},
+ priority:9,
+ check:function(event,player){
+ return ai.get.attitude(player,event.source)<0;
+ },
+ filter:function(event){
+ return event&&event.source;
+ },
+ content:function(){
+ trigger.source.addSkill('jilei2');
+ },
+ ai:{
+ threaten:0.6
+ }
+ },
+ jilei2:{
+ unique:true,
+ trigger:{global:'phaseAfter'},
+ forced:true,
+ priority:10,
+ mod:{
+ cardEnabled:function(){
+ return false;
+ },
+ cardUsable:function(){
+ return false;
+ },
+ cardRespondable:function(){
+ return false;
+ },
+ cardSavable:function(){
+ return false;
+ }
+ },
+ content:function(){
+ player.removeSkill('jilei2')
+ },
+ },
+ danlao:{
+ inherit:'mufeng'
+ },
+ taichen:{
+ enable:'phaseUse',
+ usable:1,
+ filterTarget:function(card,player,target){
+ return player.canUse('sha',target);
+ },
+ content:function(){
+ "step 0"
+ player.loseHp();
+ "step 1"
+ player.useCard({name:'sha'},target,false);
+ },
+ ai:{
+ order:1,
+ result:{
+ target:function(player,target){
+ if(player.hp>2&&player.hp>target.hp&&target.num('he')<4){
+ return ai.get.effect(target,{name:'sha'},player,target);
+ }
+ return 0;
+ }
+ }
+ }
+ },
+ manjuan:{
+ trigger:{global:'discardAfter'},
+ filter:function(event,player){
+ if(event.player==player) return false;
+ if(!player.num('he')) return false;
+ for(var i=0;imaxval){
+ maxval=tempval;
+ }
+ }
+ maxval+=cards.length-1;
+ player.chooseToDiscard('he',{suit:suits},dialog).ai=function(card){
+ return maxval-ai.get.value(card);
+ };
+ event.cards=cards;
+ }
+ "step 2"
+ if(result.bool){
+ player.logSkill('manjuan');
+ game.log(get.translation(player)+'获得了'+get.translation(event.cards));
+ player.gain(event.cards,'gain2');
+ }
+ },
+ ai:{
+ threaten:1.3
+ }
+ },
+ zuixiang:{
+ unique:true,
+ mark:true,
+ trigger:{player:'phaseBegin'},
+ priority:10,
+ filter:function(event,player){
+ if(player.storage.zuixiang) return false;
+ return true;
+ },
+ check:function(event,player){
+ return player.num('h')0;
+ },
+ direct:true,
+ content:function(){
+ "step 0"
+ player.chooseToDiscard('协穆:是否弃置一张杀并摸两张牌?',{name:'sha'}).ai=function(card){
+ return 9-ai.get.value(card);
+ };
+ "step 1"
+ if(result.bool){
+ player.logSkill('xiemu');
+ player.draw(2);
+ }
+ },
+ ai:{
+ effect:{
+ target:function(card,player,target){
+ if(get.color(card)=='black'&&target.num('h')>0){
+ return [1,0.5];
+ }
+ }
+ }
+ }
+ },
+ spmengjin:{
+ trigger:{player:'shaBegin'},
+ filter:function(event,player){
+ return event.target.num('he')>0;
+ },
+ direct:true,
+ content:function(){
+ "step 0"
+ var att=ai.get.attitude(player,trigger.target);
+ player.choosePlayerCard('是否发动【猛进】?','he',trigger.target).ai=function(button){
+ var val=ai.get.buttonValue(button);
+ if(att>0) return -val;
+ return val;
+ };
+ "step 1"
+ if(result.bool){
+ trigger.target.discard(result.links);
+ player.logSkill('spmengjin',trigger.target);
+ trigger.target.addTempSkill('mengjin2','shaAfter');
+ }
+ },
+ ai:{
+ expose:0.2
+ }
+ },
+ fenxun:{
+ trigger:{player:'shaBefore'},
+ direct:true,
+ filter:function(event,player){
+ return event.targets.length==1;
+ },
+ position:'he',
+ content:function(){
+ "step 0"
+ player.chooseCardTarget({
+ filterCard:true,
+ filterTarget:function(card,player,target){
+ return lib.filter.targetEnabled(trigger.card,player,target)&&target!=trigger.targets[0];
+ },
+ ai1:function(card){
+ return 6-ai.get.value(card);
+ },
+ ai2:function(target){
+ return ai.get.effect(target,trigger.card,player,player);
+ },
+ prompt:'是否发动【奋迅】?'
+ });
+ "step 1"
+ if(result.bool){
+ player.discard(result.cards);
+ trigger.targets.push(result.targets[0]);
+ player.logSkill('fenxun',result.targets);
+ }
+ }
+ },
+ zhoufu:{
+ enable:'phaseUse',
+ usable:1,
+ filterCard:true,
+ filterTarget:function(card,player,target){
+ return player!=target;
+ },
+ content:function(){
+ target.$gain2(cards);
+ target.storage.zhoufu2=cards[0];
+ target.addSkill('zhoufu2');
+ target.storage.zhoufu3=player;
+ ui.special.appendChild(cards[0]);
+ },
+ check:function(card){return 3-ai.get.value(card)},
+ ai:{
+ order:1,
+ result:{
+ player:1
+ }
+ }
+ },
+ zhoufu2:{
+ trigger:{player:'judge'},
+ forced:true,
+ priority:10,
+ mark:'card',
+ content:function(){
+ "step 0"
+ ui.discardPile.appendChild(player.storage.zhoufu2);
+ player.$throw(player.storage.zhoufu2);
+ if(player.storage.zhoufu3.isAlive()&&player.storage.zhoufu3.skills.contains('yingbin')){
+ player.storage.zhoufu3.draw(2);
+ }
+ "step 1"
+ player.judging=player.storage.zhoufu2;
+ trigger.position.appendChild(player.storage.zhoufu2);
+ // trigger.untrigger();
+ game.log(get.translation(player)+'的判定牌改为'+get.translation(player.storage.zhoufu2));
+ player.removeSkill('zhoufu2');
+ delete player.storage.zhoufu2;
+ delete player.storage.zhoufu3;
+ },
+ intro:{
+ content:'card'
+ },
+ group:'zhoufu3'
+ },
+ zhoufu3:{
+ trigger:{player:'phaseEnd'},
+ forced:true,
+ content:function(){
+ player.unmark(player.storage.zhoufu2);
+ if(player.storage.zhoufu3.isAlive()){
+ player.storage.zhoufu3.gain(player.storage.zhoufu2);
+ player.$give(player.storage.zhoufu2,player.storage.zhoufu3);
+ player.removeSkill('zhoufu2');
+ delete player.storage.zhoufu2;
+ delete player.storage.zhoufu3;
+ game.delay();
+ }
+
+ },
+ },
+ yingbin:{},
+ kuiwei:{
+ trigger:{player:'phaseEnd'},
+ check:function(event,player){
+ if(player.isTurnedOver()) return true;
+ var num=0;
+ for(var i=0;i1;
+ },
+ content:function(){
+ "step 0"
+ player.turnOver();
+ "step 1"
+ var num=0;
+ for(var i=0;i=player.num('he')){
+ player.discard(player.get('he'));
+ }
+ else if(num){
+ player.chooseToDiscard(num,true);
+ }
+ player.removeSkill('kuiwei2');
+ }
+ },
+ yanzheng:{
+ enable:'chooseToUse',
+ filter:function(event,player){
+ return player.hp0;
+ },
+ viewAsFilter:function(player){
+ return player.hp0;
+ },
+ filterCard:true,
+ position:'e',
+ viewAs:{name:'wuxie'},
+ prompt:'将一张装备区内的牌当无懈可击使用',
+ check:function(card){return 8-ai.get.equipValue(card)},
+ threaten:1.2
+ },
+ tongji:{
+ global:'tongji2',
+ unique:true,
+ gainnable:true,
+ },
+ tongji2:{
+ mod:{
+ targetEnabled:function(card,player,target){
+ if(player.skills.contains('tongji')) return;
+ if(card.name=='sha'){
+ if(target.skills.contains('tongji')) return;
+ for(var i=0;i=0;
+ },
+ content:function(){
+ "step 0"
+ player.draw();
+ if(trigger.target!=player){
+ player.chooseCard(true,'he','交给'+get.translation(trigger.target)+'一张牌').ai=function(card){
+ if(card.name=='shan') return 1;
+ };
+ }
+ else{
+ event.finish();
+ }
+ "step 1"
+ trigger.target.gain(result.cards);
+ player.$give(result.cards,trigger.target);
+ game.delay();
+ event.card=result.cards[0];
+ if(get.type(event.card)!='equip') event.finish();
+ "step 2"
+ trigger.target.chooseBool('是否装备'+get.translation(event.card)+'?').ai=function(){
+ var current=trigger.target.get('e',{subtype:get.subtype(event.card)});
+ if(current&¤t.length){
+ return ai.get.equipValue(event.card)>ai.get.equipValue(current[0]);
+ }
+ return true;
+ };
+ "step 3"
+ if(result.bool){
+ trigger.target.equip(event.card);
+ }
+ },
+ ai:{
+ threaten:1.1
+ }
+ },
+ liangzhu:{
+ trigger:{global:'recoverAfter'},
+ check:function(event,player){
+ return ai.get.attitude(player,event.player)>=0;
+ },
+ filter:function(event,player){
+ return event.player!=player&&_status.currentPhase==event.player;
+ },
+ content:function(){
+ "step 0"
+ trigger.player.draw();
+ "step 1"
+ player.draw();
+ },
+ ai:{
+ expose:0.2
+ }
+ },
+ mingshi:{
+ trigger:{player:'damageBegin'},
+ direct:true,
+ filter:function(event,player){
+ return event.source&&event.source.hp>player.hp;
+ },
+ content:function(){
+ "step 0"
+ player.chooseToDiscard('是否发动【名士】?',{color:'black'}).ai=function(card){
+ return 9-ai.get.value(card);
+ }
+ "step 1"
+ if(result.bool){
+ trigger.num--;
+ player.logSkill('mingshi');
+ }
+ },
+ ai:{
+ threaten:0.8
+ }
+ },
+ lirang:{
+ trigger:{player:'discardAfter'},
+ filter:function(event,player){
+ for(var i=0;i0;
+ },
+ content:function(){
+ trigger.target.discardPlayerCard(player,true);
+ }
+ },
+ shenxian:{
+ trigger:{global:'discardAfter'},
+ filter:function(event,player){
+ if(event.player==player||_status.currentPhase==player) return false;
+ // if(player.num('h')>=5) return false;
+ for(var i=0;iplayer.storage.qiangwu) return Infinity;
+ }
+ },
+ group:'qiangwu2'
+ },
+ qiangwu2:{
+ trigger:{player:'phaseUseBegin'},
+ forced:true,
+ popup:false,
+ content:function(){
+ delete player.storage.qiangwu;
+ }
+ },
+ zhendu:{
+ trigger:{global:'phaseUseBegin'},
+ filter:function(event,player){
+ return event.player!=player&&player.num('h')>0;
+ },
+ direct:true,
+ content:function(){
+ "step 0"
+ var nono=(Math.abs(ai.get.attitude(player,trigger.player))<3);
+ player.chooseToDiscard('是否发动【鸩毒】?').ai=function(card){
+ if(nono) return -1;
+ if(ai.get.damageEffect(trigger.player,player,player)>0){
+ return 7-ai.get.useful(card);
+ }
+ return -1;
+ }
+ "step 1"
+ if(result.bool){
+ player.logSkill('zhendu');
+ trigger.player.damage();
+ }
+ else{
+ event.finish();
+ }
+ "step 2"
+ trigger.player.useCard({name:'jiu'},trigger.player);
+ },
+ ai:{
+ threaten:2,
+ expose:0.3
+ }
+ },
+ qiluan:{
+ trigger:{source:'dieAfter'},
+ forced:true,
+ priority:-10,
+ content:function(){
+ if(_status.currentPhase!=trigger.player){
+ player.addSkill('qiluan2')
+ }
+ else{
+ player.draw(3);
+ }
+ },
+ },
+ qiluan2:{
+ trigger:{global:'phaseAfter'},
+ forced:true,
+ content:function(){
+ player.draw(3);
+ player.removeSkill('qiluan2');
+ }
+ },
+ shangyi:{
+ enable:'phaseUse',
+ usable:1,
+ filterTarget:function(card,player,target){
+ return player!=target&&target.num('h');
+ },
+ content:function(){
+ "step 0"
+ player.chooseCardButton(target,target.get('h')).filterButton=function(button){
+ return get.color(button.link)=='black';
+ }
+ "step 1"
+ if(result.bool){
+ target.discard(result.links[0]);
+ }
+ },
+ ai:{
+ order:11,
+ result:{
+ target:function(player,target){
+ return -target.num('h');
+ }
+ },
+ threaten:1.1
+ },
+ },
+ shengxi:{
+ trigger:{player:'phaseUseEnd'},
+ frequent:true,
+ filter:function(event,player){
+ return !player.getStat('damage');
+ },
+ content:function(){
+ player.draw(2);
+ }
+ },
+ shoucheng:{
+ trigger:{global:'loseEnd'},
+ check:function(event,player){
+ return ai.get.attitude(player,event.player)>0;
+ },
+ filter:function(event,player){
+ if(event.player.num('h')) return false;
+ if(_status.currentPhase==event.player) return false;
+ if(event.player==player) return false;
+ for(var i=0;i0){
+ num+=2;
+ }
+ if(num>1) return true;
+ }
+ return false;
+ },
+ content:function(){
+ "step 0"
+ var targets=game.players.slice(0);
+ targets.remove(player);
+ targets.sort(lib.sort.seat);
+ event.targets=targets;
+ event.num=0;
+ trigger.untrigger();
+ trigger.finish();
+ "step 1"
+ if(num1){
+ if(game.phaseNumber2) return 0;
+ if(ai.get.attitude(player,target)<5) return 0;
+ }
+ if(ai.get.attitude(player,target)<5) return 0;
+ if(target.hp==1&&target.maxHp>2) return 0.2;
+ if(target==game.me) return 1.2;
+ return 1;
+ }
+ },
+ expose:0.5,
+ threaten:1.5
+ }
+ },
+ fenming:{
+ trigger:{player:'phaseEnd'},
+ check:function(event,player){
+ var num=0;
+ for(var i=0;i0;
+ },
+ filter:function(event,player){
+ return event.player!=player&&player.num('h',{type:'basic'});
+ },
+ direct:true,
+ content:function(){
+ "step 0"
+ var nono=(Math.abs(ai.get.attitude(player,trigger.player))<3);
+ player.chooseToDiscard('是否发动【骁果】?',{type:'basic'}).ai=function(card){
+ if(nono) return 0;
+ if(ai.get.damageEffect(trigger.player,player,player)>0){
+ return 8-ai.get.useful(card);
+ }
+ return 0;
+ }
+ "step 1"
+ if(result.bool){
+ player.logSkill('xiaoguo',trigger.player);
+ trigger.player.chooseToDiscard('he',{type:'equip'}).ai=function(card){
+ if(trigger.player.hp==1) return 10-ai.get.value(card);
+ return 9-ai.get.value(card);
+ }
+ }
+ else{
+ event.finish();
+ }
+ "step 2"
+ if(result.bool){
+ player.draw();
+ }
+ else{
+ trigger.player.damage();
+ }
+ },
+ ai:{
+ expose:0.3,
+ threaten:1.3
+ }
+ },
+ suishi:{
+ trigger:{global:'dying'},
+ forced:true,
+ priority:6,
+ filter:function(event,player){
+ return event.player!=player;
+ },
+ content:function(){
+ player.draw();
+ },
+ group:'suishi2'
+ },
+ suishi2:{
+ trigger:{global:'dieAfter'},
+ forced:true,
+ check:function(){
+ return false;
+ },
+ filter:function(event,player){
+ return event.player!=player;
+ },
+ content:function(){
+ player.loseHp();
+ },
+ },
+ sijian:{
+ trigger:{player:'loseEnd'},
+ direct:true,
+ filter:function(event,player){
+ if(player.num('h')) return false;
+ for(var i=0;i0;
+ }).ai=function(target){
+ return -ai.get.attitude(player,target);
+ }
+ "step 1"
+ if(result.bool){
+ player.logSkill('sijian');
+ event.target=result.targets[0];
+ player.discardPlayerCard(event.target,true);
+ }
+ else{
+ event.finish();
+ }
+ },
+ ai:{
+ expose:0.2,
+ }
+ },
+ quji:{
+ enable:'phaseUse',
+ usable:1,
+ position:'he',
+ filterCard:true,
+ selectCard:function(){
+ var player=_status.event.player;
+ var num=0;
+ for(var i=0;i1) return false;
+ for(var i=0;i-1;
+ if(num==2) return att>0;
+ return att>1;
+ }
+ }
+ return false;
+ },
+ content:function(){
+ "step 0"
+ player.draw();
+ for(var i=0;i=3&&num>=3) return -10;
+ if(lib.config.mode!='versus'){
+ for(var i=0;i=2||target.hp>=target.maxHp-1) return 'draw_card';
+ if(target.hp==2&&target.num('h')==0) return 'draw_card';
+ return 'recover_hp';
+ });
+ }
+ }
+ else{
+ event.finish();
+ }
+ "step 2"
+ if(result.control=='draw_card'){
+ target.draw(2);
+ }
+ else{
+ target.recover();
+ }
+ },
+ ai:{
+ expose:0.1
+ }
+ },
+ shenzhi:{
+ trigger:{player:'phaseBegin'},
+ check:function(event,player){
+ if(player.hp>2) return false;
+ var cards=player.get('h');
+ if(cards.length3) return false;
+ for(var i=0;i7||get.tag(cards[i],'recover')>=1) return false;
+ }
+ return true;
+ },
+ content:function(){
+ "step 0"
+ var cards=player.get('h');
+ event.bool=cards.length>=player.hp;
+ player.discard(cards);
+ "step 1"
+ if(event.bool){
+ player.recover();
+ }
+ }
+ },
+ wuji:{
+ trigger:{player:'phaseEnd'},
+ forced:true,
+ filter:function(event,player){
+ return player.getStat('damage')>=3&&player.skills.contains('huxiao');
+ },
+ content:function(){
+ "step 0"
+ player.removeSkill('huxiao');
+ player.gainMaxHp();
+ "step 1"
+ player.recover();
+ }
+ },
+ xueji:{
+ enable:'phaseUse',
+ usable:1,
+ filter:function(event,player){
+ return player.hp0;
+ },
+ filterTarget:function(card,player,target){
+ return player!=target&&get.distance(player,target,'attack')<=1;
+ },
+ selectTarget:function(){
+ return [1,_status.event.player.maxHp-_status.event.player.hp];
+ },
+ position:'he',
+ filterCard:function(card){
+ return get.color(card)=='red';
+ },
+ check:function(card){
+ return 8-ai.get.useful(card);
+ },
+ content:function(){
+ "step 0"
+ target.damage();
+ "step 1"
+ target.draw();
+ },
+ ai:{
+ order:7,
+ result:{
+ target:function(player,target){
+ return ai.get.damageEffect(target,player);
+ }
+ },
+ threaten:function(player,target){
+ if(target.hp==1) return 2;
+ if(target.hp==2) return 1.5;
+ return 0.5;
+ },
+ maixie:true,
+ effect:{
+ target:function(card,player,target){
+ if(get.tag(card,'damage')){
+ if(target.hp==target.maxHp) return [0,1];
+ }
+ if(get.tag(card,'recover')&&player.hp>=player.maxHp-1) return [0,0];
+ }
+ }
+ }
+ },
+ huxiao:{
+ trigger:{player:'shaMiss'},
+ forced:true,
+ content:function(){
+ player.storage.huxiao++;
+ },
+ check:function(event,player){
+ return player.num('h','sha')>0;
+ },
+ mod:{
+ cardUsable:function(card,player,num){
+ if(card.name=='sha') return num+player.storage.huxiao;
+ }
+ },
+ group:'huxiao2'
+ },
+ huxiao2:{
+ trigger:{player:'phaseUseBegin'},
+ forced:true,
+ popup:false,
+ silent:true,
+ content:function(){
+ player.storage.huxiao=0;
+ },
+ },
+ aocai:{
+ trigger:{player:'chooseToRespondBegin'},
+ frequent:true,
+ filter:function(event,player){
+ if(event.responded) return false;
+ return _status.currentPhase!==player;
+ },
+ content:function(){
+ "step 0"
+ var cards=[];
+ if(ui.cardPile.childNodes.length<2){
+ var discardcards=get.cards(2);
+ for(var i=0;i1){
+ num++;
+ }
+ }
+ }
+ check=(num>=2);
+ }
+ player.chooseTarget('是否发动【弘援】?',[1,2],function(card,player,target){
+ return player!=target;
+ },
+ function(target){
+ if(!check) return 0;
+ return ai.get.attitude(_status.event.player,target);
+ });
+ "step 1"
+ if(result.bool){
+ player.logSkill('hongyuan',result.targets);
+ // for(var i=0;i0;
+ },
+ check:function(event,player){
+ if(ai.get.attitude(player,event.player)<=0) return false;
+ var cards=player.get('he');
+ var judge=event.judge(event.player.judging);
+ for(var i=0;ijudge) return true;
+ }
+ return false;
+ },
+ content:function(){
+ "step 0"
+ var target=trigger.player;
+ var judge=trigger.judge(target.judging);
+ var attitude=ai.get.attitude(target,player);
+ target.choosePlayerCard('请选择代替判定的牌','he','visible',true,player).ai=function(button){
+ var card=button.link;
+ var result=trigger.judge(card)-judge;
+ 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-ai.get.value(card);
+ }
+ else{
+ return get.color(card)=='black'?10:0+ai.get.value(card);
+ }
+ }
+ if(attitude>=0){
+ return get.color(card)=='red'?0:-10+result;
+ }
+ else{
+ return get.color(card)=='black'?0:-10+result;
+ }
+ };
+ "step 1"
+ if(result.bool){
+ event.card=result.buttons[0].link;
+ player.respond(event.card);
+ }
+ else{
+ event.finish();
+ }
+ "step 2"
+ if(result.bool){
+ if(trigger.player.judging.clone) trigger.player.judging.clone.delete();
+ ui.discardPile.appendChild(trigger.player.judging);
+ trigger.player.judging=event.card;
+ game.delay(2);
+ }
+ },
+ ai:{
+ tag:{
+ rejudge:1,
+ }
+ }
+ },
+ mingzhe:{
+ trigger:{player:['useCardAfter','respondAfter','discardAfter']},
+ frequent:true,
+ filter:function(event,player){
+ if(player==_status.currentPhase) return false;
+ if(event.cards){
+ for(var i=0;i1){
+ event.finish();
+ }
+ "step 1"
+ player.addSkill('duwu2');
+ player.loseHp();
+ },
+ ai:{
+ order:2,
+ result:{
+ target:function(player,target){
+ return ai.get.damageEffect(target,player);
+ }
+ },
+ threaten:1.5,
+ expose:0.3
+ }
+ },
+ duwu2:{
+ trigger:{player:'phaseBegin'},
+ forced:true,
+ popup:false,
+ content:function(){
+ player.removeSkill('duwu2');
+ }
+ },
+ yicong:{
+ mod:{
+ globalFrom:function(from,to,current){
+ if(from.hp>2) return current-1;
+ },
+ globalTo:function(from,to,current){
+ if(to.hp<=2) return current+1;
+ },
+ },
+ ai:{
+ threaten:0.8
+ }
+ },
+ yongsi:{
+ group:['yongsi1','yongsi2'],
+ ai:{
+ threaten:2.2
+ }
+ },
+ yongsi1:{
+ trigger:{player:'phaseDrawBegin'},
+ forced:true,
+ content:function(){
+ var list=['wei','shu','wu','qun'],num=0;
+ for(var i=0;itarget.hp){
+ target.chooseToDiscard(2,'he',true);
+ }
+ else{
+ target.draw(2);
+ }
+ target.storage.songci=true;
+ target.mark('songci',{
+ name:'颂词',
+ content:'已发动'
+ });
+ },
+ ai:{
+ order:7,
+ threaten:1.5,
+ result:{
+ target:function(player,target){
+ if(target.num('h')target.hp){
+ if(target.num('h')<=3) return -1;
+ }
+ }
+ }
+ }
+ },
+ baobian:{
+ trigger:{player:['phaseBefore','changeHp']},
+ forced:true,
+ popup:false,
+ unique:true,
+ content:function(){
+ if(!player.storage.baobian){
+ player.storage.baobian=[];
+ if(player.skills.contains('tiaoxin')){
+ player.storage.baobian.push('tiaoxin');
+ }
+ if(player.skills.contains('paoxiao')){
+ player.storage.baobian.push('paoxiao');
+ }
+ if(player.skills.contains('shensu')){
+ player.storage.baobian.push('shensu');
+ }
+ }
+ if(player.storage.baobian.contains('tiaoxin')==false){
+ player.removeSkill('tiaoxin');
+ }
+ if(player.storage.baobian.contains('paoxiao')==false){
+ player.removeSkill('paoxiao');
+ }
+ if(player.storage.baobian.contains('shensu')==false){
+ player.removeSkill('shensu');
+ }
+ if(player.hp<=3){
+ player.addSkill('tiaoxin');
+ }
+ if(player.hp<=2){
+ player.addSkill('paoxiao');
+ }
+ if(player.hp==1){
+ player.addSkill('shensu');
+ }
+ },
+ ai:{
+ maixie:true,
+ effect:{
+ target:function(card,player,target){
+ if(get.tag(card,'damage')){
+ if(target.hp>=4) return [0,1];
+ }
+ if(get.tag(card,'recover')&&player.hp>=player.maxHp-1) return [0,0];
+ }
+ }
+ }
+ },
+ chongzhen:{
+ group:['chongzhen1','chongzhen2'],
+ ai:{
+ mingzhi:false,
+ effect:{
+ target:function(card,player,target,current){
+ if(get.tag(card,'respondShan')||get.tag(card,'respondSha')){
+ if(ai.get.attitude(target,player)<=0){
+ if(current>0) return;
+ if(target.num('h')==0) return 1.6;
+ if(target.num('h')==1) return 1.2;
+ if(target.num('h')==2) return [0.8,0.5,0,-0.5];
+ return [0.4,0.7,0,-0.7];
+ }
+ }
+ },
+ },
+ }
+ },
+ chongzhen1:{
+ trigger:{player:'shaBefore'},
+ filter:function(event,player){
+ if(event.skill!='longdan1') return false;
+ return event.target.num('h')>0;
+ },
+ content:function(){
+ player.gain(trigger.target.get('h').randomGet());
+ trigger.target.$give(1,player);
+ game.delay();
+ }
+ },
+ chongzhen2:{
+ trigger:{player:'respond'},
+ filter:function(event,player){
+ if(event.skill!='longdan2'&&event.skill!='longdan1') return false;
+ return event.source&&event.source.num('h')>0;
+ },
+ content:function(){
+ player.gain(trigger.source.get('h').randomGet());
+ trigger.source.$give(1,player);
+ game.delay();
+ }
+ },
+ lihun:{
+ enable:'phaseUse',
+ usable:1,
+ filterTarget:function(card,player,target){
+ return player!=target&&target.sex=='male';
+ },
+ filterCard:true,
+ position:'he',
+ content:function(){
+ player.gain(target.get('h'));
+ target.$give(target.num('h'),player);
+ player.turnOver();
+ player.addSkill('lihun2');
+ player.storage.lihun=target;
+ },
+ check:function(card){return 8-ai.get.value(card)},
+ ai:{
+ order:10,
+ result:{
+ player:function(player){
+ if(player.classList.contains('turnedover')) return 10;
+ return 0;
+ },
+ target:function(player,target){
+ if(target.num('h')>target.hp) return target.hp-target.num('h');
+ return 0;
+ }
+ },
+ threaten:1.5,
+ effect:{
+ target:function(card){
+ if(card.name=='guiyoujie') return [0,2];
+ }
+ }
+ },
+ },
+ lihun2:{
+ trigger:{player:'phaseUseEnd'},
+ forced:true,
+ popup:false,
+ content:function(){
+ "step 0"
+ player.removeSkill('lihun2');
+ if(player.storage.lihun.classList.contains('dead')){
+ event.finish();
+ }
+ else{
+ player.chooseCard('he',true,player.storage.lihun.hp);
+ }
+ "step 1"
+ player.storage.lihun.gain(result.cards);
+ player.$give(result.cards.length,player.storage.lihun);
+ }
+ },
+ yuanhu:{
+ trigger:{player:'phaseEnd'},
+ direct:true,
+ filter:function(event,player){
+ return player.num('he',{type:'equip'})>0;
+ },
+ content:function(){
+ "step 0"
+ player.chooseCardTarget({
+ filterCard:function(card){
+ return get.type(card)=='equip';
+ },
+ position:'he',
+ filterTarget:function(card,player,target){
+ return !target.get('e',get.subtype(card)[5]);
+ },
+ ai1:function(card){
+ return 6-ai.get.value(card);
+ },
+ ai2:function(target){
+ return ai.get.attitude(player,target)-3;
+ },
+ prompt:'是否发动援护?'
+ });
+ "step 1"
+ if(result.bool){
+ player.logSkill('yuanhu',result.targets);
+ var thisTarget=result.targets[0];
+ var thisCard=result.cards[0];
+ thisTarget.equip(thisCard);
+ event.target=thisTarget;
+ if(thisTarget!=player){
+ player.$give(thisCard,thisTarget);
+ }
+ switch(get.subtype(thisCard)){
+ case 'equip1':
+ for(var i=0;i0&&target.num('j')){
+ return attitude;
+ }
+ return -attitude;
+ };return;
+ case 'equip2':thisTarget.draw();event.finish();return;
+ default:thisTarget.recover();event.finish();return;
+ }
+ }
+ else{
+ event.finish();
+ }
+ "step 2"
+ if(result.targets.length){
+ player.discardPlayerCard(true,result.targets[0],'hej');
+ }
+ },
+ ai:{
+ threaten:1.2
+ }
+ },
+ tianming:{
+ trigger:{target:'shaBegin'},
+ check:function(event,player){
+ var cards=player.get('h');
+ if(cards.length<=2){
+ for(var i=0;iplayers[1].hp&&players[0]!=player){
+ players[0].chooseBool('是否发动天命?');
+ event.player=players[0];
+ }
+ else{
+ event.finish();
+ }
+ "step 1"
+ if(result.bool){
+ player.chooseToDiscard(2,true,'he');
+ player.draw(2);
+ }
+ },
+ ai:{
+ effect:{
+ target:function(card,player,target,current){
+ if(card.name=='sha') return [1,0.5];
+ }
+ }
+ }
+ },
+ mizhao:{
+ enable:'phaseUse',
+ usable:1,
+ filter:function(event,player){
+ return player.num('h')>0;
+ },
+ filterCard:true,
+ selectCard:-1,
+ filterTarget:function(card,player,target){
+ return player!=target;
+ },
+ discard:false,
+ prepare:function(cards,player,targets){
+ player.$give(cards.length,targets[0]);
+ },
+ ai:{
+ order:1,
+ result:{
+ player:0,
+ target:function(player,target){
+ if(player.num('h')>1){
+ return 1;
+ }
+ return -2/(target.num('h')+1);
+ }
+ }
+ },
+ content:function(){
+ "step 0"
+ event.target1=targets[0];
+ targets[0].gain(cards);
+ game.delay(2);
+ for(var i=0;igame.players.length&&player.hp0){
+ player.draw(num);
+ }
+ player.addSkill('benghuai');
+ player.addSkill('weizhong');
+ player.storage.juyi=true;
+ }
+ },
+ weizhong:{
+ trigger:{player:['gainMaxHpEnd','loseMaxHpEnd']},
+ forced:true,
+ content:function(){
+ player.draw();
+ }
+ },
+ chixin:{
+ group:['chixin1','chixin2'],
+ mod:{
+ cardUsable:function(card,player,num){
+ if(card.name=='sha'){
+ return num+20;
+ }
+ },
+ },
+ trigger:{player:'shaBefore'},
+ forced:true,
+ check:function(event,player){
+ return player.num('h','sha')>0;
+ },
+ filter:function(event,player){
+ return _status.currentPhase==player;
+ },
+ content:function(){
+ var target=trigger.target;
+ if(target.skills.contains('chixin3')){
+ target.storage.chixin++;
+ }
+ else{
+ target.storage.chixin=1;
+ target.addTempSkill('chixin3','phaseUseEnd');
+ }
+ }
+ },
+ chixin1:{
+ enable:['chooseToRespond','chooseToUse'],
+ filterCard:{suit:'diamond'},
+ position:'he',
+ viewAs:{name:'sha'},
+ prompt:'将一张♦牌当杀使用或打出',
+ check:function(card){return 5-ai.get.value(card)},
+ ai:{
+ respondSha:true,
+ }
+ },
+ chixin2:{
+ enable:['chooseToRespond'],
+ filterCard:{suit:'diamond'},
+ viewAs:{name:'shan'},
+ position:'he',
+ prompt:'将一张♦牌当闪打出',
+ check:function(card){return 5-ai.get.value(card)},
+ ai:{
+ respondShan:true,
+ effect:{
+ target:function(card,player,target,current){
+ if(get.tag(card,'respondShan')&¤t<0) return 0.8
+ }
+ },
+ }
+ },
+ chixin3:{
+ mod:{
+ targetEnabled:function(card,player,target){
+ if(card.name!='sha') return;
+ if(player==_status.currentPhase&&player.get('s').contains('chixin')){
+ var num=game.checkMod(card,player,1,'cardUsable',player.get('s'))-20;
+ for(var i=0;i1;
+ }
+ }
+ }
+ },
+ suiren:{
+ trigger:{player:'phaseBegin'},
+ check:function(event,player){
+ return player.hp==1||(player.hp==2&&player.num('h')<=1);
+ },
+ direct:true,
+ content:function(){
+ "step 0"
+ var check=(player.hp==1||(player.hp==2&&player.num('h')<=1));
+ player.chooseTarget('是否发动【随仁】?').ai=function(target){
+ if(!check) return 0;
+ return ai.get.attitude(player,target);
+ }
+ "step 1"
+ if(result.bool){
+ player.logSkill('suiren',result.targets);
+ player.removeSkill('yicong');
+ player.gainMaxHp();
+ player.recover();
+ result.targets[0].draw(3);
+ }
+ }
+ }
+ },
+ translate:{
+ chenlin:'陈琳',
+ yuanshu:'袁术',
+ re_yuanshu:'袁术',
+ gongsunzan:'公孙瓒',
+ sp_diaochan:'貂蝉',
+ yangxiu:'杨修',
+ sp_zhaoyun:'赵云',
+ jsp_zhaoyun:'赵云',
+ caohong:'曹洪',
+ liuxie:'刘协',
+ xiahouba:'夏侯霸',
+ zhugejin:'诸葛谨',
+ zhugeke:'诸葛恪',
+ guanyinping:'关银屏',
+ ganfuren:'甘夫人',
+ sunhao:'孙皓',
+ chengyu:'程昱',
+ simalang:'司马朗',
+ tianfeng:'田丰',
+ sp_pangtong:'庞统',
+ maliang:'马良',
+ sp_caoren:'曹仁',
+ yuejin:'乐进',
+ mifuren:'糜夫人',
+ sp_dongzhuo:'董卓',
+ chendong:'陈武董袭',
+ jiangfei:'蒋琬费祎',
+ jiangqing:'蒋钦',
+ hetaihou:'何太后',
+ dingfeng:'丁奉',
+ zhangxingcai:'张星彩',
+ caoang:'曹昂',
+ kongrong:'孔融',
+ fuwan:'伏完',
+ sp_pangde:'庞德',
+ sp_sunshangxiang:'孙尚香',
+ zhugedan:'诸葛诞',
+ sp_machao:'马超',
+ sp_jiangwei:'姜维',
+ zhangbao:'张宝',
+ yangxiou:'杨修',
+ yicong:'义从',
+ mateng:'马腾',
+ yongsi:'庸肆',
+ yongsi1:'庸肆',
+ yongsi2:'庸肆',
+ bifa:'笔伐',
+ bifa2:'笔伐',
+ songci:'颂词',
+ baobian:'豹变',
+ lihun:'离魂',
+ chongzhen:'冲阵',
+ chongzhen1:'冲阵',
+ chongzhen2:'冲阵',
+ yuanhu:'援护',
+ tianming:'天命',
+ mizhao:'密诏',
+ duwu:'黩武',
+ mingzhe:'明哲',
+ huanshi:'缓释',
+ hongyuan:'弘援',
+ aocai:'傲才',
+ aocai2:'傲才',
+ aocai3:'傲才',
+ huxiao:'虎啸',
+ xueji:'血祭',
+ wuji:'武继',
+ shushen:'淑慎',
+ shenzhi:'神智',
+ xiongyi:'雄异',
+ shefu:'设伏',
+ junbing:'郡兵',
+ junbing2:'郡兵',
+ quji:'去疾',
+ sijian:'死谏',
+ suishi:'随势',
+ suishi2:'随势',
+ xiaoguo:'骁果',
+ duanxie:'断绁',
+ fenming:'奋命',
+ guixiu:'闺秀',
+ cunsi:'存嗣',
+ yongjue:'勇决',
+ hengzheng:'横征',
+ shengxi:'生息',
+ shoucheng:'守成',
+ shangyi:'尚义',
+ zhendu:'鸩毒',
+ qiluan:'戚乱',
+ qiluan2:'戚乱',
+ qiluan3:'戚乱',
+ shenxian:'甚贤',
+ qiangwu:'枪舞',
+ moukui:'谋溃',
+ moukui2:'谋溃',
+ lirang:'礼让',
+ mingshi:'名士',
+ liangzhu:'良助',
+ kaikang:'慷忾',
+ wangzun:'妄尊',
+ tongji:'同疾',
+ kuiwei:'溃围',
+ kuiwei2:'溃围',
+ yanzheng:'严整',
+ zhoufu:'咒缚',
+ zhoufu2:'咒缚',
+ zhoufu3:'咒缚',
+ yingbin:'影兵',
+ fenxun:'奋迅',
+ spmengjin:'猛进',
+ xiemu:'协穆',
+ naman:'纳蛮',
+ zuixiang:'醉乡',
+ manjuan:'漫卷',
+ taichen:'抬榇',
+ jilei:'鸡肋',
+ jilei2:'鸡肋',
+ jilei_info:'每当你受到一次伤害,可以令伤害来源不能使用或打出其手牌直到回合结束',
+ danlao:'啖酪',
+ gongao:'功獒',
+ zhuiji:'追击',
+ chouhai:'仇海',
+ chouhai_info:'锁定技,当你每次受到伤害时,若你没有手牌,此伤害+1。',
+ guiming:'归命',
+ guiming_info:'主公技,其他吴势力角色于你的回合内视为已受伤的角色。',
+ chixin:'赤心',
+ chixin1:'赤杀',
+ chixin2:'赤闪',
+ chixin_info:'你可以将♦牌当【杀】或【闪】使用或打出。出牌阶段,你对你攻击范围内的每名角色均可使用一张【杀】。',
+ suiren:'随仁',
+ suiren_info:'限定技,准备阶段开始时,你可以失去技能“义从”,然后加1点体力上限并回复1点体力,再令一名角色摸三张牌。',
+ canshi:'残蚀',
+ canshi2:'残蚀',
+ canshi_info:'摸牌阶段开始时,你可以放弃摸牌,改为摸x张牌(x为已受伤的角色数),若如此做,当你与此回合内使用基本牌或锦囊牌时,你弃置一张牌。',
+ zhuiji_info:'锁定技,你与体力值低于你的角色距离为1。',
+ kunfen:'困奋',
+ kunfen_info:'锁定技,回合结束阶段开始时,你失去1点体力,然后摸两张牌',
+ fengliang:'逢亮',
+ fengliang_info:'觉醒技,当你进入濒死状态时,你减1点体力上限并将体力值回复至2点,然后获得技能挑衅,将困奋改为非锁定技',
+ cihuai:'刺槐',
+ cihuai_info:'出牌阶段开始时,若你手牌中没有杀,你可以展示你的手牌,视为对一名角色使用一张杀',
+ gongao_info:'锁定技,每当一名角色死亡后,你增加一点体力上限,回复一点体力。',
+ juyi:'举义',
+ juyi_info:'觉醒技,准备阶段开始时,若你已受伤且体力上限大于存活角色数,你须将手牌摸至体力上限,然后获得技能“崩坏”和“威重”。',
+ weizhong:'威重',
+ weizhong_info:'锁定技,每当你的体力上限增加或减少时,你摸一张牌。',
+ taichen_info:'出牌阶段限一次,你可以自减一点体力,视为对一名角色使用一张杀(不计入回合内出杀限制)',
+ manjuan_info:'其他角色的卡牌因弃置而进入弃牌堆后,你可以弃置一张花色与之不同的牌,然后获得之',
+ zuixiang_info:'限定技,回合开始阶段开始时,你可以展示牌库顶的3张牌并置于你的武将牌上,你不可使用或打出与该些牌同类的牌,所有同类牌对你无效。之后每个你的回合开始阶段,你须重复展示一次,直至该些牌中任意两张点数相同时,将你武将牌上的全部牌置于你的手上。',
+ naman_info:'你可以获得其他角色打出的杀',
+ xiemu_info:'每当你成为其他角色的黑色牌的目标,可以弃置一张杀并摸两张牌',
+ spmengjin_info:'每当你使用一张杀,可以弃置目标一张牌',
+ fenxun_info:'每当你使用杀且仅指定了一个目标,你可以弃置一张牌并额外指定一个无视距离的目标',
+ yingbin_info:'受到“咒缚”技能影响的角色进行判定时,你可以摸两张牌。',
+ zhoufu_info:'出牌阶段限一次,你可以指定一名其他角色并将一张手牌移出游戏(将此牌置于该角色的武将牌旁)。若如此做,该角色进行判定时,改为将此牌作为判定牌。该角色的回合结束时,若此牌仍在该角色旁,你将此牌收入手牌。',
+ yanzheng_info:'若你的手牌数大于你的体力值,你可以将你装备区内的牌当【无懈可击】使用',
+ kuiwei_info:'回合结束阶段开始时,你可以摸2+X张牌,然后将你的武将牌翻面。在你的下个摸牌阶段开始时,你须弃置X张牌。(X等于当时场上装备区内的武器牌的数量)',
+ tongji_info:'锁定技。若你的手牌数大于你的体力值,则只要你在任一其他角色的攻击范围内,该角色使用【杀】时便不能指定你以外的角色为目标',
+ wangzun_info:'其他角色的回合开始时,你可以摸一张牌,然后令该角色此回合的手牌上限-1;直到你的回合开始,你不能再次发动此技',
+ kaikang_info:'每当你距离1以内的角色成为杀的目标后,你可以摸一张牌。若如此做,你交给其一张牌并展示之,若该牌为装备牌,该角色可以使用此牌。',
+ liangzhu_info:'其他角色在其回合内回复体力时,你可以与其各摸一张牌 ',
+ mingshi_info:'当你即将受到伤害时,若伤害来源的体力值大于你,你可以弃置一张黑色手牌令伤害-1 ',
+ lirang_info:'你可以将你弃置的卡牌交给一名其他角色 ',
+ moukui_info:'当你使用【杀】指定一名角色为目标后,你可以选择一项:摸一张牌,或弃置其一张牌。若如此做,此【杀】被【闪】抵消时,该角色弃置你的一张牌。 ',
+ qiangwu_info:'出牌阶段,你可以进行一次判定。若如此做,则直到回合结束,你使用点数小于判定牌的 【杀】时不受距离限制,且你使用点数大于判定牌的【杀】时不计入出牌阶段的使用次数。',
+ shenxian_info:'你的回合外,每当有其他角色因弃置而失去牌时,若其中有基本牌,你可以摸一张牌。',
+ qiluan_info:'每当你杀死一名角色后,可以在回合结束时摸三张牌。',
+ zhendu_info:'其他角色的出牌阶段开始时,你可以弃置一张手牌,视为该角色使用一张【酒】,然后你对其造成一点伤害。',
+ shangyi_info:'出牌阶段限一次,你可以观看一名其他角色的手牌,然后弃置其中的一张黑色牌',
+ shoucheng_info:'每当一名其他角色在其回合外失去最后的手牌时,你可令该角色摸一张牌。',
+ shengxi_info:'若你于出牌阶段未造成伤害,你可在此阶段结束时摸两张牌。',
+ hengzheng_info:'摸牌阶段开始时,若你的体力值为1或你没有手牌,你可以放弃摸牌,获得每名其他角色区域里的一张牌。',
+ yongjue_info:'每当其他角色于回合内使用一张杀,若目标不是你,你可以获得之(每回合最多能以此法获得一张杀)',
+ cunsi_info:'限定技,出牌阶段,你可以将所有手牌交给一名男性角色,令该角色获得技能【勇决】,然后翻面',
+ guixiu_info:'每当你成为杀的目标,若你的手牌数小于体力值,可以摸一张牌',
+ fenming_info:'结束阶段开始时,若你处于连环状态,你可以弃置处于连环状态的每名角色的一张牌。',
+ duanxie_info:'出牌阶段限一次,你可以令一名其他角色横置武将牌,若如此做,你横置武将牌。',
+ xiaoguo_info:'其他角色的结束阶段开始时,你可以弃置一张基本牌,令该角色选择一项:1.弃置一张装备牌并令你摸一张牌;2.受到你对其造成的1点伤害。',
+ sijian_info:'当你失去最后的手牌时,你可以弃置一名其他角色的一张牌。',
+ suishi_info:'锁定技。当一名其他角色进入濒死状态时,你摸一张牌;其他与你势力相同的角色死亡时,你失去1点体力。',
+ quji_info:'出牌阶段限一次,你可以弃置X张牌(X为你已损失的体力值),然后令至多X名已受伤的角色各回复1点体力。若你以此法弃置的牌中有黑色牌,你失去一点体力。',
+ junbing_info:'一名角色的结束阶段开始时,若其手牌数少于或者等于1,该角色可以摸一张牌。若如此做,该角色须将所有手牌交给你,然后你交给其等量的牌。',
+ shefu_info:'结束阶段开始时,你可以将一张手牌移出游戏,称为“伏兵”。然后为“伏兵”记录一个基本牌或锦囊牌名称(须与其他“伏兵”记录的名称均不同)。你的回合外,当有其他角色使用与你记录的“伏兵”牌名相同的牌时,你可以令此牌无效,然后将该“伏兵”置入弃牌堆。',
+ xiongyi_info:'限定技,出牌阶段,你可以令至多两名角色与你各摸3张牌,若你指定的角色数不超过1,你回复1点体力',
+ shenzhi_info:'回合开始阶段开始时,你可以弃置所有手牌,若你以此法弃置的牌的张数不小于X,你回复1点体力(X为你当前的体力值)。',
+ shushen_info:'当你回复1点体力时,你可以令一名其他角色回复1点体力或摸两张牌',
+ wuji_info:'觉醒技,回合结束阶段开始时,若你于此回合内已造成3点或更多伤害,你加1点体力上限,回复1点体力,然后失去技能“虎啸”。',
+ xueji_info:'出牌阶段,你可弃置一张红色牌并选择你攻击范围内的至多X名其他角色,对这些角色各造成1点伤害(X为你已损失的体力值),然后这些角色各摸一张牌。每阶段限一次。',
+ huxiao_info:'锁定技,你于出牌阶段内每使用一张【杀】被【闪】抵消,你于此阶段内可以额外使用一张【杀】。',
+ aocai_info:'当你于回合外需要使用或打出一张基本牌时,你可以观看牌堆顶的两张牌。若你观看的牌中有此牌,你可以使用打出之。',
+ hongyuan_info:'摸牌阶段摸牌时,你可以少摸一张牌,然后指定至多两名其他角色各摸一张牌。',
+ huanshi_info:'一名角色的判定牌生效前,你可令其观看你的手牌。若如此做,该角色选择你的一张牌,令你打出此牌代替之。',
+ mingzhe_info:'你的回合外,每当你因使用、打出或弃置而失去一张红色牌时,你可以摸一张牌。',
+ duwu_info:'出牌阶段,你可以弃置X张牌对你攻击范围内的一名其他角色造成1点伤害(X为该角色的体力值)。若你以此法令该角色进入濒死状态,则濒死状态结算后你失去1点体力,且本回合不能再发动黩武。',
+ tianming_info:'当你成为【杀】的目标时,你可以弃置两张牌(不足则全弃,无牌则不弃),然后摸两张牌;若此时全场体力值最多的角色仅有一名(且不是你),该角色也可以如此做。',
+ mizhao_info:'出牌阶段,你可以将所有手牌(至少一张)交给一名其他角色。若如此做,你令该角色与你指定的另一名有手牌的角色拼点。视为拼点赢的角色对没赢的角色使用一张【杀】。每阶段限一次。',
+ yuanhu_info:'回合结束阶段开始时,你可以将一张装备牌置于一名角色的装备区里,然后根据此装备牌的种类执行以下效果。武器牌:弃置与该角色距离为1的一名角色区域中的一张牌;防具牌:该角色摸一张牌;坐骑牌:该角色回复1点体力。',
+ lihun_info:'出牌阶段,你可以弃置一张牌并将你的武将牌翻面,若如此做,制定一名男性角色,获得其所有手牌。出牌阶段结束时,你需为该角色每一点体力分配给其一张牌。每回合限一次。',
+ chongzhen_info:'每当你发动“龙胆”使用或打出一张手牌时,你可以立即获得对方的一张手牌。',
+ bifa_info:'回合结束阶段开始时,你可以将一张手牌移出游戏并指定一名其他角色。该角色的回合开始时,其观看你移出游戏的牌并选择一项:交给你一张与此牌同类型的手牌并获得此牌;或将此牌置入弃牌堆,然后失去1点体力。',
+ songci_info:'出牌阶段,你可以选择一项:令一名手牌数小于其体力值的角色摸两张牌;或令一名手牌数大于其体力值的角色弃置两张牌。此技能对每名角色只能使用一次。',
+ yongsi_info:'锁定技,摸牌阶段,你额外摸X张牌,X为场上现存势力数。弃牌阶段,你至少须弃置等同于场上现存势力数的牌(不足则全弃)。',
+ yicong_info:'锁定技,只要你的体力值大于2点,你计算与其他角色的距离时,始终-1;只要你的体力值为2点或更低,其他角色计算与你的距离时,始终+1。',
+ baobian_info:'锁定技,若你的体力值为3或更少,你视为拥有技能“挑衅”;若你的体力值为2或更少;你视为拥有技能“咆哮”;若你的体力值为1,你视为拥有技能“神速”。',
+ },
+}
diff --git a/character/standard.js b/character/standard.js
new file mode 100644
index 000000000..a49ebb7ef
--- /dev/null
+++ b/character/standard.js
@@ -0,0 +1,1426 @@
+character.standard={
+ character:{
+ caocao:['male','wei',4,['hujia','jianxiong'],['zhu','fullskin']],
+ simayi:['male','wei',3,['fankui','guicai'],['fullskin']],
+ xiahoudun:['male','wei',4,['ganglie'],['fullskin']],
+ zhangliao:['male','wei',4,['tuxi'],['fullskin']],
+ xuzhu:['male','wei',4,['luoyi'],['fullskin']],
+ guojia:['male','wei',3,['tiandu','yiji'],['fullskin']],
+ zhenji:['female','wei',3,['luoshen','qingguo'],['fullskin']],
+ liubei:['male','shu',4,['rende','jijiang'],['zhu','fullskin']],
+ guanyu:['male','shu',4,['wusheng'],['fullskin']],
+ zhangfei:['male','shu',4,['paoxiao'],['fullskin']],
+ zhugeliang:['male','shu',3,['guanxing','kongcheng'],['fullskin']],
+ zhaoyun:['male','shu',4,['longdan'],['fullskin']],
+ machao:['male','shu',4,['mashu','tieji'],['fullskin']],
+ huangyueying:['female','shu',3,['jizhi','qicai'],['fullskin']],
+ sunquan:['male','wu',4,['zhiheng','jiuyuan'],['zhu','fullskin']],
+ ganning:['male','wu',4,['qixi'],['fullskin']],
+ lvmeng:['male','wu',4,['keji'],['fullskin']],
+ huanggai:['male','wu',4,['kurou'],['fullskin']],
+ zhouyu:['male','wu',3,['yingzi','fanjian'],['fullskin']],
+ daqiao:['female','wu',3,['guose','liuli'],['fullskin']],
+ luxun:['male','wu',3,['qianxun','lianying'],['fullskin']],
+ sunshangxiang:['female','wu',3,['xiaoji','jieyin'],['fullskin']],
+ huatuo:['male','qun',3,['qingnang','jijiu'],['fullskin']],
+ lvbu:['male','qun',4,['wushuang'],['fullskin']],
+ diaochan:['female','qun',3,['lijian','biyue'],['fullskin']],
+ },
+ skill:{
+ hujia:{
+ unique:true,
+ trigger:{player:'chooseToRespondBegin'},
+ filter:function(event,player){
+ if(player.identity!='zhu') return false;
+ if(event.filterCard({name:'shan'})==false) return false;
+ for(var i=0;i2)){
+ var next=event.current.chooseToRespond('是否替'+get.translation(player)+'打出一张闪?',{name:'shan'});
+ next.ai=function(){
+ var event=_status.event;
+ return (ai.get.attitude(event.player,event.source)-2);
+ };
+ next.autochoose=lib.filter.autoRespondShan;
+ next.source=player;
+ }
+ }
+ "step 1"
+ if(result.bool){
+ event.finish();
+ trigger.result=result;
+ trigger.responded=true;
+ trigger.animate=false;
+ if(typeof event.current.ai.shown=='number'&&event.current.ai.shown<0.95){
+ event.current.ai.shown+=0.3;
+ if(event.current.ai.shown>0.95) event.current.ai.shown=0.95;
+ }
+ }
+ else{
+ event.current=event.current.next;
+ event.goto(0);
+ }
+ },
+ },
+ jianxiong:{
+ trigger:{player:'damageEnd'},
+ filter:function(event,player){
+ return get.itemtype(event.cards)=='cards'&&get.position(event.cards[0])=='d';
+ },
+ content:function(){
+ player.gain(trigger.cards);
+ player.$gain2(trigger.cards);
+ },
+ ai:{
+ maixie:true,
+ effect:{
+ target:function(card,player){
+ if(player.skills.contains('jueqing')) return [1,-1];
+ if(get.tag(card,'damage')) return [1,0.5];
+ }
+ }
+ }
+ },
+ fankui:{
+ trigger:{player:'damageEnd'},
+ direct:true,
+ filter:function(event,player){
+ return (event.source&&event.source.num('he'));
+ },
+ content:function(){
+ "step 0"
+ player.choosePlayerCard(trigger.source,ai.get.buttonValue,'he');
+ "step 1"
+ if(result.bool){
+ player.logSkill('fankui',trigger.source);
+ player.gain(result.buttons[0].link);
+ trigger.source.$give(1,player);
+ }
+ },
+ ai:{
+ result:{
+ target:function(card,player,target){
+ if(player.num('he')>1&&get.tag(card,'damage')){
+ if(player.skills.contains('jueqing')) return [1,-1.5];
+ if(ai.get.attitude(target,player)<0) return [1,1];
+ }
+ }
+ }
+ }
+ },
+ guicai:{
+ trigger:{global:'judge'},
+ direct:true,
+ filter:function(event,player){
+ return player.num('h')>0;
+ },
+ content:function(){
+ "step 0"
+ player.chooseCard('鬼才:请选择代替判定的牌').ai=function(card){
+ var trigger=_status.event.parent._trigger;
+ var player=_status.event.player;
+ var result=trigger.judge(card)-trigger.judge(trigger.player.judging);
+ var attitude=ai.get.attitude(player,trigger.player);
+ if(attitude==0||result==0) return 0;
+ if(attitude>0){
+ return result-ai.get.value(card)/2;
+ }
+ else{
+ return -result-ai.get.value(card)/2;
+ }
+ };
+ "step 1"
+ if(result.bool){
+ player.respond(result.cards);
+ }
+ else{
+ event.finish();
+ }
+ "step 2"
+ if(result.bool){
+ player.logSkill('guicai');
+ if(trigger.player.judging.clone) trigger.player.judging.clone.delete();
+ ui.discardPile.appendChild(trigger.player.judging);
+ trigger.player.judging=result.cards[0];
+ trigger.position.appendChild(result.cards[0]);
+ game.log(get.translation(trigger.player)+'的判定牌改为'+get.translation(result.cards[0]));
+ game.delay(2);
+ }
+ },
+ ai:{
+ tag:{
+ rejudge:1,
+ }
+ }
+ },
+ ganglie:{
+ trigger:{player:'damageEnd'},
+ filter:function(event,player){
+ return (event.source!=undefined);
+ },
+ check:function(event,player){
+ return (ai.get.attitude(player,event.source)<=0);
+ },
+ content:function(){
+ "step 0"
+ player.judge(function(card){
+ if(get.suit(card)=='heart') return -2;
+ return 2;
+ })
+ "step 1"
+ if(result.judge<2){
+ event.finish();return;
+ }
+ trigger.source.chooseToDiscard(2).ai=function(card){
+ return ai.get.unuseful(card)+2.5*(5-get.owner(card).hp);
+ };
+ "step 2"
+ if(result.bool==false){
+ trigger.source.damage();
+ }
+ },
+ ai:{
+ result:{
+ target:function(card,player,target){
+ if(player.skills.contains('jueqing')) return [1,-1];
+ if(get.tag(card,'damage')&&ai.get.damageEffect(target,player,player)>0) return [1,0,0,-1.5];
+ }
+ }
+ }
+ },
+ tuxi:{
+ trigger:{player:'phaseDrawBefore'},
+ direct:true,
+ content:function(){
+ "step 0"
+ var check;
+ var i,num=0;
+ for(i=0;i=2);
+ player.chooseTarget('是否发动突袭?',[1,2],function(card,player,target){
+ return target.num('h')>0&&player!=target;
+ },
+ function(target){
+ if(!check) return 0;
+ return (1-ai.get.attitude(_status.event.player,target));
+ });
+ "step 1"
+ if(result.bool){
+ player.logSkill('tuxi',result.targets);
+ for(var i=0;i0)
+ },
+ content:function(){
+ "step 0"
+ event.cards=get.cards(2*trigger.num);
+ player.gain(event.cards);
+ player.$draw(event.cards.length);
+ "step 1"
+ player.chooseCardTarget({
+ filterCard:function(card){
+ return _status.event.parent.cards.contains(card);
+ },
+ selectCard:[1,event.cards.length],
+ filterTarget:function(card,player,target){
+ return player!=target;
+ },
+ ai1:function(card){
+ if(ui.selected.cards.length>0) return -1;
+ return (_status.event.player.num('h')-_status.event.player.hp);
+ },
+ ai2:function(target){
+ return ai.get.attitude(_status.event.player,target)-4;
+ },
+ prompt:'请选择要送人的卡牌'
+ });
+ "step 2"
+ if(result.bool){
+ result.targets[0].gain(result.cards);
+ player.$give(result.cards.length,result.targets[0]);
+ for(var i=0;i=4) return [1,get.tag(card,'damage')*2];
+ if(target.hp==3) return [1,get.tag(card,'damage')*1.5];
+ if(target.hp==2) return [1,get.tag(card,'damage')*0.5];
+ }
+ }
+ }
+ }
+ },
+ luoshen:{
+ trigger:{player:'phaseBegin'},
+ frequent:true,
+ content:function(){
+ "step 0"
+ if(event.cards==undefined) event.cards=[];
+ player.judge(function(card){
+ if(get.color(card)=='black') return 1.5;
+ return -1.5;
+ },ui.special);
+ "step 1"
+ if(result.judge>0){
+ event.cards.push(result.card);
+ if(lib.config.auto_skill==false){
+ player.chooseBool('是否再次发动?');
+ }
+ else{
+ event._result={bool:true};
+ }
+ }
+ else{
+ for(var i=0;i1) return 0;
+ var player=get.owner(card);
+ if(player.hp==player.maxHp||player.storage.rende<0||player.num('h')<=1){
+ if(ui.selected.cards.length){
+ return -1;
+ }
+ if(player.num('h')>player.hp) return 10-ai.get.value(card);
+ if(player.num('h')>2) return 6-ai.get.value(card);
+ return -1;
+ }
+ return 10-ai.get.value(card);
+ },
+ content:function(){
+ target.gain(cards);
+ game.delay();
+ if(typeof player.storage.rende!='number'){
+ player.storage.rende=0;
+ }
+ if(player.storage.rende>=0){
+ player.storage.rende+=cards.length;
+ if(player.storage.rende>=2){
+ player.recover();
+ player.storage.rende=-1;
+ }
+ }
+ },
+ ai:{
+ order:10,
+ result:{
+ target:function(player,target){
+ var nh=target.num('h');
+ var np=player.num('h');
+ if(player.hp==player.maxHp||player.storage.rende<0||player.num('h')<=1){
+ if(nh>=np-1&&np<=player.hp) return 0;
+ }
+ return Math.max(1,5-nh);
+ }
+ },
+ effect:{
+ target:function(card,player,target){
+ if(player==target&&get.type(card)=='equip'){
+ if(player.num('e',{subtype:get.subtype(card)})){
+ for(var i=0;i0){
+ return 0;
+ }
+ }
+ }
+ }
+ }
+ },
+ threaten:0.8
+ }
+ },
+ rende1:{
+ trigger:{player:'phaseUseBegin'},
+ forced:true,
+ popup:false,
+ silent:true,
+ content:function(){
+ player.storage.rende=0;
+ }
+ },
+ jijiang:{
+ unique:true,
+ group:['jijiang1','jijiang2'],
+ },
+ jijiang1:{
+ trigger:{player:'chooseToRespondBegin'},
+ filter:function(event,player){
+ if(player.identity!='zhu') return false;
+ if(event.filterCard({name:'sha'})==false) return false;
+ for(var i=0;i0.95) event.current.ai.shown=0.95;
+ }
+ }
+ else{
+ event.current=event.current.next;
+ event.goto(0);
+ }
+ }
+ },
+ jijiang2:{
+ enable:'phaseUse',
+ filter:function(event,player){
+ if(player!=game.zhu) return false;
+ if(player!=game.me&&player.skills.contains('jijiang3')) return false;
+ for(var i=0;i0.95) event.current.ai.shown=0.95;
+ }
+ }
+ else{
+ event.current=event.current.next;
+ event.goto(0);
+ }
+ },
+ ai:{
+ result:{
+ target:function(player,target){
+ if(player.skills.contains('jijiang3')) return 0;
+ return ai.get.effect(target,{name:'sha'},player,target);
+ }
+ },
+ order:function(){
+ return lib.card.sha.ai.order-0.1;
+ },
+ }
+ },
+ jijiang3:{},
+ wusheng:{
+ enable:['chooseToRespond','chooseToUse'],
+ filterCard:function(card){
+ return get.color(card)=='red';
+ },
+ position:'he',
+ viewAs:{name:'sha'},
+ prompt:'将一张红色牌当杀使用或打出',
+ check:function(card){return 4-ai.get.value(card)},
+ ai:{
+ respondSha:true,
+ }
+ },
+ paoxiao:{
+ mod:{
+ cardUsable:function(card,player,num){
+ if(card.name=='sha') return Infinity;
+ }
+ },
+ },
+ guanxing:{
+ trigger:{player:'phaseBegin'},
+ frequent:true,
+ content:function(){
+ "step 0"
+ if(player.underControl()){
+ game.swapPlayer(player);
+ }
+ if(event.isMine()){
+ ui.auto.hide();
+ event.top=[];
+ event.bottom=[];
+ event.status=true;
+ event.dialog=ui.create.dialog('按顺序选择置于牌堆顶的牌(先选择的在上)',get.cards(Math.min(5,game.players.length)));
+ event.control=ui.create.control('ok','pileTop','pileBottom',function(link){
+ var event=_status.event;
+ if(link=='ok'){
+ var i;
+ for(i=0;i0) return false;
+ if(event.player.group!='wu') return false;
+ return true;
+ },
+ content:function(){
+ player.recover();
+ }
+ },
+ qixi:{
+ enable:'chooseToUse',
+ filterCard:function(card){
+ return get.color(card)=='black';
+ },
+ position:'he',
+ viewAs:{name:'guohe'},
+ prompt:'将一张黑色牌当过河拆桥使用',
+ check:function(card){return 4-ai.get.value(card)}
+ },
+ keji:{
+ trigger:{player:'phaseDiscardBefore'},
+ filter:function(event,player){
+ return (get.cardCount({name:'sha'},player)==0);
+ },
+ content:function(){
+ trigger.untrigger();
+ trigger.finish();
+ }
+ },
+ kurou:{
+ enable:'phaseUse',
+ prompt:'流失1点体力并摸两张牌',
+ content:function(){
+ "step 0"
+ player.loseHp(1);
+ "step 1"
+ player.draw(2);
+ },
+ ai:{
+ basic:{
+ order:1
+ },
+ result:{
+ player:function(player){
+ if(player.num('h')>=player.hp-1) return -1;
+ if(player.hp<3) return -1;
+ return 1;
+ }
+ }
+ }
+ },
+ yingzi:{
+ trigger:{player:'phaseDrawBegin'},
+ frequent:true,
+ content:function(){
+ trigger.num++;
+ },
+ ai:{
+ threaten:1.3
+ }
+ },
+ fanjian:{
+ enable:'phaseUse',
+ usable:1,
+ filter:function(event,player){
+ return player.num('h')>0;
+ },
+ filterTarget:function(card,player,target){
+ return player!=target;
+ },
+ content:function(){
+ "step 0"
+ target.chooseControl('heart2','diamond2','club2','spade2').ai=function(event){
+ //var player=event.parent.player;
+ //var list=[player.get('h',{suit:'heart'}),
+ //player.get('h',{suit:'diamond'}),
+ //player.get('h',{suit:'club'}),
+ //player.get('h',{suit:'spade'})];
+ //for(var i=0;imax){
+ // result=i;
+ // max=list[i];
+ // }
+ //}
+ switch(Math.floor(Math.random()*6)){
+ case 0:return 'heart2';
+ case 1:case 4:case 5:return 'diamond2';
+ case 2:return 'club2';
+ case 3:return 'spade2';
+ }
+ };
+ "step 1"
+ event.choice=result.control;
+ target.popup(event.choice);
+ event.card=player.get('h').randomGet();
+ target.gain(event.card);
+ player.$give(event.card,target);
+ game.delay();
+ "step 2"
+ if(get.suit(event.card)+'2'!=event.choice) target.damage();
+ },
+ ai:{
+ order:1,
+ result:{
+ target:function(player,target){
+ var eff=ai.get.damageEffect(target,player);
+ if(eff>=0) return 1+eff;
+ var value=0,i;
+ var cards=player.get('h');
+ for(i=0;i0){
+ return [0,0.1];
+ }
+ }
+ }
+ return min;
+ }
+ }
+ }
+ },
+ qianxun:{
+ mod:{
+ targetEnabled:function(card,player,target,now){
+ if(card.name=='shunshou'||card.name=='lebu') return false;
+ }
+ },
+ },
+ lianying:{
+ trigger:{player:'loseEnd'},
+ frequent:true,
+ filter:function(event,player){
+ if(player.num('h')) return false;
+ for(var i=0;iplayer.hp)
+ return 8-ai.get.value(card)
+ if(player.hp=target.maxHp) return false;
+ if(target==player) return false;
+ return true;
+ },
+ content:function(){
+ player.recover();
+ target.recover();
+ },
+ ai:{
+ order:7.5,
+ result:{
+ player:function(player){
+ if(player.hpplayer.hp) return 0
+ return -1;
+ },
+ target:4
+ },
+ threaten:2,
+ }
+ },
+ qingnang:{
+ enable:'phaseUse',
+ filterCard:true,
+ usable:1,
+ check:function(card){
+ return 9-ai.get.value(card)
+ },
+ filterTarget:function(card,player,target){
+ if(target.hp>=target.maxHp) return false;
+ return true;
+ },
+ content:function(){
+ target.recover();
+ },
+ ai:{
+ order:9,
+ result:{
+ target:function(player,target){
+ if(target.hp==5) return 5;
+ if(player==target&&player.num('h')>player.hp) return 5;
+ return 2;
+ }
+ },
+ threaten:2
+ }
+ },
+ jijiu:{
+ enable:'chooseToUse',
+ filter:function(event,player){
+ return _status.currentPhase!=player;
+ },
+ filterCard:function(card){
+ return get.color(card)=='red';
+ },
+ position:'he',
+ viewAs:{name:'tao'},
+ prompt:'将一张红色牌当桃使用',
+ check:function(card){return 15-ai.get.value(card)},
+ ai:{
+ threaten:1.5,
+ save:true,
+ }
+ },
+ wushuang:{
+ forced:true,
+ group:['wushuang1','wushuang2']
+ },
+ wushuang1:{
+ trigger:{player:'shaBegin'},
+ forced:true,
+ content:function(){
+ "step 0"
+ var next=trigger.target.chooseToRespond({name:'shan'});
+ next.autochoose=lib.filter.autoRespondShan;
+ next.ai=function(card){
+ if(trigger.target.num('h','shan')>1){
+ return ai.get.unuseful2(card);
+ }
+ return -1;
+ };
+ "step 1"
+ if(result.bool==false){
+ trigger.untrigger();
+ trigger.directHit=true;
+ }
+ }
+ },
+ wushuang2:{
+ trigger:{player:'juedou',target:'juedou'},
+ forced:true,
+ filter:function(event,player){
+ return event.turn!=player;
+ },
+ content:function(){
+ "step 0"
+ var next=trigger.turn.chooseToRespond({name:'sha'});
+ next.autochoose=lib.filter.autoRespondSha;
+ next.ai=function(card){
+ if(ai.get.attitude(trigger.turn,player)<0&&trigger.turn.num('h','sha')>1){
+ return ai.get.unuseful2(card);
+ }
+ return -1;
+ };
+ "step 1"
+ if(result.bool==false){
+ trigger.directHit=true;
+ }
+ },
+ ai:{
+ result:{
+ target:function(card,player,target){
+ if(card.name=='juedou'&&target.num('h')>0) return [1,0,0,-1];
+ }
+ }
+ }
+ },
+ lijian:{
+ enable:'phaseUse',
+ usable:1,
+ filter:function(event,player){
+ var num=0;
+ for(var i=0;i1)
+ },
+ check:function(card){return 10-ai.get.value(card)},
+ filterCard:true,
+ position:'he',
+ filterTarget:function(card,player,target){
+ if(player==target) return false;
+ if(target.sex!='male') return false;
+ if(ui.selected.targets.length==1){
+ return target.canUse({name:'juedou'},ui.selected.targets[0]);
+ }
+ return true;
+ },
+ targetprompt:['先出杀','后出杀'],
+ selectTarget:2,
+ multitarget:true,
+ content:function(){
+ targets[1].useCard({name:'juedou'},targets[0]).animate=false;
+ game.delay(0.5);
+ },
+ ai:{
+ order:8,
+ result:{
+ target:function(player,target){
+ if(ui.selected.targets.length==0){
+ return -3;
+ }
+ else{
+ var num=ui.selected.targets[0].num('h');
+ if(num==0) return 0;
+ if(num==1) return -0.1;
+ return -2;
+ }
+ }
+ },
+ expose:0.4,
+ threaten:3,
+ }
+ },
+ biyue:{
+ trigger:{player:'phaseEnd'},
+ frequent:true,
+ content:function(){
+ player.draw();
+ },
+ },
+ invincible:{
+ trigger:{player:['damageBefore','loseHpBefore','loseMaxHpBefore']},
+ forced:true,
+ popup:false,
+ content:function(){
+ trigger.untrigger();
+ trigger.finish();
+ }
+ }
+ },
+ translate:{
+ caocao:'曹操',
+ simayi:'司马懿',
+ xiahoudun:'夏侯惇',
+ zhangliao:'张辽',
+ xuzhu:'许褚',
+ guojia:'郭嘉',
+ zhenji:'甄姬',
+ liubei:'刘备',
+ guanyu:'关羽',
+ zhangfei:'张飞',
+ zhugeliang:'诸葛亮',
+ zhaoyun:'赵云',
+ machao:'马超',
+ huangyueying:'黄月英',
+ sunquan:'孙权',
+ ganning:'甘宁',
+ lvmeng:'吕蒙',
+ huanggai:'黄盖',
+ zhouyu:'周瑜',
+ daqiao:'大乔',
+ luxun:'陆逊',
+ sunshangxiang:'孙尚香',
+ huatuo:'华佗',
+ lvbu:'吕布',
+ diaochan:'貂蝉',
+
+ hujia:'护驾',
+ jianxiong:'奸雄',
+ fankui:'反馈',
+ guicai:'鬼才',
+ ganglie:'刚烈',
+ tuxi:'突袭',
+ luoyi:'裸衣',
+ luoyi2:'裸衣',
+ tiandu:'天妒',
+ yiji:'遗计',
+ luoshen:'洛神',
+ qingguo:'倾国',
+ rende:'仁德',
+ jijiang:'激将',
+ jijiang1:'激将',
+ jijiang2:'激将',
+ wusheng:'武圣',
+ paoxiao:'咆哮',
+ guanxing:'观星',
+ kongcheng:'空城',
+ longdan:'龙胆',
+ longdan1:'龙胆',
+ longdan2:'龙胆',
+ mashu:'马术',
+ feiying:'飞影',
+ tieji:'铁骑',
+ jizhi:'集智',
+ qicai:'奇才',
+ zhiheng:'制衡',
+ jiuyuan:'救援',
+ qixi:'奇袭',
+ keji:'克己',
+ kurou:'苦肉',
+ yingzi:'英姿',
+ fanjian:'反间',
+ guose:'国色',
+ liuli:'流离',
+ qianxun:'谦逊',
+ lianying:'连营',
+ xiaoji:'枭姬',
+ jieyin:'结姻',
+ qingnang:'青囊',
+ jijiu:'急救',
+ wushuang:'无双',
+ wushuang1:'无双',
+ wushuang2:'无双',
+ lijian:'离间',
+ biyue:'闭月',
+ pileTop:'牌堆顶',
+ pileBottom:'牌堆底',
+ hujia_info:'主公技,魏势力角色可以替你打出[闪]',
+ jianxiong_info:'你可以立即获得对你造成伤害的牌',
+ fankui_info:'当你受到伤害时,可以获得伤害来源的一张牌',
+ guicai_info:'在任意角色的判定牌生效前,你可以打出一张手牌代替之',
+ ganglie_info:'每当你受到一次伤害,可进行一次判定,若结果不为红桃,则伤害来源须弃置两张手牌若受到来自你的一点伤害',
+ tuxi_info:'摸牌阶段,你可以放弃摸牌,并从1~2名其他角色各抽取一张手牌',
+ luoyi_info:'摸牌阶段,你可以少摸一张牌,若如此做,你本回合内[杀]或[决斗]造成的伤害+1',
+ tiandu_info:'你可以立即获得你的判定牌',
+ yiji_info:'每当你受到一点伤害,可以观看牌堆顶的两张牌,并将其交给任意1~名角色',
+ luoshen_info:'回合开始阶段,你可以进行一定判定,若为黑色则可以继续判定,直到出现红色。然后你获得所有黑色的判定牌',
+ qingguo_info:'你可以将一张黑色手牌当[闪]使用或打出',
+ rende_info:'出牌阶段,你可以将任意手牌送给其他角色,若送出的手牌不少于两张,你回复一点体力',
+ jijiang_info:'蜀势力角色可以帮你使用或打出[杀]',
+ wusheng_info:'你可以将一张红色牌当[杀]使用',
+ paoxiao_info:'出牌阶段,你使用[杀]无数量限制',
+ guanxing_info:'回合开始阶段,你可以观看牌堆顶的x张牌,并将其以任意顺序置于牌堆项或牌堆底,x为存活角色个数且不超过5',
+ kongcheng_info:'锁定技,当你没有手牌时,不能成为[杀]或[决斗]的目标',
+ longdan_info:'你可以将[杀]当[闪],或[闪]当[杀]使用或打出',
+ mashu_info:'当计算你与其它角色的距离时,始终-1',
+ feiying_info:'当计算其它角色与你的距离时,始终+1',
+ tieji_info:'当你使用一张[杀]时,可进行一次判定,若为红色则此[杀]不可闪避',
+ jizhi_info:'每当你使用或打出一张非延时锦囊,可以摸一张牌',
+ qicai_info:'锁定技,你使用的锦囊牌无距离限制',
+ zhiheng_info:'出牌阶段,你可以弃置任意张牌并摸等量的牌,每阶段限1次',
+ jiuyuan_info:'锁定技,濒死阶段,吴势力角色对你使用的[桃]额外回复一点体力',
+ qixi_info:'你可以将一张黑色手牌当[过河拆桥]使用',
+ keji_info:'若你在出牌阶段没有使用[杀],则可跳过弃牌阶段',
+ kurou_info:'出牌阶段,你可以流失一点体力并摸两张牌',
+ yingzi_info:'摸牌阶段,你可以额外摸一张牌',
+ fanjian_info:'出牌阶段,你可以令一名角色选择一种花色并展示你的一张手牌,若选择的花色与展示的不同,该角色受到来自你的一点伤害。结算结束后该角色获得展示的牌。每阶段限1次',
+ guose_info:'你可以将一张方片花色的手牌当[乐不思蜀]使用',
+ liuli_info:'当你成为[杀]的目标时,可以弃置一张牌将其转移给攻击范围内的一名其他角色,此角色不能是[杀]的使用者',
+ qianxun_info:'锁定技,你不能成为[顺手牵羊]和[乐不思蜀]的目标',
+ lianying_info:'每当你失去最后一张手牌,可摸一张牌',
+ xiaoji_info:'每当你失去一张装备牌,可以摸两张牌',
+ jieyin_info:'出牌阶段,你可以弃置两张牌并选择1名已经受伤的男性角色,你与其各回复一点体力,每阶段限一次',
+ qingnang_info:'出牌阶段,你可以弃置一张手牌令一名角色回复一点体力,每阶段限一次',
+ jijiu_info:'回合外,你可以将一张红色牌当[桃]使用',
+ wushuang_info:'锁定技,你使用的[杀]或[决斗]需要两张[闪]或[杀]响应',
+ lijian_info:'出牌阶段,你可以弃一张牌,视为一名男性角色对另一名男性角色使用一张[决斗],每阶段限一次',
+ biyue_info:'回合结束阶段,你可以摸一张牌',
+ },
+}
diff --git a/character/swd.js b/character/swd.js
new file mode 100644
index 000000000..74882997f
--- /dev/null
+++ b/character/swd.js
@@ -0,0 +1,7942 @@
+'use strict';
+character.swd={
+ character:{
+ swd_huzhongxian:['male','wu',3,['daofa','xielv','xiangu'],['fullskin']],
+
+ swd_anka:['male','qun',3,['songci','anlianying'],['fullskin']],
+ swd_septem:['male','qun',4,['jiying','liaoyuan','yishan'],['fullskin']],
+ swd_kama:['female','qun',3,['yueren','shangshi'],['fullskin']],
+ swd_miles:['male','qun',4,['aojian','miles_xueyi','mohua2']],
+ swd_nicole:['female','wu',3,['minjing','lingwu','huanjian'],['fullskin']],
+ swd_wangsiyue:['female','wei',3,['duishi','guisi','biyue']],
+ swd_weida:['female','qun',3,['yueren','zhenlie']],
+ swd_xuanyuanjianxian:['male','qun',4,['fengmo','pozhou','huajian'],['fullskin']],
+
+ swd_chenjingchou:['male','wu',3,['youyin','yihua'],['fullskin']],
+ swd_duguningke:['female','qun',3,['lianji','touxi'],['fullskin']],
+ swd_guyue:['male','wei',3,['tiandao','swdqinyin','wangchen'],['fullskin']],
+ swd_tuobayuer:['female','shu',4,['liuhong','poyue','niepan'],['fullskin']],
+ swd_yuwentuo:['male','qun',4,['wushuang','xielei','kunlunjing'],['fullskin']],
+ swd_yuxiaoxue:['female','wei',3,['huanhun','daixing','yinyue'],['fullskin']],
+
+ swd_jiliang:['male','wu',3,['yunchou','gongxin','qimou'],['fullskin']],
+ swd_shuijing:['female','qun',4,['mojian','duoren','duanyue'],['fullskin']],
+ swd_cheyun:['female','wu',3,['shengong','xianjiang3','qiaoxie'],['fullskin']],
+ swd_huanyuanzhi:['male','qun',3,['lanzhi','mufeng','tianshu'],['fullskin']],
+ swd_murongshi:['female','shu',4,['duanyi','guxing'],['fullskin']],
+ swd_jipeng:['male','wu',3,['reyingzi','guozao'],['fullskin']],
+ swd_qi:['male','qun',3,['yaotong','heihuo','pojian'],['fullskin']],
+
+ swd_luchengxuan:['male','wu',4,['ljifeng','lxianglong'],['fullskin']],
+ swd_xiarou:['female','shu',3,['xianghui','huiqi'],['fullskin']],
+ swd_moye:['female','wu',3,['rexue','liuli'],['fullskin']],
+
+ swd_zhaoyun:['male','shu',4,['ningjian','pozhen','tanlin'],['fullskin']],
+ swd_hengai:['female','shu',3,['funiao','ningxian','lingbo'],['fullskin']],
+ swd_duanmeng:['female','shu',4,['jizhan','lieren'],['fullskin']],
+ swd_jiangwu:['male','shu',4,['yijue','dangping'],['fullskin']],
+ swd_tuwei:['male','shu',3,['zhanlu','susheng'],['fullskin']],
+ swd_yeyaxi:['female','shu',3,['rexue','huopu'],['fullskin']],
+
+ swd_muyun:['male','wei',4,['ningjian','polang','jikong'],['fullskin']],
+ swd_lanyin:['female','wei',3,['xingdian','yulin','luomei'],['fullskin']],
+ swd_zhiyin:['female','wei',3,['xuehuang','ningshuang','zhuyu'],['fullskin']],
+ swd_qiner:['female','wei',3,['huanyin','tianhuo','xuanzhou'],['fullskin']],
+ swd_jiuyou:['male','wei',3,['lexue'],['fullskin']],
+ swd_duopeng:['male','wu',3,['luanji','reyingzi'],['fullskin']],
+
+ swd_fengtianling:['male','shu',4,['guiyan','jiang'],['fullskin']],
+ swd_huyue:['female','wu',3,['yunshen','fengming'],['fullskin']],
+ swd_jialanduo:['male','qun',4,['xianyin','mailun'],['fullskin']],
+ swd_rongshuang:['female','wu',3,['suiyan','duanxing'],['fullskin']],
+ swd_zhuoshanzhu:['male','wu',4,['suiyan','wanjun'],['fullskin']],
+ swd_jiting:['female','wei',4,['guanhu','chuanyang'],['fullskin']],
+
+ swd_sikongyu:['male','wu',4,['sliufeng','linyun','hutian'],['fullskin']],
+ swd_muyue:['female','wei',3,['xingzhui','lingxian','shouyin'],['fullskin']],
+ swd_ziqiao:['female','shu',3,['guaili','pingshen','fuyan'],['fullskin']],
+ swd_fengyu:['male','shu',4,['zhenwei','shangxi'],['fullskin']],
+ },
+ skill:{
+ miaobi:{
+ enable:'phaseUse',
+ viewAs:{name:'wugu'},
+ filterCard:{suit:'heart'},
+ filter:function(event,player){
+ return !player.getStat('skill').miaobi&&player.num('h',{suit:'heart'})>0;
+ },
+ check:function(card){
+ return 5-ai.get.value(card);
+ }
+ },
+ huajing:{
+ trigger:{source:'damageEnd'},
+ filter:function(event,player){
+ return event.card&&get.type(event.card,'trick')=='trick'&&player.hp=0) return 0;
+ if(get.population('fan')<3) return 0;
+ return -1;
+ }
+ case 'zhong':{
+ if(get.population('fan')<3) return 0;
+ return -1;
+ }
+ case 'nei':return 0;
+ case 'fan':{
+ if(get.population('fan')==0) return 0;
+ if(get.population('zhong')<2) return 0;
+ return -1;
+ }
+ }
+ }
+ case 'guozhan':{
+ if(player.identity=='unknown') return 0;
+ return get.population(player.identity)>=3?-1:0;
+ }
+ case 'versus':{
+ return -1;
+ }
+ default:{
+ return 0;
+ }
+ }
+ },
+ }
+ }
+ },
+ bingfeng2:{
+ mod:{
+ cardEnabled:function(){
+ return false;
+ },
+ cardUsable:function(){
+ return false;
+ },
+ cardRespondable:function(){
+ return false;
+ },
+ cardSavable:function(){
+ return false;
+ }
+ },
+ trigger:{player:'turnOverAfter'},
+ forced:true,
+ filter:function(event,player){
+ return !player.isTurnedOver();
+ },
+ content:function(){
+ player.removeSkill('bingfeng2');
+ }
+ },
+ yudun:{
+ mod:{
+ cardEnabled:function(card,player){
+ if(get.type(card,'trick')=='trick') return false;
+ },
+ cardRespondable:function(card,player){
+ if(get.type(card,'trick')=='trick') return false;
+ },
+ cardSavable:function(card,player){
+ if(get.type(card,'trick')=='trick') return false;
+ },
+ cardUsable:function(card,player){
+ if(get.type(card,'trick')=='trick') return false;
+ if(card.name=='sha') return Infinity;
+ }
+ },
+ enable:['chooseToUse','chooseToRespond'],
+ filterCard:function(card){
+ return get.type(card,'trick')=='trick';
+ },
+ viewAs:{name:'sha'},
+ check:function(){return 1},
+ ai:{
+ effect:{
+ target:function(card,player,target,current){
+ if(get.tag(card,'respondSha')&¤t<0) return 0.6
+ }
+ },
+ respondSha:true,
+ order:4,
+ useful:-1,
+ value:-1
+ }
+ },
+ guozao:{
+ trigger:{global:'damageEnd'},
+ forced:true,
+ check:function(event,player){
+ for(var i=0;i2&&game.players[i].num('h')==1){
+ return true;
+ }
+ }
+ return false;
+ },
+ filter:function(event,player){
+ if(event.source==player) return false;
+ if(get.distance(player,event.player)>1) return false;
+ for(var i=0;i0;
+ }).ai=function(target){
+ var att=ai.get.attitude(player,target);
+ var hs=target.get('h');
+ var num=hs.length;
+ if(num<=1) return att*2;
+ if(num==2){
+ for(var i=0;i6,target,'raw') return att;
+ }
+ if(target==player){
+ for(var i=0;i<2;i++){
+ if(ai.get.value(cards[i])>6,target,'raw') return -1;
+ }
+ }
+ return att/2;
+ }
+ if(num==3){
+ if(target==player){
+ var num2=0;
+ for(var i=0;i<3;i++){
+ num2+=ai.get.value(cards[i],player,'raw');
+ num2-=ai.get.value(hs[i],player,'raw');
+ }
+ if(num2>0) return 0.5;
+ if(num2<0) return -0.5;
+ }
+ return 0;
+ }
+ return -att/2;
+ };
+ "step 1"
+ if(result.bool){
+ var target=result.targets[0];
+ player.logSkill('guozao',target);
+ var cards=target.get('h');
+ target.lose(cards)._triggered=null;
+ game.log(get.translation(target)+'弃置了'+get.translation(cards)+',并获得三张牌');
+ // target.$draw(3);
+ target.$throw(cards);
+ target.gain(event.cards,'draw')._triggered=null;
+ }
+ else{
+ event.finish();
+ }
+ },
+ ai:{
+ expose:0.1
+ }
+ },
+ heihuo:{
+ enable:'phaseUse',
+ filter:function(event,player){
+ return player.num('h')>0&&player.num('he',{type:'equip'})>0&&!player.skills.contains('heihuo2');
+ },
+ filterCard:function(card){
+ return get.type(card)=='equip';
+ },
+ position:'he',
+ check:function(card){
+ var player=_status.currentPhase;
+ var nh=player.num('h');
+ var pos=get.position(card);
+ if(nh<2) return 0;
+ if(nh>5) return 0;
+ if(nh==5&&pos=='e') return 0;
+ if(player.num('he',{subtype:get.subtype(card)})>1){
+ return 11-ai.get.equipValue(card)+(pos=='e'?0.4:0);
+ }
+ // if(nh==6||(nh==5&&pos=='e')) return 8-ai.get.value(card);
+ return 5.5-ai.get.value(card)+(pos=='e'?0.4:0);
+ },
+ content:function(){
+ "step 0"
+ player.draw(player.num('h'));
+ "step 1"
+ if(player.num('h')>=10){
+ player.damage(3,'fire');
+ player.addTempSkill('heihuo2','phaseAfter');
+ }
+ },
+ ai:{
+ order:10,
+ threaten:1.4,
+ result:{
+ player:1
+ }
+ }
+ },
+ heihuo2:{},
+ yaotong:{
+ group:['yaotong1','yaotong2','yaotong3'],
+ ai:{
+ respondSha:true,
+ respondShan:true
+ },
+ threaten:1.3
+ },
+ yaotong1:{
+ enable:['chooseToRespond','chooseToUse'],
+ filterCard:true,
+ viewAs:{name:'sha'},
+ filter:function(event,player){
+ var num=player.num('h');
+ if(num==0) return false;
+ return num%2==1;
+ },
+ prompt:'将一张手牌当作杀打出',
+ check:function(card){return 6-ai.get.value(card)}
+ },
+ yaotong2:{
+ enable:['chooseToRespond','chooseToUse'],
+ filterCard:true,
+ viewAs:{name:'shan'},
+ filter:function(event,player){
+ var num=player.num('h');
+ if(num==0) return false;
+ return num%2==1;
+ },
+ prompt:'将一张手牌当作闪打出',
+ check:function(card){return 6-ai.get.value(card)}
+ },
+ yaotong3:{
+ enable:'chooseToUse',
+ filterCard:true,
+ viewAs:{name:'wuxie'},
+ filter:function(event,player){
+ var num=player.num('h');
+ if(num==0) return false;
+ return num%2==0;
+ },
+ viewAsFilter:function(player){
+ var num=player.num('h');
+ if(num==0) return false;
+ return num%2==0;
+ },
+ prompt:'将一张手牌当作无懈可击使用',
+ check:function(card){return 7-ai.get.value(card)},
+ },
+ yaotong4:{
+ enable:'chooseToUse',
+ filterCard:true,
+ viewAs:{name:'tao'},
+ filter:function(event,player){
+ var num=player.num('h');
+ if(num==0) return false;
+ return num%2==0;
+ },
+ viewAsFilter:function(player){
+ var num=player.num('h');
+ if(num==0) return false;
+ return num%2==0;
+ },
+ prompt:'将一张手牌当作桃使用',
+ check:function(card){return 9-ai.get.value(card)},
+ },
+ pojian:{
+ trigger:{player:'loseEnd'},
+ filter:function(event,player){
+ if(player.num('h')) return false;
+ for(var i=0;i0;
+ },
+ filterCard:true,
+ position:'he',
+ content:function(){
+ player.addSkill('huajin2');
+ },
+ check:function(card){
+ return 5-ai.get.value(card);
+ },
+ ai:{
+ order:10,
+ result:{
+ player:function(player){
+ if(player.num('h','juedou')) return 1;
+ if(player.num('h','sha')==0) return 0;
+ for(var i=0;i0){
+ return 1;
+ }
+ }
+ return 0;
+ }
+ }
+ }
+ },
+ huajin2:{
+ trigger:{source:'damageBegin'},
+ forced:true,
+ content:function(){
+ trigger.num++;
+ },
+ group:'huajin3'
+ },
+ huajin3:{
+ trigger:{player:'phaseBegin'},
+ forced:true,
+ popup:false,
+ content:function(){
+ player.removeSkill('huajin2');
+ }
+ },
+ yuchen:{
+ trigger:{player:['useCard','respondAfter']},
+ direct:true,
+ filter:function(event,player){
+ if(player==_status.currentPhase) return false;
+ if(event.cards){
+ for(var i=0;i0;
+ }).ai=function(target){
+ return -ai.get.attitude(player,target);
+ };
+ "step 1"
+ if(result.bool){
+ player.logSkill('yuchen',result.targets);
+ player.discardPlayerCard(result.targets[0],true);
+ }
+ },
+ ai:{
+ threaten:0.7
+ }
+ },
+ bingjian:{
+ enable:'phaseUse',
+ usable:1,
+ filter:function(event,player){
+ return player.num('he',{color:'black',name:'sha'})>0;
+ },
+ filterCard:function(card){
+ return card.name=='sha'&&get.color(card)=='black';
+ },
+ filterTarget:function(card,player,target){
+ return player!=target&&target.num('h')>0;
+ },
+ line:'thunder',
+ content:function(){
+ "step 0"
+ target.showHandcards();
+ "step 1"
+ var cards=target.get('h','shan');
+ if(cards.length){
+ target.discard(cards);
+ }
+ else{
+ target.damage('thunder');
+ }
+ },
+ ai:{
+ order:5,
+ result:{
+ target:function(player,target){
+ return ai.get.damageEffect(target,player,target,'thunder');
+ }
+ },
+ expose:0.2
+ }
+ },
+ rumeng:{
+ trigger:{global:'phaseUseBefore'},
+ direct:true,
+ filter:function(event,player){
+ return event.player!=player&&player.num('he',{type:'basic'})2;
+ player.chooseToDiscard(function(card){
+ return get.type(card)!='basic';
+ },'是否对'+get.translation(trigger.player)+'发动【入梦】?','he').ai=function(card){
+ if(yep){
+ return 6-ai.get.value(card);
+ }
+ return 0;
+ }
+ "step 1"
+ if(result.bool){
+ player.logSkill('rumeng',trigger.player);
+ trigger.player.chooseToDiscard({type:'basic'},'入梦:弃置一张基本牌或路过出牌及弃牌阶段').ai=function(card){
+ return 5-ai.get.value(card);
+ }
+ }
+ else{
+ event.finish();
+ }
+ "step 2"
+ if(!result.bool){
+ trigger.untrigger();
+ trigger.finish();
+ trigger.player.skip('phaseDiscard');
+ }
+ },
+ ai:{
+ expose:0.1
+ }
+ },
+ lianda:{
+ trigger:{player:'shaAfter'},
+ direct:true,
+ filter:function(event,player){
+ return event.target.isAlive()&&player.num('he')>0&&!player.skills.contains('lianda2');
+ },
+ content:function(){
+ "step 0"
+ player.chooseToDiscard('he','是否发动【连打】?').ai=function(card){
+ if(ai.get.effect(trigger.target,{name:'sha'},player,player)>0){
+ return 7-ai.get.value(card);
+ }
+ }
+ "step 1"
+ if(result.bool){
+ player.logSkill('lianda');
+ player.addTempSkill('lianda2','phaseAfter');
+ player.useCard({name:'sha'},trigger.target);
+ }
+ }
+ },
+ lianda2:{},
+ huiqi:{
+ trigger:{player:'changeHp'},
+ direct:true,
+ filter:function(event,player){
+ return event.num<0&&player.hp3){
+ return att+Math.max(0,5-target.num('h'));
+ }
+ return att/4;
+ }
+ if(att>3){
+ return att+Math.max(0,5-target.num('h'));
+ }
+ return att;
+ }
+ "step 1"
+ if(result.bool){
+ player.logSkill('huiqi',result.targets);
+ result.targets[0].draw(Math.min(3,player.maxHp-player.hp));
+ }
+ },
+ ai:{
+ expose:0.2,
+ effect:{
+ target:function(card,player,target){
+ if(get.tag(card,'damage')){
+ return [1,0.5];
+ }
+ }
+ }
+ }
+ },
+ xianghui:{
+ enable:'phaseUse',
+ usable:1,
+ filterCard:{color:'red'},
+ filter:function(){
+ var min=game.players[0].hp;
+ for(var i=0;i2){
+ if(player.num('h','shan')||player.num('e','2')||
+ trigger.target.hp==1||player.hp>trigger.target.hp+1){
+ if(!trigger.target.num('h','shan')||trigger.target.num('h')1) return false;
+ if(event.player==player) return false;
+ if(event.cards){
+ for(var i=0;i3){
+ return 100-target.num('h');
+ }
+ return att;
+ }
+ "step 1"
+ if(result.bool){
+ player.logSkill('zhenwei');
+ game.log(get.translation(result.targets[0])+'获得了'+get.translation(event.cards));
+ result.targets[0].gain(event.cards,'gain2');
+ }
+ },
+ ai:{
+ expose:0.1,
+ threaten:1.6
+ }
+ },
+ shangxi:{
+ trigger:{player:'phaseUseBegin'},
+ direct:true,
+ filter:function(event,player){
+ if(player.num('he')==0) return false;
+ for(var i=0;i0;
+ },
+ content:function(){
+ "step 0"
+ player.draw();
+ "step 1"
+ if(player.num('he')){
+ player.chooseCardTarget({
+ position:'he',
+ prompt:'选择一张牌作为“岩”',
+ ai1:function(card){
+ return 8-ai.get.value(card);
+ },
+ ai2:function(target){
+ var eff=-ai.get.damageEffect(target,target,player);
+ return eff+(player==target?2:0);
+ },
+ filterCard:true,
+ filterTarget:function(card,player,target){
+ return !target.skills.contains('fuyan2');
+ }
+ });
+ }
+ else{
+ event.finish();
+ }
+ "step 2"
+ if(result.bool){
+ player.line(result.targets);
+ player.lose(result.cards,ui.special);
+ var target=result.targets[0];
+ target.storage.fuyan2=result.cards[0];
+ target.addSkill('fuyan2');
+ player.$give(result.cards,target);
+ game.log(get.translation(player)+'将'+get.translation(result.cards)+'置于'+get.translation(target)+'的武将牌上');
+ }
+ },
+ ai:{
+ effect:{
+ target:function(card,player){
+ if(get.tag(card,'damage')){
+ if(player.skills.contains('jueqing')) return [1,-2];
+ return 0.7;
+ }
+ }
+ },
+ expose:0.2
+ }
+ },
+ fuyan2:{
+ trigger:{player:'damageBegin'},
+ filter:function(event,player){
+ return event.num>0;
+ },
+ forced:true,
+ mark:'card',
+ content:function(){
+ trigger.num--;
+ player.removeSkill('fuyan2');
+ ui.discardPile.appendChild(player.storage.fuyan2);
+ delete player.storage.fuyan2;
+ },
+ intro:{
+ content:'card'
+ }
+ },
+ pingshen:{
+ trigger:{source:'damageBegin'},
+ forced:true,
+ popup:false,
+ unique:true,
+ silent:true,
+ content:function(){
+ trigger.player.addSkill('pingshen2');
+ trigger.player.storage.pingshen=player;
+ }
+ },
+ pingshen2:{
+ enable:'phaseUse',
+ unique:true,
+ mark:true,
+ init:function(player){
+ player.storage.pingshen2=false;
+ },
+ filter:function(event,player){
+ return !player.storage.pingshen2;
+ },
+ filterCard:true,
+ filterTarget:function(card,player,target){
+ return target==player.storage.pingshen;
+ },
+ selectTarget:-1,
+ position:'he',
+ content:function(){
+ player.storage.pingshen2=true;
+ player.unmarkSkill('pingshen2');
+ player.gain(target.get('h'));
+ target.$give(target.num('h'),player);
+ player.turnOver();
+ player.addSkill('pingshen3');
+ },
+ check:function(card){return 8-ai.get.value(card);},
+ intro:{
+ content:'limited'
+ },
+ ai:{
+ order:10,
+ result:{
+ player:function(player){
+ if(player.classList.contains('turnedover')) return 10;
+ if(ai.get.attitude(player,player.storage.pingshen)>=0){
+ return 0;
+ }
+ if(player.storage.pingshen.num('h')>player.storage.pingshen.hp) return 1;
+ return 0;
+ }
+ },
+ effect:{
+ target:function(card,player,target){
+ if(!target.storage.pingshen2){
+ if(card.name=='guiyoujie') return [0,1];
+ }
+ }
+ }
+ },
+ },
+ pingshen3:{
+ trigger:{player:'phaseUseEnd'},
+ forced:true,
+ popup:false,
+ content:function(){
+ "step 0"
+ player.removeSkill('pingshen3');
+ if(player.storage.pingshen.classList.contains('dead')){
+ event.finish();
+ }
+ else{
+ player.chooseCard('he',true,player.storage.pingshen.hp);
+ }
+ "step 1"
+ player.storage.pingshen.gain(result.cards);
+ player.$give(result.cards.length,player.storage.pingshen);
+ }
+ },
+ guaili:{
+ trigger:{source:'damageBegin'},
+ filter:function(event){
+ return event.card&&event.card.name=='sha';
+ },
+ forced:true,
+ content:function(){
+ trigger.num++;
+ },
+ ai:{
+ threaten:1.2
+ }
+ },
+ xingzhui:{
+ enable:'phaseUse',
+ usable:1,
+ filterCard:true,
+ position:'he',
+ filterTarget:function(card,player,target){
+ return player!=target&&target.num('he')>0;
+ },
+ check:function(card){
+ if(get.type(card)=='equip'){
+ var distance=get.info(card).distance;
+ if(distance){
+ if(distance.attackFrom<0||distance.globalFrom<0) return 10;
+ }
+ }
+ return 7-ai.get.value(card);
+ },
+ content:function(){
+ "step 0"
+ if(!target.num('he')){
+ event.finish();
+ }
+ else{
+ event.type=get.type(cards[0],'trick');
+ var dme=ai.get.damageEffect(target,player,target);
+ target.chooseToDiscard('he',true,'星坠:请弃置一张牌(若不是'+get.translation(event.type)+'牌则受到1点伤害)').ai=function(card){
+ var val=ai.get.value(card);
+ if(get.type(card,'trick')==event.type){
+ return -dme-ai.get.value(card);
+ }
+ return -ai.get.value(card);
+ }
+ }
+ "step 1"
+ if(result.bool){
+ if(get.type(result.cards[0],'trick')!=event.type){
+ target.damage();
+ }
+ }
+ },
+ ai:{
+ order:9,
+ result:{
+ target:function(player,target){
+ return ai.get.damageEffect(target,player)-0.1;
+ }
+ },
+ threaten:2,
+ expose:0.2
+ }
+ },
+ lingxian:{
+ trigger:{player:['respond','useCard']},
+ direct:true,
+ filter:function(event,player){
+ if(player==_status.currentPhase) return false;
+ if(get.itemtype(event.cards)!='cards') return false;
+ for(var i=0;i1&&player!=game.players[i]){
+ return true;
+ }
+ }
+ return false;
+ },
+ content:function(){
+ "step 0"
+ player.chooseTarget('是否发动【凌仙】?',function(card,player,target){
+ return get.distance(player,target,'attack')>1&&player!=target;
+ }).ai=function(target){
+ var att=ai.get.attitude(player,target);
+ if(att<=-0.5) return 0;
+ if(att<=3) return att+0.5;
+ return att+Math.min(0.5,5-target.num('h'));
+ }
+ "step 1"
+ if(result.bool){
+ game.asyncDraw([player,result.targets[0]]);
+ player.logSkill('lingxian',result.targets);
+ }
+ },
+ ai:{
+ mingzhi:false,
+ effect:{
+ target:function(card,player,target){
+ if(get.type(card)=='equip'&&player==target){
+ var distance=get.info(card).distance;
+ if(distance){
+ if(distance.attackFrom<0||distance.globalFrom<0) return 0;
+ }
+ }
+ else{
+ var hs=target.num('h');
+ if(get.tag(card,'respondShan')){
+ var shans=target.num('h','shan');
+ if(shans>1) return [0,1];
+ if(shans&&hs>2) return [0,1];
+ if(shans) return [0,0];
+ if(hs>2) return [0,0];
+ if(hs>1) return [1,0.5];
+ return [1.5,0];
+ }
+ if(get.tag(card,'respondSha')){
+ var shas=target.num('h','sha');
+ if(shas>1) return [0,1];
+ if(shas&&hs>2) return [0,1];
+ if(shas) return [0,0];
+ if(hs>2) return [0,0];
+ if(hs>1) return [1,0.5];
+ return [1.5,0];
+ }
+ }
+ }
+ },
+ threaten:0.8,
+ expose:0.1
+ }
+ },
+ shouyin:{
+ unique:true,
+ enable:'chooseToUse',
+ init:function(player){
+ player.storage.shouyin=false;
+ },
+ mark:true,
+ filter:function(event,player){
+ if(event.type!='dying') return false;
+ if(player.storage.shouyin) return false;
+ if(player.isTurnedOver()) return false;
+ return true;
+ },
+ content:function(){
+ "step 0"
+ player.unmarkSkill('shouyin');
+ player.storage.shouyin=true;
+ player.turnOver();
+ "step 1"
+ event.targets=game.players.slice(0);
+ event.targets.sort(lib.sort.seat);
+ "step 2"
+ if(event.targets.length){
+ var target=event.targets.shift();
+ if(target.hp0){
+ num+=del;
+ }
+ else if(att<0){
+ num-=del;
+ }
+ }
+ return num;
+ }
+ }
+ },
+ intro:{
+ content:'limited'
+ }
+ },
+ sliufeng:{
+ mod:{
+ targetInRange:function(card,player,target){
+ if(card.name=='sha'&&player.hp>=target.hp){
+ return true;
+ }
+ }
+ },
+ },
+ linyun:{
+ enable:'chooseToUse',
+ filterCard:true,
+ selectCard:2,
+ position:'he',
+ viewAs:{name:'sha'},
+ prompt:'将两张牌当杀使用',
+ check:function(card){
+ if(_status.event.player.num('h')<4) return 6-ai.get.useful(card);
+ return 7-ai.get.useful(card);
+ },
+ ai:{
+ order:function(){
+ return lib.card.sha.ai.order+0.1;
+ }
+ },
+ group:['linyun2','linyun3']
+ },
+ linyun2:{
+ trigger:{player:'shaBegin'},
+ filter:function(event){
+ return event.skill=='linyun'
+ },
+ forced:true,
+ popup:false,
+ content:function(){
+ "step 0"
+ var next=trigger.target.chooseToRespond({name:'shan'});
+ next.autochoose=lib.filter.autoRespondShan;
+ next.ai=function(card){
+ if(trigger.target.num('h','shan')>1){
+ return ai.get.unuseful2(card);
+ }
+ return -1;
+ };
+ "step 1"
+ if(result.bool==false){
+ trigger.untrigger();
+ trigger.directHit=true;
+ }
+ },
+ ai:{
+ threaten:1.3
+ }
+ },
+ linyun3:{
+ trigger:{source:'damageAfter'},
+ forced:true,
+ popup:false,
+ filter:function(event,player){
+ return event.parent.skill=='linyun'&&!player.skills.contains('linyun4');
+ },
+ content:function(){
+ player.draw();
+ player.addTempSkill('linyun4','shaAfter')
+ }
+ },
+ linyun4:[],
+ bofeng:{
+ mod:{
+ targetInRange:function(card,player,target){
+ if(card.name=='sha'&&player.hp>=target.hp){
+ return true;
+ }
+ }
+ },
+ trigger:{player:'shaBegin'},
+ check:function(event,player){
+ return ai.get.attitude(player,event.target)<0;
+ },
+ content:function(){
+ "step 0"
+ trigger.target.chooseToRespond({name:'shan'});
+ "step 1"
+ if(result.bool==false){
+ trigger.untrigger();
+ trigger.directHit=true;
+ player.addTempSkill('bofeng2','shaEnd');
+ }
+ },
+ ai:{
+ threaten:1.3
+ }
+ },
+ bofeng2:{
+ trigger:{source:'damageBegin'},
+ filter:function(event){
+ return (event.card&&(event.card.name=='sha')&&event.parent.name!='_lianhuan'&&event.parent.name!='_lianhuan2');
+ },
+ forced:true,
+ popup:false,
+ content:function(){
+ trigger.num++;
+ },
+ },
+ hutian:{
+ trigger:{player:'phaseEnd'},
+ direct:true,
+ filter:function(event,player){
+ return player.num('h')>0&&!player.storage.hutian;
+ },
+ content:function(){
+ "step 0"
+ var next=player.chooseCardTarget({
+ filterTarget:function(card,player,target){
+ return target.maxHp>=ui.selected.cards.length;
+ },
+ filterCard:true,
+ selectCard:[1,Infinity],
+ ai1:function(card){
+ if(ui.selected.cards.length==0&&player.hp==1) return 11-ai.get.value(card);
+ if(ui.selected.cards.length>1) return 0;
+ return 7-ai.get.useful(card);
+ },
+ ai2:function(target){
+ if(target.hp>ui.selected.cards.length){
+ return 0;
+ }
+ return ai.get.attitude(player,target);
+ },
+ prompt:'是否发动【护天】?'
+ });
+ "step 1"
+ if(result.bool){
+ var target=result.targets[0];
+ event.target=target;
+ player.$give(result.cards,target);
+ player.lose(result.cards,ui.special);
+ player.storage.hutian=target;
+ player.logSkill('hutian',result.targets);
+ player.addTempSkill('hutian4','phaseAfter');
+ target.addSkill('hutian2');
+ target.storage.hutian2=result.cards;
+ }
+ else{
+ event.finish();
+ }
+ "step 2"
+ var target=event.target;
+ if(target.storage.hutian2&&target.hp0;
+ },
+ filter:function(event,player){
+ return event.source&&event.card&&event.card.name=='sha'&&event.source!=player;
+ },
+ content:function(){
+ trigger.source.draw();
+ },
+ ai:{
+ expose:0.1,
+ threaten:1.2
+ }
+ },
+ huanxing:{
+ trigger:{player:'phaseBegin'},
+ group:'huanxing2',
+ direct:true,
+ filter:function(event,player){
+ return player.num('he')>0;
+ },
+ content:function(){
+ "step 0"
+ player.unmark(player.storage.huanxing+'_charactermark');
+ delete player.storage.huanxing;
+ delete player.additionalSkills.huanxing;
+ player.checkMarks();
+ player.chooseCardTarget({
+ prompt:'是否发动【幻形】?',
+ filterCard:true,
+ position:'he',
+ filterTarget:function(card,player,target){
+ if(target==player) return false;
+ if(target.sex!='male') return false;
+ var name=target.name.indexOf('unknown')==0?target.name2:target.name;
+
+ var info=lib.character[name];
+ if(info){
+ var skills=info[3];
+ for(var j=0;j_status.event.player.hp){
+ return 5-ai.get.value(card)
+ }
+ return 0;
+ },
+ },
+ suiyan:{
+ trigger:{source:'damageEnd'},
+ // group:'unequip',
+ check:function(event,player){
+ return ai.get.attitude(player,event.player)<0;
+ },
+ direct:true,
+ filter:function(event,player){
+ return event.player.num('e');
+ },
+ content:function(){
+ "step 0"
+ var att=ai.get.attitude(player,trigger.player);
+ player.chooseToDiscard('he','是否发动【碎岩】?').ai=function(card){
+ if(att<0) return 7-ai.get.value(card);
+ return -1;
+ }
+ "step 1"
+ if(result.bool){
+ player.logSkill('suiyan',trigger.player);
+ trigger.player.discard(trigger.player.get('e'));
+ }
+ },
+ ai:{
+ expose:0.3
+ },
+ },
+ ningxian:{
+ trigger:{player:'damageEnd'},
+ direct:true,
+ filter:function(event,player){
+ return player.num('he',{color:'black'})>0;
+ },
+ content:function(){
+ "step 0"
+ var enemy=0;
+ for(var i=0;i0){
+ enemy++;
+ }
+ }
+ var next=player.chooseCardTarget({
+ position:'he',
+ filterTarget:function(card,player,target){
+ return player!=target;
+ },
+ selectCard:[1,player.num('he',{color:'black'})],
+ selectTarget:function(){
+ if(ui.selected.targets.length>ui.selected.cards.length){
+ game.uncheck('target');
+ }
+ return ui.selected.cards.length;
+ },
+ filterCard:{color:'black'},
+ ai1:function(card){
+ if(ui.selected.cards.length>=enemy) return 0;
+ return 9-ai.get.value(card);
+ },
+ ai2:function(target){
+ return ai.get.damageEffect(target,player,player);
+ },
+ prompt:'是否发动【凝霰】?'
+ });
+ "step 1"
+ if(result.bool){
+ player.discard(result.cards);
+ player.logSkill('ningxian',result.targets);
+ event.targets=result.targets;
+ event.targets.sort(lib.sort.seat);
+ }
+ else{
+ event.finish();
+ }
+ "step 2"
+ if(event.targets.length){
+ event.targets.shift().damage();
+ event.redo();
+ }
+ },
+ ai:{
+ maixie:true,
+ effect:function(card,player,target){
+ if(get.tag(card,'damage')){
+ if(player.skills.contains('jueqing')) return [1,-0.5];
+ if(player.num('h')>2||player.num('e',{color:'black'})){
+ return [1,0,0,-1];
+ }
+ return [1,-0.5];
+ }
+ },
+ }
+ },
+ xuanyuan:{},
+ jilve:{
+ enable:'phaseUse',
+ group:'jilve6',
+ direct:true,
+ // usable:3,
+ delay:0,
+ content:function(){
+ "step 0"
+ player.getStat('skill').jilve--;
+ var cards=[];
+ var max=Math.min(2,ui.cardPile.childNodes.length);
+ for(var i=0;i=4) return [1,1.5];
+ if(target.hp==3) return [1,1];
+ if(target.hp==2) return [1,0.5];
+ }
+ }
+ }
+ }
+ },
+ pozhou2:{
+ trigger:{global:'phaseBegin'},
+ priority:-5,
+ check:function(event,player){
+ return ai.get.attitude(player,event.player)<-3;
+ },
+ filter:function(event,player){
+ return player.storage.pozhou>0&&player!=event.player;
+ },
+ prompt:function(event,player){
+ return '是否弃置一枚破咒标记令'+get.translation(event.player)+
+ '的非锁定技失效?(剩余'+player.storage.pozhou+'枚)';
+ },
+ content:function(){
+ player.storage.pozhou--;
+ if(!player.storage.pozhou){
+ player.unmarkSkill('pozhou');
+ }
+ var target=trigger.player;
+ target.disabledSkills.pozhou=[];
+ for(var i=0;i=1;
+ },
+ filterTarget:function(card,player,target){
+ return player!=target&&!target.isTurnedOver();
+ },
+ content:function(){
+ "step 0"
+ event.targets=[];
+ event.num=0;
+ for(var i=0;i1){
+ return 12-ai.get.equipValue(card);
+ }
+ return 8-ai.get.equipValue(card);
+ },
+ filter:function(event,player){
+ return player.num('he',{type:'equip'});
+ },
+ filterTarget:function(card,player,target){
+ return player!=target;
+ },
+ content:function(){
+ "step 0"
+ target.damage();
+ "step 1"
+ if(target.isAlive()){
+ var cards=target.get('h');
+ event.num=cards.length;
+ target.discard(cards);
+ }
+ else{
+ event.finish();
+ }
+ "step 2"
+ if(event.num>2){
+ player.loseHp();
+ }
+ },
+ ai:{
+ order:9,
+ expose:0.2,
+ result:{
+ target:function(player,target){
+ if(ai.get.damageEffect(target,player)<0){
+ return -target.num('h')-(target.hp==1?1:0);
+ }
+ }
+ }
+ }
+ },
+ mojian:{
+ trigger:{player:'shaBegin'},
+ check:function(event,player){
+ if(ai.get.attitude(player,event.target)>0) return true;
+ return player.hp0){
+ player.stat[player.stat.length-1].card.sha--;
+ }
+ },
+ group:'poyue2'
+ },
+ poyue2:{
+ trigger:{player:'shaBegin'},
+ forced:true,
+ popup:false,
+ filter:function(event,player){
+ return event.card&&get.color(event.card)=='red';
+ },
+ content:function(){
+ trigger.directHit=true;
+ }
+ },
+ jianji:{
+ enable:'phaseUse',
+ filter:function(event,player){
+ return player.num('he',{type:'equip'})>0&&lib.filter.cardEnabled({name:'sha'},player);
+ },
+ usable:1,
+ filterCard:{type:'equip'},
+ position:'he',
+ check:function(card){
+ var player=_status.currentPhase;
+ if(player.num('he',{subtype:get.subtype(card)})>1){
+ return 11-ai.get.equipValue(card);
+ }
+ return 6-ai.get.equipValue(card);
+ },
+ discard:false,
+ prepare:function(cards,player){
+ player.$throw(cards);
+ },
+ delay:false,
+ filterTarget:function(card,player,target){
+ return lib.filter.targetEnabled({name:'sha'},player,target);
+ },
+ content:function(){
+ "step 0"
+ if(!player.skills.contains('unequip')){
+ event.added=true
+ player.skills.push('unequip');
+ }
+ player.draw();
+ player.useCard({name:'sha'},cards,targets,'jianji',false).animate=false;
+ "step 1"
+ if(event.added){
+ player.skills.remove('unequip');
+ }
+ },
+ ai:{
+ order:function(){
+ return lib.card.sha.ai.order+0.1;
+ },
+ result:{
+ target:function(player,target){
+ var added=false;
+ if(!player.skills.contains('unequip')){
+ added=true;
+ player.skills.push('unequip');
+ }
+ var eff=ai.get.effect(target,{name:'sha'},player,target);
+ if(added){
+ player.skills.remove('unequip');
+ }
+ return eff;
+ }
+ },
+ effect:{
+ player:function(card,player){
+ if(_status.currentPhase!=player) return;
+ if(get.type(card)=='equip'&&
+ player.num('e',{subtype:get.subtype(card)})&&
+ lib.filter.filterCard({name:'sha'},player)){
+ return 0;
+ }
+ }
+ },
+ threaten:1.3
+ }
+ },
+ huangyu:{
+ enable:'phaseUse',
+ filter:function(event,player){
+ return !player.getStat('skill').huangyu&&player.num('he',{color:'red'})>1;
+ },
+ filterCard:{color:'red'},
+ selectCard:2,
+ position:'he',
+ viewAs:{name:'chiyuxi',nature:'fire'},
+ check:function(card){
+ var player=_status.event.player;
+ if(player.skills.contains('jianji')&&get.type(card)=='equip'&&
+ lib.filter.filterCard({name:'sha'},player)){
+ return 0;
+ }
+ return 6-ai.get.value(card)
+ },
+ ai:{
+ order:8,
+ expose:0.2,
+ threaten:1.2
+ }
+ },
+ gongshen:{
+ trigger:{global:'useCard'},
+ priority:15,
+ filter:function(event,player){
+ var type=get.type(event.card,'trick');
+ if(type!='basic'&&type!='trick') return false;
+ return event.player!=player&&player.num('he',{type:'equip'})>0&&
+ event.targets&&event.targets.length>0;
+ },
+ direct:true,
+ content:function(){
+ "step 0"
+ var effect=0;
+ for(var i=0;itrigger.targets[0].hp) return val;
+ if(nme=='sha'&&trigger.targets[0].hp==1&&!trigger.targets[0].num('h','shan')) return val;
+ if(nme=='jiedao'&&trigger.targets[0]==player) return val;
+ if(nme=='yihuajiemu'&&trigger.targets[0]==player) return val;
+ if(nme=='shuiyanqijun'&&trigger.targets.contains(player)) return val;
+ return 0;
+ }
+ return -1;
+ }
+ "step 1"
+ if(result.bool){
+ game.delay();
+ trigger.untrigger();
+ trigger.finish();
+ player.logSkill('gongshen');
+ }
+ },
+ ai:{
+ effect:{
+ player:function(card,player,target){
+ if(player!=target) return;
+ if(get.type(card)=='equip'&&player.num('h')<=player.hp){
+ return [0,0,0,0];
+ }
+ }
+ },
+ threaten:2,
+ expose:0.3
+ }
+ },
+ xiaozhan:{
+ trigger:{global:'useCard'},
+ priority:15,
+ filter:function(event,player){
+ return event.card.name=='sha'&&event.player!=player&&
+ player.num('h','sha')>0&&event.targets.contains(player)==false;
+ },
+ direct:true,
+ content:function(){
+ "step 0"
+ var effect=0;
+ for(var i=0;i0;
+ },
+ selectCard:2,
+ filterCard:true,
+ discard:false,
+ prepare:function(cards,player,targets){
+ player.$throw(cards);
+ },
+ filterTarget:function(card,player,target){
+ return lib.filter.targetEnabled({name:'juedou'},player,target);
+ },
+ check:function(card){
+ return Math.max(7-ai.get.value(card),7-ai.get.useful(card));
+ },
+ content:function(){
+ player.useCard({name:'juedou'},targets,cards).animate=false;
+ },
+ ai:{
+ result:{
+ target:function(player,target){
+ return ai.get.effect(target,{name:'juedou'},player,target);
+ }
+ },
+ order:8,
+ }
+ },
+ yiesheng:{
+ enable:'phaseUse',
+ filterCard:{color:'black'},
+ filter:function(event,player){
+ return player.num('h',{color:'black'})>0;
+ },
+ selectCard:[1,Infinity],
+ prompt:'弃置任意张黑色手牌并摸等量的牌',
+ check:function(card){return 5-ai.get.value(card)},
+ content:function(){
+ player.draw(cards.length);
+ },
+ ai:{
+ order:1,
+ result:{
+ player:1
+ },
+ },
+ },
+ dangping:{
+ trigger:{source:'damageAfter'},
+ direct:true,
+ filter:function(event,player){
+ return event.parent.name!='dangping'&&!player.skills.contains('dangping2');
+ },
+ content:function(){
+ "step 0"
+ var next=player.chooseCardTarget({
+ position:'he',
+ filterTarget:function(card,player,target){
+ return player!=target&&trigger.player!=target&&get.distance(trigger.player,target)<=1;
+ },
+ filterCard:true,
+ ai1:function(card){
+ return ai.get.unuseful(card)+9;
+ },
+ ai2:function(target){
+ return ai.get.damageEffect(target,player,player);
+ },
+ prompt:'是否发动【荡平】?'
+ });
+ "step 1"
+ if(result.bool){
+ player.discard(result.cards);
+ player.logSkill('dangping',result.targets);
+ player.addTempSkill('dangping2','phaseAfter');
+ }
+ "step 2"
+ if(result.bool){
+ result.targets[0].damage();
+ }
+ }
+ },
+ dangping2:{},
+ duishi:{
+ enable:'phaseUse',
+ usable:1,
+ filter:function(event,player){
+ return player.num('h')>0
+ },
+ filterTarget:function(card,player,target){
+ return player!=target&&target.num('he');
+ },
+ filterCard:true,
+ check:function(card){return 8-ai.get.value(card)},
+ content:function(){
+ "step 0"
+ var suit=get.suit(cards[0]);
+ target.chooseToDiscard({suit:suit},'弃置一张'+get.translation(suit)+
+ '牌,或令'+get.translation(player)+'获得你的一张牌').ai=function(card){
+ if(ai.get.attitude(target,player)>0){
+ return -1;
+ }
+ return 11-ai.get.value(card);
+ }
+
+ "step 1"
+ if(!result.bool){
+ if(target.num('he')){
+ player.gainPlayerCard(target,'he',true,ai.get.buttonValue);
+ }
+ }
+ },
+ ai:{
+ order:9,
+ threaten:1.5,
+ result:{
+ target:-2,
+ player:0.5
+ },
+ expose:0.2
+ }
+ },
+ guisi:{
+ trigger:{target:'shaBefore'},
+ popup:false,
+ direct:true,
+ filter:function(event,player){
+ return player.num('h');
+ },
+ content:function(){
+ "step 0"
+ player.chooseCard('是否交给'+get.translation(trigger.player)+'一张牌并取消此杀?').ai=function(card){
+ if(ai.get.attitude(player,trigger.player)>0){
+ return 9-ai.get.value(card);
+ }
+ if(player.num('h',{name:'shan'})) return -1;
+ return 7-ai.get.value(card);
+ }
+ "step 1"
+ if(result.bool){
+ player.logSkill('guisi');
+ trigger.player.gain(result.cards);
+ player.$give(result.cards,trigger.player);
+ trigger.untrigger();
+ trigger.finish();
+ }
+ },
+ },
+ lianwu:{
+ mod:{
+ selectTarget:function(card,player,range){
+ if(card.name=='sha'&&range[1]!=-1) range[1]++;
+ },
+ },
+ trigger:{player:'shaBegin'},
+ forced:true,
+ filter:function(event,player){
+ return event.card&&get.color(event.card)=='red';
+ },
+ content:function(){
+ trigger.directHit=true;
+ }
+ },
+ mingfu:{
+ enable:'phaseUse',
+ usable:1,
+ filter:function(event,player){
+ return player.num('he',{suit:'club'})>0;
+ },
+ position:'he',
+ filterCard:{suit:'club'},
+ discard:false,
+ prepare:function(cards,player,targets){
+ player.$throw(cards);
+ },
+ filterTarget:function(card,player,target){
+ return lib.filter.targetEnabled({name:'guiyoujie'},player,target);
+ },
+ check:function(card){
+ return Math.max(7-ai.get.value(card),7-ai.get.useful(card));
+ },
+ content:function(){
+ target.addJudge('guiyoujie',cards);
+ },
+ ai:{
+ result:{
+ target:function(player,target){
+ return ai.get.effect(target,{name:'guiyoujie'},player,target);
+ }
+ },
+ order:8,
+ }
+ },
+ mufeng:{
+ priority:9,
+ // mod:{
+ // globalTo:function(from,to,distance){
+ // return distance+1;
+ // }
+ // },
+ filter:function(event,player){
+ return event.player!=player&&event.targets&&event.targets.length>1;
+ },
+ check:function(event,player){
+ return get.tag(event.card,'multineg')||ai.get.effect(player,event.card,event.player,player)<=0;
+ },
+ trigger:{target:'useCardToBefore'},
+ content:function(){
+ trigger.untrigger();
+ trigger.finish();
+ player.draw();
+ },
+ ai:{
+ effect:{
+ target:function(card){
+ if(card.name=='tiesuo') return [0,0];
+ if(card.name=='yihuajiemu') return [0,1];
+ if(get.tag(card,'multineg')) return [0,2];
+ }
+ }
+ }
+ },
+ jiying:{
+ // trigger:{player:'respond'},
+ // filter:function(event,player){
+ // return event.card.name=='shan'&&
+ // player.num('h','sha')>0&&_status.currentPhase!=player;
+ // },
+ // direct:true,
+ // content:function(){
+ // player.chooseToUse('是否发动【疾鹰】?',{name:'sha'});
+ // },
+ mod:{
+ targetInRange:function(card){
+ if(card.name=='sha') return true;
+ }
+ },
+ // ai:{
+ // effect:{
+ // target:function(card,player,target,current){
+ // if(get.tag(card,'respondShan')&&target.num('h')) return 0.8;
+ // }
+ // }
+ // }
+ },
+ minjing:{
+ trigger:{player:'damageBegin'},
+ forced:true,
+ filter:function(event,player){
+ if(player.get('e','2')) return false;
+ if(event.source&&event.source.num('s','unequip')) return;
+ if(Math.random()>1/3) return false;
+ return true;
+ },
+ content:function(){
+ trigger.num--;
+ },
+ ai:{
+ threaten:0.8
+ }
+ },
+ touxi:{
+ trigger:{global:'phaseEnd'},
+ check:function(event,player){
+ return ai.get.damageEffect(event.player,player,player,'thunder')>0;
+ },
+ filter:function(event,player){
+ return event.player!=player&&!player.skills.contains('touxi2');
+ },
+ content:function(){
+ "step 0"
+ player.line(trigger.player,'thunder');
+ player.judge(function(card){
+ if(get.color(card)=='black') return 1;
+ return -1;
+ });
+ "step 1"
+ if(result.bool){
+ trigger.player.damage('thunder');
+ player.draw();
+ player.addSkill('touxi2');
+ event.finish();
+ }
+ else{
+ if(player.num('he')){
+ trigger.player.discardPlayerCard(player,'he',true,ai.get.buttonValue);
+ }
+ }
+ },
+ ai:{
+ expose:0.3,
+ threaten:1.2
+ }
+ },
+ touxi2:{
+ trigger:{player:'phaseBegin'},
+ forced:true,
+ popup:false,
+ content:function(){
+ player.removeSkill('touxi2');
+ }
+ },
+ lianji:{
+ enable:'phaseUse',
+ usable:1,
+ filterTarget:function(card,player,target){
+ if(player==target) return false;
+ return target.num('h')>0;
+ },
+ selectTarget:2,
+ multitarget:true,
+ multiline:true,
+ prepare:function(cards,player,targets){
+ player.$throw(cards);
+ player.line(targets);
+ },
+ discard:false,
+ filterCard:true,
+ check:function(card){
+ return 6-ai.get.value(card);
+ },
+ content:function(){
+ "step 0"
+ if(!player.storage.lianji){
+ player.storage.lianji=[];
+ }
+ if(targets[0].num('h')&&targets[1].num('h')){
+ targets[0].chooseToCompare(targets[1]);
+ player.storage.lianji.add(targets[0]);
+ player.storage.lianji.add(targets[1]);
+ }
+ else{
+ event.finish();
+ }
+ "step 1"
+ if(result.bool){
+ targets[0].gain(cards);
+ targets[0].$gain2(cards);
+ targets[1].damage(targets[0]);
+ }
+ else{
+ targets[1].gain(cards);
+ targets[1].$gain2(cards);
+ targets[0].damage(targets[1]);
+ }
+ if(!player.skills.contains('yinmo')){
+ event.finish();
+ }
+ "step 2"
+ for(var i=0;i=player.maxHp-1) return [0,0];
+ }
+ }
+ }
+ },
+ moyan:{
+ enable:'phaseUse',
+ usable:1,
+ filter:function(event,player){
+ return player.hp0;
+ },
+ filterTarget:function(card,player,target){
+ return player!=target;//&&get.distance(player,target,'attack')<=1;
+ },
+ selectTarget:function(){
+ return ui.selected.cards.length;
+ },
+ selectCard:function(){
+ var player=_status.currentPhase;
+ return [1,Math.min(game.players.length-1,player.maxHp-player.hp)];
+ },
+ filterCard:function(card){
+ return get.color(card)=='red';
+ },
+ check:function(card){
+ if(ui.selected.cards.length==0){
+ return 8-ai.get.value(card);
+ }
+ return 6-ai.get.value(card);
+ },
+ line:'fire',
+ content:function(){
+ "step 0"
+ target.damage('fire');
+ "step 1"
+ // target.draw();
+ },
+ ai:{
+ order:9,
+ result:{
+ target:function(player,target){
+ return ai.get.damageEffect(target,player,target,'fire');
+ }
+ },
+ threaten:function(player,target){
+ if(target.hp==1) return 2;
+ if(target.hp==2) return 1.5;
+ return 0.5;
+ },
+ maixie:true,
+ effect:{
+ target:function(card,player,target){
+ if(get.tag(card,'damage')){
+ if(target.hp==target.maxHp) return [0,1];
+ }
+ if(get.tag(card,'recover')&&player.hp>=player.maxHp-1) return [0,0];
+ }
+ }
+ }
+ },
+ shejie:{
+ trigger:{player:'damageEnd'},
+ priority:9,
+ check:function(event,player){
+ return ai.get.attitude(player,event.source)<0;
+ },
+ filter:function(event){
+ return event&&event.source;
+ },
+ content:function(){
+ trigger.source.addSkill('shejie2');
+ },
+ ai:{
+ threaten:0.4
+ }
+ },
+ shejie2:{
+ unique:true,
+ trigger:{player:'phaseBegin'},
+ forced:true,
+ priority:10,
+ mod:{
+ cardEnabled:function(){
+ return false;
+ },
+ cardUsable:function(){
+ return false;
+ },
+ cardRespondable:function(){
+ return false;
+ },
+ cardSavable:function(){
+ return false;
+ }
+ },
+ content:function(){
+ player.removeSkill('shejie2')
+ },
+ },
+ guiyin:{
+ trigger:{player:'phaseDiscardEnd'},
+ frequent:true,
+ filter:function(event,player){
+ return event.cards&&event.cards.length>1
+ },
+ content:function(){
+ player.draw(2);
+ },
+ },
+ swdqinyin:{
+ trigger:{player:'phaseEnd'},
+ direct:true,
+ filter:function(event,player){
+ return !player.getStat('damage');
+ },
+ content:function(){
+ "step 0"
+ var recover=0,lose=0;
+ for(var i=0;i0){
+ if(game.players[i].hp<2){
+ lose--;
+ recover+=0.5;
+ }
+ lose--;
+ recover++;
+ }
+ else if(ai.get.attitude(player,game.players[i])<0){
+ if(game.players[i].hp<2){
+ lose++;
+ recover-=0.5;
+ }
+ lose++;
+ recover--;
+ }
+ }
+ else{
+ if(ai.get.attitude(player,game.players[i])>0){
+ lose--;
+ }
+ else if(ai.get.attitude(player,game.players[i])<0){
+ lose++;
+ }
+ }
+ }
+ }
+ player.chooseControl('失去体力','回复体力','cancel').ai=function(){
+ // console.log(lose,recover);
+ if(lose>recover&&lose>0) return 0;
+ if(lose0) return 1;
+ return 2;
+ }
+ "step 1"
+ if(result.bool==false||result.control=='cancel'){
+ event.finish();
+ }
+ else{
+ player.logSkill('swdqinyin');
+ event.bool=(result.control=='回复体力');
+ event.num=0;
+ event.players=game.players.slice(0);
+ }
+ "step 2"
+ if(event.num0;
+ },
+ content:function(){
+ "step 0"
+ player.chooseCard('请选择替换判定的牌','he').ai=function(card){
+ var trigger=_status.event.parent._trigger;
+ var player=_status.event.player;
+ var result=trigger.judge(card)-trigger.judge(trigger.player.judging);
+ var attitude=ai.get.attitude(player,trigger.player);
+ if(attitude==0||result==0) return 0;
+ if(attitude>0){
+ return result;
+ }
+ else{
+ return -result;
+ }
+ };
+ "step 1"
+ if(result.bool){
+ player.respond(result.cards);
+ }
+ else{
+ event.finish();
+ }
+ "step 2"
+ if(result.bool){
+ player.logSkill('tiandao');
+ player.$gain2(trigger.player.judging);
+ player.gain(trigger.player.judging);
+ trigger.player.judging=result.cards[0];
+ trigger.position.appendChild(result.cards[0]);
+ game.log(get.translation(trigger.player)+'的判定牌改为'+get.translation(result.cards[0]));
+ }
+ "step 3"
+ game.delay(2);
+ },
+ ai:{
+ tag:{
+ rejudge:1
+ },
+ threaten:1.5
+ }
+ },
+ yihua:{
+ trigger:{target:'useCardToBefore'},
+ popup:false,
+ direct:true,
+ filter:function(event,player){
+ // return event.card&&get.color(event.card)=='red'&&event.player!=player;
+ return event.targets.length==1&&event.player!=player&&player.num('h')>=2;
+ },
+ content:function(){
+ "step 0"
+ player.chooseToDiscard('是否弃置两张手牌将'+get.translation(trigger.card)+'反弹?',2).ai=function(card){
+ if(ai.get.effect(player,trigger.card)<0) return 4-ai.get.value(card);
+ return 0;
+ }
+ "step 1"
+ if(result.bool){
+ // player.discard(result.cards);
+ player.logSkill('yihua');
+ trigger.target=trigger.player;
+ trigger.player=player;
+ trigger.untrigger();
+ trigger.trigger('useCardToBefore');
+ }
+ // "step 2"
+ // if(result.bool){
+ // trigger.target=result.targets[0];
+ // trigger.untrigger;
+ // trigger.trigger('shaBefore');
+ // game.delay();
+ // }
+ },
+ ai:{
+ threaten:function(player,target){
+ if(target.num('h')<=2){
+ return 2;
+ }
+ return 2/(target.num('h')-1);
+ }
+ }
+ },
+ youyin:{
+ trigger:{global:'discardAfter'},
+ filter:function(event,player){
+ if(event.player==player) return false;
+ if(player.num('h')>=5) return false;
+ for(var i=0;i=target.maxHp) return false;
+ return true;
+ },
+ selectTarget:[1,3],
+ content:function(){
+ target.recover();
+ },
+ ai:{
+ order:10,
+ result:{
+ target:function(player,target){
+ if(player==target&&player.num('h')>player.hp) return 20;
+ return ai.get.recoverEffect(target,player,target);
+ }
+ },
+ threaten:2
+ }
+ },
+ huopu:{
+ enable:'phaseUse',
+ filterCard:function(card){
+ return get.suit(card)=='heart';
+ },
+ viewAs:{name:'liuxinghuoyu'},
+ prompt:'将一张红桃手牌当作流星火羽使用',
+ check:function(card){return 6-ai.get.value(card)},
+ ai:{
+ threaten:1.4
+ }
+ },
+ rexue:{
+ trigger:{global:'phaseBegin'},
+ direct:true,
+ filter:function(event,player){
+ return lib.filter.targetEnabled({name:'sha'},player,event.player)&&!lib.filter.autoRespondSha.call({player:player});
+ },
+ content:function(){
+ "step 0"
+ player.chooseToUse({name:'sha'},'是否对'+get.translation(trigger.player)+'使用一张杀',trigger.player);
+ "step 1"
+ if(result.bool){
+ player.logSkill('rexue');
+ player.draw();
+ }
+ }
+ },
+ shengshou:{
+ enable:'phaseUse',
+ filterCard:function(card){
+ return get.color(card)=='black';
+ },
+ viewAs:{name:'caoyao'},
+ prompt:'将一张黑色手牌当作草药使用',
+ check:function(card){return 6-ai.get.value(card)},
+ ai:{
+ threaten:1.6
+ }
+ },
+ huanjian:{
+ enable:'phaseUse',
+ filterCard:function(card){
+ return get.color(card)=='black';
+ },
+ viewAs:{name:'dujian'},
+ prompt:'将一张黑色手牌当作毒箭使用',
+ check:function(card){return 5-ai.get.value(card)},
+ ai:{
+ threaten:1.6
+ }
+ },
+ benlei:{
+ enable:'phaseUse',
+ viewAs:{name:'jingleishan',nature:'thunder'},
+ filterCard:function(card,player){
+ return true;
+ },
+ selectCard:3,
+ position:'he',
+ prompt:'将三张牌当作惊雷闪使用',
+ check:function(card){
+ return 4-ai.get.value(card);
+ },
+ group:'benlei2',
+ ai:{
+ basic:{
+ order:10
+ }
+ }
+ },
+ benlei2:{
+ trigger:{source:'damageAfter'},
+ filter:function(event,player){
+ return event.nature=='thunder'&&player.hp3;
+ },
+ filter:function(event,player){
+ return player.num('h')>0;
+ },
+ content:function(){
+ "step 0"
+ player.chooseToDiscard('是否发动苏生?').ai=ai.get.unuseful2;
+ "step 1"
+ if(result.bool){
+ // player.chooseToDiscard('h',true);
+ trigger.untrigger();
+ trigger.finish();
+ trigger.player.hp=1;
+ if(trigger.player.maxHp<1) trigger.player.maxHp=1;
+ trigger.player.update();
+ player.logSkill('susheng');
+ }
+
+ },
+ ai:{
+ threaten:2
+ }
+ },
+ kunlunjing:{
+ unique:true,
+ group:['kunlunjing1','kunlunjing2'],
+ intro:{
+ content:function(storage,player){
+ return player.storage.kunlunjing3;
+
+ for(var i=0;i0){
+ num+=num2;
+ }
+ else if(att<0){
+ num-=num2;
+ }
+ }
+ }
+ return num>Math.min(3,game.players.length);
+ },
+ content:function(){
+ "step 0"
+ event.player.storage.kunlunjing2=true;
+ ui.arena.classList.add('zoomout3');
+ ui.arena.delete();
+ ui.arena.hide();
+ game.delay(0,500);
+ "step 1"
+ var storage=event.player.storage.kunlunjing;
+ var player,frag;
+ var i,j;
+ for(i=0;i0
+ },
+ filterTarget:function(card,player,target){
+ return player!=target
+ },
+ filterCard:function(card,player){
+ if(ui.selected.cards.length){
+ return get.suit(card)==get.suit(ui.selected.cards[0]);
+ }
+ var cards=player.get('h');
+ for(var i=0;i0
+ },
+ filterTarget:function(card,player,target){
+ return player!=target
+ },
+ filterCard:function(card,player){
+ if(ui.selected.cards.length){
+ return get.suit(card)==get.suit(ui.selected.cards[0]);
+ }
+ var cards=player.get('h');
+ for(var i=0;i0;
+ },
+ filterTarget:function(card,player,target){
+ return player!=target&&target.num('he')>0;
+ },
+ filterCard:function(card){
+ var suit=get.suit(card);
+ for(var i=0;ilength) return -1.5+eff;
+ return -1+eff;
+ }
+ },
+ expose:0.2
+ }
+ },
+ liaoyuan:{
+ trigger:{player:'shaAfter'},
+ direct:true,
+ filter:function(event,player){
+ if(get.itemtype(event.cards)!='cards') return false;
+ if(player.num('he',{suit:get.suit(event.cards)})>0){
+ for(var i=0;i0){
+ return 7-ai.get.value(card);
+ }
+ }
+ "step 1"
+ if(result.bool){
+ player.logSkill('liaoyuan');
+ if(result.cards[0].name=='sha'){
+ player.useCard(result.cards,trigger.targets);
+ }
+ else{
+ player.useCard({name:'sha'},result.cards,trigger.targets);
+ }
+ }
+ }
+ },
+
+ dunxing:{
+ mod:{
+ targetEnabled:function(card,player,target){
+ if(_status.currentPhase==player&&target.hp0;
+ }).ai=function(target){
+ return -ai.get.attitude(player,target);
+ };
+ "step 1"
+ if(result.bool){
+ player.logSkill('xuanfeng2',result.targets);
+ player.discardPlayerCard(result.targets[0],'he',true);
+ }
+ },
+ },
+ meihuo:{
+ trigger:{player:['loseEnd']},
+ direct:true,
+ filter:function(event,player){
+ if(player.equiping) return false;
+ if(player.num('e')) return false;
+ for(var i=0;i0;
+ }).ai=function(target){
+ var att=ai.get.attitude(player,target);
+ if(att<=0){
+ return 1-att+(target.num('e')?2:0);
+ }
+ return 0;
+ };
+ "step 1"
+ if(result.bool){
+ event.target=result.targets[0];
+ player.logSkill('meihuo',event.target);
+ player.choosePlayerCard(event.target,'he',true).ai=function(button){
+ var card=button.link;
+ if(get.position(card)=='e') return ai.get.equipValue(card);
+ return 5;
+ };
+ }
+ "step 2"
+ if(result.bool){
+ if(get.position(result.buttons[0].link)=='e'){
+ player.equip(result.buttons[0].link);
+ }
+ else{
+ player.gain(result.buttons[0].link);
+ }
+ event.target.$give(1,player);
+ game.delay();
+ }
+ },
+ },
+ yuhuo:{
+ enable:'chooseToUse',
+ filter:function(event,player){
+ if(event.type!='dying') return false;
+ if(player!=_status.dying) return false;
+ if(player.storage.yuhuo) return false;
+ },
+ content:function(){
+ player.maxHp--;
+ player.hp=player.maxHp;
+ player.discard(player.get('hej'));
+ if(player.classList.contains('linked')) player.link();
+ if(player.classList.contains('turnedover')) player.turnOver();
+ player.storage.yuhuo=true;
+ // player.addSkill('guanhong');
+ // player.addSkill('yishan2');
+ player.update();
+ },
+ ai:{
+ result:{
+ player:10
+ },
+ threaten:function(player,target){
+ if(!target.storage.yuhuo) return 0.8;
+ }
+ },
+ init:function(player){
+ player.storage.yuhuo=false;
+ },
+ intro:{
+ content:'limited'
+ }
+ },
+ yishan:{
+ group:'yishan2',
+ trigger:{player:'damageEnd'},
+ filter:function(event,player){
+ var content=player.storage.yishan;
+ for(var i=0;i最近失去的牌');
+ var cards=[];
+ for(var i=0;i=4) break;
+ }
+ }
+ if(cards.length){
+ dialog.add(cards);
+ }
+ else{
+ dialog.add('(无)');
+ }
+ },
+ content:function(content,player){
+ var str='最近失去的牌:';
+ var cards=[];
+ for(var i=0;i=4) break;
+ }
+ }
+ if(cards.length){
+ str+=get.translation(cards);
+ }
+ else{
+ str+='无';
+ }
+ return str;
+ }
+ }
+ },
+ yishan2:{
+ trigger:{player:'loseEnd'},
+ forced:true,
+ popup:false,
+ silent:true,
+ content:function(){
+ for(var i=0;i1;
+ },
+ content:function(){
+ trigger.directHit=true;
+ }
+ },
+ // poxing:{
+ // trigger:{player:'shaEnd'},
+ // frequent:true,
+ // filter:function(trigger,player){
+ // // if(trigger.targets&&trigger.target!=trigger.targets[trigger.targets.length-1])return false;
+ // if(trigger.card&&trigger.card.skill=='poxing') return false;
+ // if(trigger.targets.length>1) return false;
+ // if(player.hp>trigger.target.hp) return false;
+ // if(trigger.target.classList.contains('dead')) return false;
+ // return true;
+ // // return (get.itemtype(trigger.card)=='card'&&player.hp<=trigger.target.hp&&trigger.target.classList.contains('dead')==false);
+ // },
+ // content:function(){
+ // player.useCard({
+ // name:'sha',
+ // nature:trigger.card.nature,
+ // number:trigger.card.number,
+ // suit:trigger.card.suit,
+ // skill:'poxing'
+ // },trigger.targets);
+ // }
+ // },
+ poxing:{
+ trigger:{source:'damageBegin'},
+ filter:function(trigger,player){
+ return trigger.player.hp>player.hp;
+ },
+ forced:true,
+ content:function(){
+ trigger.num++;
+ }
+ },
+ luomu:{
+ trigger:{source:'damageEnd'},
+ forced:true,
+ filter:function(event,player){
+ return event.player.num('hej');
+ },
+ content:function(){
+ trigger.player.discard(trigger.player.get('hej').randomGet());
+ }
+ },
+ huanhun:{
+ trigger:{global:'dying'},
+ priority:6,
+ filter:function(event,player){
+ return event.player.hp<=0&&player.num('he')>0;
+ },
+ direct:true,
+ content:function(){
+ "step 0"
+ player.chooseToDiscard('he','是否发动【唤魂】?').ai=function(card){
+ if(ai.get.attitude(player,trigger.player)>0){
+ return 8-ai.get.value(card);
+ }
+ return 0;
+ };
+ "step 1"
+ if(result.bool){
+ player.logSkill('huanhun',trigger.player);
+ trigger.player.judge(function(card){
+ return get.color(card)=='red'?1:-1;
+ });
+ }
+ else{
+ event.finish();
+ }
+ "step 2"
+ if(result.bool){
+ trigger.player.recover();
+ }
+ },
+ ai:{
+ threaten:1.6,
+ expose:0.2
+ }
+ },
+ huanhun_old:{
+ enable:'phaseUse',
+ forbid:['versus'],
+ filter:function(){
+ return game.dead.length>0
+ },
+ usable:1,
+ filterCard:function(card){
+ return get.suit(card)=='heart';
+ },
+ check:function(card){
+ return 10-ai.get.value(card);
+ },
+ direct:true,
+ content:function(){
+ "step 0"
+ var list=[];
+ for(var i=0;i2) return 3;
+ }
+ return 0;
+ }
+ },
+ threaten:2,
+ }
+ },
+ yinyue:{
+ trigger:{global:'recoverAfter'},
+ check:function(event,player){
+ return ai.get.attitude(player,event.player)>0;
+ },
+ prompt:function(event){
+ return '是否对'+get.translation(event.player)+'发动【引月】?'
+ },
+ content:function(){
+ "step 0"
+ trigger.player.draw();
+ "step 1"
+ if(player.num('h')=2) return 0;
+ if(ui.selected.cards.length==1){
+ if(player.num('h')>player.hp){
+ return 3-ai.get.value(card);
+ }
+ return 0;
+ }
+ return 6-ai.get.value(card);
+ };
+ "step 1"
+ if(result.bool){
+ player.logSkill('daixing');
+ player.storage.daixing=result.cards.length;
+ player.markSkill('daixing');
+ }
+ else{
+ player.storage.daixing=0;
+ player.unmarkSkill('daixing');
+ }
+ },
+ ai:{
+ effect:{
+ target:function(card,player,target){
+ if(get.tag(card,'damage')){
+ if(player.skills.contains('jueqing')) return;
+ if(target.storage.daixing>1) return 0.1;
+ if(target.storage.daixing==1) return 0.5;
+ }
+ return 1.5;
+ }
+ }
+ },
+ intro:{
+ content:'mark'
+ }
+ },
+ daixing2:{
+ trigger:{player:'damageBegin'},
+ filter:function(event,player){
+ return player.storage.daixing>0;
+ },
+ priority:-20,
+ popup:false,
+ forced:true,
+ content:function(){
+ if(trigger.num>=player.storage.daixing){
+ trigger.num-=player.storage.daixing;
+ player.storage.daixing=0;
+ player.unmarkSkill('daixing');
+ }
+ else{
+ player.storage.daixing-=trigger.num;
+ trigger.num=0;
+ }
+ player.popup('daixing');
+ }
+ },
+ swd_wuxie:{
+ mod:{
+ targetEnabled:function(card,player,target){
+ if(get.type(card)=='delay'&&player!=target){
+ return false;
+ }
+ }
+ }
+ },
+ qingcheng:{
+ trigger:{player:'phaseBegin'},
+ frequent:true,
+ content:function(){
+ "step 0"
+ if(event.cards==undefined) event.cards=[];
+ player.judge(function(card){
+ if(get.color(card)=='red') return 1.5;
+ return -1.5;
+ },ui.special);
+ "step 1"
+ if(result.judge>0){
+ event.cards.push(result.card);
+ // if(event.cards.length==2){
+ // player.gain(event.cards);
+ // event.finish();
+ // }
+ // else
+ if(lib.config.auto_skill==false){
+ player.chooseBool('是否再次发动?');
+ }
+ else{
+ event._result={bool:true};
+ }
+ }
+ else{
+ player.gain(event.cards);
+ event.finish();
+ }
+ "step 2"
+ if(result.bool){
+ event.goto(0);
+ }
+ else{
+ player.gain(event.cards);
+ }
+ },
+ ai:{
+ threaten:1.4
+ }
+ },
+ lingxin:{
+ trigger:{player:'phaseEnd'},
+ frequent:true,
+ content:function(){
+ "step 0"
+ event.cards=get.cards(Math.max(3,get.cardCount(true,player)+1));
+ player.showCards(event.cards);
+ "step 1"
+ for(var i=0;i=3;;
+ },
+ content:function(){
+ player.phase();
+ },
+ ai:{
+ order:-10,
+ result:{
+ target:2
+ }
+ }
+ },
+ xianjiang:{
+ enable:'phaseUse',
+ position:'he',
+ usable:1,
+ filterCard:function(card,player){
+ if(player.storage.xianjiang&&player.storage.xianjiang.contains(card)) return false;
+ return get.type(card)=='equip';
+ },
+ init:function(player){
+ player.storage.xianjiang=[];
+ },
+ check:function(card){
+ return 10-ai.get.value(card);
+ },
+ prompt:'将一张装备牌永久转化为任意一张装备牌',
+ content:function(){
+ "step 0"
+ var list=[];
+ var suit=get.suit(cards[0]);
+ var number=get.number(cards[0]);
+ for(var i in lib.card){
+ if(lib.card[i].mode&&lib.card[i].mode.contains(lib.config.mode)==false) continue;
+ if(lib.card[i].type=='equip'&&cards[0].name!=i){
+ if(ai.get.equipValue({name:i})<10) list.push([suit,number,i]);
+ }
+ }
+ var dialog=ui.create.dialog([list,'vcard']);
+ player.chooseButton(dialog,true,function(button){
+ return ai.get.value({name:button.link[2]},player);
+ });
+ "step 1"
+ cards[0].init(result.buttons[0].link);
+ player.gain(cards[0]);
+ player.$gain(cards[0]);
+ game.delay();
+ player.storage.xianjiang.add(cards[0]);
+ },
+ ai:{
+ order:9,
+ result:{
+ player:1
+ },
+ threaten:2,
+ }
+ },
+ xianjiang2:{
+ trigger:{player:'phaseUseBegin'},
+ forced:true,
+ popup:false,
+ filter:function(event,player){
+ return player.skills.contains('xianjiang');
+ },
+ content:function(){
+ player.storage.xianjiang=[];
+ }
+ },
+ xianjiang3:{
+ enable:'phaseUse',
+ filterCard:function(card){
+ return get.type(card,'trick')=='trick';
+ },
+ usable:1,
+ filter:function(event,player){return player.num('e')==0},
+ selectCard:1,
+ check:function(card){
+ return 8-ai.get.value(card);
+ },
+ content:function(){
+ for(var i=0;i0) return 0.6/player.num('he');
+ return;
+ }
+ }
+ }
+ if(get.tag(card,'respondSha')){
+ for(var i=0;i0) return 0.6/player.num('he');
+ return;
+ }
+ }
+ }
+ }
+ }
+ },
+ },
+ huajian:{
+ trigger:{player:'phaseUseEnd'},
+ direct:true,
+ filter:function(event,player){
+ return player.num('he')>0;
+ },
+ content:function(){
+ "step 0"
+ var next=player.chooseCardTarget({
+ position:'he',
+ filterTarget:function(card,player,target){
+ return lib.filter.targetEnabled({name:'sha'},player,target);
+ },
+ filterCard:true,
+ ai1:function(card){
+ return ai.get.unuseful(card)+9;
+ },
+ ai2:function(target){
+ return ai.get.effect(target,{name:'sha'},player);
+ },
+ prompt:'是否发动【化剑】?'
+ });
+ "step 1"
+ if(result.bool){
+ player.logSkill('huajian');
+ player.useCard({name:'sha'},result.cards,result.targets,false);
+ }
+ },
+ ai:{
+ expose:0.2,
+ }
+ },
+ polang:{
+ trigger:{source:'damageEnd'},
+ // group:'unequip',
+ check:function(event,player){
+ return ai.get.attitude(player,event.player)<0;
+ },
+ filter:function(event,player){
+ return event.player.num('e');
+ },
+ content:function(){
+ trigger.player.discard(trigger.player.get('e'));
+ },
+ ai:{
+ expose:0.3
+ },
+ // mod:{
+ // targetInRange:function(){
+ // return true;
+ // }
+ // }
+ // group:'polang2'
+ },
+ jikong:{
+ trigger:{player:'loseEnd'},
+ direct:true,
+ filter:function(event,player){
+ if(player.num('h')) return false;
+ for(var i=0;iplayer.num('h');
+ // },
+ // content:function(){
+ // player.draw(trigger.source.num('h')-player.num('h'));
+ // },
+ // ai:{
+ // effect:{
+ // target:function(card,player,target){
+ // if(get.tag(card,'damage')){
+ // var num=player.num('h')-target.num('h');
+ // if(num>0){
+ // if(player.hp>=4) return [1,num];
+ // if(target.hp==3) return [1,num*0.5];
+ // if(target.hp==2) return [1,num*0.2];
+ // }
+ // }
+ // }
+ // }
+ // }
+ // },
+ jikong2:{
+ trigger:{player:'phaseBegin'},
+ direct:true,
+ // filter:function(event,player){
+ // return player.num('he')>0;
+ // },
+ content:function(){
+ "step 0"
+ player.chooseTarget('是否发动【亟空】?',function(card,player,target){
+ return lib.filter.targetEnabled({name:'sha',nature:'thunder'},player,target);
+ }).ai=function(target){
+ return ai.get.effect(target,{name:'sha',nature:'thunder'},player);
+ }
+ "step 1"
+ if(result.bool){
+ player.logSkill('jikong');
+ player.useCard({name:'sha',nature:'thunder'},result.targets,false);
+ }
+ },
+ ai:{
+ expose:0.2,
+ }
+ },
+ xielei:{
+ trigger:{player:['useCard','respondAfter']},
+ direct:true,
+ filter:function(event){
+ return game.players.length>2&&event.card&&event.card.name=='sha';
+ },
+ content:function(){
+ "step 0"
+ game.delay(0.5);
+ player.chooseTarget('是否发动【挟雷】?',function(card,player,target){
+ if(player==target) return false;
+ if(trigger.name=='respond'){
+ return trigger.source!=target;
+ }
+ else{
+ return !trigger.targets.contains(target);
+ }
+ }).ai=function(target){
+ return ai.get.damageEffect(target,player,player,'thunder');
+ }
+ "step 1"
+ if(result.bool){
+ player.logSkill('xielei',result.targets,'thunder');
+ result.targets[0].damage('thunder');
+ }
+ },
+ ai:{
+ expose:0.3,
+ threaten:1.6
+ }
+ },
+ ningjian:{
+ group:['ningjian1','ningjian2'],
+ ai:{
+ effect:{
+ target:function(card,player,target){
+ if(target.num('he')&&(get.tag(card,'respondShan')||get.tag(card,'respondSha'))) return 0.6
+ }
+ },
+ respondSha:true,
+ respondShan:true,
+ }
+ },
+ ningjian1:{
+ enable:['chooseToRespond','chooseToUse'],
+ filterCard:{color:'black'},
+ viewAs:{name:'sha'},
+ position:'he',
+ prompt:'将一张黑色牌当杀打出',
+ check:function(card){return 6-ai.get.value(card)}
+ },
+ ningjian2:{
+ enable:['chooseToRespond','chooseToUse'],
+ filterCard:{color:'red'},
+ viewAs:{name:'shan'},
+ position:'he',
+ prompt:'将一张红色牌当闪打出',
+ check:function(card){return 6-ai.get.value(card)}
+ },
+ duoren:{
+ trigger:{target:'shaMiss'},
+ filter:function(event){
+ return event.player.get('e','1')!=undefined;
+ },
+ check:function(event,player){
+ return ai.get.attitude(player,event.player)<0;
+ },
+ priority:5,
+ content:function(){
+ trigger.player.$give(trigger.player.get('e','1'),player);
+ player.gain(trigger.player.get('e','1'));
+ },
+ ai:{
+ effect:{
+ target:function(card,player,target,current){
+ if(card.name=='sha'&&target.num('h')>1&&player.get('e','1')){
+ return [1,0.5,0,-0.5];
+ }
+ }
+ }
+ }
+ // filter:function(event){
+ // return event.player.num('e')>0;
+ // },
+ // content:function(){
+ // "step 0"
+ // player.choosePlayerCard('是否获得'+get.translation(trigger.player)+'的一张装备牌?',
+ // 'e',trigger.player).ai=ai.get.buttonValue;
+ // "step 1"
+ // if(result.bool){
+ // var card=result.buttons[0].link;
+ // trigger.player.$give(card,player);
+ // player.gain(card);
+ // }
+ // },
+ },
+ taixu:{
+ enable:'phaseUse',
+ filter:function(event,player){
+ return (!player.storage.taixu)&&player.num('hej');
+ },
+ filterTarget:function(card,player,target){
+ return player!=target&&target.hp>1;
+ },
+ content:function(){
+ player.discard(player.get('hej'));
+ player.storage.taixu=true;
+ target.damage(player.maxHp-player.hp);
+ },
+ ai:{
+ basic:{
+ order:1,
+ },
+ result:{
+ target:function(player,target){
+ if(player.maxHp-player.hp<2) return 0;
+ return -2;
+ },
+ player:function(player,target){
+ return -0.5*player.num('he');
+ }
+ }
+ }
+ },
+ pozhen:{
+ trigger:{player:'damageEnd'},
+ filter:function(event,player){
+ return event.source&&event.source.num('h')!=player.num('h');
+ },
+ // check:function(event,player){
+ // return ai.get.attitude(player,event.source)<0;
+ // },
+ direct:true,
+ content:function(){
+ "step 0"
+ var num=player.num('h')-trigger.source.num('h');
+ event.num=num;
+ if(num>0){
+ player.chooseToDiscard(num,'是否弃置'+num+'张手牌,并对'+get.translation(trigger.source)+'造成一点伤害?').ai=function(card){
+ if(ai.get.damageEffect(trigger.source,player,player)>0&&num<=2){
+ return 6-ai.get.value(card);
+ }
+ return -1;
+ }
+ }
+ else if(num<0){
+ player.chooseBool('是否弃置'+get.translation(trigger.source)+(-num)+'张手牌?').ai=function(){
+ return ai.get.attitude(player,trigger.source)<0;
+ }
+ }
+ else{
+ event.finish();
+ }
+ "step 1"
+ if(result.bool){
+ player.logSkill('pozhen',trigger.source);
+ if(event.num>0){
+ trigger.source.damage();
+ }
+ else{
+ var cards=trigger.source.get('h');
+ cards.sort(lib.sort.random);
+ trigger.source.discard(cards.slice(0,-event.num));
+ }
+ }
+ },
+ ai:{
+ effect:{
+ target:function(card,player,target){
+ if(get.tag(card,'damage')){
+ if(player.skills.contains('jueqing')) return [1,-1];
+ var num=player.num('h')-target.num('h');
+ if(num>0){
+ return [1,0,0,-num/2];
+ }
+ if(num<0){
+ return [1,0,0,-0.5];
+ }
+ }
+ }
+ }
+ }
+ },
+ tanlin_defence:{
+ trigger:{player:'damageEnd'},
+ filter:function(event,player){
+ return player.num('h')&&event.source&&event.source.num('h');
+ },
+ direct:true,
+ content:function(){
+ "step 0"
+ player.chooseToDiscard([1,trigger.source.num('h')],'弃置任意张手牌并令伤害来源弃置等量手牌').ai=function(card){
+ if(ui.selected.cards.length>=trigger.source.num('h')) return -1;
+ if(ui.selected.cards.length==0) return 8-ai.get.value(card);
+ return 4-ai.get.value(card);
+ }
+ "step 1"
+ if(result.bool){
+ player.logSkill('tanlin');
+ trigger.source.discard(trigger.source.get('h',lib.sort.random,result.cards.length));
+ }
+ else{
+ event.finish();
+ }
+ "step 2"
+ player.draw();
+ },
+ ai:{
+ effect:{
+ target:function(card,player,target){
+ if(get.tag(card,'damage')&&target.num('h')&&target.hp>1&&player!=target) return [1,0.2,0,-0.2];
+ }
+ }
+ }
+ },
+ tanlin:{
+ enable:'phaseUse',
+ usable:1,
+ group:'tanlin4',
+ filterTarget:function(card,player,target){
+ return player!=target&&target.num('h');
+ },
+ filter:function(event,player){
+ return player.num('h')>0;
+ },
+ content:function(){
+ "step 0"
+ player.chooseToCompare(target);
+ "step 1"
+ if(result.bool){
+ if(target.skills.contains('tanlin2')==false){
+ target.addSkill('tanlin2');
+ player.addSkill('tanlin3');
+ player.gain([result.player,result.target]);
+ player.$gain2([result.player,result.target]);
+ }
+ }
+ else{
+ player.damage(target);
+ }
+ },
+ ai:{
+ result:{
+ target:function(player,target){
+ var cards=player.get('h');
+ var num=target.num('h');
+ if(num>cards.length+3&&player.hp>1) return -2;
+ if(num>cards.length+1&&player.hp>1) return -1;
+ if(num==cards.length-1&&player.hp>1) return -1;
+ for(var i=0;i9) return num==1?-1:-0.5;
+ }
+ return 0;
+ }
+ },
+ order:9,
+ }
+ },
+ tanlin2:{
+ trigger:{global:'phaseAfter'},
+ forced:true,
+ content:function(){
+ player.removeSkill('tanlin2');
+ },
+ // mod:{
+ // cardEnabled:function(){
+ // return false;
+ // },
+ // cardUsable:function(){
+ // return false;
+ // },
+ // cardRespondable:function(){
+ // return false;
+ // },
+ // cardSavable:function(){
+ // return false;
+ // }
+ // },
+ },
+ tanlin3:{
+ trigger:{global:'phaseAfter'},
+ forced:true,
+ popup:false,
+ content:function(){
+ player.removeSkill('tanlin3');
+ },
+ mod:{
+ cardUsable:function(card,player,num){
+ if(card.name=='sha') return num+1;
+ }
+ },
+ },
+ tanlin4:{
+ mod:{
+ targetInRange:function(card,player,target,now){
+ if(target.skills.contains('tanlin2')) return true;
+ },
+ },
+ },
+ yunchou:{
+ enable:'phaseUse',
+ usable:1,
+ filterTarget:function(card,player,target){
+ return player!=target&&target.num('h');
+ },
+ filterCard:true,
+ selectCard:[1,Infinity],
+ content:function(){
+ "step 0"
+ var card=target.get('h').randomGet();
+ target.discard(card);
+ var color=get.color(card);
+ var suit=get.suit(card);
+ var num1=0,num2=0;
+ for(var i=0;i0;
+ },
+ filterTarget:function(card,player,target){
+ var names=[];
+ if(target.name&&!target.classList.contains('unseen')) names.add(target.name);
+ if(target.name1&&!target.classList.contains('unseen')) names.add(target.name1);
+ if(target.name2&&!target.classList.contains('unseen2')) names.add(target.name2);
+ var pss=player.get('s');
+ for(var i=0;i