Merge branch 'master' of https://github.com/libccy/noname
This commit is contained in:
commit
7aecf91ed0
|
@ -32,3 +32,4 @@
|
||||||
- [ ] 如果此次PR需要扩展跟进,我已在`扩展适配`中写入详细文档
|
- [ ] 如果此次PR需要扩展跟进,我已在`扩展适配`中写入详细文档
|
||||||
- [ ] 如果这个PR解决了一个issue,我在`诱因和背景`中明确链接到该issue
|
- [ ] 如果这个PR解决了一个issue,我在`诱因和背景`中明确链接到该issue
|
||||||
- [ ] 我保证该PR中没有随意修改换行符等内容,没有制造出大量的Diff
|
- [ ] 我保证该PR中没有随意修改换行符等内容,没有制造出大量的Diff
|
||||||
|
- [ ] 我保证该PR遵循项目中`.editorconfig`、`eslint.config.mjs`和`prettier.config.mjs`所规定的代码样式,并且已经通过`prettier`格式化过代码
|
||||||
|
|
|
@ -30,3 +30,4 @@ noname.ico
|
||||||
package-lock.json
|
package-lock.json
|
||||||
package.json
|
package.json
|
||||||
Thumbs.db
|
Thumbs.db
|
||||||
|
bun.lockb
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
1791
card/extra.js
1791
card/extra.js
File diff suppressed because it is too large
Load Diff
3002
card/gujian.js
3002
card/gujian.js
File diff suppressed because it is too large
Load Diff
3271
card/guozhan.js
3271
card/guozhan.js
File diff suppressed because it is too large
Load Diff
3498
card/gwent.js
3498
card/gwent.js
File diff suppressed because it is too large
Load Diff
1109
card/hearth.js
1109
card/hearth.js
File diff suppressed because it is too large
Load Diff
|
@ -1,290 +1,316 @@
|
||||||
'use strict';
|
import { lib, game, ui, get, ai, _status } from "../noname.js";
|
||||||
game.import('card',function(lib,game,ui,get,ai,_status){
|
game.import("card", function () {
|
||||||
return {
|
return {
|
||||||
name:'huanlekapai',
|
name: "huanlekapai",
|
||||||
connect:true,
|
connect: true,
|
||||||
card:{
|
card: {
|
||||||
"monkey":{
|
monkey: {
|
||||||
audio:true,
|
audio: true,
|
||||||
fullskin:true,
|
fullskin: true,
|
||||||
type:"equip",
|
type: "equip",
|
||||||
subtype:"equip5",
|
subtype: "equip5",
|
||||||
skills:["monkey"],
|
skills: ["monkey"],
|
||||||
ai:{
|
ai: {
|
||||||
basic:{
|
basic: {
|
||||||
equipValue:8,
|
equipValue: 8,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"mianju":{
|
mianju: {
|
||||||
audio:true,
|
audio: true,
|
||||||
fullskin:true,
|
fullskin: true,
|
||||||
type:"equip",
|
type: "equip",
|
||||||
subtype:"equip2",
|
subtype: "equip2",
|
||||||
skills:["mianju"],
|
skills: ["mianju"],
|
||||||
ai:{
|
ai: {
|
||||||
order:9.5,
|
order: 9.5,
|
||||||
basic:{
|
basic: {
|
||||||
equipValue:function (card,player){
|
equipValue: function (card, player) {
|
||||||
if(!player.isTurnedOver()) return 6;
|
if (!player.isTurnedOver()) return 6;
|
||||||
if(player.isTurnedOver()) return -10;
|
if (player.isTurnedOver()) return -10;
|
||||||
return 0;
|
return 0;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"shoulijian":{
|
shoulijian: {
|
||||||
audio:true,
|
audio: true,
|
||||||
type:"basic",
|
type: "basic",
|
||||||
enable:true,
|
enable: true,
|
||||||
fullskin:true,
|
fullskin: true,
|
||||||
outrange:{
|
outrange: {
|
||||||
global:2,
|
global: 2,
|
||||||
},
|
},
|
||||||
filterTarget:lib.filter.notMe,
|
filterTarget: lib.filter.notMe,
|
||||||
content:function (){
|
content: function () {
|
||||||
"step 0"
|
"step 0";
|
||||||
if(!target.countCards('he',{type:'equip'})){
|
if (!target.countCards("he", { type: "equip" })) {
|
||||||
target.damage();
|
target.damage();
|
||||||
event.finish();
|
event.finish();
|
||||||
}
|
} else {
|
||||||
else{
|
target.chooseToDiscard("he", { type: "equip" }, "弃置一张装备牌或受到1点伤害").ai =
|
||||||
target.chooseToDiscard('he',{type:'equip'},'弃置一张装备牌或受到1点伤害').ai=function(card){
|
function (card) {
|
||||||
var player=_status.event.player;
|
var player = _status.event.player;
|
||||||
var source=_status.event.getParent().player;
|
var source = _status.event.getParent().player;
|
||||||
if(get.damageEffect(player,source,player)>0) return -1;
|
if (get.damageEffect(player, source, player) > 0) return -1;
|
||||||
return 7-get.value(card);
|
return 7 - get.value(card);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
"step 1"
|
"step 1";
|
||||||
if(!result.bool){
|
if (!result.bool) {
|
||||||
target.damage();
|
target.damage();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
ai:{
|
ai: {
|
||||||
basic:{
|
basic: {
|
||||||
order:9,
|
order: 9,
|
||||||
value:6,
|
value: 6,
|
||||||
useful:2,
|
useful: 2,
|
||||||
},
|
},
|
||||||
result:{
|
result: {
|
||||||
target:-2,
|
target: -2,
|
||||||
},
|
},
|
||||||
tag:{
|
tag: {
|
||||||
discard:1,
|
discard: 1,
|
||||||
damage:1,
|
damage: 1,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
selectTarget:1,
|
selectTarget: 1,
|
||||||
},
|
},
|
||||||
"kuwu":{
|
kuwu: {
|
||||||
audio:true,
|
audio: true,
|
||||||
fullskin:true,
|
fullskin: true,
|
||||||
type:"equip",
|
type: "equip",
|
||||||
subtype:"equip1",
|
subtype: "equip1",
|
||||||
skills:["kuwu"],
|
skills: ["kuwu"],
|
||||||
nomod:true,
|
nomod: true,
|
||||||
nopower:true,
|
nopower: true,
|
||||||
unique:true,
|
unique: true,
|
||||||
distance:{
|
distance: {
|
||||||
attackFrom:-1,
|
attackFrom: -1,
|
||||||
},
|
},
|
||||||
ai:{
|
ai: {
|
||||||
equipValue:6,
|
equipValue: 6,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"xuelunyang":{
|
xuelunyang: {
|
||||||
audio:true,
|
audio: true,
|
||||||
fullskin:true,
|
fullskin: true,
|
||||||
type:"equip",
|
type: "equip",
|
||||||
subtype:"equip5",
|
subtype: "equip5",
|
||||||
skills:["xuelunyang"],
|
skills: ["xuelunyang"],
|
||||||
ai:{
|
ai: {
|
||||||
basic:{
|
basic: {
|
||||||
equipValue:8,
|
equipValue: 8,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"jiuwei":{
|
jiuwei: {
|
||||||
audio:true,
|
audio: true,
|
||||||
fullskin:true,
|
fullskin: true,
|
||||||
type:"equip",
|
type: "equip",
|
||||||
subtype:"equip5",
|
subtype: "equip5",
|
||||||
skills:["jiuwei"],
|
skills: ["jiuwei"],
|
||||||
ai:{
|
ai: {
|
||||||
basic:{
|
basic: {
|
||||||
equipValue:8,
|
equipValue: 8,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
skill:{
|
skill: {
|
||||||
"monkey":{
|
monkey: {
|
||||||
trigger:{
|
trigger: {
|
||||||
global:"useCardToBegin",
|
global: "useCardToBegin",
|
||||||
},
|
},
|
||||||
audio:true,
|
audio: true,
|
||||||
filter:function (event,player){
|
filter: function (event, player) {
|
||||||
var card=player.getEquip(5);
|
var card = player.getEquip(5);
|
||||||
if(card){
|
if (card) {
|
||||||
var name=card.name;
|
var name = card.name;
|
||||||
if(name&&name.indexOf('monkey')!=-1&&event.name=='tao'&&event.player!=player&&event.cards.filterInD().length>0) return true;
|
if (
|
||||||
|
name &&
|
||||||
|
name.indexOf("monkey") != -1 &&
|
||||||
|
event.name == "tao" &&
|
||||||
|
event.player != player &&
|
||||||
|
event.cards.filterInD().length > 0
|
||||||
|
)
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
check:function (event,player){
|
check: function (event, player) {
|
||||||
return get.attitude(player,event.player)<=0;
|
return get.attitude(player, event.player) <= 0;
|
||||||
},
|
},
|
||||||
content:function (){
|
content: function () {
|
||||||
"step 0"
|
"step 0";
|
||||||
player.$fullscreenpop('猴子偷桃','fire');
|
player.$fullscreenpop("猴子偷桃", "fire");
|
||||||
trigger.untrigger();
|
trigger.untrigger();
|
||||||
trigger.finish();
|
trigger.finish();
|
||||||
"step 1"
|
"step 1";
|
||||||
player.discard(player.getEquip(5));
|
player.discard(player.getEquip(5));
|
||||||
"step 2"
|
"step 2";
|
||||||
player.gain(trigger.cards.filterInD(),'gain2','log');
|
player.gain(trigger.cards.filterInD(), "gain2", "log");
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"mianju":{
|
mianju: {
|
||||||
audio:true,
|
audio: true,
|
||||||
trigger:{
|
trigger: {
|
||||||
player:"turnOverBefore",
|
player: "turnOverBefore",
|
||||||
},
|
},
|
||||||
forced:true,
|
forced: true,
|
||||||
equipSkill:true,
|
equipSkill: true,
|
||||||
content:function (){
|
content: function () {
|
||||||
trigger.cancel();
|
trigger.cancel();
|
||||||
},
|
},
|
||||||
ai:{
|
ai: {
|
||||||
noturnOver:true,
|
noturnOver: true,
|
||||||
effect:{
|
effect: {
|
||||||
target:function (card,player,target,current){
|
target: function (card, player, target, current) {
|
||||||
if(get.tag(card,'turnOver')) return [0,0];
|
if (get.tag(card, "turnOver")) return [0, 0];
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"kuwu":{
|
kuwu: {
|
||||||
audio:true,
|
audio: true,
|
||||||
trigger:{
|
trigger: {
|
||||||
source:"damageSource",
|
source: "damageSource",
|
||||||
},
|
},
|
||||||
forced:true,
|
forced: true,
|
||||||
equipSkill:true,
|
equipSkill: true,
|
||||||
filter:function (event,player){
|
filter: function (event, player) {
|
||||||
if(event._notrigger.includes(event.player)) return false;
|
if (event._notrigger.includes(event.player)) return false;
|
||||||
return event.card&&event.card.name=='sha'&&event.notLink()&&event.player.countCards('he')>0;
|
return (
|
||||||
|
event.card &&
|
||||||
|
event.card.name == "sha" &&
|
||||||
|
event.notLink() &&
|
||||||
|
event.player.countCards("he") > 0
|
||||||
|
);
|
||||||
},
|
},
|
||||||
content:function (){
|
content: function () {
|
||||||
trigger.player.chooseToDiscard(true,'he');
|
trigger.player.chooseToDiscard(true, "he");
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"xuelunyang":{
|
xuelunyang: {
|
||||||
audio:true,
|
audio: true,
|
||||||
trigger:{
|
trigger: {
|
||||||
player:"phaseBegin",
|
player: "phaseBegin",
|
||||||
},
|
},
|
||||||
equipSkill:true,
|
equipSkill: true,
|
||||||
direct:true,
|
direct: true,
|
||||||
content:function(){
|
content: function () {
|
||||||
'step 0'
|
"step 0";
|
||||||
player.chooseTarget(get.prompt2('xuelunyang'),function(card,player,target){
|
player
|
||||||
var names=[];
|
.chooseTarget(get.prompt2("xuelunyang"), function (card, player, target) {
|
||||||
if(target.name&&!target.isUnseen(0)) names.add(target.name);
|
var names = [];
|
||||||
if(target.name1&&!target.isUnseen(0)) names.add(target.name1);
|
if (target.name && !target.isUnseen(0)) names.add(target.name);
|
||||||
if(target.name2&&!target.isUnseen(1)) names.add(target.name2);
|
if (target.name1 && !target.isUnseen(0)) names.add(target.name1);
|
||||||
var pss=player.getSkills();
|
if (target.name2 && !target.isUnseen(1)) names.add(target.name2);
|
||||||
for(var i=0;i<names.length;i++){
|
var pss = player.getSkills();
|
||||||
var info=lib.character[names[i]];
|
for (var i = 0; i < names.length; i++) {
|
||||||
if(info){
|
var info = lib.character[names[i]];
|
||||||
var skills=info[3];
|
if (info) {
|
||||||
for(var j=0;j<skills.length;j++){
|
var skills = info[3];
|
||||||
if(lib.translate[skills[j]+'_info']&&lib.skill[skills[j]]&&
|
for (var j = 0; j < skills.length; j++) {
|
||||||
!lib.skill[skills[j]].unique&&!pss.includes(skills[j])){
|
if (
|
||||||
|
lib.translate[skills[j] + "_info"] &&
|
||||||
|
lib.skill[skills[j]] &&
|
||||||
|
!lib.skill[skills[j]].unique &&
|
||||||
|
!pss.includes(skills[j])
|
||||||
|
) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}).set('ai',function(target){
|
})
|
||||||
|
.set("ai", function (target) {
|
||||||
return Math.random();
|
return Math.random();
|
||||||
});
|
});
|
||||||
'step 1'
|
"step 1";
|
||||||
if(result.bool){
|
if (result.bool) {
|
||||||
event.target=result.targets[0];
|
event.target = result.targets[0];
|
||||||
player.logSkill('xuelunyang',event.target);
|
player.logSkill("xuelunyang", event.target);
|
||||||
}
|
} else {
|
||||||
else{
|
|
||||||
event.finish();
|
event.finish();
|
||||||
}
|
}
|
||||||
'step 2'
|
"step 2";
|
||||||
var names=[];
|
var names = [];
|
||||||
var list=[];
|
var list = [];
|
||||||
if(target.name&&!target.isUnseen(0)) names.add(target.name);
|
if (target.name && !target.isUnseen(0)) names.add(target.name);
|
||||||
if(target.name1&&!target.isUnseen(0)) names.add(target.name1);
|
if (target.name1 && !target.isUnseen(0)) names.add(target.name1);
|
||||||
if(target.name2&&!target.isUnseen(1)) names.add(target.name2);
|
if (target.name2 && !target.isUnseen(1)) names.add(target.name2);
|
||||||
var pss=player.getSkills();
|
var pss = player.getSkills();
|
||||||
for(var i=0;i<names.length;i++){
|
for (var i = 0; i < names.length; i++) {
|
||||||
var info=lib.character[names[i]];
|
var info = lib.character[names[i]];
|
||||||
if(info){
|
if (info) {
|
||||||
var skills=info[3];
|
var skills = info[3];
|
||||||
for(var j=0;j<skills.length;j++){
|
for (var j = 0; j < skills.length; j++) {
|
||||||
if(lib.translate[skills[j]+'_info']&&lib.skill[skills[j]]&&
|
if (
|
||||||
!lib.skill[skills[j]].unique&&
|
lib.translate[skills[j] + "_info"] &&
|
||||||
!pss.includes(skills[j])){
|
lib.skill[skills[j]] &&
|
||||||
|
!lib.skill[skills[j]].unique &&
|
||||||
|
!pss.includes(skills[j])
|
||||||
|
) {
|
||||||
list.push(skills[j]);
|
list.push(skills[j]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
player.chooseControl(list).set('prompt','选择获得一个技能').set('choice',get.max(list,get.skillRank,'item')).set('ai',function(){return _status.event.choice})
|
player
|
||||||
'step 3'
|
.chooseControl(list)
|
||||||
|
.set("prompt", "选择获得一个技能")
|
||||||
|
.set("choice", get.max(list, get.skillRank, "item"))
|
||||||
|
.set("ai", function () {
|
||||||
|
return _status.event.choice;
|
||||||
|
});
|
||||||
|
"step 3";
|
||||||
player.addTempSkill(result.control);
|
player.addTempSkill(result.control);
|
||||||
player.popup(result.control);
|
player.popup(result.control);
|
||||||
game.log(player,'获得了','#g【'+get.translation(result.control)+'】');
|
game.log(player, "获得了", "#g【" + get.translation(result.control) + "】");
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"jiuwei":{
|
jiuwei: {
|
||||||
trigger:{
|
trigger: {
|
||||||
player:"phaseEnd",
|
player: "phaseEnd",
|
||||||
},
|
},
|
||||||
audio:true,
|
audio: true,
|
||||||
frequent:true,
|
frequent: true,
|
||||||
equipSkill:true,
|
equipSkill: true,
|
||||||
content:function (){
|
content: function () {
|
||||||
if(player.isDamaged()){
|
if (player.isDamaged()) {
|
||||||
player.recover();
|
player.recover();
|
||||||
}
|
} else {
|
||||||
else{
|
|
||||||
player.draw();
|
player.draw();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
translate:{
|
translate: {
|
||||||
"monkey":"猴子",
|
monkey: "猴子",
|
||||||
"monkey_info":"猴子偷桃:当场上有其他角色使用【桃】时,你可以弃掉【猴子】,阻止【桃】的结算并将其收为手牌。",
|
monkey_info:
|
||||||
"mianju":"漩涡面具",
|
"猴子偷桃:当场上有其他角色使用【桃】时,你可以弃掉【猴子】,阻止【桃】的结算并将其收为手牌。",
|
||||||
"mianju_info":"<font color=#f00>锁定技</font> 你的武将牌不能被翻面。",
|
mianju: "漩涡面具",
|
||||||
"shoulijian":"手里剑",
|
mianju_info: "<font color=#f00>锁定技</font> 你的武将牌不能被翻面。",
|
||||||
"shoulijian_info":"出牌阶段,对一名距离1以外的角色使用,令其弃置一张装备牌或受到1点伤害。",
|
shoulijian: "手里剑",
|
||||||
"kuwu":"苦无",
|
shoulijian_info: "出牌阶段,对一名距离1以外的角色使用,令其弃置一张装备牌或受到1点伤害。",
|
||||||
"kuwu_info":"<font color=#f00>锁定技</font> 每当你使用【杀】造成一次伤害,受伤角色须弃置一张牌。",
|
kuwu: "苦无",
|
||||||
"xuelunyang":"写轮眼",
|
kuwu_info: "<font color=#f00>锁定技</font> 每当你使用【杀】造成一次伤害,受伤角色须弃置一张牌。",
|
||||||
"xuelunyang_info":"回合开始阶段,你可以选择一名角色,然后获得其一项技能,直到回合结束。",
|
xuelunyang: "写轮眼",
|
||||||
"jiuwei":"九尾",
|
xuelunyang_info: "回合开始阶段,你可以选择一名角色,然后获得其一项技能,直到回合结束。",
|
||||||
"jiuwei_info":"(收集查克拉)回合结束时,若你已受伤,你可回复1点体力,否则摸一张牌。",
|
jiuwei: "九尾",
|
||||||
|
jiuwei_info: "(收集查克拉)回合结束时,若你已受伤,你可回复1点体力,否则摸一张牌。",
|
||||||
},
|
},
|
||||||
list:[
|
list: [
|
||||||
["diamond","5","monkey"],
|
["diamond", "5", "monkey"],
|
||||||
["heart","9","jiuwei"],
|
["heart", "9", "jiuwei"],
|
||||||
["heart","2","xuelunyang"],
|
["heart", "2", "xuelunyang"],
|
||||||
["spade","6","kuwu"],
|
["spade", "6", "kuwu"],
|
||||||
["diamond","4","shoulijian"],
|
["diamond", "4", "shoulijian"],
|
||||||
["spade","4","shoulijian"],
|
["spade", "4", "shoulijian"],
|
||||||
["club","3","mianju"],
|
["club", "3", "mianju"],
|
||||||
],
|
],
|
||||||
}
|
};
|
||||||
});
|
});
|
||||||
|
|
1184
card/mtg.js
1184
card/mtg.js
File diff suppressed because it is too large
Load Diff
1073
card/sp.js
1073
card/sp.js
File diff suppressed because it is too large
Load Diff
6142
card/standard.js
6142
card/standard.js
File diff suppressed because it is too large
Load Diff
8565
card/swd.js
8565
card/swd.js
File diff suppressed because it is too large
Load Diff
1597
card/yingbian.js
1597
card/yingbian.js
File diff suppressed because it is too large
Load Diff
1357
card/yongjian.js
1357
card/yongjian.js
File diff suppressed because it is too large
Load Diff
1494
card/yunchou.js
1494
card/yunchou.js
File diff suppressed because it is too large
Load Diff
590
card/zhenfa.js
590
card/zhenfa.js
|
@ -1,396 +1,412 @@
|
||||||
'use strict';
|
import { lib, game, ui, get, ai, _status } from "../noname.js";
|
||||||
game.import('card',function(lib,game,ui,get,ai,_status){
|
game.import("card", function () {
|
||||||
return {
|
return {
|
||||||
name:'zhenfa',
|
name: "zhenfa",
|
||||||
card:{
|
card: {
|
||||||
pozhenjue:{
|
pozhenjue: {
|
||||||
type:'zhenfa',
|
type: "zhenfa",
|
||||||
recastable:true,
|
recastable: true,
|
||||||
enable:true,
|
enable: true,
|
||||||
notarget:true,
|
notarget: true,
|
||||||
content:function(){
|
content: function () {
|
||||||
var targets=game.filterPlayer();
|
var targets = game.filterPlayer();
|
||||||
var n=targets.length;
|
var n = targets.length;
|
||||||
while(n--){
|
while (n--) {
|
||||||
game.swapSeat(targets.randomGet(),targets.randomGet());
|
game.swapSeat(targets.randomGet(), targets.randomGet());
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mode:['guozhan'],
|
mode: ["guozhan"],
|
||||||
ai:{
|
ai: {
|
||||||
order:8,
|
order: 8,
|
||||||
result:{
|
result: {
|
||||||
player:1,
|
player: 1,
|
||||||
},
|
},
|
||||||
}
|
|
||||||
},
|
},
|
||||||
changshezhen:{
|
},
|
||||||
type:'zhenfa',
|
changshezhen: {
|
||||||
recastable:true,
|
type: "zhenfa",
|
||||||
enable:function(card,player){
|
recastable: true,
|
||||||
if(player.inline()) return true;
|
enable: function (card, player) {
|
||||||
if(player.identity=='unknown'||player.identity=='ye') return false;
|
if (player.inline()) return true;
|
||||||
return game.hasPlayer(function(current){
|
if (player.identity == "unknown" || player.identity == "ye") return false;
|
||||||
return current!=player&¤t.isFriendOf(player);
|
return game.hasPlayer(function (current) {
|
||||||
|
return current != player && current.isFriendOf(player);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
notarget:true,
|
notarget: true,
|
||||||
content:function(){
|
content: function () {
|
||||||
if(player.inline()){
|
if (player.inline()) {
|
||||||
var targets=game.filterPlayer(function(current){
|
var targets = game.filterPlayer(function (current) {
|
||||||
return player.inline(current);
|
return player.inline(current);
|
||||||
});
|
});
|
||||||
player.line(targets);
|
player.line(targets);
|
||||||
game.asyncDraw(targets);
|
game.asyncDraw(targets);
|
||||||
}
|
} else if (player.getNext()) {
|
||||||
else if(player.getNext()){
|
var list = game.filterPlayer(function (current) {
|
||||||
var list=game.filterPlayer(function(current){
|
return current != player && current.isFriendOf(player);
|
||||||
return current!=player&¤t.isFriendOf(player);
|
|
||||||
});
|
});
|
||||||
if(list.length){
|
if (list.length) {
|
||||||
list.sort(function(a,b){
|
list.sort(function (a, b) {
|
||||||
return get.distance(player,a,'absolute')-get.distance(player,b,'absolute');
|
return (
|
||||||
|
get.distance(player, a, "absolute") - get.distance(player, b, "absolute")
|
||||||
|
);
|
||||||
});
|
});
|
||||||
player.line(list[0]);
|
player.line(list[0]);
|
||||||
game.swapSeat(list[0],player.getNext(),true,true);
|
game.swapSeat(list[0], player.getNext(), true, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mode:['guozhan'],
|
mode: ["guozhan"],
|
||||||
ai:{
|
ai: {
|
||||||
order:6.5,
|
order: 6.5,
|
||||||
result:{
|
result: {
|
||||||
player:1,
|
player: 1,
|
||||||
},
|
},
|
||||||
tag:{
|
tag: {
|
||||||
draw:1
|
draw: 1,
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
tianfuzhen:{
|
},
|
||||||
type:'zhenfa',
|
},
|
||||||
recastable:true,
|
tianfuzhen: {
|
||||||
enable:function(){
|
type: "zhenfa",
|
||||||
return game.hasPlayer(function(current){
|
recastable: true,
|
||||||
|
enable: function () {
|
||||||
|
return game.hasPlayer(function (current) {
|
||||||
return current.isMajor();
|
return current.isMajor();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
filterTarget:function(card,player,target){
|
filterTarget: function (card, player, target) {
|
||||||
return target.isMajor()&&target.countCards('he')>0;
|
return target.isMajor() && target.countCards("he") > 0;
|
||||||
},
|
},
|
||||||
selectTarget:-1,
|
selectTarget: -1,
|
||||||
content:function(){
|
content: function () {
|
||||||
target.chooseToDiscard('he',true).delay=false;
|
target.chooseToDiscard("he", true).delay = false;
|
||||||
},
|
},
|
||||||
mode:['guozhan'],
|
mode: ["guozhan"],
|
||||||
ai:{
|
ai: {
|
||||||
order:7,
|
order: 7,
|
||||||
result:{
|
result: {
|
||||||
target:-1,
|
target: -1,
|
||||||
},
|
},
|
||||||
tag:{
|
tag: {
|
||||||
discard:1
|
discard: 1,
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
dizaizhen:{
|
},
|
||||||
type:'zhenfa',
|
},
|
||||||
recastable:true,
|
dizaizhen: {
|
||||||
enable:function(){
|
type: "zhenfa",
|
||||||
return game.hasPlayer(function(current){
|
recastable: true,
|
||||||
|
enable: function () {
|
||||||
|
return game.hasPlayer(function (current) {
|
||||||
return current.isNotMajor();
|
return current.isNotMajor();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
filterTarget:function(card,player,target){
|
filterTarget: function (card, player, target) {
|
||||||
return target.isNotMajor();
|
return target.isNotMajor();
|
||||||
},
|
},
|
||||||
selectTarget:-1,
|
selectTarget: -1,
|
||||||
content:function(){
|
content: function () {
|
||||||
target.draw(false);
|
target.draw(false);
|
||||||
target.$draw();
|
target.$draw();
|
||||||
},
|
},
|
||||||
mode:['guozhan'],
|
mode: ["guozhan"],
|
||||||
ai:{
|
ai: {
|
||||||
order:7,
|
order: 7,
|
||||||
result:{
|
result: {
|
||||||
target:1,
|
target: 1,
|
||||||
},
|
},
|
||||||
tag:{
|
tag: {
|
||||||
draw:1
|
draw: 1,
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
fengyangzhen:{
|
},
|
||||||
type:'zhenfa',
|
},
|
||||||
recastable:true,
|
fengyangzhen: {
|
||||||
enable:true,
|
type: "zhenfa",
|
||||||
filterTarget:function(card,player,target){
|
recastable: true,
|
||||||
|
enable: true,
|
||||||
|
filterTarget: function (card, player, target) {
|
||||||
return target.sieged();
|
return target.sieged();
|
||||||
},
|
},
|
||||||
selectTarget:-1,
|
selectTarget: -1,
|
||||||
content:function(){
|
content: function () {
|
||||||
target.addTempSkill('feiying',{player:'damageAfter'});
|
target.addTempSkill("feiying", { player: "damageAfter" });
|
||||||
target.popup('feiying');
|
target.popup("feiying");
|
||||||
game.log(target,'获得了技能','【飞影】');
|
game.log(target, "获得了技能", "【飞影】");
|
||||||
},
|
},
|
||||||
mode:['guozhan'],
|
mode: ["guozhan"],
|
||||||
ai:{
|
ai: {
|
||||||
order:7,
|
order: 7,
|
||||||
result:{
|
result: {
|
||||||
target:2,
|
target: 2,
|
||||||
},
|
},
|
||||||
}
|
|
||||||
},
|
},
|
||||||
yunchuizhen:{
|
},
|
||||||
type:'zhenfa',
|
yunchuizhen: {
|
||||||
recastable:true,
|
type: "zhenfa",
|
||||||
enable:true,
|
recastable: true,
|
||||||
filterTarget:function(card,player,target){
|
enable: true,
|
||||||
|
filterTarget: function (card, player, target) {
|
||||||
return target.siege();
|
return target.siege();
|
||||||
},
|
},
|
||||||
selectTarget:-1,
|
selectTarget: -1,
|
||||||
content:function(){
|
content: function () {
|
||||||
target.addTempSkill('wushuang',{source:'damageAfter'});
|
target.addTempSkill("wushuang", { source: "damageAfter" });
|
||||||
target.popup('wushuang');
|
target.popup("wushuang");
|
||||||
game.log(target,'获得了技能','【无双】');
|
game.log(target, "获得了技能", "【无双】");
|
||||||
},
|
},
|
||||||
mode:['guozhan'],
|
mode: ["guozhan"],
|
||||||
ai:{
|
ai: {
|
||||||
order:7,
|
order: 7,
|
||||||
result:{
|
result: {
|
||||||
target:2,
|
target: 2,
|
||||||
},
|
},
|
||||||
}
|
|
||||||
},
|
},
|
||||||
qixingzhen:{
|
|
||||||
type:'zhenfa',
|
|
||||||
recastable:true,
|
|
||||||
enable:function(card,player){
|
|
||||||
return player.siege()||player.sieged();
|
|
||||||
},
|
},
|
||||||
filterTarget:function(card,player,target){
|
qixingzhen: {
|
||||||
return target==player;
|
type: "zhenfa",
|
||||||
|
recastable: true,
|
||||||
|
enable: function (card, player) {
|
||||||
|
return player.siege() || player.sieged();
|
||||||
},
|
},
|
||||||
selectTarget:-1,
|
filterTarget: function (card, player, target) {
|
||||||
content:function(){
|
return target == player;
|
||||||
'step 0'
|
},
|
||||||
event.targets=game.filterPlayer(function(current){
|
selectTarget: -1,
|
||||||
|
content: function () {
|
||||||
|
"step 0";
|
||||||
|
event.targets = game.filterPlayer(function (current) {
|
||||||
return current.siege(player);
|
return current.siege(player);
|
||||||
});
|
});
|
||||||
'step 1'
|
"step 1";
|
||||||
if(event.targets.length){
|
if (event.targets.length) {
|
||||||
var current=event.targets.shift();
|
var current = event.targets.shift();
|
||||||
player.line(current,'green');
|
player.line(current, "green");
|
||||||
player.discardPlayerCard(current,true);
|
player.discardPlayerCard(current, true);
|
||||||
event.redo();
|
event.redo();
|
||||||
}
|
}
|
||||||
'step 2'
|
"step 2";
|
||||||
var card={name:'sha',isCard:true};
|
var card = { name: "sha", isCard: true };
|
||||||
var list=game.filterPlayer(function(current){
|
var list = game.filterPlayer(function (current) {
|
||||||
return current.siege(player)&&player.canUse(card,current);
|
return current.siege(player) && player.canUse(card, current);
|
||||||
});
|
});
|
||||||
if(list.length){
|
if (list.length) {
|
||||||
player.useCard(card,list,false);
|
player.useCard(card, list, false);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mode:['guozhan'],
|
mode: ["guozhan"],
|
||||||
ai:{
|
ai: {
|
||||||
order:7,
|
order: 7,
|
||||||
result:{
|
result: {
|
||||||
target:1,
|
target: 1,
|
||||||
},
|
},
|
||||||
}
|
|
||||||
},
|
},
|
||||||
shepanzhen:{
|
},
|
||||||
type:'zhenfa',
|
shepanzhen: {
|
||||||
recastable:true,
|
type: "zhenfa",
|
||||||
enable:function(card,player){
|
recastable: true,
|
||||||
if(player.identity=='unknown'||player.identity=='ye') return false;
|
enable: function (card, player) {
|
||||||
if(get.population(player.identity)<=1) return false;
|
if (player.identity == "unknown" || player.identity == "ye") return false;
|
||||||
return game.hasPlayer(function(current){
|
if (get.population(player.identity) <= 1) return false;
|
||||||
return current!=player&¤t.identity==player.identity&&!player.inline(current);
|
return game.hasPlayer(function (current) {
|
||||||
|
return (
|
||||||
|
current != player &&
|
||||||
|
current.identity == player.identity &&
|
||||||
|
!player.inline(current)
|
||||||
|
);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
notarget:true,
|
notarget: true,
|
||||||
content:function(){
|
content: function () {
|
||||||
var targets=game.filterPlayer(function(current){
|
var targets = game.filterPlayer(function (current) {
|
||||||
return current.identity==player.identity;
|
return current.identity == player.identity;
|
||||||
});
|
});
|
||||||
targets.sortBySeat();
|
targets.sortBySeat();
|
||||||
for(var i=1;i<targets.length;i++){
|
for (var i = 1; i < targets.length; i++) {
|
||||||
game.swapSeat(targets[i],targets[i-1].next,false);
|
game.swapSeat(targets[i], targets[i - 1].next, false);
|
||||||
}
|
}
|
||||||
game.log(get.translation(player.identity)+'势力角色摆成了蛇蟠阵')
|
game.log(get.translation(player.identity) + "势力角色摆成了蛇蟠阵");
|
||||||
},
|
},
|
||||||
mode:['guozhan'],
|
mode: ["guozhan"],
|
||||||
ai:{
|
ai: {
|
||||||
order:7,
|
order: 7,
|
||||||
result:{
|
result: {
|
||||||
player:1,
|
player: 1,
|
||||||
},
|
},
|
||||||
}
|
|
||||||
},
|
},
|
||||||
longfeizhen:{
|
},
|
||||||
type:'zhenfa',
|
longfeizhen: {
|
||||||
recastable:true,
|
type: "zhenfa",
|
||||||
enable:function(card,player){
|
recastable: true,
|
||||||
|
enable: function (card, player) {
|
||||||
return player.next.siege(player);
|
return player.next.siege(player);
|
||||||
},
|
},
|
||||||
filterTarget:function(card,player,target){
|
filterTarget: function (card, player, target) {
|
||||||
if(target.getCards('he').length==0) return false;
|
if (target.getCards("he").length == 0) return false;
|
||||||
return target==player.next||target==player.previous;
|
return target == player.next || target == player.previous;
|
||||||
},
|
},
|
||||||
selectTarget:-1,
|
selectTarget: -1,
|
||||||
content:function(){
|
content: function () {
|
||||||
"step 0"
|
"step 0";
|
||||||
player.choosePlayerCard(target,'he',true);
|
player.choosePlayerCard(target, "he", true);
|
||||||
"step 1"
|
"step 1";
|
||||||
target.discard(result.buttons[0].link);
|
target.discard(result.buttons[0].link);
|
||||||
"step 2"
|
"step 2";
|
||||||
if(target==targets[targets.length-1]){
|
if (target == targets[targets.length - 1]) {
|
||||||
player.draw();
|
player.draw();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mode:['guozhan'],
|
mode: ["guozhan"],
|
||||||
ai:{
|
ai: {
|
||||||
order:10,
|
order: 10,
|
||||||
result:{
|
result: {
|
||||||
target:-1,
|
target: -1,
|
||||||
player:1
|
player: 1,
|
||||||
},
|
},
|
||||||
}
|
|
||||||
},
|
},
|
||||||
huyizhen:{
|
|
||||||
type:'zhenfa',
|
|
||||||
recastable:true,
|
|
||||||
enable:function(card,player){
|
|
||||||
return player.siege(player.next)||player.siege(player.previous);
|
|
||||||
},
|
},
|
||||||
filterTarget:function(card,player,target){
|
huyizhen: {
|
||||||
|
type: "zhenfa",
|
||||||
|
recastable: true,
|
||||||
|
enable: function (card, player) {
|
||||||
|
return player.siege(player.next) || player.siege(player.previous);
|
||||||
|
},
|
||||||
|
filterTarget: function (card, player, target) {
|
||||||
return player.siege(target);
|
return player.siege(target);
|
||||||
},
|
},
|
||||||
selectTarget:-1,
|
selectTarget: -1,
|
||||||
content:function(){
|
content: function () {
|
||||||
"step 0"
|
"step 0";
|
||||||
player.chooseCard('将一张非基本牌当作杀对'+get.translation(target)+'使用','he',function(card){
|
player.chooseCard(
|
||||||
return get.type(card)!='basic';
|
"将一张非基本牌当作杀对" + get.translation(target) + "使用",
|
||||||
}).ai=function(card){
|
"he",
|
||||||
if(get.effect(target,{name:'sha'},player,player)>0){
|
function (card) {
|
||||||
return 6-get.value(card);
|
return get.type(card) != "basic";
|
||||||
|
}
|
||||||
|
).ai = function (card) {
|
||||||
|
if (get.effect(target, { name: "sha" }, player, player) > 0) {
|
||||||
|
return 6 - get.value(card);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
};
|
};
|
||||||
"step 1"
|
"step 1";
|
||||||
if(result.bool){
|
if (result.bool) {
|
||||||
player.useCard({name:'sha'},result.cards,target,false);
|
player.useCard({ name: "sha" }, result.cards, target, false);
|
||||||
}
|
}
|
||||||
"step 2"
|
"step 2";
|
||||||
if(target==player.next) event.player2=player.next.next;
|
if (target == player.next) event.player2 = player.next.next;
|
||||||
else event.player2=player.previous.previous;
|
else event.player2 = player.previous.previous;
|
||||||
event.player2.chooseCard('将一张非基本牌当作杀对'+get.translation(target)+'使用','he',function(card){
|
event.player2.chooseCard(
|
||||||
return get.type(card)!='basic';
|
"将一张非基本牌当作杀对" + get.translation(target) + "使用",
|
||||||
}).ai=function(card){
|
"he",
|
||||||
if(get.effect(target,{name:'sha'},event.player2,event.player2)>0){
|
function (card) {
|
||||||
return 6-get.value(card);
|
return get.type(card) != "basic";
|
||||||
|
}
|
||||||
|
).ai = function (card) {
|
||||||
|
if (get.effect(target, { name: "sha" }, event.player2, event.player2) > 0) {
|
||||||
|
return 6 - get.value(card);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
};
|
};
|
||||||
"step 3"
|
"step 3";
|
||||||
if(result.bool){
|
if (result.bool) {
|
||||||
event.player2.useCard({name:'sha'},result.cards,target,false);
|
event.player2.useCard({ name: "sha" }, result.cards, target, false);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mode:['guozhan'],
|
mode: ["guozhan"],
|
||||||
ai:{
|
ai: {
|
||||||
order:7,
|
order: 7,
|
||||||
result:{
|
result: {
|
||||||
target:-2,
|
target: -2,
|
||||||
},
|
},
|
||||||
}
|
|
||||||
},
|
},
|
||||||
niaoxiangzhen:{
|
|
||||||
type:'zhenfa',
|
|
||||||
recastable: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,
|
niaoxiangzhen: {
|
||||||
content:function(){
|
type: "zhenfa",
|
||||||
"step 0"
|
recastable: true,
|
||||||
var next=target.chooseToRespond({name:'shan'});
|
enable: true,
|
||||||
next.ai=function(card){
|
filterTarget: function (card, player, target) {
|
||||||
if(get.damageEffect(target,player,target)>=0) return 0;
|
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 (get.damageEffect(target, player, target) >= 0) return 0;
|
||||||
return 1;
|
return 1;
|
||||||
};
|
};
|
||||||
next.autochoose=lib.filter.autoRespondShan;
|
next.autochoose = lib.filter.autoRespondShan;
|
||||||
"step 1"
|
"step 1";
|
||||||
if(result.bool==false){
|
if (result.bool == false) {
|
||||||
target.damage();
|
target.damage();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
ai:{
|
ai: {
|
||||||
basic:{
|
basic: {
|
||||||
order:9,
|
order: 9,
|
||||||
useful:1
|
useful: 1,
|
||||||
},
|
},
|
||||||
result:{
|
result: {
|
||||||
target:-1.5,
|
target: -1.5,
|
||||||
},
|
},
|
||||||
tag:{
|
tag: {
|
||||||
respond:1,
|
respond: 1,
|
||||||
respondShan:1,
|
respondShan: 1,
|
||||||
damage:1,
|
damage: 1,
|
||||||
}
|
|
||||||
},
|
|
||||||
mode:['guozhan'],
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
skill:{
|
mode: ["guozhan"],
|
||||||
},
|
},
|
||||||
translate:{
|
},
|
||||||
zhenfa:'阵法',
|
skill: {},
|
||||||
changshezhen:'长蛇阵',
|
translate: {
|
||||||
pozhenjue:'破阵决',
|
zhenfa: "阵法",
|
||||||
tianfuzhen:'天覆阵',
|
changshezhen: "长蛇阵",
|
||||||
dizaizhen:'地载阵',
|
pozhenjue: "破阵决",
|
||||||
fengyangzhen:'风扬阵',
|
tianfuzhen: "天覆阵",
|
||||||
yunchuizhen:'云垂阵',
|
dizaizhen: "地载阵",
|
||||||
qixingzhen:'七星阵',
|
fengyangzhen: "风扬阵",
|
||||||
shepanzhen:'蛇蟠阵',
|
yunchuizhen: "云垂阵",
|
||||||
shepanzhen_bg:'列',
|
qixingzhen: "七星阵",
|
||||||
yunchuizhen_bg:'垂',
|
shepanzhen: "蛇蟠阵",
|
||||||
longfeizhen:'龙飞阵',
|
shepanzhen_bg: "列",
|
||||||
huyizhen:'虎翼阵',
|
yunchuizhen_bg: "垂",
|
||||||
niaoxiangzhen:'鸟翔阵',
|
longfeizhen: "龙飞阵",
|
||||||
niaoxiangzhen_info:'令所有非你阵营的队列的角色今次打出一张闪,或者受到1点伤害。',
|
huyizhen: "虎翼阵",
|
||||||
qixingzhen_info:'弃置所有围攻你的角色各一张牌,然后视为对所有你围攻的角色使用一张不计入出杀次数的杀。',
|
niaoxiangzhen: "鸟翔阵",
|
||||||
|
niaoxiangzhen_info: "令所有非你阵营的队列的角色今次打出一张闪,或者受到1点伤害。",
|
||||||
|
qixingzhen_info:
|
||||||
|
"弃置所有围攻你的角色各一张牌,然后视为对所有你围攻的角色使用一张不计入出杀次数的杀。",
|
||||||
// longfeizhen_info:'弃置围攻你的角色各一张牌,然后摸一张牌。',
|
// longfeizhen_info:'弃置围攻你的角色各一张牌,然后摸一张牌。',
|
||||||
// qixingzhen_info:'令我方所有角色进入围攻状态。',
|
// qixingzhen_info:'令我方所有角色进入围攻状态。',
|
||||||
// shepanzhen_info:'令我方所有角色进入队列状态。',
|
// shepanzhen_info:'令我方所有角色进入队列状态。',
|
||||||
// yunchuizhen_info:'令所有围攻角色获得技能〖无双〗,直到其首次造成伤害。',
|
// yunchuizhen_info:'令所有围攻角色获得技能〖无双〗,直到其首次造成伤害。',
|
||||||
// fengyangzhen_info:'令所有被围攻角色获得技能〖飞影〗,直到其首次受到伤害。',
|
// fengyangzhen_info:'令所有被围攻角色获得技能〖飞影〗,直到其首次受到伤害。',
|
||||||
dizaizhen_info:'所有小势力角色摸一张牌。',
|
dizaizhen_info: "所有小势力角色摸一张牌。",
|
||||||
changshezhen_info:'若你处于队列中,与你同一队列的所有角色摸一张牌,否则将与你逆时针距离最近的同势力角色移至你下家。',
|
changshezhen_info:
|
||||||
|
"若你处于队列中,与你同一队列的所有角色摸一张牌,否则将与你逆时针距离最近的同势力角色移至你下家。",
|
||||||
// pozhenjue_info:'将所有角色的顺序随机重排。',
|
// pozhenjue_info:'将所有角色的顺序随机重排。',
|
||||||
tianfuzhen_info:'所有大势力角色弃置一张牌。'
|
tianfuzhen_info: "所有大势力角色弃置一张牌。",
|
||||||
},
|
},
|
||||||
list:[
|
list: [
|
||||||
["diamond",1,'changshezhen'],
|
["diamond", 1, "changshezhen"],
|
||||||
["club",1,'changshezhen'],
|
["club", 1, "changshezhen"],
|
||||||
// ["spade",1,'changshezhen'],
|
// ["spade",1,'changshezhen'],
|
||||||
// ["heart",1,'changshezhen'],
|
// ["heart",1,'changshezhen'],
|
||||||
|
|
||||||
["diamond",2,'tianfuzhen'],
|
["diamond", 2, "tianfuzhen"],
|
||||||
// ["club",2,'tianfuzhen'],
|
// ["club",2,'tianfuzhen'],
|
||||||
["spade",2,'tianfuzhen'],
|
["spade", 2, "tianfuzhen"],
|
||||||
["heart",2,'tianfuzhen'],
|
["heart", 2, "tianfuzhen"],
|
||||||
|
|
||||||
["diamond",3,'dizaizhen'],
|
["diamond", 3, "dizaizhen"],
|
||||||
// ["club",3,'dizaizhen'],
|
// ["club",3,'dizaizhen'],
|
||||||
["spade",3,'dizaizhen'],
|
["spade", 3, "dizaizhen"],
|
||||||
["heart",3,'dizaizhen'],
|
["heart", 3, "dizaizhen"],
|
||||||
|
|
||||||
// ["diamond",4,'fengyangzhen'],
|
// ["diamond",4,'fengyangzhen'],
|
||||||
// ["club",4,'fengyangzhen'],
|
// ["club",4,'fengyangzhen'],
|
||||||
|
@ -407,9 +423,9 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
||||||
// ["spade",6,'huyizhen'],
|
// ["spade",6,'huyizhen'],
|
||||||
// ["heart",6,'huyizhen'],
|
// ["heart",6,'huyizhen'],
|
||||||
|
|
||||||
["diamond",7,'qixingzhen'],
|
["diamond", 7, "qixingzhen"],
|
||||||
["club",7,'qixingzhen'],
|
["club", 7, "qixingzhen"],
|
||||||
["spade",7,'qixingzhen'],
|
["spade", 7, "qixingzhen"],
|
||||||
// ["heart",7,'qixingzhen'],
|
// ["heart",7,'qixingzhen'],
|
||||||
|
|
||||||
// ["diamond",8,'shepanzhen'],
|
// ["diamond",8,'shepanzhen'],
|
||||||
|
@ -422,10 +438,10 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
||||||
// ["spade",9,'longfeizhen'],
|
// ["spade",9,'longfeizhen'],
|
||||||
// ["heart",9,'longfeizhen'],
|
// ["heart",9,'longfeizhen'],
|
||||||
|
|
||||||
["diamond",11,'niaoxiangzhen'],
|
["diamond", 11, "niaoxiangzhen"],
|
||||||
// ["club",11,'niaoxiangzhen'],
|
// ["club",11,'niaoxiangzhen'],
|
||||||
["spade",11,'niaoxiangzhen'],
|
["spade", 11, "niaoxiangzhen"],
|
||||||
["heart",11,'niaoxiangzhen'],
|
["heart", 11, "niaoxiangzhen"],
|
||||||
|
|
||||||
// ["diamond",12,'yunchuizhen'],
|
// ["diamond",12,'yunchuizhen'],
|
||||||
// ["club",12,'yunchuizhen'],
|
// ["club",12,'yunchuizhen'],
|
||||||
|
|
1498
card/zhulu.js
1498
card/zhulu.js
File diff suppressed because it is too large
Load Diff
6036
character/clan.js
6036
character/clan.js
File diff suppressed because it is too large
Load Diff
3407
character/collab.js
3407
character/collab.js
File diff suppressed because it is too large
Load Diff
9901
character/ddd.js
9901
character/ddd.js
File diff suppressed because it is too large
Load Diff
31804
character/diy.js
31804
character/diy.js
File diff suppressed because it is too large
Load Diff
15270
character/extra.js
15270
character/extra.js
File diff suppressed because it is too large
Load Diff
4337
character/gujian.js
4337
character/gujian.js
File diff suppressed because it is too large
Load Diff
7310
character/gwent.js
7310
character/gwent.js
File diff suppressed because it is too large
Load Diff
15766
character/hearth.js
15766
character/hearth.js
File diff suppressed because it is too large
Load Diff
23492
character/huicui.js
23492
character/huicui.js
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
14636
character/jsrg.js
14636
character/jsrg.js
File diff suppressed because it is too large
Load Diff
29880
character/mobile.js
29880
character/mobile.js
File diff suppressed because it is too large
Load Diff
726
character/mtg.js
726
character/mtg.js
|
@ -1,492 +1,516 @@
|
||||||
import { game } from '../noname.js';
|
import { lib, game, ui, get, ai, _status } from "../noname.js";
|
||||||
game.import('character',function(lib,game,ui,get,ai,_status){
|
game.import("character", function () {
|
||||||
return {
|
return {
|
||||||
name:'mtg',
|
name: "mtg",
|
||||||
character:{
|
character: {
|
||||||
mtg_jiding:['male','qun',4,['mbaizhan','msilian']],
|
mtg_jiding: ["male", "qun", 4, ["mbaizhan", "msilian"]],
|
||||||
// mtg_qianzhuo:['female','shu',3,[]],
|
// mtg_qianzhuo:['female','shu',3,[]],
|
||||||
mtg_jiesi:['male','wei',3,['mtongnian','msuoling','mhuanyi']],
|
mtg_jiesi: ["male", "wei", 3, ["mtongnian", "msuoling", "mhuanyi"]],
|
||||||
mtg_lilianna:['female','qun',3,['lingyong','mduohun']],
|
mtg_lilianna: ["female", "qun", 3, ["lingyong", "mduohun"]],
|
||||||
// mtg_nisha:['female','wu',3,[]],
|
// mtg_nisha:['female','wu',3,[]],
|
||||||
// mtg_ayeni:['male','qun',4,[]],
|
// mtg_ayeni:['male','qun',4,[]],
|
||||||
},
|
},
|
||||||
characterIntro:{
|
characterIntro: {
|
||||||
mtg_jiding:'这名白色魔法的使用者极其注重忠诚,正义和荣誉。他曾全力追捕茜卓纳拉,如今已不可思议地与这位火焰法师成为伙伴。',
|
mtg_jiding:
|
||||||
mtg_qianzhuo:'茜卓纳拉是使用红色法术力的旅法师。她擅长使用火焰:除了火焰,还是火焰。茜卓性格冲动、易怒、富有激情,不断增长的火焰法术能力随时都准备爆发。她的火花在还很年轻时便已点燃,如今已是相当有经验的烈焰术士和旅法师。',
|
"这名白色魔法的使用者极其注重忠诚,正义和荣誉。他曾全力追捕茜卓纳拉,如今已不可思议地与这位火焰法师成为伙伴。",
|
||||||
mtg_jiesi:'杰斯贝连是使用蓝色法术的鹏洛客。他擅长心灵法术:读取心灵,幻影,知识,以及欺瞒的咒语。',
|
mtg_qianzhuo:
|
||||||
mtg_lilianna:'莉莲娜维斯是一位精通死灵术的旅法师,她擅长用黑色法术力来复活死者,腐化生者,并从死亡中召唤力量。',
|
"茜卓纳拉是使用红色法术力的旅法师。她擅长使用火焰:除了火焰,还是火焰。茜卓性格冲动、易怒、富有激情,不断增长的火焰法术能力随时都准备爆发。她的火花在还很年轻时便已点燃,如今已是相当有经验的烈焰术士和旅法师。",
|
||||||
mtg_nisha:'赞迪卡妖精部落玖瑞加的一名战士,做事倾尽全力,与大地有密切的联系,还擅使元素魔法。她能够引导时空的魔法生机地脉,为土地赋予生命。',
|
mtg_jiesi:
|
||||||
mtg_ayeni:'金鬃阿耶尼是使用白色法术的鹏洛客。他长于净化身体与心灵的法术:用咒语来治疗、强化盟友,以及唤醒他人内在的心灵精华。',
|
"杰斯贝连是使用蓝色法术的鹏洛客。他擅长心灵法术:读取心灵,幻影,知识,以及欺瞒的咒语。",
|
||||||
|
mtg_lilianna:
|
||||||
|
"莉莲娜维斯是一位精通死灵术的旅法师,她擅长用黑色法术力来复活死者,腐化生者,并从死亡中召唤力量。",
|
||||||
|
mtg_nisha:
|
||||||
|
"赞迪卡妖精部落玖瑞加的一名战士,做事倾尽全力,与大地有密切的联系,还擅使元素魔法。她能够引导时空的魔法生机地脉,为土地赋予生命。",
|
||||||
|
mtg_ayeni:
|
||||||
|
"金鬃阿耶尼是使用白色法术的鹏洛客。他长于净化身体与心灵的法术:用咒语来治疗、强化盟友,以及唤醒他人内在的心灵精华。",
|
||||||
},
|
},
|
||||||
skill:{
|
skill: {
|
||||||
mduohun:{
|
mduohun: {
|
||||||
trigger:{player:'dyingAfter'},
|
trigger: { player: "dyingAfter" },
|
||||||
forced:true,
|
forced: true,
|
||||||
filter:function(event,player){
|
filter: function (event, player) {
|
||||||
return event.source&&event.source.isIn()&&event.source.hp>0;
|
return event.source && event.source.isIn() && event.source.hp > 0;
|
||||||
},
|
},
|
||||||
logTarget:'source',
|
logTarget: "source",
|
||||||
content:function(){
|
content: function () {
|
||||||
trigger.source.loseHp();
|
trigger.source.loseHp();
|
||||||
},
|
},
|
||||||
ai:{
|
ai: {
|
||||||
threaten:function(player,target){
|
threaten: function (player, target) {
|
||||||
if(target.hp==1) return 0.6;
|
if (target.hp == 1) return 0.6;
|
||||||
return 1;
|
return 1;
|
||||||
},
|
},
|
||||||
effect:{
|
effect: {
|
||||||
target:function(card,player,target,current){
|
target: function (card, player, target, current) {
|
||||||
if(!target.hasFriend()) return;
|
if (!target.hasFriend()) return;
|
||||||
if(target.hp<=1&&get.tag(card,'damage')) return [1,0,0,-1];
|
if (target.hp <= 1 && get.tag(card, "damage")) return [1, 0, 0, -1];
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
lingyong:{
|
|
||||||
enable:'phaseUse',
|
|
||||||
filter:function(event,player){
|
|
||||||
return !player.hasSkill('subplayer')&&player.getSubPlayers('lingyong_get').length>0;
|
|
||||||
},
|
},
|
||||||
nosub:true,
|
|
||||||
group:'lingyong_get',
|
|
||||||
direct:true,
|
|
||||||
delay:0,
|
|
||||||
skillAnimation:true,
|
|
||||||
animationColor:'thunder',
|
|
||||||
content:function(){
|
|
||||||
player.callSubPlayer().set('tag','lingyong_get');
|
|
||||||
},
|
},
|
||||||
ai:{
|
},
|
||||||
order:1,
|
lingyong: {
|
||||||
result:{
|
enable: "phaseUse",
|
||||||
player:function(player,target){
|
filter: function (event, player) {
|
||||||
|
return !player.hasSkill("subplayer") && player.getSubPlayers("lingyong_get").length > 0;
|
||||||
|
},
|
||||||
|
nosub: true,
|
||||||
|
group: "lingyong_get",
|
||||||
|
direct: true,
|
||||||
|
delay: 0,
|
||||||
|
skillAnimation: true,
|
||||||
|
animationColor: "thunder",
|
||||||
|
content: function () {
|
||||||
|
player.callSubPlayer().set("tag", "lingyong_get");
|
||||||
|
},
|
||||||
|
ai: {
|
||||||
|
order: 1,
|
||||||
|
result: {
|
||||||
|
player: function (player, target) {
|
||||||
return 1;
|
return 1;
|
||||||
// if(player.hp<=1) return 1;
|
// if(player.hp<=1) return 1;
|
||||||
// if(!player.needsToDiscard(player.hp-1)) return 1;
|
// if(!player.needsToDiscard(player.hp-1)) return 1;
|
||||||
// return 0;
|
// return 0;
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
subSkill:{
|
|
||||||
get:{
|
|
||||||
trigger:{global:'dieAfter'},
|
|
||||||
forced:true,
|
|
||||||
filter:function(event,player){
|
|
||||||
return !event.player.isMin()&&![player.name,player.name1,player.name2].includes(event.player.name);
|
|
||||||
},
|
},
|
||||||
content:function(){
|
},
|
||||||
var skills=lib.character[trigger.player.name][3].slice(0);
|
subSkill: {
|
||||||
for(var i=0;i<skills.length;i++){
|
get: {
|
||||||
if(lib.skill[skills[i]].nosub){
|
trigger: { global: "dieAfter" },
|
||||||
skills.splice(i--,1);
|
forced: true,
|
||||||
|
filter: function (event, player) {
|
||||||
|
return (
|
||||||
|
!event.player.isMin() &&
|
||||||
|
![player.name, player.name1, player.name2].includes(event.player.name)
|
||||||
|
);
|
||||||
|
},
|
||||||
|
content: function () {
|
||||||
|
var skills = lib.character[trigger.player.name][3].slice(0);
|
||||||
|
for (var i = 0; i < skills.length; i++) {
|
||||||
|
if (lib.skill[skills[i]].nosub) {
|
||||||
|
skills.splice(i--, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
player.addSubPlayer({
|
player.addSubPlayer({
|
||||||
name:trigger.player.name,
|
name: trigger.player.name,
|
||||||
skills:skills,
|
skills: skills,
|
||||||
hs:get.cards(2),
|
hs: get.cards(2),
|
||||||
intro:'出牌阶段,你可以调遣此随从(直到随从死亡不可再次切换)'
|
intro: "出牌阶段,你可以调遣此随从(直到随从死亡不可再次切换)",
|
||||||
});
|
});
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
mhuanyi:{
|
|
||||||
round:2,
|
|
||||||
trigger:{player:'phaseEnd'},
|
|
||||||
direct:true,
|
|
||||||
addintro:function(storage,player){
|
|
||||||
if(player.hasSkill('mhuanyi_target')){
|
|
||||||
return '直到下一回合开始,当成为某类型的卡牌的惟一目标时,将目标转移给某名其他角色;'
|
|
||||||
}
|
|
||||||
return '';
|
|
||||||
},
|
},
|
||||||
content:function(){
|
},
|
||||||
'step 0'
|
},
|
||||||
var rand=Math.random();
|
mhuanyi: {
|
||||||
player.chooseTarget(get.prompt2('mhuanyi'),function(card,player,target){
|
round: 2,
|
||||||
return target!=player;
|
trigger: { player: "phaseEnd" },
|
||||||
}).set('ai',function(target){
|
direct: true,
|
||||||
if(get.attitude(player,target)<0){
|
addintro: function (storage, player) {
|
||||||
|
if (player.hasSkill("mhuanyi_target")) {
|
||||||
|
return "直到下一回合开始,当成为某类型的卡牌的惟一目标时,将目标转移给某名其他角色;";
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
},
|
||||||
|
content: function () {
|
||||||
|
"step 0";
|
||||||
|
var rand = Math.random();
|
||||||
|
player
|
||||||
|
.chooseTarget(get.prompt2("mhuanyi"), function (card, player, target) {
|
||||||
|
return target != player;
|
||||||
|
})
|
||||||
|
.set("ai", function (target) {
|
||||||
|
if (get.attitude(player, target) < 0) {
|
||||||
return rand;
|
return rand;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
});
|
});
|
||||||
'step 1'
|
"step 1";
|
||||||
if(result.bool){
|
if (result.bool) {
|
||||||
event.target=result.targets[0];
|
event.target = result.targets[0];
|
||||||
if(player.isUnderControl(true)){
|
if (player.isUnderControl(true)) {
|
||||||
player.line(event.target,'green');
|
player.line(event.target, "green");
|
||||||
}
|
}
|
||||||
player.chooseControl('基本牌','非基本牌','cancel2',function(){
|
player
|
||||||
return Math.floor(Math.random()*2);
|
.chooseControl("基本牌", "非基本牌", "cancel2", function () {
|
||||||
}).set('prompt','选择一种卡牌类型');
|
return Math.floor(Math.random() * 2);
|
||||||
}
|
})
|
||||||
else{
|
.set("prompt", "选择一种卡牌类型");
|
||||||
|
} else {
|
||||||
event.finish();
|
event.finish();
|
||||||
}
|
}
|
||||||
'step 2'
|
"step 2";
|
||||||
if(result.control&&result.control!='cancel2'){
|
if (result.control && result.control != "cancel2") {
|
||||||
player.logSkill('mhuanyi');
|
player.logSkill("mhuanyi");
|
||||||
player.storage.mhuanyi_target=[event.target,result.index];
|
player.storage.mhuanyi_target = [event.target, result.index];
|
||||||
player.addTempSkill('mhuanyi_target',{player:'phaseBegin'});
|
player.addTempSkill("mhuanyi_target", { player: "phaseBegin" });
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
subSkill:{
|
subSkill: {
|
||||||
target:{
|
target: {
|
||||||
trigger:{target:'useCardToBefore'},
|
trigger: { target: "useCardToBefore" },
|
||||||
priority:6,
|
priority: 6,
|
||||||
forced:true,
|
forced: true,
|
||||||
onremove:true,
|
onremove: true,
|
||||||
group:'mhuanyi_die',
|
group: "mhuanyi_die",
|
||||||
filter:function(event,player){
|
filter: function (event, player) {
|
||||||
if(!player.storage.mhuanyi_target) return false;
|
if (!player.storage.mhuanyi_target) return false;
|
||||||
if(event.player==player.storage.mhuanyi_target[0]) return false;
|
if (event.player == player.storage.mhuanyi_target[0]) return false;
|
||||||
if(get.type(event.card)=='basic'){
|
if (get.type(event.card) == "basic") {
|
||||||
if(player.storage.mhuanyi_target[1]!=0) return false;
|
if (player.storage.mhuanyi_target[1] != 0) return false;
|
||||||
|
} else {
|
||||||
|
if (player.storage.mhuanyi_target[1] != 1) return false;
|
||||||
}
|
}
|
||||||
else{
|
if (
|
||||||
if(player.storage.mhuanyi_target[1]!=1) return false;
|
!lib.filter.targetEnabled2(
|
||||||
}
|
event.card,
|
||||||
if(!lib.filter.targetEnabled2(event.card,event.player,player.storage.mhuanyi_target[0])){
|
event.player,
|
||||||
|
player.storage.mhuanyi_target[0]
|
||||||
|
)
|
||||||
|
) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
logTarget:function(event,player){
|
logTarget: function (event, player) {
|
||||||
return player.storage.mhuanyi_target[0];
|
return player.storage.mhuanyi_target[0];
|
||||||
},
|
},
|
||||||
content:function(){
|
content: function () {
|
||||||
trigger.target=player.storage.mhuanyi_target[0];
|
trigger.target = player.storage.mhuanyi_target[0];
|
||||||
player.removeSkill('mhuanyi_target');
|
player.removeSkill("mhuanyi_target");
|
||||||
}
|
|
||||||
},
|
},
|
||||||
die:{
|
|
||||||
trigger:{global:'dieAfter'},
|
|
||||||
silent:true,
|
|
||||||
filter:function(event,player){
|
|
||||||
if(!player.storage.mhuanyi_target) return false;
|
|
||||||
return event.player==player.storage.mhuanyi_target[0];
|
|
||||||
},
|
},
|
||||||
content:function(){
|
die: {
|
||||||
player.removeSkill('mhuanyi_target');
|
trigger: { global: "dieAfter" },
|
||||||
}
|
silent: true,
|
||||||
}
|
filter: function (event, player) {
|
||||||
}
|
if (!player.storage.mhuanyi_target) return false;
|
||||||
|
return event.player == player.storage.mhuanyi_target[0];
|
||||||
},
|
},
|
||||||
msuoling:{
|
content: function () {
|
||||||
trigger:{global:'useCard'},
|
player.removeSkill("mhuanyi_target");
|
||||||
direct:true,
|
},
|
||||||
priority:5.5,
|
},
|
||||||
round:1,
|
},
|
||||||
filter:function(event,player){
|
},
|
||||||
if(get.type(event.card)=='trick'&&event.card.isCard){
|
msuoling: {
|
||||||
if(event.player==player) return false;
|
trigger: { global: "useCard" },
|
||||||
if(!player.countCards('he',{suit:get.suit(event.card)})) return false;
|
direct: true,
|
||||||
|
priority: 5.5,
|
||||||
|
round: 1,
|
||||||
|
filter: function (event, player) {
|
||||||
|
if (get.type(event.card) == "trick" && event.card.isCard) {
|
||||||
|
if (event.player == player) return false;
|
||||||
|
if (!player.countCards("he", { suit: get.suit(event.card) })) return false;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
content:function(){
|
content: function () {
|
||||||
'step 0'
|
"step 0";
|
||||||
var att=get.attitude(player,trigger.player);
|
var att = get.attitude(player, trigger.player);
|
||||||
var suit=get.suit(trigger.card);
|
var suit = get.suit(trigger.card);
|
||||||
player.chooseToDiscard('he',get.prompt2('msuoling',trigger.player),function(card){
|
player
|
||||||
return get.suit(card)==suit;
|
.chooseToDiscard("he", get.prompt2("msuoling", trigger.player), function (card) {
|
||||||
}).set('autodelay',true).set('logSkill',['msuoling',trigger.player]).ai=function(card){
|
return get.suit(card) == suit;
|
||||||
if(att<0){
|
})
|
||||||
return 8-get.value(card);
|
.set("autodelay", true)
|
||||||
|
.set("logSkill", ["msuoling", trigger.player]).ai = function (card) {
|
||||||
|
if (att < 0) {
|
||||||
|
return 8 - get.value(card);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
};
|
};
|
||||||
'step 1'
|
"step 1";
|
||||||
if(result.bool){
|
if (result.bool) {
|
||||||
trigger.cancel();
|
trigger.cancel();
|
||||||
player.chooseUseTarget(true,trigger.card);
|
player.chooseUseTarget(true, trigger.card);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
msuoling_old:{
|
|
||||||
enable:'phaseUse',
|
|
||||||
usable:1,
|
|
||||||
subSkill:{
|
|
||||||
ai:{
|
|
||||||
onremove:true
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
filter:function(event,player){
|
msuoling_old: {
|
||||||
var nh=player.countCards('h');
|
enable: "phaseUse",
|
||||||
if(nh<=1||nh>=5) return false;
|
usable: 1,
|
||||||
return lib.skill.msuoling.getc(player).number>0;
|
subSkill: {
|
||||||
|
ai: {
|
||||||
|
onremove: true,
|
||||||
},
|
},
|
||||||
getc:function(player){
|
},
|
||||||
var hs=player.getCards('h');
|
filter: function (event, player) {
|
||||||
for(var i=0;i<hs.length;i++){
|
var nh = player.countCards("h");
|
||||||
if(hs[i].mtongnian_link){
|
if (nh <= 1 || nh >= 5) return false;
|
||||||
|
return lib.skill.msuoling.getc(player).number > 0;
|
||||||
|
},
|
||||||
|
getc: function (player) {
|
||||||
|
var hs = player.getCards("h");
|
||||||
|
for (var i = 0; i < hs.length; i++) {
|
||||||
|
if (hs[i].mtongnian_link) {
|
||||||
return hs[i];
|
return hs[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return -1;
|
return -1;
|
||||||
},
|
},
|
||||||
getn:function(player){
|
getn: function (player) {
|
||||||
var hs=player.getCards('h');
|
var hs = player.getCards("h");
|
||||||
var ns=[];
|
var ns = [];
|
||||||
for(var i=0;i<hs.length;i++){
|
for (var i = 0; i < hs.length; i++) {
|
||||||
if(!hs[i].mtongnian_link){
|
if (!hs[i].mtongnian_link) {
|
||||||
ns.push(hs[i].number);
|
ns.push(hs[i].number);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return ns;
|
return ns;
|
||||||
},
|
},
|
||||||
test:function(player){
|
test: function (player) {
|
||||||
var cs=lib.skill.msuoling.getc(player).number;
|
var cs = lib.skill.msuoling.getc(player).number;
|
||||||
var ns=lib.skill.msuoling.getn(player);
|
var ns = lib.skill.msuoling.getn(player);
|
||||||
return lib.skill.msuoling.calc(ns,cs);
|
return lib.skill.msuoling.calc(ns, cs);
|
||||||
},
|
},
|
||||||
calc:function(arr, num){
|
calc: function (arr, num) {
|
||||||
for(var i=0;i<arr.length;i++){
|
for (var i = 0; i < arr.length; i++) {
|
||||||
if(arr[i]==num){
|
if (arr[i] == num) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(arr.length>1){
|
if (arr.length > 1) {
|
||||||
for(var i=0;i<arr.length-1;i++){
|
for (var i = 0; i < arr.length - 1; i++) {
|
||||||
for(var j=i+1;j<arr.length;j++){
|
for (var j = i + 1; j < arr.length; j++) {
|
||||||
var brr=[];
|
var brr = [];
|
||||||
for(var k=0;k<arr.length;k++){
|
for (var k = 0; k < arr.length; k++) {
|
||||||
if(k!=i&&k!=j){
|
if (k != i && k != j) {
|
||||||
brr.push(arr[k]);
|
brr.push(arr[k]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(lib.skill.msuoling.calc(brr.concat([arr[i]+arr[j]]),num)) return true;
|
if (lib.skill.msuoling.calc(brr.concat([arr[i] + arr[j]]), num)) return true;
|
||||||
if(lib.skill.msuoling.calc(brr.concat([arr[i]-arr[j]]),num)) return true;
|
if (lib.skill.msuoling.calc(brr.concat([arr[i] - arr[j]]), num)) return true;
|
||||||
if(lib.skill.msuoling.calc(brr.concat([arr[i]*arr[j]]),num)) return true;
|
if (lib.skill.msuoling.calc(brr.concat([arr[i] * arr[j]]), num)) return true;
|
||||||
if(lib.skill.msuoling.calc(brr.concat([arr[i]/arr[j]]),num)) return true;
|
if (lib.skill.msuoling.calc(brr.concat([arr[i] / arr[j]]), num)) return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
check:function(card){
|
check: function (card) {
|
||||||
// if(player.isUnderControl(true)) return 0;
|
// if(player.isUnderControl(true)) return 0;
|
||||||
var player=_status.event.player;
|
var player = _status.event.player;
|
||||||
if(player.hasSkill('msuoling_ai')){
|
if (player.hasSkill("msuoling_ai")) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if(lib.skill.msuoling.test(player)){
|
if (lib.skill.msuoling.test(player)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
} else {
|
||||||
else{
|
player.addTempSkill("msuoling_ai", { player: ["gainAfter", "phaseAfter"] });
|
||||||
player.addTempSkill('msuoling_ai',{player:['gainAfter','phaseAfter']});
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
content:function(){
|
content: function () {
|
||||||
'step 0'
|
"step 0";
|
||||||
player.showHandcards();
|
player.showHandcards();
|
||||||
'step 1'
|
"step 1";
|
||||||
if(lib.skill.msuoling.test(player)){
|
if (lib.skill.msuoling.test(player)) {
|
||||||
var card=lib.skill.msuoling.getc(player);
|
var card = lib.skill.msuoling.getc(player);
|
||||||
card.classList.remove('glow');
|
card.classList.remove("glow");
|
||||||
delete card.mtongnian_link;
|
delete card.mtongnian_link;
|
||||||
delete card._destroy;
|
delete card._destroy;
|
||||||
|
|
||||||
var list=lib.skill.mtongnian.getList(player);
|
var list = lib.skill.mtongnian.getList(player);
|
||||||
if(list.length){
|
if (list.length) {
|
||||||
var card=list.randomGet();
|
var card = list.randomGet();
|
||||||
var fake=game.createCard(card);
|
var fake = game.createCard(card);
|
||||||
fake.mtongnian_link=card;
|
fake.mtongnian_link = card;
|
||||||
player.gain(fake,'draw')._triggered=null;
|
player.gain(fake, "draw")._triggered = null;
|
||||||
fake.classList.add('glow');
|
fake.classList.add("glow");
|
||||||
fake._destroy='mtongnian';
|
fake._destroy = "mtongnian";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
selectCard:[1,Infinity],
|
selectCard: [1, Infinity],
|
||||||
ai:{
|
ai: {
|
||||||
order:11
|
order: 11,
|
||||||
}
|
|
||||||
},
|
},
|
||||||
mtongnian:{
|
},
|
||||||
trigger:{player:'phaseUseBegin'},
|
mtongnian: {
|
||||||
forced:true,
|
trigger: { player: "phaseUseBegin" },
|
||||||
filter:function(event,player){
|
forced: true,
|
||||||
var enemies=player.getEnemies();
|
filter: function (event, player) {
|
||||||
for(var i=0;i<enemies.length;i++){
|
var enemies = player.getEnemies();
|
||||||
if(enemies[i].countCards('h')) return true;
|
for (var i = 0; i < enemies.length; i++) {
|
||||||
|
if (enemies[i].countCards("h")) return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
getList:function(player){
|
getList: function (player) {
|
||||||
var list=[];
|
var list = [];
|
||||||
var enemies=player.getEnemies();
|
var enemies = player.getEnemies();
|
||||||
for(var i=0;i<enemies.length;i++){
|
for (var i = 0; i < enemies.length; i++) {
|
||||||
list.addArray(enemies[i].getCards('h'));
|
list.addArray(enemies[i].getCards("h"));
|
||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
},
|
},
|
||||||
content:function(){
|
content: function () {
|
||||||
var list=lib.skill.mtongnian.getList(player);
|
var list = lib.skill.mtongnian.getList(player);
|
||||||
if(list.length){
|
if (list.length) {
|
||||||
var card=list.randomGet();
|
var card = list.randomGet();
|
||||||
var fake=game.createCard(card);
|
var fake = game.createCard(card);
|
||||||
fake.mtongnian_link=card;
|
fake.mtongnian_link = card;
|
||||||
player.gain(fake,'draw')._triggered=null;
|
player.gain(fake, "draw")._triggered = null;
|
||||||
fake.classList.add('glow');
|
fake.classList.add("glow");
|
||||||
fake._destroy='mtongnian';
|
fake._destroy = "mtongnian";
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
group:['mtongnian_change','mtongnian_use','mtongnian_lose'],
|
group: ["mtongnian_change", "mtongnian_use", "mtongnian_lose"],
|
||||||
subSkill:{
|
subSkill: {
|
||||||
change:{
|
change: {
|
||||||
trigger:{player:'useCard'},
|
trigger: { player: "useCard" },
|
||||||
silent:true,
|
silent: true,
|
||||||
filter:function(event,player){
|
filter: function (event, player) {
|
||||||
return player.hasCard(function(card){
|
return player.hasCard(function (card) {
|
||||||
return card.mtongnian_link?true:false;
|
return card.mtongnian_link ? true : false;
|
||||||
},'h');
|
}, "h");
|
||||||
},
|
},
|
||||||
content:function(){
|
content: function () {
|
||||||
var list=lib.skill.mtongnian.getList(player);
|
var list = lib.skill.mtongnian.getList(player);
|
||||||
var hs=player.getCards('h',function(card){
|
var hs = player.getCards("h", function (card) {
|
||||||
return card.mtongnian_link?true:false;
|
return card.mtongnian_link ? true : false;
|
||||||
});
|
});
|
||||||
for(var i=0;i<hs.length;i++){
|
for (var i = 0; i < hs.length; i++) {
|
||||||
var current=hs[i].mtongnian_link;
|
var current = hs[i].mtongnian_link;
|
||||||
hs[i].mtongnian_link=list.randomGet(current);
|
hs[i].mtongnian_link = list.randomGet(current);
|
||||||
if(!hs[i].mtongnian_link){
|
if (!hs[i].mtongnian_link) {
|
||||||
hs[i].mtongnian_link=current;
|
hs[i].mtongnian_link = current;
|
||||||
}
|
}
|
||||||
hs[i].init(hs[i].mtongnian_link);
|
hs[i].init(hs[i].mtongnian_link);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
},
|
},
|
||||||
use:{
|
|
||||||
trigger:{player:'useCardBefore'},
|
|
||||||
silent:true,
|
|
||||||
filter:function(event,player){
|
|
||||||
return event.card.mtongnian_link?true:false;
|
|
||||||
},
|
},
|
||||||
content:function(){
|
use: {
|
||||||
var link=trigger.card.mtongnian_link;
|
trigger: { player: "useCardBefore" },
|
||||||
var target=get.owner(link);
|
silent: true,
|
||||||
if(target&&target!=player){
|
filter: function (event, player) {
|
||||||
|
return event.card.mtongnian_link ? true : false;
|
||||||
|
},
|
||||||
|
content: function () {
|
||||||
|
var link = trigger.card.mtongnian_link;
|
||||||
|
var target = get.owner(link);
|
||||||
|
if (target && target != player) {
|
||||||
trigger.cards.add(trigger.card);
|
trigger.cards.add(trigger.card);
|
||||||
player.lose(trigger.cards,ui.discardPile);
|
player.lose(trigger.cards, ui.discardPile);
|
||||||
trigger.card=link;
|
trigger.card = link;
|
||||||
trigger.cards.length=0;
|
trigger.cards.length = 0;
|
||||||
trigger.cards.push(link);
|
trigger.cards.push(link);
|
||||||
target.lose(link,ui.discardPile);
|
target.lose(link, ui.discardPile);
|
||||||
player.logSkill('mtongnian',target);
|
player.logSkill("mtongnian", target);
|
||||||
game.log(target,'失去了',link);
|
game.log(target, "失去了", link);
|
||||||
game.delayx();
|
game.delayx();
|
||||||
}
|
} else {
|
||||||
else{
|
|
||||||
player.lose(trigger.card);
|
player.lose(trigger.card);
|
||||||
trigger.cancel();
|
trigger.cancel();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
},
|
},
|
||||||
lose:{
|
},
|
||||||
trigger:{player:'phaseUseEnd',global:'loseEnd'},
|
lose: {
|
||||||
silent:true,
|
trigger: { player: "phaseUseEnd", global: "loseEnd" },
|
||||||
filter:function(event,player){
|
silent: true,
|
||||||
if(event.name=='lose'){
|
filter: function (event, player) {
|
||||||
return lib.skill.mtongnian.getList(player).length==0;
|
if (event.name == "lose") {
|
||||||
|
return lib.skill.mtongnian.getList(player).length == 0;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
content:function(){
|
content: function () {
|
||||||
var hs=player.getCards('h',function(card){
|
var hs = player.getCards("h", function (card) {
|
||||||
return card.mtongnian_link?true:false;
|
return card.mtongnian_link ? true : false;
|
||||||
});
|
});
|
||||||
if(hs.length){
|
if (hs.length) {
|
||||||
player.lose(hs)._triggered=null;
|
player.lose(hs)._triggered = null;
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
ai:{
|
|
||||||
threaten:1.3
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
mbaizhan:{
|
|
||||||
trigger:{source:'damageEnd'},
|
|
||||||
forced:true,
|
|
||||||
filter:function(event){
|
|
||||||
return event.num>0;
|
|
||||||
},
|
},
|
||||||
content:function(){
|
ai: {
|
||||||
|
threaten: 1.3,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
mbaizhan: {
|
||||||
|
trigger: { source: "damageEnd" },
|
||||||
|
forced: true,
|
||||||
|
filter: function (event) {
|
||||||
|
return event.num > 0;
|
||||||
|
},
|
||||||
|
content: function () {
|
||||||
player.changeHujia(trigger.num);
|
player.changeHujia(trigger.num);
|
||||||
},
|
},
|
||||||
ai:{
|
ai: {
|
||||||
damageBonus:true
|
damageBonus: true,
|
||||||
}
|
|
||||||
},
|
},
|
||||||
msilian:{
|
|
||||||
trigger:{player:'phaseEnd'},
|
|
||||||
filter:function(event,player){
|
|
||||||
return player.hujia>0;
|
|
||||||
},
|
},
|
||||||
check:function(event,player){
|
msilian: {
|
||||||
return player.hujia>1&&player.hp>1;
|
trigger: { player: "phaseEnd" },
|
||||||
|
filter: function (event, player) {
|
||||||
|
return player.hujia > 0;
|
||||||
},
|
},
|
||||||
content:function(){
|
check: function (event, player) {
|
||||||
player.storage.msilian=player.hujia;
|
return player.hujia > 1 && player.hp > 1;
|
||||||
|
},
|
||||||
|
content: function () {
|
||||||
|
player.storage.msilian = player.hujia;
|
||||||
player.changeHujia(-player.hujia);
|
player.changeHujia(-player.hujia);
|
||||||
player.insertPhase();
|
player.insertPhase();
|
||||||
},
|
},
|
||||||
group:['msilian_hp','msilian_draw'],
|
group: ["msilian_hp", "msilian_draw"],
|
||||||
subSkill:{
|
subSkill: {
|
||||||
hp:{
|
hp: {
|
||||||
trigger:{player:'phaseAfter'},
|
trigger: { player: "phaseAfter" },
|
||||||
silent:true,
|
silent: true,
|
||||||
filter:function(event,player){
|
filter: function (event, player) {
|
||||||
return event.skill=='msilian'&&!player.getStat('damage');
|
return event.skill == "msilian" && !player.getStat("damage");
|
||||||
},
|
},
|
||||||
content:function(){
|
content: function () {
|
||||||
player.loseHp();
|
player.loseHp();
|
||||||
}
|
|
||||||
},
|
},
|
||||||
draw:{
|
|
||||||
trigger:{player:'phaseDrawBegin'},
|
|
||||||
filter:function(event){
|
|
||||||
return event.getParent('phase').skill=='msilian';
|
|
||||||
},
|
},
|
||||||
silent:true,
|
draw: {
|
||||||
content:function(){
|
trigger: { player: "phaseDrawBegin" },
|
||||||
trigger.num+=player.storage.msilian-2;
|
filter: function (event) {
|
||||||
}
|
return event.getParent("phase").skill == "msilian";
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
translate:{
|
silent: true,
|
||||||
mtg_jiding:'基定',
|
content: function () {
|
||||||
mtg_qianzhuo:'茜卓',
|
trigger.num += player.storage.msilian - 2;
|
||||||
mtg_jiesi:'杰斯',
|
},
|
||||||
mtg_lilianna:'莉莲娜',
|
},
|
||||||
mtg_nisha:'妮莎',
|
},
|
||||||
mtg_ayeni:'阿耶尼',
|
},
|
||||||
|
},
|
||||||
|
translate: {
|
||||||
|
mtg_jiding: "基定",
|
||||||
|
mtg_qianzhuo: "茜卓",
|
||||||
|
mtg_jiesi: "杰斯",
|
||||||
|
mtg_lilianna: "莉莲娜",
|
||||||
|
mtg_nisha: "妮莎",
|
||||||
|
mtg_ayeni: "阿耶尼",
|
||||||
|
|
||||||
mduohun:'夺魂',
|
mduohun: "夺魂",
|
||||||
mduohun_info:'锁定技,当你解除濒死状态后,令你进入濒死状态的角色失去1点体力。',
|
mduohun_info: "锁定技,当你解除濒死状态后,令你进入濒死状态的角色失去1点体力。",
|
||||||
lingyong:'灵俑',
|
lingyong: "灵俑",
|
||||||
lingyong2:'灵俑',
|
lingyong2: "灵俑",
|
||||||
lingyong3:'灵俑',
|
lingyong3: "灵俑",
|
||||||
lingyong3_bg:'俑',
|
lingyong3_bg: "俑",
|
||||||
lingyong_info:'锁定技,每当一名其他角色死亡,你获得一个与该角色同名且体力上限为1、初始手牌为2的随从;出牌阶段,你可以调遣以此法获得的随从(直到随从死亡不可再次切换)。',
|
lingyong_info:
|
||||||
mbaizhan:'百战',
|
"锁定技,每当一名其他角色死亡,你获得一个与该角色同名且体力上限为1、初始手牌为2的随从;出牌阶段,你可以调遣以此法获得的随从(直到随从死亡不可再次切换)。",
|
||||||
mbaizhan_info:'锁定技,每当你造成1点伤害,你获得1点护甲。',
|
mbaizhan: "百战",
|
||||||
msilian:'祀炼',
|
mbaizhan_info: "锁定技,每当你造成1点伤害,你获得1点护甲。",
|
||||||
msilian_info:'结束阶段,若你有护甲,你可以移去全部护甲,然后进行一个额外回合;在额外回合中,你的摸牌阶段摸牌基数为你移去的护甲数;额外回合结束后,若你未造成伤害,你失去1点体力。',
|
msilian: "祀炼",
|
||||||
mtongnian:'通念',
|
msilian_info:
|
||||||
mtongnian_info:'锁定技,出牌阶段开始时,你获得一张替身牌,此牌对应一名随机敌人的一张随机手牌;每当你使用一张非替身牌,随机更换替身牌对应的牌;当你使用替身牌时,改为使用替身牌对应的牌;当出牌阶段结束,或替身牌离开手牌区,或敌方角色没有手牌时,销毁替身牌。',
|
"结束阶段,若你有护甲,你可以移去全部护甲,然后进行一个额外回合;在额外回合中,你的摸牌阶段摸牌基数为你移去的护甲数;额外回合结束后,若你未造成伤害,你失去1点体力。",
|
||||||
msuoling:'塑灵',
|
mtongnian: "通念",
|
||||||
msuoling_info:'每轮限一次,当一名其他角色使用一张非转化的普通锦囊牌时,你可以弃置一张与之花色相同的牌取消之,然后你视为使用该锦囊牌。',
|
mtongnian_info:
|
||||||
msuoling_old_info:'出牌阶段限一次,若你手牌中有替身牌且手牌数不超过5,你可以展示手牌,若其中的非替身手牌能通过四则运算得到你的替身牌的点数,你将替身牌转化为非替身牌,然后获得一张新的替身牌(此技能托管无效)。',
|
"锁定技,出牌阶段开始时,你获得一张替身牌,此牌对应一名随机敌人的一张随机手牌;每当你使用一张非替身牌,随机更换替身牌对应的牌;当你使用替身牌时,改为使用替身牌对应的牌;当出牌阶段结束,或替身牌离开手牌区,或敌方角色没有手牌时,销毁替身牌。",
|
||||||
mhuanyi:'幻逸',
|
msuoling: "塑灵",
|
||||||
mhuanyi_info:'每两轮限一次,结束阶段,你可以选择一名其他角色和一种卡牌类型(选择结果对其他角色不可见),直到下一回合开始,当你首次成为该类型卡牌的惟一目标时,你将目标转移给你指定的角色(目标须合法)。',
|
msuoling_info:
|
||||||
|
"每轮限一次,当一名其他角色使用一张非转化的普通锦囊牌时,你可以弃置一张与之花色相同的牌取消之,然后你视为使用该锦囊牌。",
|
||||||
|
msuoling_old_info:
|
||||||
|
"出牌阶段限一次,若你手牌中有替身牌且手牌数不超过5,你可以展示手牌,若其中的非替身手牌能通过四则运算得到你的替身牌的点数,你将替身牌转化为非替身牌,然后获得一张新的替身牌(此技能托管无效)。",
|
||||||
|
mhuanyi: "幻逸",
|
||||||
|
mhuanyi_info:
|
||||||
|
"每两轮限一次,结束阶段,你可以选择一名其他角色和一种卡牌类型(选择结果对其他角色不可见),直到下一回合开始,当你首次成为该类型卡牌的惟一目标时,你将目标转移给你指定的角色(目标须合法)。",
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
12723
character/offline.js
12723
character/offline.js
File diff suppressed because it is too large
Load Diff
2258
character/old.js
2258
character/old.js
File diff suppressed because it is too large
Load Diff
2684
character/onlyOL.js
2684
character/onlyOL.js
File diff suppressed because it is too large
Load Diff
5703
character/ow.js
5703
character/ow.js
File diff suppressed because it is too large
Load Diff
5458
character/rank.js
5458
character/rank.js
File diff suppressed because it is too large
Load Diff
26837
character/refresh.js
26837
character/refresh.js
File diff suppressed because it is too large
Load Diff
12764
character/sb.js
12764
character/sb.js
File diff suppressed because it is too large
Load Diff
13775
character/shenhua.js
13775
character/shenhua.js
File diff suppressed because it is too large
Load Diff
11887
character/shiji.js
11887
character/shiji.js
File diff suppressed because it is too large
Load Diff
49214
character/sp.js
49214
character/sp.js
File diff suppressed because it is too large
Load Diff
20517
character/sp2.js
20517
character/sp2.js
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
15845
character/swd.js
15845
character/swd.js
File diff suppressed because it is too large
Load Diff
29828
character/tw.js
29828
character/tw.js
File diff suppressed because it is too large
Load Diff
|
@ -1,118 +1,123 @@
|
||||||
import { game } from '../noname.js';
|
import { lib, game, ui, get, ai, _status } from "../noname.js";
|
||||||
game.import('character',function(lib,game,ui,get,ai,_status){
|
game.import("character", function () {
|
||||||
return {
|
return {
|
||||||
name:'xiake',
|
name: "xiake",
|
||||||
character:{
|
character: {
|
||||||
// xk_dongfangweiming:['male','shu',4,[]],
|
// xk_dongfangweiming:['male','shu',4,[]],
|
||||||
xk_guyuexuan:['male','qun',4,['rouquan','gzhenji']],
|
xk_guyuexuan: ["male", "qun", 4, ["rouquan", "gzhenji"]],
|
||||||
xk_jinji:['male','shu',4,['zhongzhan','lianpo']],
|
xk_jinji: ["male", "shu", 4, ["zhongzhan", "lianpo"]],
|
||||||
// xk_shenxiangyun:['female','wei',3,['zhenjiu']],
|
// xk_shenxiangyun:['female','wei',3,['zhenjiu']],
|
||||||
xk_fujianhan:['male','qun',4,['zuijian','zitong']],
|
xk_fujianhan: ["male", "qun", 4, ["zuijian", "zitong"]],
|
||||||
},
|
},
|
||||||
skill:{
|
skill: {
|
||||||
zhongzhan:{
|
zhongzhan: {
|
||||||
trigger:{source:'damageBegin'},
|
trigger: { source: "damageBegin" },
|
||||||
logTarget:'player',
|
logTarget: "player",
|
||||||
check:function(event,player){
|
check: function (event, player) {
|
||||||
if(get.damageEffect(event.player,player,player)>0&&
|
if (
|
||||||
get.attitude(player,event.player)<0){
|
get.damageEffect(event.player, player, player) > 0 &&
|
||||||
return player.hp>event.player.hp&&player.hp>=2;
|
get.attitude(player, event.player) < 0
|
||||||
|
) {
|
||||||
|
return player.hp > event.player.hp && player.hp >= 2;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
content:function(){
|
content: function () {
|
||||||
player.loseHp();
|
player.loseHp();
|
||||||
trigger.num++;
|
trigger.num++;
|
||||||
}
|
|
||||||
},
|
},
|
||||||
rouquan:{
|
|
||||||
mod:{
|
|
||||||
selectTarget:function(card,player,range){
|
|
||||||
if(card.name=='sha'&&!player.getEquip(1)&&range[1]!=-1) range[1]=Infinity;
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
enable:'phaseUse',
|
rouquan: {
|
||||||
position:'e',
|
mod: {
|
||||||
filter:function(event,player){
|
selectTarget: function (card, player, range) {
|
||||||
return player.hasCard(card=>lib.skill.rouquan.filterCard(card,player),lib.skill.rouquan.position);
|
if (card.name == "sha" && !player.getEquip(1) && range[1] != -1) range[1] = Infinity;
|
||||||
},
|
},
|
||||||
filterCard:lib.filter.cardRecastable,
|
},
|
||||||
prompt:'将要重铸的牌置入弃牌堆并摸一张牌',
|
enable: "phaseUse",
|
||||||
discard:false,
|
position: "e",
|
||||||
lose:false,
|
filter: function (event, player) {
|
||||||
delay:false,
|
return player.hasCard(
|
||||||
check:function(card,player){
|
(card) => lib.skill.rouquan.filterCard(card, player),
|
||||||
var val=get.equipValue(card);
|
lib.skill.rouquan.position
|
||||||
var player=_status.event.player;
|
);
|
||||||
var cards=player.getCards('h',{subtype:get.subtype(card)});
|
},
|
||||||
for(var i=0;i<cards.length;i++){
|
filterCard: lib.filter.cardRecastable,
|
||||||
if(get.equipValue(cards[i])>=val){
|
prompt: "将要重铸的牌置入弃牌堆并摸一张牌",
|
||||||
|
discard: false,
|
||||||
|
lose: false,
|
||||||
|
delay: false,
|
||||||
|
check: function (card, player) {
|
||||||
|
var val = get.equipValue(card);
|
||||||
|
var player = _status.event.player;
|
||||||
|
var cards = player.getCards("h", { subtype: get.subtype(card) });
|
||||||
|
for (var i = 0; i < cards.length; i++) {
|
||||||
|
if (get.equipValue(cards[i]) >= val) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
},
|
},
|
||||||
content:function(){
|
content: function () {
|
||||||
player.recast(cards);
|
player.recast(cards);
|
||||||
},
|
},
|
||||||
ai:{
|
ai: {
|
||||||
order:9.5,
|
order: 9.5,
|
||||||
result:{
|
result: {
|
||||||
player:1
|
player: 1,
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
gzhenji:{
|
|
||||||
trigger:{source:'damageEnd'},
|
|
||||||
frequent:true,
|
|
||||||
filter:function(event,player){
|
|
||||||
if(event._notrigger.includes(event.player)) return false;
|
|
||||||
return _status.currentPhase==player&&event.card&&event.card.name=='sha';
|
|
||||||
},
|
},
|
||||||
content:function(){
|
},
|
||||||
|
gzhenji: {
|
||||||
|
trigger: { source: "damageEnd" },
|
||||||
|
frequent: true,
|
||||||
|
filter: function (event, player) {
|
||||||
|
if (event._notrigger.includes(event.player)) return false;
|
||||||
|
return _status.currentPhase == player && event.card && event.card.name == "sha";
|
||||||
|
},
|
||||||
|
content: function () {
|
||||||
player.draw();
|
player.draw();
|
||||||
player.addTempSkill('gzhenji3');
|
player.addTempSkill("gzhenji3");
|
||||||
|
},
|
||||||
|
},
|
||||||
|
gzhenji3: {
|
||||||
|
mod: {
|
||||||
|
cardUsable: function (card, player, num) {
|
||||||
|
if (card.name == "sha") return num + 1;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
zitong: {
|
||||||
|
trigger: { player: "useCard" },
|
||||||
|
frequent: true,
|
||||||
|
filter: function (event, player) {
|
||||||
|
return _status.currentPhase == player && player.countUsed() == 3;
|
||||||
|
},
|
||||||
|
content: function () {
|
||||||
|
var card = get.cardPile("chuansongmen");
|
||||||
|
if (!card) {
|
||||||
|
card = game.createCard("chuansongmen");
|
||||||
}
|
}
|
||||||
|
player.gain(card, "gain2");
|
||||||
},
|
},
|
||||||
gzhenji3:{
|
ai: {
|
||||||
mod:{
|
threaten: 1.2,
|
||||||
cardUsable:function(card,player,num){
|
|
||||||
if(card.name=='sha') return num+1;
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
zitong:{
|
|
||||||
trigger:{player:'useCard'},
|
|
||||||
frequent:true,
|
|
||||||
filter:function(event,player){
|
|
||||||
return _status.currentPhase==player&&player.countUsed()==3;
|
|
||||||
},
|
},
|
||||||
content:function(){
|
translate: {
|
||||||
var card=get.cardPile('chuansongmen');
|
xk_dongfangweiming: "东方未明",
|
||||||
if(!card){
|
xk_guyuexuan: "谷月轩",
|
||||||
card=game.createCard('chuansongmen');
|
xk_jinji: "荆棘",
|
||||||
}
|
xk_shenxiangyun: "沈湘芸",
|
||||||
player.gain(card,'gain2');
|
xk_fujianhan: "傅剑寒",
|
||||||
},
|
zhongzhan: "重斩",
|
||||||
ai:{
|
zhongzhan_info: "每当你即将造成伤害,你可失去1点体力令伤害+1。",
|
||||||
threaten:1.2
|
gzhenji: "震击",
|
||||||
}
|
gzhenji_info: "你使用杀造成伤害后,可以摸一张牌,并且本回合内可以额外使用一张杀。",
|
||||||
}
|
rouquan: "柔拳",
|
||||||
},
|
rouquan_info: "你可以重铸装备区内的牌;当你没有武器牌时,你的杀可以指定任意个目标。",
|
||||||
translate:{
|
zitong: "通悟",
|
||||||
xk_dongfangweiming:'东方未明',
|
zitong_info: "当你于自己的回合内使用第三张牌时,你可以将一张传送门置于你的手牌。",
|
||||||
xk_guyuexuan:'谷月轩',
|
|
||||||
xk_jinji:'荆棘',
|
|
||||||
xk_shenxiangyun:'沈湘芸',
|
|
||||||
xk_fujianhan:'傅剑寒',
|
|
||||||
zhongzhan:'重斩',
|
|
||||||
zhongzhan_info:'每当你即将造成伤害,你可失去1点体力令伤害+1。',
|
|
||||||
gzhenji:'震击',
|
|
||||||
gzhenji_info:'你使用杀造成伤害后,可以摸一张牌,并且本回合内可以额外使用一张杀。',
|
|
||||||
rouquan:'柔拳',
|
|
||||||
rouquan_info:'你可以重铸装备区内的牌;当你没有武器牌时,你的杀可以指定任意个目标。',
|
|
||||||
zitong:'通悟',
|
|
||||||
zitong_info:'当你于自己的回合内使用第三张牌时,你可以将一张传送门置于你的手牌。',
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
27492
character/xianding.js
27492
character/xianding.js
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
24788
character/yijiang.js
24788
character/yijiang.js
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
4996
character/yxs.js
4996
character/yxs.js
File diff suppressed because it is too large
Load Diff
|
@ -1,342 +1,343 @@
|
||||||
import { game } from '../noname.js';
|
import { lib, game, ui, get, ai, _status } from "../noname.js";
|
||||||
game.import('character',function(lib,game,ui,get,ai,_status){
|
game.import("character", function () {
|
||||||
return {
|
return {
|
||||||
name:'zhuogui',
|
name: "zhuogui",
|
||||||
character:{
|
character: {
|
||||||
nianshou:['male','shu',4,['nianrui','qixiang']],
|
nianshou: ["male", "shu", 4, ["nianrui", "qixiang"]],
|
||||||
mamian:['male','qun',4,['lianyu','guiji']],
|
mamian: ["male", "qun", 4, ["lianyu", "guiji"]],
|
||||||
niutou:['male','shu',4,['manjia','xiaoshou']],
|
niutou: ["male", "shu", 4, ["manjia", "xiaoshou"]],
|
||||||
baiwuchang:['male','qun',3,['qiangzheng','moukui']],
|
baiwuchang: ["male", "qun", 3, ["qiangzheng", "moukui"]],
|
||||||
heiwuchang:['male','qun',3,['suoling','xixing']],
|
heiwuchang: ["male", "qun", 3, ["suoling", "xixing"]],
|
||||||
},
|
},
|
||||||
skill:{
|
skill: {
|
||||||
qixiang:{
|
qixiang: {
|
||||||
group:['qixiang1','qixiang2'],
|
group: ["qixiang1", "qixiang2"],
|
||||||
ai:{
|
ai: {
|
||||||
effect:{
|
effect: {
|
||||||
target:function(card,player,target,current){
|
target: function (card, player, target, current) {
|
||||||
if(card.name=='lebu'&&card.name=='bingliang') return 0.8;
|
if (card.name == "lebu" && card.name == "bingliang") return 0.8;
|
||||||
}
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
qixiang1: {
|
||||||
|
trigger: { player: "judge" },
|
||||||
|
forced: true,
|
||||||
|
filter: function (event, player) {
|
||||||
|
if (event.card) {
|
||||||
|
if (event.card.viewAs) {
|
||||||
|
return event.card.viewAs == "lebu";
|
||||||
|
} else {
|
||||||
|
return event.card.name == "lebu";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
qixiang1:{
|
content: function () {
|
||||||
trigger:{player:'judge'},
|
player.addTempSkill("qixiang3", "phaseJudgeAfter");
|
||||||
forced:true,
|
},
|
||||||
filter:function(event,player){
|
},
|
||||||
if(event.card){
|
qixiang2: {
|
||||||
if(event.card.viewAs){
|
trigger: { player: "judge" },
|
||||||
return event.card.viewAs=='lebu';
|
forced: true,
|
||||||
}
|
filter: function (event, player) {
|
||||||
else{
|
if (event.card) {
|
||||||
return event.card.name=='lebu';
|
if (event.card.viewAs) {
|
||||||
|
return event.card.viewAs == "bingliang";
|
||||||
|
} else {
|
||||||
|
return event.card.name == "bingliang";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
content:function(){
|
content: function () {
|
||||||
player.addTempSkill('qixiang3','phaseJudgeAfter');
|
player.addTempSkill("qixiang4", "phaseJudgeAfter");
|
||||||
}
|
|
||||||
},
|
},
|
||||||
qixiang2:{
|
|
||||||
trigger:{player:'judge'},
|
|
||||||
forced:true,
|
|
||||||
filter:function(event,player){
|
|
||||||
if(event.card){
|
|
||||||
if(event.card.viewAs){
|
|
||||||
return event.card.viewAs=='bingliang';
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
return event.card.name=='bingliang';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
content:function(){
|
qixiang3: {
|
||||||
player.addTempSkill('qixiang4','phaseJudgeAfter');
|
mod: {
|
||||||
}
|
suit: function (card, suit) {
|
||||||
|
if (suit == "diamond") return "heart";
|
||||||
},
|
},
|
||||||
qixiang3:{
|
|
||||||
mod:{
|
|
||||||
suit:function(card,suit){
|
|
||||||
if(suit=='diamond') return 'heart';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
qixiang4:{
|
|
||||||
mod:{
|
|
||||||
suit:function(card,suit){
|
|
||||||
if(suit=='spade') return 'club';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
nianrui:{
|
qixiang4: {
|
||||||
trigger:{player:['phaseBegin','phaseEnd']},
|
mod: {
|
||||||
content:function(){
|
suit: function (card, suit) {
|
||||||
"step 0"
|
if (suit == "spade") return "club";
|
||||||
player.judge(function(card){
|
},
|
||||||
return get.color(card)=='red'?1:0;
|
},
|
||||||
|
},
|
||||||
|
nianrui: {
|
||||||
|
trigger: { player: ["phaseBegin", "phaseEnd"] },
|
||||||
|
content: function () {
|
||||||
|
"step 0";
|
||||||
|
player.judge(function (card) {
|
||||||
|
return get.color(card) == "red" ? 1 : 0;
|
||||||
});
|
});
|
||||||
"step 1"
|
"step 1";
|
||||||
if(result.bool){
|
if (result.bool) {
|
||||||
player.draw();
|
player.draw();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
},
|
},
|
||||||
lianyu:{
|
|
||||||
enable:'phaseUse',
|
|
||||||
usable:1,
|
|
||||||
filterCard:{color:'red'},
|
|
||||||
check:function(card){return 6-get.value(card)},
|
|
||||||
filterTarget:true,
|
|
||||||
selectTarget:-1,
|
|
||||||
line:'fire',
|
|
||||||
content:function(){
|
|
||||||
target.damage('fire');
|
|
||||||
},
|
},
|
||||||
ai:{
|
lianyu: {
|
||||||
result:{
|
enable: "phaseUse",
|
||||||
player:function(card,player,target){
|
usable: 1,
|
||||||
var eff=0;
|
filterCard: { color: "red" },
|
||||||
for(var i=0;i<game.players.length;i++){
|
check: function (card) {
|
||||||
if(!game.players[i].isOut()){
|
return 6 - get.value(card);
|
||||||
eff+=get.damageEffect(game.players[i],player,player,'fire');
|
},
|
||||||
|
filterTarget: true,
|
||||||
|
selectTarget: -1,
|
||||||
|
line: "fire",
|
||||||
|
content: function () {
|
||||||
|
target.damage("fire");
|
||||||
|
},
|
||||||
|
ai: {
|
||||||
|
result: {
|
||||||
|
player: function (card, player, target) {
|
||||||
|
var eff = 0;
|
||||||
|
for (var i = 0; i < game.players.length; i++) {
|
||||||
|
if (!game.players[i].isOut()) {
|
||||||
|
eff += get.damageEffect(game.players[i], player, player, "fire");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return eff;
|
return eff;
|
||||||
}
|
|
||||||
},
|
},
|
||||||
expose:0.1
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
manjia:{
|
expose: 0.1,
|
||||||
group:['manjia1','manjia2']
|
|
||||||
},
|
},
|
||||||
manjia1:{
|
|
||||||
trigger:{target:'useCardToBefore'},
|
|
||||||
forced:true,
|
|
||||||
priority:6,
|
|
||||||
filter:function(event,player){
|
|
||||||
if(player.getEquip(2)) return false;
|
|
||||||
return lib.skill.tengjia1.filter(event,player);
|
|
||||||
},
|
},
|
||||||
content:function(){
|
manjia: {
|
||||||
|
group: ["manjia1", "manjia2"],
|
||||||
|
},
|
||||||
|
manjia1: {
|
||||||
|
trigger: { target: "useCardToBefore" },
|
||||||
|
forced: true,
|
||||||
|
priority: 6,
|
||||||
|
filter: function (event, player) {
|
||||||
|
if (player.getEquip(2)) return false;
|
||||||
|
return lib.skill.tengjia1.filter(event, player);
|
||||||
|
},
|
||||||
|
content: function () {
|
||||||
trigger.cancel();
|
trigger.cancel();
|
||||||
},
|
},
|
||||||
ai:{
|
ai: {
|
||||||
effect:{
|
effect: {
|
||||||
target:function(card,player,target,current){
|
target: function (card, player, target, current) {
|
||||||
if(target.getEquip(2)) return;
|
if (target.getEquip(2)) return;
|
||||||
return lib.skill.tengjia1.ai.effect.target.apply(this,arguments);
|
return lib.skill.tengjia1.ai.effect.target.apply(this, arguments);
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
manjia2:{
|
|
||||||
trigger:{player:'damageBegin'},
|
|
||||||
filter:function(event,player){
|
|
||||||
if(player.getEquip(2)) return false;
|
|
||||||
if(event.hasNature('fire')) return true;
|
|
||||||
},
|
},
|
||||||
forced:true,
|
},
|
||||||
check:function(){
|
},
|
||||||
|
manjia2: {
|
||||||
|
trigger: { player: "damageBegin" },
|
||||||
|
filter: function (event, player) {
|
||||||
|
if (player.getEquip(2)) return false;
|
||||||
|
if (event.hasNature("fire")) return true;
|
||||||
|
},
|
||||||
|
forced: true,
|
||||||
|
check: function () {
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
content:function(){
|
content: function () {
|
||||||
trigger.num++;
|
trigger.num++;
|
||||||
},
|
},
|
||||||
ai:{
|
ai: {
|
||||||
effect:{
|
effect: {
|
||||||
target:function(card,player,target,current){
|
target: function (card, player, target, current) {
|
||||||
if(target.getEquip(2)) return;
|
if (target.getEquip(2)) return;
|
||||||
return lib.skill.tengjia2.ai.effect.target.apply(this,arguments);
|
return lib.skill.tengjia2.ai.effect.target.apply(this, arguments);
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
xiaoshou:{
|
},
|
||||||
trigger:{player:'phaseEnd'},
|
},
|
||||||
filter:function(event,player){
|
},
|
||||||
var players=game.players.slice(0);
|
xiaoshou: {
|
||||||
players.sort(function(a,b){
|
trigger: { player: "phaseEnd" },
|
||||||
return b.hp-a.hp;
|
filter: function (event, player) {
|
||||||
|
var players = game.players.slice(0);
|
||||||
|
players.sort(function (a, b) {
|
||||||
|
return b.hp - a.hp;
|
||||||
});
|
});
|
||||||
return players[0].hp>players[1].hp&&players[0]!=player;
|
return players[0].hp > players[1].hp && players[0] != player;
|
||||||
},
|
},
|
||||||
check:function(event,player){
|
check: function (event, player) {
|
||||||
var players=game.players.slice(0);
|
var players = game.players.slice(0);
|
||||||
players.sort(function(a,b){
|
players.sort(function (a, b) {
|
||||||
return b.hp-a.hp;
|
return b.hp - a.hp;
|
||||||
});
|
});
|
||||||
return get.damageEffect(players[0],player,player,'fire')>0;
|
return get.damageEffect(players[0], player, player, "fire") > 0;
|
||||||
},
|
},
|
||||||
prompt:function(){
|
prompt: function () {
|
||||||
var players=game.players.slice(0);
|
var players = game.players.slice(0);
|
||||||
players.sort(function(a,b){
|
players.sort(function (a, b) {
|
||||||
return b.hp-a.hp;
|
return b.hp - a.hp;
|
||||||
});
|
});
|
||||||
return '枭首:是否对'+get.translation(players[0])+'造成1点火焰伤害?';
|
return "枭首:是否对" + get.translation(players[0]) + "造成1点火焰伤害?";
|
||||||
},
|
},
|
||||||
content:function(){
|
content: function () {
|
||||||
var players=game.players.slice(0);
|
var players = game.players.slice(0);
|
||||||
players.sort(function(a,b){
|
players.sort(function (a, b) {
|
||||||
return b.hp-a.hp;
|
return b.hp - a.hp;
|
||||||
});
|
});
|
||||||
if(players[0].hp>players[1].hp&&players[0]!=player){
|
if (players[0].hp > players[1].hp && players[0] != player) {
|
||||||
players[0].damage('fire');
|
players[0].damage("fire");
|
||||||
player.line(players[0],'fire');
|
player.line(players[0], "fire");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
ai:{
|
ai: {
|
||||||
expose:0.2
|
expose: 0.2,
|
||||||
}
|
|
||||||
},
|
},
|
||||||
guiji:{
|
|
||||||
trigger:{player:'phaseJudgeBegin'},
|
|
||||||
forced:true,
|
|
||||||
content:function(){
|
|
||||||
player.discard(player.getCards('j').randomGet());
|
|
||||||
},
|
},
|
||||||
filter:function(event ,player){
|
guiji: {
|
||||||
return player.countCards('j')>0;
|
trigger: { player: "phaseJudgeBegin" },
|
||||||
|
forced: true,
|
||||||
|
content: function () {
|
||||||
|
player.discard(player.getCards("j").randomGet());
|
||||||
},
|
},
|
||||||
ai:{
|
filter: function (event, player) {
|
||||||
effect:{
|
return player.countCards("j") > 0;
|
||||||
target:function(card,player,target,current){
|
|
||||||
if(get.type(card)=='delay'&&target.countCards('j')==0) return 0.1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
qiangzheng:{
|
ai: {
|
||||||
audio:2,
|
effect: {
|
||||||
trigger:{player:'phaseEnd'},
|
target: function (card, player, target, current) {
|
||||||
direct:true,
|
if (get.type(card) == "delay" && target.countCards("j") == 0) return 0.1;
|
||||||
forced:true,
|
},
|
||||||
filter:function(event,player){
|
},
|
||||||
for(var i=0;i<game.players.length;i++){
|
},
|
||||||
if(game.players[i]!=player&&game.players[i].countCards('h')) return true;
|
},
|
||||||
|
qiangzheng: {
|
||||||
|
audio: 2,
|
||||||
|
trigger: { player: "phaseEnd" },
|
||||||
|
direct: true,
|
||||||
|
forced: true,
|
||||||
|
filter: function (event, player) {
|
||||||
|
for (var i = 0; i < game.players.length; i++) {
|
||||||
|
if (game.players[i] != player && game.players[i].countCards("h")) return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
content:function(){
|
content: function () {
|
||||||
"step 0"
|
"step 0";
|
||||||
player.chooseTarget('获得一名角色的一张手牌',true,function(card,player,target){
|
player.chooseTarget("获得一名角色的一张手牌", true, function (card, player, target) {
|
||||||
return player!=target&&target.countCards('h')>0;
|
return player != target && target.countCards("h") > 0;
|
||||||
}).ai=function(target){
|
}).ai = function (target) {
|
||||||
return -get.attitude(player,target);
|
return -get.attitude(player, target);
|
||||||
};
|
};
|
||||||
"step 1"
|
"step 1";
|
||||||
if(result.targets&&result.targets.length){
|
if (result.targets && result.targets.length) {
|
||||||
player.logSkill('qiangzheng',result.targets);
|
player.logSkill("qiangzheng", result.targets);
|
||||||
player.gain(result.targets[0].getCards('h').randomGet(),result.targets[0]);
|
player.gain(result.targets[0].getCards("h").randomGet(), result.targets[0]);
|
||||||
result.targets[0].$give(1,player);
|
result.targets[0].$give(1, player);
|
||||||
game.delay();
|
game.delay();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
ai:{
|
ai: {
|
||||||
threaten:1.7
|
threaten: 1.7,
|
||||||
}
|
|
||||||
},
|
},
|
||||||
suoling:{
|
},
|
||||||
trigger:{player:'phaseEnd'},
|
suoling: {
|
||||||
forced:true,
|
trigger: { player: "phaseEnd" },
|
||||||
filter:function(event,player){
|
forced: true,
|
||||||
if(player.isLinked()) return true;
|
filter: function (event, player) {
|
||||||
for(var i=0;i<game.players.length;i++){
|
if (player.isLinked()) return true;
|
||||||
if(game.players[i]!=player&&!game.players[i].isLinked()){
|
for (var i = 0; i < game.players.length; i++) {
|
||||||
|
if (game.players[i] != player && !game.players[i].isLinked()) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
content:function(){
|
content: function () {
|
||||||
"step 0"
|
"step 0";
|
||||||
event.targets=game.players.slice(0);
|
event.targets = game.players.slice(0);
|
||||||
event.targets.remove(player);
|
event.targets.remove(player);
|
||||||
event.targets.sort(lib.sort.seat);
|
event.targets.sort(lib.sort.seat);
|
||||||
if(player.isLinked()) player.link();
|
if (player.isLinked()) player.link();
|
||||||
"step 1"
|
"step 1";
|
||||||
if(event.targets.length){
|
if (event.targets.length) {
|
||||||
var target=event.targets.shift();
|
var target = event.targets.shift();
|
||||||
if(!target.isLinked()){
|
if (!target.isLinked()) {
|
||||||
target.link();
|
target.link();
|
||||||
}
|
}
|
||||||
event.redo();
|
event.redo();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
},
|
},
|
||||||
xixing:{
|
},
|
||||||
enable:'phaseUse',
|
xixing: {
|
||||||
usable:1,
|
enable: "phaseUse",
|
||||||
filterCard:function(card){
|
usable: 1,
|
||||||
var type=get.type(card);
|
filterCard: function (card) {
|
||||||
for(var i=0;i<ui.selected.cards.length;i++){
|
var type = get.type(card);
|
||||||
if(get.type(ui.selected.cards[i])==type) return false;
|
for (var i = 0; i < ui.selected.cards.length; i++) {
|
||||||
|
if (get.type(ui.selected.cards[i]) == type) return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
complexCard:true,
|
complexCard: true,
|
||||||
selectCard:3,
|
selectCard: 3,
|
||||||
position:'he',
|
position: "he",
|
||||||
filterTarget:function(card,player,target){
|
filterTarget: function (card, player, target) {
|
||||||
return player!=target;
|
return player != target;
|
||||||
},
|
},
|
||||||
check:function(card){
|
check: function (card) {
|
||||||
if(_status.event.player.hp==_status.event.player.maxHp){
|
if (_status.event.player.hp == _status.event.player.maxHp) {
|
||||||
return 5-get.value(card);
|
return 5 - get.value(card);
|
||||||
}
|
}
|
||||||
return 10-get.value(card);
|
return 10 - get.value(card);
|
||||||
},
|
},
|
||||||
content:function(){
|
content: function () {
|
||||||
"step 0"
|
"step 0";
|
||||||
target.damage();
|
target.damage();
|
||||||
"step 1"
|
"step 1";
|
||||||
player.recover();
|
player.recover();
|
||||||
},
|
},
|
||||||
ai:{
|
ai: {
|
||||||
order:9.5,
|
order: 9.5,
|
||||||
result:{
|
result: {
|
||||||
target:function(player,target){
|
target: function (player, target) {
|
||||||
return get.damageEffect(target,player);
|
return get.damageEffect(target, player);
|
||||||
}
|
|
||||||
},
|
},
|
||||||
expose:0.2
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
translate:{
|
expose: 0.2,
|
||||||
nianshou:'年兽',
|
},
|
||||||
nianrui:'年瑞',
|
},
|
||||||
qixiang:'祺祥',
|
},
|
||||||
qixiang1:'祺祥',
|
translate: {
|
||||||
qixiang2:'祺祥',
|
nianshou: "年兽",
|
||||||
nianrui_info:'准备阶段和结束阶段,你可以进行一次判定,若结果为红色则摸一张牌。',
|
nianrui: "年瑞",
|
||||||
qixiang_info:'乐不思蜀判定时,你的方块判定牌视为红桃;兵粮寸断判定时,你的黑桃判定牌视为草花。',
|
qixiang: "祺祥",
|
||||||
|
qixiang1: "祺祥",
|
||||||
|
qixiang2: "祺祥",
|
||||||
|
nianrui_info: "准备阶段和结束阶段,你可以进行一次判定,若结果为红色则摸一张牌。",
|
||||||
|
qixiang_info: "乐不思蜀判定时,你的方块判定牌视为红桃;兵粮寸断判定时,你的黑桃判定牌视为草花。",
|
||||||
|
|
||||||
mamian:'马面',
|
mamian: "马面",
|
||||||
lianyu:'炼狱',
|
lianyu: "炼狱",
|
||||||
lianyu_info:'出牌阶段限一次,你可以弃置一张红色手牌令场上所有角色受到1点火焰伤害。',
|
lianyu_info: "出牌阶段限一次,你可以弃置一张红色手牌令场上所有角色受到1点火焰伤害。",
|
||||||
|
|
||||||
niutou:'牛头',
|
niutou: "牛头",
|
||||||
manjia:'蛮甲',
|
manjia: "蛮甲",
|
||||||
manjia1:'蛮甲',
|
manjia1: "蛮甲",
|
||||||
manjia2:'蛮甲',
|
manjia2: "蛮甲",
|
||||||
manjia_info:'锁定技,若你的装备区内没有防具牌,则你视为装备了【藤甲】。',
|
manjia_info: "锁定技,若你的装备区内没有防具牌,则你视为装备了【藤甲】。",
|
||||||
xiaoshou:'枭首',
|
xiaoshou: "枭首",
|
||||||
xiaoshou_info:'结束阶段,若场上体力值最多的角色只有一个,你可以对其造成1点火焰伤害。',
|
xiaoshou_info: "结束阶段,若场上体力值最多的角色只有一个,你可以对其造成1点火焰伤害。",
|
||||||
guiji:'诡计',
|
guiji: "诡计",
|
||||||
guiji_info:'锁定技,准备阶段结束时,若你的判定区内有牌,你随机弃置其中一张牌。',
|
guiji_info: "锁定技,准备阶段结束时,若你的判定区内有牌,你随机弃置其中一张牌。",
|
||||||
|
|
||||||
baiwuchang:'白无常',
|
baiwuchang: "白无常",
|
||||||
qiangzheng:'强征',
|
qiangzheng: "强征",
|
||||||
qiangzheng_info:'锁定技,结束阶段,你获得一名其他角色的一张手牌。',
|
qiangzheng_info: "锁定技,结束阶段,你获得一名其他角色的一张手牌。",
|
||||||
zuijiu:'醉酒',
|
zuijiu: "醉酒",
|
||||||
zuijiu_info:'锁定技,你的黑杀造成的伤害+1,造成伤害后须弃置一张手牌。',
|
zuijiu_info: "锁定技,你的黑杀造成的伤害+1,造成伤害后须弃置一张手牌。",
|
||||||
|
|
||||||
heiwuchang:'黑无常',
|
heiwuchang: "黑无常",
|
||||||
suoling:'索令',
|
suoling: "索令",
|
||||||
suoling_info:'锁定技,结束阶段,你解除横置状态,除你之外的所有角色进入横置状态。',
|
suoling_info: "锁定技,结束阶段,你解除横置状态,除你之外的所有角色进入横置状态。",
|
||||||
xixing:'吸星',
|
xixing: "吸星",
|
||||||
xixing_info:'出牌阶段限一次,你可以弃置三张不同类别的牌,对一名其他角色造成1点伤害,然后回复1点体力。',
|
xixing_info:
|
||||||
|
"出牌阶段限一次,你可以弃置三张不同类别的牌,对一名其他角色造成1点伤害,然后回复1点体力。",
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
|
@ -0,0 +1,39 @@
|
||||||
|
import js from "@eslint/js";
|
||||||
|
import globals from "globals";
|
||||||
|
|
||||||
|
export default [
|
||||||
|
js.configs.recommended,
|
||||||
|
{
|
||||||
|
rules: {
|
||||||
|
"no-console": 0,
|
||||||
|
"no-constant-condition": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
checkLoops: false,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"no-irregular-whitespace": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
skipStrings: true,
|
||||||
|
skipTemplates: true,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"no-redeclare": 0,
|
||||||
|
"no-undef": 0,
|
||||||
|
"no-unused-vars": 0,
|
||||||
|
"require-yield": 0,
|
||||||
|
},
|
||||||
|
languageOptions: {
|
||||||
|
ecmaVersion: 13,
|
||||||
|
sourceType: "module",
|
||||||
|
globals: {
|
||||||
|
...globals.browser,
|
||||||
|
...globals.es2015,
|
||||||
|
...globals.node,
|
||||||
|
...globals.serviceworker,
|
||||||
|
...globals.worker,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
];
|
|
@ -1,136 +1,161 @@
|
||||||
'use strict';
|
import { lib, game, ui, get, ai, _status } from "../../noname.js";
|
||||||
game.import('play',function(lib,game,ui,get,ai,_status){
|
game.import("play", function () {
|
||||||
return {
|
return {
|
||||||
name:'boss',
|
name: "boss",
|
||||||
init:function(){
|
init: function () {
|
||||||
if(get.mode()=='tafang') return;
|
if (get.mode() == "tafang") return;
|
||||||
var storage=localStorage.getItem('boss_storage_playpackconfig');
|
var storage = localStorage.getItem("boss_storage_playpackconfig");
|
||||||
try{
|
try {
|
||||||
storage=JSON.parse(storage)||{};
|
storage = JSON.parse(storage) || {};
|
||||||
|
} catch (e) {
|
||||||
|
storage = {};
|
||||||
}
|
}
|
||||||
catch(e){
|
if (get.mode() != "boss") {
|
||||||
storage={};
|
lib.characterPack.mode_extension_boss = storage.boss || {};
|
||||||
|
for (var i in lib.characterPack.mode_extension_boss) {
|
||||||
|
lib.characterPack.mode_extension_boss[i][4].push(
|
||||||
|
"mode:boss"
|
||||||
|
);
|
||||||
|
lib.character[i] = lib.characterPack.mode_extension_boss[i];
|
||||||
|
if (
|
||||||
|
typeof lib.character[i][2] != "number" &&
|
||||||
|
(typeof lib.character[i][2] != "string" ||
|
||||||
|
lib.character[i][2].indexOf("/") == -1)
|
||||||
|
) {
|
||||||
|
lib.character[i][2] = Infinity;
|
||||||
}
|
}
|
||||||
if(get.mode()!='boss'){
|
if (!lib.config.boss_enableai_playpackconfig) {
|
||||||
lib.characterPack.mode_extension_boss=storage.boss||{};
|
|
||||||
for(var i in lib.characterPack.mode_extension_boss){
|
|
||||||
lib.characterPack.mode_extension_boss[i][4].push('mode:boss');
|
|
||||||
lib.character[i]=lib.characterPack.mode_extension_boss[i];
|
|
||||||
if(typeof lib.character[i][2]!='number'&&(typeof lib.character[i][2]!='string'||lib.character[i][2].indexOf('/')==-1)){
|
|
||||||
lib.character[i][2]=Infinity;
|
|
||||||
}
|
|
||||||
if(!lib.config.boss_enableai_playpackconfig){
|
|
||||||
lib.config.forbidai.push(i);
|
lib.config.forbidai.push(i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var list2=storage.versus||{};
|
var list2 = storage.versus || {};
|
||||||
if(get.mode()!='versus'||get.config('versus_mode')!='jiange'){
|
if (
|
||||||
lib.characterPack.mode_extension_jiange=list2;
|
get.mode() != "versus" ||
|
||||||
for(var i in list2){
|
get.config("versus_mode") != "jiange"
|
||||||
lib.characterPack.mode_extension_jiange[i]=list2[i];
|
) {
|
||||||
lib.characterPack.mode_extension_jiange[i][4].push('mode:versus');
|
lib.characterPack.mode_extension_jiange = list2;
|
||||||
lib.character[i]=list2[i];
|
for (var i in list2) {
|
||||||
if(typeof lib.character[i][2]!='number'){
|
lib.characterPack.mode_extension_jiange[i] = list2[i];
|
||||||
lib.character[i][2]=Infinity;
|
lib.characterPack.mode_extension_jiange[i][4].push(
|
||||||
|
"mode:versus"
|
||||||
|
);
|
||||||
|
lib.character[i] = list2[i];
|
||||||
|
if (typeof lib.character[i][2] != "number") {
|
||||||
|
lib.character[i][2] = Infinity;
|
||||||
}
|
}
|
||||||
if(!lib.config.boss_enableai_playpackconfig){
|
if (!lib.config.boss_enableai_playpackconfig) {
|
||||||
lib.config.forbidai.push(i);
|
lib.config.forbidai.push(i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
lib.characterIntro.boss_liedixuande=lib.characterIntro.liubei;
|
lib.characterIntro.boss_liedixuande = lib.characterIntro.liubei;
|
||||||
lib.characterIntro.boss_gongshenyueying=lib.characterIntro.huangyueying;
|
lib.characterIntro.boss_gongshenyueying =
|
||||||
lib.characterIntro.boss_tianhoukongming=lib.characterIntro.shen_zhugeliang;
|
lib.characterIntro.huangyueying;
|
||||||
lib.characterIntro.boss_yuhuoshiyuan=lib.characterIntro.pangtong;
|
lib.characterIntro.boss_tianhoukongming =
|
||||||
lib.characterIntro.boss_qiaokuijunyi=lib.characterIntro.zhanghe;
|
lib.characterIntro.shen_zhugeliang;
|
||||||
lib.characterIntro.boss_jiarenzidan=lib.characterIntro.caozhen;
|
lib.characterIntro.boss_yuhuoshiyuan =
|
||||||
lib.characterIntro.boss_duanyuzhongda=lib.characterIntro.simayi;
|
lib.characterIntro.pangtong;
|
||||||
lib.characterIntro.boss_juechenmiaocai=lib.characterIntro.xiahouyuan;
|
lib.characterIntro.boss_qiaokuijunyi =
|
||||||
}
|
lib.characterIntro.zhanghe;
|
||||||
else if(_status.mode!='jiange'){
|
lib.characterIntro.boss_jiarenzidan =
|
||||||
for(var i in list2){
|
lib.characterIntro.caozhen;
|
||||||
lib.character[i]=list2[i];
|
lib.characterIntro.boss_duanyuzhongda =
|
||||||
if(!lib.config.boss_enableai_playpackconfig){
|
lib.characterIntro.simayi;
|
||||||
|
lib.characterIntro.boss_juechenmiaocai =
|
||||||
|
lib.characterIntro.xiahouyuan;
|
||||||
|
} else if (_status.mode != "jiange") {
|
||||||
|
for (var i in list2) {
|
||||||
|
lib.character[i] = list2[i];
|
||||||
|
if (!lib.config.boss_enableai_playpackconfig) {
|
||||||
lib.config.forbidai.push(i);
|
lib.config.forbidai.push(i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var list=storage.translate||{};
|
var list = storage.translate || {};
|
||||||
list.mode_extension_boss_character_config='挑战武将';
|
list.mode_extension_boss_character_config = "挑战武将";
|
||||||
list.mode_extension_jiange_character_config='剑阁武将';
|
list.mode_extension_jiange_character_config = "剑阁武将";
|
||||||
|
|
||||||
for(var i in list){
|
for (var i in list) {
|
||||||
lib.translate[i]=lib.translate[i]||list[i];
|
lib.translate[i] = lib.translate[i] || list[i];
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
arenaReady:function(){
|
arenaReady: function () {
|
||||||
if(get.mode()=='tafang') return;
|
if (get.mode() == "tafang") return;
|
||||||
var storage=localStorage.getItem('boss_storage_playpackconfig');
|
var storage = localStorage.getItem("boss_storage_playpackconfig");
|
||||||
try{
|
try {
|
||||||
storage=JSON.parse(storage)||{};
|
storage = JSON.parse(storage) || {};
|
||||||
|
} catch (e) {
|
||||||
|
storage = {};
|
||||||
}
|
}
|
||||||
catch(e){
|
if (!storage.translate) {
|
||||||
storage={};
|
storage.translate = {};
|
||||||
}
|
}
|
||||||
if(!storage.translate){
|
var loadversus = function () {
|
||||||
storage.translate={};
|
if (get.mode() != "versus") {
|
||||||
|
game.loadModeAsync("versus", function (mode) {
|
||||||
|
for (var i in mode.translate) {
|
||||||
|
lib.translate[i] =
|
||||||
|
lib.translate[i] || mode.translate[i];
|
||||||
|
storage.translate[i] = mode.translate[i];
|
||||||
}
|
}
|
||||||
var loadversus=function(){
|
for (var i in mode.skill) {
|
||||||
if(get.mode()!='versus'){
|
if (lib.skill[i]) console.log(i);
|
||||||
game.loadModeAsync('versus',function(mode){
|
if (i != "versus_ladder") {
|
||||||
for(var i in mode.translate){
|
lib.skill[i] = mode.skill[i];
|
||||||
lib.translate[i]=lib.translate[i]||mode.translate[i];
|
|
||||||
storage.translate[i]=mode.translate[i];
|
|
||||||
}
|
|
||||||
for(var i in mode.skill){
|
|
||||||
if(lib.skill[i]) console.log(i);
|
|
||||||
if(i!='versus_ladder'){
|
|
||||||
lib.skill[i]=mode.skill[i];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for(var ii in mode.skill){
|
for (var ii in mode.skill) {
|
||||||
if(ii!='versus_ladder'){
|
if (ii != "versus_ladder") {
|
||||||
game.finishSkill(ii);
|
game.finishSkill(ii);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
storage.versus={};
|
storage.versus = {};
|
||||||
for(var i in mode.jiangeboss){
|
for (var i in mode.jiangeboss) {
|
||||||
if(mode.jiangeboss[i][4].includes('bossallowed')){
|
if (mode.jiangeboss[i][4].includes("bossallowed")) {
|
||||||
storage.versus[i]=mode.jiangeboss[i];
|
storage.versus[i] = mode.jiangeboss[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
localStorage.setItem('boss_storage_playpackconfig',JSON.stringify(storage));
|
localStorage.setItem(
|
||||||
|
"boss_storage_playpackconfig",
|
||||||
|
JSON.stringify(storage)
|
||||||
|
);
|
||||||
});
|
});
|
||||||
}
|
} else {
|
||||||
else{
|
localStorage.setItem(
|
||||||
localStorage.setItem('boss_storage_playpackconfig',JSON.stringify(storage));
|
"boss_storage_playpackconfig",
|
||||||
|
JSON.stringify(storage)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
if(get.mode()!='boss'){
|
if (get.mode() != "boss") {
|
||||||
game.loadModeAsync('boss',function(mode){
|
game.loadModeAsync("boss", function (mode) {
|
||||||
for(var i in mode.translate){
|
for (var i in mode.translate) {
|
||||||
lib.translate[i]=lib.translate[i]||mode.translate[i];
|
lib.translate[i] =
|
||||||
storage.translate[i]=mode.translate[i];
|
lib.translate[i] || mode.translate[i];
|
||||||
|
storage.translate[i] = mode.translate[i];
|
||||||
}
|
}
|
||||||
for(var i in mode.skill){
|
for (var i in mode.skill) {
|
||||||
if(lib.skill[i]) console.log(i);
|
if (lib.skill[i]) console.log(i);
|
||||||
lib.skill[i]=mode.skill[i];
|
lib.skill[i] = mode.skill[i];
|
||||||
}
|
}
|
||||||
for(var ii in mode.skill){
|
for (var ii in mode.skill) {
|
||||||
if(ii!='versus_ladder'){
|
if (ii != "versus_ladder") {
|
||||||
game.finishSkill(ii);
|
game.finishSkill(ii);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
storage.boss={};
|
storage.boss = {};
|
||||||
for(var i in mode.characterPack.mode_boss){
|
for (var i in mode.characterPack.mode_boss) {
|
||||||
if(mode.characterPack.mode_boss[i][4].includes('bossallowed')){
|
if (
|
||||||
storage.boss[i]=mode.characterPack.mode_boss[i];
|
mode.characterPack.mode_boss[i][4].includes(
|
||||||
|
"bossallowed"
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
storage.boss[i] = mode.characterPack.mode_boss[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
loadversus();
|
loadversus();
|
||||||
});
|
});
|
||||||
}
|
} else {
|
||||||
else{
|
|
||||||
loadversus();
|
loadversus();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,92 +1,102 @@
|
||||||
'use strict';
|
import { lib, game, ui, get, ai, _status } from "../../noname.js";
|
||||||
game.import('play',function(lib,game,ui,get,ai,_status){
|
game.import("play", function () {
|
||||||
return {
|
return {
|
||||||
name:'cardpile',
|
name: "cardpile",
|
||||||
arenaReady:function(){
|
arenaReady: function () {
|
||||||
var data={
|
var data = {
|
||||||
total:160,
|
total: 160,
|
||||||
sha:{
|
sha: {
|
||||||
diamond:6,
|
diamond: 6,
|
||||||
club:14,
|
club: 14,
|
||||||
heart:3,
|
heart: 3,
|
||||||
spade:7,
|
spade: 7,
|
||||||
},
|
},
|
||||||
huosha:{
|
huosha: {
|
||||||
diamond:2,
|
diamond: 2,
|
||||||
heart:3
|
heart: 3,
|
||||||
},
|
},
|
||||||
leisha:{
|
leisha: {
|
||||||
spade:5,
|
spade: 5,
|
||||||
club:4
|
club: 4,
|
||||||
},
|
},
|
||||||
shan:{
|
shan: {
|
||||||
heart:6,
|
heart: 6,
|
||||||
diamond:18
|
diamond: 18,
|
||||||
},
|
},
|
||||||
jiu:{
|
jiu: {
|
||||||
diamond:1,
|
diamond: 1,
|
||||||
spade:2,
|
spade: 2,
|
||||||
club:2
|
club: 2,
|
||||||
},
|
},
|
||||||
tao:{
|
tao: {
|
||||||
heart:9,
|
heart: 9,
|
||||||
diamond:3,
|
diamond: 3,
|
||||||
},
|
},
|
||||||
wanjian:{
|
wanjian: {
|
||||||
heart:1,
|
heart: 1,
|
||||||
},
|
},
|
||||||
nanman:{
|
nanman: {
|
||||||
spade:2,
|
spade: 2,
|
||||||
club:1,
|
club: 1,
|
||||||
},
|
},
|
||||||
guohe:{
|
guohe: {
|
||||||
spade:3,
|
spade: 3,
|
||||||
club:2,
|
club: 2,
|
||||||
heart:1
|
heart: 1,
|
||||||
},
|
},
|
||||||
shunshou:{
|
shunshou: {
|
||||||
spade:3,
|
spade: 3,
|
||||||
diamond:2
|
diamond: 2,
|
||||||
},
|
},
|
||||||
wuxie:{
|
wuxie: {
|
||||||
heart:2,
|
heart: 2,
|
||||||
diamond:1,
|
diamond: 1,
|
||||||
spade:2,
|
spade: 2,
|
||||||
club:2
|
club: 2,
|
||||||
|
},
|
||||||
|
tiesuo: {
|
||||||
|
spade: 2,
|
||||||
|
club: 4,
|
||||||
},
|
},
|
||||||
tiesuo:{
|
|
||||||
spade:2,
|
|
||||||
club:4
|
|
||||||
}
|
|
||||||
}
|
|
||||||
var rand=function(){
|
|
||||||
return Math.ceil(Math.random()*13);
|
|
||||||
};
|
};
|
||||||
var getn=function(i,j){
|
var rand = function () {
|
||||||
return Math.round(data[i][j]*parseFloat(lib.config['cardpile_'+i+'_playpackconfig']));
|
return Math.ceil(Math.random() * 13);
|
||||||
};
|
};
|
||||||
var num=0;
|
var getn = function (i, j) {
|
||||||
for(var i in data){
|
return Math.round(
|
||||||
for(var j in data[i]){
|
data[i][j] *
|
||||||
num+=getn(i,j);
|
parseFloat(
|
||||||
|
lib.config["cardpile_" + i + "_playpackconfig"]
|
||||||
|
)
|
||||||
|
);
|
||||||
|
};
|
||||||
|
var num = 0;
|
||||||
|
for (var i in data) {
|
||||||
|
for (var j in data[i]) {
|
||||||
|
num += getn(i, j);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var dn=num*(lib.card.list.length-data.total)/(data.total-num);
|
var dn =
|
||||||
if(dn>1000) dn=1000;
|
(num * (lib.card.list.length - data.total)) /
|
||||||
if(dn>0){
|
(data.total - num);
|
||||||
var p=0;
|
if (dn > 1000) dn = 1000;
|
||||||
for(var i in data){
|
if (dn > 0) {
|
||||||
for(var j in data[i]){
|
var p = 0;
|
||||||
var n=Math.round(dn*getn(i,j)/num);
|
for (var i in data) {
|
||||||
while(n--){
|
for (var j in data[i]) {
|
||||||
if(i=='huosha'){
|
var n = Math.round((dn * getn(i, j)) / num);
|
||||||
lib.card.list.push([j,rand(),'sha','fire']);
|
while (n--) {
|
||||||
}
|
if (i == "huosha") {
|
||||||
else if(i=='leisha'){
|
lib.card.list.push([j, rand(), "sha", "fire"]);
|
||||||
lib.card.list.push([j,rand(),'sha','thunder']);
|
} else if (i == "leisha") {
|
||||||
}
|
lib.card.list.push([
|
||||||
else{
|
j,
|
||||||
lib.card.list.push([j,rand(),i]);
|
rand(),
|
||||||
|
"sha",
|
||||||
|
"thunder",
|
||||||
|
]);
|
||||||
|
} else {
|
||||||
|
lib.card.list.push([j, rand(), i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue