Class: Battle::Effects::EffectsHandler
- Defined in:
- docs/5_Battle_06_Effects.rb
Overview
Class responsive of handling the effects active on something (terrain, pokemon, bank position)
Instance Method Summary collapse
-
#add(effect)
Add an effect.
-
#delete_specific_dead_effect(name)
Delete specific dead effect.
-
#deleted_dead_effects
Delete all the effect that should be deleted.
-
#each(&block) {|effect| ... }
Call something on all effects.
-
#get(name = nil, &block) {|effect| ... } ⇒ EffectBase?
Get an effect using its name or a block.
-
#get_all(name = nil, &block) {|effect| ... } ⇒ Array<EffectBase>, Array<NilClass>
Get every effects responding to a name or a block.
-
#has?(name = nil, &block) {|effect| ... } ⇒ Boolean
Tell if an effect is present.
-
#initialize ⇒ EffectsHandler
constructor
Create a new effect handler.
-
#replace(effect, &block)
Replace the effects matching the block by the new one.
-
#update_counter
Update the counter of all effects.
Constructor Details
#initialize ⇒ EffectsHandler
Create a new effect handler
7 8 |
# File 'docs/5_Battle_06_Effects.rb', line 7 def initialize end |
Instance Method Details
#add(effect)
Add an effect
21 22 |
# File 'docs/5_Battle_06_Effects.rb', line 21 def add(effect) end |
#delete_specific_dead_effect(name)
Delete specific dead effect
53 54 |
# File 'docs/5_Battle_06_Effects.rb', line 53 def delete_specific_dead_effect(name) end |
#deleted_dead_effects
Delete all the effect that should be deleted
49 50 |
# File 'docs/5_Battle_06_Effects.rb', line 49 def deleted_dead_effects end |
#each(&block) {|effect| ... }
automatically calls deleted_dead_effects if a block is given
Call something on all effects
46 47 |
# File 'docs/5_Battle_06_Effects.rb', line 46 def each(&block) end |
#get(name = nil, &block) {|effect| ... } ⇒ EffectBase?
Get an effect using its name or a block
33 34 |
# File 'docs/5_Battle_06_Effects.rb', line 33 def get(name = nil, &block) end |
#get_all(name = nil, &block) {|effect| ... } ⇒ Array<EffectBase>, Array<NilClass>
Get every effects responding to a name or a block
40 41 |
# File 'docs/5_Battle_06_Effects.rb', line 40 def get_all(name = nil, &block) end |
#has?(name = nil, &block) {|effect| ... } ⇒ Boolean
Tell if an effect is present
17 18 |
# File 'docs/5_Battle_06_Effects.rb', line 17 def has?(name = nil, &block) end |
#replace(effect, &block)
Replace the effects matching the block by the new one
26 27 |
# File 'docs/5_Battle_06_Effects.rb', line 26 def replace(effect, &block) end |
#update_counter
Update the counter of all effects
10 11 |
# File 'docs/5_Battle_06_Effects.rb', line 10 def update_counter end |