Skip to content

Instantly share code, notes, and snippets.

@zulman
Created October 17, 2012 08:19
Show Gist options
  • Save zulman/3904361 to your computer and use it in GitHub Desktop.
Save zulman/3904361 to your computer and use it in GitHub Desktop.
Green static types
//Monster
staticTypes.Object = function() {
this.name = "noname";
this.image = "default.png";
this.bonuses = [];
this.locale = "en";
this.location = "world";
this.packId = "init_pack1";
this.authorName = "noname";
this.authorId = "noname";
this.creationTime = new Date();
this.usedTimes = 0;
this.hp = 40;
this.monsterType = 0;
this.rate = 0;
this.access = 0;
this.experience = 0;
this.resistance = 0;
this.resistance1 = 0;
this.resistance2 = 0;
this.resistance3 = 0;
this.resistance4 = 0;
this.resistance5 = 0;
this.resistance6 = 0;
this.resistance7 = 0;
this.resistance8 = 0;
this.skillType = 0;
this.tag = "";
this.level = 0;
this.access = 0;
this.frameColor = "#fff";
this.resources = new staticTypes.ResourcesTable();
};
staticTypes.BonusItem = function() {
this.name = "noname";
this.type = "simpleBonus";
this.image = "notsetted";
this.resources = new staticTypes.ResourcesTable();
};
staticTypes.ResourcesTable = function() {
this.gold = 0;
this.gems = 0;
this.fire = 0;
this.earth = 0;
};
staticTypes.Weapon = function() {
this.cooldownTime = 0;
this.damage = 0;
this.power = 0;
this.levelRequirement = 0;
this.img = "img";
this.authorName = "noname";
this.authorId = "noname";
this.type = "common";
this.typeColor = "#fff";
this.locale = "ruRU";
this.price = 0;
this.effect1 = 0;
this.effect2 = 0;
this.effect3 = 0;
this.effect4 = 0;
this.effect5 = 0;
this.effect6 = 0;
this.effect7 = 0;
this.effect8 = 0;
this.duramax = 0;
this.duracur = 0;
};
staticTypes.User = function(username) {
this.name = username;
this.objectsQuery = [];
this.stats = {
strength: 5
};
this.experience = 0;
//e.g.
this.weapons = [{
"persistentId": "earth",
"name": "Земля",
"dph": 1,
"img": "img/weapon1.jpg",
"cooldownTime": 500,
"power": 0,
"lvl": 1,
"creator": "random user",
"resourcesTable": {
"earth": 1
}
}, {
"persistentId": "fire",
"name": "Огонь",
"dph": 2,
"img": "img/weapon2.jpg",
"cooldownTime": 2500,
"power": 0,
"lvl": 1,
"creator": "random user",
"resourcesTable": {
"fire": 2
}
}, {
"persistentId": "water",
"name": "Вода",
"dph": 30,
"img": "img/weapon3.jpg",
"cooldownTime": 15000,
"power": 0,
"lvl": 1,
"creator": "random user",
"resourcesTable": {
"fire": 3,
"earth": 1
}
}];
this.totalFarmed = 0;
this.sn = [];
this.inventory = {
size: 10,
items: []
};
this.resources = new staticTypes.ResourcesTable();
this.creationTime = new Date();
};
staticTypes.FarmObjectEntry = function(objectId, userId) {
this.objectId = objectId;
this.userId = userId;
this.creationTime = new Date();
};
staticTypes.SnInformation = function(snid, snuid) {
this.snid = snid;
this.snuid = snuid;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment