Ideas for Stendhal/Effects: Difference between revisions

Jump to navigation Jump to search
Content deleted Content added
imported>AntumDeluge
imported>AntumDeluge
m AntumDeluge moved page Stendhal/ideas/Effects to Ideas for Stendhal/Effects over redirect: Undoing previous move
 
(57 intermediate revisions by 2 users not shown)
Line 46: Line 46:
{| class="wikitable"
{| class="wikitable"
|-
|-
! Common Names !! Common Functions !! Suggested for Stendhal
! Common Names
! Common Functions
! Suggested for Stendhal
|-
|-
| blind / dark / darkness || player's attack accuracy is reduced || same
| blind, dark, darkness
|| player's attack accuracy is reduced
|| same
|-
|-
| burn, burning
| burn / burning || • character gradually, or each turn, loses HP<br>• lowered physical attack || same
|| • character gradually, or each turn, loses HP<br>• lowered physical attack
|| same
|-
|-
| confuse / confusion / confused / muddle || character is uncontrollable and acts randomly || walking is limited to using directional arrows inverted (as poison is currently)
| confuse, confusion, confused, muddle
|| character is uncontrollable and acts randomly
|| <span style="color:green;">Implemented:</span> walking is limited to using directional arrows inverted (as poison is currently)
|-
|-
| death / instant death / KO || character is instantly KO'd || not recommended
| death, instant death, KO
|| character is instantly KO'd
|| <span style="color:red;">not recommended</span>
|-
|-
| dizzy
| dizzy || physical attack evasion is reduced || same
|| physical attack evasion is reduced
|| same
|-
|-
| doom, condemned
| doom / condemned || character is KO'd after a predetermined period of time if ailment isn't removed || not recommended
|| character is KO'd after a predetermined period of time if ailment isn't removed
|| <span style="color:red;">not recommended</span>
|-
|-
| fear
| fear || attack and defense are weakened || same
|| attack and defense are weakened
|| same
|-
|-
| freeze / freezing / frozen || character can not move to a new position || same
| freeze, freezing, frozen
|| character can not move to a new position
|| same
|-
|-
| oil
| oil || character is more susceptible to fire-based attacks || same
|| character is more susceptible to fire-based attacks
|| same
|-
|-
| paralysis, paralized
| paralysis / paralized || usually disables a certain ability temporarily || cannot physically attack for a time or until cured
|| usually disables a certain ability temporarily
|| cannot physically attack for a time or until cured
|-
|-
| poison
| poison || character loses HP over time || same
|| character loses HP over time
|| <span style="color:green;">Implemented</span>
|-
|-
| shock
| shock || character cannot act || while walking character stops after specified number of steps (player must resume walking)
|| character cannot act
|| <span style="color:green;">Implemented:</span> while walking character stops after specified number of steps (player must resume walking)
|-
|-
| silence / mute || character is unable to cast magic spells || same
| silence, mute
|| character is unable to cast magic spells
|| same
|-
|-
| sleep
| sleep || character is unable to act for a predetermined amount of time or until awoken || same
|| character is unable to act for a predetermined amount of time or until awoken
|| same
|-
|-
| slow, heavy
| slow || character's attack is delayed || same or slowed walking
|| character's attack is delayed
|| same or slowed walking
|-
|-
| stone, petrified
| stone / petrified || character is unable to act until status removed || not recommended
|| character is unable to act until status removed
|| <span style="color:red;">not recommended</span>
|-
|-
| tiny, shrink, toad, frog, imp
| tiny / shrink / toad / frog / imp || • significantly decreases attack and defense<br>• character's sprite transformed to correspond with affliction<br>• commands become limited sometimes reduced to only physical attacks || not recommended
|| • significantly decreases attack and defense<br>• character's sprite transformed to correspond with affliction<br>• commands become limited sometimes reduced to only physical attacks
|| <span style="color:red;">not recommended</span>
|-
|-
| weaken
| weaken || temporarily reduces character's max HP || same
|| temporarily reduces character's max HP
|| same
|-
|-
| zombie
| zombie || • healing items have the opposite effect<br>• causes immunity to poison in some games<br>• character is uncontrollable || slowed walking
|| • healing items have the opposite effect<br>• causes immunity to poison in some games<br>• character is uncontrollable
|| <span style="color:green;">implemented:</span> slowed walking
|}
|}


Line 99: Line 139:
! Effect Name !! Common Function !! Suggested for Stendhal
! Effect Name !! Common Function !! Suggested for Stendhal
|-
|-
| autoraise
| autoraise || character is instantly revived, one time, on KO || same
|| character is instantly revived, one time, on KO
|| same
|-
|-
| eat, eating
| eat / eating || restore HP over time || already implemented
|| restore HP over time
|| <span style="color:green;">Implemented</span>
|-
|-
| focus, concentrate
| focus / concentrate || increases power or accuracy of next physical or magical attack || same
|| increases power or accuracy of next physical or magical attack
|| same
|-
|-
| haste
| haste || decreases wait time between attacks || same or quickened walking
|| decreases wait time between attacks
|| same or quickened walking
|-
|-
| protect || increases defense || same
| protect
|| increases defense
|| same
|-
|-
| reflect
| reflect || reflects magic back onto the caster || same
|| reflects magic back onto the caster
|| same
|-
|-
| regen / regenerate || restore HP over time || none (eating already implemented)
| regen, regenerate
|| restore HP over time
|| same
|-
|-
| shell || increases magic defense || same
| shell|| increases magic defense
|| same
|-
|-
| special
| special || usually a state that allows the player to take special actions not normally available || none
|| usually a state that allows the player to take special actions not normally available
|| none
|}
|}


Line 128: Line 185:
! Effect Name !! Common Function !! Suggested for Stendhal
! Effect Name !! Common Function !! Suggested for Stendhal
|-
|-
| berserk
| berserk || physical attack strength is greatly increased but control over character is lost || not recommended
|| physical attack strength is greatly increased but control over character is lost
|| <span style="color:red;">not recommended</span>
|-
|-
| focus / concentrate || Same as above but player loses a turn or turn is slowed || none
| focus, concentrate
|| Same as above but player loses a turn or turn is slowed
|| none
|}
|}


= Possible Implementation =
= Possible Implementation =

==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.

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. It has been removed later due to compatibility reasons.


== Player Resistance & Status ==
== Player Resistance & Status ==
Line 155: Line 232:
* The same can be applied reversed. Players can have "attack" slots and creatures "resistance".
* The same can be applied reversed. Players can have "attack" slots and creatures "resistance".
** Allows players to inflict status effects on creatures.
** Allows players to inflict status effects on creatures.

== Classes ==

A possible way to make elements and status attacks/resistances available for players and creatures is to add 2 subclasses to RPEntity and derive Creature and Player from them.

[[ File:Status_element_entities.png ]]

The InflictiveEntity stores information about possible elements and status attacks that the entity can use. The ResistantEntity stores information about possible elements and status effects that the entity can resist. It would use information taken from InflictiveEntity to combat the effects.


== Display Indicators ==
== Display Indicators ==


These are some ideas for status indicators:
With multiple status effects it would be a good idea to rework how statuses are indicated to the player. Too many icons overlaying the character sprite could be problematic. Currently the other indications of status are a message sent to the player when status is inflicted and a dedicated section of the client to display icons. The icon area is a bit small and sometimes statuses could be overlooked. It might be a good idea move the icons to be shown, partially transparent, in a corner of the client display area.

[[ File:Status_indicator_mockup.png ]]

Another option is to use animated overlays on the sprite that represent the effect. Some examples are listed below.


{| class="wikitable"
{| class="wikitable"
Line 181: Line 246:
| zombie || sprite colors become pale greenish || [[ File:Status_zombie_mockup.png ]]
| zombie || sprite colors become pale greenish || [[ File:Status_zombie_mockup.png ]]
|-
|-
| shock || lightning-like images at the side of character || [[ File:Status_shock_mockup.gif ]]
| shock || electric-like images at the side of character || [[ File:Status_shock_mockup.gif ]]
|-
|-
| confused || question mark (or stars) near or circling character's head || [[ File:Status_confused_mockup.gif ]]
| confused || question mark (or stars) near or circling character's head || [[ File:Status_confused_mockup.gif ]]