View Single Post
Old March 16, 2020, 05:52   #6
wobbly
Prophet
 
Join Date: May 2012
Location: Adelaide, Australia
Posts: 2,515
wobbly will become famous soon enough
Quote:
Originally Posted by DavidMedley View Post
When I saw this I thought "Jackpot!" But when I try to put in things like WEAPON_DAMAGE into class.txt, angband gives me a parse error when I run it. I tried PLAYER_HP and DUNGEON_LEVEL as well and they give the same error, though MONSTER_PERCENT_HP_GONE obviously works since it's part of the Necro class.
Changing:

Code:
spell:Magic Missile:1:1:22:4
effect:BOLT_OR_BEAM:MISSILE:0:-10
dice:$Dd4
expr:D:PLAYER_LEVEL:- 1 / 5 + 3
desc:Fires a magic missile that always hits its target and does
desc: unresistable damage.
desc:  Sometimes a beam is fired instead that hurts each monster
desc: in its path.
desc:  The chance to get a beam goes up with your character level.
to

Code:
spell:Magic Missile:1:1:22:4
effect:BOLT_OR_BEAM:MISSILE:0:-10
dice:$Dd4
expr:D:WEAPON_DAMAGE:- 1 / 5 + 3
desc:Fires a magic missile that always hits its target and does
desc: unresistable damage.
desc:  Sometimes a beam is fired instead that hurts each monster
desc: in its path.
desc:  The chance to get a beam goes up with your character level.
is working for me, & gives me a magic missile damage based on the dice of my weapon.

What parser error are you getting?
wobbly is offline   Reply With Quote