Ideas for Stendhal/Magic: Difference between revisions

Jump to navigation Jump to search
Content deleted Content added
imported>Krupi
imported>AntumDeluge
m AntumDeluge moved page Stendhal/ideas/Magic to Ideas for Stendhal/Magic over redirect: Undoing previous move
 
(87 intermediate revisions by 4 users not shown)
Line 23: Line 23:
** Heal - Heal another player [[File:Heal.png]] {{done}} - unless they have engaged in PvP within the last 10 minutes
** Heal - Heal another player [[File:Heal.png]] {{done}} - unless they have engaged in PvP within the last 10 minutes
** Mass heal - heal multiple players around - unless they have engaged in PvP within the last 10 minutes
** Mass heal - heal multiple players around - unless they have engaged in PvP within the last 10 minutes
** Mana - Mana give for another player from own bottle [[File:Heal_blue.png]]
** Shield of Light - Increase defense for some time {{done}}
** Shield of Light - Increase defense for some time {{done}}
** Knowing - The player has the ability to know what's happened now at this place [[File:Knowing.png]]
** Adding a sound around the player (should somehow fit to the nature)
** Adding a sound around the player (should somehow fit to the nature)
* Dark
* Dark
Line 37: Line 39:
** Explosion - Ranged attack on several enemies + pushing away the enemies around ( + damaging yourself a bit)
** Explosion - Ranged attack on several enemies + pushing away the enemies around ( + damaging yourself a bit)
** Lava - Ranged attack on several enemies [[File:lava.png]] - stronger than explosion ^^
** Lava - Ranged attack on several enemies [[File:lava.png]] - stronger than explosion ^^
** Power - Boost skills for short time [[File:New_Power_spell.png]]
** Adding a sound around the player (should somehow fit to the nature)
** Adding a sound around the player (should somehow fit to the nature)


Line 43: Line 46:
** Cloak of invisibility for short time
** Cloak of invisibility for short time
::: perhaps only for non-players and only for creature whos level is not much above the caster's level
::: perhaps only for non-players and only for creature whos level is not much above the caster's level
** Power - Boost skills for short time
** Weaken creature
** Weaken creature
** Summon friendly creature
** Summon friendly creature
Line 54: Line 56:
** Colour a pet / sheep
** Colour a pet / sheep
** Different outfit
** Different outfit
* Walk through walls (care needed to be sure disallowed areas aren't reachable, perhaps only to certain preset portals or if there is a path - just might be a long path without the shortcut)
** Mana - Mana give for another player from own bottle


=== Needed Changes To Entities {{done}}===
=== Needed Changes To Entities ===
Some spell like Freeze or Weaken Creature temporarily affect specific attributes of an entity. As it is reasonable not to change the attributes themselves, it is necessary to add attribute modifiers to an entity.
Some spell like Freeze or Weaken Creature temporarily affect specific attributes of an entity. As it is reasonable not to change the attributes themselves, it is necessary to add attribute modifiers to an entity. But as this is not the only kind of effects, that can be applied to an entity, this is documented on a separate [[Ideas for Stendhal/Effects|page]]

A first approach would store the modifier factors in a class and the entity classes compute an attribute's value by summing up all modifiers and applying it to the actual attribute's value. To reflect the temporal nature of a modifier it is capable of determining its validity based on a timestamp within the method ''isValid''. This approach has the obvious disadvantage, that within ''GuidedEntity'' the modifiers for not existing attributes are available.

The second approach uses an additional layer of indirection to hide the modifiers for not existing attributes. On each level of the entity inheritance hierarchy is a specific modifier defined that is called to calculate the modified value.

The TurnNotifier is used to clean up expired modifiers. As a modifier is able to distinguish between being valid and not, it is not necessary, that this clean up helper runs every second or even more frequently.

<gallery caption="Attribute modifiers variants">
File:Modifier-idea-01.png|Simple modifier
File:Modifier-idea-02.png|Modifier concept hiding the "full" modifiers
</gallery>

The second option has been implemented.

There still needs to be a generic way on how to display the modified attributes at the client side.


== Learning Spells ==
== Learning Spells ==
Line 134: Line 121:
{| border="0"
{| border="0"
|[[File:Spellnatures.png]] || Spell natures (ice, fire, light, dark)
|[[File:Spellnatures.png]] || Spell natures (ice, fire, light, dark)
|-
|[[File:Knowing.png]] || Example for the spell "knowing"
|-
|-
|[[File:Heal.png]] || Example for the spell "heal"
|[[File:Heal.png]] || Example for the spell "heal"
|-
|-
|[[File:Heal_blue.png]] || Example for the spell "mana"
|[[File:Heal_blue.png]] || Example for the spell "mana"
|-
|[[File:New_Power_spell.png]] || Example for the spell "power"
|-
|-
|[[File:Fireball.png]] || Example for the spell "fireball" - scary :)
|[[File:Fireball.png]] || Example for the spell "fireball" - scary :)