Menu

## Buff
in package

Buff.php : 18

A model representing a buff used to modify the flow of the battle.

##### Tags

Entity
Table

  (name="buffs")

### Table of Contents

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

### Constants

#### ACTIVATE_ANY

Buff.php : 26
`public mixed ACTIVATE_ANY = 0b1111`

#### ACTIVATE_DEFENSE

Buff.php : 23
`public mixed ACTIVATE_DEFENSE = 0b1000`

#### ACTIVATE_NONE

Buff.php : 25
`public mixed ACTIVATE_NONE = 0b0`

#### ACTIVATE_OFFENSE

Buff.php : 22
`public mixed ACTIVATE_OFFENSE = 0b100`

#### ACTIVATE_ROUNDEND

Buff.php : 21
`public mixed ACTIVATE_ROUNDEND = 0b10`

#### ACTIVATE_ROUNDSTART

Buff.php : 20
`public mixed ACTIVATE_ROUNDSTART = 0b1`

#### ACTIVATE_WHILEROUND

Buff.php : 24
`public mixed ACTIVATE_WHILEROUND = 0b1100`

### Properties

#### $activateAt

Buff.php : 90

A value determining when the buffs activates.

`private int $activateAt`

##### Tags

Column

  (type="integer")

#### $badguyAttackModifier

Buff.php : 188

Modifies the badguy's attack value.

`private float $badguyAttackModifier = 1`

##### Tags

Column

  (type="float")

#### $badguyDamageModifier

Buff.php : 182

Modifies the damage applied to the badguy.

`private float $badguyDamageModifier = 1`

##### Tags

Column

  (type="float")

#### $badguyDamageReflection

Buff.php : 140

Fraction of damage that is reflected to the goodguy if damage is applied to the badguy.

`private float $badguyDamageReflection = 0`

##### Tags

Column

  (type="float")

#### $badguyDefenseModifier

Buff.php : 194

Modified the badguy's defense value.

`private float $badguyDefenseModifier = 1`

##### Tags

Column

  (type="float")

#### $badguyInvulnurable

Buff.php : 200

True if the badguy stays invulnurable during the buffs duration.

`private bool $badguyInvulnurable = false`

##### Tags

Column

  (type="boolean")

#### $badguyLifetap

Buff.php : 128

Fraction of damage applied to the badguy that gets converted to health ("absorb") for the goodguy.

`private float $badguyLifetap = 0`

##### Tags

Column

  (type="float")

#### $badguyRegeneration

Buff.php : 116

Number of healthpoints the badguy regenerates.

`private int $badguyRegeneration = 0`

##### Tags

Column

  (type="integer")

#### $buffArrayTemplate

Buff.php : 236

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

Buff.php : 34
`private mixed $character`

##### Tags

ManyToOne

  (targetEntity="Character", inversedBy="buffs")

JoinColumn

  (nullable=True)

#### $effectFailsMessage

Buff.php : 72

The message given if the effect fails.

`private string $effectFailsMessage = ""`

##### Tags

Column

  (type="text")

#### $effectSucceedsMessage

Buff.php : 66

The message given if the effect has success.

`private string $effectSucceedsMessage = ""`

##### Tags

Column

  (type="text")

#### $endMessage

Buff.php : 60

The message given if the buff ends.

`private string $endMessage = ""`

##### Tags

Column

  (type="text")

#### $expiresAfterBattle

Buff.php : 102

True if the buff should expire if the battle ended.

`private bool $expiresAfterBattle = false`

##### Tags

Column

  (type="boolean")

#### $goodguyAttackModifier

Buff.php : 212

Modifies the goodguy's attack value.

`private float $goodguyAttackModifier = 1`

##### Tags

Column

  (type="float")

#### $goodguyDamageModifier

Buff.php : 206

Modifies the damage applied to the goodguy.

`private float $goodguyDamageModifier = 1`

##### Tags

Column

  (type="float")

#### $goodguyDamageReflection

Buff.php : 146

Fraction of damage that is reflected to the badguy if damage is applied to the goodguy.

`private float $goodguyDamageReflection = 0`

##### Tags

Column

  (type="float")

#### $goodguyDefenseModifier

Buff.php : 218

Modifies the goodguy's defense value.

`private float $goodguyDefenseModifier = 1`

##### Tags

Column

  (type="float")

#### $goodguyInvulnurable

Buff.php : 224

True if the goodguy stays invulnurable during the buffs duration.

`private bool $goodguyInvulnurable = false`

##### Tags

Column

  (type="boolean")

#### $goodguyLifetap

Buff.php : 134

Fraction of damage applied to the goodguy that gets converted to health for the badguy.

`private float $goodguyLifetap = 0`

##### Tags

Column

  (type="float")

#### $goodguyRegeneration

Buff.php : 122

Number of healthpoints the goodguy regenerates.

`private int $goodguyRegeneration = 0`

##### Tags

Column

  (type="integer")

#### $hasBeenStarted

