Class: Contest::Effects::EffectBase

Inherits:
Object
  • Object
show all
Defined in:
docs/6_Contest_06_Effects.rb

Overview

Class describing an abstract contest effect

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(logic, contestant) ⇒ EffectBase

Create a new effect

Parameters:

  • logic (Contest::Logic) —

    Logic used to get all the handler in order to allow the effect to work

  • contestant (ContestCreature) —

    Contestant that has this effect



17
18
# File 'docs/6_Contest_06_Effects.rb', line 17

def initialize(logic, contestant)
end

Instance Attribute Details

#contestant ⇒ ContestCreature (readonly)

Contestant that has this effect

Returns:

  • (ContestCreature)


13
14
15
# File 'docs/6_Contest_06_Effects.rb', line 13

def contestant
  @contestant
end

#counter ⇒ Integer

Counter of the effect

Returns:

  • (Integer)


10
11
12
# File 'docs/6_Contest_06_Effects.rb', line 10

def counter
  @counter
end

#logic ⇒ Contest::Logic (readonly)

The Logic class of the contest

Returns:



7
8
9
# File 'docs/6_Contest_06_Effects.rb', line 7

def logic
  @logic
end

Instance Method Details

#appeal_modifier(launcher, skill) ⇒ Integer

Function modifying the amount of appeal points gained

Parameters:

Returns:

  • (Integer) —

    The appeal points modification to apply



49
50
# File 'docs/6_Contest_06_Effects.rb', line 49

def appeal_modifier(launcher, skill)
end

#dead? ⇒ Boolean

Function telling if the effect should be removed from effects handler

Returns:

  • (Boolean)


28
29
# File 'docs/6_Contest_06_Effects.rb', line 28

def dead?
end

#jam_modifier(skill) ⇒ Integer

Function modifying the amount of jam received

Parameters:

Returns:

  • (Integer) —

    The jam points modification to apply



54
55
# File 'docs/6_Contest_06_Effects.rb', line 54

def jam_modifier(skill)
end

#kill

Kill the effect (in order to remove it from the effects handler)



35
36
# File 'docs/6_Contest_06_Effects.rb', line 35

def kill
end

#name ⇒ Symbol

Function giving the name of the effect

Returns:

  • (Symbol)


32
33
# File 'docs/6_Contest_06_Effects.rb', line 32

def name
end

#on_delete

Function called when the effect has been deleted from the effects handler



38
39
# File 'docs/6_Contest_06_Effects.rb', line 38

def on_delete
end

#on_jam(launcher, skill)

Function called when the creature is getting jammed

Parameters:



43
44
# File 'docs/6_Contest_06_Effects.rb', line 43

def on_jam(launcher, skill)
end

#update_counter

Function that updates the counter of the effect



24
25
# File 'docs/6_Contest_06_Effects.rb', line 24

def update_counter
end