ironbane / IronbaneServerLegacy

A 3D MMO written using pure javascript.
http://www.ironbane.com/
GNU General Public License v3.0
175 stars 44 forks source link

Buffs and debuffs #470

Open eric-ycw opened 10 years ago

eric-ycw commented 10 years ago

This topic has been thrown around a lot of times, and still haven't come to a conclusion. So buffs and debuffs are effects that can be inflicted by items, Npcs, triggers and blah. Maybe it would work like this(just a simple idea, I suck at coding):

on hit or other things that will possibly inflict the effect {
       if inflicted {
//Add effect
//Add period of time
//Add sprite(poison bubbles for poison, flames for fire... something like that)
//Antistack measures
       }
}
bsparks commented 10 years ago

well it'd be similar to that, most likely we'd define a buff/debuff object that has several properties like:

affectedStat: 'health',
duration: 10, // seconds
modifier: -1, // -1 per second,
particleEffect: 'poison_bubbles',
stackable: false

that configuration would be defined as "PoisonEffect" or something, and then each player/npc would have an array of effects that would get added to. during the game loop, it would loop through that array of effects and apply the modifier on the stat, play the particle, etc.

something like that

LunaSolVT commented 10 years ago

I was thinking, you know the older final fantasy games? In FFVI, when a player has a status effect, all black pixels are replaced with another color that signifies their status effect.

For instance, a protection spell will replace all black with a light yellow.

Could we implement that dynamically? Like instead of doing this for every sprite in the game, create a script that will allow this to occur on effect using JS.

bsparks commented 10 years ago

using a pixel shader yes you can do things like that

LunaSolVT commented 10 years ago

That would be awesome. :D


From: Ben Sparks notifications@github.com To: ironbane/IronbaneServer IronbaneServer@noreply.github.com Cc: Kevin arthasthelichking@sbcglobal.net Sent: Tuesday, February 4, 2014 2:02 PM Subject: Re: [IronbaneServer] Buffs and debuffs (#470)

using a pixel shader yes you can do things like that — Reply to this email directly or view it on GitHub.