forked from github/server
Störe Astrale Integrität und Mauern der Ewigkeit können mit STUFE gezuabert werden. Als Fixkosten-Sprüche kann die Stufe des Zaubers nicht überschritten werden. Test für die Reichweite des Astralzaubers.
This commit is contained in:
parent
1507090300
commit
a3c8ff78da
|
@ -214,7 +214,7 @@
|
||||||
<spell name="view_reality" rank="5">
|
<spell name="view_reality" rank="5">
|
||||||
<resource name="aura" amount="40" cost="fixed"/>
|
<resource name="aura" amount="40" cost="fixed"/>
|
||||||
</spell>
|
</spell>
|
||||||
<spell name="astral_disruption" rank="4">
|
<spell name="astral_disruption" rank="4" variable="true">
|
||||||
<resource name="aura" amount="140" cost="fixed"/>
|
<resource name="aura" amount="140" cost="fixed"/>
|
||||||
</spell>
|
</spell>
|
||||||
<spell name="seduction" rank="5" parameters="u" los="true">
|
<spell name="seduction" rank="5" parameters="u" los="true">
|
||||||
|
@ -422,7 +422,7 @@
|
||||||
<resource name="aura" amount="1" cost="fixed"/>
|
<resource name="aura" amount="1" cost="fixed"/>
|
||||||
<resource name="permaura" amount="1" cost="fixed"/>
|
<resource name="permaura" amount="1" cost="fixed"/>
|
||||||
</spell>
|
</spell>
|
||||||
<spell name="eternal_walls" rank="5" parameters="b" ship="true">
|
<spell name="eternal_walls" rank="5" parameters="b" ship="true" variable="true">
|
||||||
<resource name="aura" amount="50" cost="fixed"/>
|
<resource name="aura" amount="50" cost="fixed"/>
|
||||||
<resource name="permaura" amount="1" cost="fixed"/>
|
<resource name="permaura" amount="1" cost="fixed"/>
|
||||||
</spell>
|
</spell>
|
||||||
|
|
|
@ -273,15 +273,64 @@ end
|
||||||
function test_astral_disruption()
|
function test_astral_disruption()
|
||||||
local r = region.create(0, 0, "plain")
|
local r = region.create(0, 0, "plain")
|
||||||
local r2 = r:get_astral('fog')
|
local r2 = r:get_astral('fog')
|
||||||
|
local r3 = region.create(r2.x+1, r2.y, 'fog')
|
||||||
local f = faction.create("human")
|
local f = faction.create("human")
|
||||||
local u = unit.create(f, r)
|
local u = unit.create(f, r)
|
||||||
local uh = unit.create(get_monsters(), r2, 1, "braineater")
|
local uh = unit.create(get_monsters(), r2, 1, "braineater")
|
||||||
u.magic = "draig"
|
u.magic = "tybied"
|
||||||
u:set_skill("magic", 100) -- level 100 should beat magic resistance
|
u:set_skill("magic", 100) -- level 100 should beat magic resistance
|
||||||
u.aura = 200
|
u.aura = 200
|
||||||
u:add_spell("astral_disruption")
|
u:add_spell("astral_disruption", 14)
|
||||||
u:add_order('ZAUBERE STUFE 1 "Stoere Astrale Integritaet"')
|
u:add_order('ZAUBERE STUFE 1 "Stoere Astrale Integritaet"')
|
||||||
process_orders()
|
process_orders()
|
||||||
assert_not_nil(r2:get_curse("astralblock"))
|
assert_equal(60, u.aura)
|
||||||
|
assert_equal(100, r2:get_curse("astralblock"))
|
||||||
|
assert_nil(r3:get_curse("astralblock"))
|
||||||
|
assert_equal(r, uh.region)
|
||||||
|
end
|
||||||
|
|
||||||
|
function test_astral_disruption_levels()
|
||||||
|
local r = region.create(0, 0, "plain")
|
||||||
|
local r2 = r:get_astral('fog')
|
||||||
|
local r3 = region.create(r2.x+1, r2.y, 'fog')
|
||||||
|
local r4 = region.create(r2.x+2, r2.y, 'fog')
|
||||||
|
local f = faction.create("human")
|
||||||
|
local u = unit.create(f, r)
|
||||||
|
local uh = unit.create(get_monsters(), r2, 1, "braineater")
|
||||||
|
u.magic = "tybied"
|
||||||
|
u:set_skill("magic", 100) -- level 100 should beat magic resistance
|
||||||
|
u.aura = 200
|
||||||
|
u:add_spell("astral_disruption", 14)
|
||||||
|
-- at level 5, range +1:
|
||||||
|
u:add_order('ZAUBERE STUFE 5 "Stoere Astrale Integritaet"')
|
||||||
|
process_orders()
|
||||||
|
assert_equal(60, u.aura)
|
||||||
|
assert_equal(100, r2:get_curse("astralblock"))
|
||||||
|
assert_equal(100, r3:get_curse("astralblock"))
|
||||||
|
assert_nil(r4:get_curse("astralblock"))
|
||||||
|
assert_equal(r, uh.region)
|
||||||
|
end
|
||||||
|
|
||||||
|
function test_astral_disruption_default_level()
|
||||||
|
local r = region.create(0, 0, "plain")
|
||||||
|
local r2 = r:get_astral('fog')
|
||||||
|
local r3 = region.create(r2.x+1, r2.y, 'fog')
|
||||||
|
local r4 = region.create(r3.x+1, r2.y, 'fog')
|
||||||
|
local r5 = region.create(r4.x+1, r2.y, 'fog')
|
||||||
|
local f = faction.create("human")
|
||||||
|
local u = unit.create(f, r)
|
||||||
|
local uh = unit.create(get_monsters(), r2, 1, "braineater")
|
||||||
|
u.magic = "tybied"
|
||||||
|
u:set_skill("magic", 100) -- level 100 should beat magic resistance
|
||||||
|
u.aura = 200
|
||||||
|
u:add_spell("astral_disruption", 14)
|
||||||
|
-- no level means cast at the spell's level (14)
|
||||||
|
u:add_order('ZAUBERE "Stoere Astrale Integritaet"')
|
||||||
|
process_orders()
|
||||||
|
assert_equal(60, u.aura)
|
||||||
|
assert_equal(100, r2:get_curse("astralblock"))
|
||||||
|
assert_equal(100, r3:get_curse("astralblock"))
|
||||||
|
assert_equal(100, r4:get_curse("astralblock"))
|
||||||
|
assert_nil(r5:get_curse("astralblock"))
|
||||||
assert_equal(r, uh.region)
|
assert_equal(r, uh.region)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue