A model representing a buff used to modify the flow of the battle.
+
+
+
+
+
+
+
+ $activateAt
+
+
+
+
+
+
+ A value determining when the buffs activates.
+
+
+ private
+ int
+ $activateAt
+
+
+
+
+
+
+
+ -
+ Column
+
+ -
+
+
+
+
+
+
+
+
+
+ $badguyAttackModifier
+
+
+
+
+
+
+ Modifies the badguy's attack value.
+
+
+ private
+ float
+ $badguyAttackModifier
+ = 1
+
+
+
+
+
+
+ -
+ Column
+
+ -
+
+
+
+
+
+
+
+
+
+ $badguyDamageModifier
+
+
+
+
+
+
+ Modifies the damage applied to the badguy.
+
+
+ private
+ float
+ $badguyDamageModifier
+ = 1
+
+
+
+
+
+
+ -
+ Column
+
+ -
+
+
+
+
+
+
+
+
+
+ $badguyDamageReflection
+
+
+
+
+
+
+ Fraction of damage that is reflected to the goodguy if damage is applied to the badguy.
+
+
+ private
+ float
+ $badguyDamageReflection
+ = 0
+
+
+
+
+
+
+ -
+ Column
+
+ -
+
+
+
+
+
+
+
+
+
+ $badguyDefenseModifier
+
+
+
+
+
+
+ Modified the badguy's defense value.
+
+
+ private
+ float
+ $badguyDefenseModifier
+ = 1
+
+
+
+
+
+
+ -
+ Column
+
+ -
+
+
+
+
+
+
+
+
+
+ $badguyInvulnurable
+
+
+
+
+
+
+ True if the badguy stays invulnurable during the buffs duration.
+
+
+ private
+ bool
+ $badguyInvulnurable
+ = false
+
+
+
+
+
+
+ -
+ Column
+
+ -
+
+
+
+
+
+
+
+
+
+ $badguyLifetap
+
+
+
+
+
+
+ Fraction of damage applied to the badguy that gets converted to health ("absorb") for the goodguy.
+
+
+ private
+ float
+ $badguyLifetap
+ = 0
+
+
+
+
+
+
+ -
+ Column
+
+ -
+
+
+
+
+
+
+
+
+
+ $badguyRegeneration
+
+
+
+
+
+
+ Number of healthpoints the badguy regenerates.
+
+
+ private
+ int
+ $badguyRegeneration
+ = 0
+
+
+
+
+
+
+ -
+ Column
+
+ -
+
+
+
+
+
+
+
+
+
+ $buffArrayTemplate
+
+
+
+
+
+
+ Allowed buff values and their type.
+
+
+ private
+ static array<string|int, mixed>
+ $buffArrayTemplate
+ = ["slot" => "string", "name" => "string", "startMessage" => "string", "roundMessage" => "string", "endMessage" => "string", "effectSucceedsMessage" => "string", "effectFailsMessage" => "string", "noEffectMessage" => "string", "newDayMessage" => "string", "activateAt" => "int", "survivesNewDay" => "bool", "expiresAfterBattle" => "bool", "rounds" => "int", "badguyRegeneration" => "int", "goodguyRegeneration" => "int", "badguyLifetap" => "float", "goodguyLifetap" => "float", "badguyDamageReflection" => "float", "goodguyDamageReflection" => "float", "numberOfMinions" => "int", "minionMinBadguyDamage" => "int", "minionMaxBadguyDamage" => "int", "minionMinGoodguyDamage" => "int", "minionMaxGoodguyDamage" => "int", "badguyDamageModifier" => "float", "badguyAttackModifier" => "float", "badguyDefenseModifier" => "float", "badguyInvulnurable" => "bool", "goodguyDamageModifier" => "float", "goodguyAttackModifier" => "float", "goodguyDefenseModifier" => "float", "goodguyInvulnurable" => "bool"]
+
+
+
+
+
+
+
+
+ $character
+
+
+
+
+
+
+
+
+ private
+ mixed
+ $character
+
+
+
+
+
+
+
+
+ -
+ ManyToOne
+
+ -
+
+
(targetEntity="Character", inversedBy="buffs")
+
+
+
+ -
+ JoinColumn
+
+ -
+
+
+
+
+
+
+
+
+
+ $effectFailsMessage
+
+
+
+
+
+
+ The message given if the effect fails.
+
+
+ private
+ string
+ $effectFailsMessage
+ = ""
+
+
+
+
+
+
+ -
+ Column
+
+ -
+
+
+
+
+
+
+
+
+
+ $effectSucceedsMessage
+
+
+
+
+
+
+ The message given if the effect has success.
+
+
+ private
+ string
+ $effectSucceedsMessage
+ = ""
+
+
+
+
+
+
+ -
+ Column
+
+ -
+
+
+
+
+
+
+
+
+
+ $endMessage
+
+
+
+
+
+
+ The message given if the buff ends.
+
+
+ private
+ string
+ $endMessage
+ = ""
+
+
+
+
+
+
+ -
+ Column
+
+ -
+
+
+
+
+
+
+
+
+
+ $expiresAfterBattle
+
+
+
+
+
+
+ True if the buff should expire if the battle ended.
+
+
+ private
+ bool
+ $expiresAfterBattle
+ = false
+
+
+
+
+
+
+ -
+ Column
+
+ -
+
+
+
+
+
+
+
+
+
+ $goodguyAttackModifier
+
+
+
+
+
+
+ Modifies the goodguy's attack value.
+
+
+ private
+ float
+ $goodguyAttackModifier
+ = 1
+
+
+
+
+
+
+ -
+ Column
+
+ -
+
+
+
+
+
+
+
+
+
+ $goodguyDamageModifier
+
+
+
+
+
+
+ Modifies the damage applied to the goodguy.
+
+
+ private
+ float
+ $goodguyDamageModifier
+ = 1
+
+
+
+
+
+
+ -
+ Column
+
+ -
+
+
+
+
+
+
+
+
+
+ $goodguyDamageReflection
+
+
+
+
+
+
+ Fraction of damage that is reflected to the badguy if damage is applied to the goodguy.
+
+
+ private
+ float
+ $goodguyDamageReflection
+ = 0
+
+
+
+
+
+
+ -
+ Column
+
+ -
+
+
+
+
+
+
+
+
+
+ $goodguyDefenseModifier
+
+
+
+
+
+
+ Modifies the goodguy's defense value.
+
+
+ private
+ float
+ $goodguyDefenseModifier
+ = 1
+
+
+
+
+
+
+ -
+ Column
+
+ -
+
+
+
+
+
+
+
+
+
+ $goodguyInvulnurable
+
+
+
+
+
+
+ True if the goodguy stays invulnurable during the buffs duration.
+
+
+ private
+ bool
+ $goodguyInvulnurable
+ = false
+
+
+
+
+
+
+ -
+ Column
+
+ -
+
+
+
+
+
+
+
+
+
+ $goodguyLifetap
+
+
+
+
+
+
+ Fraction of damage applied to the goodguy that gets converted to health for the badguy.
+
+
+ private
+ float
+ $goodguyLifetap
+ = 0
+
+
+
+
+
+
+ -
+ Column
+
+ -
+
+
+
+
+
+
+
+
+
+ $goodguyRegeneration
+
+
+
+
+
+
+ Number of healthpoints the goodguy regenerates.
+
+
+ private
+ int
+ $goodguyRegeneration
+ = 0
+
+
+
+
+
+
+ -
+ Column
+
+ -
+
+
+
+
+
+
+
+
+
+ $hasBeenStarted
+
+
+
+
+
+
+ True if the buff has already been started.
+
+
+ private
+ bool
+ $hasBeenStarted
+ = false
+
+
+
+
+
+
+ -
+ Column
+
+ -
+
+
+
+
+
+
+
+
+
+ $id
+
+
+
+
+
+
+
+
+ private
+ mixed
+ $id
+
+
+
+
+
+
+
+
+ -
+ Id
+
+ -
+
+
@Column(type="uuid", unique=True)
+
+
+
+
+
+
+
+
+ $minionMaxBadguyDamage
+
+
+
+
+
+
+ Maximum damage done to the badguy by the minions (if $numberOfMinions > 0).
+
+
+ private
+ int
+ $minionMaxBadguyDamage
+ = 0
+
+
+
+
+
+
+ -
+ Column
+
+ -
+
+
+
+
+
+
+
+
+
+ $minionMaxGoodguyDamage
+
+
+
+
+
+
+ Maximum damage done to the goodguy by the minions (if $numberOfMinions > 0).
+
+
+ private
+ int
+ $minionMaxGoodguyDamage
+ = 0
+
+
+
+
+
+
+ -
+ Column
+
+ -
+
+
+
+
+
+
+
+
+
+ $minionMinBadguyDamage
+
+
+
+
+
+
+ Minium damage done to the badguy by the minions (if $numberOfMinions > 0).
+
+
+ private
+ int
+ $minionMinBadguyDamage
+ = 0
+
+
+
+
+
+
+ -
+ Column
+
+ -
+
+
+
+
+
+
+
+
+
+ $minionMinGoodguyDamage
+
+
+
+
+
+
+ Minium damage done to the goodguy by the minions (if $numberOfMinions > 0).
+
+
+ private
+ int
+ $minionMinGoodguyDamage
+ = 0
+
+
+
+
+
+
+ -
+ Column
+
+ -
+
+
+
+
+
+
+
+
+
+ $name
+
+
+
+
+
+
+ Name of the buff.
+
+
+ private
+ string
+ $name
+
+
+
+
+
+
+
+ -
+ Column
+
+ -
+
+
+
+
+
+
+
+
+
+ $newDayMessage
+
+
+
+
+
+
+ Message that gets displayed every new day.
+
+
+ private
+ string
+ $newDayMessage
+ = ""
+
+
+
+
+
+
+ -
+ Column
+
+ -
+
+
+
+
+
+
+
+
+
+ $noEffectMessage
+
+
+
+
+
+
+ The message given if the effect has no effect.
+
+
+ private
+ string
+ $noEffectMessage
+ = ""
+
+
+
+
+
+
+ -
+ Column
+
+ -
+
+
+
+
+
+
+
+
+
+ $numberOfMinions
+
+
+
+
+
+
+ Number of minions.
+
+
+ private
+ int
+ $numberOfMinions
+ = 0
+
+
+
+
+
+
+ -
+ Column
+
+ -
+
+
+
+
+
+
+
+
+
+ $required
+
+
+
+
+
+
+ Requried buff values.
+
+
+ private
+ type
+ $required
+ = ["slot", "activateAt"]
+
+
+
+
+
+
+
+
+ $roundMessage
+
+
+
+
+
+
+ The message given every round.
+
+
+ private
+ string
+ $roundMessage
+ = ""
+
+
+
+
+
+
+ -
+ Column
+
+ -
+
+
+
+
+
+
+
+
+
+ $rounds
+
+
+
+
+
+
+ The number of rounds this buff lasts.
+
+
+ private
+ int
+ $rounds
+ = 1
+
+ Gets reduces very round by 1. If the value is < 0, the buff is permament until a new day arises.
+
+
+
+
+
+
+ -
+ Column
+
+ -
+
+
+
+
+
+
+
+
+
+ $slot
+
+
+
+
+
+
+
+
+ private
+ mixed
+ $slot
+
+
+
+
+
+
+
+
+ -
+ Column
+
+ -
+
+
+
+
+
+
+
+
+
+ $startMessage
+
+
+
+
+
+
+ The message given upon activation of the buff.
+
+
+ private
+ string
+ $startMessage
+ = ""
+
+
+
+
+
+
+ -
+ Column
+
+ -
+
+
+
+
+
+
+
+
+
+ $survivesNewDay
+
+
+
+
+
+
+ True if the buff survives a new day.
+
+
+ private
+ bool
+ $survivesNewDay
+ = false
+
+
+
+
+
+
+ -
+ Column
+
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+ __construct()
+
+
+
+
+ Creates a new buff entity using an array.
+
+
+ public
+ __construct(array<string|int, mixed> $buffArray) : mixed
+
+
+ Parameters
+
+ -
+ $buffArray
+ : array<string|int, mixed>
+
+ -
+
+
+
+
+
+
+
+ -
+ throws
+
+ -
+ ArgumentException
+
+
+
+
+
+ Return values
+ mixed
+ —
+
+
+
+
+
+ badguyIsInvulnurable()
+
+
+
+
+ Returns true if the badguy is invulnurable.
+
+
+ public
+ badguyIsInvulnurable() : bool
+
+
+
+
+
+ Return values
+ bool
+ —
+
+
+
+
+
+ constructFromTemplate()
+
+
+
+
+ Creates a new buff entity using another buff as the template.
+
+
+ public
+ static constructFromTemplate(Buff $buff) : Buff
+
+
+ Parameters
+
+ -
+ $buff
+ : Buff
+
+ -
+
+
+
+
+
+
+ Return values
+ Buff
+ —
+
+
+
+
+
+ decreaseRounds()
+
+
+
+
+ Decreases the number of rounds left.
+
+
+ public
+ decreaseRounds([int $roundsToDecrease = 1 ]) : mixed
+
+
+ Parameters
+
+ -
+ $roundsToDecrease
+ : int
+ = 1
+ -
+
+
+
+
+
+
+ Return values
+ mixed
+ —
+
+
+
+
+
+ expiresAfterBattle()
+
+
+
+
+ Returns true if the buff expires after the battle.
+
+
+ public
+ expiresAfterBattle() : bool
+
+
+
+
+
+ Return values
+ bool
+ —
+
+
+
+
+
+ getActivateAt()
+
+
+
+
+ Returns the flags when this buff activates its effects.
+
+
+ public
+ getActivateAt() : int
+
+
+
+
+
+ Return values
+ int
+ —
+
+
+
+
+
+ getBadguyAttackModifier()
+
+
+
+
+ Returns a factor which modifies the badguy's attack value.
+
+
+ public
+ getBadguyAttackModifier() : float
+
+
+
+
+
+ Return values
+ float
+ —
+
+
+
+
+
+ getBadguyDamageModifier()
+
+
+
+
+ Returns a factor which modifies the damage applied TO the badguy.
+
+
+ public
+ getBadguyDamageModifier() : float
+
+
+
+
+
+ Return values
+ float
+ —
+
+
+
+
+
+ getBadguyDamageReflection()
+
+
+
+
+ Returns the fraction of the damage applied to the badguy that gets reflected to the goodguy.
+
+
+ public
+ getBadguyDamageReflection() : float
+
+
+
+
+
+ Return values
+ float
+ —
+
+
+
+
+
+ getBadguyDefenseModifier()
+
+
+
+
+ Returns a factor which modified the badguy's defense value.
+
+
+ public
+ getBadguyDefenseModifier() : float
+
+
+
+
+
+ Return values
+ float
+ —
+
+
+
+
+
+ getBadguyLifetap()
+
+
+
+
+ Returns the fraction of life that gets absorbed from the damage applied to the badguy.
+
+
+ public
+ getBadguyLifetap() : float
+
+
+
+
+
+ Return values
+ float
+ —
+
+
+
+
+
+ getBadguyRegeneration()
+
+
+
+
+ Returns the amount of health the badguy gets healed.
+
+
+ public
+ getBadguyRegeneration() : int
+
+
+
+
+
+ Return values
+ int
+ —
+
+
+
+
+
+ getCharacter()
+
+
+
+
+ Returns the Character this buff has been applied to.
+
+
+ public
+ getCharacter() : Character
+
+
+
+
+
+ Return values
+ Character
+ —
+
+
+
+
+
+ getEffectFailsMessage()
+
+
+
+
+ Returns the message displayed when the buff's effect fails.
+
+
+ public
+ getEffectFailsMessage() : string
+
+
+
+
+
+ Return values
+ string
+ —
+
+
+
+
+
+ getEffectSucceedsMessage()
+
+
+
+
+ Returns the message displayed when the buff's effect succeeds.
+
+
+ public
+ getEffectSucceedsMessage() : string
+
+
+
+
+
+ Return values
+ string
+ —
+
+
+
+
+
+ getEndMessage()
+
+
+
+
+ Returns the message displayed upon the end of the buff's lifetime.
+
+
+ public
+ getEndMessage() : string
+
+
+
+
+
+ Return values
+ string
+ —
+
+
+
+
+
+ getGoodguyAttackModifier()
+
+
+
+
+ Returns a factor which modifies the goodguy's attack value.
+
+
+ public
+ getGoodguyAttackModifier() : float
+
+
+
+
+
+ Return values
+ float
+ —
+
+
+
+
+
+ getGoodguyDamageModifier()
+
+
+
+
+ Returns a factor which modifies the damage applied TO the goodguy.
+
+
+ public
+ getGoodguyDamageModifier() : float
+
+
+
+
+
+ Return values
+ float
+ —
+
+
+
+
+
+ getGoodguyDamageReflection()
+
+
+
+
+ Returns the fraction of the damage applied to the goodguy that gets reflected to the badguy.
+
+
+ public
+ getGoodguyDamageReflection() : float
+
+
+
+
+
+ Return values
+ float
+ —
+
+
+
+
+
+ getGoodguyDefenseModifier()
+
+
+
+
+ Returns a factor which modified the goodguy's defense value.
+
+
+ public
+ getGoodguyDefenseModifier() : float
+
+
+
+
+
+ Return values
+ float
+ —
+
+
+
+
+
+ getGoodguyLifetap()
+
+
+
+
+ Returns the fraction of life that gets absorbed from the damage applied to the goodguy.
+
+
+ public
+ getGoodguyLifetap() : float
+
+
+
+
+
+ Return values
+ float
+ —
+
+
+
+
+
+ getGoodguyRegeneration()
+
+
+
+
+ Returns the number of health the goodguy gets healed.
+
+
+ public
+ getGoodguyRegeneration() : int
+
+
+
+
+
+ Return values
+ int
+ —
+
+
+
+
+
+ getId()
+
+
+
+
+ Returns the id of the buff.
+
+
+ public
+ getId() : int
+
+
+
+
+
+ Return values
+ int
+ —
+
+
+
+
+
+ getMinionMaxBadguyDamage()
+
+
+
+
+ Returns the maximum damage a minion afflicts to the badguy.
+
+
+ public
+ getMinionMaxBadguyDamage() : int
+
+
+
+
+
+ Return values
+ int
+ —
+
+
+
+
+
+ getMinionMaxGoodguyDamage()
+
+
+
+
+ Returns the maximum damage a minion afflicts to the goodguy.
+
+
+ public
+ getMinionMaxGoodguyDamage() : int
+
+
+
+
+
+ Return values
+ int
+ —
+
+
+
+
+
+ getMinionMinBadguyDamage()
+
+
+
+
+ Returns the minium damage a minion afflicts to the badguy.
+
+
+ public
+ getMinionMinBadguyDamage() : int
+
+
+
+
+
+ Return values
+ int
+ —
+
+
+
+
+
+ getMinionMinGoodguyDamage()
+
+
+
+
+ Returns the minium damage a minion afflicts to the goodguy.
+
+
+ public
+ getMinionMinGoodguyDamage() : int
+
+
+
+
+
+ Return values
+ int
+ —
+
+
+
+
+
+ getName()
+
+
+
+
+ Returns the buff's name.
+
+
+ public
+ getName() : string
+
+
+
+
+
+ Return values
+ string
+ —
+
+
+
+
+
+ getNewDayMessage()
+
+
+
+
+ Returns the message at the dawn of a new day.
+
+
+ public
+ getNewDayMessage() : string
+
+
+
+
+
+ Return values
+ string
+ —
+
+
+
+
+
+ getNoEffectMessage()
+
+
+
+
+ Returns the message displayed when the buff has no effect at all.
+
+
+ public
+ getNoEffectMessage() : string
+
+
+
+
+
+ Return values
+ string
+ —
+
+
+
+
+
+ getNumberOfMinions()
+
+
+
+
+ Returns the number of minions.
+
+
+ public
+ getNumberOfMinions() : int
+
+
+
+
+
+ Return values
+ int
+ —
+
+
+
+
+
+ getRoundMessage()
+
+
+
+
+ Returns the message displayed every round.
+
+
+ public
+ getRoundMessage() : string
+
+
+
+
+
+ Return values
+ string
+ —
+
+
+
+
+
+ getRounds()
+
+
+
+
+ Returns the number of rounds left.
+
+
+ public
+ getRounds() : int
+
+
+
+
+
+ Return values
+ int
+ —
+
+
+
+
+
+ getsActivatedAt()
+
+
+
+
+ Checks if this buff gets activated.
+
+
+ public
+ getsActivatedAt(int $flag) : bool
+
+
+ Parameters
+
+ -
+ $flag
+ : int
+
+ -
+
+
+
+
+
+
+ Return values
+ bool
+ —
+
+
+
+
+
+ getSlot()
+
+
+
+
+ Returns the slot this buff occupies.
+
+
+ public
+ getSlot() : string
+
+
+
+
+
+ Return values
+ string
+ —
+
+
+
+
+
+ getStartMessage()
+
+
+
+
+ Returns the message displayed upon buff activation.
+
+
+ public
+ getStartMessage() : string
+
+
+
+
+
+ Return values
+ string
+ —
+
+
+
+
+
+ goodguyIsInvulnurable()
+
+
+
+
+ Returns true if the goodguy is invulnurable.
+
+
+ public
+ goodguyIsInvulnurable() : bool
+
+
+
+
+
+ Return values
+ bool
+ —
+
+
+
+
+
+ hasBeenStarted()
+
+
+
+
+ Returns true if the buff has already been started.
+
+
+ public
+ hasBeenStarted() : bool
+
+
+
+
+
+ Return values
+ bool
+ —
+
+
+
+
+
+ setHasBeenStarted()
+
+
+
+
+ Sets if the buff has been started (or not).
+
+
+ public
+ setHasBeenStarted([bool $setTo = true ]) : mixed
+
+
+ Parameters
+
+ -
+ $setTo
+ : bool
+ = true
+ -
+
+
+
+
+
+
+ Return values
+ mixed
+ —
+
+
+
+
+
+ setRounds()
+
+
+
+
+ Sets the number of rounds left.
+
+
+ public
+ setRounds(int $rounds) : mixed
+
+
+ Parameters
+
+ -
+ $rounds
+ : int
+
+ -
+
+
+
+
+
+
+ Return values
+ mixed
+ —
+
+
+
+
+
+ survivesNewDay()
+
+
+
+
+ Returns true if the buff survives a new day.
+
+
+ public
+ survivesNewDay() : bool
+
+
+
+
+
+ Return values
+ bool
+ —
+
+
+
+
+
+
+
+
+