mirror of
https://github.com/openlegends/asset-php.git
synced 2025-02-08 13:04:22 +00:00
define returned data types
This commit is contained in:
parent
80bcebc4f4
commit
0b80763b46
@ -6,16 +6,17 @@ namespace OpenLegends\Asset\Test\Card\Ability;
|
|||||||
|
|
||||||
class Attack extends \OpenLegends\Engine\Abstract\Card\Ability
|
class Attack extends \OpenLegends\Engine\Abstract\Card\Ability
|
||||||
{
|
{
|
||||||
public function player()
|
public function player(): void
|
||||||
{}
|
{}
|
||||||
|
|
||||||
public function opponent()
|
public function opponent(): void
|
||||||
{}
|
{}
|
||||||
|
|
||||||
public function card(
|
public function card(
|
||||||
\OpenLegends\Engine\Abstract\Card $source,
|
\OpenLegends\Engine\Abstract\Card $source,
|
||||||
\OpenLegends\Engine\Abstract\Card $target
|
\OpenLegends\Engine\Abstract\Card $target
|
||||||
) {
|
): void
|
||||||
|
{
|
||||||
$target->setHealth(
|
$target->setHealth(
|
||||||
$target->getHealth() - $source->getPower()
|
$target->getHealth() - $source->getPower()
|
||||||
);
|
);
|
||||||
@ -28,7 +29,8 @@ class Attack extends \OpenLegends\Engine\Abstract\Card\Ability
|
|||||||
public function silentize(
|
public function silentize(
|
||||||
\OpenLegends\Engine\Abstract\Card $target,
|
\OpenLegends\Engine\Abstract\Card $target,
|
||||||
\OpenLegends\Engine\Abstract\Card $origin
|
\OpenLegends\Engine\Abstract\Card $origin
|
||||||
) {
|
): void
|
||||||
|
{
|
||||||
$target->setCost(
|
$target->setCost(
|
||||||
$origin->getCost()
|
$origin->getCost()
|
||||||
);
|
);
|
||||||
@ -44,6 +46,6 @@ class Attack extends \OpenLegends\Engine\Abstract\Card\Ability
|
|||||||
// @TODO remove abilities
|
// @TODO remove abilities
|
||||||
}
|
}
|
||||||
|
|
||||||
public function apply()
|
public function apply(): void
|
||||||
{}
|
{}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user