summaryrefslogtreecommitdiff
path: root/example
diff options
context:
space:
mode:
Diffstat (limited to 'example')
-rw-r--r--example/abilities.xml11
-rw-r--r--example/scripts/abilities.lua1
-rw-r--r--example/scripts/monster/basic_ai.lua1
3 files changed, 2 insertions, 11 deletions
diff --git a/example/abilities.xml b/example/abilities.xml
index 27a4b65d..71330dd0 100644
--- a/example/abilities.xml
+++ b/example/abilities.xml
@@ -4,10 +4,6 @@
<ability
id="1"
name="Test Spell 1"
- rechargeable="true"
- needed="100"
- rechargeattribute="6"
- cooldownattribute="20"
target="point"
useaction="attack"
/>
@@ -16,9 +12,6 @@
<ability
id="2"
name="Basic Monster strike"
- rechargeable="true"
- needed="100"
- rechargeattribute="21"
target="being"
useaction="attack"
/>
@@ -27,10 +20,6 @@
<ability
id="3"
name="debug"
- rechargeable="true"
- needed="1"
- rechargeattribute="20"
- cooldownattribute="20"
target="point"
/>
</ability-category>
diff --git a/example/scripts/abilities.lua b/example/scripts/abilities.lua
index deed0c52..3878815a 100644
--- a/example/scripts/abilities.lua
+++ b/example/scripts/abilities.lua
@@ -34,6 +34,7 @@ spell1:on_use(function(user, x, y, abilityId)
being:say("OUCH")
end
end
+ users:set_ability_cooldown(abilityId, 10)
end)
--spell1:on_recharged(function(ch) ch:say("Hoooooooo...") end)
diff --git a/example/scripts/monster/basic_ai.lua b/example/scripts/monster/basic_ai.lua
index c75ca300..b1dba32c 100644
--- a/example/scripts/monster/basic_ai.lua
+++ b/example/scripts/monster/basic_ai.lua
@@ -164,6 +164,7 @@ end
local function mob_attack(mob, target, ability_id)
local config = mob_config[mob:name()]
target:damage(mob, config.damage)
+ mob:set_ability_cooldown(ability_id, 10)
end
local function mob_recharged(mob, ability_id)