Browse Source

rename library from engine-php to core-php

main
openlegends 9 months ago
parent
commit
c97bfd446d
  1. 2
      README.md
  2. 2
      src/Test/Card/Ability/Breakthrough.php
  3. 2
      src/Test/Card/Ability/Damage.php
  4. 2
      src/Test/Card/Ability/Drain.php
  5. 4
      src/Test/Card/Ability/Multiple.php
  6. 10
      src/Test/Card/Action/Damage.php
  7. 10
      src/Test/Card/Action/Heal.php
  8. 2
      src/Test/Card/Attribute/Goblin.php
  9. 2
      src/Test/Card/Attribute/Multiple.php
  10. 2
      src/Test/Card/Attribute/Neutral.php
  11. 2
      src/Test/Card/Goblin.php
  12. 48
      src/Test/Card/Mouse.php
  13. 2
      src/Test/Card/Rarity/Common.php
  14. 2
      src/Test/Card/Rarity/Rare.php
  15. 2
      src/Test/Card/Rat.php
  16. 2
      src/Test/Card/Type/Animal.php
  17. 2
      src/Test/Card/Type/Goblin.php
  18. 2
      src/Test/Game/Arena.php
  19. 2
      src/Test/Game/Player/Player1.php
  20. 2
      src/Test/Game/Player/Player2.php
  21. 2
      src/Test/Pool/Card.php
  22. 2
      src/Test/User/Type/Elf.php

2
README.md

