Browse Source

draft ability apply method

main
openlegends 9 months ago
parent
commit
692cf3567c
  1. 3
      src/Test/Card/Ability/Attack.php
  2. 3
      src/Test/Card/Ability/Drain.php
  3. 3
      src/Test/Card/Ability/Guard.php
  4. 3
      src/Test/Card/Ability/Lethal.php
  5. 8
      src/Test/Card/Ability/Multiple.php

3
src/Test/Card/Ability/Attack.php

@ -43,4 +43,7 @@ class Attack extends \OpenLegends\Engine\Abstract\Card\Ability
// @TODO remove abilities // @TODO remove abilities
} }
public function apply()
{}
} }

3
src/Test/Card/Ability/Drain.php

@ -5,4 +5,7 @@ declare(strict_types=1);
namespace OpenLegends\Asset\Test\Card\Ability; namespace OpenLegends\Asset\Test\Card\Ability;
class Drain extends \OpenLegends\Engine\Abstract\Card\Ability class Drain extends \OpenLegends\Engine\Abstract\Card\Ability
{
public function apply(): void
{} {}
}

3
src/Test/Card/Ability/Guard.php

@ -5,4 +5,7 @@ declare(strict_types=1);
namespace OpenLegends\Asset\Test\Card\Ability; namespace OpenLegends\Asset\Test\Card\Ability;
class Guard extends \OpenLegends\Engine\Abstract\Card\Ability class Guard extends \OpenLegends\Engine\Abstract\Card\Ability
{
public function apply(): void
{} {}
}

3
src/Test/Card/Ability/Lethal.php

@ -5,4 +5,7 @@ declare(strict_types=1);
namespace OpenLegends\Asset\Test\Card\Ability; namespace OpenLegends\Asset\Test\Card\Ability;
class Lethal extends \OpenLegends\Engine\Abstract\Card\Ability class Lethal extends \OpenLegends\Engine\Abstract\Card\Ability
{
public function apply(): void
{} {}
}

8
src/Test/Card/Ability/Multiple.php

@ -14,4 +14,12 @@ class Multiple extends \OpenLegends\Engine\Abstract\Card\Ability
{ {
$this->_abilities[] = $ability; $this->_abilities[] = $ability;
} }
public function apply(): void
{
foreach ($this->_abilities as $ability)
{
$ability->apply();
}
}
} }
Loading…
Cancel
Save