Compare commits
3 Commits
test
...
as3_migrat
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
62858836c1 | ||
|
|
cbb9254432 | ||
|
|
dc4f8e8590 |
86
.gitignore
vendored
Normal file
@@ -0,0 +1,86 @@
|
||||
### Android ###
|
||||
# Built application files
|
||||
*.apk
|
||||
*.ap_
|
||||
|
||||
# Files for the ART/Dalvik VM
|
||||
*.dex
|
||||
|
||||
# Java class files
|
||||
*.class
|
||||
|
||||
# Generated files
|
||||
bin/
|
||||
gen/
|
||||
out/
|
||||
|
||||
# Gradle files
|
||||
.gradle/
|
||||
build/
|
||||
|
||||
# Local configuration file (sdk path, etc)
|
||||
local.properties
|
||||
|
||||
# Proguard folder generated by Eclipse
|
||||
proguard/
|
||||
|
||||
# Log Files
|
||||
*.log
|
||||
|
||||
# Android Studio Navigation editor temp files
|
||||
.navigation/
|
||||
|
||||
# Android Studio captures folder
|
||||
captures/
|
||||
|
||||
# Built application files
|
||||
/*/build/
|
||||
|
||||
# Local configuration file (sdk path, etc)
|
||||
local.properties
|
||||
|
||||
### Gradle ###
|
||||
.gradle
|
||||
/build/
|
||||
|
||||
# Ignore Gradle GUI config
|
||||
gradle-app.setting
|
||||
|
||||
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
|
||||
!gradle-wrapper.jar
|
||||
|
||||
# Cache of project
|
||||
.gradletasknamecache
|
||||
|
||||
# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
|
||||
# gradle/wrapper/gradle-wrapper.properties
|
||||
|
||||
# Signing files
|
||||
.signing/*.keystore
|
||||
!.signing/debug.keystore
|
||||
|
||||
# User-specific configurations
|
||||
.idea/libraries/
|
||||
.idea/workspace.xml
|
||||
.idea/tasks.xml
|
||||
.idea/.name
|
||||
.idea/compiler.xml
|
||||
.idea/copyright/profiles_settings.xml
|
||||
.idea/encodings.xml
|
||||
.idea/misc.xml
|
||||
.idea/modules.xml
|
||||
.idea/scopes/scope_settings.xml
|
||||
.idea/caches/build_file_checksums.ser
|
||||
.idea/caches/gradle_models.ser
|
||||
.idea/vcs.xml
|
||||
.idea/assetWizardSettings.xml
|
||||
*.iml
|
||||
|
||||
# OS-specific files
|
||||
.DS_Store
|
||||
.DS_Store?
|
||||
._*
|
||||
.Spotlight-V100
|
||||
.Trashes
|
||||
ehthumbs.db
|
||||
Thumbs.db
|
||||
14
.idea/assetWizardSettings.xml
generated
Normal file
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="WizardSettings">
|
||||
<option name="children">
|
||||
<map>
|
||||
<entry key="imageWizard">
|
||||
<value>
|
||||
<PersistentState />
|
||||
</value>
|
||||
</entry>
|
||||
</map>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
||||
29
.idea/codeStyles/Project.xml
generated
Normal file
@@ -0,0 +1,29 @@
|
||||
<component name="ProjectCodeStyleConfiguration">
|
||||
<code_scheme name="Project" version="173">
|
||||
<Objective-C-extensions>
|
||||
<file>
|
||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Import" />
|
||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Macro" />
|
||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Typedef" />
|
||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Enum" />
|
||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Constant" />
|
||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Global" />
|
||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Struct" />
|
||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="FunctionPredecl" />
|
||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Function" />
|
||||
</file>
|
||||
<class>
|
||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Property" />
|
||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Synthesize" />
|
||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="InitMethod" />
|
||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="StaticMethod" />
|
||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="InstanceMethod" />
|
||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="DeallocMethod" />
|
||||
</class>
|
||||
<extensions>
|
||||
<pair source="cpp" header="h" fileNamingConvention="NONE" />
|
||||
<pair source="c" header="h" fileNamingConvention="NONE" />
|
||||
</extensions>
|
||||
</Objective-C-extensions>
|
||||
</code_scheme>
|
||||
</component>
|
||||
15
.idea/gradle.xml
generated
Normal file
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="GradleSettings">
|
||||
<option name="linkedExternalProjectsSettings">
|
||||
<GradleProjectSettings>
|
||||
<compositeConfiguration>
|
||||
<compositeBuild compositeDefinitionSource="SCRIPT" />
|
||||
</compositeConfiguration>
|
||||
<option name="distributionType" value="DEFAULT_WRAPPED" />
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||
<option name="resolveModulePerSourceSet" value="false" />
|
||||
</GradleProjectSettings>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
||||
12
.idea/runConfigurations.xml
generated
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="RunConfigurationProducerService">
|
||||
<option name="ignoredProducers">
|
||||
<set>
|
||||
<option value="org.jetbrains.plugins.gradle.execution.test.runner.AllInPackageGradleConfigurationProducer" />
|
||||
<option value="org.jetbrains.plugins.gradle.execution.test.runner.TestClassGradleConfigurationProducer" />
|
||||
<option value="org.jetbrains.plugins.gradle.execution.test.runner.TestMethodGradleConfigurationProducer" />
|
||||
</set>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
||||
BIN
.signing/debug.keystore
Normal file
@@ -1,9 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="src" path="gen"/>
|
||||
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
|
||||
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
|
||||
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
|
||||
<classpathentry kind="output" path="bin/classes"/>
|
||||
</classpath>
|
||||
16
AndorsTrail/.gitignore
vendored
@@ -1,16 +0,0 @@
|
||||
# Android ignores
|
||||
gen/
|
||||
bin/
|
||||
target/
|
||||
local.properties
|
||||
|
||||
#IntelliJ
|
||||
.idea/
|
||||
out/production/
|
||||
out/test/
|
||||
*.iws
|
||||
*.ipr
|
||||
|
||||
# Other
|
||||
.metadata
|
||||
.svn/
|
||||
@@ -1,33 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>AndorsTrail</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>com.android.ide.eclipse.adt.ApkBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>com.android.ide.eclipse.adt.AndroidNature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
@@ -1,36 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="EclipseModuleManager" forced_jdk="true">
|
||||
<conelement value="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK" />
|
||||
<conelement value="com.android.ide.eclipse.adt.LIBRARIES" />
|
||||
<src_description expected_position="1">
|
||||
<src_folder value="file://$MODULE_DIR$/src" expected_position="0" />
|
||||
<src_folder value="file://$MODULE_DIR$/gen" expected_position="1" />
|
||||
</src_description>
|
||||
</component>
|
||||
<component name="FacetManager">
|
||||
<facet type="android" name="Android">
|
||||
<configuration />
|
||||
</facet>
|
||||
</component>
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="false">
|
||||
<output url="file://$MODULE_DIR$/bin/classes" />
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/gen" isTestSource="false" generated="true" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="module-library">
|
||||
<library>
|
||||
<CLASSES>
|
||||
<root url="jar://$MODULE_DIR$/libs/android-support-v4.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
</component>
|
||||
</module>
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
# This file is automatically generated by Android Tools.
|
||||
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
|
||||
#
|
||||
# This file must be checked in Version Control Systems.
|
||||
#
|
||||
# To customize properties used by the Ant build system use,
|
||||
# "ant.properties", and override values to adapt the script to your
|
||||
# project structure.
|
||||
|
||||
# Project target.
|
||||
target=android-28
|
||||
@@ -1,11 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>AndorsTrailEdit</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
@@ -1,448 +0,0 @@
|
||||
function IncludeJavascript(jsFile) {
|
||||
document.write('<script type="text/javascript" src="' + jsFile + '"></scr' + 'ipt>');
|
||||
}
|
||||
|
||||
IncludeJavascript("FieldList.js");
|
||||
IncludeJavascript("DataStore.js");
|
||||
|
||||
var translateFiles = [
|
||||
'strings.xml',
|
||||
'strings_about.xml',
|
||||
'content_actorconditions.xml',
|
||||
'content_conversationlist.xml',
|
||||
'content_droplist.xml',
|
||||
'content_itemlist.xml',
|
||||
'content_itemcategories.xml',
|
||||
'content_monsterlist.xml',
|
||||
'content_questlist.xml'
|
||||
];
|
||||
|
||||
var translations = [
|
||||
{ name: 'French', id: 'values-fr', files: [
|
||||
'content_actorconditions.xml',
|
||||
'content_conversationlist.xml',
|
||||
'content_itemlist.xml',
|
||||
'content_monsterlist.xml',
|
||||
'content_questlist.xml',
|
||||
'strings.xml'
|
||||
]},
|
||||
{ name: 'Italian', id: 'values-it', files: [
|
||||
'content_actorconditions.xml',
|
||||
'content_conversationlist.xml',
|
||||
'content_itemlist.xml',
|
||||
'content_questlist.xml',
|
||||
'strings.xml'
|
||||
]},
|
||||
{ name: 'German', id: 'values-de', files: [
|
||||
'content_actorconditions.xml',
|
||||
'content_conversationlist.xml',
|
||||
'content_itemlist.xml',
|
||||
'content_itemcategories.xml',
|
||||
'content_monsterlist.xml',
|
||||
'content_questlist.xml',
|
||||
'strings_about.xml',
|
||||
'strings.xml'
|
||||
]},
|
||||
{ name: 'Hebrew', id: 'values-iw', files: [
|
||||
'strings.xml'
|
||||
]},
|
||||
{ name: 'Russian', id: 'values-ru', files: [
|
||||
'content_actorconditions.xml',
|
||||
'content_conversationlist.xml',
|
||||
'content_itemlist.xml',
|
||||
'content_monsterlist.xml',
|
||||
'content_questlist.xml',
|
||||
'strings.xml'
|
||||
]},
|
||||
{ name: 'Portugese', id: 'values-pt', files: [
|
||||
'content_actorconditions.xml',
|
||||
'content_monsterlist.xml',
|
||||
'strings.xml'
|
||||
]},
|
||||
{ name: 'Japanese', id: 'values-ja', files: [
|
||||
'content_conversationlist.xml',
|
||||
'strings.xml'
|
||||
]},
|
||||
{ name: 'Brazilian Portugese', id: 'values-pt-rBR', files: [
|
||||
'content_actorconditions.xml',
|
||||
'content_conversationlist.xml',
|
||||
'content_itemlist.xml',
|
||||
'content_monsterlist.xml',
|
||||
'content_questlist.xml',
|
||||
'strings.xml'
|
||||
]}
|
||||
];
|
||||
|
||||
function stepRight(divToHide, divToShow, onComplete) {
|
||||
$(divToHide).hide('slow');
|
||||
$(divToShow).fadeIn('slow', onComplete);
|
||||
}
|
||||
function stepLeft(divToHide, divToShow) {
|
||||
$(divToHide).fadeOut('slow');
|
||||
$(divToShow).show('slow');
|
||||
}
|
||||
|
||||
function loadResourceFile(filename, onSuccess) {
|
||||
var url = document.location.href;
|
||||
url = url.substring(0, url.lastIndexOf('/'));
|
||||
url = url.substring(0, url.lastIndexOf('/'));
|
||||
url += "/AndorsTrail/res/" + filename;
|
||||
//var url = "http://andors-trail.googlecode.com/git/AndorsTrail/res/" + filename;
|
||||
$.get(url, function(data) {
|
||||
onSuccess(data);
|
||||
}, 'text');
|
||||
}
|
||||
|
||||
function addSelectOption(sel, val, text) {
|
||||
if (!text) { text = val; }
|
||||
sel.append($("<option/>").attr("value", val).text(text));
|
||||
}
|
||||
|
||||
function addSelectOptions(sel, array) {
|
||||
array.forEach(function(obj) { addSelectOption( sel , obj); } );
|
||||
}
|
||||
|
||||
function loadStep2() {
|
||||
var possibleExistingFiles = [];
|
||||
var selectedSourceFile = $("#englishFiles").val();
|
||||
translations.forEach(function(t) {
|
||||
if ($.inArray(selectedSourceFile, t.files) > -1) {
|
||||
possibleExistingFiles.push(t.id + "/" + selectedSourceFile);
|
||||
}
|
||||
});
|
||||
$("#compareToExisting").empty();
|
||||
addSelectOptions( $("#compareToExisting"), possibleExistingFiles );
|
||||
stepRight("#validate1", "#validate2");
|
||||
}
|
||||
|
||||
function pushMessage(res, msg) {
|
||||
res.class2 = "yellow";
|
||||
res.messages.push(msg);
|
||||
return res;
|
||||
}
|
||||
|
||||
function isTranslatableField(fieldName) {
|
||||
return fieldName == "name" || fieldName == "logText" || fieldName == "message" || fieldName == "text";
|
||||
}
|
||||
|
||||
function compareAndorsTrailResourceHeader(result, id, header1, header2) {
|
||||
if (header1.length != header2.length) {
|
||||
pushMessage(result, "Row \"" + id + "\" was expected to contain " + f1.length + " sub-entries, but only " + f2.length + " was found.");
|
||||
return;
|
||||
}
|
||||
for (var i = 0; i < header1._fields.length; ++i) {
|
||||
var f1 = header1._fields[i];
|
||||
var fieldName1 = header1.getFieldName(i);
|
||||
var f2 = header2._fields[i];
|
||||
var fieldName2 = header2.getFieldName(i);
|
||||
if (fieldName1 != fieldName2) {
|
||||
pushMessage(result, "Row \"" + id + "\", field \"" + fieldName + "\" was expected to contain \"" + f1 + "\", but \"" + f2 + "\" was found.");
|
||||
}
|
||||
var fieldName2 = header2.getFieldName(i);
|
||||
if (f1 instanceof FieldList) {
|
||||
compareAndorsTrailResourceHeader(result, id+":"+fieldName1, f1, f2);
|
||||
}
|
||||
}
|
||||
}
|
||||
function extractTranslatableFields_(id, result, fieldList, prefix, obj) {
|
||||
if (!result) {
|
||||
result = {};
|
||||
result.id = id;
|
||||
result.fields = [];
|
||||
}
|
||||
if (!prefix) {
|
||||
prefix = "";
|
||||
}
|
||||
for (var i = 0; i < fieldList._fields.length; ++i) {
|
||||
var f = fieldList._fields[i];
|
||||
if (f instanceof FieldList) {
|
||||
// f is subfieldlist
|
||||
$.each(obj[f._name], function(j, elem) {
|
||||
extractTranslatableFields_(id, result, f, prefix+f._name+"["+j+"].", elem);
|
||||
});
|
||||
} else {
|
||||
// f is field name
|
||||
if (isTranslatableField(f)) {
|
||||
result.fields.push({
|
||||
"name":prefix+f,
|
||||
"value":obj[f]
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
function extractTranslatableFields(id, fieldList, obj) {
|
||||
return extractTranslatableFields_(id, undefined, fieldList, "", obj);
|
||||
}
|
||||
|
||||
function compareAndorsTrailResourceRow(result, fieldList, id, obj1, obj2) {
|
||||
// Assume the headers of both objects are correctly matched
|
||||
trans1 = extractTranslatableFields(id, fieldList, obj1);
|
||||
trans2 = extractTranslatableFields(id, fieldList, obj2);
|
||||
$.each(trans1.fields, function(i, f1) {
|
||||
f2 = trans2.fields[i];
|
||||
if (f1.name != f2.name) {
|
||||
pushMessage(result, "Row \"" + id + "\", field \"" + f1.name + "\" does not match in translated data field\"" + f2.name + "\".");
|
||||
}
|
||||
if (f1.value.length > 1) {
|
||||
if (f1.value == f2.value) {
|
||||
pushMessage(result, "Row \"" + id + "\", field \"" + f1.name + "\" does not seem to be translated. Both texts are \"" + f1.value + "\".");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function compareAndorsTrailResourceFormat(text1, text2) {
|
||||
var result = {
|
||||
isResource: true,
|
||||
class1: "ok",
|
||||
class2: "ok",
|
||||
messages: [],
|
||||
header: undefined,
|
||||
ds_english: undefined,
|
||||
ds_translated: undefined
|
||||
};
|
||||
|
||||
var header1 = findHeader(text1);
|
||||
if (!header1) { return { isResource: false }; }
|
||||
result.header = header1;
|
||||
|
||||
var header2 = findHeader(text2);
|
||||
if (!header2) { result.class2 = "red"; return result; }
|
||||
|
||||
compareAndorsTrailResourceHeader(result, "", header1, header2);
|
||||
if (result.class2 != "ok") { return result; }
|
||||
|
||||
var ds1 = new DataStore({});
|
||||
var ds2 = new DataStore({});
|
||||
ds1.deserialize(text1);
|
||||
ds2.deserialize(text2);
|
||||
$.each(ds1.items, function(i, obj) {
|
||||
var obj1 = obj;
|
||||
var obj2 = ds2.get(i);
|
||||
var id1 = obj1[header1._fields[0]];
|
||||
if (!obj2) { return pushMessage(result, "Row " + i + ": expected to find an object with id \"" + id1 + "\", but such row was not found."); }
|
||||
var id2 = obj2[header1._fields[0]];
|
||||
if (id2 != id1) { return pushMessage(result, "Row " + i + ": Expected to find id \"" + id1 + "\", but found \"" + id2 + "\" instead."); }
|
||||
|
||||
compareAndorsTrailResourceRow(result, header1, id1, obj1, obj2);
|
||||
});
|
||||
|
||||
result.ds_english = ds1;
|
||||
result.ds_translated = ds2;
|
||||
return result;
|
||||
}
|
||||
|
||||
function applyChangeToObject(trans_obj, fieldName, newValue) {
|
||||
(new Function("x", "v", "x."+fieldName+" = v;"))(trans_obj, newValue);
|
||||
}
|
||||
|
||||
function appendEditRow(editTable, updateHook, trans_obj, id, fieldName, english_text, translated_text) {
|
||||
if (english_text.length <= 1) {
|
||||
// there's no meaningful text
|
||||
return;
|
||||
}
|
||||
var row_id = name+"__row";
|
||||
var cell_id = name+"__cell";
|
||||
var edit_id = name+"__edit";
|
||||
var cell = $("<span />").text(translated_text)
|
||||
.attr("id", cell_id)
|
||||
.attr("class", "clickToEdit");
|
||||
var editor = $("<textarea />").val(translated_text)
|
||||
.attr("id", cell_id)
|
||||
.hide();
|
||||
cell.click(function() {
|
||||
editor.val(cell.text());
|
||||
editor.show().focus();
|
||||
cell.hide();
|
||||
});
|
||||
editor.blur(function() {
|
||||
var new_text = editor.val();
|
||||
cell.text(new_text);
|
||||
editor.hide(); cell.show();
|
||||
applyChangeToObject(trans_obj, fieldName, new_text);
|
||||
updateHook();
|
||||
});
|
||||
editTable.append(
|
||||
$("<tr />")
|
||||
.attr("id", name+"__row")
|
||||
.append($("<td />").text(id))
|
||||
.append($("<td />").text(fieldName))
|
||||
.append($("<td />").text(english_text))
|
||||
.append($("<td />").append(cell).append(editor))
|
||||
);
|
||||
}
|
||||
|
||||
function clearEditTable() {
|
||||
var editTable = $("#editTranslation tbody");
|
||||
editTable.children().remove();
|
||||
$("#export_text").val("");
|
||||
}
|
||||
|
||||
function editTranslationHandler(data2, name, resourceComparison) {
|
||||
var updateHook = function () {
|
||||
var header = resourceComparison.header;
|
||||
var ds2 = resourceComparison.ds_translated;
|
||||
var text2 = ds2.serialize();
|
||||
data2.find("string[name=\"" + name + "\"]").text(text2);
|
||||
};
|
||||
return function () {
|
||||
clearEditTable();
|
||||
var editTable = $("#editTranslation tbody");
|
||||
var header = resourceComparison.header;
|
||||
var ds1 = resourceComparison.ds_english;
|
||||
var ds2 = resourceComparison.ds_translated;
|
||||
$.each(ds1.items, function(i, obj1) {
|
||||
var obj2 = ds2.get(i);
|
||||
var id = obj1["id"];
|
||||
var english_list = extractTranslatableFields(id, header, obj1);
|
||||
var translated_list = extractTranslatableFields(id, header, obj2);
|
||||
|
||||
$.each(english_list.fields, function(j, f1) {
|
||||
var f2 = translated_list.fields[j];
|
||||
appendEditRow(
|
||||
editTable, updateHook, obj2, id,
|
||||
f1.name, f1.value, f2.value
|
||||
);
|
||||
});
|
||||
});
|
||||
};
|
||||
}
|
||||
function initTranslationHandler(data1, data2, name) {
|
||||
var f = function() {
|
||||
if (!confirm("Create new translation unit in this resouce?")) {
|
||||
// if canceled
|
||||
return;
|
||||
}
|
||||
clearEditTable();
|
||||
// create new node in resource xml by copying english ver.
|
||||
var node1 = data1.find("string[name=\"" + name + "\"]");
|
||||
var text1 = node1.text();
|
||||
data2.find("resources").append($("<string name=\""+name+"\" />").text(text1));
|
||||
var resourceComparison = compareAndorsTrailResourceFormat(text1, text1);
|
||||
// repalce this handler with "edit" event handler (and etc.)
|
||||
var editHandler = editTranslationHandler(data2, name, resourceComparison);
|
||||
$(this).parent().attr("class","yellow");
|
||||
$(this).text("Edit").unbind('click', f).click(editHandler);
|
||||
$(this).click();
|
||||
}
|
||||
return f;
|
||||
}
|
||||
function exportHandler(data2) {
|
||||
var xmlString = function (data) {
|
||||
var xml = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n\n";
|
||||
xml += "<resources>\n";
|
||||
$.each(data.find("string"), function() {
|
||||
xml += "\t<string name=\""+$(this).attr("name")+"\">\n";
|
||||
xml += $(this).text();
|
||||
xml += "\n\t</string>\n\n";
|
||||
});
|
||||
xml += "</resources>\n";
|
||||
return xml;
|
||||
}
|
||||
return function () {
|
||||
$("#export_text").val(xmlString(data2));
|
||||
};
|
||||
}
|
||||
|
||||
function appendOutputRow(outputTable, name, data1, data2) {
|
||||
if ($("#" + name, outputTable).size() > 0) return;
|
||||
|
||||
var text1 = data1.find("string[name=\"" + name + "\"]").text();
|
||||
var text2 = data2.find("string[name=\"" + name + "\"]").text();
|
||||
var class2 = text2 ? "ok" : "red";
|
||||
var tdTranslated = $("<td />");
|
||||
if (text1) {
|
||||
if (text2) {
|
||||
var resourceComparison = compareAndorsTrailResourceFormat(text1, text2);
|
||||
if (resourceComparison.isResource) {
|
||||
class2 = resourceComparison.class2;
|
||||
if (resourceComparison.messages.length > 0 || class2 == "ok") {
|
||||
// yellow || ok
|
||||
var d = $("<span />").text("Edit");
|
||||
d.click(editTranslationHandler(data2, name, resourceComparison));
|
||||
tdTranslated.append(d);
|
||||
}
|
||||
}
|
||||
} else /* if (class2 == "red") */ {
|
||||
var d = $("<span />").text("Init");
|
||||
d.click(initTranslationHandler(data1, data2, name));
|
||||
tdTranslated.append(d);
|
||||
}
|
||||
}
|
||||
|
||||
outputTable.append(
|
||||
$("<tr />")
|
||||
.attr("id", name)
|
||||
.append($("<td />").text(name))
|
||||
.append(tdTranslated.attr("class", class2))
|
||||
);
|
||||
}
|
||||
|
||||
function validateTranslation_(englishData) {
|
||||
$("#englishData").text(englishData);
|
||||
var compareData1 = $( $.parseXML(englishData) );
|
||||
var compareData2 = $( $.parseXML($("#compareToInput").val()) );
|
||||
|
||||
var resultTable = $("#validateResultContent #result");
|
||||
var outputTable = $("tbody", resultTable );
|
||||
outputTable.empty();
|
||||
|
||||
compareData1.find("string").each(function() {
|
||||
appendOutputRow(outputTable, $(this).attr("name"), compareData1, compareData2);
|
||||
});
|
||||
compareData2.find("string").each(function() {
|
||||
appendOutputRow(outputTable, $(this).attr("name"), compareData1, compareData2);
|
||||
});
|
||||
|
||||
var sectionCount = $("tr", outputTable).size();
|
||||
var errors1 = sectionCount - $("td:nth-child(2).ok", outputTable).size();
|
||||
$("th #count2", resultTable).text( (errors1 > 0) ? " (" + errors1 + ")" : "" );
|
||||
|
||||
$("#export").click(exportHandler(compareData2));
|
||||
|
||||
$("#validateResultContent #loading").hide();
|
||||
$("#validateResultContent #result").show();
|
||||
}
|
||||
function validateTranslation(englishData) {
|
||||
try {
|
||||
validateTranslation_(englishData);
|
||||
} catch (err) {
|
||||
alert(err);
|
||||
}
|
||||
}
|
||||
|
||||
function loadStep3() {
|
||||
var compareToContent = $("#compareToInput").val();
|
||||
if (compareToContent.length <= 0) {
|
||||
alert("You must enter (or import) some translated content to compare.");
|
||||
return;
|
||||
}
|
||||
|
||||
$("#validateResultContent #loading").show();
|
||||
$("#validateResultContent #result").hide();
|
||||
stepRight("#validate2", "#validateResult", function() {
|
||||
loadResourceFile( "values/" + $("#englishFiles").val() , validateTranslation )
|
||||
});
|
||||
}
|
||||
|
||||
function startTranslationValidator() {
|
||||
addSelectOptions( $("#englishFiles"), translateFiles );
|
||||
|
||||
$("#next1").button({ icons: {primary:'ui-icon-arrowthick-1-e'} }).click(loadStep2);
|
||||
$("#prev2").button({ icons: {primary:'ui-icon-arrowthick-1-w'} }).click(function() { stepLeft("#validate2", "#validate1"); });
|
||||
$("#btnImportFromSVN").button().click(function() {
|
||||
$("#compareToInput").val("Loading...");
|
||||
loadResourceFile( $("#compareToExisting").val(), function(data) { $("#compareToInput").val(data); } );
|
||||
});
|
||||
$("#next2").button({ icons: {primary:'ui-icon-arrowthick-1-e'} }).click(loadStep3);
|
||||
$("#prev3").button({ icons: {primary:'ui-icon-arrowthick-1-w'} }).click(function() {
|
||||
if (confirm("Leaving the result page will discard any modifications on current resource. Leave anyway?")) {
|
||||
stepLeft("#validateResult", "#validate2");
|
||||
clearEditTable();
|
||||
}
|
||||
});
|
||||
$("#export").button({ icons: {primary:'ui-icon-arrowthick-1-e'} })
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 769 B |
@@ -1,136 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" ng-app="ateditor">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<link rel="shortcut icon" href="http://andorstrail.com/favicon.ico"/>
|
||||
<link rel="stylesheet" href="lib/bootstrap/css/bootstrap.min.css" />
|
||||
<link rel="stylesheet" href="lib/hint.min.css" />
|
||||
<link rel="stylesheet" href="styles.css" />
|
||||
<title>Andor's Trail Content Editor</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="screen">
|
||||
<div id="top">
|
||||
<div class="andorsTrailLogo" id="title">
|
||||
Andor's Trail Content Editor
|
||||
<span id="version">
|
||||
v0.7.2dev
|
||||
</span>
|
||||
</div>
|
||||
<div id="buttons">
|
||||
<a href="#import" class="btn"><i class="icon-upload"></i> Import</a>
|
||||
<a href="#export" class="btn"><i class="icon-download"></i> Export</a>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
|
||||
<div id="left" class="workarea">
|
||||
<div id="tools" ng-controller="ATEditor.controllers.NavigationController" ng-init="$('.collapse').collapse()">
|
||||
<div class="accordion" id="accordion-nav">
|
||||
<div class="accordion-group" ng-show="previousItems.length > 0">
|
||||
<div class="accordion-heading">
|
||||
<a class="accordion-toggle" data-toggle="collapse" href="#collapse-nav-previous">Recently opened</a>
|
||||
</div>
|
||||
<div id="collapse-nav-previous" class="accordion-body collapse">
|
||||
<div class="accordion-inner">
|
||||
<ul class="itemlist">
|
||||
<li ng-repeat="p in previousItems" ng-click="editObj(p.section, p.obj)" fadey>
|
||||
<img ng-tile-image="p.obj.iconID" ng-tile-image-scale="0.7" ng-show="p.section.hasIcon()" />
|
||||
{{getName(p.section, p.obj)}}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="accordion-group" ng-repeat="section in sections">
|
||||
<div class="accordion-heading">
|
||||
<a class="accordion-toggle" data-toggle="collapse" ng-href="#collapse-nav-{{section.id}}">
|
||||
{{section.name}}
|
||||
</a>
|
||||
</div>
|
||||
<div id="collapse-nav-{{section.id}}" class="accordion-body collapse">
|
||||
<div class="accordion-inner">
|
||||
<div class="tools-buttons">
|
||||
<button ng-click="addObj(section)" class="btn"><i class="icon-plus-sign"></i> Add</button>
|
||||
<button ng-click="editAsTable(section)" class="btn" ng-show="supportsTableEdit(section)"><i class="icon-list"></i> Table</button>
|
||||
<button ng-click="clear(section)" class="btn"><i class="icon-trash"></i> Clear</button>
|
||||
</div>
|
||||
<ul class="itemlist" ui:sortable ng:model="section.items">
|
||||
<li ng-repeat="obj in section.items" ng-click="editObj(section, obj)" fadey>
|
||||
<div style="float: left;">
|
||||
<img ng-tile-image="obj.iconID" ng-tile-image-scale="0.7" ng-show="section.hasIcon()" />
|
||||
{{getName(section, obj)}}
|
||||
</div>
|
||||
<div style="float: right;">
|
||||
<a ng-click="dupObj(section, obj)" class="btn btn-mini" title="Duplicate"><i class="icon-plus"></i></a>
|
||||
<a ng-click="delObj(section, obj)" class="btn btn-mini" title="Remove"><i class="icon-trash"></i></a>
|
||||
</div>
|
||||
<div style="clear: both;"> </div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<form class="form-inline">
|
||||
<div id="center" class="workarea" ng-view></div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div id="selectIconModal" class="modal hide fade" role="dialog" tabindex="-1" ng-controller="ATEditor.controllers.SelectIconController">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h3>Select icon</h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div ng-repeat="section in sections">
|
||||
<div ng-show="section.id == selectedSection">
|
||||
<div ng-repeat="imageID in section.imageIDs" ng-tile-image="imageID" ng-click="imageSelected(imageID)" class="at-input-icon"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="btn" data-dismiss="modal">Cancel</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script src="lib/jquery.min.js"></script>
|
||||
<script src="lib/jquery-ui.min.js"></script>
|
||||
<script src="lib/underscore-min.js"></script>
|
||||
<script src="lib/angular.min.js"></script>
|
||||
<script src="lib/ng-sortable.js"></script>
|
||||
<script src="lib/bootstrap/js/bootstrap.min.js"></script>
|
||||
<script src="js/utils.js"></script>
|
||||
<script src="js/settings.js"></script>
|
||||
<script src="js/tilesets.js"></script>
|
||||
<script src="js/fieldlist.js"></script>
|
||||
<script src="js/datastore.js"></script>
|
||||
<script src="js/defaults.js"></script>
|
||||
<script src="js/importexport.js"></script>
|
||||
<script src="js/model.js"></script>
|
||||
<script src="js/exampledata.js"></script>
|
||||
<script src="js/modelfunctions.js"></script>
|
||||
<script src="js/controllers/navigation.js"></script>
|
||||
<script src="js/controllers/actorcondition.js"></script>
|
||||
<script src="js/controllers/quest.js"></script>
|
||||
<script src="js/controllers/item.js"></script>
|
||||
<script src="js/controllers/droplist.js"></script>
|
||||
<script src="js/controllers/dialogue.js"></script>
|
||||
<script src="js/controllers/dialoguetree.js"></script>
|
||||
<script src="js/controllers/monster.js"></script>
|
||||
<script src="js/controllers/itemcategory.js"></script>
|
||||
<script src="js/controllers/import.js"></script>
|
||||
<script src="js/controllers/export.js"></script>
|
||||
<script src="js/controllers/selecticon.js"></script>
|
||||
<script src="js/app.js"></script>
|
||||
<script src="js/directives.js"></script>
|
||||
<script src="js/legacyimport.js"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
Before Width: | Height: | Size: 863 B |
|
Before Width: | Height: | Size: 1.1 KiB |
@@ -1,25 +0,0 @@
|
||||
var ATEditor = (function(ATEditor, controllers) {
|
||||
|
||||
var htmldir = 'partials/';
|
||||
|
||||
ATEditor.app = angular
|
||||
.module('ateditor', ['ui.sortable'])
|
||||
.config(['$routeProvider', function($routeProvider) {
|
||||
$routeProvider
|
||||
.when('/actorcondition/edit/:id', {templateUrl: htmldir+'edit_actorcondition.html', controller: controllers.ActorConditionController})
|
||||
.when('/quest/edit/:id', {templateUrl: htmldir+'edit_quest.html', controller: controllers.QuestController})
|
||||
.when('/item/edit/:id', {templateUrl: htmldir+'edit_item.html', controller: controllers.ItemController})
|
||||
.when('/item/table', {templateUrl: htmldir+'table_item.html', controller: controllers.ItemTableController})
|
||||
.when('/droplist/edit/:id', {templateUrl: htmldir+'edit_droplist.html', controller: controllers.DropListController})
|
||||
.when('/dialogue/edit/:id', {templateUrl: htmldir+'edit_dialogue.html', controller: controllers.DialogueController})
|
||||
.when('/dialogue/tree/:id', {templateUrl: htmldir+'tree_dialogue.html', controller: controllers.DialogueShowTreeController})
|
||||
.when('/monster/edit/:id', {templateUrl: htmldir+'edit_monster.html', controller: controllers.MonsterController})
|
||||
.when('/monster/table', {templateUrl: htmldir+'table_monster.html', controller: controllers.MonsterTableController})
|
||||
.when('/itemcategory/edit/:id', {templateUrl: htmldir+'edit_itemcategory.html', controller: controllers.ItemCategoryController})
|
||||
.when('/import', {templateUrl: htmldir+'import.html', controller: controllers.ImportController})
|
||||
.when('/export', {templateUrl: htmldir+'export.html', controller: controllers.ExportController})
|
||||
.when('/start', {templateUrl: htmldir+'start.html'})
|
||||
.otherwise({redirectTo: '/start'});
|
||||
}]);
|
||||
return ATEditor;
|
||||
})(ATEditor, ATEditor.controllers);
|
||||
@@ -1,14 +0,0 @@
|
||||
var ATEditor = (function(ATEditor, model) {
|
||||
|
||||
function ActorConditionController($scope, $routeParams) {
|
||||
$scope.datasource = model.actorConditions;
|
||||
$scope.obj = $scope.datasource.findById($routeParams.id);
|
||||
$scope.previous = ATEditor.navigationFunctions.editByIndexOffset($scope.datasource, $scope.obj, -1);
|
||||
$scope.next = ATEditor.navigationFunctions.editByIndexOffset($scope.datasource, $scope.obj, 1);
|
||||
};
|
||||
|
||||
ATEditor.controllers = ATEditor.controllers || {};
|
||||
ATEditor.controllers.ActorConditionController = ActorConditionController;
|
||||
|
||||
return ATEditor;
|
||||
})(ATEditor, ATEditor.model);
|
||||
@@ -1,66 +0,0 @@
|
||||
var ATEditor = (function(ATEditor, model, defaults, importExport) {
|
||||
|
||||
function DialogueController($scope, $routeParams) {
|
||||
$scope.datasource = model.dialogue;
|
||||
$scope.rootPhrase = $scope.datasource.findById($routeParams.id);
|
||||
$scope.phrase = $scope.rootPhrase;
|
||||
$scope.reply = null;
|
||||
|
||||
$scope.removeReward = function(phrase, reward) {
|
||||
var idx = phrase.rewards.indexOf(reward);
|
||||
phrase.rewards.splice(idx, 1);
|
||||
};
|
||||
$scope.addReward = function(phrase) {
|
||||
phrase.rewards.push({});
|
||||
};
|
||||
$scope.removeRequirement = function(reply, requirement) {
|
||||
var idx = reply.requires.indexOf(requirement);
|
||||
reply.requires.splice(idx, 1);
|
||||
};
|
||||
$scope.addRequirement = function(reply) {
|
||||
reply.requires.push({});
|
||||
};
|
||||
$scope.proceedToPhrase = function(obj, prop) {
|
||||
var phraseId = obj[prop];
|
||||
if (phraseId) {
|
||||
var nextPhrase = model.dialogue.findById(phraseId);
|
||||
if (nextPhrase) {
|
||||
ATEditor.navigationFunctions.editObjId(model.dialogue, phraseId);
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
phraseId = $scope.phrase.id;
|
||||
}
|
||||
var newPhrase = model.dialogue.addNew(phraseId);
|
||||
importExport.prepareObjectsForEditor(model.dialogue, [ newPhrase ]);
|
||||
newPhrase.hasOnlyNextReply = true;
|
||||
|
||||
phraseId = newPhrase.id;
|
||||
obj[prop] = phraseId;
|
||||
|
||||
ATEditor.navigationFunctions.editObjId(model.dialogue, phraseId);
|
||||
};
|
||||
$scope.selectReply = function(reply) {
|
||||
$scope.reply = reply;
|
||||
};
|
||||
$scope.removeReply = function(phrase, reply) {
|
||||
var idx = phrase.replies.indexOf(reply);
|
||||
phrase.replies.splice(idx, 1);
|
||||
if ($scope.reply === reply) { $scope.reply = null; }
|
||||
};
|
||||
$scope.addReply = function(phrase) {
|
||||
var reply = {};
|
||||
defaults.addDefaults('reply', reply);
|
||||
phrase.replies.push(reply);
|
||||
$scope.reply = reply;
|
||||
};
|
||||
$scope.showPhraseTree = function(phrase) {
|
||||
window.location = "#/" + model.dialogue.id + "/tree/" + phrase.id;
|
||||
};
|
||||
};
|
||||
|
||||
ATEditor.controllers = ATEditor.controllers || {};
|
||||
ATEditor.controllers.DialogueController = DialogueController;
|
||||
|
||||
return ATEditor;
|
||||
})(ATEditor, ATEditor.model, ATEditor.defaults, ATEditor.importExport);
|
||||
@@ -1,61 +0,0 @@
|
||||
var ATEditor = (function(ATEditor, model, _) {
|
||||
|
||||
function DialogueShowTreeController($scope, $routeParams) {
|
||||
$scope.datasource = model.dialogue;
|
||||
$scope.rootPhrase = $scope.datasource.findById($routeParams.id);
|
||||
$scope.onclick = function(node) {
|
||||
ATEditor.navigationFunctions.editObjId(model.dialogue, node.id);
|
||||
};
|
||||
|
||||
function buildSingleTreeNode(type, id, text, children) {
|
||||
return {
|
||||
id: id || ""
|
||||
,text: text || ""
|
||||
,type: type
|
||||
,children: children || []
|
||||
};
|
||||
}
|
||||
|
||||
function singleChild(n) { return n ? [n] : []; }
|
||||
|
||||
function buildPhraseTree(phrase, visitedPhrases) {
|
||||
if (!phrase) { return; }
|
||||
if (visitedPhrases[phrase.id]) {
|
||||
return buildSingleTreeNode("loop", phrase.id, phrase.message);
|
||||
}
|
||||
visitedPhrases[phrase.id] = true;
|
||||
|
||||
var children;
|
||||
if (phrase.hasOnlyNextReply) {
|
||||
var nextNode = model.dialogue.findById(phrase.nextPhraseID);
|
||||
children = singleChild(buildPhraseTree(nextNode, visitedPhrases));
|
||||
} else {
|
||||
children = _.map(phrase.replies, function(reply) {
|
||||
var replyChild;
|
||||
if (reply.nextPhraseID.length == 1) {
|
||||
replyChild = buildSingleTreeNode("action");
|
||||
} else {
|
||||
var nextNode = model.dialogue.findById(reply.nextPhraseID);
|
||||
replyChild = buildPhraseTree(nextNode, visitedPhrases);
|
||||
}
|
||||
|
||||
if (!reply.text) {
|
||||
return replyChild || buildSingleTreeNode("reply", phrase.id, "(no text)");
|
||||
}
|
||||
|
||||
return buildSingleTreeNode("reply", phrase.id, reply.text, singleChild(replyChild));
|
||||
});
|
||||
}
|
||||
|
||||
var phraseText = phrase.message || "(conditional evaluation)";
|
||||
return buildSingleTreeNode("phrase", phrase.id, phraseText, children);
|
||||
}
|
||||
|
||||
$scope.node = buildPhraseTree($scope.rootPhrase, {});
|
||||
};
|
||||
|
||||
ATEditor.controllers = ATEditor.controllers || {};
|
||||
ATEditor.controllers.DialogueShowTreeController = DialogueShowTreeController;
|
||||
|
||||
return ATEditor;
|
||||
})(ATEditor, ATEditor.model, _);
|
||||
@@ -1,19 +0,0 @@
|
||||
var ATEditor = (function(ATEditor, model) {
|
||||
|
||||
function DropListController($scope, $routeParams) {
|
||||
$scope.datasource = model.droplists;
|
||||
$scope.obj = $scope.datasource.findById($routeParams.id);
|
||||
$scope.addDropItem = function() {
|
||||
$scope.obj.items.push({quantity: {}});
|
||||
};
|
||||
$scope.removeDropItem = function(dropItem) {
|
||||
var idx = $scope.obj.items.indexOf(dropItem);
|
||||
$scope.obj.items.splice(idx, 1);
|
||||
};
|
||||
};
|
||||
|
||||
ATEditor.controllers = ATEditor.controllers || {};
|
||||
ATEditor.controllers.DropListController = DropListController;
|
||||
|
||||
return ATEditor;
|
||||
})(ATEditor, ATEditor.model);
|
||||
@@ -1,17 +0,0 @@
|
||||
var ATEditor = (function(ATEditor, model, importExport) {
|
||||
|
||||
function ExportController($scope) {
|
||||
$scope.sections = model.sections;
|
||||
$scope.content = "";
|
||||
$scope.selectedSection = $scope.selectedSection || model.items;
|
||||
$scope.exportData = function() {
|
||||
$scope.content = importExport.exportData($scope.selectedSection);
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
ATEditor.controllers = ATEditor.controllers || {};
|
||||
ATEditor.controllers.ExportController = ExportController;
|
||||
|
||||
return ATEditor;
|
||||
})(ATEditor, ATEditor.model, ATEditor.importExport);
|
||||
@@ -1,41 +0,0 @@
|
||||
var ATEditor = (function(ATEditor, model, importExport, exampleData) {
|
||||
|
||||
function ImportController($scope) {
|
||||
$scope.sections = model.sections;
|
||||
$scope.content = "";
|
||||
$scope.selectedSection = $scope.selectedSection || model.items;
|
||||
$scope.importType = $scope.importType || 'paste';
|
||||
$scope.availableFiles = exampleData.resources;
|
||||
|
||||
var countBefore = 0;
|
||||
function success() {
|
||||
var section = $scope.selectedSection;
|
||||
var countAfter = section.items.length;
|
||||
$scope.importedMsg = "Imported " + (countAfter - countBefore) + " " + section.name;
|
||||
}
|
||||
function error(msg) {
|
||||
$scope.errorMsg = "Error importing data: " + msg;
|
||||
}
|
||||
$scope.importPastedData = function() {
|
||||
$scope.errorMsg = "";
|
||||
$scope.importedMsg = "";
|
||||
var section = $scope.selectedSection;
|
||||
countBefore = section.items.length;
|
||||
importExport.importText(section, $scope.content, success, error);
|
||||
};
|
||||
$scope.importExistingData = function() {
|
||||
$scope.errorMsg = "";
|
||||
$scope.importedMsg = "";
|
||||
var section = $scope.selectedSection;
|
||||
countBefore = section.items.length;
|
||||
exampleData.loadUrlFromGit("AndorsTrail/res/raw/" + $scope.selectedFile, function(data) {
|
||||
importExport.importDataObjects(section, data, success, error);
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
ATEditor.controllers = ATEditor.controllers || {};
|
||||
ATEditor.controllers.ImportController = ImportController;
|
||||
|
||||
return ATEditor;
|
||||
})(ATEditor, ATEditor.model, ATEditor.importExport, ATEditor.exampleData);
|
||||
@@ -1,85 +0,0 @@
|
||||
var ATEditor = (function(ATEditor, model, importExport, settings, ATModelFunctions) {
|
||||
|
||||
function setCategoryToObject(item, itemCategories) {
|
||||
if (_.isString(item.category)) {
|
||||
item.category = itemCategories.findById(item.category);
|
||||
}
|
||||
}
|
||||
|
||||
function setItemPriceSuggestion(item) {
|
||||
if (item.hasManualPrice == 1) {
|
||||
item.baseMarketCost = ATModelFunctions.itemFunctions.calculateItemCost(item);
|
||||
} else {
|
||||
item.baseMarketCost = 0;
|
||||
}
|
||||
}
|
||||
|
||||
function ItemController($scope, $routeParams) {
|
||||
$scope.obj = model.items.findById($routeParams.id) || {};
|
||||
$scope.itemCategories = model.itemCategories.items;
|
||||
setCategoryToObject($scope.obj, model.itemCategories);
|
||||
|
||||
$scope.$watch('obj.category', function(val) {
|
||||
$scope.isWeapon = ATModelFunctions.itemCategoryFunctions.isWeaponCategory(val);
|
||||
$scope.isUsable = ATModelFunctions.itemCategoryFunctions.isUsableCategory(val);
|
||||
if (!$scope.isUsable) {
|
||||
$scope.obj.hasUseEffect = false;
|
||||
}
|
||||
$scope.isWearable = ATModelFunctions.itemCategoryFunctions.isWearableCategory(val);
|
||||
if (!$scope.isWearable) {
|
||||
$scope.obj.hasEquipEffect = false;
|
||||
$scope.obj.hasHitEffect = false;
|
||||
$scope.obj.hasKillEffect = false;
|
||||
}
|
||||
});
|
||||
|
||||
$scope.updateCost = setItemPriceSuggestion;
|
||||
$scope.getItemCost = ATModelFunctions.itemFunctions.getItemCost;
|
||||
$scope.getItemSellingCost = ATModelFunctions.itemFunctions.getItemSellingCost;
|
||||
$scope.getItemBuyingCost = ATModelFunctions.itemFunctions.getItemBuyingCost;
|
||||
|
||||
|
||||
$scope.addCondition = function(list) {
|
||||
list.push({magnitude:1});
|
||||
};
|
||||
$scope.removeCondition = function(list, cond) {
|
||||
var idx = list.indexOf(cond);
|
||||
list.splice(idx, 1);
|
||||
};
|
||||
|
||||
$scope.previous = ATEditor.navigationFunctions.editByIndexOffset(model.items, $scope.obj, -1);
|
||||
$scope.next = ATEditor.navigationFunctions.editByIndexOffset(model.items, $scope.obj, 1);
|
||||
}
|
||||
|
||||
function ItemTableController($scope, $routeParams) {
|
||||
var section = model.items;
|
||||
$scope.items = section.items;
|
||||
$scope.itemCategories = model.itemCategories.items;
|
||||
_.each($scope.items, function(item) {
|
||||
setCategoryToObject(item, model.itemCategories);
|
||||
});
|
||||
$scope.edit = function(item) {
|
||||
ATEditor.navigationFunctions.editObj(section, item);
|
||||
};
|
||||
$scope.addObj = function() {
|
||||
importExport.prepareObjectsForEditor(section, [ section.addNew() ]);
|
||||
};
|
||||
$scope.updateCost = setItemPriceSuggestion;
|
||||
$scope.getItemCost = ATModelFunctions.itemFunctions.getItemCost;
|
||||
|
||||
if (!settings.itemTableEditorVisibleColumns) {
|
||||
settings.itemTableEditorVisibleColumns = {
|
||||
iconID: true
|
||||
,id: true
|
||||
,cost: true
|
||||
};
|
||||
}
|
||||
$scope.settings = settings.itemTableEditorVisibleColumns;
|
||||
}
|
||||
|
||||
ATEditor.controllers = ATEditor.controllers || {};
|
||||
ATEditor.controllers.ItemController = ItemController;
|
||||
ATEditor.controllers.ItemTableController = ItemTableController;
|
||||
|
||||
return ATEditor;
|
||||
})(ATEditor, ATEditor.model, ATEditor.importExport, ATEditor.settings, ATModelFunctions);
|
||||
@@ -1,12 +0,0 @@
|
||||
var ATEditor = (function(ATEditor, model) {
|
||||
|
||||
function ItemCategoryController($scope, $routeParams) {
|
||||
$scope.datasource = model.itemCategories;
|
||||
$scope.obj = $scope.datasource.findById($routeParams.id);
|
||||
};
|
||||
|
||||
ATEditor.controllers = ATEditor.controllers || {};
|
||||
ATEditor.controllers.ItemCategoryController = ItemCategoryController;
|
||||
|
||||
return ATEditor;
|
||||
})(ATEditor, ATEditor.model);
|
||||
@@ -1,46 +0,0 @@
|
||||
var ATEditor = (function(ATEditor, model, importExport, settings, ATModelFunctions) {
|
||||
|
||||
function MonsterController($scope, $routeParams) {
|
||||
$scope.obj = model.monsters.findById($routeParams.id) || {};
|
||||
$scope.getExperience = function() {
|
||||
return ATModelFunctions.monsterFunctions.getMonsterExperience($scope.obj);
|
||||
};
|
||||
|
||||
$scope.addCondition = function(list) {
|
||||
list.push({magnitude:1, duration:1, chance:100});
|
||||
};
|
||||
$scope.removeCondition = function(list, cond) {
|
||||
var idx = list.indexOf(cond);
|
||||
list.splice(idx, 1);
|
||||
};
|
||||
$scope.previous = ATEditor.navigationFunctions.editByIndexOffset(model.monsters, $scope.obj, -1);
|
||||
$scope.next = ATEditor.navigationFunctions.editByIndexOffset(model.monsters, $scope.obj, 1);
|
||||
}
|
||||
|
||||
function MonsterTableController($scope, $routeParams) {
|
||||
var section = model.monsters;
|
||||
$scope.monsters = section.items;
|
||||
$scope.getExperience = ATModelFunctions.monsterFunctions.getMonsterExperience;
|
||||
$scope.edit = function(monster) {
|
||||
ATEditor.navigationFunctions.editObj(section, monster);
|
||||
};
|
||||
$scope.addObj = function() {
|
||||
importExport.prepareObjectsForEditor(section, [ section.addNew() ]);
|
||||
};
|
||||
|
||||
if (!settings.monsterTableEditorVisibleColumns) {
|
||||
settings.monsterTableEditorVisibleColumns = {
|
||||
iconID: true
|
||||
,id: true
|
||||
,experience: true
|
||||
};
|
||||
}
|
||||
$scope.settings = settings.monsterTableEditorVisibleColumns;
|
||||
}
|
||||
|
||||
ATEditor.controllers = ATEditor.controllers || {};
|
||||
ATEditor.controllers.MonsterController = MonsterController;
|
||||
ATEditor.controllers.MonsterTableController = MonsterTableController;
|
||||
|
||||
return ATEditor;
|
||||
})(ATEditor, ATEditor.model, ATEditor.importExport, ATEditor.settings, ATModelFunctions);
|
||||
@@ -1,76 +0,0 @@
|
||||
var ATEditor = (function(ATEditor, model, importExport, exampleData) {
|
||||
|
||||
function editObjId(section, objId) {
|
||||
window.location = "#/" + section.id + "/edit/" + objId;
|
||||
}
|
||||
function editObj(section, obj) {
|
||||
editObjId(section, obj.id);
|
||||
}
|
||||
|
||||
function editByIndexOffset(section, obj, offset) {
|
||||
return function() {
|
||||
var nextObj = section.findByIndexOffset(obj, offset);
|
||||
if (!nextObj) { return; }
|
||||
editObj(section, nextObj);
|
||||
};
|
||||
}
|
||||
|
||||
function NavigationController($scope, $routeParams, $http) {
|
||||
$scope.sections = model.sections;
|
||||
$scope.previousItems = [];
|
||||
|
||||
$scope.editObj = function(section, obj) {
|
||||
$scope.previousItems = _.reject($scope.previousItems, function(i) {
|
||||
return (i.section === section) && (i.obj === obj);
|
||||
});
|
||||
$scope.previousItems.unshift({section: section, obj: obj});
|
||||
if ($scope.previousItems.length > 5) {
|
||||
$scope.previousItems.pop();
|
||||
}
|
||||
editObj(section, obj);
|
||||
};
|
||||
$scope.addObj = function(section) {
|
||||
var item = section.addNew();
|
||||
importExport.prepareObjectsForEditor(section, [ item ]);
|
||||
$scope.editObj(section, item);
|
||||
};
|
||||
$scope.clear = function(section) {
|
||||
if(!confirm("Are you sure you want to clear all " + section.name + " ?")) return;
|
||||
section.clear();
|
||||
};
|
||||
$scope.getName = function(section, obj) {
|
||||
return section.getName(obj);
|
||||
}
|
||||
$scope.delObj = function(section, obj) {
|
||||
if(!confirm("Are you sure you want to remove " + section.getName(obj) + " ?")) return;
|
||||
this.destroy(function() {
|
||||
section.remove(obj);
|
||||
});
|
||||
};
|
||||
$scope.dupObj = function(section, obj) {
|
||||
var item = section.clone(obj);
|
||||
$scope.editObj(section, item);
|
||||
};
|
||||
$scope.supportsTableEdit = function(section) {
|
||||
if (section.id == ATEditor.model.monsters.id) { return true; }
|
||||
if (section.id == ATEditor.model.items.id) { return true; }
|
||||
return false;
|
||||
};
|
||||
$scope.editAsTable = function(section) {
|
||||
window.location = "#/" + section.id + "/table";
|
||||
};
|
||||
|
||||
|
||||
exampleData.init($http);
|
||||
};
|
||||
|
||||
ATEditor.controllers = ATEditor.controllers || {};
|
||||
ATEditor.controllers.NavigationController = NavigationController;
|
||||
ATEditor.navigationFunctions = {
|
||||
editObj: editObj
|
||||
,editObjId: editObjId
|
||||
,editByIndexOffset: editByIndexOffset
|
||||
};
|
||||
|
||||
return ATEditor;
|
||||
})(ATEditor, ATEditor.model, ATEditor.importExport, ATEditor.exampleData);
|
||||
@@ -1,19 +0,0 @@
|
||||
var ATEditor = (function(ATEditor, model) {
|
||||
|
||||
function QuestController($scope, $routeParams) {
|
||||
$scope.datasource = model.quests;
|
||||
$scope.obj = $scope.datasource.findById($routeParams.id);
|
||||
$scope.addQuestStage = function() {
|
||||
$scope.obj.stages.push({});
|
||||
};
|
||||
$scope.removeQuestStage = function(stage) {
|
||||
var idx = $scope.obj.stages.indexOf(stage);
|
||||
$scope.obj.stages.splice(idx, 1);
|
||||
};
|
||||
};
|
||||
|
||||
ATEditor.controllers = ATEditor.controllers || {};
|
||||
ATEditor.controllers.QuestController = QuestController;
|
||||
|
||||
return ATEditor;
|
||||
})(ATEditor, ATEditor.model);
|
||||
@@ -1,26 +0,0 @@
|
||||
var ATEditor = (function(ATEditor, tilesets) {
|
||||
|
||||
function SelectIconController($scope, $routeParams) {
|
||||
var _callback = function() {};
|
||||
$scope.selectedSection = '';
|
||||
$scope.sections = [];
|
||||
_.each([ 'monster', 'item', 'actorcondition' ], function(id) {
|
||||
$scope.sections.push({id: id, imageIDs: tilesets.getIconIDsForSection(id)});
|
||||
});
|
||||
|
||||
this.startSelecting = function(sectionId, callback) {
|
||||
_callback = callback;
|
||||
$scope.selectedSection = sectionId;
|
||||
$scope.$apply();
|
||||
};
|
||||
|
||||
$scope.imageSelected = function(iconID) {
|
||||
if (_callback) { _callback(iconID); }
|
||||
};
|
||||
};
|
||||
|
||||
ATEditor.controllers = ATEditor.controllers || {};
|
||||
ATEditor.controllers.SelectIconController = SelectIconController;
|
||||
|
||||
return ATEditor;
|
||||
})(ATEditor, ATEditor.tilesets);
|
||||
@@ -1,98 +0,0 @@
|
||||
var ATEditor = (function(ATEditor, _) {
|
||||
|
||||
ATEditor.DataStore = function(options) {
|
||||
var defaultOptions = {
|
||||
nameField: 'name'
|
||||
,idField: 'id'
|
||||
};
|
||||
_.defaults(options, defaultOptions);
|
||||
|
||||
var items = [];
|
||||
this.items = items;
|
||||
|
||||
this.name = options.name;
|
||||
this.id = options.id;
|
||||
|
||||
this.findById = function(id) {
|
||||
return _.find(this.items, function(obj) { return obj[options.idField] === id; });
|
||||
};
|
||||
this.hasObjectWithId = function(id) {
|
||||
return _.some(this.items, function(obj) { return obj[options.idField] === id; });
|
||||
};
|
||||
this.hasIcon = function() { return _.toBool(options.iconIDField); };
|
||||
this.getIcon = function(obj) { return obj[options.iconIDField]; };
|
||||
this.getId = function(obj) { return obj[options.idField]; };
|
||||
this.getName = function(obj) {
|
||||
return obj[options.nameField];
|
||||
};
|
||||
this.addNew = function(suggestedId) {
|
||||
var obj = { };
|
||||
if (!suggestedId) { suggestedId = 'new_' + options.id; }
|
||||
obj[options.idField] = suggestedId;
|
||||
if (options.idField != options.nameField) {
|
||||
obj[options.nameField] = 'New ' + options.id;
|
||||
}
|
||||
this.ensureUniqueId(obj);
|
||||
items.push(obj);
|
||||
return obj;
|
||||
};
|
||||
this.add = function(o) {
|
||||
items.push(o);
|
||||
};
|
||||
this.clone = function(o) {
|
||||
var obj = ATEditor.utils.deepClone(o);
|
||||
this.ensureUniqueId(obj);
|
||||
obj[options.nameField] = 'Copy of ' + obj[options.nameField];
|
||||
items.push(obj);
|
||||
return obj;
|
||||
};
|
||||
this.remove = function(o) {
|
||||
var idx = items.indexOf(o);
|
||||
if (idx >= 0) {
|
||||
items.splice(idx, 1);
|
||||
}
|
||||
};
|
||||
this.clear = function() {
|
||||
items = [];
|
||||
this.items = items;
|
||||
};
|
||||
|
||||
this.findFirstFreeId = function(id) {
|
||||
if(!this.hasObjectWithId(id)) {
|
||||
return id;
|
||||
}
|
||||
|
||||
var prefix;
|
||||
var n = 1;
|
||||
|
||||
var match = (/^(.*\D)(\d+)$/g).exec(id);
|
||||
if (match) {
|
||||
prefix = match[1];
|
||||
n = parseInt(match[2]) + 1;
|
||||
} else {
|
||||
prefix = id + "_";
|
||||
}
|
||||
|
||||
var result = prefix + n;
|
||||
while(this.hasObjectWithId(result)) {
|
||||
n = n + 1;
|
||||
result = prefix + n;
|
||||
}
|
||||
return result;
|
||||
};
|
||||
this.ensureUniqueId = function(obj) {
|
||||
obj[options.idField] = this.findFirstFreeId(obj[options.idField]);
|
||||
};
|
||||
this.findByIndexOffset = function(obj, offset) {
|
||||
if (_.isEmpty(this.items)) { return; }
|
||||
|
||||
var idx = _.indexOf(this.items, obj);
|
||||
idx = idx + offset;
|
||||
if (idx < 0) { idx = this.items.length - 1; }
|
||||
if (idx >= this.items.length) { idx = 0; }
|
||||
return this.items[idx];
|
||||
};
|
||||
};
|
||||
|
||||
return ATEditor;
|
||||
})(ATEditor || {}, _);
|
||||
@@ -1,64 +0,0 @@
|
||||
var ATEditor = (function(ATEditor, _) {
|
||||
|
||||
var defaults = {
|
||||
actorcondition: {
|
||||
isStacking: 0
|
||||
,isPositive: 0
|
||||
,roundEffect: { increaseCurrentHP: {}, increaseCurrentAP: {} }
|
||||
,fullRoundEffect: { increaseCurrentHP: {}, increaseCurrentAP: {} }
|
||||
,abilityEffect: { increaseAttackDamage: {} }
|
||||
}
|
||||
,quest: {
|
||||
showInLog: 0
|
||||
,stages: []
|
||||
}
|
||||
,item: {
|
||||
displaytype: 'ordinary'
|
||||
,hasManualPrice: 0
|
||||
,equipEffect: { increaseAttackDamage: {}, addedConditions: [] }
|
||||
,useEffect: { increaseCurrentHP: {}, increaseCurrentAP: {}, conditionsSource: [], conditionsTarget: [] }
|
||||
,hitEffect: { increaseCurrentHP: {}, increaseCurrentAP: {}, conditionsSource: [], conditionsTarget: [] }
|
||||
,killEffect: { increaseCurrentHP: {}, increaseCurrentAP: {}, conditionsSource: [], conditionsTarget: [] }
|
||||
}
|
||||
,droplist: {
|
||||
items: []
|
||||
}
|
||||
,dialogue: {
|
||||
rewards: []
|
||||
,replies: []
|
||||
}
|
||||
,monster: {
|
||||
size: "1x1"
|
||||
,maxHP: 1
|
||||
,maxAP: 10
|
||||
,moveCost: 10
|
||||
,unique: 0
|
||||
,monsterClass: 'humanoid'
|
||||
,movementAggressionType: 'none'
|
||||
,attackDamage: {}
|
||||
,hitEffect: { increaseCurrentHP: {}, increaseCurrentAP: {}, conditionsSource: [], conditionsTarget: [] }
|
||||
}
|
||||
,itemcategory: {
|
||||
actionType: 'none'
|
||||
,size: 'none'
|
||||
}
|
||||
,reply: {
|
||||
requires: []
|
||||
}
|
||||
};
|
||||
|
||||
ATEditor.defaults = {
|
||||
addDefaults: function(type, o) {
|
||||
var def = defaults[type];
|
||||
if (def) {
|
||||
var copyOfDefaults = ATEditor.utils.deepClone(def);
|
||||
ATEditor.utils.copyDefaults(o, copyOfDefaults);
|
||||
}
|
||||
},
|
||||
removeDefaults: function(type, o) {
|
||||
return ATEditor.utils.removeDefaults(o, defaults[type]);
|
||||
}
|
||||
};
|
||||
|
||||
return ATEditor;
|
||||
})(ATEditor || {}, _);
|
||||
@@ -1,105 +0,0 @@
|
||||
var ATEditor = (function(ATEditor, app, tilesets, $) {
|
||||
|
||||
// Copied from http://jsfiddle.net/p69aT/
|
||||
// -> originally from https://groups.google.com/forum/?fromgroups=#!topic/angular/7XVOebG6z6E
|
||||
app.directive('fadey', function() {
|
||||
return {
|
||||
restrict: 'A',
|
||||
link: function(scope, elm, attrs) {
|
||||
elm = $(elm);
|
||||
elm.hide();
|
||||
elm.fadeIn();
|
||||
|
||||
scope.destroy = function(complete) {
|
||||
elm.slideUp(function() {
|
||||
if (complete) {
|
||||
complete.apply(scope);
|
||||
}
|
||||
});
|
||||
elm.fadeOut();
|
||||
};
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
// Copied from
|
||||
// http://www.codeproject.com/Articles/464939/Angular-JS-Using-Directives-to-Create-Custom-Attri
|
||||
app.directive('ngDsFade', function () {
|
||||
return function(scope, element, attrs) {
|
||||
element.css('display', 'none');
|
||||
scope.$watch(attrs.ngDsFade, function(value) {
|
||||
if (value) {
|
||||
element.fadeIn(400);
|
||||
} else {
|
||||
element.fadeOut(300);
|
||||
}
|
||||
});
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
app.directive('ngTileImage', function () {
|
||||
return function(scope, element, attrs) {
|
||||
var scale = attrs.ngTileImageScale;
|
||||
if (!scale) scale = 1;
|
||||
|
||||
scope.$watch(attrs.ngTileImage, function(value) {
|
||||
var img = tilesets.parseImageID(value);
|
||||
var tileset = tilesets.getTileset(img.tilesetName);
|
||||
var c = tileset.localIDToCoords(img.localID);
|
||||
element.css({
|
||||
"background-image": "url(" +img.path + img.tilesetName + ".png)",
|
||||
"background-position": (-c.x)*scale+"px " + (-c.y)*scale+"px",
|
||||
"width": tileset._tileSize.x * scale + "px",
|
||||
"height": tileset._tileSize.y * scale + "px",
|
||||
"cursor": "pointer"
|
||||
});
|
||||
if (scale && (scale != 1)) {
|
||||
element.css({
|
||||
"background-size":
|
||||
tileset._tileSize.x * tileset._numTiles.x * scale + "px "
|
||||
+ tileset._tileSize.y * tileset._numTiles.y * scale + "px "
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
});
|
||||
|
||||
app.directive('ngSelectImage', function () {
|
||||
return {
|
||||
link : function(scope, element, attrs) {
|
||||
function openDialog() {
|
||||
var element = angular.element('#selectIconModal');
|
||||
var ctrl = element.controller();
|
||||
ctrl.startSelecting(attrs.ngSelectImage, function(iconID) {
|
||||
element.modal('hide');
|
||||
var s = attrs.ngSelectImageDest || 'iconID';
|
||||
eval("scope." + s + "='" + iconID + "'");
|
||||
});
|
||||
element.modal('show');
|
||||
}
|
||||
element.bind('click', openDialog);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
// http://jsfiddle.net/ag5zC/22/
|
||||
app.directive('treenode', function ($compile) {
|
||||
var link;
|
||||
return {
|
||||
restrict: 'E',
|
||||
terminal: true,
|
||||
scope: { node: '=', onclick: '=' },
|
||||
link: function (scope, element, attrs) {
|
||||
if(!link) {
|
||||
link = $compile(element.html());
|
||||
}
|
||||
element.replaceWith(link(scope.$new(), function(clone) { }));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return ATEditor;
|
||||
})(ATEditor, ATEditor.app, ATEditor.tilesets, jQuery);
|
||||
@@ -1,82 +0,0 @@
|
||||
var ATEditor = (function(ATEditor, model, utils, _, $) {
|
||||
|
||||
var http;
|
||||
var resources = {};
|
||||
|
||||
function loadUrlFromGit(relativeUrl, successCallback, errorCallback) {
|
||||
var url = utils.getUrlRelativeToBaseSrcDir(relativeUrl);
|
||||
http.get(url)
|
||||
.success(function(data, status, headers, config) {
|
||||
successCallback(data);
|
||||
}).error(function(data, status, headers, config) {
|
||||
if(errorCallback) { errorCallback(status); }
|
||||
});
|
||||
}
|
||||
|
||||
function addExampleModelItems() {
|
||||
var _import = function(section, data) {
|
||||
ATEditor.importExport.importDataObjects(section, data);
|
||||
};
|
||||
|
||||
_import(model.quests, [
|
||||
{id: "testQuest", name: "Test quest", showInLog: 1, stages: [ { progress: 10, logText: "Stage 10"} , { progress: 20, logText: "Stage 20", finishesQuest: 1 } ] }
|
||||
]);
|
||||
}
|
||||
|
||||
function init($http) {
|
||||
http = $http;
|
||||
|
||||
// http://andors-trail.googlecode.com/git/AndorsTrail/res/values/loadresources.xml
|
||||
loadUrlFromGit("AndorsTrail/res/values/loadresources.xml", function(data) {
|
||||
var parseListOfResourceFiles = function(xmlname, section) {
|
||||
var items = [];
|
||||
resources[section.id] = items;
|
||||
$(data).find("array[name='" + xmlname + "'] item").each(function(idx, f) {
|
||||
var match = (/^@.*\/(.+)$/g).exec($(f).text());
|
||||
if (match) {
|
||||
items.push(match[1] + ".json");
|
||||
}
|
||||
});
|
||||
};
|
||||
parseListOfResourceFiles("loadresource_itemcategories", model.itemCategories);
|
||||
parseListOfResourceFiles("loadresource_actorconditions", model.actorConditions);
|
||||
parseListOfResourceFiles("loadresource_items", model.items);
|
||||
parseListOfResourceFiles("loadresource_droplists", model.droplists);
|
||||
parseListOfResourceFiles("loadresource_quests", model.quests);
|
||||
parseListOfResourceFiles("loadresource_conversationlists", model.dialogue);
|
||||
parseListOfResourceFiles("loadresource_monsters", model.monsters);
|
||||
|
||||
_.each(resources['itemcategory'], function(file) {
|
||||
loadUrlFromGit("AndorsTrail/res/raw/" + file, function(data) {
|
||||
ATEditor.importExport.importDataObjects(model.itemCategories, data);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
loadUrlFromGit("AndorsTrail/res/raw/actorconditions_v069.json", function(data) {
|
||||
ATEditor.importExport.importDataObjects(model.actorConditions, data);
|
||||
});
|
||||
loadUrlFromGit("AndorsTrail/res/raw/conversationlist_mikhail.json", function(data) {
|
||||
ATEditor.importExport.importDataObjects(model.dialogue, data);
|
||||
});
|
||||
loadUrlFromGit("AndorsTrail/res/raw/droplists_crossglen.json", function(data) {
|
||||
ATEditor.importExport.importDataObjects(model.droplists, data);
|
||||
});
|
||||
loadUrlFromGit("AndorsTrail/res/raw/monsterlist_crossglen_animals.json", function(data) {
|
||||
ATEditor.importExport.importDataObjects(model.monsters, data);
|
||||
});
|
||||
loadUrlFromGit("AndorsTrail/res/raw/itemlist_v069_2.json", function(data) {
|
||||
ATEditor.importExport.importDataObjects(model.items, data);
|
||||
});
|
||||
|
||||
addExampleModelItems(model);
|
||||
}
|
||||
|
||||
ATEditor.exampleData = {
|
||||
init: init
|
||||
,resources: resources
|
||||
,loadUrlFromGit: loadUrlFromGit
|
||||
};
|
||||
|
||||
return ATEditor;
|
||||
})(ATEditor, ATEditor.model, ATEditor.utils, _, jQuery);
|
||||
@@ -1,205 +0,0 @@
|
||||
|
||||
var ATEditor = (function(ATEditor) {
|
||||
var FieldList_Header_fieldName = '[^\\[\\]\\|]*';
|
||||
var FieldList_Header_arrayField = FieldList_Header_fieldName + '\\[(' + FieldList_Header_fieldName + '\\|)*\\]';
|
||||
var FieldList_Header_arrayFieldName = new RegExp(FieldList_Header_fieldName);
|
||||
var FieldList_Header_field = '(' + FieldList_Header_fieldName + '|' + FieldList_Header_arrayField + ')\\|';
|
||||
var FieldList_Header_pattern = new RegExp(FieldList_Header_field, 'g');
|
||||
var FieldList_Header_line = "^(\\[(" + FieldList_Header_field + ")*\\];)$";
|
||||
var FieldList_Header_linePattern = new RegExp(FieldList_Header_line, 'm');
|
||||
|
||||
function FieldList(header, name) {
|
||||
this._name = name ? name : "";
|
||||
this._fields = [];
|
||||
|
||||
var match = header.match(FieldList_Header_pattern);
|
||||
if (!match) return;
|
||||
|
||||
for (var i = 0; i < match.length; ++i) {
|
||||
var s = match[i].match(FieldList_Header_field)[1]; // Strip trailing pipe
|
||||
|
||||
var f = s;
|
||||
if (s.match(FieldList_Header_arrayField)) {
|
||||
var name = s.match(FieldList_Header_arrayFieldName)[0];
|
||||
f = new FieldList(s, name);
|
||||
}
|
||||
this._fields[i] = f;
|
||||
}
|
||||
|
||||
this.getFieldName = function(i) {
|
||||
var f = this._fields[i];
|
||||
if (f instanceof FieldList) {
|
||||
return f._name;
|
||||
} else {
|
||||
return f;
|
||||
}
|
||||
}
|
||||
|
||||
this.getHeader = function() {
|
||||
var result = this._name + "[";
|
||||
for(var i = 0; i < this._fields.length; ++i) {
|
||||
var f = this._fields[i];
|
||||
if (f instanceof FieldList) {
|
||||
result += f.getHeader();
|
||||
} else {
|
||||
result += f;
|
||||
}
|
||||
result += "|";
|
||||
}
|
||||
result += "]";
|
||||
return result;
|
||||
}
|
||||
|
||||
this.getHeaderLine = function() {
|
||||
return this.getHeader() + ";";
|
||||
}
|
||||
};
|
||||
|
||||
function findHeader(str) {
|
||||
var match = str.match(FieldList_Header_linePattern);
|
||||
if (!match) return;
|
||||
return new FieldList(match[0]);
|
||||
}
|
||||
|
||||
|
||||
|
||||
var DataStore_Data_fieldValue = '[^\\{\\}\\|]*';
|
||||
var DataStore_Data_arrayObject = '\\{(' + DataStore_Data_fieldValue + '\\|)*\\}\\s*';
|
||||
var DataStore_Data_arrayObjectPattern = new RegExp(DataStore_Data_arrayObject, 'g');
|
||||
var DataStore_Data_arrayField = '\\{\\s*(' + DataStore_Data_arrayObject + ')*\\s*\\}';
|
||||
var DataStore_Data_field = '(' + DataStore_Data_fieldValue + '|' + DataStore_Data_arrayField + ')\\|';
|
||||
var DataStore_Data_pattern = new RegExp(DataStore_Data_field, 'gm');
|
||||
var DataStore_Data_line = "^(\\{(" + DataStore_Data_field + ")*\\};)$";
|
||||
var DataStore_Data_linePattern = new RegExp(DataStore_Data_line, 'gm');
|
||||
|
||||
var showErrorMessages = true;
|
||||
|
||||
var specialEncodings = [
|
||||
{
|
||||
decoded: "'", decoded_Regex: /'/gm,
|
||||
encoded: "\\'", encoded_Regex: /\\'/gm
|
||||
},
|
||||
{
|
||||
decoded: "\n", decoded_Regex: /\n/gm,
|
||||
encoded: "\\n", encoded_Regex: /\\n/gm
|
||||
}
|
||||
];
|
||||
|
||||
var deserialize = function(str) {
|
||||
var header = findHeader(str);
|
||||
if (!header) {
|
||||
return;
|
||||
}
|
||||
return {
|
||||
header: header
|
||||
,items: deserializeObjectList(header, str)
|
||||
};
|
||||
}
|
||||
var serialize = function(dataStore) {
|
||||
return serializeObjectList(dataStore.fieldList, dataStore.items);
|
||||
}
|
||||
|
||||
|
||||
function deserializeObject(fieldList, data) {
|
||||
var match = data.match(DataStore_Data_pattern);
|
||||
if (!match) return;
|
||||
|
||||
if (match.length != fieldList._fields.length) {
|
||||
if (showErrorMessages) {
|
||||
alert("Error parsing data object. Expected " + fieldList._fields.length + " fields, but found " + match.length + " fields.\ndata = \"" + data + "\"");
|
||||
showErrorMessages = false;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
var obj = {};
|
||||
for (var i = 0; i < fieldList._fields.length; ++i) {
|
||||
var s = match[i].match(DataStore_Data_field)[1]; // Strip trailing pipe
|
||||
|
||||
var f = fieldList._fields[i];
|
||||
var v = s;
|
||||
var fieldName = fieldList.getFieldName(i);
|
||||
if (f instanceof FieldList) {
|
||||
fieldName = f._name;
|
||||
v = [];
|
||||
var objects = s.match(DataStore_Data_arrayObjectPattern);
|
||||
if (objects) {
|
||||
for (var j = 0; j < objects.length; ++j) {
|
||||
v[j] = deserializeObject(f, objects[j]);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for(var j = 0; j < specialEncodings.length; ++j) {
|
||||
var e = specialEncodings[j];
|
||||
v = v.replace(e.encoded_Regex, e.decoded);
|
||||
}
|
||||
}
|
||||
obj[fieldName] = v;
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
function deserializeObjectList(fieldList, data) {
|
||||
var result = [];
|
||||
if(!data) return result;
|
||||
var match = data.match(DataStore_Data_linePattern);
|
||||
if(!match) return result;
|
||||
for(var i = 0; i < match.length; ++i) {
|
||||
result[i] = deserializeObject(fieldList, match[i]);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
function serializeObject(fieldList, obj) {
|
||||
if (!obj) return "";
|
||||
var result = "{";
|
||||
|
||||
for(var i = 0; i < fieldList._fields.length; ++i) {
|
||||
var fieldName = fieldList.getFieldName(i);
|
||||
var f = fieldList._fields[i];
|
||||
var v = obj[fieldName];
|
||||
if (f instanceof FieldList) {
|
||||
if (v && v.length > 0) {
|
||||
result += "{";
|
||||
if (v.length > 1) { result += "\n"; }
|
||||
for(var j = 0; j < v.length; ++j) {
|
||||
if (v.length > 1) { result += "\t"; }
|
||||
result += serializeObject(f, v[j]);
|
||||
if (v.length > 1) { result += "\n"; }
|
||||
}
|
||||
if (v.length > 1) { result += "\t"; }
|
||||
result += "}";
|
||||
}
|
||||
} else if (v != undefined) {
|
||||
v = "" + v;
|
||||
for(var j = 0; j < specialEncodings.length; ++j) {
|
||||
var e = specialEncodings[j];
|
||||
v = v.replace(e.decoded_Regex, e.encoded);
|
||||
}
|
||||
result += v;
|
||||
}
|
||||
result += "|";
|
||||
}
|
||||
result += "}";
|
||||
return result;
|
||||
}
|
||||
|
||||
function serializeObjectList(fieldList, obj) {
|
||||
var result = fieldList.getHeader() + ";\n";
|
||||
if(!obj) return result;
|
||||
|
||||
for(var i = 0; i < obj.length; ++i) {
|
||||
result += serializeObject(fieldList, obj[i]) + ";\n";
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
ATEditor.FieldList = FieldList;
|
||||
|
||||
ATEditor.legacy = ATEditor.legacy || {};
|
||||
ATEditor.legacy.deserialize = deserialize;
|
||||
ATEditor.legacy.serialize = serialize;
|
||||
ATEditor.legacy.findHeader = findHeader;
|
||||
|
||||
return ATEditor;
|
||||
})(ATEditor || {});
|
||||
@@ -1,196 +0,0 @@
|
||||
var ATEditor = (function(ATEditor, _) {
|
||||
|
||||
var prep = {};
|
||||
prep.actorcondition = function(o) {
|
||||
o.hasRoundEffect = ATEditor.utils.hasValues(_.omit(o.roundEffect, 'visualEffectID'));
|
||||
o.hasFullRoundEffect = ATEditor.utils.hasValues(_.omit(o.fullRoundEffect, 'visualEffectID'));
|
||||
o.hasAbilityEffect = ATEditor.utils.hasValues(o.abilityEffect);
|
||||
};
|
||||
prep.quest = function(o) {
|
||||
};
|
||||
prep.item = function(o) {
|
||||
o.hasEquipEffect = ATEditor.utils.hasValues(o.equipEffect);
|
||||
o.hasUseEffect = ATEditor.utils.hasValues(o.useEffect);
|
||||
o.hasHitEffect = ATEditor.utils.hasValues(o.hitEffect);
|
||||
o.hasKillEffect = ATEditor.utils.hasValues(o.killEffect);
|
||||
};
|
||||
prep.droplist = function(o) {
|
||||
};
|
||||
prep.dialogue = function(o) {
|
||||
o.hasRewards = ATEditor.utils.hasValues(o.rewards);
|
||||
if (o.replies.length === 1 && o.replies[0].text === "N") {
|
||||
o.nextPhraseID = o.replies[0].nextPhraseID;
|
||||
o.hasOnlyNextReply = true;
|
||||
} else {
|
||||
o.nextPhraseID = "";
|
||||
o.hasOnlyNextReply = false;
|
||||
}
|
||||
_.each(o.replies, function(reply) {
|
||||
ATEditor.defaults.addDefaults('reply', reply);
|
||||
if (reply.nextPhraseID && reply.nextPhraseID.length === 1) { reply.replyLeadsTo = reply.nextPhraseID; }
|
||||
reply.hasRequirements = ATEditor.utils.hasValues(reply.requires);
|
||||
});
|
||||
o.showAdvanced = _.toBool(o.switchToNPC);
|
||||
};
|
||||
prep.monster = function(o) {
|
||||
o.hasConversation = _.toBool(o.phraseID);
|
||||
o.hasHitEffect = _.toBool(o.hitEffect.increaseCurrentHP.min || o.hitEffect.increaseCurrentAP.min || _.some(o.hitEffect.conditionsSource) || _.some(o.hitEffect.conditionsTarget));
|
||||
o.hasCritical = _.toBool(o.criticalSkill || o.criticalMultiplier);
|
||||
o.hasCombatTraits = _.toBool(o.attackChance || o.attackDamage.min || o.hasCritical || o.blockChance || o.damageResistance || o.hasHitEffect);
|
||||
o.showAdvanced = _.toBool(o.faction || (o.size != '1x1'));
|
||||
};
|
||||
prep.itemcategory = function(o) {
|
||||
};
|
||||
|
||||
function prepareObjectsForEditor(section, objs) {
|
||||
var p = prep[section.id];
|
||||
_.each(objs, function(o) {
|
||||
ATEditor.defaults.addDefaults(section.id, o);
|
||||
if (p) { p(o); }
|
||||
ATEditor.utils.convertIntegersToStrings(o);
|
||||
});
|
||||
}
|
||||
|
||||
var unprep = {};
|
||||
unprep.actorcondition = function(o) {
|
||||
if (!o.hasRoundEffect) { delete o.roundEffect; }
|
||||
if (!o.hasFullRoundEffect) { delete o.fullRoundEffect; }
|
||||
if (!o.hasAbilityEffect) { delete o.abilityEffect; }
|
||||
delete o.hasRoundEffect;
|
||||
delete o.hasFullRoundEffect;
|
||||
delete o.hasAbilityEffect;
|
||||
};
|
||||
unprep.quest = function(o) {
|
||||
};
|
||||
unprep.item = function(o) {
|
||||
if (!o.hasEquipAPEffect) {
|
||||
var e = o.equipEffect;
|
||||
delete e.increaseMaxAP;
|
||||
delete e.increaseMoveCost;
|
||||
delete e.increaseUseItemCost;
|
||||
delete e.increaseReequipCost;
|
||||
}
|
||||
delete o.hasEquipAPEffect;
|
||||
if (!o.hasEquipEffect) { delete o.equipEffect; }
|
||||
if (_.isObject(o.category)) { o.category = o.category.id; }
|
||||
if (!o.hasUseEffect) { delete o.useEffect; }
|
||||
if (!o.hasHitEffect) { delete o.hitEffect; }
|
||||
if (!o.hasKillEffect) { delete o.killEffect; }
|
||||
delete o.hasEquipEffect;
|
||||
delete o.hasUseEffect;
|
||||
delete o.hasHitEffect;
|
||||
delete o.hasKillEffect;
|
||||
};
|
||||
unprep.droplist = function(o) {
|
||||
};
|
||||
unprep.dialogue = function(o) {
|
||||
if (!o.hasRewards) { delete o.rewards; }
|
||||
delete o.hasRewards;
|
||||
_.each(o.replies, function(reply) {
|
||||
if (reply.replyLeadsTo) { reply.nextPhraseID = reply.replyLeadsTo; }
|
||||
delete reply.replyLeadsTo;
|
||||
if (!o.hasRequirements) { delete o.requires; }
|
||||
delete reply.hasRequirements;
|
||||
});
|
||||
if (o.hasOnlyNextReply) {
|
||||
o.replies = [ { text: "N", nextPhraseID: o.nextPhraseID } ];
|
||||
}
|
||||
if (!o.showAdvanced) {
|
||||
delete o.switchToNPC;
|
||||
}
|
||||
delete o.showAdvanced;
|
||||
delete o.nextPhraseID;
|
||||
delete o.hasOnlyNextReply;
|
||||
delete o.tree;
|
||||
};
|
||||
unprep.monster = function(o) {
|
||||
if (!o.hasCritical) {
|
||||
delete o.criticalSkill;
|
||||
delete o.criticalMultiplier;
|
||||
}
|
||||
if (!o.showAdvanced) {
|
||||
delete o.faction;
|
||||
delete o.size;
|
||||
}
|
||||
delete o.showAdvanced;
|
||||
delete o.hasCritical;
|
||||
delete o.hasConversation;
|
||||
delete o.hasCombatTraits;
|
||||
delete o.hasHitEffect;
|
||||
};
|
||||
unprep.itemcategory = function(o) {
|
||||
};
|
||||
|
||||
function prepareObjectsForExport(section, objs) {
|
||||
var p = unprep[section.id];
|
||||
return _.map(objs, function(o) {
|
||||
o = ATEditor.utils.deepClone(o);
|
||||
ATEditor.utils.removeAngularFields(o);
|
||||
if (p) { p(o); }
|
||||
ATEditor.utils.convertStringsToIntegers(o);
|
||||
ATEditor.defaults.removeDefaults(section.id, o);
|
||||
ATEditor.utils.compact(o);
|
||||
return o;
|
||||
});
|
||||
}
|
||||
|
||||
function importDataObjects(section, data, success, error) {
|
||||
if (!data || _.isEmpty(data)) {
|
||||
if (error) { error("No data?"); }
|
||||
return;
|
||||
}
|
||||
|
||||
var first = data;
|
||||
if (_.isArray(data)) {
|
||||
first = _.first(data);
|
||||
} else if (_.isObject(data)) {
|
||||
data = [ data ];
|
||||
} else {
|
||||
if (error) { error("Malformed data? Expected array or object."); }
|
||||
return;
|
||||
}
|
||||
|
||||
if (!section.getId(first)) {
|
||||
if (error) { error("Malformed data? Expected to find at least an id field, but no such field was found."); }
|
||||
return;
|
||||
}
|
||||
|
||||
prepareObjectsForEditor(section, data);
|
||||
|
||||
_.each(data, section.add);
|
||||
if (success) { success(); }
|
||||
};
|
||||
|
||||
function importText(section, content, success, error) {
|
||||
var data = ATEditor.legacy.deserialize(content);
|
||||
if (data) {
|
||||
data = data.items;
|
||||
var convert = ATEditor.legacy.convertFromLegacyFormat[section.id];
|
||||
if (convert) {
|
||||
data = _.map(data, convert);
|
||||
}
|
||||
} else {
|
||||
try {
|
||||
data = JSON.parse(content);
|
||||
} catch(e) {
|
||||
if (error) { error("Unable to parse data as JSON."); }
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
importDataObjects(section, data, success, error);
|
||||
};
|
||||
function exportData(section) {
|
||||
var objs = section.items;
|
||||
var resultObjs = prepareObjectsForExport(section, objs);
|
||||
return JSON.stringify(resultObjs, undefined, 2);
|
||||
};
|
||||
|
||||
ATEditor.importExport = {
|
||||
importText: importText
|
||||
,importDataObjects: importDataObjects
|
||||
,exportData: exportData
|
||||
,prepareObjectsForEditor: prepareObjectsForEditor
|
||||
};
|
||||
return ATEditor;
|
||||
})(ATEditor || {}, _);
|
||||
@@ -1,341 +0,0 @@
|
||||
var ATEditor = (function(ATEditor, model, FieldList, _) {
|
||||
|
||||
function addLegacyFieldLists(model) {
|
||||
model.actorConditions.legacyFieldList = new FieldList("[id|name|iconID|category|isStacking|isPositive|"
|
||||
+ "hasRoundEffect|round_visualEffectID|round_boostHP_Min|round_boostHP_Max|round_boostAP_Min|round_boostAP_Max|"
|
||||
+ "hasFullRoundEffect|fullround_visualEffectID|fullround_boostHP_Min|fullround_boostHP_Max|fullround_boostAP_Min|fullround_boostAP_Max|"
|
||||
+ "hasAbilityEffect|boostMaxHP|boostMaxAP|moveCostPenalty|attackCost|attackChance|criticalChance|criticalMultiplier|attackDamage_Min|attackDamage_Max|blockChance|damageResistance|"
|
||||
+ "];"
|
||||
);
|
||||
model.quests.legacyFieldList = new FieldList("[id|name|showInLog|stages[progress|logText|rewardExperience|finishesQuest|]|];");
|
||||
model.items.legacyFieldList = new FieldList("[id|iconID|name|category|displaytype|hasManualPrice|baseMarketCost|"
|
||||
+ "hasEquipEffect|equip_boostMaxHP|equip_boostMaxAP|equip_moveCostPenalty|equip_attackCost|equip_attackChance|equip_criticalChance|equip_criticalMultiplier|equip_attackDamage_Min|equip_attackDamage_Max|equip_blockChance|equip_damageResistance|equip_conditions[condition|magnitude|]|"
|
||||
+ "hasUseEffect|use_boostHP_Min|use_boostHP_Max|use_boostAP_Min|use_boostAP_Max|use_conditionsSource[condition|magnitude|duration|chance|]|"
|
||||
+ "hasHitEffect|hit_boostHP_Min|hit_boostHP_Max|hit_boostAP_Min|hit_boostAP_Max|hit_conditionsSource[condition|magnitude|duration|chance|]|hit_conditionsTarget[condition|magnitude|duration|chance|]|"
|
||||
+ "hasKillEffect|kill_boostHP_Min|kill_boostHP_Max|kill_boostAP_Min|kill_boostAP_Max|kill_conditionsSource[condition|magnitude|duration|chance|]|"
|
||||
+ "];"
|
||||
);
|
||||
model.droplists.legacyFieldList = new FieldList("[id|items[itemID|quantity_Min|quantity_Max|chance|]|];");
|
||||
model.dialogue.legacyFieldList = new FieldList("[id|message|rewards[rewardType|rewardID|value|]|replies[text|nextPhraseID|requires_Progress|requires_itemID|requires_Quantity|requires_Type|]|];");
|
||||
model.monsters.legacyFieldList = new FieldList("[id|iconID|name|tags|size|monsterClass|unique|faction|maxHP|maxAP|moveCost|attackCost|attackChance|criticalChance|criticalMultiplier|attackDamage_Min|attackDamage_Max|blockChance|damageResistance|droplistID|phraseID|"
|
||||
+ "hasHitEffect|onHit_boostHP_Min|onHit_boostHP_Max|onHit_boostAP_Min|onHit_boostAP_Max|onHit_conditionsSource[condition|magnitude|duration|chance|]|onHit_conditionsTarget[condition|magnitude|duration|chance|]|"
|
||||
+ "];"
|
||||
);
|
||||
model.itemCategories.legacyFieldList = new FieldList("[id|name|actionType|inventorySlot|size|];");
|
||||
}
|
||||
addLegacyFieldLists(model);
|
||||
|
||||
ATEditor.legacy = ATEditor.legacy || {};
|
||||
ATEditor.legacy.convertFromLegacyFormat = {
|
||||
monster: convertMonster
|
||||
,quest: convertQuest
|
||||
,itemcategory: convertItemCategory
|
||||
,item: convertItem
|
||||
,droplist: convertDroplist
|
||||
,dialogue: convertConversation
|
||||
,actorcondition: convertCondition
|
||||
};
|
||||
|
||||
function convertMonster(obj) {
|
||||
// [id|iconID|name|tags|size|monsterClass|unique|faction|maxHP|maxAP|moveCost|attackCost|attackChance|criticalChance|criticalMultiplier|attackDamage_Min|attackDamage_Max|blockChance|
|
||||
// damageResistance|droplistID|phraseID|
|
||||
// hasHitEffect|onHit_boostHP_Min|onHit_boostHP_Max|onHit_boostAP_Min|onHit_boostAP_Max|onHit_conditionsSource[condition|magnitude|duration|chance|]|onHit_conditionsTarget[condition|magnitude|duration|chance|]|];
|
||||
|
||||
var result = {
|
||||
id: obj.id,
|
||||
iconID: obj.iconID,
|
||||
name: obj.name,
|
||||
spawnGroup: obj.tags,
|
||||
size: obj.size,
|
||||
monsterClass: obj.monsterClass,
|
||||
unique: obj.unique,
|
||||
faction: obj.faction,
|
||||
maxHP: obj.maxHP,
|
||||
maxAP: obj.maxAP,
|
||||
moveCost: obj.moveCost,
|
||||
attackCost: obj.attackCost,
|
||||
attackChance: obj.attackChance,
|
||||
criticalSkill: obj.criticalChance,
|
||||
criticalMultiplier: obj.criticalMultiplier,
|
||||
blockChance: obj.blockChance,
|
||||
damageResistance: obj.damageResistance,
|
||||
droplistID: obj.droplistID,
|
||||
phraseID: obj.phraseID
|
||||
};
|
||||
|
||||
if (obj.attackDamage_Min || obj.attackDamage_Max) {
|
||||
result.attackDamage = {
|
||||
min: (obj.attackDamage_Min || 0),
|
||||
max: (obj.attackDamage_Max || 0)
|
||||
};
|
||||
}
|
||||
|
||||
if (obj.hasHitEffect) {
|
||||
result.hitEffect = {};
|
||||
var e = result.hitEffect;
|
||||
if (obj.onHit_boostHP_Min || obj.onHit_boostHP_Max) {
|
||||
e.increaseCurrentHP = {
|
||||
min: (obj.onHit_boostHP_Min || 0),
|
||||
max: (obj.onHit_boostHP_Max || 0)
|
||||
};
|
||||
}
|
||||
if (obj.onHit_boostAP_Min || obj.onHit_boostAP_Max) {
|
||||
e.increaseCurrentAP = {
|
||||
min: (obj.onHit_boostAP_Min || 0),
|
||||
max: (obj.onHit_boostAP_Max || 0)
|
||||
};
|
||||
}
|
||||
if (obj.onHit_conditionsSource) { e.conditionsSource = obj.onHit_conditionsSource; }
|
||||
if (obj.onHit_conditionsTarget) { e.conditionsTarget = obj.onHit_conditionsTarget; }
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
function convertQuest(obj) {
|
||||
// [id|name|showInLog|stages[progress|logText|rewardExperience|finishesQuest|]|];
|
||||
return obj;
|
||||
}
|
||||
|
||||
function convertItemCategory(obj) {
|
||||
// [id|name|actionType|inventorySlot|size|];
|
||||
return obj;
|
||||
}
|
||||
|
||||
function convertItem(obj) {
|
||||
//[id|iconID|name|category|displaytype|hasManualPrice|baseMarketCost|
|
||||
// hasEquipEffect|equip_boostMaxHP|equip_boostMaxAP|equip_moveCostPenalty|
|
||||
// equip_attackCost|equip_attackChance|equip_criticalChance|equip_criticalMultiplier|equip_attackDamage_Min|equip_attackDamage_Max|equip_blockChance|equip_damageResistance|
|
||||
// equip_conditions[condition|magnitude|]|
|
||||
// hasUseEffect|use_boostHP_Min|use_boostHP_Max|use_boostAP_Min|use_boostAP_Max|use_conditionsSource[condition|magnitude|duration|chance|]|
|
||||
// hasHitEffect|hit_boostHP_Min|hit_boostHP_Max|hit_boostAP_Min|hit_boostAP_Max|hit_conditionsSource[condition|magnitude|duration|chance|]|hit_conditionsTarget[condition|magnitude|duration|chance|]|
|
||||
// hasKillEffect|kill_boostHP_Min|kill_boostHP_Max|kill_boostAP_Min|kill_boostAP_Max|kill_conditionsSource[condition|magnitude|duration|chance|]|];
|
||||
|
||||
var result = {
|
||||
id: obj.id,
|
||||
iconID: obj.iconID,
|
||||
name: obj.name,
|
||||
category: obj.category,
|
||||
displaytype: obj.displaytype,
|
||||
hasManualPrice: obj.hasManualPrice,
|
||||
baseMarketCost: obj.baseMarketCost
|
||||
};
|
||||
|
||||
if (obj.hasEquipEffect) {
|
||||
result.equipEffect = {};
|
||||
var e = result.equipEffect;
|
||||
if (obj.equip_boostMaxHP) { e.increaseMaxHP = obj.equip_boostMaxHP; }
|
||||
if (obj.equip_boostMaxAP) { e.increaseMaxAP = obj.equip_boostMaxAP; }
|
||||
if (obj.equip_moveCostPenalty) { e.increaseMoveCost = obj.equip_moveCostPenalty; }
|
||||
if (obj.equip_attackCost) { e.increaseAttackCost = obj.equip_attackCost; }
|
||||
if (obj.equip_attackChance) { e.increaseAttackChance = obj.equip_attackChance; }
|
||||
if (obj.equip_criticalChance) { e.increaseCriticalSkill = obj.equip_criticalChance; }
|
||||
if (obj.equip_criticalMultiplier) { e.setCriticalMultiplier = obj.equip_criticalMultiplier; }
|
||||
if (obj.equip_attackDamage_Min || obj.equip_attackDamage_Max) {
|
||||
e.increaseAttackDamage = {
|
||||
min: (obj.equip_attackDamage_Min || 0),
|
||||
max: (obj.equip_attackDamage_Max || 0)
|
||||
};
|
||||
}
|
||||
if (obj.equip_blockChance) { e.increaseBlockChance = obj.equip_blockChance; }
|
||||
if (obj.equip_damageResistance) { e.increaseDamageResistance = obj.equip_damageResistance; }
|
||||
}
|
||||
|
||||
if (obj.equip_conditions) {
|
||||
result.equipEffect = result.equipEffect || {};
|
||||
result.equipEffect.addedConditions = obj.equip_conditions;
|
||||
}
|
||||
|
||||
if (obj.hasUseEffect) {
|
||||
result.useEffect = {};
|
||||
var e = result.useEffect;
|
||||
if (obj.use_boostHP_Min || obj.use_boostHP_Max) {
|
||||
e.increaseCurrentHP = {
|
||||
min: (obj.use_boostHP_Min || 0),
|
||||
max: (obj.use_boostHP_Max || 0)
|
||||
};
|
||||
}
|
||||
if (obj.use_boostAP_Min || obj.use_boostAP_Max) {
|
||||
e.increaseCurrentAP = {
|
||||
min: (obj.use_boostAP_Min || 0),
|
||||
max: (obj.use_boostAP_Max || 0)
|
||||
};
|
||||
}
|
||||
if (obj.use_conditionsSource) { e.conditionsSource = obj.use_conditionsSource; }
|
||||
}
|
||||
|
||||
if (obj.hasHitEffect) {
|
||||
result.hitEffect = {};
|
||||
var e = result.hitEffect;
|
||||
if (obj.hit_boostHP_Min || obj.hit_boostHP_Max) {
|
||||
e.increaseCurrentHP = {
|
||||
min: (obj.hit_boostHP_Min || 0),
|
||||
max: (obj.hit_boostHP_Max || 0)
|
||||
};
|
||||
}
|
||||
if (obj.hit_boostAP_Min || obj.hit_boostAP_Max) {
|
||||
e.increaseCurrentAP = {
|
||||
min: (obj.hit_boostAP_Min || 0),
|
||||
max: (obj.hit_boostAP_Max || 0)
|
||||
};
|
||||
}
|
||||
if (obj.hit_conditionsSource) { e.conditionsSource = obj.hit_conditionsSource; }
|
||||
if (obj.hit_conditionsTarget) { e.conditionsTarget = obj.hit_conditionsTarget; }
|
||||
}
|
||||
|
||||
if (obj.hasKillEffect) {
|
||||
result.killEffect = {};
|
||||
var e = result.killEffect;
|
||||
if (obj.kill_boostHP_Min || obj.kill_boostHP_Max) {
|
||||
e.increaseCurrentHP = {
|
||||
min: (obj.kill_boostHP_Min || 0),
|
||||
max: (obj.kill_boostHP_Max || 0)
|
||||
};
|
||||
}
|
||||
if (obj.kill_boostAP_Min || obj.kill_boostAP_Max) {
|
||||
e.increaseCurrentAP = {
|
||||
min: (obj.kill_boostAP_Min || 0),
|
||||
max: (obj.kill_boostAP_Max || 0)
|
||||
};
|
||||
}
|
||||
if (obj.kill_conditionsSource) { e.conditionsSource = obj.kill_conditionsSource; }
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
function convertDroplist(obj) {
|
||||
// [id|items[itemID|quantity_Min|quantity_Max|chance|]|];
|
||||
var result = {
|
||||
id: obj.id,
|
||||
items: _.map(obj.items, function(obj) {
|
||||
return {
|
||||
itemID: obj.itemID,
|
||||
quantity: {
|
||||
min: (obj.quantity_Min || 0),
|
||||
max: (obj.quantity_Max || 0)
|
||||
},
|
||||
chance: obj.chance
|
||||
};
|
||||
})
|
||||
};
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
function convertConversation(obj) {
|
||||
// [id|message|rewards[rewardType|rewardID|value|]|replies[text|nextPhraseID|requires_Progress|requires_itemID|requires_Quantity|requires_Type|]|];
|
||||
|
||||
var result = {
|
||||
id: obj.id,
|
||||
message: obj.message,
|
||||
rewards: obj.rewards
|
||||
};
|
||||
if (obj.replies) {
|
||||
result.replies = _.map(obj.replies, function(obj) {
|
||||
var result = {
|
||||
text: obj.text,
|
||||
nextPhraseID: obj.nextPhraseID
|
||||
};
|
||||
|
||||
if (obj.requires_Progress) {
|
||||
result.requires = [];
|
||||
result.requires.push({
|
||||
requireType: 'questProgress',
|
||||
requireID: obj.requires_Progress
|
||||
});
|
||||
}
|
||||
if (obj.requires_itemID) {
|
||||
result.requires = result.requires || [];
|
||||
result.requires.push({
|
||||
requireType: 1 + obj.requires_Type,
|
||||
requireID: obj.requires_itemID,
|
||||
value: obj.requires_Quantity
|
||||
});
|
||||
}
|
||||
|
||||
return result;
|
||||
});
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
function convertCondition(obj) {
|
||||
// [id|name|iconID|category|isStacking|isPositive|
|
||||
// hasRoundEffect|round_visualEffectID|round_boostHP_Min|round_boostHP_Max|round_boostAP_Min|round_boostAP_Max|
|
||||
// hasFullRoundEffect|fullround_visualEffectID|fullround_boostHP_Min|fullround_boostHP_Max|fullround_boostAP_Min|fullround_boostAP_Max|
|
||||
// hasAbilityEffect|boostMaxHP|boostMaxAP|moveCostPenalty|attackCost|attackChance|criticalChance|criticalMultiplier|attackDamage_Min|attackDamage_Max|blockChance|damageResistance|];
|
||||
|
||||
var result = {
|
||||
id: obj.id,
|
||||
iconID: obj.iconID,
|
||||
name: obj.name,
|
||||
category: obj.category,
|
||||
isStacking: obj.isStacking,
|
||||
isPositive: obj.isPositive
|
||||
};
|
||||
|
||||
if (obj.hasRoundEffect) {
|
||||
result.roundEffect = {};
|
||||
var e = result.roundEffect;
|
||||
if (obj.round_visualEffectID || obj.round_visualEffectID === 0) { e.visualEffectID = obj.round_visualEffectID; }
|
||||
if (obj.round_boostHP_Min || obj.round_boostHP_Max) {
|
||||
e.increaseCurrentHP = {
|
||||
min: (obj.round_boostHP_Min || 0),
|
||||
max: (obj.round_boostHP_Max || 0)
|
||||
};
|
||||
}
|
||||
if (obj.round_boostAP_Min || obj.round_boostAP_Max) {
|
||||
e.increaseCurrentAP = {
|
||||
min: (obj.round_boostAP_Min || 0),
|
||||
max: (obj.round_boostAP_Max || 0)
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
if (obj.hasFullRoundEffect) {
|
||||
result.fullRoundEffect = {};
|
||||
var e = result.fullRoundEffect;
|
||||
if (obj.fullround_visualEffectID || obj.fullround_visualEffectID === 0) { e.visualEffectID = obj.fullround_visualEffectID; }
|
||||
if (obj.fullround_boostHP_Min || obj.fullround_boostHP_Max) {
|
||||
e.increaseCurrentHP = {
|
||||
min: (obj.fullround_boostHP_Min || 0),
|
||||
max: (obj.fullround_boostHP_Max || 0)
|
||||
};
|
||||
}
|
||||
if (obj.fullround_boostAP_Min || obj.fullround_boostAP_Max) {
|
||||
e.increaseCurrentAP = {
|
||||
min: (obj.fullround_boostAP_Min || 0),
|
||||
max: (obj.fullround_boostAP_Max || 0)
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
if (obj.hasAbilityEffect) {
|
||||
result.abilityEffect = {};
|
||||
var e = result.abilityEffect;
|
||||
if (obj.boostMaxHP) { e.increaseMaxHP = obj.boostMaxHP; }
|
||||
if (obj.boostMaxAP) { e.increaseMaxAP = obj.boostMaxAP; }
|
||||
if (obj.moveCostPenalty) { e.increaseMoveCost = obj.moveCostPenalty; }
|
||||
if (obj.attackCost) { e.increaseAttackCost = obj.attackCost; }
|
||||
if (obj.attackChance) { e.increaseAttackChance = obj.attackChance; }
|
||||
if (obj.criticalChance) { e.increaseCriticalSkill = obj.criticalChance; }
|
||||
if (obj.criticalMultiplier) { e.setCriticalMultiplier = obj.criticalMultiplier; }
|
||||
if (obj.attackDamage_Min || obj.attackDamage_Max) {
|
||||
e.increaseAttackDamage = {
|
||||
min: (obj.attackDamage_Min || 0),
|
||||
max: (obj.attackDamage_Max || 0)
|
||||
};
|
||||
}
|
||||
if (obj.blockChance) { e.increaseBlockChance = obj.blockChance; }
|
||||
if (obj.damageResistance) { e.increaseDamageResistance = obj.damageResistance; }
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
return ATEditor;
|
||||
})(ATEditor, ATEditor.model, ATEditor.FieldList, _);
|
||||
@@ -1,51 +0,0 @@
|
||||
var ATEditor = (function(ATEditor, DataStore, FieldList, _) {
|
||||
|
||||
var model = {
|
||||
actorConditions: new DataStore({
|
||||
name: 'Actor Conditions'
|
||||
,id: 'actorcondition'
|
||||
,iconIDField: 'iconID'
|
||||
})
|
||||
,quests: new DataStore({
|
||||
name: 'Quests'
|
||||
,id: 'quest'
|
||||
})
|
||||
,items: new DataStore({
|
||||
name: 'Items'
|
||||
,id: 'item'
|
||||
,iconIDField: 'iconID'
|
||||
})
|
||||
,droplists: new DataStore({
|
||||
name: 'Droplists'
|
||||
,id: 'droplist'
|
||||
,nameField: 'id'
|
||||
})
|
||||
,dialogue: new DataStore({
|
||||
name: 'Dialogue'
|
||||
,id: 'dialogue'
|
||||
,nameField: 'id'
|
||||
})
|
||||
,monsters: new DataStore({
|
||||
name: 'Monsters'
|
||||
,id: 'monster'
|
||||
,iconIDField: 'iconID'
|
||||
})
|
||||
,itemCategories: new DataStore({
|
||||
name: 'Item Categories'
|
||||
,id: 'itemcategory'
|
||||
})
|
||||
};
|
||||
|
||||
var sections = [];
|
||||
var sectionIds = {};
|
||||
for (var key in model) {
|
||||
var ds = model[key];
|
||||
sections.push(ds);
|
||||
sectionIds[ds.id] = ds;
|
||||
}
|
||||
model.sections = sections;
|
||||
model.getSectionFromID = function(id) { return sectionIds[id]; };
|
||||
|
||||
ATEditor.model = ATEditor.model || model;
|
||||
return ATEditor;
|
||||
})(ATEditor, ATEditor.DataStore, ATEditor.FieldList, _);
|
||||
@@ -1,199 +0,0 @@
|
||||
var ATModelFunctions = (function(ATModelFunctions) {
|
||||
|
||||
ATModelFunctions.itemCategoryFunctions = (function() {
|
||||
function isWearableCategory(itemCategory) {
|
||||
if (!itemCategory) { return false; }
|
||||
return itemCategory.actionType == 'equip';
|
||||
}
|
||||
|
||||
function isUsableCategory(itemCategory) {
|
||||
if (!itemCategory) { return false; }
|
||||
return itemCategory.actionType == 'use';
|
||||
}
|
||||
|
||||
function isWeaponCategory(itemCategory) {
|
||||
if (!isWearableCategory(itemCategory)) { return false; }
|
||||
if (itemCategory.inventorySlot != 'weapon') { return false; }
|
||||
return true;
|
||||
}
|
||||
|
||||
function isShieldCategory(itemCategory) {
|
||||
if (!isWearableCategory(itemCategory)) { return false; }
|
||||
if (itemCategory.inventorySlot != 'shield') { return false; }
|
||||
return true;
|
||||
}
|
||||
|
||||
function isArmorCategory(itemCategory) {
|
||||
if (!isWearableCategory(itemCategory)) { return false; }
|
||||
if (itemCategory.inventorySlot == 'head') { return true; }
|
||||
if (itemCategory.inventorySlot == 'body') { return true; }
|
||||
if (itemCategory.inventorySlot == 'hand') { return true; }
|
||||
if (itemCategory.inventorySlot == 'feet') { return true; }
|
||||
return false;
|
||||
}
|
||||
|
||||
return {
|
||||
isWearableCategory: isWearableCategory
|
||||
,isUsableCategory: isUsableCategory
|
||||
,isWeaponCategory: isWeaponCategory
|
||||
,isShieldCategory: isShieldCategory
|
||||
,isArmorCategory: isArmorCategory
|
||||
};
|
||||
})();
|
||||
|
||||
|
||||
ATModelFunctions.itemFunctions = (function(itemCategoryFunctions) {
|
||||
function getItemCost(obj) {
|
||||
if (obj.hasManualPrice == 1) {
|
||||
return obj.baseMarketCost;
|
||||
}
|
||||
return calculateItemCost(obj);
|
||||
}
|
||||
|
||||
function calculateItemCost(obj) {
|
||||
var v = function(i) { return i ? parseFloat(i) : 0; };
|
||||
var sgn = function(v) {
|
||||
if (v < 0) return -1;
|
||||
else if (v > 0) return 1;
|
||||
else return 0;
|
||||
};
|
||||
var avg = function(o) {
|
||||
if (!o) return 0;
|
||||
return (v(o.min) + v(o.max)) / 2;
|
||||
};
|
||||
|
||||
var itemUsageCost = 0;
|
||||
if (obj.useEffect && obj.hasUseEffect) {
|
||||
var averageHPBoost = avg(obj.useEffect.increaseCurrentHP);
|
||||
var costBoostHP = Math.round(0.1*sgn(averageHPBoost)*Math.pow(Math.abs(averageHPBoost), 2) + 3*averageHPBoost);
|
||||
itemUsageCost = costBoostHP;
|
||||
}
|
||||
|
||||
var itemEquipCost = 0;
|
||||
if (obj.equipEffect && obj.hasEquipEffect) {
|
||||
var isWeapon = itemCategoryFunctions.isWeaponCategory(obj.category);
|
||||
|
||||
var equip_blockChance = v(obj.equipEffect.increaseBlockChance);
|
||||
var equip_attackChance = v(obj.equipEffect.increaseAttackChance);
|
||||
var equip_attackCost = v(obj.equipEffect.increaseAttackCost);
|
||||
var equip_damageResistance = v(obj.equipEffect.increaseDamageResistance);
|
||||
var equip_attackDamage_Min = 0;
|
||||
var equip_attackDamage_Max = 0;
|
||||
if (obj.equipEffect.increaseAttackDamage) {
|
||||
equip_attackDamage_Min = v(obj.equipEffect.increaseAttackDamage.min);
|
||||
equip_attackDamage_Max = v(obj.equipEffect.increaseAttackDamage.max);
|
||||
}
|
||||
var equip_criticalChance = v(obj.equipEffect.increaseCriticalSkill);
|
||||
var equip_criticalMultiplier = v(obj.equipEffect.setCriticalMultiplier);
|
||||
var costBC = Math.round(3*Math.pow(Math.max(0,equip_blockChance), 2.5) + 28*equip_blockChance);
|
||||
var costAC = Math.round(0.4*Math.pow(Math.max(0,equip_attackChance), 2.5) - 6*Math.pow(Math.abs(Math.min(0,equip_attackChance)),2.7));
|
||||
var costAP = isWeapon ?
|
||||
Math.round(0.2*Math.pow(10/equip_attackCost, 8) - 25*equip_attackCost)
|
||||
: -3125 * equip_attackCost;
|
||||
var costDR = 1325*equip_damageResistance;
|
||||
var costDMG_Min = isWeapon ?
|
||||
Math.round(10*Math.pow(equip_attackDamage_Min, 2.5))
|
||||
:Math.round(10*Math.pow(equip_attackDamage_Min, 3) + equip_attackDamage_Min*80);
|
||||
var costDMG_Max = isWeapon ?
|
||||
Math.round(2*Math.pow(equip_attackDamage_Max, 2.1))
|
||||
:Math.round(2*Math.pow(equip_attackDamage_Max, 3) + equip_attackDamage_Max*20);
|
||||
var costCC = Math.round(2.2*Math.pow(equip_criticalChance, 3));
|
||||
var costCM = Math.round(50*Math.pow(Math.max(0, equip_criticalMultiplier), 2));
|
||||
var costCombat = costBC + costAC + costAP + costDR + costDMG_Min + costDMG_Max + costCC + costCM;
|
||||
|
||||
var equip_boostMaxHP = v(obj.equipEffect.increaseMaxHP);
|
||||
var equip_boostMaxAP = v(obj.equipEffect.increaseMaxAP);
|
||||
var costMaxHP = Math.round(30*Math.pow(Math.max(0,equip_boostMaxHP), 1.2) + 70*equip_boostMaxHP);
|
||||
var costMaxAP = Math.round(50*Math.pow(Math.max(0,equip_boostMaxAP), 3) + 750*equip_boostMaxAP);
|
||||
|
||||
var equip_moveCostPenalty = v(obj.equipEffect.increaseMoveCost);
|
||||
var equip_useItemCostPenalty = v(obj.equipEffect.increaseUseItemCost);
|
||||
var equip_reequipCostPenalty = v(obj.equipEffect.increaseReequipCost);
|
||||
var costMovement = Math.round(510*Math.pow(Math.max(0,-equip_moveCostPenalty), 2.5) - 350*equip_moveCostPenalty);
|
||||
var costUseItem = Math.round(915*Math.pow(Math.max(0,-equip_useItemCostPenalty), 3) - 430*equip_useItemCostPenalty);
|
||||
var costReequip = Math.round(450*Math.pow(Math.max(0,-equip_reequipCostPenalty), 2) - 250*equip_reequipCostPenalty);
|
||||
var costAPModifiers = costMovement + costUseItem + costReequip;
|
||||
|
||||
itemEquipCost = costCombat + costMaxHP + costMaxAP + costAPModifiers;
|
||||
}
|
||||
|
||||
var hitEffectsCost = 0;
|
||||
if (obj.hitEffect && obj.hasHitEffect) {
|
||||
var averageHPBoost = avg(obj.hitEffect.increaseCurrentHP);
|
||||
var averageAPBoost = avg(obj.hitEffect.increaseCurrentAP);
|
||||
var costBoostHP = Math.round(2770*Math.pow(Math.max(0,averageHPBoost), 2.5) + 450*averageHPBoost);
|
||||
var costBoostAP = Math.round(3100*Math.pow(Math.max(0,averageAPBoost), 2.5) + 300*averageAPBoost);
|
||||
hitEffectsCost = costBoostHP + costBoostAP;
|
||||
}
|
||||
|
||||
var killEffectsCost = 0;
|
||||
if (obj.killEffect && obj.hasKillEffect) {
|
||||
var averageHPBoost = avg(obj.killEffect.increaseCurrentHP);
|
||||
var averageAPBoost = avg(obj.killEffect.increaseCurrentAP);
|
||||
var costBoostHP = Math.round(923*Math.pow(Math.max(0,averageHPBoost), 2.5) + 450*averageHPBoost);
|
||||
var costBoostAP = Math.round(1033*Math.pow(Math.max(0,averageAPBoost), 2.5) + 300*averageAPBoost);
|
||||
killEffectsCost = costBoostHP + costBoostAP;
|
||||
}
|
||||
|
||||
var result = itemEquipCost + itemUsageCost + hitEffectsCost + killEffectsCost;
|
||||
if (result <= 0) { result = 1; }
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
function getItemSellingCost(item) {
|
||||
var cost = getItemCost(item);
|
||||
return Math.round(cost * (100 + 15) / 100);
|
||||
}
|
||||
|
||||
function getItemBuyingCost(item) {
|
||||
var cost = getItemCost(item);
|
||||
return Math.round(cost * (100 - 15) / 100);
|
||||
}
|
||||
|
||||
return {
|
||||
getItemCost: getItemCost
|
||||
,calculateItemCost: calculateItemCost
|
||||
,getItemSellingCost: getItemSellingCost
|
||||
,getItemBuyingCost: getItemBuyingCost
|
||||
};
|
||||
})(ATModelFunctions.itemCategoryFunctions);
|
||||
|
||||
|
||||
ATModelFunctions.monsterFunctions = (function() {
|
||||
function getMonsterExperience(obj) {
|
||||
var EXP_FACTOR_DAMAGERESISTANCE = 9;
|
||||
var EXP_FACTOR_SCALING = 0.7;
|
||||
|
||||
var div100 = function(v) { return v / 100; }
|
||||
var v = function(i) { return i ? parseFloat(i) : 0; }
|
||||
|
||||
var attacksPerTurn = Math.floor(v(obj.maxAP) / v(obj.attackCost));
|
||||
var avgDamagePotential = 0;
|
||||
if (obj.attackDamage) {
|
||||
avgDamagePotential = (v(obj.attackDamage.min) + v(obj.attackDamage.max)) / 2;
|
||||
}
|
||||
var avgCrit = 0;
|
||||
if (obj.hasCritical) {
|
||||
avgCrit = div100(v(obj.criticalSkill)) * v(obj.criticalMultiplier);
|
||||
}
|
||||
var avgAttackHP = attacksPerTurn * div100(v(obj.attackChance)) * avgDamagePotential * (1 + avgCrit);
|
||||
var avgDefenseHP = v(obj.maxHP) * (1 + div100(v(obj.blockChance))) + EXP_FACTOR_DAMAGERESISTANCE * v(obj.damageResistance);
|
||||
var attackConditionBonus = 0;
|
||||
if (obj.hitEffect && obj.hitEffect.conditionsTarget && v(obj.hitEffect.conditionsTarget.length) > 0) {
|
||||
attackConditionBonus = 50;
|
||||
}
|
||||
var experience = (avgAttackHP * 3 + avgDefenseHP) * EXP_FACTOR_SCALING + attackConditionBonus;
|
||||
|
||||
return Math.ceil(experience);
|
||||
};
|
||||
|
||||
return {
|
||||
getMonsterExperience: getMonsterExperience
|
||||
};
|
||||
})();
|
||||
|
||||
return ATModelFunctions;
|
||||
})(ATModelFunctions || {});
|
||||
|
||||
if (typeof module != 'undefined') { module.exports = ATModelFunctions; }
|
||||
@@ -1,6 +0,0 @@
|
||||
var ATEditor = (function(ATEditor) {
|
||||
|
||||
ATEditor.settings = ATEditor.settings || {};
|
||||
|
||||
return ATEditor;
|
||||
})(ATEditor);
|
||||
@@ -1,165 +0,0 @@
|
||||
var ATEditor = (function(ATEditor, utils) {
|
||||
|
||||
function TilesetImage(options) {
|
||||
var defaultOptions = {
|
||||
numTiles: { x: 1, y: 1 }
|
||||
,tileSize: { x: 32, y: 32 }
|
||||
,usedFor: []
|
||||
};
|
||||
_.defaults(options, defaultOptions);
|
||||
|
||||
this._name = options.name;
|
||||
this._numTiles = options.numTiles;
|
||||
this._tileSize = options.tileSize;
|
||||
this._usedFor = options.usedFor;
|
||||
|
||||
this.localIDToCoords = function(localID) {
|
||||
return {
|
||||
x: (localID % this._numTiles.x) * this._tileSize.x,
|
||||
y: Math.floor(localID / this._numTiles.x) * this._tileSize.y
|
||||
}
|
||||
}
|
||||
this.coordsToLocalID = function(x, y) {
|
||||
return Math.floor(x / this._tileSize.x)
|
||||
+ this._numTiles.x * Math.floor(y / this._tileSize.y)
|
||||
}
|
||||
}
|
||||
|
||||
var defaultImagePath = utils.getUrlRelativeToBaseSrcDir("AndorsTrail/res/drawable/");
|
||||
|
||||
var defaultimage = {
|
||||
tilesetName: 'defaultimage',
|
||||
localID: 0,
|
||||
path: ''
|
||||
};
|
||||
var defaultTileset = new TilesetImage({name: defaultimage.tilesetName });
|
||||
|
||||
var _tilesets = {};
|
||||
_tilesets[defaultimage.tilesetName] = defaultTileset;
|
||||
|
||||
var getTileset = function(name) {
|
||||
var result = _tilesets[name];
|
||||
if (!result) { return defaultTileset; }
|
||||
return result;
|
||||
}
|
||||
|
||||
var parseImageID = function(str) {
|
||||
if (!str || str == "") return defaultimage;
|
||||
var v = str.split(":");
|
||||
if (v.length < 1) return defaultimage;
|
||||
return {
|
||||
tilesetName: v[0],
|
||||
localID: v[1],
|
||||
path: defaultImagePath
|
||||
};
|
||||
}
|
||||
|
||||
var createImageID = function(tilesetName, localID) {
|
||||
if (!tilesetName) return "";
|
||||
return tilesetName + ":" + localID;
|
||||
}
|
||||
|
||||
|
||||
var add = function(tilesetName, numTiles, usedFor, tileSize) {
|
||||
_tilesets[tilesetName] = new TilesetImage({
|
||||
name: tilesetName
|
||||
,numTiles: numTiles
|
||||
,tileSize: tileSize
|
||||
,usedFor: usedFor
|
||||
});
|
||||
}
|
||||
|
||||
var getTilesetsForSection = function(section) {
|
||||
return _.filter(_tilesets, function(tileset) {
|
||||
return _.contains(tileset._usedFor, section);
|
||||
});
|
||||
}
|
||||
var getIconIDsForSection = function(section) {
|
||||
var result = [];
|
||||
_.each(getTilesetsForSection(section), function(tileset) {
|
||||
for(var i = 0; i < tileset._numTiles.y * tileset._numTiles.x; i++) {
|
||||
result.push(createImageID(tileset._name, i));
|
||||
}
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
add("actorconditions_1", {x:14, y:8}, [ 'actorcondition' ] );
|
||||
add("actorconditions_2", {x:3, y:1}, [ 'actorcondition' ] );
|
||||
add("items_armours", {x:14, y:3}, [ 'item' ] );
|
||||
add("items_armours_3", {x:10, y:4}, [ 'item' ] );
|
||||
add("items_armours_2", {x:7, y:1}, [ 'item' ] );
|
||||
add("items_weapons", {x:14, y:6}, [ 'item' ] );
|
||||
add("items_weapons_3", {x:13, y:5}, [ 'item' ] );
|
||||
add("items_weapons_2", {x:7, y:1}, [ 'item' ] );
|
||||
add("items_jewelry", {x:14, y:1}, [ 'item' ] );
|
||||
add("items_rings_1", {x:10, y:3}, [ 'item' ] );
|
||||
add("items_necklaces_1", {x:10, y:3}, [ 'item' ] );
|
||||
add("items_consumables", {x:14, y:5}, [ 'item' ] );
|
||||
add("items_books", {x:11, y:1}, [ 'item' ] );
|
||||
add("items_misc", {x:14, y:4}, [ 'item' ] );
|
||||
add("items_misc_2", {x:20, y:12}, [ 'item' ] );
|
||||
add("items_misc_3", {x:20, y:12}, [ 'item' ] );
|
||||
add("items_misc_4", {x:20, y:4}, [ 'item' ] );
|
||||
add("items_misc_5", {x:9, y:5}, [ 'item' ] );
|
||||
add("items_misc_6", {x:9, y:4}, [ 'item' ] );
|
||||
add("items_reterski_1", {x:3, y:10}, [ 'item' ] );
|
||||
add("items_tometik1", {x:6, y:10}, [ 'item' ] );
|
||||
add("items_tometik2", {x:10, y:10}, [ 'item' ] );
|
||||
add("items_tometik3", {x:8, y:6}, [ 'item' ] );
|
||||
add("monsters_armor1", {x: 1, y:1}, [ 'monster' ] );
|
||||
add("monsters_dogs", {x: 7, y:1}, [ 'monster' ] );
|
||||
add("monsters_eye1", {x: 1, y:1}, [ 'monster' ] );
|
||||
add("monsters_eye2", {x: 1, y:1}, [ 'monster' ] );
|
||||
add("monsters_eye3", {x: 1, y:1}, [ 'monster' ] );
|
||||
add("monsters_eye4", {x: 1, y:1}, [ 'monster' ] );
|
||||
add("monsters_ghost1", {x: 1, y:1}, [ 'monster' ] );
|
||||
add("monsters_hydra1", {x: 1, y:1}, [ 'monster' ], {x:64, y:64} );
|
||||
add("monsters_insects", {x: 6, y:1}, [ 'monster' ] );
|
||||
add("monsters_liches", {x: 4, y:1}, [ 'monster' ] );
|
||||
add("monsters_mage", {x: 1, y:1}, [ 'monster' ] );
|
||||
add("monsters_mage2", {x: 1, y:1}, [ 'monster' ] );
|
||||
add("monsters_man1", {x: 1, y:1}, [ 'monster' ] );
|
||||
add("monsters_men", {x: 9, y:1}, [ 'monster' ] );
|
||||
add("monsters_men2", {x: 10, y:1}, [ 'monster' ] );
|
||||
add("monsters_misc", {x: 12, y:1}, [ 'monster' ] );
|
||||
add("monsters_rats", {x: 5, y:1}, [ 'monster' ] );
|
||||
add("monsters_rogue1", {x: 1, y:1}, [ 'monster' ] );
|
||||
add("monsters_skeleton1", {x: 1, y:1}, [ 'monster' ] );
|
||||
add("monsters_skeleton2", {x: 1, y:1}, [ 'monster' ] );
|
||||
add("monsters_snakes", {x: 6, y:1}, [ 'monster' ] );
|
||||
add("monsters_warrior1", {x: 1, y:1}, [ 'monster' ] );
|
||||
add("monsters_wraiths", {x: 3, y:1}, [ 'monster' ] );
|
||||
add("monsters_zombie1", {x: 1, y:1}, [ 'monster' ] );
|
||||
add("monsters_zombie2", {x: 1, y:1}, [ 'monster' ] );
|
||||
add("monsters_karvis1", {x: 2, y:1}, [ 'monster' ] );
|
||||
add("monsters_karvis2", {x: 9, y:1}, [ 'monster' ] );
|
||||
add("monsters_rltiles1", {x:20, y:8}, [ 'monster' ] );
|
||||
add("monsters_rltiles2", {x:20, y:9}, [ 'monster' ] );
|
||||
add("monsters_rltiles3", {x:10, y:3}, [ 'monster' ] );
|
||||
add("monsters_rltiles4", {x:12, y:4}, [ 'monster' ] );
|
||||
add("monsters_redshrike1", {x:7, y:1}, [ 'monster' ] );
|
||||
add("monsters_ld1", {x:20, y:12}, [ 'monster' ] );
|
||||
add("monsters_ld2", {x:20, y:12}, [ 'monster' ] );
|
||||
add("monsters_tometik1", {x:10, y:9}, [ 'monster' ] );
|
||||
add("monsters_tometik2", {x:8, y:10}, [ 'monster' ] );
|
||||
add("monsters_tometik3", {x:6, y:13}, [ 'monster' ] );
|
||||
add("monsters_tometik4", {x:6, y:13}, [ 'monster' ] );
|
||||
add("monsters_tometik5", {x:6, y:16}, [ 'monster' ] );
|
||||
add("monsters_tometik6", {x:7, y:6}, [ 'monster' ] );
|
||||
add("monsters_tometik7", {x:8, y:11}, [ 'monster' ] );
|
||||
add("monsters_tometik8", {x:7, y:9}, [ 'monster' ] );
|
||||
add("monsters_tometik9", {x:8, y:8}, [ 'monster' ] );
|
||||
add("monsters_tometik10", {x:6, y:13}, [ 'monster' ] );
|
||||
add("monsters_demon1", {x:1, y:1}, [ 'monster' ], {x:64, y:64} );
|
||||
add("monsters_demon2", {x:1, y:1}, [ 'monster' ], {x:64, y:64} );
|
||||
add("monsters_cyclops", {x:1, y:1}, [ 'monster' ], {x:64, y:96} );
|
||||
|
||||
ATEditor.tilesets = {
|
||||
getTileset: getTileset
|
||||
,parseImageID: parseImageID
|
||||
,createImageID: createImageID
|
||||
,getIconIDsForSection: getIconIDsForSection
|
||||
};
|
||||
return ATEditor;
|
||||
})(ATEditor, ATEditor.utils);
|
||||
@@ -1,138 +0,0 @@
|
||||
var ATEditor = (function(ATEditor, _) {
|
||||
|
||||
function deepClone(o) {
|
||||
// https://github.com/documentcloud/underscore/issues/162
|
||||
return JSON.parse(JSON.stringify(o));
|
||||
}
|
||||
|
||||
function removeDefaults(o, defaults) {
|
||||
for (var key in defaults) {
|
||||
if (o[key] === defaults[key]) {
|
||||
delete o[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function copyDefaults(o, defaults) {
|
||||
var key;
|
||||
for (key in defaults) {
|
||||
var v = defaults[key];
|
||||
if ((!o[key]) && (o[key] !== 0)) {
|
||||
o[key] = v;
|
||||
} else if (_.isObject(v)) {
|
||||
copyDefaults(o[key], v);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function removeAngularFields(o) {
|
||||
var key;
|
||||
for (key in o) {
|
||||
var v = o[key];
|
||||
if (key.charAt(0) === '$') {
|
||||
delete o[key];
|
||||
} else if (_.isArray(v) || _.isObject(v)) {
|
||||
removeAngularFields(v);
|
||||
}
|
||||
}
|
||||
}
|
||||
function compact(o) {
|
||||
if (!o) { return null; }
|
||||
var key;
|
||||
for (key in o) {
|
||||
var v = o[key];
|
||||
if (_.isArray(v)) {
|
||||
v = _.map(v, compact);
|
||||
} else if (_.isObject(v)) {
|
||||
v = compact(v);
|
||||
}
|
||||
if (!hasValues(v)) {
|
||||
delete o[key];
|
||||
} else {
|
||||
o[key] = v;
|
||||
}
|
||||
}
|
||||
if (!hasValues(o)) { return null; }
|
||||
return o;
|
||||
}
|
||||
|
||||
function hasValues(o) {
|
||||
if (_.isArray(o)) {
|
||||
return _.some(o, hasValues);
|
||||
} else if (_.isObject(o)) {
|
||||
var key;
|
||||
for (key in o) {
|
||||
if (hasValues(o[key])) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return o;
|
||||
}
|
||||
|
||||
function isNumber(s) {
|
||||
if (!_.isString(s)) { return false; }
|
||||
var v = parseInt(s);
|
||||
if (_.isNaN(v)) { return false; }
|
||||
return (v.toString() == s);
|
||||
}
|
||||
|
||||
function convertStringsToIntegers(o) {
|
||||
var key;
|
||||
for (key in o) {
|
||||
var v = o[key];
|
||||
if (isNumber(v)) {
|
||||
o[key] = parseInt(v);
|
||||
} else if (_.isArray(v)) {
|
||||
convertStringsToIntegers(v);
|
||||
} else if (_.isObject(v)) {
|
||||
convertStringsToIntegers(v);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function convertIntegersToStrings(o) {
|
||||
var key;
|
||||
for (key in o) {
|
||||
var v = o[key];
|
||||
if (_.isNumber(v)) {
|
||||
o[key] = String(v);
|
||||
} else if (_.isArray(v)) {
|
||||
convertIntegersToStrings(v);
|
||||
} else if (_.isObject(v)) {
|
||||
convertIntegersToStrings(v);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
_.toBool = function(b) {
|
||||
return b ? true : false;
|
||||
};
|
||||
|
||||
function getUrlRelativeToBaseSrcDir(relativeUrl) {
|
||||
var url = document.location.href;
|
||||
var idx = url.lastIndexOf('#');
|
||||
if (idx > 0) {
|
||||
url = url.substring(0, idx);
|
||||
}
|
||||
url = url.substring(0, url.lastIndexOf('/'));
|
||||
url = url.substring(0, url.lastIndexOf('/'));
|
||||
url = url + "/" + relativeUrl;
|
||||
return url;
|
||||
}
|
||||
|
||||
ATEditor.utils = {
|
||||
deepClone: deepClone
|
||||
,removeDefaults: removeDefaults
|
||||
,copyDefaults: copyDefaults
|
||||
,removeAngularFields: removeAngularFields
|
||||
,compact: compact
|
||||
,hasValues: hasValues
|
||||
,convertStringsToIntegers: convertStringsToIntegers
|
||||
,convertIntegersToStrings: convertIntegersToStrings
|
||||
,getUrlRelativeToBaseSrcDir: getUrlRelativeToBaseSrcDir
|
||||
};
|
||||
|
||||
return ATEditor;
|
||||
})(ATEditor || {}, _);
|
||||
159
AndorsTrailEdit/lib/angular.min.js
vendored
@@ -1,159 +0,0 @@
|
||||
/*
|
||||
AngularJS v1.0.3
|
||||
(c) 2010-2012 Google, Inc. http://angularjs.org
|
||||
License: MIT
|
||||
*/
|
||||
(function(U,ca,p){'use strict';function m(b,a,c){var d;if(b)if(N(b))for(d in b)d!="prototype"&&d!="length"&&d!="name"&&b.hasOwnProperty(d)&&a.call(c,b[d],d);else if(b.forEach&&b.forEach!==m)b.forEach(a,c);else if(L(b)&&wa(b.length))for(d=0;d<b.length;d++)a.call(c,b[d],d);else for(d in b)b.hasOwnProperty(d)&&a.call(c,b[d],d);return b}function lb(b){var a=[],c;for(c in b)b.hasOwnProperty(c)&&a.push(c);return a.sort()}function ec(b,a,c){for(var d=lb(b),e=0;e<d.length;e++)a.call(c,b[d[e]],d[e]);return d}
|
||||
function mb(b){return function(a,c){b(c,a)}}function xa(){for(var b=Z.length,a;b;){b--;a=Z[b].charCodeAt(0);if(a==57)return Z[b]="A",Z.join("");if(a==90)Z[b]="0";else return Z[b]=String.fromCharCode(a+1),Z.join("")}Z.unshift("0");return Z.join("")}function x(b){m(arguments,function(a){a!==b&&m(a,function(a,d){b[d]=a})});return b}function G(b){return parseInt(b,10)}function ya(b,a){return x(new (x(function(){},{prototype:b})),a)}function D(){}function ma(b){return b}function I(b){return function(){return b}}
|
||||
function t(b){return typeof b=="undefined"}function v(b){return typeof b!="undefined"}function L(b){return b!=null&&typeof b=="object"}function F(b){return typeof b=="string"}function wa(b){return typeof b=="number"}function na(b){return Sa.apply(b)=="[object Date]"}function J(b){return Sa.apply(b)=="[object Array]"}function N(b){return typeof b=="function"}function oa(b){return b&&b.document&&b.location&&b.alert&&b.setInterval}function R(b){return F(b)?b.replace(/^\s*/,"").replace(/\s*$/,""):b}function fc(b){return b&&
|
||||
(b.nodeName||b.bind&&b.find)}function Ta(b,a,c){var d=[];m(b,function(b,g,i){d.push(a.call(c,b,g,i))});return d}function gc(b,a){var c=0,d;if(J(b)||F(b))return b.length;else if(L(b))for(d in b)(!a||b.hasOwnProperty(d))&&c++;return c}function za(b,a){if(b.indexOf)return b.indexOf(a);for(var c=0;c<b.length;c++)if(a===b[c])return c;return-1}function Ua(b,a){var c=za(b,a);c>=0&&b.splice(c,1);return a}function V(b,a){if(oa(b)||b&&b.$evalAsync&&b.$watch)throw B("Can't copy Window or Scope");if(a){if(b===
|
||||
a)throw B("Can't copy equivalent objects or arrays");if(J(b)){for(;a.length;)a.pop();for(var c=0;c<b.length;c++)a.push(V(b[c]))}else for(c in m(a,function(b,c){delete a[c]}),b)a[c]=V(b[c])}else(a=b)&&(J(b)?a=V(b,[]):na(b)?a=new Date(b.getTime()):L(b)&&(a=V(b,{})));return a}function hc(b,a){var a=a||{},c;for(c in b)b.hasOwnProperty(c)&&c.substr(0,2)!=="$$"&&(a[c]=b[c]);return a}function ha(b,a){if(b===a)return!0;if(b===null||a===null)return!1;if(b!==b&&a!==a)return!0;var c=typeof b,d;if(c==typeof a&&
|
||||
c=="object")if(J(b)){if((c=b.length)==a.length){for(d=0;d<c;d++)if(!ha(b[d],a[d]))return!1;return!0}}else if(na(b))return na(a)&&b.getTime()==a.getTime();else{if(b&&b.$evalAsync&&b.$watch||a&&a.$evalAsync&&a.$watch||oa(b)||oa(a))return!1;c={};for(d in b){if(d.charAt(0)!=="$"&&!N(b[d])&&!ha(b[d],a[d]))return!1;c[d]=!0}for(d in a)if(!c[d]&&d.charAt(0)!=="$"&&!N(a[d]))return!1;return!0}return!1}function Va(b,a){var c=arguments.length>2?ia.call(arguments,2):[];return N(a)&&!(a instanceof RegExp)?c.length?
|
||||
function(){return arguments.length?a.apply(b,c.concat(ia.call(arguments,0))):a.apply(b,c)}:function(){return arguments.length?a.apply(b,arguments):a.call(b)}:a}function ic(b,a){var c=a;/^\$+/.test(b)?c=p:oa(a)?c="$WINDOW":a&&ca===a?c="$DOCUMENT":a&&a.$evalAsync&&a.$watch&&(c="$SCOPE");return c}function da(b,a){return JSON.stringify(b,ic,a?" ":null)}function nb(b){return F(b)?JSON.parse(b):b}function Wa(b){b&&b.length!==0?(b=E(""+b),b=!(b=="f"||b=="0"||b=="false"||b=="no"||b=="n"||b=="[]")):b=!1;
|
||||
return b}function pa(b){b=u(b).clone();try{b.html("")}catch(a){}return u("<div>").append(b).html().match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,function(a,b){return"<"+E(b)})}function Xa(b){var a={},c,d;m((b||"").split("&"),function(b){b&&(c=b.split("="),d=decodeURIComponent(c[0]),a[d]=v(c[1])?decodeURIComponent(c[1]):!0)});return a}function ob(b){var a=[];m(b,function(b,d){a.push(Ya(d,!0)+(b===!0?"":"="+Ya(b,!0)))});return a.length?a.join("&"):""}function Za(b){return Ya(b,!0).replace(/%26/gi,"&").replace(/%3D/gi,
|
||||
"=").replace(/%2B/gi,"+")}function Ya(b,a){return encodeURIComponent(b).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(a?null:/%20/g,"+")}function jc(b,a){function c(a){a&&d.push(a)}var d=[b],e,g,i=["ng:app","ng-app","x-ng-app","data-ng-app"],f=/\sng[:\-]app(:\s*([\w\d_]+);?)?\s/;m(i,function(a){i[a]=!0;c(ca.getElementById(a));a=a.replace(":","\\:");b.querySelectorAll&&(m(b.querySelectorAll("."+a),c),m(b.querySelectorAll("."+a+"\\:"),c),m(b.querySelectorAll("["+
|
||||
a+"]"),c))});m(d,function(a){if(!e){var b=f.exec(" "+a.className+" ");b?(e=a,g=(b[2]||"").replace(/\s+/g,",")):m(a.attributes,function(b){if(!e&&i[b.name])e=a,g=b.value})}});e&&a(e,g?[g]:[])}function pb(b,a){b=u(b);a=a||[];a.unshift(["$provide",function(a){a.value("$rootElement",b)}]);a.unshift("ng");var c=qb(a);c.invoke(["$rootScope","$rootElement","$compile","$injector",function(a,b,c,i){a.$apply(function(){b.data("$injector",i);c(b)(a)})}]);return c}function $a(b,a){a=a||"_";return b.replace(kc,
|
||||
function(b,d){return(d?a:"")+b.toLowerCase()})}function qa(b,a,c){if(!b)throw new B("Argument '"+(a||"?")+"' is "+(c||"required"));return b}function ra(b,a,c){c&&J(b)&&(b=b[b.length-1]);qa(N(b),a,"not a function, got "+(b&&typeof b=="object"?b.constructor.name||"Object":typeof b));return b}function lc(b){function a(a,b,e){return a[b]||(a[b]=e())}return a(a(b,"angular",Object),"module",function(){var b={};return function(d,e,g){e&&b.hasOwnProperty(d)&&(b[d]=null);return a(b,d,function(){function a(c,
|
||||
d,e){return function(){b[e||"push"]([c,d,arguments]);return j}}if(!e)throw B("No module: "+d);var b=[],c=[],k=a("$injector","invoke"),j={_invokeQueue:b,_runBlocks:c,requires:e,name:d,provider:a("$provide","provider"),factory:a("$provide","factory"),service:a("$provide","service"),value:a("$provide","value"),constant:a("$provide","constant","unshift"),filter:a("$filterProvider","register"),controller:a("$controllerProvider","register"),directive:a("$compileProvider","directive"),config:k,run:function(a){c.push(a);
|
||||
return this}};g&&k(g);return j})}})}function rb(b){return b.replace(mc,function(a,b,d,e){return e?d.toUpperCase():d}).replace(nc,"Moz$1")}function ab(b,a){function c(){var e;for(var b=[this],c=a,i,f,h,k,j,l;b.length;){i=b.shift();f=0;for(h=i.length;f<h;f++){k=u(i[f]);c?k.triggerHandler("$destroy"):c=!c;j=0;for(e=(l=k.children()).length,k=e;j<k;j++)b.push(ja(l[j]))}}return d.apply(this,arguments)}var d=ja.fn[b],d=d.$original||d;c.$original=d;ja.fn[b]=c}function Q(b){if(b instanceof Q)return b;if(!(this instanceof
|
||||
Q)){if(F(b)&&b.charAt(0)!="<")throw B("selectors not implemented");return new Q(b)}if(F(b)){var a=ca.createElement("div");a.innerHTML="<div> </div>"+b;a.removeChild(a.firstChild);bb(this,a.childNodes);this.remove()}else bb(this,b)}function cb(b){return b.cloneNode(!0)}function sa(b){sb(b);for(var a=0,b=b.childNodes||[];a<b.length;a++)sa(b[a])}function tb(b,a,c){var d=$(b,"events");$(b,"handle")&&(t(a)?m(d,function(a,c){db(b,c,a);delete d[c]}):t(c)?(db(b,a,d[a]),delete d[a]):Ua(d[a],c))}function sb(b){var a=
|
||||
b[Aa],c=Ba[a];c&&(c.handle&&(c.events.$destroy&&c.handle({},"$destroy"),tb(b)),delete Ba[a],b[Aa]=p)}function $(b,a,c){var d=b[Aa],d=Ba[d||-1];if(v(c))d||(b[Aa]=d=++oc,d=Ba[d]={}),d[a]=c;else return d&&d[a]}function ub(b,a,c){var d=$(b,"data"),e=v(c),g=!e&&v(a),i=g&&!L(a);!d&&!i&&$(b,"data",d={});if(e)d[a]=c;else if(g)if(i)return d&&d[a];else x(d,a);else return d}function Ca(b,a){return(" "+b.className+" ").replace(/[\n\t]/g," ").indexOf(" "+a+" ")>-1}function vb(b,a){a&&m(a.split(" "),function(a){b.className=
|
||||
R((" "+b.className+" ").replace(/[\n\t]/g," ").replace(" "+R(a)+" "," "))})}function wb(b,a){a&&m(a.split(" "),function(a){if(!Ca(b,a))b.className=R(b.className+" "+R(a))})}function bb(b,a){if(a)for(var a=!a.nodeName&&v(a.length)&&!oa(a)?a:[a],c=0;c<a.length;c++)b.push(a[c])}function xb(b,a){return Da(b,"$"+(a||"ngController")+"Controller")}function Da(b,a,c){b=u(b);for(b[0].nodeType==9&&(b=b.find("html"));b.length;){if(c=b.data(a))return c;b=b.parent()}}function yb(b,a){var c=Ea[a.toLowerCase()];
|
||||
return c&&zb[b.nodeName]&&c}function pc(b,a){var c=function(c,e){if(!c.preventDefault)c.preventDefault=function(){c.returnValue=!1};if(!c.stopPropagation)c.stopPropagation=function(){c.cancelBubble=!0};if(!c.target)c.target=c.srcElement||ca;if(t(c.defaultPrevented)){var g=c.preventDefault;c.preventDefault=function(){c.defaultPrevented=!0;g.call(c)};c.defaultPrevented=!1}c.isDefaultPrevented=function(){return c.defaultPrevented};m(a[e||c.type],function(a){a.call(b,c)});aa<=8?(c.preventDefault=null,
|
||||
c.stopPropagation=null,c.isDefaultPrevented=null):(delete c.preventDefault,delete c.stopPropagation,delete c.isDefaultPrevented)};c.elem=b;return c}function ga(b){var a=typeof b,c;if(a=="object"&&b!==null)if(typeof(c=b.$$hashKey)=="function")c=b.$$hashKey();else{if(c===p)c=b.$$hashKey=xa()}else c=b;return a+":"+c}function Fa(b){m(b,this.put,this)}function eb(){}function Ab(b){var a,c;if(typeof b=="function"){if(!(a=b.$inject))a=[],c=b.toString().replace(qc,""),c=c.match(rc),m(c[1].split(sc),function(b){b.replace(tc,
|
||||
function(b,c,d){a.push(d)})}),b.$inject=a}else J(b)?(c=b.length-1,ra(b[c],"fn"),a=b.slice(0,c)):ra(b,"fn",!0);return a}function qb(b){function a(a){return function(b,c){if(L(b))m(b,mb(a));else return a(b,c)}}function c(a,b){N(b)&&(b=l.instantiate(b));if(!b.$get)throw B("Provider "+a+" must define $get factory method.");return j[a+f]=b}function d(a,b){return c(a,{$get:b})}function e(a){var b=[];m(a,function(a){if(!k.get(a))if(k.put(a,!0),F(a)){var c=ta(a);b=b.concat(e(c.requires)).concat(c._runBlocks);
|
||||
try{for(var d=c._invokeQueue,c=0,f=d.length;c<f;c++){var h=d[c],g=h[0]=="$injector"?l:l.get(h[0]);g[h[1]].apply(g,h[2])}}catch(n){throw n.message&&(n.message+=" from "+a),n;}}else if(N(a))try{b.push(l.invoke(a))}catch(i){throw i.message&&(i.message+=" from "+a),i;}else if(J(a))try{b.push(l.invoke(a))}catch(j){throw j.message&&(j.message+=" from "+String(a[a.length-1])),j;}else ra(a,"module")});return b}function g(a,b){function c(d){if(typeof d!=="string")throw B("Service name expected");if(a.hasOwnProperty(d)){if(a[d]===
|
||||
i)throw B("Circular dependency: "+h.join(" <- "));return a[d]}else try{return h.unshift(d),a[d]=i,a[d]=b(d)}finally{h.shift()}}function d(a,b,e){var f=[],k=Ab(a),g,n,i;n=0;for(g=k.length;n<g;n++)i=k[n],f.push(e&&e.hasOwnProperty(i)?e[i]:c(i,h));a.$inject||(a=a[g]);switch(b?-1:f.length){case 0:return a();case 1:return a(f[0]);case 2:return a(f[0],f[1]);case 3:return a(f[0],f[1],f[2]);case 4:return a(f[0],f[1],f[2],f[3]);case 5:return a(f[0],f[1],f[2],f[3],f[4]);case 6:return a(f[0],f[1],f[2],f[3],
|
||||
f[4],f[5]);case 7:return a(f[0],f[1],f[2],f[3],f[4],f[5],f[6]);case 8:return a(f[0],f[1],f[2],f[3],f[4],f[5],f[6],f[7]);case 9:return a(f[0],f[1],f[2],f[3],f[4],f[5],f[6],f[7],f[8]);case 10:return a(f[0],f[1],f[2],f[3],f[4],f[5],f[6],f[7],f[8],f[9]);default:return a.apply(b,f)}}return{invoke:d,instantiate:function(a,b){var c=function(){},e;c.prototype=(J(a)?a[a.length-1]:a).prototype;c=new c;e=d(a,c,b);return L(e)?e:c},get:c,annotate:Ab}}var i={},f="Provider",h=[],k=new Fa,j={$provide:{provider:a(c),
|
||||
factory:a(d),service:a(function(a,b){return d(a,["$injector",function(a){return a.instantiate(b)}])}),value:a(function(a,b){return d(a,I(b))}),constant:a(function(a,b){j[a]=b;o[a]=b}),decorator:function(a,b){var c=l.get(a+f),d=c.$get;c.$get=function(){var a=r.invoke(d,c);return r.invoke(b,null,{$delegate:a})}}}},l=g(j,function(){throw B("Unknown provider: "+h.join(" <- "));}),o={},r=o.$injector=g(o,function(a){a=l.get(a+f);return r.invoke(a.$get,a)});m(e(b),function(a){r.invoke(a||D)});return r}function uc(){var b=
|
||||
!0;this.disableAutoScrolling=function(){b=!1};this.$get=["$window","$location","$rootScope",function(a,c,d){function e(a){var b=null;m(a,function(a){!b&&E(a.nodeName)==="a"&&(b=a)});return b}function g(){var b=c.hash(),d;b?(d=i.getElementById(b))?d.scrollIntoView():(d=e(i.getElementsByName(b)))?d.scrollIntoView():b==="top"&&a.scrollTo(0,0):a.scrollTo(0,0)}var i=a.document;b&&d.$watch(function(){return c.hash()},function(){d.$evalAsync(g)});return g}]}function vc(b,a,c,d){function e(a){try{a.apply(null,
|
||||
ia.call(arguments,1))}finally{if(n--,n===0)for(;w.length;)try{w.pop()()}catch(b){c.error(b)}}}function g(a,b){(function ea(){m(q,function(a){a()});s=b(ea,a)})()}function i(){O!=f.url()&&(O=f.url(),m(A,function(a){a(f.url())}))}var f=this,h=a[0],k=b.location,j=b.history,l=b.setTimeout,o=b.clearTimeout,r={};f.isMock=!1;var n=0,w=[];f.$$completeOutstandingRequest=e;f.$$incOutstandingRequestCount=function(){n++};f.notifyWhenNoOutstandingRequests=function(a){m(q,function(a){a()});n===0?a():w.push(a)};
|
||||
var q=[],s;f.addPollFn=function(a){t(s)&&g(100,l);q.push(a);return a};var O=k.href,C=a.find("base");f.url=function(a,b){if(a){if(O!=a)return O=a,d.history?b?j.replaceState(null,"",a):(j.pushState(null,"",a),C.attr("href",C.attr("href"))):b?k.replace(a):k.href=a,f}else return k.href.replace(/%27/g,"'")};var A=[],K=!1;f.onUrlChange=function(a){K||(d.history&&u(b).bind("popstate",i),d.hashchange?u(b).bind("hashchange",i):f.addPollFn(i),K=!0);A.push(a);return a};f.baseHref=function(){var a=C.attr("href");
|
||||
return a?a.replace(/^https?\:\/\/[^\/]*/,""):a};var W={},y="",M=f.baseHref();f.cookies=function(a,b){var d,e,f,k;if(a)if(b===p)h.cookie=escape(a)+"=;path="+M+";expires=Thu, 01 Jan 1970 00:00:00 GMT";else{if(F(b))d=(h.cookie=escape(a)+"="+escape(b)+";path="+M).length+1,d>4096&&c.warn("Cookie '"+a+"' possibly not set or overflowed because it was too large ("+d+" > 4096 bytes)!"),W.length>20&&c.warn("Cookie '"+a+"' possibly not set or overflowed because too many cookies were already set ("+W.length+
|
||||
" > 20 )")}else{if(h.cookie!==y){y=h.cookie;d=y.split("; ");W={};for(f=0;f<d.length;f++)e=d[f],k=e.indexOf("="),k>0&&(W[unescape(e.substring(0,k))]=unescape(e.substring(k+1)))}return W}};f.defer=function(a,b){var c;n++;c=l(function(){delete r[c];e(a)},b||0);r[c]=!0;return c};f.defer.cancel=function(a){return r[a]?(delete r[a],o(a),e(D),!0):!1}}function wc(){this.$get=["$window","$log","$sniffer","$document",function(b,a,c,d){return new vc(b,d,a,c)}]}function xc(){this.$get=function(){function b(b,
|
||||
d){function e(a){if(a!=l){if(o){if(o==a)o=a.n}else o=a;g(a.n,a.p);g(a,l);l=a;l.n=null}}function g(a,b){if(a!=b){if(a)a.p=b;if(b)b.n=a}}if(b in a)throw B("cacheId "+b+" taken");var i=0,f=x({},d,{id:b}),h={},k=d&&d.capacity||Number.MAX_VALUE,j={},l=null,o=null;return a[b]={put:function(a,b){var c=j[a]||(j[a]={key:a});e(c);t(b)||(a in h||i++,h[a]=b,i>k&&this.remove(o.key))},get:function(a){var b=j[a];if(b)return e(b),h[a]},remove:function(a){var b=j[a];if(b){if(b==l)l=b.p;if(b==o)o=b.n;g(b.n,b.p);delete j[a];
|
||||
delete h[a];i--}},removeAll:function(){h={};i=0;j={};l=o=null},destroy:function(){j=f=h=null;delete a[b]},info:function(){return x({},f,{size:i})}}}var a={};b.info=function(){var b={};m(a,function(a,e){b[e]=a.info()});return b};b.get=function(b){return a[b]};return b}}function yc(){this.$get=["$cacheFactory",function(b){return b("templates")}]}function Bb(b){var a={},c="Directive",d=/^\s*directive\:\s*([\d\w\-_]+)\s+(.*)$/,e=/(([\d\w\-_]+)(?:\:([^;]+))?;?)/,g="Template must have exactly one root element. was: ";
|
||||
this.directive=function f(d,e){F(d)?(qa(e,"directive"),a.hasOwnProperty(d)||(a[d]=[],b.factory(d+c,["$injector","$exceptionHandler",function(b,c){var e=[];m(a[d],function(a){try{var f=b.invoke(a);if(N(f))f={compile:I(f)};else if(!f.compile&&f.link)f.compile=I(f.link);f.priority=f.priority||0;f.name=f.name||d;f.require=f.require||f.controller&&f.name;f.restrict=f.restrict||"A";e.push(f)}catch(k){c(k)}});return e}])),a[d].push(e)):m(d,mb(f));return this};this.$get=["$injector","$interpolate","$exceptionHandler",
|
||||
"$http","$templateCache","$parse","$controller","$rootScope",function(b,h,k,j,l,o,r,n){function w(a,b,c){a instanceof u||(a=u(a));m(a,function(b,c){b.nodeType==3&&(a[c]=u(b).wrap("<span></span>").parent()[0])});var d=s(a,b,a,c);return function(b,c){qa(b,"scope");var e=c?ua.clone.call(a):a;e.data("$scope",b);q(e,"ng-scope");c&&c(e,b);d&&d(b,e,e);return e}}function q(a,b){try{a.addClass(b)}catch(c){}}function s(a,b,c,d){function e(a,c,d,k){for(var g,h,j,n,o,l=0,r=0,q=f.length;l<q;r++)j=c[r],g=f[l++],
|
||||
h=f[l++],g?(g.scope?(n=a.$new(L(g.scope)),u(j).data("$scope",n)):n=a,(o=g.transclude)||!k&&b?g(h,n,j,d,function(b){return function(c){var d=a.$new();return b(d,c).bind("$destroy",Va(d,d.$destroy))}}(o||b)):g(h,n,j,p,k)):h&&h(a,j.childNodes,p,k)}for(var f=[],k,g,h,j=0;j<a.length;j++)g=new ea,k=O(a[j],[],g,d),g=(k=k.length?C(k,a[j],g,b,c):null)&&k.terminal||!a[j].childNodes.length?null:s(a[j].childNodes,k?k.transclude:b),f.push(k),f.push(g),h=h||k||g;return h?e:null}function O(a,b,c,f){var k=c.$attr,
|
||||
g;switch(a.nodeType){case 1:A(b,fa(Cb(a).toLowerCase()),"E",f);var h,j,n;g=a.attributes;for(var o=0,l=g&&g.length;o<l;o++)if(h=g[o],h.specified)j=h.name,n=fa(j.toLowerCase()),k[n]=j,c[n]=h=R(aa&&j=="href"?decodeURIComponent(a.getAttribute(j,2)):h.value),yb(a,n)&&(c[n]=!0),X(a,b,h,n),A(b,n,"A",f);a=a.className;if(F(a)&&a!=="")for(;g=e.exec(a);)n=fa(g[2]),A(b,n,"C",f)&&(c[n]=R(g[3])),a=a.substr(g.index+g[0].length);break;case 3:H(b,a.nodeValue);break;case 8:try{if(g=d.exec(a.nodeValue))n=fa(g[1]),A(b,
|
||||
n,"M",f)&&(c[n]=R(g[2]))}catch(r){}}b.sort(y);return b}function C(a,b,c,d,e){function f(a,b){if(a)a.require=z.require,l.push(a);if(b)b.require=z.require,ba.push(b)}function h(a,b){var c,d="data",e=!1;if(F(a)){for(;(c=a.charAt(0))=="^"||c=="?";)a=a.substr(1),c=="^"&&(d="inheritedData"),e=e||c=="?";c=b[d]("$"+a+"Controller");if(!c&&!e)throw B("No controller: "+a);}else J(a)&&(c=[],m(a,function(a){c.push(h(a,b))}));return c}function j(a,d,e,f,g){var n,q,w,K,s;n=b===e?c:hc(c,new ea(u(e),c.$attr));q=n.$$element;
|
||||
if(C){var zc=/^\s*([@=&])\s*(\w*)\s*$/,O=d.$parent||d;m(C.scope,function(a,b){var c=a.match(zc)||[],e=c[2]||b,f,g,k;switch(c[1]){case "@":n.$observe(e,function(a){d[b]=a});n.$$observers[e].$$scope=O;break;case "=":g=o(n[e]);k=g.assign||function(){f=d[b]=g(O);throw B(Db+n[e]+" (directive: "+C.name+")");};f=d[b]=g(O);d.$watch(function(){var a=g(O);a!==d[b]&&(a!==f?f=d[b]=a:k(O,a=f=d[b]));return a});break;case "&":g=o(n[e]);d[b]=function(a){return g(O,a)};break;default:throw B("Invalid isolate scope definition for directive "+
|
||||
C.name+": "+a);}})}t&&m(t,function(a){var b={$scope:d,$element:q,$attrs:n,$transclude:g};s=a.controller;s=="@"&&(s=n[a.name]);q.data("$"+a.name+"Controller",r(s,b))});f=0;for(w=l.length;f<w;f++)try{K=l[f],K(d,q,n,K.require&&h(K.require,q))}catch(y){k(y,pa(q))}a&&a(d,e.childNodes,p,g);f=0;for(w=ba.length;f<w;f++)try{K=ba[f],K(d,q,n,K.require&&h(K.require,q))}catch(Ha){k(Ha,pa(q))}}for(var n=-Number.MAX_VALUE,l=[],ba=[],s=null,C=null,A=null,y=c.$$element=u(b),z,H,X,D,v=d,t,x,Y,E=0,G=a.length;E<G;E++){z=
|
||||
a[E];X=p;if(n>z.priority)break;if(Y=z.scope)M("isolated scope",C,z,y),L(Y)&&(q(y,"ng-isolate-scope"),C=z),q(y,"ng-scope"),s=s||z;H=z.name;if(Y=z.controller)t=t||{},M("'"+H+"' controller",t[H],z,y),t[H]=z;if(Y=z.transclude)M("transclusion",D,z,y),D=z,n=z.priority,Y=="element"?(X=u(b),y=c.$$element=u("<\!-- "+H+": "+c[H]+" --\>"),b=y[0],Ga(e,u(X[0]),b),v=w(X,d,n)):(X=u(cb(b)).contents(),y.html(""),v=w(X,d));if(Y=z.template)if(M("template",A,z,y),A=z,Y=Ha(Y),z.replace){X=u("<div>"+R(Y)+"</div>").contents();
|
||||
b=X[0];if(X.length!=1||b.nodeType!==1)throw new B(g+Y);Ga(e,y,b);H={$attr:{}};a=a.concat(O(b,a.splice(E+1,a.length-(E+1)),H));K(c,H);G=a.length}else y.html(Y);if(z.templateUrl)M("template",A,z,y),A=z,j=W(a.splice(E,a.length-E),j,y,c,e,z.replace,v),G=a.length;else if(z.compile)try{x=z.compile(y,c,v),N(x)?f(null,x):x&&f(x.pre,x.post)}catch(I){k(I,pa(y))}if(z.terminal)j.terminal=!0,n=Math.max(n,z.priority)}j.scope=s&&s.scope;j.transclude=D&&v;return j}function A(d,e,g,h){var j=!1;if(a.hasOwnProperty(e))for(var n,
|
||||
e=b.get(e+c),o=0,l=e.length;o<l;o++)try{if(n=e[o],(h===p||h>n.priority)&&n.restrict.indexOf(g)!=-1)d.push(n),j=!0}catch(r){k(r)}return j}function K(a,b){var c=b.$attr,d=a.$attr,e=a.$$element;m(a,function(d,e){e.charAt(0)!="$"&&(b[e]&&(d+=(e==="style"?";":" ")+b[e]),a.$set(e,d,!0,c[e]))});m(b,function(b,f){f=="class"?(q(e,b),a["class"]=(a["class"]?a["class"]+" ":"")+b):f=="style"?e.attr("style",e.attr("style")+";"+b):f.charAt(0)!="$"&&!a.hasOwnProperty(f)&&(a[f]=b,d[f]=c[f])})}function W(a,b,c,d,e,
|
||||
f,k){var h=[],n,o,r=c[0],q=a.shift(),w=x({},q,{controller:null,templateUrl:null,transclude:null,scope:null});c.html("");j.get(q.templateUrl,{cache:l}).success(function(j){var l,q,j=Ha(j);if(f){q=u("<div>"+R(j)+"</div>").contents();l=q[0];if(q.length!=1||l.nodeType!==1)throw new B(g+j);j={$attr:{}};Ga(e,c,l);O(l,a,j);K(d,j)}else l=r,c.html(j);a.unshift(w);n=C(a,c,d,k);for(o=s(c.contents(),k);h.length;){var ba=h.pop(),j=h.pop();q=h.pop();var y=h.pop(),m=l;q!==r&&(m=cb(l),Ga(j,u(q),m));n(function(){b(o,
|
||||
y,m,e,ba)},y,m,e,ba)}h=null}).error(function(a,b,c,d){throw B("Failed to load template: "+d.url);});return function(a,c,d,e,f){h?(h.push(c),h.push(d),h.push(e),h.push(f)):n(function(){b(o,c,d,e,f)},c,d,e,f)}}function y(a,b){return b.priority-a.priority}function M(a,b,c,d){if(b)throw B("Multiple directives ["+b.name+", "+c.name+"] asking for "+a+" on: "+pa(d));}function H(a,b){var c=h(b,!0);c&&a.push({priority:0,compile:I(function(a,b){var d=b.parent(),e=d.data("$binding")||[];e.push(c);q(d.data("$binding",
|
||||
e),"ng-binding");a.$watch(c,function(a){b[0].nodeValue=a})})})}function X(a,b,c,d){var e=h(c,!0);e&&b.push({priority:100,compile:I(function(a,b,c){b=c.$$observers||(c.$$observers={});d==="class"&&(e=h(c[d],!0));c[d]=p;(b[d]||(b[d]=[])).$$inter=!0;(c.$$observers&&c.$$observers[d].$$scope||a).$watch(e,function(a){c.$set(d,a)})})})}function Ga(a,b,c){var d=b[0],e=d.parentNode,f,g;if(a){f=0;for(g=a.length;f<g;f++)if(a[f]==d){a[f]=c;break}}e&&e.replaceChild(c,d);c[u.expando]=d[u.expando];b[0]=c}var ea=
|
||||
function(a,b){this.$$element=a;this.$attr=b||{}};ea.prototype={$normalize:fa,$set:function(a,b,c,d){var e=yb(this.$$element[0],a),f=this.$$observers;e&&(this.$$element.prop(a,b),d=e);this[a]=b;d?this.$attr[a]=d:(d=this.$attr[a])||(this.$attr[a]=d=$a(a,"-"));c!==!1&&(b===null||b===p?this.$$element.removeAttr(d):this.$$element.attr(d,b));f&&m(f[a],function(a){try{a(b)}catch(c){k(c)}})},$observe:function(a,b){var c=this,d=c.$$observers||(c.$$observers={}),e=d[a]||(d[a]=[]);e.push(b);n.$evalAsync(function(){e.$$inter||
|
||||
b(c[a])});return b}};var D=h.startSymbol(),ba=h.endSymbol(),Ha=D=="{{"||ba=="}}"?ma:function(a){return a.replace(/\{\{/g,D).replace(/}}/g,ba)};return w}]}function fa(b){return rb(b.replace(Ac,""))}function Bc(){var b={};this.register=function(a,c){L(a)?x(b,a):b[a]=c};this.$get=["$injector","$window",function(a,c){return function(d,e){if(F(d)){var g=d,d=b.hasOwnProperty(g)?b[g]:fb(e.$scope,g,!0)||fb(c,g,!0);ra(d,g,!0)}return a.instantiate(d,e)}}]}function Cc(){this.$get=["$window",function(b){return u(b.document)}]}
|
||||
function Dc(){this.$get=["$log",function(b){return function(a,c){b.error.apply(b,arguments)}}]}function Ec(){var b="{{",a="}}";this.startSymbol=function(a){return a?(b=a,this):b};this.endSymbol=function(b){return b?(a=b,this):a};this.$get=["$parse",function(c){function d(d,f){for(var h,k,j=0,l=[],o=d.length,r=!1,n=[];j<o;)(h=d.indexOf(b,j))!=-1&&(k=d.indexOf(a,h+e))!=-1?(j!=h&&l.push(d.substring(j,h)),l.push(j=c(r=d.substring(h+e,k))),j.exp=r,j=k+g,r=!0):(j!=o&&l.push(d.substring(j)),j=o);if(!(o=
|
||||
l.length))l.push(""),o=1;if(!f||r)return n.length=o,j=function(a){for(var b=0,c=o,d;b<c;b++){if(typeof(d=l[b])=="function")d=d(a),d==null||d==p?d="":typeof d!="string"&&(d=da(d));n[b]=d}return n.join("")},j.exp=d,j.parts=l,j}var e=b.length,g=a.length;d.startSymbol=function(){return b};d.endSymbol=function(){return a};return d}]}function Eb(b){for(var b=b.split("/"),a=b.length;a--;)b[a]=Za(b[a]);return b.join("/")}function va(b,a){var c=Fb.exec(b),c={protocol:c[1],host:c[3],port:G(c[5])||Gb[c[1]]||
|
||||
null,path:c[6]||"/",search:c[8],hash:c[10]};if(a)a.$$protocol=c.protocol,a.$$host=c.host,a.$$port=c.port;return c}function ka(b,a,c){return b+"://"+a+(c==Gb[b]?"":":"+c)}function Fc(b,a,c){var d=va(b);return decodeURIComponent(d.path)!=a||t(d.hash)||d.hash.indexOf(c)!==0?b:ka(d.protocol,d.host,d.port)+a.substr(0,a.lastIndexOf("/"))+d.hash.substr(c.length)}function Gc(b,a,c){var d=va(b);if(decodeURIComponent(d.path)==a)return b;else{var e=d.search&&"?"+d.search||"",g=d.hash&&"#"+d.hash||"",i=a.substr(0,
|
||||
a.lastIndexOf("/")),f=d.path.substr(i.length);if(d.path.indexOf(i)!==0)throw B('Invalid url "'+b+'", missing path prefix "'+i+'" !');return ka(d.protocol,d.host,d.port)+a+"#"+c+f+e+g}}function gb(b,a,c){a=a||"";this.$$parse=function(b){var c=va(b,this);if(c.path.indexOf(a)!==0)throw B('Invalid url "'+b+'", missing path prefix "'+a+'" !');this.$$path=decodeURIComponent(c.path.substr(a.length));this.$$search=Xa(c.search);this.$$hash=c.hash&&decodeURIComponent(c.hash)||"";this.$$compose()};this.$$compose=
|
||||
function(){var b=ob(this.$$search),c=this.$$hash?"#"+Za(this.$$hash):"";this.$$url=Eb(this.$$path)+(b?"?"+b:"")+c;this.$$absUrl=ka(this.$$protocol,this.$$host,this.$$port)+a+this.$$url};this.$$rewriteAppUrl=function(a){if(a.indexOf(c)==0)return a};this.$$parse(b)}function Ia(b,a,c){var d;this.$$parse=function(b){var c=va(b,this);if(c.hash&&c.hash.indexOf(a)!==0)throw B('Invalid url "'+b+'", missing hash prefix "'+a+'" !');d=c.path+(c.search?"?"+c.search:"");c=Hc.exec((c.hash||"").substr(a.length));
|
||||
this.$$path=c[1]?(c[1].charAt(0)=="/"?"":"/")+decodeURIComponent(c[1]):"";this.$$search=Xa(c[3]);this.$$hash=c[5]&&decodeURIComponent(c[5])||"";this.$$compose()};this.$$compose=function(){var b=ob(this.$$search),c=this.$$hash?"#"+Za(this.$$hash):"";this.$$url=Eb(this.$$path)+(b?"?"+b:"")+c;this.$$absUrl=ka(this.$$protocol,this.$$host,this.$$port)+d+(this.$$url?"#"+a+this.$$url:"")};this.$$rewriteAppUrl=function(a){if(a.indexOf(c)==0)return a};this.$$parse(b)}function Hb(b,a,c,d){Ia.apply(this,arguments);
|
||||
this.$$rewriteAppUrl=function(b){if(b.indexOf(c)==0)return c+d+"#"+a+b.substr(c.length)}}function Ja(b){return function(){return this[b]}}function Ib(b,a){return function(c){if(t(c))return this[b];this[b]=a(c);this.$$compose();return this}}function Ic(){var b="",a=!1;this.hashPrefix=function(a){return v(a)?(b=a,this):b};this.html5Mode=function(b){return v(b)?(a=b,this):a};this.$get=["$rootScope","$browser","$sniffer","$rootElement",function(c,d,e,g){function i(a){c.$broadcast("$locationChangeSuccess",
|
||||
f.absUrl(),a)}var f,h,k,j=d.url(),l=va(j);a?(h=d.baseHref()||"/",k=h.substr(0,h.lastIndexOf("/")),l=ka(l.protocol,l.host,l.port)+k+"/",f=e.history?new gb(Fc(j,h,b),k,l):new Hb(Gc(j,h,b),b,l,h.substr(k.length+1))):(l=ka(l.protocol,l.host,l.port)+(l.path||"")+(l.search?"?"+l.search:"")+"#"+b+"/",f=new Ia(j,b,l));g.bind("click",function(a){if(!a.ctrlKey&&!(a.metaKey||a.which==2)){for(var b=u(a.target);E(b[0].nodeName)!=="a";)if(b[0]===g[0]||!(b=b.parent())[0])return;var d=b.prop("href"),e=f.$$rewriteAppUrl(d);
|
||||
d&&!b.attr("target")&&e&&(f.$$parse(e),c.$apply(),a.preventDefault(),U.angular["ff-684208-preventDefault"]=!0)}});f.absUrl()!=j&&d.url(f.absUrl(),!0);d.onUrlChange(function(a){f.absUrl()!=a&&(c.$evalAsync(function(){var b=f.absUrl();f.$$parse(a);i(b)}),c.$$phase||c.$digest())});var o=0;c.$watch(function(){var a=d.url(),b=f.$$replace;if(!o||a!=f.absUrl())o++,c.$evalAsync(function(){c.$broadcast("$locationChangeStart",f.absUrl(),a).defaultPrevented?f.$$parse(a):(d.url(f.absUrl(),b),i(a))});f.$$replace=
|
||||
!1;return o});return f}]}function Jc(){this.$get=["$window",function(b){function a(a){a instanceof B&&(a.stack?a=a.message&&a.stack.indexOf(a.message)===-1?"Error: "+a.message+"\n"+a.stack:a.stack:a.sourceURL&&(a=a.message+"\n"+a.sourceURL+":"+a.line));return a}function c(c){var e=b.console||{},g=e[c]||e.log||D;return g.apply?function(){var b=[];m(arguments,function(c){b.push(a(c))});return g.apply(e,b)}:function(a,b){g(a,b)}}return{log:c("log"),warn:c("warn"),info:c("info"),error:c("error")}}]}function Kc(b,
|
||||
a){function c(a){return a.indexOf(q)!=-1}function d(){return n+1<b.length?b.charAt(n+1):!1}function e(a){return"0"<=a&&a<="9"}function g(a){return a==" "||a=="\r"||a=="\t"||a=="\n"||a=="\u000b"||a=="\u00a0"}function i(a){return"a"<=a&&a<="z"||"A"<=a&&a<="Z"||"_"==a||a=="$"}function f(a){return a=="-"||a=="+"||e(a)}function h(a,c,d){d=d||n;throw B("Lexer Error: "+a+" at column"+(v(c)?"s "+c+"-"+n+" ["+b.substring(c,d)+"]":" "+d)+" in expression ["+b+"].");}function k(){for(var a="",c=n;n<b.length;){var k=
|
||||
E(b.charAt(n));if(k=="."||e(k))a+=k;else{var g=d();if(k=="e"&&f(g))a+=k;else if(f(k)&&g&&e(g)&&a.charAt(a.length-1)=="e")a+=k;else if(f(k)&&(!g||!e(g))&&a.charAt(a.length-1)=="e")h("Invalid exponent");else break}n++}a*=1;o.push({index:c,text:a,json:!0,fn:function(){return a}})}function j(){for(var c="",d=n,f,k,h;n<b.length;){var j=b.charAt(n);if(j=="."||i(j)||e(j))j=="."&&(f=n),c+=j;else break;n++}if(f)for(k=n;k<b.length;){j=b.charAt(k);if(j=="("){h=c.substr(f-d+1);c=c.substr(0,f-d);n=k;break}if(g(j))k++;
|
||||
else break}d={index:d,text:c};if(Ka.hasOwnProperty(c))d.fn=d.json=Ka[c];else{var l=Jb(c,a);d.fn=x(function(a,b){return l(a,b)},{assign:function(a,b){return Kb(a,c,b)}})}o.push(d);h&&(o.push({index:f,text:".",json:!1}),o.push({index:f+1,text:h,json:!1}))}function l(a){var c=n;n++;for(var d="",e=a,f=!1;n<b.length;){var k=b.charAt(n);e+=k;if(f)k=="u"?(k=b.substring(n+1,n+5),k.match(/[\da-f]{4}/i)||h("Invalid unicode escape [\\u"+k+"]"),n+=4,d+=String.fromCharCode(parseInt(k,16))):(f=Lc[k],d+=f?f:k),
|
||||
f=!1;else if(k=="\\")f=!0;else if(k==a){n++;o.push({index:c,text:e,string:d,json:!0,fn:function(){return d}});return}else d+=k;n++}h("Unterminated quote",c)}for(var o=[],r,n=0,w=[],q,s=":";n<b.length;){q=b.charAt(n);if(c("\"'"))l(q);else if(e(q)||c(".")&&e(d()))k();else if(i(q)){if(j(),"{,".indexOf(s)!=-1&&w[0]=="{"&&(r=o[o.length-1]))r.json=r.text.indexOf(".")==-1}else if(c("(){}[].,;:"))o.push({index:n,text:q,json:":[,".indexOf(s)!=-1&&c("{[")||c("}]:,")}),c("{[")&&w.unshift(q),c("}]")&&w.shift(),
|
||||
n++;else if(g(q)){n++;continue}else{var m=q+d(),C=Ka[q],A=Ka[m];A?(o.push({index:n,text:m,fn:A}),n+=2):C?(o.push({index:n,text:q,fn:C,json:"[,:".indexOf(s)!=-1&&c("+-")}),n+=1):h("Unexpected next character ",n,n+1)}s=q}return o}function Mc(b,a,c,d){function e(a,c){throw B("Syntax Error: Token '"+c.text+"' "+a+" at column "+(c.index+1)+" of the expression ["+b+"] starting at ["+b.substring(c.index)+"].");}function g(){if(M.length===0)throw B("Unexpected end of expression: "+b);return M[0]}function i(a,
|
||||
b,c,d){if(M.length>0){var e=M[0],f=e.text;if(f==a||f==b||f==c||f==d||!a&&!b&&!c&&!d)return e}return!1}function f(b,c,d,f){return(b=i(b,c,d,f))?(a&&!b.json&&e("is not valid json",b),M.shift(),b):!1}function h(a){f(a)||e("is unexpected, expecting ["+a+"]",i())}function k(a,b){return function(c,d){return a(c,d,b)}}function j(a,b,c){return function(d,e){return b(d,e,a,c)}}function l(){for(var a=[];;)if(M.length>0&&!i("}",")",";","]")&&a.push(v()),!f(";"))return a.length==1?a[0]:function(b,c){for(var d,
|
||||
e=0;e<a.length;e++){var f=a[e];f&&(d=f(b,c))}return d}}function o(){for(var a=f(),b=c(a.text),d=[];;)if(a=f(":"))d.push(H());else{var e=function(a,c,e){for(var e=[e],f=0;f<d.length;f++)e.push(d[f](a,c));return b.apply(a,e)};return function(){return e}}}function r(){for(var a=n(),b;;)if(b=f("||"))a=j(a,b.fn,n());else return a}function n(){var a=w(),b;if(b=f("&&"))a=j(a,b.fn,n());return a}function w(){var a=q(),b;if(b=f("==","!="))a=j(a,b.fn,w());return a}function q(){var a;a=s();for(var b;b=f("+",
|
||||
"-");)a=j(a,b.fn,s());if(b=f("<",">","<=",">="))a=j(a,b.fn,q());return a}function s(){for(var a=m(),b;b=f("*","/","%");)a=j(a,b.fn,m());return a}function m(){var a;return f("+")?C():(a=f("-"))?j(W,a.fn,m()):(a=f("!"))?k(a.fn,m()):C()}function C(){var a;if(f("("))a=v(),h(")");else if(f("["))a=A();else if(f("{"))a=K();else{var b=f();(a=b.fn)||e("not a primary expression",b)}for(var c;b=f("(","[",".");)b.text==="("?(a=u(a,c),c=null):b.text==="["?(c=a,a=ea(a)):b.text==="."?(c=a,a=t(a)):e("IMPOSSIBLE");
|
||||
return a}function A(){var a=[];if(g().text!="]"){do a.push(H());while(f(","))}h("]");return function(b,c){for(var d=[],e=0;e<a.length;e++)d.push(a[e](b,c));return d}}function K(){var a=[];if(g().text!="}"){do{var b=f(),b=b.string||b.text;h(":");var c=H();a.push({key:b,value:c})}while(f(","))}h("}");return function(b,c){for(var d={},e=0;e<a.length;e++){var f=a[e],k=f.value(b,c);d[f.key]=k}return d}}var W=I(0),y,M=Kc(b,d),H=function(){var a=r(),c,d;return(d=f("="))?(a.assign||e("implies assignment but ["+
|
||||
b.substring(0,d.index)+"] can not be assigned to",d),c=r(),function(b,d){return a.assign(b,c(b,d),d)}):a},u=function(a,b){var c=[];if(g().text!=")"){do c.push(H());while(f(","))}h(")");return function(d,e){for(var f=[],k=b?b(d,e):d,h=0;h<c.length;h++)f.push(c[h](d,e));h=a(d,e)||D;return h.apply?h.apply(k,f):h(f[0],f[1],f[2],f[3],f[4])}},t=function(a){var b=f().text,c=Jb(b,d);return x(function(b,d){return c(a(b,d),d)},{assign:function(c,d,e){return Kb(a(c,e),b,d)}})},ea=function(a){var b=H();h("]");
|
||||
return x(function(c,d){var e=a(c,d),f=b(c,d),k;if(!e)return p;if((e=e[f])&&e.then){k=e;if(!("$$v"in e))k.$$v=p,k.then(function(a){k.$$v=a});e=e.$$v}return e},{assign:function(c,d,e){return a(c,e)[b(c,e)]=d}})},v=function(){for(var a=H(),b;;)if(b=f("|"))a=j(a,b.fn,o());else return a};a?(H=r,u=t=ea=v=function(){e("is not valid json",{text:b,index:0})},y=C()):y=l();M.length!==0&&e("is an unexpected token",M[0]);return y}function Kb(b,a,c){for(var a=a.split("."),d=0;a.length>1;d++){var e=a.shift(),g=
|
||||
b[e];g||(g={},b[e]=g);b=g}return b[a.shift()]=c}function fb(b,a,c){if(!a)return b;for(var a=a.split("."),d,e=b,g=a.length,i=0;i<g;i++)d=a[i],b&&(b=(e=b)[d]);return!c&&N(b)?Va(e,b):b}function Lb(b,a,c,d,e){return function(g,i){var f=i&&i.hasOwnProperty(b)?i:g,h;if(f===null||f===p)return f;if((f=f[b])&&f.then){if(!("$$v"in f))h=f,h.$$v=p,h.then(function(a){h.$$v=a});f=f.$$v}if(!a||f===null||f===p)return f;if((f=f[a])&&f.then){if(!("$$v"in f))h=f,h.$$v=p,h.then(function(a){h.$$v=a});f=f.$$v}if(!c||f===
|
||||
null||f===p)return f;if((f=f[c])&&f.then){if(!("$$v"in f))h=f,h.$$v=p,h.then(function(a){h.$$v=a});f=f.$$v}if(!d||f===null||f===p)return f;if((f=f[d])&&f.then){if(!("$$v"in f))h=f,h.$$v=p,h.then(function(a){h.$$v=a});f=f.$$v}if(!e||f===null||f===p)return f;if((f=f[e])&&f.then){if(!("$$v"in f))h=f,h.$$v=p,h.then(function(a){h.$$v=a});f=f.$$v}return f}}function Jb(b,a){if(hb.hasOwnProperty(b))return hb[b];var c=b.split("."),d=c.length,e;if(a)e=d<6?Lb(c[0],c[1],c[2],c[3],c[4]):function(a,b){var e=0,
|
||||
k;do k=Lb(c[e++],c[e++],c[e++],c[e++],c[e++])(a,b),b=p,a=k;while(e<d);return k};else{var g="var l, fn, p;\n";m(c,function(a,b){g+="if(s === null || s === undefined) return s;\nl=s;\ns="+(b?"s":'((k&&k.hasOwnProperty("'+a+'"))?k:s)')+'["'+a+'"];\nif (s && s.then) {\n if (!("$$v" in s)) {\n p=s;\n p.$$v = undefined;\n p.then(function(v) {p.$$v=v;});\n}\n s=s.$$v\n}\n'});g+="return s;";e=Function("s","k",g);e.toString=function(){return g}}return hb[b]=e}function Nc(){var b={};this.$get=["$filter","$sniffer",
|
||||
function(a,c){return function(d){switch(typeof d){case "string":return b.hasOwnProperty(d)?b[d]:b[d]=Mc(d,!1,a,c.csp);case "function":return d;default:return D}}}]}function Oc(){this.$get=["$rootScope","$exceptionHandler",function(b,a){return Pc(function(a){b.$evalAsync(a)},a)}]}function Pc(b,a){function c(a){return a}function d(a){return i(a)}var e=function(){var f=[],h,k;return k={resolve:function(a){if(f){var c=f;f=p;h=g(a);c.length&&b(function(){for(var a,b=0,d=c.length;b<d;b++)a=c[b],h.then(a[0],
|
||||
a[1])})}},reject:function(a){k.resolve(i(a))},promise:{then:function(b,k){var g=e(),i=function(d){try{g.resolve((b||c)(d))}catch(e){a(e),g.reject(e)}},n=function(b){try{g.resolve((k||d)(b))}catch(c){a(c),g.reject(c)}};f?f.push([i,n]):h.then(i,n);return g.promise}}}},g=function(a){return a&&a.then?a:{then:function(c){var d=e();b(function(){d.resolve(c(a))});return d.promise}}},i=function(a){return{then:function(c,k){var g=e();b(function(){g.resolve((k||d)(a))});return g.promise}}};return{defer:e,reject:i,
|
||||
when:function(f,h,k){var j=e(),l,o=function(b){try{return(h||c)(b)}catch(d){return a(d),i(d)}},r=function(b){try{return(k||d)(b)}catch(c){return a(c),i(c)}};b(function(){g(f).then(function(a){l||(l=!0,j.resolve(g(a).then(o,r)))},function(a){l||(l=!0,j.resolve(r(a)))})});return j.promise},all:function(a){var b=e(),c=a.length,d=[];c?m(a,function(a,e){g(a).then(function(a){e in d||(d[e]=a,--c||b.resolve(d))},function(a){e in d||b.reject(a)})}):b.resolve(d);return b.promise}}}function Qc(){var b={};this.when=
|
||||
function(a,c){b[a]=x({reloadOnSearch:!0},c);if(a){var d=a[a.length-1]=="/"?a.substr(0,a.length-1):a+"/";b[d]={redirectTo:a}}return this};this.otherwise=function(a){this.when(null,a);return this};this.$get=["$rootScope","$location","$routeParams","$q","$injector","$http","$templateCache",function(a,c,d,e,g,i,f){function h(){var b=k(),h=r.current;if(b&&h&&b.$route===h.$route&&ha(b.pathParams,h.pathParams)&&!b.reloadOnSearch&&!o)h.params=b.params,V(h.params,d),a.$broadcast("$routeUpdate",h);else if(b||
|
||||
h)o=!1,a.$broadcast("$routeChangeStart",b,h),(r.current=b)&&b.redirectTo&&(F(b.redirectTo)?c.path(j(b.redirectTo,b.params)).search(b.params).replace():c.url(b.redirectTo(b.pathParams,c.path(),c.search())).replace()),e.when(b).then(function(){if(b){var a=[],c=[],d;m(b.resolve||{},function(b,d){a.push(d);c.push(F(b)?g.get(b):g.invoke(b))});if(!v(d=b.template))if(v(d=b.templateUrl))d=i.get(d,{cache:f}).then(function(a){return a.data});v(d)&&(a.push("$template"),c.push(d));return e.all(c).then(function(b){var c=
|
||||
{};m(b,function(b,d){c[a[d]]=b});return c})}}).then(function(c){if(b==r.current){if(b)b.locals=c,V(b.params,d);a.$broadcast("$routeChangeSuccess",b,h)}},function(c){b==r.current&&a.$broadcast("$routeChangeError",b,h,c)})}function k(){var a,d;m(b,function(b,e){if(!d&&(a=l(c.path(),e)))d=ya(b,{params:x({},c.search(),a),pathParams:a}),d.$route=b});return d||b[null]&&ya(b[null],{params:{},pathParams:{}})}function j(a,b){var c=[];m((a||"").split(":"),function(a,d){if(d==0)c.push(a);else{var e=a.match(/(\w+)(.*)/),
|
||||
f=e[1];c.push(b[f]);c.push(e[2]||"");delete b[f]}});return c.join("")}var l=function(a,b){var c="^"+b.replace(/([\.\\\(\)\^\$])/g,"\\$1")+"$",d=[],e={};m(b.split(/\W/),function(a){if(a){var b=RegExp(":"+a+"([\\W])");c.match(b)&&(c=c.replace(b,"([^\\/]*)$1"),d.push(a))}});var f=a.match(RegExp(c));f&&m(d,function(a,b){e[a]=f[b+1]});return f?e:null},o=!1,r={routes:b,reload:function(){o=!0;a.$evalAsync(h)}};a.$on("$locationChangeSuccess",h);return r}]}function Rc(){this.$get=I({})}function Sc(){var b=
|
||||
10;this.digestTtl=function(a){arguments.length&&(b=a);return b};this.$get=["$injector","$exceptionHandler","$parse",function(a,c,d){function e(){this.$id=xa();this.$$phase=this.$parent=this.$$watchers=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null;this["this"]=this.$root=this;this.$$asyncQueue=[];this.$$listeners={}}function g(a){if(h.$$phase)throw B(h.$$phase+" already in progress");h.$$phase=a}function i(a,b){var c=d(a);ra(c,b);return c}function f(){}e.prototype={$new:function(a){if(N(a))throw B("API-CHANGE: Use $controller to instantiate controllers.");
|
||||
a?(a=new e,a.$root=this.$root):(a=function(){},a.prototype=this,a=new a,a.$id=xa());a["this"]=a;a.$$listeners={};a.$parent=this;a.$$asyncQueue=[];a.$$watchers=a.$$nextSibling=a.$$childHead=a.$$childTail=null;a.$$prevSibling=this.$$childTail;this.$$childHead?this.$$childTail=this.$$childTail.$$nextSibling=a:this.$$childHead=this.$$childTail=a;return a},$watch:function(a,b,c){var d=i(a,"watch"),e=this.$$watchers,g={fn:b,last:f,get:d,exp:a,eq:!!c};if(!N(b)){var h=i(b||D,"listener");g.fn=function(a,b,
|
||||
c){h(c)}}if(!e)e=this.$$watchers=[];e.unshift(g);return function(){Ua(e,g)}},$digest:function(){var a,d,e,i,r,n,m,q=b,s,p=[],C,A;g("$digest");do{m=!1;s=this;do{for(r=s.$$asyncQueue;r.length;)try{s.$eval(r.shift())}catch(K){c(K)}if(i=s.$$watchers)for(n=i.length;n--;)try{if(a=i[n],(d=a.get(s))!==(e=a.last)&&!(a.eq?ha(d,e):typeof d=="number"&&typeof e=="number"&&isNaN(d)&&isNaN(e)))m=!0,a.last=a.eq?V(d):d,a.fn(d,e===f?d:e,s),q<5&&(C=4-q,p[C]||(p[C]=[]),A=N(a.exp)?"fn: "+(a.exp.name||a.exp.toString()):
|
||||
a.exp,A+="; newVal: "+da(d)+"; oldVal: "+da(e),p[C].push(A))}catch(W){c(W)}if(!(i=s.$$childHead||s!==this&&s.$$nextSibling))for(;s!==this&&!(i=s.$$nextSibling);)s=s.$parent}while(s=i);if(m&&!q--)throw h.$$phase=null,B(b+" $digest() iterations reached. Aborting!\nWatchers fired in the last 5 iterations: "+da(p));}while(m||r.length);h.$$phase=null},$destroy:function(){if(h!=this){var a=this.$parent;this.$broadcast("$destroy");if(a.$$childHead==this)a.$$childHead=this.$$nextSibling;if(a.$$childTail==
|
||||
this)a.$$childTail=this.$$prevSibling;if(this.$$prevSibling)this.$$prevSibling.$$nextSibling=this.$$nextSibling;if(this.$$nextSibling)this.$$nextSibling.$$prevSibling=this.$$prevSibling;this.$parent=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null}},$eval:function(a,b){return d(a)(this,b)},$evalAsync:function(a){this.$$asyncQueue.push(a)},$apply:function(a){try{return g("$apply"),this.$eval(a)}catch(b){c(b)}finally{h.$$phase=null;try{h.$digest()}catch(d){throw c(d),d;}}},
|
||||
$on:function(a,b){var c=this.$$listeners[a];c||(this.$$listeners[a]=c=[]);c.push(b);return function(){c[za(c,b)]=null}},$emit:function(a,b){var d=[],e,f=this,g=!1,h={name:a,targetScope:f,stopPropagation:function(){g=!0},preventDefault:function(){h.defaultPrevented=!0},defaultPrevented:!1},i=[h].concat(ia.call(arguments,1)),m,p;do{e=f.$$listeners[a]||d;h.currentScope=f;m=0;for(p=e.length;m<p;m++)if(e[m])try{if(e[m].apply(null,i),g)return h}catch(C){c(C)}else e.splice(m,1),m--,p--;f=f.$parent}while(f);
|
||||
return h},$broadcast:function(a,b){var d=this,e=this,f={name:a,targetScope:this,preventDefault:function(){f.defaultPrevented=!0},defaultPrevented:!1},g=[f].concat(ia.call(arguments,1)),h,i;do{d=e;f.currentScope=d;e=d.$$listeners[a]||[];h=0;for(i=e.length;h<i;h++)if(e[h])try{e[h].apply(null,g)}catch(m){c(m)}else e.splice(h,1),h--,i--;if(!(e=d.$$childHead||d!==this&&d.$$nextSibling))for(;d!==this&&!(e=d.$$nextSibling);)d=d.$parent}while(d=e);return f}};var h=new e;return h}]}function Tc(){this.$get=
|
||||
["$window",function(b){var a={},c=G((/android (\d+)/.exec(E(b.navigator.userAgent))||[])[1]);return{history:!(!b.history||!b.history.pushState||c<4),hashchange:"onhashchange"in b&&(!b.document.documentMode||b.document.documentMode>7),hasEvent:function(c){if(c=="input"&&aa==9)return!1;if(t(a[c])){var e=b.document.createElement("div");a[c]="on"+c in e}return a[c]},csp:!1}}]}function Uc(){this.$get=I(U)}function Mb(b){var a={},c,d,e;if(!b)return a;m(b.split("\n"),function(b){e=b.indexOf(":");c=E(R(b.substr(0,
|
||||
e)));d=R(b.substr(e+1));c&&(a[c]?a[c]+=", "+d:a[c]=d)});return a}function Nb(b){var a=L(b)?b:p;return function(c){a||(a=Mb(b));return c?a[E(c)]||null:a}}function Ob(b,a,c){if(N(c))return c(b,a);m(c,function(c){b=c(b,a)});return b}function Vc(){var b=/^\s*(\[|\{[^\{])/,a=/[\}\]]\s*$/,c=/^\)\]\}',?\n/,d=this.defaults={transformResponse:[function(d){F(d)&&(d=d.replace(c,""),b.test(d)&&a.test(d)&&(d=nb(d,!0)));return d}],transformRequest:[function(a){return L(a)&&Sa.apply(a)!=="[object File]"?da(a):a}],
|
||||
headers:{common:{Accept:"application/json, text/plain, */*","X-Requested-With":"XMLHttpRequest"},post:{"Content-Type":"application/json;charset=utf-8"},put:{"Content-Type":"application/json;charset=utf-8"}}},e=this.responseInterceptors=[];this.$get=["$httpBackend","$browser","$cacheFactory","$rootScope","$q","$injector",function(a,b,c,h,k,j){function l(a){function c(a){var b=x({},a,{data:Ob(a.data,a.headers,f)});return 200<=a.status&&a.status<300?b:k.reject(b)}a.method=la(a.method);var e=a.transformRequest||
|
||||
d.transformRequest,f=a.transformResponse||d.transformResponse,h=d.headers,h=x({"X-XSRF-TOKEN":b.cookies()["XSRF-TOKEN"]},h.common,h[E(a.method)],a.headers),e=Ob(a.data,Nb(h),e),g;t(a.data)&&delete h["Content-Type"];g=o(a,e,h);g=g.then(c,c);m(w,function(a){g=a(g)});g.success=function(b){g.then(function(c){b(c.data,c.status,c.headers,a)});return g};g.error=function(b){g.then(null,function(c){b(c.data,c.status,c.headers,a)});return g};return g}function o(b,c,d){function e(a,b,c){m&&(200<=a&&a<300?m.put(w,
|
||||
[a,b,Mb(c)]):m.remove(w));f(b,a,c);h.$apply()}function f(a,c,d){c=Math.max(c,0);(200<=c&&c<300?j.resolve:j.reject)({data:a,status:c,headers:Nb(d),config:b})}function i(){var a=za(l.pendingRequests,b);a!==-1&&l.pendingRequests.splice(a,1)}var j=k.defer(),o=j.promise,m,p,w=r(b.url,b.params);l.pendingRequests.push(b);o.then(i,i);b.cache&&b.method=="GET"&&(m=L(b.cache)?b.cache:n);if(m)if(p=m.get(w))if(p.then)return p.then(i,i),p;else J(p)?f(p[1],p[0],V(p[2])):f(p,200,{});else m.put(w,o);p||a(b.method,
|
||||
w,c,e,d,b.timeout,b.withCredentials);return o}function r(a,b){if(!b)return a;var c=[];ec(b,function(a,b){a==null||a==p||(L(a)&&(a=da(a)),c.push(encodeURIComponent(b)+"="+encodeURIComponent(a)))});return a+(a.indexOf("?")==-1?"?":"&")+c.join("&")}var n=c("$http"),w=[];m(e,function(a){w.push(F(a)?j.get(a):j.invoke(a))});l.pendingRequests=[];(function(a){m(arguments,function(a){l[a]=function(b,c){return l(x(c||{},{method:a,url:b}))}})})("get","delete","head","jsonp");(function(a){m(arguments,function(a){l[a]=
|
||||
function(b,c,d){return l(x(d||{},{method:a,url:b,data:c}))}})})("post","put");l.defaults=d;return l}]}function Wc(){this.$get=["$browser","$window","$document",function(b,a,c){return Xc(b,Yc,b.defer,a.angular.callbacks,c[0],a.location.protocol.replace(":",""))}]}function Xc(b,a,c,d,e,g){function i(a,b){var c=e.createElement("script"),d=function(){e.body.removeChild(c);b&&b()};c.type="text/javascript";c.src=a;aa?c.onreadystatechange=function(){/loaded|complete/.test(c.readyState)&&d()}:c.onload=c.onerror=
|
||||
d;e.body.appendChild(c)}return function(e,h,k,j,l,o,r){function n(a,c,d,e){c=(h.match(Fb)||["",g])[1]=="file"?d?200:404:c;a(c==1223?204:c,d,e);b.$$completeOutstandingRequest(D)}b.$$incOutstandingRequestCount();h=h||b.url();if(E(e)=="jsonp"){var p="_"+(d.counter++).toString(36);d[p]=function(a){d[p].data=a};i(h.replace("JSON_CALLBACK","angular.callbacks."+p),function(){d[p].data?n(j,200,d[p].data):n(j,-2);delete d[p]})}else{var q=new a;q.open(e,h,!0);m(l,function(a,b){a&&q.setRequestHeader(b,a)});
|
||||
var s;q.onreadystatechange=function(){q.readyState==4&&n(j,s||q.status,q.responseText,q.getAllResponseHeaders())};if(r)q.withCredentials=!0;q.send(k||"");o>0&&c(function(){s=-1;q.abort()},o)}}}function Zc(){this.$get=function(){return{id:"en-us",NUMBER_FORMATS:{DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{minInt:1,minFrac:0,maxFrac:3,posPre:"",posSuf:"",negPre:"-",negSuf:"",gSize:3,lgSize:3},{minInt:1,minFrac:2,maxFrac:2,posPre:"\u00a4",posSuf:"",negPre:"(\u00a4",negSuf:")",gSize:3,lgSize:3}],CURRENCY_SYM:"$"},
|
||||
DATETIME_FORMATS:{MONTH:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),SHORTMONTH:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),DAY:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),SHORTDAY:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(","),AMPMS:["AM","PM"],medium:"MMM d, y h:mm:ss a","short":"M/d/yy h:mm a",fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",mediumDate:"MMM d, y",shortDate:"M/d/yy",mediumTime:"h:mm:ss a",
|
||||
shortTime:"h:mm a"},pluralCat:function(b){return b===1?"one":"other"}}}}function $c(){this.$get=["$rootScope","$browser","$q","$exceptionHandler",function(b,a,c,d){function e(e,f,h){var k=c.defer(),j=k.promise,l=v(h)&&!h,f=a.defer(function(){try{k.resolve(e())}catch(a){k.reject(a),d(a)}l||b.$apply()},f),h=function(){delete g[j.$$timeoutId]};j.$$timeoutId=f;g[f]=k;j.then(h,h);return j}var g={};e.cancel=function(b){return b&&b.$$timeoutId in g?(g[b.$$timeoutId].reject("canceled"),a.defer.cancel(b.$$timeoutId)):
|
||||
!1};return e}]}function Pb(b){function a(a,e){return b.factory(a+c,e)}var c="Filter";this.register=a;this.$get=["$injector",function(a){return function(b){return a.get(b+c)}}];a("currency",Qb);a("date",Rb);a("filter",ad);a("json",bd);a("limitTo",cd);a("lowercase",dd);a("number",Sb);a("orderBy",Tb);a("uppercase",ed)}function ad(){return function(b,a){if(!(b instanceof Array))return b;var c=[];c.check=function(a){for(var b=0;b<c.length;b++)if(!c[b](a))return!1;return!0};var d=function(a,b){if(b.charAt(0)===
|
||||
"!")return!d(a,b.substr(1));switch(typeof a){case "boolean":case "number":case "string":return(""+a).toLowerCase().indexOf(b)>-1;case "object":for(var c in a)if(c.charAt(0)!=="$"&&d(a[c],b))return!0;return!1;case "array":for(c=0;c<a.length;c++)if(d(a[c],b))return!0;return!1;default:return!1}};switch(typeof a){case "boolean":case "number":case "string":a={$:a};case "object":for(var e in a)e=="$"?function(){var b=(""+a[e]).toLowerCase();b&&c.push(function(a){return d(a,b)})}():function(){var b=e,f=
|
||||
(""+a[e]).toLowerCase();f&&c.push(function(a){return d(fb(a,b),f)})}();break;case "function":c.push(a);break;default:return b}for(var g=[],i=0;i<b.length;i++){var f=b[i];c.check(f)&&g.push(f)}return g}}function Qb(b){var a=b.NUMBER_FORMATS;return function(b,d){if(t(d))d=a.CURRENCY_SYM;return Ub(b,a.PATTERNS[1],a.GROUP_SEP,a.DECIMAL_SEP,2).replace(/\u00A4/g,d)}}function Sb(b){var a=b.NUMBER_FORMATS;return function(b,d){return Ub(b,a.PATTERNS[0],a.GROUP_SEP,a.DECIMAL_SEP,d)}}function Ub(b,a,c,d,e){if(isNaN(b)||
|
||||
!isFinite(b))return"";var g=b<0,b=Math.abs(b),i=b+"",f="",h=[],k=!1;if(i.indexOf("e")!==-1){var j=i.match(/([\d\.]+)e(-?)(\d+)/);j&&j[2]=="-"&&j[3]>e+1?i="0":(f=i,k=!0)}if(!k){i=(i.split(Vb)[1]||"").length;t(e)&&(e=Math.min(Math.max(a.minFrac,i),a.maxFrac));var i=Math.pow(10,e),b=Math.round(b*i)/i,b=(""+b).split(Vb),i=b[0],b=b[1]||"",k=0,j=a.lgSize,l=a.gSize;if(i.length>=j+l)for(var k=i.length-j,o=0;o<k;o++)(k-o)%l===0&&o!==0&&(f+=c),f+=i.charAt(o);for(o=k;o<i.length;o++)(i.length-o)%j===0&&o!==0&&
|
||||
(f+=c),f+=i.charAt(o);for(;b.length<e;)b+="0";e&&(f+=d+b.substr(0,e))}h.push(g?a.negPre:a.posPre);h.push(f);h.push(g?a.negSuf:a.posSuf);return h.join("")}function ib(b,a,c){var d="";b<0&&(d="-",b=-b);for(b=""+b;b.length<a;)b="0"+b;c&&(b=b.substr(b.length-a));return d+b}function P(b,a,c,d){return function(e){e=e["get"+b]();if(c>0||e>-c)e+=c;e===0&&c==-12&&(e=12);return ib(e,a,d)}}function La(b,a){return function(c,d){var e=c["get"+b](),g=la(a?"SHORT"+b:b);return d[g][e]}}function Rb(b){function a(a){var b;
|
||||
if(b=a.match(c)){var a=new Date(0),g=0,i=0;b[9]&&(g=G(b[9]+b[10]),i=G(b[9]+b[11]));a.setUTCFullYear(G(b[1]),G(b[2])-1,G(b[3]));a.setUTCHours(G(b[4]||0)-g,G(b[5]||0)-i,G(b[6]||0),G(b[7]||0))}return a}var c=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(c,e){var g="",i=[],f,h,e=e||"mediumDate",e=b.DATETIME_FORMATS[e]||e;F(c)&&(c=fd.test(c)?G(c):a(c));wa(c)&&(c=new Date(c));if(!na(c))return c;for(;e;)(h=gd.exec(e))?(i=i.concat(ia.call(h,
|
||||
1)),e=i.pop()):(i.push(e),e=null);m(i,function(a){f=hd[a];g+=f?f(c,b.DATETIME_FORMATS):a.replace(/(^'|'$)/g,"").replace(/''/g,"'")});return g}}function bd(){return function(b){return da(b,!0)}}function cd(){return function(b,a){if(!(b instanceof Array))return b;var a=G(a),c=[],d,e;if(!b||!(b instanceof Array))return c;a>b.length?a=b.length:a<-b.length&&(a=-b.length);a>0?(d=0,e=a):(d=b.length+a,e=b.length);for(;d<e;d++)c.push(b[d]);return c}}function Tb(b){return function(a,c,d){function e(a,b){return Wa(b)?
|
||||
function(b,c){return a(c,b)}:a}if(!(a instanceof Array))return a;if(!c)return a;for(var c=J(c)?c:[c],c=Ta(c,function(a){var c=!1,d=a||ma;if(F(a)){if(a.charAt(0)=="+"||a.charAt(0)=="-")c=a.charAt(0)=="-",a=a.substring(1);d=b(a)}return e(function(a,b){var c;c=d(a);var e=d(b),f=typeof c,g=typeof e;f==g?(f=="string"&&(c=c.toLowerCase()),f=="string"&&(e=e.toLowerCase()),c=c===e?0:c<e?-1:1):c=f<g?-1:1;return c},c)}),g=[],i=0;i<a.length;i++)g.push(a[i]);return g.sort(e(function(a,b){for(var d=0;d<c.length;d++){var e=
|
||||
c[d](a,b);if(e!==0)return e}return 0},d))}}function S(b){N(b)&&(b={link:b});b.restrict=b.restrict||"AC";return I(b)}function Wb(b,a){function c(a,c){c=c?"-"+$a(c,"-"):"";b.removeClass((a?Ma:Na)+c).addClass((a?Na:Ma)+c)}var d=this,e=b.parent().controller("form")||Oa,g=0,i=d.$error={};d.$name=a.name;d.$dirty=!1;d.$pristine=!0;d.$valid=!0;d.$invalid=!1;e.$addControl(d);b.addClass(Pa);c(!0);d.$addControl=function(a){a.$name&&!d.hasOwnProperty(a.$name)&&(d[a.$name]=a)};d.$removeControl=function(a){a.$name&&
|
||||
d[a.$name]===a&&delete d[a.$name];m(i,function(b,c){d.$setValidity(c,!0,a)})};d.$setValidity=function(a,b,k){var j=i[a];if(b){if(j&&(Ua(j,k),!j.length)){g--;if(!g)c(b),d.$valid=!0,d.$invalid=!1;i[a]=!1;c(!0,a);e.$setValidity(a,!0,d)}}else{g||c(b);if(j){if(za(j,k)!=-1)return}else i[a]=j=[],g++,c(!1,a),e.$setValidity(a,!1,d);j.push(k);d.$valid=!1;d.$invalid=!0}};d.$setDirty=function(){b.removeClass(Pa).addClass(Xb);d.$dirty=!0;d.$pristine=!1;e.$setDirty()}}function T(b){return t(b)||b===""||b===null||
|
||||
b!==b}function Qa(b,a,c,d,e,g){var i=function(){var c=R(a.val());d.$viewValue!==c&&b.$apply(function(){d.$setViewValue(c)})};if(e.hasEvent("input"))a.bind("input",i);else{var f;a.bind("keydown",function(a){a=a.keyCode;a===91||15<a&&a<19||37<=a&&a<=40||f||(f=g.defer(function(){i();f=null}))});a.bind("change",i)}d.$render=function(){a.val(T(d.$viewValue)?"":d.$viewValue)};var h=c.ngPattern,k=function(a,b){return T(b)||a.test(b)?(d.$setValidity("pattern",!0),b):(d.$setValidity("pattern",!1),p)};h&&(h.match(/^\/(.*)\/$/)?
|
||||
(h=RegExp(h.substr(1,h.length-2)),e=function(a){return k(h,a)}):e=function(a){var c=b.$eval(h);if(!c||!c.test)throw new B("Expected "+h+" to be a RegExp but was "+c);return k(c,a)},d.$formatters.push(e),d.$parsers.push(e));if(c.ngMinlength){var j=G(c.ngMinlength),e=function(a){return!T(a)&&a.length<j?(d.$setValidity("minlength",!1),p):(d.$setValidity("minlength",!0),a)};d.$parsers.push(e);d.$formatters.push(e)}if(c.ngMaxlength){var l=G(c.ngMaxlength),c=function(a){return!T(a)&&a.length>l?(d.$setValidity("maxlength",
|
||||
!1),p):(d.$setValidity("maxlength",!0),a)};d.$parsers.push(c);d.$formatters.push(c)}}function jb(b,a){b="ngClass"+b;return S(function(c,d,e){function g(b,d){if(a===!0||c.$index%2===a)d&&b!==d&&i(d),f(b)}function i(a){L(a)&&!J(a)&&(a=Ta(a,function(a,b){if(a)return b}));d.removeClass(J(a)?a.join(" "):a)}function f(a){L(a)&&!J(a)&&(a=Ta(a,function(a,b){if(a)return b}));a&&d.addClass(J(a)?a.join(" "):a)}c.$watch(e[b],g,!0);e.$observe("class",function(){var a=c.$eval(e[b]);g(a,a)});b!=="ngClass"&&c.$watch("$index",
|
||||
function(d,g){var j=d%2;j!==g%2&&(j==a?f(c.$eval(e[b])):i(c.$eval(e[b])))})})}var E=function(b){return F(b)?b.toLowerCase():b},la=function(b){return F(b)?b.toUpperCase():b},B=U.Error,aa=G((/msie (\d+)/.exec(E(navigator.userAgent))||[])[1]),u,ja,ia=[].slice,Ra=[].push,Sa=Object.prototype.toString,Yb=U.angular||(U.angular={}),ta,Cb,Z=["0","0","0"];D.$inject=[];ma.$inject=[];Cb=aa<9?function(b){b=b.nodeName?b:b[0];return b.scopeName&&b.scopeName!="HTML"?la(b.scopeName+":"+b.nodeName):b.nodeName}:function(b){return b.nodeName?
|
||||
b.nodeName:b[0].nodeName};var kc=/[A-Z]/g,id={full:"1.0.3",major:1,minor:0,dot:3,codeName:"bouncy-thunder"},Ba=Q.cache={},Aa=Q.expando="ng-"+(new Date).getTime(),oc=1,Zb=U.document.addEventListener?function(b,a,c){b.addEventListener(a,c,!1)}:function(b,a,c){b.attachEvent("on"+a,c)},db=U.document.removeEventListener?function(b,a,c){b.removeEventListener(a,c,!1)}:function(b,a,c){b.detachEvent("on"+a,c)},mc=/([\:\-\_]+(.))/g,nc=/^moz([A-Z])/,ua=Q.prototype={ready:function(b){function a(){c||(c=!0,b())}
|
||||
var c=!1;this.bind("DOMContentLoaded",a);Q(U).bind("load",a)},toString:function(){var b=[];m(this,function(a){b.push(""+a)});return"["+b.join(", ")+"]"},eq:function(b){return b>=0?u(this[b]):u(this[this.length+b])},length:0,push:Ra,sort:[].sort,splice:[].splice},Ea={};m("multiple,selected,checked,disabled,readOnly,required".split(","),function(b){Ea[E(b)]=b});var zb={};m("input,select,option,textarea,button,form".split(","),function(b){zb[la(b)]=!0});m({data:ub,inheritedData:Da,scope:function(b){return Da(b,
|
||||
"$scope")},controller:xb,injector:function(b){return Da(b,"$injector")},removeAttr:function(b,a){b.removeAttribute(a)},hasClass:Ca,css:function(b,a,c){a=rb(a);if(v(c))b.style[a]=c;else{var d;aa<=8&&(d=b.currentStyle&&b.currentStyle[a],d===""&&(d="auto"));d=d||b.style[a];aa<=8&&(d=d===""?p:d);return d}},attr:function(b,a,c){var d=E(a);if(Ea[d])if(v(c))c?(b[a]=!0,b.setAttribute(a,d)):(b[a]=!1,b.removeAttribute(d));else return b[a]||(b.attributes.getNamedItem(a)||D).specified?d:p;else if(v(c))b.setAttribute(a,
|
||||
c);else if(b.getAttribute)return b=b.getAttribute(a,2),b===null?p:b},prop:function(b,a,c){if(v(c))b[a]=c;else return b[a]},text:x(aa<9?function(b,a){if(b.nodeType==1){if(t(a))return b.innerText;b.innerText=a}else{if(t(a))return b.nodeValue;b.nodeValue=a}}:function(b,a){if(t(a))return b.textContent;b.textContent=a},{$dv:""}),val:function(b,a){if(t(a))return b.value;b.value=a},html:function(b,a){if(t(a))return b.innerHTML;for(var c=0,d=b.childNodes;c<d.length;c++)sa(d[c]);b.innerHTML=a}},function(b,
|
||||
a){Q.prototype[a]=function(a,d){var e,g;if((b.length==2&&b!==Ca&&b!==xb?a:d)===p)if(L(a)){for(e=0;e<this.length;e++)if(b===ub)b(this[e],a);else for(g in a)b(this[e],g,a[g]);return this}else{if(this.length)return b(this[0],a,d)}else{for(e=0;e<this.length;e++)b(this[e],a,d);return this}return b.$dv}});m({removeData:sb,dealoc:sa,bind:function a(c,d,e){var g=$(c,"events"),i=$(c,"handle");g||$(c,"events",g={});i||$(c,"handle",i=pc(c,g));m(d.split(" "),function(d){var h=g[d];if(!h){if(d=="mouseenter"||
|
||||
d=="mouseleave"){var k=0;g.mouseenter=[];g.mouseleave=[];a(c,"mouseover",function(a){k++;k==1&&i(a,"mouseenter")});a(c,"mouseout",function(a){k--;k==0&&i(a,"mouseleave")})}else Zb(c,d,i),g[d]=[];h=g[d]}h.push(e)})},unbind:tb,replaceWith:function(a,c){var d,e=a.parentNode;sa(a);m(new Q(c),function(c){d?e.insertBefore(c,d.nextSibling):e.replaceChild(c,a);d=c})},children:function(a){var c=[];m(a.childNodes,function(a){a.nodeName!="#text"&&c.push(a)});return c},contents:function(a){return a.childNodes},
|
||||
append:function(a,c){m(new Q(c),function(c){a.nodeType===1&&a.appendChild(c)})},prepend:function(a,c){if(a.nodeType===1){var d=a.firstChild;m(new Q(c),function(c){d?a.insertBefore(c,d):(a.appendChild(c),d=c)})}},wrap:function(a,c){var c=u(c)[0],d=a.parentNode;d&&d.replaceChild(c,a);c.appendChild(a)},remove:function(a){sa(a);var c=a.parentNode;c&&c.removeChild(a)},after:function(a,c){var d=a,e=a.parentNode;m(new Q(c),function(a){e.insertBefore(a,d.nextSibling);d=a})},addClass:wb,removeClass:vb,toggleClass:function(a,
|
||||
c,d){t(d)&&(d=!Ca(a,c));(d?wb:vb)(a,c)},parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},next:function(a){return a.nextSibling},find:function(a,c){return a.getElementsByTagName(c)},clone:cb,triggerHandler:function(a,c){var d=($(a,"events")||{})[c];m(d,function(c){c.call(a,null)})}},function(a,c){Q.prototype[c]=function(c,e){for(var g,i=0;i<this.length;i++)g==p?(g=a(this[i],c,e),g!==p&&(g=u(g))):bb(g,a(this[i],c,e));return g==p?this:g}});Fa.prototype={put:function(a,c){this[ga(a)]=
|
||||
c},get:function(a){return this[ga(a)]},remove:function(a){var c=this[a=ga(a)];delete this[a];return c}};eb.prototype={push:function(a,c){var d=this[a=ga(a)];d?d.push(c):this[a]=[c]},shift:function(a){var c=this[a=ga(a)];if(c)return c.length==1?(delete this[a],c[0]):c.shift()},peek:function(a){if(a=this[ga(a)])return a[0]}};var rc=/^function\s*[^\(]*\(\s*([^\)]*)\)/m,sc=/,/,tc=/^\s*(_?)(\S+?)\1\s*$/,qc=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg,Db="Non-assignable model expression: ";Bb.$inject=["$provide"];
|
||||
var Ac=/^(x[\:\-_]|data[\:\-_])/i,Fb=/^([^:]+):\/\/(\w+:{0,1}\w*@)?([\w\.-]*)(:([0-9]+))?(\/[^\?#]*)?(\?([^#]*))?(#(.*))?$/,$b=/^([^\?#]*)?(\?([^#]*))?(#(.*))?$/,Hc=$b,Gb={http:80,https:443,ftp:21};gb.prototype={$$replace:!1,absUrl:Ja("$$absUrl"),url:function(a,c){if(t(a))return this.$$url;var d=$b.exec(a);d[1]&&this.path(decodeURIComponent(d[1]));if(d[2]||d[1])this.search(d[3]||"");this.hash(d[5]||"",c);return this},protocol:Ja("$$protocol"),host:Ja("$$host"),port:Ja("$$port"),path:Ib("$$path",function(a){return a.charAt(0)==
|
||||
"/"?a:"/"+a}),search:function(a,c){if(t(a))return this.$$search;v(c)?c===null?delete this.$$search[a]:this.$$search[a]=c:this.$$search=F(a)?Xa(a):a;this.$$compose();return this},hash:Ib("$$hash",ma),replace:function(){this.$$replace=!0;return this}};Ia.prototype=ya(gb.prototype);Hb.prototype=ya(Ia.prototype);var Ka={"null":function(){return null},"true":function(){return!0},"false":function(){return!1},undefined:D,"+":function(a,c,d,e){d=d(a,c);e=e(a,c);return v(d)?v(e)?d+e:d:v(e)?e:p},"-":function(a,
|
||||
c,d,e){d=d(a,c);e=e(a,c);return(v(d)?d:0)-(v(e)?e:0)},"*":function(a,c,d,e){return d(a,c)*e(a,c)},"/":function(a,c,d,e){return d(a,c)/e(a,c)},"%":function(a,c,d,e){return d(a,c)%e(a,c)},"^":function(a,c,d,e){return d(a,c)^e(a,c)},"=":D,"==":function(a,c,d,e){return d(a,c)==e(a,c)},"!=":function(a,c,d,e){return d(a,c)!=e(a,c)},"<":function(a,c,d,e){return d(a,c)<e(a,c)},">":function(a,c,d,e){return d(a,c)>e(a,c)},"<=":function(a,c,d,e){return d(a,c)<=e(a,c)},">=":function(a,c,d,e){return d(a,c)>=e(a,
|
||||
c)},"&&":function(a,c,d,e){return d(a,c)&&e(a,c)},"||":function(a,c,d,e){return d(a,c)||e(a,c)},"&":function(a,c,d,e){return d(a,c)&e(a,c)},"|":function(a,c,d,e){return e(a,c)(a,c,d(a,c))},"!":function(a,c,d){return!d(a,c)}},Lc={n:"\n",f:"\u000c",r:"\r",t:"\t",v:"\u000b","'":"'",'"':'"'},hb={},Yc=U.XMLHttpRequest||function(){try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(a){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(c){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(d){}throw new B("This browser does not support XMLHttpRequest.");
|
||||
};Pb.$inject=["$provide"];Qb.$inject=["$locale"];Sb.$inject=["$locale"];var Vb=".",hd={yyyy:P("FullYear",4),yy:P("FullYear",2,0,!0),y:P("FullYear",1),MMMM:La("Month"),MMM:La("Month",!0),MM:P("Month",2,1),M:P("Month",1,1),dd:P("Date",2),d:P("Date",1),HH:P("Hours",2),H:P("Hours",1),hh:P("Hours",2,-12),h:P("Hours",1,-12),mm:P("Minutes",2),m:P("Minutes",1),ss:P("Seconds",2),s:P("Seconds",1),EEEE:La("Day"),EEE:La("Day",!0),a:function(a,c){return a.getHours()<12?c.AMPMS[0]:c.AMPMS[1]},Z:function(a){a=a.getTimezoneOffset();
|
||||
return ib(a/60,2)+ib(Math.abs(a%60),2)}},gd=/((?:[^yMdHhmsaZE']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z))(.*)/,fd=/^\d+$/;Rb.$inject=["$locale"];var dd=I(E),ed=I(la);Tb.$inject=["$parse"];var jd=I({restrict:"E",compile:function(a,c){c.href||c.$set("href","");return function(a,c){c.bind("click",function(a){if(!c.attr("href"))return a.preventDefault(),!1})}}}),kb={};m(Ea,function(a,c){var d=fa("ng-"+c);kb[d]=function(){return{priority:100,compile:function(){return function(a,g,i){a.$watch(i[d],
|
||||
function(a){i.$set(c,!!a)})}}}}});m(["src","href"],function(a){var c=fa("ng-"+a);kb[c]=function(){return{priority:99,link:function(d,e,g){g.$observe(c,function(c){c&&(g.$set(a,c),aa&&e.prop(a,c))})}}}});var Oa={$addControl:D,$removeControl:D,$setValidity:D,$setDirty:D};Wb.$inject=["$element","$attrs","$scope"];var Ra=function(a){return["$timeout",function(c){var d={name:"form",restrict:"E",controller:Wb,compile:function(){return{pre:function(a,d,i,f){if(!i.action){var h=function(a){a.preventDefault?
|
||||
a.preventDefault():a.returnValue=!1};Zb(d[0],"submit",h);d.bind("$destroy",function(){c(function(){db(d[0],"submit",h)},0,!1)})}var k=d.parent().controller("form"),j=i.name||i.ngForm;j&&(a[j]=f);k&&d.bind("$destroy",function(){k.$removeControl(f);j&&(a[j]=p);x(f,Oa)})}}}};return a?x(V(d),{restrict:"EAC"}):d}]},kd=Ra(),ld=Ra(!0),md=/^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/,nd=/^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/,od=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))\s*$/,
|
||||
ac={text:Qa,number:function(a,c,d,e,g,i){Qa(a,c,d,e,g,i);e.$parsers.push(function(a){var c=T(a);return c||od.test(a)?(e.$setValidity("number",!0),a===""?null:c?a:parseFloat(a)):(e.$setValidity("number",!1),p)});e.$formatters.push(function(a){return T(a)?"":""+a});if(d.min){var f=parseFloat(d.min),a=function(a){return!T(a)&&a<f?(e.$setValidity("min",!1),p):(e.$setValidity("min",!0),a)};e.$parsers.push(a);e.$formatters.push(a)}if(d.max){var h=parseFloat(d.max),d=function(a){return!T(a)&&a>h?(e.$setValidity("max",
|
||||
!1),p):(e.$setValidity("max",!0),a)};e.$parsers.push(d);e.$formatters.push(d)}e.$formatters.push(function(a){return T(a)||wa(a)?(e.$setValidity("number",!0),a):(e.$setValidity("number",!1),p)})},url:function(a,c,d,e,g,i){Qa(a,c,d,e,g,i);a=function(a){return T(a)||md.test(a)?(e.$setValidity("url",!0),a):(e.$setValidity("url",!1),p)};e.$formatters.push(a);e.$parsers.push(a)},email:function(a,c,d,e,g,i){Qa(a,c,d,e,g,i);a=function(a){return T(a)||nd.test(a)?(e.$setValidity("email",!0),a):(e.$setValidity("email",
|
||||
!1),p)};e.$formatters.push(a);e.$parsers.push(a)},radio:function(a,c,d,e){t(d.name)&&c.attr("name",xa());c.bind("click",function(){c[0].checked&&a.$apply(function(){e.$setViewValue(d.value)})});e.$render=function(){c[0].checked=d.value==e.$viewValue};d.$observe("value",e.$render)},checkbox:function(a,c,d,e){var g=d.ngTrueValue,i=d.ngFalseValue;F(g)||(g=!0);F(i)||(i=!1);c.bind("click",function(){a.$apply(function(){e.$setViewValue(c[0].checked)})});e.$render=function(){c[0].checked=e.$viewValue};e.$formatters.push(function(a){return a===
|
||||
g});e.$parsers.push(function(a){return a?g:i})},hidden:D,button:D,submit:D,reset:D},bc=["$browser","$sniffer",function(a,c){return{restrict:"E",require:"?ngModel",link:function(d,e,g,i){i&&(ac[E(g.type)]||ac.text)(d,e,g,i,c,a)}}}],Na="ng-valid",Ma="ng-invalid",Pa="ng-pristine",Xb="ng-dirty",pd=["$scope","$exceptionHandler","$attrs","$element","$parse",function(a,c,d,e,g){function i(a,c){c=c?"-"+$a(c,"-"):"";e.removeClass((a?Ma:Na)+c).addClass((a?Na:Ma)+c)}this.$modelValue=this.$viewValue=Number.NaN;
|
||||
this.$parsers=[];this.$formatters=[];this.$viewChangeListeners=[];this.$pristine=!0;this.$dirty=!1;this.$valid=!0;this.$invalid=!1;this.$name=d.name;var f=g(d.ngModel),h=f.assign;if(!h)throw B(Db+d.ngModel+" ("+pa(e)+")");this.$render=D;var k=e.inheritedData("$formController")||Oa,j=0,l=this.$error={};e.addClass(Pa);i(!0);this.$setValidity=function(a,c){if(l[a]!==!c){if(c){if(l[a]&&j--,!j)i(!0),this.$valid=!0,this.$invalid=!1}else i(!1),this.$invalid=!0,this.$valid=!1,j++;l[a]=!c;i(c,a);k.$setValidity(a,
|
||||
c,this)}};this.$setViewValue=function(d){this.$viewValue=d;if(this.$pristine)this.$dirty=!0,this.$pristine=!1,e.removeClass(Pa).addClass(Xb),k.$setDirty();m(this.$parsers,function(a){d=a(d)});if(this.$modelValue!==d)this.$modelValue=d,h(a,d),m(this.$viewChangeListeners,function(a){try{a()}catch(d){c(d)}})};var o=this;a.$watch(function(){var c=f(a);if(o.$modelValue!==c){var d=o.$formatters,e=d.length;for(o.$modelValue=c;e--;)c=d[e](c);if(o.$viewValue!==c)o.$viewValue=c,o.$render()}})}],qd=function(){return{require:["ngModel",
|
||||
"^?form"],controller:pd,link:function(a,c,d,e){var g=e[0],i=e[1]||Oa;i.$addControl(g);c.bind("$destroy",function(){i.$removeControl(g)})}}},rd=I({require:"ngModel",link:function(a,c,d,e){e.$viewChangeListeners.push(function(){a.$eval(d.ngChange)})}}),cc=function(){return{require:"?ngModel",link:function(a,c,d,e){if(e){d.required=!0;var g=function(a){if(d.required&&(T(a)||a===!1))e.$setValidity("required",!1);else return e.$setValidity("required",!0),a};e.$formatters.push(g);e.$parsers.unshift(g);
|
||||
d.$observe("required",function(){g(e.$viewValue)})}}}},sd=function(){return{require:"ngModel",link:function(a,c,d,e){var g=(a=/\/(.*)\//.exec(d.ngList))&&RegExp(a[1])||d.ngList||",";e.$parsers.push(function(a){var c=[];a&&m(a.split(g),function(a){a&&c.push(R(a))});return c});e.$formatters.push(function(a){return J(a)?a.join(", "):p})}}},td=/^(true|false|\d+)$/,ud=function(){return{priority:100,compile:function(a,c){return td.test(c.ngValue)?function(a,c,g){g.$set("value",a.$eval(g.ngValue))}:function(a,
|
||||
c,g){a.$watch(g.ngValue,function(a){g.$set("value",a,!1)})}}}},vd=S(function(a,c,d){c.addClass("ng-binding").data("$binding",d.ngBind);a.$watch(d.ngBind,function(a){c.text(a==p?"":a)})}),wd=["$interpolate",function(a){return function(c,d,e){c=a(d.attr(e.$attr.ngBindTemplate));d.addClass("ng-binding").data("$binding",c);e.$observe("ngBindTemplate",function(a){d.text(a)})}}],xd=[function(){return function(a,c,d){c.addClass("ng-binding").data("$binding",d.ngBindHtmlUnsafe);a.$watch(d.ngBindHtmlUnsafe,
|
||||
function(a){c.html(a||"")})}}],yd=jb("",!0),zd=jb("Odd",0),Ad=jb("Even",1),Bd=S({compile:function(a,c){c.$set("ngCloak",p);a.removeClass("ng-cloak")}}),Cd=[function(){return{scope:!0,controller:"@"}}],Dd=["$sniffer",function(a){return{priority:1E3,compile:function(){a.csp=!0}}}],dc={};m("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave".split(" "),function(a){var c=fa("ng-"+a);dc[c]=["$parse",function(d){return function(e,g,i){var f=d(i[c]);g.bind(E(a),function(a){e.$apply(function(){f(e,
|
||||
{$event:a})})})}}]});var Ed=S(function(a,c,d){c.bind("submit",function(){a.$apply(d.ngSubmit)})}),Fd=["$http","$templateCache","$anchorScroll","$compile",function(a,c,d,e){return{restrict:"ECA",terminal:!0,compile:function(g,i){var f=i.ngInclude||i.src,h=i.onload||"",k=i.autoscroll;return function(g,i){var o=0,m,n=function(){m&&(m.$destroy(),m=null);i.html("")};g.$watch(f,function(f){var p=++o;f?a.get(f,{cache:c}).success(function(a){p===o&&(m&&m.$destroy(),m=g.$new(),i.html(a),e(i.contents())(m),
|
||||
v(k)&&(!k||g.$eval(k))&&d(),m.$emit("$includeContentLoaded"),g.$eval(h))}).error(function(){p===o&&n()}):n()})}}}}],Gd=S({compile:function(){return{pre:function(a,c,d){a.$eval(d.ngInit)}}}}),Hd=S({terminal:!0,priority:1E3}),Id=["$locale","$interpolate",function(a,c){var d=/{}/g;return{restrict:"EA",link:function(e,g,i){var f=i.count,h=g.attr(i.$attr.when),k=i.offset||0,j=e.$eval(h),l={},o=c.startSymbol(),r=c.endSymbol();m(j,function(a,e){l[e]=c(a.replace(d,o+f+"-"+k+r))});e.$watch(function(){var c=
|
||||
parseFloat(e.$eval(f));return isNaN(c)?"":(j[c]||(c=a.pluralCat(c-k)),l[c](e,g,!0))},function(a){g.text(a)})}}}],Jd=S({transclude:"element",priority:1E3,terminal:!0,compile:function(a,c,d){return function(a,c,i){var f=i.ngRepeat,i=f.match(/^\s*(.+)\s+in\s+(.*)\s*$/),h,k,j;if(!i)throw B("Expected ngRepeat in form of '_item_ in _collection_' but got '"+f+"'.");f=i[1];h=i[2];i=f.match(/^(?:([\$\w]+)|\(([\$\w]+)\s*,\s*([\$\w]+)\))$/);if(!i)throw B("'item' in 'item in collection' should be identifier or (key, value) but got '"+
|
||||
f+"'.");k=i[3]||i[1];j=i[2];var l=new eb;a.$watch(function(a){var e,f,i=a.$eval(h),m=gc(i,!0),p,u=new eb,C,A,v,t,y=c;if(J(i))v=i||[];else{v=[];for(C in i)i.hasOwnProperty(C)&&C.charAt(0)!="$"&&v.push(C);v.sort()}e=0;for(f=v.length;e<f;e++){C=i===v?e:v[e];A=i[C];if(t=l.shift(A)){p=t.scope;u.push(A,t);if(e!==t.index)t.index=e,y.after(t.element);y=t.element}else p=a.$new();p[k]=A;j&&(p[j]=C);p.$index=e;p.$first=e===0;p.$last=e===m-1;p.$middle=!(p.$first||p.$last);t||d(p,function(a){y.after(a);t={scope:p,
|
||||
element:y=a,index:e};u.push(A,t)})}for(C in l)if(l.hasOwnProperty(C))for(v=l[C];v.length;)A=v.pop(),A.element.remove(),A.scope.$destroy();l=u})}}}),Kd=S(function(a,c,d){a.$watch(d.ngShow,function(a){c.css("display",Wa(a)?"":"none")})}),Ld=S(function(a,c,d){a.$watch(d.ngHide,function(a){c.css("display",Wa(a)?"none":"")})}),Md=S(function(a,c,d){a.$watch(d.ngStyle,function(a,d){d&&a!==d&&m(d,function(a,d){c.css(d,"")});a&&c.css(a)},!0)}),Nd=I({restrict:"EA",compile:function(a,c){var d=c.ngSwitch||c.on,
|
||||
e={};a.data("ng-switch",e);return function(a,i){var f,h,k;a.$watch(d,function(d){h&&(k.$destroy(),h.remove(),h=k=null);if(f=e["!"+d]||e["?"])a.$eval(c.change),k=a.$new(),f(k,function(a){h=a;i.append(a)})})}}}),Od=S({transclude:"element",priority:500,compile:function(a,c,d){a=a.inheritedData("ng-switch");qa(a);a["!"+c.ngSwitchWhen]=d}}),Pd=S({transclude:"element",priority:500,compile:function(a,c,d){a=a.inheritedData("ng-switch");qa(a);a["?"]=d}}),Qd=S({controller:["$transclude","$element",function(a,
|
||||
c){a(function(a){c.append(a)})}]}),Rd=["$http","$templateCache","$route","$anchorScroll","$compile","$controller",function(a,c,d,e,g,i){return{restrict:"ECA",terminal:!0,link:function(a,c,k){function j(){var j=d.current&&d.current.locals,k=j&&j.$template;if(k){c.html(k);l&&(l.$destroy(),l=null);var k=g(c.contents()),p=d.current;l=p.scope=a.$new();if(p.controller)j.$scope=l,j=i(p.controller,j),c.contents().data("$ngControllerController",j);k(l);l.$emit("$viewContentLoaded");l.$eval(m);e()}else c.html(""),
|
||||
l&&(l.$destroy(),l=null)}var l,m=k.onload||"";a.$on("$routeChangeSuccess",j);j()}}}],Sd=["$templateCache",function(a){return{restrict:"E",terminal:!0,compile:function(c,d){d.type=="text/ng-template"&&a.put(d.id,c[0].text)}}}],Td=I({terminal:!0}),Ud=["$compile","$parse",function(a,c){var d=/^\s*(.*?)(?:\s+as\s+(.*?))?(?:\s+group\s+by\s+(.*))?\s+for\s+(?:([\$\w][\$\w\d]*)|(?:\(\s*([\$\w][\$\w\d]*)\s*,\s*([\$\w][\$\w\d]*)\s*\)))\s+in\s+(.*)$/,e={$setViewValue:D};return{restrict:"E",require:["select",
|
||||
"?ngModel"],controller:["$element","$scope","$attrs",function(a,c,d){var h=this,k={},j=e,l;h.databound=d.ngModel;h.init=function(a,c,d){j=a;l=d};h.addOption=function(c){k[c]=!0;j.$viewValue==c&&(a.val(c),l.parent()&&l.remove())};h.removeOption=function(a){this.hasOption(a)&&(delete k[a],j.$viewValue==a&&this.renderUnknownOption(a))};h.renderUnknownOption=function(c){c="? "+ga(c)+" ?";l.val(c);a.prepend(l);a.val(c);l.prop("selected",!0)};h.hasOption=function(a){return k.hasOwnProperty(a)};c.$on("$destroy",
|
||||
function(){h.renderUnknownOption=D})}],link:function(e,i,f,h){function k(a,c,d,e){d.$render=function(){var a=d.$viewValue;e.hasOption(a)?(A.parent()&&A.remove(),c.val(a),a===""&&s.prop("selected",!0)):t(a)&&s?c.val(""):e.renderUnknownOption(a)};c.bind("change",function(){a.$apply(function(){A.parent()&&A.remove();d.$setViewValue(c.val())})})}function j(a,c,d){var e;d.$render=function(){var a=new Fa(d.$viewValue);m(c.children(),function(c){c.selected=v(a.get(c.value))})};a.$watch(function(){ha(e,d.$viewValue)||
|
||||
(e=V(d.$viewValue),d.$render())});c.bind("change",function(){a.$apply(function(){var a=[];m(c.children(),function(c){c.selected&&a.push(c.value)});d.$setViewValue(a)})})}function l(e,f,g){function h(){var a={"":[]},c=[""],d,i,s,t,u;s=g.$modelValue;t=r(e)||[];var y=l?lb(t):t,A,w,x;w={};u=!1;var z,B;if(n)u=new Fa(s);else if(s===null||q)a[""].push({selected:s===null,id:"",label:""}),u=!0;for(x=0;A=y.length,x<A;x++){w[k]=t[l?w[l]=y[x]:x];d=m(e,w)||"";if(!(i=a[d]))i=a[d]=[],c.push(d);n?d=u.remove(o(e,
|
||||
w))!=p:(d=s===o(e,w),u=u||d);z=j(e,w);z=z===p?"":z;i.push({id:l?y[x]:x,label:z,selected:d})}!n&&!u&&a[""].unshift({id:"?",label:"",selected:!0});w=0;for(y=c.length;w<y;w++){d=c[w];i=a[d];if(v.length<=w)s={element:C.clone().attr("label",d),label:i.label},t=[s],v.push(t),f.append(s.element);else if(t=v[w],s=t[0],s.label!=d)s.element.attr("label",s.label=d);z=null;x=0;for(A=i.length;x<A;x++)if(d=i[x],u=t[x+1]){z=u.element;if(u.label!==d.label)z.text(u.label=d.label);if(u.id!==d.id)z.val(u.id=d.id);if(u.element.selected!==
|
||||
d.selected)z.prop("selected",u.selected=d.selected)}else d.id===""&&q?B=q:(B=D.clone()).val(d.id).attr("selected",d.selected).text(d.label),t.push({element:B,label:d.label,id:d.id,selected:d.selected}),z?z.after(B):s.element.append(B),z=B;for(x++;t.length>x;)t.pop().element.remove()}for(;v.length>w;)v.pop()[0].element.remove()}var i;if(!(i=w.match(d)))throw B("Expected ngOptions in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_' but got '"+w+"'.");var j=c(i[2]||i[1]),k=i[4]||
|
||||
i[6],l=i[5],m=c(i[3]||""),o=c(i[2]?i[1]:k),r=c(i[7]),v=[[{element:f,label:""}]];q&&(a(q)(e),q.removeClass("ng-scope"),q.remove());f.html("");f.bind("change",function(){e.$apply(function(){var a,c=r(e)||[],d={},h,i,j,m,q,s;if(n){i=[];m=0;for(s=v.length;m<s;m++){a=v[m];j=1;for(q=a.length;j<q;j++)if((h=a[j].element)[0].selected)h=h.val(),l&&(d[l]=h),d[k]=c[h],i.push(o(e,d))}}else h=f.val(),h=="?"?i=p:h==""?i=null:(d[k]=c[h],l&&(d[l]=h),i=o(e,d));g.$setViewValue(i)})});g.$render=h;e.$watch(h)}if(h[1]){for(var o=
|
||||
h[0],r=h[1],n=f.multiple,w=f.ngOptions,q=!1,s,D=u(ca.createElement("option")),C=u(ca.createElement("optgroup")),A=D.clone(),h=0,x=i.children(),E=x.length;h<E;h++)if(x[h].value==""){s=q=x.eq(h);break}o.init(r,q,A);if(n&&(f.required||f.ngRequired)){var y=function(a){r.$setValidity("required",!f.required||a&&a.length);return a};r.$parsers.push(y);r.$formatters.unshift(y);f.$observe("required",function(){y(r.$viewValue)})}w?l(e,i,r):n?j(e,i,r):k(e,i,r,o)}}}}],Vd=["$interpolate",function(a){var c={addOption:D,
|
||||
removeOption:D};return{restrict:"E",priority:100,compile:function(d,e){if(t(e.value)){var g=a(d.text(),!0);g||e.$set("value",d.text())}return function(a,d,e){var k=d.parent(),j=k.data("$selectController")||k.parent().data("$selectController");j&&j.databound?d.prop("selected",!1):j=c;g?a.$watch(g,function(a,c){e.$set("value",a);a!==c&&j.removeOption(c);j.addOption(a)}):j.addOption(e.value);d.bind("$destroy",function(){j.removeOption(e.value)})}}}}],Wd=I({restrict:"E",terminal:!0});(ja=U.jQuery)?(u=
|
||||
ja,x(ja.fn,{scope:ua.scope,controller:ua.controller,injector:ua.injector,inheritedData:ua.inheritedData}),ab("remove",!0),ab("empty"),ab("html")):u=Q;Yb.element=u;(function(a){x(a,{bootstrap:pb,copy:V,extend:x,equals:ha,element:u,forEach:m,injector:qb,noop:D,bind:Va,toJson:da,fromJson:nb,identity:ma,isUndefined:t,isDefined:v,isString:F,isFunction:N,isObject:L,isNumber:wa,isElement:fc,isArray:J,version:id,isDate:na,lowercase:E,uppercase:la,callbacks:{counter:0}});ta=lc(U);try{ta("ngLocale")}catch(c){ta("ngLocale",
|
||||
[]).provider("$locale",Zc)}ta("ng",["ngLocale"],["$provide",function(a){a.provider("$compile",Bb).directive({a:jd,input:bc,textarea:bc,form:kd,script:Sd,select:Ud,style:Wd,option:Vd,ngBind:vd,ngBindHtmlUnsafe:xd,ngBindTemplate:wd,ngClass:yd,ngClassEven:Ad,ngClassOdd:zd,ngCsp:Dd,ngCloak:Bd,ngController:Cd,ngForm:ld,ngHide:Ld,ngInclude:Fd,ngInit:Gd,ngNonBindable:Hd,ngPluralize:Id,ngRepeat:Jd,ngShow:Kd,ngSubmit:Ed,ngStyle:Md,ngSwitch:Nd,ngSwitchWhen:Od,ngSwitchDefault:Pd,ngOptions:Td,ngView:Rd,ngTransclude:Qd,
|
||||
ngModel:qd,ngList:sd,ngChange:rd,required:cc,ngRequired:cc,ngValue:ud}).directive(kb).directive(dc);a.provider({$anchorScroll:uc,$browser:wc,$cacheFactory:xc,$controller:Bc,$document:Cc,$exceptionHandler:Dc,$filter:Pb,$interpolate:Ec,$http:Vc,$httpBackend:Wc,$location:Ic,$log:Jc,$parse:Nc,$route:Qc,$routeParams:Rc,$rootScope:Sc,$q:Oc,$sniffer:Tc,$templateCache:yc,$timeout:$c,$window:Uc})}])})(Yb);u(ca).ready(function(){jc(ca,pb)})})(window,document);angular.element(document).find("head").append('<style type="text/css">@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak{display:none;}ng\\:form{display:block;}</style>');
|
||||
|
Before Width: | Height: | Size: 8.6 KiB |
|
Before Width: | Height: | Size: 12 KiB |
5
AndorsTrailEdit/lib/hint.min.css
vendored
@@ -1,5 +0,0 @@
|
||||
/*! Hint.css - v0.1.0 - 2013-02-03
|
||||
* https://github.com/chinchang/hint.css
|
||||
* Copyright (c) 2013 Kushagra Gour; Licensed MIT */
|
||||
|
||||
.hint{position:relative;display:inline-block}.hint:before,.hint:after{position:absolute;opacity:0;z-index:1000000;pointer-events:none;-webkit-transition:.3s ease;-moz-transition:.3s ease}.hint:hover:before,.hint:hover:after{opacity:1}.hint:before{content:'';position:absolute;background:transparent;border:6px solid transparent;z-index:1000001}.hint:after{content:attr(data-hint);background:#383838;color:#fff;text-shadow:0 -1px 0 black;padding:8px 10px;font-size:12px;line-height:12px;white-space:nowrap;box-shadow:4px 4px 8px rgba(0,0,0,.3)}.hint--top:before{border-top-color:#383838}.hint--bottom:before{border-bottom-color:#383838}.hint--left:before{border-left-color:#383838}.hint--right:before{border-right-color:#383838}.hint--top:before{margin-bottom:-12px}.hint--top:after{margin-left:-18px}.hint--top:before,.hint--top:after{bottom:100%;left:50%}.hint--top:hover:before,.hint--top:hover:after{-webkit-transform:translateY(-8px);-moz-transform:translateY(-8px);transform:translateY(-8px)}.hint--bottom:before{margin-top:-12px}.hint--bottom:after{margin-left:-18px}.hint--bottom:before,.hint--bottom:after{top:100%;left:50%}.hint--bottom:hover:before,.hint--bottom:hover:after{-webkit-transform:translateY(8px);-moz-transform:translateY(8px);transform:translateY(8px)}.hint--right:before{margin-left:-12px;margin-bottom:-6px}.hint--right:after{margin-bottom:-14px}.hint--right:before,.hint--right:after{left:100%;bottom:50%}.hint--right:hover:before,.hint--right:hover:after{-webkit-transform:translateX(8px);-moz-transform:translateX(8px);transform:translateX(8px)}.hint--left:before{margin-right:-12px;margin-bottom:-6px}.hint--left:after{margin-bottom:-14px}.hint--left:before,.hint--left:after{right:100%;bottom:50%}.hint--left:hover:before,.hint--left:hover:after{-webkit-transform:translateX(-8px);-moz-transform:translateX(-8px);transform:translateX(-8px)}.hint--error:after{background-color:#b34e4d;text-shadow:0 -1px 0 #5a2626}.hint--error.hint--top:before{border-top-color:#b34e4d}.hint--error.hint--bottom:before{border-bottom-color:#b34e4d}.hint--error.hint--left:before{border-left-color:#b34e4d}.hint--error.hint--right:before{border-right-color:#b34e4d}.hint--warning:after{background-color:#c09854;text-shadow:0 -1px 0 #6d5228}.hint--warning.hint--top:before{border-top-color:#c09854}.hint--warning.hint--bottom:before{border-bottom-color:#c09854}.hint--warning.hint--left:before{border-left-color:#c09854}.hint--warning.hint--right:before{border-right-color:#c09854}.hint--info:after{background-color:#3986ac;text-shadow:0 -1px 0 #193c4c}.hint--info.hint--top:before{border-top-color:#3986ac}.hint--info.hint--bottom:before{border-bottom-color:#3986ac}.hint--info.hint--left:before{border-left-color:#3986ac}.hint--info.hint--right:before{border-right-color:#3986ac}.hint--success:after{background-color:#458746;text-shadow:0 -1px 0 #1a331a}.hint--success.hint--top:before{border-top-color:#458746}.hint--success.hint--bottom:before{border-bottom-color:#458746}.hint--success.hint--left:before{border-left-color:#458746}.hint--success.hint--right:before{border-right-color:#458746}.hint--always:after,.hint--always:before{opacity:1}.hint--always.hint--top:after,.hint--always.hint--top:before{-webkit-transform:translateY(-8px);-moz-transform:translateY(-8px);transform:translateY(-8px)}.hint--always.hint--bottom:after,.hint--always.hint--bottom:before{-webkit-transform:translateY(8px);-moz-transform:translateY(8px);transform:translateY(8px)}.hint--always.hint--left:after,.hint--always.hint--left:before{-webkit-transform:translateX(-8px);-moz-transform:translateX(-8px);transform:translateX(-8px)}.hint--always.hint--right:after,.hint--always.hint--right:before{-webkit-transform:translateX(8px);-moz-transform:translateX(8px);transform:translateX(8px)}
|
||||
5
AndorsTrailEdit/lib/jquery-ui.min.js
vendored
2
AndorsTrailEdit/lib/jquery.min.js
vendored
@@ -1,123 +0,0 @@
|
||||
/*
|
||||
jQuery UI Sortable plugin wrapper
|
||||
https://github.com/angular-ui/ui-sortable
|
||||
|
||||
@param [ui-sortable] {object} Options to pass to $.fn.sortable() merged onto ui.config
|
||||
*/
|
||||
angular.module('ui.sortable', [])
|
||||
.value('uiSortableConfig',{})
|
||||
.directive('uiSortable', [ 'uiSortableConfig', '$log',
|
||||
function(uiSortableConfig, log) {
|
||||
return {
|
||||
require: '?ngModel',
|
||||
link: function(scope, element, attrs, ngModel) {
|
||||
|
||||
function combineCallbacks(first,second){
|
||||
if( second && (typeof second === "function") ){
|
||||
return function(e,ui){
|
||||
first(e,ui);
|
||||
second(e,ui);
|
||||
};
|
||||
}
|
||||
return first;
|
||||
}
|
||||
|
||||
var opts = {};
|
||||
|
||||
var callbacks = {
|
||||
receive: null,
|
||||
remove:null,
|
||||
start:null,
|
||||
stop:null,
|
||||
update:null
|
||||
};
|
||||
|
||||
var apply = function(e, ui) {
|
||||
if (ui.item.sortable.resort || ui.item.sortable.relocate) {
|
||||
scope.$apply();
|
||||
}
|
||||
};
|
||||
|
||||
angular.extend(opts, uiSortableConfig);
|
||||
|
||||
if (ngModel) {
|
||||
|
||||
ngModel.$render = function() {
|
||||
element.sortable( "refresh" );
|
||||
};
|
||||
|
||||
callbacks.start = function(e, ui) {
|
||||
// Save position of dragged item
|
||||
ui.item.sortable = { index: ui.item.index() };
|
||||
};
|
||||
|
||||
callbacks.update = function(e, ui) {
|
||||
// For some reason the reference to ngModel in stop() is wrong
|
||||
ui.item.sortable.resort = ngModel;
|
||||
};
|
||||
|
||||
callbacks.receive = function(e, ui) {
|
||||
ui.item.sortable.relocate = true;
|
||||
// added item to array into correct position and set up flag
|
||||
ngModel.$modelValue.splice(ui.item.index(), 0, ui.item.sortable.moved);
|
||||
};
|
||||
|
||||
callbacks.remove = function(e, ui) {
|
||||
// copy data into item
|
||||
if (ngModel.$modelValue.length === 1) {
|
||||
ui.item.sortable.moved = ngModel.$modelValue.splice(0, 1)[0];
|
||||
} else {
|
||||
ui.item.sortable.moved = ngModel.$modelValue.splice(ui.item.sortable.index, 1)[0];
|
||||
}
|
||||
};
|
||||
|
||||
callbacks.stop = function(e, ui) {
|
||||
// digest all prepared changes
|
||||
if (ui.item.sortable.resort && !ui.item.sortable.relocate) {
|
||||
|
||||
// Fetch saved and current position of dropped element
|
||||
var end, start;
|
||||
start = ui.item.sortable.index;
|
||||
end = ui.item.index();
|
||||
|
||||
// Reorder array and apply change to scope
|
||||
ui.item.sortable.resort.$modelValue.splice(end, 0, ui.item.sortable.resort.$modelValue.splice(start, 1)[0]);
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
scope.$watch(attrs.uiSortable, function(newVal, oldVal){
|
||||
angular.forEach(newVal, function(value, key){
|
||||
|
||||
if( callbacks[key] ){
|
||||
// wrap the callback
|
||||
value = combineCallbacks( callbacks[key], value );
|
||||
|
||||
if ( key === 'stop' ){
|
||||
// call apply after stop
|
||||
value = combineCallbacks( value, apply );
|
||||
}
|
||||
}
|
||||
|
||||
element.sortable('option', key, value);
|
||||
});
|
||||
}, true);
|
||||
|
||||
angular.forEach(callbacks, function(value, key ){
|
||||
|
||||
opts[key] = combineCallbacks(value, opts[key]);
|
||||
});
|
||||
|
||||
// call apply after stop
|
||||
opts.stop = combineCallbacks( opts.stop, apply );
|
||||
|
||||
} else {
|
||||
log.info('ui.sortable: ngModel not provided!', element);
|
||||
}
|
||||
|
||||
// Create sortable
|
||||
element.sortable(opts);
|
||||
}
|
||||
};
|
||||
}
|
||||
]);
|
||||
1
AndorsTrailEdit/lib/underscore-min.js
vendored
|
Before Width: | Height: | Size: 4.2 KiB |
@@ -1,161 +0,0 @@
|
||||
<h3>Actor condition - {{obj.name}}</h3>
|
||||
<div class="prevNext">
|
||||
<a class="btn btn-secondary" ng-click="previous()"><i class="icon-backward"></i></a>
|
||||
<a class="btn btn-secondary" ng-click="next()"><i class="icon-forward"></i></a>
|
||||
</div>
|
||||
<fieldset>
|
||||
<legend>General</legend>
|
||||
<div class="fieldWithLabel">
|
||||
<label for="iconID">Icon:</label>
|
||||
<span class="field">
|
||||
<div ng-tile-image="obj.iconID" class="at-input-icon" ng-select-image="actorcondition" ng-select-image-dest="obj.iconID"></div>
|
||||
<input type="text" id="iconID" class="at-input-iconID" ng-model="obj.iconID" />
|
||||
</span>
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<label for="id" class="hint hint--top" data-hint="The id is not displayed to the player anywhere. Must be a unique id (no two conditions may have the same id). Prefer short ids since it keeps savegames smaller.">Internal ID:</label>
|
||||
<input type="text" id="id" class="field at-input-id" ng-model="obj.id" />
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<label for="name">Display name:</label>
|
||||
<input type="text" id="name" class="field at-input-name" ng-model="obj.name" />
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<label for="category">Category:</label>
|
||||
<select class="field" id="category" ng-model="obj.category">
|
||||
<option value="spiritual">Spiritual</option>
|
||||
<option value="mental">Mental</option>
|
||||
<option value="physical">Physical Capacity</option>
|
||||
<option value="blood">Blood Disorder</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" id="isPositive" ng-model="obj.isPositive" ng-true-value="1" ng-false-value="0" />
|
||||
<span class="hint hint--top" data-hint="Positive effects are not affected by the Rejuvenation skill.">Positive effect</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" id="isStacking" ng-model="obj.isStacking" ng-true-value="1" ng-false-value="0" />
|
||||
<span class="hint hint--top" data-hint="If checked, then actors may have several of these, simultaneously. Otherwise, only one condition at a time may be active on an actor.">Is stacking</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<label class="checkbox"><input type="checkbox" id="hasRoundEffect" ng-model="obj.hasRoundEffect" />Has effect every round (every 6s)</label>
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<label class="checkbox"><input type="checkbox" id="hasFullRoundEffect" ng-model="obj.hasFullRoundEffect" />Has effect every full round (every 25:th s)</label>
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<label class="checkbox"><input type="checkbox" id="hasAbilityEffect" ng-model="obj.hasAbilityEffect" />Has constant ability effect</label>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset id="hasRoundEffectDisplay" ng-ds-fade="obj.hasRoundEffect">
|
||||
<legend>Every round (6s)</legend>
|
||||
<div class="fieldWithLabel">
|
||||
<label for="round_visualEffectID">Visual effect:</label>
|
||||
<select class="field" id="round_visualEffectID" ng-model="obj.roundEffect.visualEffectID">
|
||||
<option value="">None</option>
|
||||
<option value="redSplash">Red splatter</option>
|
||||
<option value="blueSwirl">Blue swirl</option>
|
||||
<option value="greenSplash">Green splatter</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<label for="round_boostHP">Boost current HP (range):</label>
|
||||
<div class="field">
|
||||
<input type="text" size="3" id="round_boostHP_Min" class="at-input-stat-minmax" ng-model="obj.roundEffect.increaseCurrentHP.min" />
|
||||
-
|
||||
<input type="text" size="3" id="round_boostHP_Max" class="at-input-stat-minmax" ng-model="obj.roundEffect.increaseCurrentHP.max" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<label for="round_boostAP">Boost current AP (range):</label>
|
||||
<div class="field">
|
||||
<input type="text" size="3" id="round_boostAP_Min" class="at-input-stat-minmax" ng-model="obj.roundEffect.increaseCurrentAP.min" />
|
||||
-
|
||||
<input type="text" size="3" id="round_boostAP_Max" class="at-input-stat-minmax" ng-model="obj.roundEffect.increaseCurrentAP.max" />
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset id="hasFullRoundEffectDisplay" ng-ds-fade="obj.hasFullRoundEffect">
|
||||
<legend>Every full round (25s)</legend>
|
||||
<div class="fieldWithLabel">
|
||||
<label for="fullround_visualEffectID">Visual effect:</label>
|
||||
<select class="field" id="fullround_visualEffectID" ng-model="obj.fullRoundEffect.visualEffectID">
|
||||
<option value="">None</option>
|
||||
<option value="redSplash">Red splatter</option>
|
||||
<option value="blueSwirl">Blue swirl</option>
|
||||
<option value="greenSplash">Green splatter</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<label for="fullround_boostHP">Boost current HP (range):</label>
|
||||
<div class="field">
|
||||
<input type="text" size="3" id="fullround_boostHP_Min" class="at-input-stat-minmax" ng-model="obj.fullRoundEffect.increaseCurrentHP.min" />
|
||||
-
|
||||
<input type="text" size="3" id="fullround_boostHP_Max" class="at-input-stat-minmax" ng-model="obj.fullRoundEffect.increaseCurrentHP.max" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<label for="fullround_boostAP">Boost current AP (range):</label>
|
||||
<div class="field">
|
||||
<input type="text" size="3" id="fullround_boostAP_Min" class="at-input-stat-minmax" ng-model="obj.fullRoundEffect.increaseCurrentAP.min" />
|
||||
-
|
||||
<input type="text" size="3" id="fullround_boostAP_Max" class="at-input-stat-minmax" ng-model="obj.fullRoundEffect.increaseCurrentAP.max" />
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset id="hasAbilityEffectDisplay" ng-ds-fade="obj.hasAbilityEffect">
|
||||
<legend>Constant ability effect</legend>
|
||||
<div class="fieldWithLabel">
|
||||
<label for="boostMaxHP">Boost max HP:</label>
|
||||
<input type="text" size="5" id="boostMaxHP" class="field at-input-stat" ng-model="obj.abilityEffect.increaseMaxHP" />
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<label for="boostMaxAP">Boost max AP:</label>
|
||||
<input type="text" size="5" id="boostMaxAP" class="field at-input-stat" ng-model="obj.abilityEffect.increaseMaxAP" />
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<label for="moveCostPenalty">Increase move cost (AP):</label>
|
||||
<input type="text" size="5" id="moveCostPenalty" class="field at-input-stat" ng-model="obj.abilityEffect.increaseMoveCost" />
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<label for="increaseUseItemCost">Increase use cost (AP):</label>
|
||||
<input type="text" size="5" id="increaseUseItemCost" class="field at-input-stat" ng-model="obj.abilityEffect.increaseUseItemCost" />
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<label for="increaseReequipCost">Increase re-equip cost (AP):</label>
|
||||
<input type="text" size="5" id="increaseReequipCost" class="field at-input-stat" ng-model="obj.abilityEffect.increaseReequipCost" />
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<label for="attackCost">Increase attack cost (AP):</label>
|
||||
<input type="text" size="5" id="attackCost" class="field at-input-stat" ng-model="obj.abilityEffect.increaseAttackCost" />
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<label for="attackChance">Increase attack chance:</label>
|
||||
<input type="text" size="5" id="attackChance" class="field at-input-stat" ng-model="obj.abilityEffect.increaseAttackChance" />%
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<label for="attackDamage">Increase attack damage (range):</label>
|
||||
<div class="field">
|
||||
<input type="text" size="3" id="attackDamage_Min" class="at-input-stat-minmax" ng-model="obj.abilityEffect.increaseAttackDamage.min" />
|
||||
-
|
||||
<input type="text" size="3" id="attackDamage_Max" class="at-input-stat-minmax" ng-model="obj.abilityEffect.increaseAttackDamage.max" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<label for="criticalChance">Increase critical skill:</label>
|
||||
<input type="text" size="5" id="criticalChance" class="field at-input-stat" ng-model="obj.abilityEffect.increaseCriticalSkill" />%
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<label for="blockChance">Increase block chance:</label>
|
||||
<input type="text" size="5" id="blockChance" class="field at-input-stat" ng-model="obj.abilityEffect.increaseBlockChance" />%
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<label for="damageResistance">Increase damage resistance:</label>
|
||||
<input type="text" size="5" id="damageResistance" class="field at-input-stat" ng-model="obj.abilityEffect.increaseDamageResistance" />
|
||||
</div>
|
||||
</fieldset>
|
||||
<div class="endSets"> </div>
|
||||
@@ -1,326 +0,0 @@
|
||||
<h3>Dialogue</h3>
|
||||
|
||||
<fieldset id="dialoguePhrase">
|
||||
<legend>NPC phrase</legend>
|
||||
|
||||
<button ng-click="showPhraseTree(phrase)" class="btn" title="Show conversation as tree">
|
||||
<i class="icon-align-center"></i> Show as tree
|
||||
</button>
|
||||
<br /><br />
|
||||
|
||||
<div class="fieldWithLabel">
|
||||
<label for="id">Phrase ID:</label>
|
||||
<input type="text" size="30" id="id" class="field at-input-id" ng-model="phrase.id" />
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<label for="message">NPC says:</label>
|
||||
<textarea rows="4" cols="40" id="message" ng-model="phrase.message"></textarea>
|
||||
<p ng-ds-fade="!phrase.message && phrase.replies.length > 0" class="dialogueConditional">
|
||||
Since this phrase does not have any displayed<br />
|
||||
text, it will not be shown to the player.<br />
|
||||
Instead, the first reply that matches all<br />
|
||||
requirements will be automatically followed.
|
||||
</p>
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<label class="checkbox"><input type="checkbox" id="hasRewards" ng-model="phrase.hasRewards" />Reaching this phrase gives rewards</label>
|
||||
</div>
|
||||
<div class="fieldWithLabel" ng-ds-fade="phrase.hasRewards" ui:sortable ng:model="phrase.rewards">
|
||||
<div ng-repeat="reward in phrase.rewards" class="phrase-reward at-box">
|
||||
<div class="fieldWithLabel">
|
||||
<label for="rewardType">Reward Type:</label>
|
||||
<select class="field" id="rewardType" ng-model="reward.rewardType">
|
||||
<option value="questProgress">Quest progress</option>
|
||||
<option value="removeQuestProgress">Remove Quest progress</option>
|
||||
<option value="dropList">Droplist</option>
|
||||
<option value="skillIncrease">Skill increase</option>
|
||||
<option value="actorCondition">Actor condition</option>
|
||||
<option value="alignmentChange">Alignment/faction change</option>
|
||||
<option value="giveItem">Item</option>
|
||||
<option value="createTimer">Create timer</option>
|
||||
<option value="spawnAll">Spawn monsters</option>
|
||||
<option value="removeSpawnArea">Remove monsters</option>
|
||||
<option value="deactivateSpawnArea">Stop spawning</option>
|
||||
<option value="activateMapChangeArea">Activate mapchange</option>
|
||||
<option value="deactivateMapChangeArea">Deactivate mapchange</option>
|
||||
</select>
|
||||
</div>
|
||||
<div ng-show="reward.rewardType=='spawnAll' || reward.rewardType=='removeSpawnArea' || reward.rewardType=='deactivateSpawnArea'">
|
||||
<div class="fieldWithLabel">
|
||||
<label for="mapName">Map name:</label>
|
||||
<input type="text" size="30" id="mapName" class="field at-input-id" ng-model="reward.mapName" />
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<label for="rewardID">Monster spawngroup:</label>
|
||||
<input type="text" size="30" id="rewardID" class="field at-input-id" ng-model="reward.rewardID" />
|
||||
</div>
|
||||
</div>
|
||||
<div ng-show="reward.rewardType=='activateMapChangeArea' || reward.rewardType=='deactivateMapChangeArea'">
|
||||
<div class="fieldWithLabel">
|
||||
<label for="mapName">Map name:</label>
|
||||
<input type="text" size="30" id="mapName" class="field at-input-id" ng-model="reward.mapName" />
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<label for="rewardID">Area name:</label>
|
||||
<input type="text" size="30" id="rewardID" class="field at-input-id" ng-model="reward.rewardID" />
|
||||
</div>
|
||||
</div>
|
||||
<div ng-show="reward.rewardType=='questProgress'">
|
||||
<div class="fieldWithLabel">
|
||||
<label for="rewardID">Quest ID:</label>
|
||||
<input type="text" size="30" id="rewardID" class="field at-input-id" ng-model="reward.rewardID" />
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<label for="rewardvalue">Stage:</label>
|
||||
<input type="text" size="3" id="rewardvalue" class="field at-input-quantity" ng-model="reward.value" />
|
||||
</div>
|
||||
</div>
|
||||
<div ng-show="reward.rewardType=='removeQuestProgress'">
|
||||
<div class="fieldWithLabel">
|
||||
<label for="rewardID">Quest ID:</label>
|
||||
<input type="text" size="30" id="rewardID" class="field at-input-id" ng-model="reward.rewardID" />
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<label for="rewardvalue">Stage:</label>
|
||||
<input type="text" size="3" id="rewardvalue" class="field at-input-quantity" ng-model="reward.value" />
|
||||
</div>
|
||||
</div>
|
||||
<div ng-show="reward.rewardType=='dropList'">
|
||||
<div class="fieldWithLabel">
|
||||
<label for="rewardID">Droplist ID:</label>
|
||||
<input type="text" size="30" id="rewardID" class="field at-input-id" ng-model="reward.rewardID" />
|
||||
</div>
|
||||
</div>
|
||||
<div ng-show="reward.rewardType=='skillIncrease'">
|
||||
<div class="fieldWithLabel">
|
||||
<label for="rewardID">Skill ID:</label>
|
||||
<input type="text" size="30" id="rewardID" class="field at-input-id" ng-model="reward.rewardID" />
|
||||
</div>
|
||||
</div>
|
||||
<div ng-show="reward.rewardType=='actorCondition'">
|
||||
<div class="fieldWithLabel">
|
||||
<label for="rewardID">Actor Condition ID:</label>
|
||||
<input type="text" size="30" id="rewardID" class="field at-input-id" ng-model="reward.rewardID" />
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<label for="rewardvalue">Duration:</label>
|
||||
<input type="text" size="3" id="rewardvalue" class="field at-input-quantity" ng-model="reward.value" />
|
||||
</div>
|
||||
</div>
|
||||
<div ng-show="reward.rewardType=='alignmentChange'">
|
||||
<div class="fieldWithLabel">
|
||||
<label for="rewardID">Faction ID:</label>
|
||||
<input type="text" size="30" id="rewardID" class="field at-input-id" ng-model="reward.rewardID" />
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<label for="rewardvalue">Delta:</label>
|
||||
<input type="text" size="3" id="rewardvalue" class="field at-input-quantity" ng-model="reward.value" />
|
||||
</div>
|
||||
</div>
|
||||
<div ng-show="reward.rewardType=='giveItem'">
|
||||
<div class="fieldWithLabel">
|
||||
<label for="rewardID">Item ID:</label>
|
||||
<input type="text" size="30" id="rewardID" class="field at-input-id" ng-model="reward.rewardID" />
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<label for="rewardvalue">Quantity:</label>
|
||||
<input type="text" size="3" id="rewardvalue" class="field at-input-quantity" ng-model="reward.value" />
|
||||
</div>
|
||||
</div>
|
||||
<div ng-show="reward.rewardType=='createTimer'">
|
||||
<div class="fieldWithLabel">
|
||||
<label for="rewardID"><span class="hint hint--top" data-hint="Can be any unique string really, just something to refer to this timer in some reply requirement.">Timer ID:</span></label>
|
||||
<input type="text" size="30" id="rewardID" class="field at-input-id" ng-model="reward.rewardID" />
|
||||
</div>
|
||||
</div>
|
||||
<button ng-click="removeReward(phrase, reward)" class="btn pull-right" title="Remove reward"><i class="icon-trash"></i> Remove reward</button>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
<div>
|
||||
<button ng-click="addReward(phrase)" class="btn" title="Add reward"><i class="icon-plus-sign"></i> Add reward</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<label class="checkbox"><input type="checkbox" id="showAdvanced" ng-model="phrase.showAdvanced" />Show advanced properties</label>
|
||||
</div>
|
||||
<div class="fieldWithLabel" ng-ds-fade="phrase.showAdvanced">
|
||||
<label for="switchToNPC"><span class="hint hint--top" data-hint="Id of a NPC that speaks this phrase. All subsequent phrases will be spoken by this NPC.">Switch active NPC to:</span></label>
|
||||
<input type="text" size="30" id="switchToNPC" class="field at-input-id" ng-model="phrase.switchToNPC" />
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<fieldset id="dialoguePhraseReplies">
|
||||
<legend>Replies</legend>
|
||||
<div class="fieldWithLabel">
|
||||
<label class="checkbox"><input type="checkbox" id="hasOnlyNextReply" ng-model="phrase.hasOnlyNextReply" />Phrase leads directly to another<br />phrase without replies</label>
|
||||
</div>
|
||||
<div class="fieldWithLabel" ng-ds-fade="phrase.hasOnlyNextReply">
|
||||
<label for="nextPhraseID">Phrase ID:</label>
|
||||
<div class="field">
|
||||
<input type="text" size="30" id="nextPhraseID" class="at-input-id" ng-model="phrase.nextPhraseID" placeholder="leave empty to generate id" />
|
||||
<a ng-click="proceedToPhrase(phrase, 'nextPhraseID')" class="btn" title="Open editor for the indicated phrase. Leave empty to automatically generate a new phrase id based on the prefix for this phrase, or supply a new phrase id that should be used.">
|
||||
<span ng-show="phrase.nextPhraseID"><i class="icon-forward"></i> Go</span>
|
||||
<span ng-show="!phrase.nextPhraseID"><i class="icon-star-empty"></i> Generate</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="fieldWithLabel" ng-ds-fade="!phrase.hasOnlyNextReply">
|
||||
<label for="replies">Replies</label>
|
||||
<table class="field" id="replies">
|
||||
<thead><tr>
|
||||
<th>Reply</th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr></thead>
|
||||
<tbody ui:sortable ng:model="phrase.replies">
|
||||
<tr ng-repeat="reply in phrase.replies">
|
||||
<td ng-click="selectReply(reply)" class="clickToEdit">
|
||||
<span ng-show="reply.text">{{reply.text.substring(0, 40)}}</span>
|
||||
<span ng-show="!reply.text" class="dialogueConditional">(conditional evaluation)</span>
|
||||
</td>
|
||||
<td><a ng-click="removeReply(phrase, reply)" class="btn" title="Remove reply"><i class="icon-trash"></i></a></td>
|
||||
<td><a ng-click="proceedToPhrase(reply, 'nextPhraseID')" class="btn" title="Follow" ng-show="reply.nextPhraseID && reply.nextPhraseID.length > 1"><i class="icon-forward"></i> Go</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<button ng-click="addReply(phrase)" class="btn" title="Add reply"><i class="icon-plus-sign"></i> Add reply</button>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<fieldset id="dialogueReply" ng-show="reply">
|
||||
<legend>Player reply</legend>
|
||||
<div class="fieldWithLabel">
|
||||
<label for="text">Player says:</label>
|
||||
<textarea rows="4" cols="40" id="text" ng-model="reply.text"></textarea>
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<label for="replyLeadsTo">Reply leads to:</label>
|
||||
<select class="field" id="replyLeadsTo" ng-model="reply.replyLeadsTo">
|
||||
<option value="">Another phrase</option>
|
||||
<option value="S">Trading screen</option>
|
||||
<option value="F">Combat</option>
|
||||
<option value="X">Conversation ends</option>
|
||||
<option value="R">NPC is removed from map</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="fieldWithLabel" ng-ds-fade="!reply.replyLeadsTo">
|
||||
<label for="nextPhraseID">Next phrase ID:</label>
|
||||
<div class="field">
|
||||
<input type="text" size="30" id="nextPhraseID" class="at-input-id" ng-model="reply.nextPhraseID" placeholder="leave empty to generate id" />
|
||||
<a ng-click="proceedToPhrase(reply, 'nextPhraseID')" class="btn" title="Open editor for the indicated phrase. Leave empty to automatically generate a new phrase id based on the prefix for this phrase, or supply a new phrase id that should be used.">
|
||||
<span ng-show="reply.nextPhraseID"><i class="icon-forward"></i> Go</span>
|
||||
<span ng-show="!reply.nextPhraseID"><i class="icon-star-empty"></i> Generate</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<label class="checkbox"><input type="checkbox" id="hasRequirements" ng-model="reply.hasRequirements" />Player must fulfill requirements to select this reply</label>
|
||||
</div>
|
||||
<div class="fieldWithLabel" ng-ds-fade="reply.hasRequirements" ui:sortable ng:model="reply.requires">
|
||||
<div ng-repeat="require in reply.requires" class="reply-requirement at-box">
|
||||
<div class="fieldWithLabel">
|
||||
<label for="requireType">Require:</label>
|
||||
<select class="field" id="requireType" ng-model="require.requireType">
|
||||
<option value="questProgress">Quest progress</option>
|
||||
<option value="questLatestProgress">Exact quest progress</option>
|
||||
<option value="inventoryRemove">Inventory & item will be removed</option>
|
||||
<option value="inventoryKeep">Inventory</option>
|
||||
<option value="wear">Worn equipment</option>
|
||||
<option value="skillLevel">Skill level</option>
|
||||
<option value="killedMonster">Killed monster</option>
|
||||
<option value="timerElapsed">Timer elapsed</option>
|
||||
<option value="usedItem">Used items (greater or equals)</option>
|
||||
<option value="spentGold">Gold spent (greater or equals)/option>
|
||||
<option value="consumedBonemeals">Bonemeals consumed (greater or equals)</option>
|
||||
<option value="hasActorCondition">Has actor condition</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="filedWithLabel">
|
||||
<label class="checkbox"><input type="checkbox" id="requirenegation" ng-model="require.negate" />Negate this requirement</label>
|
||||
</div>
|
||||
<div ng-show="require.requireType=='questProgress' || require.requireType=='questLatestProgress'">
|
||||
<div class="fieldWithLabel">
|
||||
<label for="requireID">Quest ID:</label>
|
||||
<input type="text" size="30" id="requireID" class="field at-input-id" ng-model="require.requireID" />
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<label for="requirevalue">Stage:</label>
|
||||
<input type="text" size="3" id="requirevalue" class="field at-input-quantity" ng-model="require.value" />
|
||||
</div>
|
||||
</div>
|
||||
<div ng-show="require.requireType=='inventoryRemove' || require.requireType=='inventoryKeep' || require.requireType=='usedItem'">
|
||||
<div class="fieldWithLabel">
|
||||
<label for="requireID">Item ID:</label>
|
||||
<input type="text" size="30" id="requireID" class="field at-input-id" ng-model="require.requireID" />
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<label for="requirevalue">Quantity:</label>
|
||||
<input type="text" size="3" id="requirevalue" class="field at-input-quantity" ng-model="require.value" />
|
||||
</div>
|
||||
</div>
|
||||
<div ng-show="require.requireType=='wear'">
|
||||
<div class="fieldWithLabel">
|
||||
<label for="requireID">Item ID:</label>
|
||||
<input type="text" size="30" id="requireID" class="field at-input-id" ng-model="require.requireID" />
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<label for="requirevalue">Quantity (optional):</label>
|
||||
<input type="text" size="3" id="requirevalue" class="field at-input-quantity" ng-model="require.value" />
|
||||
</div>
|
||||
</div>
|
||||
<div ng-show="require.requireType=='skillLevel'">
|
||||
<div class="fieldWithLabel">
|
||||
<label for="requireID">Skill ID:</label>
|
||||
<input type="text" size="30" id="requireID" class="field at-input-id" ng-model="require.requireID" />
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<label for="requirevalue">Level:</label>
|
||||
<input type="text" size="3" id="requirevalue" class="field at-input-quantity" ng-model="require.value" />
|
||||
</div>
|
||||
</div>
|
||||
<div ng-show="require.requireType=='killedMonster'">
|
||||
<div class="fieldWithLabel">
|
||||
<label for="requireID">Monster ID:</label>
|
||||
<input type="text" size="30" id="requireID" class="field at-input-id" ng-model="require.requireID" />
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<label for="requirevalue">Quantity:</label>
|
||||
<input type="text" size="3" id="requirevalue" class="field at-input-quantity" ng-model="require.value" />
|
||||
</div>
|
||||
</div>
|
||||
<div ng-show="require.requireType=='timerElapsed'">
|
||||
<div class="fieldWithLabel">
|
||||
<label for="requireID">Timer ID:</label>
|
||||
<input type="text" size="30" id="requireID" class="field at-input-id" ng-model="require.requireID" />
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<label for="requirevalue">Number of rounds:</label>
|
||||
<input type="text" size="3" id="requirevalue" class="field at-input-quantity" ng-model="require.value" />
|
||||
</div>
|
||||
</div>
|
||||
<div ng-show="require.requireType=='spentGold'">
|
||||
<div class="fieldWithLabel">
|
||||
<label for="requirevalue">Quantity:</label>
|
||||
<input type="text" size="3" id="requirevalue" class="field at-input-quantity" ng-model="require.value" />
|
||||
</div>
|
||||
</div>
|
||||
<div ng-show="require.requireType=='consumedBonemeals'">
|
||||
<div class="fieldWithLabel">
|
||||
<label for="requirevalue">Quantity:</label>
|
||||
<input type="text" size="3" id="requirevalue" class="field at-input-quantity" ng-model="require.value" />
|
||||
</div>
|
||||
</div>
|
||||
<div ng-show="require.requireType=='hasActorCondition'">
|
||||
<div class="fieldWithLabel">
|
||||
<label for="requireID">Actor Condition ID:</label>
|
||||
<input type="text" size="30" id="requireID" class="field at-input-id" ng-model="require.requireID" />
|
||||
</div>
|
||||
</div>
|
||||
<button ng-click="removeRequirement(reply, require)" class="btn pull-right" title="Remove requirement"><i class="icon-trash"></i> Remove requirement</button>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
<button ng-click="addRequirement(reply)" class="btn" title="Add requirement"><i class="icon-plus-sign"></i> Add requirement</button>
|
||||
</div>
|
||||
|
||||
</fieldset>
|
||||
<div class="endSets"> </div>
|
||||
@@ -1,33 +0,0 @@
|
||||
<h3>Droplist - {{obj.id}}</h3>
|
||||
<fieldset>
|
||||
<legend>General</legend>
|
||||
<div class="fieldWithLabel">
|
||||
<label for="id" class="hint hint--top" data-hint="The id is not displayed to the player anywhere. Must be a unique id (no two droplists may have the same id). This is the id that you can enter on monsters to make them drop all these items.">Droplist internal ID:</label>
|
||||
<input type="text" size="30" id="id" class="field at-input-id" ng-model="obj.id" />
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<label for="stages">Items dropped</label>
|
||||
<table class="field" id="items">
|
||||
<thead><tr>
|
||||
<th id="itemID">Item (id)</th>
|
||||
<th id="quantity">Quantity (range)</th>
|
||||
<th id="chance"><span class="hint hint--top" data-hint="Percentage chance, integer value from 1 (very unlikely) to 100 (always).">Chance</span></th>
|
||||
<th></th>
|
||||
</tr></thead>
|
||||
<tbody ui:sortable ng:model="obj.items">
|
||||
<tr ng-repeat="dropItem in obj.items">
|
||||
<td><input type="text" ng-model="dropItem.itemID" class="at-input-id" /></td>
|
||||
<td>
|
||||
<input type="text" size="3" ng-model="dropItem.quantity.min" class="at-input-quantity" />
|
||||
-
|
||||
<input type="text" size="3" ng-model="dropItem.quantity.max" class="at-input-quantity" />
|
||||
</td>
|
||||
<td><input type="text" size="3" ng-model="dropItem.chance" class="at-input-chance" /></td>
|
||||
<td><a ng-click="removeDropItem(dropItem)" class="btn btn-mini" title="Remove row"><i class="icon-trash"></i></a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<button ng-click="addDropItem()" class="btn" title="Add row"><i class="icon-plus-sign"></i> Add</button>
|
||||
</div>
|
||||
</fieldset>
|
||||
<div class="endSets"> </div>
|
||||
@@ -1,298 +0,0 @@
|
||||
<h3>Item - {{obj.name}}</h3>
|
||||
<div class="prevNext">
|
||||
<a class="btn btn-secondary" ng-click="previous()"><i class="icon-backward"></i></a>
|
||||
<a class="btn btn-secondary" ng-click="next()"><i class="icon-forward"></i></a>
|
||||
</div>
|
||||
<fieldset>
|
||||
<legend>General</legend>
|
||||
<div class="fieldWithLabel">
|
||||
<label for="iconID">Icon:</label>
|
||||
<span class="field">
|
||||
<div ng-tile-image="obj.iconID" class="at-input-icon" ng-select-image="item" ng-select-image-dest="obj.iconID"></div>
|
||||
<input type="text" id="iconID" class="at-input-iconID" ng-model="obj.iconID" />
|
||||
</span>
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<label for="name">Display name:</label>
|
||||
<input type="text" size="30" id="name" class="field at-input-name" ng-model="obj.name" />
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<label for="id" class="hint hint--top" data-hint="The id is not displayed to the player anywhere. Must be a unique id (no two items may have the same id). Prefer short ids since it keeps savegames smaller.">Internal ID:</label>
|
||||
<input type="text" size="30" id="id" class="field at-input-id" ng-model="obj.id" />
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<label for="category">Category:</label>
|
||||
<select class="field" id="category" ng-model="obj.category" ng-options="s.name for s in itemCategories">
|
||||
</select>
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<label for="description" class="hint hint--top" data-hint="Background story of the item, that ties its history into the rest of the world.">Lore/Description:</label>
|
||||
<textarea class="field" rows="4" cols="40" id="description" ng-model="obj.description" placeholder="Leave empty for most normal items"></textarea>
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<label for="displaytype">Display as:</label>
|
||||
<select class="field" id="displaytype" ng-model="obj.displaytype">
|
||||
<option value="ordinary">Ordinary item</option>
|
||||
<option value="quest">Quest item (yellow)</option>
|
||||
<option value="legendary">Legendary (green)</option>
|
||||
<option value="extraordinary">Extraordinary (blue)</option>
|
||||
<option value="rare">Rare (purple)</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="fieldWithLabel" ng-ds-fade="isWearable">
|
||||
<label class="checkbox"><input type="checkbox" id="hasEquipEffect" ng-model="obj.hasEquipEffect" />Has equip effect</label>
|
||||
</div>
|
||||
<div class="fieldWithLabel" ng-ds-fade="isUsable">
|
||||
<label class="checkbox"><input type="checkbox" id="hasUseEffect" ng-model="obj.hasUseEffect" />Has use effect</label>
|
||||
</div>
|
||||
<div class="fieldWithLabel" ng-ds-fade="isWearable">
|
||||
<label class="checkbox"><input type="checkbox" id="hasHitEffect" ng-model="obj.hasHitEffect" />Has effect on every hit</label>
|
||||
</div>
|
||||
<div class="fieldWithLabel" ng-ds-fade="isWearable">
|
||||
<label class="checkbox"><input type="checkbox" id="hasKillEffect" ng-model="obj.hasKillEffect" />Has effect on every kill</label>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>Price</legend>
|
||||
<div class="fieldWithLabel">
|
||||
<label class="checkbox"><input type="checkbox" id="hasManualPrice" ng-model="obj.hasManualPrice" ng-true-value="1" ng-false-value="0" ng-change="updateCost(obj)" />Item has manually specified store price</label>
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<label for="baseMarketCost">Base market cost (gold):</label>
|
||||
<input type="text" size="7" id="baseMarketCost" ng-show="obj.hasManualPrice == 0" class="field at-input-gold" readonly="readonly" value="{{getItemCost(obj)}}" />
|
||||
<input type="text" size="7" id="baseMarketCost" ng-show="obj.hasManualPrice == 1" class="field at-input-gold" ng-model="obj.baseMarketCost" title="The actual price is adjusted 15% depending on if the item is being bought or sold. Set to 0 to prohibit selling this item type (for example, for a quest item)." />
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<label for="marketCost_Sell">Actual price (gold):</label>
|
||||
<div class="field">
|
||||
<span>Sell: <input type="text" size="7" id="marketCost_Sell" class="at-input-gold" value="{{getItemSellingCost(obj)}}" readonly="readonly" /></span>
|
||||
<span>Buy: <input type="text" size="7" id="marketCost_Buy" class="at-input-gold" value="{{getItemBuyingCost(obj)}}" readonly="readonly" /></span>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset id="hasEquipEffectDisplay" ng-ds-fade="obj.hasEquipEffect">
|
||||
<legend>When equipped</legend>
|
||||
<div class="fieldWithLabel">
|
||||
<label for="equip_boostMaxHP">Increase max HP:</label>
|
||||
<input type="text" size="5" id="equip_boostMaxHP" class="field at-input-stat" ng-model="obj.equipEffect.increaseMaxHP" />
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<label class="checkbox"><input type="checkbox" id="hasEquipEffect" ng-model="obj.hasEquipAPEffect" />Has AP effect</label>
|
||||
</div>
|
||||
<div class="fieldWithLabel" ng-ds-fade="obj.hasEquipAPEffect">
|
||||
<label for="equip_boostMaxAP">Increase max AP:</label>
|
||||
<input type="text" size="5" id="equip_boostMaxAP" class="field at-input-stat" ng-model="obj.equipEffect.increaseMaxAP" />
|
||||
</div>
|
||||
<div class="fieldWithLabel" ng-ds-fade="obj.hasEquipAPEffect">
|
||||
<label for="equip_moveCostPenalty">Increase move cost (AP):</label>
|
||||
<input type="text" size="5" id="equip_moveCostPenalty" class="field at-input-stat" ng-model="obj.equipEffect.increaseMoveCost" />
|
||||
</div>
|
||||
<div class="fieldWithLabel" ng-ds-fade="obj.hasEquipAPEffect">
|
||||
<label for="equip_increaseUseItemCost">Increase use item cost (AP):</label>
|
||||
<input type="text" size="5" id="equip_increaseUseItemCost" class="field at-input-stat" ng-model="obj.equipEffect.increaseUseItemCost" />
|
||||
</div>
|
||||
<div class="fieldWithLabel" ng-ds-fade="obj.hasEquipAPEffect">
|
||||
<label for="equip_increaseReequipCost">Increase re-equip cost (AP):</label>
|
||||
<input type="text" size="5" id="equip_increaseReequipCost" class="field at-input-stat" ng-model="obj.equipEffect.increaseReequipCost" />
|
||||
</div>
|
||||
<div class="fieldWithLabel" ng-ds-fade="!isWeapon">
|
||||
<label for="equip_attackCost">Increase attack cost (AP):</label>
|
||||
<input type="text" size="5" id="equip_attackCost" class="field at-input-stat" ng-model="obj.equipEffect.increaseAttackCost" />
|
||||
</div>
|
||||
<div class="fieldWithLabel" ng-ds-fade="isWeapon">
|
||||
<label for="equip_attackCost">Attack cost (AP):</label>
|
||||
<input type="text" size="5" id="equip_attackCost" class="field at-input-stat" ng-model="obj.equipEffect.increaseAttackCost" />
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<label for="equip_attackChance">Increase attack chance:</label>
|
||||
<input type="text" size="5" id="equip_attackChance" class="field at-input-stat" ng-model="obj.equipEffect.increaseAttackChance" />%
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<label for="equip_attackDamage">Increase attack damage (range):</label>
|
||||
<div class="field">
|
||||
<input type="text" size="3" id="equip_attackDamage_Min" class="at-input-stat-minmax" ng-model="obj.equipEffect.increaseAttackDamage.min" />
|
||||
-
|
||||
<input type="text" size="3" id="equip_attackDamage_Max" class="at-input-stat-minmax" ng-model="obj.equipEffect.increaseAttackDamage.max" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<label for="equip_criticalChance">Increase critical skill:</label>
|
||||
<input type="text" size="5" id="equip_criticalChance" class="field at-input-stat" ng-model="obj.equipEffect.increaseCriticalSkill" />
|
||||
</div>
|
||||
<div class="fieldWithLabel" ng-ds-fade="isWeapon">
|
||||
<label for="equip_criticalMultiplier" class="hint hint--top" data-hint="Only for weapons">Critical multiplier:</label>
|
||||
<input type="text" size="5" id="equip_criticalMultiplier" class="field at-input-stat" ng-model="obj.equipEffect.setCriticalMultiplier" />
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<label for="equip_blockChance">Increase block chance:</label>
|
||||
<input type="text" size="5" id="equip_blockChance" class="field at-input-stat" ng-model="obj.equipEffect.increaseBlockChance" />%
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<label for="equip_damageResistance">Increase damage resistance:</label>
|
||||
<input type="text" size="5" id="equip_damageResistance" class="field at-input-stat" ng-model="obj.equipEffect.increaseDamageResistance" />
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<label for="equip_conditions">Apply actor condition</label>
|
||||
<table class="field" id="equip_conditions">
|
||||
<thead><tr>
|
||||
<th><span class="hint hint--left" data-hint="Id of the actor condition to be applied.">Condition</span></th>
|
||||
<th><span class="hint hint--left" data-hint="How strong the effect should be. For example, magnitude=2 is equal to having two effects active at the same time. Use -99 to remove permanent effects.">Magnitude</span></th>
|
||||
<th></th>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<tr ng-repeat="condition in obj.equipEffect.addedConditions">
|
||||
<td><input type="text" ng-model="condition.condition" class="at-input-id" /></td>
|
||||
<td><input type="text" size="3" ng-model="condition.magnitude" class="at-input-magnitude" /></td>
|
||||
<td><a ng-click="removeCondition(obj.equipEffect.addedConditions, condition)" class="btn btn-mini" title="Remove row"><i class="icon-trash"></i></a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<button ng-click="addCondition(obj.equipEffect.addedConditions)" class="btn" title="Add row"><i class="icon-plus-sign"></i> Add</button>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset id="hasUseEffectDisplay" ng-ds-fade="obj.hasUseEffect">
|
||||
<legend>When used</legend>
|
||||
<div class="fieldWithLabel">
|
||||
<label for="use_boostHP">Boost current HP (range):</label>
|
||||
<div class="field">
|
||||
<input type="text" size="3" id="use_boostHP_Min" class="at-input-stat-minmax" ng-model="obj.useEffect.increaseCurrentHP.min" />
|
||||
-
|
||||
<input type="text" size="3" id="use_boostHP_Max" class="at-input-stat-minmax" ng-model="obj.useEffect.increaseCurrentHP.max" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<label for="use_boostAP">Boost current AP (range):</label>
|
||||
<div class="field">
|
||||
<input type="text" size="3" id="use_boostAP_Min" class="at-input-stat-minmax" ng-model="obj.useEffect.increaseCurrentAP.min" />
|
||||
-
|
||||
<input type="text" size="3" id="use_boostAP_Max" class="at-input-stat-minmax" ng-model="obj.useEffect.increaseCurrentAP.max" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<label for="use_conditionsSource">Apply actor condition</label>
|
||||
<table class="field" id="use_conditionsSource">
|
||||
<thead><tr>
|
||||
<th><span class="hint hint--left" data-hint="Id of the actor condition to be applied.">Condition</span></th>
|
||||
<th><span class="hint hint--left" data-hint="How strong the effect should be. For example, magnitude=2 is equal to having two effects active at the same time. Use -99 to remove permanent effects.">Magnitude</span></th>
|
||||
<th><span class="hint hint--left" data-hint="How many rounds the actor condtions should last. Use 999 for a permanent effect.">Duration</span></th>
|
||||
<th><span class="hint hint--left" data-hint="Percentage chance, integer value from 1 (very unlikely) to 100 (always).">Chance</span></th>
|
||||
<th></th>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<tr ng-repeat="condition in obj.useEffect.conditionsSource">
|
||||
<td><input type="text" ng-model="condition.condition" class="at-input-id" /></td>
|
||||
<td><input type="text" size="3" ng-model="condition.magnitude" class="at-input-magnitude" /></td>
|
||||
<td><input type="text" size="3" ng-model="condition.duration" class="at-input-duration" /></td>
|
||||
<td><input type="text" size="3" ng-model="condition.chance" class="at-input-chance" /></td>
|
||||
<td><a ng-click="removeCondition(obj.useEffect.conditionsSource, condition)" class="btn btn-mini" title="Remove row"><i class="icon-trash"></i></a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<button ng-click="addCondition(obj.useEffect.conditionsSource)" class="btn" title="Add row"><i class="icon-plus-sign"></i> Add</button>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset id="hasHitEffectDisplay" ng-ds-fade="obj.hasHitEffect">
|
||||
<legend>When making a successful hit</legend>
|
||||
<div class="fieldWithLabel">
|
||||
<label for="hit_boostHP">Boost current HP (range):</label>
|
||||
<div class="field">
|
||||
<input type="text" size="3" id="hit_boostHP_Min" class="at-input-stat-minmax" ng-model="obj.hitEffect.increaseCurrentHP.min" />
|
||||
-
|
||||
<input type="text" size="3" id="hit_boostHP_Max" class="at-input-stat-minmax" ng-model="obj.hitEffect.increaseCurrentHP.max" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<label for="hit_boostAP">Boost current AP (range):</label>
|
||||
<div class="field">
|
||||
<input type="text" size="3" id="hit_boostAP_Min" class="at-input-stat-minmax" ng-model="obj.hitEffect.increaseCurrentAP.min" />
|
||||
-
|
||||
<input type="text" size="3" id="hit_boostAP_Max" class="at-input-stat-minmax" ng-model="obj.hitEffect.increaseCurrentAP.max" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<label for="hit_conditionsSource">Apply actor condition to source</label>
|
||||
<table class="field" id="hit_conditionsSource">
|
||||
<thead><tr>
|
||||
<th><span class="hint hint--left" data-hint="Id of the actor condition to be applied.">Condition</span></th>
|
||||
<th><span class="hint hint--left" data-hint="How strong the effect should be. For example, magnitude=2 is equal to having two effects active at the same time. Use -99 to remove permanent effects.">Magnitude</span></th>
|
||||
<th><span class="hint hint--left" data-hint="How many rounds the actor condtions should last. Use 999 for a permanent effect.">Duration</span></th>
|
||||
<th><span class="hint hint--left" data-hint="Percentage chance, integer value from 1 (very unlikely) to 100 (always).">Chance</span></th>
|
||||
<th></th>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<tr ng-repeat="condition in obj.hitEffect.conditionsSource">
|
||||
<td><input type="text" ng-model="condition.condition" class="at-input-id" /></td>
|
||||
<td><input type="text" size="3" ng-model="condition.magnitude" class="at-input-magnitude" /></td>
|
||||
<td><input type="text" size="3" ng-model="condition.duration" class="at-input-duration" /></td>
|
||||
<td><input type="text" size="3" ng-model="condition.chance" class="at-input-chance" /></td>
|
||||
<td><a ng-click="removeCondition(obj.hitEffect.conditionsSource, condition)" class="btn btn-mini" title="Remove row"><i class="icon-trash"></i></a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<button ng-click="addCondition(obj.hitEffect.conditionsSource)" class="btn" title="Add row"><i class="icon-plus-sign"></i> Add</button>
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<label for="hit_conditionsTarget">Apply actor condition to target</label>
|
||||
<table class="field" id="hit_conditionsTarget">
|
||||
<thead><tr>
|
||||
<th><span class="hint hint--left" data-hint="Id of the actor condition to be applied.">Condition</span></th>
|
||||
<th><span class="hint hint--left" data-hint="How strong the effect should be. For example, magnitude=2 is equal to having two effects active at the same time. Use -99 to remove permanent effects.">Magnitude</span></th>
|
||||
<th><span class="hint hint--left" data-hint="How many rounds the actor condtions should last. Use 999 for a permanent effect.">Duration</span></th>
|
||||
<th><span class="hint hint--left" data-hint="Percentage chance, integer value from 1 (very unlikely) to 100 (always).">Chance</span></th>
|
||||
<th></th>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<tr ng-repeat="condition in obj.hitEffect.conditionsTarget">
|
||||
<td><input type="text" ng-model="condition.condition" class="at-input-id" /></td>
|
||||
<td><input type="text" size="3" ng-model="condition.magnitude" class="at-input-magnitude" /></td>
|
||||
<td><input type="text" size="3" ng-model="condition.duration" class="at-input-duration" /></td>
|
||||
<td><input type="text" size="3" ng-model="condition.chance" class="at-input-chance" /></td>
|
||||
<td><a ng-click="removeCondition(obj.hitEffect.conditionsTarget, condition)" class="btn btn-mini" title="Remove row"><i class="icon-trash"></i></a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<button ng-click="addCondition(obj.hitEffect.conditionsTarget)" class="btn" title="Add row"><i class="icon-plus-sign"></i> Add</button>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset id="hasKillEffectDisplay" ng-ds-fade="obj.hasKillEffect">
|
||||
<legend>On every kill</legend>
|
||||
<div class="fieldWithLabel">
|
||||
<label for="kill_boostHP">Boost current HP (range):</label>
|
||||
<div class="field">
|
||||
<input type="text" size="3" id="kill_boostHP_Min" class="at-input-stat-minmax" ng-model="obj.killEffect.increaseCurrentHP.min" />
|
||||
-
|
||||
<input type="text" size="3" id="kill_boostHP_Max" class="at-input-stat-minmax" ng-model="obj.killEffect.increaseCurrentHP.max" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<label for="kill_boostAP">Boost current AP (range):</label>
|
||||
<div class="field">
|
||||
<input type="text" size="3" id="kill_boostAP_Min" class="at-input-stat-minmax" ng-model="obj.killEffect.increaseCurrentAP.min" />
|
||||
-
|
||||
<input type="text" size="3" id="kill_boostAP_Max" class="at-input-stat-minmax" ng-model="obj.killEffect.increaseCurrentAP.max" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<label for="kill_conditionsSource">Apply actor condition</label>
|
||||
<table class="field" id="kill_conditionsSource">
|
||||
<thead><tr>
|
||||
<th><span class="hint hint--left" data-hint="Id of the actor condition to be applied.">Condition</span></th>
|
||||
<th><span class="hint hint--left" data-hint="How strong the effect should be. For example, magnitude=2 is equal to having two effects active at the same time. Use -99 to remove permanent effects.">Magnitude</span></th>
|
||||
<th><span class="hint hint--left" data-hint="How many rounds the actor condtions should last. Use 999 for a permanent effect.">Duration</span></th>
|
||||
<th><span class="hint hint--left" data-hint="Percentage chance, integer value from 1 (very unlikely) to 100 (always).">Chance</span></th>
|
||||
<th></th>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<tr ng-repeat="condition in obj.killEffect.conditionsSource">
|
||||
<td><input type="text" ng-model="condition.condition" class="at-input-id" /></td>
|
||||
<td><input type="text" size="3" ng-model="condition.magnitude" class="at-input-magnitude" /></td>
|
||||
<td><input type="text" size="3" ng-model="condition.duration" class="at-input-duration" /></td>
|
||||
<td><input type="text" size="3" ng-model="condition.chance" class="at-input-chance" /></td>
|
||||
<td><a ng-click="removeCondition(obj.killEffect.conditionsSource, condition)" class="btn btn-mini" title="Remove row"><i class="icon-trash"></i></a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<button ng-click="addCondition(obj.killEffect.conditionsSource)" class="btn" title="Add row"><i class="icon-plus-sign"></i> Add</button>
|
||||
</div>
|
||||
</fieldset>
|
||||
<div class="endSets"> </div>
|
||||
@@ -1,44 +0,0 @@
|
||||
<h3>Item Category - {{obj.name}}</h3>
|
||||
<fieldset>
|
||||
<legend>General</legend>
|
||||
<div class="fieldWithLabel">
|
||||
<label for="id">Internal id:</label>
|
||||
<input type="text" size="30" id="id" ng-model="obj.id" class="field at-input-id"/>
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<label for="name">Display name:</label>
|
||||
<input type="text" size="30" id="name" ng-model="obj.name" class="field at-input-name"/>
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<label for="actionType">Action type:</label>
|
||||
<select class="field" id="actionType" ng-model="obj.actionType">
|
||||
<option value="none">Non-usable</option>
|
||||
<option value="use">Usable</option>
|
||||
<option value="equip">Equippable</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="fieldWithLabel" ng-ds-fade="obj.actionType == 2">
|
||||
<label for="inventorySlot">Equippable inventory slot:</label>
|
||||
<select class="field" id="inventorySlot" ng-model="obj.inventorySlot">
|
||||
<option value="">None</option>
|
||||
<option value="weapon">Weapon</option>
|
||||
<option value="shield">Shield</option>
|
||||
<option value="head">Head</option>
|
||||
<option value="body">Body</option>
|
||||
<option value="hand">Hand</option>
|
||||
<option value="feet">Feet</option>
|
||||
<option value="neck">Neck</option>
|
||||
<option value="ring">Ring</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<label for="size">Size:</label>
|
||||
<select class="field" id="size" ng-model="obj.size">
|
||||
<option value="none">None</option>
|
||||
<option value="light">Light</option>
|
||||
<option value="std">Standard</option>
|
||||
<option value="large">Large</option>
|
||||
</select>
|
||||
</div>
|
||||
</fieldset>
|
||||
<div class="endSets"> </div>
|
||||
@@ -1,219 +0,0 @@
|
||||
<h3>Monster / NPC - {{obj.name}}</h3>
|
||||
<div class="prevNext">
|
||||
<a class="btn btn-secondary" ng-click="previous()"><i class="icon-backward"></i></a>
|
||||
<a class="btn btn-secondary" ng-click="next()"><i class="icon-forward"></i></a>
|
||||
</div>
|
||||
<fieldset>
|
||||
<legend>General</legend>
|
||||
<div class="fieldWithLabel">
|
||||
<label for="iconID">Icon:</label>
|
||||
<span class="field">
|
||||
<div ng-tile-image="obj.iconID" class="at-input-icon" ng-select-image="monster" ng-select-image-dest="obj.iconID"></div>
|
||||
<input type="text" id="iconID" class="at-input-iconID" ng-model="obj.iconID" />
|
||||
</span>
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<label for="id" class="hint hint--top" data-hint="The id is not displayed to the player anywhere. Must be a unique id (no two monster may have the same id). Prefer short ids since it keeps savegames smaller.">Internal id:</label>
|
||||
<input type="text" size="30" id="id" class="field at-input-id" ng-model="obj.id"/>
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<label for="name">Display name:</label>
|
||||
<input type="text" size="30" id="name" class="field at-input-name" ng-model="obj.name"/>
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<label for="spawnGroup" class="hint hint--top" data-hint="The name to enter on spawn areas in TMX map files for spawning this type of monster. Several monster types may have the same spawngroup, which makes the game spawn one random monster type from the spawngroup.">Spawngroup:</label>
|
||||
<input type="text" size="30" id="spawnGroup" class="field at-input-id" ng-model="obj.spawnGroup" />
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" id="unique" ng-model="obj.unique" ng-true-value="1" ng-false-value="0" />
|
||||
<span class="hint hint--top" data-hint="Unique monsters will not respawn. Typically used for bosses.">Is unique (will not respawn)</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<label for="monsterClass">Monster class:</label>
|
||||
<select class="field" id="monsterClass" ng-model="obj.monsterClass">
|
||||
<option value="humanoid">Humanoid</option>
|
||||
<option value="insect">Insect</option>
|
||||
<option value="demon">Demon</option>
|
||||
<option value="construct">Construct</option>
|
||||
<option value="animal">Animal</option>
|
||||
<option value="giant">Giant</option>
|
||||
<option value="undead">Undead</option>
|
||||
<option value="reptile">Reptile</option>
|
||||
<option value="ghost">Ghost</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<label class="checkbox"><input type="checkbox" id="showAdvanced" ng-model="obj.showAdvanced" />Show advanced properties</label>
|
||||
</div>
|
||||
<div class="fieldWithLabel" ng-ds-fade="obj.showAdvanced">
|
||||
<label for="size">Size:</label>
|
||||
<select class="field" id="size" ng-model="obj.size">
|
||||
<option value="1x1">1x1</option>
|
||||
<option value="1x2">1x2</option>
|
||||
<option value="1x3">1x3</option>
|
||||
<option value="2x1">2x1</option>
|
||||
<option value="2x2">2x2</option>
|
||||
<option value="2x3">2x3</option>
|
||||
<option value="3x1">3x1</option>
|
||||
<option value="3x2">3x2</option>
|
||||
<option value="3x3">3x3</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="fieldWithLabel" ng-ds-fade="obj.showAdvanced">
|
||||
<label for="faction" class="hint hint--top" data-hint="Used for making whole groups of monsters aggressive from dialogue. Dialogue replies may affect the player's faction ratings, and having rating less than 0 for a faction will make all monsters in a faction automatically attack.">Faction:</label>
|
||||
<input type="text" size="30" id="faction" ng-model="obj.faction" class="field at-input-id"/>
|
||||
</div>
|
||||
<div class="fieldWithLabel" ng-ds-fade="obj.showAdvanced">
|
||||
<label for="movementAggressionType">Movement in combat (only when aggressive):</label>
|
||||
<select class="field" id="movementAggressionType" ng-model="obj.movementAggressionType">
|
||||
<option value="none">Does not move in combat</option>
|
||||
<option value="helpOthers">Help others in same spawn area</option>
|
||||
<option value="protectSpawn">Move towards player if inside spawn area</option>
|
||||
<option value="wholeMap">Move towards player even outside its spawn area</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<label class="checkbox"><input type="checkbox" id="hasConversation" ng-model="obj.hasConversation" />Has conversation</label>
|
||||
</div>
|
||||
<div class="fieldWithLabel" id="hasConversationDisplay" ng-ds-fade="obj.hasConversation">
|
||||
<label for="phraseID" class="hint hint--top" data-hint="ID of the starting conversation phrase that will be used when engaging in conversation with this NPC.">Conversation phrase ID:</label>
|
||||
<input type="text" size="30" id="phraseID" ng-model="obj.phraseID" class="field at-input-id" />
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<label for="droplistID" class="hint hint--top" data-hint="ID of the droplist that will contain the items that are dropped when the monster is killed. If this monster is an NPC, this is the list of items that are available to buy as shop items.">Droplist ID (combat or shop):</label>
|
||||
<input type="text" size="30" id="droplistID" ng-model="obj.droplistID" class="field at-input-id"/>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>Stats</legend>
|
||||
<div class="fieldWithLabel">
|
||||
<label for="maxAP">Total AP:</label>
|
||||
<input type="text" size="5" id="maxAP" ng-model="obj.maxAP" class="field at-input-stat" />
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<label for="moveCost">Movement cost (AP):</label>
|
||||
<input type="text" size="5" id="moveCost" ng-model="obj.moveCost" class="field at-input-stat" />
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<label for="maxHP">Max HP:</label>
|
||||
<input type="text" size="5" id="maxHP" ng-model="obj.maxHP" class="field at-input-stat" />
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<label class="checkbox"><input type="checkbox" id="hasCombat" ng-model="obj.hasCombatTraits" />Has combat traits</label>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset id="hasCombatDisplay" ng-ds-fade="obj.hasCombatTraits">
|
||||
<legend>Combat</legend>
|
||||
<div class="fieldWithLabel">
|
||||
<label for="experience">Experience:</label>
|
||||
<input type="text" size="7" id="experience" value="{{getExperience()}}" class="field at-input-stat" readonly="readonly" />
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<label for="attackCost">Attack cost (AP):</label>
|
||||
<input type="text" size="5" id="attackCost" ng-model="obj.attackCost" class="field at-input-stat" />
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<label for="attackChance">Attack chance:</label>
|
||||
<input type="text" size="5" id="attackChance" ng-model="obj.attackChance" class="field at-input-stat" />%
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<label for="attackDamage">Attack damage (range):</label>
|
||||
<div class="field">
|
||||
<input type="text" size="3" id="attackDamage_Min" ng-model="obj.attackDamage.min" class="at-input-stat-minmax" />
|
||||
-
|
||||
<input type="text" size="3" id="attackDamage_Max" ng-model="obj.attackDamage.max" class="at-input-stat-minmax" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<label class="checkbox"><input type="checkbox" id="hasCritical" ng-model="obj.hasCritical" />Has critical chance</label>
|
||||
</div>
|
||||
<div class="fieldWithLabel" ng-ds-fade="obj.hasCritical">
|
||||
<label for="criticalSkill">Critical skill:</label>
|
||||
<input type="text" size="5" id="criticalSkill" ng-model="obj.criticalSkill" class="field at-input-stat" />
|
||||
</div>
|
||||
<div class="fieldWithLabel" ng-ds-fade="obj.hasCritical">
|
||||
<label for="criticalMultiplier">Critical multiplier:</label>
|
||||
<input type="text" size="5" id="criticalMultiplier" ng-model="obj.criticalMultiplier" class="field at-input-stat" />
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<label for="blockChance">Block chance:</label>
|
||||
<input type="text" size="5" id="blockChance" ng-model="obj.blockChance" class="field at-input-stat" />%
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<label for="damageResistance">Damage resistance:</label>
|
||||
<input type="text" size="5" id="damageResistance" ng-model="obj.damageResistance" class="field at-input-stat" />
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<label class="checkbox"><input type="checkbox" id="hasHitEffect" ng-model="obj.hasHitEffect" />Has effect on each hit</label>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset id="hasHitEffectDisplay" ng-ds-fade="obj.hasHitEffect && obj.hasCombatTraits">
|
||||
<legend>On every successful attack hit</legend>
|
||||
<div class="fieldWithLabel">
|
||||
<label for="onHit_boostHP">Boost current HP (range):</label>
|
||||
<div class="field">
|
||||
<input type="text" size="3" id="onHit_boostHP_Min" ng-model="obj.hitEffect.increaseCurrentHP.min" class="at-input-stat-minmax" />
|
||||
-
|
||||
<input type="text" size="3" id="onHit_boostHP_Max" ng-model="obj.hitEffect.increaseCurrentHP.max" class="at-input-stat-minmax" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<label for="onHit_boostAP">Boost current AP (range):</label>
|
||||
<div class="field">
|
||||
<input type="text" size="3" id="onHit_boostAP_Min" ng-model="obj.hitEffect.increaseCurrentAP.min" class="at-input-stat-minmax" />
|
||||
-
|
||||
<input type="text" size="3" id="onHit_boostAP_Max" ng-model="obj.hitEffect.increaseCurrentAP.max" class="at-input-stat-minmax" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<label for="onHit_conditionsSource">Conditions added to source</label>
|
||||
<table class="field" id="onHit_conditionsSource">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><span class="hint hint--left" data-hint="Id of the actor condition to be applied.">Condition</span></th>
|
||||
<th><span class="hint hint--left" data-hint="How strong the effect should be. For example, magnitude=2 is equal to having two effects active at the same time. Use -99 to remove permanent effects.">Magnitude</span></th>
|
||||
<th><span class="hint hint--left" data-hint="How many rounds the actor condtions should last. Use 999 for a permanent effect.">Duration</span></th>
|
||||
<th><span class="hint hint--left" data-hint="Percentage chance, integer value from 1 (very unlikely) to 100 (always).">Chance</span></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr ng-repeat="condition in obj.hitEffect.conditionsSource">
|
||||
<td><input type="text" ng-model="condition.condition" class="at-input-id" /></td>
|
||||
<td><input type="text" size="3" ng-model="condition.magnitude" class="at-input-magnitude" /></td>
|
||||
<td><input type="text" size="3" ng-model="condition.duration" class="at-input-duration" /></td>
|
||||
<td><input type="text" size="3" ng-model="condition.chance" class="at-input-chance" /></td>
|
||||
<td><a ng-click="removeCondition(obj.hitEffect.conditionsSource, condition)" class="btn btn-mini" title="Remove row"><i class="icon-trash"></i></a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<button ng-click="addCondition(obj.hitEffect.conditionsSource)" class="btn" title="Add row"><i class="icon-plus-sign"></i> Add</button>
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<label for="onHit_conditionsTarget">Conditions added to target</label>
|
||||
<table class="field" id="onHit_conditionsTarget">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><span class="hint hint--left" data-hint="Id of the actor condition to be applied.">Condition</span></th>
|
||||
<th><span class="hint hint--left" data-hint="How strong the effect should be. For example, magnitude=2 is equal to having two effects active at the same time. Use -99 to remove permanent effects.">Magnitude</span></th>
|
||||
<th><span class="hint hint--left" data-hint="How many rounds the actor condtions should last. Use 999 for a permanent effect.">Duration</span></th>
|
||||
<th><span class="hint hint--left" data-hint="Percentage chance, integer value from 1 (very unlikely) to 100 (always).">Chance</span></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr ng-repeat="condition in obj.hitEffect.conditionsTarget">
|
||||
<td><input type="text" ng-model="condition.condition" class="at-input-id" /></td>
|
||||
<td><input type="text" size="3" ng-model="condition.magnitude" class="at-input-magnitude" /></td>
|
||||
<td><input type="text" size="3" ng-model="condition.duration" class="at-input-duration" /></td>
|
||||
<td><input type="text" size="3" ng-model="condition.chance" class="at-input-chance" /></td>
|
||||
<td><a ng-click="removeCondition(obj.hitEffect.conditionsTarget, condition)" class="btn btn-mini" title="Remove row"><i class="icon-trash"></i></a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<button ng-click="addCondition(obj.hitEffect.conditionsTarget)" class="btn" title="Add row"><i class="icon-plus-sign"></i> Add</button>
|
||||
</div>
|
||||
</fieldset>
|
||||
<div class="endSets"> </div>
|
||||
@@ -1,41 +0,0 @@
|
||||
<h3>Quest</h3>
|
||||
<fieldset>
|
||||
<legend>General</legend>
|
||||
<div class="fieldWithLabel">
|
||||
<label for="id" class="hint hint--top" data-hint="This id will not be displayed to the player. Prefer short but descriptive ids since it keeps the savegames smaller.">Internal ID:</label>
|
||||
<input type="text" size="30" id="id" class="field at-input-id" ng-model="obj.id" />
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<label for="name">Display name:</label>
|
||||
<input type="text" size="30" id="name" class="field at-input-name" ng-model="obj.name" />
|
||||
</div>
|
||||
<div class="fieldWithLabel">
|
||||
<label class="checkbox"><input type="checkbox" id="showInLog" ng-model="obj.showInLog" ng-true-value="1" ng-false-value="0" />Show in quest log</label>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>Stages</legend>
|
||||
<div class="fieldWithLabel">
|
||||
<label for="stages">Stages shown in quest log</label>
|
||||
<table class="field" id="stages">
|
||||
<thead><tr>
|
||||
<th><span class="hint hint--top" data-hint="This number will not be displayed to the player. Must be some unique number for this quest though. Prefer values from 10-100.">Progress</span></th>
|
||||
<th>Logtext</th>
|
||||
<th><span class="hint hint--top" data-hint="Reaching this quest stage gives this much experience">Experience</span></th>
|
||||
<th>Finishes quest</th>
|
||||
<th></th>
|
||||
</tr></thead>
|
||||
<tbody ui:sortable ng:model="obj.stages">
|
||||
<tr ng-repeat="stage in obj.stages">
|
||||
<td><input type="text" size="3" ng-model="stage.progress" class="at-input-stat"/></td>
|
||||
<td><textarea rows="2" cols="40" ng-model="stage.logText"></textarea></td>
|
||||
<td><input type="text" size="7" ng-model="stage.rewardExperience" class="at-input-stat"/></td>
|
||||
<td><input type="checkbox" ng-model="stage.finishesQuest" ng-true-value="1" ng-false-value="0" /></td>
|
||||
<td><a ng-click="removeQuestStage(stage)" class="btn btn-mini" title="Remove row"><i class="icon-trash"></i></a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<button ng-click="addQuestStage()" class="btn" title="Add row"><i class="icon-plus-sign"></i> Add</button>
|
||||
</div>
|
||||
</fieldset>
|
||||
<div class="endSets"> </div>
|
||||
@@ -1,16 +0,0 @@
|
||||
<h3>Export</h3>
|
||||
<fieldset>
|
||||
Export
|
||||
<select ng-model="selectedSection" ng-options="s.name for s in sections">
|
||||
</select>
|
||||
|
||||
<button ng-click="exportData()" class="btn btn-primary"><i class="icon-download"></i> Export</button>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<div ng-ds-fade="content">
|
||||
<textarea id="importExportTextArea" rows="9" cols="80" ng-model="content"></textarea>
|
||||
<br /><br />
|
||||
<p>Exported data should be placed in the files named <a target="_blank" href="http://code.google.com/p/andors-trail/source/browse/#git%2FAndorsTrail%2Fres%2Fraw">res/raw/*.json</a> in the source code.</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,34 +0,0 @@
|
||||
<h3>Import</h3>
|
||||
<fieldset>
|
||||
<p>Data to import can be found in the files named <a target="_blank" href="http://code.google.com/p/andors-trail/source/browse/#git%2FAndorsTrail%2Fres%2Fraw">res/raw/*.json</a> in the source code.</p>
|
||||
Import as
|
||||
<select ng-model="selectedSection" ng-options="s.name for s in sections"></select>
|
||||
|
||||
<p>
|
||||
<label for="importExisting">
|
||||
<input type="radio" name="importType" id="importExisting" value="existing" ng-model="importType"></input>
|
||||
Import content from existing files
|
||||
</label>
|
||||
<label for="importPasted">
|
||||
<input type="radio" name="importType" id="importPasted" value="paste" ng-model="importType"></input>
|
||||
Paste data to import
|
||||
</label>
|
||||
</p>
|
||||
|
||||
<div ng-show="importType == 'paste'">
|
||||
<p>
|
||||
<textarea id="importExportTextArea" rows="9" cols="80" ng-model="content" placeholder="paste json or old resource format here"></textarea>
|
||||
</p>
|
||||
<button ng-click="importPastedData()" class="btn btn-primary pull-right"><i class="icon-upload"></i> Import</button>
|
||||
</div>
|
||||
|
||||
<div ng-show="importType == 'existing'">
|
||||
<p>
|
||||
<select ng-model="selectedFile" ng-options="f for f in availableFiles[selectedSection.id]"></select>
|
||||
</p>
|
||||
<button ng-click="importExistingData()" class="btn btn-primary pull-right"><i class="icon-upload"></i> Import</button>
|
||||
</div>
|
||||
|
||||
<div style="color: red;" ng-ds-fade="errorMsg">{{errorMsg}}</div>
|
||||
<div style="color: green;" ng-ds-fade="importedMsg">{{importedMsg}}</div>
|
||||
</div>
|
||||
@@ -1,5 +0,0 @@
|
||||
<h3>Welcome to the content editor for Andor's Trail.</h3>
|
||||
|
||||
Start by importing some content from the game by pressing the top right "Import" button.<br />
|
||||
Or you could start by creating new content by selecting something from the left list.<br />
|
||||
<br />
|
||||
@@ -1,215 +0,0 @@
|
||||
<h3>Items</h3>
|
||||
|
||||
<label class="checkbox"><input type="checkbox" ng-model="settings.iconID" />Icon</label>
|
||||
<label class="checkbox"><input type="checkbox" ng-model="settings.id" />Id</label>
|
||||
<label class="checkbox"><input type="checkbox" ng-model="settings.name" />Name</label>
|
||||
<label class="checkbox"><input type="checkbox" ng-model="settings.category" />Category</label>
|
||||
<label class="checkbox"><input type="checkbox" ng-model="settings.displaytype" />Display type</label>
|
||||
<label class="checkbox"><input type="checkbox" ng-model="settings.hasManualPrice" />Has manual price</label>
|
||||
<label class="checkbox"><input type="checkbox" ng-model="settings.price" />Base market cost</label>
|
||||
|
||||
<label class="checkbox"><input type="checkbox" ng-model="settings.hasEquipEffect" />Has equip effect</label>
|
||||
<label class="checkbox"><input type="checkbox" ng-model="settings.equipEffect_increaseMaxHP" />+MaxHP</label>
|
||||
<label class="checkbox"><input type="checkbox" ng-model="settings.equipEffect_increaseMaxAP" />+MaxAP</label>
|
||||
<label class="checkbox"><input type="checkbox" ng-model="settings.equipEffect_increaseMoveCost" />Increase move cost</label>
|
||||
<label class="checkbox"><input type="checkbox" ng-model="settings.equipEffect_increaseUseItemCost" />Increase use item cost</label>
|
||||
<label class="checkbox"><input type="checkbox" ng-model="settings.equipEffect_increaseReequipCost" />Increase re-equip cost</label>
|
||||
<label class="checkbox"><input type="checkbox" ng-model="settings.equipEffect_increaseAttackCost" />Attack cost</label>
|
||||
<label class="checkbox"><input type="checkbox" ng-model="settings.equipEffect_increaseAttackChance" />Attack chance</label>
|
||||
<label class="checkbox"><input type="checkbox" ng-model="settings.equipEffect_increaseAttackDamage" />Attack damage</label>
|
||||
<label class="checkbox"><input type="checkbox" ng-model="settings.equipEffect_increaseCriticalSkill" />Critical skill</label>
|
||||
<label class="checkbox"><input type="checkbox" ng-model="settings.equipEffect_setCriticalMultiplier" />Critical multiplier</label>
|
||||
<label class="checkbox"><input type="checkbox" ng-model="settings.equipEffect_increaseBlockChance" />Block chance</label>
|
||||
<label class="checkbox"><input type="checkbox" ng-model="settings.equipEffect_increaseDamageResistance" />Damage resistance</label>
|
||||
|
||||
<label class="checkbox"><input type="checkbox" ng-model="settings.useEffect" />Use effect</label>
|
||||
<label class="checkbox"><input type="checkbox" ng-model="settings.hitEffect" />Hit effect</label>
|
||||
<label class="checkbox"><input type="checkbox" ng-model="settings.killEffect" />Kill effect</label>
|
||||
|
||||
|
||||
<table class="tableeditor">
|
||||
<thead>
|
||||
<tr>
|
||||
<th ng-ds-fade="settings.iconID">Icon</th>
|
||||
<th ng-ds-fade="settings.id">
|
||||
<span class="hint hint--top" data-hint="The id is not displayed to the player anywhere. Must be a unique id (no two items may have the same id). Prefer short ids since it keeps savegames smaller.">
|
||||
Id
|
||||
</span>
|
||||
</th>
|
||||
<th ng-ds-fade="settings.name">Name</th>
|
||||
<th ng-ds-fade="settings.category">Category</th>
|
||||
<th ng-ds-fade="settings.displaytype">Type</th>
|
||||
<th ng-ds-fade="settings.hasManualPrice">Manual price?</th>
|
||||
<th ng-ds-fade="settings.price">
|
||||
<span class="hint hint--top" data-hint="Base market cost">Price</span>
|
||||
</th>
|
||||
<th ng-ds-fade="settings.hasEquipEffect">
|
||||
<span class="hint hint--top" data-hint="Item has an effect when equipped">Equip?</span>
|
||||
</th>
|
||||
<th ng-ds-fade="settings.equipEffect_increaseMaxHP">
|
||||
<span class="hint hint--top" data-hint="Increase maximum HP">+MaxHP</span>
|
||||
</th>
|
||||
<th ng-ds-fade="settings.equipEffect_increaseMaxAP">
|
||||
<span class="hint hint--top" data-hint="Increase maximum AP">+MaxAP</span>
|
||||
</th>
|
||||
<th ng-ds-fade="settings.equipEffect_increaseMoveCost">
|
||||
<span class="hint hint--top" data-hint="Increase in AP cost of moving one tile">+MoveCost</span>
|
||||
</th>
|
||||
<th ng-ds-fade="settings.equipEffect_increaseUseItemCost">
|
||||
<span class="hint hint--top" data-hint="Increase in AP cost of using items">+UseItemCost</span>
|
||||
</th>
|
||||
<th ng-ds-fade="settings.equipEffect_increaseReequipCost">
|
||||
<span class="hint hint--top" data-hint="Increase in AP cost of equipping and un-equipping wearable items">+ReequipCost</span>
|
||||
</th>
|
||||
<th ng-ds-fade="settings.equipEffect_increaseAttackCost">
|
||||
<span class="hint hint--top" data-hint="Incease in AP cost of making one attack">AtkCost</span>
|
||||
</th>
|
||||
<th ng-ds-fade="settings.equipEffect_increaseAttackChance">
|
||||
<span class="hint hint--top" data-hint="Increase attack chance">+AC</span>
|
||||
</th>
|
||||
<th ng-ds-fade="settings.equipEffect_increaseAttackDamage">
|
||||
<span class="hint hint--top" data-hint="Increase attack damage (min - max)">+AD</span>
|
||||
</th>
|
||||
<th ng-ds-fade="settings.equipEffect_increaseCriticalSkill">
|
||||
<span class="hint hint--top" data-hint="Increase critical skill">+CS</span>
|
||||
</th>
|
||||
<th ng-ds-fade="settings.equipEffect_setCriticalMultiplier">
|
||||
<span class="hint hint--top" data-hint="Set critical modifier (only for weapons)">CM</span>
|
||||
</th>
|
||||
<th ng-ds-fade="settings.equipEffect_increaseBlockChance">
|
||||
<span class="hint hint--top" data-hint="Increase block chance">+BC</span>
|
||||
</th>
|
||||
<th ng-ds-fade="settings.equipEffect_increaseDamageResistance">
|
||||
<span class="hint hint--top" data-hint="Increase damage resistance">+DR</span>
|
||||
</th>
|
||||
|
||||
<th ng-ds-fade="settings.useEffect">
|
||||
<span class="hint hint--top" data-hint="Item has an effect when using it">Use?</span>
|
||||
</th>
|
||||
<th ng-ds-fade="settings.useEffect">
|
||||
<span class="hint hint--top" data-hint="Increase current HP when using item">+HP</span>
|
||||
</th>
|
||||
<th ng-ds-fade="settings.useEffect">
|
||||
<span class="hint hint--top" data-hint="Increase current AP when using item">+AP</span>
|
||||
</th>
|
||||
<th ng-ds-fade="settings.hitEffect">
|
||||
<span class="hint hint--top" data-hint="Item has an effect when hitting a monster in combat">Hit?</span>
|
||||
</th>
|
||||
<th ng-ds-fade="settings.hitEffect">
|
||||
<span class="hint hint--top" data-hint="Increase current HP when hitting monster in combat">+HP</span>
|
||||
</th>
|
||||
<th ng-ds-fade="settings.hitEffect">
|
||||
<span class="hint hint--top" data-hint="Increase current AP when hitting monster in combat">+AP</span>
|
||||
</th>
|
||||
<th ng-ds-fade="settings.killEffect">
|
||||
<span class="hint hint--top" data-hint="Item has an effect when killing a monster in combat">Kill?</span>
|
||||
</th>
|
||||
<th ng-ds-fade="settings.killEffect">
|
||||
<span class="hint hint--top" data-hint="Increase current HP when killing monster in combat">+HP</span>
|
||||
</th>
|
||||
<th ng-ds-fade="settings.killEffect">
|
||||
<span class="hint hint--top" data-hint="Increase current AP when killing monster in combat">+AP</span>
|
||||
</th>
|
||||
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody ui:sortable ng:model="items">
|
||||
<tr ng-repeat="item in items">
|
||||
<td ng-ds-fade="settings.iconID"><div ng-tile-image="item.iconID" class="at-input-icon" ng-select-image="item" ng-select-image-dest="item.iconID"></div></td>
|
||||
<td ng-ds-fade="settings.id"><input type="text" ng-model="item.id" class="at-input-id" /></td>
|
||||
<td ng-ds-fade="settings.name"><input type="text" ng-model="item.name" class="at-input-name" /></td>
|
||||
<td ng-ds-fade="settings.category">
|
||||
<select ng-model="item.category" ng-options="s.name for s in itemCategories"></select>
|
||||
</td>
|
||||
<td ng-ds-fade="settings.displaytype">
|
||||
<select ng-model="item.displaytype">
|
||||
<option value="ordinary">Ordinary item</option>
|
||||
<option value="quest">Quest item (yellow)</option>
|
||||
<option value="legendary">Legendary (green)</option>
|
||||
<option value="extraordinary">Extraordinary (blue)</option>
|
||||
<option value="rare">Rare (purple)</option>
|
||||
</select>
|
||||
</td>
|
||||
<td ng-ds-fade="settings.hasManualPrice"><input type="checkbox" ng-model="item.hasManualPrice" ng-true-value="1" ng-false-value="0" ng-change="updateCost(item)" /></td>
|
||||
<td ng-ds-fade="settings.price">
|
||||
<input type="text" ng-show="item.hasManualPrice == 0" value="{{getItemCost(item)}}" readonly="readonly" class="at-input-gold" />
|
||||
<input type="text" ng-show="item.hasManualPrice == 1" ng-model="item.baseMarketCost" class="at-input-gold" />
|
||||
</td>
|
||||
<td ng-ds-fade="settings.hasEquipEffect">
|
||||
<input type="checkbox" ng-model="item.hasEquipEffect" title="Has effect when equipping item?" />
|
||||
<span ng-show="item.equipEffect.addedConditions.length > 0">*</span>
|
||||
</td>
|
||||
<td ng-ds-fade="settings.equipEffect_increaseMaxHP"><input type="text" ng-model="item.equipEffect.increaseMaxHP" class="at-input-stat" /></td>
|
||||
<td ng-ds-fade="settings.equipEffect_increaseMaxAP"><input type="text" ng-model="item.equipEffect.increaseMaxAP" class="at-input-stat" /></td>
|
||||
<td ng-ds-fade="settings.equipEffect_increaseMoveCost"><input type="text" ng-model="item.equipEffect.increaseMoveCost" class="at-input-stat" /></td>
|
||||
<td ng-ds-fade="settings.equipEffect_increaseUseItemCost"><input type="text" ng-model="item.equipEffect.increaseUseItemCost" class="at-input-stat" /></td>
|
||||
<td ng-ds-fade="settings.equipEffect_increaseReequipCost"><input type="text" ng-model="item.equipEffect.increaseReequipCost" class="at-input-stat" /></td>
|
||||
<td ng-ds-fade="settings.equipEffect_increaseAttackCost"><input type="text" ng-model="item.equipEffect.increaseAttackCost" class="at-input-stat" /></td>
|
||||
<td ng-ds-fade="settings.equipEffect_increaseAttackChance"><input type="text" ng-model="item.equipEffect.increaseAttackChance" class="at-input-stat" /></td>
|
||||
<td ng-ds-fade="settings.equipEffect_increaseAttackDamage">
|
||||
<input type="text" ng-model="item.equipEffect.increaseAttackDamage.min" class="at-input-stat-minmax" />
|
||||
-
|
||||
<input type="text" ng-model="item.equipEffect.increaseAttackDamage.max" class="at-input-stat-minmax" />
|
||||
</td>
|
||||
<td ng-ds-fade="settings.equipEffect_increaseCriticalSkill"><input type="text" ng-model="item.equipEffect.increaseCriticalSkill" class="at-input-stat" /></td>
|
||||
<td ng-ds-fade="settings.equipEffect_setCriticalMultiplier"><input type="text" ng-model="item.equipEffect.setCriticalMultiplier" class="at-input-stat" /></td>
|
||||
<td ng-ds-fade="settings.equipEffect_increaseBlockChance"><input type="text" ng-model="item.equipEffect.increaseBlockChance" class="at-input-stat" /></td>
|
||||
<td ng-ds-fade="settings.equipEffect_increaseDamageResistance"><input type="text" ng-model="item.equipEffect.increaseDamageResistance" class="at-input-stat" /></td>
|
||||
|
||||
<td ng-ds-fade="settings.useEffect">
|
||||
<input type="checkbox" ng-model="item.hasUseEffect" title="Has effect when using item?" />
|
||||
<span ng-show="item.useEffect.conditionsSource.length > 0">*</span>
|
||||
</td>
|
||||
<td ng-ds-fade="settings.useEffect">
|
||||
<input type="text" ng-model="item.useEffect.increaseCurrentHP.min" class="at-input-stat-minmax" />
|
||||
-
|
||||
<input type="text" ng-model="item.useEffect.increaseCurrentHP.max" class="at-input-stat-minmax" />
|
||||
</td>
|
||||
<td ng-ds-fade="settings.useEffect">
|
||||
<input type="text" ng-model="item.useEffect.increaseCurrentAP.min" class="at-input-stat-minmax" />
|
||||
-
|
||||
<input type="text" ng-model="item.useEffect.increaseCurrentAP.max" class="at-input-stat-minmax" />
|
||||
</td>
|
||||
|
||||
<td ng-ds-fade="settings.hitEffect">
|
||||
<input type="checkbox" ng-model="item.hasHitEffect" title="Has effect when hitting a target in combat?" />
|
||||
<span ng-show="item.hitEffect.conditionsSource.length > 0">S</span>
|
||||
<span ng-show="item.hitEffect.conditionsTarget.length > 0">T</span>
|
||||
</td>
|
||||
<td ng-ds-fade="settings.hitEffect">
|
||||
<input type="text" ng-model="item.hitEffect.increaseCurrentHP.min" class="at-input-stat-minmax" />
|
||||
-
|
||||
<input type="text" ng-model="item.hitEffect.increaseCurrentHP.max" class="at-input-stat-minmax" />
|
||||
</td>
|
||||
<td ng-ds-fade="settings.hitEffect">
|
||||
<input type="text" ng-model="item.hitEffect.increaseCurrentAP.min" class="at-input-stat-minmax" />
|
||||
-
|
||||
<input type="text" ng-model="item.hitEffect.increaseCurrentAP.max" class="at-input-stat-minmax" />
|
||||
</td>
|
||||
|
||||
<td ng-ds-fade="settings.killEffect">
|
||||
<input type="checkbox" ng-model="item.hasKillEffect" title="Has effect when killing a target in combat?" />
|
||||
<span ng-show="item.killEffect.conditionsSource.length > 0">*</span>
|
||||
</td>
|
||||
<td ng-ds-fade="settings.killEffect">
|
||||
<input type="text" ng-model="item.killEffect.increaseCurrentHP.min" class="at-input-stat-minmax" />
|
||||
-
|
||||
<input type="text" ng-model="item.killEffect.increaseCurrentHP.max" class="at-input-stat-minmax" />
|
||||
</td>
|
||||
<td ng-ds-fade="settings.killEffect">
|
||||
<input type="text" ng-model="item.killEffect.increaseCurrentAP.min" class="at-input-stat-minmax" />
|
||||
-
|
||||
<input type="text" ng-model="item.killEffect.increaseCurrentAP.max" class="at-input-stat-minmax" />
|
||||
</td>
|
||||
|
||||
<td><a ng-click="edit(item)" class="btn"><i class="icon-forward"></i> Edit</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div>
|
||||
<button ng-click="addObj()" class="btn"><i class="icon-plus-sign"></i> Add</button>
|
||||
</div>
|
||||
|
||||
<div class="endSets"> </div>
|
||||
@@ -1,164 +0,0 @@
|
||||
<h3>Monsters / NPCs</h3>
|
||||
|
||||
<label class="checkbox"><input type="checkbox" ng-model="settings.iconID" />Icon</label>
|
||||
<label class="checkbox"><input type="checkbox" ng-model="settings.id" />Id</label>
|
||||
<label class="checkbox"><input type="checkbox" ng-model="settings.name" />Name</label>
|
||||
<label class="checkbox"><input type="checkbox" ng-model="settings.spawnGroup" />Spawngroup</label>
|
||||
<label class="checkbox"><input type="checkbox" ng-model="settings.unique" />Unique</label>
|
||||
<label class="checkbox"><input type="checkbox" ng-model="settings.monsterClass" />Class</label>
|
||||
<label class="checkbox"><input type="checkbox" ng-model="settings.phraseID" />Phrase</label>
|
||||
<label class="checkbox"><input type="checkbox" ng-model="settings.droplistID" />Droplist</label>
|
||||
<label class="checkbox"><input type="checkbox" ng-model="settings.experience" />Experience</label>
|
||||
<label class="checkbox"><input type="checkbox" ng-model="settings.maxAP" />Max AP</label>
|
||||
<label class="checkbox"><input type="checkbox" ng-model="settings.moveCost" />Move cost</label>
|
||||
<label class="checkbox"><input type="checkbox" ng-model="settings.maxHP" />Max health</label>
|
||||
<label class="checkbox"><input type="checkbox" ng-model="settings.attackCost" />Attack cost</label>
|
||||
<label class="checkbox"><input type="checkbox" ng-model="settings.attackChance" />Attack chance</label>
|
||||
<label class="checkbox"><input type="checkbox" ng-model="settings.attackDamage" />Attack damage</label>
|
||||
<label class="checkbox"><input type="checkbox" ng-model="settings.hasCritical" />Has critical hits</label>
|
||||
<label class="checkbox"><input type="checkbox" ng-model="settings.criticalSkill" />Critical skill</label>
|
||||
<label class="checkbox"><input type="checkbox" ng-model="settings.criticalMultiplier" />Critical multiplier</label>
|
||||
<label class="checkbox"><input type="checkbox" ng-model="settings.blockChance" />Block chance</label>
|
||||
<label class="checkbox"><input type="checkbox" ng-model="settings.damageResistance" />Damage resistance</label>
|
||||
<label class="checkbox"><input type="checkbox" ng-model="settings.hitEffect" />Hit effect</label>
|
||||
|
||||
<table class="tableeditor">
|
||||
<thead>
|
||||
<tr>
|
||||
<th ng-ds-fade="settings.iconID">Icon</th>
|
||||
<th ng-ds-fade="settings.id">
|
||||
<span class="hint hint--top" data-hint="The id is not displayed to the player anywhere. Must be a unique id (no two monster may have the same id). Prefer short ids since it keeps savegames smaller.">
|
||||
Id
|
||||
</span>
|
||||
</th>
|
||||
<th ng-ds-fade="settings.name">Name</th>
|
||||
<th ng-ds-fade="settings.spawnGroup">
|
||||
<span class="hint hint--top" data-hint="The name to enter on spawn areas in TMX map files for spawning this type of monster. Several monster types may have the same spawngroup, which makes the game spawn one random monster type from the spawngroup.">
|
||||
Spawngroup
|
||||
</span>
|
||||
</th>
|
||||
<th ng-ds-fade="settings.unique">
|
||||
<span class="hint hint--top" data-hint="Unique monsters will not respawn. Typically used for bosses.">Unique</span>
|
||||
</th>
|
||||
<th ng-ds-fade="settings.monsterClass">Class</th>
|
||||
<th ng-ds-fade="settings.phraseID">
|
||||
<span class="hint hint--top" data-hint="ID of the starting conversation phrase that will be used when engaging in conversation with this NPC.">Phrase</span>
|
||||
</th>
|
||||
<th ng-ds-fade="settings.droplistID">
|
||||
<span class="hint hint--top" data-hint="ID of the droplist that will contain the items that are dropped when the monster is killed. If this monster is an NPC, this is the list of items that are available to buy as shop items.">
|
||||
Droplist
|
||||
</span>
|
||||
</th>
|
||||
<th ng-ds-fade="settings.experience">
|
||||
<span class="hint hint--top" data-hint="Experience">Exp</span>
|
||||
</th>
|
||||
<th ng-ds-fade="settings.maxAP">
|
||||
<span class="hint hint--top" data-hint="Maximum action points">AP</span>
|
||||
</th>
|
||||
<th ng-ds-fade="settings.moveCost">
|
||||
<span class="hint hint--top" data-hint="AP cost of moving one tile">MoveCost</span>
|
||||
</th>
|
||||
<th ng-ds-fade="settings.maxHP">
|
||||
<span class="hint hint--top" data-hint="Maximum health points">HP</span>
|
||||
</th>
|
||||
<th ng-ds-fade="settings.attackCost">
|
||||
<span class="hint hint--top" data-hint="AP cost of doing one attack">AttackCost</span>
|
||||
</th>
|
||||
<th ng-ds-fade="settings.attackChance">
|
||||
<span class="hint hint--top" data-hint="Attack chance">AC</span>
|
||||
</th>
|
||||
<th ng-ds-fade="settings.attackDamage">
|
||||
<span class="hint hint--top" data-hint="Attack damage (min - max)">AD</span>
|
||||
</th>
|
||||
<th ng-ds-fade="settings.hasCritical">
|
||||
<span class="hint hint--top" data-hint="May cause critical attacks">Crit?</span>
|
||||
</th>
|
||||
<th ng-ds-fade="settings.criticalSkill">
|
||||
<span class="hint hint--top" data-hint="Critical skill">CS</span>
|
||||
</th>
|
||||
<th ng-ds-fade="settings.criticalMultiplier">
|
||||
<span class="hint hint--top" data-hint="Critical multiplier">CM</span>
|
||||
</th>
|
||||
<th ng-ds-fade="settings.blockChance">
|
||||
<span class="hint hint--top" data-hint="Block chance">BC</span>
|
||||
</th>
|
||||
<th ng-ds-fade="settings.damageResistance">
|
||||
<span class="hint hint--top" data-hint="Damage resistance">DR</span>
|
||||
</th>
|
||||
<th ng-ds-fade="settings.hitEffect">
|
||||
<span class="hint hint--top" data-hint="Each attack has an effect when successfully hitting an opponent in combat">Hit?</span>
|
||||
</th>
|
||||
<th ng-ds-fade="settings.hitEffect">
|
||||
<span class="hint hint--top" data-hint="Increase current HP when hitting opponent in combat">+HP</span>
|
||||
</th>
|
||||
<th ng-ds-fade="settings.hitEffect">
|
||||
<span class="hint hint--top" data-hint="Increase current AP when hitting opponent in combat">+AP</span>
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody ui:sortable ng:model="monsters">
|
||||
<tr ng-repeat="monster in monsters">
|
||||
<td ng-ds-fade="settings.iconID"><div ng-tile-image="monster.iconID" class="at-input-icon" ng-select-image="monster" ng-select-image-dest="monster.iconID"></div></td>
|
||||
<td ng-ds-fade="settings.id"><input type="text" ng-model="monster.id" class="at-input-id" /></td>
|
||||
<td ng-ds-fade="settings.name"><input type="text" ng-model="monster.name" class="at-input-name" /></td>
|
||||
<td ng-ds-fade="settings.spawnGroup"><input type="text" ng-model="monster.spawnGroup" class="at-input-id" /></td>
|
||||
<td ng-ds-fade="settings.unique"><input type="checkbox" ng-model="monster.unique" ng-true-value="1" ng-false-value="0" /></td>
|
||||
<td ng-ds-fade="settings.monsterClass">
|
||||
<select ng-model="monster.monsterClass">
|
||||
<option value="humanoid">Humanoid</option>
|
||||
<option value="insect">Insect</option>
|
||||
<option value="demon">Demon</option>
|
||||
<option value="construct">Construct</option>
|
||||
<option value="animal">Animal</option>
|
||||
<option value="giant">Giant</option>
|
||||
<option value="undead">Undead</option>
|
||||
<option value="reptile">Reptile</option>
|
||||
<option value="ghost">Ghost</option>
|
||||
</select>
|
||||
</td>
|
||||
<td ng-ds-fade="settings.phraseID"><input type="text" ng-model="monster.phraseID" class="at-input-id" /></td>
|
||||
<td ng-ds-fade="settings.droplistID"><input type="text" ng-model="monster.droplistID" class="at-input-id" /></td>
|
||||
<td ng-ds-fade="settings.experience"><input type="text" value="{{getExperience(monster)}}" class="at-input-stat" readonly="readonly" /></td>
|
||||
<td ng-ds-fade="settings.maxAP"><input type="text" ng-model="monster.maxAP" class="at-input-stat" /></td>
|
||||
<td ng-ds-fade="settings.moveCost"><input type="text" ng-model="monster.moveCost" class="at-input-stat" /></td>
|
||||
<td ng-ds-fade="settings.maxHP"><input type="text" ng-model="monster.maxHP" class="at-input-stat" /></td>
|
||||
<td ng-ds-fade="settings.attackCost"><input type="text" ng-model="monster.attackCost" class="at-input-stat" /></td>
|
||||
<td ng-ds-fade="settings.attackChance"><input type="text" ng-model="monster.attackChance" class="at-input-stat" /></td>
|
||||
<td ng-ds-fade="settings.attackDamage">
|
||||
<input type="text" ng-model="monster.attackDamage.min" class="at-input-stat-minmax" />
|
||||
-
|
||||
<input type="text" ng-model="monster.attackDamage.max" class="at-input-stat-minmax" />
|
||||
</td>
|
||||
<td ng-ds-fade="settings.hasCritical"><input type="checkbox" ng-model="monster.hasCritical" /></td>
|
||||
<td ng-ds-fade="settings.criticalSkill"><input type="text" ng-model="monster.criticalSkill" class="at-input-stat" /></td>
|
||||
<td ng-ds-fade="settings.criticalMultiplier"><input type="text" ng-model="monster.criticalMultiplier" class="at-input-stat" /></td>
|
||||
<td ng-ds-fade="settings.blockChance"><input type="text" ng-model="monster.blockChance" class="at-input-stat" /></td>
|
||||
<td ng-ds-fade="settings.damageResistance"><input type="text" ng-model="monster.damageResistance" class="at-input-stat" /></td>
|
||||
|
||||
<td ng-ds-fade="settings.hitEffect">
|
||||
<input type="checkbox" ng-model="monster.hasHitEffect" title="Has effect when hitting a target in combat?" />
|
||||
<span ng-show="monster.hitEffect.conditionsSource.length > 0">S</span>
|
||||
<span ng-show="monster.hitEffect.conditionsTarget.length > 0">T</span>
|
||||
</td>
|
||||
<td ng-ds-fade="settings.hitEffect">
|
||||
<input type="text" ng-model="monster.hitEffect.increaseCurrentHP.min" class="at-input-stat-minmax" />
|
||||
-
|
||||
<input type="text" ng-model="monster.hitEffect.increaseCurrentHP.max" class="at-input-stat-minmax" />
|
||||
</td>
|
||||
<td ng-ds-fade="settings.hitEffect">
|
||||
<input type="text" ng-model="monster.hitEffect.increaseCurrentAP.min" class="at-input-stat-minmax" />
|
||||
-
|
||||
<input type="text" ng-model="monster.hitEffect.increaseCurrentAP.max" class="at-input-stat-minmax" />
|
||||
</td>
|
||||
|
||||
<td><a ng-click="edit(monster)" class="btn"><i class="icon-forward"></i> Edit</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div>
|
||||
<button ng-click="addObj()" class="btn"><i class="icon-plus-sign"></i> Add</button>
|
||||
</div>
|
||||
|
||||
<div class="endSets"> </div>
|
||||
@@ -1,17 +0,0 @@
|
||||
<h3>Dialogue Tree</h3>
|
||||
|
||||
<div id="dialogueTree" class="tree">
|
||||
<ul><li>
|
||||
<treenode node="node" onclick="onclick"><div>
|
||||
<div class="dialogue-node dialogue-node-{{node.type}} clickToEdit" ng-click="onclick(node)" title="{{node.text}}">
|
||||
<span ng-show="node.type=='loop'"><i class="icon-repeat"></i> (conversation loop)</span>
|
||||
<span ng-show="node.type=='action'"><i class="icon-play"></i> (action)</span>
|
||||
<span ng-show="node.type=='reply'">{{node.text}}</span>
|
||||
<span ng-show="node.type=='phrase'">{{node.text}}</span>
|
||||
</div>
|
||||
<ul ng-show="node.children.length > 0">
|
||||
<li ng-repeat="child in node.children"><treenode node="child" onclick="onclick"></treenode></li>
|
||||
</ul>
|
||||
</div></treenode>
|
||||
</li></ul>
|
||||
</div>
|
||||
@@ -1,10 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
cat <<END
|
||||
|
||||
============
|
||||
Starting local content editor at http://localhost:8080/AndorsTrailEdit/editor.html
|
||||
============
|
||||
|
||||
END
|
||||
webfsd -F -p 8080 -r "$(dirname $0)/../"
|
||||
@@ -1,94 +0,0 @@
|
||||
html, body { margin:0; padding:0; }
|
||||
#top { background-color: #a0c0ff; color: #eeeeee; }
|
||||
#top #title { font-size: 2em; float: left; text-shadow: rgba(0, 0, 0, 0.5) 2px 2px 1px; vertical-align: middle; }
|
||||
#top #version { font-size: 10pt; margin-left: 3ex; }
|
||||
.andorsTrailLogo { background-image: url(logo.png); background-repeat: no-repeat; background-position: 3px 3px; padding:20px 0px 15px 50px; }
|
||||
#top #buttons { float: right; font-size: 1.2em; margin: 10px; }
|
||||
.workarea { margin: 5px; position: absolute; top: 54px; }
|
||||
#left { width: 250px; padding: 0px; font-size: 1em; }
|
||||
#center { left: 265px; right: 0; border-left: 2px #c0d0ff solid; padding-left: 5px; }
|
||||
|
||||
.hidden { display: none; }
|
||||
|
||||
.at-input-id, .at-input-name
|
||||
{ width: 200px; }
|
||||
.at-input-stat, .at-input-stat-minmax, .at-input-quantity, .at-input-chance, .at-input-magnitude, .at-input-duration
|
||||
{ width: 50px; }
|
||||
.at-input-gold { width: 80px; }
|
||||
.at-input-iconID { width: 120px; }
|
||||
.at-input-icon { display: inline-block; vertical-align: top; }
|
||||
.at-input-icon:hover { -moz-box-shadow: 0 0 15px blue; -webkit-box-shadow: 0 0 15px blue; box-shadow: 0 0 15px blue; }
|
||||
|
||||
.workarea h3 { font-size: 18px; margin: 0 0 0 5px; }
|
||||
.workarea legend { font-size: 16px; margin: 0 0 5px 0; }
|
||||
.workarea fieldset { float:left; margin: 1ex; border-right: 1px solid #ddd; padding-right: 5px; }
|
||||
.workarea .endSets { clear: both; }
|
||||
|
||||
#left .accordion-group { background-color: #e0e0e0; border: 1px solid #bbb; margin-bottom: 6px; -moz-box-shadow: 4px 4px 5px #bbb; -webkit-box-shadow: 4px 4px 5px #bbb; box-shadow: 4px 4px 5px #bbb; }
|
||||
.itemlist { list-style: none; padding: 0px; margin: 0px; border: 1px solid #bbb; }
|
||||
.itemlist li { padding: 2px 5px 2px 5px; }
|
||||
.itemlist li img { float: left; margin-right: 0.5ex; }
|
||||
.itemlist li:nth-child(odd) { background-color: #eee; }
|
||||
.itemlist li:hover { background-color: #d7d7ff; cursor: pointer; }
|
||||
.itemlist li img { float: left; }
|
||||
|
||||
.fieldWithLabel label { margin-top: 1.1ex; }
|
||||
.fieldWithLabel table { border-collapse: collapse; margin-bottom: 1ex; }
|
||||
.fieldWithLabel table th { border: 1px #ccc solid; padding: 0.5ex; }
|
||||
.fieldWithLabel table td { border: 1px #ccc solid; padding: 0.5ex; }
|
||||
.fieldWithLabel table tbody tr:nth-child(even) { background-color: #eee }
|
||||
.fieldWithLabel table tbody tr:hover { background-color: #d7d7ff; }
|
||||
table.tableeditor { margin-bottom: 20px; }
|
||||
.at-box { padding: 4px; border: 1px solid #bbb; margin-bottom: 5px; -moz-box-shadow: 1px 1px 3px #bbb; -webkit-box-shadow: 1px 1px 3px #bbb; box-shadow: 1px 1px 3px #bbb; }
|
||||
|
||||
#dialogueTree ul { padding-top: 20px; position: relative; margin-left: 0; }
|
||||
#dialogueTree li { float: left; text-align: center; list-style-type: none; position: relative; padding: 20px 5px 0 5px; }
|
||||
#dialogueTree li::before, #dialogueTree li::after
|
||||
{ content: ''; position: absolute; top: 0; right: 50%; border-top: 1px solid #ccc; width: 50%; height: 20px; }
|
||||
#dialogueTree li::after { right: auto; left: 50%; border-left: 1px solid #ccc; }
|
||||
#dialogueTree li:only-child::after, #dialogueTree li:only-child::before
|
||||
{ display: none; }
|
||||
#dialogueTree li:only-child { padding-top: 0; }
|
||||
#dialogueTree li:first-child::before, #dialogueTree li:last-child::after
|
||||
{ border: 0 none; }
|
||||
#dialogueTree li:last-child::before { border-right: 1px solid #ccc; border-radius: 0 5px 0 0; -webkit-border-radius: 0 5px 0 0; -moz-border-radius: 0 5px 0 0; }
|
||||
#dialogueTree li:first-child::after { border-radius: 5px 0 0 0; -webkit-border-radius: 5px 0 0 0; -moz-border-radius: 5px 0 0 0; }
|
||||
#dialogueTree ul ul::before { content: ''; position: absolute; top: 0; left: 50%; border-left: 1px solid #ccc; width: 0; height: 20px; }
|
||||
#dialogueTree .dialogue-node {
|
||||
border: 1px solid #ccc; padding: 5px 10px; text-decoration: none; display: inline-block; max-width: 80px;
|
||||
box-shadow: 1px 1px 5px #bbb; -moz-box-shadow: 1px 1px 5px #bbb; -webkit-box-shadow: 1px 1px 5px #bbb;
|
||||
border-radius: 5px; -webkit-border-radius: 5px; -moz-border-radius: 5px;
|
||||
}
|
||||
#dialogueTree .dialogue-node-reply { background-color: #ddffdd; }
|
||||
#dialogueTree .dialogue-node-loop { background-color: #ffdddd; }
|
||||
#dialogueTree .dialogue-node-action { background-color: #ffffcc; }
|
||||
|
||||
.dialogueConditional { color: #855; }
|
||||
|
||||
.tools-buttons { padding-bottom: 10px; }
|
||||
#importExportTextArea { width: 500px; }
|
||||
|
||||
.validateStep { border: 1px #d7d7ff solid; background-color: white; padding: 1em; margin: 2em; float: left; }
|
||||
.validateStep h1 { font-size: 1.1em; }
|
||||
.validateStep h1 .number { font-size: 1.3em; font-weight: bold; text-shadow: rgba(0, 0, 0, 0.3) 1px 1px 1px; }
|
||||
.validateStep .buttons { padding-top: 10px; }
|
||||
|
||||
#validateResultContent table { border-collapse: collapse; margin-bottom: 1ex; }
|
||||
#validateResultContent table th,td { border: 1px #ccc solid; text-align: left; }
|
||||
#validateResultContent table tbody tr:nth-child(even) { background-color: #eee }
|
||||
#validateResultContent table .ok { background-color: green; }
|
||||
#validateResultContent table .red { background-color: red; }
|
||||
#validateResultContent table .yellow { background-color: yellow; }
|
||||
#showValidationWarnings { cursor: pointer; }
|
||||
#showValidationWarnings:hover { background-color: #d7d7ff; }
|
||||
|
||||
.clickToEdit { cursor: pointer; }
|
||||
.clickToEdit:hover { background-color: #d7d7ff; }
|
||||
|
||||
#validateResultContent { width: 400px; float: left; }
|
||||
#editorForms { width: 670px; float: right;}
|
||||
#editorForms #translation_edit_list { table-layout: fixed; }
|
||||
#editorForms #translation_edit_list tr:nth-child(1) { width: 17em }
|
||||
#editorForms #translation_edit_list tr:nth-child(2) { width: 8em }
|
||||
#editorForms #translation_edit_list textarea { width: 100%; height: 8em; }
|
||||
|
||||
@@ -1,114 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="shortcut icon" href="http://andorstrail.com/favicon.ico"/>
|
||||
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.11/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
|
||||
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.11/jquery-ui.min.js"></script>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="styles2.css" />
|
||||
<script type="text/javascript" src="AndorsTrailTranslations.js"></script>
|
||||
<title>Andor's Trail Translation validator</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="screen">
|
||||
<div id="top">
|
||||
<div class="andorsTrailLogo" id="title">
|
||||
Andor's Trail Translation validator
|
||||
<span id="version">
|
||||
v0.6.11dev1
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="centerwide" class="workarea">
|
||||
|
||||
<div id="validate1" class="validateStep">
|
||||
<h1><span class="number">1.</span> Select source file</h1>
|
||||
|
||||
<p>Select (English) file to compare against.</p>
|
||||
<select id="englishFiles"></select>
|
||||
<input type="hidden" id="englishData" />
|
||||
|
||||
<div class="buttons">
|
||||
<span id="next1">Next</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="validate2" class="validateStep" style="display: none;">
|
||||
<h1><span class="number">2.</span> Compare to</h1>
|
||||
|
||||
<p>Select translation to validate</p>
|
||||
<p>Import existing file from SVN, or manually paste the content you want to validate.</p>
|
||||
|
||||
<div id="importFromSVN">
|
||||
Import from SVN
|
||||
<select id="compareToExisting"></select>
|
||||
<span id="btnImportFromSVN">Import</span>
|
||||
</div>
|
||||
|
||||
<p>Content to validate:</p>
|
||||
<textarea id="compareToInput" rows="6" cols="50"></textarea>
|
||||
|
||||
<div class="buttons">
|
||||
<span id="prev2">Back</span>
|
||||
<span id="next2">Validate</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="validateResult" class="validateStep" style="display: none;">
|
||||
<h1><span class="number">3.</span> Results</h1>
|
||||
<div>
|
||||
<div id="validateResultContent">
|
||||
<fieldset class="fieldSet">
|
||||
<legend>Validation Result</legend>
|
||||
<div id="loading">Loading & validating</div>
|
||||
<table id="result">
|
||||
<thead><tr>
|
||||
<th>id</th>
|
||||
<th>Result<span id="count2" /></th>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
</fieldset>
|
||||
</div>
|
||||
<div id="editorForms">
|
||||
<fieldset class="fieldSet" id="editTranslation">
|
||||
<legend>Edit translation</legend>
|
||||
<table id="translation_edit_list">
|
||||
<thead><tr>
|
||||
<th>id</th>
|
||||
<th>field</th>
|
||||
<th>English</th>
|
||||
<th>Translated</th>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
</fieldset>
|
||||
</div>
|
||||
<div style="floar:clear;"></div>
|
||||
</div>
|
||||
|
||||
<div class="buttons">
|
||||
<span id="prev3">Back</span>
|
||||
<span id="export">Export</span>
|
||||
</div>
|
||||
<div class="export_area">
|
||||
<p>Translated Content:</p>
|
||||
<textarea id="export_text" rows=8 cols=80></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(startTranslationValidator);
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,11 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>ProjectPage</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
@@ -1,267 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<map version="1.0" orientation="orthogonal" width="30" height="30" tilewidth="32" tileheight="32">
|
||||
<tileset firstgid="1" name="map_bed_1" tilewidth="32" tileheight="32">
|
||||
<image source="../drawable/map_bed_1.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="129" name="map_border_1" tilewidth="32" tileheight="32">
|
||||
<image source="../drawable/map_border_1.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="257" name="map_bridge_1" tilewidth="32" tileheight="32">
|
||||
<image source="../drawable/map_bridge_1.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="385" name="map_broken_1" tilewidth="32" tileheight="32">
|
||||
<image source="../drawable/map_broken_1.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="513" name="map_cavewall_1" tilewidth="32" tileheight="32">
|
||||
<image source="../drawable/map_cavewall_1.png" width="576" height="192"/>
|
||||
</tileset>
|
||||
<tileset firstgid="621" name="map_cavewall_2" tilewidth="32" tileheight="32">
|
||||
<image source="../drawable/map_cavewall_2.png" width="576" height="192"/>
|
||||
</tileset>
|
||||
<tileset firstgid="729" name="map_cavewall_3" tilewidth="32" tileheight="32">
|
||||
<image source="../drawable/map_cavewall_3.png" width="576" height="192"/>
|
||||
</tileset>
|
||||
<tileset firstgid="837" name="map_chair_table_1" tilewidth="32" tileheight="32">
|
||||
<image source="../drawable/map_chair_table_1.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="965" name="map_crate_1" tilewidth="32" tileheight="32">
|
||||
<image source="../drawable/map_crate_1.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="1093" name="map_cupboard_1" tilewidth="32" tileheight="32">
|
||||
<image source="../drawable/map_cupboard_1.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="1221" name="map_curtain_1" tilewidth="32" tileheight="32">
|
||||
<image source="../drawable/map_curtain_1.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="1349" name="map_entrance_1" tilewidth="32" tileheight="32">
|
||||
<image source="../drawable/map_entrance_1.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="1477" name="map_fence_1" tilewidth="32" tileheight="32">
|
||||
<image source="../drawable/map_fence_1.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="1605" name="map_fence_2" tilewidth="32" tileheight="32">
|
||||
<image source="../drawable/map_fence_2.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="1733" name="map_ground_1" tilewidth="32" tileheight="32">
|
||||
<image source="../drawable/map_ground_1.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="1861" name="map_ground_2" tilewidth="32" tileheight="32">
|
||||
<image source="../drawable/map_ground_2.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="1989" name="map_ground_3" tilewidth="32" tileheight="32">
|
||||
<image source="../drawable/map_ground_3.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="2117" name="map_ground_4" tilewidth="32" tileheight="32">
|
||||
<image source="../drawable/map_ground_4.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="2245" name="map_ground_5" tilewidth="32" tileheight="32">
|
||||
<image source="../drawable/map_ground_5.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="2373" name="map_ground_6" tilewidth="32" tileheight="32">
|
||||
<image source="../drawable/map_ground_6.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="2501" name="map_ground_7" tilewidth="32" tileheight="32">
|
||||
<image source="../drawable/map_ground_7.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="2629" name="map_ground_8" tilewidth="32" tileheight="32">
|
||||
<image source="../drawable/map_ground_8.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="2757" name="map_indoor_1" tilewidth="32" tileheight="32">
|
||||
<image source="../drawable/map_indoor_1.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="2885" name="map_kitchen_1" tilewidth="32" tileheight="32">
|
||||
<image source="../drawable/map_kitchen_1.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="3013" name="map_outdoor_1" tilewidth="32" tileheight="32">
|
||||
<image source="../drawable/map_outdoor_1.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="3141" name="map_pillar_1" tilewidth="32" tileheight="32">
|
||||
<image source="../drawable/map_pillar_1.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="3269" name="map_plant_1" tilewidth="32" tileheight="32">
|
||||
<image source="../drawable/map_plant_1.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="3397" name="map_rock_1" tilewidth="32" tileheight="32">
|
||||
<image source="../drawable/map_rock_1.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="3525" name="map_roof_1" tilewidth="32" tileheight="32">
|
||||
<image source="../drawable/map_roof_1.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="3653" name="map_roof_2" tilewidth="32" tileheight="32">
|
||||
<image source="../drawable/map_roof_2.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="3781" name="map_shop_1" tilewidth="32" tileheight="32">
|
||||
<image source="../drawable/map_shop_1.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="3909" name="map_sign_ladder_1" tilewidth="32" tileheight="32">
|
||||
<image source="../drawable/map_sign_ladder_1.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="4037" name="map_table_1" tilewidth="32" tileheight="32">
|
||||
<image source="../drawable/map_table_1.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="4165" name="map_trail_1" tilewidth="32" tileheight="32">
|
||||
<image source="../drawable/map_trail_1.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="4293" name="map_tree_1" tilewidth="32" tileheight="32">
|
||||
<image source="../drawable/map_tree_1.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="4421" name="map_wall_1" tilewidth="32" tileheight="32">
|
||||
<image source="../drawable/map_wall_1.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="4549" name="map_wall_2" tilewidth="32" tileheight="32">
|
||||
<image source="../drawable/map_wall_2.png" width="480" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="4669" name="map_wall_3" tilewidth="32" tileheight="32">
|
||||
<image source="../drawable/map_wall_3.png" width="480" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="4789" name="map_window_1" tilewidth="32" tileheight="32">
|
||||
<image source="../drawable/map_window_1.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<tileset firstgid="4917" name="map_window_2" tilewidth="32" tileheight="32">
|
||||
<image source="../drawable/map_window_2.png" width="512" height="256"/>
|
||||
</tileset>
|
||||
<layer name="Ground" width="30" height="30">
|
||||
<data encoding="base64" compression="zlib">
|
||||
eJy1lbFuwkAMhq9IbaRIDCx9g4pkAMRIGRqkbpShMCIx8aqIl+ANeIQuvZPOivvLvlyDM3wKJI4/+85J5iPn5p5NPAY+PA37jyzisYn3XV7+D917gNx7xU/xixhz6OndM2fD8obzM8+Z+ek8/T6D8z6W0bw8J9XBfU08jzHh/mXR8jOW0bzcxXv4Zh4thnu3ExnJi3m061oM9x4nMn32v4tN0TJEfgtee85+Hw9RMYbyo6cS3NZO9AWm4LfsV+qRWHneI5b9Snk5W89XhGItvFJerOMUoVirdca8WEcFNQwxzyehP9yL1Jw8MndXBq7DSsnL5742cpOfahja+1w6V5R//Vo8PgeP7PWbd06Z9xbBPZWeP4u1vgHSe9vKiy6O5rJ4j+d4pW9WndEzziy/9vnUgvWk1rjO6Bm9Wn+p2c3Zayuv5ML17ZoxV6adklvqaZ3wrgVvly9nnoNnl6hhl+ntup6apZw1zvFKMb9UphMr
|
||||
</data>
|
||||
</layer>
|
||||
<layer name="Objects" width="30" height="30">
|
||||
<data encoding="base64" compression="zlib">
|
||||
eJx9V0tLVVEUvte0iM7Jc3tgNbOoQTXpMWpaUFCODRQa6dCaKBi+KAoSFSosLKJRP6WcNK0L6g0xQVC7RUKBj2vrc6/v7rW3xxZs9j5777Me3/rWOvc+SAt1eWrWlOXEr/fJebe587Lo5nXe0bOaPC/q3jfzfsWsrUAPdF9oCPcnVf8rmftU94jMb4u7dcLOXKS/ap55/kzfvai2+kw8sP/a6Ia8K/q7fO9E4sb/ZNv4Az+mjJ4XxsZ05uZujf+N3ntfdGvKSTk/KONUTo4oB8TOGT2nf8Dup+oZNbGX1S7xqOp8W96/k3pfY7t/jri5p8mv/x5y82KEy7bGsiZ7FbG3JaOWuTin1F5N73SI/k4ZX+T8axbaPd9YKOw/6u4PNfk1uVVRu8fk7m95t1jyPgD750VnH7KuvpAbC1mIobV7rdHtdTcXCo3yfBjPMroybx92NxJnk/FR542cXM2oXWDCHOTVBf2bjerouOalpcHrq8dQCv3Y0nfmM6fHxlqJ4ua9K+Lz1dTboSzpffYD2mC+ZhKvc8fnUpgHCPGY13vwZzOKCzKk99oyVx9ter83VZ0yGlR3Lafm6Vsg6g9q8ldks0vtrRhdyM2gyR9iW01Cfi1koS3ExfPrqceDs43R4okYn0RceQj7mY/XYgkcdzAs7T5HfNsaR38a9kDIY627idTzD4I+gJ4zKnvjMi7J+eU05DR42ip7p1PPJZ7PaM9nbjeTUHcswPqs6QMQ9KrZnFqoi+YdeK6Z3krhu9ALXdSNProS+QD8l9WHydRhCp3kMzGt14nBuBxzy8iG8WHn2dj9HPnwgTkvhZyyPGGdg0/ElD6Ca8CDmM8otzuMf/Bjzth9VPR2IHGtgIush7g3Br6aGqSAO/czl9sfBoebou9Wmq9jL0w3TA+hH9+1x9ga5O8MGzOwQm7bZb4rYyDzNmqm9lkLq7rXnrn6sd8qxkmsiT3uob8yZgrj7pG9MaOHOUUPY20vR1yvmt9N5T3qmzhBx3C22954Ts7Ya0bN+UTOt8nWbL0OCv77tKncoq3YXm+kk/2U/Rsz7wDrfnMf3EVMA9EY1Hdht9PEnncH+j/K+GR8Qm7vGTvss5Zv5E5z4nLSImNIdQ9HeDJ25Hwo83FavCDTZr1i+AUBB6uKJfMHKmKdhy1jrynfxoxuiynWjIu2yHH0kUpUK/CrVfUQW/sfoENjJL72d8pShIvlMvk9Hd2xtcJY8/jKe8wB65d12mV8ZL6BAfltc1s2GMY1kscj4suRFyO+LXG+cbaahN+z9STkLcX6wjiJsY0trtFzDflrPoNTNse0O5KGe9UkxHjQ+PcPXCRD4A==
|
||||
</data>
|
||||
</layer>
|
||||
<layer name="Objects_changed" width="30" height="30">
|
||||
<data encoding="base64" compression="zlib">
|
||||
eJztzTENAAAIACAfsxvBumbwcnNQgAjYq7x5++gFAICPBndpASk=
|
||||
</data>
|
||||
</layer>
|
||||
<layer name="Above" width="30" height="30">
|
||||
<data encoding="base64" compression="zlib">
|
||||
eJy1V0uOwjAMDZWGdTdlTjAXYhaIC8BJgVWlau4BGhYza1KhJ4zl5yZp+qSonzj+PNtJG8ILuzYkQ8rmrNM4xrWHjPWjLOzlrLP0aD8ssDj/Prjuf2dO62ExMJluzfVunDno6eO4xnEjdmHrFK/nRH6t/P/Gd3fjfd/a9z8FuWTcIb5UnZcZdSQBe4hd8zy073IjesP2kOEPbMh8SZ0sD8yfVIw6Pd3SN4mpNRJd87x+Nq93Mra78F/aGpRvvcFLLhCvhrRlzdcCq2k8s1pbAoh3Dp9TQD1btpDXWn0LyJpJ6QntYwnnLH+WjPYVSO0nS4fXxzgTMW/tWyW2p/KG80SeVbrHcs6nr8bnF5D7DPN1qdpj3x85cZZgzrdbKqx9HPc1eeyM/AGSX8b1EpD8WvXlYb8K4TuO7YrLdAanJbbmwuN3fK7dL4D3H7JUbet/lkPL52pi53BcK9YHjDqAKQ==
|
||||
</data>
|
||||
</layer>
|
||||
<layer name="Walkable" width="30" height="30">
|
||||
<data encoding="base64" compression="zlib">
|
||||
eJzFk90NwCAIhB2hS7n/Sn01RuGAj9akURPkuJ/OZ4xZ/DKrivknbmYusp9Sv+5f4K41hM433PVuzXaa3Tt7S8FVs5nNcEbDPRP7OdPbypzHz6qv5NPCjngX4evd973jn1D1IPDVrNGenvqRfNV3O8fqDEqt0pvUIoJt4Va8yOhCcFff0XorfVZdCZ0VHiTHqH+duDfNu+e5YRL56MhsF270HeEzlR/Cqyo3AvdU8wLRkcfj
|
||||
</data>
|
||||
</layer>
|
||||
<layer name="Walkable_changed" width="30" height="30">
|
||||
<data encoding="base64" compression="zlib">
|
||||
eJztzjERAAAIBKCPYCn7VzKD5+ACCUhgr+t7AAAAXA385QBW
|
||||
</data>
|
||||
</layer>
|
||||
<objectgroup name="Mapevents" width="30" height="30">
|
||||
<object name="north" type="mapchange" x="544" y="0" width="416" height="32">
|
||||
<properties>
|
||||
<property name="map" value=""/>
|
||||
<property name="place" value=""/>
|
||||
</properties>
|
||||
</object>
|
||||
<object name="east2" type="mapchange" x="928" y="32" width="32" height="128">
|
||||
<properties>
|
||||
<property name="map" value=""/>
|
||||
<property name="place" value=""/>
|
||||
</properties>
|
||||
</object>
|
||||
<object name="east1" type="mapchange" x="928" y="768" width="32" height="96">
|
||||
<properties>
|
||||
<property name="map" value=""/>
|
||||
<property name="place" value=""/>
|
||||
</properties>
|
||||
</object>
|
||||
<object name="south2" type="mapchange" x="704" y="928" width="128" height="32">
|
||||
<properties>
|
||||
<property name="map" value=""/>
|
||||
<property name="place" value=""/>
|
||||
</properties>
|
||||
</object>
|
||||
<object name="south1" type="mapchange" x="416" y="928" width="128" height="32">
|
||||
<properties>
|
||||
<property name="map" value=""/>
|
||||
<property name="place" value=""/>
|
||||
</properties>
|
||||
</object>
|
||||
<object name="west" type="mapchange" x="0" y="448" width="32" height="96">
|
||||
<properties>
|
||||
<property name="map" value=""/>
|
||||
<property name="place" value=""/>
|
||||
</properties>
|
||||
</object>
|
||||
<object name="down" type="mapchange" x="160" y="192" width="32" height="32">
|
||||
<properties>
|
||||
<property name="map" value=""/>
|
||||
<property name="place" value=""/>
|
||||
</properties>
|
||||
</object>
|
||||
<object name="entrance" type="mapchange" x="704" y="160" width="32" height="32">
|
||||
<properties>
|
||||
<property name="map" value=""/>
|
||||
<property name="place" value=""/>
|
||||
</properties>
|
||||
</object>
|
||||
<object name="rest1" type="rest" x="576" y="800" width="32" height="32"/>
|
||||
<object name="phrase id" type="sign" x="672" y="192" width="32" height="32"/>
|
||||
<object name="droplist internal id" type="container" x="608" y="192" width="32" height="32"/>
|
||||
<object name="phrase id" type="script" x="768" y="576" width="64" height="64">
|
||||
<properties>
|
||||
<property name="when" value="always"/>
|
||||
</properties>
|
||||
</object>
|
||||
</objectgroup>
|
||||
<objectgroup name="Spawn" width="30" height="30">
|
||||
<object name="forestwasp" type="spawn" x="64" y="160" width="256" height="384">
|
||||
<properties>
|
||||
<property name="quantity" value="3"/>
|
||||
</properties>
|
||||
</object>
|
||||
<object name="forestboar" type="spawn" x="192" y="224" width="32" height="32"/>
|
||||
<object name="fox1" type="spawn" x="160" y="320" width="32" height="32"/>
|
||||
<object name="forestant" type="spawn" x="64" y="384" width="160" height="96">
|
||||
<properties>
|
||||
<property name="quantity" value="2"/>
|
||||
</properties>
|
||||
</object>
|
||||
<object name="forestboar" type="spawn" x="288" y="160" width="224" height="448">
|
||||
<properties>
|
||||
<property name="quantity" value="2"/>
|
||||
</properties>
|
||||
</object>
|
||||
<object name="forestbeetle" type="spawn" x="288" y="224" width="352" height="288">
|
||||
<properties>
|
||||
<property name="quantity" value="3"/>
|
||||
</properties>
|
||||
</object>
|
||||
<object name="forestsnake" type="spawn" x="320" y="608" width="224" height="288">
|
||||
<properties>
|
||||
<property name="quantity" value="3"/>
|
||||
</properties>
|
||||
</object>
|
||||
<object name="forestdog" type="spawn" x="512" y="480" width="256" height="224">
|
||||
<properties>
|
||||
<property name="quantity" value="2"/>
|
||||
</properties>
|
||||
</object>
|
||||
<object name="forestboar" type="spawn" x="768" y="736" width="32" height="32"/>
|
||||
<object name="trainingrat" type="spawn" x="800" y="64" width="96" height="160"/>
|
||||
</objectgroup>
|
||||
<objectgroup name="Keys" width="30" height="30">
|
||||
<object name="internal quest id:queststage" type="key" x="864" y="736" width="32" height="128">
|
||||
<properties>
|
||||
<property name="phrase" value="phrase id"/>
|
||||
</properties>
|
||||
</object>
|
||||
</objectgroup>
|
||||
<objectgroup name="Replace" width="30" height="30">
|
||||
<object name="internal quest id:queststage" type="key" x="864" y="736" width="32" height="128">
|
||||
<properties>
|
||||
<property name="phrase" value="phrase id"/>
|
||||
</properties>
|
||||
</object>
|
||||
<object name="internal quest id:queststage" type="replace" x="704" y="128" width="32" height="64">
|
||||
<properties>
|
||||
<property name="Objects" value="Objects_changed"/>
|
||||
<property name="Walkable" value="Walkable_changed"/>
|
||||
</properties>
|
||||
</object>
|
||||
</objectgroup>
|
||||
</map>
|
||||
|
Before Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 142 KiB |
|
Before Width: | Height: | Size: 87 KiB |
|
Before Width: | Height: | Size: 82 KiB |
|
Before Width: | Height: | Size: 82 KiB |
|
Before Width: | Height: | Size: 84 KiB |
|
Before Width: | Height: | Size: 85 KiB |
|
Before Width: | Height: | Size: 100 KiB |
|
Before Width: | Height: | Size: 100 KiB |
|
Before Width: | Height: | Size: 104 KiB |
|
Before Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 84 KiB |
|
Before Width: | Height: | Size: 51 KiB |
|
Before Width: | Height: | Size: 49 KiB |
|
Before Width: | Height: | Size: 51 KiB |
|
Before Width: | Height: | Size: 105 KiB |
|
Before Width: | Height: | Size: 106 KiB |
|
Before Width: | Height: | Size: 108 KiB |
|
Before Width: | Height: | Size: 101 KiB |
|
Before Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 62 KiB |
|
Before Width: | Height: | Size: 70 KiB |
|
Before Width: | Height: | Size: 69 KiB |
|
Before Width: | Height: | Size: 76 KiB |
|
Before Width: | Height: | Size: 78 KiB |
|
Before Width: | Height: | Size: 86 KiB |
|
Before Width: | Height: | Size: 54 KiB |