Buff.php : 230

True if the buff has already been started.

`private bool $hasBeenStarted = false`

##### Tags

Column

  (type="boolean")

#### $id

Buff.php : 29
`private mixed $id`

##### Tags

Id

  @Column(type="uuid", unique=True)

#### $minionMaxBadguyDamage

Buff.php : 164

Maximum damage done to the badguy by the minions (if $numberOfMinions > 0).

`private int $minionMaxBadguyDamage = 0`

##### Tags

Column

  (type="integer")

#### $minionMaxGoodguyDamage

Buff.php : 176

Maximum damage done to the goodguy by the minions (if $numberOfMinions > 0).

`private int $minionMaxGoodguyDamage = 0`

##### Tags

Column

  (type="integer")

#### $minionMinBadguyDamage

Buff.php : 158

Minium damage done to the badguy by the minions (if $numberOfMinions > 0).

`private int $minionMinBadguyDamage = 0`

##### Tags

Column

  (type="integer")

#### $minionMinGoodguyDamage

Buff.php : 170

Minium damage done to the goodguy by the minions (if $numberOfMinions > 0).

`private int $minionMinGoodguyDamage = 0`

##### Tags

Column

  (type="integer")

#### $name

Buff.php : 42

Name of the buff.

`private string $name`

##### Tags

Column

  (type="string")

#### $newDayMessage

Buff.php : 84

Message that gets displayed every new day.

`private string $newDayMessage = ""`

##### Tags

Column

  (type="text")

#### $noEffectMessage

Buff.php : 78

The message given if the effect has no effect.

`private string $noEffectMessage = ""`

##### Tags

Column

  (type="text")

#### $numberOfMinions

Buff.php : 152

Number of minions.

`private int $numberOfMinions = 0`

##### Tags

Column

  (type="integer")

#### $required

Buff.php : 275

Requried buff values.

`private type $required = ["slot", "activateAt"]`

#### $roundMessage

Buff.php : 54

The message given every round.

`private string $roundMessage = ""`

##### Tags

Column

  (type="text")

#### $rounds

Buff.php : 110

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.

##### Tags

Column

  (type="integer")

#### $slot

Buff.php : 36
`private mixed $slot`

##### Tags

Column

  (type="string")

#### $startMessage

Buff.php : 48

The message given upon activation of the buff.

`private string $startMessage = ""`

##### Tags

Column

  (type="text")

#### $survivesNewDay

Buff.php : 96

True if the buff survives a new day.

`private bool $survivesNewDay = false`

##### Tags

Column

  (type="boolean")

### Methods

#### __construct()

Buff.php : 285

Creates a new buff entity using an array.

`public __construct(array<string|int, mixed> $buffArray) : mixed`

##### Parameters

$buffArray : array<string|int, mixed>

##### Tags

throws
  ArgumentException

##### Return values

mixed —

#### badguyIsInvulnurable()

Buff.php : 652

Returns true if the badguy is invulnurable.

`public badguyIsInvulnurable() : bool`

##### Return values

bool —

#### constructFromTemplate()

Buff.php : 341

Creates a new buff entity using another buff as the template.

`public static constructFromTemplate(Buff $buff) : Buff`

##### Parameters

$buff : Buff

##### Return values

Buff —

#### decreaseRounds()

Buff.php : 513

Decreases the number of rounds left.

`public decreaseRounds([int $roundsToDecrease = 1 ]) : mixed`

##### Parameters

$roundsToDecrease : int = 1

##### Return values

mixed —

#### expiresAfterBattle()

Buff.php : 486

Returns true if the buff expires after the battle.

`public expiresAfterBattle() : bool`

##### Return values

bool —

#### getActivateAt()

Buff.php : 455

Returns the flags when this buff activates its effects.

`public getActivateAt() : int`

##### Return values

int —

#### getBadguyAttackModifier()

Buff.php : 634

Returns a factor which modifies the badguy's attack value.

`public getBadguyAttackModifier() : float`

##### Return values

float —

#### getBadguyDamageModifier()

Buff.php : 625

Returns a factor which modifies the damage applied TO the badguy.

`public getBadguyDamageModifier() : float`

##### Return values

float —

#### getBadguyDamageReflection()

Buff.php : 562

Returns the fraction of the damage applied to the badguy that gets reflected to the goodguy.

`public getBadguyDamageReflection() : float`

##### Return values

float —

#### getBadguyDefenseModifier()

Buff.php : 643

Returns a factor which modified the badguy's defense value.

`public getBadguyDefenseModifier() : float`

##### Return values

float —

#### getBadguyLifetap()

Buff.php : 544

Returns the fraction of life that gets absorbed from the damage applied to the badguy.

`public getBadguyLifetap() : float`

##### Return values

float —

#### getBadguyRegeneration()

Buff.php : 526

Returns the amount of health the badguy gets healed.

`public getBadguyRegeneration() : int`

##### Return values

int —

#### getCharacter()

