new god: Valkyrie, of warriors, scourge of magic
git-svn-id: svn://svn.code.sf.net/p/crossfire/code/trunk/maps@4890 282e977c-c81d-0410-88c4-b93c2d0d6712master
parent
c23dc68178
commit
af11015768
|
@ -0,0 +1,52 @@
|
||||||
|
import Crossfire, Crossfire_Type as t
|
||||||
|
|
||||||
|
def accept(description):
|
||||||
|
pl.Write('Valkyrie accepts your %s sacrifice!' % description)
|
||||||
|
|
||||||
|
# XXX: need to expose NROFATTACKS to Python
|
||||||
|
|
||||||
|
altar = Crossfire.WhoAmI()
|
||||||
|
pl = Crossfire.WhoIsActivator()
|
||||||
|
praying = pl.CheckArchInventory('skill_praying')
|
||||||
|
if praying and praying.Title == 'Valkyrie':
|
||||||
|
|
||||||
|
# accept sacrifice
|
||||||
|
obj = altar.Above
|
||||||
|
while obj:
|
||||||
|
if obj.Type & 0xffff == t.FLESH:
|
||||||
|
factor = 0
|
||||||
|
if obj.Level < praying.Level / 2:
|
||||||
|
pl.Write('Valkyrie scorns your pathetic sacrifice!')
|
||||||
|
elif obj.Level < praying.Level:
|
||||||
|
accept('poor')
|
||||||
|
factor = 0.5
|
||||||
|
elif obj.Level < praying.Level * 1.5:
|
||||||
|
accept('modest')
|
||||||
|
factor = 1
|
||||||
|
elif obj.Level < praying.Level * 2:
|
||||||
|
accept('adequate')
|
||||||
|
factor = 1.5
|
||||||
|
elif obj.Level < praying.Level * 5:
|
||||||
|
accept('devout')
|
||||||
|
factor = 2
|
||||||
|
else:
|
||||||
|
accept('heroic')
|
||||||
|
factor = 2.5
|
||||||
|
|
||||||
|
# heads and hearts are worth more. Because.
|
||||||
|
if obj.Name.endswith('head') or obj.Name.endswith('heart'):
|
||||||
|
factor *= 1.5
|
||||||
|
|
||||||
|
# flesh with lots of resists is worth more
|
||||||
|
res = 0
|
||||||
|
for at in range(26): # XXX should be NROFATTACKS
|
||||||
|
res += obj.GetResist(at)
|
||||||
|
|
||||||
|
value = max(res, 10) * factor
|
||||||
|
if obj.Quantity > 1:
|
||||||
|
obj.Quantity -= 1
|
||||||
|
else:
|
||||||
|
obj.Remove()
|
||||||
|
pl.AddExp(value, 'praying')
|
||||||
|
break
|
||||||
|
obj = obj.Above
|
|
@ -1944,27 +1944,17 @@ arch dirtfloor
|
||||||
x 14
|
x 14
|
||||||
y 1
|
y 1
|
||||||
end
|
end
|
||||||
arch silvercoin
|
arch altar_valkyrie
|
||||||
x 14
|
x 14
|
||||||
y 1
|
y 1
|
||||||
end
|
end
|
||||||
arch kobold
|
arch giant
|
||||||
exp 0
|
exp 0
|
||||||
|
|
||||||
x 14
|
x 14
|
||||||
y 1
|
y 1
|
||||||
end
|
end
|
||||||
arch dirtfloor
|
arch dirtfloor
|
||||||
x 14
|
|
||||||
y 2
|
|
||||||
end
|
|
||||||
arch silvercoin
|
|
||||||
x 14
|
|
||||||
y 2
|
|
||||||
end
|
|
||||||
arch kobold
|
|
||||||
exp 0
|
|
||||||
|
|
||||||
x 14
|
x 14
|
||||||
y 2
|
y 2
|
||||||
end
|
end
|
||||||
|
@ -1972,13 +1962,7 @@ arch dirtfloor
|
||||||
x 14
|
x 14
|
||||||
y 3
|
y 3
|
||||||
end
|
end
|
||||||
arch silvercoin
|
arch door_2
|
||||||
x 14
|
|
||||||
y 3
|
|
||||||
end
|
|
||||||
arch kobold
|
|
||||||
exp 0
|
|
||||||
|
|
||||||
x 14
|
x 14
|
||||||
y 3
|
y 3
|
||||||
end
|
end
|
||||||
|
@ -1986,6 +1970,16 @@ arch dirtfloor
|
||||||
x 14
|
x 14
|
||||||
y 4
|
y 4
|
||||||
end
|
end
|
||||||
|
arch magic_mouth
|
||||||
|
x 14
|
||||||
|
y 4
|
||||||
|
msg
|
||||||
|
You hear angry noises behind the door.
|
||||||
|
Whatever is in there, sounds more dangerous
|
||||||
|
than a kobold. You wonder if you should
|
||||||
|
just leave it alone.
|
||||||
|
endmsg
|
||||||
|
end
|
||||||
arch kobold
|
arch kobold
|
||||||
exp 0
|
exp 0
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue