Skip to content

Commit

Permalink
Merge branch 'release-0.7'
Browse files Browse the repository at this point in the history
  • Loading branch information
timothymtorres committed Dec 17, 2017
2 parents 0a74b4a + 66fefc9 commit e0988e0
Show file tree
Hide file tree
Showing 143 changed files with 5,564 additions and 6,909 deletions.
57 changes: 57 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
ZomboTropolis
=============

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.

Human Survivor
==============

*Featuring:*
+ **+40 Different Items**
+ **+40 Skills**

*Multiple Classes:*
+ **Military** - Improved combat abilities
+ **Research** - Improved healing and gadget capabilities
+ **Engineering** - Improved construction and equipment efficiency

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.

Undead Zombie
=============

*Featuring:*
+ **+10 Abilities**
+ **+40 Skills**

*Multiple Classes:*
+ **Brute** - Boosted attacks and lethality
+ **Hunter** - Upgraded movement and tracking utility
+ **Hive** - Dangerous item or building corrosion and infection spread

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.

Time Based Leveling
===================

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!

`1.0.0` Release Date
==================

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.

Credits
=======

A lot of free source assets and libraries were used in the making of ZomboTroplois:

* [RL-Dice](https://timothymtorres.github.io/RL-Dice) by myself
* [middleclass.lua](https://github.com/kikito/middleclass) by kikito
* [Game-Icons.net](http://game-icons.net/) used for skill icons
* [CoronaSDK](https://coronalabs.com/) used to render the code onto multiple platforms (phone, tablet, etc.)
* [SS13 Sprites](https://github.com/tgstation/tgstation) used for mobs, items, and locations in game

Other projects that provided inspiration and ideas for this game:

* [Urbandead](http://www.urbandead.com/) and [Quarantine2019](http://www.quarantine2019.com/) browser based MMO's with the same theme and similiar gameplay.
12 changes: 0 additions & 12 deletions code/building_desc_info.txt

This file was deleted.

4 changes: 2 additions & 2 deletions code/building_test.lua
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
print()
print('NEW RUN')
print('BUILDING TEST RUN')
print()
print()

local map = require('location/map/class')
local Map = require('location/map')
local building = require('location/building/class')
local player = require('player/class')
local lookupItem = require('item/search')
Expand Down
13 changes: 0 additions & 13 deletions code/code_flow_design.txt

This file was deleted.

7 changes: 0 additions & 7 deletions code/error/list.lua

This file was deleted.

126 changes: 0 additions & 126 deletions code/item/class.lua

This file was deleted.

72 changes: 72 additions & 0 deletions code/item/item.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
local class = require('code.libs.middleclass')
local dice = require('code.libs.dice')

local Item = class('Item')

local function selectFrom(spawn_list)
local chance, total = math.random(), 0

for condition_level, odds in ipairs(spawn_list) do
total = total + odds
if chance <= total then return condition_level end
end
end

local condition_spawn_odds = { -- used when spawning new item
ruined = {[1] = 0.60, [2] = 0.25, [3] = 0.10, [4] = 0.05},
ransacked = {[1] = 0.25, [2] = 0.40, [3] = 0.25, [4] = 0.10},
intact = {[1] = 0.10, [2] = 0.25, [3] = 0.40, [4] = 0.25},
}

function Item:initialize(condition_setting)
if type(condition_setting) == 'string' then self.condition = selectFrom(condition_spawn_odds[condition_setting])
elseif type(condition_setting) == 'number' and condition_setting > 0 and condition_setting <= 4 then self.condition = condition_setting
else error('Item initialization has a malformed condition setting')
end
end

--function Item:hasConditions() return not self.CONDITION_OMITTED end -- not currently used (only use when condition is irrelevant to item) [newspapers?]

function Item:isWeapon() return self.weapon or false end

function Item:isMedical() return self.medical or false end

function Item:isArmor() return self.armor or false end

function Item:isReloadable() return self.reload or false end

function Item:isSingleUse() return self.DURABILITY == 0 end

function Item:failDurabilityCheck(player)
local durability

-- need to add a Item.DURABILITY_SKILL for items that are not weapons and check them here with weapons

if self.weapon.MASTER_SKILL then -- skill mastery provides +20% durability bonus to items
if self.DURABILITY > 1 then -- but not to items that are limited usage (ie. only 4 use or single use)
durability = player.skills:check(self.weapon.MASTER_SKILL) and math.floor(self.DURABILITY*1.2 + 0.5) or durability
end
end
return dice.roll(durability or self.DURABILITY) <= 1
end

function Item:updateCondition(num)
self.condition = math.max(math.min(self.condition + num, 4), 0)
return self.condition
end

function Item:isConditionVisible(player) return player.skills:check(self.CLASS_CATEGORY) end

function Item:getCondition() return self.condition end

local condition_states = {[1]='ruined', [2]='worn', [3]='average', [4]='pristine'}

function Item:getConditionStr() return condition_states[self.condition] end

function Item:getClassCategory() return self.CLASS_CATEGORY end

function Item:getWeight() return self.WEIGHT end

function Item:__tostring() return tostring(self.class.name) end

return Item
31 changes: 31 additions & 0 deletions code/item/items.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
local Crowbar, Bat, Sledge, Knife, Katanna = unpack(require('code.item.items.melee_weaponry'))
local Pistol, Magnum, Shotgun, Rifle, Flare, Molotov = unpack(require('code.item.items.ranged_weaponry'))
local FAK, Bandage, Syringe, Vaccine, Antidote = unpack(require('code.item.items.medical'))
local Generator, Transmitter, Terminal, Fuel, Barricade, Toolbox = unpack(require('code.item.items.equipment'))
local Radio, GPS, Flashlight, Sampler = unpack(require('code.item.items.gadget'))
local Book, Bottle, Newspaper = unpack(require('code.item.items.junk'))
local Magazine, Shell, Clip, Quiver = unpack(require('code.item.items.ammo'))
local Leather, Firesuit = unpack(require('code.item.items.armor'))

local Items = {
-- WEAPONRY
Crowbar, Bat, Sledge, Knife, Katanna, Pistol, Magnum, Shotgun, Rifle, Flare, Molotov,
-- MEDICAL
FAK, Bandage, Syringe, Vaccine, Antidote,
-- EQUIPMENT
Generator, Transmitter, Terminal, Fuel, Barricade, Toolbox,
-- GADGET
Radio, GPS, Flashlight, Sampler, --'cellphone', 'sampler'
-- JUNK
Book, Bottle, Newspaper,
-- AMMO
Magazine, Shell, Clip, Quiver,
-- ARMOR
Leather, Firesuit,
}

for _, Class in ipairs(Items) do
Items[Class.name] = Class
end

return Items
52 changes: 52 additions & 0 deletions code/item/items/ammo.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
local class = require('code.libs.middleclass')
local Item = require('code.item.item')

local Magazine = class('Magazine', Item)

Magazine.FULL_NAME = 'pistol magazine'
Magazine.WEIGHT = 3
Magazine.DURABILITY = 0
Magazine.CATEGORY = 'military'
Magazine.ap = {cost = 3, modifier = {guns = -2, handguns = -1}}

-------------------------------------------------------------------

local Shell = class('Shell', Item)

Shell.FULL_NAME = 'shotgun shell'
Shell.WEIGHT = 2
Shell.DURABILITY = 0
Shell.CATEGORY = 'military'
Shell.ap = {cost = 2, modifier = {guns = -1, shotguns = -1}}

-------------------------------------------------------------------

local Clip = class('Clip', Item)

Clip.FULL_NAME = 'rifle clip'
Clip.WEIGHT = 5
Clip.DURABILITY = 0
Clip.CATEGORY = 'military'
Clip.ap = {cost = 4, modifier = {guns = -3, rifles = -1}}

-------------------------------------------------------------------

local Quiver = class('Quiver', Item)

Quiver.FULL_NAME = 'quiver'
Quiver.WEIGHT = 4
Quiver.DURABILITY = 0
Quiver.CATEGORY = 'military'
Quiver.ap = {cost = 4, modifier = {archery = -3, bows = -1}}

--[[
**RELOADING**
assualt rifle - ? ap (3 bursts) [10 ap, 8ap, 5ap]
magnum - ? ap (6 shots) [5 ap, 4ap, 2ap]
pistol - ? ap (14 shots) [5 ap, 4ap, 2ap]
shotgun - ? ap (2 shots) [3 ap, 2ap, .5ap]
bow - ? ap (8 shots [quiver]) [8 ap, 6ap, 3ap]
speed_loader = {cost=3, modifier={guns = -2, handguns = -1},},
--]]

return {Magazine, Shell, Clip, Quiver}
Loading

0 comments on commit e0988e0

Please sign in to comment.