Buff.php : 365

Returns the Character this buff has been applied to.

`public getCharacter() : Character`

##### Return values

Character —

#### getEffectFailsMessage()

Buff.php : 428

Returns the message displayed when the buff's effect fails.

`public getEffectFailsMessage() : string`

##### Return values

string —

#### getEffectSucceedsMessage()

Buff.php : 419

Returns the message displayed when the buff's effect succeeds.

`public getEffectSucceedsMessage() : string`

##### Return values

string —

#### getEndMessage()

Buff.php : 410

Returns the message displayed upon the end of the buff's lifetime.

`public getEndMessage() : string`

##### Return values

string —

#### getGoodguyAttackModifier()

Buff.php : 670

Returns a factor which modifies the goodguy's attack value.

`public getGoodguyAttackModifier() : float`

##### Return values

float —

#### getGoodguyDamageModifier()

Buff.php : 661

Returns a factor which modifies the damage applied TO the goodguy.

`public getGoodguyDamageModifier() : float`

##### Return values

float —

#### getGoodguyDamageReflection()

Buff.php : 571

Returns the fraction of the damage applied to the goodguy that gets reflected to the badguy.

`public getGoodguyDamageReflection() : float`

##### Return values

float —

#### getGoodguyDefenseModifier()

Buff.php : 679

Returns a factor which modified the goodguy's defense value.

`public getGoodguyDefenseModifier() : float`

##### Return values

float —

#### getGoodguyLifetap()

Buff.php : 553

Returns the fraction of life that gets absorbed from the damage applied to the goodguy.

`public getGoodguyLifetap() : float`

##### Return values

float —

#### getGoodguyRegeneration()

Buff.php : 535

Returns the number of health the goodguy gets healed.

`public getGoodguyRegeneration() : int`

##### Return values

int —

#### getId()

Buff.php : 356

Returns the id of the buff.

`public getId() : int`

##### Return values

int —

#### getMinionMaxBadguyDamage()

Buff.php : 616

Returns the maximum damage a minion afflicts to the badguy.

`public getMinionMaxBadguyDamage() : int`

##### Return values

int —

#### getMinionMaxGoodguyDamage()

Buff.php : 598

Returns the maximum damage a minion afflicts to the goodguy.

`public getMinionMaxGoodguyDamage() : int`

##### Return values

int —

#### getMinionMinBadguyDamage()

Buff.php : 589

Returns the minium damage a minion afflicts to the badguy.

`public getMinionMinBadguyDamage() : int`

##### Return values

int —

#### getMinionMinGoodguyDamage()

Buff.php : 607

Returns the minium damage a minion afflicts to the goodguy.

`public getMinionMinGoodguyDamage() : int`

##### Return values

int —

#### getName()

Buff.php : 383

Returns the buff's name.

`public getName() : string`

##### Return values

string —

#### getNewDayMessage()

Buff.php : 446

Returns the message at the dawn of a new day.

`public getNewDayMessage() : string`

##### Return values

string —

#### getNoEffectMessage()

Buff.php : 437

Returns the message displayed when the buff has no effect at all.

`public getNoEffectMessage() : string`

##### Return values

string —

#### getNumberOfMinions()

Buff.php : 580

Returns the number of minions.

`public getNumberOfMinions() : int`

##### Return values

int —

#### getRoundMessage()

Buff.php : 401

Returns the message displayed every round.

`public getRoundMessage() : string`

##### Return values

string —

#### getRounds()

Buff.php : 495

Returns the number of rounds left.

`public getRounds() : int`

##### Return values

int —

#### getsActivatedAt()

Buff.php : 465

Checks if this buff gets activated.

`public getsActivatedAt(int $flag) : bool`

##### Parameters

$flag : int

##### Return values

bool —

#### getSlot()

Buff.php : 374

Returns the slot this buff occupies.

`public getSlot() : string`

##### Return values

string —

#### getStartMessage()

Buff.php : 392

Returns the message displayed upon buff activation.

`public getStartMessage() : string`

##### Return values

string —

#### goodguyIsInvulnurable()

Buff.php : 688

Returns true if the goodguy is invulnurable.

`public goodguyIsInvulnurable() : bool`

##### Return values

bool —

#### hasBeenStarted()

Buff.php : 697

Returns true if the buff has already been started.

`public hasBeenStarted() : bool`

##### Return values

bool —

#### setHasBeenStarted()

Buff.php : 706

Sets if the buff has been started (or not).

`public setHasBeenStarted([bool $setTo = true ]) : mixed`

##### Parameters

$setTo : bool = true

##### Return values

mixed —

#### setRounds()

Buff.php : 504

Sets the number of rounds left.

`public setRounds(int $rounds) : mixed`

##### Parameters

$rounds : int

##### Return values

mixed —

#### survivesNewDay()

Buff.php : 477

Returns true if the buff survives a new day.

`public survivesNewDay() : bool`

##### Return values

bool —

## Search results