Skip to content

Commit e0988e0

Browse files
Merge branch 'release-0.7'
2 parents 0a74b4a + 66fefc9 commit e0988e0

File tree

143 files changed

+5564
-6909
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

143 files changed

+5564
-6909
lines changed

README.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
ZomboTropolis
2+
=============
3+
4+
An **unfinished** zombie survival MMO using Corona and Lua. Play as either a zombie or a human in a fight for survival. The game is set to replicate a [prey-predator model](http://www.tiem.utk.edu/~gross/bioed/bealsmodules/pred-prey.gph1.gif) of population.
5+
6+
Human Survivor
7+
==============
8+
9+
*Featuring:*
10+
+ **+40 Different Items**
11+
+ **+40 Skills**
12+
13+
*Multiple Classes:*
14+
+ **Military** - Improved combat abilities
15+
+ **Research** - Improved healing and gadget capabilities
16+
+ **Engineering** - Improved construction and equipment efficiency
17+
18+
Play as a human with a simple goal - *survive*. Using many items, gadgets, weapons, and equipment at your disposal you can fend off the undead hordes. Barricade and repair buildings. Search for supplies. Coordinate with the other survivors to stay alive. Humans have the advantage of technology and the ability to interact with their environment to prolong their lifespan, their only true weakness... death.
19+
20+
Undead Zombie
21+
=============
22+
23+
*Featuring:*
24+
+ **+10 Abilities**
25+
+ **+40 Skills**
26+
27+
*Multiple Classes:*
28+
+ **Brute** - Boosted attacks and lethality
29+
+ **Hunter** - Upgraded movement and tracking utility
30+
+ **Hive** - Dangerous item or building corrosion and infection spread
31+
32+
As a zombie you have one raw need - *food*. And what better food than the fleshy human meatbags that are hiding away in fear? To satiate your hunger, you must work together with your fellow zombie brethren. Use abilities, sheer numbers, and persistence to tear down barricades and reap the soon to be corpses (humans) inside buildings. Zombies do **NOT** fear death. It only slows them down. The only true fear that a zombie has is... starvation.
33+
34+
Time Based Leveling
35+
===================
36+
37+
There is no gathering XP by kills, training, or healing in this game. The only measure is time. The longer your character survives the more abilities and skills they unlock to help with your goals. If you survive long enough, a player can even select a class to unlock for even better skills and perks. Beware though, that the skill system is based on a [parabola](http://www.phas.ubc.ca/~mav/SOP2015/fig3.jpeg). The more skills you have already, the longer it will take to unlock the next one, so pick wisely!
38+
39+
`1.0.0` Release Date
40+
==================
41+
42+
Development is dependent on my free time and level of boredom. ETA until App Store launch is in 2018. I will update this timeline with more specific season/month/week dates as I get closer and closer to the finish line.
43+
44+
Credits
45+
=======
46+
47+
A lot of free source assets and libraries were used in the making of ZomboTroplois:
48+
49+
* [RL-Dice](https://timothymtorres.github.io/RL-Dice) by myself
50+
* [middleclass.lua](https://github.com/kikito/middleclass) by kikito
51+
* [Game-Icons.net](http://game-icons.net/) used for skill icons
52+
* [CoronaSDK](https://coronalabs.com/) used to render the code onto multiple platforms (phone, tablet, etc.)
53+
* [SS13 Sprites](https://github.com/tgstation/tgstation) used for mobs, items, and locations in game
54+
55+
Other projects that provided inspiration and ideas for this game:
56+
57+
* [Urbandead](http://www.urbandead.com/) and [Quarantine2019](http://www.quarantine2019.com/) browser based MMO's with the same theme and similiar gameplay.

code/building_desc_info.txt

Lines changed: 0 additions & 12 deletions
This file was deleted.

code/building_test.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
print()
2-
print('NEW RUN')
2+
print('BUILDING TEST RUN')
33
print()
44
print()
55

6-
local map = require('location/map/class')
6+
local Map = require('location/map')
77
local building = require('location/building/class')
88
local player = require('player/class')
99
local lookupItem = require('item/search')

code/code_flow_design.txt

Lines changed: 0 additions & 13 deletions
This file was deleted.

code/error/list.lua

Lines changed: 0 additions & 7 deletions
This file was deleted.

code/item/class.lua

Lines changed: 0 additions & 126 deletions
This file was deleted.

code/item/item.lua

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
local class = require('code.libs.middleclass')
2+
local dice = require('code.libs.dice')
3+
4+
local Item = class('Item')
5+
6+
local function selectFrom(spawn_list)
7+
local chance, total = math.random(), 0
8+
9+
for condition_level, odds in ipairs(spawn_list) do
10+
total = total + odds
11+
if chance <= total then return condition_level end
12+
end
13+
end
14+
15+
local condition_spawn_odds = { -- used when spawning new item
16+
ruined = {[1] = 0.60, [2] = 0.25, [3] = 0.10, [4] = 0.05},
17+
ransacked = {[1] = 0.25, [2] = 0.40, [3] = 0.25, [4] = 0.10},
18+
intact = {[1] = 0.10, [2] = 0.25, [3] = 0.40, [4] = 0.25},
19+
}
20+
21+
function Item:initialize(condition_setting)
22+
if type(condition_setting) == 'string' then self.condition = selectFrom(condition_spawn_odds[condition_setting])
23+
elseif type(condition_setting) == 'number' and condition_setting > 0 and condition_setting <= 4 then self.condition = condition_setting
24+
else error('Item initialization has a malformed condition setting')
25+
end
26+
end
27+
28+
--function Item:hasConditions() return not self.CONDITION_OMITTED end -- not currently used (only use when condition is irrelevant to item) [newspapers?]
29+
30+
function Item:isWeapon() return self.weapon or false end
31+
32+
function Item:isMedical() return self.medical or false end
33+
34+
function Item:isArmor() return self.armor or false end
35+
36+
function Item:isReloadable() return self.reload or false end
37+
38+
function Item:isSingleUse() return self.DURABILITY == 0 end
39+
40+
function Item:failDurabilityCheck(player)
41+
local durability
42+
43+
-- need to add a Item.DURABILITY_SKILL for items that are not weapons and check them here with weapons
44+
45+
if self.weapon.MASTER_SKILL then -- skill mastery provides +20% durability bonus to items
46+
if self.DURABILITY > 1 then -- but not to items that are limited usage (ie. only 4 use or single use)
47+
durability = player.skills:check(self.weapon.MASTER_SKILL) and math.floor(self.DURABILITY*1.2 + 0.5) or durability
48+
end
49+
end
50+
return dice.roll(durability or self.DURABILITY) <= 1
51+
end
52+
53+
function Item:updateCondition(num)
54+
self.condition = math.max(math.min(self.condition + num, 4), 0)
55+
return self.condition
56+
end
57+
58+
function Item:isConditionVisible(player) return player.skills:check(self.CLASS_CATEGORY) end
59+
60+
function Item:getCondition() return self.condition end
61+
62+
local condition_states = {[1]='ruined', [2]='worn', [3]='average', [4]='pristine'}
63+
64+
function Item:getConditionStr() return condition_states[self.condition] end
65+
66+
function Item:getClassCategory() return self.CLASS_CATEGORY end
67+
68+
function Item:getWeight() return self.WEIGHT end
69+
70+
function Item:__tostring() return tostring(self.class.name) end
71+
72+
return Item

code/item/items.lua

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
local Crowbar, Bat, Sledge, Knife, Katanna = unpack(require('code.item.items.melee_weaponry'))
2+
local Pistol, Magnum, Shotgun, Rifle, Flare, Molotov = unpack(require('code.item.items.ranged_weaponry'))
3+
local FAK, Bandage, Syringe, Vaccine, Antidote = unpack(require('code.item.items.medical'))
4+
local Generator, Transmitter, Terminal, Fuel, Barricade, Toolbox = unpack(require('code.item.items.equipment'))
5+
local Radio, GPS, Flashlight, Sampler = unpack(require('code.item.items.gadget'))
6+
local Book, Bottle, Newspaper = unpack(require('code.item.items.junk'))
7+
local Magazine, Shell, Clip, Quiver = unpack(require('code.item.items.ammo'))
8+
local Leather, Firesuit = unpack(require('code.item.items.armor'))
9+
10+
local Items = {
11+
-- WEAPONRY
12+
Crowbar, Bat, Sledge, Knife, Katanna, Pistol, Magnum, Shotgun, Rifle, Flare, Molotov,
13+
-- MEDICAL
14+
FAK, Bandage, Syringe, Vaccine, Antidote,
15+
-- EQUIPMENT
16+
Generator, Transmitter, Terminal, Fuel, Barricade, Toolbox,
17+
-- GADGET
18+
Radio, GPS, Flashlight, Sampler, --'cellphone', 'sampler'
19+
-- JUNK
20+
Book, Bottle, Newspaper,
21+
-- AMMO
22+
Magazine, Shell, Clip, Quiver,
23+
-- ARMOR
24+
Leather, Firesuit,
25+
}
26+
27+
for _, Class in ipairs(Items) do
28+
Items[Class.name] = Class
29+
end
30+
31+
return Items

code/item/items/ammo.lua

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
local class = require('code.libs.middleclass')
2+
local Item = require('code.item.item')
3+
4+
local Magazine = class('Magazine', Item)
5+
6+
Magazine.FULL_NAME = 'pistol magazine'
7+
Magazine.WEIGHT = 3
8+
Magazine.DURABILITY = 0
9+
Magazine.CATEGORY = 'military'
10+
Magazine.ap = {cost = 3, modifier = {guns = -2, handguns = -1}}
11+
12+
-------------------------------------------------------------------
13+
14+
local Shell = class('Shell', Item)
15+
16+
Shell.FULL_NAME = 'shotgun shell'
17+
Shell.WEIGHT = 2
18+
Shell.DURABILITY = 0
19+
Shell.CATEGORY = 'military'
20+
Shell.ap = {cost = 2, modifier = {guns = -1, shotguns = -1}}
21+
22+
-------------------------------------------------------------------
23+
24+
local Clip = class('Clip', Item)
25+
26+
Clip.FULL_NAME = 'rifle clip'
27+
Clip.WEIGHT = 5
28+
Clip.DURABILITY = 0
29+
Clip.CATEGORY = 'military'
30+
Clip.ap = {cost = 4, modifier = {guns = -3, rifles = -1}}
31+
32+
-------------------------------------------------------------------
33+
34+
local Quiver = class('Quiver', Item)
35+
36+
Quiver.FULL_NAME = 'quiver'
37+
Quiver.WEIGHT = 4
38+
Quiver.DURABILITY = 0
39+
Quiver.CATEGORY = 'military'
40+
Quiver.ap = {cost = 4, modifier = {archery = -3, bows = -1}}
41+
42+
--[[
43+
**RELOADING**
44+
assualt rifle - ? ap (3 bursts) [10 ap, 8ap, 5ap]
45+
magnum - ? ap (6 shots) [5 ap, 4ap, 2ap]
46+
pistol - ? ap (14 shots) [5 ap, 4ap, 2ap]
47+
shotgun - ? ap (2 shots) [3 ap, 2ap, .5ap]
48+
bow - ? ap (8 shots [quiver]) [8 ap, 6ap, 3ap]
49+
speed_loader = {cost=3, modifier={guns = -2, handguns = -1},},
50+
--]]
51+
52+
return {Magazine, Shell, Clip, Quiver}

0 commit comments

Comments
 (0)