@ -1,3 +1,3 @@ @@ -1,3 +1,3 @@
# Game Assets for Open Legends
Game schemes, items and behavior implementation based on the [engine-php](https://github.com/openlegends/engine-php) interface.
Game schemes, items and behavior implementation based on the [core-php](https://github.com/openlegends/core-php) interface.

2
src/Test/Card/Ability/Breakthrough.php

@ -4,7 +4,7 @@ declare(strict_types=1); @@ -4,7 +4,7 @@ declare(strict_types=1);
namespace OpenLegends\Asset\Test\Card\Ability;
class Breakthrough extends \OpenLegends\Engine\Abstract\Card\Ability
class Breakthrough extends \OpenLegends\Core\Abstract\Card\Ability
{
public function __construct()
{

2
src/Test/Card/Ability/Damage.php

@ -4,7 +4,7 @@ declare(strict_types=1); @@ -4,7 +4,7 @@ declare(strict_types=1);
namespace OpenLegends\Asset\Test\Card\Ability;
class Damage extends \OpenLegends\Engine\Abstract\Card\Ability
class Damage extends \OpenLegends\Core\Abstract\Card\Ability
{
public function __construct()
{

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

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

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

@ -4,7 +4,7 @@ declare(strict_types=1); @@ -4,7 +4,7 @@ declare(strict_types=1);
namespace OpenLegends\Asset\Test\Card\Ability;
class Multiple extends \OpenLegends\Engine\Abstract\Card\Ability
class Multiple extends \OpenLegends\Core\Abstract\Card\Ability
{
private array $_abilities = [];
@ -20,7 +20,7 @@ class Multiple extends \OpenLegends\Engine\Abstract\Card\Ability @@ -20,7 +20,7 @@ class Multiple extends \OpenLegends\Engine\Abstract\Card\Ability
}
public function add(
\OpenLegends\Engine\Abstract\Card\Ability $ability
\OpenLegends\Core\Abstract\Card\Ability $ability
): void
{
$this->_abilities[] = $ability;

10
src/Test/Card/Action/Damage.php

@ -4,22 +4,22 @@ declare(strict_types=1); @@ -4,22 +4,22 @@ declare(strict_types=1);
namespace OpenLegends\Asset\Test\Card\Action;
class Damage extends \OpenLegends\Engine\Abstract\Card\Action
class Damage extends \OpenLegends\Core\Abstract\Card\Action
{
private \OpenLegends\Engine\Abstract\Card $_card;
private \OpenLegends\Core\Abstract\Card $_card;
private int $_power = 0;
private int $_breakthrough = 0;
public function __construct(
\OpenLegends\Engine\Abstract\Card $card
\OpenLegends\Core\Abstract\Card $card
) {
$this->_card = $card;
}
public function card(
\OpenLegends\Engine\Abstract\Card &$card,
\OpenLegends\Core\Abstract\Card &$card,
): void
{
$damage = $this->getPower() ? $this->getPower() : $this->_card->getPower();
@ -64,7 +64,7 @@ class Damage extends \OpenLegends\Engine\Abstract\Card\Action @@ -64,7 +64,7 @@ class Damage extends \OpenLegends\Engine\Abstract\Card\Action
}
public function player(
\OpenLegends\Engine\Abstract\Player &$player,
\OpenLegends\Core\Abstract\Player &$player,
): void
{
$damage = $this->getPower() ? $this->getPower() : $this->_card->getPower();

10
src/Test/Card/Action/Heal.php

@ -4,20 +4,20 @@ declare(strict_types=1); @@ -4,20 +4,20 @@ declare(strict_types=1);
namespace OpenLegends\Asset\Test\Card\Action;
class Heal extends \OpenLegends\Engine\Abstract\Card\Action
class Heal extends \OpenLegends\Core\Abstract\Card\Action
{
private \OpenLegends\Engine\Abstract\Card $_card;
private \OpenLegends\Core\Abstract\Card $_card;
private int $_power = 0;
public function __construct(
\OpenLegends\Engine\Abstract\Card $card
\OpenLegends\Core\Abstract\Card $card
) {
$this->_card = $card;
}
public function card(
\OpenLegends\Engine\Abstract\Card &$card
\OpenLegends\Core\Abstract\Card &$card
): void
{
$card->setHealth(
@ -26,7 +26,7 @@ class Heal extends \OpenLegends\Engine\Abstract\Card\Action @@ -26,7 +26,7 @@ class Heal extends \OpenLegends\Engine\Abstract\Card\Action
}
public function player(
\OpenLegends\Engine\Abstract\Player &$player
\OpenLegends\Core\Abstract\Player &$player
): void
{
$player->setHealth(

2
src/Test/Card/Attribute/Goblin.php

@ -4,5 +4,5 @@ declare(strict_types=1); @@ -4,5 +4,5 @@ declare(strict_types=1);
namespace OpenLegends\Asset\Test\Card\Attribute;
class Goblin extends \OpenLegends\Engine\Abstract\Card\Attribute
class Goblin extends \OpenLegends\Core\Abstract\Card\Attribute
{}

2
src/Test/Card/Attribute/Multiple.php

@ -4,5 +4,5 @@ declare(strict_types=1); @@ -4,5 +4,5 @@ declare(strict_types=1);
namespace OpenLegends\Asset\Test\Card\Attribute;
class Multiple extends \OpenLegends\Engine\Abstract\Card\Attribute
class Multiple extends \OpenLegends\Core\Abstract\Card\Attribute
{}

2
src/Test/Card/Attribute/Neutral.php

@ -4,5 +4,5 @@ declare(strict_types=1); @@ -4,5 +4,5 @@ declare(strict_types=1);
namespace OpenLegends\Asset\Test\Card\Attribute;
class Neutral extends \OpenLegends\Engine\Abstract\Card\Attribute
class Neutral extends \OpenLegends\Core\Abstract\Card\Attribute
{}

2
src/Test/Card/Goblin.php

@ -4,7 +4,7 @@ declare(strict_types=1); @@ -4,7 +4,7 @@ declare(strict_types=1);
namespace OpenLegends\Asset\Test\Card;
class Goblin extends \OpenLegends\Engine\Abstract\Card
class Goblin extends \OpenLegends\Core\Abstract\Card
{
public function __construct()
{

48
src/Test/Card/Mouse.php

@ -4,7 +4,7 @@ declare(strict_types=1); @@ -4,7 +4,7 @@ declare(strict_types=1);
namespace OpenLegends\Asset\Test\Card;
class Mouse extends \OpenLegends\Engine\Abstract\Card
class Mouse extends \OpenLegends\Core\Abstract\Card
{
public function __construct()
{
@ -84,4 +84,50 @@ class Mouse extends \OpenLegends\Engine\Abstract\Card @@ -84,4 +84,50 @@ class Mouse extends \OpenLegends\Engine\Abstract\Card
new \OpenLegends\Asset\Test\Card\Ability\Damage()
);
}
public function onCard(
\OpenLegends\Core\Abstract\Card $card
)
{
$damage = new \OpenLegends\Asset\Test\Card\Action\Damage(
$mouse
);
$damage->card(
$card
);
if ($damage->getBreakthrough())
{
$damage = new \OpenLegends\Asset\Test\Card\Action\Damage(
$mouse
);
$damage->setPower(
$damage->getBreakthrough()
);
$damage->player(
$player
);
}
}
public function onPlayer(
\OpenLegends\Core\Abstract\Player $player
)
{
$damage = new \OpenLegends\Asset\Test\Card\Action\Damage(
$mouse
);
$damage->player(
$player
);
}
public function onDiscard(
$card
)
{}
}

2
src/Test/Card/Rarity/Common.php

@ -4,5 +4,5 @@ declare(strict_types=1); @@ -4,5 +4,5 @@ declare(strict_types=1);
namespace OpenLegends\Asset\Test\Card\Rarity;
class Common extends \OpenLegends\Engine\Abstract\Card\Rarity
class Common extends \OpenLegends\Core\Abstract\Card\Rarity
{}

2
src/Test/Card/Rarity/Rare.php

@ -4,5 +4,5 @@ declare(strict_types=1); @@ -4,5 +4,5 @@ declare(strict_types=1);
namespace OpenLegends\Asset\Test\Card\Rarity;
class Rare extends \OpenLegends\Engine\Abstract\Card\Rarity
class Rare extends \OpenLegends\Core\Abstract\Card\Rarity
{}

2
src/Test/Card/Rat.php

@ -4,7 +4,7 @@ declare(strict_types=1); @@ -4,7 +4,7 @@ declare(strict_types=1);
namespace OpenLegends\Asset\Test\Card;
class Rat extends \OpenLegends\Engine\Abstract\Card
class Rat extends \OpenLegends\Core\Abstract\Card
{
public function __construct()
{

2
src/Test/Card/Type/Animal.php

@ -4,5 +4,5 @@ declare(strict_types=1); @@ -4,5 +4,5 @@ declare(strict_types=1);
namespace OpenLegends\Asset\Test\Card\Type;
class Animal extends \OpenLegends\Engine\Abstract\Card\Type
class Animal extends \OpenLegends\Core\Abstract\Card\Type
{}

2
src/Test/Card/Type/Goblin.php

@ -4,5 +4,5 @@ declare(strict_types=1); @@ -4,5 +4,5 @@ declare(strict_types=1);
namespace OpenLegends\Asset\Test\Card\Type;
class Goblin extends \OpenLegends\Engine\Abstract\Card\Type
class Goblin extends \OpenLegends\Core\Abstract\Card\Type
{}

2
src/Test/Game/Arena.php

@ -4,7 +4,7 @@ declare(strict_types=1); @@ -4,7 +4,7 @@ declare(strict_types=1);
namespace OpenLegends\Asset\Test\Game;
class Arena extends \OpenLegends\Engine\Abstract\Game
class Arena extends \OpenLegends\Core\Abstract\Game
{
public function __construct()
{

2
src/Test/Game/Player/Player1.php

@ -4,7 +4,7 @@ declare(strict_types=1); @@ -4,7 +4,7 @@ declare(strict_types=1);
namespace OpenLegends\Asset\Test\Game\Player;
class Player1 extends \OpenLegends\Engine\Abstract\Game\Player
class Player1 extends \OpenLegends\Core\Abstract\Game\Player
{
public function __construct()
{

2
src/Test/Game/Player/Player2.php

@ -4,7 +4,7 @@ declare(strict_types=1); @@ -4,7 +4,7 @@ declare(strict_types=1);
namespace OpenLegends\Asset\Test\Game\Player;
class Player2 extends \OpenLegends\Engine\Abstract\Game\Player
class Player2 extends \OpenLegends\Core\Abstract\Game\Player
{
public function __construct()
{

2
src/Test/Pool/Card.php

@ -4,5 +4,5 @@ declare(strict_types=1); @@ -4,5 +4,5 @@ declare(strict_types=1);
namespace OpenLegends\Asset\Test\Pool;
class Card extends \OpenLegends\Engine\Abstract\Pool\Card
class Card extends \OpenLegends\Core\Abstract\Pool\Card
{}

2
src/Test/User/Type/Elf.php

@ -4,7 +4,7 @@ declare(strict_types=1); @@ -4,7 +4,7 @@ declare(strict_types=1);
namespace OpenLegends\Asset\Test\User\Type;
class Elf extends \OpenLegends\Engine\Abstract\User\Type
class Elf extends \OpenLegends\Core\Abstract\User\Type
{
public function __construct()
{

Loading…
Cancel
Save