From cc1e9f642bac568c9284d46fc03803d8a63e3d83 Mon Sep 17 00:00:00 2001 From: openlegends Date: Mon, 18 Mar 2024 04:03:41 +0200 Subject: [PATCH] implement heal action --- src/Test/Card/Action/Heal.php | 36 +++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 src/Test/Card/Action/Heal.php diff --git a/src/Test/Card/Action/Heal.php b/src/Test/Card/Action/Heal.php new file mode 100644 index 0000000..65fcd86 --- /dev/null +++ b/src/Test/Card/Action/Heal.php @@ -0,0 +1,36 @@ +_card = $card; + } + + public function card( + \OpenLegends\Engine\Abstract\Card &$card, + ?int $power = null + ): void + { + $card->setHealth( + $card->getHealth() + ($power ? $power : $this->_card->getPower()) + ); + } + + public function player( + \OpenLegends\Engine\Abstract\Player &$player, + ?int $power = null + ): void + { + $player->setHealth( + $player->getHealth() + ($power ? $power : $this->_card->getPower()) + ); + } +} \ No newline at end of file