pref: format @/card.

This commit is contained in:
Rintim 2024-04-16 02:36:20 +08:00
parent 8ec1ff5f91
commit 5427da93cb
No known key found for this signature in database
GPG Key ID: BE9E1EA615BACFCF
15 changed files with 20464 additions and 17968 deletions

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

File diff suppressed because it is too large Load Diff

View File

@ -1,18 +1,18 @@
import { lib, game, ui, get, ai, _status } from '../noname.js'; import { lib, game, ui, get, ai, _status } from "../noname.js";
game.import('card', function () { game.import("card", function () {
return { return {
name:'hearth', name: "hearth",
card: { card: {
linghunzhihuo: { linghunzhihuo: {
fullskin: true, fullskin: true,
type:'trick', type: "trick",
enable: true, enable: true,
filterTarget: true, filterTarget: true,
content: function () { content: function () {
'step 0' "step 0";
target.damage('fire'); target.damage("fire");
'step 1' "step 1";
var hs=player.getCards('h'); var hs = player.getCards("h");
if (hs.length) { if (hs.length) {
player.discard(hs.randomGet()); player.discard(hs.randomGet());
} }
@ -26,22 +26,22 @@ game.import('card', function () {
result: { result: {
player: function (player, target) { player: function (player, target) {
if (player == target) return -1; if (player == target) return -1;
if(player.countCards('h')>=player.hp) return -0.1; if (player.countCards("h") >= player.hp) return -0.1;
if(player.countCards('h')>1) return -0.5; if (player.countCards("h") > 1) return -0.5;
return 0; return 0;
}, },
target:-1 target: -1,
}, },
tag: { tag: {
damage: 1, damage: 1,
fireDamage: 1, fireDamage: 1,
natureDamage: 1, natureDamage: 1,
} },
} },
}, },
jihuocard: { jihuocard: {
fullskin: true, fullskin: true,
type:'trick', type: "trick",
enable: true, enable: true,
toself: true, toself: true,
filterTarget: function (card, player, target) { filterTarget: function (card, player, target) {
@ -51,43 +51,42 @@ game.import('card', function () {
modTarget: true, modTarget: true,
content: function () { content: function () {
if (_status.currentPhase == target) { if (_status.currentPhase == target) {
target.addTempSkill('jihuocard2'); target.addTempSkill("jihuocard2");
} }
target.draw(); target.draw();
}, },
ai: { ai: {
order: 10, order: 10,
result: { result: {
target:1 target: 1,
} },
} },
}, },
zhaomingdan: { zhaomingdan: {
fullskin: true, fullskin: true,
type:'trick', type: "trick",
enable: true, enable: true,
filterTarget: function (card, player, target) { filterTarget: function (card, player, target) {
return player!=target&&target.countCards('hej')>0; return player != target && target.countCards("hej") > 0;
}, },
content: function () { content: function () {
'step 0' "step 0";
if(target.countCards('hej')){ if (target.countCards("hej")) {
var next=player.discardPlayerCard('hej',target,true); var next = player.discardPlayerCard("hej", target, true);
next.visible = true; next.visible = true;
next.delay = false; next.delay = false;
} } else {
else{
event.goto(2); event.goto(2);
} }
'step 1' "step 1";
if (result.bool) { if (result.bool) {
game.delay(0.5); game.delay(0.5);
} }
'step 2' "step 2";
target.draw(false); target.draw(false);
target.$draw(); target.$draw();
game.delay(0.5); game.delay(0.5);
'step 3' "step 3";
player.draw(); player.draw();
}, },
ai: { ai: {
@ -97,49 +96,49 @@ game.import('card', function () {
result: { result: {
target: function (player, target) { target: function (player, target) {
if (get.attitude(player, target) > 0) { if (get.attitude(player, target) > 0) {
var js=target.getCards('j'); var js = target.getCards("j");
if (js.length) { if (js.length) {
var jj = js[0].viewAs ? { name: js[0].viewAs } : js[0]; var jj = js[0].viewAs ? { name: js[0].viewAs } : js[0];
if(jj.name=='zhaomingdan') return 3; if (jj.name == "zhaomingdan") return 3;
if (js.length == 1 && get.effect(target, jj, target, player) >= 0) { if (js.length == 1 && get.effect(target, jj, target, player) >= 0) {
return 0; return 0;
} }
return 3; return 3;
} }
} }
var es=target.getCards('e'); var es = target.getCards("e");
var nh=target.countCards('h'); var nh = target.countCards("h");
var noe=(es.length==0||target.hasSkillTag('noe')); var noe = es.length == 0 || target.hasSkillTag("noe");
var noe2=(es.length==1&&es[0].name=='baiyin'&&target.hp<target.maxHp); var noe2 = es.length == 1 && es[0].name == "baiyin" && target.hp < target.maxHp;
var noh=(nh==0||target.hasSkillTag('noh')); var noh = nh == 0 || target.hasSkillTag("noh");
if (noh && noe) return 0; if (noh && noe) return 0;
if (noh && noe2) return 0.01; if (noh && noe2) return 0.01;
if(get.attitude(player,target)<=0) return (target.countCards('he'))?-1.5:1.5; if (get.attitude(player, target) <= 0)
return target.countCards("he") ? -1.5 : 1.5;
return 0.1; return 0.1;
} },
} },
} },
}, },
shijieshu: { shijieshu: {
fullskin: true, fullskin: true,
enable: true, enable: true,
type:'trick', type: "trick",
filterTarget: function (card, player, target) { filterTarget: function (card, player, target) {
return !target.isMin(); return !target.isMin();
}, },
content: function () { content: function () {
'step 0' "step 0";
var cards = []; var cards = [];
var subtype = null; var subtype = null;
for (var i = 0; i < 2; i++) { for (var i = 0; i < 2; i++) {
var card = get.cardPile(function (card) { var card = get.cardPile(function (card) {
if(get.type(card)=='equip'){ if (get.type(card) == "equip") {
if (subtype) { if (subtype) {
if (get.subtype(card) == subtype) { if (get.subtype(card) == subtype) {
return false; return false;
} }
} } else {
else{
subtype = get.subtype(card); subtype = get.subtype(card);
} }
return true; return true;
@ -167,7 +166,7 @@ game.import('card', function () {
} }
} }
event.cards = cards; event.cards = cards;
'step 1' "step 1";
if (event.cards.length) { if (event.cards.length) {
target.equip(event.cards.shift()); target.equip(event.cards.shift());
game.delay(0.5); game.delay(0.5);
@ -175,11 +174,11 @@ game.import('card', function () {
event.redo(); event.redo();
} }
} }
'step 2' "step 2";
game.delay(0.5); game.delay(0.5);
'step 3' "step 3";
if(target.countCards('he')){ if (target.countCards("he")) {
target.chooseToDiscard('he',true); target.chooseToDiscard("he", true);
} }
}, },
ai: { ai: {
@ -188,26 +187,26 @@ game.import('card', function () {
useful: 2, useful: 2,
result: { result: {
target: function (player, target) { target: function (player, target) {
return Math.max(0,2-target.countCards('e')); return Math.max(0, 2 - target.countCards("e"));
}, },
}, },
tag: { tag: {
norepeat:1 norepeat: 1,
} },
} },
}, },
shandianjian: { shandianjian: {
fullskin: true, fullskin: true,
type:'trick', type: "trick",
enable: true, enable: true,
cardnature:'thunder', cardnature: "thunder",
filterTarget: function (card, player, target) { filterTarget: function (card, player, target) {
if(player!=game.me&&player.countCards('h')<2) return false; if (player != game.me && player.countCards("h") < 2) return false;
return target.countCards('h')>0; return target.countCards("h") > 0;
}, },
content: function () { content: function () {
"step 0" "step 0";
if(target.countCards('h')==0){ if (target.countCards("h") == 0) {
event.finish(); event.finish();
return; return;
} }
@ -216,29 +215,38 @@ game.import('card', function () {
if (rand) return Math.random(); if (rand) return Math.random();
return get.value(card); return get.value(card);
}; };
"step 1" "step 1";
event.dialog=ui.create.dialog(get.translation(target.name)+'展示的手牌',result.cards); event.dialog = ui.create.dialog(
get.translation(target.name) + "展示的手牌",
result.cards
);
event.card2 = result.cards[0]; event.card2 = result.cards[0];
event.videoId = lib.status.videoId++; event.videoId = lib.status.videoId++;
game.addVideo('cardDialog',null,[get.translation(target.name)+'展示的手牌',get.cardsInfo(result.cards),event.videoId]); game.addVideo("cardDialog", null, [
game.log(target,'展示了',event.card2); get.translation(target.name) + "展示的手牌",
player.chooseToDiscard(function(card){ get.cardsInfo(result.cards),
event.videoId,
]);
game.log(target, "展示了", event.card2);
player.chooseToDiscard(
function (card) {
return get.suit(card) == get.suit(_status.event.parent.card2); return get.suit(card) == get.suit(_status.event.parent.card2);
},function(card){ },
if(get.damageEffect(target,player,player,'thunder')>0){ function (card) {
if (get.damageEffect(target, player, player, "thunder") > 0) {
return 6 - get.value(card, _status.event.player); return 6 - get.value(card, _status.event.player);
} }
return -1; return -1;
}).prompt=false; }
).prompt = false;
game.delay(2); game.delay(2);
"step 2" "step 2";
if (result.bool) { if (result.bool) {
target.damage('thunder'); target.damage("thunder");
} else {
target.addTempSkill("huogong2");
} }
else{ game.addVideo("cardDialog", null, event.videoId);
target.addTempSkill('huogong2');
}
game.addVideo('cardDialog',null,event.videoId);
event.dialog.close(); event.dialog.close();
}, },
ai: { ai: {
@ -252,49 +260,53 @@ game.import('card', function () {
}, },
result: { result: {
player: function (player) { player: function (player) {
var nh=player.countCards('h'); var nh = player.countCards("h");
if(nh<=player.hp&&nh<=4&&_status.event.name=='chooseToUse'){ if (nh <= player.hp && nh <= 4 && _status.event.name == "chooseToUse") {
if(typeof _status.event.filterCard=='function'&& if (
_status.event.filterCard(new lib.element.VCard({name:'shandianjian'}))){ typeof _status.event.filterCard == "function" &&
_status.event.filterCard(new lib.element.VCard({ name: "shandianjian" }))
) {
return -10; return -10;
} }
if (_status.event.skill) { if (_status.event.skill) {
var viewAs = get.info(_status.event.skill).viewAs; var viewAs = get.info(_status.event.skill).viewAs;
if(viewAs=='shandianjian') return -10; if (viewAs == "shandianjian") return -10;
if(viewAs&&viewAs.name=='shandianjian') return -10; if (viewAs && viewAs.name == "shandianjian") return -10;
} }
} }
return 0; return 0;
}, },
target: function (player, target) { target: function (player, target) {
if(target.hasSkill('huogong2')||target.countCards('h')==0) return 0; if (target.hasSkill("huogong2") || target.countCards("h") == 0) return 0;
if(player.countCards('h')<=1) return 0; if (player.countCards("h") <= 1) return 0;
if (target == player) { if (target == player) {
if(typeof _status.event.filterCard=='function'&& if (
_status.event.filterCard(new lib.element.VCard({name:'shandianjian'}))){ typeof _status.event.filterCard == "function" &&
_status.event.filterCard(new lib.element.VCard({ name: "shandianjian" }))
) {
return -1.5; return -1.5;
} }
if (_status.event.skill) { if (_status.event.skill) {
var viewAs = get.info(_status.event.skill).viewAs; var viewAs = get.info(_status.event.skill).viewAs;
if(viewAs=='shandianjian') return -1.5; if (viewAs == "shandianjian") return -1.5;
if(viewAs&&viewAs.name=='shandianjian') return -1.5; if (viewAs && viewAs.name == "shandianjian") return -1.5;
} }
return 0; return 0;
} }
return -1.5; return -1.5;
} },
}, },
tag: { tag: {
damage: 1, damage: 1,
thunderDamage: 1, thunderDamage: 1,
natureDamage: 1, natureDamage: 1,
norepeat:1 norepeat: 1,
} },
} },
}, },
shihuawuqi: { shihuawuqi: {
fullskin: true, fullskin: true,
type:'basic', type: "basic",
enable: true, enable: true,
usable: 1, usable: 1,
filterTarget: function (card, player, target) { filterTarget: function (card, player, target) {
@ -302,11 +314,11 @@ game.import('card', function () {
}, },
selectTarget: -1, selectTarget: -1,
content: function () { content: function () {
player.addTempSkill('shihuawuqi'); player.addTempSkill("shihuawuqi");
if(!player.countCards('h','sha')){ if (!player.countCards("h", "sha")) {
var card=get.cardPile('sha'); var card = get.cardPile("sha");
if (card) { if (card) {
player.gain(card,'gain2'); player.gain(card, "gain2");
} }
} }
}, },
@ -316,26 +328,26 @@ game.import('card', function () {
order: 8, order: 8,
result: { result: {
target: function (player, target) { target: function (player, target) {
return target.countCards('h','sha')?0:1; return target.countCards("h", "sha") ? 0 : 1;
} },
} },
} },
}, },
siwangchanrao: { siwangchanrao: {
enable: true, enable: true,
type:'trick', type: "trick",
filterTarget: function (card, player, target) { filterTarget: function (card, player, target) {
return player!=target&&target.countCards('h')>0; return player != target && target.countCards("h") > 0;
}, },
selectTarget: 1, selectTarget: 1,
content: function () { content: function () {
'step 0' "step 0";
var hs=target.getCards('h'); var hs = target.getCards("h");
if (hs.length) { if (hs.length) {
target.discard(hs.randomGet()); target.discard(hs.randomGet());
} }
'step 1' "step 1";
if(!target.countCards('h')){ if (!target.countCards("h")) {
player.draw(); player.draw();
} }
}, },
@ -346,15 +358,15 @@ game.import('card', function () {
result: { result: {
target: -1, target: -1,
player: function (player, target) { player: function (player, target) {
if(target.countCards('h')==1) return 1; if (target.countCards("h") == 1) return 1;
} },
} },
} },
}, },
dunpaigedang: { dunpaigedang: {
fullskin: true, fullskin: true,
enable: true, enable: true,
type:'trick', type: "trick",
toself: true, toself: true,
filterTarget: function (card, player, target) { filterTarget: function (card, player, target) {
return player == target; return player == target;
@ -362,12 +374,12 @@ game.import('card', function () {
selectTarget: -1, selectTarget: -1,
modTarget: true, modTarget: true,
content: function () { content: function () {
'step 0' "step 0";
target.changeHujia(); target.changeHujia();
target.draw(); target.draw();
'step 1' "step 1";
if(target.countCards('he')){ if (target.countCards("he")) {
target.chooseToDiscard('he',true); target.chooseToDiscard("he", true);
} }
}, },
ai: { ai: {
@ -375,13 +387,13 @@ game.import('card', function () {
value: 7, value: 7,
useful: 3, useful: 3,
result: { result: {
target:1 target: 1,
} },
} },
}, },
chuansongmen: { chuansongmen: {
fullskin: true, fullskin: true,
type:'trick', type: "trick",
enable: true, enable: true,
discard: false, discard: false,
toself: true, toself: true,
@ -393,41 +405,40 @@ game.import('card', function () {
// usable:3, // usable:3,
// forceUsable:true, // forceUsable:true,
content: function () { content: function () {
'step 0' "step 0";
var gained = get.cards()[0]; var gained = get.cards()[0];
target.gain(gained,'gain2'); target.gain(gained, "gain2");
if(event.getParent(3).name=='phaseUse'&&_status.currentPhase==target&& if (
lib.filter.filterCard(gained,target,event.getParent(2))){ event.getParent(3).name == "phaseUse" &&
_status.currentPhase == target &&
lib.filter.filterCard(gained, target, event.getParent(2))
) {
var next = target.chooseToUse(); var next = target.chooseToUse();
next.filterCard = function (card) { next.filterCard = function (card) {
return card == gained; return card == gained;
}; };
next.prompt='是否使用'+get.translation(gained)+''; next.prompt = "是否使用" + get.translation(gained) + "";
if (cards[0]) { if (cards[0]) {
ui.special.appendChild(cards[0]); ui.special.appendChild(cards[0]);
} } else {
else{
event.finish(); event.finish();
} }
} } else {
else{
// if(cards[0]){ // if(cards[0]){
// cards[0].discard(); // cards[0].discard();
// } // }
event.finish(); event.finish();
} }
'step 1' "step 1";
if(result.bool&&!target.hasSkill('chuansongmen3')){ if (result.bool && !target.hasSkill("chuansongmen3")) {
if(target.hasSkill('chuansongmen2')){ if (target.hasSkill("chuansongmen2")) {
target.addTempSkill('chuansongmen3'); target.addTempSkill("chuansongmen3");
} } else {
else{ target.addTempSkill("chuansongmen2");
target.addTempSkill('chuansongmen2');
} }
cards[0].fix(); cards[0].fix();
target.gain(cards,'gain2'); target.gain(cards, "gain2");
} } else {
else{
cards[0].discard(); cards[0].discard();
} }
}, },
@ -436,16 +447,16 @@ game.import('card', function () {
value: 7, value: 7,
useful: 3, useful: 3,
result: { result: {
target:1 target: 1,
}, },
tag: { tag: {
norepeat:1 norepeat: 1,
} },
} },
}, },
tanshezhiren: { tanshezhiren: {
fullskin: true, fullskin: true,
type:'trick', type: "trick",
enable: true, enable: true,
// recastable:true, // recastable:true,
filterTarget: function (card, player, target) { filterTarget: function (card, player, target) {
@ -454,25 +465,25 @@ game.import('card', function () {
selectTarget: -1, selectTarget: -1,
modTarget: true, modTarget: true,
content: function () { content: function () {
'step 0' "step 0";
event.current = target; event.current = target;
event.num = game.countPlayer(); event.num = game.countPlayer();
if (event.num % 2 == 0) { if (event.num % 2 == 0) {
event.num--; event.num--;
} }
'step 1' "step 1";
if (event.num) { if (event.num) {
var enemies = event.current.getEnemies(); var enemies = event.current.getEnemies();
enemies.remove(player); enemies.remove(player);
for (var i = 0; i < enemies.length; i++) { for (var i = 0; i < enemies.length; i++) {
if(!enemies[i].countCards('h')){ if (!enemies[i].countCards("h")) {
enemies.splice(i--, 1); enemies.splice(i--, 1);
} }
} }
if (enemies.length) { if (enemies.length) {
var enemy = enemies.randomGet(); var enemy = enemies.randomGet();
event.current.line(enemy); event.current.line(enemy);
enemy.discard(enemy.getCards('h').randomGet()); enemy.discard(enemy.getCards("h").randomGet());
event.current = enemy; event.current = enemy;
event.num--; event.num--;
event.redo(); event.redo();
@ -485,26 +496,28 @@ game.import('card', function () {
return 0; return 0;
}, },
result: { result: {
player:1 player: 1,
}, },
tag: { tag: {
multineg: 1, multineg: 1,
multitarget:1 multitarget: 1,
} },
} },
}, },
xingjiegoutong: { xingjiegoutong: {
fullskin: true, fullskin: true,
type:'trick', type: "trick",
enable: true, enable: true,
selectTarget: -1, selectTarget: -1,
modTarget: true, modTarget: true,
toself: true, toself: true,
filterTarget:function(card,player,target){return player==target}, filterTarget: function (card, player, target) {
return player == target;
},
content: function () { content: function () {
target.gainMaxHp(); target.gainMaxHp();
target.recover(); target.recover();
target.discard(target.getCards('h')); target.discard(target.getCards("h"));
}, },
ai: { ai: {
basic: { basic: {
@ -514,38 +527,38 @@ game.import('card', function () {
order: 1, order: 1,
result: { result: {
target: function (player, target) { target: function (player, target) {
if(target.countCards('h','tao')) return 0; if (target.countCards("h", "tao")) return 0;
var nh=target.countCards('h'); var nh = target.countCards("h");
if (nh <= 2) return 1; if (nh <= 2) return 1;
if (target.hp == 1 && target.maxHp > 2) return 1; if (target.hp == 1 && target.maxHp > 2) return 1;
return 0; return 0;
}, },
}, },
tag: { tag: {
recover:1 recover: 1,
} },
} },
}, },
shenenshu: { shenenshu: {
fullskin: true, fullskin: true,
enable: true, enable: true,
type:'trick', type: "trick",
selectTarget: -1, selectTarget: -1,
filterTarget: function (card, player, target) { filterTarget: function (card, player, target) {
return target == player; return target == player;
}, },
modTarget: true, modTarget: true,
content: function () { content: function () {
'step 0' "step 0";
var cards=target.getCards('h'); var cards = target.getCards("h");
if (cards.length) { if (cards.length) {
target.lose(cards)._triggered = null; target.lose(cards)._triggered = null;
} }
event.num = 1 + cards.length; event.num = 1 + cards.length;
'step 1' "step 1";
var cards = []; var cards = [];
var list=get.typeCard('basic'); var list = get.typeCard("basic");
list.remove('du'); list.remove("du");
if (list.length) { if (list.length) {
for (var i = 0; i < event.num; i++) { for (var i = 0; i < event.num; i++) {
cards.push(game.createCard(list.randomGet())); cards.push(game.createCard(list.randomGet()));
@ -557,16 +570,16 @@ game.import('card', function () {
order: 1, order: 1,
result: { result: {
target: function (player, target) { target: function (player, target) {
var hs=target.getCards('h'); var hs = target.getCards("h");
for (var i = 0; i < hs.length; i++) { for (var i = 0; i < hs.length; i++) {
if(get.type(hs[i])!='basic'&&get.useful(hs[i])>=6){ if (get.type(hs[i]) != "basic" && get.useful(hs[i]) >= 6) {
return 0; return 0;
} }
} }
return 1; return 1;
} },
} },
} },
}, },
zhiliaobo: { zhiliaobo: {
fullskin: true, fullskin: true,
@ -574,17 +587,16 @@ game.import('card', function () {
filterTarget: function (card, player, target) { filterTarget: function (card, player, target) {
return target.hp < target.maxHp; return target.hp < target.maxHp;
}, },
type:'trick', type: "trick",
content: function () { content: function () {
'step 0' "step 0";
target.judge(function (card) { target.judge(function (card) {
return get.color(card)=='red'?1:0; return get.color(card) == "red" ? 1 : 0;
}); });
'step 1' "step 1";
if (result.bool) { if (result.bool) {
target.recover(); target.recover();
} } else {
else{
target.changeHujia(); target.changeHujia();
} }
}, },
@ -601,56 +613,55 @@ game.import('card', function () {
if (num == 1) return 1; if (num == 1) return 1;
if (target.hp == 1) return 2.5; if (target.hp == 1) return 2.5;
return 2; return 2;
} },
}, },
tag: { tag: {
recover:1 recover: 1,
} },
} },
}, },
yuansuhuimie: { yuansuhuimie: {
fullskin: true, fullskin: true,
type:'trick', type: "trick",
enable: true, enable: true,
selectTarget: -1, selectTarget: -1,
filterTarget: true, filterTarget: true,
reverseOrder: true, reverseOrder: true,
content: function () { content: function () {
"step 0" "step 0";
target.chooseToDiscard([1,2],'he').ai=function(card){ target.chooseToDiscard([1, 2], "he").ai = function (card) {
if(get.damageEffect(target,player,target,'thunder')>=0){ if (get.damageEffect(target, player, target, "thunder") >= 0) {
if(target.hasSkillTag('maixie')){ if (target.hasSkillTag("maixie")) {
if (ui.selected.cards.length) return 0; if (ui.selected.cards.length) return 0;
} } else {
else{
return 0; return 0;
} }
} }
if(player.hasSkillTag('notricksource')) return 0; if (player.hasSkillTag("notricksource")) return 0;
if(target.hasSkillTag('notrick')) return 0; if (target.hasSkillTag("notrick")) return 0;
if(card.name=='tao') return 0; if (card.name == "tao") return 0;
if(target.hp==1&&card.name=='jiu') return 0; if (target.hp == 1 && card.name == "jiu") return 0;
if(get.type(card)!='basic'){ if (get.type(card) != "basic") {
return 10 - get.value(card); return 10 - get.value(card);
} }
return 8 - get.value(card); return 8 - get.value(card);
}; };
"step 1" "step 1";
if (!result.bool || result.cards.length < 2) { if (!result.bool || result.cards.length < 2) {
if(result.bool) target.damage(2-result.cards.length,'thunder'); if (result.bool) target.damage(2 - result.cards.length, "thunder");
else target.damage(2,'thunder'); else target.damage(2, "thunder");
} }
}, },
ai: { ai: {
basic: { basic: {
order: 7, order: 7,
useful:[5,1] useful: [5, 1],
}, },
result: { result: {
target: function (player, target) { target: function (player, target) {
if(target.hasSkillTag('nothunder')) return 0; if (target.hasSkillTag("nothunder")) return 0;
if (player.hasUnknown(2)) return 0; if (player.hasUnknown(2)) return 0;
var nh=target.countCards('he'); var nh = target.countCards("he");
if (target == player) nh--; if (target == player) nh--;
if (nh == 2) return -2.5; if (nh == 2) return -2.5;
if (nh == 1) return -3; if (nh == 1) return -3;
@ -666,9 +677,9 @@ game.import('card', function () {
multineg: 1, multineg: 1,
discard: 2, discard: 2,
loseCard: 2, loseCard: 2,
} },
} },
} },
}, },
skill: { skill: {
chuansongmen2: {}, chuansongmen2: {},
@ -677,65 +688,69 @@ game.import('card', function () {
mod: { mod: {
attackFrom: function (from, to, distance) { attackFrom: function (from, to, distance) {
return distance - 1; return distance - 1;
} },
} },
}, },
jihuocard2: { jihuocard2: {
mod: { mod: {
maxHandcard: function (player, num) { maxHandcard: function (player, num) {
return num + 2; return num + 2;
} },
} },
} },
}, },
translate: { translate: {
linghunzhihuo:'灵魂之火', linghunzhihuo: "灵魂之火",
linghunzhihuo_info:'对一名角色造成1点火焰伤害然后随机弃置一张手牌。', linghunzhihuo_info: "对一名角色造成1点火焰伤害然后随机弃置一张手牌。",
shenenshu:'神恩术', shenenshu: "神恩术",
shenenshu_info:'出牌阶段对自己使用,将所有手牌(含此张)替换为基本牌。', shenenshu_info: "出牌阶段对自己使用,将所有手牌(含此张)替换为基本牌。",
zhiliaobo:'治疗波', zhiliaobo: "治疗波",
zhiliaobo_info:'出牌阶段对一名受伤角色使用目标进行一次判定若结果为红色则回复1点体力否则获得1点护甲。', zhiliaobo_info:
yuansuhuimie:'元素毁灭', "出牌阶段对一名受伤角色使用目标进行一次判定若结果为红色则回复1点体力否则获得1点护甲。",
yuansuhuimie_info:'对所有角色使用令目标弃置0~2张牌并受到2-X点雷电伤害X为其弃置的手牌数。', yuansuhuimie: "元素毁灭",
xingjiegoutong:'星界沟通', yuansuhuimie_info: "对所有角色使用令目标弃置0~2张牌并受到2-X点雷电伤害X为其弃置的手牌数。",
xingjiegoutong_info:'增加1点体力上限并回复1点体力弃置你的所有手牌。', xingjiegoutong: "星界沟通",
tanshezhiren:'弹射之刃', xingjiegoutong_info: "增加1点体力上限并回复1点体力弃置你的所有手牌。",
tanshezhiren_info:'出牌阶段对自己使用,依次按敌方-友方-敌方-的顺序随机弃置阵营内一名随机角色的一张牌目标不包含你共结算X次X为存活角色数若X为偶数改为X-1。', tanshezhiren: "弹射之刃",
chuansongmen:'传送门', tanshezhiren_info:
chuansongmen_info:'摸一张牌并展示若发生在出牌阶段你可以立即使用摸到的牌若如此做你将传送门收回手牌每阶段最多收回2张传送门。', "出牌阶段对自己使用,依次按敌方-友方-敌方-的顺序随机弃置阵营内一名随机角色的一张牌目标不包含你共结算X次X为存活角色数若X为偶数改为X-1。",
dunpaigedang:'盾牌格挡', chuansongmen: "传送门",
dunpaigedang_info:'获得1点护甲值摸一张牌然后弃置一张牌。', chuansongmen_info:
siwangchanrao:'死亡缠绕', "摸一张牌并展示若发生在出牌阶段你可以立即使用摸到的牌若如此做你将传送门收回手牌每阶段最多收回2张传送门。",
siwangchanrao_infox:'弃置一名其他角色的一张手牌,若其此时没有手牌,则你摸一张牌。', dunpaigedang: "盾牌格挡",
shihuawuqi:'石化武器', dunpaigedang_info: "获得1点护甲值摸一张牌然后弃置一张牌。",
shihuawuqi_infox:'本回合内攻击范围+1若你手牌中没有杀则从牌堆中获得一张杀。', siwangchanrao: "死亡缠绕",
shandianjian:'闪电箭', siwangchanrao_infox: "弃置一名其他角色的一张手牌,若其此时没有手牌,则你摸一张牌。",
shandianjian_info:'目标角色展示一张手牌然后若你能弃掉一张与所展示牌相同花色的手牌则对该角色造成1点雷电伤害。', shihuawuqi: "石化武器",
shijieshu:'视界术', shihuawuqi_infox: "本回合内攻击范围+1若你手牌中没有杀则从牌堆中获得一张杀。",
shijieshu_info:'目标从牌堆或弃牌堆中随机装备两张类别不同的装备牌,然后弃置一张牌。', shandianjian: "闪电箭",
zhaomingdan:'照明弹', shandianjian_info:
zhaomingdan_info:'观看一名其他角色的手牌,并弃置其区域内的一张牌,然后其与你各摸一张牌。', "目标角色展示一张手牌然后若你能弃掉一张与所展示牌相同花色的手牌则对该角色造成1点雷电伤害。",
jihuocard:'激活', shijieshu: "视界术",
jihuocard_info:'摸一张牌,本回合手牌上限+2。', shijieshu_info: "目标从牌堆或弃牌堆中随机装备两张类别不同的装备牌,然后弃置一张牌。",
zhaomingdan: "照明弹",
zhaomingdan_info: "观看一名其他角色的手牌,并弃置其区域内的一张牌,然后其与你各摸一张牌。",
jihuocard: "激活",
jihuocard_info: "摸一张牌,本回合手牌上限+2。",
}, },
list: [ list: [
['heart',2,'shenenshu'], ["heart", 2, "shenenshu"],
['diamond',12,'shenenshu'], ["diamond", 12, "shenenshu"],
['club',7,'zhiliaobo'], ["club", 7, "zhiliaobo"],
['spade',1,'zhiliaobo'], ["spade", 1, "zhiliaobo"],
['spade',13,'yuansuhuimie'], ["spade", 13, "yuansuhuimie"],
['spade',13,'xingjiegoutong'], ["spade", 13, "xingjiegoutong"],
['diamond',2,'tanshezhiren'], ["diamond", 2, "tanshezhiren"],
['diamond',2,'chuansongmen'], ["diamond", 2, "chuansongmen"],
['heart',2,'chuansongmen'], ["heart", 2, "chuansongmen"],
['club',3,'dunpaigedang'], ["club", 3, "dunpaigedang"],
['club',3,'shandianjian','thunder'], ["club", 3, "shandianjian", "thunder"],
['spade',1,'shandianjian','thunder'], ["spade", 1, "shandianjian", "thunder"],
['spade',7,'shijieshu'], ["spade", 7, "shijieshu"],
['diamond',5,'zhaomingdan'], ["diamond", 5, "zhaomingdan"],
['heart',10,'zhaomingdan'], ["heart", 10, "zhaomingdan"],
['diamond',2,'jihuocard'], ["diamond", 2, "jihuocard"],
['diamond',1,'linghunzhihuo'], ["diamond", 1, "linghunzhihuo"],
], ],
}; };
}); });

View File

@ -1,10 +1,10 @@
import { lib, game, ui, get, ai, _status } from '../noname.js'; import { lib, game, ui, get, ai, _status } from "../noname.js";
game.import('card', function () { 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",
@ -16,7 +16,7 @@ game.import('card', function () {
}, },
}, },
}, },
"mianju":{ mianju: {
audio: true, audio: true,
fullskin: true, fullskin: true,
type: "equip", type: "equip",
@ -33,7 +33,7 @@ game.import('card', function () {
}, },
}, },
}, },
"shoulijian":{ shoulijian: {
audio: true, audio: true,
type: "basic", type: "basic",
enable: true, enable: true,
@ -43,20 +43,20 @@ game.import('card', function () {
}, },
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();
} }
@ -77,7 +77,7 @@ game.import('card', function () {
}, },
selectTarget: 1, selectTarget: 1,
}, },
"kuwu":{ kuwu: {
audio: true, audio: true,
fullskin: true, fullskin: true,
type: "equip", type: "equip",
@ -93,7 +93,7 @@ game.import('card', function () {
equipValue: 6, equipValue: 6,
}, },
}, },
"xuelunyang":{ xuelunyang: {
audio: true, audio: true,
fullskin: true, fullskin: true,
type: "equip", type: "equip",
@ -105,7 +105,7 @@ game.import('card', function () {
}, },
}, },
}, },
"jiuwei":{ jiuwei: {
audio: true, audio: true,
fullskin: true, fullskin: true,
type: "equip", type: "equip",
@ -119,7 +119,7 @@ game.import('card', function () {
}, },
}, },
skill: { skill: {
"monkey":{ monkey: {
trigger: { trigger: {
global: "useCardToBegin", global: "useCardToBegin",
}, },
@ -128,7 +128,14 @@ game.import('card', function () {
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;
}, },
@ -136,17 +143,17 @@ game.import('card', function () {
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",
@ -160,12 +167,12 @@ game.import('card', function () {
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",
@ -174,13 +181,18 @@ game.import('card', function () {
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",
@ -188,8 +200,9 @@ game.import('card', function () {
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
.chooseTarget(get.prompt2("xuelunyang"), function (card, player, target) {
var names = []; var names = [];
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);
@ -200,26 +213,30 @@ game.import('card', function () {
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&&!pss.includes(skills[j])){ 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);
@ -231,22 +248,31 @@ game.import('card', function () {
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.translate[skills[j] + "_info"] &&
lib.skill[skills[j]] &&
!lib.skill[skills[j]].unique && !lib.skill[skills[j]].unique &&
!pss.includes(skills[j])){ !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",
}, },
@ -256,26 +282,26 @@ game.import('card', function () {
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"],
@ -286,5 +312,5 @@ game.import('card', function () {
["spade", "4", "shoulijian"], ["spade", "4", "shoulijian"],
["club", "3", "mianju"], ["club", "3", "mianju"],
], ],
} };
}); });

File diff suppressed because it is too large Load Diff

View File

@ -1,21 +1,21 @@
import { lib, game, ui, get, ai, _status } from '../noname.js'; import { lib, game, ui, get, ai, _status } from "../noname.js";
game.import('card', function () { game.import("card", function () {
return { return {
name:'sp', name: "sp",
connect: true, connect: true,
card: { card: {
jinchan: { jinchan: {
audio: true, audio: true,
fullskin: true, fullskin: true,
wuxieable: true, wuxieable: true,
type:'trick', type: "trick",
notarget: true, notarget: true,
global:['g_jinchan','g_jinchan2'], global: ["g_jinchan", "g_jinchan2"],
content: function () { content: function () {
var evt = event.getParent(3)._trigger; var evt = event.getParent(3)._trigger;
if (evt.jinchan) { if (evt.jinchan) {
var type=get.type(evt.card,'trick'); var type = get.type(evt.card, "trick");
if(type=='basic'||type=='trick'){ if (type == "basic" || type == "trick") {
evt.neutralize(); evt.neutralize();
} }
} }
@ -24,7 +24,7 @@ game.import('card', function () {
ai: { ai: {
useful: function () { useful: function () {
var player = _status.event.player; var player = _status.event.player;
var nj=player.countCards('h','jinchan'); var nj = player.countCards("h", "jinchan");
var num = player.getHandcardLimit(); var num = player.getHandcardLimit();
if (nj >= num) { if (nj >= num) {
return 10; return 10;
@ -35,36 +35,35 @@ game.import('card', function () {
return 1; return 1;
}, },
result: { result: {
player:1 player: 1,
},
value: 5,
}, },
value:5
}
}, },
qijia: { qijia: {
audio: true, audio: true,
fullskin: true, fullskin: true,
type:'trick', type: "trick",
enable: true, enable: true,
filterTarget: function (card, player, target) { filterTarget: function (card, player, target) {
if (target == player) return false; if (target == player) return false;
if (target.getEquips(5).length) { if (target.getEquips(5).length) {
return target.countCards('e')>1; return target.countCards("e") > 1;
} } else {
else{ return target.countCards("e") > 0;
return target.countCards('e')>0;
} }
}, },
content: function () { content: function () {
'step 0' "step 0";
var e1=[],e2=[]; var e1 = [],
var he=target.getCards('he'); e2 = [];
var he = target.getCards("he");
for (var i = 0; i < he.length; i++) { for (var i = 0; i < he.length; i++) {
if(get.type(he[i])=='equip'){ if (get.type(he[i]) == "equip") {
var subtype = get.subtype(he[i]); var subtype = get.subtype(he[i]);
if(subtype=='equip1'||subtype=='equip4'){ if (subtype == "equip1" || subtype == "equip4") {
e1.push(he[i]); e1.push(he[i]);
} } else if (subtype == "equip2" || subtype == "equip3") {
else if(subtype=='equip2'||subtype=='equip3'){
e2.push(he[i]); e2.push(he[i]);
} }
} }
@ -76,22 +75,21 @@ game.import('card', function () {
} }
event.e1 = e1; event.e1 = e1;
event.e2 = e2; event.e2 = e2;
target.chooseControl(choice).set('choiceList',['弃置'+get.translation(e1),'弃置'+get.translation(e2)]); target
} .chooseControl(choice)
else{ .set("choiceList", ["弃置" + get.translation(e1), "弃置" + get.translation(e2)]);
} else {
if (e1.length) { if (e1.length) {
target.discard(e1); target.discard(e1);
} } else if (e2.length) {
else if(e2.length){
target.discard(e2); target.discard(e2);
} }
event.finish(); event.finish();
} }
'step 1' "step 1";
if (result.index == 0) { if (result.index == 0) {
target.discard(event.e1); target.discard(event.e1);
} } else {
else{
target.discard(event.e2); target.discard(event.e2);
} }
}, },
@ -101,14 +99,14 @@ game.import('card', function () {
value: 5, value: 5,
result: { result: {
target: function (player, target) { target: function (player, target) {
var num1=0,num2=0; var num1 = 0,
num2 = 0;
for (var i = 1; i <= 4; i++) { for (var i = 1; i <= 4; i++) {
var card = target.getEquip(i); var card = target.getEquip(i);
if (card) { if (card) {
if (i == 1 || i == 4) { if (i == 1 || i == 4) {
num1 += get.equipValue(card); num1 += get.equipValue(card);
} } else {
else{
num2 += get.equipValue(card); num2 += get.equipValue(card);
} }
} }
@ -116,32 +114,29 @@ game.import('card', function () {
var num; var num;
if (num1 == 0) { if (num1 == 0) {
num = num2; num = num2;
} } else if (num2 == 0) {
else if(num2==0){
num = num1; num = num1;
} } else {
else{
num = Math.min(num1, num2); num = Math.min(num1, num2);
} }
if (num > 0) { if (num > 0) {
return -0.8 - num / 10; return -0.8 - num / 10;
} } else {
else{
return 0; return 0;
} }
} },
}, },
tag: { tag: {
loseCard: 1, loseCard: 1,
discard:1 discard: 1,
} },
} },
}, },
fulei: { fulei: {
audio: true, audio: true,
fullskin: true, fullskin: true,
type:'delay', type: "delay",
cardnature:'thunder', cardnature: "thunder",
modTarget: function (card, player, target) { modTarget: function (card, player, target) {
return lib.filter.judge(card, player, target); return lib.filter.judge(card, player, target);
}, },
@ -149,12 +144,12 @@ game.import('card', function () {
return player.canAddJudge(card); return player.canAddJudge(card);
}, },
filterTarget: function (card, player, target) { filterTarget: function (card, player, target) {
return (lib.filter.judge(card,player,target)&&player==target); return lib.filter.judge(card, player, target) && player == target;
}, },
selectTarget: [-1, -1], selectTarget: [-1, -1],
toself: true, toself: true,
judge: function (card) { judge: function (card) {
if(get.suit(card)=='spade') return -6; if (get.suit(card) == "spade") return -6;
return 6; return 6;
}, },
judge2: function (result) { judge2: function (result) {
@ -162,25 +157,29 @@ game.import('card', function () {
return false; return false;
}, },
cardPrompt: function (card) { cardPrompt: function (card) {
var str='出牌阶段对你使用。你将【浮雷】置入判定区。若判定结果为♠则目标角色受到X点雷电伤害X为此牌判定结果为♠的次数。判定完成后将此牌移动到下家的判定区里。'; var str =
if(card.storage&&card.storage.fulei) str+=('<br><span style="font-family:yuanli">此牌已判定命中过:'+card.storage.fulei+'次</span>'); "出牌阶段对你使用。你将【浮雷】置入判定区。若判定结果为♠则目标角色受到X点雷电伤害X为此牌判定结果为♠的次数。判定完成后将此牌移动到下家的判定区里。";
if (card.storage && card.storage.fulei)
str +=
'<br><span style="font-family:yuanli">此牌已判定命中过:' +
card.storage.fulei +
"次</span>";
return str; return str;
}, },
effect: function () { effect: function () {
'step 0' "step 0";
if (result.bool == false) { if (result.bool == false) {
var card = cards[0]; var card = cards[0];
if (card) { if (card) {
if (!card.storage.fulei) { if (!card.storage.fulei) {
card.storage.fulei = 1; card.storage.fulei = 1;
} } else {
else{
card.storage.fulei++; card.storage.fulei++;
} }
player.damage(card.storage.fulei,'thunder','nosource'); player.damage(card.storage.fulei, "thunder", "nosource");
} }
} }
'step 1' "step 1";
player.addJudgeNext(card); player.addJudgeNext(card);
}, },
cancel: function () { cancel: function () {
@ -195,68 +194,74 @@ game.import('card', function () {
result: { result: {
target: function (player, target) { target: function (player, target) {
return lib.card.shandian.ai.result.target(player, target); return lib.card.shandian.ai.result.target(player, target);
} },
}, },
tag: { tag: {
damage: 0.25, damage: 0.25,
natureDamage: 0.25, natureDamage: 0.25,
thunderDamage: 0.25, thunderDamage: 0.25,
} },
} },
}, },
qibaodao: { qibaodao: {
audio: true, audio: true,
fullskin: true, fullskin: true,
type:'equip', type: "equip",
subtype:'equip1', subtype: "equip1",
skills:['qibaodao','qibaodao2'], skills: ["qibaodao", "qibaodao2"],
distance: { attackFrom: -1 }, distance: { attackFrom: -1 },
ai: { ai: {
equipValue: function (card, player) { equipValue: function (card, player) {
if(game.hasPlayer(function(current){ if (
return player.canUse('sha',current)&&current.isHealthy()&&get.attitude(player,current)<0; game.hasPlayer(function (current) {
})){ return (
player.canUse("sha", current) &&
current.isHealthy() &&
get.attitude(player, current) < 0
);
})
) {
return 5; return 5;
} }
return 3; return 3;
}, },
basic: { basic: {
equipValue:5 equipValue: 5,
} },
}, },
}, },
zhungangshuo: { zhungangshuo: {
audio: true, audio: true,
fullskin: true, fullskin: true,
type:'equip', type: "equip",
subtype:'equip1', subtype: "equip1",
skills:['zhungangshuo'], skills: ["zhungangshuo"],
distance: { attackFrom: -2 }, distance: { attackFrom: -2 },
ai: { ai: {
equipValue:4 equipValue: 4,
}, },
}, },
lanyinjia: { lanyinjia: {
fullskin: true, fullskin: true,
type:'equip', type: "equip",
subtype:'equip2', subtype: "equip2",
skills:['lanyinjia','lanyinjia2'], skills: ["lanyinjia", "lanyinjia2"],
ai: { ai: {
equipValue:6 equipValue: 6,
} },
}, },
yinyueqiang: { yinyueqiang: {
audio: true, audio: true,
fullskin: true, fullskin: true,
type:'equip', type: "equip",
subtype:'equip1', subtype: "equip1",
distance: { attackFrom: -2 }, distance: { attackFrom: -2 },
ai: { ai: {
basic: { basic: {
equipValue:4 equipValue: 4,
}
}, },
skills:['yinyueqiang'] },
skills: ["yinyueqiang"],
}, },
shengdong: { shengdong: {
audio: true, audio: true,
@ -268,10 +273,10 @@ game.import('card', function () {
return game.countPlayer() <= 2; return game.countPlayer() <= 2;
}, },
singleCard: true, singleCard: true,
type:'trick', type: "trick",
complexTarget: true, complexTarget: true,
multitarget: true, multitarget: true,
targetprompt:['给一张牌','得两张牌'], targetprompt: ["给一张牌", "得两张牌"],
filterTarget: function (card, player, target) { filterTarget: function (card, player, target) {
return target !== player; return target !== player;
}, },
@ -279,31 +284,33 @@ game.import('card', function () {
return target !== preTarget && target !== player; return target !== preTarget && target !== player;
}, },
content: function () { content: function () {
'step 0' "step 0";
if(!player.countCards('h')){ if (!player.countCards("h")) {
event.finish(); event.finish();
} } else {
else{
event.target1 = target; event.target1 = target;
event.target2 = event.addedTarget; event.target2 = event.addedTarget;
player.chooseCard('h','将一张手牌交给'+get.translation(event.target1),true); player.chooseCard("h", "将一张手牌交给" + get.translation(event.target1), true);
} }
'step 1' "step 1";
player.give(result.cards, event.target1); player.give(result.cards, event.target1);
'step 2' "step 2";
if(!event.target1.countCards('h')){ if (!event.target1.countCards("h")) {
event.finish(); event.finish();
} } else {
else{ var he = event.target1.getCards("he");
var he=event.target1.getCards('he');
if (he.length <= 2) { if (he.length <= 2) {
event.directresult = he; event.directresult = he;
} } else {
else{ event.target1.chooseCard(
event.target1.chooseCard('he','将两张牌交给'+get.translation(event.target2),2,true); "he",
"将两张牌交给" + get.translation(event.target2),
2,
true
);
} }
} }
'step 3' "step 3";
if (!event.directresult) { if (!event.directresult) {
event.directresult = result.cards; event.directresult = result.cards;
} }
@ -318,50 +325,60 @@ game.import('card', function () {
}, },
result: { result: {
target: function (player, target) { target: function (player, target) {
let hs=player.getCards('h'); let hs = player.getCards("h");
if(hs.length<=1||!hs.some(i=>{ if (
hs.length <= 1 ||
!hs.some((i) => {
return get.value(i) < 5.5; return get.value(i) < 5.5;
})) return 0; })
)
return 0;
let targets = get.copy(ui.selected.targets); let targets = get.copy(ui.selected.targets);
if (_status.event.preTarget) targets.add(_status.event.preTarget); if (_status.event.preTarget) targets.add(_status.event.preTarget);
if (targets.length) { if (targets.length) {
if(target.hasSkillTag('nogain')) return 0.01; if (target.hasSkillTag("nogain")) return 0.01;
return 2; return 2;
} }
if(!target.countCards('he')) return 0; if (!target.countCards("he")) return 0;
if (player.hasFriend()) return -1; if (player.hasFriend()) return -1;
return 0; return 0;
} },
} },
} },
}, },
zengbin: { zengbin: {
audio: true, audio: true,
fullskin: true, fullskin: true,
enable: true, enable: true,
type:'trick', type: "trick",
filterTarget: true, filterTarget: true,
content: function () { content: function () {
'step 0' "step 0";
target.draw(3); target.draw(3);
'step 1' "step 1";
if(target.countCards('he',{type:'basic'})<target.countCards('he')){ if (target.countCards("he", { type: "basic" }) < target.countCards("he")) {
target.chooseToDiscard('增兵减灶','he',function(card){ target
return get.type(card)!='basic'; .chooseToDiscard("增兵减灶", "he", function (card) {
}).set('ai',function(card){ return get.type(card) != "basic";
})
.set("ai", function (card) {
if (_status.event.goon) return 8 - get.value(card); if (_status.event.goon) return 8 - get.value(card);
return 11 - get.value(card); return 11 - get.value(card);
}).set('goon',target.countCards('h',function(card){ })
return get.value(card,target,'raw')<8; .set(
})>1).set('prompt2','弃置一张非基本牌,或取消并弃置两张牌'); "goon",
target.countCards("h", function (card) {
return get.value(card, target, "raw") < 8;
}) > 1
)
.set("prompt2", "弃置一张非基本牌,或取消并弃置两张牌");
event.more = true; event.more = true;
} else {
target.chooseToDiscard("he", 2, true).set("ai", get.disvalue2);
} }
else{ "step 2";
target.chooseToDiscard('he',2,true).set('ai',get.disvalue2);
}
'step 2'
if (event.more && !result.bool) { if (event.more && !result.bool) {
target.chooseToDiscard('he',2,true).set('ai',get.disvalue2); target.chooseToDiscard("he", 2, true).set("ai", get.disvalue2);
} }
}, },
ai: { ai: {
@ -370,26 +387,26 @@ game.import('card', function () {
value: 10, value: 10,
tag: { tag: {
draw: 3, draw: 3,
discard:1 discard: 1,
}, },
result: { result: {
target: function (player, target) { target: function (player, target) {
if(target.hasJudge('lebu')) return 0; if (target.hasJudge("lebu")) return 0;
return Math.max(1,2-target.countCards('h')/10); return Math.max(1, 2 - target.countCards("h") / 10);
} },
} },
} },
}, },
caomu: { caomu: {
audio: true, audio: true,
fullskin: true, fullskin: true,
enable: true, enable: true,
type:'delay', type: "delay",
filterTarget: function (card, player, target) { filterTarget: function (card, player, target) {
return (lib.filter.judge(card,player,target)&&player!=target); return lib.filter.judge(card, player, target) && player != target;
}, },
judge: function (card) { judge: function (card) {
if(get.suit(card)=='club') return 1; if (get.suit(card) == "club") return 1;
return -3; return -3;
}, },
judge2: function (result) { judge2: function (result) {
@ -398,7 +415,7 @@ game.import('card', function () {
}, },
effect: function () { effect: function () {
if (result.bool == false) { if (result.bool == false) {
player.addTempSkill('caomu_skill'); player.addTempSkill("caomu_skill");
} }
}, },
ai: { ai: {
@ -414,65 +431,63 @@ game.import('card', function () {
var att = get.attitude(player, current); var att = get.attitude(player, current);
if (att > 3) { if (att > 3) {
return 1.1; return 1.1;
} } else if (att > 0) {
else if(att>0){
return 1; return 1;
} } else if (att < -3) {
else if(att<-3){
return -1.1; return -1.1;
} } else if (att < 0) {
else if(att<0){
return -1; return -1;
} }
} }
}); });
}, },
target: function (player, target) { target: function (player, target) {
if(target.hasJudge('bingliang')) return 0; if (target.hasJudge("bingliang")) return 0;
return -1.5/Math.sqrt(target.countCards('h')+1); return -1.5 / Math.sqrt(target.countCards("h") + 1);
} },
},
},
}, },
}
}
}, },
skill: { skill: {
lanyinjia: { lanyinjia: {
equipSkill: true, equipSkill: true,
enable:['chooseToUse','chooseToRespond'], enable: ["chooseToUse", "chooseToRespond"],
filterCard: true, filterCard: true,
viewAs:{name:'shan'}, viewAs: { name: "shan" },
viewAsFilter: function (player) { viewAsFilter: function (player) {
if(!player.countCards('hs')) return false; if (!player.countCards("hs")) return false;
}, },
position:'hs', position: "hs",
prompt:'将一张手牌当闪使用或打出', prompt: "将一张手牌当闪使用或打出",
check: function (card) { check: function (card) {
return 6 - get.value(card); return 6 - get.value(card);
}, },
ai: { ai: {
respondShan: true, respondShan: true,
skillTagFilter: function (player) { skillTagFilter: function (player) {
if(!player.countCards('hs')) return false; if (!player.countCards("hs")) return false;
}, },
effect: { effect: {
target: function (card, player, target, current) { target: function (card, player, target, current) {
if(get.tag(card,'respondShan')&&current<0&&target.countCards('hs')) return 0.59 if (get.tag(card, "respondShan") && current < 0 && target.countCards("hs"))
} return 0.59;
},
}, },
order: 4, order: 4,
useful: -0.5, useful: -0.5,
value:-0.5 value: -0.5,
} },
}, },
lanyinjia2: { lanyinjia2: {
equipSkill: true, equipSkill: true,
trigger:{player:'damageBegin4'}, trigger: { player: "damageBegin4" },
forced: true, forced: true,
filter: function (event, player) { filter: function (event, player) {
return event.card&&event.card.name=='sha'&&player.getEquips('lanyinjia').length>0; return event.card && event.card.name == "sha" && player.getEquips("lanyinjia").length > 0;
}, },
content: function () { content: function () {
var card=player.getEquips('lanyinjia'); var card = player.getEquips("lanyinjia");
if (card.length) { if (card.length) {
player.discard(card); player.discard(card);
} }
@ -480,37 +495,41 @@ game.import('card', function () {
}, },
zhungangshuo: { zhungangshuo: {
equipSkill: true, equipSkill: true,
trigger:{player:'useCardToPlayered'}, trigger: { player: "useCardToPlayered" },
logTarget:'target', logTarget: "target",
filter: function (event, player) { filter: function (event, player) {
return event.card.name=='sha'&&(event.player.countCards('h')||player.countCards('h')); return (
event.card.name == "sha" && (event.player.countCards("h") || player.countCards("h"))
);
}, },
check: function (event, player) { check: function (event, player) {
var target = event.target; var target = event.target;
if (get.attitude(player, target) >= 0) return false; if (get.attitude(player, target) >= 0) return false;
if(player.hasCard(function(card){ if (
player.hasCard(function (card) {
return get.value(card) >= 8; return get.value(card) >= 8;
})){ })
) {
return false; return false;
} }
var n1=event.target.countCards('h'); var n1 = event.target.countCards("h");
return n1>0&&n1<=player.countCards('h'); return n1 > 0 && n1 <= player.countCards("h");
}, },
content: function () { content: function () {
'step 0' "step 0";
game.delayx(); game.delayx();
'step 1' "step 1";
trigger.target.discardPlayerCard('h',player,true); trigger.target.discardPlayerCard("h", player, true);
'step 2' "step 2";
player.discardPlayerCard('h',trigger.target,true); player.discardPlayerCard("h", trigger.target, true);
} },
}, },
qibaodao: { qibaodao: {
equipSkill: true, equipSkill: true,
trigger:{source:'damageBegin1'}, trigger: { source: "damageBegin1" },
forced: true, forced: true,
filter: function (event) { filter: function (event) {
return event.card&&event.card.name=='sha'&&event.player.isHealthy(); return event.card && event.card.name == "sha" && event.player.isHealthy();
}, },
content: function () { content: function () {
trigger.num++; trigger.num++;
@ -518,107 +537,117 @@ game.import('card', function () {
ai: { ai: {
effect: { effect: {
player: function (card, player, target) { player: function (card, player, target) {
if(card.name=='sha'&&target.isHealthy()&&get.attitude(player,target)>0){ if (
card.name == "sha" &&
target.isHealthy() &&
get.attitude(player, target) > 0
) {
return [1, -2]; return [1, -2];
} }
} },
} },
} },
}, },
qibaodao2: { qibaodao2: {
inherit:'qinggang_skill', inherit: "qinggang_skill",
audio: true, audio: true,
}, },
g_jinchan: { g_jinchan: {
cardSkill: true, cardSkill: true,
trigger:{target:'useCardToBefore'}, trigger: { target: "useCardToBefore" },
forced: true, forced: true,
popup: false, popup: false,
filter: function (event, player) { filter: function (event, player) {
if (event.player == player) return false; if (event.player == player) return false;
if (event.getParent().directHit.includes(player)) return false; if (event.getParent().directHit.includes(player)) return false;
var num=player.countCards('h','jinchan'); var num = player.countCards("h", "jinchan");
return num&&num==player.countCards('h'); return num && num == player.countCards("h");
}, },
content: function () { content: function () {
'step 0' "step 0";
player.chooseToUse('是否对'+get.translation(trigger.card)+'使用【金蝉脱壳】?').set('ai1',function(card){ player
.chooseToUse("是否对" + get.translation(trigger.card) + "使用【金蝉脱壳】?")
.set("ai1", function (card) {
return _status.event.bool; return _status.event.bool;
}).set('bool',-get.effect(player,trigger.card,trigger.player,player)).set('respondTo',[trigger.player,trigger.card]).set('filterCard',function(card,player){ })
if(get.name(card)!='jinchan') return false; .set("bool", -get.effect(player, trigger.card, trigger.player, player))
return lib.filter.cardEnabled(card,player,'forceEnable'); .set("respondTo", [trigger.player, trigger.card])
.set("filterCard", function (card, player) {
if (get.name(card) != "jinchan") return false;
return lib.filter.cardEnabled(card, player, "forceEnable");
}); });
trigger.jinchan = true; trigger.jinchan = true;
'step 1' "step 1";
delete trigger.jinchan; delete trigger.jinchan;
} },
}, },
g_jinchan2: { g_jinchan2: {
trigger: { trigger: {
player:'loseAfter', player: "loseAfter",
global:'loseAsyncAfter', global: "loseAsyncAfter",
}, },
forced: true, forced: true,
cardSkill: true, cardSkill: true,
filter: function (event, player) { filter: function (event, player) {
if(event.type!='discard') return false; if (event.type != "discard") return false;
var evt = event.getl(player); var evt = event.getl(player);
if (!evt || !evt.cards2 || !evt.cards2.length) return false; if (!evt || !evt.cards2 || !evt.cards2.length) return false;
for (var i of evt.cards2) { for (var i of evt.cards2) {
if(i.name=='jinchan') return true; if (i.name == "jinchan") return true;
} }
return false; return false;
}, },
content: function () { content: function () {
var num=0,cards=trigger.getl(player).cards2; var num = 0,
cards = trigger.getl(player).cards2;
for (var i = 0; i < cards.length; i++) { for (var i = 0; i < cards.length; i++) {
if(cards[i].name=='jinchan') num++; if (cards[i].name == "jinchan") num++;
} }
if (num) { if (num) {
player.draw(num); player.draw(num);
} }
} },
}, },
yinyueqiang: { yinyueqiang: {
equipSkill: true, equipSkill: true,
trigger:{player:['useCard','respondAfter']}, trigger: { player: ["useCard", "respondAfter"] },
direct: true, direct: true,
filter: function (event, player) { filter: function (event, player) {
if (_status.currentPhase == player) return false; if (_status.currentPhase == player) return false;
if (!event.cards) return false; if (!event.cards) return false;
if (event.cards.length != 1) return false; if (event.cards.length != 1) return false;
if (lib.filter.autoRespondSha.call({ player: player })) return false; if (lib.filter.autoRespondSha.call({ player: player })) return false;
return get.color(event.cards[0])=='black'; return get.color(event.cards[0]) == "black";
}, },
content: function () { content: function () {
'step 0' "step 0";
var next=player.chooseToUse(get.prompt('yinyueqiang'),{name:'sha'}); var next = player.chooseToUse(get.prompt("yinyueqiang"), { name: "sha" });
next.aidelay = true; next.aidelay = true;
next.logSkill='yinyueqiang'; next.logSkill = "yinyueqiang";
next.noButton = true; next.noButton = true;
'step 1' "step 1";
if (result.bool) { if (result.bool) {
game.delay(); game.delay();
} }
} },
}, },
caomu_skill: { caomu_skill: {
cardSkill: true, cardSkill: true,
unique: true, unique: true,
trigger:{player:'phaseDrawBegin'}, trigger: { player: "phaseDrawBegin" },
popup: false, popup: false,
charlotte: true, charlotte: true,
forced: true, forced: true,
content: function () { content: function () {
trigger.num--; trigger.num--;
}, },
group:'caomu_skill2' group: "caomu_skill2",
}, },
caomu_skill2: { caomu_skill2: {
cardSkill: true, cardSkill: true,
popup: false, popup: false,
forced: true, forced: true,
trigger:{player:'phaseDrawAfter'}, trigger: { player: "phaseDrawAfter" },
content: function () { content: function () {
var targets = game.filterPlayer(function (current) { var targets = game.filterPlayer(function (current) {
return get.distance(player, current) <= 1 && player != current; return get.distance(player, current) <= 1 && player != current;
@ -626,54 +655,64 @@ game.import('card', function () {
if (targets.length) { if (targets.length) {
game.asyncDraw(targets); game.asyncDraw(targets);
} }
} },
} },
}, },
translate: { translate: {
qijia:'弃甲曳兵', qijia: "弃甲曳兵",
qijia_info:'出牌阶段对一名装备区里有牌的其他角色使用。该角色选择一项1.弃置手牌区和装备区里所有的武器和-1坐骑2.弃置手牌区和装备区里所有的防具和+1坐骑。', qijia_info:
jinchan:'金蝉脱壳', "出牌阶段对一名装备区里有牌的其他角色使用。该角色选择一项1.弃置手牌区和装备区里所有的武器和-1坐骑2.弃置手牌区和装备区里所有的防具和+1坐骑。",
g_jinchan2:'金蝉脱壳', jinchan: "金蝉脱壳",
g_jinchan2_info:'当你因弃置而失去【金蝉脱壳】时,你摸一张牌。', g_jinchan2: "金蝉脱壳",
jinchan_info:'其他角色使用的基本牌或普通牌对你生效时,若你的所有手牌均为【金蝉脱壳】,则你可以使用此牌。你令此牌对你无效并摸两张牌。当你因弃置而失去【金蝉脱壳】时,你摸一张牌。', g_jinchan2_info: "当你因弃置而失去【金蝉脱壳】时,你摸一张牌。",
fulei:'浮雷', jinchan_info:
fulei_info:'出牌阶段对你使用。你将【浮雷】置入判定区。若判定结果为♠则目标角色受到X点雷电伤害X为此牌判定结果为♠的次数。判定完成后将此牌移动到下家的判定区里。', "其他角色使用的基本牌或普通牌对你生效时,若你的所有手牌均为【金蝉脱壳】,则你可以使用此牌。你令此牌对你无效并摸两张牌。当你因弃置而失去【金蝉脱壳】时,你摸一张牌。",
qibaodao:'七宝刀', fulei: "浮雷",
qibaodao_info:'攻击范围2锁定技你使用【杀】无视目标防具若目标角色未损失体力值此【杀】伤害+1。', fulei_info:
qibaodao2:'七宝刀', "出牌阶段对你使用。你将【浮雷】置入判定区。若判定结果为♠则目标角色受到X点雷电伤害X为此牌判定结果为♠的次数。判定完成后将此牌移动到下家的判定区里。",
zhungangshuo:'衠钢槊', qibaodao: "七宝刀",
zhungangshuo_info:'当你使用【杀】指定一名角色为目标后,你可令该角色弃置你的一张手牌,然后你弃置其一张手牌。', qibaodao_info:
lanyinjia:'烂银甲', "攻击范围2锁定技你使用【杀】无视目标防具若目标角色未损失体力值此【杀】伤害+1。",
lanyinjia_info:'你可以将一张手牌当做【闪】使用或打出。锁定技,【烂银甲】不会无效化;当你受到【杀】造成的伤害时,弃置【烂银甲】。', qibaodao2: "七宝刀",
yinyueqiang:'银月枪', zhungangshuo: "衠钢槊",
yinyueqiang_info:'你的回合外,每当你使用或打出了一张黑色手牌(若为使用则在它结算之前),你可以立即对你攻击范围内的任意一名角色使用一张【杀】。', zhungangshuo_info:
shengdong:'声东击西', "当你使用【杀】指定一名角色为目标后,你可令该角色弃置你的一张手牌,然后你弃置其一张手牌。",
shengdong_info:'出牌阶段对一名其他角色使用。你交给目标角色一张手牌若如此做其将两张牌交给另一名由你选择的其他角色不足则全给存活角色不超过2时可重铸。', lanyinjia: "烂银甲",
zengbin:'增兵减灶', lanyinjia_info:
zengbin_info:'出牌阶段对一名角色使用。目标角色摸三张牌然后选择一项1.弃置一张非基本牌2.弃置两张牌。', "你可以将一张手牌当做【闪】使用或打出。锁定技,【烂银甲】不会无效化;当你受到【杀】造成的伤害时,弃置【烂银甲】。",
caomu:'草木皆兵', yinyueqiang: "银月枪",
caomu_info:'出牌阶段对一名其他角色使用。将【草木皆兵】放置于该角色的判定区里若判定结果不为梅花摸牌阶段目标角色少摸一张牌摸牌阶段结束时与其距离为1的角色各摸一张牌。', yinyueqiang_info:
"你的回合外,每当你使用或打出了一张黑色手牌(若为使用则在它结算之前),你可以立即对你攻击范围内的任意一名角色使用一张【杀】。",
shengdong: "声东击西",
shengdong_info:
"出牌阶段对一名其他角色使用。你交给目标角色一张手牌若如此做其将两张牌交给另一名由你选择的其他角色不足则全给存活角色不超过2时可重铸。",
zengbin: "增兵减灶",
zengbin_info:
"出牌阶段对一名角色使用。目标角色摸三张牌然后选择一项1.弃置一张非基本牌2.弃置两张牌。",
caomu: "草木皆兵",
caomu_info:
"出牌阶段对一名其他角色使用。将【草木皆兵】放置于该角色的判定区里若判定结果不为梅花摸牌阶段目标角色少摸一张牌摸牌阶段结束时与其距离为1的角色各摸一张牌。",
}, },
list: [ list: [
['spade',1,'caomu'], ["spade", 1, "caomu"],
['club',3,'caomu'], ["club", 3, "caomu"],
['heart',12,'shengdong'], ["heart", 12, "shengdong"],
['club',9,'shengdong'], ["club", 9, "shengdong"],
['spade',9,'shengdong'], ["spade", 9, "shengdong"],
['diamond',4,'zengbin'], ["diamond", 4, "zengbin"],
['heart',6,'zengbin'], ["heart", 6, "zengbin"],
['spade',7,'zengbin'], ["spade", 7, "zengbin"],
['diamond',12,'yinyueqiang'], ["diamond", 12, "yinyueqiang"],
["spade",11,'jinchan'], ["spade", 11, "jinchan"],
["club",12,'jinchan'], ["club", 12, "jinchan"],
["club",13,'jinchan'], ["club", 13, "jinchan"],
["club",12,'qijia'], ["club", 12, "qijia"],
["club",13,'qijia'], ["club", 13, "qijia"],
["spade",1,'fulei'], ["spade", 1, "fulei"],
["spade",6,'qibaodao'], ["spade", 6, "qibaodao"],
["spade",5,'zhungangshuo'], ["spade", 5, "zhungangshuo"],
["spade",2,'lanyinjia'], ["spade", 2, "lanyinjia"],
["club",2,'lanyinjia'], ["club", 2, "lanyinjia"],
], ],
}; };
}); });

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

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,10 +1,10 @@
import { lib, game, ui, get, ai, _status } from '../noname.js'; import { lib, game, ui, get, ai, _status } from "../noname.js";
game.import('card', function () { 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,
@ -15,20 +15,20 @@ game.import('card', function () {
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: { changshezhen: {
type:'zhenfa', type: "zhenfa",
recastable: true, recastable: true,
enable: function (card, player) { enable: function (card, player) {
if (player.inline()) return true; if (player.inline()) return true;
if(player.identity=='unknown'||player.identity=='ye') return false; if (player.identity == "unknown" || player.identity == "ye") return false;
return game.hasPlayer(function (current) { return game.hasPlayer(function (current) {
return current != player && current.isFriendOf(player); return current != player && current.isFriendOf(player);
}); });
@ -41,33 +41,34 @@ game.import('card', function () {
}); });
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 && current.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: { tianfuzhen: {
type:'zhenfa', type: "zhenfa",
recastable: true, recastable: true,
enable: function () { enable: function () {
return game.hasPlayer(function (current) { return game.hasPlayer(function (current) {
@ -75,25 +76,25 @@ game.import('card', function () {
}); });
}, },
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: { dizaizhen: {
type:'zhenfa', type: "zhenfa",
recastable: true, recastable: true,
enable: function () { enable: function () {
return game.hasPlayer(function (current) { return game.hasPlayer(function (current) {
@ -108,19 +109,19 @@ game.import('card', 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: { fengyangzhen: {
type:'zhenfa', type: "zhenfa",
recastable: true, recastable: true,
enable: true, enable: true,
filterTarget: function (card, player, target) { filterTarget: function (card, player, target) {
@ -128,20 +129,20 @@ game.import('card', function () {
}, },
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: { yunchuizhen: {
type:'zhenfa', type: "zhenfa",
recastable: true, recastable: true,
enable: true, enable: true,
filterTarget: function (card, player, target) { filterTarget: function (card, player, target) {
@ -149,20 +150,20 @@ game.import('card', function () {
}, },
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: { qixingzhen: {
type:'zhenfa', type: "zhenfa",
recastable: true, recastable: true,
enable: function (card, player) { enable: function (card, player) {
return player.siege() || player.sieged(); return player.siege() || player.sieged();
@ -172,19 +173,19 @@ game.import('card', function () {
}, },
selectTarget: -1, selectTarget: -1,
content: function () { content: function () {
'step 0' "step 0";
event.targets = game.filterPlayer(function (current) { 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);
}); });
@ -192,22 +193,26 @@ game.import('card', function () {
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: { shepanzhen: {
type:'zhenfa', type: "zhenfa",
recastable: true, recastable: true,
enable: function (card, player) { enable: function (card, player) {
if(player.identity=='unknown'||player.identity=='ye') return false; if (player.identity == "unknown" || player.identity == "ye") return false;
if (get.population(player.identity) <= 1) return false; if (get.population(player.identity) <= 1) return false;
return game.hasPlayer(function (current) { return game.hasPlayer(function (current) {
return current!=player&&current.identity==player.identity&&!player.inline(current); return (
current != player &&
current.identity == player.identity &&
!player.inline(current)
);
}); });
}, },
notarget: true, notarget: true,
@ -219,48 +224,48 @@ game.import('card', function () {
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: { longfeizhen: {
type:'zhenfa', type: "zhenfa",
recastable: true, recastable: true,
enable: function (card, player) { 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: { huyizhen: {
type:'zhenfa', type: "zhenfa",
recastable: true, recastable: true,
enable: function (card, player) { enable: function (card, player) {
return player.siege(player.next) || player.siege(player.previous); return player.siege(player.next) || player.siege(player.previous);
@ -270,62 +275,72 @@ game.import('card', function () {
}, },
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 get.type(card) != "basic";
}
).ai = function (card) {
if (get.effect(target, { name: "sha" }, player, player) > 0) {
return 6 - get.value(card); 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 get.type(card) != "basic";
}
).ai = function (card) {
if (get.effect(target, { name: "sha" }, event.player2, event.player2) > 0) {
return 6 - get.value(card); 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: { niaoxiangzhen: {
type:'zhenfa', type: "zhenfa",
recastable: true, recastable: true,
enable: true, enable: true,
filterTarget: function (card, player, target) { filterTarget: function (card, player, target) {
if (player.identity == target.identity) return false; if (player.identity == target.identity) return false;
if(target.identity=='unknown'||target.identity=='ye') return false; if (target.identity == "unknown" || target.identity == "ye") return false;
return target.identity==target.next.identity||target.identity==target.previous.identity return (
target.identity == target.next.identity || target.identity == target.previous.identity
);
}, },
selectTarget: -1, selectTarget: -1,
content: function () { content: function () {
"step 0" "step 0";
var next=target.chooseToRespond({name:'shan'}); var next = target.chooseToRespond({ name: "shan" });
next.ai = function (card) { next.ai = function (card) {
if (get.damageEffect(target, player, target) >= 0) return 0; 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();
} }
@ -333,7 +348,7 @@ game.import('card', function () {
ai: { ai: {
basic: { basic: {
order: 9, order: 9,
useful:1 useful: 1,
}, },
result: { result: {
target: -1.5, target: -1.5,
@ -342,55 +357,56 @@ game.import('card', function () {
respond: 1, respond: 1,
respondShan: 1, respondShan: 1,
damage: 1, damage: 1,
}
},
mode:['guozhan'],
}, },
}, },
skill:{ mode: ["guozhan"],
}, },
},
skill: {},
translate: { translate: {
zhenfa:'阵法', zhenfa: "阵法",
changshezhen:'长蛇阵', changshezhen: "长蛇阵",
pozhenjue:'破阵决', pozhenjue: "破阵决",
tianfuzhen:'天覆阵', tianfuzhen: "天覆阵",
dizaizhen:'地载阵', dizaizhen: "地载阵",
fengyangzhen:'风扬阵', fengyangzhen: "风扬阵",
yunchuizhen:'云垂阵', yunchuizhen: "云垂阵",
qixingzhen:'七星阵', qixingzhen: "七星阵",
shepanzhen:'蛇蟠阵', shepanzhen: "蛇蟠阵",
shepanzhen_bg:'列', shepanzhen_bg: "列",
yunchuizhen_bg:'垂', yunchuizhen_bg: "垂",
longfeizhen:'龙飞阵', longfeizhen: "龙飞阵",
huyizhen:'虎翼阵', huyizhen: "虎翼阵",
niaoxiangzhen:'鸟翔阵', niaoxiangzhen: "鸟翔阵",
niaoxiangzhen_info:'令所有非你阵营的队列的角色今次打出一张闪或者受到1点伤害。', niaoxiangzhen_info: "令所有非你阵营的队列的角色今次打出一张闪或者受到1点伤害。",
qixingzhen_info:'弃置所有围攻你的角色各一张牌,然后视为对所有你围攻的角色使用一张不计入出杀次数的杀。', 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 () {
// ["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 () {
// ["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'],

File diff suppressed because it is too large Load Diff