pref: format @/extension.
This commit is contained in:
parent
5197d6b2ce
commit
c4c42796cf
|
@ -1,136 +1,161 @@
|
||||||
import { lib, game, ui, get, ai, _status } from '../../noname.js';
|
import { lib, game, ui, get, ai, _status } from "../../noname.js";
|
||||||
game.import('play', function () {
|
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 @@
|
||||||
import { lib, game, ui, get, ai, _status } from '../../noname.js';
|
import { lib, game, ui, get, ai, _status } from "../../noname.js";
|
||||||
game.import('play', function () {
|
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
|
@ -1,229 +1,376 @@
|
||||||
import { lib, game, ui, get, ai, _status } from '../../noname.js';
|
import { lib, game, ui, get, ai, _status } from "../../noname.js";
|
||||||
game.import('play', function () {
|
game.import("play", function () {
|
||||||
return {
|
return {
|
||||||
name:'wuxing',
|
name: "wuxing",
|
||||||
arenaReady:function(){
|
arenaReady: function () {
|
||||||
if(_status.connectMode) return;
|
if (_status.connectMode) return;
|
||||||
lib.card.list.splice(Math.floor(lib.card.list.length*Math.random()),0,['spade',5,'wuxingpan']);
|
lib.card.list.splice(
|
||||||
if(!_status.video){
|
Math.floor(lib.card.list.length * Math.random()),
|
||||||
|
0,
|
||||||
|
["spade", 5, "wuxingpan"]
|
||||||
|
);
|
||||||
|
if (!_status.video) {
|
||||||
lib.video.push({
|
lib.video.push({
|
||||||
type:'play',
|
type: "play",
|
||||||
name:'wuxing'
|
name: "wuxing",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
video:function(){
|
video: function () {
|
||||||
for(var i in this.translate){
|
for (var i in this.translate) {
|
||||||
lib.translate[i]=this.translate[i];
|
lib.translate[i] = this.translate[i];
|
||||||
}
|
}
|
||||||
for(var i in this.card){
|
for (var i in this.card) {
|
||||||
lib.card[i]=this.card[i];
|
lib.card[i] = this.card[i];
|
||||||
}
|
}
|
||||||
for(var i in this.skill){
|
for (var i in this.skill) {
|
||||||
lib.skill[i]=this.skill[i];
|
lib.skill[i] = this.skill[i];
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
element:{
|
element: {
|
||||||
player:{
|
player: {
|
||||||
init:function(player){
|
init: function (player) {
|
||||||
if(player.node.wuxing){
|
if (player.node.wuxing) {
|
||||||
player.node.wuxing.remove();
|
player.node.wuxing.remove();
|
||||||
}
|
}
|
||||||
if(_status.video||_status.connectMode) return;
|
if (_status.video || _status.connectMode) return;
|
||||||
var node=ui.create.div('.wunature',player);
|
var node = ui.create.div(".wunature", player);
|
||||||
var list=['metal','wood','water','fire','soil'];
|
var list = ["metal", "wood", "water", "fire", "soil"];
|
||||||
var nature=list.randomGet();
|
var nature = list.randomGet();
|
||||||
player.wunature=nature;
|
player.wunature = nature;
|
||||||
node.dataset.nature=nature;
|
node.dataset.nature = nature;
|
||||||
node.innerHTML=get.translation(nature);
|
node.innerHTML = get.translation(nature);
|
||||||
player.node.wuxing=node;
|
player.node.wuxing = node;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
card: {
|
||||||
|
init: function (card) {
|
||||||
|
if (_status.video || _status.connectMode) return;
|
||||||
|
if (card.name == "wuxingpan") return;
|
||||||
|
if (card.wunature) return;
|
||||||
|
if (
|
||||||
|
Math.random() >
|
||||||
|
(parseFloat(lib.config.wuxing_num_playpackconfig) || 0)
|
||||||
|
)
|
||||||
|
return;
|
||||||
|
var node = ui.create.div(".wunature", card);
|
||||||
|
var list = ["metal", "wood", "water", "fire", "soil"];
|
||||||
|
var nature = list.randomGet();
|
||||||
|
card.wunature = nature;
|
||||||
|
node.dataset.nature = nature;
|
||||||
|
node.innerHTML = get.translation(nature);
|
||||||
|
card.node.wuxing = node;
|
||||||
|
if (!card.suit || !card.number) {
|
||||||
|
card.node.wuxing.style.display = "none";
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
card:{
|
|
||||||
init:function(card){
|
|
||||||
if(_status.video||_status.connectMode) return;
|
|
||||||
if(card.name=='wuxingpan') return;
|
|
||||||
if(card.wunature) return;
|
|
||||||
if(Math.random()>(parseFloat(lib.config.wuxing_num_playpackconfig)||0)) return;
|
|
||||||
var node=ui.create.div('.wunature',card);
|
|
||||||
var list=['metal','wood','water','fire','soil'];
|
|
||||||
var nature=list.randomGet();
|
|
||||||
card.wunature=nature;
|
|
||||||
node.dataset.nature=nature;
|
|
||||||
node.innerHTML=get.translation(nature);
|
|
||||||
card.node.wuxing=node;
|
|
||||||
if(!card.suit||!card.number){
|
|
||||||
card.node.wuxing.style.display='none';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
skill:{
|
|
||||||
_shengke:{
|
|
||||||
trigger:{target:'useCardToBegin'},
|
|
||||||
forced:true,
|
|
||||||
popup:false,
|
|
||||||
filter:function(event,player){
|
|
||||||
if(_status.connectMode) return false;
|
|
||||||
return event.card.wunature&&player.wunature;
|
|
||||||
},
|
},
|
||||||
content:function(){
|
skill: {
|
||||||
switch(trigger.card.wunature){
|
_shengke: {
|
||||||
case 'metal':
|
trigger: { target: "useCardToBegin" },
|
||||||
switch(player.wunature){
|
forced: true,
|
||||||
case 'wood':
|
popup: false,
|
||||||
if(player.countCards('he')){
|
filter: function (event, player) {
|
||||||
game.log(player,'被'+get.translation(trigger.card.wunature)+'属性的卡牌克制');
|
if (_status.connectMode) return false;
|
||||||
player.chooseToDiscard('你被金属性卡牌克制,需弃置一张牌',true,'he').ai=get.disvalue;player.popup('金克木')}return;
|
return event.card.wunature && player.wunature;
|
||||||
case 'water':
|
},
|
||||||
game.log(player,'得到'+get.translation(trigger.card.wunature)+'属性卡牌的加成');
|
content: function () {
|
||||||
player.draw();player.popup('金生水');
|
switch (trigger.card.wunature) {
|
||||||
|
case "metal":
|
||||||
|
switch (player.wunature) {
|
||||||
|
case "wood":
|
||||||
|
if (player.countCards("he")) {
|
||||||
|
game.log(
|
||||||
|
player,
|
||||||
|
"被" +
|
||||||
|
get.translation(
|
||||||
|
trigger.card.wunature
|
||||||
|
) +
|
||||||
|
"属性的卡牌克制"
|
||||||
|
);
|
||||||
|
player.chooseToDiscard(
|
||||||
|
"你被金属性卡牌克制,需弃置一张牌",
|
||||||
|
true,
|
||||||
|
"he"
|
||||||
|
).ai = get.disvalue;
|
||||||
|
player.popup("金克木");
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
case "water":
|
||||||
|
game.log(
|
||||||
|
player,
|
||||||
|
"得到" +
|
||||||
|
get.translation(
|
||||||
|
trigger.card.wunature
|
||||||
|
) +
|
||||||
|
"属性卡牌的加成"
|
||||||
|
);
|
||||||
|
player.draw();
|
||||||
|
player.popup("金生水");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
case 'wood':
|
case "wood":
|
||||||
switch(player.wunature){
|
switch (player.wunature) {
|
||||||
case 'soil':
|
case "soil":
|
||||||
if(player.countCards('he')){
|
if (player.countCards("he")) {
|
||||||
game.log(player,'被'+get.translation(trigger.card.wunature)+'属性的卡牌克制');
|
game.log(
|
||||||
player.chooseToDiscard('你被木属性卡牌克制,需弃置一张牌',true,'he').ai=get.disvalue;player.popup('木克土')}return;
|
player,
|
||||||
case 'fire':
|
"被" +
|
||||||
game.log(player,'得到'+get.translation(trigger.card.wunature)+'属性卡牌的加成');
|
get.translation(
|
||||||
player.draw();player.popup('木生火');
|
trigger.card.wunature
|
||||||
|
) +
|
||||||
|
"属性的卡牌克制"
|
||||||
|
);
|
||||||
|
player.chooseToDiscard(
|
||||||
|
"你被木属性卡牌克制,需弃置一张牌",
|
||||||
|
true,
|
||||||
|
"he"
|
||||||
|
).ai = get.disvalue;
|
||||||
|
player.popup("木克土");
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
case "fire":
|
||||||
|
game.log(
|
||||||
|
player,
|
||||||
|
"得到" +
|
||||||
|
get.translation(
|
||||||
|
trigger.card.wunature
|
||||||
|
) +
|
||||||
|
"属性卡牌的加成"
|
||||||
|
);
|
||||||
|
player.draw();
|
||||||
|
player.popup("木生火");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
case 'water':
|
case "water":
|
||||||
switch(player.wunature){
|
switch (player.wunature) {
|
||||||
case 'fire':
|
case "fire":
|
||||||
if(player.countCards('he')){
|
if (player.countCards("he")) {
|
||||||
game.log(player,'被'+get.translation(trigger.card.wunature)+'属性的卡牌克制');
|
game.log(
|
||||||
player.chooseToDiscard('你被水属性卡牌克制,需弃置一张牌',true,'he').ai=get.disvalue;player.popup('水克火')}return;
|
player,
|
||||||
case 'wood':
|
"被" +
|
||||||
game.log(player,'得到'+get.translation(trigger.card.wunature)+'属性卡牌的加成');
|
get.translation(
|
||||||
player.draw();player.popup('水生木');
|
trigger.card.wunature
|
||||||
|
) +
|
||||||
|
"属性的卡牌克制"
|
||||||
|
);
|
||||||
|
player.chooseToDiscard(
|
||||||
|
"你被水属性卡牌克制,需弃置一张牌",
|
||||||
|
true,
|
||||||
|
"he"
|
||||||
|
).ai = get.disvalue;
|
||||||
|
player.popup("水克火");
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
case "wood":
|
||||||
|
game.log(
|
||||||
|
player,
|
||||||
|
"得到" +
|
||||||
|
get.translation(
|
||||||
|
trigger.card.wunature
|
||||||
|
) +
|
||||||
|
"属性卡牌的加成"
|
||||||
|
);
|
||||||
|
player.draw();
|
||||||
|
player.popup("水生木");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
case 'fire':
|
case "fire":
|
||||||
switch(player.wunature){
|
switch (player.wunature) {
|
||||||
case 'metal':
|
case "metal":
|
||||||
if(player.countCards('he')){
|
if (player.countCards("he")) {
|
||||||
game.log(player,'被'+get.translation(trigger.card.wunature)+'属性的卡牌克制');
|
game.log(
|
||||||
player.chooseToDiscard('你被火属性卡牌克制,需弃置一张牌',true,'he').ai=get.disvalue;player.popup('火克金')}return;
|
player,
|
||||||
case 'soil':
|
"被" +
|
||||||
game.log(player,'得到'+get.translation(trigger.card.wunature)+'属性卡牌的加成');
|
get.translation(
|
||||||
player.draw();player.popup('火生土');
|
trigger.card.wunature
|
||||||
|
) +
|
||||||
|
"属性的卡牌克制"
|
||||||
|
);
|
||||||
|
player.chooseToDiscard(
|
||||||
|
"你被火属性卡牌克制,需弃置一张牌",
|
||||||
|
true,
|
||||||
|
"he"
|
||||||
|
).ai = get.disvalue;
|
||||||
|
player.popup("火克金");
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
case "soil":
|
||||||
|
game.log(
|
||||||
|
player,
|
||||||
|
"得到" +
|
||||||
|
get.translation(
|
||||||
|
trigger.card.wunature
|
||||||
|
) +
|
||||||
|
"属性卡牌的加成"
|
||||||
|
);
|
||||||
|
player.draw();
|
||||||
|
player.popup("火生土");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
case 'soil':
|
case "soil":
|
||||||
switch(player.wunature){
|
switch (player.wunature) {
|
||||||
case 'water':
|
case "water":
|
||||||
if(player.countCards('he')){
|
if (player.countCards("he")) {
|
||||||
game.log(player,'被'+get.translation(trigger.card.wunature)+'属性的卡牌克制');
|
game.log(
|
||||||
player.chooseToDiscard('你被土属性卡牌克制,需弃置一张牌',true,'he').ai=get.disvalue;player.popup('土克水')}return;
|
player,
|
||||||
case 'metal':
|
"被" +
|
||||||
game.log(player,'得到'+get.translation(trigger.card.wunature)+'属性卡牌的加成');
|
get.translation(
|
||||||
player.draw();player.popup('土生金');
|
trigger.card.wunature
|
||||||
|
) +
|
||||||
|
"属性的卡牌克制"
|
||||||
|
);
|
||||||
|
player.chooseToDiscard(
|
||||||
|
"你被土属性卡牌克制,需弃置一张牌",
|
||||||
|
true,
|
||||||
|
"he"
|
||||||
|
).ai = get.disvalue;
|
||||||
|
player.popup("土克水");
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
case "metal":
|
||||||
|
game.log(
|
||||||
|
player,
|
||||||
|
"得到" +
|
||||||
|
get.translation(
|
||||||
|
trigger.card.wunature
|
||||||
|
) +
|
||||||
|
"属性卡牌的加成"
|
||||||
|
);
|
||||||
|
player.draw();
|
||||||
|
player.popup("土生金");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
ai:{
|
ai: {
|
||||||
effect:{
|
effect: {
|
||||||
target:function(card,player,target,current){
|
target: function (card, player, target, current) {
|
||||||
switch(card.wunature){
|
switch (card.wunature) {
|
||||||
case 'metal':
|
case "metal":
|
||||||
switch(target.wunature){
|
switch (target.wunature) {
|
||||||
case 'wood':if(current!=0) return [1,-0.3];return;
|
case "wood":
|
||||||
case 'water':if(current!=0) return [1,0.3];return;
|
if (current != 0) return [1, -0.3];
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
case 'wood':
|
case "water":
|
||||||
switch(target.wunature){
|
if (current != 0) return [1, 0.3];
|
||||||
case 'soil':if(current!=0) return [1,-0.3];return;
|
|
||||||
case 'fire':if(current!=0) return [1,0.3];return;
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
case 'water':
|
|
||||||
switch(target.wunature){
|
|
||||||
case 'fire':if(current!=0) return [1,-0.3];return;
|
|
||||||
case 'wood':if(current!=0) return [1,0.3];return;
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
case 'fire':
|
|
||||||
switch(target.wunature){
|
|
||||||
case 'metal':if(current!=0) return [1,-0.3];return;
|
|
||||||
case 'soil':if(current!=0) return [1,0.3];return;
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
case 'soil':
|
|
||||||
switch(target.wunature){
|
|
||||||
case 'water':if(current!=0) return [1,-0.3];return;
|
|
||||||
case 'metal':if(current!=0) return [1,0.3];return;
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
return;
|
||||||
|
case "wood":
|
||||||
|
switch (target.wunature) {
|
||||||
|
case "soil":
|
||||||
|
if (current != 0) return [1, -0.3];
|
||||||
|
return;
|
||||||
|
case "fire":
|
||||||
|
if (current != 0) return [1, 0.3];
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
return;
|
||||||
|
case "water":
|
||||||
|
switch (target.wunature) {
|
||||||
|
case "fire":
|
||||||
|
if (current != 0) return [1, -0.3];
|
||||||
|
return;
|
||||||
|
case "wood":
|
||||||
|
if (current != 0) return [1, 0.3];
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
return;
|
||||||
|
case "fire":
|
||||||
|
switch (target.wunature) {
|
||||||
|
case "metal":
|
||||||
|
if (current != 0) return [1, -0.3];
|
||||||
|
return;
|
||||||
|
case "soil":
|
||||||
|
if (current != 0) return [1, 0.3];
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
case "soil":
|
||||||
|
switch (target.wunature) {
|
||||||
|
case "water":
|
||||||
|
if (current != 0) return [1, -0.3];
|
||||||
|
return;
|
||||||
|
case "metal":
|
||||||
|
if (current != 0) return [1, 0.3];
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
wuxingpan_skill:{
|
},
|
||||||
enable:'phaseUse',
|
},
|
||||||
usable:1,
|
},
|
||||||
filterCard:true,
|
wuxingpan_skill: {
|
||||||
lose:false,
|
enable: "phaseUse",
|
||||||
prompt:'选择一张手牌永久改变其五行属性',
|
usable: 1,
|
||||||
content:function(){
|
filterCard: true,
|
||||||
"step 0"
|
lose: false,
|
||||||
player.chooseControl('metal','wood','water','fire','soil');
|
prompt: "选择一张手牌永久改变其五行属性",
|
||||||
"step 1"
|
content: function () {
|
||||||
var card=cards[0];
|
"step 0";
|
||||||
if(!card.node.wuxing){
|
player.chooseControl(
|
||||||
card.node.wuxing=ui.create.div('.wunature',card);
|
"metal",
|
||||||
|
"wood",
|
||||||
|
"water",
|
||||||
|
"fire",
|
||||||
|
"soil"
|
||||||
|
);
|
||||||
|
("step 1");
|
||||||
|
var card = cards[0];
|
||||||
|
if (!card.node.wuxing) {
|
||||||
|
card.node.wuxing = ui.create.div(".wunature", card);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
card.wunature = result.control;
|
||||||
card.wunature=result.control;
|
card.node.wuxing.dataset.nature = result.control;
|
||||||
card.node.wuxing.dataset.nature=result.control;
|
card.node.wuxing.innerHTML = get.translation(
|
||||||
card.node.wuxing.innerHTML=get.translation(result.control);
|
result.control
|
||||||
}
|
);
|
||||||
}
|
|
||||||
},
|
},
|
||||||
card:{
|
|
||||||
wuxingpan:{
|
|
||||||
type:'equip',
|
|
||||||
subtype:'equip5',
|
|
||||||
skills:['wuxingpan_skill'],
|
|
||||||
fullskin:true
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
translate:{
|
|
||||||
metal:'金',
|
|
||||||
wood:'木',
|
|
||||||
water:'水',
|
|
||||||
soil:'土',
|
|
||||||
goldColor:'rgb(236,236,130)',
|
|
||||||
woodColor:'rgb(149,202,147)',
|
|
||||||
waterColor:'rgb(150,88,201)',
|
|
||||||
fireColor:'rgb(236,132,106)',
|
|
||||||
soilColor:'rgb(201,159,98)',
|
|
||||||
goldColor2:'rgba(236,236,57,0.3)',
|
|
||||||
woodColor2:'rgba(33,155,10,0.3)',
|
|
||||||
waterColor2:'rgba(29,156,255,0.3)',
|
|
||||||
fireColor2:'rgba(255,51,0,0.3)',
|
|
||||||
soilColor2:'rgba(163,98,0,0.3)',
|
|
||||||
wuxingpan:'五行盘',
|
|
||||||
wuxingpan_skill:'五行',
|
|
||||||
wuxingpan_skill_info:'出牌阶段限一次,你可以永久改变一张手牌的五行属性',
|
|
||||||
wuxingpan_info:'出牌阶段限一次,你可以永久改变一张手牌的五行属性',
|
|
||||||
},
|
},
|
||||||
help:{
|
card: {
|
||||||
'五行生克':'<ul><li>每名角色在游戏开始时随机获得一个属性<li>牌堆中三分之一的牌会随机获得一个属性<li>当一名成为相克属性卡牌的目标时,'+
|
wuxingpan: {
|
||||||
'须弃置一张牌<li>当一名角色成为相生的卡牌的目标时,须摸一张牌'+
|
type: "equip",
|
||||||
'<li>金克木,金生水;<br>木克土,木生火;<br>水克火,水生木;<br>火克金,火生土;<br>土克水,土生金'
|
subtype: "equip5",
|
||||||
}
|
skills: ["wuxingpan_skill"],
|
||||||
|
fullskin: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
translate: {
|
||||||
|
metal: "金",
|
||||||
|
wood: "木",
|
||||||
|
water: "水",
|
||||||
|
soil: "土",
|
||||||
|
goldColor: "rgb(236,236,130)",
|
||||||
|
woodColor: "rgb(149,202,147)",
|
||||||
|
waterColor: "rgb(150,88,201)",
|
||||||
|
fireColor: "rgb(236,132,106)",
|
||||||
|
soilColor: "rgb(201,159,98)",
|
||||||
|
goldColor2: "rgba(236,236,57,0.3)",
|
||||||
|
woodColor2: "rgba(33,155,10,0.3)",
|
||||||
|
waterColor2: "rgba(29,156,255,0.3)",
|
||||||
|
fireColor2: "rgba(255,51,0,0.3)",
|
||||||
|
soilColor2: "rgba(163,98,0,0.3)",
|
||||||
|
wuxingpan: "五行盘",
|
||||||
|
wuxingpan_skill: "五行",
|
||||||
|
wuxingpan_skill_info:
|
||||||
|
"出牌阶段限一次,你可以永久改变一张手牌的五行属性",
|
||||||
|
wuxingpan_info: "出牌阶段限一次,你可以永久改变一张手牌的五行属性",
|
||||||
|
},
|
||||||
|
help: {
|
||||||
|
五行生克:
|
||||||
|
"<ul><li>每名角色在游戏开始时随机获得一个属性<li>牌堆中三分之一的牌会随机获得一个属性<li>当一名成为相克属性卡牌的目标时," +
|
||||||
|
"须弃置一张牌<li>当一名角色成为相生的卡牌的目标时,须摸一张牌" +
|
||||||
|
"<li>金克木,金生水;<br>木克土,木生火;<br>水克火,水生木;<br>火克金,火生土;<br>土克水,土生金",
|
||||||
|
},
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue