From e652ac6ca0cd4a6d9438ac98f9909364743d9a30 Mon Sep 17 00:00:00 2001 From: openlegends Date: Sat, 16 Mar 2024 15:26:52 +0200 Subject: [PATCH] init multiple ability --- src/Test/Ability/Multiple.php | 17 +++++++++++++++++ src/Test/Card/Goblin.php | 10 ++++++++-- 2 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 src/Test/Ability/Multiple.php diff --git a/src/Test/Ability/Multiple.php b/src/Test/Ability/Multiple.php new file mode 100644 index 0000000..28de17c --- /dev/null +++ b/src/Test/Ability/Multiple.php @@ -0,0 +1,17 @@ +_abilities[] = $ability; + } +} \ No newline at end of file diff --git a/src/Test/Card/Goblin.php b/src/Test/Card/Goblin.php index 6d73927..9f54b1e 100644 --- a/src/Test/Card/Goblin.php +++ b/src/Test/Card/Goblin.php @@ -8,14 +8,20 @@ class Goblin extends \OpenLegends\Engine\Abstract\Card { public function __construct() { - $this->setAbility( + $ability = new \OpenLegends\Asset\Test\Ability\Multiple(); + + $ability->add( new \OpenLegends\Asset\Test\Ability\Lethal() ); - $this->addAbility( + $ability->add( new \OpenLegends\Asset\Test\Ability\Guard() ); + $this->setAbility( + $ability + ); + $this->setAttribute( new \OpenLegends\Asset\Test\Attribute\Neutral() );