[crossfire] [Re] [Crossfire] [Idea] Spells inmediate effects
Mark Wedel
mwedel at sonic.net
Thu Mar 23 00:48:23 CST 2006
Alberto Sáez Lodeiros wrote:
> I dont speak on spells effects in the world. I say effects in the player
> hitted by the spell.
>
> I dont know how to program this at Python, but it can be something like
> this (Visual Basic like code):
>
> if playerHitByExplosion(PlayerID) then
> castFear()
> castConfussion()
> doDamageToPlayer(10)
> endif
>
> Public Sub castFear()
> (here goes the general code for Fear effects)
> end sub
>
> Public Sub CastConfussion()
> (code for confussion)
> end sub
Note that as far as I know, being both confused and fear do not stack - the
code will either act as if the player is confused or the player is feared, not
both (I'd have to look at the code, but it really comes down to what check is
first in the player move function).
However, I'd suggest that this really isn't the right approach. From what you
described, the idea was that and explosion should knock you back. Confusion
just creates random movement - it is unclear why an explosion would confuse the
player.
Fear also isn't quite what you want either - the reason is because as said
above, the explosion should knock the player back when the explosion happens.
If you fear the player, the player won't move back until the player would move
next, and then it would use the player movement cycle to move the player back.
That doesn't seem right to me.
I do seem to recall that there is an existing spell or two (wave? windstorm?)
that do knock monsters back, so that code does exist.
More information about the crossfire
mailing list