Skip to content

Commit 9985b23

Browse files
Merge branch 'release-v0.4.2'
2 parents fc155d9 + 6b298c5 commit 9985b23

17 files changed

+742
-891
lines changed

code/item/class.lua

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -82,15 +82,8 @@ function item:getClassName() return tostring(self.class) end
8282
function item:getFlag()
8383
local flag
8484
local ID = item[self:getClassName()].ID
85-
print('getFlag()', ID, 2)
8685
flag = lshift(ID, 2)
8786
flag = bor(flag, self.condition)
88-
89-
if self:hasUses() then
90-
flag = lshift(flag, 4)
91-
flag = bor(flag, self.uses)
92-
end
93-
9487
return flag
9588
end
9689

code/item/weapon/class.lua

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ function weapon:isSkillRequired() return (self.skill_required and true) or false
1919

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

22-
function weapon:isSingleUse() return self.one_use or false end
23-
2422
function weapon:hasConditionEffect(player)
2523
if self:getClassName() == 'claw' and not player.skills:check('grapple') then
2624
return false -- if attacking with claws and missing grapple skill then no condition effect
@@ -31,23 +29,13 @@ function weapon:hasConditionEffect(player)
3129
return (self.condition_effect and true) or false
3230
end
3331

34-
function weapon:getID() return self.weapon_ID end -- do we need this?
35-
36-
function weapon:getName() return self.name end
37-
38-
function weapon:getClass() return self.class end
39-
40-
function weapon:getClassName() return tostring(self.class) end
41-
4232
function weapon:getSkillRequired() return self.skill_required end
4333

4434
function weapon:getFuelAmount() return self.fuel_amount end
4535

4636
function weapon:getCrit() return self.critical end
4737

4838
function weapon:getStyle() return self.attack_style end
49-
50-
function weapon:getMasterSkill() return self.master_skill end
5139

5240
function weapon:getGroup() return self.group end
5341

code/player/action/outcome.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ function Outcome.attack(player, target, weapon, inv_ID)
8888
if target.armor:failDurabilityCheck(degrade_chance) then target.armor:degrade(target) end
8989
end
9090

91-
local zombie = (player:isMobType('zombie') and player) or (target:isMobType('zombie') and player)
92-
local human = (player:isMobType('human') and player) or (target:isMobType('human') and player)
91+
local zombie = (player:isMobType('zombie') and player) or (target:isMobType('zombie') and target)
92+
local human = (player:isMobType('human') and player) or (target:isMobType('human') and target)
9393

9494
if zombie.skills:check('track') then
9595
zombie.condition.tracking:addScent(human)

code/player/skills/check.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ function check.mark_prey(player)
4242
end
4343

4444
function check.track(player)
45-
45+
assert(player:isStaged('outside'), 'Must be outside to track prey')
4646
end
4747

4848
function check.acid(player)

code/player/skills/criteria.lua

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,28 +29,38 @@ function criteria.gesture(player)
2929
assert(player_n - 1 > 0, 'Must have players nearby to gesture')
3030
end
3131

32+
error_list[#error_list+1] = 'Must have players nearby to gesture'
33+
3234
function criteria.armor(player, armor_type)
3335
-- Must recheck EP cost since armor_type not specified in basic criteria EP assert, causing it to be skipped
3436
local cost, ep = player:getCost('ep', armor_type), player:getStat('ep')
3537
assert(ep >= cost, 'Not enough enzyme points to use skill')
3638

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

44+
error_list[#error_list+1] = 'Not enough enzyme points to use skill'
45+
error_list[#error_list+1] = 'Must have required skill to use armor ability'
46+
error_list[#error_list+1] = 'No remaining room for additional armor layers'
47+
4248
function criteria.ruin(player)
4349
assert(player:isStaged('inside'), 'Must be inside to ruin building')
4450
end
4551

52+
error_list[#error_list+1] = 'Must be inside to ruin building'
53+
4654
function criteria.mark_prey(player)
4755

4856
end
4957

5058
function criteria.track(player)
51-
59+
assert(player:isStaged('outside'), 'Must be outside to track prey')
5260
end
5361

62+
error_list[#error_list+1] = 'Must be outside to track prey'
63+
5464
function criteria.acid(player)
5565
local p_tile = player:getTile()
5666
local human_n = p_tile:countPlayers('human', player:getStage())

notes/finished_skills_checklist.txt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
--FINISHED SKILLS--
2+
3+
Human [11/10] (REMOVE grafitti and looting)
4+
Military [12/10] (REMOVE ARCHERY for now!)
5+
Research [6/10] (gadgets, scanner, terminal, terminal_adv)
6+
Engineering [7/10] (repair, repairs_adv, renovate)
7+
________________________________________________________________
8+
COMPLETED [33/40]
9+
10+
Zombie [10/10]
11+
Brute [8/10] (impale, dying grasp)
12+
Hunter [4/10] (leap, leap_adv, mark_prey, scavenge, dodge, night vision)
13+
Hive [8/10] (ruin, ransack)
14+
_________________________________________________________________
15+
COMPLETED SKILLS [30/40]

notes/remaining_features.txt

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---REMAINING FEATURES---
2+
3+
RUIN/REPAIR
4+
5+
MARK_PREY
6+
LEAP FROM RUINS
7+
8+
IMPALE/DYING GRASP
9+
10+
TERMINAL SKILLS/ACTION
11+
SCANNER/SCANNING ZOMBIES
12+
GADGETS SKILL
13+
14+
(This is not relevant to skills, but is still code...)
15+
EQUIPMENT FEATURES (transmitters, generators, terminals)
16+
ITEM FEATURES (radios, etc.)
17+
BUILDING FEATURES (
18+
MAP GENERATION
19+
20+
---POSSIBLE FEATURES---
21+
22+
REWORK BRUTE'S ARMOR SKILLS (POSSIBLY GIVE A GROAN?)
23+
24+

notes/terminal_info.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
ISP = AREA STATS INCLUDED FOR TERMINAL
2+
3+
-- A DISTRICTS FOLLOWING INFO --
4+
# of powered buildings
5+
# of buildings
6+
# of ruined buildings
7+
# of barricaded bulidings (maybe?)
8+
# of zombies (and locations? if scanned)
9+
10+
If terminal is damaged, limited info
11+

scenes/action.lua

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,7 @@ local function onRowRender( event )
118118
print('The params going into options are:')
119119
for k,v in pairs(options.params) do print(k,v) end
120120

121-
composer.showOverlay("scenes.action."..item_name, options)
122-
--composer.showOverlay( "scenes.action_perform", options)
121+
composer.showOverlay( "scenes.action_perform", options)
123122
print( "Button was pressed and released" )
124123
end
125124
end
@@ -250,9 +249,8 @@ print(event.target.id, 'action cost is - ', main_player:getCost('ap', event.targ
250249
params.desc = action_data.desc
251250
params.icon = action_data.icon
252251
params.cost = main_player:getCost('ap', event.target.id)
253-
254-
composer.showOverlay("scenes.action."..event.target.id, options) -- this SERIOUSLY needs to be refactored and renamed!!!
255-
--composer.showOverlay( "scenes.action_perform", options )
252+
253+
composer.showOverlay( "scenes.action_perform", options )
256254
print( "Button was pressed and released" )
257255
end
258256
end

0 commit comments

Comments
 (0)