Spells with fixed damage
Moderator: George Gilbert
Forum rules
Please read the Forum rules and policies before posting.
Please read the Forum rules and policies before posting.
-
- Artisan
- Posts: 187
- Joined: Sat Jan 22, 2005 2:50 pm
- Location: Ipswich, UK
Spells with fixed damage
How can I create a spell which does two things:
1) Do a FIXED amount of damage to the party, in percent. IE: damage health by 50%
2) Create an item.
I want a spell called "purse of pain" which creates a coin in hand but also damages the party for 50% health so they will only use it as a last resort because they'd have to either sleep forever to get health back at the cost of food/water, or cast lots of spells at the cost of mana.
I can do this by cloning the fireball spell and making it create the coin in hand when it explodes, and then creating a spell which creates the fireball on the ground so it explodes on the party instantly. But the fireball is created according to the level of the spell cast, which is no good. The player is not likely to cast a MON level spell to get a coin knowing that this will generate the most damage. He will always cast a LO spell and get the least damage, but will always receive a coin.
Two problems that I can see:
1) How can a spell do two actions.
2) How can I have a fixed damage no matter what level spell is cast?
1) Do a FIXED amount of damage to the party, in percent. IE: damage health by 50%
2) Create an item.
I want a spell called "purse of pain" which creates a coin in hand but also damages the party for 50% health so they will only use it as a last resort because they'd have to either sleep forever to get health back at the cost of food/water, or cast lots of spells at the cost of mana.
I can do this by cloning the fireball spell and making it create the coin in hand when it explodes, and then creating a spell which creates the fireball on the ground so it explodes on the party instantly. But the fireball is created according to the level of the spell cast, which is no good. The player is not likely to cast a MON level spell to get a coin knowing that this will generate the most damage. He will always cast a LO spell and get the least damage, but will always receive a coin.
Two problems that I can see:
1) How can a spell do two actions.
2) How can I have a fixed damage no matter what level spell is cast?
1) A spell can do two actions if its action calls a relay that targets to action wallitems
2) Damage tile cration and destruction on the party tile. If it isn't already coded to allow a percentage damage to be used, then I guess this could be a suggestion (I forget but remember lots of things now have percentages useable such as healing and experience, I think)
2) Damage tile cration and destruction on the party tile. If it isn't already coded to allow a percentage damage to be used, then I guess this could be a suggestion (I forget but remember lots of things now have percentages useable such as healing and experience, I think)
- George Gilbert
- Dungeon Master
- Posts: 3022
- Joined: Mon Sep 25, 2000 11:04 am
- Location: London, England
- Contact:
1) Yep - use a relay; have a look at the complex actions example dungeon which uses some of these.
2) To have a fixed (absolute) damage level, have the triggered WALLITEM_ACTION have a *non-zero* strength. A zero strength means that the action inherrits the strength from the thing that called it (e.g. the spell caster spell power), a non-zero strength uses the given strength.
BTW - I wouldn't recommend having a percentage damage; for your coin, the party would be able to use it infinitely (the first flip reduces health to 50%, the next to 25%, the next to 12.5%, the next to 6.25% etc etc and they would never die!).
2) To have a fixed (absolute) damage level, have the triggered WALLITEM_ACTION have a *non-zero* strength. A zero strength means that the action inherrits the strength from the thing that called it (e.g. the spell caster spell power), a non-zero strength uses the given strength.
BTW - I wouldn't recommend having a percentage damage; for your coin, the party would be able to use it infinitely (the first flip reduces health to 50%, the next to 25%, the next to 12.5%, the next to 6.25% etc etc and they would never die!).
-
- Artisan
- Posts: 187
- Joined: Sat Jan 22, 2005 2:50 pm
- Location: Ipswich, UK
Thanks GG,
One thing I'm not clear on. When you use an action such as do something to tile in front, isn't that the tile in front of where the action is? So if my spell targets an action on a wallitem and the wallitem says "create damage tile on square", won't the damage tile appear on the square where the wallitem action is and not where the party is?
One thing I'm not clear on. When you use an action such as do something to tile in front, isn't that the tile in front of where the action is? So if my spell targets an action on a wallitem and the wallitem says "create damage tile on square", won't the damage tile appear on the square where the wallitem action is and not where the party is?
The action will seen to be generated by the person or tile starting the chain - ie the party in the case of the spell, whcih it sounds liek you are doing.
If you have the action generated by a spell exploding, then the action will be generated on the tile explosion
So if you want the party to be damaged and a spell effect to fly, then have the damage and spell effect be generated by the party, then secondary actions generated by the spell, etc.
If you have the action generated by a spell exploding, then the action will be generated on the tile explosion
So if you want the party to be damaged and a spell effect to fly, then have the damage and spell effect be generated by the party, then secondary actions generated by the spell, etc.
-
- Artisan
- Posts: 187
- Joined: Sat Jan 22, 2005 2:50 pm
- Location: Ipswich, UK
It's working ok, but I'm getting an odd amount of damage. I have the strength of the action set to 50, and was therefore expecting to get 50 damage every time. In fact, I get 18 or 19 damage every time no matter what level of spell I cast.
So how does 50 relate to 19? I'm using a test character with maxed stats (255, 255, etc). Is the number 50 in some way in relation to the strength of the character. Why does 50 not mean 50? (scratches head)
So how does 50 relate to 19? I'm using a test character with maxed stats (255, 255, etc). Is the number 50 in some way in relation to the strength of the character. Why does 50 not mean 50? (scratches head)
-
- Artisan
- Posts: 187
- Joined: Sat Jan 22, 2005 2:50 pm
- Location: Ipswich, UK
What I really wanted with the percentage thing was to make sure that the player could only generate perhaps 2 coins before dying or having to rest. But with an absolute value they will be able to generate more coins as they get stronger, which defeats the logic of my duneon mechanics. If a level only should allow a couple of coins, it's no good really if a really strong character can get 20 and a weak one can get 2.
- George Gilbert
- Dungeon Master
- Posts: 3022
- Joined: Mon Sep 25, 2000 11:04 am
- Location: London, England
- Contact:
Like the strength, the location is also inherrited from the chain of triggers. So in your example, a spell can target some remotely located relay that then triggers an action - that action will use the location of the spell caster rather than itself.Chaos Awakes wrote:One thing I'm not clear on. When you use an action such as do something to tile in front, isn't that the tile in front of where the action is? So if my spell targets an action on a wallitem and the wallitem says "create damage tile on square", won't the damage tile appear on the square where the wallitem action is and not where the party is?
Note that you can also alter the location to somewhere else if that's what you want instead. For example, have a look at how the tables move in DM2 - that uses a click that's originated on the partys square, which passes through a relay that moves the location forward by one (i.e. to the tile that contains the table) and then performs the move action so that the table moves...
- George Gilbert
- Dungeon Master
- Posts: 3022
- Joined: Mon Sep 25, 2000 11:04 am
- Location: London, England
- Contact:
The 50 denotes 50% of the maximum damage (which, for a fireball is 255 points of damage) - i.e. your fireball explosion will do an intrinsic damage level of 128 points.Chaos Awakes wrote:It's working ok, but I'm getting an odd amount of damage. I have the strength of the action set to 50, and was therefore expecting to get 50 damage every time. In fact, I get 18 or 19 damage every time no matter what level of spell I cast.
So how does 50 relate to 19? I'm using a test character with maxed stats (255, 255, etc). Is the number 50 in some way in relation to the strength of the character. Why does 50 not mean 50? (scratches head)
That is then reduced by your characters anti-fire level which is 255. The calculation for this is given by damage = damage - (255/300*damage)...
...which is 18 or 19 as you (or at least I ) would expect.
If you want to do a fixed amount of damage, use a "damage" tile, or even a lightning bolt (which wouldn't get the anti-fire reduction).
And with the fireball you could just cast strong fireshields and then create all the coins you like.. And for lightning.. spell shields? ..
This kind of thing would need absolute damage that could not be resisted in any way. Just straight reduction from the health. And preferably 50% or maybe even 60-90% of each individual characters current maximum health. So if they haven't taken prior damage they would surely survive the first cast, but if you cast it again before healing they'd all die.
This kind of thing would need absolute damage that could not be resisted in any way. Just straight reduction from the health. And preferably 50% or maybe even 60-90% of each individual characters current maximum health. So if they haven't taken prior damage they would surely survive the first cast, but if you cast it again before healing they'd all die.