Implementing An Attachment Card - bugladen/bga7s5s GitHub Wiki
To implement an Attachment card:
- If not done already, make sure the image for the card is stored at the proper location . Ensure that the image is sized correctly .
- Create a new PHP file in the proper location .
- In the new PHP file, create a class with the proper name .
- If the card is a city card, it must extend the CityAttachment class.
- If the card is a faction deck card, it must extend the FactionAttachment class.
- Using the card as a reference, set the properties of the new class as illustrated below.
- Ensure that
parent::__construct()
is called from your constructor. - Add any passive or forced reaction code.
- Add any necessary Action classes.
- Add any necessary Reaction classes.
- Add any necessary Technique classes.
- Add any necessary Maneuver classes.
Below is the Attachment card Eager Blade and its basic class definition - the code for the effects still need to be added.
<?php
namespace Bga\Games\SeventhSeaCityOfFiveSails\cards\_7s5s;
use Bga\Games\SeventhSeaCityOfFiveSails\cards\CityAttachment;
class _01195 extends CityAttachment
{
public function __construct()
{
parent::__construct();
$this->Name = 'Eager Blade';
$this->Image = "img/cards/7s5s/195.jpg";
$this->ExpansionName = "_7s5s";
$this->ExpansionNumber = 1;
$this->CardNumber = 195;
$this->CityCardNumber = 19;
$this->WealthCost = 1;
$this->ResolveModifier = 0;
$this->CombatModifier = 1;
$this->FinesseModifier = 0;
$this->InfluenceModifier = 0;
$this->Traits = [
'Corruption',
'Weapon',
'Melee',
'Sword',
'Unique',
];
}
}