Turn

Qualified name:Ouxsoft\LuckByDice\Turn
Implements:TurnInterface
class Turn
public __construct(Notation $notation, Cup $cup, Luck $luck[, string $expression])

Turn constructor.

Parameters:
  • $notation (Notation) –
  • $cup (Cup) –
  • $luck (Luck) –
  • $expression (string) – Default: null
Returns:

Turn::setByString()

public getCup() → Cup

Gets a Cup containing all Collections of Dice

Returns:Cup
public getExtraBonus() → int

Get extra bonuses that could not be absorbed by dice. This could be used for determining critical, etc. in game engines, etc.

Returns:int –
public getLuck() → int

Get Luck

Returns:int –
public getMaxPotential() → int

Get maximum potential of all Collections in Cup

Returns:int –
public getMinPotential() → int

Get minimum potential of all Collections in Cup

Returns:int –
public getNotation() → string

Get the dice notation for the entire cup

Returns:string –
public getTotal() → int

Gets the Cups total which contains the outcome of all Collections of Dice

Returns:int –
public roll() → int

Roll each dice group, update luck, and return outcome with luck modifier applied

Returns:int – total
public setLuck(int $luck)

Set Luck

Parameters:
  • $luck (int) –