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) {
|
||||||
if(get.mode()!='boss'){
|
lib.characterPack.mode_extension_boss[i][4].push(
|
||||||
lib.characterPack.mode_extension_boss=storage.boss||{};
|
"mode: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];
|
||||||
lib.character[i]=lib.characterPack.mode_extension_boss[i];
|
if (
|
||||||
if(typeof lib.character[i][2]!='number'&&(typeof lib.character[i][2]!='string'||lib.character[i][2].indexOf('/')==-1)){
|
typeof lib.character[i][2] != "number" &&
|
||||||
lib.character[i][2]=Infinity;
|
(typeof lib.character[i][2] != "string" ||
|
||||||
|
lib.character[i][2].indexOf("/") == -1)
|
||||||
|
) {
|
||||||
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
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) {
|
||||||
var loadversus=function(){
|
for (var i in mode.translate) {
|
||||||
if(get.mode()!='versus'){
|
lib.translate[i] =
|
||||||
game.loadModeAsync('versus',function(mode){
|
lib.translate[i] || mode.translate[i];
|
||||||
for(var i in mode.translate){
|
storage.translate[i] = mode.translate[i];
|
||||||
lib.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);
|
||||||
if(i!='versus_ladder'){
|
if (i != "versus_ladder") {
|
||||||
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.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:{
|
tiesuo: {
|
||||||
spade:2,
|
spade: 2,
|
||||||
club:4
|
club: 4,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
var rand = function () {
|
||||||
|
return Math.ceil(Math.random() * 13);
|
||||||
|
};
|
||||||
|
var getn = function (i, j) {
|
||||||
|
return Math.round(
|
||||||
|
data[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 rand=function(){
|
var dn =
|
||||||
return Math.ceil(Math.random()*13);
|
(num * (lib.card.list.length - data.total)) /
|
||||||
};
|
(data.total - num);
|
||||||
var getn=function(i,j){
|
if (dn > 1000) dn = 1000;
|
||||||
return Math.round(data[i][j]*parseFloat(lib.config['cardpile_'+i+'_playpackconfig']));
|
if (dn > 0) {
|
||||||
};
|
var p = 0;
|
||||||
var num=0;
|
for (var i in data) {
|
||||||
for(var i in data){
|
for (var j in data[i]) {
|
||||||
for(var j in data[i]){
|
var n = Math.round((dn * getn(i, j)) / num);
|
||||||
num+=getn(i,j);
|
while (n--) {
|
||||||
}
|
if (i == "huosha") {
|
||||||
}
|
lib.card.list.push([j, rand(), "sha", "fire"]);
|
||||||
var dn=num*(lib.card.list.length-data.total)/(data.total-num);
|
} else if (i == "leisha") {
|
||||||
if(dn>1000) dn=1000;
|
lib.card.list.push([
|
||||||
if(dn>0){
|
j,
|
||||||
var p=0;
|
rand(),
|
||||||
for(var i in data){
|
"sha",
|
||||||
for(var j in data[i]){
|
"thunder",
|
||||||
var n=Math.round(dn*getn(i,j)/num);
|
]);
|
||||||
while(n--){
|
} else {
|
||||||
if(i=='huosha'){
|
lib.card.list.push([j, rand(), i]);
|
||||||
lib.card.list.push([j,rand(),'sha','fire']);
|
|
||||||
}
|
|
||||||
else if(i=='leisha'){
|
|
||||||
lib.card.list.push([j,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:{
|
card: {
|
||||||
init:function(card){
|
init: function (card) {
|
||||||
if(_status.video||_status.connectMode) return;
|
if (_status.video || _status.connectMode) return;
|
||||||
if(card.name=='wuxingpan') return;
|
if (card.name == "wuxingpan") return;
|
||||||
if(card.wunature) return;
|
if (card.wunature) return;
|
||||||
if(Math.random()>(parseFloat(lib.config.wuxing_num_playpackconfig)||0)) return;
|
if (
|
||||||
var node=ui.create.div('.wunature',card);
|
Math.random() >
|
||||||
var list=['metal','wood','water','fire','soil'];
|
(parseFloat(lib.config.wuxing_num_playpackconfig) || 0)
|
||||||
var nature=list.randomGet();
|
)
|
||||||
card.wunature=nature;
|
return;
|
||||||
node.dataset.nature=nature;
|
var node = ui.create.div(".wunature", card);
|
||||||
node.innerHTML=get.translation(nature);
|
var list = ["metal", "wood", "water", "fire", "soil"];
|
||||||
card.node.wuxing=node;
|
var nature = list.randomGet();
|
||||||
if(!card.suit||!card.number){
|
card.wunature = nature;
|
||||||
card.node.wuxing.style.display='none';
|
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:{
|
skill: {
|
||||||
_shengke:{
|
_shengke: {
|
||||||
trigger:{target:'useCardToBegin'},
|
trigger: { target: "useCardToBegin" },
|
||||||
forced:true,
|
forced: true,
|
||||||
popup:false,
|
popup: false,
|
||||||
filter:function(event,player){
|
filter: function (event, player) {
|
||||||
if(_status.connectMode) return false;
|
if (_status.connectMode) return false;
|
||||||
return event.card.wunature&&player.wunature;
|
return event.card.wunature && player.wunature;
|
||||||
},
|
},
|
||||||
content:function(){
|
content: function () {
|
||||||
switch(trigger.card.wunature){
|
switch (trigger.card.wunature) {
|
||||||
case 'metal':
|
case "metal":
|
||||||
switch(player.wunature){
|
switch (player.wunature) {
|
||||||
case 'wood':
|
case "wood":
|
||||||
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 'water':
|
"被" +
|
||||||
game.log(player,'得到'+get.translation(trigger.card.wunature)+'属性卡牌的加成');
|
get.translation(
|
||||||
player.draw();player.popup('金生水');
|
trigger.card.wunature
|
||||||
return;
|
) +
|
||||||
}
|
"属性的卡牌克制"
|
||||||
return;
|
);
|
||||||
case 'wood':
|
player.chooseToDiscard(
|
||||||
switch(player.wunature){
|
"你被金属性卡牌克制,需弃置一张牌",
|
||||||
case 'soil':
|
true,
|
||||||
if(player.countCards('he')){
|
"he"
|
||||||
game.log(player,'被'+get.translation(trigger.card.wunature)+'属性的卡牌克制');
|
).ai = get.disvalue;
|
||||||
player.chooseToDiscard('你被木属性卡牌克制,需弃置一张牌',true,'he').ai=get.disvalue;player.popup('木克土')}return;
|
player.popup("金克木");
|
||||||
case 'fire':
|
}
|
||||||
game.log(player,'得到'+get.translation(trigger.card.wunature)+'属性卡牌的加成');
|
return;
|
||||||
player.draw();player.popup('木生火');
|
case "water":
|
||||||
return;
|
game.log(
|
||||||
}
|
player,
|
||||||
return;
|
"得到" +
|
||||||
case 'water':
|
get.translation(
|
||||||
switch(player.wunature){
|
trigger.card.wunature
|
||||||
case 'fire':
|
) +
|
||||||
if(player.countCards('he')){
|
"属性卡牌的加成"
|
||||||
game.log(player,'被'+get.translation(trigger.card.wunature)+'属性的卡牌克制');
|
);
|
||||||
player.chooseToDiscard('你被水属性卡牌克制,需弃置一张牌',true,'he').ai=get.disvalue;player.popup('水克火')}return;
|
player.draw();
|
||||||
case 'wood':
|
player.popup("金生水");
|
||||||
game.log(player,'得到'+get.translation(trigger.card.wunature)+'属性卡牌的加成');
|
return;
|
||||||
player.draw();player.popup('水生木');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
case 'fire':
|
|
||||||
switch(player.wunature){
|
|
||||||
case 'metal':
|
|
||||||
if(player.countCards('he')){
|
|
||||||
game.log(player,'被'+get.translation(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;
|
|
||||||
case 'soil':
|
|
||||||
switch(player.wunature){
|
|
||||||
case 'water':
|
|
||||||
if(player.countCards('he')){
|
|
||||||
game.log(player,'被'+get.translation(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;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
ai:{
|
|
||||||
effect:{
|
|
||||||
target:function(card,player,target,current){
|
|
||||||
switch(card.wunature){
|
|
||||||
case 'metal':
|
|
||||||
switch(target.wunature){
|
|
||||||
case 'wood':if(current!=0) return [1,-0.3];return;
|
|
||||||
case 'water':if(current!=0) return [1,0.3];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;
|
|
||||||
}
|
}
|
||||||
}
|
return;
|
||||||
|
case "wood":
|
||||||
|
switch (player.wunature) {
|
||||||
|
case "soil":
|
||||||
|
if (player.countCards("he")) {
|
||||||
|
game.log(
|
||||||
|
player,
|
||||||
|
"被" +
|
||||||
|
get.translation(
|
||||||
|
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;
|
||||||
|
case "water":
|
||||||
|
switch (player.wunature) {
|
||||||
|
case "fire":
|
||||||
|
if (player.countCards("he")) {
|
||||||
|
game.log(
|
||||||
|
player,
|
||||||
|
"被" +
|
||||||
|
get.translation(
|
||||||
|
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;
|
||||||
|
case "fire":
|
||||||
|
switch (player.wunature) {
|
||||||
|
case "metal":
|
||||||
|
if (player.countCards("he")) {
|
||||||
|
game.log(
|
||||||
|
player,
|
||||||
|
"被" +
|
||||||
|
get.translation(
|
||||||
|
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;
|
||||||
|
case "soil":
|
||||||
|
switch (player.wunature) {
|
||||||
|
case "water":
|
||||||
|
if (player.countCards("he")) {
|
||||||
|
game.log(
|
||||||
|
player,
|
||||||
|
"被" +
|
||||||
|
get.translation(
|
||||||
|
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;
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
ai: {
|
||||||
|
effect: {
|
||||||
|
target: function (card, player, target, current) {
|
||||||
|
switch (card.wunature) {
|
||||||
|
case "metal":
|
||||||
|
switch (target.wunature) {
|
||||||
|
case "wood":
|
||||||
|
if (current != 0) return [1, -0.3];
|
||||||
|
return;
|
||||||
|
case "water":
|
||||||
|
if (current != 0) return [1, 0.3];
|
||||||
|
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:{
|
wuxingpan_skill: {
|
||||||
enable:'phaseUse',
|
enable: "phaseUse",
|
||||||
usable:1,
|
usable: 1,
|
||||||
filterCard:true,
|
filterCard: true,
|
||||||
lose:false,
|
lose: false,
|
||||||
prompt:'选择一张手牌永久改变其五行属性',
|
prompt: "选择一张手牌永久改变其五行属性",
|
||||||
content:function(){
|
content: function () {
|
||||||
"step 0"
|
"step 0";
|
||||||
player.chooseControl('metal','wood','water','fire','soil');
|
player.chooseControl(
|
||||||
"step 1"
|
"metal",
|
||||||
var card=cards[0];
|
"wood",
|
||||||
if(!card.node.wuxing){
|
"water",
|
||||||
card.node.wuxing=ui.create.div('.wunature',card);
|
"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:{
|
card: {
|
||||||
wuxingpan:{
|
wuxingpan: {
|
||||||
type:'equip',
|
type: "equip",
|
||||||
subtype:'equip5',
|
subtype: "equip5",
|
||||||
skills:['wuxingpan_skill'],
|
skills: ["wuxingpan_skill"],
|
||||||
fullskin:true
|
fullskin: true,
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
translate:{
|
translate: {
|
||||||
metal:'金',
|
metal: "金",
|
||||||
wood:'木',
|
wood: "木",
|
||||||
water:'水',
|
water: "水",
|
||||||
soil:'土',
|
soil: "土",
|
||||||
goldColor:'rgb(236,236,130)',
|
goldColor: "rgb(236,236,130)",
|
||||||
woodColor:'rgb(149,202,147)',
|
woodColor: "rgb(149,202,147)",
|
||||||
waterColor:'rgb(150,88,201)',
|
waterColor: "rgb(150,88,201)",
|
||||||
fireColor:'rgb(236,132,106)',
|
fireColor: "rgb(236,132,106)",
|
||||||
soilColor:'rgb(201,159,98)',
|
soilColor: "rgb(201,159,98)",
|
||||||
goldColor2:'rgba(236,236,57,0.3)',
|
goldColor2: "rgba(236,236,57,0.3)",
|
||||||
woodColor2:'rgba(33,155,10,0.3)',
|
woodColor2: "rgba(33,155,10,0.3)",
|
||||||
waterColor2:'rgba(29,156,255,0.3)',
|
waterColor2: "rgba(29,156,255,0.3)",
|
||||||
fireColor2:'rgba(255,51,0,0.3)',
|
fireColor2: "rgba(255,51,0,0.3)",
|
||||||
soilColor2:'rgba(163,98,0,0.3)',
|
soilColor2: "rgba(163,98,0,0.3)",
|
||||||
wuxingpan:'五行盘',
|
wuxingpan: "五行盘",
|
||||||
wuxingpan_skill:'五行',
|
wuxingpan_skill: "五行",
|
||||||
wuxingpan_skill_info:'出牌阶段限一次,你可以永久改变一张手牌的五行属性',
|
wuxingpan_skill_info:
|
||||||
wuxingpan_info:'出牌阶段限一次,你可以永久改变一张手牌的五行属性',
|
"出牌阶段限一次,你可以永久改变一张手牌的五行属性",
|
||||||
|
wuxingpan_info: "出牌阶段限一次,你可以永久改变一张手牌的五行属性",
|
||||||
|
},
|
||||||
|
help: {
|
||||||
|
五行生克:
|
||||||
|
"<ul><li>每名角色在游戏开始时随机获得一个属性<li>牌堆中三分之一的牌会随机获得一个属性<li>当一名成为相克属性卡牌的目标时," +
|
||||||
|
"须弃置一张牌<li>当一名角色成为相生的卡牌的目标时,须摸一张牌" +
|
||||||
|
"<li>金克木,金生水;<br>木克土,木生火;<br>水克火,水生木;<br>火克金,火生土;<br>土克水,土生金",
|
||||||
},
|
},
|
||||||
help:{
|
|
||||||
'五行生克':'<ul><li>每名角色在游戏开始时随机获得一个属性<li>牌堆中三分之一的牌会随机获得一个属性<li>当一名成为相克属性卡牌的目标时,'+
|
|
||||||
'须弃置一张牌<li>当一名角色成为相生的卡牌的目标时,须摸一张牌'+
|
|
||||||
'<li>金克木,金生水;<br>木克土,木生火;<br>水克火,水生木;<br>火克金,火生土;<br>土克水,土生金'
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue