Skip to content

Commit

Permalink
Merge branch 'release-v0.4.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
timothymtorres committed Aug 17, 2017
2 parents fc155d9 + 6b298c5 commit 9985b23
Show file tree
Hide file tree
Showing 17 changed files with 742 additions and 891 deletions.
7 changes: 0 additions & 7 deletions code/item/class.lua
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,8 @@ function item:getClassName() return tostring(self.class) end
function item:getFlag()
local flag
local ID = item[self:getClassName()].ID
print('getFlag()', ID, 2)
flag = lshift(ID, 2)
flag = bor(flag, self.condition)

if self:hasUses() then
flag = lshift(flag, 4)
flag = bor(flag, self.uses)
end

return flag
end

Expand Down
12 changes: 0 additions & 12 deletions code/item/weapon/class.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ function weapon:isSkillRequired() return (self.skill_required and true) or false

function weapon:isCombustionSource() return self.combustion_source or false end

function weapon:isSingleUse() return self.one_use or false end

function weapon:hasConditionEffect(player)
if self:getClassName() == 'claw' and not player.skills:check('grapple') then
return false -- if attacking with claws and missing grapple skill then no condition effect
Expand All @@ -31,23 +29,13 @@ function weapon:hasConditionEffect(player)
return (self.condition_effect and true) or false
end

function weapon:getID() return self.weapon_ID end -- do we need this?

function weapon:getName() return self.name end

function weapon:getClass() return self.class end

function weapon:getClassName() return tostring(self.class) end

function weapon:getSkillRequired() return self.skill_required end

function weapon:getFuelAmount() return self.fuel_amount end

function weapon:getCrit() return self.critical end

function weapon:getStyle() return self.attack_style end

function weapon:getMasterSkill() return self.master_skill end

function weapon:getGroup() return self.group end

Expand Down
4 changes: 2 additions & 2 deletions code/player/action/outcome.lua
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ function Outcome.attack(player, target, weapon, inv_ID)
if target.armor:failDurabilityCheck(degrade_chance) then target.armor:degrade(target) end
end

local zombie = (player:isMobType('zombie') and player) or (target:isMobType('zombie') and player)
local human = (player:isMobType('human') and player) or (target:isMobType('human') and player)
local zombie = (player:isMobType('zombie') and player) or (target:isMobType('zombie') and target)
local human = (player:isMobType('human') and player) or (target:isMobType('human') and target)

if zombie.skills:check('track') then
zombie.condition.tracking:addScent(human)
Expand Down
2 changes: 1 addition & 1 deletion code/player/skills/check.lua
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function check.mark_prey(player)
end

function check.track(player)

assert(player:isStaged('outside'), 'Must be outside to track prey')
end

function check.acid(player)
Expand Down
14 changes: 12 additions & 2 deletions code/player/skills/criteria.lua
Original file line number Diff line number Diff line change
Expand Up @@ -29,28 +29,38 @@ function criteria.gesture(player)
assert(player_n - 1 > 0, 'Must have players nearby to gesture')
end

error_list[#error_list+1] = 'Must have players nearby to gesture'

function criteria.armor(player, armor_type)
-- Must recheck EP cost since armor_type not specified in basic criteria EP assert, causing it to be skipped
local cost, ep = player:getCost('ep', armor_type), player:getStat('ep')
assert(ep >= cost, 'Not enough enzyme points to use skill')

local skill = organic_armor_list[armor_type].required_skill
assert(player.skills:check(skill), 'Must have required skill to use ability')
assert(player.skills:check(skill), 'Must have required skill to use armor ability')
assert(player.armor:hasRoomForLayer(), 'No remaining room for additional armor layers')
end

error_list[#error_list+1] = 'Not enough enzyme points to use skill'
error_list[#error_list+1] = 'Must have required skill to use armor ability'
error_list[#error_list+1] = 'No remaining room for additional armor layers'

function criteria.ruin(player)
assert(player:isStaged('inside'), 'Must be inside to ruin building')
end

error_list[#error_list+1] = 'Must be inside to ruin building'

function criteria.mark_prey(player)

end

function criteria.track(player)

assert(player:isStaged('outside'), 'Must be outside to track prey')
end

error_list[#error_list+1] = 'Must be outside to track prey'

function criteria.acid(player)
local p_tile = player:getTile()
local human_n = p_tile:countPlayers('human', player:getStage())
Expand Down
15 changes: 15 additions & 0 deletions notes/finished_skills_checklist.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
--FINISHED SKILLS--

Human [11/10] (REMOVE grafitti and looting)
Military [12/10] (REMOVE ARCHERY for now!)
Research [6/10] (gadgets, scanner, terminal, terminal_adv)
Engineering [7/10] (repair, repairs_adv, renovate)
________________________________________________________________
COMPLETED [33/40]

Zombie [10/10]
Brute [8/10] (impale, dying grasp)
Hunter [4/10] (leap, leap_adv, mark_prey, scavenge, dodge, night vision)
Hive [8/10] (ruin, ransack)
_________________________________________________________________
COMPLETED SKILLS [30/40]
24 changes: 24 additions & 0 deletions notes/remaining_features.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---REMAINING FEATURES---

RUIN/REPAIR

MARK_PREY
LEAP FROM RUINS

IMPALE/DYING GRASP

TERMINAL SKILLS/ACTION
SCANNER/SCANNING ZOMBIES
GADGETS SKILL

(This is not relevant to skills, but is still code...)
EQUIPMENT FEATURES (transmitters, generators, terminals)
ITEM FEATURES (radios, etc.)
BUILDING FEATURES (
MAP GENERATION

---POSSIBLE FEATURES---

REWORK BRUTE'S ARMOR SKILLS (POSSIBLY GIVE A GROAN?)


11 changes: 11 additions & 0 deletions notes/terminal_info.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
ISP = AREA STATS INCLUDED FOR TERMINAL

-- A DISTRICTS FOLLOWING INFO --
# of powered buildings
# of buildings
# of ruined buildings
# of barricaded bulidings (maybe?)
# of zombies (and locations? if scanned)

If terminal is damaged, limited info

8 changes: 3 additions & 5 deletions scenes/action.lua
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,7 @@ local function onRowRender( event )
print('The params going into options are:')
for k,v in pairs(options.params) do print(k,v) end

composer.showOverlay("scenes.action."..item_name, options)
--composer.showOverlay( "scenes.action_perform", options)
composer.showOverlay( "scenes.action_perform", options)
print( "Button was pressed and released" )
end
end
Expand Down Expand Up @@ -250,9 +249,8 @@ print(event.target.id, 'action cost is - ', main_player:getCost('ap', event.targ
params.desc = action_data.desc
params.icon = action_data.icon
params.cost = main_player:getCost('ap', event.target.id)

composer.showOverlay("scenes.action."..event.target.id, options) -- this SERIOUSLY needs to be refactored and renamed!!!
--composer.showOverlay( "scenes.action_perform", options )

composer.showOverlay( "scenes.action_perform", options )
print( "Button was pressed and released" )
end
end
Expand Down
Loading

0 comments on commit 9985b23

Please sign in to comment.