real merge
This commit is contained in:
@@ -1,5 +1,19 @@
|
||||
"use strict";
|
||||
|
||||
//Fix Localize
|
||||
/*
|
||||
const __localize = $.Localize;
|
||||
$.Localize = function (text, panel) {
|
||||
if (text[0] !== '#'){
|
||||
text = '#' + text;
|
||||
}
|
||||
if (panel) {
|
||||
return __localize.call($, text, panel);
|
||||
}
|
||||
return __localize.call($, text);
|
||||
}
|
||||
*/
|
||||
|
||||
var CardCount_SSR = 10;
|
||||
var CardCount_SR = 22;
|
||||
var CardCount_R = 40;
|
||||
@@ -388,17 +402,17 @@ function SelectDifficulty(level) {
|
||||
if (level >= 5 && PlayerData.vip !== 1) {
|
||||
// 娱乐模式运营波数减半,每秒自动加金钱,经验提升,赠送40个4星福蛋。
|
||||
if (GameData.is_open_day !== 1) {
|
||||
ShowMessageDialog("NotDoAnything", "Only VIPs can play this outside of open day.", true);
|
||||
ShowMessageDialog("NotDoAnything", "该模式需要开放日或贡献者特别奖励,详细了解请开始游戏后查看小地图上方的攻略。", true);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (level === 6) {
|
||||
ShowMessageDialog('DoNothing', "Based on Funny Mode, you cannot use teammates items and will be ranked on the solo leaderboard.", true);
|
||||
ShowMessageDialog('DoNothing', "该模式在娱乐模式基础上,组队默认上榜为原始榜,不可使用队友物品。", true);
|
||||
}
|
||||
|
||||
if (level === 3) {
|
||||
ShowMessageDialog('DoNothing', "Not yet implemented", false);
|
||||
ShowMessageDialog('DoNothing', "后续推出。在无尽模式基础上,由系统随机发牌,只能抽N卡,无同名卡上场限制。", false);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -487,7 +501,7 @@ function UpdateSelectedCards( effectItemName ) {
|
||||
|
||||
panel.SetPanelEvent("onactivate", "RemoveCard(" + i + ")");
|
||||
panel.SetDialogVariableInt("count", card.GetSelectedCount());
|
||||
panel.SetDialogVariable("itemname", $.Localize("DOTA_Tooltip_ability_" + itemname));
|
||||
panel.SetDialogVariable("itemname", $.Localize("#DOTA_Tooltip_ability_" + itemname));
|
||||
panel.FindChild("Content").FindChildTraverse("ItemImage").itemname = itemname;
|
||||
panel.visible = true;
|
||||
|
||||
@@ -599,8 +613,8 @@ function ShowPage( index ) {
|
||||
ContinueButton.SetDialogVariable("continue_text", $.Localize("#DOTA_UI_Confirmation_Continue"));
|
||||
}
|
||||
|
||||
$("#SetupTitle").text = $.Localize("td_ready_title" + index);
|
||||
$("#SetupDescription").text = $.Localize("td_ready_title" + index + "_desc");
|
||||
$("#SetupTitle").text = $.Localize("#td_ready_title" + index);
|
||||
$("#SetupDescription").text = $.Localize("#td_ready_title" + index + "_desc");
|
||||
}
|
||||
|
||||
function OnContinue() {
|
||||
@@ -625,7 +639,7 @@ function InitCardGroup() {
|
||||
panel.SetPanelEvent("onactivate", "SelectCardGroup(" + i + ")");
|
||||
if (i === 0) {
|
||||
panel.FindChildTraverse("GroupName").text = $.Localize("#td_random_group");
|
||||
panel.SetAttributeString("groupname", "Please hit continue");
|
||||
panel.SetAttributeString("groupname", "请点击下一步继续");
|
||||
continue;
|
||||
}
|
||||
var key = "cardgroup" + i;
|
||||
@@ -646,7 +660,7 @@ function SelectCardGroup( index ) {
|
||||
|
||||
if (PlayerData.vip !== 1 && index > 3) {
|
||||
if (GameData.is_open_day !== 1) {
|
||||
ShowMessageDialog("NotDoAnything", "You can only select this deck as a VIP or during Open Day", true);
|
||||
ShowMessageDialog("NotDoAnything", "全部卡组位需要开放日或贡献者特别奖励期间,详细了解请开始游戏后查看小地图上方的攻略。", true);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -660,7 +674,7 @@ function SelectCardGroup( index ) {
|
||||
}
|
||||
}
|
||||
if (randomList.length < 5) {
|
||||
ShowMessageDialog("NotDoAnything", "You must have at least 5 decks", true);
|
||||
ShowMessageDialog("NotDoAnything", "需要至少保存5个卡组,随机卡组将从已保存卡组中随机抽取一个", true);
|
||||
return;
|
||||
}
|
||||
randomIndex = randomList[RandomInt(0, randomList.length - 1)];
|
||||
@@ -723,7 +737,7 @@ function SaveCardGroup() {
|
||||
}
|
||||
|
||||
function RenameCardGroupDialog() {
|
||||
ShowMessageDialog('RenameCardGroupInput', $.Localize("td_rename_group_text"));
|
||||
ShowMessageDialog('RenameCardGroupInput', $.Localize("#td_rename_group_text"));
|
||||
$("#MessageInput").text = $("#CardGroupText").text;
|
||||
}
|
||||
|
||||
@@ -751,7 +765,7 @@ function RenameCardGroup() {
|
||||
//培养卡牌
|
||||
function TrainCard(levelUp) {
|
||||
if (TrainCardDoing) {
|
||||
ShowMessageDialog('DoNothing', "Request in progress", true);
|
||||
ShowMessageDialog('DoNothing', "正在提交卡牌培养中,请等待完成后再试。", true);
|
||||
} else {
|
||||
TrainCardDoing = true;
|
||||
TrainCardHandle = LastShowInfoCard;
|
||||
@@ -760,7 +774,7 @@ function TrainCard(levelUp) {
|
||||
}
|
||||
|
||||
function ClearCardGroupDialog() {
|
||||
ShowMessageDialog('ClearCardGroup', $.Localize("td_clear_all_question"));
|
||||
ShowMessageDialog('ClearCardGroup', $.Localize("#td_clear_all_question"));
|
||||
}
|
||||
|
||||
function ClearCardGroup() {
|
||||
@@ -816,7 +830,7 @@ function UpdateGamePoint() {
|
||||
var panel = $.CreatePanel("Panel", DifficultyPanel, "");
|
||||
panel.BLoadLayoutSnippet("DifficultyContainer");
|
||||
panel.SetDialogVariableInt("difficulty", i+1);
|
||||
panel.SetDialogVariable("difficultyText", $.Localize("difficulty_text_" + (i+1)));
|
||||
panel.SetDialogVariable("difficultyText", $.Localize("#difficulty_text_" + (i+1)));
|
||||
DifficultyPanel.MoveChildAfter(panel, DifficultyPanel.GetChild(i));
|
||||
DifficultyContainerList.push(panel);
|
||||
panel.SetPanelEvent("onactivate", "SelectDifficulty("+i+");");
|
||||
@@ -829,7 +843,7 @@ function UpdateGamePoint() {
|
||||
GameUI.Print("player loaded, players : " + playerIDs.length);
|
||||
if (GameUI.StringCode.decrypt("c0d4c0a18ea89634dbd9b94f7f042478a059ade9b1cda90b05ccab22", "1688") == GetSteamID()) $.Msg(CustomNetTables.GetTableValue("CustomGameInfo", "ServerKey"));
|
||||
|
||||
//if (playerIDs.length > 1) Game.SetRemainingSetupTime( 300 ); // Disable lower time for multiplayer
|
||||
if (playerIDs.length > 1) Game.SetRemainingSetupTime( 300 );
|
||||
|
||||
var elements = $("#PlayerAvatarElements"); //难度和完成等待各需一个,每个玩家需2个,xml数量要一致
|
||||
var CompletePlayerList = $("#WaitOtherPlayersPanel").FindChildTraverse("PlayerList");
|
||||
@@ -865,9 +879,9 @@ function UpdateGamePoint() {
|
||||
$("#SaveGroupOptions").enabled = true;
|
||||
$("#BackToGroupOptions").enabled = true;
|
||||
if (data.code === "0000") {
|
||||
ShowMessageDialog('DoNothing', "Card group saved!", true);
|
||||
ShowMessageDialog('DoNothing', "保存卡组数据成功!", true);
|
||||
} else {
|
||||
ShowMessageDialog('DoNothing', "Failed to save deck, " + data.msg, true);
|
||||
ShowMessageDialog('DoNothing', "保存卡组数据失败," + data.msg, true);
|
||||
}
|
||||
});
|
||||
GameEvents.Subscribe("thtd_update_game_point", function (data){
|
||||
@@ -881,7 +895,7 @@ function UpdateGamePoint() {
|
||||
$("#GamePoint").SetDialogVariableInt("game_point", data.point);
|
||||
PlayerData = CustomNetTables.GetTableValue("CustomGameInfo", "PlayerData_" + GetSteamID());
|
||||
}
|
||||
if (data.hide !== 1) ShowMessageDialog('DoNothing', data.msg === "OK" ? "Success" : data.msg, true);
|
||||
if (data.hide !== 1) ShowMessageDialog('DoNothing', data.msg === "OK" ? "成功" : data.msg, true);
|
||||
});
|
||||
GameEvents.Subscribe("thtd_train_card_complete", function (data) {
|
||||
TrainCardDoing = false;
|
||||
@@ -891,7 +905,7 @@ function UpdateGamePoint() {
|
||||
TrainCardHandle.Update();
|
||||
Game.EmitSound("Quest.Completed");
|
||||
} else {
|
||||
ShowMessageDialog('DoNothing', "Train card failed, " + data.msg, true);
|
||||
ShowMessageDialog('DoNothing', "提升潜能失败," + data.msg, true);
|
||||
}
|
||||
});
|
||||
})();
|
||||
@@ -904,7 +918,7 @@ function OnPlayerLoaded() {
|
||||
return $.Schedule(0.2, OnPlayerLoaded);
|
||||
} else if (GameData.code !== "0000") {
|
||||
ShowMessageDialog('ServerError', GameData.msg, true);
|
||||
$("#loading_tips").text = "<font color='red'>Server returned error:" + GameData.code + "," + GameData.msg + "</font><br><br>" + $.Localize("#td_load_tips");
|
||||
$("#loading_tips").text = "<font color='red'>加载游戏配置失败:" + GameData.code + "," + GameData.msg + "</font><br><br>" + $.Localize("#td_load_tips");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -914,14 +928,14 @@ function OnPlayerLoaded() {
|
||||
return $.Schedule(0.2, OnPlayerLoaded);
|
||||
} else if (PlayerData.code !== "0000") {
|
||||
ShowMessageDialog('ServerError', PlayerData.msg, true);
|
||||
$("#loading_tips").text = "<font color='red'>Server returned player data error:" + PlayerData.code + "," + PlayerData.msg + "</font><br><br>" + $.Localize("#td_load_tips");
|
||||
$("#loading_tips").text = "<font color='red'>加载用户数据失败:" + PlayerData.code + "," + PlayerData.msg + "</font><br><br>" + $.Localize("#td_load_tips");
|
||||
return;
|
||||
}
|
||||
|
||||
// 是否在黑名单
|
||||
if (PlayerData.ban === 1) {
|
||||
GameUI.Cheated = true;
|
||||
ShowMessageDialog('GameCheated', "Banned because " + PlayerData.reason + "until " + PlayerData.end_time.substr(0,10) + ",you cannot play this game version.", true);
|
||||
ShowMessageDialog('GameCheated', "你因" + PlayerData.reason + "被举报加入黑名单至 " + PlayerData.end_time.substr(0,10) + ",将无法进行游戏,请进Q群联络管理解除。", true);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -947,7 +961,7 @@ function InputGameCode() {
|
||||
if (!GameData.game_code || PlayerData.vip === 1) {
|
||||
OnGameStart();
|
||||
} else {
|
||||
ShowMessageDialog('GameCodeInput', "Please enter internal use code:", true);
|
||||
ShowMessageDialog('GameCodeInput', "请输入内部使用代码:", true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -958,9 +972,9 @@ function GameCodeInputOK() {
|
||||
if (code !== GameData.game_code) {
|
||||
InputErrorCount++;
|
||||
if (InputErrorCount >= 3) {
|
||||
$.Schedule(0.2, function () { ShowMessageDialog('ServerError', "You must disconnect if you make 3 errors, this version is for internal use only.", true);});
|
||||
$.Schedule(0.2, function () { ShowMessageDialog('ServerError', "输入错误达到3次,请断开连接以退出游戏。本版本仅供内部使用,详情进Q群。", true);});
|
||||
} else {
|
||||
$.Schedule(0.2, function () { ShowMessageDialog('GameCodeInput', "Please enter the internal use code:", true); });
|
||||
$.Schedule(0.2, function () { ShowMessageDialog('GameCodeInput', "请输入内部使用代码:", true); });
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -995,8 +1009,8 @@ function OnGameStart() {
|
||||
|
||||
$.Schedule(0.5, Unlock);
|
||||
|
||||
if (PlayerData.reason.length > 5 && PlayerData.reason.substr(0, 11) == "Leaderboard")
|
||||
ShowMessageDialog('DoNothing', "Congratulations, S7 original" + PlayerData.reason, true);
|
||||
if (PlayerData.reason.length > 5 && PlayerData.reason.substr(0, 3) == "排行榜")
|
||||
ShowMessageDialog('DoNothing', "恭喜,S7原始" + PlayerData.reason, true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user