Skip to content

Commit

Permalink
Bugfixes to make wizard tower fully playable.
Browse files Browse the repository at this point in the history
  • Loading branch information
Putnam3145 committed Apr 16, 2014
1 parent 2c56013 commit a309bf3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions hack/mods/dark wizard tower/darkWizardTower.lua
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,12 @@ local function combineBody(unit1,unit2)
end

local function fuseUnit(unit1,unit2)
if unit1.id==unit2.id then return false end
unit1.body.blood_count=0
unit1.animal.vanish_countdown=2
combineSoul(unit2,unit1)
combineBody(unit2,unit1)
dfhack.gui,showAnnouncement(dfhack.TranslateName(dfhack.units.getVisibleName(unit2)) .. " absorbed the power and life of " .. dfhack.TranslateName(dfhack.units.getVisibleName(unit1)) .. "!",COLOR_RED,true)
dfhack.gui.showAnnouncement(dfhack.TranslateName(dfhack.units.getVisibleName(unit2)) .. " absorbed the power and life of " .. dfhack.TranslateName(dfhack.units.getVisibleName(unit1)) .. "!",COLOR_RED,true)
end

local function markForLife(unit)
Expand Down Expand Up @@ -97,7 +98,7 @@ end
local checkAnyway=function()
local markedUnit=getMarkedUnit()
for k,unit in ipairs(df.global.world.units.active) do
if dfhack.units.isCitizen(unit) and not unit.id==markedUnit.id then
if dfhack.units.isCitizen(unit) then
fuseUnit(unit,markedUnit)
end
end
Expand Down
2 changes: 1 addition & 1 deletion hack/mods/dark wizard tower/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ loadnum=-100
name="Wizard Tower"
author="Putnam"
raws_list={'entity_wizard_fantastic.txt','creature_wizard_fantastic.txt','language_WIZARD_FANTASTIC.txt','interaction_wizard_fantastic.txt','reaction_wizard_fantastic.txt',
'building_wizard_fantastic.txt'}
'building_wizard_fantastic.txt','inorganic_wizard_fantastic.txt'}

function findGuards(str,start,patch_guard)
local pStart=G.string.find(str,patch_guard[1],start)
Expand Down

0 comments on commit a309bf3

Please sign in to comment.