[nyctos] r212 committed - Added dawn swords, a radiant sword slightly weaker than a longsword. ...

0 views
Skip to first unread message

nyc...@googlecode.com

unread,
Dec 16, 2012, 7:31:26 PM12/16/12
to nycto...@googlegroups.com
Revision: 212
Author: GreenbergJH
Date: Sun Dec 16 16:31:10 2012
Log: Added dawn swords, a radiant sword slightly weaker than a
longsword. Won't be truly vital until there are darkness generating
monsters.
http://code.google.com/p/nyctos/source/detail?r=212

Added:
/trunk/src/data.res/scripts/weapons/dawnsword.py
Modified:
/trunk/src/data.res/scripts/weapons/manifest.py

=======================================
--- /dev/null
+++ /trunk/src/data.res/scripts/weapons/dawnsword.py Sun Dec 16 16:31:10
2012
@@ -0,0 +1,58 @@
+import parole
+from parole.colornames import colors
+from parole.display import interpolateRGB
+import pygame, random
+
+import sim, main, util, sim_items
+from util import *
+
+class DawnSword(sim_items.Weapon, sim_items.LightSource):
+ def __init__(self):
+ bonuses = {
+ 'hitMod': +1,
+ 'damageSkewMod': +1,
+ }
+
+ # TODO: depth, materials, etc.
+ sim_items.Weapon.__init__(self,
+ 'dawn sword', # base name
+ parole.map.AsciiTile(')', colors['GoldenRod']), # symbol
+ 9, # weight
+ 1100, # wield energy
+ 1200, # attack energy
+ 50, # maximum damage. a wielder with avg stats will
average half
+ # this much damage
+ bonuses,
+ 'slash', # verb
+ False, # startsVowel
+ projectileDamage=30)
+
+ sim_items.LightSource.__init__(self,
+ 'dawn sword', #name
+ 50, # layer
+ parole.map.AsciiTile(')', colors['GoldenRod']),
+ 9, # weight
+ 7000, # light energy
+
colors[random.choice(['DarkRed', 'IndianRed', 'FireBrick', 'Tomato'])], #
light color
+ 4.0, # light intensity
+ 120000*60000, # burn time
+ showBurnTime=False,
+ dousable=False,
+ litAdjective="blazing",
+ handsNeeded=0, # already takes a hand to ready as shield
+ unidDescription="A celestial blade that blazes with the
warmth of the rising sun.")
+
+ self.snuffable = False
+ self.startIntensity = self.lightIntensity
+ self.startBurnTime = self.burnTime
+ main.schedule.add(sim.Event('activate light', main.schedule.time,
+ (self,), dests=[self]))
+ self.fading = False
+
+ def listen(self, event):
+ sim_items.Weapon.listen(self, event)
+ sim_items.LightSource.listen(self, event, superListen=False)
+
+#========================================
+thingClass = DawnSword
+
=======================================
--- /trunk/src/data.res/scripts/weapons/manifest.py Sun Feb 12 21:15:07 2012
+++ /trunk/src/data.res/scripts/weapons/manifest.py Sun Dec 16 16:31:10 2012
@@ -12,6 +12,7 @@
('shortsword', 10),
('waraxe', 10),
('whip', 10),
+ ('dawnsword', 10),
]

manifest = {
@@ -70,6 +71,7 @@
('maul', 10),

('waraxe', 5),
+ ('dawnsword', 1),
],

6: [
@@ -84,6 +86,7 @@
('maul', 10),

('waraxe', 10),
+ ('dawnsword', 2),
],
}

Reply all
Reply to author
Forward
0 new messages