Files
core/docs/classes/LotGD-Core-Battle.html
T
2021-09-06 06:13:11 +00:00

1744 lines
77 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Documentation</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<base href="../">
<link rel="icon" href="images/favicon.ico"/>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/base.css">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@400;600;700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="css/template.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0/css/all.min.css" integrity="sha256-ybRkN9dBjhcS2qrW1z+hfCxq+1aBdwyQM5wlQoQVt/0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-okaidia.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.css">
<script src="https://cdn.jsdelivr.net/npm/fuse.js@3.4.6"></script>
<script src="https://cdn.jsdelivr.net/npm/css-vars-ponyfill@2"></script>
<script src="js/search.js"></script>
<script defer src="js/searchIndex.js"></script>
</head>
<body id="top">
<header class="phpdocumentor-header phpdocumentor-section">
<h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">Documentation</a></h1>
<input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
<label class="phpdocumentor-header__menu-icon" for="menu-button">
<i class="fas fa-bars"></i>
</label>
<section data-search-form class="phpdocumentor-search">
<label>
<span class="visually-hidden">Search for</span>
<svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
<line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
</svg>
<input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
</label>
</section>
<nav class="phpdocumentor-topnav">
<ul class="phpdocumentor-topnav__menu">
</ul>
</nav>
</header>
<main class="phpdocumentor">
<div class="phpdocumentor-section">
<input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
<label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
Menu
</label>
<aside class="phpdocumentor-column -four phpdocumentor-sidebar">
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
<h4 class="phpdocumentor-sidebar__root-namespace"><a href="namespaces/lotgd.html">LotGD</a></h4>
<ul class="phpdocumentor-list">
<li>
<a href="namespaces/lotgd-core.html">Core</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
<h4 class="phpdocumentor-sidebar__root-namespace"><a href="packages/Application.html">Application</a></h4>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
</section>
</aside>
<div class="phpdocumentor-column -eight phpdocumentor-content">
<ul class="phpdocumentor-breadcrumbs">
<li class="phpdocumentor-breadcrumb"><a href="namespaces/lotgd.html">LotGD</a></li>
<li class="phpdocumentor-breadcrumb"><a href="namespaces/lotgd-core.html">Core</a></li>
</ul>
<article class="phpdocumentor-element -class">
<h2 class="phpdocumentor-content__title">
Battle
<div class="phpdocumentor-element__package">
in package
<ul class="phpdocumentor-breadcrumbs">
<li class="phpdocumentor-breadcrumb"><a href="packages/Application.html">Application</a></li>
</ul>
</div>
</h2>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="src/Battle.php"><a href="files/src-battle.html"><abbr title="src/Battle.php">Battle.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">23</span>
</aside>
<p class="phpdocumentor-summary">Class for managing and running battles between 2 participants.</p>
<section class="phpdocumentor-description"><p>Original damage calculation is from LotGD 0.9.7+jt by Eric Stevens and JTraub,
released originally under GPL 2.0.</p>
</section>
<h3 id="toc">
Table of Contents
<a href="#toc" class="headerlink"><i class="fas fa-link"></i></a>
</h3>
<dl class="phpdocumentor-table-of-contents">
<dt class="phpdocumentor-table-of-contents__entry -constant -public">
<a href="classes/LotGD-Core-Battle.html#constant_DAMAGEROUND_BOTH">DAMAGEROUND_BOTH</a>
<span>
&nbsp;= 0b11 </span>
</dt>
<dd></dd>
<dt class="phpdocumentor-table-of-contents__entry -constant -public">
<a href="classes/LotGD-Core-Battle.html#constant_DAMAGEROUND_MONSTER">DAMAGEROUND_MONSTER</a>
<span>
&nbsp;= 0b10 </span>
</dt>
<dd></dd>
<dt class="phpdocumentor-table-of-contents__entry -constant -public">
<a href="classes/LotGD-Core-Battle.html#constant_DAMAGEROUND_PLAYER">DAMAGEROUND_PLAYER</a>
<span>
&nbsp;= 0b1 </span>
</dt>
<dd></dd>
<dt class="phpdocumentor-table-of-contents__entry -constant -public">
<a href="classes/LotGD-Core-Battle.html#constant_RESULT_MONSTERDEATH">RESULT_MONSTERDEATH</a>
<span>
&nbsp;= 2 </span>
</dt>
<dd></dd>
<dt class="phpdocumentor-table-of-contents__entry -constant -public">
<a href="classes/LotGD-Core-Battle.html#constant_RESULT_PLAYERDEATH">RESULT_PLAYERDEATH</a>
<span>
&nbsp;= 1 </span>
</dt>
<dd></dd>
<dt class="phpdocumentor-table-of-contents__entry -constant -public">
<a href="classes/LotGD-Core-Battle.html#constant_RESULT_UNDECIDED">RESULT_UNDECIDED</a>
<span>
&nbsp;= 0 </span>
</dt>
<dd></dd>
<dt class="phpdocumentor-table-of-contents__entry -property -protected">
<a href="classes/LotGD-Core-Battle.html#property_configuration">$configuration</a>
<span>
&nbsp;: array&lt;string|int, mixed&gt; </span>
</dt>
<dd></dd>
<dt class="phpdocumentor-table-of-contents__entry -property -protected">
<a href="classes/LotGD-Core-Battle.html#property_events">$events</a>
<span>
&nbsp;: <abbr title="\Doctrine\Common\Collections\ArrayCollection">ArrayCollection</abbr> </span>
</dt>
<dd></dd>
<dt class="phpdocumentor-table-of-contents__entry -property -protected">
<a href="classes/LotGD-Core-Battle.html#property_game">$game</a>
<span>
&nbsp;: <a href="classes/LotGD-Core-Game.html"><abbr title="\LotGD\Core\Game">Game</abbr></a> </span>
</dt>
<dd></dd>
<dt class="phpdocumentor-table-of-contents__entry -property -protected">
<a href="classes/LotGD-Core-Battle.html#property_monster">$monster</a>
<span>
&nbsp;: <a href="classes/LotGD-Core-Models-FighterInterface.html"><abbr title="\LotGD\Core\Models\FighterInterface">FighterInterface</abbr></a>|null </span>
</dt>
<dd></dd>
<dt class="phpdocumentor-table-of-contents__entry -property -protected">
<a href="classes/LotGD-Core-Battle.html#property_player">$player</a>
<span>
&nbsp;: <a href="classes/LotGD-Core-Models-FighterInterface.html"><abbr title="\LotGD\Core\Models\FighterInterface">FighterInterface</abbr></a> </span>
</dt>
<dd></dd>
<dt class="phpdocumentor-table-of-contents__entry -property -protected">
<a href="classes/LotGD-Core-Battle.html#property_result">$result</a>
<span>
&nbsp;: int </span>
</dt>
<dd></dd>
<dt class="phpdocumentor-table-of-contents__entry -property -protected">
<a href="classes/LotGD-Core-Battle.html#property_round">$round</a>
<span>
&nbsp;: int </span>
</dt>
<dd></dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a href="classes/LotGD-Core-Battle.html#method___construct">__construct()</a>
<span>
&nbsp;: mixed </span>
</dt>
<dd>Takes a game object and two participants (Player and Monster) to fight a battle.</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a href="classes/LotGD-Core-Battle.html#method_disableCriticalHit">disableCriticalHit()</a>
<span>
&nbsp;: void </span>
</dt>
<dd>Disable critical hits.</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a href="classes/LotGD-Core-Battle.html#method_disableLevelAdjustement">disableLevelAdjustement()</a>
<span>
&nbsp;: void </span>
</dt>
<dd>Disables level adjustement.</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a href="classes/LotGD-Core-Battle.html#method_disableRiposte">disableRiposte()</a>
<span>
&nbsp;: void </span>
</dt>
<dd>Disables ripostes.</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a href="classes/LotGD-Core-Battle.html#method_enableCriticalHit">enableCriticalHit()</a>
<span>
&nbsp;: void </span>
</dt>
<dd>enables critical hits.</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a href="classes/LotGD-Core-Battle.html#method_enableLevelAdjustement">enableLevelAdjustement()</a>
<span>
&nbsp;: void </span>
</dt>
<dd>Enables level adjustement.</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a href="classes/LotGD-Core-Battle.html#method_enableRiposte">enableRiposte()</a>
<span>
&nbsp;: void </span>
</dt>
<dd>Enables ripostes.</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a href="classes/LotGD-Core-Battle.html#method_fightNRounds">fightNRounds()</a>
<span>
&nbsp;: int </span>
</dt>
<dd>Fights the number of rounds given by the parameter $n and returns the number
of actual rounds fought.</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a href="classes/LotGD-Core-Battle.html#method_getEvents">getEvents()</a>
<span>
&nbsp;: <abbr title="\Doctrine\Common\Collections\Collection">Collection</abbr> </span>
</dt>
<dd>Returns a list of all battle events.</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a href="classes/LotGD-Core-Battle.html#method_getLoser">getLoser()</a>
<span>
&nbsp;: <a href="classes/LotGD-Core-Models-FighterInterface.html"><abbr title="\LotGD\Core\Models\FighterInterface">FighterInterface</abbr></a> </span>
</dt>
<dd>Returns the loser of this fight.</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a href="classes/LotGD-Core-Battle.html#method_getMonster">getMonster()</a>
<span>
&nbsp;: <a href="classes/LotGD-Core-Models-FighterInterface.html"><abbr title="\LotGD\Core\Models\FighterInterface">FighterInterface</abbr></a> </span>
</dt>
<dd>Returns the montser instance.</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a href="classes/LotGD-Core-Battle.html#method_getPlayer">getPlayer()</a>
<span>
&nbsp;: <a href="classes/LotGD-Core-Models-FighterInterface.html"><abbr title="\LotGD\Core\Models\FighterInterface">FighterInterface</abbr></a> </span>
</dt>
<dd>Returns the player instance.</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a href="classes/LotGD-Core-Battle.html#method_getWinner">getWinner()</a>
<span>
&nbsp;: <a href="classes/LotGD-Core-Models-FighterInterface.html"><abbr title="\LotGD\Core\Models\FighterInterface">FighterInterface</abbr></a> </span>
</dt>
<dd>Returns the winner of this fight.</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a href="classes/LotGD-Core-Battle.html#method_isCriticalHitEnabled">isCriticalHitEnabled()</a>
<span>
&nbsp;: bool </span>
</dt>
<dd>Returns true if critical hit events are enabled.</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a href="classes/LotGD-Core-Battle.html#method_isLevelAdjustementEnabled">isLevelAdjustementEnabled()</a>
<span>
&nbsp;: bool </span>
</dt>
<dd>Returns true if level adjustements are enabled.</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a href="classes/LotGD-Core-Battle.html#method_isOver">isOver()</a>
<span>
&nbsp;: bool </span>
</dt>
<dd>Returns true if the battle is over.</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a href="classes/LotGD-Core-Battle.html#method_isRiposteEnabled">isRiposteEnabled()</a>
<span>
&nbsp;: bool </span>
</dt>
<dd>Returns true if ripostes are enabled.</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a href="classes/LotGD-Core-Battle.html#method_serialize">serialize()</a>
<span>
&nbsp;: string </span>
</dt>
<dd>Returns a string which contains the important fields that must be serialized.</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a href="classes/LotGD-Core-Battle.html#method_unserialize">unserialize()</a>
<span>
&nbsp;: self </span>
</dt>
<dd></dd>
<dt class="phpdocumentor-table-of-contents__entry -method -protected">
<a href="classes/LotGD-Core-Battle.html#method_fightOneRound">fightOneRound()</a>
<span>
&nbsp;: void </span>
</dt>
<dd>Fights exactly 1 round.</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -protected">
<a href="classes/LotGD-Core-Battle.html#method_turn">turn()</a>
<span>
&nbsp;: <abbr title="\Doctrine\Common\Collections\ArrayCollection">ArrayCollection</abbr> </span>
</dt>
<dd>Runs one turn.</dd>
</dl>
<section class="phpdocumentor-constants">
<h3 class="phpdocumentor-elements__header" id="constants">
Constants
<a href="classes/LotGD-Core-Battle.html#constants" class="headerlink"><i class="fas fa-link"></i></a>
</h3>
<article class="phpdocumentor-element -constant -public ">
<h4 class="phpdocumentor-element__name" id="constant_DAMAGEROUND_BOTH">
DAMAGEROUND_BOTH
<a href="classes/LotGD-Core-Battle.html#constant_DAMAGEROUND_BOTH" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="src/Battle.php"><a href="files/src-battle.html"><abbr title="src/Battle.php">Battle.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">27</span>
</aside>
<code class="phpdocumentor-signature phpdocumentor-code ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__type">mixed</span>
<span class="phpdocumentor-signature__name">DAMAGEROUND_BOTH</span>
= <span class="phpdocumentor-signature__default-value">0b11</span>
</code>
<section class="phpdocumentor-description"></section>
<section class="phpdocumentor-description"></section>
</article>
<article class="phpdocumentor-element -constant -public ">
<h4 class="phpdocumentor-element__name" id="constant_DAMAGEROUND_MONSTER">
DAMAGEROUND_MONSTER
<a href="classes/LotGD-Core-Battle.html#constant_DAMAGEROUND_MONSTER" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="src/Battle.php"><a href="files/src-battle.html"><abbr title="src/Battle.php">Battle.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">26</span>
</aside>
<code class="phpdocumentor-signature phpdocumentor-code ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__type">mixed</span>
<span class="phpdocumentor-signature__name">DAMAGEROUND_MONSTER</span>
= <span class="phpdocumentor-signature__default-value">0b10</span>
</code>
<section class="phpdocumentor-description"></section>
<section class="phpdocumentor-description"></section>
</article>
<article class="phpdocumentor-element -constant -public ">
<h4 class="phpdocumentor-element__name" id="constant_DAMAGEROUND_PLAYER">
DAMAGEROUND_PLAYER
<a href="classes/LotGD-Core-Battle.html#constant_DAMAGEROUND_PLAYER" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="src/Battle.php"><a href="files/src-battle.html"><abbr title="src/Battle.php">Battle.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">25</span>
</aside>
<code class="phpdocumentor-signature phpdocumentor-code ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__type">mixed</span>
<span class="phpdocumentor-signature__name">DAMAGEROUND_PLAYER</span>
= <span class="phpdocumentor-signature__default-value">0b1</span>
</code>
<section class="phpdocumentor-description"></section>
<section class="phpdocumentor-description"></section>
</article>
<article class="phpdocumentor-element -constant -public ">
<h4 class="phpdocumentor-element__name" id="constant_RESULT_MONSTERDEATH">
RESULT_MONSTERDEATH
<a href="classes/LotGD-Core-Battle.html#constant_RESULT_MONSTERDEATH" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="src/Battle.php"><a href="files/src-battle.html"><abbr title="src/Battle.php">Battle.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">31</span>
</aside>
<code class="phpdocumentor-signature phpdocumentor-code ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__type">mixed</span>
<span class="phpdocumentor-signature__name">RESULT_MONSTERDEATH</span>
= <span class="phpdocumentor-signature__default-value">2</span>
</code>
<section class="phpdocumentor-description"></section>
<section class="phpdocumentor-description"></section>
</article>
<article class="phpdocumentor-element -constant -public ">
<h4 class="phpdocumentor-element__name" id="constant_RESULT_PLAYERDEATH">
RESULT_PLAYERDEATH
<a href="classes/LotGD-Core-Battle.html#constant_RESULT_PLAYERDEATH" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="src/Battle.php"><a href="files/src-battle.html"><abbr title="src/Battle.php">Battle.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">30</span>
</aside>
<code class="phpdocumentor-signature phpdocumentor-code ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__type">mixed</span>
<span class="phpdocumentor-signature__name">RESULT_PLAYERDEATH</span>
= <span class="phpdocumentor-signature__default-value">1</span>
</code>
<section class="phpdocumentor-description"></section>
<section class="phpdocumentor-description"></section>
</article>
<article class="phpdocumentor-element -constant -public ">
<h4 class="phpdocumentor-element__name" id="constant_RESULT_UNDECIDED">
RESULT_UNDECIDED
<a href="classes/LotGD-Core-Battle.html#constant_RESULT_UNDECIDED" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="src/Battle.php"><a href="files/src-battle.html"><abbr title="src/Battle.php">Battle.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">29</span>
</aside>
<code class="phpdocumentor-signature phpdocumentor-code ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__type">mixed</span>
<span class="phpdocumentor-signature__name">RESULT_UNDECIDED</span>
= <span class="phpdocumentor-signature__default-value">0</span>
</code>
<section class="phpdocumentor-description"></section>
<section class="phpdocumentor-description"></section>
</article>
</section>
<section class="phpdocumentor-properties">
<h3 class="phpdocumentor-elements__header" id="properties">
Properties
<a href="classes/LotGD-Core-Battle.html#properties" class="headerlink"><i class="fas fa-link"></i></a>
</h3>
<article
class="
phpdocumentor-element
-property
-protected
"
>
<h4 class="phpdocumentor-element__name" id="property_configuration">
$configuration
<a href="classes/LotGD-Core-Battle.html#property_configuration" class="headerlink"><i class="fas fa-link"></i></a>
<span class="phpdocumentor-element__modifiers">
</span>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="src/Battle.php"><a href="files/src-battle.html"><abbr title="src/Battle.php">Battle.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">36</span>
</aside>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">protected</span>
<span class="phpdocumentor-signature__type">array&lt;string|int, mixed&gt;</span>
<span class="phpdocumentor-signature__name">$configuration</span>
= <span class="phpdocumentor-signature__default-value">[&quot;riposteEnabled&quot; =&gt; true, &quot;levelAdjustementEnabled&quot; =&gt; true, &quot;criticalHitEnabled&quot; =&gt; true]</span></code>
<section class="phpdocumentor-description"></section>
<section class="phpdocumentor-description"></section>
</article>
<article
class="
phpdocumentor-element
-property
-protected
"
>
<h4 class="phpdocumentor-element__name" id="property_events">
$events
<a href="classes/LotGD-Core-Battle.html#property_events" class="headerlink"><i class="fas fa-link"></i></a>
<span class="phpdocumentor-element__modifiers">
</span>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="src/Battle.php"><a href="files/src-battle.html"><abbr title="src/Battle.php">Battle.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">33</span>
</aside>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">protected</span>
<span class="phpdocumentor-signature__type"><abbr title="\Doctrine\Common\Collections\ArrayCollection">ArrayCollection</abbr></span>
<span class="phpdocumentor-signature__name">$events</span>
</code>
<section class="phpdocumentor-description"></section>
<section class="phpdocumentor-description"></section>
</article>
<article
class="
phpdocumentor-element
-property
-protected
"
>
<h4 class="phpdocumentor-element__name" id="property_game">
$game
<a href="classes/LotGD-Core-Battle.html#property_game" class="headerlink"><i class="fas fa-link"></i></a>
<span class="phpdocumentor-element__modifiers">
</span>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="src/Battle.php"><a href="files/src-battle.html"><abbr title="src/Battle.php">Battle.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">49</span>
</aside>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">protected</span>
<span class="phpdocumentor-signature__type"><a href="classes/LotGD-Core-Game.html"><abbr title="\LotGD\Core\Game">Game</abbr></a></span>
<span class="phpdocumentor-signature__name">$game</span>
</code>
<section class="phpdocumentor-description"></section>
<section class="phpdocumentor-description"></section>
</article>
<article
class="
phpdocumentor-element
-property
-protected
"
>
<h4 class="phpdocumentor-element__name" id="property_monster">
$monster
<a href="classes/LotGD-Core-Battle.html#property_monster" class="headerlink"><i class="fas fa-link"></i></a>
<span class="phpdocumentor-element__modifiers">
</span>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="src/Battle.php"><a href="files/src-battle.html"><abbr title="src/Battle.php">Battle.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">51</span>
</aside>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">protected</span>
<span class="phpdocumentor-signature__type"><a href="classes/LotGD-Core-Models-FighterInterface.html"><abbr title="\LotGD\Core\Models\FighterInterface">FighterInterface</abbr></a>|null</span>
<span class="phpdocumentor-signature__name">$monster</span>
</code>
<section class="phpdocumentor-description"></section>
<section class="phpdocumentor-description"></section>
</article>
<article
class="
phpdocumentor-element
-property
-protected
"
>
<h4 class="phpdocumentor-element__name" id="property_player">
$player
<a href="classes/LotGD-Core-Battle.html#property_player" class="headerlink"><i class="fas fa-link"></i></a>
<span class="phpdocumentor-element__modifiers">
</span>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="src/Battle.php"><a href="files/src-battle.html"><abbr title="src/Battle.php">Battle.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">50</span>
</aside>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">protected</span>
<span class="phpdocumentor-signature__type"><a href="classes/LotGD-Core-Models-FighterInterface.html"><abbr title="\LotGD\Core\Models\FighterInterface">FighterInterface</abbr></a></span>
<span class="phpdocumentor-signature__name">$player</span>
</code>
<section class="phpdocumentor-description"></section>
<section class="phpdocumentor-description"></section>
</article>
<article
class="
phpdocumentor-element
-property
-protected
"
>
<h4 class="phpdocumentor-element__name" id="property_result">
$result
<a href="classes/LotGD-Core-Battle.html#property_result" class="headerlink"><i class="fas fa-link"></i></a>
<span class="phpdocumentor-element__modifiers">
</span>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="src/Battle.php"><a href="files/src-battle.html"><abbr title="src/Battle.php">Battle.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">34</span>
</aside>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">protected</span>
<span class="phpdocumentor-signature__type">int</span>
<span class="phpdocumentor-signature__name">$result</span>
= <span class="phpdocumentor-signature__default-value">0</span></code>
<section class="phpdocumentor-description"></section>
<section class="phpdocumentor-description"></section>
</article>
<article
class="
phpdocumentor-element
-property
-protected
"
>
<h4 class="phpdocumentor-element__name" id="property_round">
$round
<a href="classes/LotGD-Core-Battle.html#property_round" class="headerlink"><i class="fas fa-link"></i></a>
<span class="phpdocumentor-element__modifiers">
</span>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="src/Battle.php"><a href="files/src-battle.html"><abbr title="src/Battle.php">Battle.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">35</span>
</aside>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">protected</span>
<span class="phpdocumentor-signature__type">int</span>
<span class="phpdocumentor-signature__name">$round</span>
= <span class="phpdocumentor-signature__default-value">0</span></code>
<section class="phpdocumentor-description"></section>
<section class="phpdocumentor-description"></section>
</article>
</section>
<section class="phpdocumentor-methods">
<h3 class="phpdocumentor-elements__header" id="methods">
Methods
<a href="classes/LotGD-Core-Battle.html#methods" class="headerlink"><i class="fas fa-link"></i></a>
</h3>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method___construct">
__construct()
<a href="classes/LotGD-Core-Battle.html#method___construct" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="src/Battle.php"><a href="files/src-battle.html"><abbr title="src/Battle.php">Battle.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">48</span>
</aside>
<p class="phpdocumentor-summary">Takes a game object and two participants (Player and Monster) to fight a battle.</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">__construct</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type"><a href="classes/LotGD-Core-Game.html"><abbr title="\LotGD\Core\Game">Game</abbr></a>&nbsp;</span><span class="phpdocumentor-signature__argument__name">$game</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type"><a href="classes/LotGD-Core-Models-FighterInterface.html"><abbr title="\LotGD\Core\Models\FighterInterface">FighterInterface</abbr></a>&nbsp;</span><span class="phpdocumentor-signature__argument__name">$player</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type"><a href="classes/LotGD-Core-Models-FighterInterface.html"><abbr title="\LotGD\Core\Models\FighterInterface">FighterInterface</abbr></a>|null&nbsp;</span><span class="phpdocumentor-signature__argument__name">$monster</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
<dl class="phpdocumentor-argument-list">
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$game</span>
: <span class="phpdocumentor-signature__argument__return-type"><a href="classes/LotGD-Core-Game.html"><abbr title="\LotGD\Core\Game">Game</abbr></a></span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
</dd>
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$player</span>
: <span class="phpdocumentor-signature__argument__return-type"><a href="classes/LotGD-Core-Models-FighterInterface.html"><abbr title="\LotGD\Core\Models\FighterInterface">FighterInterface</abbr></a></span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
</dd>
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$monster</span>
: <span class="phpdocumentor-signature__argument__return-type"><a href="classes/LotGD-Core-Models-FighterInterface.html"><abbr title="\LotGD\Core\Models\FighterInterface">FighterInterface</abbr></a>|null</span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
</dd>
</dl>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type">mixed</span>
&mdash;
</article>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method_disableCriticalHit">
disableCriticalHit()
<a href="classes/LotGD-Core-Battle.html#method_disableCriticalHit" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="src/Battle.php"><a href="files/src-battle.html"><abbr title="src/Battle.php">Battle.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">160</span>
</aside>
<p class="phpdocumentor-summary">Disable critical hits.</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">disableCriticalHit</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">void</span></code>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type">void</span>
&mdash;
</article>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method_disableLevelAdjustement">
disableLevelAdjustement()
<a href="classes/LotGD-Core-Battle.html#method_disableLevelAdjustement" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="src/Battle.php"><a href="files/src-battle.html"><abbr title="src/Battle.php">Battle.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">134</span>
</aside>
<p class="phpdocumentor-summary">Disables level adjustement.</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">disableLevelAdjustement</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">void</span></code>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type">void</span>
&mdash;
</article>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method_disableRiposte">
disableRiposte()
<a href="classes/LotGD-Core-Battle.html#method_disableRiposte" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="src/Battle.php"><a href="files/src-battle.html"><abbr title="src/Battle.php">Battle.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">101</span>
</aside>
<p class="phpdocumentor-summary">Disables ripostes.</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">disableRiposte</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">void</span></code>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type">void</span>
&mdash;
</article>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method_enableCriticalHit">
enableCriticalHit()
<a href="classes/LotGD-Core-Battle.html#method_enableCriticalHit" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="src/Battle.php"><a href="files/src-battle.html"><abbr title="src/Battle.php">Battle.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">168</span>
</aside>
<p class="phpdocumentor-summary">enables critical hits.</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">enableCriticalHit</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">void</span></code>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type">void</span>
&mdash;
</article>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method_enableLevelAdjustement">
enableLevelAdjustement()
<a href="classes/LotGD-Core-Battle.html#method_enableLevelAdjustement" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="src/Battle.php"><a href="files/src-battle.html"><abbr title="src/Battle.php">Battle.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">126</span>
</aside>
<p class="phpdocumentor-summary">Enables level adjustement.</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">enableLevelAdjustement</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">void</span></code>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type">void</span>
&mdash;
</article>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method_enableRiposte">
enableRiposte()
<a href="classes/LotGD-Core-Battle.html#method_enableRiposte" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="src/Battle.php"><a href="files/src-battle.html"><abbr title="src/Battle.php">Battle.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">109</span>
</aside>
<p class="phpdocumentor-summary">Enables ripostes.</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">enableRiposte</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">void</span></code>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type">void</span>
&mdash;
</article>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method_fightNRounds">
fightNRounds()
<a href="classes/LotGD-Core-Battle.html#method_fightNRounds" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="src/Battle.php"><a href="files/src-battle.html"><abbr title="src/Battle.php">Battle.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">237</span>
</aside>
<p class="phpdocumentor-summary">Fights the number of rounds given by the parameter $n and returns the number
of actual rounds fought.</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">fightNRounds</span><span>(</span><span class="phpdocumentor-signature__argument"><span>[</span><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$n</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">1</span><span> ]</span></span><span class="phpdocumentor-signature__argument"><span>[</span><span>, </span><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$firstDamageRound</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">self::DAMAGEROUND_BOTH</span><span> ]</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">int</span></code>
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
<dl class="phpdocumentor-argument-list">
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$n</span>
: <span class="phpdocumentor-signature__argument__return-type">int</span>
= <span class="phpdocumentor-signature__argument__default-value">1</span> </dt>
<dd class="phpdocumentor-argument-list__definition">
</dd>
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$firstDamageRound</span>
: <span class="phpdocumentor-signature__argument__return-type">int</span>
= <span class="phpdocumentor-signature__argument__default-value">self::DAMAGEROUND_BOTH</span> </dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>Which damage rounds are calculated. Cannot be 0.</p>
</section>
</dd>
</dl>
<h5 class="phpdocumentor-tag-list__heading" id="tags">
Tags
<a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
</h5>
<dl class="phpdocumentor-tag-list">
<dt class="phpdocumentor-tag-list__entry">
<span class="phpdocumentor-tag__name">throws</span>
</dt>
<dd class="phpdocumentor-tag-list__definition">
<span class="phpdocumentor-tag-link"><a href="classes/LotGD-Core-Exceptions-ArgumentException.html"><abbr title="\LotGD\Core\Exceptions\ArgumentException">ArgumentException</abbr></a></span>
<section class="phpdocumentor-description"><p>if firstDamageRound is 0.</p>
</section>
</dd>
<dt class="phpdocumentor-tag-list__entry">
<span class="phpdocumentor-tag__name">throws</span>
</dt>
<dd class="phpdocumentor-tag-list__definition">
<span class="phpdocumentor-tag-link"><a href="classes/LotGD-Core-Exceptions-BattleIsOverException.html"><abbr title="\LotGD\Core\Exceptions\BattleIsOverException">BattleIsOverException</abbr></a></span>
</dd>
</dl>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type">int</span>
&mdash;
<section class="phpdocumentor-description"><p>Number of fights fought.</p>
</section>
</article>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method_getEvents">
getEvents()
<a href="classes/LotGD-Core-Battle.html#method_getEvents" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="src/Battle.php"><a href="files/src-battle.html"><abbr title="src/Battle.php">Battle.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">93</span>
</aside>
<p class="phpdocumentor-summary">Returns a list of all battle events.</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">getEvents</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type"><abbr title="\Doctrine\Common\Collections\Collection">Collection</abbr></span></code>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type"><abbr title="\Doctrine\Common\Collections\Collection">Collection</abbr></span>
&mdash;
</article>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method_getLoser">
getLoser()
<a href="classes/LotGD-Core-Battle.html#method_getLoser" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="src/Battle.php"><a href="files/src-battle.html"><abbr title="src/Battle.php">Battle.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">219</span>
</aside>
<p class="phpdocumentor-summary">Returns the loser of this fight.</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">getLoser</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type"><a href="classes/LotGD-Core-Models-FighterInterface.html"><abbr title="\LotGD\Core\Models\FighterInterface">FighterInterface</abbr></a></span></code>
<h5 class="phpdocumentor-tag-list__heading" id="tags">
Tags
<a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
</h5>
<dl class="phpdocumentor-tag-list">
<dt class="phpdocumentor-tag-list__entry">
<span class="phpdocumentor-tag__name">throws</span>
</dt>
<dd class="phpdocumentor-tag-list__definition">
<span class="phpdocumentor-tag-link"><a href="classes/LotGD-Core-Exceptions-BattleNotOverException.html"><abbr title="\LotGD\Core\Exceptions\BattleNotOverException">BattleNotOverException</abbr></a></span>
<section class="phpdocumentor-description"><p>if battle is not over.</p>
</section>
</dd>
</dl>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type"><a href="classes/LotGD-Core-Models-FighterInterface.html"><abbr title="\LotGD\Core\Models\FighterInterface">FighterInterface</abbr></a></span>
&mdash;
</article>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method_getMonster">
getMonster()
<a href="classes/LotGD-Core-Battle.html#method_getMonster" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="src/Battle.php"><a href="files/src-battle.html"><abbr title="src/Battle.php">Battle.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">195</span>
</aside>
<p class="phpdocumentor-summary">Returns the montser instance.</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">getMonster</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type"><a href="classes/LotGD-Core-Models-FighterInterface.html"><abbr title="\LotGD\Core\Models\FighterInterface">FighterInterface</abbr></a></span></code>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type"><a href="classes/LotGD-Core-Models-FighterInterface.html"><abbr title="\LotGD\Core\Models\FighterInterface">FighterInterface</abbr></a></span>
&mdash;
</article>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method_getPlayer">
getPlayer()
<a href="classes/LotGD-Core-Battle.html#method_getPlayer" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="src/Battle.php"><a href="files/src-battle.html"><abbr title="src/Battle.php">Battle.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">186</span>
</aside>
<p class="phpdocumentor-summary">Returns the player instance.</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">getPlayer</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type"><a href="classes/LotGD-Core-Models-FighterInterface.html"><abbr title="\LotGD\Core\Models\FighterInterface">FighterInterface</abbr></a></span></code>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type"><a href="classes/LotGD-Core-Models-FighterInterface.html"><abbr title="\LotGD\Core\Models\FighterInterface">FighterInterface</abbr></a></span>
&mdash;
</article>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method_getWinner">
getWinner()
<a href="classes/LotGD-Core-Battle.html#method_getWinner" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="src/Battle.php"><a href="files/src-battle.html"><abbr title="src/Battle.php">Battle.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">205</span>
</aside>
<p class="phpdocumentor-summary">Returns the winner of this fight.</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">getWinner</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type"><a href="classes/LotGD-Core-Models-FighterInterface.html"><abbr title="\LotGD\Core\Models\FighterInterface">FighterInterface</abbr></a></span></code>
<h5 class="phpdocumentor-tag-list__heading" id="tags">
Tags
<a href="#tags" class="headerlink"><i class="fas fa-link"></i></a>
</h5>
<dl class="phpdocumentor-tag-list">
<dt class="phpdocumentor-tag-list__entry">
<span class="phpdocumentor-tag__name">throws</span>
</dt>
<dd class="phpdocumentor-tag-list__definition">
<span class="phpdocumentor-tag-link"><a href="classes/LotGD-Core-Exceptions-BattleNotOverException.html"><abbr title="\LotGD\Core\Exceptions\BattleNotOverException">BattleNotOverException</abbr></a></span>
<section class="phpdocumentor-description"><p>if battle is not over.</p>
</section>
</dd>
</dl>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type"><a href="classes/LotGD-Core-Models-FighterInterface.html"><abbr title="\LotGD\Core\Models\FighterInterface">FighterInterface</abbr></a></span>
&mdash;
</article>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method_isCriticalHitEnabled">
isCriticalHitEnabled()
<a href="classes/LotGD-Core-Battle.html#method_isCriticalHitEnabled" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="src/Battle.php"><a href="files/src-battle.html"><abbr title="src/Battle.php">Battle.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">152</span>
</aside>
<p class="phpdocumentor-summary">Returns true if critical hit events are enabled.</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">isCriticalHitEnabled</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">bool</span></code>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type">bool</span>
&mdash;
</article>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method_isLevelAdjustementEnabled">
isLevelAdjustementEnabled()
<a href="classes/LotGD-Core-Battle.html#method_isLevelAdjustementEnabled" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="src/Battle.php"><a href="files/src-battle.html"><abbr title="src/Battle.php">Battle.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">143</span>
</aside>
<p class="phpdocumentor-summary">Returns true if level adjustements are enabled.</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">isLevelAdjustementEnabled</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">bool</span></code>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type">bool</span>
&mdash;
</article>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method_isOver">
isOver()
<a href="classes/LotGD-Core-Battle.html#method_isOver" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="src/Battle.php"><a href="files/src-battle.html"><abbr title="src/Battle.php">Battle.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">177</span>
</aside>
<p class="phpdocumentor-summary">Returns true if the battle is over.</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">isOver</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">bool</span></code>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type">bool</span>
&mdash;
</article>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method_isRiposteEnabled">
isRiposteEnabled()
<a href="classes/LotGD-Core-Battle.html#method_isRiposteEnabled" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="src/Battle.php"><a href="files/src-battle.html"><abbr title="src/Battle.php">Battle.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">118</span>
</aside>
<p class="phpdocumentor-summary">Returns true if ripostes are enabled.</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">isRiposteEnabled</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">bool</span></code>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type">bool</span>
&mdash;
</article>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method_serialize">
serialize()
<a href="classes/LotGD-Core-Battle.html#method_serialize" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="src/Battle.php"><a href="files/src-battle.html"><abbr title="src/Battle.php">Battle.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">60</span>
</aside>
<p class="phpdocumentor-summary">Returns a string which contains the important fields that must be serialized.</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">serialize</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">string</span></code>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type">string</span>
&mdash;
</article>
<article
class="phpdocumentor-element
-method
-public
-static "
>
<h4 class="phpdocumentor-element__name" id="method_unserialize">
unserialize()
<a href="classes/LotGD-Core-Battle.html#method_unserialize" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="src/Battle.php"><a href="files/src-battle.html"><abbr title="src/Battle.php">Battle.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">76</span>
</aside>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__name">unserialize</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type"><a href="classes/LotGD-Core-Game.html"><abbr title="\LotGD\Core\Game">Game</abbr></a>&nbsp;</span><span class="phpdocumentor-signature__argument__name">$game</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type"><a href="classes/LotGD-Core-Models-FighterInterface.html"><abbr title="\LotGD\Core\Models\FighterInterface">FighterInterface</abbr></a>&nbsp;</span><span class="phpdocumentor-signature__argument__name">$player</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">string&nbsp;</span><span class="phpdocumentor-signature__argument__name">$serialized</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">self</span></code>
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
<dl class="phpdocumentor-argument-list">
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$game</span>
: <span class="phpdocumentor-signature__argument__return-type"><a href="classes/LotGD-Core-Game.html"><abbr title="\LotGD\Core\Game">Game</abbr></a></span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
</dd>
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$player</span>
: <span class="phpdocumentor-signature__argument__return-type"><a href="classes/LotGD-Core-Models-FighterInterface.html"><abbr title="\LotGD\Core\Models\FighterInterface">FighterInterface</abbr></a></span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
</dd>
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$serialized</span>
: <span class="phpdocumentor-signature__argument__return-type">string</span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
</dd>
</dl>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type">self</span>
&mdash;
</article>
<article
class="phpdocumentor-element
-method
-protected
"
>
<h4 class="phpdocumentor-element__name" id="method_fightOneRound">
fightOneRound()
<a href="classes/LotGD-Core-Battle.html#method_fightOneRound" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="src/Battle.php"><a href="files/src-battle.html"><abbr title="src/Battle.php">Battle.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">263</span>
</aside>
<p class="phpdocumentor-summary">Fights exactly 1 round.</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">protected</span>
<span class="phpdocumentor-signature__name">fightOneRound</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$firstDamageRound</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">void</span></code>
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
<dl class="phpdocumentor-argument-list">
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$firstDamageRound</span>
: <span class="phpdocumentor-signature__argument__return-type">int</span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
</dd>
</dl>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type">void</span>
&mdash;
</article>
<article
class="phpdocumentor-element
-method
-protected
"
>
<h4 class="phpdocumentor-element__name" id="method_turn">
turn()
<a href="classes/LotGD-Core-Battle.html#method_turn" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="src/Battle.php"><a href="files/src-battle.html"><abbr title="src/Battle.php">Battle.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">326</span>
</aside>
<p class="phpdocumentor-summary">Runs one turn.</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">protected</span>
<span class="phpdocumentor-signature__name">turn</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type"><a href="classes/LotGD-Core-Models-FighterInterface.html"><abbr title="\LotGD\Core\Models\FighterInterface">FighterInterface</abbr></a>&nbsp;</span><span class="phpdocumentor-signature__argument__name">$attacker</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type"><a href="classes/LotGD-Core-Models-FighterInterface.html"><abbr title="\LotGD\Core\Models\FighterInterface">FighterInterface</abbr></a>&nbsp;</span><span class="phpdocumentor-signature__argument__name">$defender</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type"><abbr title="\Doctrine\Common\Collections\ArrayCollection">ArrayCollection</abbr></span></code>
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
<dl class="phpdocumentor-argument-list">
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$attacker</span>
: <span class="phpdocumentor-signature__argument__return-type"><a href="classes/LotGD-Core-Models-FighterInterface.html"><abbr title="\LotGD\Core\Models\FighterInterface">FighterInterface</abbr></a></span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
</dd>
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$defender</span>
: <span class="phpdocumentor-signature__argument__return-type"><a href="classes/LotGD-Core-Models-FighterInterface.html"><abbr title="\LotGD\Core\Models\FighterInterface">FighterInterface</abbr></a></span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
</dd>
</dl>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type"><abbr title="\Doctrine\Common\Collections\ArrayCollection">ArrayCollection</abbr></span>
&mdash;
</article>
</section>
<script type="text/javascript">
function loadExternalCodeSnippets(line) {
Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach((pre) => {
var src = pre.getAttribute('data-src').replace( /\\/g, '/');
var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
var language = 'php';
var code = document.createElement('code');
code.className = 'language-' + language;
pre.textContent = '';
pre.setAttribute('data-line', line)
code.textContent = 'Loading…';
pre.appendChild(code);
var xhr = new XMLHttpRequest();
xhr.open('GET', src, true);
xhr.onreadystatechange = function () {
if (xhr.readyState == 4) {
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
Prism.highlightElement(code);
}
else if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
}
else {
code.textContent = '✖ Error: File does not exist, is empty or trying to view from localhost';
}
}
};
xhr.send(null);
});
}
var modals = document.querySelectorAll("[data-modal]");
modals.forEach(function (trigger) {
trigger.addEventListener("click", function (event) {
//event.preventDefault();
const modal = document.getElementById(trigger.dataset.modal);
modal.classList.add("phpdocumentor-modal__open");
loadExternalCodeSnippets(trigger.dataset.line)
const exits = modal.querySelectorAll("[data-exit-button]");
exits.forEach(function (exit) {
exit.addEventListener("click", function (event) {
event.preventDefault();
modal.classList.remove("phpdocumentor-modal__open");
});
});
});
});
</script>
</article>
<section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
<section class="phpdocumentor-search-results__dialog">
<header class="phpdocumentor-search-results__header">
<h2 class="phpdocumentor-search-results__title">Search results</h2>
<button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
</header>
<section class="phpdocumentor-search-results__body">
<ul class="phpdocumentor-search-results__entries"></ul>
</section>
</section>
</section>
</div>
</div>
<a href="classes/LotGD-Core-Battle.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
</main>
<script>
cssVars({});
</script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
</body>
</html>