mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-08-08 15:19:50 +00:00
initial commit. This is icculus version 5542b94cae02a6333845854bbbd1abe0a259f1a4
This commit is contained in:
commit
3096eaf5e2
2519 changed files with 816064 additions and 0 deletions
78
game_scripts/_mods/guert_mod/tempo/00_starter.lua
Normal file
78
game_scripts/_mods/guert_mod/tempo/00_starter.lua
Normal file
|
@ -0,0 +1,78 @@
|
|||
-- Copyright (C) 2007, 2010 - Bit-Blot
|
||||
--
|
||||
-- This file is part of Aquaria.
|
||||
--
|
||||
-- Aquaria is free software; you can redistribute it and/or
|
||||
-- modify it under the terms of the GNU General Public License
|
||||
-- as published by the Free Software Foundation; either version 2
|
||||
-- of the License, or (at your option) any later version.
|
||||
--
|
||||
-- This program is distributed in the hope that it will be useful,
|
||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
--
|
||||
-- See the GNU General Public License for more details.
|
||||
--
|
||||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program; if not, write to the Free Software
|
||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
if not v then v = {} end
|
||||
if not AQUARIA_VERSION then dofile("scripts/entities/entityinclude.lua") end
|
||||
|
||||
v.n = 0
|
||||
|
||||
function init(me)
|
||||
setupEntity(me)
|
||||
entity_setEntityType(me, ET_ENEMY)
|
||||
entity_initSkeletal(me, "SkeletalFile")
|
||||
entity_setAllDamageTargets(me, false)
|
||||
|
||||
entity_generateCollisionMask(me)
|
||||
|
||||
entity_setState(me, STATE_IDLE)
|
||||
end
|
||||
|
||||
function postInit(me)
|
||||
v.n = getNaija()
|
||||
entity_setTarget(me, v.n)
|
||||
end
|
||||
|
||||
function update(me, dt)
|
||||
entity_updateMovement(me, dt)
|
||||
|
||||
entity_handleShotCollisionsSkeletal(me)
|
||||
local bone = entity_collideSkeletalVsCircle(me, v.n)
|
||||
end
|
||||
|
||||
function enterState(me)
|
||||
if entity_isState(me, STATE_IDLE) then
|
||||
entity_animate(me, "idle", -1)
|
||||
end
|
||||
end
|
||||
|
||||
function exitState(me)
|
||||
end
|
||||
|
||||
function damage(me, attacker, bone, damageType, dmg)
|
||||
return false
|
||||
end
|
||||
|
||||
function animationKey(me, key)
|
||||
end
|
||||
|
||||
function hitSurface(me)
|
||||
end
|
||||
|
||||
function songNote(me, note)
|
||||
end
|
||||
|
||||
function songNoteDone(me, note)
|
||||
end
|
||||
|
||||
function song(me, song)
|
||||
end
|
||||
|
||||
function activate(me)
|
||||
end
|
||||
|
86
game_scripts/_mods/guert_mod/tempo/anemone.lua
Normal file
86
game_scripts/_mods/guert_mod/tempo/anemone.lua
Normal file
|
@ -0,0 +1,86 @@
|
|||
-- Copyright (C) 2007, 2010 - Bit-Blot
|
||||
--
|
||||
-- This file is part of Aquaria.
|
||||
--
|
||||
-- Aquaria is free software; you can redistribute it and/or
|
||||
-- modify it under the terms of the GNU General Public License
|
||||
-- as published by the Free Software Foundation; either version 2
|
||||
-- of the License, or (at your option) any later version.
|
||||
--
|
||||
-- This program is distributed in the hope that it will be useful,
|
||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
--
|
||||
-- See the GNU General Public License for more details.
|
||||
--
|
||||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program; if not, write to the Free Software
|
||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
if not v then v = {} end
|
||||
if not AQUARIA_VERSION then dofile("scripts/entities/entityinclude.lua") end
|
||||
|
||||
-- ================================================================================================
|
||||
-- A N E M O N E
|
||||
-- ================================================================================================
|
||||
|
||||
-- ================================================================================================
|
||||
-- FUNCTIONS
|
||||
-- ================================================================================================
|
||||
|
||||
function init(me)
|
||||
setupBasicEntity(
|
||||
me,
|
||||
"anemone", -- texture
|
||||
9, -- health
|
||||
1, -- manaballamount
|
||||
1, -- exp
|
||||
0, -- money
|
||||
128, -- collideRadius (for hitting entities + spells)
|
||||
STATE_IDLE, -- initState
|
||||
128, -- sprite width
|
||||
256, -- sprite height
|
||||
1, -- particle "explosion" type, maps to particleEffects.txt -1 = none
|
||||
1, -- 0/1 hit other entities off/on (uses collideRadius)
|
||||
4000 -- updateCull -1: disabled, default: 4000
|
||||
)
|
||||
entity_setSegs(me, 2, 10, 6.0, 4.0, -0.02, 0, 2.5, 1)
|
||||
entity_setDeathParticleEffect(me, "AnemoneExplode")
|
||||
entity_setDamageTarget(me, DT_AVATAR_ENERGYBLAST, false)
|
||||
entity_setDamageTarget(me, DT_AVATAR_SHOCK, false)
|
||||
entity_setDamageTarget(me, DT_AVATAR_LIZAP, false)
|
||||
entity_setDamageTarget(me, DT_AVATAR_PET, false)
|
||||
entity_setTargetPriority(me, -1)
|
||||
end
|
||||
|
||||
function update(me, dt)
|
||||
entity_handleShotCollisions(me)
|
||||
local dmg = 0.5
|
||||
if isForm(FORM_NATURE) then
|
||||
dmg = 0
|
||||
end
|
||||
if entity_touchAvatarDamage(me, 70, dmg, 1200, 0, 0, -60) then
|
||||
--entity_push(getNaija(), 1200, 1, 0)
|
||||
end
|
||||
local range = 1024
|
||||
local size = 1.0
|
||||
if entity_isEntityInRange(me, getNaija(), range) then
|
||||
local dist = entity_getDistanceToEntity(me, getNaija())
|
||||
dist = size - (dist/range)*size
|
||||
local sz = 1 + dist
|
||||
entity_scale(me, 1, sz)
|
||||
end
|
||||
end
|
||||
|
||||
function damage(me, attacker, bone, damageType, dmg)
|
||||
return true
|
||||
end
|
||||
|
||||
function enterState()
|
||||
end
|
||||
|
||||
function exitState()
|
||||
end
|
||||
|
||||
function hitSurface()
|
||||
end
|
86
game_scripts/_mods/guert_mod/tempo/anemone2.lua
Normal file
86
game_scripts/_mods/guert_mod/tempo/anemone2.lua
Normal file
|
@ -0,0 +1,86 @@
|
|||
-- Copyright (C) 2007, 2010 - Bit-Blot
|
||||
--
|
||||
-- This file is part of Aquaria.
|
||||
--
|
||||
-- Aquaria is free software; you can redistribute it and/or
|
||||
-- modify it under the terms of the GNU General Public License
|
||||
-- as published by the Free Software Foundation; either version 2
|
||||
-- of the License, or (at your option) any later version.
|
||||
--
|
||||
-- This program is distributed in the hope that it will be useful,
|
||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
--
|
||||
-- See the GNU General Public License for more details.
|
||||
--
|
||||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program; if not, write to the Free Software
|
||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
if not v then v = {} end
|
||||
if not AQUARIA_VERSION then dofile("scripts/entities/entityinclude.lua") end
|
||||
|
||||
-- ================================================================================================
|
||||
-- A N E M O N E
|
||||
-- ================================================================================================
|
||||
|
||||
-- ================================================================================================
|
||||
-- FUNCTIONS
|
||||
-- ================================================================================================
|
||||
|
||||
function init(me)
|
||||
setupBasicEntity(
|
||||
me,
|
||||
"Anemone-0002", -- texture
|
||||
9, -- health
|
||||
1, -- manaballamount
|
||||
1, -- exp
|
||||
0, -- money
|
||||
128, -- collideRadius (for hitting entities + spells)
|
||||
STATE_IDLE, -- initState
|
||||
128, -- sprite width
|
||||
256, -- sprite height
|
||||
1, -- particle "explosion" type, maps to particleEffects.txt -1 = none
|
||||
1, -- 0/1 hit other entities off/on (uses collideRadius)
|
||||
4000 -- updateCull -1: disabled, default: 4000
|
||||
)
|
||||
entity_setSegs(me, 2, 10, 6.0, 4.0, -0.02, 0, 2.5, 1)
|
||||
entity_setDeathParticleEffect(me, "AnemoneExplode")
|
||||
entity_setDamageTarget(me, DT_AVATAR_ENERGYBLAST, false)
|
||||
entity_setDamageTarget(me, DT_AVATAR_SHOCK, false)
|
||||
entity_setDamageTarget(me, DT_AVATAR_LIZAP, false)
|
||||
entity_setDamageTarget(me, DT_AVATAR_PET, false)
|
||||
entity_setTargetPriority(me, -1)
|
||||
end
|
||||
|
||||
function update(me, dt)
|
||||
entity_handleShotCollisions(me)
|
||||
local dmg = 0.5
|
||||
if isForm(FORM_NATURE) then
|
||||
dmg = 0
|
||||
end
|
||||
if entity_touchAvatarDamage(me, 70, dmg, 1200, 0, 0, -60) then
|
||||
--entity_push(getNaija(), 1200, 1, 0)
|
||||
end
|
||||
local range = 1024
|
||||
local size = 1.0
|
||||
if entity_isEntityInRange(me, getNaija(), range) then
|
||||
local dist = entity_getDistanceToEntity(me, getNaija())
|
||||
dist = size - (dist/range)*size
|
||||
local sz = 1 + dist
|
||||
entity_scale(me, 1, sz)
|
||||
end
|
||||
end
|
||||
|
||||
function damage(me, attacker, bone, damageType, dmg)
|
||||
return true
|
||||
end
|
||||
|
||||
function enterState()
|
||||
end
|
||||
|
||||
function exitState()
|
||||
end
|
||||
|
||||
function hitSurface()
|
||||
end
|
88
game_scripts/_mods/guert_mod/tempo/anemone3.lua
Normal file
88
game_scripts/_mods/guert_mod/tempo/anemone3.lua
Normal file
|
@ -0,0 +1,88 @@
|
|||
-- Copyright (C) 2007, 2010 - Bit-Blot
|
||||
--
|
||||
-- This file is part of Aquaria.
|
||||
--
|
||||
-- Aquaria is free software; you can redistribute it and/or
|
||||
-- modify it under the terms of the GNU General Public License
|
||||
-- as published by the Free Software Foundation; either version 2
|
||||
-- of the License, or (at your option) any later version.
|
||||
--
|
||||
-- This program is distributed in the hope that it will be useful,
|
||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
--
|
||||
-- See the GNU General Public License for more details.
|
||||
--
|
||||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program; if not, write to the Free Software
|
||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
if not v then v = {} end
|
||||
if not AQUARIA_VERSION then dofile("scripts/entities/entityinclude.lua") end
|
||||
|
||||
-- ================================================================================================
|
||||
-- A N E M O N E
|
||||
-- ================================================================================================
|
||||
|
||||
-- ================================================================================================
|
||||
-- FUNCTIONS
|
||||
-- ================================================================================================
|
||||
|
||||
function init(me)
|
||||
setupBasicEntity(
|
||||
me,
|
||||
"Anemone-0003", -- texture
|
||||
9, -- health
|
||||
1, -- manaballamount
|
||||
1, -- exp
|
||||
0, -- money
|
||||
48, -- collideRadius (for hitting entities + spells)
|
||||
STATE_IDLE, -- initState
|
||||
128, -- sprite width
|
||||
256, -- sprite height
|
||||
1, -- particle "explosion" type, maps to particleEffects.txt -1 = none
|
||||
1, -- 0/1 hit other entities off/on (uses collideRadius)
|
||||
4000 -- updateCull -1: disabled, default: 4000
|
||||
)
|
||||
entity_setSegs(me, 2, 10, 6.0, 4.0, -0.02, 0, 2.5, 1)
|
||||
entity_setDeathParticleEffect(me, "AnemoneExplode")
|
||||
entity_setDamageTarget(me, DT_AVATAR_ENERGYBLAST, false)
|
||||
entity_setDamageTarget(me, DT_AVATAR_SHOCK, false)
|
||||
entity_setDamageTarget(me, DT_AVATAR_LIZAP, false)
|
||||
entity_setDamageTarget(me, DT_AVATAR_PET, false)
|
||||
entity_setTargetPriority(me, -1)
|
||||
end
|
||||
|
||||
function update(me, dt)
|
||||
entity_handleShotCollisions(me)
|
||||
local dmg = 0.5
|
||||
if isForm(FORM_NATURE) then
|
||||
dmg = 0
|
||||
end
|
||||
if entity_touchAvatarDamage(me, 48, dmg, 1200) then
|
||||
--entity_push(getNaija(), 1200, 1, 0)
|
||||
elseif entity_touchAvatarDamage(me, 48, dmg, 1200, 0, 0, -40) then
|
||||
elseif entity_touchAvatarDamage(me, 48, dmg, 1200, 0, 0, -80) then
|
||||
end
|
||||
local range = 1024
|
||||
local size = 1.0
|
||||
if entity_isEntityInRange(me, getNaija(), range) then
|
||||
local dist = entity_getDistanceToEntity(me, getNaija())
|
||||
dist = size - (dist/range)*size
|
||||
local sz = 1 + dist
|
||||
entity_scale(me, 1, sz)
|
||||
end
|
||||
end
|
||||
|
||||
function damage(me, attacker, bone, damageType, dmg)
|
||||
return true
|
||||
end
|
||||
|
||||
function enterState()
|
||||
end
|
||||
|
||||
function exitState()
|
||||
end
|
||||
|
||||
function hitSurface()
|
||||
end
|
87
game_scripts/_mods/guert_mod/tempo/anemone4.lua
Normal file
87
game_scripts/_mods/guert_mod/tempo/anemone4.lua
Normal file
|
@ -0,0 +1,87 @@
|
|||
-- Copyright (C) 2007, 2010 - Bit-Blot
|
||||
--
|
||||
-- This file is part of Aquaria.
|
||||
--
|
||||
-- Aquaria is free software; you can redistribute it and/or
|
||||
-- modify it under the terms of the GNU General Public License
|
||||
-- as published by the Free Software Foundation; either version 2
|
||||
-- of the License, or (at your option) any later version.
|
||||
--
|
||||
-- This program is distributed in the hope that it will be useful,
|
||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
--
|
||||
-- See the GNU General Public License for more details.
|
||||
--
|
||||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program; if not, write to the Free Software
|
||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
if not v then v = {} end
|
||||
if not AQUARIA_VERSION then dofile("scripts/entities/entityinclude.lua") end
|
||||
|
||||
-- ================================================================================================
|
||||
-- A N E M O N E
|
||||
-- ================================================================================================
|
||||
|
||||
-- ================================================================================================
|
||||
-- FUNCTIONS
|
||||
-- ================================================================================================
|
||||
|
||||
function init(me)
|
||||
setupBasicEntity(
|
||||
me,
|
||||
"Anemone-0004", -- texture
|
||||
9, -- health
|
||||
1, -- manaballamount
|
||||
1, -- exp
|
||||
0, -- money
|
||||
48, -- collideRadius (for hitting entities + spells)
|
||||
STATE_IDLE, -- initState
|
||||
128, -- sprite width
|
||||
256, -- sprite height
|
||||
1, -- particle "explosion" type, maps to particleEffects.txt -1 = none
|
||||
1, -- 0/1 hit other entities off/on (uses collideRadius)
|
||||
4000 -- updateCull -1: disabled, default: 4000
|
||||
)
|
||||
entity_setSegs(me, 2, 10, 6.0, 4.0, -0.02, 0, 2.5, 1)
|
||||
entity_setDeathParticleEffect(me, "AnemoneExplode")
|
||||
entity_setDamageTarget(me, DT_AVATAR_ENERGYBLAST, false)
|
||||
entity_setDamageTarget(me, DT_AVATAR_SHOCK, false)
|
||||
entity_setDamageTarget(me, DT_AVATAR_LIZAP, false)
|
||||
entity_setDamageTarget(me, DT_AVATAR_PET, false)
|
||||
entity_setTargetPriority(me, -1)
|
||||
end
|
||||
|
||||
function update(me, dt)
|
||||
entity_handleShotCollisions(me)
|
||||
local dmg = 0.5
|
||||
if isForm(FORM_NATURE) then
|
||||
dmg = 0
|
||||
end
|
||||
if entity_touchAvatarDamage(me, 48, dmg, 1200) then
|
||||
--entity_push(getNaija(), 1200, 1, 0)
|
||||
elseif entity_touchAvatarDamage(me, 48, dmg, 1200, 0, 0, -60) then
|
||||
end
|
||||
local range = 1024
|
||||
local size = 1.0
|
||||
if entity_isEntityInRange(me, getNaija(), range) then
|
||||
local dist = entity_getDistanceToEntity(me, getNaija())
|
||||
dist = size - (dist/range)*size
|
||||
local sz = 1 + dist
|
||||
entity_scale(me, 1, sz)
|
||||
end
|
||||
end
|
||||
|
||||
function damage(me, attacker, bone, damageType, dmg)
|
||||
return true
|
||||
end
|
||||
|
||||
function enterState()
|
||||
end
|
||||
|
||||
function exitState()
|
||||
end
|
||||
|
||||
function hitSurface()
|
||||
end
|
137
game_scripts/_mods/guert_mod/tempo/biteymouth.lua
Normal file
137
game_scripts/_mods/guert_mod/tempo/biteymouth.lua
Normal file
|
@ -0,0 +1,137 @@
|
|||
-- Copyright (C) 2007, 2010 - Bit-Blot
|
||||
--
|
||||
-- This file is part of Aquaria.
|
||||
--
|
||||
-- Aquaria is free software; you can redistribute it and/or
|
||||
-- modify it under the terms of the GNU General Public License
|
||||
-- as published by the Free Software Foundation; either version 2
|
||||
-- of the License, or (at your option) any later version.
|
||||
--
|
||||
-- This program is distributed in the hope that it will be useful,
|
||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
--
|
||||
-- See the GNU General Public License for more details.
|
||||
--
|
||||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program; if not, write to the Free Software
|
||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
if not v then v = {} end
|
||||
if not AQUARIA_VERSION then dofile("scripts/entities/entityinclude.lua") end
|
||||
|
||||
-- ================================================================================================
|
||||
-- B I T E Y M O U T H
|
||||
-- ================================================================================================
|
||||
|
||||
-- ================================================================================================
|
||||
-- S T A T E S
|
||||
-- ================================================================================================
|
||||
|
||||
local STATE_BITE = 1001
|
||||
|
||||
-- ================================================================================================
|
||||
-- L O C A L V A R I A B L E S
|
||||
-- ================================================================================================
|
||||
|
||||
v.biteDelay = 0
|
||||
|
||||
-- ================================================================================================
|
||||
-- F U N C T I O N S
|
||||
-- ================================================================================================
|
||||
|
||||
function init(me)
|
||||
setupBasicEntity(
|
||||
me,
|
||||
"BiteyMouth/Teeth", -- texture
|
||||
69, -- health
|
||||
0, -- manaballamount
|
||||
69, -- exp
|
||||
69, -- money
|
||||
64, -- collideRadius (only used if hit entities is on)
|
||||
STATE_IDLE, -- initState
|
||||
128, -- sprite width
|
||||
128, -- sprite height
|
||||
1, -- particle "explosion" type, maps to particleEffects.txt -1 = none
|
||||
0, -- 0/1 hit other entities off/on (uses collideRadius)
|
||||
2000 -- updateCull -1: disabled, default: 4000
|
||||
)
|
||||
|
||||
loadSound("BiteyMouthBite")
|
||||
|
||||
entity_setAllDamageTargets(me, false)
|
||||
|
||||
entity_initSkeletal(me, "BiteyMouth")
|
||||
|
||||
entity_scale(me, 0.9, 0.9)
|
||||
entity_color(me, 0.54, 0.54, 0.54)
|
||||
|
||||
entity_setState(me, STATE_IDLE)
|
||||
end
|
||||
|
||||
function update(me, dt)
|
||||
|
||||
-- BITE WHEN NAIJA IS NEAR
|
||||
if entity_getState(me) == STATE_IDLE then
|
||||
if v.biteDelay > 0 then v.biteDelay = v.biteDelay - dt
|
||||
elseif v.biteDelay <= 0 then
|
||||
v.biteDelay = 0
|
||||
|
||||
entity_findTarget(me, 321)
|
||||
|
||||
if entity_hasTarget(me) then
|
||||
entity_setState(me, STATE_OPEN)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function enterState(me)
|
||||
-- HIDE IN THE BG...
|
||||
if entity_getState(me) == STATE_IDLE then
|
||||
entity_animate(me, "idle", LOOP_INF)
|
||||
entity_scale(me, 0.9, 0.9, 0.54, 0, 0, 1)
|
||||
entity_color(me, 0.54, 0.54, 0.54, 0.54, 0, 0, 1)
|
||||
|
||||
-- ...OPEN UP...
|
||||
elseif entity_getState(me) == STATE_OPEN then
|
||||
local appearSpeed = entity_animate(me, "open")
|
||||
entity_setStateTime(me, appearSpeed)
|
||||
entity_scale(me, 1.4, 1.4, appearSpeed) --scale to normal size
|
||||
entity_color(me, 1, 1, 1, appearSpeed) --set to normal colour
|
||||
|
||||
-- ...BITE!
|
||||
elseif entity_getState(me) == STATE_BITE then
|
||||
entity_setStateTime(me, entity_animate(me, "bite"))
|
||||
end
|
||||
end
|
||||
|
||||
function damage(me, attacker, bone, damageType, dmg, x, y)
|
||||
return false
|
||||
end
|
||||
|
||||
function exitState(me)
|
||||
if entity_getState(me) == STATE_OPEN then
|
||||
entity_setState(me, STATE_BITE)
|
||||
|
||||
elseif entity_getState(me) == STATE_BITE then
|
||||
entity_setState(me, STATE_IDLE)
|
||||
v.biteDelay = 2.1 + (math.random(210) * 0.01)
|
||||
entity_offset(me, 0, 0)
|
||||
end
|
||||
end
|
||||
|
||||
function animationKey(me, key)
|
||||
if entity_getState(me) == STATE_BITE and key == 1 then
|
||||
entity_sound(me, "BiteyMouthBite")
|
||||
--entity_sound(me, "Bite", 543 + math.random(123))
|
||||
shakeCamera(3.2, 0.54)
|
||||
entity_touchAvatarDamage(me, 98, 2.1, 360)
|
||||
end
|
||||
|
||||
-- BITE SHAKE
|
||||
--[[if entity_getState(me) == STATE_BITE and key >= 1 then
|
||||
range = 120
|
||||
entity_offset(me, (math.random(range)-range/2) * 0.1, (math.random(range)-range/2) * 0.1)
|
||||
end]]--
|
||||
end
|
31
game_scripts/_mods/guert_mod/tempo/empty.lua
Normal file
31
game_scripts/_mods/guert_mod/tempo/empty.lua
Normal file
|
@ -0,0 +1,31 @@
|
|||
-- Copyright (C) 2007, 2010 - Bit-Blot
|
||||
--
|
||||
-- This file is part of Aquaria.
|
||||
--
|
||||
-- Aquaria is free software; you can redistribute it and/or
|
||||
-- modify it under the terms of the GNU General Public License
|
||||
-- as published by the Free Software Foundation; either version 2
|
||||
-- of the License, or (at your option) any later version.
|
||||
--
|
||||
-- This program is distributed in the hope that it will be useful,
|
||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
--
|
||||
-- See the GNU General Public License for more details.
|
||||
--
|
||||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program; if not, write to the Free Software
|
||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
if not v then v = {} end
|
||||
if not AQUARIA_VERSION then dofile("scripts/entities/entityinclude.lua") end
|
||||
|
||||
function init(me)
|
||||
entity_alpha(me, 0)
|
||||
esetv(me, EV_LOOKAT, 0)
|
||||
entity_setCanLeaveWater(me, true)
|
||||
end
|
||||
|
||||
function update(me, dt)
|
||||
entity_updateMovement(me, dt)
|
||||
end
|
209
game_scripts/_mods/guert_mod/tempo/energybarrier.lua
Normal file
209
game_scripts/_mods/guert_mod/tempo/energybarrier.lua
Normal file
|
@ -0,0 +1,209 @@
|
|||
-- Copyright (C) 2007, 2010 - Bit-Blot
|
||||
--
|
||||
-- This file is part of Aquaria.
|
||||
--
|
||||
-- Aquaria is free software; you can redistribute it and/or
|
||||
-- modify it under the terms of the GNU General Public License
|
||||
-- as published by the Free Software Foundation; either version 2
|
||||
-- of the License, or (at your option) any later version.
|
||||
--
|
||||
-- This program is distributed in the hope that it will be useful,
|
||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
--
|
||||
-- See the GNU General Public License for more details.
|
||||
--
|
||||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program; if not, write to the Free Software
|
||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
if not v then v = {} end
|
||||
if not AQUARIA_VERSION then dofile("scripts/entities/entityinclude.lua") end
|
||||
|
||||
-- energy barrier
|
||||
v.init_x = 0
|
||||
v.init_y = 0
|
||||
|
||||
v.dist = 700
|
||||
|
||||
v.lastRot = -1
|
||||
|
||||
v.topy=0
|
||||
v.btmy=0
|
||||
v.leftx=0
|
||||
v.rightx=0
|
||||
|
||||
v.halfWidth = 32
|
||||
|
||||
v.flicker = false
|
||||
local FLICKER_TIME1 = 1.2
|
||||
local FLICKER_TIME2 = 1.0
|
||||
v.flickerTimer = FLICKER_TIME1
|
||||
v.orient = ORIENT_NONE
|
||||
|
||||
function v.commonInit(me)
|
||||
setupEntity(me, "EnergyBarrier", 1)
|
||||
entity_setActivationType(me, AT_NONE)
|
||||
entity_setUpdateCull(me, 1024)
|
||||
entity_alpha(me, 0)
|
||||
end
|
||||
|
||||
function update(me, dt)
|
||||
local adjust = 25
|
||||
if entity_getRotation(me) ~= v.lastRot then
|
||||
v.lastRot = entity_getRotation(me)
|
||||
if entity_getRotation(me) < 90 then
|
||||
v.topy = findWall(entity_x(me), entity_y(me), 0, -1)
|
||||
v.btmy = findWall(entity_x(me), entity_y(me), 0, 1)
|
||||
v.leftx = entity_x(me)-v.halfWidth
|
||||
v.rightx = entity_x(me)+v.halfWidth
|
||||
v.orient = ORIENT_VERTICAL
|
||||
v.topy = v.topy + adjust
|
||||
v.btmy = v.btmy - adjust
|
||||
entity_setWidth(me, v.rightx-v.leftx)
|
||||
entity_setHeight(me, v.btmy-v.topy)
|
||||
|
||||
elseif entity_getRotation(me) < 180 then
|
||||
v.leftx = findWall(entity_x(me), entity_y(me), -1, 0)
|
||||
v.rightx = findWall(entity_x(me), entity_y(me), 1, 0)
|
||||
v.topy = entity_y(me)-v.halfWidth
|
||||
v.btmy = entity_y(me)+v.halfWidth
|
||||
v.orient = ORIENT_HORIZONTAL
|
||||
v.leftx = v.leftx + adjust
|
||||
v.rightx = v.rightx - adjust
|
||||
entity_setHeight(me, v.rightx-v.leftx)
|
||||
entity_setWidth(me, v.btmy-v.topy)
|
||||
end
|
||||
end
|
||||
|
||||
if entity_isState(me, STATE_PULSE) then
|
||||
v.pulseTimer = v.pulseTimer - dt
|
||||
if v.pulseTimer < 0 then
|
||||
entity_setState(me, STATE_OFF)
|
||||
end
|
||||
end
|
||||
|
||||
if entity_isState(me, STATE_FLICKER) then
|
||||
v.flickerTimer = v.flickerTimer - dt
|
||||
if v.flickerTimer < 0 then
|
||||
if v.flicker == false then
|
||||
v.flickerTimer = FLICKER_TIME1
|
||||
elseif v.flicker == true then
|
||||
v.flickerTimer = FLICKER_TIME2
|
||||
end
|
||||
if v.flicker then
|
||||
entity_alpha(me, 0, 0.1)
|
||||
v.flicker = false
|
||||
--setSceneColor(1, 1, 1, 0.5)
|
||||
else
|
||||
entity_playSfx(me, "FizzleBarrier")
|
||||
if entity_getRotation(me) == 0 then
|
||||
spawnParticleEffect("EnergyBarrierFlicker", entity_x(me), entity_y(me))
|
||||
else
|
||||
spawnParticleEffect("EnergyBarrierFlicker2", entity_x(me), entity_y(me))
|
||||
end
|
||||
entity_alpha(me, 1, 0.1)
|
||||
v.flicker = true
|
||||
--setSceneColor(1, 0.5, 0.5, 0.5)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if entity_isState(me, STATE_IDLE)
|
||||
or (entity_isState(me, STATE_FLICKER) and v.flicker==true)
|
||||
or entity_isState(me, STATE_PULSE)
|
||||
then
|
||||
--debugLog("state is idle")
|
||||
local e = getFirstEntity()
|
||||
while e ~= 0 do
|
||||
--debugLog("Found an entity")
|
||||
if (entity_getEntityType(e)==ET_ENEMY or entity_getEntityType(e)==ET_AVATAR)
|
||||
and not entity_isProperty(e, EP_MOVABLE) and not entity_isDead(e) and entity_getCollideRadius(e) > 0 then
|
||||
--debugLog("Found an enemy / the player")
|
||||
if entity_x(e) >= v.leftx and entity_x(e) <= v.rightx
|
||||
and entity_y(e) >= v.topy and entity_y(e) <= v.btmy then
|
||||
if v.orient == ORIENT_VERTICAL then
|
||||
if entity_x(e) > entity_x(me) then
|
||||
entity_push(e, 1000, entity_vely(e), 0.5, 1000)
|
||||
else
|
||||
entity_push(e, -1000, entity_vely(e), 0.5, 1000)
|
||||
end
|
||||
elseif v.orient == ORIENT_HORIZONTAL then
|
||||
if entity_y(e) > entity_y(me) then
|
||||
entity_push(e, entity_velx(e), 1000, 0.5, 1000)
|
||||
else
|
||||
entity_push(e, entity_velx(e), -1000, 0.5, 1000)
|
||||
end
|
||||
end
|
||||
spawnParticleEffect("HitEnergyBarrier", entity_x(e), entity_y(e))
|
||||
if entity_getEntityType(e) == ET_AVATAR then
|
||||
debugLog("hit avatar")
|
||||
entity_damage(e, me, 1)
|
||||
else
|
||||
entity_damage(e, me, 2)
|
||||
end
|
||||
end
|
||||
end
|
||||
if entity_isName(e, "MetalObject") then
|
||||
if entity_x(e) > v.leftx and entity_x(e) < v.rightx
|
||||
and entity_y(e) > v.topy and entity_y(e) < v.btmy then
|
||||
entity_setState(me, STATE_DISABLED)
|
||||
end
|
||||
end
|
||||
e = getNextEntity()
|
||||
end
|
||||
end
|
||||
--[[
|
||||
if not entity_isState(me, STATE_OPENED) and not entity_isState(me, STATE_OPEN) then
|
||||
init_x = entity_x(me)
|
||||
init_y = entity_y(me)
|
||||
end
|
||||
if entity_getState(me)==STATE_OPEN then
|
||||
--reconstructGrid()
|
||||
if not entity_isInterpolating(me) then
|
||||
|
||||
|
||||
entity_setState(me, STATE_OPENED)
|
||||
end
|
||||
end
|
||||
]]--
|
||||
end
|
||||
|
||||
function enterState(me)
|
||||
if entity_isState(me, STATE_DISABLED) then
|
||||
entity_alpha(me, 0)
|
||||
elseif entity_isState(me, STATE_PULSE) then
|
||||
entity_alpha(me, 1, 0.1)
|
||||
spawnParticleEffect("EnergyBarrierFlicker", entity_x(me), entity_y(me))
|
||||
v.pulseTimer = 1
|
||||
|
||||
elseif entity_isState(me, STATE_OFF) then
|
||||
entity_alpha(me, 0, 0.1)
|
||||
end
|
||||
--[[
|
||||
if entity_isState(me, STATE_OPEN) then
|
||||
if entity_getRotation(me)==0 then
|
||||
entity_interpolateTo(me, init_x, init_y-dist, 2)
|
||||
elseif entity_getRotation(me) == 90 then
|
||||
entity_interpolateTo(me, init_x+dist, init_y, 2)
|
||||
elseif entity_getRotation(me) == 270 then
|
||||
entity_interpolateTo(me, init_x-dist, init_y, 2)
|
||||
end
|
||||
elseif entity_isState(me, STATE_OPENED) then
|
||||
if entity_getRotation(me)==0 then
|
||||
entity_setPosition(me, init_x, init_y-dist)
|
||||
elseif entity_getRotation(me) == 90 then
|
||||
entity_setPosition(me, init_x+dist, init_y)
|
||||
elseif entity_getRotation(me) == 270 then
|
||||
entity_setPosition(me, init_x-dist, init_y)
|
||||
end
|
||||
reconstructGrid()
|
||||
end
|
||||
]]--
|
||||
end
|
||||
|
||||
function exitState(me)
|
||||
end
|
||||
|
||||
function hitSurface(me)
|
||||
end
|
28
game_scripts/_mods/guert_mod/tempo/energybarrierflicker.lua
Normal file
28
game_scripts/_mods/guert_mod/tempo/energybarrierflicker.lua
Normal file
|
@ -0,0 +1,28 @@
|
|||
-- Copyright (C) 2007, 2010 - Bit-Blot
|
||||
--
|
||||
-- This file is part of Aquaria.
|
||||
--
|
||||
-- Aquaria is free software; you can redistribute it and/or
|
||||
-- modify it under the terms of the GNU General Public License
|
||||
-- as published by the Free Software Foundation; either version 2
|
||||
-- of the License, or (at your option) any later version.
|
||||
--
|
||||
-- This program is distributed in the hope that it will be useful,
|
||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
--
|
||||
-- See the GNU General Public License for more details.
|
||||
--
|
||||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program; if not, write to the Free Software
|
||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
if not v then v = {} end
|
||||
|
||||
-- energy barrier flickering
|
||||
dofile("scripts/entities/energybarrier.lua")
|
||||
|
||||
function init(me)
|
||||
v.commonInit(me)
|
||||
entity_setState(me, STATE_FLICKER)
|
||||
end
|
28
game_scripts/_mods/guert_mod/tempo/energybarrieroff.lua
Normal file
28
game_scripts/_mods/guert_mod/tempo/energybarrieroff.lua
Normal file
|
@ -0,0 +1,28 @@
|
|||
-- Copyright (C) 2007, 2010 - Bit-Blot
|
||||
--
|
||||
-- This file is part of Aquaria.
|
||||
--
|
||||
-- Aquaria is free software; you can redistribute it and/or
|
||||
-- modify it under the terms of the GNU General Public License
|
||||
-- as published by the Free Software Foundation; either version 2
|
||||
-- of the License, or (at your option) any later version.
|
||||
--
|
||||
-- This program is distributed in the hope that it will be useful,
|
||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
--
|
||||
-- See the GNU General Public License for more details.
|
||||
--
|
||||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program; if not, write to the Free Software
|
||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
if not v then v = {} end
|
||||
|
||||
-- energy barrier ... off
|
||||
dofile("scripts/entities/energybarrier.lua")
|
||||
|
||||
function init(me)
|
||||
v.commonInit(me)
|
||||
entity_setState(me, STATE_OFF)
|
||||
end
|
28
game_scripts/_mods/guert_mod/tempo/energybarriersolid.lua
Normal file
28
game_scripts/_mods/guert_mod/tempo/energybarriersolid.lua
Normal file
|
@ -0,0 +1,28 @@
|
|||
-- Copyright (C) 2007, 2010 - Bit-Blot
|
||||
--
|
||||
-- This file is part of Aquaria.
|
||||
--
|
||||
-- Aquaria is free software; you can redistribute it and/or
|
||||
-- modify it under the terms of the GNU General Public License
|
||||
-- as published by the Free Software Foundation; either version 2
|
||||
-- of the License, or (at your option) any later version.
|
||||
--
|
||||
-- This program is distributed in the hope that it will be useful,
|
||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
--
|
||||
-- See the GNU General Public License for more details.
|
||||
--
|
||||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program; if not, write to the Free Software
|
||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
if not v then v = {} end
|
||||
|
||||
-- energy barrier ... no flickering
|
||||
dofile("scripts/entities/energybarrier.lua")
|
||||
|
||||
function init(me)
|
||||
v.commonInit(me)
|
||||
entity_setState(me, STATE_IDLE)
|
||||
end
|
31
game_scripts/_mods/guert_mod/tempo/energydoor.lua
Normal file
31
game_scripts/_mods/guert_mod/tempo/energydoor.lua
Normal file
|
@ -0,0 +1,31 @@
|
|||
-- Copyright (C) 2007, 2010 - Bit-Blot
|
||||
--
|
||||
-- This file is part of Aquaria.
|
||||
--
|
||||
-- Aquaria is free software; you can redistribute it and/or
|
||||
-- modify it under the terms of the GNU General Public License
|
||||
-- as published by the Free Software Foundation; either version 2
|
||||
-- of the License, or (at your option) any later version.
|
||||
--
|
||||
-- This program is distributed in the hope that it will be useful,
|
||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
--
|
||||
-- See the GNU General Public License for more details.
|
||||
--
|
||||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program; if not, write to the Free Software
|
||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
if not v then v = {} end
|
||||
|
||||
-- energy door
|
||||
dofile("scripts/entities/doorcommon.lua")
|
||||
|
||||
function init(me)
|
||||
v.commonInit(me, "EnergyDoor", "EnergyDoor", 1.5, 0)
|
||||
end
|
||||
|
||||
function update(me, dt)
|
||||
v.commonUpdate(me, dt)
|
||||
end
|
120
game_scripts/_mods/guert_mod/tempo/energyorb.lua
Normal file
120
game_scripts/_mods/guert_mod/tempo/energyorb.lua
Normal file
|
@ -0,0 +1,120 @@
|
|||
-- Copyright (C) 2007, 2010 - Bit-Blot
|
||||
--
|
||||
-- This file is part of Aquaria.
|
||||
--
|
||||
-- Aquaria is free software; you can redistribute it and/or
|
||||
-- modify it under the terms of the GNU General Public License
|
||||
-- as published by the Free Software Foundation; either version 2
|
||||
-- of the License, or (at your option) any later version.
|
||||
--
|
||||
-- This program is distributed in the hope that it will be useful,
|
||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
--
|
||||
-- See the GNU General Public License for more details.
|
||||
--
|
||||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program; if not, write to the Free Software
|
||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
if not v then v = {} end
|
||||
if not AQUARIA_VERSION then dofile("scripts/entities/entityinclude.lua") end
|
||||
|
||||
-- ================================================================================================
|
||||
-- ENERGY ORB
|
||||
-- ================================================================================================
|
||||
|
||||
v.charge = 0
|
||||
v.delay = 1
|
||||
|
||||
-- REMEMBER TO UPDATE ENERGYORBCRACKED WHEN CHANGING THIS FILE!
|
||||
|
||||
-- ================================================================================================
|
||||
-- FUNCTIONS
|
||||
-- ================================================================================================
|
||||
|
||||
function init(me)
|
||||
setupEntity(me, "EnergyOrb")
|
||||
--entity_setProperty(me, EP_SOLID, true)
|
||||
entity_setDamageTarget(me, DT_AVATAR_ENERGYBLAST, false)
|
||||
entity_setProperty(me, EP_MOVABLE, true)
|
||||
entity_setWeight(me, 200)
|
||||
entity_setCollideRadius(me, 32)
|
||||
entity_setName(me, "EnergyOrb")
|
||||
|
||||
entity_setMaxSpeed(me, 450)
|
||||
--entity_setMaxSpeed(me, 600)
|
||||
|
||||
entity_setEntityType(me, ET_ENEMY)
|
||||
|
||||
entity_setAllDamageTargets(me, false)
|
||||
entity_setDamageTarget(me, DT_AVATAR_ENERGYBLAST, true)
|
||||
entity_setDamageTarget(me, DT_AVATAR_SHOCK, true)
|
||||
|
||||
--entity_setBounceType(me, BOUNCE_REAL)
|
||||
--entity_setProperty(me, EP_BATTERY, true)
|
||||
end
|
||||
|
||||
function update(me, dt)
|
||||
--if not entity_isState(me, STATE_CHARGED) then
|
||||
entity_handleShotCollisions(me)
|
||||
--end
|
||||
|
||||
--[[
|
||||
if not entity_isState(me, STATE_INHOLDER) then
|
||||
entity_updateMovement(me, dt)
|
||||
end
|
||||
]]--
|
||||
entity_updateMovement(me, dt)
|
||||
entity_updateCurrents(me)
|
||||
|
||||
if not entity_isState(me, STATE_CHARGED) then
|
||||
v.delay = v.delay - dt
|
||||
if v.delay < 0 then
|
||||
v.delay = 0.5
|
||||
v.charge = v.charge - 1
|
||||
if v.charge < 0 then
|
||||
v.charge = 0
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function enterState(me)
|
||||
if entity_isState(me, STATE_CHARGED) then
|
||||
debugLog("state charged!")
|
||||
entity_setTexture(me, "EnergyOrb-Charged")
|
||||
entity_setDamageTarget(me, DT_AVATAR_ENERGYBLAST, false)
|
||||
entity_setDamageTarget(me, DT_AVATAR_SHOCK, false)
|
||||
--msg("CHARGED")
|
||||
elseif entity_isState(me, STATE_INHOLDER) then
|
||||
entity_setWeight(me, 0)
|
||||
entity_clearVel(me)
|
||||
end
|
||||
end
|
||||
|
||||
function exitState(me)
|
||||
end
|
||||
|
||||
function hitSurface(me)
|
||||
--entity_sound(me, "rock-hit")
|
||||
end
|
||||
|
||||
function damage(me, attacker, bone, damageType, dmg)
|
||||
if not entity_isState(me, STATE_CHARGED) then
|
||||
if damageType == DT_AVATAR_ENERGYBLAST then
|
||||
--v.charge = v.charge + dmg
|
||||
elseif damageType == DT_AVATAR_SHOCK then
|
||||
v.charge = v.charge + 10
|
||||
end
|
||||
if v.charge >= 10 then
|
||||
playSfx("EnergyOrbCharge")
|
||||
spawnParticleEffect("EnergyOrbCharge", entity_x(me), entity_y(me))
|
||||
entity_setState(me, STATE_CHARGED)
|
||||
end
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
function activate(me)
|
||||
end
|
115
game_scripts/_mods/guert_mod/tempo/energyorbcracked.lua
Normal file
115
game_scripts/_mods/guert_mod/tempo/energyorbcracked.lua
Normal file
|
@ -0,0 +1,115 @@
|
|||
-- Copyright (C) 2007, 2010 - Bit-Blot
|
||||
--
|
||||
-- This file is part of Aquaria.
|
||||
--
|
||||
-- Aquaria is free software; you can redistribute it and/or
|
||||
-- modify it under the terms of the GNU General Public License
|
||||
-- as published by the Free Software Foundation; either version 2
|
||||
-- of the License, or (at your option) any later version.
|
||||
--
|
||||
-- This program is distributed in the hope that it will be useful,
|
||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
--
|
||||
-- See the GNU General Public License for more details.
|
||||
--
|
||||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program; if not, write to the Free Software
|
||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
if not v then v = {} end
|
||||
if not AQUARIA_VERSION then dofile("scripts/entities/entityinclude.lua") end
|
||||
|
||||
-- ================================================================================================
|
||||
-- ENERGY ORB CRACKED
|
||||
-- ================================================================================================
|
||||
|
||||
v.charge = 0
|
||||
v.delay = 1
|
||||
v.chargeTimer = 0
|
||||
|
||||
-- ================================================================================================
|
||||
-- FUNCTIONS
|
||||
-- ================================================================================================
|
||||
|
||||
function init(me)
|
||||
setupEntity(me, "EnergyOrbCracked", -1)
|
||||
|
||||
entity_setDamageTarget(me, DT_AVATAR_ENERGYBLAST, true)
|
||||
entity_setProperty(me, EP_MOVABLE, true)
|
||||
entity_setWeight(me, 200)
|
||||
entity_setCollideRadius(me, 32)
|
||||
entity_setName(me, "EnergyOrb")
|
||||
|
||||
entity_setMaxSpeed(me, 450)
|
||||
|
||||
entity_setEntityType(me, ET_ENEMY)
|
||||
|
||||
entity_setAllDamageTargets(me, false)
|
||||
entity_setDamageTarget(me, DT_AVATAR_ENERGYBLAST, true)
|
||||
entity_setDamageTarget(me, DT_AVATAR_SHOCK, true)
|
||||
end
|
||||
|
||||
function update(me, dt)
|
||||
|
||||
entity_handleShotCollisions(me)
|
||||
entity_updateMovement(me, dt)
|
||||
|
||||
if entity_isState(me, STATE_CHARGED) then
|
||||
v.chargeTimer = v.chargeTimer - dt
|
||||
if v.chargeTimer < 0 then
|
||||
entity_setState(me, STATE_IDLE)
|
||||
spawnParticleEffect("EnergyOrbUnCharge", entity_x(me), entity_y(me))
|
||||
end
|
||||
end
|
||||
if not entity_isState(me, STATE_CHARGED) then
|
||||
v.delay = v.delay - dt
|
||||
if v.delay < 0 then
|
||||
v.delay = 0.5
|
||||
v.charge = v.charge - 1
|
||||
if v.charge < 0 then
|
||||
v.charge = 0
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function enterState(me)
|
||||
if entity_isState(me, STATE_IDLE) then
|
||||
entity_setTexture(me, "EnergyOrbCracked")
|
||||
elseif entity_isState(me, STATE_CHARGED) then
|
||||
v.chargeTimer = 1
|
||||
entity_setTexture(me, "EnergyOrbCracked-Charged")
|
||||
--msg("CHARGED")
|
||||
elseif entity_isState(me, STATE_INHOLDER) then
|
||||
entity_setWeight(me, 0)
|
||||
entity_clearVel(me)
|
||||
end
|
||||
end
|
||||
|
||||
function exitState(me)
|
||||
end
|
||||
|
||||
function hitSurface(me)
|
||||
--entity_sound(me, "rock-hit")
|
||||
end
|
||||
|
||||
function damage(me, attacker, bone, damageType, dmg)
|
||||
if not entity_isState(me, STATE_CHARGED) then
|
||||
if damageType == DT_AVATAR_ENERGYBLAST then
|
||||
--v.charge = v.charge + dmg
|
||||
elseif damageType == DT_AVATAR_SHOCK then
|
||||
v.charge = v.charge + 10
|
||||
end
|
||||
if v.charge >= 10 then
|
||||
playSfx("EnergyOrbCharge")
|
||||
spawnParticleEffect("EnergyOrbCharge", entity_x(me), entity_y(me))
|
||||
entity_setState(me, STATE_CHARGED)
|
||||
v.charge = 0
|
||||
end
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
function activate(me)
|
||||
end
|
705
game_scripts/_mods/guert_mod/tempo/entityinclude.lua
Normal file
705
game_scripts/_mods/guert_mod/tempo/entityinclude.lua
Normal file
|
@ -0,0 +1,705 @@
|
|||
-- Copyright (C) 2007, 2010 - Bit-Blot
|
||||
--
|
||||
-- This file is part of Aquaria.
|
||||
--
|
||||
-- Aquaria is free software; you can redistribute it and/or
|
||||
-- modify it under the terms of the GNU General Public License
|
||||
-- as published by the Free Software Foundation; either version 2
|
||||
-- of the License, or (at your option) any later version.
|
||||
--
|
||||
-- This program is distributed in the hope that it will be useful,
|
||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
--
|
||||
-- See the GNU General Public License for more details.
|
||||
--
|
||||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program; if not, write to the Free Software
|
||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
if not v then v = {} end
|
||||
|
||||
-- emotes
|
||||
EMOTE_NAIJAEVILLAUGH = 0
|
||||
EMOTE_NAIJAGIGGLE = 1
|
||||
EMOTE_NAIJALAUGH = 2
|
||||
EMOTE_NAIJASADSIGH = 3
|
||||
EMOTE_NAIJASIGH = 4
|
||||
EMOTE_NAIJAWOW = 5
|
||||
EMOTE_NAIJAUGH = 6
|
||||
EMOTE_NAIJALOW = 7
|
||||
EMOTE_NAIJALI = 8
|
||||
EMOTE_NAIJAEW = 9
|
||||
|
||||
OVERRIDE_NONE = 315
|
||||
|
||||
--actions
|
||||
ACTION_MENULEFT = 6
|
||||
ACTION_MENURIGHT = 7
|
||||
ACTION_MENUUP = 8
|
||||
ACTION_MENUDOWN = 9
|
||||
|
||||
WATCH_QUIT = 1
|
||||
|
||||
-- ingredient effect types
|
||||
IET_NONE = -1
|
||||
IET_HP = 0
|
||||
IET_DEFENSE = 1
|
||||
IET_SPEED = 2
|
||||
IET_RANDOM = 3
|
||||
IET_MAXHP = 4
|
||||
IET_INVINCIBLE = 5
|
||||
IET_TRIP = 6
|
||||
IET_REGEN = 7
|
||||
IET_LI = 8
|
||||
IET_FISHPOISON = 9
|
||||
IET_BITE = 10
|
||||
IET_EAT = 11
|
||||
IET_LIGHT = 12
|
||||
IET_YUM = 13
|
||||
IET_PETPOWER = 14
|
||||
IET_WEB = 15
|
||||
IET_ENERGY = 16
|
||||
IET_POISON = 17
|
||||
IET_BLIND = 18
|
||||
IET_ALLSTATUS = 19
|
||||
IET_MAX = 20
|
||||
|
||||
-- menu pages
|
||||
MENUPAGE_NONE = -1
|
||||
MENUPAGE_SONGS = 0
|
||||
MENUPAGE_FOOD = 1
|
||||
MENUPAGE_TREASURES = 2
|
||||
MENUPAGE_PETS = 3
|
||||
|
||||
-- Entity States
|
||||
STATE_DEAD = 0
|
||||
STATE_IDLE = 1
|
||||
STATE_PUSH = 2
|
||||
STATE_PUSHDELAY = 3
|
||||
STATE_PLANTED = 4
|
||||
STATE_TRANSFORM = 5
|
||||
STATE_PULLED = 6
|
||||
STATE_FOLLOWNAIJA = 7
|
||||
STATE_DEATHSCENE = 8
|
||||
STATE_ATTACK = 9
|
||||
STATE_CHARGE0 = 10
|
||||
STATE_CHARGE1 = 11
|
||||
STATE_CHARGE2 = 12
|
||||
STATE_CHARGE3 = 13
|
||||
STATE_WAIT = 20
|
||||
STATE_HUG = 21
|
||||
STATE_EATING = 22
|
||||
STATE_FOLLOW = 23
|
||||
STATE_TITLE = 24
|
||||
STATE_HATCH = 25
|
||||
STATE_CARRIED = 26
|
||||
|
||||
STATE_HOSTILE = 100
|
||||
|
||||
STATE_CLOSE = 200
|
||||
STATE_OPEN = 201
|
||||
STATE_CLOSED = 202
|
||||
STATE_OPENED = 203
|
||||
STATE_CHARGED = 300
|
||||
STATE_INHOLDER = 301
|
||||
STATE_DISABLED = 302
|
||||
STATE_FLICKER = 303
|
||||
STATE_ACTIVE = 304
|
||||
STATE_USED = 305
|
||||
STATE_BLOATED = 306
|
||||
STATE_DELAY = 307
|
||||
STATE_DONE = 309
|
||||
STATE_RAGE = 310
|
||||
STATE_CALM = 311
|
||||
STATE_DESCEND = 312
|
||||
STATE_SING = 313
|
||||
STATE_TRANSFORM = 314
|
||||
STATE_GROW = 315
|
||||
STATE_MATING = 316
|
||||
STATE_SHRINK = 317
|
||||
STATE_MOVE = 319
|
||||
STATE_TRANSITION = 320
|
||||
STATE_TRANSITION2 = 321
|
||||
STATE_TRAPPEDINCREATOR = 322
|
||||
STATE_GRAB = 323
|
||||
STATE_FIGURE = 324
|
||||
STATE_CUTSCENE = 325
|
||||
STATE_WAITFORCUTSCENE = 326
|
||||
STATE_FIRE = 327
|
||||
STATE_FIRING = 328
|
||||
STATE_PREP = 329
|
||||
STATE_INTRO = 330
|
||||
STATE_PUPPET = 331
|
||||
|
||||
STATE_COLLECT = 400
|
||||
STATE_COLLECTED = 401
|
||||
STATE_COLLECTEDINHOUSE = 402
|
||||
|
||||
|
||||
--STATE_ATTACK = 500
|
||||
STATE_STEP = 501
|
||||
STATE_AWAKEN = 502
|
||||
|
||||
STATE_WEAK = 600
|
||||
STATE_BREAK = 601
|
||||
STATE_BROKEN = 602
|
||||
|
||||
STATE_PULSE = 700
|
||||
STATE_ON = 701
|
||||
STATE_OFF = 702
|
||||
STATE_SEED = 703
|
||||
STATE_PLANTED = 704
|
||||
STATE_SK_RED = 705
|
||||
STATE_SK_GREEN = 706
|
||||
STATE_SK_BLUE = 707
|
||||
STATE_SK_YELLOW = 708
|
||||
STATE_WAITFORKISS = 710
|
||||
STATE_KISS = 711
|
||||
STATE_START = 712
|
||||
STATE_RACE = 714
|
||||
STATE_RESTART = 715
|
||||
STATE_APPEAR = 716
|
||||
|
||||
STATE_MOVETOWEED = 2000
|
||||
STATE_PULLWEED = 2001
|
||||
STATE_DONEWEED = 2002
|
||||
|
||||
ORIENT_NONE = -1
|
||||
ORIENT_LEFT = 0
|
||||
ORIENT_RIGHT = 1
|
||||
ORIENT_UP = 2
|
||||
ORIENT_DOWN = 3
|
||||
ORIENT_HORIZONTAL =4
|
||||
ORIENT_VERTICAL = 5
|
||||
|
||||
-- for entity_isNearObstruction
|
||||
OBSCHECK_RANGE = 0
|
||||
OBSCHECK_4DIR = 1
|
||||
OBSCHECK_DOWN = 2
|
||||
|
||||
EV_WALLOUT = 0
|
||||
EV_WALLTRANS = 1
|
||||
EV_CLAMPING = 2
|
||||
EV_SWITCHCLAMP = 3
|
||||
EV_CLAMPTRANSF = 4
|
||||
EV_MOVEMENT = 5
|
||||
EV_COLLIDE = 6
|
||||
EV_TOUCHDMG = 7
|
||||
EV_FRICTION = 8
|
||||
EV_LOOKAT = 9
|
||||
EV_CRAWLING = 10
|
||||
EV_ENTITYDIED = 11
|
||||
EV_TYPEID = 12
|
||||
EV_COLLIDELEVEL = 13
|
||||
EV_BONELOCKED = 14
|
||||
EV_FLIPTOPATH = 15
|
||||
EV_NOINPUTNOVEL = 16
|
||||
EV_VINEPUSH = 17
|
||||
EV_BEASTBURST = 18
|
||||
EV_MINIMAP = 19
|
||||
EV_SOULSCREAMRADIUS = 20
|
||||
EV_WEBSLOW = 21
|
||||
EV_MAX = 22
|
||||
|
||||
EVT_NONE = 0
|
||||
EVT_THERMALVENT = 1
|
||||
EVT_GLOBEJELLY = 2
|
||||
EVT_CELLWHITE = 3
|
||||
EVT_CELLRED = 4
|
||||
EVT_PET = 5
|
||||
EVT_DARKLISHOT = 6
|
||||
EVT_ROCK = 7
|
||||
EVT_FORESTGODVINE = 8
|
||||
EVT_CONTAINER = 9
|
||||
EVT_PISTOLSHRIMP = 10
|
||||
EVT_GATEWAYMUTANT = 11
|
||||
|
||||
|
||||
-- PATH/node types
|
||||
PATH_NONE = 0
|
||||
PATH_CURRENT = 1
|
||||
PATH_STEAM = 2
|
||||
PATH_LI = 3
|
||||
PATH_SAVEPOINT = 4
|
||||
PATH_WARP = 5
|
||||
PATH_SPIRITPORTAL = 6
|
||||
PATH_BGSFXLOOP = 7
|
||||
PATH_RADARHIDE = 8
|
||||
PATH_COOK = 9
|
||||
PATH_WATERBUBBLE = 10
|
||||
PATH_GEM = 11
|
||||
PATH_SETING = 12
|
||||
PATH_SETENT = 13
|
||||
|
||||
-- Entity Types
|
||||
ET_AVATAR =0
|
||||
ET_ENEMY =1
|
||||
ET_PET =2
|
||||
ET_FLOCK =3
|
||||
ET_NEUTRAL =4
|
||||
ET_INGREDIENT =5
|
||||
|
||||
EP_SOLID =0
|
||||
EP_MOVABLE =1
|
||||
EP_BATTERY =2
|
||||
EP_BLOCKER =3
|
||||
|
||||
-- Entity Behaviors
|
||||
BT_NORMAL =0
|
||||
BT_MOTHER =1
|
||||
BT_ACTIVEPET =2
|
||||
|
||||
-- ACTIVATION TYPES
|
||||
AT_NONE =-1
|
||||
AT_NORMAL =0
|
||||
AT_CLICK =0
|
||||
AT_RANGE =1
|
||||
|
||||
WT_NORMAL = 0
|
||||
WT_SPIRIT = 1
|
||||
|
||||
SPEED_NORMAL = 0
|
||||
SPEED_SLOW = 1
|
||||
SPEED_FAST = 2
|
||||
SPEED_VERYFAST = 3
|
||||
SPEED_MODSLOW = 4
|
||||
SPEED_VERYSLOW = 5
|
||||
SPEED_FAST2 = 6
|
||||
|
||||
BOUNCE_NONE = -1
|
||||
BOUNCE_SIMPLE = 0
|
||||
BOUNCE_REAL = 1
|
||||
|
||||
LOOP_INFINITE = -1
|
||||
LOOP_INF = -1
|
||||
|
||||
LAYER_BODY = 0
|
||||
LAYER_UPPERBODY = 1
|
||||
LAYER_HEAD = 2
|
||||
LAYER_OVERRIDE = 3
|
||||
|
||||
SONG_NONE = -1
|
||||
SONG_HEAL = 0
|
||||
SONG_ENERGYFORM = 1
|
||||
SONG_SONGDOOR1 = 2
|
||||
SONG_SPIRITFORM = 3
|
||||
SONG_BIND = 4
|
||||
SONG_PULL = 4
|
||||
SONG_NATUREFORM = 5
|
||||
SONG_BEASTFORM = 6
|
||||
SONG_SHIELDAURA = 7
|
||||
SONG_SHIELD = 7
|
||||
SONG_SONGDOOR2 = 8
|
||||
SONG_DUALFORM = 9
|
||||
SONG_FISHFORM = 10
|
||||
SONG_LIGHTFORM = 11
|
||||
SONG_SUNFORM = 11
|
||||
SONG_LI = 12
|
||||
SONG_TIME = 13
|
||||
SONG_LANCE = 14
|
||||
SONG_MAP = 15
|
||||
SONG_ANIMA = 16
|
||||
SONG_MAX = 17
|
||||
|
||||
BLEND_DEFAULT = 0
|
||||
BLEND_ADD = 1
|
||||
BLEND_ADDITIVE = 1
|
||||
|
||||
--[[
|
||||
VO_BEGIN = 200
|
||||
FLAG_VO_TITLE = 200
|
||||
FLAG_VO_NAIJACAVE = 201
|
||||
FLAG_VO_SINGING = 202
|
||||
FLAG_VO_MINIMAP = 203
|
||||
FLAG_VO_SPEEDBOOST = 204
|
||||
FLAG_VO_VERSE = 205
|
||||
FLAG_VO_VEDHACAVE = 206
|
||||
FLAG_VO_SHIELDSONG = 207
|
||||
FLAG_VO_VEDHAEXPLORE = 208
|
||||
FLAG_VO_MEMORYCRYSTALS = 209
|
||||
FLAG_VO_SONGCAVEENTER = 210
|
||||
FLAG_VO_SONGDOOR = 211
|
||||
FLAG_VO_SONGCRYSTAL = 212
|
||||
FLAG_VO_ENERGYTEMPLEENTER = 213
|
||||
FLAG_VO_ENERGYFORM = 214
|
||||
FLAG_VO_ENERGYFORMSHOT = 215
|
||||
FLAG_VO_ENERGYFORMCHARGE = 216
|
||||
FLAG_VO_RETURNTONORMALFORM = 217
|
||||
FLAG_VO_ENERGYTEMPLEBOSSOVER = 218
|
||||
]]--
|
||||
|
||||
ENDING_NAIJACAVE = 10
|
||||
ENDING_NAIJACAVEDONE = 11
|
||||
ENDING_SECRETCAVE = 12
|
||||
ENDING_MAINAREA = 13
|
||||
ENDING_DONE = 14
|
||||
|
||||
|
||||
FLAG_SONGCAVECRYSTAL = 20
|
||||
FLAG_TEIRA = 50
|
||||
FLAG_SHARAN = 51
|
||||
FLAG_DRASK = 52
|
||||
FLAG_VEDHA = 53
|
||||
|
||||
FLAG_ENERGYTEMPLE01DOOR = 100
|
||||
FLAG_ENERGYDOOR02 = 101
|
||||
FLAG_ENERGYSLOT01 = 102
|
||||
FLAG_ENERGYSLOT02 = 103
|
||||
FLAG_ENERGYSLOT_MAINAREA = 104
|
||||
FLAG_MAINAREA_ENERGYTEMPLE_ROCK = 105
|
||||
FLAG_ENERGYSLOT_FIRST = 106
|
||||
FLAG_ENERGYDOOR03 = 107
|
||||
FLAG_ENERGYGODENCOUNTER = 108
|
||||
FLAG_ENERGYBOSSDEAD = 109
|
||||
FLAG_MAINAREA_ETENTER2 = 110
|
||||
FLAG_SUNTEMPLE_WATERLEVEL = 111
|
||||
FLAG_SUNTEMPLE_LIGHTCRYSTAL = 112
|
||||
FLAG_SUNKENCITY_PUZZLE = 113
|
||||
FLAG_SUNKENCITY_BOSS = 114
|
||||
FLAG_MITHALAS_THRONEROOM = 115
|
||||
FLAG_BOSS_MITHALA = 116
|
||||
FLAG_BOSS_FOREST = 117
|
||||
FLAG_FISHCAVE = 118
|
||||
FLAG_VISION_VEIL = 119
|
||||
FLAG_MITHALAS_PRIESTS = 120
|
||||
FLAG_FIRSTTRANSTURTLE = 121
|
||||
FLAG_13PROGRESSION = 122
|
||||
FLAG_FINAL = 123
|
||||
FLAG_SPIRIT_ERULIAN = 124
|
||||
FLAG_SPIRIT_KROTITE = 125
|
||||
FLAG_SPIRIT_DRASK = 126
|
||||
FLAG_SPIRIT_DRUNIAD = 127
|
||||
FLAG_BOSS_SUNWORM = 128
|
||||
FLAG_WHALELAMPPUZZLE = 129
|
||||
|
||||
FLAG_TRANSTURTLE_VEIL01 = 130
|
||||
FLAG_TRANSTURTLE_OPENWATER06 = 131
|
||||
FLAG_TRANSTURTLE_FOREST04 = 132
|
||||
FLAG_TRANSTURTLE_OPENWATER03 = 133
|
||||
FLAG_TRANSTURTLE_FOREST05 = 134
|
||||
FLAG_TRANSTURTLE_MAINAREA = 135
|
||||
FLAG_TRANSTURTLE_SEAHORSE = 136
|
||||
FLAG_TRANSTURTLE_VEIL02 = 137
|
||||
FLAG_TRANSTURTLE_ABYSS03 = 138
|
||||
FLAG_TRANSTURTLE_FINALBOSS = 139
|
||||
|
||||
FLAG_NAIJA_SWIM = 200
|
||||
FLAG_NAIJA_MINIMAP = 201
|
||||
FLAG_NAIJA_SPEEDBOOST = 202
|
||||
FLAG_NAIJA_MEMORYCRYSTAL = 203
|
||||
FLAG_NAIJA_SINGING = 204
|
||||
FLAG_NAIJA_LEAVESVEDHA = 205
|
||||
FLAG_NAIJA_SONGDOOR = 206
|
||||
FLAG_NAIJA_ENTERVEDHACAVE = 207
|
||||
FLAG_NAIJA_INTERACT = 208
|
||||
FLAG_NAIJA_ENTERSONGCAVE = 209
|
||||
FLAG_NAIJA_ENERGYFORMSHOT = 210
|
||||
FLAG_NAIJA_ENERGYFORMCHARGE = 211
|
||||
FLAG_NAIJA_RETURNTONORMALFORM = 212
|
||||
FLAG_NAIJA_ENERGYBARRIER = 213
|
||||
FLAG_NAIJA_SOLIDENERGYBARRIER = 214
|
||||
FLAG_NAIJA_ENTERENERGYTEMPLE = 215
|
||||
FLAG_NAIJA_OPENWATERS = 216
|
||||
FLAG_NAIJA_SINGING = 217
|
||||
FLAG_NAIJA_INGAMEMENU = 218
|
||||
FLAG_NAIJA_SINGINGHINT = 219
|
||||
FLAG_NAIJA_LOOK = 220
|
||||
FLAG_HINT_MINIMAP = 221
|
||||
FLAG_HINT_HEALTHPLANT = 222
|
||||
FLAG_HINT_SLEEP = 223
|
||||
FLAG_HINT_COLLECTIBLE = 224
|
||||
FLAG_HINT_IGFDEMO = 225
|
||||
FLAG_HINT_BEASTFORM1 = 226
|
||||
FLAG_HINT_BEASTFORM2 = 227
|
||||
FLAG_HINT_LISONG = 228
|
||||
FLAG_HINT_ENERGYTARGET = 229
|
||||
FLAG_HINT_NATUREFORMABILITY = 230
|
||||
FLAG_HINT_LICOMBAT = 231
|
||||
FLAG_HINT_COOKING = 232
|
||||
FLAG_NAIJA_FIRSTVINE = 233
|
||||
FLAG_SECRET01 = 234
|
||||
FLAG_SECRET02 = 235
|
||||
FLAG_SECRET03 = 236
|
||||
FLAG_DEEPWHALE = 237
|
||||
FLAG_OMPO = 238
|
||||
FLAG_HINT_SINGBULB = 239
|
||||
FLAG_ENDING = 240
|
||||
FLAG_NAIJA_BINDSHELL = 241
|
||||
FLAG_NAIJA_BINDROCK = 242
|
||||
FLAG_HINT_ROLLGEAR = 243
|
||||
FLAG_FIRSTHEALTHUPGRADE = 244
|
||||
FLAG_MAINAREA_TRANSTURTLE_ROCK = 245
|
||||
FLAG_SKIPSECRETCHECK = 246
|
||||
FLAG_SEAHORSEBESTTIME = 247
|
||||
FLAG_SEAHORSETIMETOBEAT = 248
|
||||
|
||||
|
||||
FLAG_CREATORVOICE = 250
|
||||
|
||||
FLAG_HINT_DUALFORMCHANGE = 251
|
||||
FLAG_HINT_DUALFORMCHARGE = 252
|
||||
FLAG_HINT_HEALTHUPGRADE = 253
|
||||
|
||||
FLAG_VISION_ENERGYTEMPLE = 300
|
||||
|
||||
FLAG_COLLECTIBLE_START = 500
|
||||
FLAG_COLLECTIBLE_SONGCAVE = 500
|
||||
FLAG_COLLECTIBLE_ENERGYTEMPLE = 501
|
||||
FLAG_COLLECTIBLE_ENERGYSTATUE = 502
|
||||
FLAG_COLLECTIBLE_ENERGYBOSS = 503
|
||||
FLAG_COLLECTIBLE_NAIJACAVE = 504
|
||||
FLAG_COLLECTIBLE_CRABCOSTUME = 505
|
||||
FLAG_COLLECTIBLE_JELLYPLANT = 506
|
||||
FLAG_COLLECTIBLE_MITHALASPOT = 507
|
||||
FLAG_COLLECTIBLE_SEAHORSECOSTUME = 508
|
||||
--FLAG_COLLECTIBLE_TURTLESHELL = 508
|
||||
FLAG_COLLECTIBLE_CHEST = 509
|
||||
FLAG_COLLECTIBLE_BANNER = 510
|
||||
FLAG_COLLECTIBLE_MITHALADOLL = 511
|
||||
FLAG_COLLECTIBLE_WALKERBABY = 512
|
||||
FLAG_COLLECTIBLE_SEEDBAG = 513
|
||||
FLAG_COLLECTIBLE_ARNASSISTATUE = 514
|
||||
FLAG_COLLECTIBLE_GEAR = 515
|
||||
FLAG_COLLECTIBLE_SUNKEY = 516
|
||||
FLAG_COLLECTIBLE_URCHINCOSTUME = 517
|
||||
FLAG_COLLECTIBLE_TEENCOSTUME = 518
|
||||
FLAG_COLLECTIBLE_MUTANTCOSTUME = 519
|
||||
FLAG_COLLECTIBLE_JELLYCOSTUME = 520
|
||||
FLAG_COLLECTIBLE_MITHALANCOSTUME = 521
|
||||
FLAG_COLLECTIBLE_ANEMONESEED = 522
|
||||
FLAG_COLLECTIBLE_BIOSEED = 523
|
||||
FLAG_COLLECTIBLE_TURTLEEGG = 524
|
||||
FLAG_COLLECTIBLE_SKULL = 525
|
||||
FLAG_COLLECTIBLE_TRIDENTHEAD = 526
|
||||
FLAG_COLLECTIBLE_SPORESEED = 527
|
||||
FLAG_COLLECTIBLE_UPSIDEDOWNSEED = 528
|
||||
FLAG_COLLECTIBLE_STONEHEAD = 529
|
||||
FLAG_COLLECTIBLE_STARFISH = 530
|
||||
FLAG_COLLECTIBLE_BLACKPEARL = 531
|
||||
--FLAG_COLLECTIBLE_BABYCRIB = 532
|
||||
FLAG_COLLECTIBLE_END = 600
|
||||
|
||||
FLAG_PET_ACTIVE = 600
|
||||
FLAG_PET_NAMESTART = 601
|
||||
FLAG_PET_NAUTILUS = 601
|
||||
FLAG_PET_DUMBO = 602
|
||||
FLAG_PET_BLASTER = 603
|
||||
FLAG_PET_PIRANHA = 604
|
||||
|
||||
FLAG_UPGRADE_WOK = 620
|
||||
-- does the player have access to 3 slots all the time?
|
||||
|
||||
FLAG_COLLECTIBLE_NAUTILUSPRIME = 630
|
||||
FLAG_COLLECTIBLE_DUMBOEGG = 631
|
||||
FLAG_COLLECTIBLE_BLASTEREGG = 632
|
||||
FLAG_COLLECTIBLE_PIRANHAEGG = 633
|
||||
|
||||
FLAG_ENTER_HOMEWATERS = 650
|
||||
FLAG_ENTER_SONGCAVE = 651
|
||||
FLAG_ENTER_ENERGYTEMPLE = 652
|
||||
FLAG_ENTER_OPENWATERS = 653
|
||||
FLAG_ENTER_HOMECAVE = 654
|
||||
FLAG_ENTER_FOREST = 655
|
||||
FLAG_ENTER_VEIL = 656
|
||||
FLAG_ENTER_MITHALAS = 657
|
||||
FLAG_ENTER_MERMOGCAVE = 658
|
||||
FLAG_ENTER_MITHALAS = 659
|
||||
FLAG_ENTER_SUNTEMPLE = 660
|
||||
FLAG_ENTER_ABYSS = 661
|
||||
FLAG_ENTER_SUNKENCITY = 662
|
||||
FLAG_ENTER_FORESTSPRITECAVE = 663
|
||||
|
||||
|
||||
FLAG_MINIBOSS_START = 700
|
||||
FLAG_MINIBOSS_NAUTILUSPRIME = 700
|
||||
FLAG_MINIBOSS_KINGJELLY = 701
|
||||
FLAG_MINIBOSS_MERGOG = 702
|
||||
FLAG_MINIBOSS_CRAB = 703
|
||||
FLAG_MINIBOSS_OCTOMUN = 704
|
||||
FLAG_MINIBOSS_END = 800
|
||||
|
||||
FLAG_SONGDOOR1 = 800
|
||||
FLAG_SEALOAFANNOYANCE = 801
|
||||
|
||||
FLAG_SEAL_KING = 900
|
||||
FLAG_SEAL_QUEEN = 901
|
||||
FLAG_SEAL_PRINCE = 902
|
||||
|
||||
FLAG_LI = 1000
|
||||
FLAG_LICOMBAT = 1001
|
||||
|
||||
|
||||
|
||||
MAX_FLAGS = 1024
|
||||
|
||||
ALPHA_NEARZERO = 0.001
|
||||
|
||||
SUNKENCITY_START = 0
|
||||
SUNKENCITY_CLIMBDOWN = 1
|
||||
SUNKENCITY_RUNAWAY = 2
|
||||
SUNKENCITY_INHOLE = 3
|
||||
SUNKENCITY_GF = 4
|
||||
SUNKENCITY_BULLIES = 5
|
||||
SUNKENCITY_ANIMA = 6
|
||||
SUNKENCITY_BOSSWAIT = 7
|
||||
SUNKENCITY_CLAY1 = 8
|
||||
SUNKENCITY_CLAY2 = 9
|
||||
SUNKENCITY_CLAY3 = 10
|
||||
SUNKENCITY_CLAY4 = 11
|
||||
SUNKENCITY_CLAY5 = 12
|
||||
SUNKENCITY_CLAY6 = 13
|
||||
SUNKENCITY_CLAYDONE = 14
|
||||
SUNKENCITY_BOSSFIGHT = 15
|
||||
SUNKENCITY_BOSSDONE = 16
|
||||
SUNKENCITY_FINALTONGUE = 17
|
||||
|
||||
FINAL_START = 0
|
||||
FINAL_SOMETHING = 1
|
||||
FINAL_FREEDLI = 2
|
||||
|
||||
ANIM_NONE = 0
|
||||
ANIM_POS = 1
|
||||
ANIM_ROT = 2
|
||||
ANIM_ALL = 10
|
||||
|
||||
FORM_NORMAL = 0
|
||||
FORM_ENERGY = 1
|
||||
FORM_BEAST = 2
|
||||
FORM_NATURE = 3
|
||||
FORM_SPIRIT = 4
|
||||
FORM_DUAL = 5
|
||||
FORM_FISH = 6
|
||||
FORM_LIGHT = 7
|
||||
FORM_SUN = 7
|
||||
FORM_MAX = 8
|
||||
|
||||
VFX_SHOCK = 0
|
||||
VFX_RIPPLE = 1
|
||||
|
||||
EAT_NONE = -1
|
||||
EAT_DEFAULT = 0
|
||||
EAT_FILE = 1
|
||||
EAT_MAX = 2
|
||||
|
||||
--[[
|
||||
DT_ENEMY = 0
|
||||
DT_ENEMY_ENERGYBLAST = 1
|
||||
DT_ENEMY_SHOCK = 2
|
||||
DT_ENEMY_BITE = 3
|
||||
DT_ENEMY_TRAP = 4
|
||||
DT_ENEMY_WEB = 5
|
||||
DT_ENEMY_BEAM = 6
|
||||
DT_ENEMY_GAS = 100
|
||||
DT_ENEMY_INK = 101
|
||||
DT_ENEMY_POISON = 102
|
||||
DT_ENEMY_ACTIVEPOISON = 103
|
||||
DT_ENEMY_CREATOR = 600
|
||||
DT_AVATAR = 1000
|
||||
DT_AVATAR_ENERGYBLAST = 1001
|
||||
DT_AVATAR_SHOCK = 1002
|
||||
DT_AVATAR_BITE = 1003
|
||||
DT_AVATAR_VOMIT = 1004
|
||||
DT_AVATAR_ACID = 1005
|
||||
DT_AVATAR_SPORECHILD = 1006
|
||||
DT_AVATAR_LIZAP = 1007
|
||||
DT_AVATAR_NATURE = 1008
|
||||
DT_AVATAR_ENERGYROLL = 1009
|
||||
DT_AVATAR_VINE = 1010
|
||||
DT_AVATAR_EAT = 1011
|
||||
DT_AVATAR_EAT_BASICSHOT = 1011
|
||||
DT_AVATAR_EAT_MAX = 1012
|
||||
DT_AVATAR_LANCEATTACH = 1013
|
||||
DT_AVATAR_LANCE = 1014
|
||||
DT_AVATAR_CREATORSHOT = 1015
|
||||
DT_AVATAR_DUALFORMLI = 1016
|
||||
DT_AVATAR_DUALFORMNAIJA = 1017
|
||||
DT_AVATAR_BUBBLE = 1018
|
||||
DT_AVATAR_SEED = 1019
|
||||
DT_AVATAR_PETNAUTILUS = 1020
|
||||
|
||||
DT_AVATAR_END = 2000
|
||||
DT_TOUCH = 2000
|
||||
DT_CRUSH = 2001
|
||||
DT_SPIKES = 2002
|
||||
]]--
|
||||
|
||||
DT_NONE = -1
|
||||
DT_ENEMY = 0
|
||||
DT_ENEMY_ENERGYBLAST = 1
|
||||
DT_ENEMY_SHOCK = 2
|
||||
DT_ENEMY_BITE = 3
|
||||
DT_ENEMY_TRAP = 4
|
||||
DT_ENEMY_WEB = 5
|
||||
DT_ENEMY_BEAM = 6
|
||||
DT_ENEMY_GAS = 7
|
||||
DT_ENEMY_INK = 8
|
||||
DT_ENEMY_POISON = 9
|
||||
DT_ENEMY_ACTIVEPOISON = 10
|
||||
DT_ENEMY_CREATOR = 11
|
||||
DT_ENEMY_MANTISBOMB = 12
|
||||
DT_ENEMY_MAX = 13
|
||||
DT_ENEMY_END = 13
|
||||
|
||||
DT_AVATAR = 1000
|
||||
DT_AVATAR_ENERGYBLAST = 1001
|
||||
DT_AVATAR_SHOCK = 1002
|
||||
DT_AVATAR_BITE = 1003
|
||||
DT_AVATAR_VOMIT = 1004
|
||||
DT_AVATAR_ACID = 1005
|
||||
DT_AVATAR_SPORECHILD = 1006
|
||||
DT_AVATAR_LIZAP = 1007
|
||||
DT_AVATAR_NATURE = 1008
|
||||
DT_AVATAR_ENERGYROLL = 1009
|
||||
DT_AVATAR_VINE = 1010
|
||||
DT_AVATAR_EAT = 1011
|
||||
DT_AVATAR_EAT_BASICSHOT = 1011
|
||||
DT_AVATAR_EAT_MAX = 1012
|
||||
DT_AVATAR_LANCEATTACH = 1013
|
||||
DT_AVATAR_LANCE = 1014
|
||||
DT_AVATAR_CREATORSHOT = 1015
|
||||
DT_AVATAR_DUALFORMLI = 1016
|
||||
DT_AVATAR_DUALFORMNAIJA = 1017
|
||||
DT_AVATAR_BUBBLE = 1018
|
||||
DT_AVATAR_SEED = 1019
|
||||
DT_AVATAR_PET = 1020
|
||||
DT_AVATAR_PETNAUTILUS = 1021
|
||||
DT_AVATAR_PETBITE = 1022
|
||||
DT_AVATAR_MAX = 1030
|
||||
DT_AVATAR_END = 1030
|
||||
|
||||
DT_TOUCH = 1031
|
||||
DT_CRUSH = 1032
|
||||
DT_SPIKES = 1033
|
||||
DT_STEAM = 1034
|
||||
|
||||
|
||||
-- collide radius
|
||||
-- must match value in ScriptedEntity::setupConversationEntity
|
||||
CR_DEFAULT = 40
|
||||
|
||||
FRAME_TIME = 0.04
|
||||
|
||||
FORMUPGRADE_ENERGY1 = 0
|
||||
FORMUPGRADE_ENERGY2 = 1
|
||||
FORMUPGRADE_BEAST = 2
|
||||
|
||||
|
||||
TILE_SIZE = 20
|
||||
|
||||
function watchForVoice()
|
||||
while isStreamingVoice() do watch(FRAME_TIME) end
|
||||
end
|
||||
|
||||
function entity_watchSwimToEntitySide(ent1, ent2)
|
||||
local xoff=entity_getCollideRadius(ent2)+64
|
||||
if entity_x(ent1) < entity_x(ent2) then
|
||||
xoff = -xoff
|
||||
end
|
||||
entity_swimToPosition(ent1, entity_x(ent2)+xoff, entity_y(ent2))
|
||||
entity_watchForPath(ent1)
|
||||
entity_idle(ent1)
|
||||
entity_clearVel(ent1)
|
||||
entity_flipToEntity(ent1, ent2)
|
||||
entity_flipToEntity(ent2, ent1)
|
||||
end
|
200
game_scripts/_mods/guert_mod/tempo/jelly.lua
Normal file
200
game_scripts/_mods/guert_mod/tempo/jelly.lua
Normal file
|
@ -0,0 +1,200 @@
|
|||
-- Copyright (C) 2007, 2010 - Bit-Blot
|
||||
--
|
||||
-- This file is part of Aquaria.
|
||||
--
|
||||
-- Aquaria is free software; you can redistribute it and/or
|
||||
-- modify it under the terms of the GNU General Public License
|
||||
-- as published by the Free Software Foundation; either version 2
|
||||
-- of the License, or (at your option) any later version.
|
||||
--
|
||||
-- This program is distributed in the hope that it will be useful,
|
||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
--
|
||||
-- See the GNU General Public License for more details.
|
||||
--
|
||||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program; if not, write to the Free Software
|
||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
if not v then v = {} end
|
||||
if not AQUARIA_VERSION then dofile("scripts/entities/entityinclude.lua") end
|
||||
|
||||
-- ================================================================================================
|
||||
-- J E L L Y - Original Flavour
|
||||
-- ================================================================================================
|
||||
|
||||
-- ================================================================================================
|
||||
-- S T A T E S
|
||||
-- ================================================================================================
|
||||
|
||||
local MOVE_STATE_UP = 0
|
||||
local MOVE_STATE_DOWN = 1
|
||||
|
||||
-- ================================================================================================
|
||||
-- L O C A L V A R I A B L E S
|
||||
-- ================================================================================================
|
||||
|
||||
v.blupTimer = 0
|
||||
v.dirTimer = 0
|
||||
v.blupTime = 3.0
|
||||
|
||||
-- ================================================================================================
|
||||
-- F U N C T I O N S
|
||||
-- ================================================================================================
|
||||
|
||||
v.sz = 1.0
|
||||
v.dir = 0
|
||||
|
||||
v.moveState = 0
|
||||
v.moveTimer = 0
|
||||
v.velx = 0
|
||||
|
||||
v.soundDelay = 0
|
||||
|
||||
local function doIdleScale(me)
|
||||
entity_scale(me, 1.0*v.sz, 0.75*v.sz, v.blupTime, -1, 1, 1)
|
||||
end
|
||||
|
||||
function init(me)
|
||||
setupBasicEntity(
|
||||
me,
|
||||
"Jelly", -- texture
|
||||
4, -- health
|
||||
2, -- manaballamount
|
||||
2, -- exp
|
||||
10, -- money
|
||||
32, -- collideRadius (for hitting entities + spells)
|
||||
STATE_IDLE, -- initState
|
||||
128, -- sprite width
|
||||
128, -- sprite height
|
||||
1, -- particle "explosion" type, 0 = none
|
||||
0, -- 0/1 hit other entities off/on (uses collideRadius)
|
||||
4000, -- updateCull -1: disabled, default: 4000
|
||||
1
|
||||
)
|
||||
|
||||
entity_setEntityType(me, ET_ENEMY)
|
||||
|
||||
entity_setDeathParticleEffect(me, "PurpleExplode")
|
||||
entity_setDropChance(me, 100)
|
||||
entity_setEatType(me, EAT_FILE, "Jelly")
|
||||
|
||||
entity_initHair(me, 40, 5, 40, "JellyTentacles")
|
||||
|
||||
entity_scale(me, 0.75*v.sz, 1*v.sz)
|
||||
doIdleScale(me)
|
||||
|
||||
entity_exertHairForce(me, 0, 400, 1)
|
||||
|
||||
entity_setState(me, STATE_IDLE)
|
||||
end
|
||||
|
||||
function update(me, dt)
|
||||
dt = dt * 1.5
|
||||
if avatar_isBursting() or entity_getRiding(getNaija())~=0 then
|
||||
local e = entity_getRiding(getNaija())
|
||||
if entity_touchAvatarDamage(me, 32, 0, 400) then
|
||||
if e~=0 then
|
||||
local x,y = entity_getVectorToEntity(me, e)
|
||||
x,y = vector_setLength(x, y, 500)
|
||||
entity_addVel(e, x, y)
|
||||
end
|
||||
local len = 500
|
||||
local x,y = entity_getVectorToEntity(getNaija(), me)
|
||||
x,y = vector_setLength(x, y, len)
|
||||
entity_push(me, x, y, 0.2, len, 0)
|
||||
entity_sound(me, "JellyBlup", 800)
|
||||
end
|
||||
else
|
||||
if entity_touchAvatarDamage(me, 32, 0, 1000) then
|
||||
entity_sound(me, "JellyBlup", 800)
|
||||
end
|
||||
end
|
||||
entity_handleShotCollisions(me)
|
||||
v.sx,v.sy = entity_getScale(me)
|
||||
|
||||
|
||||
-- Quick HACK to handle getting bumped out of the water. --achurch
|
||||
if not entity_isUnderWater(me) then
|
||||
v.moveState = MOVE_STATE_DOWN
|
||||
v.moveTimer = 5 + math.random(200)/100.0 + math.random(3)
|
||||
entity_setMaxSpeed(me, 500)
|
||||
entity_setMaxSpeedLerp(me, 1, 0)
|
||||
entity_addVel(me, 0, 500*dt)
|
||||
entity_updateMovement(me, dt)
|
||||
entity_setHairHeadPosition(me, entity_x(me), entity_y(me))
|
||||
entity_updateHair(me, dt)
|
||||
return
|
||||
elseif not entity_isState(me, STATE_PUSH) then
|
||||
entity_setMaxSpeed(me, 50)
|
||||
end
|
||||
|
||||
v.moveTimer = v.moveTimer - dt
|
||||
if v.moveTimer < 0 then
|
||||
if v.moveState == MOVE_STATE_DOWN then
|
||||
v.moveState = MOVE_STATE_UP
|
||||
entity_setMaxSpeedLerp(me, 1.5, 0.2)
|
||||
entity_scale(me, 0.75, 1, 1, 1, 1)
|
||||
v.moveTimer = 3 + math.random(200)/100.0
|
||||
entity_sound(me, "JellyBlup")
|
||||
elseif v.moveState == MOVE_STATE_UP then
|
||||
v.velx = math.random(400)+100
|
||||
if math.random(2) == 1 then
|
||||
v.velx = -v.velx
|
||||
end
|
||||
v.moveState = MOVE_STATE_DOWN
|
||||
doIdleScale(me)
|
||||
entity_setMaxSpeedLerp(me, 1, 1)
|
||||
v.moveTimer = 5 + math.random(200)/100.0 + math.random(3)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
if v.moveState == MOVE_STATE_UP then
|
||||
entity_addVel(me, v.velx*dt, -600*dt)
|
||||
entity_rotateToVel(me, 1)
|
||||
|
||||
elseif v.moveState == MOVE_STATE_DOWN then
|
||||
entity_addVel(me, 0, 50*dt)
|
||||
entity_rotateTo(me, 0, 3)
|
||||
|
||||
entity_exertHairForce(me, 0, 200, dt*0.6, -1)
|
||||
end
|
||||
|
||||
|
||||
entity_doEntityAvoidance(me, dt, 32, 1.0)
|
||||
entity_doCollisionAvoidance(me, 1.0, 8, 1.0)
|
||||
entity_updateCurrents(me, dt)
|
||||
entity_updateMovement(me, dt)
|
||||
|
||||
entity_setHairHeadPosition(me, entity_x(me), entity_y(me))
|
||||
entity_updateHair(me, dt)
|
||||
|
||||
end
|
||||
|
||||
function hitSurface(me)
|
||||
end
|
||||
|
||||
function dieNormal(me)
|
||||
if chance(25) then
|
||||
spawnIngredient("JellyOil", entity_x(me), entity_y(me))
|
||||
end
|
||||
end
|
||||
|
||||
function enterState(me)
|
||||
if entity_isState(me, STATE_IDLE) then
|
||||
entity_setMaxSpeed(me, 50)
|
||||
elseif entity_isState(me, STATE_DEAD) then
|
||||
end
|
||||
end
|
||||
|
||||
function damage(me, attacker, bone, damageType, dmg)
|
||||
if damageType == DT_AVATAR_BITE then
|
||||
entity_changeHealth(me, -dmg)
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
function exitState(me)
|
||||
end
|
227
game_scripts/_mods/guert_mod/tempo/jellysmall.lua
Normal file
227
game_scripts/_mods/guert_mod/tempo/jellysmall.lua
Normal file
|
@ -0,0 +1,227 @@
|
|||
-- Copyright (C) 2007, 2010 - Bit-Blot
|
||||
--
|
||||
-- This file is part of Aquaria.
|
||||
--
|
||||
-- Aquaria is free software; you can redistribute it and/or
|
||||
-- modify it under the terms of the GNU General Public License
|
||||
-- as published by the Free Software Foundation; either version 2
|
||||
-- of the License, or (at your option) any later version.
|
||||
--
|
||||
-- This program is distributed in the hope that it will be useful,
|
||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
--
|
||||
-- See the GNU General Public License for more details.
|
||||
--
|
||||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program; if not, write to the Free Software
|
||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
if not v then v = {} end
|
||||
if not AQUARIA_VERSION then dofile("scripts/entities/entityinclude.lua") end
|
||||
|
||||
-- ================================================================================================
|
||||
-- JELLY SMALL
|
||||
-- ================================================================================================
|
||||
|
||||
|
||||
-- ================================================================================================
|
||||
-- L O C A L V A R I A B L E S
|
||||
-- ================================================================================================
|
||||
|
||||
v.glow = 0
|
||||
v.bulb = 0
|
||||
v.revertTimer = 0
|
||||
v.baseSpeed = 150
|
||||
v.excitedSpeed = 300
|
||||
v.runSpeed = 600
|
||||
v.useMaxSpeed = 0
|
||||
v.pushed = false
|
||||
v.shell = 0
|
||||
v.soundDelay = 0
|
||||
v.sx = 0
|
||||
v.sy = 0
|
||||
v.sz = 0.8
|
||||
v.transition = false
|
||||
|
||||
-- ================================================================================================
|
||||
-- FUNCTIONS
|
||||
-- ================================================================================================
|
||||
|
||||
local function doIdleScale(me)
|
||||
entity_scale(me, 0.75*v.sz, 1*v.sz)
|
||||
entity_scale(me, 1*v.sz, 0.75*v.sz, 1.5, -1, 1, 1)
|
||||
end
|
||||
|
||||
function init(me)
|
||||
setupBasicEntity(
|
||||
me,
|
||||
"", -- texture
|
||||
3, -- health
|
||||
2, -- manaballamount
|
||||
2, -- exp
|
||||
10, -- money
|
||||
16, -- collideRadius (for hitting entities + spells)
|
||||
STATE_IDLE, -- initState
|
||||
128, -- sprite width
|
||||
128, -- sprite height
|
||||
1, -- particle "explosion" type, 0 = none
|
||||
0, -- 0/1 hit other entities off/on (uses collideRadius)
|
||||
4000, -- updateCull -1: disabled, default: 4000
|
||||
1
|
||||
)
|
||||
|
||||
|
||||
entity_setDeathParticleEffect(me, "TinyGreenExplode")
|
||||
v.useMaxSpeed = v.baseSpeed
|
||||
entity_setEntityType(me, ET_ENEMY)
|
||||
|
||||
entity_initSkeletal(me, "JellySmall")
|
||||
|
||||
--entity_scale(me, 0.6, 0.6)
|
||||
|
||||
entity_setState(me, STATE_IDLE)
|
||||
--entity_setDropChance(me, 75)
|
||||
|
||||
entity_initStrands(me, 5, 16, 8, 5, 0.8, 0.8, 1)
|
||||
|
||||
v.glow = entity_getBoneByName(me, "Glow")
|
||||
v.bulb = entity_getBoneByName(me, "Bulb")
|
||||
v.shell = entity_getBoneByName(me, "Shell")
|
||||
|
||||
doIdleScale(me)
|
||||
v.soundDelay = math.random(3)
|
||||
v.sx, v.sy = entity_getScale(me)
|
||||
|
||||
entity_setDamageTarget(me, DT_AVATAR_LIZAP, false)
|
||||
end
|
||||
|
||||
function songNote(me, note)
|
||||
if getForm()~=FORM_NORMAL then
|
||||
return
|
||||
end
|
||||
|
||||
--[[
|
||||
v.sx, v.sy = entity_getScale(me)
|
||||
entity_scale(me, v.sx, v.sy)
|
||||
v.sx = v.sx*1.1
|
||||
v.sy = v.sy*1.1
|
||||
if v.sx > 1.0 then
|
||||
v.sx = 1.0
|
||||
end
|
||||
if v.sy > 1.0 then
|
||||
v.sy = 1.0
|
||||
end
|
||||
entity_scale(me, v.sx, v.sy, 0.2, 1, -1)
|
||||
]]--
|
||||
|
||||
--[[
|
||||
entity_setWidth(me, 128)
|
||||
entity_setHeight(me, 128)
|
||||
entity_setWidth(me, 512, 0.5, 1, -1)
|
||||
entity_setHeight(me, 512, 0.5, 1, -1)
|
||||
]]--
|
||||
|
||||
bone_scale(v.shell, 1,1)
|
||||
bone_scale(v.shell, 1.1, 1.1, 0.1, 1, -1)
|
||||
|
||||
entity_setMaxSpeed(me, v.excitedSpeed)
|
||||
v.revertTimer = 3
|
||||
local transTime = 0.5
|
||||
local r,g,b = getNoteColor(note)
|
||||
bone_setColor(v.bulb, r,g,b, transTime)
|
||||
r = (r+1.0)/2.0
|
||||
g = (g+1.0)/2.0
|
||||
b = (b+1.0)/2.0
|
||||
bone_setColor(v.shell, r,g,b, transTime)
|
||||
end
|
||||
|
||||
function update(me, dt)
|
||||
if entity_isState(me, STATE_IDLE) and not v.transition and not entity_isScaling(me) then
|
||||
entity_scale(me, 0.75*v.sz, 1*v.sz, 0.2)
|
||||
v.transition = true
|
||||
end
|
||||
if v.transition then
|
||||
if not entity_isScaling(me) then
|
||||
doIdleScale(me)
|
||||
v.transition = false
|
||||
end
|
||||
end
|
||||
entity_handleShotCollisions(me)
|
||||
entity_findTarget(me, 1024)
|
||||
if not entity_hasTarget(me) then
|
||||
--entity_doCollisionAvoidance(me, dt, 4, 0.1)
|
||||
end
|
||||
|
||||
if v.revertTimer > 0 then
|
||||
v.soundDelay = v.soundDelay - dt
|
||||
if v.soundDelay < 0 then
|
||||
entity_sound(me, "JellyBlup", 1400+math.random(200))
|
||||
v.soundDelay = 4 + math.random(2000)/1000.0
|
||||
end
|
||||
v.revertTimer = v.revertTimer - dt
|
||||
if v.revertTimer < 0 then
|
||||
v.useMaxSpeed = v.baseSpeed
|
||||
entity_setMaxSpeed(me, v.baseSpeed)
|
||||
bone_setColor(v.shell, 1, 1, 1, 1)
|
||||
end
|
||||
end
|
||||
if entity_hasTarget(me) then
|
||||
if entity_isUnderWater(entity_getTarget(me)) then
|
||||
if getForm()==FORM_NORMAL then
|
||||
-- do something
|
||||
if entity_isTargetInRange(me, 1000) then
|
||||
if not entity_isTargetInRange(me, 64) then
|
||||
entity_moveTowardsTarget(me, dt, 250)
|
||||
end
|
||||
end
|
||||
else
|
||||
if entity_isTargetInRange(me, 512) then
|
||||
--entity_setMaxSpeed(me, 600)
|
||||
entity_setMaxSpeed(me, v.runSpeed)
|
||||
v.useMaxSpeed = v.runSpeed
|
||||
v.revertTimer = 0.1
|
||||
entity_moveTowardsTarget(me, dt, -250)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--if not entity_isTargetInRange(me, 150) then
|
||||
|
||||
--end
|
||||
end
|
||||
|
||||
entity_doCollisionAvoidance(me, dt, 3, 1.0)
|
||||
entity_doEntityAvoidance(me, dt, 64, 0.2)
|
||||
entity_doSpellAvoidance(me, dt, 200, 0.8)
|
||||
|
||||
entity_updateCurrents(me, dt*5)
|
||||
|
||||
entity_rotateToVel(me, 0.1)
|
||||
entity_updateMovement(me, dt)
|
||||
end
|
||||
|
||||
function hitSurface(me)
|
||||
end
|
||||
|
||||
function enterState(me)
|
||||
if entity_isState(me, STATE_IDLE) then
|
||||
v.useMaxSpeed = v.baseSpeed
|
||||
entity_setMaxSpeed(me, v.baseSpeed)
|
||||
entity_animate(me, "idle", LOOP_INF)
|
||||
|
||||
local x = math.random(2000)-1000
|
||||
local y = math.random(2000)-1000
|
||||
entity_addVel(me,x,y)
|
||||
end
|
||||
end
|
||||
|
||||
function damage(me, attacker, bone, damageType, dmg)
|
||||
if damageType == DT_AVATAR_BITE then
|
||||
entity_setHealth(me, 0)
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
function exitState(me)
|
||||
end
|
240
game_scripts/_mods/guert_mod/tempo/nauplius.lua
Normal file
240
game_scripts/_mods/guert_mod/tempo/nauplius.lua
Normal file
|
@ -0,0 +1,240 @@
|
|||
-- Copyright (C) 2007, 2010 - Bit-Blot
|
||||
--
|
||||
-- This file is part of Aquaria.
|
||||
--
|
||||
-- Aquaria is free software; you can redistribute it and/or
|
||||
-- modify it under the terms of the GNU General Public License
|
||||
-- as published by the Free Software Foundation; either version 2
|
||||
-- of the License, or (at your option) any later version.
|
||||
--
|
||||
-- This program is distributed in the hope that it will be useful,
|
||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
--
|
||||
-- See the GNU General Public License for more details.
|
||||
--
|
||||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program; if not, write to the Free Software
|
||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
if not v then v = {} end
|
||||
if not AQUARIA_VERSION then dofile("scripts/entities/entityinclude.lua") end
|
||||
|
||||
-- ================================================================================================
|
||||
-- N A U P L I U S
|
||||
-- ================================================================================================
|
||||
|
||||
-- ================================================================================================
|
||||
-- S T A T E S
|
||||
-- ================================================================================================
|
||||
|
||||
local MOVE_STATE_UP = 0
|
||||
local MOVE_STATE_DOWN = 1
|
||||
|
||||
-- ================================================================================================
|
||||
-- L O C A L V A R I A B L E S
|
||||
-- ================================================================================================
|
||||
|
||||
v.blupTimer = 0
|
||||
v.dirTimer = 0
|
||||
v.blupTime = 3.0
|
||||
|
||||
v.fireDelay = 2
|
||||
v.moveTimer = 0
|
||||
v.maxShots = 3
|
||||
v.lastShot = v.maxShots
|
||||
|
||||
-- ================================================================================================
|
||||
-- F U N C T I O N S
|
||||
-- ================================================================================================
|
||||
|
||||
v.sz = 1.0
|
||||
v.dir = 0
|
||||
|
||||
v.moveState = 0
|
||||
v.moveTimer = 0
|
||||
v.velx = 0
|
||||
|
||||
v.soundDelay = 0
|
||||
|
||||
v.dir = ORIENT_UP
|
||||
|
||||
local function doIdleScale(me)
|
||||
entity_scale(me, 1.0*v.sz, 0.80*v.sz, v.blupTime, -1, 1, 1)
|
||||
end
|
||||
|
||||
function init(me)
|
||||
setupBasicEntity(
|
||||
me,
|
||||
"nauplius", -- texture
|
||||
4, -- health
|
||||
2, -- manaballamount
|
||||
2, -- exp
|
||||
10, -- money
|
||||
32, -- collideRadius (for hitting entities + spells)
|
||||
STATE_IDLE, -- initState
|
||||
128, -- sprite width
|
||||
128, -- sprite height
|
||||
1, -- particle "explosion" type, 0 = none
|
||||
0, -- 0/1 hit other entities off/on (uses collideRadius)
|
||||
4000, -- updateCull -1: disabled, default: 4000
|
||||
1
|
||||
)
|
||||
|
||||
entity_setEntityType(me, ET_ENEMY)
|
||||
|
||||
entity_setDeathParticleEffect(me, "PurpleExplode")
|
||||
entity_setDropChance(me, 5)
|
||||
entity_setEatType(me, EAT_FILE, "Jelly")
|
||||
|
||||
entity_initHair(me, 40, 5, 30, "nauplius-tentacles")
|
||||
|
||||
entity_scale(me, 0.75*v.sz, 1*v.sz)
|
||||
doIdleScale(me)
|
||||
|
||||
entity_exertHairForce(me, 0, 400, 1)
|
||||
|
||||
entity_setState(me, STATE_IDLE)
|
||||
end
|
||||
|
||||
function update(me, dt)
|
||||
dt = dt * 1.5
|
||||
if avatar_isBursting() or entity_getRiding(getNaija())~=0 then
|
||||
local e = entity_getRiding(getNaija())
|
||||
if entity_touchAvatarDamage(me, 32, 0, 400) then
|
||||
if e~=0 then
|
||||
local x,y = entity_getVectorToEntity(me, e)
|
||||
x,y = vector_setLength(x, y, 500)
|
||||
entity_addVel(e, x, y)
|
||||
end
|
||||
local len = 500
|
||||
local x,y = entity_getVectorToEntity(getNaija(), me)
|
||||
x,y = vector_setLength(x, y, len)
|
||||
entity_push(me, x, y, 0.2, len, 0)
|
||||
entity_sound(me, "JellyBlup", 800)
|
||||
end
|
||||
else
|
||||
if entity_touchAvatarDamage(me, 32, 0, 1000) then
|
||||
entity_sound(me, "JellyBlup", 800)
|
||||
end
|
||||
end
|
||||
entity_handleShotCollisions(me)
|
||||
v.sx,v.sy = entity_getScale(me)
|
||||
|
||||
|
||||
-- Quick HACK to handle getting bumped out of the water. --achurch
|
||||
if not entity_isUnderWater(me) then
|
||||
v.moveState = MOVE_STATE_DOWN
|
||||
v.moveTimer = 5 + math.random(200)/100.0 + math.random(3)
|
||||
entity_setMaxSpeed(me, 500)
|
||||
entity_setMaxSpeedLerp(me, 1, 0)
|
||||
entity_addVel(me, 0, 500*dt)
|
||||
entity_updateMovement(me, dt)
|
||||
entity_setHairHeadPosition(me, entity_x(me), entity_y(me))
|
||||
entity_updateHair(me, dt)
|
||||
return
|
||||
elseif not entity_isState(me, STATE_PUSH) then
|
||||
entity_setMaxSpeed(me, 50)
|
||||
end
|
||||
|
||||
v.moveTimer = v.moveTimer - dt
|
||||
if v.moveTimer < 0 then
|
||||
if v.moveState == MOVE_STATE_DOWN then
|
||||
v.moveState = MOVE_STATE_UP
|
||||
v.fireDelay = 0.5
|
||||
entity_setMaxSpeedLerp(me, 1.5, 0.2)
|
||||
entity_scale(me, 0.80, 1, 1, 1, 1)
|
||||
v.moveTimer = 3 + math.random(200)/100.0
|
||||
entity_sound(me, "JellyBlup")
|
||||
elseif v.moveState == MOVE_STATE_UP then
|
||||
v.moveState = MOVE_STATE_DOWN
|
||||
doIdleScale(me)
|
||||
entity_setMaxSpeedLerp(me, 1, 1)
|
||||
v.moveTimer = math.random(4) + math.random(200)/100.0
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
if v.moveState == MOVE_STATE_UP then
|
||||
|
||||
if v.dir == ORIENT_UP then
|
||||
entity_addVel(me, 0, -4000*dt)
|
||||
if isObstructed(entity_x(me), entity_y(me)-40) then
|
||||
v.dir = ORIENT_DOWN
|
||||
end
|
||||
elseif v.dir == ORIENT_DOWN then
|
||||
entity_addVel(me, 0, 4000*dt)
|
||||
if isObstructed(entity_x(me), entity_y(me)+40) then
|
||||
v.dir = ORIENT_UP
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
--entity_rotateToVel(me, 1)
|
||||
|
||||
if not(entity_hasTarget(me)) then
|
||||
entity_findTarget(me, 1200)
|
||||
else
|
||||
if v.fireDelay > 0 then
|
||||
v.fireDelay = v.fireDelay - dt
|
||||
if v.fireDelay < 0 then
|
||||
spawnParticleEffect("ArmaShot", entity_x(me), entity_y(me) - 80)
|
||||
local s = createShot("Raspberry", me, entity_getTarget(me), entity_x(me), entity_y(me) - 20)
|
||||
shot_setAimVector(s, entity_getNormal(me))
|
||||
shot_setOut(s, 64)
|
||||
|
||||
if v.lastShot <= 1 then
|
||||
v.fireDelay = 4
|
||||
v.lastShot = v.maxShots
|
||||
else
|
||||
v.fireDelay = 0.5
|
||||
v.lastShot = v.lastShot - 1
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
elseif v.moveState == MOVE_STATE_DOWN then
|
||||
entity_addVel(me, 0, 50*dt)
|
||||
--entity_rotateTo(me, 0, 3)
|
||||
|
||||
entity_exertHairForce(me, 0, 200, dt*0.6, -1)
|
||||
end
|
||||
|
||||
|
||||
entity_doEntityAvoidance(me, dt, 32, 1.0)
|
||||
entity_doCollisionAvoidance(me, 1.0, 8, 1.0)
|
||||
entity_updateCurrents(me, dt)
|
||||
entity_updateMovement(me, dt)
|
||||
|
||||
entity_setHairHeadPosition(me, entity_x(me), entity_y(me))
|
||||
entity_updateHair(me, dt)
|
||||
|
||||
end
|
||||
|
||||
function hitSurface(me)
|
||||
end
|
||||
|
||||
function dieNormal(me)
|
||||
end
|
||||
|
||||
function enterState(me)
|
||||
if entity_isState(me, STATE_IDLE) then
|
||||
entity_setMaxSpeed(me, 50)
|
||||
elseif entity_isState(me, STATE_DEAD) then
|
||||
end
|
||||
end
|
||||
|
||||
function damage(me, attacker, bone, damageType, dmg)
|
||||
if entity_isName(attacker, "Nauplius") then
|
||||
return false
|
||||
end
|
||||
|
||||
if damageType == DT_AVATAR_BITE then
|
||||
entity_changeHealth(me, -dmg)
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
function exitState(me)
|
||||
end
|
148
game_scripts/_mods/guert_mod/tempo/nautilus.lua
Normal file
148
game_scripts/_mods/guert_mod/tempo/nautilus.lua
Normal file
|
@ -0,0 +1,148 @@
|
|||
-- Copyright (C) 2007, 2010 - Bit-Blot
|
||||
--
|
||||
-- This file is part of Aquaria.
|
||||
--
|
||||
-- Aquaria is free software; you can redistribute it and/or
|
||||
-- modify it under the terms of the GNU General Public License
|
||||
-- as published by the Free Software Foundation; either version 2
|
||||
-- of the License, or (at your option) any later version.
|
||||
--
|
||||
-- This program is distributed in the hope that it will be useful,
|
||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
--
|
||||
-- See the GNU General Public License for more details.
|
||||
--
|
||||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program; if not, write to the Free Software
|
||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
if not v then v = {} end
|
||||
if not AQUARIA_VERSION then dofile("scripts/entities/entityinclude.lua") end
|
||||
|
||||
-- N A U T I L U S
|
||||
|
||||
-- entity specific
|
||||
local STATE_ATTACKPREP = 1000
|
||||
local STATE_ATTACK = 1001
|
||||
|
||||
v.lungeDelay = 0 -- prevents the nautilus from lunging over and over
|
||||
-- initializes the entity
|
||||
function init(me)
|
||||
setupBasicEntity(
|
||||
me,
|
||||
"Nautilus", -- texture
|
||||
4, -- health
|
||||
1, -- manaballamount
|
||||
1, -- exp
|
||||
1, -- money
|
||||
32, -- collideRadius (only used if hit entities is on)
|
||||
STATE_IDLE, -- initState
|
||||
90, -- sprite width
|
||||
90, -- sprite height
|
||||
1, -- particle "explosion" type, maps to particleEffects.txt -1 = none
|
||||
0, -- 0/1 hit other entities off/on (uses collideRadius)
|
||||
-1, -- updateCull -1: disabled, default: 4000
|
||||
1
|
||||
)
|
||||
|
||||
entity_setDeathParticleEffect(me, "TinyBlueExplode")
|
||||
|
||||
entity_setDropChance(me, 5, 1)
|
||||
|
||||
entity_rotate(me, 360, 1, LOOP_INF) -- make the nautilus spin 360 degrees endlessly over 1 second
|
||||
v.lungeDelay = 1.0 -- prevent the nautilus from attacking right away
|
||||
loadSound("Nautilus")
|
||||
end
|
||||
|
||||
-- the entity's main update function
|
||||
function update(me, dt)
|
||||
-- in any state: if we have a target and we're close enough, hurt the target and move back
|
||||
-- in idle state only
|
||||
if entity_getState(me)==STATE_IDLE then
|
||||
-- count down the lungeDelay timer to 0
|
||||
if v.lungeDelay > 0 then v.lungeDelay = v.lungeDelay - dt if v.lungeDelay < 0 then v.lungeDelay = 0 end end
|
||||
|
||||
-- if we don't have a target, find one
|
||||
if not entity_hasTarget(me) then
|
||||
entity_findTarget(me, 1000)
|
||||
else
|
||||
if entity_isTargetInRange(me, 1600) then
|
||||
if entity_isTargetInRange(me, 200) then
|
||||
entity_moveTowardsTarget(me, dt, -500) -- if we're too close, move away
|
||||
else
|
||||
entity_moveTowardsTarget(me, dt, 1000) -- move in if we're too far away
|
||||
end
|
||||
end
|
||||
|
||||
-- 40% of the time when we're in range and not delaying, launch an attack
|
||||
if entity_isTargetInRange(me, 300) then
|
||||
if math.random(100) < 40 and v.lungeDelay == 0 then
|
||||
entity_setState(me, STATE_ATTACKPREP, 0.5)
|
||||
end
|
||||
end
|
||||
|
||||
-- avoid other things nearby
|
||||
entity_doEntityAvoidance(me, dt, 128, 0.5)
|
||||
-- entity_doSpellAvoidance(dt, 200, 1.5)
|
||||
entity_doCollisionAvoidance(me, dt, 4, 0.1)
|
||||
end
|
||||
end
|
||||
entity_updateCurrents(me, dt)
|
||||
entity_updateMovement(me, dt)
|
||||
|
||||
entity_handleShotCollisions(me)
|
||||
if entity_hasTarget(me) then
|
||||
if entity_touchAvatarDamage(me, 32, 1) then
|
||||
entity_moveTowardsTarget(me, dt, -10000)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function dieNormal(me)
|
||||
if chance(10) then
|
||||
spawnIngredient("SmallEye", entity_getPosition(me))
|
||||
end
|
||||
if chance(5) then
|
||||
spawnIngredient("RubberyMeat", entity_getPosition(me))
|
||||
end
|
||||
end
|
||||
|
||||
function enterState(me)
|
||||
if entity_isState(me, STATE_IDLE) then
|
||||
entity_setMaxSpeed(me, 400)
|
||||
elseif entity_isState(me, STATE_ATTACKPREP) then
|
||||
entity_sound(me, "Nautilus", (1200 + math.random(100))/1000.0)
|
||||
entity_setMaxSpeed(me, 0)
|
||||
entity_doGlint(me, "Glint", BLEND_ADD)
|
||||
elseif entity_isState(me, STATE_ATTACK) then
|
||||
entity_enableMotionBlur(me)
|
||||
v.lungeDelay = 2.0
|
||||
entity_setMaxSpeed(me, 950)
|
||||
entity_moveTowardsTarget(me, 950, 1)
|
||||
end
|
||||
end
|
||||
|
||||
function exitState(me)
|
||||
if entity_isState(me, STATE_ATTACKPREP) then
|
||||
entity_setState(me, STATE_ATTACK, 0.5)
|
||||
elseif entity_isState(me, STATE_ATTACK) then
|
||||
entity_disableMotionBlur(me)
|
||||
entity_setState(me, STATE_IDLE)
|
||||
end
|
||||
end
|
||||
|
||||
function damage(me, attacker, bone, damageType, dmg)
|
||||
if entity_getHealth(me)-dmg <= 0 then
|
||||
entity_sound(me, "Nautilus", 1.5)
|
||||
else
|
||||
entity_sound(me, "Nautilus", 1.0)
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
function hitSurface(me)
|
||||
end
|
||||
|
||||
function shiftWorlds(me, old, new)
|
||||
end
|
138
game_scripts/_mods/guert_mod/tempo/raspberry.lua
Normal file
138
game_scripts/_mods/guert_mod/tempo/raspberry.lua
Normal file
|
@ -0,0 +1,138 @@
|
|||
-- Copyright (C) 2007, 2010 - Bit-Blot
|
||||
--
|
||||
-- This file is part of Aquaria.
|
||||
--
|
||||
-- Aquaria is free software; you can redistribute it and/or
|
||||
-- modify it under the terms of the GNU General Public License
|
||||
-- as published by the Free Software Foundation; either version 2
|
||||
-- of the License, or (at your option) any later version.
|
||||
--
|
||||
-- This program is distributed in the hope that it will be useful,
|
||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
--
|
||||
-- See the GNU General Public License for more details.
|
||||
--
|
||||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program; if not, write to the Free Software
|
||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
if not v then v = {} end
|
||||
if not AQUARIA_VERSION then dofile("scripts/entities/entityinclude.lua") end
|
||||
|
||||
-- ================================================================================================
|
||||
-- R A S P B E R R Y
|
||||
-- ================================================================================================
|
||||
|
||||
-- ================================================================================================
|
||||
-- L O C A L V A R I A B L E S
|
||||
-- ================================================================================================
|
||||
|
||||
v.fireDelay = 2
|
||||
v.moveTimer = 0
|
||||
|
||||
-- ================================================================================================
|
||||
-- FUNCTIONS
|
||||
-- ================================================================================================
|
||||
|
||||
function init(me)
|
||||
setupBasicEntity(
|
||||
me,
|
||||
"wallshooter", -- texture
|
||||
4, -- health
|
||||
2, -- manaballamount
|
||||
2, -- exp
|
||||
1, -- money
|
||||
34, -- collideRadius (for hitting entities + spells)
|
||||
STATE_IDLE, -- initState
|
||||
128, -- sprite width
|
||||
128, -- sprite height
|
||||
1, -- particle "explosion" type, maps to particleEffects.txt -1 = none
|
||||
1, -- 0/1 hit other entities off/on (uses collideRadius)
|
||||
4000 -- updateCull -1: disabled, default: 4000
|
||||
)
|
||||
entity_setEatType(me, EAT_FILE, "Raspberry")
|
||||
entity_scale(me, 0.75, 0.75)
|
||||
entity_setDropChance(me, 25)
|
||||
entity_clampToSurface(me)
|
||||
entity_setDeathParticleEffect(me, "PurpleExplode")
|
||||
entity_setSegs(me, 2, 16, 0.6, 0.6, -0.028, 0, 6, 1)
|
||||
esetv(me, EV_WALLOUT, 12)
|
||||
esetvf(me, EV_CLAMPTRANSF, 0.2)
|
||||
end
|
||||
|
||||
function update(me, dt)
|
||||
if eisv(me, EV_CLAMPING, 0) then
|
||||
-- dt, pixelsPerSecond, climbHeight, outfromwall
|
||||
-- out: 24
|
||||
entity_moveAlongSurface(me, dt, 40, 6)
|
||||
entity_rotateToSurfaceNormal(me, 0.1)
|
||||
-- entity_rotateToSurfaceNormal(0.1)
|
||||
v.moveTimer = v.moveTimer + dt
|
||||
if v.moveTimer > 10 then
|
||||
entity_switchSurfaceDirection(me)
|
||||
v.moveTimer = 0
|
||||
end
|
||||
if not(entity_hasTarget(me)) then
|
||||
entity_findTarget(me, 1200)
|
||||
else
|
||||
if v.fireDelay > 0 then
|
||||
v.fireDelay = v.fireDelay - dt
|
||||
if v.fireDelay < 0 then
|
||||
-- dmg, mxspd, homing, numsegs, out
|
||||
entity_doGlint(me, "Particles/PurpleFlare")
|
||||
--entity_fireAtTarget(me, "Purple", 1, 400, 200, 3, 64)
|
||||
local nx, ny = entity_getNormal(me)
|
||||
nx, ny = vector_setLength(nx, ny, 48)
|
||||
|
||||
local s = createShot("Raspberry", me, entity_getTarget(me), entity_x(me)+nx, entity_y(me)+ny)
|
||||
|
||||
--shot_setAimVector(s, )
|
||||
--[[
|
||||
|
||||
shot_setAimVector(s, entity_getNormal(me))
|
||||
shot_setOut(s, 64)
|
||||
|
||||
shot_setAimVector(s,
|
||||
]]--
|
||||
|
||||
v.fireDelay = 5
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
entity_handleShotCollisions(me)
|
||||
if entity_touchAvatarDamage(me, entity_getCollideRadius(me)+10, 0.5, 500) then
|
||||
avatar_fallOffWall()
|
||||
end
|
||||
end
|
||||
|
||||
function dieNormal(me)
|
||||
end
|
||||
|
||||
--[[
|
||||
function diedFrom(attacker, damageType)
|
||||
if damageType ~= DT_AVATAR_BITE then
|
||||
spawnIngredient("RubberyMeat", entity_getPosition(me))
|
||||
end
|
||||
end
|
||||
]]--
|
||||
|
||||
function enterState(me)
|
||||
if entity_getState(me)==STATE_IDLE then
|
||||
end
|
||||
end
|
||||
|
||||
function damage(me, attacker, bone, damageType, dmg)
|
||||
if damageType == DT_AVATAR_BITE or attacker == me then
|
||||
entity_changeHealth(me, -99)
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
function exitState(me)
|
||||
end
|
||||
|
||||
function hitSurface(me)
|
||||
end
|
31
game_scripts/_mods/guert_mod/tempo/rock0001.lua
Normal file
31
game_scripts/_mods/guert_mod/tempo/rock0001.lua
Normal file
|
@ -0,0 +1,31 @@
|
|||
-- Copyright (C) 2007, 2010 - Bit-Blot
|
||||
--
|
||||
-- This file is part of Aquaria.
|
||||
--
|
||||
-- Aquaria is free software; you can redistribute it and/or
|
||||
-- modify it under the terms of the GNU General Public License
|
||||
-- as published by the Free Software Foundation; either version 2
|
||||
-- of the License, or (at your option) any later version.
|
||||
--
|
||||
-- This program is distributed in the hope that it will be useful,
|
||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
--
|
||||
-- See the GNU General Public License for more details.
|
||||
--
|
||||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program; if not, write to the Free Software
|
||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
if not v then v = {} end
|
||||
|
||||
dofile("scripts/include/rocktemplate.lua")
|
||||
|
||||
function init(me)
|
||||
v.commonInit(me, "rock0001", 80)
|
||||
end
|
||||
|
||||
function update(me, dt)
|
||||
v.commonUpdate(me, dt)
|
||||
end
|
||||
|
31
game_scripts/_mods/guert_mod/tempo/rock0002.lua
Normal file
31
game_scripts/_mods/guert_mod/tempo/rock0002.lua
Normal file
|
@ -0,0 +1,31 @@
|
|||
-- Copyright (C) 2007, 2010 - Bit-Blot
|
||||
--
|
||||
-- This file is part of Aquaria.
|
||||
--
|
||||
-- Aquaria is free software; you can redistribute it and/or
|
||||
-- modify it under the terms of the GNU General Public License
|
||||
-- as published by the Free Software Foundation; either version 2
|
||||
-- of the License, or (at your option) any later version.
|
||||
--
|
||||
-- This program is distributed in the hope that it will be useful,
|
||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
--
|
||||
-- See the GNU General Public License for more details.
|
||||
--
|
||||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program; if not, write to the Free Software
|
||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
if not v then v = {} end
|
||||
|
||||
dofile("scripts/include/rocktemplate.lua")
|
||||
|
||||
function init(me)
|
||||
v.commonInit(me, "rock0002", 42)
|
||||
end
|
||||
|
||||
function update(me, dt)
|
||||
v.commonUpdate(me, dt)
|
||||
end
|
||||
|
31
game_scripts/_mods/guert_mod/tempo/rock0003.lua
Normal file
31
game_scripts/_mods/guert_mod/tempo/rock0003.lua
Normal file
|
@ -0,0 +1,31 @@
|
|||
-- Copyright (C) 2007, 2010 - Bit-Blot
|
||||
--
|
||||
-- This file is part of Aquaria.
|
||||
--
|
||||
-- Aquaria is free software; you can redistribute it and/or
|
||||
-- modify it under the terms of the GNU General Public License
|
||||
-- as published by the Free Software Foundation; either version 2
|
||||
-- of the License, or (at your option) any later version.
|
||||
--
|
||||
-- This program is distributed in the hope that it will be useful,
|
||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
--
|
||||
-- See the GNU General Public License for more details.
|
||||
--
|
||||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program; if not, write to the Free Software
|
||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
if not v then v = {} end
|
||||
|
||||
dofile("scripts/include/rocktemplate.lua")
|
||||
|
||||
function init(me)
|
||||
v.commonInit(me, "rock0003", 80)
|
||||
end
|
||||
|
||||
function update(me, dt)
|
||||
v.commonUpdate(me, dt)
|
||||
end
|
||||
|
31
game_scripts/_mods/guert_mod/tempo/rock0004.lua
Normal file
31
game_scripts/_mods/guert_mod/tempo/rock0004.lua
Normal file
|
@ -0,0 +1,31 @@
|
|||
-- Copyright (C) 2007, 2010 - Bit-Blot
|
||||
--
|
||||
-- This file is part of Aquaria.
|
||||
--
|
||||
-- Aquaria is free software; you can redistribute it and/or
|
||||
-- modify it under the terms of the GNU General Public License
|
||||
-- as published by the Free Software Foundation; either version 2
|
||||
-- of the License, or (at your option) any later version.
|
||||
--
|
||||
-- This program is distributed in the hope that it will be useful,
|
||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
--
|
||||
-- See the GNU General Public License for more details.
|
||||
--
|
||||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program; if not, write to the Free Software
|
||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
if not v then v = {} end
|
||||
|
||||
dofile("scripts/include/rocktemplate.lua")
|
||||
|
||||
function init(me)
|
||||
v.commonInit(me, "rock0004", 60)
|
||||
end
|
||||
|
||||
function update(me, dt)
|
||||
v.commonUpdate(me, dt)
|
||||
end
|
||||
|
30
game_scripts/_mods/guert_mod/tempo/rock0005.lua
Normal file
30
game_scripts/_mods/guert_mod/tempo/rock0005.lua
Normal file
|
@ -0,0 +1,30 @@
|
|||
-- Copyright (C) 2007, 2010 - Bit-Blot
|
||||
--
|
||||
-- This file is part of Aquaria.
|
||||
--
|
||||
-- Aquaria is free software; you can redistribute it and/or
|
||||
-- modify it under the terms of the GNU General Public License
|
||||
-- as published by the Free Software Foundation; either version 2
|
||||
-- of the License, or (at your option) any later version.
|
||||
--
|
||||
-- This program is distributed in the hope that it will be useful,
|
||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
--
|
||||
-- See the GNU General Public License for more details.
|
||||
--
|
||||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program; if not, write to the Free Software
|
||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
if not v then v = {} end
|
||||
|
||||
dofile("scripts/include/rocktemplate.lua")
|
||||
|
||||
function init(me)
|
||||
v.commonInit(me, "rock0005", 80)
|
||||
end
|
||||
|
||||
function update(me, dt)
|
||||
v.commonUpdate(me, dt)
|
||||
end
|
31
game_scripts/_mods/guert_mod/tempo/rock0006.lua
Normal file
31
game_scripts/_mods/guert_mod/tempo/rock0006.lua
Normal file
|
@ -0,0 +1,31 @@
|
|||
-- Copyright (C) 2007, 2010 - Bit-Blot
|
||||
--
|
||||
-- This file is part of Aquaria.
|
||||
--
|
||||
-- Aquaria is free software; you can redistribute it and/or
|
||||
-- modify it under the terms of the GNU General Public License
|
||||
-- as published by the Free Software Foundation; either version 2
|
||||
-- of the License, or (at your option) any later version.
|
||||
--
|
||||
-- This program is distributed in the hope that it will be useful,
|
||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
--
|
||||
-- See the GNU General Public License for more details.
|
||||
--
|
||||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program; if not, write to the Free Software
|
||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
if not v then v = {} end
|
||||
|
||||
dofile("scripts/include/rocktemplate.lua")
|
||||
|
||||
function init(me)
|
||||
v.commonInit(me, "rock0006", 40)
|
||||
end
|
||||
|
||||
function update(me, dt)
|
||||
v.commonUpdate(me, dt)
|
||||
end
|
||||
|
31
game_scripts/_mods/guert_mod/tempo/rock0007.lua
Normal file
31
game_scripts/_mods/guert_mod/tempo/rock0007.lua
Normal file
|
@ -0,0 +1,31 @@
|
|||
-- Copyright (C) 2007, 2010 - Bit-Blot
|
||||
--
|
||||
-- This file is part of Aquaria.
|
||||
--
|
||||
-- Aquaria is free software; you can redistribute it and/or
|
||||
-- modify it under the terms of the GNU General Public License
|
||||
-- as published by the Free Software Foundation; either version 2
|
||||
-- of the License, or (at your option) any later version.
|
||||
--
|
||||
-- This program is distributed in the hope that it will be useful,
|
||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
--
|
||||
-- See the GNU General Public License for more details.
|
||||
--
|
||||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program; if not, write to the Free Software
|
||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
if not v then v = {} end
|
||||
|
||||
dofile("scripts/include/rocktemplate.lua")
|
||||
|
||||
function init(me)
|
||||
v.commonInit(me, "rock0007", 40)
|
||||
end
|
||||
|
||||
function update(me, dt)
|
||||
v.commonUpdate(me, dt)
|
||||
end
|
||||
|
58
game_scripts/_mods/guert_mod/tempo/rock2.lua
Normal file
58
game_scripts/_mods/guert_mod/tempo/rock2.lua
Normal file
|
@ -0,0 +1,58 @@
|
|||
-- Copyright (C) 2007, 2010 - Bit-Blot
|
||||
--
|
||||
-- This file is part of Aquaria.
|
||||
--
|
||||
-- Aquaria is free software; you can redistribute it and/or
|
||||
-- modify it under the terms of the GNU General Public License
|
||||
-- as published by the Free Software Foundation; either version 2
|
||||
-- of the License, or (at your option) any later version.
|
||||
--
|
||||
-- This program is distributed in the hope that it will be useful,
|
||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
--
|
||||
-- See the GNU General Public License for more details.
|
||||
--
|
||||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program; if not, write to the Free Software
|
||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
if not v then v = {} end
|
||||
if not AQUARIA_VERSION then dofile("scripts/entities/entityinclude.lua") end
|
||||
|
||||
-- ================================================================================================
|
||||
-- R O C K 2
|
||||
-- ================================================================================================
|
||||
|
||||
|
||||
-- ================================================================================================
|
||||
-- FUNCTIONS
|
||||
-- ================================================================================================
|
||||
|
||||
function init(me)
|
||||
setupEntity(me, "rock0006", -1)
|
||||
--entity_setProperty(me, EP_SOLID, true)
|
||||
entity_setProperty(me, EP_MOVABLE, true)
|
||||
entity_setWeight(me, 100)
|
||||
entity_setCollideRadius(me, 32)
|
||||
|
||||
--entity_setProperty(me, EP_BATTERY, true)
|
||||
end
|
||||
|
||||
function update(me, dt)
|
||||
entity_heal(me, 999)
|
||||
--entity_setHealth(me, 999)
|
||||
entity_updateMovement(me, dt)
|
||||
end
|
||||
|
||||
function enterState(me)
|
||||
end
|
||||
|
||||
function exitState(me)
|
||||
end
|
||||
|
||||
function hitSurface(me)
|
||||
end
|
||||
|
||||
function activate(me)
|
||||
end
|
67
game_scripts/_mods/guert_mod/tempo/savepoint.lua
Normal file
67
game_scripts/_mods/guert_mod/tempo/savepoint.lua
Normal file
|
@ -0,0 +1,67 @@
|
|||
-- Copyright (C) 2007, 2010 - Bit-Blot
|
||||
--
|
||||
-- This file is part of Aquaria.
|
||||
--
|
||||
-- Aquaria is free software; you can redistribute it and/or
|
||||
-- modify it under the terms of the GNU General Public License
|
||||
-- as published by the Free Software Foundation; either version 2
|
||||
-- of the License, or (at your option) any later version.
|
||||
--
|
||||
-- This program is distributed in the hope that it will be useful,
|
||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
--
|
||||
-- See the GNU General Public License for more details.
|
||||
--
|
||||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program; if not, write to the Free Software
|
||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
if not v then v = {} end
|
||||
if not AQUARIA_VERSION then dofile("scripts/entities/entityinclude.lua") end
|
||||
|
||||
-- === SAVE POINT ===
|
||||
function init(me)
|
||||
setupConversationEntity(me, "save-point", "save-point")
|
||||
entity_setActivation(me, AT_CLICK, 80, 256)
|
||||
end
|
||||
|
||||
function activate(me)
|
||||
pause()
|
||||
if isMapName("VedhaCave") then
|
||||
savePoint(me)
|
||||
if getStory()>=1 and getFlag("usedMemoryCrystal")==0 then
|
||||
setFlag("usedMemoryCrystal", 1)
|
||||
end
|
||||
elseif isMapName("MemoryCave") then
|
||||
if getFlag("MemoryCaveSavePointScene")==3 then
|
||||
savePoint(me)
|
||||
elseif getFlag("MemoryCaveSavePointScene")==2 then
|
||||
-- naija activating memory crystal while trapped / escaping memory cave
|
||||
-- should do nothing (or offer a hint?)
|
||||
elseif getFlag("MemoryCaveSavePointScene")==1 then
|
||||
simpleConversation("MemoryCave_ghost")
|
||||
--learnSpell(2)
|
||||
--entityFollowEntity("Drask", "Naija")
|
||||
entity_followEntity(getEntity("Drask"), getEntity("Naija"))
|
||||
-- setEntityScript("Drask", "");
|
||||
setFlag("Drask1", 2)
|
||||
setFlag("VedhaCave1", 8)
|
||||
setFlag("MemoryCaveSavePointScene", 2)
|
||||
elseif getFlag("MemoryCaveSavePointScene")==0 then
|
||||
savePoint(me)
|
||||
end
|
||||
else
|
||||
savePoint(me);
|
||||
end
|
||||
unpause()
|
||||
end
|
||||
|
||||
function update(me, dt)
|
||||
end
|
||||
|
||||
function enterState(me)
|
||||
end
|
||||
|
||||
function exitState(me)
|
||||
end
|
128
game_scripts/_mods/guert_mod/tempo/seedcommon.lua
Normal file
128
game_scripts/_mods/guert_mod/tempo/seedcommon.lua
Normal file
|
@ -0,0 +1,128 @@
|
|||
-- Copyright (C) 2007, 2010 - Bit-Blot
|
||||
--
|
||||
-- This file is part of Aquaria.
|
||||
--
|
||||
-- Aquaria is free software; you can redistribute it and/or
|
||||
-- modify it under the terms of the GNU General Public License
|
||||
-- as published by the Free Software Foundation; either version 2
|
||||
-- of the License, or (at your option) any later version.
|
||||
--
|
||||
-- This program is distributed in the hope that it will be useful,
|
||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
--
|
||||
-- See the GNU General Public License for more details.
|
||||
--
|
||||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program; if not, write to the Free Software
|
||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
if not v then v = {} end
|
||||
if not AQUARIA_VERSION then dofile("scripts/entities/entityinclude.lua") end
|
||||
|
||||
-- SPORE SEED
|
||||
|
||||
v.growEmitter = 0
|
||||
v.done = false
|
||||
v.weight = 400
|
||||
|
||||
v.SEED_FLOWER = 0
|
||||
v.SEED_VINE = 1
|
||||
v.SEED_UBERVINE = 2
|
||||
|
||||
v.seedType = 0
|
||||
|
||||
function v.commonInit(me, st)
|
||||
setupEntity(me)
|
||||
entity_setTexture(me, "Naija/Seedling")
|
||||
entity_setEntityLayer(me, 1)
|
||||
|
||||
entity_initEmitter(me, v.growEmitter, "SporeSeedGrow")
|
||||
|
||||
entity_setHealth(me, 1)
|
||||
entity_setCollideRadius(me, 2)
|
||||
entity_setWeight(me, v.weight)
|
||||
entity_setState(me, STATE_IDLE)
|
||||
entity_setMaxSpeed(me, 800)
|
||||
|
||||
entity_alpha(me, 0)
|
||||
entity_alpha(me, 1, 0.2)
|
||||
entity_setCanLeaveWater(me, true)
|
||||
entity_setEntityType(me, ET_ENEMY)
|
||||
entity_setAllDamageTargets(me, false)
|
||||
entity_setDamageTarget(me, DT_AVATAR_BITE, true)
|
||||
|
||||
v.seedType = st
|
||||
|
||||
if v.seedType == v.SEED_FLOWER then
|
||||
entity_setTexture(me, "Naija/Seed")
|
||||
elseif v.seedType == v.SEED_UBERVINE then
|
||||
entity_setTexture(me, "Naija/Uberseed")
|
||||
end
|
||||
end
|
||||
|
||||
function postInit(me)
|
||||
entity_ensureLimit(me, 3, STATE_DONE)
|
||||
end
|
||||
|
||||
local function terminate(me)
|
||||
if not v.done then
|
||||
|
||||
if v.seedType == v.SEED_VINE then
|
||||
registerSporeDrop(entity_x(me), entity_y(me),1)
|
||||
createEntity("Vine", "", entity_getPosition(me))
|
||||
elseif v.seedType == v.SEED_UBERVINE then
|
||||
registerSporeDrop(entity_x(me), entity_y(me),2)
|
||||
createEntity("UberVine", "", entity_getPosition(me))
|
||||
else
|
||||
registerSporeDrop(entity_x(me), entity_y(me),0)
|
||||
createEntity("NatureFormFlowers", "", entity_getPosition(me))
|
||||
end
|
||||
|
||||
entity_delete(me)
|
||||
|
||||
v.done = true
|
||||
end
|
||||
end
|
||||
|
||||
function songNote(me, note)
|
||||
end
|
||||
|
||||
function update(me, dt)
|
||||
if not v.done then
|
||||
if entity_updateCurrents(me, dt) then
|
||||
entity_setWeight(me, 1)
|
||||
else
|
||||
if entity_isUnderWater(me) then
|
||||
entity_setWeight(me, v.weight)
|
||||
else
|
||||
entity_setWeight(me, v.weight*2)
|
||||
end
|
||||
end
|
||||
entity_updateMovement(me, dt)
|
||||
if entity_isNearObstruction(me, 2) then
|
||||
terminate(me)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function hitSurface(me)
|
||||
--terminate(me)
|
||||
end
|
||||
|
||||
function enterState(me)
|
||||
if entity_isState(me, STATE_DONE) then
|
||||
debugLog("state done")
|
||||
entity_delete(me, 0.2)
|
||||
end
|
||||
end
|
||||
|
||||
function damage(me, attacker, bone, damageType, dmg)
|
||||
if damageType == DT_AVATAR_BITE then
|
||||
return true
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
function exitState(me)
|
||||
end
|
26
game_scripts/_mods/guert_mod/tempo/seedflower.lua
Normal file
26
game_scripts/_mods/guert_mod/tempo/seedflower.lua
Normal file
|
@ -0,0 +1,26 @@
|
|||
-- Copyright (C) 2007, 2010 - Bit-Blot
|
||||
--
|
||||
-- This file is part of Aquaria.
|
||||
--
|
||||
-- Aquaria is free software; you can redistribute it and/or
|
||||
-- modify it under the terms of the GNU General Public License
|
||||
-- as published by the Free Software Foundation; either version 2
|
||||
-- of the License, or (at your option) any later version.
|
||||
--
|
||||
-- This program is distributed in the hope that it will be useful,
|
||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
--
|
||||
-- See the GNU General Public License for more details.
|
||||
--
|
||||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program; if not, write to the Free Software
|
||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
if not v then v = {} end
|
||||
|
||||
dofile("scripts/entities/seedcommon.lua")
|
||||
|
||||
function init(me)
|
||||
v.commonInit(me, v.SEED_FLOWER)
|
||||
end
|
207
game_scripts/_mods/guert_mod/tempo/singbulb.lua
Normal file
207
game_scripts/_mods/guert_mod/tempo/singbulb.lua
Normal file
|
@ -0,0 +1,207 @@
|
|||
-- Copyright (C) 2007, 2010 - Bit-Blot
|
||||
--
|
||||
-- This file is part of Aquaria.
|
||||
--
|
||||
-- Aquaria is free software; you can redistribute it and/or
|
||||
-- modify it under the terms of the GNU General Public License
|
||||
-- as published by the Free Software Foundation; either version 2
|
||||
-- of the License, or (at your option) any later version.
|
||||
--
|
||||
-- This program is distributed in the hope that it will be useful,
|
||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
--
|
||||
-- See the GNU General Public License for more details.
|
||||
--
|
||||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program; if not, write to the Free Software
|
||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
if not v then v = {} end
|
||||
if not AQUARIA_VERSION then dofile("scripts/entities/entityinclude.lua") end
|
||||
|
||||
v.n = 0
|
||||
v.bulb = 0
|
||||
v.base = 0
|
||||
v.glow = 0
|
||||
|
||||
v.entToSpawn = ""
|
||||
v.ingToSpawn = ""
|
||||
v.amount = 0
|
||||
|
||||
v.myNote = 0
|
||||
|
||||
v.singingNote = false
|
||||
v.singTimer = 0
|
||||
|
||||
v.back = false
|
||||
|
||||
function init(me)
|
||||
setupEntity(me)
|
||||
entity_setEntityType(me, ET_NEUTRAL)
|
||||
entity_initSkeletal(me, "singbulb")
|
||||
|
||||
v.bulb = entity_getBoneByName(me, "bulb")
|
||||
v.base = entity_getBoneByName(me, "base")
|
||||
v.glow = entity_getBoneByName(me, "glow")
|
||||
|
||||
entity_animate(me, "idle", -1)
|
||||
|
||||
if entity_isFlag(me, 1) then
|
||||
entity_setState(me, STATE_OPENED)
|
||||
else
|
||||
entity_setState(me, STATE_CLOSED)
|
||||
end
|
||||
|
||||
local nodey = entity_getNearestNode(me, "layerback")
|
||||
if nodey ~= 0 and node_isEntityIn(nodey, me) then
|
||||
entity_setEntityLayer(me, -1)
|
||||
v.back = true
|
||||
end
|
||||
|
||||
local n1 = getNearestNodeByType(entity_x(me), entity_y(me), PATH_SETING)
|
||||
if n1 ~= 0 and node_isEntityIn(n1, me) then
|
||||
v.ingToSpawn = node_getContent(n1)
|
||||
v.amount = node_getAmount(n1) if v.amount == 0 then v.amount = 1 end
|
||||
else
|
||||
local n2 = getNearestNodeByType(entity_x(me), entity_y(me), PATH_SETENT)
|
||||
if n2 ~= 0 and node_isEntityIn(n2, me) then
|
||||
v.entToSpawn = node_getContent(n2)
|
||||
v.amount = node_getAmount(n2) if v.amount == 0 then v.amount = 1 end
|
||||
end
|
||||
end
|
||||
|
||||
v.myNote = getRandNote()
|
||||
|
||||
entity_setCanLeaveWater(me, true)
|
||||
|
||||
entity_setCullRadius(me, 512)
|
||||
end
|
||||
|
||||
function postInit(me)
|
||||
v.n = getNaija()
|
||||
entity_setTarget(me, v.n)
|
||||
|
||||
local r, g, b = getNoteColor(v.myNote)
|
||||
bone_setColor(v.bulb, r, g, b)
|
||||
bone_setColor(v.glow, r, g, b)
|
||||
|
||||
bone_setBlendType(v.glow, BLEND_ADD)
|
||||
bone_alpha(v.glow, 0.4)
|
||||
|
||||
bone_scale(v.glow, 12, 12, 1, -1, 1)
|
||||
|
||||
if mapNameContains("veil") then
|
||||
bone_setTexture(v.base, "singbulb/base-0002")
|
||||
elseif mapNameContains("mithalas") or mapNameContains("cathedral") or mapNameContains("final") then
|
||||
bone_setTexture(v.base, "singbulb/base-0003")
|
||||
elseif mapNameContains("icecave") or mapNameContains("frozenveil") or mapNameContains("bubble") then
|
||||
bone_setTexture(v.base, "singbulb/base-0004")
|
||||
elseif mapNameContains("abyss") then
|
||||
bone_setTexture(v.base, "singbulb/base-0005")
|
||||
end
|
||||
end
|
||||
|
||||
function update(me, dt)
|
||||
if entity_isState(me, STATE_CLOSED) then
|
||||
if v.singingNote then
|
||||
v.singTimer = v.singTimer + dt
|
||||
if v.singTimer > 2 then
|
||||
v.singingNote = false
|
||||
v.singTimer = 0
|
||||
bone_scale(v.bulb, 1, 1, 1)
|
||||
entity_setState(me, STATE_OPEN)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function enterState(me)
|
||||
if entity_isState(me, STATE_IDLE) then
|
||||
elseif entity_isState(me, STATE_CLOSED) then
|
||||
elseif entity_isState(me, STATE_OPENED) then
|
||||
bone_alpha(v.bulb, 0)
|
||||
elseif entity_isState(me, STATE_OPEN) then
|
||||
bone_alpha(v.bulb, 0)
|
||||
entity_setStateTime(me, 1)
|
||||
|
||||
entity_setFlag(me, 1)
|
||||
|
||||
local bx, by = bone_getWorldPosition(v.bulb)
|
||||
|
||||
if v.ingToSpawn ~= "" or v.entToSpawn ~= "" then
|
||||
playSfx("secret")
|
||||
end
|
||||
if v.ingToSpawn ~= "" then
|
||||
for i=1,v.amount do
|
||||
local ing = spawnIngredient(v.ingToSpawn, bx, by, 1, (i==1))
|
||||
--[[
|
||||
if i==1 then
|
||||
entity_clearVel(ing)
|
||||
x,y = entity_getNormal(me)
|
||||
x,y = vector_setLength(x, y, 250)
|
||||
entity_addVel(ing, x, y)
|
||||
end
|
||||
]]--
|
||||
end
|
||||
elseif v.entToSpawn ~= "" then
|
||||
for i=1,v.amount do
|
||||
createEntity(v.entToSpawn, "", bx, by)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function exitState(me)
|
||||
if entity_isState(me, STATE_OPEN) then
|
||||
entity_setState(me, STATE_OPENED)
|
||||
end
|
||||
end
|
||||
|
||||
function damage(me, attacker, bone, damageType, dmg)
|
||||
return false
|
||||
end
|
||||
|
||||
function animationKey(me, key)
|
||||
end
|
||||
|
||||
function hitSurface(me)
|
||||
end
|
||||
|
||||
function songNote(me, note)
|
||||
if entity_isEntityInRange(me, v.n, 800) then
|
||||
if entity_isState(me, STATE_CLOSED) then
|
||||
if v.myNote == note then
|
||||
|
||||
if v.back then
|
||||
local e = getFirstEntity()
|
||||
while e ~= 0 do
|
||||
if eisv(e, EV_TYPEID, EVT_ROCK) or eisv(e, EV_TYPEID, EVT_CONTAINER) then
|
||||
if entity_isEntityInRange(me, e, 64) then
|
||||
return
|
||||
end
|
||||
end
|
||||
e = getNextEntity()
|
||||
end
|
||||
end
|
||||
v.singingNote = true
|
||||
v.singTimer = 0
|
||||
bone_scale(v.bulb, 1, 1)
|
||||
bone_scale(v.bulb, 0.7, 1, 0.1, -1, 1)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function songNoteDone(me, note)
|
||||
v.singingNote = false
|
||||
v.singTimer = 0
|
||||
bone_scale(v.bulb, 1, 1, 1)
|
||||
end
|
||||
|
||||
function song(me, song)
|
||||
end
|
||||
|
||||
function activate(me)
|
||||
end
|
||||
|
140
game_scripts/_mods/guert_mod/tempo/songleaf.lua
Normal file
140
game_scripts/_mods/guert_mod/tempo/songleaf.lua
Normal file
|
@ -0,0 +1,140 @@
|
|||
-- Copyright (C) 2007, 2010 - Bit-Blot
|
||||
--
|
||||
-- This file is part of Aquaria.
|
||||
--
|
||||
-- Aquaria is free software; you can redistribute it and/or
|
||||
-- modify it under the terms of the GNU General Public License
|
||||
-- as published by the Free Software Foundation; either version 2
|
||||
-- of the License, or (at your option) any later version.
|
||||
--
|
||||
-- This program is distributed in the hope that it will be useful,
|
||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
--
|
||||
-- See the GNU General Public License for more details.
|
||||
--
|
||||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program; if not, write to the Free Software
|
||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
if not v then v = {} end
|
||||
if not AQUARIA_VERSION then dofile("scripts/entities/entityinclude.lua") end
|
||||
|
||||
-- ================================================================================================
|
||||
-- S O N G L E A F
|
||||
-- ================================================================================================
|
||||
|
||||
|
||||
-- ================================================================================================
|
||||
-- L O C A L V A R I A B L E S
|
||||
-- ================================================================================================
|
||||
|
||||
v.activeTimer = 0
|
||||
v.singing = false
|
||||
v.singTimer = 0
|
||||
|
||||
-- ================================================================================================
|
||||
-- FUNCTIONS
|
||||
-- ================================================================================================
|
||||
|
||||
function init(me)
|
||||
setupBasicEntity(
|
||||
me,
|
||||
"", -- texture
|
||||
3, -- health
|
||||
2, -- manaballamount
|
||||
2, -- exp
|
||||
10, -- money
|
||||
16, -- collideRadius (for hitting entities + spells)
|
||||
STATE_IDLE, -- initState
|
||||
128, -- sprite width
|
||||
128, -- sprite height
|
||||
1, -- particle "explosion" type, 0 = none
|
||||
0, -- 0/1 hit other entities off/on (uses collideRadius)
|
||||
4000, -- updateCull -1: disabled, default: 4000
|
||||
0
|
||||
)
|
||||
|
||||
entity_setEntityType(me, ET_NEUTRAL)
|
||||
|
||||
entity_initSkeletal(me, "SongLeaf")
|
||||
v.leaf1 = entity_getBoneByName(me, "Leaf1")
|
||||
v.leaf2 = entity_getBoneByName(me, "Leaf2")
|
||||
v.leaf3 = entity_getBoneByName(me, "Leaf3")
|
||||
|
||||
entity_setEntityLayer(me, -2)
|
||||
|
||||
local scale_random = math.random(40) * 0.01
|
||||
entity_scale(me, 0.6 + scale_random, 0.6 + scale_random)
|
||||
|
||||
entity_setState(me, STATE_IDLE)
|
||||
|
||||
entity_setCull(me, false)
|
||||
end
|
||||
|
||||
function songNote(me, note)
|
||||
v.singing = true
|
||||
if entity_isState(me, STATE_IDLE) then
|
||||
entity_setState(me, STATE_ACTIVE)
|
||||
end
|
||||
v.activeTimer = 99
|
||||
local transTime = 0.5
|
||||
local r,g,b = getNoteColor(note)
|
||||
r = r*0.75 + 0.25
|
||||
g = g*0.75 + 0.25
|
||||
b = b*0.75 + 0.25
|
||||
bone_setColor(v.leaf1, r,g,b, transTime)
|
||||
bone_setColor(v.leaf2, r,g,b, transTime)
|
||||
bone_setColor(v.leaf3, r,g,b, transTime)
|
||||
|
||||
bone_setSegs(v.leaf1, 2, 8, 0.8, 0.8, -0.04, 0, 24, 1)
|
||||
bone_setSegs(v.leaf2, 2, 8, 0.8, 0.8, -0.04, 0, 24, 1)
|
||||
bone_setSegs(v.leaf3, 2, 8, 0.8, 0.8, -0.04, 0, 24, 1)
|
||||
end
|
||||
|
||||
function songNoteDone(me, note)
|
||||
v.activeTimer = 2.5
|
||||
v.singing = false
|
||||
end
|
||||
|
||||
function update(me, dt)
|
||||
if entity_isState(me, STATE_ACTIVE) then
|
||||
if v.activeTimer > 0 then
|
||||
v.activeTimer = v.activeTimer - dt
|
||||
if v.activeTimer <= 0 then
|
||||
entity_setState(me, STATE_IDLE)
|
||||
end
|
||||
end
|
||||
end
|
||||
if v.singing then
|
||||
v.singTimer = v.singTimer + dt
|
||||
if v.singTimer > 3 then
|
||||
spawnParticleEffect("bubble-release", entity_x(me), entity_y(me)-16)
|
||||
v.singTimer = 1 - math.random(2)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function enterState(me)
|
||||
if entity_isState(me, STATE_IDLE) then
|
||||
entity_animate(me, "idle", LOOP_INF)
|
||||
--bone_setSegs(bulb, 2, 8, 0.8, 0.1, -0.018, 0, 6, 1)
|
||||
bone_setColor(v.leaf1, 1, 1, 1, 3)
|
||||
bone_setColor(v.leaf2, 1, 1, 1, 3)
|
||||
bone_setColor(v.leaf3, 1, 1, 1, 3)
|
||||
|
||||
bone_setSegs(v.leaf1, 2, 8, 0.8, 0.8, -0.018, 0, 6, 1)
|
||||
bone_setSegs(v.leaf2, 2, 8, 0.8, 0.8, -0.018, 0, 6, 1)
|
||||
bone_setSegs(v.leaf3, 2, 8, 0.8, 0.8, -0.018, 0, 6, 1)
|
||||
elseif entity_isState(me, STATE_ACTIVE) then
|
||||
--bone_setSegs(bulb, 2, 8, 0.8, 0.1, -0.018, 0, 20, 1)
|
||||
entity_animate(me, "wave", LOOP_INF)
|
||||
end
|
||||
end
|
||||
|
||||
function damage(me, attacker, bone, damageType, dmg)
|
||||
return false
|
||||
end
|
||||
|
||||
function exitState(me)
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue